diff options
3227 files changed, 13035 insertions, 12324 deletions
| @@ -1677,7 +1677,7 @@ W: http://www.codemonkey.org.uk | |||
| 1677 | D: Assorted VIA x86 support. | 1677 | D: Assorted VIA x86 support. |
| 1678 | D: 2.5 AGPGART overhaul. | 1678 | D: 2.5 AGPGART overhaul. |
| 1679 | D: CPUFREQ maintenance. | 1679 | D: CPUFREQ maintenance. |
| 1680 | D: Fedora kernel maintainence. | 1680 | D: Fedora kernel maintenance. |
| 1681 | D: Misc/Other. | 1681 | D: Misc/Other. |
| 1682 | S: 314 Littleton Rd, Westford, MA 01886, USA | 1682 | S: 314 Littleton Rd, Westford, MA 01886, USA |
| 1683 | 1683 | ||
| @@ -3211,7 +3211,7 @@ N: James Simmons | |||
| 3211 | E: jsimmons@infradead.org | 3211 | E: jsimmons@infradead.org |
| 3212 | E: jsimmons@users.sf.net | 3212 | E: jsimmons@users.sf.net |
| 3213 | D: Frame buffer device maintainer | 3213 | D: Frame buffer device maintainer |
| 3214 | D: input layer developement | 3214 | D: input layer development |
| 3215 | D: tty/console layer | 3215 | D: tty/console layer |
| 3216 | D: various mipsel devices | 3216 | D: various mipsel devices |
| 3217 | S: 115 Carmel Avenue | 3217 | S: 115 Carmel Avenue |
| @@ -3290,7 +3290,7 @@ S: USA | |||
| 3290 | N: Manfred Spraul | 3290 | N: Manfred Spraul |
| 3291 | E: manfred@colorfullife.com | 3291 | E: manfred@colorfullife.com |
| 3292 | W: http://www.colorfullife.com/~manfred | 3292 | W: http://www.colorfullife.com/~manfred |
| 3293 | D: Lots of tiny hacks. Larger improvments to SysV IPC msg, | 3293 | D: Lots of tiny hacks. Larger improvements to SysV IPC msg, |
| 3294 | D: slab, pipe, select. | 3294 | D: slab, pipe, select. |
| 3295 | S: 71701 Schwieberdingen | 3295 | S: 71701 Schwieberdingen |
| 3296 | S: Germany | 3296 | S: Germany |
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX index f607367e642f..c17cd4bb2290 100644 --- a/Documentation/00-INDEX +++ b/Documentation/00-INDEX | |||
| @@ -206,8 +206,8 @@ laptops/ | |||
| 206 | - directory with laptop related info and laptop driver documentation. | 206 | - directory with laptop related info and laptop driver documentation. |
| 207 | ldm.txt | 207 | ldm.txt |
| 208 | - a brief description of LDM (Windows Dynamic Disks). | 208 | - a brief description of LDM (Windows Dynamic Disks). |
| 209 | leds-class.txt | 209 | leds/ |
| 210 | - documents LED handling under Linux. | 210 | - directory with info about LED handling under Linux. |
| 211 | local_ops.txt | 211 | local_ops.txt |
| 212 | - semantics and behavior of local atomic operations. | 212 | - semantics and behavior of local atomic operations. |
| 213 | lockdep-design.txt | 213 | lockdep-design.txt |
diff --git a/Documentation/ABI/testing/sysfs-bus-css b/Documentation/ABI/testing/sysfs-bus-css index b585ec258a08..2979c40c10e9 100644 --- a/Documentation/ABI/testing/sysfs-bus-css +++ b/Documentation/ABI/testing/sysfs-bus-css | |||
| @@ -29,7 +29,7 @@ Contact: Cornelia Huck <cornelia.huck@de.ibm.com> | |||
| 29 | linux-s390@vger.kernel.org | 29 | linux-s390@vger.kernel.org |
| 30 | Description: Contains the PIM/PAM/POM values, as reported by the | 30 | Description: Contains the PIM/PAM/POM values, as reported by the |
| 31 | channel subsystem when last queried by the common I/O | 31 | channel subsystem when last queried by the common I/O |
| 32 | layer (this implies that this attribute is not neccessarily | 32 | layer (this implies that this attribute is not necessarily |
| 33 | in sync with the values current in the channel subsystem). | 33 | in sync with the values current in the channel subsystem). |
| 34 | Note: This is an I/O-subchannel specific attribute. | 34 | Note: This is an I/O-subchannel specific attribute. |
| 35 | Users: s390-tools, HAL | 35 | Users: s390-tools, HAL |
diff --git a/Documentation/ABI/testing/sysfs-class-led b/Documentation/ABI/testing/sysfs-class-led index edff6630c805..3646ec85d513 100644 --- a/Documentation/ABI/testing/sysfs-class-led +++ b/Documentation/ABI/testing/sysfs-class-led | |||
| @@ -33,5 +33,5 @@ Contact: Richard Purdie <rpurdie@rpsys.net> | |||
| 33 | Description: | 33 | Description: |
| 34 | Invert the LED on/off state. This parameter is specific to | 34 | Invert the LED on/off state. This parameter is specific to |
| 35 | gpio and backlight triggers. In case of the backlight trigger, | 35 | gpio and backlight triggers. In case of the backlight trigger, |
| 36 | it is usefull when driving a LED which is intended to indicate | 36 | it is useful when driving a LED which is intended to indicate |
| 37 | a device in a standby like state. | 37 | a device in a standby like state. |
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone index b4c4f158ab9c..3ca3971109bf 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone +++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone | |||
| @@ -40,7 +40,7 @@ What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid- | |||
| 40 | Date: March 2010 | 40 | Date: March 2010 |
| 41 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 41 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
| 42 | Description: The mouse can store 5 profiles which can be switched by the | 42 | Description: The mouse can store 5 profiles which can be switched by the |
| 43 | press of a button. A profile holds informations like button | 43 | press of a button. A profile holds information like button |
| 44 | mappings, sensitivity, the colors of the 5 leds and light | 44 | mappings, sensitivity, the colors of the 5 leds and light |
| 45 | effects. | 45 | effects. |
| 46 | When read, these files return the respective profile. The | 46 | When read, these files return the respective profile. The |
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus b/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus index 00efced73969..326e05452da7 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus +++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus | |||
| @@ -33,7 +33,7 @@ Date: August 2010 | |||
| 33 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 33 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
| 34 | Description: The mouse can store 5 profiles which can be switched by the | 34 | Description: The mouse can store 5 profiles which can be switched by the |
| 35 | press of a button. A profile is split in settings and buttons. | 35 | press of a button. A profile is split in settings and buttons. |
| 36 | profile_buttons holds informations about button layout. | 36 | profile_buttons holds information about button layout. |
| 37 | When written, this file lets one write the respective profile | 37 | When written, this file lets one write the respective profile |
| 38 | buttons back to the mouse. The data has to be 77 bytes long. | 38 | buttons back to the mouse. The data has to be 77 bytes long. |
| 39 | The mouse will reject invalid data. | 39 | The mouse will reject invalid data. |
| @@ -47,7 +47,7 @@ Date: August 2010 | |||
| 47 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 47 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
| 48 | Description: The mouse can store 5 profiles which can be switched by the | 48 | Description: The mouse can store 5 profiles which can be switched by the |
| 49 | press of a button. A profile is split in settings and buttons. | 49 | press of a button. A profile is split in settings and buttons. |
| 50 | profile_buttons holds informations about button layout. | 50 | profile_buttons holds information about button layout. |
| 51 | When read, these files return the respective profile buttons. | 51 | When read, these files return the respective profile buttons. |
| 52 | The returned data is 77 bytes in size. | 52 | The returned data is 77 bytes in size. |
| 53 | This file is readonly. | 53 | This file is readonly. |
| @@ -58,7 +58,7 @@ Date: October 2010 | |||
| 58 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 58 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
| 59 | Description: The mouse can store 5 profiles which can be switched by the | 59 | Description: The mouse can store 5 profiles which can be switched by the |
| 60 | press of a button. A profile is split in settings and buttons. | 60 | press of a button. A profile is split in settings and buttons. |
| 61 | profile_settings holds informations like resolution, sensitivity | 61 | profile_settings holds information like resolution, sensitivity |
| 62 | and light effects. | 62 | and light effects. |
| 63 | When written, this file lets one write the respective profile | 63 | When written, this file lets one write the respective profile |
| 64 | settings back to the mouse. The data has to be 43 bytes long. | 64 | settings back to the mouse. The data has to be 43 bytes long. |
| @@ -73,7 +73,7 @@ Date: August 2010 | |||
| 73 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 73 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
| 74 | Description: The mouse can store 5 profiles which can be switched by the | 74 | Description: The mouse can store 5 profiles which can be switched by the |
| 75 | press of a button. A profile is split in settings and buttons. | 75 | press of a button. A profile is split in settings and buttons. |
| 76 | profile_settings holds informations like resolution, sensitivity | 76 | profile_settings holds information like resolution, sensitivity |
| 77 | and light effects. | 77 | and light effects. |
| 78 | When read, these files return the respective profile settings. | 78 | When read, these files return the respective profile settings. |
| 79 | The returned data is 43 bytes in size. | 79 | The returned data is 43 bytes in size. |
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus index fdfa16f8189b..20f937c9d84f 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus +++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus | |||
| @@ -52,7 +52,7 @@ Date: January 2011 | |||
| 52 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 52 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
| 53 | Description: The mouse can store 5 profiles which can be switched by the | 53 | Description: The mouse can store 5 profiles which can be switched by the |
| 54 | press of a button. A profile is split in settings and buttons. | 54 | press of a button. A profile is split in settings and buttons. |
| 55 | profile_buttons holds informations about button layout. | 55 | profile_buttons holds information about button layout. |
| 56 | When written, this file lets one write the respective profile | 56 | When written, this file lets one write the respective profile |
| 57 | buttons back to the mouse. The data has to be 23 bytes long. | 57 | buttons back to the mouse. The data has to be 23 bytes long. |
| 58 | The mouse will reject invalid data. | 58 | The mouse will reject invalid data. |
| @@ -66,7 +66,7 @@ Date: January 2011 | |||
| 66 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 66 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
| 67 | Description: The mouse can store 5 profiles which can be switched by the | 67 | Description: The mouse can store 5 profiles which can be switched by the |
| 68 | press of a button. A profile is split in settings and buttons. | 68 | press of a button. A profile is split in settings and buttons. |
| 69 | profile_buttons holds informations about button layout. | 69 | profile_buttons holds information about button layout. |
| 70 | When read, these files return the respective profile buttons. | 70 | When read, these files return the respective profile buttons. |
| 71 | The returned data is 23 bytes in size. | 71 | The returned data is 23 bytes in size. |
| 72 | This file is readonly. | 72 | This file is readonly. |
| @@ -77,7 +77,7 @@ Date: January 2011 | |||
| 77 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 77 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
| 78 | Description: The mouse can store 5 profiles which can be switched by the | 78 | Description: The mouse can store 5 profiles which can be switched by the |
| 79 | press of a button. A profile is split in settings and buttons. | 79 | press of a button. A profile is split in settings and buttons. |
| 80 | profile_settings holds informations like resolution, sensitivity | 80 | profile_settings holds information like resolution, sensitivity |
| 81 | and light effects. | 81 | and light effects. |
| 82 | When written, this file lets one write the respective profile | 82 | When written, this file lets one write the respective profile |
| 83 | settings back to the mouse. The data has to be 16 bytes long. | 83 | settings back to the mouse. The data has to be 16 bytes long. |
| @@ -92,7 +92,7 @@ Date: January 2011 | |||
| 92 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 92 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
| 93 | Description: The mouse can store 5 profiles which can be switched by the | 93 | Description: The mouse can store 5 profiles which can be switched by the |
| 94 | press of a button. A profile is split in settings and buttons. | 94 | press of a button. A profile is split in settings and buttons. |
| 95 | profile_settings holds informations like resolution, sensitivity | 95 | profile_settings holds information like resolution, sensitivity |
| 96 | and light effects. | 96 | and light effects. |
| 97 | When read, these files return the respective profile settings. | 97 | When read, these files return the respective profile settings. |
| 98 | The returned data is 16 bytes in size. | 98 | The returned data is 16 bytes in size. |
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra index 5fab71af3c46..3f8de50e4ff1 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra +++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra | |||
| @@ -39,7 +39,7 @@ Date: August 2010 | |||
| 39 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 39 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
| 40 | Description: The mouse can store 5 profiles which can be switched by the | 40 | Description: The mouse can store 5 profiles which can be switched by the |
| 41 | press of a button. A profile is split in settings and buttons. | 41 | press of a button. A profile is split in settings and buttons. |
| 42 | profile_settings holds informations like resolution, sensitivity | 42 | profile_settings holds information like resolution, sensitivity |
| 43 | and light effects. | 43 | and light effects. |
| 44 | When written, this file lets one write the respective profile | 44 | When written, this file lets one write the respective profile |
| 45 | settings back to the mouse. The data has to be 13 bytes long. | 45 | settings back to the mouse. The data has to be 13 bytes long. |
| @@ -54,7 +54,7 @@ Date: August 2010 | |||
| 54 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 54 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
| 55 | Description: The mouse can store 5 profiles which can be switched by the | 55 | Description: The mouse can store 5 profiles which can be switched by the |
| 56 | press of a button. A profile is split in settings and buttons. | 56 | press of a button. A profile is split in settings and buttons. |
| 57 | profile_settings holds informations like resolution, sensitivity | 57 | profile_settings holds information like resolution, sensitivity |
| 58 | and light effects. | 58 | and light effects. |
| 59 | When read, these files return the respective profile settings. | 59 | When read, these files return the respective profile settings. |
| 60 | The returned data is 13 bytes in size. | 60 | The returned data is 13 bytes in size. |
| @@ -66,7 +66,7 @@ Date: August 2010 | |||
| 66 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 66 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
| 67 | Description: The mouse can store 5 profiles which can be switched by the | 67 | Description: The mouse can store 5 profiles which can be switched by the |
| 68 | press of a button. A profile is split in settings and buttons. | 68 | press of a button. A profile is split in settings and buttons. |
| 69 | profile_buttons holds informations about button layout. | 69 | profile_buttons holds information about button layout. |
| 70 | When written, this file lets one write the respective profile | 70 | When written, this file lets one write the respective profile |
| 71 | buttons back to the mouse. The data has to be 19 bytes long. | 71 | buttons back to the mouse. The data has to be 19 bytes long. |
| 72 | The mouse will reject invalid data. | 72 | The mouse will reject invalid data. |
| @@ -80,7 +80,7 @@ Date: August 2010 | |||
| 80 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 80 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
| 81 | Description: The mouse can store 5 profiles which can be switched by the | 81 | Description: The mouse can store 5 profiles which can be switched by the |
| 82 | press of a button. A profile is split in settings and buttons. | 82 | press of a button. A profile is split in settings and buttons. |
| 83 | profile_buttons holds informations about button layout. | 83 | profile_buttons holds information about button layout. |
| 84 | When read, these files return the respective profile buttons. | 84 | When read, these files return the respective profile buttons. |
| 85 | The returned data is 19 bytes in size. | 85 | The returned data is 19 bytes in size. |
| 86 | This file is readonly. | 86 | This file is readonly. |
diff --git a/Documentation/ABI/testing/sysfs-platform-asus-laptop b/Documentation/ABI/testing/sysfs-platform-asus-laptop index 41ff8ae4dee0..cd9d667c3da2 100644 --- a/Documentation/ABI/testing/sysfs-platform-asus-laptop +++ b/Documentation/ABI/testing/sysfs-platform-asus-laptop | |||
| @@ -27,7 +27,7 @@ KernelVersion: 2.6.20 | |||
| 27 | Contact: "Corentin Chary" <corentincj@iksaif.net> | 27 | Contact: "Corentin Chary" <corentincj@iksaif.net> |
| 28 | Description: | 28 | Description: |
| 29 | Some models like the W1N have a LED display that can be | 29 | Some models like the W1N have a LED display that can be |
| 30 | used to display several informations. | 30 | used to display several items of information. |
| 31 | To control the LED display, use the following : | 31 | To control the LED display, use the following : |
| 32 | echo 0x0T000DDD > /sys/devices/platform/asus_laptop/ | 32 | echo 0x0T000DDD > /sys/devices/platform/asus_laptop/ |
| 33 | where T control the 3 letters display, and DDD the 3 digits display. | 33 | where T control the 3 letters display, and DDD the 3 digits display. |
diff --git a/Documentation/DocBook/dvb/dvbproperty.xml b/Documentation/DocBook/dvb/dvbproperty.xml index 5f57c7ccd4ba..97f397e2fb3a 100644 --- a/Documentation/DocBook/dvb/dvbproperty.xml +++ b/Documentation/DocBook/dvb/dvbproperty.xml | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | 40 | ||
| 41 | <para>Central frequency of the channel.</para> | 41 | <para>Central frequency of the channel.</para> |
| 42 | 42 | ||
| 43 | <para>For ISDB-T the channels are usally transmitted with an offset of 143kHz. E.g. a | 43 | <para>For ISDB-T the channels are usually transmitted with an offset of 143kHz. E.g. a |
| 44 | valid frequncy could be 474143 kHz. The stepping is bound to the bandwidth of | 44 | valid frequncy could be 474143 kHz. The stepping is bound to the bandwidth of |
| 45 | the channel which is 6MHz.</para> | 45 | the channel which is 6MHz.</para> |
| 46 | 46 | ||
diff --git a/Documentation/DocBook/dvb/frontend.xml b/Documentation/DocBook/dvb/frontend.xml index 78d756de5906..60c6976fb311 100644 --- a/Documentation/DocBook/dvb/frontend.xml +++ b/Documentation/DocBook/dvb/frontend.xml | |||
| @@ -139,7 +139,7 @@ consistently to the DiSEqC commands as described in the DiSEqC spec.</para> | |||
| 139 | <section id="frontend_sec_tone"> | 139 | <section id="frontend_sec_tone"> |
| 140 | <title>SEC continuous tone</title> | 140 | <title>SEC continuous tone</title> |
| 141 | 141 | ||
| 142 | <para>The continous 22KHz tone is usually used with non-DiSEqC capable LNBs to switch the | 142 | <para>The continuous 22KHz tone is usually used with non-DiSEqC capable LNBs to switch the |
| 143 | high/low band of a dual-band LNB. When using DiSEqC epuipment this voltage has to | 143 | high/low band of a dual-band LNB. When using DiSEqC epuipment this voltage has to |
| 144 | be switched consistently to the DiSEqC commands as described in the DiSEqC | 144 | be switched consistently to the DiSEqC commands as described in the DiSEqC |
| 145 | spec.</para> | 145 | spec.</para> |
diff --git a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl index f66f4df18690..67e7ab41c0a6 100644 --- a/Documentation/DocBook/kernel-locking.tmpl +++ b/Documentation/DocBook/kernel-locking.tmpl | |||
| @@ -1763,7 +1763,7 @@ as it would be on UP. | |||
| 1763 | There is a furthur optimization possible here: remember our original | 1763 | There is a furthur optimization possible here: remember our original |
| 1764 | cache code, where there were no reference counts and the caller simply | 1764 | cache code, where there were no reference counts and the caller simply |
| 1765 | held the lock whenever using the object? This is still possible: if | 1765 | held the lock whenever using the object? This is still possible: if |
| 1766 | you hold the lock, noone can delete the object, so you don't need to | 1766 | you hold the lock, no one can delete the object, so you don't need to |
| 1767 | get and put the reference count. | 1767 | get and put the reference count. |
| 1768 | </para> | 1768 | </para> |
| 1769 | 1769 | ||
diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl index 8c5411cfeaf0..cdd1bb9aac0d 100644 --- a/Documentation/DocBook/libata.tmpl +++ b/Documentation/DocBook/libata.tmpl | |||
| @@ -1032,7 +1032,7 @@ and other resources, etc. | |||
| 1032 | <listitem> | 1032 | <listitem> |
| 1033 | <para> | 1033 | <para> |
| 1034 | This is indicated by ICRC bit in the ERROR register and | 1034 | This is indicated by ICRC bit in the ERROR register and |
| 1035 | means that corruption occurred during data transfer. Upto | 1035 | means that corruption occurred during data transfer. Up to |
| 1036 | ATA/ATAPI-7, the standard specifies that this bit is only | 1036 | ATA/ATAPI-7, the standard specifies that this bit is only |
| 1037 | applicable to UDMA transfers but ATA/ATAPI-8 draft revision | 1037 | applicable to UDMA transfers but ATA/ATAPI-8 draft revision |
| 1038 | 1f says that the bit may be applicable to multiword DMA and | 1038 | 1f says that the bit may be applicable to multiword DMA and |
| @@ -1045,10 +1045,10 @@ and other resources, etc. | |||
| 1045 | <term>ABRT error during data transfer or on completion</term> | 1045 | <term>ABRT error during data transfer or on completion</term> |
| 1046 | <listitem> | 1046 | <listitem> |
| 1047 | <para> | 1047 | <para> |
| 1048 | Upto ATA/ATAPI-7, the standard specifies that ABRT could be | 1048 | Up to ATA/ATAPI-7, the standard specifies that ABRT could be |
| 1049 | set on ICRC errors and on cases where a device is not able | 1049 | set on ICRC errors and on cases where a device is not able |
| 1050 | to complete a command. Combined with the fact that MWDMA | 1050 | to complete a command. Combined with the fact that MWDMA |
| 1051 | and PIO transfer errors aren't allowed to use ICRC bit upto | 1051 | and PIO transfer errors aren't allowed to use ICRC bit up to |
| 1052 | ATA/ATAPI-7, it seems to imply that ABRT bit alone could | 1052 | ATA/ATAPI-7, it seems to imply that ABRT bit alone could |
| 1053 | indicate tranfer errors. | 1053 | indicate tranfer errors. |
| 1054 | </para> | 1054 | </para> |
| @@ -1122,7 +1122,7 @@ and other resources, etc. | |||
| 1122 | <para> | 1122 | <para> |
| 1123 | Depending on commands, not all STATUS/ERROR bits are | 1123 | Depending on commands, not all STATUS/ERROR bits are |
| 1124 | applicable. These non-applicable bits are marked with | 1124 | applicable. These non-applicable bits are marked with |
| 1125 | "na" in the output descriptions but upto ATA/ATAPI-7 | 1125 | "na" in the output descriptions but up to ATA/ATAPI-7 |
| 1126 | no definition of "na" can be found. However, | 1126 | no definition of "na" can be found. However, |
| 1127 | ATA/ATAPI-8 draft revision 1f describes "N/A" as | 1127 | ATA/ATAPI-8 draft revision 1f describes "N/A" as |
| 1128 | follows. | 1128 | follows. |
| @@ -1507,7 +1507,7 @@ and other resources, etc. | |||
| 1507 | 1507 | ||
| 1508 | <listitem> | 1508 | <listitem> |
| 1509 | <para> | 1509 | <para> |
| 1510 | CHS set up with INITIALIZE DEVICE PARAMETERS (seldomly used) | 1510 | CHS set up with INITIALIZE DEVICE PARAMETERS (seldom used) |
| 1511 | </para> | 1511 | </para> |
| 1512 | </listitem> | 1512 | </listitem> |
| 1513 | 1513 | ||
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl index 620eb3f6a90a..6f242d5dee9a 100644 --- a/Documentation/DocBook/mtdnand.tmpl +++ b/Documentation/DocBook/mtdnand.tmpl | |||
| @@ -485,7 +485,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip) | |||
| 485 | Reed-Solomon library. | 485 | Reed-Solomon library. |
| 486 | </para> | 486 | </para> |
| 487 | <para> | 487 | <para> |
| 488 | The ECC bytes must be placed immidiately after the data | 488 | The ECC bytes must be placed immediately after the data |
| 489 | bytes in order to make the syndrome generator work. This | 489 | bytes in order to make the syndrome generator work. This |
| 490 | is contrary to the usual layout used by software ECC. The | 490 | is contrary to the usual layout used by software ECC. The |
| 491 | separation of data and out of band area is not longer | 491 | separation of data and out of band area is not longer |
| @@ -629,7 +629,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip) | |||
| 629 | holds the bad block table. Store a pointer to the pattern | 629 | holds the bad block table. Store a pointer to the pattern |
| 630 | in the pattern field. Further the length of the pattern has to be | 630 | in the pattern field. Further the length of the pattern has to be |
| 631 | stored in len and the offset in the spare area must be given | 631 | stored in len and the offset in the spare area must be given |
| 632 | in the offs member of the nand_bbt_descr stucture. For mirrored | 632 | in the offs member of the nand_bbt_descr structure. For mirrored |
| 633 | bad block tables different patterns are mandatory.</para></listitem> | 633 | bad block tables different patterns are mandatory.</para></listitem> |
| 634 | <listitem><para>Table creation</para> | 634 | <listitem><para>Table creation</para> |
| 635 | <para>Set the option NAND_BBT_CREATE to enable the table creation | 635 | <para>Set the option NAND_BBT_CREATE to enable the table creation |
| @@ -648,7 +648,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip) | |||
| 648 | <listitem><para>Table version control</para> | 648 | <listitem><para>Table version control</para> |
| 649 | <para>Set the option NAND_BBT_VERSION to enable the table version control. | 649 | <para>Set the option NAND_BBT_VERSION to enable the table version control. |
| 650 | It's highly recommended to enable this for mirrored tables with write | 650 | It's highly recommended to enable this for mirrored tables with write |
| 651 | support. It makes sure that the risk of loosing the bad block | 651 | support. It makes sure that the risk of losing the bad block |
| 652 | table information is reduced to the loss of the information about the | 652 | table information is reduced to the loss of the information about the |
| 653 | one worn out block which should be marked bad. The version is stored in | 653 | one worn out block which should be marked bad. The version is stored in |
| 654 | 4 consecutive bytes in the spare area of the device. The position of | 654 | 4 consecutive bytes in the spare area of the device. The position of |
| @@ -1060,19 +1060,19 @@ data in this page</entry> | |||
| 1060 | <row> | 1060 | <row> |
| 1061 | <entry>0x3D</entry> | 1061 | <entry>0x3D</entry> |
| 1062 | <entry>ECC byte 21</entry> | 1062 | <entry>ECC byte 21</entry> |
| 1063 | <entry>Error correction code byte 0 of the eigth 256 Bytes of data | 1063 | <entry>Error correction code byte 0 of the eighth 256 Bytes of data |
| 1064 | in this page</entry> | 1064 | in this page</entry> |
| 1065 | </row> | 1065 | </row> |
| 1066 | <row> | 1066 | <row> |
| 1067 | <entry>0x3E</entry> | 1067 | <entry>0x3E</entry> |
| 1068 | <entry>ECC byte 22</entry> | 1068 | <entry>ECC byte 22</entry> |
| 1069 | <entry>Error correction code byte 1 of the eigth 256 Bytes of data | 1069 | <entry>Error correction code byte 1 of the eighth 256 Bytes of data |
| 1070 | in this page</entry> | 1070 | in this page</entry> |
| 1071 | </row> | 1071 | </row> |
| 1072 | <row> | 1072 | <row> |
| 1073 | <entry>0x3F</entry> | 1073 | <entry>0x3F</entry> |
| 1074 | <entry>ECC byte 23</entry> | 1074 | <entry>ECC byte 23</entry> |
| 1075 | <entry>Error correction code byte 2 of the eigth 256 Bytes of data | 1075 | <entry>Error correction code byte 2 of the eighth 256 Bytes of data |
| 1076 | in this page</entry> | 1076 | in this page</entry> |
| 1077 | </row> | 1077 | </row> |
| 1078 | </tbody></tgroup></informaltable> | 1078 | </tbody></tgroup></informaltable> |
diff --git a/Documentation/DocBook/regulator.tmpl b/Documentation/DocBook/regulator.tmpl index 53f4f8d3b810..346e552fa2cc 100644 --- a/Documentation/DocBook/regulator.tmpl +++ b/Documentation/DocBook/regulator.tmpl | |||
| @@ -267,8 +267,8 @@ | |||
| 267 | <sect1 id="machine-constraint"> | 267 | <sect1 id="machine-constraint"> |
| 268 | <title>Constraints</title> | 268 | <title>Constraints</title> |
| 269 | <para> | 269 | <para> |
| 270 | As well as definining the connections the machine interface | 270 | As well as defining the connections the machine interface |
| 271 | also provides constraints definining the operations that | 271 | also provides constraints defining the operations that |
| 272 | clients are allowed to perform and the parameters that may be | 272 | clients are allowed to perform and the parameters that may be |
| 273 | set. This is required since generally regulator devices will | 273 | set. This is required since generally regulator devices will |
| 274 | offer more flexibility than it is safe to use on a given | 274 | offer more flexibility than it is safe to use on a given |
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl index b4665b9c40b0..7c4b514d62b1 100644 --- a/Documentation/DocBook/uio-howto.tmpl +++ b/Documentation/DocBook/uio-howto.tmpl | |||
| @@ -797,7 +797,7 @@ framework to set up sysfs files for this region. Simply leave it alone. | |||
| 797 | perform some initialization. After that, your hardware | 797 | perform some initialization. After that, your hardware |
| 798 | starts working and will generate an interrupt as soon | 798 | starts working and will generate an interrupt as soon |
| 799 | as it's finished, has some data available, or needs your | 799 | as it's finished, has some data available, or needs your |
| 800 | attention because an error occured. | 800 | attention because an error occurred. |
| 801 | </para> | 801 | </para> |
| 802 | <para> | 802 | <para> |
| 803 | <filename>/dev/uioX</filename> is a read-only file. A | 803 | <filename>/dev/uioX</filename> is a read-only file. A |
diff --git a/Documentation/DocBook/usb.tmpl b/Documentation/DocBook/usb.tmpl index af293606fbe3..8d57c1888dca 100644 --- a/Documentation/DocBook/usb.tmpl +++ b/Documentation/DocBook/usb.tmpl | |||
| @@ -690,7 +690,7 @@ usbdev_ioctl (int fd, int ifno, unsigned request, void *param) | |||
| 690 | </para><para> | 690 | </para><para> |
| 691 | This request lets kernel drivers talk to user mode code | 691 | This request lets kernel drivers talk to user mode code |
| 692 | through filesystem operations even when they don't create | 692 | through filesystem operations even when they don't create |
| 693 | a charactor or block special device. | 693 | a character or block special device. |
| 694 | It's also been used to do things like ask devices what | 694 | It's also been used to do things like ask devices what |
| 695 | device special file should be used. | 695 | device special file should be used. |
| 696 | Two pre-defined ioctls are used | 696 | Two pre-defined ioctls are used |
diff --git a/Documentation/DocBook/v4l/common.xml b/Documentation/DocBook/v4l/common.xml index dbab79c215c1..9028721438dc 100644 --- a/Documentation/DocBook/v4l/common.xml +++ b/Documentation/DocBook/v4l/common.xml | |||
| @@ -100,7 +100,7 @@ linux-kernel@vger.kernel.org, 2002-11-20. --></para> | |||
| 100 | 100 | ||
| 101 | <para>By convention system administrators create various | 101 | <para>By convention system administrators create various |
| 102 | character device special files with these major and minor numbers in | 102 | character device special files with these major and minor numbers in |
| 103 | the <filename>/dev</filename> directory. The names recomended for the | 103 | the <filename>/dev</filename> directory. The names recommended for the |
| 104 | different V4L2 device types are listed in <xref linkend="devices" />. | 104 | different V4L2 device types are listed in <xref linkend="devices" />. |
| 105 | </para> | 105 | </para> |
| 106 | 106 | ||
diff --git a/Documentation/DocBook/v4l/controls.xml b/Documentation/DocBook/v4l/controls.xml index 2fae3e87ce73..a920ee80f640 100644 --- a/Documentation/DocBook/v4l/controls.xml +++ b/Documentation/DocBook/v4l/controls.xml | |||
| @@ -1243,7 +1243,7 @@ values are:</entry> | |||
| 1243 | </row><row><entry spanname="descr">Mutes the audio when | 1243 | </row><row><entry spanname="descr">Mutes the audio when |
| 1244 | capturing. This is not done by muting audio hardware, which can still | 1244 | capturing. This is not done by muting audio hardware, which can still |
| 1245 | produce a slight hiss, but in the encoder itself, guaranteeing a fixed | 1245 | produce a slight hiss, but in the encoder itself, guaranteeing a fixed |
| 1246 | and reproducable audio bitstream. 0 = unmuted, 1 = muted.</entry> | 1246 | and reproducible audio bitstream. 0 = unmuted, 1 = muted.</entry> |
| 1247 | </row> | 1247 | </row> |
| 1248 | <row><entry></entry></row> | 1248 | <row><entry></entry></row> |
| 1249 | <row id="v4l2-mpeg-video-encoding"> | 1249 | <row id="v4l2-mpeg-video-encoding"> |
diff --git a/Documentation/DocBook/v4l/dev-subdev.xml b/Documentation/DocBook/v4l/dev-subdev.xml index 21caff6d159b..05c8fefcbcbe 100644 --- a/Documentation/DocBook/v4l/dev-subdev.xml +++ b/Documentation/DocBook/v4l/dev-subdev.xml | |||
| @@ -90,7 +90,7 @@ | |||
| 90 | processing hardware.</para> | 90 | processing hardware.</para> |
| 91 | 91 | ||
| 92 | <figure id="pipeline-scaling"> | 92 | <figure id="pipeline-scaling"> |
| 93 | <title>Image Format Negotation on Pipelines</title> | 93 | <title>Image Format Negotiation on Pipelines</title> |
| 94 | <mediaobject> | 94 | <mediaobject> |
| 95 | <imageobject> | 95 | <imageobject> |
| 96 | <imagedata fileref="pipeline.pdf" format="PS" /> | 96 | <imagedata fileref="pipeline.pdf" format="PS" /> |
diff --git a/Documentation/DocBook/v4l/libv4l.xml b/Documentation/DocBook/v4l/libv4l.xml index c14fc3db2a81..3cb10ec51929 100644 --- a/Documentation/DocBook/v4l/libv4l.xml +++ b/Documentation/DocBook/v4l/libv4l.xml | |||
| @@ -140,7 +140,7 @@ and is not locked sets the cid to the scaled value. | |||
| 140 | <para>int v4l2_get_control(int fd, int cid) - | 140 | <para>int v4l2_get_control(int fd, int cid) - |
| 141 | This function returns a value of 0 - 65535, scaled to from the actual range | 141 | This function returns a value of 0 - 65535, scaled to from the actual range |
| 142 | of the given v4l control id. when the cid does not exist, could not be | 142 | of the given v4l control id. when the cid does not exist, could not be |
| 143 | accessed for some reason, or some error occured 0 is returned. | 143 | accessed for some reason, or some error occurred 0 is returned. |
| 144 | </para></listitem> | 144 | </para></listitem> |
| 145 | </itemizedlist> | 145 | </itemizedlist> |
| 146 | </section> | 146 | </section> |
diff --git a/Documentation/DocBook/v4l/remote_controllers.xml b/Documentation/DocBook/v4l/remote_controllers.xml index 3c3b667b28e7..160e464d44b7 100644 --- a/Documentation/DocBook/v4l/remote_controllers.xml +++ b/Documentation/DocBook/v4l/remote_controllers.xml | |||
| @@ -133,7 +133,7 @@ different IR's. Due to that, V4L2 API now specifies a standard for mapping Media | |||
| 133 | <row><entry><constant>KEY_LEFT</constant></entry><entry>Left key</entry><entry>LEFT</entry></row> | 133 | <row><entry><constant>KEY_LEFT</constant></entry><entry>Left key</entry><entry>LEFT</entry></row> |
| 134 | <row><entry><constant>KEY_RIGHT</constant></entry><entry>Right key</entry><entry>RIGHT</entry></row> | 134 | <row><entry><constant>KEY_RIGHT</constant></entry><entry>Right key</entry><entry>RIGHT</entry></row> |
| 135 | 135 | ||
| 136 | <row><entry><emphasis role="bold">Miscelaneous keys</emphasis></entry></row> | 136 | <row><entry><emphasis role="bold">Miscellaneous keys</emphasis></entry></row> |
| 137 | 137 | ||
| 138 | <row><entry><constant>KEY_DOT</constant></entry><entry>Return a dot</entry><entry>.</entry></row> | 138 | <row><entry><constant>KEY_DOT</constant></entry><entry>Return a dot</entry><entry>.</entry></row> |
| 139 | <row><entry><constant>KEY_FN</constant></entry><entry>Select a function</entry><entry>FUNCTION</entry></row> | 139 | <row><entry><constant>KEY_FN</constant></entry><entry>Select a function</entry><entry>FUNCTION</entry></row> |
diff --git a/Documentation/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl index 0ba149de2608..58ced2346e67 100644 --- a/Documentation/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl | |||
| @@ -4784,7 +4784,7 @@ struct _snd_pcm_runtime { | |||
| 4784 | FM registers can be directly accessed through the direct-FM API, | 4784 | FM registers can be directly accessed through the direct-FM API, |
| 4785 | defined in <filename><sound/asound_fm.h></filename>. In | 4785 | defined in <filename><sound/asound_fm.h></filename>. In |
| 4786 | ALSA native mode, FM registers are accessed through | 4786 | ALSA native mode, FM registers are accessed through |
| 4787 | the Hardware-Dependant Device direct-FM extension API, whereas in | 4787 | the Hardware-Dependent Device direct-FM extension API, whereas in |
| 4788 | OSS compatible mode, FM registers can be accessed with the OSS | 4788 | OSS compatible mode, FM registers can be accessed with the OSS |
| 4789 | direct-FM compatible API in <filename>/dev/dmfmX</filename> device. | 4789 | direct-FM compatible API in <filename>/dev/dmfmX</filename> device. |
| 4790 | </para> | 4790 | </para> |
diff --git a/Documentation/PCI/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt index dcf7acc720e1..3f5e0b09bed5 100644 --- a/Documentation/PCI/MSI-HOWTO.txt +++ b/Documentation/PCI/MSI-HOWTO.txt | |||
| @@ -253,8 +253,8 @@ In constrast, MSI is restricted to a maximum of 32 interrupts (and | |||
| 253 | must be a power of two). In addition, the MSI interrupt vectors must | 253 | must be a power of two). In addition, the MSI interrupt vectors must |
| 254 | be allocated consecutively, so the system may not be able to allocate | 254 | be allocated consecutively, so the system may not be able to allocate |
| 255 | as many vectors for MSI as it could for MSI-X. On some platforms, MSI | 255 | as many vectors for MSI as it could for MSI-X. On some platforms, MSI |
| 256 | interrupts must all be targetted at the same set of CPUs whereas MSI-X | 256 | interrupts must all be targeted at the same set of CPUs whereas MSI-X |
| 257 | interrupts can all be targetted at different CPUs. | 257 | interrupts can all be targeted at different CPUs. |
| 258 | 258 | ||
| 259 | 4.5.2 Spinlocks | 259 | 4.5.2 Spinlocks |
| 260 | 260 | ||
diff --git a/Documentation/SecurityBugs b/Documentation/SecurityBugs index 26c3b3635d9f..a660d494c8ed 100644 --- a/Documentation/SecurityBugs +++ b/Documentation/SecurityBugs | |||
| @@ -28,7 +28,7 @@ expect these delays to be short, measurable in days, not weeks or months. | |||
| 28 | A disclosure date is negotiated by the security team working with the | 28 | A disclosure date is negotiated by the security team working with the |
| 29 | bug submitter as well as vendors. However, the kernel security team | 29 | bug submitter as well as vendors. However, the kernel security team |
| 30 | holds the final say when setting a disclosure date. The timeframe for | 30 | holds the final say when setting a disclosure date. The timeframe for |
| 31 | disclosure is from immediate (esp. if it's already publically known) | 31 | disclosure is from immediate (esp. if it's already publicly known) |
| 32 | to a few weeks. As a basic default policy, we expect report date to | 32 | to a few weeks. As a basic default policy, we expect report date to |
| 33 | disclosure date to be on the order of 7 days. | 33 | disclosure date to be on the order of 7 days. |
| 34 | 34 | ||
diff --git a/Documentation/SubmittingDrivers b/Documentation/SubmittingDrivers index 38d2aab59cac..319baa8b60dd 100644 --- a/Documentation/SubmittingDrivers +++ b/Documentation/SubmittingDrivers | |||
| @@ -101,7 +101,7 @@ PM support: Since Linux is used on many portable and desktop systems, your | |||
| 101 | complete overview of the power management issues related to | 101 | complete overview of the power management issues related to |
| 102 | drivers see Documentation/power/devices.txt . | 102 | drivers see Documentation/power/devices.txt . |
| 103 | 103 | ||
| 104 | Control: In general if there is active maintainance of a driver by | 104 | Control: In general if there is active maintenance of a driver by |
| 105 | the author then patches will be redirected to them unless | 105 | the author then patches will be redirected to them unless |
| 106 | they are totally obvious and without need of checking. | 106 | they are totally obvious and without need of checking. |
| 107 | If you want to be the contact and update point for the | 107 | If you want to be the contact and update point for the |
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index 689e2371095c..e439cd0d3375 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches | |||
| @@ -729,7 +729,7 @@ Linus Torvalds's mail on the canonical patch format: | |||
| 729 | <http://lkml.org/lkml/2005/4/7/183> | 729 | <http://lkml.org/lkml/2005/4/7/183> |
| 730 | 730 | ||
| 731 | Andi Kleen, "On submitting kernel patches" | 731 | Andi Kleen, "On submitting kernel patches" |
| 732 | Some strategies to get difficult or controversal changes in. | 732 | Some strategies to get difficult or controversial changes in. |
| 733 | http://halobates.de/on-submitting-patches.pdf | 733 | http://halobates.de/on-submitting-patches.pdf |
| 734 | 734 | ||
| 735 | -- | 735 | -- |
diff --git a/Documentation/arm/IXP4xx b/Documentation/arm/IXP4xx index 133c5fa6c7a1..7b9351f2f555 100644 --- a/Documentation/arm/IXP4xx +++ b/Documentation/arm/IXP4xx | |||
| @@ -36,7 +36,7 @@ Linux currently supports the following features on the IXP4xx chips: | |||
| 36 | - Timers (watchdog, OS) | 36 | - Timers (watchdog, OS) |
| 37 | 37 | ||
| 38 | The following components of the chips are not supported by Linux and | 38 | The following components of the chips are not supported by Linux and |
| 39 | require the use of Intel's propietary CSR softare: | 39 | require the use of Intel's proprietary CSR softare: |
| 40 | 40 | ||
| 41 | - USB device interface | 41 | - USB device interface |
| 42 | - Network interfaces (HSS, Utopia, NPEs, etc) | 42 | - Network interfaces (HSS, Utopia, NPEs, etc) |
| @@ -47,7 +47,7 @@ software from: | |||
| 47 | 47 | ||
| 48 | http://developer.intel.com/design/network/products/npfamily/ixp425.htm | 48 | http://developer.intel.com/design/network/products/npfamily/ixp425.htm |
| 49 | 49 | ||
| 50 | DO NOT POST QUESTIONS TO THE LINUX MAILING LISTS REGARDING THE PROPIETARY | 50 | DO NOT POST QUESTIONS TO THE LINUX MAILING LISTS REGARDING THE PROPRIETARY |
| 51 | SOFTWARE. | 51 | SOFTWARE. |
| 52 | 52 | ||
| 53 | There are several websites that provide directions/pointers on using | 53 | There are several websites that provide directions/pointers on using |
diff --git a/Documentation/arm/Samsung-S3C24XX/Suspend.txt b/Documentation/arm/Samsung-S3C24XX/Suspend.txt index 7edd0e2e6c5b..1ca63b3e5635 100644 --- a/Documentation/arm/Samsung-S3C24XX/Suspend.txt +++ b/Documentation/arm/Samsung-S3C24XX/Suspend.txt | |||
| @@ -116,7 +116,7 @@ Configuration | |||
| 116 | Allows the entire memory to be checksummed before and after the | 116 | Allows the entire memory to be checksummed before and after the |
| 117 | suspend to see if there has been any corruption of the contents. | 117 | suspend to see if there has been any corruption of the contents. |
| 118 | 118 | ||
| 119 | Note, the time to calculate the CRC is dependant on the CPU speed | 119 | Note, the time to calculate the CRC is dependent on the CPU speed |
| 120 | and the size of memory. For an 64Mbyte RAM area on an 200MHz | 120 | and the size of memory. For an 64Mbyte RAM area on an 200MHz |
| 121 | S3C2410, this can take approximately 4 seconds to complete. | 121 | S3C2410, this can take approximately 4 seconds to complete. |
| 122 | 122 | ||
diff --git a/Documentation/arm/Samsung/GPIO.txt b/Documentation/arm/Samsung/GPIO.txt index 05850c62abeb..513f2562c1a3 100644 --- a/Documentation/arm/Samsung/GPIO.txt +++ b/Documentation/arm/Samsung/GPIO.txt | |||
| @@ -5,7 +5,7 @@ Introduction | |||
| 5 | ------------ | 5 | ------------ |
| 6 | 6 | ||
| 7 | This outlines the Samsung GPIO implementation and the architecture | 7 | This outlines the Samsung GPIO implementation and the architecture |
| 8 | specfic calls provided alongisde the drivers/gpio core. | 8 | specific calls provided alongisde the drivers/gpio core. |
| 9 | 9 | ||
| 10 | 10 | ||
| 11 | S3C24XX (Legacy) | 11 | S3C24XX (Legacy) |
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt index 2a7b38c832c7..c6d84cfd2f56 100644 --- a/Documentation/block/biodoc.txt +++ b/Documentation/block/biodoc.txt | |||
| @@ -497,7 +497,7 @@ The scatter gather list is in the form of an array of <page, offset, len> | |||
| 497 | entries with their corresponding dma address mappings filled in at the | 497 | entries with their corresponding dma address mappings filled in at the |
| 498 | appropriate time. As an optimization, contiguous physical pages can be | 498 | appropriate time. As an optimization, contiguous physical pages can be |
| 499 | covered by a single entry where <page> refers to the first page and <len> | 499 | covered by a single entry where <page> refers to the first page and <len> |
| 500 | covers the range of pages (upto 16 contiguous pages could be covered this | 500 | covers the range of pages (up to 16 contiguous pages could be covered this |
| 501 | way). There is a helper routine (blk_rq_map_sg) which drivers can use to build | 501 | way). There is a helper routine (blk_rq_map_sg) which drivers can use to build |
| 502 | the sg list. | 502 | the sg list. |
| 503 | 503 | ||
| @@ -565,7 +565,7 @@ struct request { | |||
| 565 | . | 565 | . |
| 566 | int tag; /* command tag associated with request */ | 566 | int tag; /* command tag associated with request */ |
| 567 | void *special; /* same as before */ | 567 | void *special; /* same as before */ |
| 568 | char *buffer; /* valid only for low memory buffers upto | 568 | char *buffer; /* valid only for low memory buffers up to |
| 569 | current_nr_sectors */ | 569 | current_nr_sectors */ |
| 570 | . | 570 | . |
| 571 | . | 571 | . |
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt index cbdfb7d9455b..aedf1bd02fdd 100644 --- a/Documentation/cgroups/cgroups.txt +++ b/Documentation/cgroups/cgroups.txt | |||
| @@ -110,22 +110,22 @@ university server with various users - students, professors, system | |||
| 110 | tasks etc. The resource planning for this server could be along the | 110 | tasks etc. The resource planning for this server could be along the |
| 111 | following lines: | 111 | following lines: |
| 112 | 112 | ||
| 113 | CPU : Top cpuset | 113 | CPU : "Top cpuset" |
| 114 | / \ | 114 | / \ |
| 115 | CPUSet1 CPUSet2 | 115 | CPUSet1 CPUSet2 |
| 116 | | | | 116 | | | |
| 117 | (Profs) (Students) | 117 | (Professors) (Students) |
| 118 | 118 | ||
| 119 | In addition (system tasks) are attached to topcpuset (so | 119 | In addition (system tasks) are attached to topcpuset (so |
| 120 | that they can run anywhere) with a limit of 20% | 120 | that they can run anywhere) with a limit of 20% |
| 121 | 121 | ||
| 122 | Memory : Professors (50%), students (30%), system (20%) | 122 | Memory : Professors (50%), Students (30%), system (20%) |
| 123 | 123 | ||
| 124 | Disk : Prof (50%), students (30%), system (20%) | 124 | Disk : Professors (50%), Students (30%), system (20%) |
| 125 | 125 | ||
| 126 | Network : WWW browsing (20%), Network File System (60%), others (20%) | 126 | Network : WWW browsing (20%), Network File System (60%), others (20%) |
| 127 | / \ | 127 | / \ |
| 128 | Prof (15%) students (5%) | 128 | Professors (15%) students (5%) |
| 129 | 129 | ||
| 130 | Browsers like Firefox/Lynx go into the WWW network class, while (k)nfsd go | 130 | Browsers like Firefox/Lynx go into the WWW network class, while (k)nfsd go |
| 131 | into NFS network class. | 131 | into NFS network class. |
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt index 45d5a217484f..a20bfd415e41 100644 --- a/Documentation/cpu-hotplug.txt +++ b/Documentation/cpu-hotplug.txt | |||
| @@ -196,7 +196,7 @@ the state as 0 when a cpu if offline and 1 when its online. | |||
| 196 | #To display the current cpu state. | 196 | #To display the current cpu state. |
| 197 | #cat /sys/devices/system/cpu/cpuX/online | 197 | #cat /sys/devices/system/cpu/cpuX/online |
| 198 | 198 | ||
| 199 | Q: Why cant i remove CPU0 on some systems? | 199 | Q: Why can't i remove CPU0 on some systems? |
| 200 | A: Some architectures may have some special dependency on a certain CPU. | 200 | A: Some architectures may have some special dependency on a certain CPU. |
| 201 | 201 | ||
| 202 | For e.g in IA64 platforms we have ability to sent platform interrupts to the | 202 | For e.g in IA64 platforms we have ability to sent platform interrupts to the |
diff --git a/Documentation/dell_rbu.txt b/Documentation/dell_rbu.txt index 15174985ad08..d262e22bddec 100644 --- a/Documentation/dell_rbu.txt +++ b/Documentation/dell_rbu.txt | |||
| @@ -62,7 +62,7 @@ image file and then arrange all these packets back to back in to one single | |||
| 62 | file. | 62 | file. |
| 63 | This file is then copied to /sys/class/firmware/dell_rbu/data. | 63 | This file is then copied to /sys/class/firmware/dell_rbu/data. |
| 64 | Once this file gets to the driver, the driver extracts packet_size data from | 64 | Once this file gets to the driver, the driver extracts packet_size data from |
| 65 | the file and spreads it accross the physical memory in contiguous packet_sized | 65 | the file and spreads it across the physical memory in contiguous packet_sized |
| 66 | space. | 66 | space. |
| 67 | This method makes sure that all the packets get to the driver in a single operation. | 67 | This method makes sure that all the packets get to the driver in a single operation. |
| 68 | 68 | ||
diff --git a/Documentation/device-mapper/dm-service-time.txt b/Documentation/device-mapper/dm-service-time.txt index 7d00668e97bb..fb1d4a0cf122 100644 --- a/Documentation/device-mapper/dm-service-time.txt +++ b/Documentation/device-mapper/dm-service-time.txt | |||
| @@ -37,7 +37,7 @@ Algorithm | |||
| 37 | ========= | 37 | ========= |
| 38 | 38 | ||
| 39 | dm-service-time adds the I/O size to 'in-flight-size' when the I/O is | 39 | dm-service-time adds the I/O size to 'in-flight-size' when the I/O is |
| 40 | dispatched and substracts when completed. | 40 | dispatched and subtracts when completed. |
| 41 | Basically, dm-service-time selects a path having minimum service time | 41 | Basically, dm-service-time selects a path having minimum service time |
| 42 | which is calculated by: | 42 | which is calculated by: |
| 43 | 43 | ||
diff --git a/Documentation/devicetree/bindings/fb/sm501fb.txt b/Documentation/devicetree/bindings/fb/sm501fb.txt index 7d319fba9b5b..9d9f0098092b 100644 --- a/Documentation/devicetree/bindings/fb/sm501fb.txt +++ b/Documentation/devicetree/bindings/fb/sm501fb.txt | |||
| @@ -18,9 +18,9 @@ Optional properties: | |||
| 18 | - edid : verbatim EDID data block describing attached display. | 18 | - edid : verbatim EDID data block describing attached display. |
| 19 | Data from the detailed timing descriptor will be used to | 19 | Data from the detailed timing descriptor will be used to |
| 20 | program the display controller. | 20 | program the display controller. |
| 21 | - little-endian: availiable on big endian systems, to | 21 | - little-endian: available on big endian systems, to |
| 22 | set different foreign endian. | 22 | set different foreign endian. |
| 23 | - big-endian: availiable on little endian systems, to | 23 | - big-endian: available on little endian systems, to |
| 24 | set different foreign endian. | 24 | set different foreign endian. |
| 25 | 25 | ||
| 26 | Example for MPC5200: | 26 | Example for MPC5200: |
diff --git a/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt b/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt index a48b2cadc7f0..00f1f546b32e 100644 --- a/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt +++ b/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt | |||
| @@ -15,7 +15,7 @@ Optional properties: | |||
| 15 | - gpios : may specify optional GPIOs connected to the Ready-Not-Busy pins | 15 | - gpios : may specify optional GPIOs connected to the Ready-Not-Busy pins |
| 16 | (R/B#). For multi-chip devices, "n" GPIO definitions are required | 16 | (R/B#). For multi-chip devices, "n" GPIO definitions are required |
| 17 | according to the number of chips. | 17 | according to the number of chips. |
| 18 | - chip-delay : chip dependent delay for transfering data from array to | 18 | - chip-delay : chip dependent delay for transferring data from array to |
| 19 | read registers (tR). Required if property "gpios" is not used | 19 | read registers (tR). Required if property "gpios" is not used |
| 20 | (R/B# pins not connected). | 20 | (R/B# pins not connected). |
| 21 | 21 | ||
diff --git a/Documentation/devicetree/bindings/net/can/sja1000.txt b/Documentation/devicetree/bindings/net/can/sja1000.txt index d6d209ded937..c2dbcec0ee31 100644 --- a/Documentation/devicetree/bindings/net/can/sja1000.txt +++ b/Documentation/devicetree/bindings/net/can/sja1000.txt | |||
| @@ -39,7 +39,7 @@ Optional properties: | |||
| 39 | 39 | ||
| 40 | - nxp,no-comparator-bypass : Allows to disable the CAN input comperator. | 40 | - nxp,no-comparator-bypass : Allows to disable the CAN input comperator. |
| 41 | 41 | ||
| 42 | For futher information, please have a look to the SJA1000 data sheet. | 42 | For further information, please have a look to the SJA1000 data sheet. |
| 43 | 43 | ||
| 44 | Examples: | 44 | Examples: |
| 45 | 45 | ||
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt b/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt index 8aa10f45ebe6..4f6145859aab 100644 --- a/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt +++ b/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt | |||
| @@ -199,7 +199,7 @@ EXAMPLE 4 | |||
| 199 | 199 | ||
| 200 | EXAMPLE 5 | 200 | EXAMPLE 5 |
| 201 | /* | 201 | /* |
| 202 | * Definition of an error interrupt (interupt type 1). | 202 | * Definition of an error interrupt (interrupt type 1). |
| 203 | * SoC interrupt number is 16 and the specific error | 203 | * SoC interrupt number is 16 and the specific error |
| 204 | * interrupt bit in the error interrupt summary register | 204 | * interrupt bit in the error interrupt summary register |
| 205 | * is 23. | 205 | * is 23. |
diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt index 55fd2623445b..50619a0720a8 100644 --- a/Documentation/devicetree/booting-without-of.txt +++ b/Documentation/devicetree/booting-without-of.txt | |||
| @@ -138,7 +138,7 @@ and properties to be present. This will be described in detail in | |||
| 138 | section III, but, for example, the kernel does not require you to | 138 | section III, but, for example, the kernel does not require you to |
| 139 | create a node for every PCI device in the system. It is a requirement | 139 | create a node for every PCI device in the system. It is a requirement |
| 140 | to have a node for PCI host bridges in order to provide interrupt | 140 | to have a node for PCI host bridges in order to provide interrupt |
| 141 | routing informations and memory/IO ranges, among others. It is also | 141 | routing information and memory/IO ranges, among others. It is also |
| 142 | recommended to define nodes for on chip devices and other buses that | 142 | recommended to define nodes for on chip devices and other buses that |
| 143 | don't specifically fit in an existing OF specification. This creates a | 143 | don't specifically fit in an existing OF specification. This creates a |
| 144 | great flexibility in the way the kernel can then probe those and match | 144 | great flexibility in the way the kernel can then probe those and match |
| @@ -385,7 +385,7 @@ struct boot_param_header { | |||
| 385 | among others, by kexec. If you are on an SMP system, this value | 385 | among others, by kexec. If you are on an SMP system, this value |
| 386 | should match the content of the "reg" property of the CPU node in | 386 | should match the content of the "reg" property of the CPU node in |
| 387 | the device-tree corresponding to the CPU calling the kernel entry | 387 | the device-tree corresponding to the CPU calling the kernel entry |
| 388 | point (see further chapters for more informations on the required | 388 | point (see further chapters for more information on the required |
| 389 | device-tree contents) | 389 | device-tree contents) |
| 390 | 390 | ||
| 391 | - size_dt_strings | 391 | - size_dt_strings |
| @@ -553,7 +553,7 @@ looks like in practice. | |||
| 553 | 553 | ||
| 554 | This tree is almost a minimal tree. It pretty much contains the | 554 | This tree is almost a minimal tree. It pretty much contains the |
| 555 | minimal set of required nodes and properties to boot a linux kernel; | 555 | minimal set of required nodes and properties to boot a linux kernel; |
| 556 | that is, some basic model informations at the root, the CPUs, and the | 556 | that is, some basic model information at the root, the CPUs, and the |
| 557 | physical memory layout. It also includes misc information passed | 557 | physical memory layout. It also includes misc information passed |
| 558 | through /chosen, like in this example, the platform type (mandatory) | 558 | through /chosen, like in this example, the platform type (mandatory) |
| 559 | and the kernel command line arguments (optional). | 559 | and the kernel command line arguments (optional). |
diff --git a/Documentation/dvb/README.dvb-usb b/Documentation/dvb/README.dvb-usb index c8238e44ed6b..c4d963a67d6f 100644 --- a/Documentation/dvb/README.dvb-usb +++ b/Documentation/dvb/README.dvb-usb | |||
| @@ -138,7 +138,7 @@ Hotplug is able to load the driver, when it is needed (because you plugged | |||
| 138 | in the device). | 138 | in the device). |
| 139 | 139 | ||
| 140 | If you want to enable debug output, you have to load the driver manually and | 140 | If you want to enable debug output, you have to load the driver manually and |
| 141 | from withing the dvb-kernel cvs repository. | 141 | from within the dvb-kernel cvs repository. |
| 142 | 142 | ||
| 143 | first have a look, which debug level are available: | 143 | first have a look, which debug level are available: |
| 144 | 144 | ||
diff --git a/Documentation/dvb/ci.txt b/Documentation/dvb/ci.txt index 4a0c2b56e690..6c3bda50f7dc 100644 --- a/Documentation/dvb/ci.txt +++ b/Documentation/dvb/ci.txt | |||
| @@ -47,7 +47,7 @@ so on. | |||
| 47 | 47 | ||
| 48 | * CI modules that are supported | 48 | * CI modules that are supported |
| 49 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 49 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 50 | The CI module support is largely dependant upon the firmware on the cards | 50 | The CI module support is largely dependent upon the firmware on the cards |
| 51 | Some cards do support almost all of the available CI modules. There is | 51 | Some cards do support almost all of the available CI modules. There is |
| 52 | nothing much that can be done in order to make additional CI modules | 52 | nothing much that can be done in order to make additional CI modules |
| 53 | working with these cards. | 53 | working with these cards. |
diff --git a/Documentation/dvb/faq.txt b/Documentation/dvb/faq.txt index 121832e5d899..97b1373f2428 100644 --- a/Documentation/dvb/faq.txt +++ b/Documentation/dvb/faq.txt | |||
| @@ -106,7 +106,7 @@ Some very frequently asked questions about linuxtv-dvb | |||
| 106 | 5. The dvb_net device doesn't give me any packets at all | 106 | 5. The dvb_net device doesn't give me any packets at all |
| 107 | 107 | ||
| 108 | Run tcpdump on the dvb0_0 interface. This sets the interface | 108 | Run tcpdump on the dvb0_0 interface. This sets the interface |
| 109 | into promiscous mode so it accepts any packets from the PID | 109 | into promiscuous mode so it accepts any packets from the PID |
| 110 | you have configured with the dvbnet utility. Check if there | 110 | you have configured with the dvbnet utility. Check if there |
| 111 | are any packets with the IP addr and MAC addr you have | 111 | are any packets with the IP addr and MAC addr you have |
| 112 | configured with ifconfig. | 112 | configured with ifconfig. |
diff --git a/Documentation/dvb/udev.txt b/Documentation/dvb/udev.txt index 68ee224b6aae..412305b7c557 100644 --- a/Documentation/dvb/udev.txt +++ b/Documentation/dvb/udev.txt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | The DVB subsystem currently registers to the sysfs subsystem using the | 1 | The DVB subsystem currently registers to the sysfs subsystem using the |
| 2 | "class_simple" interface. | 2 | "class_simple" interface. |
| 3 | 3 | ||
| 4 | This means that only the basic informations like module loading parameters | 4 | This means that only the basic information like module loading parameters |
| 5 | are presented through sysfs. Other things that might be interesting are | 5 | are presented through sysfs. Other things that might be interesting are |
| 6 | currently *not* available. | 6 | currently *not* available. |
| 7 | 7 | ||
diff --git a/Documentation/edac.txt b/Documentation/edac.txt index 9ee774de57cd..249822cde82b 100644 --- a/Documentation/edac.txt +++ b/Documentation/edac.txt | |||
| @@ -311,7 +311,7 @@ Total Correctable Errors count attribute file: | |||
| 311 | 'ce_noinfo_count' | 311 | 'ce_noinfo_count' |
| 312 | 312 | ||
| 313 | This attribute file displays the number of CEs that | 313 | This attribute file displays the number of CEs that |
| 314 | have occurred wherewith no informations as to which DIMM slot | 314 | have occurred wherewith no information as to which DIMM slot |
| 315 | is having errors. Memory is handicapped, but operational, | 315 | is having errors. Memory is handicapped, but operational, |
| 316 | yet no information is available to indicate which slot | 316 | yet no information is available to indicate which slot |
| 317 | the failing memory is in. This count field should be also | 317 | the failing memory is in. This count field should be also |
| @@ -741,7 +741,7 @@ were done at i7core_edac driver. This chapter will cover those differences | |||
| 741 | As EDAC API maps the minimum unity is csrows, the driver sequencially | 741 | As EDAC API maps the minimum unity is csrows, the driver sequencially |
| 742 | maps channel/dimm into different csrows. | 742 | maps channel/dimm into different csrows. |
| 743 | 743 | ||
| 744 | For example, suposing the following layout: | 744 | For example, supposing the following layout: |
| 745 | Ch0 phy rd0, wr0 (0x063f4031): 2 ranks, UDIMMs | 745 | Ch0 phy rd0, wr0 (0x063f4031): 2 ranks, UDIMMs |
| 746 | dimm 0 1024 Mb offset: 0, bank: 8, rank: 1, row: 0x4000, col: 0x400 | 746 | dimm 0 1024 Mb offset: 0, bank: 8, rank: 1, row: 0x4000, col: 0x400 |
| 747 | dimm 1 1024 Mb offset: 4, bank: 8, rank: 1, row: 0x4000, col: 0x400 | 747 | dimm 1 1024 Mb offset: 4, bank: 8, rank: 1, row: 0x4000, col: 0x400 |
diff --git a/Documentation/eisa.txt b/Documentation/eisa.txt index f297fc1202ae..38cf0c7b559f 100644 --- a/Documentation/eisa.txt +++ b/Documentation/eisa.txt | |||
| @@ -84,7 +84,7 @@ struct eisa_driver { | |||
| 84 | 84 | ||
| 85 | id_table : an array of NULL terminated EISA id strings, | 85 | id_table : an array of NULL terminated EISA id strings, |
| 86 | followed by an empty string. Each string can | 86 | followed by an empty string. Each string can |
| 87 | optionally be paired with a driver-dependant value | 87 | optionally be paired with a driver-dependent value |
| 88 | (driver_data). | 88 | (driver_data). |
| 89 | 89 | ||
| 90 | driver : a generic driver, such as described in | 90 | driver : a generic driver, such as described in |
diff --git a/Documentation/fb/viafb.txt b/Documentation/fb/viafb.txt index 1a2e8aa3fbb1..444e34b52ae1 100644 --- a/Documentation/fb/viafb.txt +++ b/Documentation/fb/viafb.txt | |||
| @@ -204,7 +204,7 @@ Notes: | |||
| 204 | 204 | ||
| 205 | supported_output_devices | 205 | supported_output_devices |
| 206 | 206 | ||
| 207 | This read-only file contains a full ',' seperated list containing all | 207 | This read-only file contains a full ',' separated list containing all |
| 208 | output devices that could be available on your platform. It is likely | 208 | output devices that could be available on your platform. It is likely |
| 209 | that not all of those have a connector on your hardware but it should | 209 | that not all of those have a connector on your hardware but it should |
| 210 | provide a good starting point to figure out which of those names match | 210 | provide a good starting point to figure out which of those names match |
| @@ -225,7 +225,7 @@ Notes: | |||
| 225 | This can happen for example if only one (the other) iga is used. | 225 | This can happen for example if only one (the other) iga is used. |
| 226 | Writing to these files allows adjusting the output devices during | 226 | Writing to these files allows adjusting the output devices during |
| 227 | runtime. One can add new devices, remove existing ones or switch | 227 | runtime. One can add new devices, remove existing ones or switch |
| 228 | between igas. Essentially you can write a ',' seperated list of device | 228 | between igas. Essentially you can write a ',' separated list of device |
| 229 | names (or a single one) in the same format as the output to those | 229 | names (or a single one) in the same format as the output to those |
| 230 | files. You can add a '+' or '-' as a prefix allowing simple addition | 230 | files. You can add a '+' or '-' as a prefix allowing simple addition |
| 231 | and removal of devices. So a prefix '+' adds the devices from your list | 231 | and removal of devices. So a prefix '+' adds the devices from your list |
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 274b32d12532..492e81df2968 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
| @@ -387,26 +387,6 @@ Who: Tejun Heo <tj@kernel.org> | |||
| 387 | 387 | ||
| 388 | ---------------------------- | 388 | ---------------------------- |
| 389 | 389 | ||
| 390 | What: Support for lcd_switch and display_get in asus-laptop driver | ||
| 391 | When: March 2010 | ||
| 392 | Why: These two features use non-standard interfaces. There are the | ||
| 393 | only features that really need multiple path to guess what's | ||
| 394 | the right method name on a specific laptop. | ||
| 395 | |||
| 396 | Removing them will allow to remove a lot of code an significantly | ||
| 397 | clean the drivers. | ||
| 398 | |||
| 399 | This will affect the backlight code which won't be able to know | ||
| 400 | if the backlight is on or off. The platform display file will also be | ||
| 401 | write only (like the one in eeepc-laptop). | ||
| 402 | |||
| 403 | This should'nt affect a lot of user because they usually know | ||
| 404 | when their display is on or off. | ||
| 405 | |||
| 406 | Who: Corentin Chary <corentin.chary@gmail.com> | ||
| 407 | |||
| 408 | ---------------------------- | ||
| 409 | |||
| 410 | What: sysfs-class-rfkill state file | 390 | What: sysfs-class-rfkill state file |
| 411 | When: Feb 2014 | 391 | When: Feb 2014 |
| 412 | Files: net/rfkill/core.c | 392 | Files: net/rfkill/core.c |
diff --git a/Documentation/filesystems/autofs4-mount-control.txt b/Documentation/filesystems/autofs4-mount-control.txt index 51986bf08a4d..4c95935cbcf4 100644 --- a/Documentation/filesystems/autofs4-mount-control.txt +++ b/Documentation/filesystems/autofs4-mount-control.txt | |||
| @@ -309,7 +309,7 @@ ioctlfd field set to the descriptor obtained from the open call. | |||
| 309 | AUTOFS_DEV_IOCTL_TIMEOUT_CMD | 309 | AUTOFS_DEV_IOCTL_TIMEOUT_CMD |
| 310 | ---------------------------- | 310 | ---------------------------- |
| 311 | 311 | ||
| 312 | Set the expire timeout for mounts withing an autofs mount point. | 312 | Set the expire timeout for mounts within an autofs mount point. |
| 313 | 313 | ||
| 314 | The call requires an initialized struct autofs_dev_ioctl with the | 314 | The call requires an initialized struct autofs_dev_ioctl with the |
| 315 | ioctlfd field set to the descriptor obtained from the open call. | 315 | ioctlfd field set to the descriptor obtained from the open call. |
diff --git a/Documentation/filesystems/caching/netfs-api.txt b/Documentation/filesystems/caching/netfs-api.txt index 1902c57b72ef..a167ab876c35 100644 --- a/Documentation/filesystems/caching/netfs-api.txt +++ b/Documentation/filesystems/caching/netfs-api.txt | |||
| @@ -95,7 +95,7 @@ restraints as possible on how an index is structured and where it is placed in | |||
| 95 | the tree. The netfs can even mix indices and data files at the same level, but | 95 | the tree. The netfs can even mix indices and data files at the same level, but |
| 96 | it's not recommended. | 96 | it's not recommended. |
| 97 | 97 | ||
| 98 | Each index entry consists of a key of indeterminate length plus some auxilliary | 98 | Each index entry consists of a key of indeterminate length plus some auxiliary |
| 99 | data, also of indeterminate length. | 99 | data, also of indeterminate length. |
| 100 | 100 | ||
| 101 | There are some limits on indices: | 101 | There are some limits on indices: |
| @@ -203,23 +203,23 @@ This has the following fields: | |||
| 203 | 203 | ||
| 204 | If the function is absent, a file size of 0 is assumed. | 204 | If the function is absent, a file size of 0 is assumed. |
| 205 | 205 | ||
| 206 | (6) A function to retrieve auxilliary data from the netfs [optional]. | 206 | (6) A function to retrieve auxiliary data from the netfs [optional]. |
| 207 | 207 | ||
| 208 | This function will be called with the netfs data that was passed to the | 208 | This function will be called with the netfs data that was passed to the |
| 209 | cookie acquisition function and the maximum length of auxilliary data that | 209 | cookie acquisition function and the maximum length of auxiliary data that |
| 210 | it may provide. It should write the auxilliary data into the given buffer | 210 | it may provide. It should write the auxiliary data into the given buffer |
| 211 | and return the quantity it wrote. | 211 | and return the quantity it wrote. |
| 212 | 212 | ||
| 213 | If this function is absent, the auxilliary data length will be set to 0. | 213 | If this function is absent, the auxiliary data length will be set to 0. |
| 214 | 214 | ||
| 215 | The length of the auxilliary data buffer may be dependent on the key | 215 | The length of the auxiliary data buffer may be dependent on the key |
| 216 | length. A netfs mustn't rely on being able to provide more than 400 bytes | 216 | length. A netfs mustn't rely on being able to provide more than 400 bytes |
| 217 | for both. | 217 | for both. |
| 218 | 218 | ||
| 219 | (7) A function to check the auxilliary data [optional]. | 219 | (7) A function to check the auxiliary data [optional]. |
| 220 | 220 | ||
| 221 | This function will be called to check that a match found in the cache for | 221 | This function will be called to check that a match found in the cache for |
| 222 | this object is valid. For instance with AFS it could check the auxilliary | 222 | this object is valid. For instance with AFS it could check the auxiliary |
| 223 | data against the data version number returned by the server to determine | 223 | data against the data version number returned by the server to determine |
| 224 | whether the index entry in a cache is still valid. | 224 | whether the index entry in a cache is still valid. |
| 225 | 225 | ||
| @@ -232,7 +232,7 @@ This has the following fields: | |||
| 232 | (*) FSCACHE_CHECKAUX_NEEDS_UPDATE - the entry requires update | 232 | (*) FSCACHE_CHECKAUX_NEEDS_UPDATE - the entry requires update |
| 233 | (*) FSCACHE_CHECKAUX_OBSOLETE - the entry should be deleted | 233 | (*) FSCACHE_CHECKAUX_OBSOLETE - the entry should be deleted |
| 234 | 234 | ||
| 235 | This function can also be used to extract data from the auxilliary data in | 235 | This function can also be used to extract data from the auxiliary data in |
| 236 | the cache and copy it into the netfs's structures. | 236 | the cache and copy it into the netfs's structures. |
| 237 | 237 | ||
| 238 | (8) A pair of functions to manage contexts for the completion callback | 238 | (8) A pair of functions to manage contexts for the completion callback |
diff --git a/Documentation/filesystems/configfs/configfs.txt b/Documentation/filesystems/configfs/configfs.txt index fabcb0e00f25..dd57bb6bb390 100644 --- a/Documentation/filesystems/configfs/configfs.txt +++ b/Documentation/filesystems/configfs/configfs.txt | |||
| @@ -409,7 +409,7 @@ As a consequence of this, default_groups cannot be removed directly via | |||
| 409 | rmdir(2). They also are not considered when rmdir(2) on the parent | 409 | rmdir(2). They also are not considered when rmdir(2) on the parent |
| 410 | group is checking for children. | 410 | group is checking for children. |
| 411 | 411 | ||
| 412 | [Dependant Subsystems] | 412 | [Dependent Subsystems] |
| 413 | 413 | ||
| 414 | Sometimes other drivers depend on particular configfs items. For | 414 | Sometimes other drivers depend on particular configfs items. For |
| 415 | example, ocfs2 mounts depend on a heartbeat region item. If that | 415 | example, ocfs2 mounts depend on a heartbeat region item. If that |
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt index 6b050464a90d..c79ec58fd7f6 100644 --- a/Documentation/filesystems/ext4.txt +++ b/Documentation/filesystems/ext4.txt | |||
| @@ -97,7 +97,7 @@ Note: More extensive information for getting started with ext4 can be | |||
| 97 | * Inode allocation using large virtual block groups via flex_bg | 97 | * Inode allocation using large virtual block groups via flex_bg |
| 98 | * delayed allocation | 98 | * delayed allocation |
| 99 | * large block (up to pagesize) support | 99 | * large block (up to pagesize) support |
| 100 | * efficent new ordered mode in JBD2 and ext4(avoid using buffer head to force | 100 | * efficient new ordered mode in JBD2 and ext4(avoid using buffer head to force |
| 101 | the ordering) | 101 | the ordering) |
| 102 | 102 | ||
| 103 | [1] Filesystems with a block size of 1k may see a limit imposed by the | 103 | [1] Filesystems with a block size of 1k may see a limit imposed by the |
| @@ -106,7 +106,7 @@ directory hash tree having a maximum depth of two. | |||
| 106 | 2.2 Candidate features for future inclusion | 106 | 2.2 Candidate features for future inclusion |
| 107 | 107 | ||
| 108 | * Online defrag (patches available but not well tested) | 108 | * Online defrag (patches available but not well tested) |
| 109 | * reduced mke2fs time via lazy itable initialization in conjuction with | 109 | * reduced mke2fs time via lazy itable initialization in conjunction with |
| 110 | the uninit_bg feature (capability to do this is available in e2fsprogs | 110 | the uninit_bg feature (capability to do this is available in e2fsprogs |
| 111 | but a kernel thread to do lazy zeroing of unused inode table blocks | 111 | but a kernel thread to do lazy zeroing of unused inode table blocks |
| 112 | after filesystem is first mounted is required for safety) | 112 | after filesystem is first mounted is required for safety) |
diff --git a/Documentation/filesystems/gfs2-uevents.txt b/Documentation/filesystems/gfs2-uevents.txt index fd966dc9979a..d81889669293 100644 --- a/Documentation/filesystems/gfs2-uevents.txt +++ b/Documentation/filesystems/gfs2-uevents.txt | |||
| @@ -62,7 +62,7 @@ be fixed. | |||
| 62 | 62 | ||
| 63 | The REMOVE uevent is generated at the end of an unsuccessful mount | 63 | The REMOVE uevent is generated at the end of an unsuccessful mount |
| 64 | or at the end of a umount of the filesystem. All REMOVE uevents will | 64 | or at the end of a umount of the filesystem. All REMOVE uevents will |
| 65 | have been preceeded by at least an ADD uevent for the same fileystem, | 65 | have been preceded by at least an ADD uevent for the same fileystem, |
| 66 | and unlike the other uevents is generated automatically by the kernel's | 66 | and unlike the other uevents is generated automatically by the kernel's |
| 67 | kobject subsystem. | 67 | kobject subsystem. |
| 68 | 68 | ||
diff --git a/Documentation/filesystems/gfs2.txt b/Documentation/filesystems/gfs2.txt index 0b59c0200912..4cda926628aa 100644 --- a/Documentation/filesystems/gfs2.txt +++ b/Documentation/filesystems/gfs2.txt | |||
| @@ -11,7 +11,7 @@ their I/O so file system consistency is maintained. One of the nifty | |||
| 11 | features of GFS is perfect consistency -- changes made to the file system | 11 | features of GFS is perfect consistency -- changes made to the file system |
| 12 | on one machine show up immediately on all other machines in the cluster. | 12 | on one machine show up immediately on all other machines in the cluster. |
| 13 | 13 | ||
| 14 | GFS uses interchangable inter-node locking mechanisms, the currently | 14 | GFS uses interchangeable inter-node locking mechanisms, the currently |
| 15 | supported mechanisms are: | 15 | supported mechanisms are: |
| 16 | 16 | ||
| 17 | lock_nolock -- allows gfs to be used as a local file system | 17 | lock_nolock -- allows gfs to be used as a local file system |
diff --git a/Documentation/filesystems/ntfs.txt b/Documentation/filesystems/ntfs.txt index 933bc66ccff1..791af8dac065 100644 --- a/Documentation/filesystems/ntfs.txt +++ b/Documentation/filesystems/ntfs.txt | |||
| @@ -350,7 +350,7 @@ Note the "Should sync?" parameter "nosync" means that the two mirrors are | |||
| 350 | already in sync which will be the case on a clean shutdown of Windows. If the | 350 | already in sync which will be the case on a clean shutdown of Windows. If the |
| 351 | mirrors are not clean, you can specify the "sync" option instead of "nosync" | 351 | mirrors are not clean, you can specify the "sync" option instead of "nosync" |
| 352 | and the Device-Mapper driver will then copy the entirety of the "Source Device" | 352 | and the Device-Mapper driver will then copy the entirety of the "Source Device" |
| 353 | to the "Target Device" or if you specified multipled target devices to all of | 353 | to the "Target Device" or if you specified multiple target devices to all of |
| 354 | them. | 354 | them. |
| 355 | 355 | ||
| 356 | Once you have your table, save it in a file somewhere (e.g. /etc/ntfsvolume1), | 356 | Once you have your table, save it in a file somewhere (e.g. /etc/ntfsvolume1), |
diff --git a/Documentation/filesystems/ocfs2.txt b/Documentation/filesystems/ocfs2.txt index 5393e6611691..9ed920a8cd79 100644 --- a/Documentation/filesystems/ocfs2.txt +++ b/Documentation/filesystems/ocfs2.txt | |||
| @@ -80,7 +80,7 @@ user_xattr (*) Enables Extended User Attributes. | |||
| 80 | nouser_xattr Disables Extended User Attributes. | 80 | nouser_xattr Disables Extended User Attributes. |
| 81 | acl Enables POSIX Access Control Lists support. | 81 | acl Enables POSIX Access Control Lists support. |
| 82 | noacl (*) Disables POSIX Access Control Lists support. | 82 | noacl (*) Disables POSIX Access Control Lists support. |
| 83 | resv_level=2 (*) Set how agressive allocation reservations will be. | 83 | resv_level=2 (*) Set how aggressive allocation reservations will be. |
| 84 | Valid values are between 0 (reservations off) to 8 | 84 | Valid values are between 0 (reservations off) to 8 |
| 85 | (maximum space for reservations). | 85 | (maximum space for reservations). |
| 86 | dir_resv_level= (*) By default, directory reservations will scale with file | 86 | dir_resv_level= (*) By default, directory reservations will scale with file |
diff --git a/Documentation/filesystems/path-lookup.txt b/Documentation/filesystems/path-lookup.txt index eb59c8b44be9..3571667c7105 100644 --- a/Documentation/filesystems/path-lookup.txt +++ b/Documentation/filesystems/path-lookup.txt | |||
| @@ -42,7 +42,7 @@ Path walking overview | |||
| 42 | A name string specifies a start (root directory, cwd, fd-relative) and a | 42 | A name string specifies a start (root directory, cwd, fd-relative) and a |
| 43 | sequence of elements (directory entry names), which together refer to a path in | 43 | sequence of elements (directory entry names), which together refer to a path in |
| 44 | the namespace. A path is represented as a (dentry, vfsmount) tuple. The name | 44 | the namespace. A path is represented as a (dentry, vfsmount) tuple. The name |
| 45 | elements are sub-strings, seperated by '/'. | 45 | elements are sub-strings, separated by '/'. |
| 46 | 46 | ||
| 47 | Name lookups will want to find a particular path that a name string refers to | 47 | Name lookups will want to find a particular path that a name string refers to |
| 48 | (usually the final element, or parent of final element). This is done by taking | 48 | (usually the final element, or parent of final element). This is done by taking |
| @@ -354,7 +354,7 @@ vfstest 24185492 4945 708725(2.9%) 1076136(4.4%) 0 2651 | |||
| 354 | 354 | ||
| 355 | What this shows is that failed rcu-walk lookups, ie. ones that are restarted | 355 | What this shows is that failed rcu-walk lookups, ie. ones that are restarted |
| 356 | entirely with ref-walk, are quite rare. Even the "vfstest" case which | 356 | entirely with ref-walk, are quite rare. Even the "vfstest" case which |
| 357 | specifically has concurrent renames/mkdir/rmdir/ creat/unlink/etc to excercise | 357 | specifically has concurrent renames/mkdir/rmdir/ creat/unlink/etc to exercise |
| 358 | such races is not showing a huge amount of restarts. | 358 | such races is not showing a huge amount of restarts. |
| 359 | 359 | ||
| 360 | Dropping from rcu-walk to ref-walk mean that we have encountered a dentry where | 360 | Dropping from rcu-walk to ref-walk mean that we have encountered a dentry where |
diff --git a/Documentation/filesystems/pohmelfs/network_protocol.txt b/Documentation/filesystems/pohmelfs/network_protocol.txt index 40ea6c295afb..65e03dd44823 100644 --- a/Documentation/filesystems/pohmelfs/network_protocol.txt +++ b/Documentation/filesystems/pohmelfs/network_protocol.txt | |||
| @@ -20,7 +20,7 @@ Commands can be embedded into transaction command (which in turn has own command | |||
| 20 | so one can extend protocol as needed without breaking backward compatibility as long | 20 | so one can extend protocol as needed without breaking backward compatibility as long |
| 21 | as old commands are supported. All string lengths include tail 0 byte. | 21 | as old commands are supported. All string lengths include tail 0 byte. |
| 22 | 22 | ||
| 23 | All commans are transfered over the network in big-endian. CPU endianess is used at the end peers. | 23 | All commands are transferred over the network in big-endian. CPU endianess is used at the end peers. |
| 24 | 24 | ||
| 25 | @cmd - command number, which specifies command to be processed. Following | 25 | @cmd - command number, which specifies command to be processed. Following |
| 26 | commands are used currently: | 26 | commands are used currently: |
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 23cae6548d3a..b0b814d75ca1 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
| @@ -543,7 +543,7 @@ just those considered 'most important'. The new vectors are: | |||
| 543 | their statistics are used by kernel developers and interested users to | 543 | their statistics are used by kernel developers and interested users to |
| 544 | determine the occurrence of interrupts of the given type. | 544 | determine the occurrence of interrupts of the given type. |
| 545 | 545 | ||
| 546 | The above IRQ vectors are displayed only when relevent. For example, | 546 | The above IRQ vectors are displayed only when relevant. For example, |
| 547 | the threshold vector does not exist on x86_64 platforms. Others are | 547 | the threshold vector does not exist on x86_64 platforms. Others are |
| 548 | suppressed when the system is a uniprocessor. As of this writing, only | 548 | suppressed when the system is a uniprocessor. As of this writing, only |
| 549 | i386 and x86_64 platforms support the new IRQ vector displays. | 549 | i386 and x86_64 platforms support the new IRQ vector displays. |
| @@ -1202,7 +1202,7 @@ The columns are: | |||
| 1202 | W = can do write operations | 1202 | W = can do write operations |
| 1203 | U = can do unblank | 1203 | U = can do unblank |
| 1204 | flags E = it is enabled | 1204 | flags E = it is enabled |
| 1205 | C = it is prefered console | 1205 | C = it is preferred console |
| 1206 | B = it is primary boot console | 1206 | B = it is primary boot console |
| 1207 | p = it is used for printk buffer | 1207 | p = it is used for printk buffer |
| 1208 | b = it is not a TTY but a Braille device | 1208 | b = it is not a TTY but a Braille device |
| @@ -1331,7 +1331,7 @@ NOTICE: /proc/<pid>/oom_adj is deprecated and will be removed, please see | |||
| 1331 | Documentation/feature-removal-schedule.txt. | 1331 | Documentation/feature-removal-schedule.txt. |
| 1332 | 1332 | ||
| 1333 | Caveat: when a parent task is selected, the oom killer will sacrifice any first | 1333 | Caveat: when a parent task is selected, the oom killer will sacrifice any first |
| 1334 | generation children with seperate address spaces instead, if possible. This | 1334 | generation children with separate address spaces instead, if possible. This |
| 1335 | avoids servers and important system daemons from being killed and loses the | 1335 | avoids servers and important system daemons from being killed and loses the |
| 1336 | minimal amount of work. | 1336 | minimal amount of work. |
| 1337 | 1337 | ||
diff --git a/Documentation/filesystems/squashfs.txt b/Documentation/filesystems/squashfs.txt index 2d78f1911844..d4d41465a0b1 100644 --- a/Documentation/filesystems/squashfs.txt +++ b/Documentation/filesystems/squashfs.txt | |||
| @@ -219,7 +219,7 @@ or if it is stored out of line (in which case the value field stores a | |||
| 219 | reference to where the actual value is stored). This allows large values | 219 | reference to where the actual value is stored). This allows large values |
| 220 | to be stored out of line improving scanning and lookup performance and it | 220 | to be stored out of line improving scanning and lookup performance and it |
| 221 | also allows values to be de-duplicated, the value being stored once, and | 221 | also allows values to be de-duplicated, the value being stored once, and |
| 222 | all other occurences holding an out of line reference to that value. | 222 | all other occurrences holding an out of line reference to that value. |
| 223 | 223 | ||
| 224 | The xattr lists are packed into compressed 8K metadata blocks. | 224 | The xattr lists are packed into compressed 8K metadata blocks. |
| 225 | To reduce overhead in inodes, rather than storing the on-disk | 225 | To reduce overhead in inodes, rather than storing the on-disk |
diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt index f806e50aaa63..597f728e7b4e 100644 --- a/Documentation/filesystems/sysfs.txt +++ b/Documentation/filesystems/sysfs.txt | |||
| @@ -62,7 +62,7 @@ values of the same type. | |||
| 62 | 62 | ||
| 63 | Mixing types, expressing multiple lines of data, and doing fancy | 63 | Mixing types, expressing multiple lines of data, and doing fancy |
| 64 | formatting of data is heavily frowned upon. Doing these things may get | 64 | formatting of data is heavily frowned upon. Doing these things may get |
| 65 | you publically humiliated and your code rewritten without notice. | 65 | you publicly humiliated and your code rewritten without notice. |
| 66 | 66 | ||
| 67 | 67 | ||
| 68 | An attribute definition is simply: | 68 | An attribute definition is simply: |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 80815ed654cb..21a7dc467bba 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
| @@ -97,7 +97,7 @@ functions: | |||
| 97 | The passed struct file_system_type describes your filesystem. When a | 97 | The passed struct file_system_type describes your filesystem. When a |
| 98 | request is made to mount a filesystem onto a directory in your namespace, | 98 | request is made to mount a filesystem onto a directory in your namespace, |
| 99 | the VFS will call the appropriate mount() method for the specific | 99 | the VFS will call the appropriate mount() method for the specific |
| 100 | filesystem. New vfsmount refering to the tree returned by ->mount() | 100 | filesystem. New vfsmount referring to the tree returned by ->mount() |
| 101 | will be attached to the mountpoint, so that when pathname resolution | 101 | will be attached to the mountpoint, so that when pathname resolution |
| 102 | reaches the mountpoint it will jump into the root of that vfsmount. | 102 | reaches the mountpoint it will jump into the root of that vfsmount. |
| 103 | 103 | ||
diff --git a/Documentation/filesystems/xfs-delayed-logging-design.txt b/Documentation/filesystems/xfs-delayed-logging-design.txt index 5282e3e51413..2ce36439c09f 100644 --- a/Documentation/filesystems/xfs-delayed-logging-design.txt +++ b/Documentation/filesystems/xfs-delayed-logging-design.txt | |||
| @@ -42,7 +42,7 @@ the aggregation of all the previous changes currently held only in the log. | |||
| 42 | This relogging technique also allows objects to be moved forward in the log so | 42 | This relogging technique also allows objects to be moved forward in the log so |
| 43 | that an object being relogged does not prevent the tail of the log from ever | 43 | that an object being relogged does not prevent the tail of the log from ever |
| 44 | moving forward. This can be seen in the table above by the changing | 44 | moving forward. This can be seen in the table above by the changing |
| 45 | (increasing) LSN of each subsquent transaction - the LSN is effectively a | 45 | (increasing) LSN of each subsequent transaction - the LSN is effectively a |
| 46 | direct encoding of the location in the log of the transaction. | 46 | direct encoding of the location in the log of the transaction. |
| 47 | 47 | ||
| 48 | This relogging is also used to implement long-running, multiple-commit | 48 | This relogging is also used to implement long-running, multiple-commit |
| @@ -338,7 +338,7 @@ the same time another transaction modifies the item and inserts the log item | |||
| 338 | into the new CIL, then checkpoint transaction commit code cannot use log items | 338 | into the new CIL, then checkpoint transaction commit code cannot use log items |
| 339 | to store the list of log vectors that need to be written into the transaction. | 339 | to store the list of log vectors that need to be written into the transaction. |
| 340 | Hence log vectors need to be able to be chained together to allow them to be | 340 | Hence log vectors need to be able to be chained together to allow them to be |
| 341 | detatched from the log items. That is, when the CIL is flushed the memory | 341 | detached from the log items. That is, when the CIL is flushed the memory |
| 342 | buffer and log vector attached to each log item needs to be attached to the | 342 | buffer and log vector attached to each log item needs to be attached to the |
| 343 | checkpoint context so that the log item can be released. In diagrammatic form, | 343 | checkpoint context so that the log item can be released. In diagrammatic form, |
| 344 | the CIL would look like this before the flush: | 344 | the CIL would look like this before the flush: |
| @@ -577,7 +577,7 @@ only becomes unpinned when all the transactions complete and there are no | |||
| 577 | pending transactions. Thus the pinning and unpinning of a log item is symmetric | 577 | pending transactions. Thus the pinning and unpinning of a log item is symmetric |
| 578 | as there is a 1:1 relationship with transaction commit and log item completion. | 578 | as there is a 1:1 relationship with transaction commit and log item completion. |
| 579 | 579 | ||
| 580 | For delayed logging, however, we have an assymetric transaction commit to | 580 | For delayed logging, however, we have an asymmetric transaction commit to |
| 581 | completion relationship. Every time an object is relogged in the CIL it goes | 581 | completion relationship. Every time an object is relogged in the CIL it goes |
| 582 | through the commit process without a corresponding completion being registered. | 582 | through the commit process without a corresponding completion being registered. |
| 583 | That is, we now have a many-to-one relationship between transaction commit and | 583 | That is, we now have a many-to-one relationship between transaction commit and |
| @@ -780,7 +780,7 @@ With delayed logging, there are new steps inserted into the life cycle: | |||
| 780 | From this, it can be seen that the only life cycle differences between the two | 780 | From this, it can be seen that the only life cycle differences between the two |
| 781 | logging methods are in the middle of the life cycle - they still have the same | 781 | logging methods are in the middle of the life cycle - they still have the same |
| 782 | beginning and end and execution constraints. The only differences are in the | 782 | beginning and end and execution constraints. The only differences are in the |
| 783 | commiting of the log items to the log itself and the completion processing. | 783 | committing of the log items to the log itself and the completion processing. |
| 784 | Hence delayed logging should not introduce any constraints on log item | 784 | Hence delayed logging should not introduce any constraints on log item |
| 785 | behaviour, allocation or freeing that don't already exist. | 785 | behaviour, allocation or freeing that don't already exist. |
| 786 | 786 | ||
diff --git a/Documentation/hwmon/abituguru b/Documentation/hwmon/abituguru index 5eb3b9d5f0d5..915f32063a26 100644 --- a/Documentation/hwmon/abituguru +++ b/Documentation/hwmon/abituguru | |||
| @@ -78,7 +78,7 @@ motherboards (most modern Abit motherboards). | |||
| 78 | 78 | ||
| 79 | The first and second revision of the uGuru chip in reality is a Winbond | 79 | The first and second revision of the uGuru chip in reality is a Winbond |
| 80 | W83L950D in disguise (despite Abit claiming it is "a new microprocessor | 80 | W83L950D in disguise (despite Abit claiming it is "a new microprocessor |
| 81 | designed by the ABIT Engineers"). Unfortunatly this doesn't help since the | 81 | designed by the ABIT Engineers"). Unfortunately this doesn't help since the |
| 82 | W83L950D is a generic microcontroller with a custom Abit application running | 82 | W83L950D is a generic microcontroller with a custom Abit application running |
| 83 | on it. | 83 | on it. |
| 84 | 84 | ||
diff --git a/Documentation/hwmon/abituguru-datasheet b/Documentation/hwmon/abituguru-datasheet index d9251efdcec7..8d2be8a0b1e3 100644 --- a/Documentation/hwmon/abituguru-datasheet +++ b/Documentation/hwmon/abituguru-datasheet | |||
| @@ -5,9 +5,9 @@ First of all, what I know about uGuru is no fact based on any help, hints or | |||
| 5 | datasheet from Abit. The data I have got on uGuru have I assembled through | 5 | datasheet from Abit. The data I have got on uGuru have I assembled through |
| 6 | my weak knowledge in "backwards engineering". | 6 | my weak knowledge in "backwards engineering". |
| 7 | And just for the record, you may have noticed uGuru isn't a chip developed by | 7 | And just for the record, you may have noticed uGuru isn't a chip developed by |
| 8 | Abit, as they claim it to be. It's realy just an microprocessor (uC) created by | 8 | Abit, as they claim it to be. It's really just an microprocessor (uC) created by |
| 9 | Winbond (W83L950D). And no, reading the manual for this specific uC or | 9 | Winbond (W83L950D). And no, reading the manual for this specific uC or |
| 10 | mailing Windbond for help won't give any usefull data about uGuru, as it is | 10 | mailing Windbond for help won't give any useful data about uGuru, as it is |
| 11 | the program inside the uC that is responding to calls. | 11 | the program inside the uC that is responding to calls. |
| 12 | 12 | ||
| 13 | Olle Sandberg <ollebull@gmail.com>, 2005-05-25 | 13 | Olle Sandberg <ollebull@gmail.com>, 2005-05-25 |
| @@ -41,7 +41,7 @@ later on attached again data-port will hold 0x08, more about this later. | |||
| 41 | 41 | ||
| 42 | After wider testing of the Linux kernel driver some variants of the uGuru have | 42 | After wider testing of the Linux kernel driver some variants of the uGuru have |
| 43 | turned up which will hold 0x00 instead of 0xAC at the CMD port, thus we also | 43 | turned up which will hold 0x00 instead of 0xAC at the CMD port, thus we also |
| 44 | have to test CMD for two different values. On these uGuru's DATA will initally | 44 | have to test CMD for two different values. On these uGuru's DATA will initially |
| 45 | hold 0x09 and will only hold 0x08 after reading CMD first, so CMD must be read | 45 | hold 0x09 and will only hold 0x08 after reading CMD first, so CMD must be read |
| 46 | first! | 46 | first! |
| 47 | 47 | ||
| @@ -308,5 +308,5 @@ the voltage / clock programming out, I tried reading and only reading banks | |||
| 308 | resulted in a _permanent_ reprogramming of the voltages, luckily I had the | 308 | resulted in a _permanent_ reprogramming of the voltages, luckily I had the |
| 309 | sensors part configured so that it would shutdown my system on any out of spec | 309 | sensors part configured so that it would shutdown my system on any out of spec |
| 310 | voltages which proprably safed my computer (after a reboot I managed to | 310 | voltages which proprably safed my computer (after a reboot I managed to |
| 311 | immediatly enter the bios and reload the defaults). This probably means that | 311 | immediately enter the bios and reload the defaults). This probably means that |
| 312 | the read/write cycle for the non sensor part is different from the sensor part. | 312 | the read/write cycle for the non sensor part is different from the sensor part. |
diff --git a/Documentation/hwmon/abituguru3 b/Documentation/hwmon/abituguru3 index fa598aac22fa..a6ccfe4bb6aa 100644 --- a/Documentation/hwmon/abituguru3 +++ b/Documentation/hwmon/abituguru3 | |||
| @@ -47,7 +47,7 @@ This driver supports the hardware monitoring features of the third revision of | |||
| 47 | the Abit uGuru chip, found on recent Abit uGuru featuring motherboards. | 47 | the Abit uGuru chip, found on recent Abit uGuru featuring motherboards. |
| 48 | 48 | ||
| 49 | The 3rd revision of the uGuru chip in reality is a Winbond W83L951G. | 49 | The 3rd revision of the uGuru chip in reality is a Winbond W83L951G. |
| 50 | Unfortunatly this doesn't help since the W83L951G is a generic microcontroller | 50 | Unfortunately this doesn't help since the W83L951G is a generic microcontroller |
| 51 | with a custom Abit application running on it. | 51 | with a custom Abit application running on it. |
| 52 | 52 | ||
| 53 | Despite Abit not releasing any information regarding the uGuru revision 3, | 53 | Despite Abit not releasing any information regarding the uGuru revision 3, |
diff --git a/Documentation/hwmon/pmbus b/Documentation/hwmon/pmbus index f2d42e8bdf48..dc4933e96344 100644 --- a/Documentation/hwmon/pmbus +++ b/Documentation/hwmon/pmbus | |||
| @@ -150,11 +150,11 @@ The following attributes are supported. Limits are read-write; all other | |||
| 150 | attributes are read-only. | 150 | attributes are read-only. |
| 151 | 151 | ||
| 152 | inX_input Measured voltage. From READ_VIN or READ_VOUT register. | 152 | inX_input Measured voltage. From READ_VIN or READ_VOUT register. |
| 153 | inX_min Minumum Voltage. | 153 | inX_min Minimum Voltage. |
| 154 | From VIN_UV_WARN_LIMIT or VOUT_UV_WARN_LIMIT register. | 154 | From VIN_UV_WARN_LIMIT or VOUT_UV_WARN_LIMIT register. |
| 155 | inX_max Maximum voltage. | 155 | inX_max Maximum voltage. |
| 156 | From VIN_OV_WARN_LIMIT or VOUT_OV_WARN_LIMIT register. | 156 | From VIN_OV_WARN_LIMIT or VOUT_OV_WARN_LIMIT register. |
| 157 | inX_lcrit Critical minumum Voltage. | 157 | inX_lcrit Critical minimum Voltage. |
| 158 | From VIN_UV_FAULT_LIMIT or VOUT_UV_FAULT_LIMIT register. | 158 | From VIN_UV_FAULT_LIMIT or VOUT_UV_FAULT_LIMIT register. |
| 159 | inX_crit Critical maximum voltage. | 159 | inX_crit Critical maximum voltage. |
| 160 | From VIN_OV_FAULT_LIMIT or VOUT_OV_FAULT_LIMIT register. | 160 | From VIN_OV_FAULT_LIMIT or VOUT_OV_FAULT_LIMIT register. |
| @@ -169,7 +169,7 @@ inX_label "vin", "vcap", or "voutY" | |||
| 169 | currX_input Measured current. From READ_IIN or READ_IOUT register. | 169 | currX_input Measured current. From READ_IIN or READ_IOUT register. |
| 170 | currX_max Maximum current. | 170 | currX_max Maximum current. |
| 171 | From IIN_OC_WARN_LIMIT or IOUT_OC_WARN_LIMIT register. | 171 | From IIN_OC_WARN_LIMIT or IOUT_OC_WARN_LIMIT register. |
| 172 | currX_lcrit Critical minumum output current. | 172 | currX_lcrit Critical minimum output current. |
| 173 | From IOUT_UC_FAULT_LIMIT register. | 173 | From IOUT_UC_FAULT_LIMIT register. |
| 174 | currX_crit Critical maximum current. | 174 | currX_crit Critical maximum current. |
| 175 | From IIN_OC_FAULT_LIMIT or IOUT_OC_FAULT_LIMIT register. | 175 | From IIN_OC_FAULT_LIMIT or IOUT_OC_FAULT_LIMIT register. |
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface index 83a698773ade..8f63c244f1aa 100644 --- a/Documentation/hwmon/sysfs-interface +++ b/Documentation/hwmon/sysfs-interface | |||
| @@ -579,7 +579,7 @@ channel should not be trusted. | |||
| 579 | fan[1-*]_fault | 579 | fan[1-*]_fault |
| 580 | temp[1-*]_fault | 580 | temp[1-*]_fault |
| 581 | Input fault condition | 581 | Input fault condition |
| 582 | 0: no fault occured | 582 | 0: no fault occurred |
| 583 | 1: fault condition | 583 | 1: fault condition |
| 584 | RO | 584 | RO |
| 585 | 585 | ||
diff --git a/Documentation/hwmon/w83781d b/Documentation/hwmon/w83781d index ecbc1e4574b4..129b0a3b555b 100644 --- a/Documentation/hwmon/w83781d +++ b/Documentation/hwmon/w83781d | |||
| @@ -403,7 +403,7 @@ found out the following values do work as a form of coarse pwm: | |||
| 403 | 403 | ||
| 404 | 0x80 - seems to turn fans off after some time(1-2 minutes)... might be | 404 | 0x80 - seems to turn fans off after some time(1-2 minutes)... might be |
| 405 | some form of auto-fan-control based on temp? hmm (Qfan? this mobo is an | 405 | some form of auto-fan-control based on temp? hmm (Qfan? this mobo is an |
| 406 | old ASUS, it isn't marketed as Qfan. Maybe some beta pre-attemp at Qfan | 406 | old ASUS, it isn't marketed as Qfan. Maybe some beta pre-attempt at Qfan |
| 407 | that was dropped at the BIOS) | 407 | that was dropped at the BIOS) |
| 408 | 0x81 - off | 408 | 0x81 - off |
| 409 | 0x82 - slightly "on-ner" than off, but my fans do not get to move. I can | 409 | 0x82 - slightly "on-ner" than off, but my fans do not get to move. I can |
diff --git a/Documentation/hwmon/w83791d b/Documentation/hwmon/w83791d index 5663e491655c..90387c3540f7 100644 --- a/Documentation/hwmon/w83791d +++ b/Documentation/hwmon/w83791d | |||
| @@ -93,7 +93,7 @@ The sysfs interface to the beep bitmask has migrated from the original legacy | |||
| 93 | method of a single sysfs beep_mask file to a newer method using multiple | 93 | method of a single sysfs beep_mask file to a newer method using multiple |
| 94 | *_beep files as described in .../Documentation/hwmon/sysfs-interface. | 94 | *_beep files as described in .../Documentation/hwmon/sysfs-interface. |
| 95 | 95 | ||
| 96 | A similar change has occured for the bitmap corresponding to the alarms. The | 96 | A similar change has occurred for the bitmap corresponding to the alarms. The |
| 97 | original legacy method used a single sysfs alarms file containing a bitmap | 97 | original legacy method used a single sysfs alarms file containing a bitmap |
| 98 | of triggered alarms. The newer method uses multiple sysfs *_alarm files | 98 | of triggered alarms. The newer method uses multiple sysfs *_alarm files |
| 99 | (again following the pattern described in sysfs-interface). | 99 | (again following the pattern described in sysfs-interface). |
diff --git a/Documentation/i2c/busses/i2c-parport-light b/Documentation/i2c/busses/i2c-parport-light index bdc9cbb2e0f2..c22ee063e1e5 100644 --- a/Documentation/i2c/busses/i2c-parport-light +++ b/Documentation/i2c/busses/i2c-parport-light | |||
| @@ -4,7 +4,7 @@ Author: Jean Delvare <khali@linux-fr.org> | |||
| 4 | 4 | ||
| 5 | This driver is a light version of i2c-parport. It doesn't depend | 5 | This driver is a light version of i2c-parport. It doesn't depend |
| 6 | on the parport driver, and uses direct I/O access instead. This might be | 6 | on the parport driver, and uses direct I/O access instead. This might be |
| 7 | prefered on embedded systems where wasting memory for the clean but heavy | 7 | preferred on embedded systems where wasting memory for the clean but heavy |
| 8 | parport handling is not an option. The drawback is a reduced portability | 8 | parport handling is not an option. The drawback is a reduced portability |
| 9 | and the impossibility to daisy-chain other parallel port devices. | 9 | and the impossibility to daisy-chain other parallel port devices. |
| 10 | 10 | ||
diff --git a/Documentation/i2c/busses/i2c-sis96x b/Documentation/i2c/busses/i2c-sis96x index 70e6a0cc1e15..0b979f3252a4 100644 --- a/Documentation/i2c/busses/i2c-sis96x +++ b/Documentation/i2c/busses/i2c-sis96x | |||
| @@ -35,7 +35,7 @@ or perhaps this... | |||
| 35 | 35 | ||
| 36 | (kernel versions later than 2.4.18 may fill in the "Unknown"s) | 36 | (kernel versions later than 2.4.18 may fill in the "Unknown"s) |
| 37 | 37 | ||
| 38 | If you cant see it please look on quirk_sis_96x_smbus | 38 | If you can't see it please look on quirk_sis_96x_smbus |
| 39 | (drivers/pci/quirks.c) (also if southbridge detection fails) | 39 | (drivers/pci/quirks.c) (also if southbridge detection fails) |
| 40 | 40 | ||
| 41 | I suspect that this driver could be made to work for the following SiS | 41 | I suspect that this driver could be made to work for the following SiS |
diff --git a/Documentation/i2c/busses/i2c-taos-evm b/Documentation/i2c/busses/i2c-taos-evm index 9146e33be6dd..63f62bcbf592 100644 --- a/Documentation/i2c/busses/i2c-taos-evm +++ b/Documentation/i2c/busses/i2c-taos-evm | |||
| @@ -13,7 +13,7 @@ Currently supported devices are: | |||
| 13 | 13 | ||
| 14 | * TAOS TSL2550 EVM | 14 | * TAOS TSL2550 EVM |
| 15 | 15 | ||
| 16 | For addtional information on TAOS products, please see | 16 | For additional information on TAOS products, please see |
| 17 | http://www.taosinc.com/ | 17 | http://www.taosinc.com/ |
| 18 | 18 | ||
| 19 | 19 | ||
diff --git a/Documentation/i2o/README b/Documentation/i2o/README index 0ebf58c73f54..ee91e2626ff0 100644 --- a/Documentation/i2o/README +++ b/Documentation/i2o/README | |||
| @@ -53,7 +53,7 @@ Symbios Logic (Now LSI) | |||
| 53 | BoxHill Corporation | 53 | BoxHill Corporation |
| 54 | Loan of initial FibreChannel disk array used for development work. | 54 | Loan of initial FibreChannel disk array used for development work. |
| 55 | 55 | ||
| 56 | European Comission | 56 | European Commission |
| 57 | Funding the work done by the University of Helsinki | 57 | Funding the work done by the University of Helsinki |
| 58 | 58 | ||
| 59 | SysKonnect | 59 | SysKonnect |
diff --git a/Documentation/ia64/aliasing-test.c b/Documentation/ia64/aliasing-test.c index 3dfb76ca6931..5caa2af33207 100644 --- a/Documentation/ia64/aliasing-test.c +++ b/Documentation/ia64/aliasing-test.c | |||
| @@ -177,7 +177,7 @@ static int scan_rom(char *path, char *file) | |||
| 177 | 177 | ||
| 178 | /* | 178 | /* |
| 179 | * It's OK if the ROM is unreadable. Maybe there | 179 | * It's OK if the ROM is unreadable. Maybe there |
| 180 | * is no ROM, or some other error ocurred. The | 180 | * is no ROM, or some other error occurred. The |
| 181 | * important thing is that no MCA happened. | 181 | * important thing is that no MCA happened. |
| 182 | */ | 182 | */ |
| 183 | if (rc > 0) | 183 | if (rc > 0) |
diff --git a/Documentation/input/event-codes.txt b/Documentation/input/event-codes.txt new file mode 100644 index 000000000000..23fcb05175be --- /dev/null +++ b/Documentation/input/event-codes.txt | |||
| @@ -0,0 +1,262 @@ | |||
| 1 | The input protocol uses a map of types and codes to express input device values | ||
| 2 | to userspace. This document describes the types and codes and how and when they | ||
| 3 | may be used. | ||
| 4 | |||
| 5 | A single hardware event generates multiple input events. Each input event | ||
| 6 | contains the new value of a single data item. A special event type, EV_SYN, is | ||
| 7 | used to separate input events into packets of input data changes occurring at | ||
| 8 | the same moment in time. In the following, the term "event" refers to a single | ||
| 9 | input event encompassing a type, code, and value. | ||
| 10 | |||
| 11 | The input protocol is a stateful protocol. Events are emitted only when values | ||
| 12 | of event codes have changed. However, the state is maintained within the Linux | ||
| 13 | input subsystem; drivers do not need to maintain the state and may attempt to | ||
| 14 | emit unchanged values without harm. Userspace may obtain the current state of | ||
| 15 | event code values using the EVIOCG* ioctls defined in linux/input.h. The event | ||
| 16 | reports supported by a device are also provided by sysfs in | ||
| 17 | class/input/event*/device/capabilities/, and the properties of a device are | ||
| 18 | provided in class/input/event*/device/properties. | ||
| 19 | |||
| 20 | Types: | ||
| 21 | ========== | ||
| 22 | Types are groupings of codes under a logical input construct. Each type has a | ||
| 23 | set of applicable codes to be used in generating events. See the Codes section | ||
| 24 | for details on valid codes for each type. | ||
| 25 | |||
| 26 | * EV_SYN: | ||
| 27 | - Used as markers to separate events. Events may be separated in time or in | ||
| 28 | space, such as with the multitouch protocol. | ||
| 29 | |||
| 30 | * EV_KEY: | ||
| 31 | - Used to describe state changes of keyboards, buttons, or other key-like | ||
| 32 | devices. | ||
| 33 | |||
| 34 | * EV_REL: | ||
| 35 | - Used to describe relative axis value changes, e.g. moving the mouse 5 units | ||
| 36 | to the left. | ||
| 37 | |||
| 38 | * EV_ABS: | ||
| 39 | - Used to describe absolute axis value changes, e.g. describing the | ||
| 40 | coordinates of a touch on a touchscreen. | ||
| 41 | |||
| 42 | * EV_MSC: | ||
| 43 | - Used to describe miscellaneous input data that do not fit into other types. | ||
| 44 | |||
| 45 | * EV_SW: | ||
| 46 | - Used to describe binary state input switches. | ||
| 47 | |||
| 48 | * EV_LED: | ||
| 49 | - Used to turn LEDs on devices on and off. | ||
| 50 | |||
| 51 | * EV_SND: | ||
| 52 | - Used to output sound to devices. | ||
| 53 | |||
| 54 | * EV_REP: | ||
| 55 | - Used for autorepeating devices. | ||
| 56 | |||
| 57 | * EV_FF: | ||
| 58 | - Used to send force feedback commands to an input device. | ||
| 59 | |||
| 60 | * EV_PWR: | ||
| 61 | - A special type for power button and switch input. | ||
| 62 | |||
| 63 | * EV_FF_STATUS: | ||
| 64 | - Used to receive force feedback device status. | ||
| 65 | |||
| 66 | Codes: | ||
| 67 | ========== | ||
| 68 | Codes define the precise type of event. | ||
| 69 | |||
| 70 | EV_SYN: | ||
| 71 | ---------- | ||
| 72 | EV_SYN event values are undefined. Their usage is defined only by when they are | ||
| 73 | sent in the evdev event stream. | ||
| 74 | |||
| 75 | * SYN_REPORT: | ||
| 76 | - Used to synchronize and separate events into packets of input data changes | ||
| 77 | occurring at the same moment in time. For example, motion of a mouse may set | ||
| 78 | the REL_X and REL_Y values for one motion, then emit a SYN_REPORT. The next | ||
| 79 | motion will emit more REL_X and REL_Y values and send another SYN_REPORT. | ||
| 80 | |||
| 81 | * SYN_CONFIG: | ||
| 82 | - TBD | ||
| 83 | |||
| 84 | * SYN_MT_REPORT: | ||
| 85 | - Used to synchronize and separate touch events. See the | ||
| 86 | multi-touch-protocol.txt document for more information. | ||
| 87 | |||
| 88 | * SYN_DROPPED: | ||
| 89 | - Used to indicate buffer overrun in the evdev client's event queue. | ||
| 90 | Client should ignore all events up to and including next SYN_REPORT | ||
| 91 | event and query the device (using EVIOCG* ioctls) to obtain its | ||
| 92 | current state. | ||
| 93 | |||
| 94 | EV_KEY: | ||
| 95 | ---------- | ||
| 96 | EV_KEY events take the form KEY_<name> or BTN_<name>. For example, KEY_A is used | ||
| 97 | to represent the 'A' key on a keyboard. When a key is depressed, an event with | ||
| 98 | the key's code is emitted with value 1. When the key is released, an event is | ||
| 99 | emitted with value 0. Some hardware send events when a key is repeated. These | ||
| 100 | events have a value of 2. In general, KEY_<name> is used for keyboard keys, and | ||
| 101 | BTN_<name> is used for other types of momentary switch events. | ||
| 102 | |||
| 103 | A few EV_KEY codes have special meanings: | ||
| 104 | |||
| 105 | * BTN_TOOL_<name>: | ||
| 106 | - These codes are used in conjunction with input trackpads, tablets, and | ||
| 107 | touchscreens. These devices may be used with fingers, pens, or other tools. | ||
| 108 | When an event occurs and a tool is used, the corresponding BTN_TOOL_<name> | ||
| 109 | code should be set to a value of 1. When the tool is no longer interacting | ||
| 110 | with the input device, the BTN_TOOL_<name> code should be reset to 0. All | ||
| 111 | trackpads, tablets, and touchscreens should use at least one BTN_TOOL_<name> | ||
| 112 | code when events are generated. | ||
| 113 | |||
| 114 | * BTN_TOUCH: | ||
| 115 | BTN_TOUCH is used for touch contact. While an input tool is determined to be | ||
| 116 | within meaningful physical contact, the value of this property must be set | ||
| 117 | to 1. Meaningful physical contact may mean any contact, or it may mean | ||
| 118 | contact conditioned by an implementation defined property. For example, a | ||
| 119 | touchpad may set the value to 1 only when the touch pressure rises above a | ||
| 120 | certain value. BTN_TOUCH may be combined with BTN_TOOL_<name> codes. For | ||
| 121 | example, a pen tablet may set BTN_TOOL_PEN to 1 and BTN_TOUCH to 0 while the | ||
| 122 | pen is hovering over but not touching the tablet surface. | ||
| 123 | |||
| 124 | Note: For appropriate function of the legacy mousedev emulation driver, | ||
| 125 | BTN_TOUCH must be the first evdev code emitted in a synchronization frame. | ||
| 126 | |||
| 127 | Note: Historically a touch device with BTN_TOOL_FINGER and BTN_TOUCH was | ||
| 128 | interpreted as a touchpad by userspace, while a similar device without | ||
| 129 | BTN_TOOL_FINGER was interpreted as a touchscreen. For backwards compatibility | ||
| 130 | with current userspace it is recommended to follow this distinction. In the | ||
| 131 | future, this distinction will be deprecated and the device properties ioctl | ||
| 132 | EVIOCGPROP, defined in linux/input.h, will be used to convey the device type. | ||
| 133 | |||
| 134 | * BTN_TOOL_FINGER, BTN_TOOL_DOUBLETAP, BTN_TOOL_TRIPLETAP, BTN_TOOL_QUADTAP: | ||
| 135 | - These codes denote one, two, three, and four finger interaction on a | ||
| 136 | trackpad or touchscreen. For example, if the user uses two fingers and moves | ||
| 137 | them on the touchpad in an effort to scroll content on screen, | ||
| 138 | BTN_TOOL_DOUBLETAP should be set to value 1 for the duration of the motion. | ||
| 139 | Note that all BTN_TOOL_<name> codes and the BTN_TOUCH code are orthogonal in | ||
| 140 | purpose. A trackpad event generated by finger touches should generate events | ||
| 141 | for one code from each group. At most only one of these BTN_TOOL_<name> | ||
| 142 | codes should have a value of 1 during any synchronization frame. | ||
| 143 | |||
| 144 | Note: Historically some drivers emitted multiple of the finger count codes with | ||
| 145 | a value of 1 in the same synchronization frame. This usage is deprecated. | ||
| 146 | |||
| 147 | Note: In multitouch drivers, the input_mt_report_finger_count() function should | ||
| 148 | be used to emit these codes. Please see multi-touch-protocol.txt for details. | ||
| 149 | |||
| 150 | EV_REL: | ||
| 151 | ---------- | ||
| 152 | EV_REL events describe relative changes in a property. For example, a mouse may | ||
| 153 | move to the left by a certain number of units, but its absolute position in | ||
| 154 | space is unknown. If the absolute position is known, EV_ABS codes should be used | ||
| 155 | instead of EV_REL codes. | ||
| 156 | |||
| 157 | A few EV_REL codes have special meanings: | ||
| 158 | |||
| 159 | * REL_WHEEL, REL_HWHEEL: | ||
| 160 | - These codes are used for vertical and horizontal scroll wheels, | ||
| 161 | respectively. | ||
| 162 | |||
| 163 | EV_ABS: | ||
| 164 | ---------- | ||
| 165 | EV_ABS events describe absolute changes in a property. For example, a touchpad | ||
| 166 | may emit coordinates for a touch location. | ||
| 167 | |||
| 168 | A few EV_ABS codes have special meanings: | ||
| 169 | |||
| 170 | * ABS_DISTANCE: | ||
| 171 | - Used to describe the distance of a tool from an interaction surface. This | ||
| 172 | event should only be emitted while the tool is hovering, meaning in close | ||
| 173 | proximity of the device and while the value of the BTN_TOUCH code is 0. If | ||
| 174 | the input device may be used freely in three dimensions, consider ABS_Z | ||
| 175 | instead. | ||
| 176 | |||
| 177 | * ABS_MT_<name>: | ||
| 178 | - Used to describe multitouch input events. Please see | ||
| 179 | multi-touch-protocol.txt for details. | ||
| 180 | |||
| 181 | EV_SW: | ||
| 182 | ---------- | ||
| 183 | EV_SW events describe stateful binary switches. For example, the SW_LID code is | ||
| 184 | used to denote when a laptop lid is closed. | ||
| 185 | |||
| 186 | Upon binding to a device or resuming from suspend, a driver must report | ||
| 187 | the current switch state. This ensures that the device, kernel, and userspace | ||
| 188 | state is in sync. | ||
| 189 | |||
| 190 | Upon resume, if the switch state is the same as before suspend, then the input | ||
| 191 | subsystem will filter out the duplicate switch state reports. The driver does | ||
| 192 | not need to keep the state of the switch at any time. | ||
| 193 | |||
| 194 | EV_MSC: | ||
| 195 | ---------- | ||
| 196 | EV_MSC events are used for input and output events that do not fall under other | ||
| 197 | categories. | ||
| 198 | |||
| 199 | EV_LED: | ||
| 200 | ---------- | ||
| 201 | EV_LED events are used for input and output to set and query the state of | ||
| 202 | various LEDs on devices. | ||
| 203 | |||
| 204 | EV_REP: | ||
| 205 | ---------- | ||
| 206 | EV_REP events are used for specifying autorepeating events. | ||
| 207 | |||
| 208 | EV_SND: | ||
| 209 | ---------- | ||
| 210 | EV_SND events are used for sending sound commands to simple sound output | ||
| 211 | devices. | ||
| 212 | |||
| 213 | EV_FF: | ||
| 214 | ---------- | ||
| 215 | EV_FF events are used to initialize a force feedback capable device and to cause | ||
| 216 | such device to feedback. | ||
| 217 | |||
| 218 | EV_PWR: | ||
| 219 | ---------- | ||
| 220 | EV_PWR events are a special type of event used specifically for power | ||
| 221 | mangement. Its usage is not well defined. To be addressed later. | ||
| 222 | |||
| 223 | Guidelines: | ||
| 224 | ========== | ||
| 225 | The guidelines below ensure proper single-touch and multi-finger functionality. | ||
| 226 | For multi-touch functionality, see the multi-touch-protocol.txt document for | ||
| 227 | more information. | ||
| 228 | |||
| 229 | Mice: | ||
| 230 | ---------- | ||
| 231 | REL_{X,Y} must be reported when the mouse moves. BTN_LEFT must be used to report | ||
| 232 | the primary button press. BTN_{MIDDLE,RIGHT,4,5,etc.} should be used to report | ||
| 233 | further buttons of the device. REL_WHEEL and REL_HWHEEL should be used to report | ||
| 234 | scroll wheel events where available. | ||
| 235 | |||
| 236 | Touchscreens: | ||
| 237 | ---------- | ||
| 238 | ABS_{X,Y} must be reported with the location of the touch. BTN_TOUCH must be | ||
| 239 | used to report when a touch is active on the screen. | ||
| 240 | BTN_{MOUSE,LEFT,MIDDLE,RIGHT} must not be reported as the result of touch | ||
| 241 | contact. BTN_TOOL_<name> events should be reported where possible. | ||
| 242 | |||
| 243 | Trackpads: | ||
| 244 | ---------- | ||
| 245 | Legacy trackpads that only provide relative position information must report | ||
| 246 | events like mice described above. | ||
| 247 | |||
| 248 | Trackpads that provide absolute touch position must report ABS_{X,Y} for the | ||
| 249 | location of the touch. BTN_TOUCH should be used to report when a touch is active | ||
| 250 | on the trackpad. Where multi-finger support is available, BTN_TOOL_<name> should | ||
| 251 | be used to report the number of touches active on the trackpad. | ||
| 252 | |||
| 253 | Tablets: | ||
| 254 | ---------- | ||
| 255 | BTN_TOOL_<name> events must be reported when a stylus or other tool is active on | ||
| 256 | the tablet. ABS_{X,Y} must be reported with the location of the tool. BTN_TOUCH | ||
| 257 | should be used to report when the tool is in contact with the tablet. | ||
| 258 | BTN_{STYLUS,STYLUS2} should be used to report buttons on the tool itself. Any | ||
| 259 | button may be used for buttons on the tablet except BTN_{MOUSE,LEFT}. | ||
| 260 | BTN_{0,1,2,etc} are good generic codes for unlabeled buttons. Do not use | ||
| 261 | meaningful buttons, like BTN_FORWARD, unless the button is labeled for that | ||
| 262 | purpose on the device. | ||
diff --git a/Documentation/input/joystick-parport.txt b/Documentation/input/joystick-parport.txt index 1c856f32ff2c..56870c70a796 100644 --- a/Documentation/input/joystick-parport.txt +++ b/Documentation/input/joystick-parport.txt | |||
| @@ -272,7 +272,7 @@ if you want to use gamecon.c. | |||
| 272 | 272 | ||
| 273 | Also, the connection is a bit more complex. You'll need a bunch of diodes, | 273 | Also, the connection is a bit more complex. You'll need a bunch of diodes, |
| 274 | and one pullup resistor. First, you connect the Directions and the button | 274 | and one pullup resistor. First, you connect the Directions and the button |
| 275 | the same as for db9, however with the diodes inbetween. | 275 | the same as for db9, however with the diodes between. |
| 276 | 276 | ||
| 277 | Diodes | 277 | Diodes |
| 278 | (pin 2) -----|<|----> Up | 278 | (pin 2) -----|<|----> Up |
diff --git a/Documentation/input/rotary-encoder.txt b/Documentation/input/rotary-encoder.txt index 8b4129de1d2d..943e8f6f2b15 100644 --- a/Documentation/input/rotary-encoder.txt +++ b/Documentation/input/rotary-encoder.txt | |||
| @@ -46,7 +46,7 @@ c) Falling edge on channel A, channel B in high state | |||
| 46 | 46 | ||
| 47 | d) Falling edge on channel B, channel A in low state | 47 | d) Falling edge on channel B, channel A in low state |
| 48 | Parking position. If the encoder enters this state, a full transition | 48 | Parking position. If the encoder enters this state, a full transition |
| 49 | should have happend, unless it flipped back on half the way. The | 49 | should have happened, unless it flipped back on half the way. The |
| 50 | 'armed' state tells us about that. | 50 | 'armed' state tells us about that. |
| 51 | 51 | ||
| 52 | 2. Platform requirements | 52 | 2. Platform requirements |
diff --git a/Documentation/input/walkera0701.txt b/Documentation/input/walkera0701.txt index 8f4289efc5c4..561385d38482 100644 --- a/Documentation/input/walkera0701.txt +++ b/Documentation/input/walkera0701.txt | |||
| @@ -77,7 +77,7 @@ pulse length: | |||
| 77 | 77 | ||
| 78 | 24 bin+oct values + 1 bin value = 24*4+1 bits = 97 bits | 78 | 24 bin+oct values + 1 bin value = 24*4+1 bits = 97 bits |
| 79 | 79 | ||
| 80 | (Warning, pulses on ACK ar inverted by transistor, irq is rised up on sync | 80 | (Warning, pulses on ACK are inverted by transistor, irq is raised up on sync |
| 81 | to bin change or octal value to bin change). | 81 | to bin change or octal value to bin change). |
| 82 | 82 | ||
| 83 | Binary data representations: | 83 | Binary data representations: |
diff --git a/Documentation/irqflags-tracing.txt b/Documentation/irqflags-tracing.txt index 6a444877ee0b..67aa71e73035 100644 --- a/Documentation/irqflags-tracing.txt +++ b/Documentation/irqflags-tracing.txt | |||
| @@ -53,5 +53,5 @@ implementation in an architecture: lockdep will detect that and will | |||
| 53 | turn itself off. I.e. the lock validator will still be reliable. There | 53 | turn itself off. I.e. the lock validator will still be reliable. There |
| 54 | should be no crashes due to irq-tracing bugs. (except if the assembly | 54 | should be no crashes due to irq-tracing bugs. (except if the assembly |
| 55 | changes break other code by modifying conditions or registers that | 55 | changes break other code by modifying conditions or registers that |
| 56 | shouldnt be) | 56 | shouldn't be) |
| 57 | 57 | ||
diff --git a/Documentation/isdn/INTERFACE.CAPI b/Documentation/isdn/INTERFACE.CAPI index 309eb5ed942b..1688b5a1fd77 100644 --- a/Documentation/isdn/INTERFACE.CAPI +++ b/Documentation/isdn/INTERFACE.CAPI | |||
| @@ -240,7 +240,7 @@ Functions capi_cmsg2message() and capi_message2cmsg() are provided to convert | |||
| 240 | messages between their transport encoding described in the CAPI 2.0 standard | 240 | messages between their transport encoding described in the CAPI 2.0 standard |
| 241 | and their _cmsg structure representation. Note that capi_cmsg2message() does | 241 | and their _cmsg structure representation. Note that capi_cmsg2message() does |
| 242 | not know or check the size of its destination buffer. The caller must make | 242 | not know or check the size of its destination buffer. The caller must make |
| 243 | sure it is big enough to accomodate the resulting CAPI message. | 243 | sure it is big enough to accommodate the resulting CAPI message. |
| 244 | 244 | ||
| 245 | 245 | ||
| 246 | 5. Lower Layer Interface Functions | 246 | 5. Lower Layer Interface Functions |
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt index f1431d099fce..7c2a89ba674c 100644 --- a/Documentation/kbuild/kbuild.txt +++ b/Documentation/kbuild/kbuild.txt | |||
| @@ -26,11 +26,11 @@ Additional options to the assembler (for built-in and modules). | |||
| 26 | 26 | ||
| 27 | AFLAGS_MODULE | 27 | AFLAGS_MODULE |
| 28 | -------------------------------------------------- | 28 | -------------------------------------------------- |
| 29 | Addtional module specific options to use for $(AS). | 29 | Additional module specific options to use for $(AS). |
| 30 | 30 | ||
| 31 | AFLAGS_KERNEL | 31 | AFLAGS_KERNEL |
| 32 | -------------------------------------------------- | 32 | -------------------------------------------------- |
| 33 | Addtional options for $(AS) when used for assembler | 33 | Additional options for $(AS) when used for assembler |
| 34 | code for code that is compiled as built-in. | 34 | code for code that is compiled as built-in. |
| 35 | 35 | ||
| 36 | KCFLAGS | 36 | KCFLAGS |
| @@ -39,12 +39,12 @@ Additional options to the C compiler (for built-in and modules). | |||
| 39 | 39 | ||
| 40 | CFLAGS_KERNEL | 40 | CFLAGS_KERNEL |
| 41 | -------------------------------------------------- | 41 | -------------------------------------------------- |
| 42 | Addtional options for $(CC) when used to compile | 42 | Additional options for $(CC) when used to compile |
| 43 | code that is compiled as built-in. | 43 | code that is compiled as built-in. |
| 44 | 44 | ||
| 45 | CFLAGS_MODULE | 45 | CFLAGS_MODULE |
| 46 | -------------------------------------------------- | 46 | -------------------------------------------------- |
| 47 | Addtional module specific options to use for $(CC). | 47 | Additional module specific options to use for $(CC). |
| 48 | 48 | ||
| 49 | LDFLAGS_MODULE | 49 | LDFLAGS_MODULE |
| 50 | -------------------------------------------------- | 50 | -------------------------------------------------- |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index c357a31411cd..cc85a9278190 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
| @@ -699,7 +699,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 699 | ekgdboc= [X86,KGDB] Allow early kernel console debugging | 699 | ekgdboc= [X86,KGDB] Allow early kernel console debugging |
| 700 | ekgdboc=kbd | 700 | ekgdboc=kbd |
| 701 | 701 | ||
| 702 | This is desgined to be used in conjunction with | 702 | This is designed to be used in conjunction with |
| 703 | the boot argument: earlyprintk=vga | 703 | the boot argument: earlyprintk=vga |
| 704 | 704 | ||
| 705 | edd= [EDD] | 705 | edd= [EDD] |
| @@ -1832,15 +1832,17 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 1832 | perfmon on Intel CPUs instead of the | 1832 | perfmon on Intel CPUs instead of the |
| 1833 | CPU specific event set. | 1833 | CPU specific event set. |
| 1834 | 1834 | ||
| 1835 | oops=panic Always panic on oopses. Default is to just kill the process, | 1835 | oops=panic Always panic on oopses. Default is to just kill the |
| 1836 | but there is a small probability of deadlocking the machine. | 1836 | process, but there is a small probability of |
| 1837 | deadlocking the machine. | ||
| 1837 | This will also cause panics on machine check exceptions. | 1838 | This will also cause panics on machine check exceptions. |
| 1838 | Useful together with panic=30 to trigger a reboot. | 1839 | Useful together with panic=30 to trigger a reboot. |
| 1839 | 1840 | ||
| 1840 | OSS [HW,OSS] | 1841 | OSS [HW,OSS] |
| 1841 | See Documentation/sound/oss/oss-parameters.txt | 1842 | See Documentation/sound/oss/oss-parameters.txt |
| 1842 | 1843 | ||
| 1843 | panic= [KNL] Kernel behaviour on panic | 1844 | panic= [KNL] Kernel behaviour on panic: delay <timeout> |
| 1845 | seconds before rebooting | ||
| 1844 | Format: <timeout> | 1846 | Format: <timeout> |
| 1845 | 1847 | ||
| 1846 | parkbd.port= [HW] Parallel port number the keyboard adapter is | 1848 | parkbd.port= [HW] Parallel port number the keyboard adapter is |
| @@ -2343,6 +2345,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 2343 | 2345 | ||
| 2344 | softlockup_panic= | 2346 | softlockup_panic= |
| 2345 | [KNL] Should the soft-lockup detector generate panics. | 2347 | [KNL] Should the soft-lockup detector generate panics. |
| 2348 | Format: <integer> | ||
| 2346 | 2349 | ||
| 2347 | sonypi.*= [HW] Sony Programmable I/O Control Device driver | 2350 | sonypi.*= [HW] Sony Programmable I/O Control Device driver |
| 2348 | See Documentation/sonypi.txt | 2351 | See Documentation/sonypi.txt |
| @@ -2475,8 +2478,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 2475 | topology= [S390] | 2478 | topology= [S390] |
| 2476 | Format: {off | on} | 2479 | Format: {off | on} |
| 2477 | Specify if the kernel should make use of the cpu | 2480 | Specify if the kernel should make use of the cpu |
| 2478 | topology informations if the hardware supports these. | 2481 | topology information if the hardware supports this. |
| 2479 | The scheduler will make use of these informations and | 2482 | The scheduler will make use of this information and |
| 2480 | e.g. base its process migration decisions on it. | 2483 | e.g. base its process migration decisions on it. |
| 2481 | Default is on. | 2484 | Default is on. |
| 2482 | 2485 | ||
| @@ -2529,8 +2532,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 2529 | reported either. | 2532 | reported either. |
| 2530 | 2533 | ||
| 2531 | unknown_nmi_panic | 2534 | unknown_nmi_panic |
| 2532 | [X86] | 2535 | [X86] Cause panic on unknown NMI. |
| 2533 | Set unknown_nmi_panic=1 early on boot. | ||
| 2534 | 2536 | ||
| 2535 | usbcore.autosuspend= | 2537 | usbcore.autosuspend= |
| 2536 | [USB] The autosuspend time delay (in seconds) used | 2538 | [USB] The autosuspend time delay (in seconds) used |
diff --git a/Documentation/kmemleak.txt b/Documentation/kmemleak.txt index 34f6638aa5ac..090e6ee04536 100644 --- a/Documentation/kmemleak.txt +++ b/Documentation/kmemleak.txt | |||
| @@ -11,6 +11,7 @@ with the difference that the orphan objects are not freed but only | |||
| 11 | reported via /sys/kernel/debug/kmemleak. A similar method is used by the | 11 | reported via /sys/kernel/debug/kmemleak. A similar method is used by the |
| 12 | Valgrind tool (memcheck --leak-check) to detect the memory leaks in | 12 | Valgrind tool (memcheck --leak-check) to detect the memory leaks in |
| 13 | user-space applications. | 13 | user-space applications. |
| 14 | Kmemleak is supported on x86, arm, powerpc, sparc, sh, microblaze and tile. | ||
| 14 | 15 | ||
| 15 | Usage | 16 | Usage |
| 16 | ----- | 17 | ----- |
| @@ -178,5 +179,4 @@ block doesn't need to be freed (some cases in the init_call functions), | |||
| 178 | the pointer is calculated by other methods than the usual container_of | 179 | the pointer is calculated by other methods than the usual container_of |
| 179 | macro or the pointer is stored in a location not scanned by kmemleak. | 180 | macro or the pointer is stored in a location not scanned by kmemleak. |
| 180 | 181 | ||
| 181 | Page allocations and ioremap are not tracked. Only the ARM and x86 | 182 | Page allocations and ioremap are not tracked. |
| 182 | architectures are currently supported. | ||
diff --git a/Documentation/kvm/mmu.txt b/Documentation/kvm/mmu.txt index 142cc5136650..f46aa58389ca 100644 --- a/Documentation/kvm/mmu.txt +++ b/Documentation/kvm/mmu.txt | |||
| @@ -23,7 +23,7 @@ The mmu code attempts to satisfy the following requirements: | |||
| 23 | and framebuffer-based displays | 23 | and framebuffer-based displays |
| 24 | - footprint: keep the amount of pinned kernel memory low (most memory | 24 | - footprint: keep the amount of pinned kernel memory low (most memory |
| 25 | should be shrinkable) | 25 | should be shrinkable) |
| 26 | - reliablity: avoid multipage or GFP_ATOMIC allocations | 26 | - reliability: avoid multipage or GFP_ATOMIC allocations |
| 27 | 27 | ||
| 28 | Acronyms | 28 | Acronyms |
| 29 | ======== | 29 | ======== |
diff --git a/Documentation/kvm/ppc-pv.txt b/Documentation/kvm/ppc-pv.txt index a7f2244b3be9..3ab969c59046 100644 --- a/Documentation/kvm/ppc-pv.txt +++ b/Documentation/kvm/ppc-pv.txt | |||
| @@ -136,7 +136,7 @@ Patched instructions | |||
| 136 | ==================== | 136 | ==================== |
| 137 | 137 | ||
| 138 | The "ld" and "std" instructions are transormed to "lwz" and "stw" instructions | 138 | The "ld" and "std" instructions are transormed to "lwz" and "stw" instructions |
| 139 | respectively on 32 bit systems with an added offset of 4 to accomodate for big | 139 | respectively on 32 bit systems with an added offset of 4 to accommodate for big |
| 140 | endianness. | 140 | endianness. |
| 141 | 141 | ||
| 142 | The following is a list of mapping the Linux kernel performs when running as | 142 | The following is a list of mapping the Linux kernel performs when running as |
diff --git a/Documentation/kvm/timekeeping.txt b/Documentation/kvm/timekeeping.txt index 0c5033a58c9e..df8946377cb6 100644 --- a/Documentation/kvm/timekeeping.txt +++ b/Documentation/kvm/timekeeping.txt | |||
| @@ -81,7 +81,7 @@ Mode 0: Single Timeout. This is a one-shot software timeout that counts down | |||
| 81 | when the gate is high (always true for timers 0 and 1). When the count | 81 | when the gate is high (always true for timers 0 and 1). When the count |
| 82 | reaches zero, the output goes high. | 82 | reaches zero, the output goes high. |
| 83 | 83 | ||
| 84 | Mode 1: Triggered One-shot. The output is intially set high. When the gate | 84 | Mode 1: Triggered One-shot. The output is initially set high. When the gate |
| 85 | line is set high, a countdown is initiated (which does not stop if the gate is | 85 | line is set high, a countdown is initiated (which does not stop if the gate is |
| 86 | lowered), during which the output is set low. When the count reaches zero, | 86 | lowered), during which the output is set low. When the count reaches zero, |
| 87 | the output goes high. | 87 | the output goes high. |
diff --git a/Documentation/laptops/asus-laptop.txt b/Documentation/laptops/asus-laptop.txt index c1c5be84e4b1..803e51f6768b 100644 --- a/Documentation/laptops/asus-laptop.txt +++ b/Documentation/laptops/asus-laptop.txt | |||
| @@ -61,7 +61,7 @@ Usage | |||
| 61 | Hotkeys are also reported as input keys (like keyboards) you can check | 61 | Hotkeys are also reported as input keys (like keyboards) you can check |
| 62 | which key are supported using "xev" under X11. | 62 | which key are supported using "xev" under X11. |
| 63 | 63 | ||
| 64 | You can get informations on the version of your DSDT table by reading the | 64 | You can get information on the version of your DSDT table by reading the |
| 65 | /sys/devices/platform/asus-laptop/infos entry. If you have a question or a | 65 | /sys/devices/platform/asus-laptop/infos entry. If you have a question or a |
| 66 | bug report to do, please include the output of this entry. | 66 | bug report to do, please include the output of this entry. |
| 67 | 67 | ||
| @@ -178,7 +178,7 @@ LED display | |||
| 178 | ----------- | 178 | ----------- |
| 179 | 179 | ||
| 180 | Some models like the W1N have a LED display that can be used to display | 180 | Some models like the W1N have a LED display that can be used to display |
| 181 | several informations. | 181 | several items of information. |
| 182 | 182 | ||
| 183 | LED display works for the following models: | 183 | LED display works for the following models: |
| 184 | W1000N | 184 | W1000N |
diff --git a/Documentation/leds/00-INDEX b/Documentation/leds/00-INDEX new file mode 100644 index 000000000000..29f481df32c7 --- /dev/null +++ b/Documentation/leds/00-INDEX | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | leds-class.txt | ||
| 2 | - documents LED handling under Linux. | ||
| 3 | leds-lp3944.txt | ||
| 4 | - notes on how to use the leds-lp3944 driver. | ||
| 5 | leds-lp5521.txt | ||
| 6 | - notes on how to use the leds-lp5521 driver. | ||
| 7 | leds-lp5523.txt | ||
| 8 | - notes on how to use the leds-lp5523 driver. | ||
diff --git a/Documentation/leds-class.txt b/Documentation/leds/leds-class.txt index 58b266bd1846..4996586e27e8 100644 --- a/Documentation/leds-class.txt +++ b/Documentation/leds/leds-class.txt | |||
| @@ -95,4 +95,3 @@ There are a number of cases where a trigger might only be mappable to a | |||
| 95 | particular LED (ACPI?). The addition of triggers provided by the LED driver | 95 | particular LED (ACPI?). The addition of triggers provided by the LED driver |
| 96 | should cover this option and be possible to add without breaking the | 96 | should cover this option and be possible to add without breaking the |
| 97 | current interface. | 97 | current interface. |
| 98 | |||
diff --git a/Documentation/leds-lp3944.txt b/Documentation/leds/leds-lp3944.txt index c6eda18b15ef..c6eda18b15ef 100644 --- a/Documentation/leds-lp3944.txt +++ b/Documentation/leds/leds-lp3944.txt | |||
diff --git a/Documentation/media-framework.txt b/Documentation/media-framework.txt index fd48add02cb0..76a2087db205 100644 --- a/Documentation/media-framework.txt +++ b/Documentation/media-framework.txt | |||
| @@ -194,7 +194,7 @@ each pad. | |||
| 194 | 194 | ||
| 195 | Links are represented by a struct media_link instance, defined in | 195 | Links are represented by a struct media_link instance, defined in |
| 196 | include/media/media-entity.h. Each entity stores all links originating at or | 196 | include/media/media-entity.h. Each entity stores all links originating at or |
| 197 | targetting any of its pads in a links array. A given link is thus stored | 197 | targeting any of its pads in a links array. A given link is thus stored |
| 198 | twice, once in the source entity and once in the target entity. The array is | 198 | twice, once in the source entity and once in the target entity. The array is |
| 199 | pre-allocated and grows dynamically as needed. | 199 | pre-allocated and grows dynamically as needed. |
| 200 | 200 | ||
| @@ -348,6 +348,6 @@ a streaming entity. Links that can be modified while streaming must be marked | |||
| 348 | with the MEDIA_LNK_FL_DYNAMIC flag. | 348 | with the MEDIA_LNK_FL_DYNAMIC flag. |
| 349 | 349 | ||
| 350 | If other operations need to be disallowed on streaming entities (such as | 350 | If other operations need to be disallowed on streaming entities (such as |
| 351 | changing entities configuration parameters) drivers can explictly check the | 351 | changing entities configuration parameters) drivers can explicitly check the |
| 352 | media_entity stream_count field to find out if an entity is streaming. This | 352 | media_entity stream_count field to find out if an entity is streaming. This |
| 353 | operation must be done with the media_device graph_mutex held. | 353 | operation must be done with the media_device graph_mutex held. |
diff --git a/Documentation/mips/AU1xxx_IDE.README b/Documentation/mips/AU1xxx_IDE.README index 8ace35ebdcd5..cc887ecfd6eb 100644 --- a/Documentation/mips/AU1xxx_IDE.README +++ b/Documentation/mips/AU1xxx_IDE.README | |||
| @@ -39,13 +39,13 @@ Note: for more information, please refer "AMD Alchemy Au1200/Au1550 IDE | |||
| 39 | Interface and Linux Device Driver" Application Note. | 39 | Interface and Linux Device Driver" Application Note. |
| 40 | 40 | ||
| 41 | 41 | ||
| 42 | FILES, CONFIGS AND COMPATABILITY | 42 | FILES, CONFIGS AND COMPATIBILITY |
| 43 | -------------------------------- | 43 | -------------------------------- |
| 44 | 44 | ||
| 45 | Two files are introduced: | 45 | Two files are introduced: |
| 46 | 46 | ||
| 47 | a) 'arch/mips/include/asm/mach-au1x00/au1xxx_ide.h' | 47 | a) 'arch/mips/include/asm/mach-au1x00/au1xxx_ide.h' |
| 48 | containes : struct _auide_hwif | 48 | contains : struct _auide_hwif |
| 49 | timing parameters for PIO mode 0/1/2/3/4 | 49 | timing parameters for PIO mode 0/1/2/3/4 |
| 50 | timing parameters for MWDMA 0/1/2 | 50 | timing parameters for MWDMA 0/1/2 |
| 51 | 51 | ||
diff --git a/Documentation/misc-devices/ics932s401 b/Documentation/misc-devices/ics932s401 index 07a739f406d8..bdac67ff6e3f 100644 --- a/Documentation/misc-devices/ics932s401 +++ b/Documentation/misc-devices/ics932s401 | |||
| @@ -5,7 +5,7 @@ Supported chips: | |||
| 5 | * IDT ICS932S401 | 5 | * IDT ICS932S401 |
| 6 | Prefix: 'ics932s401' | 6 | Prefix: 'ics932s401' |
| 7 | Addresses scanned: I2C 0x69 | 7 | Addresses scanned: I2C 0x69 |
| 8 | Datasheet: Publically available at the IDT website | 8 | Datasheet: Publicly available at the IDT website |
| 9 | 9 | ||
| 10 | Author: Darrick J. Wong | 10 | Author: Darrick J. Wong |
| 11 | 11 | ||
diff --git a/Documentation/networking/3c359.txt b/Documentation/networking/3c359.txt index 4af8071a6d18..dadfe8147ab8 100644 --- a/Documentation/networking/3c359.txt +++ b/Documentation/networking/3c359.txt | |||
| @@ -45,7 +45,7 @@ debugging messages on, that must be done by modified the source code. | |||
| 45 | 45 | ||
| 46 | Variable MTU size: | 46 | Variable MTU size: |
| 47 | 47 | ||
| 48 | The driver can handle a MTU size upto either 4500 or 18000 depending upon | 48 | The driver can handle a MTU size up to either 4500 or 18000 depending upon |
| 49 | ring speed. The driver also changes the size of the receive buffers as part | 49 | ring speed. The driver also changes the size of the receive buffers as part |
| 50 | of the mtu re-sizing, so if you set mtu = 18000, you will need to be able | 50 | of the mtu re-sizing, so if you set mtu = 18000, you will need to be able |
| 51 | to allocate 16 * (sk_buff with 18000 buffer size) call it 18500 bytes per ring | 51 | to allocate 16 * (sk_buff with 18000 buffer size) call it 18500 bytes per ring |
diff --git a/Documentation/networking/README.ipw2200 b/Documentation/networking/README.ipw2200 index 616a8e540b0b..b7658bed4906 100644 --- a/Documentation/networking/README.ipw2200 +++ b/Documentation/networking/README.ipw2200 | |||
| @@ -256,7 +256,7 @@ You can set the debug level via: | |||
| 256 | 256 | ||
| 257 | Where $VALUE would be a number in the case of this sysfs entry. The | 257 | Where $VALUE would be a number in the case of this sysfs entry. The |
| 258 | input to sysfs files does not have to be a number. For example, the | 258 | input to sysfs files does not have to be a number. For example, the |
| 259 | firmware loader used by hotplug utilizes sysfs entries for transfering | 259 | firmware loader used by hotplug utilizes sysfs entries for transferring |
| 260 | the firmware image from user space into the driver. | 260 | the firmware image from user space into the driver. |
| 261 | 261 | ||
| 262 | The Intel(R) PRO/Wireless 2915ABG Driver for Linux exposes sysfs entries | 262 | The Intel(R) PRO/Wireless 2915ABG Driver for Linux exposes sysfs entries |
diff --git a/Documentation/networking/batman-adv.txt b/Documentation/networking/batman-adv.txt index 18afcd8afd51..ee496eb2f4a6 100644 --- a/Documentation/networking/batman-adv.txt +++ b/Documentation/networking/batman-adv.txt | |||
| @@ -72,7 +72,7 @@ folder: | |||
| 72 | # fragmentation gw_sel_class vis_mode | 72 | # fragmentation gw_sel_class vis_mode |
| 73 | 73 | ||
| 74 | 74 | ||
| 75 | There is a special folder for debugging informations: | 75 | There is a special folder for debugging information: |
| 76 | 76 | ||
| 77 | # ls /sys/kernel/debug/batman_adv/bat0/ | 77 | # ls /sys/kernel/debug/batman_adv/bat0/ |
| 78 | # gateways socket transtable_global vis_data | 78 | # gateways socket transtable_global vis_data |
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt index b36e741e94db..e27202bb8d75 100644 --- a/Documentation/networking/bonding.txt +++ b/Documentation/networking/bonding.txt | |||
| @@ -368,7 +368,7 @@ fail_over_mac | |||
| 368 | gratuitous ARP is lost, communication may be | 368 | gratuitous ARP is lost, communication may be |
| 369 | disrupted. | 369 | disrupted. |
| 370 | 370 | ||
| 371 | When this policy is used in conjuction with the mii | 371 | When this policy is used in conjunction with the mii |
| 372 | monitor, devices which assert link up prior to being | 372 | monitor, devices which assert link up prior to being |
| 373 | able to actually transmit and receive are particularly | 373 | able to actually transmit and receive are particularly |
| 374 | susceptible to loss of the gratuitous ARP, and an | 374 | susceptible to loss of the gratuitous ARP, and an |
diff --git a/Documentation/networking/caif/Linux-CAIF.txt b/Documentation/networking/caif/Linux-CAIF.txt index 7fe7a9a33a4f..e52fd62bef3a 100644 --- a/Documentation/networking/caif/Linux-CAIF.txt +++ b/Documentation/networking/caif/Linux-CAIF.txt | |||
| @@ -136,7 +136,7 @@ The CAIF Protocol implementation contains: | |||
| 136 | - CFMUX CAIF Mux layer. Handles multiplexing between multiple | 136 | - CFMUX CAIF Mux layer. Handles multiplexing between multiple |
| 137 | physical bearers and multiple channels such as VEI, Datagram, etc. | 137 | physical bearers and multiple channels such as VEI, Datagram, etc. |
| 138 | The MUX keeps track of the existing CAIF Channels and | 138 | The MUX keeps track of the existing CAIF Channels and |
| 139 | Physical Instances and selects the apropriate instance based | 139 | Physical Instances and selects the appropriate instance based |
| 140 | on Channel-Id and Physical-ID. | 140 | on Channel-Id and Physical-ID. |
| 141 | 141 | ||
| 142 | - CFFRML CAIF Framing layer. Handles Framing i.e. Frame length | 142 | - CFFRML CAIF Framing layer. Handles Framing i.e. Frame length |
diff --git a/Documentation/networking/caif/spi_porting.txt b/Documentation/networking/caif/spi_porting.txt index 0cb8cb9098f4..9efd0687dc4c 100644 --- a/Documentation/networking/caif/spi_porting.txt +++ b/Documentation/networking/caif/spi_porting.txt | |||
| @@ -150,7 +150,7 @@ static int sspi_init_xfer(struct cfspi_xfer *xfer, struct cfspi_dev *dev) | |||
| 150 | void sspi_sig_xfer(bool xfer, struct cfspi_dev *dev) | 150 | void sspi_sig_xfer(bool xfer, struct cfspi_dev *dev) |
| 151 | { | 151 | { |
| 152 | /* If xfer is true then you should assert the SPI_INT to indicate to | 152 | /* If xfer is true then you should assert the SPI_INT to indicate to |
| 153 | * the master that you are ready to recieve the data from the master | 153 | * the master that you are ready to receive the data from the master |
| 154 | * SPI. If xfer is false then you should de-assert SPI_INT to indicate | 154 | * SPI. If xfer is false then you should de-assert SPI_INT to indicate |
| 155 | * that the transfer is done. | 155 | * that the transfer is done. |
| 156 | */ | 156 | */ |
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt index 5b04b67ddca2..56ca3b75376e 100644 --- a/Documentation/networking/can.txt +++ b/Documentation/networking/can.txt | |||
| @@ -240,7 +240,7 @@ solution for a couple of reasons: | |||
| 240 | the user application using the common CAN filter mechanisms. Inside | 240 | the user application using the common CAN filter mechanisms. Inside |
| 241 | this filter definition the (interested) type of errors may be | 241 | this filter definition the (interested) type of errors may be |
| 242 | selected. The reception of error frames is disabled by default. | 242 | selected. The reception of error frames is disabled by default. |
| 243 | The format of the CAN error frame is briefly decribed in the Linux | 243 | The format of the CAN error frame is briefly described in the Linux |
| 244 | header file "include/linux/can/error.h". | 244 | header file "include/linux/can/error.h". |
| 245 | 245 | ||
| 246 | 4. How to use Socket CAN | 246 | 4. How to use Socket CAN |
diff --git a/Documentation/networking/ieee802154.txt b/Documentation/networking/ieee802154.txt index 23c995e64032..f41ea2405220 100644 --- a/Documentation/networking/ieee802154.txt +++ b/Documentation/networking/ieee802154.txt | |||
| @@ -9,7 +9,7 @@ The Linux-ZigBee project goal is to provide complete implementation | |||
| 9 | of IEEE 802.15.4 / ZigBee / 6LoWPAN protocols. IEEE 802.15.4 is a stack | 9 | of IEEE 802.15.4 / ZigBee / 6LoWPAN protocols. IEEE 802.15.4 is a stack |
| 10 | of protocols for organizing Low-Rate Wireless Personal Area Networks. | 10 | of protocols for organizing Low-Rate Wireless Personal Area Networks. |
| 11 | 11 | ||
| 12 | Currently only IEEE 802.15.4 layer is implemented. We have choosen | 12 | Currently only IEEE 802.15.4 layer is implemented. We have chosen |
| 13 | to use plain Berkeley socket API, the generic Linux networking stack | 13 | to use plain Berkeley socket API, the generic Linux networking stack |
| 14 | to transfer IEEE 802.15.4 messages and a special protocol over genetlink | 14 | to transfer IEEE 802.15.4 messages and a special protocol over genetlink |
| 15 | for configuration/management | 15 | for configuration/management |
diff --git a/Documentation/networking/olympic.txt b/Documentation/networking/olympic.txt index c65a94010ea8..b95b5bf96751 100644 --- a/Documentation/networking/olympic.txt +++ b/Documentation/networking/olympic.txt | |||
| @@ -65,7 +65,7 @@ together. | |||
| 65 | 65 | ||
| 66 | Variable MTU size: | 66 | Variable MTU size: |
| 67 | 67 | ||
| 68 | The driver can handle a MTU size upto either 4500 or 18000 depending upon | 68 | The driver can handle a MTU size up to either 4500 or 18000 depending upon |
| 69 | ring speed. The driver also changes the size of the receive buffers as part | 69 | ring speed. The driver also changes the size of the receive buffers as part |
| 70 | of the mtu re-sizing, so if you set mtu = 18000, you will need to be able | 70 | of the mtu re-sizing, so if you set mtu = 18000, you will need to be able |
| 71 | to allocate 16 * (sk_buff with 18000 buffer size) call it 18500 bytes per ring | 71 | to allocate 16 * (sk_buff with 18000 buffer size) call it 18500 bytes per ring |
diff --git a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt index 073894d1c093..4acea6603720 100644 --- a/Documentation/networking/packet_mmap.txt +++ b/Documentation/networking/packet_mmap.txt | |||
| @@ -223,7 +223,7 @@ we will get the following buffer structure: | |||
| 223 | 223 | ||
| 224 | A frame can be of any size with the only condition it can fit in a block. A block | 224 | A frame can be of any size with the only condition it can fit in a block. A block |
| 225 | can only hold an integer number of frames, or in other words, a frame cannot | 225 | can only hold an integer number of frames, or in other words, a frame cannot |
| 226 | be spawned accross two blocks, so there are some details you have to take into | 226 | be spawned across two blocks, so there are some details you have to take into |
| 227 | account when choosing the frame_size. See "Mapping and use of the circular | 227 | account when choosing the frame_size. See "Mapping and use of the circular |
| 228 | buffer (ring)". | 228 | buffer (ring)". |
| 229 | 229 | ||
diff --git a/Documentation/networking/s2io.txt b/Documentation/networking/s2io.txt index 9d4e0f4df5a8..4be0c039edbc 100644 --- a/Documentation/networking/s2io.txt +++ b/Documentation/networking/s2io.txt | |||
| @@ -37,7 +37,7 @@ To associate an interface with a physical adapter use "ethtool -p <ethX>". | |||
| 37 | The corresponding adapter's LED will blink multiple times. | 37 | The corresponding adapter's LED will blink multiple times. |
| 38 | 38 | ||
| 39 | 3. Features supported: | 39 | 3. Features supported: |
| 40 | a. Jumbo frames. Xframe I/II supports MTU upto 9600 bytes, | 40 | a. Jumbo frames. Xframe I/II supports MTU up to 9600 bytes, |
| 41 | modifiable using ifconfig command. | 41 | modifiable using ifconfig command. |
| 42 | 42 | ||
| 43 | b. Offloads. Supports checksum offload(TCP/UDP/IP) on transmit | 43 | b. Offloads. Supports checksum offload(TCP/UDP/IP) on transmit |
| @@ -49,7 +49,7 @@ significant performance improvement on certain platforms(SGI Altix, | |||
| 49 | IBM xSeries). | 49 | IBM xSeries). |
| 50 | 50 | ||
| 51 | d. MSI/MSI-X. Can be enabled on platforms which support this feature | 51 | d. MSI/MSI-X. Can be enabled on platforms which support this feature |
| 52 | (IA64, Xeon) resulting in noticeable performance improvement(upto 7% | 52 | (IA64, Xeon) resulting in noticeable performance improvement(up to 7% |
| 53 | on certain platforms). | 53 | on certain platforms). |
| 54 | 54 | ||
| 55 | e. Statistics. Comprehensive MAC-level and software statistics displayed | 55 | e. Statistics. Comprehensive MAC-level and software statistics displayed |
diff --git a/Documentation/networking/tc-actions-env-rules.txt b/Documentation/networking/tc-actions-env-rules.txt index dcadf6f88e34..70d6cf608251 100644 --- a/Documentation/networking/tc-actions-env-rules.txt +++ b/Documentation/networking/tc-actions-env-rules.txt | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | 1 | ||
| 2 | The "enviromental" rules for authors of any new tc actions are: | 2 | The "environmental" rules for authors of any new tc actions are: |
| 3 | 3 | ||
| 4 | 1) If you stealeth or borroweth any packet thou shalt be branching | 4 | 1) If you stealeth or borroweth any packet thou shalt be branching |
| 5 | from the righteous path and thou shalt cloneth. | 5 | from the righteous path and thou shalt cloneth. |
| @@ -20,7 +20,7 @@ this way any action downstream can stomp on the packet. | |||
| 20 | 3) Dropping packets you don't own is a no-no. You simply return | 20 | 3) Dropping packets you don't own is a no-no. You simply return |
| 21 | TC_ACT_SHOT to the caller and they will drop it. | 21 | TC_ACT_SHOT to the caller and they will drop it. |
| 22 | 22 | ||
| 23 | The "enviromental" rules for callers of actions (qdiscs etc) are: | 23 | The "environmental" rules for callers of actions (qdiscs etc) are: |
| 24 | 24 | ||
| 25 | *) Thou art responsible for freeing anything returned as being | 25 | *) Thou art responsible for freeing anything returned as being |
| 26 | TC_ACT_SHOT/STOLEN/QUEUED. If none of TC_ACT_SHOT/STOLEN/QUEUED is | 26 | TC_ACT_SHOT/STOLEN/QUEUED. If none of TC_ACT_SHOT/STOLEN/QUEUED is |
diff --git a/Documentation/power/devices.txt b/Documentation/power/devices.txt index f023ba6bba62..1971bcf48a60 100644 --- a/Documentation/power/devices.txt +++ b/Documentation/power/devices.txt | |||
| @@ -367,7 +367,7 @@ Drivers need to be able to handle hardware which has been reset since the | |||
| 367 | suspend methods were called, for example by complete reinitialization. | 367 | suspend methods were called, for example by complete reinitialization. |
| 368 | This may be the hardest part, and the one most protected by NDA'd documents | 368 | This may be the hardest part, and the one most protected by NDA'd documents |
| 369 | and chip errata. It's simplest if the hardware state hasn't changed since | 369 | and chip errata. It's simplest if the hardware state hasn't changed since |
| 370 | the suspend was carried out, but that can't be guaranteed (in fact, it ususally | 370 | the suspend was carried out, but that can't be guaranteed (in fact, it usually |
| 371 | is not the case). | 371 | is not the case). |
| 372 | 372 | ||
| 373 | Drivers must also be prepared to notice that the device has been removed | 373 | Drivers must also be prepared to notice that the device has been removed |
diff --git a/Documentation/power/notifiers.txt b/Documentation/power/notifiers.txt index ae1b7ec07684..cf980709122a 100644 --- a/Documentation/power/notifiers.txt +++ b/Documentation/power/notifiers.txt | |||
| @@ -24,7 +24,7 @@ PM_HIBERNATION_PREPARE The system is going to hibernate or suspend, tasks will | |||
| 24 | be frozen immediately. | 24 | be frozen immediately. |
| 25 | 25 | ||
| 26 | PM_POST_HIBERNATION The system memory state has been restored from a | 26 | PM_POST_HIBERNATION The system memory state has been restored from a |
| 27 | hibernation image or an error occured during the | 27 | hibernation image or an error occurred during the |
| 28 | hibernation. Device drivers' .resume() callbacks have | 28 | hibernation. Device drivers' .resume() callbacks have |
| 29 | been executed and tasks have been thawed. | 29 | been executed and tasks have been thawed. |
| 30 | 30 | ||
| @@ -38,7 +38,7 @@ PM_POST_RESTORE An error occurred during the hibernation restore. | |||
| 38 | 38 | ||
| 39 | PM_SUSPEND_PREPARE The system is preparing for a suspend. | 39 | PM_SUSPEND_PREPARE The system is preparing for a suspend. |
| 40 | 40 | ||
| 41 | PM_POST_SUSPEND The system has just resumed or an error occured during | 41 | PM_POST_SUSPEND The system has just resumed or an error occurred during |
| 42 | the suspend. Device drivers' .resume() callbacks have | 42 | the suspend. Device drivers' .resume() callbacks have |
| 43 | been executed and tasks have been thawed. | 43 | been executed and tasks have been thawed. |
| 44 | 44 | ||
diff --git a/Documentation/power/opp.txt b/Documentation/power/opp.txt index cd445582d1f8..5ae70a12c1e2 100644 --- a/Documentation/power/opp.txt +++ b/Documentation/power/opp.txt | |||
| @@ -178,7 +178,7 @@ opp_find_freq_ceil - Search for an available OPP which is *at least* the | |||
| 178 | if (!IS_ERR(opp)) | 178 | if (!IS_ERR(opp)) |
| 179 | soc_switch_to_freq_voltage(freq); | 179 | soc_switch_to_freq_voltage(freq); |
| 180 | else | 180 | else |
| 181 | /* do something when we cant satisfy the req */ | 181 | /* do something when we can't satisfy the req */ |
| 182 | /* do other stuff */ | 182 | /* do other stuff */ |
| 183 | } | 183 | } |
| 184 | 184 | ||
diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt index ea718891a665..ac190cf1963e 100644 --- a/Documentation/power/swsusp.txt +++ b/Documentation/power/swsusp.txt | |||
| @@ -192,7 +192,7 @@ Q: There don't seem to be any generally useful behavioral | |||
| 192 | distinctions between SUSPEND and FREEZE. | 192 | distinctions between SUSPEND and FREEZE. |
| 193 | 193 | ||
| 194 | A: Doing SUSPEND when you are asked to do FREEZE is always correct, | 194 | A: Doing SUSPEND when you are asked to do FREEZE is always correct, |
| 195 | but it may be unneccessarily slow. If you want your driver to stay simple, | 195 | but it may be unnecessarily slow. If you want your driver to stay simple, |
| 196 | slowness may not matter to you. It can always be fixed later. | 196 | slowness may not matter to you. It can always be fixed later. |
| 197 | 197 | ||
| 198 | For devices like disk it does matter, you do not want to spindown for | 198 | For devices like disk it does matter, you do not want to spindown for |
| @@ -237,7 +237,7 @@ disk. Whole sequence goes like | |||
| 237 | 237 | ||
| 238 | running system, user asks for suspend-to-disk | 238 | running system, user asks for suspend-to-disk |
| 239 | 239 | ||
| 240 | user processes are stopped (in common case there are none, but with resume-from-initrd, noone knows) | 240 | user processes are stopped (in common case there are none, but with resume-from-initrd, no one knows) |
| 241 | 241 | ||
| 242 | read image from disk | 242 | read image from disk |
| 243 | 243 | ||
diff --git a/Documentation/power/userland-swsusp.txt b/Documentation/power/userland-swsusp.txt index 81680f9f5909..1101bee4e822 100644 --- a/Documentation/power/userland-swsusp.txt +++ b/Documentation/power/userland-swsusp.txt | |||
| @@ -98,7 +98,7 @@ SNAPSHOT_S2RAM - suspend to RAM; using this call causes the kernel to | |||
| 98 | The device's read() operation can be used to transfer the snapshot image from | 98 | The device's read() operation can be used to transfer the snapshot image from |
| 99 | the kernel. It has the following limitations: | 99 | the kernel. It has the following limitations: |
| 100 | - you cannot read() more than one virtual memory page at a time | 100 | - you cannot read() more than one virtual memory page at a time |
| 101 | - read()s accross page boundaries are impossible (ie. if ypu read() 1/2 of | 101 | - read()s across page boundaries are impossible (ie. if ypu read() 1/2 of |
| 102 | a page in the previous call, you will only be able to read() | 102 | a page in the previous call, you will only be able to read() |
| 103 | _at_ _most_ 1/2 of the page in the next call) | 103 | _at_ _most_ 1/2 of the page in the next call) |
| 104 | 104 | ||
| @@ -137,7 +137,7 @@ mechanism and the userland utilities using the interface SHOULD use additional | |||
| 137 | means, such as checksums, to ensure the integrity of the snapshot image. | 137 | means, such as checksums, to ensure the integrity of the snapshot image. |
| 138 | 138 | ||
| 139 | The suspending and resuming utilities MUST lock themselves in memory, | 139 | The suspending and resuming utilities MUST lock themselves in memory, |
| 140 | preferrably using mlockall(), before calling SNAPSHOT_FREEZE. | 140 | preferably using mlockall(), before calling SNAPSHOT_FREEZE. |
| 141 | 141 | ||
| 142 | The suspending utility MUST check the value stored by SNAPSHOT_CREATE_IMAGE | 142 | The suspending utility MUST check the value stored by SNAPSHOT_CREATE_IMAGE |
| 143 | in the memory location pointed to by the last argument of ioctl() and proceed | 143 | in the memory location pointed to by the last argument of ioctl() and proceed |
| @@ -147,7 +147,7 @@ in accordance with it: | |||
| 147 | (a) The suspending utility MUST NOT close the snapshot device | 147 | (a) The suspending utility MUST NOT close the snapshot device |
| 148 | _unless_ the whole suspend procedure is to be cancelled, in | 148 | _unless_ the whole suspend procedure is to be cancelled, in |
| 149 | which case, if the snapshot image has already been saved, the | 149 | which case, if the snapshot image has already been saved, the |
| 150 | suspending utility SHOULD destroy it, preferrably by zapping | 150 | suspending utility SHOULD destroy it, preferably by zapping |
| 151 | its header. If the suspend is not to be cancelled, the | 151 | its header. If the suspend is not to be cancelled, the |
| 152 | system MUST be powered off or rebooted after the snapshot | 152 | system MUST be powered off or rebooted after the snapshot |
| 153 | image has been saved. | 153 | image has been saved. |
diff --git a/Documentation/powerpc/hvcs.txt b/Documentation/powerpc/hvcs.txt index 6d8be3468d7d..a730ca5a07f8 100644 --- a/Documentation/powerpc/hvcs.txt +++ b/Documentation/powerpc/hvcs.txt | |||
| @@ -528,7 +528,7 @@ this driver assignment of hotplug added vty-servers may be in a different | |||
| 528 | order than how they would be exposed on module load. Rebooting or | 528 | order than how they would be exposed on module load. Rebooting or |
| 529 | reloading the module after dynamic addition may result in the /dev/hvcs* | 529 | reloading the module after dynamic addition may result in the /dev/hvcs* |
| 530 | and vty-server coupling changing if a vty-server adapter was added in a | 530 | and vty-server coupling changing if a vty-server adapter was added in a |
| 531 | slot inbetween two other vty-server adapters. Refer to the section above | 531 | slot between two other vty-server adapters. Refer to the section above |
| 532 | on how to determine which vty-server goes with which /dev/hvcs* node. | 532 | on how to determine which vty-server goes with which /dev/hvcs* node. |
| 533 | Hint; look at the sysfs "index" attribute for the vty-server. | 533 | Hint; look at the sysfs "index" attribute for the vty-server. |
| 534 | 534 | ||
diff --git a/Documentation/s390/Debugging390.txt b/Documentation/s390/Debugging390.txt index 86f9f74b2b34..efe998becc5b 100644 --- a/Documentation/s390/Debugging390.txt +++ b/Documentation/s390/Debugging390.txt | |||
| @@ -2273,7 +2273,7 @@ IP forwarding is on. | |||
| 2273 | There is a lot of useful info in here best found by going in & having a look around, | 2273 | There is a lot of useful info in here best found by going in & having a look around, |
| 2274 | so I'll take you through some entries I consider important. | 2274 | so I'll take you through some entries I consider important. |
| 2275 | 2275 | ||
| 2276 | All the processes running on the machine have there own entry defined by | 2276 | All the processes running on the machine have their own entry defined by |
| 2277 | /proc/<pid> | 2277 | /proc/<pid> |
| 2278 | So lets have a look at the init process | 2278 | So lets have a look at the init process |
| 2279 | cd /proc/1 | 2279 | cd /proc/1 |
diff --git a/Documentation/scheduler/sched-domains.txt b/Documentation/scheduler/sched-domains.txt index 373ceacc367e..b7ee379b651b 100644 --- a/Documentation/scheduler/sched-domains.txt +++ b/Documentation/scheduler/sched-domains.txt | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | Each CPU has a "base" scheduling domain (struct sched_domain). These are | 1 | Each CPU has a "base" scheduling domain (struct sched_domain). The domain |
| 2 | accessed via cpu_sched_domain(i) and this_sched_domain() macros. The domain | ||
| 3 | hierarchy is built from these base domains via the ->parent pointer. ->parent | 2 | hierarchy is built from these base domains via the ->parent pointer. ->parent |
| 4 | MUST be NULL terminated, and domain structures should be per-CPU as they | 3 | MUST be NULL terminated, and domain structures should be per-CPU as they are |
| 5 | are locklessly updated. | 4 | locklessly updated. |
| 6 | 5 | ||
| 7 | Each scheduling domain spans a number of CPUs (stored in the ->span field). | 6 | Each scheduling domain spans a number of CPUs (stored in the ->span field). |
| 8 | A domain's span MUST be a superset of it child's span (this restriction could | 7 | A domain's span MUST be a superset of it child's span (this restriction could |
| @@ -26,11 +25,26 @@ is treated as one entity. The load of a group is defined as the sum of the | |||
| 26 | load of each of its member CPUs, and only when the load of a group becomes | 25 | load of each of its member CPUs, and only when the load of a group becomes |
| 27 | out of balance are tasks moved between groups. | 26 | out of balance are tasks moved between groups. |
| 28 | 27 | ||
| 29 | In kernel/sched.c, rebalance_tick is run periodically on each CPU. This | 28 | In kernel/sched.c, trigger_load_balance() is run periodically on each CPU |
| 30 | function takes its CPU's base sched domain and checks to see if has reached | 29 | through scheduler_tick(). It raises a softirq after the next regularly scheduled |
| 31 | its rebalance interval. If so, then it will run load_balance on that domain. | 30 | rebalancing event for the current runqueue has arrived. The actual load |
| 32 | rebalance_tick then checks the parent sched_domain (if it exists), and the | 31 | balancing workhorse, run_rebalance_domains()->rebalance_domains(), is then run |
| 33 | parent of the parent and so forth. | 32 | in softirq context (SCHED_SOFTIRQ). |
| 33 | |||
| 34 | The latter function takes two arguments: the current CPU and whether it was idle | ||
| 35 | at the time the scheduler_tick() happened and iterates over all sched domains | ||
| 36 | our CPU is on, starting from its base domain and going up the ->parent chain. | ||
| 37 | While doing that, it checks to see if the current domain has exhausted its | ||
| 38 | rebalance interval. If so, it runs load_balance() on that domain. It then checks | ||
| 39 | the parent sched_domain (if it exists), and the parent of the parent and so | ||
| 40 | forth. | ||
| 41 | |||
| 42 | Initially, load_balance() finds the busiest group in the current sched domain. | ||
| 43 | If it succeeds, it looks for the busiest runqueue of all the CPUs' runqueues in | ||
| 44 | that group. If it manages to find such a runqueue, it locks both our initial | ||
| 45 | CPU's runqueue and the newly found busiest one and starts moving tasks from it | ||
| 46 | to our runqueue. The exact number of tasks amounts to an imbalance previously | ||
| 47 | computed while iterating over this sched domain's groups. | ||
| 34 | 48 | ||
| 35 | *** Implementing sched domains *** | 49 | *** Implementing sched domains *** |
| 36 | The "base" domain will "span" the first level of the hierarchy. In the case | 50 | The "base" domain will "span" the first level of the hierarchy. In the case |
diff --git a/Documentation/scsi/ChangeLog.lpfc b/Documentation/scsi/ChangeLog.lpfc index 5e83769c6aa9..c56ec99d7b2f 100644 --- a/Documentation/scsi/ChangeLog.lpfc +++ b/Documentation/scsi/ChangeLog.lpfc | |||
| @@ -352,7 +352,7 @@ Changes from 20041229 to 20050110 | |||
| 352 | lpfc_scsiport.c | 352 | lpfc_scsiport.c |
| 353 | * In remote port changes: no longer nulling target->pnode when | 353 | * In remote port changes: no longer nulling target->pnode when |
| 354 | removing from mapped list. Pnode get nulled when the node is | 354 | removing from mapped list. Pnode get nulled when the node is |
| 355 | freed (after nodev tmo). This bug was causing i/o recieved in | 355 | freed (after nodev tmo). This bug was causing i/o received in |
| 356 | the small window while the device was blocked to be errored w/ | 356 | the small window while the device was blocked to be errored w/ |
| 357 | did_no_connect. With the fix, it returns host_busy | 357 | did_no_connect. With the fix, it returns host_busy |
| 358 | (per the pre-remote port changes). | 358 | (per the pre-remote port changes). |
| @@ -530,7 +530,7 @@ Changes from 20041018 to 20041123 | |||
| 530 | coherent mappings. Note: There are more consistent mappings | 530 | coherent mappings. Note: There are more consistent mappings |
| 531 | that are using pci_dma_sync calls. Probably these should be | 531 | that are using pci_dma_sync calls. Probably these should be |
| 532 | removed as well. | 532 | removed as well. |
| 533 | * Modified lpfc_free_scsi_buf to accomodate all three scsi_buf | 533 | * Modified lpfc_free_scsi_buf to accommodate all three scsi_buf |
| 534 | free types to alleviate miscellaneous panics with cable pull | 534 | free types to alleviate miscellaneous panics with cable pull |
| 535 | testing. | 535 | testing. |
| 536 | * Set hotplug to default 0 and lpfc_target_remove to not remove | 536 | * Set hotplug to default 0 and lpfc_target_remove to not remove |
| @@ -583,7 +583,7 @@ Changes from 20041018 to 20041123 | |||
| 583 | included more than once. | 583 | included more than once. |
| 584 | * Replaced "set_current_state(TASK_UNINTERRUPTIBLE); | 584 | * Replaced "set_current_state(TASK_UNINTERRUPTIBLE); |
| 585 | schedule_timeout(timeout)" with "msleep(timeout)". | 585 | schedule_timeout(timeout)" with "msleep(timeout)". |
| 586 | * Fixnode was loosing starget when rediscovered. We saw messages | 586 | * Fixnode was losing starget when rediscovered. We saw messages |
| 587 | like: lpfc 0000:04:02.0: 0:0263 Cannot block scsi target as a | 587 | like: lpfc 0000:04:02.0: 0:0263 Cannot block scsi target as a |
| 588 | result. Moved starget field into struct lpfc_target which is | 588 | result. Moved starget field into struct lpfc_target which is |
| 589 | referenced from the node. | 589 | referenced from the node. |
| @@ -604,7 +604,7 @@ Changes from 20041018 to 20041123 | |||
| 604 | * Make 3 functions static: lpfc_get_hba_sym_node_name, | 604 | * Make 3 functions static: lpfc_get_hba_sym_node_name, |
| 605 | lpfc_intr_prep and lpfc_setup_slim_access. Move lpfc_intr_prep | 605 | lpfc_intr_prep and lpfc_setup_slim_access. Move lpfc_intr_prep |
| 606 | and lpfc_setup_slim_access so they're defined before being used. | 606 | and lpfc_setup_slim_access so they're defined before being used. |
| 607 | * Remove an unecessary list_del() in lpfc_hbadisc.c. | 607 | * Remove an unnecessary list_del() in lpfc_hbadisc.c. |
| 608 | * Set nlp_state before calling lpfc_nlp_list() since this will | 608 | * Set nlp_state before calling lpfc_nlp_list() since this will |
| 609 | potentially call fc_target_unblock which may cause a race in | 609 | potentially call fc_target_unblock which may cause a race in |
| 610 | queuecommand by releasing host_lock. | 610 | queuecommand by releasing host_lock. |
| @@ -753,7 +753,7 @@ Changes from 20040908 to 20040920 | |||
| 753 | * Changed version number to 8.0.12 | 753 | * Changed version number to 8.0.12 |
| 754 | * Removed used #defines: DEFAULT_PCI_LATENCY_CLOCKS and | 754 | * Removed used #defines: DEFAULT_PCI_LATENCY_CLOCKS and |
| 755 | PCI_LATENCY_VALUE from lpfc_hw.h. | 755 | PCI_LATENCY_VALUE from lpfc_hw.h. |
| 756 | * Changes to accomodate rnid. | 756 | * Changes to accommodate rnid. |
| 757 | * Fix RSCN handling so RSCN NS queries only effect NPorts found in | 757 | * Fix RSCN handling so RSCN NS queries only effect NPorts found in |
| 758 | RSCN data. | 758 | RSCN data. |
| 759 | * If we rcv a plogi on a NPort queued up for discovery, clear the | 759 | * If we rcv a plogi on a NPort queued up for discovery, clear the |
| @@ -813,7 +813,7 @@ Changes from 20040908 to 20040920 | |||
| 813 | counter instead, brd_no isn't reused anymore. Also some tiny | 813 | counter instead, brd_no isn't reused anymore. Also some tiny |
| 814 | whitespace cleanups in surrounding code. | 814 | whitespace cleanups in surrounding code. |
| 815 | * Reorder functions in lpfc_els.c to remove need for prototypes. | 815 | * Reorder functions in lpfc_els.c to remove need for prototypes. |
| 816 | * Removed unsed prototypes from lpfc_crtn.h - | 816 | * Removed unused prototypes from lpfc_crtn.h - |
| 817 | lpfc_ip_timeout_handler, lpfc_read_pci and lpfc_revoke. | 817 | lpfc_ip_timeout_handler, lpfc_read_pci and lpfc_revoke. |
| 818 | * Removed some unused prototypes from lpfc_crtn.h - | 818 | * Removed some unused prototypes from lpfc_crtn.h - |
| 819 | lpfc_scsi_hba_reset, lpfc_scsi_issue_inqsn, | 819 | lpfc_scsi_hba_reset, lpfc_scsi_issue_inqsn, |
| @@ -863,7 +863,7 @@ Changes from 20040823 to 20040908 | |||
| 863 | * Minimal support for SCSI flat space addressing/volume set | 863 | * Minimal support for SCSI flat space addressing/volume set |
| 864 | addressing. Use 16 bits of LUN address so that flat | 864 | addressing. Use 16 bits of LUN address so that flat |
| 865 | addressing/VSA will work. | 865 | addressing/VSA will work. |
| 866 | * Changed 2 occurences of if( 1 != f(x)) to if(f(x) != 1) | 866 | * Changed 2 occurrences of if( 1 != f(x)) to if(f(x) != 1) |
| 867 | * Drop include of lpfc_cfgparm.h. | 867 | * Drop include of lpfc_cfgparm.h. |
| 868 | * Reduce stack usage of lpfc_fdmi_cmd in lpfc_ct.c. | 868 | * Reduce stack usage of lpfc_fdmi_cmd in lpfc_ct.c. |
| 869 | * Add minimum range checking property to /sys write/store | 869 | * Add minimum range checking property to /sys write/store |
| @@ -1449,7 +1449,7 @@ Changes from 20040402 to 20040409 | |||
| 1449 | * Removed lpfc_els_chk_latt from the lpfc_config_post function. | 1449 | * Removed lpfc_els_chk_latt from the lpfc_config_post function. |
| 1450 | lpfc_els_chk_latt will enable the link event interrupts when | 1450 | lpfc_els_chk_latt will enable the link event interrupts when |
| 1451 | flogi is pending which causes two discovery state machines | 1451 | flogi is pending which causes two discovery state machines |
| 1452 | running parallely. | 1452 | running parallelly. |
| 1453 | * Add pci_disable_device to unload path. | 1453 | * Add pci_disable_device to unload path. |
| 1454 | * Move lpfc_sleep_event from lpfc_fcp.c to lpfc_util_ioctl.c | 1454 | * Move lpfc_sleep_event from lpfc_fcp.c to lpfc_util_ioctl.c |
| 1455 | * Call dma_map_single() & pci_map_single() directly instead of via | 1455 | * Call dma_map_single() & pci_map_single() directly instead of via |
| @@ -1590,7 +1590,7 @@ Changes from 20040326 to 20040402 | |||
| 1590 | ELX_WRITE_HS ELX_WRITE_HA ELX_WRITE_CA ELX_READ_HC | 1590 | ELX_WRITE_HS ELX_WRITE_HA ELX_WRITE_CA ELX_READ_HC |
| 1591 | ELX_READ_HS ELX_READ_HA ELX_READ_CA ELX_READ_MB ELX_RESET | 1591 | ELX_READ_HS ELX_READ_HA ELX_READ_CA ELX_READ_MB ELX_RESET |
| 1592 | ELX_READ_HBA ELX_INSTANCE ELX_LIP. Also introduced | 1592 | ELX_READ_HBA ELX_INSTANCE ELX_LIP. Also introduced |
| 1593 | attribute "set" to be used in conjuction with the above | 1593 | attribute "set" to be used in conjunction with the above |
| 1594 | attributes. | 1594 | attributes. |
| 1595 | * Removed DLINK, enque and deque declarations now that clock | 1595 | * Removed DLINK, enque and deque declarations now that clock |
| 1596 | doesn't use them anymore | 1596 | doesn't use them anymore |
diff --git a/Documentation/scsi/ChangeLog.megaraid b/Documentation/scsi/ChangeLog.megaraid index 5e07d320817d..d2052fdbedd2 100644 --- a/Documentation/scsi/ChangeLog.megaraid +++ b/Documentation/scsi/ChangeLog.megaraid | |||
| @@ -168,7 +168,7 @@ Older Version : 2.20.4.6 (scsi module), 2.20.2.6 (cmm module) | |||
| 168 | 168 | ||
| 169 | 1. Sorted out PCI IDs to remove megaraid support overlaps. | 169 | 1. Sorted out PCI IDs to remove megaraid support overlaps. |
| 170 | Based on the patch from Daniel, sorted out PCI IDs along with | 170 | Based on the patch from Daniel, sorted out PCI IDs along with |
| 171 | charactor node name change from 'megadev' to 'megadev_legacy' to avoid | 171 | character node name change from 'megadev' to 'megadev_legacy' to avoid |
| 172 | conflict. | 172 | conflict. |
| 173 | --- | 173 | --- |
| 174 | Hopefully we'll be getting the build restriction zapped much sooner, | 174 | Hopefully we'll be getting the build restriction zapped much sooner, |
diff --git a/Documentation/scsi/ChangeLog.ncr53c8xx b/Documentation/scsi/ChangeLog.ncr53c8xx index 8b278c10edfd..9288e3d8974a 100644 --- a/Documentation/scsi/ChangeLog.ncr53c8xx +++ b/Documentation/scsi/ChangeLog.ncr53c8xx | |||
| @@ -200,7 +200,7 @@ Sun Feb 14:00 1999 Gerard Roudier (groudier@club-internet.fr) | |||
| 200 | By default the driver uses both IRQF_SHARED and IRQF_DISABLED. | 200 | By default the driver uses both IRQF_SHARED and IRQF_DISABLED. |
| 201 | Option 'ncr53c8xx=irqm:0x20' may be used when an IRQ is shared by | 201 | Option 'ncr53c8xx=irqm:0x20' may be used when an IRQ is shared by |
| 202 | a 53C8XX adapter and a network board. | 202 | a 53C8XX adapter and a network board. |
| 203 | - Tiny mispelling fixed (ABORT instead of ABRT). Was fortunately | 203 | - Tiny misspelling fixed (ABORT instead of ABRT). Was fortunately |
| 204 | harmless. | 204 | harmless. |
| 205 | - Negotiate SYNC data transfers with CCS devices. | 205 | - Negotiate SYNC data transfers with CCS devices. |
| 206 | 206 | ||
diff --git a/Documentation/scsi/ChangeLog.sym53c8xx b/Documentation/scsi/ChangeLog.sym53c8xx index 02ffbc1e8a84..c1933707d0bc 100644 --- a/Documentation/scsi/ChangeLog.sym53c8xx +++ b/Documentation/scsi/ChangeLog.sym53c8xx | |||
| @@ -457,7 +457,7 @@ Fri Jan 1 20:00 1999 Gerard Roudier (groudier@club-internet.fr) | |||
| 457 | Sat Dec 19 21:00 1998 Gerard Roudier (groudier@club-internet.fr) | 457 | Sat Dec 19 21:00 1998 Gerard Roudier (groudier@club-internet.fr) |
| 458 | * version sym53c8xx-1.0 | 458 | * version sym53c8xx-1.0 |
| 459 | - Define some new IO registers for the 896 (istat1, mbox0, mbox1) | 459 | - Define some new IO registers for the 896 (istat1, mbox0, mbox1) |
| 460 | - Revamp slighly the Symbios NVRAM lay-out based on the excerpt of | 460 | - Revamp slightly the Symbios NVRAM lay-out based on the excerpt of |
| 461 | the header file I received from Symbios. | 461 | the header file I received from Symbios. |
| 462 | - Check the PCI bus number for the boot order (Using a fast | 462 | - Check the PCI bus number for the boot order (Using a fast |
| 463 | PCI controller behing a PCI-PCI bridge seems sub-optimal). | 463 | PCI controller behing a PCI-PCI bridge seems sub-optimal). |
diff --git a/Documentation/scsi/aha152x.txt b/Documentation/scsi/aha152x.txt index 29ce6d87e451..94848734ac66 100644 --- a/Documentation/scsi/aha152x.txt +++ b/Documentation/scsi/aha152x.txt | |||
| @@ -124,7 +124,7 @@ in the partition table and therefore every operating system has to know | |||
| 124 | the right geometry to be able to interpret it. | 124 | the right geometry to be able to interpret it. |
| 125 | 125 | ||
| 126 | Moreover there are certain limitations to the C/H/S addressing scheme, | 126 | Moreover there are certain limitations to the C/H/S addressing scheme, |
| 127 | namely the address space is limited to upto 255 heads, upto 63 sectors | 127 | namely the address space is limited to up to 255 heads, up to 63 sectors |
| 128 | and a maximum of 1023 cylinders. | 128 | and a maximum of 1023 cylinders. |
| 129 | 129 | ||
| 130 | The AHA-1522 BIOS calculates the geometry by fixing the number of heads | 130 | The AHA-1522 BIOS calculates the geometry by fixing the number of heads |
diff --git a/Documentation/scsi/aic79xx.txt b/Documentation/scsi/aic79xx.txt index 16e054c9c70b..64ac7093c872 100644 --- a/Documentation/scsi/aic79xx.txt +++ b/Documentation/scsi/aic79xx.txt | |||
| @@ -267,7 +267,7 @@ The following information is available in this file: | |||
| 267 | Option: tag_info:{{value[,value...]}[,{value[,value...]}...]} | 267 | Option: tag_info:{{value[,value...]}[,{value[,value...]}...]} |
| 268 | Definition: Set the per-target tagged queue depth on a | 268 | Definition: Set the per-target tagged queue depth on a |
| 269 | per controller basis. Both controllers and targets | 269 | per controller basis. Both controllers and targets |
| 270 | may be ommitted indicating that they should retain | 270 | may be omitted indicating that they should retain |
| 271 | the default tag depth. | 271 | the default tag depth. |
| 272 | Examples: tag_info:{{16,32,32,64,8,8,,32,32,32,32,32,32,32,32,32} | 272 | Examples: tag_info:{{16,32,32,64,8,8,,32,32,32,32,32,32,32,32,32} |
| 273 | On Controller 0 | 273 | On Controller 0 |
| @@ -291,7 +291,7 @@ The following information is available in this file: | |||
| 291 | The rd_strm_bitmask is a 16 bit hex value in which | 291 | The rd_strm_bitmask is a 16 bit hex value in which |
| 292 | each bit represents a target. Setting the target's | 292 | each bit represents a target. Setting the target's |
| 293 | bit to '1' enables read streaming for that | 293 | bit to '1' enables read streaming for that |
| 294 | target. Controllers may be ommitted indicating that | 294 | target. Controllers may be omitted indicating that |
| 295 | they should retain the default read streaming setting. | 295 | they should retain the default read streaming setting. |
| 296 | Example: rd_strm:{0x0041} | 296 | Example: rd_strm:{0x0041} |
| 297 | On Controller 0 | 297 | On Controller 0 |
| @@ -313,7 +313,7 @@ The following information is available in this file: | |||
| 313 | ----------------------------------------------------------------- | 313 | ----------------------------------------------------------------- |
| 314 | Option: dv: {value[,value...]} | 314 | Option: dv: {value[,value...]} |
| 315 | Definition: Set Domain Validation Policy on a per-controller basis. | 315 | Definition: Set Domain Validation Policy on a per-controller basis. |
| 316 | Controllers may be ommitted indicating that | 316 | Controllers may be omitted indicating that |
| 317 | they should retain the default read streaming setting. | 317 | they should retain the default read streaming setting. |
| 318 | Example: dv:{-1,0,,1,1,0} | 318 | Example: dv:{-1,0,,1,1,0} |
| 319 | On Controller 0 leave DV at its default setting. | 319 | On Controller 0 leave DV at its default setting. |
| @@ -340,7 +340,7 @@ The following information is available in this file: | |||
| 340 | Option: precomp: {value[,value...]} | 340 | Option: precomp: {value[,value...]} |
| 341 | Definition: Set IO Cell precompensation value on a per-controller | 341 | Definition: Set IO Cell precompensation value on a per-controller |
| 342 | basis. | 342 | basis. |
| 343 | Controllers may be ommitted indicating that | 343 | Controllers may be omitted indicating that |
| 344 | they should retain the default precompensation setting. | 344 | they should retain the default precompensation setting. |
| 345 | Example: precomp:{0x1} | 345 | Example: precomp:{0x1} |
| 346 | On Controller 0 set precompensation to 1. | 346 | On Controller 0 set precompensation to 1. |
| @@ -353,7 +353,7 @@ The following information is available in this file: | |||
| 353 | ----------------------------------------------------------------- | 353 | ----------------------------------------------------------------- |
| 354 | Option: slewrate: {value[,value...]} | 354 | Option: slewrate: {value[,value...]} |
| 355 | Definition: Set IO Cell slew rate on a per-controller basis. | 355 | Definition: Set IO Cell slew rate on a per-controller basis. |
| 356 | Controllers may be ommitted indicating that | 356 | Controllers may be omitted indicating that |
| 357 | they should retain the default slew rate setting. | 357 | they should retain the default slew rate setting. |
| 358 | Example: slewrate:{0x1} | 358 | Example: slewrate:{0x1} |
| 359 | On Controller 0 set slew rate to 1. | 359 | On Controller 0 set slew rate to 1. |
| @@ -366,7 +366,7 @@ The following information is available in this file: | |||
| 366 | ----------------------------------------------------------------- | 366 | ----------------------------------------------------------------- |
| 367 | Option: amplitude: {value[,value...]} | 367 | Option: amplitude: {value[,value...]} |
| 368 | Definition: Set IO Cell signal amplitude on a per-controller basis. | 368 | Definition: Set IO Cell signal amplitude on a per-controller basis. |
| 369 | Controllers may be ommitted indicating that | 369 | Controllers may be omitted indicating that |
| 370 | they should retain the default read streaming setting. | 370 | they should retain the default read streaming setting. |
| 371 | Example: amplitude:{0x1} | 371 | Example: amplitude:{0x1} |
| 372 | On Controller 0 set amplitude to 1. | 372 | On Controller 0 set amplitude to 1. |
diff --git a/Documentation/scsi/ibmmca.txt b/Documentation/scsi/ibmmca.txt index 45d61ad8c6f7..ac41a9fcac77 100644 --- a/Documentation/scsi/ibmmca.txt +++ b/Documentation/scsi/ibmmca.txt | |||
| @@ -303,7 +303,7 @@ | |||
| 303 | (scb) and calls a local function issue_cmd(), which writes a scb | 303 | (scb) and calls a local function issue_cmd(), which writes a scb |
| 304 | command into subsystem I/O ports. Once the scb command is carried out, | 304 | command into subsystem I/O ports. Once the scb command is carried out, |
| 305 | the interrupt_handler() is invoked. If a device is determined to be | 305 | the interrupt_handler() is invoked. If a device is determined to be |
| 306 | existant and it has not assigned any ldn, it gets one dynamically. | 306 | existent and it has not assigned any ldn, it gets one dynamically. |
| 307 | For this, the whole stuff is done in ibmmca_queuecommand(). | 307 | For this, the whole stuff is done in ibmmca_queuecommand(). |
| 308 | 308 | ||
| 309 | 2.6 Abort & Reset Commands | 309 | 2.6 Abort & Reset Commands |
| @@ -741,7 +741,7 @@ | |||
| 741 | some error appeared, else it is undefined. Now, this is fixed. Before | 741 | some error appeared, else it is undefined. Now, this is fixed. Before |
| 742 | any SCB command gets queued, the tsb.dev_status is set to 0, so the | 742 | any SCB command gets queued, the tsb.dev_status is set to 0, so the |
| 743 | cmd->result won't screw up Linux higher level drivers. | 743 | cmd->result won't screw up Linux higher level drivers. |
| 744 | 2) The reset-function has slightly improved. This is still planed for | 744 | 2) The reset-function has slightly improved. This is still planned for |
| 745 | abort. During the abort and the reset function, no interrupts are | 745 | abort. During the abort and the reset function, no interrupts are |
| 746 | allowed. This is however quite hard to cope with, so the INT-status | 746 | allowed. This is however quite hard to cope with, so the INT-status |
| 747 | register is read. When the interrupt gets queued, one can find its | 747 | register is read. When the interrupt gets queued, one can find its |
diff --git a/Documentation/scsi/scsi-changer.txt b/Documentation/scsi/scsi-changer.txt index 032399b16a53..ade046ea7c17 100644 --- a/Documentation/scsi/scsi-changer.txt +++ b/Documentation/scsi/scsi-changer.txt | |||
| @@ -102,7 +102,7 @@ Trouble? | |||
| 102 | 102 | ||
| 103 | If you insmod the driver with "insmod debug=1", it will be verbose and | 103 | If you insmod the driver with "insmod debug=1", it will be verbose and |
| 104 | prints a lot of stuff to the syslog. Compiling the kernel with | 104 | prints a lot of stuff to the syslog. Compiling the kernel with |
| 105 | CONFIG_SCSI_CONSTANTS=y improves the quality of the error messages alot | 105 | CONFIG_SCSI_CONSTANTS=y improves the quality of the error messages a lot |
| 106 | because the kernel will translate the error codes into human-readable | 106 | because the kernel will translate the error codes into human-readable |
| 107 | strings then. | 107 | strings then. |
| 108 | 108 | ||
diff --git a/Documentation/scsi/scsi_eh.txt b/Documentation/scsi/scsi_eh.txt index 7acbebb17fa6..6ff16b620d84 100644 --- a/Documentation/scsi/scsi_eh.txt +++ b/Documentation/scsi/scsi_eh.txt | |||
| @@ -290,7 +290,7 @@ scmd->allowed. | |||
| 290 | SCSI transports/LLDDs automatically acquire sense data on | 290 | SCSI transports/LLDDs automatically acquire sense data on |
| 291 | command failures (autosense). Autosense is recommended for | 291 | command failures (autosense). Autosense is recommended for |
| 292 | performance reasons and as sense information could get out of | 292 | performance reasons and as sense information could get out of |
| 293 | sync inbetween occurrence of CHECK CONDITION and this action. | 293 | sync between occurrence of CHECK CONDITION and this action. |
| 294 | 294 | ||
| 295 | Note that if autosense is not supported, scmd->sense_buffer | 295 | Note that if autosense is not supported, scmd->sense_buffer |
| 296 | contains invalid sense data when error-completing the scmd | 296 | contains invalid sense data when error-completing the scmd |
diff --git a/Documentation/scsi/scsi_fc_transport.txt b/Documentation/scsi/scsi_fc_transport.txt index e00192de4d1c..f79282fc48d7 100644 --- a/Documentation/scsi/scsi_fc_transport.txt +++ b/Documentation/scsi/scsi_fc_transport.txt | |||
| @@ -291,7 +291,7 @@ Transport <-> LLDD Interfaces : | |||
| 291 | Vport support by LLDD: | 291 | Vport support by LLDD: |
| 292 | 292 | ||
| 293 | The LLDD indicates support for vports by supplying a vport_create() | 293 | The LLDD indicates support for vports by supplying a vport_create() |
| 294 | function in the transport template. The presense of this function will | 294 | function in the transport template. The presence of this function will |
| 295 | cause the creation of the new attributes on the fc_host. As part of | 295 | cause the creation of the new attributes on the fc_host. As part of |
| 296 | the physical port completing its initialization relative to the | 296 | the physical port completing its initialization relative to the |
| 297 | transport, it should set the max_npiv_vports attribute to indicate the | 297 | transport, it should set the max_npiv_vports attribute to indicate the |
diff --git a/Documentation/scsi/sym53c8xx_2.txt b/Documentation/scsi/sym53c8xx_2.txt index 6f63b7989679..6af8f7a7770f 100644 --- a/Documentation/scsi/sym53c8xx_2.txt +++ b/Documentation/scsi/sym53c8xx_2.txt | |||
| @@ -285,7 +285,7 @@ from the driver. | |||
| 285 | 285 | ||
| 286 | 7. Profiling information | 286 | 7. Profiling information |
| 287 | 287 | ||
| 288 | This driver does not provide profiling informations as did its predecessors. | 288 | This driver does not provide profiling information as did its predecessors. |
| 289 | This feature was not this useful and added complexity to the code. | 289 | This feature was not this useful and added complexity to the code. |
| 290 | As the driver code got more complex, I have decided to remove everything | 290 | As the driver code got more complex, I have decided to remove everything |
| 291 | that didn't seem actually useful. | 291 | that didn't seem actually useful. |
diff --git a/Documentation/serial/moxa-smartio b/Documentation/serial/moxa-smartio index d10443918684..5d2a33be0bd8 100644 --- a/Documentation/serial/moxa-smartio +++ b/Documentation/serial/moxa-smartio | |||
| @@ -473,7 +473,7 @@ Content | |||
| 473 | spd_normal Use 38.4kb when the application requests 38.4kb. | 473 | spd_normal Use 38.4kb when the application requests 38.4kb. |
| 474 | spd_cust Use the custom divisor to set the speed when the | 474 | spd_cust Use the custom divisor to set the speed when the |
| 475 | application requests 38.4kb. | 475 | application requests 38.4kb. |
| 476 | divisor This option set the custom divison. | 476 | divisor This option set the custom division. |
| 477 | baud_base This option set the base baud rate. | 477 | baud_base This option set the base baud rate. |
| 478 | 478 | ||
| 479 | ----------------------------------------------------------------------------- | 479 | ----------------------------------------------------------------------------- |
diff --git a/Documentation/serial/n_gsm.txt b/Documentation/serial/n_gsm.txt index 397f41a1f153..a5d91126a8f7 100644 --- a/Documentation/serial/n_gsm.txt +++ b/Documentation/serial/n_gsm.txt | |||
| @@ -34,7 +34,7 @@ Major parts of the initialization program : | |||
| 34 | /* configure the serial port : speed, flow control ... */ | 34 | /* configure the serial port : speed, flow control ... */ |
| 35 | 35 | ||
| 36 | /* send the AT commands to switch the modem to CMUX mode | 36 | /* send the AT commands to switch the modem to CMUX mode |
| 37 | and check that it's succesful (should return OK) */ | 37 | and check that it's successful (should return OK) */ |
| 38 | write(fd, "AT+CMUX=0\r", 10); | 38 | write(fd, "AT+CMUX=0\r", 10); |
| 39 | 39 | ||
| 40 | /* experience showed that some modems need some time before | 40 | /* experience showed that some modems need some time before |
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index 3c1eddd9fcc7..9822afb6313c 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
| @@ -322,7 +322,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
| 322 | "port" needs to match the BASE ADDRESS jumper on the card (0x220 or 0x240) | 322 | "port" needs to match the BASE ADDRESS jumper on the card (0x220 or 0x240) |
| 323 | or the value stored in the card's EEPROM for cards that have an EEPROM and | 323 | or the value stored in the card's EEPROM for cards that have an EEPROM and |
| 324 | their "CONFIG MODE" jumper set to "EEPROM SETTING". The other values can | 324 | their "CONFIG MODE" jumper set to "EEPROM SETTING". The other values can |
| 325 | be choosen freely from the options enumerated above. | 325 | be chosen freely from the options enumerated above. |
| 326 | 326 | ||
| 327 | If dma2 is specified and different from dma1, the card will operate in | 327 | If dma2 is specified and different from dma1, the card will operate in |
| 328 | full-duplex mode. When dma1=3, only dma2=0 is valid and the only way to | 328 | full-duplex mode. When dma1=3, only dma2=0 is valid and the only way to |
| @@ -356,7 +356,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
| 356 | "port" needs to match the BASE ADDRESS jumper on the card (0x220 or 0x240) | 356 | "port" needs to match the BASE ADDRESS jumper on the card (0x220 or 0x240) |
| 357 | or the value stored in the card's EEPROM for cards that have an EEPROM and | 357 | or the value stored in the card's EEPROM for cards that have an EEPROM and |
| 358 | their "CONFIG MODE" jumper set to "EEPROM SETTING". The other values can | 358 | their "CONFIG MODE" jumper set to "EEPROM SETTING". The other values can |
| 359 | be choosen freely from the options enumerated above. | 359 | be chosen freely from the options enumerated above. |
| 360 | 360 | ||
| 361 | If dma2 is specified and different from dma1, the card will operate in | 361 | If dma2 is specified and different from dma1, the card will operate in |
| 362 | full-duplex mode. When dma1=3, only dma2=0 is valid and the only way to | 362 | full-duplex mode. When dma1=3, only dma2=0 is valid and the only way to |
| @@ -2229,7 +2229,7 @@ Proc interfaces (/proc/asound) | |||
| 2229 | 2229 | ||
| 2230 | /proc/asound/card#/pcm#[cp]/oss | 2230 | /proc/asound/card#/pcm#[cp]/oss |
| 2231 | ------------------------------- | 2231 | ------------------------------- |
| 2232 | String "erase" - erase all additional informations about OSS applications | 2232 | String "erase" - erase all additional information about OSS applications |
| 2233 | String "<app_name> <fragments> <fragment_size> [<options>]" | 2233 | String "<app_name> <fragments> <fragment_size> [<options>]" |
| 2234 | 2234 | ||
| 2235 | <app_name> - name of application with (higher priority) or without path | 2235 | <app_name> - name of application with (higher priority) or without path |
diff --git a/Documentation/sound/oss/AudioExcelDSP16 b/Documentation/sound/oss/AudioExcelDSP16 index c0f08922993b..e0dc0641b480 100644 --- a/Documentation/sound/oss/AudioExcelDSP16 +++ b/Documentation/sound/oss/AudioExcelDSP16 | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | Driver | 1 | Driver |
| 2 | ------ | 2 | ------ |
| 3 | 3 | ||
| 4 | Informations about Audio Excel DSP 16 driver can be found in the source | 4 | Information about Audio Excel DSP 16 driver can be found in the source |
| 5 | file aedsp16.c | 5 | file aedsp16.c |
| 6 | Please, read the head of the source before using it. It contain useful | 6 | Please, read the head of the source before using it. It contain useful |
| 7 | informations. | 7 | information. |
| 8 | 8 | ||
| 9 | Configuration | 9 | Configuration |
| 10 | ------------- | 10 | ------------- |
| @@ -68,7 +68,7 @@ Sound cards supported | |||
| 68 | This driver supports the SC-6000 and SC-6600 based Gallant's sound card. | 68 | This driver supports the SC-6000 and SC-6600 based Gallant's sound card. |
| 69 | It don't support the Audio Excel DSP 16 III (try the SC-6600 code). | 69 | It don't support the Audio Excel DSP 16 III (try the SC-6600 code). |
| 70 | I'm working on the III version of the card: if someone have useful | 70 | I'm working on the III version of the card: if someone have useful |
| 71 | informations about it, please let me know. | 71 | information about it, please let me know. |
| 72 | For all the non-supported audio cards, you have to boot MS-DOS (or WIN95) | 72 | For all the non-supported audio cards, you have to boot MS-DOS (or WIN95) |
| 73 | activating the audio card with the MS-DOS device driver, then you have to | 73 | activating the audio card with the MS-DOS device driver, then you have to |
| 74 | <ctrl>-<alt>-<del> and boot Linux. | 74 | <ctrl>-<alt>-<del> and boot Linux. |
diff --git a/Documentation/sound/oss/README.OSS b/Documentation/sound/oss/README.OSS index c615debbf08d..4be259428a1c 100644 --- a/Documentation/sound/oss/README.OSS +++ b/Documentation/sound/oss/README.OSS | |||
| @@ -1352,7 +1352,7 @@ OSS-mixer. | |||
| 1352 | The PCM20 contains a radio tuner, which is also controlled by | 1352 | The PCM20 contains a radio tuner, which is also controlled by |
| 1353 | ACI. This radio tuner is supported by the ACI driver together with the | 1353 | ACI. This radio tuner is supported by the ACI driver together with the |
| 1354 | miropcm20.o module. Also the 7-band equalizer is integrated | 1354 | miropcm20.o module. Also the 7-band equalizer is integrated |
| 1355 | (limited by the OSS-design). Developement has started and maybe | 1355 | (limited by the OSS-design). Development has started and maybe |
| 1356 | finished for the RDS decoder on this card, too. You will be able to | 1356 | finished for the RDS decoder on this card, too. You will be able to |
| 1357 | read RadioText, the Programme Service name, Programme TYpe and | 1357 | read RadioText, the Programme Service name, Programme TYpe and |
| 1358 | others. Even the v4l radio module benefits from it with a refined | 1358 | others. Even the v4l radio module benefits from it with a refined |
diff --git a/Documentation/sound/oss/README.ymfsb b/Documentation/sound/oss/README.ymfsb index af8a7d3a4e8e..b6b77906b58d 100644 --- a/Documentation/sound/oss/README.ymfsb +++ b/Documentation/sound/oss/README.ymfsb | |||
| @@ -5,7 +5,7 @@ FIRST OF ALL | |||
| 5 | ============ | 5 | ============ |
| 6 | 6 | ||
| 7 | This code references YAMAHA's sample codes and data sheets. | 7 | This code references YAMAHA's sample codes and data sheets. |
| 8 | I respect and thank for all people they made open the informations | 8 | I respect and thank for all people they made open the information |
| 9 | about YMF7xx cards. | 9 | about YMF7xx cards. |
| 10 | 10 | ||
| 11 | And this codes heavily based on Jeff Garzik <jgarzik@pobox.com>'s | 11 | And this codes heavily based on Jeff Garzik <jgarzik@pobox.com>'s |
diff --git a/Documentation/spi/pxa2xx b/Documentation/spi/pxa2xx index 68a4fe3818a1..493dada57372 100644 --- a/Documentation/spi/pxa2xx +++ b/Documentation/spi/pxa2xx | |||
| @@ -143,7 +143,7 @@ configured to use SSPFRM instead. | |||
| 143 | NOTE: the SPI driver cannot control the chip select if SSPFRM is used, so the | 143 | NOTE: the SPI driver cannot control the chip select if SSPFRM is used, so the |
| 144 | chipselect is dropped after each spi_transfer. Most devices need chip select | 144 | chipselect is dropped after each spi_transfer. Most devices need chip select |
| 145 | asserted around the complete message. Use SSPFRM as a GPIO (through cs_control) | 145 | asserted around the complete message. Use SSPFRM as a GPIO (through cs_control) |
| 146 | to accomodate these chips. | 146 | to accommodate these chips. |
| 147 | 147 | ||
| 148 | 148 | ||
| 149 | NSSP SLAVE SAMPLE | 149 | NSSP SLAVE SAMPLE |
diff --git a/Documentation/spi/spi-lm70llp b/Documentation/spi/spi-lm70llp index 34a9cfd746bd..463f6d01fa15 100644 --- a/Documentation/spi/spi-lm70llp +++ b/Documentation/spi/spi-lm70llp | |||
| @@ -46,7 +46,7 @@ The hardware interfacing on the LM70 LLP eval board is as follows: | |||
| 46 | 46 | ||
| 47 | Note that since the LM70 uses a "3-wire" variant of SPI, the SI/SO pin | 47 | Note that since the LM70 uses a "3-wire" variant of SPI, the SI/SO pin |
| 48 | is connected to both pin D7 (as Master Out) and Select (as Master In) | 48 | is connected to both pin D7 (as Master Out) and Select (as Master In) |
| 49 | using an arrangment that lets either the parport or the LM70 pull the | 49 | using an arrangement that lets either the parport or the LM70 pull the |
| 50 | pin low. This can't be shared with true SPI devices, but other 3-wire | 50 | pin low. This can't be shared with true SPI devices, but other 3-wire |
| 51 | devices might share the same SI/SO pin. | 51 | devices might share the same SI/SO pin. |
| 52 | 52 | ||
diff --git a/Documentation/telephony/ixj.txt b/Documentation/telephony/ixj.txt index 4fb314d51702..db94fb6c5678 100644 --- a/Documentation/telephony/ixj.txt +++ b/Documentation/telephony/ixj.txt | |||
| @@ -51,7 +51,7 @@ be removed to protect the rights of others. | |||
| 51 | Specifically, very old Internet PhoneJACK cards have non-standard | 51 | Specifically, very old Internet PhoneJACK cards have non-standard |
| 52 | G.723.1 codecs (due to the early nature of the DSPs in those days). | 52 | G.723.1 codecs (due to the early nature of the DSPs in those days). |
| 53 | The auto-conversion code to bring those cards into compliance with | 53 | The auto-conversion code to bring those cards into compliance with |
| 54 | todays standards is available as a binary only module to those people | 54 | today's standards is available as a binary only module to those people |
| 55 | needing it. If you bought your card after 1997 or so, you are OK - | 55 | needing it. If you bought your card after 1997 or so, you are OK - |
| 56 | it's only the very old cards that are affected. | 56 | it's only the very old cards that are affected. |
| 57 | 57 | ||
diff --git a/Documentation/trace/ring-buffer-design.txt b/Documentation/trace/ring-buffer-design.txt index d299ff31df57..7d350b496585 100644 --- a/Documentation/trace/ring-buffer-design.txt +++ b/Documentation/trace/ring-buffer-design.txt | |||
| @@ -237,7 +237,7 @@ with the previous write. | |||
| 237 | |written | | 237 | |written | |
| 238 | +---------+ | 238 | +---------+ |
| 239 | |written | | 239 | |written | |
| 240 | +---------+ <--- next positon for write (current commit) | 240 | +---------+ <--- next position for write (current commit) |
| 241 | | empty | | 241 | | empty | |
| 242 | +---------+ | 242 | +---------+ |
| 243 | 243 | ||
diff --git a/Documentation/video4linux/README.pvrusb2 b/Documentation/video4linux/README.pvrusb2 index a747200fe67c..2137b589276b 100644 --- a/Documentation/video4linux/README.pvrusb2 +++ b/Documentation/video4linux/README.pvrusb2 | |||
| @@ -172,7 +172,7 @@ Source file list / functional overview: | |||
| 172 | to provide a streaming API usable by a read() system call style of | 172 | to provide a streaming API usable by a read() system call style of |
| 173 | I/O. Right now this is the only layer on top of pvrusb2-io.[ch], | 173 | I/O. Right now this is the only layer on top of pvrusb2-io.[ch], |
| 174 | however the underlying architecture here was intended to allow for | 174 | however the underlying architecture here was intended to allow for |
| 175 | other styles of I/O to be implemented with additonal modules, like | 175 | other styles of I/O to be implemented with additional modules, like |
| 176 | mmap()'ed buffers or something even more exotic. | 176 | mmap()'ed buffers or something even more exotic. |
| 177 | 177 | ||
| 178 | pvrusb2-main.c - This is the top level of the driver. Module level | 178 | pvrusb2-main.c - This is the top level of the driver. Module level |
diff --git a/Documentation/video4linux/bttv/Insmod-options b/Documentation/video4linux/bttv/Insmod-options index bbe3ed667d91..14c065fa23ef 100644 --- a/Documentation/video4linux/bttv/Insmod-options +++ b/Documentation/video4linux/bttv/Insmod-options | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | 1 | ||
| 2 | Note: "modinfo <module>" prints various informations about a kernel | 2 | Note: "modinfo <module>" prints various information about a kernel |
| 3 | module, among them a complete and up-to-date list of insmod options. | 3 | module, among them a complete and up-to-date list of insmod options. |
| 4 | This list tends to be outdated because it is updated manually ... | 4 | This list tends to be outdated because it is updated manually ... |
| 5 | 5 | ||
diff --git a/Documentation/video4linux/bttv/README b/Documentation/video4linux/bttv/README index 3a367cdb664e..7cbf4fb6cf31 100644 --- a/Documentation/video4linux/bttv/README +++ b/Documentation/video4linux/bttv/README | |||
| @@ -70,7 +70,7 @@ If you have trouble with some specific TV card, try to ask there | |||
| 70 | instead of mailing me directly. The chance that someone with the | 70 | instead of mailing me directly. The chance that someone with the |
| 71 | same card listens there is much higher... | 71 | same card listens there is much higher... |
| 72 | 72 | ||
| 73 | For problems with sound: There are alot of different systems used | 73 | For problems with sound: There are a lot of different systems used |
| 74 | for TV sound all over the world. And there are also different chips | 74 | for TV sound all over the world. And there are also different chips |
| 75 | which decode the audio signal. Reports about sound problems ("stereo | 75 | which decode the audio signal. Reports about sound problems ("stereo |
| 76 | does'nt work") are pretty useless unless you include some details | 76 | does'nt work") are pretty useless unless you include some details |
diff --git a/Documentation/video4linux/bttv/README.freeze b/Documentation/video4linux/bttv/README.freeze index 4259dccc8287..5eddfa076cfb 100644 --- a/Documentation/video4linux/bttv/README.freeze +++ b/Documentation/video4linux/bttv/README.freeze | |||
| @@ -33,7 +33,7 @@ state is stuck. | |||
| 33 | 33 | ||
| 34 | I've seen reports that bttv 0.7.x crashes whereas 0.8.x works rock solid | 34 | I've seen reports that bttv 0.7.x crashes whereas 0.8.x works rock solid |
| 35 | for some people. Thus probably a small buglet left somewhere in bttv | 35 | for some people. Thus probably a small buglet left somewhere in bttv |
| 36 | 0.7.x. I have no idea where exactly, it works stable for me and alot of | 36 | 0.7.x. I have no idea where exactly, it works stable for me and a lot of |
| 37 | other people. But in case you have problems with the 0.7.x versions you | 37 | other people. But in case you have problems with the 0.7.x versions you |
| 38 | can give 0.8.x a try ... | 38 | can give 0.8.x a try ... |
| 39 | 39 | ||
diff --git a/Documentation/video4linux/bttv/Sound-FAQ b/Documentation/video4linux/bttv/Sound-FAQ index 1e6328f91083..395f6c6fdd98 100644 --- a/Documentation/video4linux/bttv/Sound-FAQ +++ b/Documentation/video4linux/bttv/Sound-FAQ | |||
| @@ -2,13 +2,13 @@ | |||
| 2 | bttv and sound mini howto | 2 | bttv and sound mini howto |
| 3 | ========================= | 3 | ========================= |
| 4 | 4 | ||
| 5 | There are alot of different bt848/849/878/879 based boards available. | 5 | There are a lot of different bt848/849/878/879 based boards available. |
| 6 | Making video work often is not a big deal, because this is handled | 6 | Making video work often is not a big deal, because this is handled |
| 7 | completely by the bt8xx chip, which is common on all boards. But | 7 | completely by the bt8xx chip, which is common on all boards. But |
| 8 | sound is handled in slightly different ways on each board. | 8 | sound is handled in slightly different ways on each board. |
| 9 | 9 | ||
| 10 | To handle the grabber boards correctly, there is a array tvcards[] in | 10 | To handle the grabber boards correctly, there is a array tvcards[] in |
| 11 | bttv-cards.c, which holds the informations required for each board. | 11 | bttv-cards.c, which holds the information required for each board. |
| 12 | Sound will work only, if the correct entry is used (for video it often | 12 | Sound will work only, if the correct entry is used (for video it often |
| 13 | makes no difference). The bttv driver prints a line to the kernel | 13 | makes no difference). The bttv driver prints a line to the kernel |
| 14 | log, telling which card type is used. Like this one: | 14 | log, telling which card type is used. Like this one: |
diff --git a/Documentation/video4linux/et61x251.txt b/Documentation/video4linux/et61x251.txt index 1247566c4de3..e0cdae491858 100644 --- a/Documentation/video4linux/et61x251.txt +++ b/Documentation/video4linux/et61x251.txt | |||
| @@ -191,10 +191,10 @@ Syntax: <n> | |||
| 191 | Description: Debugging information level, from 0 to 3: | 191 | Description: Debugging information level, from 0 to 3: |
| 192 | 0 = none (use carefully) | 192 | 0 = none (use carefully) |
| 193 | 1 = critical errors | 193 | 1 = critical errors |
| 194 | 2 = significant informations | 194 | 2 = significant information |
| 195 | 3 = more verbose messages | 195 | 3 = more verbose messages |
| 196 | Level 3 is useful for testing only, when only one device | 196 | Level 3 is useful for testing only, when only one device |
| 197 | is used at the same time. It also shows some more informations | 197 | is used at the same time. It also shows some more information |
| 198 | about the hardware being detected. This module parameter can be | 198 | about the hardware being detected. This module parameter can be |
| 199 | changed at runtime thanks to the /sys filesystem interface. | 199 | changed at runtime thanks to the /sys filesystem interface. |
| 200 | Default: 2 | 200 | Default: 2 |
diff --git a/Documentation/video4linux/pxa_camera.txt b/Documentation/video4linux/pxa_camera.txt index 4f6d0ca01956..51ed1578b0e8 100644 --- a/Documentation/video4linux/pxa_camera.txt +++ b/Documentation/video4linux/pxa_camera.txt | |||
| @@ -84,12 +84,12 @@ DMA usage | |||
| 84 | transfer is not started. On "End Of Frame" interrupt, the irq handler | 84 | transfer is not started. On "End Of Frame" interrupt, the irq handler |
| 85 | starts the DMA chain. | 85 | starts the DMA chain. |
| 86 | - capture of one videobuffer | 86 | - capture of one videobuffer |
| 87 | The DMA chain starts transfering data into videobuffer RAM pages. | 87 | The DMA chain starts transferring data into videobuffer RAM pages. |
| 88 | When all pages are transfered, the DMA irq is raised on "ENDINTR" status | 88 | When all pages are transferred, the DMA irq is raised on "ENDINTR" status |
| 89 | - finishing one videobuffer | 89 | - finishing one videobuffer |
| 90 | The DMA irq handler marks the videobuffer as "done", and removes it from | 90 | The DMA irq handler marks the videobuffer as "done", and removes it from |
| 91 | the active running queue | 91 | the active running queue |
| 92 | Meanwhile, the next videobuffer (if there is one), is transfered by DMA | 92 | Meanwhile, the next videobuffer (if there is one), is transferred by DMA |
| 93 | - finishing the last videobuffer | 93 | - finishing the last videobuffer |
| 94 | On the DMA irq of the last videobuffer, the QCI is stopped. | 94 | On the DMA irq of the last videobuffer, the QCI is stopped. |
| 95 | 95 | ||
| @@ -101,7 +101,7 @@ DMA usage | |||
| 101 | 101 | ||
| 102 | This structure is pointed by dma->sg_cpu. | 102 | This structure is pointed by dma->sg_cpu. |
| 103 | The descriptors are used as follows : | 103 | The descriptors are used as follows : |
| 104 | - desc-sg[i]: i-th descriptor, transfering the i-th sg | 104 | - desc-sg[i]: i-th descriptor, transferring the i-th sg |
| 105 | element to the video buffer scatter gather | 105 | element to the video buffer scatter gather |
| 106 | - finisher: has ddadr=DADDR_STOP, dcmd=ENDIRQEN | 106 | - finisher: has ddadr=DADDR_STOP, dcmd=ENDIRQEN |
| 107 | - linker: has ddadr= desc-sg[0] of next video buffer, dcmd=0 | 107 | - linker: has ddadr= desc-sg[0] of next video buffer, dcmd=0 |
diff --git a/Documentation/video4linux/sn9c102.txt b/Documentation/video4linux/sn9c102.txt index 73de4050d637..b4f67040403a 100644 --- a/Documentation/video4linux/sn9c102.txt +++ b/Documentation/video4linux/sn9c102.txt | |||
| @@ -214,10 +214,10 @@ Syntax: <n> | |||
| 214 | Description: Debugging information level, from 0 to 3: | 214 | Description: Debugging information level, from 0 to 3: |
| 215 | 0 = none (use carefully) | 215 | 0 = none (use carefully) |
| 216 | 1 = critical errors | 216 | 1 = critical errors |
| 217 | 2 = significant informations | 217 | 2 = significant information |
| 218 | 3 = more verbose messages | 218 | 3 = more verbose messages |
| 219 | Level 3 is useful for testing only. It also shows some more | 219 | Level 3 is useful for testing only. It also shows some more |
| 220 | informations about the hardware being detected. | 220 | information about the hardware being detected. |
| 221 | This parameter can be changed at runtime thanks to the /sys | 221 | This parameter can be changed at runtime thanks to the /sys |
| 222 | filesystem interface. | 222 | filesystem interface. |
| 223 | Default: 2 | 223 | Default: 2 |
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index 3b15608ee070..cf21f7aae976 100644 --- a/Documentation/video4linux/v4l2-framework.txt +++ b/Documentation/video4linux/v4l2-framework.txt | |||
| @@ -343,7 +343,7 @@ ignored. If you want to check for errors use this: | |||
| 343 | err = v4l2_device_call_until_err(v4l2_dev, 0, core, g_chip_ident, &chip); | 343 | err = v4l2_device_call_until_err(v4l2_dev, 0, core, g_chip_ident, &chip); |
| 344 | 344 | ||
| 345 | Any error except -ENOIOCTLCMD will exit the loop with that error. If no | 345 | Any error except -ENOIOCTLCMD will exit the loop with that error. If no |
| 346 | errors (except -ENOIOCTLCMD) occured, then 0 is returned. | 346 | errors (except -ENOIOCTLCMD) occurred, then 0 is returned. |
| 347 | 347 | ||
| 348 | The second argument to both calls is a group ID. If 0, then all subdevs are | 348 | The second argument to both calls is a group ID. If 0, then all subdevs are |
| 349 | called. If non-zero, then only those whose group ID match that value will | 349 | called. If non-zero, then only those whose group ID match that value will |
diff --git a/Documentation/video4linux/w9968cf.txt b/Documentation/video4linux/w9968cf.txt index 05138e8aea07..9649450f3b90 100644 --- a/Documentation/video4linux/w9968cf.txt +++ b/Documentation/video4linux/w9968cf.txt | |||
| @@ -413,7 +413,7 @@ Syntax: <n> | |||
| 413 | Description: Debugging information level, from 0 to 6: | 413 | Description: Debugging information level, from 0 to 6: |
| 414 | 0 = none (use carefully) | 414 | 0 = none (use carefully) |
| 415 | 1 = critical errors | 415 | 1 = critical errors |
| 416 | 2 = significant informations | 416 | 2 = significant information |
| 417 | 3 = configuration or general messages | 417 | 3 = configuration or general messages |
| 418 | 4 = warnings | 418 | 4 = warnings |
| 419 | 5 = called functions | 419 | 5 = called functions |
diff --git a/Documentation/video4linux/zc0301.txt b/Documentation/video4linux/zc0301.txt index befdfdacdc5b..b41c83cf09f4 100644 --- a/Documentation/video4linux/zc0301.txt +++ b/Documentation/video4linux/zc0301.txt | |||
| @@ -181,10 +181,10 @@ Syntax: <n> | |||
| 181 | Description: Debugging information level, from 0 to 3: | 181 | Description: Debugging information level, from 0 to 3: |
| 182 | 0 = none (use carefully) | 182 | 0 = none (use carefully) |
| 183 | 1 = critical errors | 183 | 1 = critical errors |
| 184 | 2 = significant informations | 184 | 2 = significant information |
| 185 | 3 = more verbose messages | 185 | 3 = more verbose messages |
| 186 | Level 3 is useful for testing only, when only one device | 186 | Level 3 is useful for testing only, when only one device |
| 187 | is used at the same time. It also shows some more informations | 187 | is used at the same time. It also shows some information |
| 188 | about the hardware being detected. This module parameter can be | 188 | about the hardware being detected. This module parameter can be |
| 189 | changed at runtime thanks to the /sys filesystem interface. | 189 | changed at runtime thanks to the /sys filesystem interface. |
| 190 | Default: 2 | 190 | Default: 2 |
| @@ -261,7 +261,7 @@ the fingerprint is: '88E8 F32F 7244 68BA 3958 5D40 99DA 5D2A FCE6 35A4'. | |||
| 261 | 261 | ||
| 262 | 11. Credits | 262 | 11. Credits |
| 263 | =========== | 263 | =========== |
| 264 | - Informations about the chip internals needed to enable the I2C protocol have | 264 | - Information about the chip internals needed to enable the I2C protocol have |
| 265 | been taken from the documentation of the ZC030x Video4Linux1 driver written | 265 | been taken from the documentation of the ZC030x Video4Linux1 driver written |
| 266 | by Andrew Birkett <andy@nobugs.org>; | 266 | by Andrew Birkett <andy@nobugs.org>; |
| 267 | - The initialization values of the ZC0301 controller connected to the PAS202BCB | 267 | - The initialization values of the ZC0301 controller connected to the PAS202BCB |
diff --git a/Documentation/vm/active_mm.txt b/Documentation/vm/active_mm.txt index 4ee1f643d897..dbf45817405f 100644 --- a/Documentation/vm/active_mm.txt +++ b/Documentation/vm/active_mm.txt | |||
| @@ -74,7 +74,7 @@ we have a user context", and is generally done by the page fault handler | |||
| 74 | and things like that). | 74 | and things like that). |
| 75 | 75 | ||
| 76 | Anyway, I put a pre-patch-2.3.13-1 on ftp.kernel.org just a moment ago, | 76 | Anyway, I put a pre-patch-2.3.13-1 on ftp.kernel.org just a moment ago, |
| 77 | because it slightly changes the interfaces to accomodate the alpha (who | 77 | because it slightly changes the interfaces to accommodate the alpha (who |
| 78 | would have thought it, but the alpha actually ends up having one of the | 78 | would have thought it, but the alpha actually ends up having one of the |
| 79 | ugliest context switch codes - unlike the other architectures where the MM | 79 | ugliest context switch codes - unlike the other architectures where the MM |
| 80 | and register state is separate, the alpha PALcode joins the two, and you | 80 | and register state is separate, the alpha PALcode joins the two, and you |
diff --git a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt index 457634c1e03e..f8551b3879f8 100644 --- a/Documentation/vm/hugetlbpage.txt +++ b/Documentation/vm/hugetlbpage.txt | |||
| @@ -72,7 +72,7 @@ number of huge pages requested. This is the most reliable method of | |||
| 72 | allocating huge pages as memory has not yet become fragmented. | 72 | allocating huge pages as memory has not yet become fragmented. |
| 73 | 73 | ||
| 74 | Some platforms support multiple huge page sizes. To allocate huge pages | 74 | Some platforms support multiple huge page sizes. To allocate huge pages |
| 75 | of a specific size, one must preceed the huge pages boot command parameters | 75 | of a specific size, one must precede the huge pages boot command parameters |
| 76 | with a huge page size selection parameter "hugepagesz=<size>". <size> must | 76 | with a huge page size selection parameter "hugepagesz=<size>". <size> must |
| 77 | be specified in bytes with optional scale suffix [kKmMgG]. The default huge | 77 | be specified in bytes with optional scale suffix [kKmMgG]. The default huge |
| 78 | page size may be selected with the "default_hugepagesz=<size>" boot parameter. | 78 | page size may be selected with the "default_hugepagesz=<size>" boot parameter. |
diff --git a/Documentation/vm/overcommit-accounting b/Documentation/vm/overcommit-accounting index 21c7b1f8f32b..706d7ed9d8d2 100644 --- a/Documentation/vm/overcommit-accounting +++ b/Documentation/vm/overcommit-accounting | |||
| @@ -4,7 +4,7 @@ The Linux kernel supports the following overcommit handling modes | |||
| 4 | address space are refused. Used for a typical system. It | 4 | address space are refused. Used for a typical system. It |
| 5 | ensures a seriously wild allocation fails while allowing | 5 | ensures a seriously wild allocation fails while allowing |
| 6 | overcommit to reduce swap usage. root is allowed to | 6 | overcommit to reduce swap usage. root is allowed to |
| 7 | allocate slighly more memory in this mode. This is the | 7 | allocate slightly more memory in this mode. This is the |
| 8 | default. | 8 | default. |
| 9 | 9 | ||
| 10 | 1 - Always overcommit. Appropriate for some scientific | 10 | 1 - Always overcommit. Appropriate for some scientific |
diff --git a/Documentation/w1/slaves/w1_ds2423 b/Documentation/w1/slaves/w1_ds2423 index 90a65d23cf59..3f98b505a0ee 100644 --- a/Documentation/w1/slaves/w1_ds2423 +++ b/Documentation/w1/slaves/w1_ds2423 | |||
| @@ -21,8 +21,8 @@ value and associated ram buffer is outpputed to own line. | |||
| 21 | 21 | ||
| 22 | Each lines will contain the values of 42 bytes read from the counter and | 22 | Each lines will contain the values of 42 bytes read from the counter and |
| 23 | memory page along the crc=YES or NO for indicating whether the read operation | 23 | memory page along the crc=YES or NO for indicating whether the read operation |
| 24 | was successfull and CRC matched. | 24 | was successful and CRC matched. |
| 25 | If the operation was successfull, there is also in the end of each line | 25 | If the operation was successful, there is also in the end of each line |
| 26 | a counter value expressed as an integer after c= | 26 | a counter value expressed as an integer after c= |
| 27 | 27 | ||
| 28 | Meaning of 42 bytes represented is following: | 28 | Meaning of 42 bytes represented is following: |
| @@ -34,7 +34,7 @@ Meaning of 42 bytes represented is following: | |||
| 34 | - crc=YES/NO indicating whether read was ok and crc matched | 34 | - crc=YES/NO indicating whether read was ok and crc matched |
| 35 | - c=<int> current counter value | 35 | - c=<int> current counter value |
| 36 | 36 | ||
| 37 | example from the successfull read: | 37 | example from the successful read: |
| 38 | 00 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2 | 38 | 00 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2 |
| 39 | 00 02 00 00 00 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2 | 39 | 00 02 00 00 00 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2 |
| 40 | 00 29 c6 5d 18 00 00 00 00 04 37 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=408798761 | 40 | 00 29 c6 5d 18 00 00 00 00 04 37 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=408798761 |
diff --git a/Documentation/w1/w1.netlink b/Documentation/w1/w1.netlink index 804445f745ed..f59a31965d50 100644 --- a/Documentation/w1/w1.netlink +++ b/Documentation/w1/w1.netlink | |||
| @@ -81,7 +81,7 @@ which will contain list of all registered master ids in the following | |||
| 81 | format: | 81 | format: |
| 82 | 82 | ||
| 83 | cn_msg (CN_W1_IDX.CN_W1_VAL as id, len is equal to sizeof(struct | 83 | cn_msg (CN_W1_IDX.CN_W1_VAL as id, len is equal to sizeof(struct |
| 84 | w1_netlink_msg) plus number of masters multipled by 4) | 84 | w1_netlink_msg) plus number of masters multiplied by 4) |
| 85 | w1_netlink_msg (type: W1_LIST_MASTERS, len is equal to | 85 | w1_netlink_msg (type: W1_LIST_MASTERS, len is equal to |
| 86 | number of masters multiplied by 4 (u32 size)) | 86 | number of masters multiplied by 4 (u32 size)) |
| 87 | id0 ... idN | 87 | id0 ... idN |
diff --git a/Documentation/watchdog/hpwdt.txt b/Documentation/watchdog/hpwdt.txt index 9c24d5ffbb06..9488078900e0 100644 --- a/Documentation/watchdog/hpwdt.txt +++ b/Documentation/watchdog/hpwdt.txt | |||
| @@ -8,7 +8,7 @@ Last reviewed: 06/02/2009 | |||
| 8 | The HP iLO2 NMI Watchdog driver is a kernel module that provides basic | 8 | The HP iLO2 NMI Watchdog driver is a kernel module that provides basic |
| 9 | watchdog functionality and the added benefit of NMI sourcing. Both the | 9 | watchdog functionality and the added benefit of NMI sourcing. Both the |
| 10 | watchdog functionality and the NMI sourcing capability need to be enabled | 10 | watchdog functionality and the NMI sourcing capability need to be enabled |
| 11 | by the user. Remember that the two modes are not dependant on one another. | 11 | by the user. Remember that the two modes are not dependent on one another. |
| 12 | A user can have the NMI sourcing without the watchdog timer and vice-versa. | 12 | A user can have the NMI sourcing without the watchdog timer and vice-versa. |
| 13 | 13 | ||
| 14 | Watchdog functionality is enabled like any other common watchdog driver. That | 14 | Watchdog functionality is enabled like any other common watchdog driver. That |
diff --git a/MAINTAINERS b/MAINTAINERS index 6b4b9cdec370..ec3600306289 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -184,10 +184,9 @@ F: Documentation/filesystems/9p.txt | |||
| 184 | F: fs/9p/ | 184 | F: fs/9p/ |
| 185 | 185 | ||
| 186 | A2232 SERIAL BOARD DRIVER | 186 | A2232 SERIAL BOARD DRIVER |
| 187 | M: Enver Haase <A2232@gmx.net> | ||
| 188 | L: linux-m68k@lists.linux-m68k.org | 187 | L: linux-m68k@lists.linux-m68k.org |
| 189 | S: Maintained | 188 | S: Orphan |
| 190 | F: drivers/char/ser_a2232* | 189 | F: drivers/staging/generic_serial/ser_a2232* |
| 191 | 190 | ||
| 192 | AACRAID SCSI RAID DRIVER | 191 | AACRAID SCSI RAID DRIVER |
| 193 | M: Adaptec OEM Raid Solutions <aacraid@adaptec.com> | 192 | M: Adaptec OEM Raid Solutions <aacraid@adaptec.com> |
| @@ -877,6 +876,13 @@ F: arch/arm/mach-mv78xx0/ | |||
| 877 | F: arch/arm/mach-orion5x/ | 876 | F: arch/arm/mach-orion5x/ |
| 878 | F: arch/arm/plat-orion/ | 877 | F: arch/arm/plat-orion/ |
| 879 | 878 | ||
| 879 | ARM/Orion SoC/Technologic Systems TS-78xx platform support | ||
| 880 | M: Alexander Clouter <alex@digriz.org.uk> | ||
| 881 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
| 882 | W: http://www.digriz.org.uk/ts78xx/kernel | ||
| 883 | S: Maintained | ||
| 884 | F: arch/arm/mach-orion5x/ts78xx-* | ||
| 885 | |||
| 880 | ARM/MIOA701 MACHINE SUPPORT | 886 | ARM/MIOA701 MACHINE SUPPORT |
| 881 | M: Robert Jarzmik <robert.jarzmik@free.fr> | 887 | M: Robert Jarzmik <robert.jarzmik@free.fr> |
| 882 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 888 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| @@ -1063,7 +1069,7 @@ F: arch/arm/mach-shmobile/ | |||
| 1063 | F: drivers/sh/ | 1069 | F: drivers/sh/ |
| 1064 | 1070 | ||
| 1065 | ARM/TELECHIPS ARM ARCHITECTURE | 1071 | ARM/TELECHIPS ARM ARCHITECTURE |
| 1066 | M: "Hans J. Koch" <hjk@linutronix.de> | 1072 | M: "Hans J. Koch" <hjk@hansjkoch.de> |
| 1067 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1073 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 1068 | S: Maintained | 1074 | S: Maintained |
| 1069 | F: arch/arm/plat-tcc/ | 1075 | F: arch/arm/plat-tcc/ |
| @@ -1823,11 +1829,10 @@ S: Maintained | |||
| 1823 | F: drivers/platform/x86/compal-laptop.c | 1829 | F: drivers/platform/x86/compal-laptop.c |
| 1824 | 1830 | ||
| 1825 | COMPUTONE INTELLIPORT MULTIPORT CARD | 1831 | COMPUTONE INTELLIPORT MULTIPORT CARD |
| 1826 | M: "Michael H. Warfield" <mhw@wittsend.com> | ||
| 1827 | W: http://www.wittsend.com/computone.html | 1832 | W: http://www.wittsend.com/computone.html |
| 1828 | S: Maintained | 1833 | S: Orphan |
| 1829 | F: Documentation/serial/computone.txt | 1834 | F: Documentation/serial/computone.txt |
| 1830 | F: drivers/char/ip2/ | 1835 | F: drivers/staging/tty/ip2/ |
| 1831 | 1836 | ||
| 1832 | CONEXANT ACCESSRUNNER USB DRIVER | 1837 | CONEXANT ACCESSRUNNER USB DRIVER |
| 1833 | M: Simon Arlott <cxacru@fire.lp0.eu> | 1838 | M: Simon Arlott <cxacru@fire.lp0.eu> |
| @@ -2010,7 +2015,7 @@ F: drivers/net/wan/cycx* | |||
| 2010 | CYCLADES ASYNC MUX DRIVER | 2015 | CYCLADES ASYNC MUX DRIVER |
| 2011 | W: http://www.cyclades.com/ | 2016 | W: http://www.cyclades.com/ |
| 2012 | S: Orphan | 2017 | S: Orphan |
| 2013 | F: drivers/char/cyclades.c | 2018 | F: drivers/tty/cyclades.c |
| 2014 | F: include/linux/cyclades.h | 2019 | F: include/linux/cyclades.h |
| 2015 | 2020 | ||
| 2016 | CYCLADES PC300 DRIVER | 2021 | CYCLADES PC300 DRIVER |
| @@ -2124,8 +2129,8 @@ L: Eng.Linux@digi.com | |||
| 2124 | W: http://www.digi.com | 2129 | W: http://www.digi.com |
| 2125 | S: Orphan | 2130 | S: Orphan |
| 2126 | F: Documentation/serial/digiepca.txt | 2131 | F: Documentation/serial/digiepca.txt |
| 2127 | F: drivers/char/epca* | 2132 | F: drivers/staging/tty/epca* |
| 2128 | F: drivers/char/digi* | 2133 | F: drivers/staging/tty/digi* |
| 2129 | 2134 | ||
| 2130 | DIOLAN U2C-12 I2C DRIVER | 2135 | DIOLAN U2C-12 I2C DRIVER |
| 2131 | M: Guenter Roeck <guenter.roeck@ericsson.com> | 2136 | M: Guenter Roeck <guenter.roeck@ericsson.com> |
| @@ -4077,7 +4082,7 @@ F: drivers/video/matrox/matroxfb_* | |||
| 4077 | F: include/linux/matroxfb.h | 4082 | F: include/linux/matroxfb.h |
| 4078 | 4083 | ||
| 4079 | MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER | 4084 | MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER |
| 4080 | M: "Hans J. Koch" <hjk@linutronix.de> | 4085 | M: "Hans J. Koch" <hjk@hansjkoch.de> |
| 4081 | L: lm-sensors@lm-sensors.org | 4086 | L: lm-sensors@lm-sensors.org |
| 4082 | S: Maintained | 4087 | S: Maintained |
| 4083 | F: Documentation/hwmon/max6650 | 4088 | F: Documentation/hwmon/max6650 |
| @@ -4192,7 +4197,7 @@ MOXA SMARTIO/INDUSTIO/INTELLIO SERIAL CARD | |||
| 4192 | M: Jiri Slaby <jirislaby@gmail.com> | 4197 | M: Jiri Slaby <jirislaby@gmail.com> |
| 4193 | S: Maintained | 4198 | S: Maintained |
| 4194 | F: Documentation/serial/moxa-smartio | 4199 | F: Documentation/serial/moxa-smartio |
| 4195 | F: drivers/char/mxser.* | 4200 | F: drivers/tty/mxser.* |
| 4196 | 4201 | ||
| 4197 | MSI LAPTOP SUPPORT | 4202 | MSI LAPTOP SUPPORT |
| 4198 | M: "Lee, Chun-Yi" <jlee@novell.com> | 4203 | M: "Lee, Chun-Yi" <jlee@novell.com> |
| @@ -4234,7 +4239,7 @@ F: sound/oss/msnd* | |||
| 4234 | 4239 | ||
| 4235 | MULTITECH MULTIPORT CARD (ISICOM) | 4240 | MULTITECH MULTIPORT CARD (ISICOM) |
| 4236 | S: Orphan | 4241 | S: Orphan |
| 4237 | F: drivers/char/isicom.c | 4242 | F: drivers/tty/isicom.c |
| 4238 | F: include/linux/isicom.h | 4243 | F: include/linux/isicom.h |
| 4239 | 4244 | ||
| 4240 | MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER | 4245 | MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER |
| @@ -5273,14 +5278,14 @@ F: drivers/memstick/host/r592.* | |||
| 5273 | RISCOM8 DRIVER | 5278 | RISCOM8 DRIVER |
| 5274 | S: Orphan | 5279 | S: Orphan |
| 5275 | F: Documentation/serial/riscom8.txt | 5280 | F: Documentation/serial/riscom8.txt |
| 5276 | F: drivers/char/riscom8* | 5281 | F: drivers/staging/tty/riscom8* |
| 5277 | 5282 | ||
| 5278 | ROCKETPORT DRIVER | 5283 | ROCKETPORT DRIVER |
| 5279 | P: Comtrol Corp. | 5284 | P: Comtrol Corp. |
| 5280 | W: http://www.comtrol.com | 5285 | W: http://www.comtrol.com |
| 5281 | S: Maintained | 5286 | S: Maintained |
| 5282 | F: Documentation/serial/rocket.txt | 5287 | F: Documentation/serial/rocket.txt |
| 5283 | F: drivers/char/rocket* | 5288 | F: drivers/tty/rocket* |
| 5284 | 5289 | ||
| 5285 | ROSE NETWORK LAYER | 5290 | ROSE NETWORK LAYER |
| 5286 | M: Ralf Baechle <ralf@linux-mips.org> | 5291 | M: Ralf Baechle <ralf@linux-mips.org> |
| @@ -5916,10 +5921,9 @@ F: arch/arm/mach-spear6xx/spear600.c | |||
| 5916 | F: arch/arm/mach-spear6xx/spear600_evb.c | 5921 | F: arch/arm/mach-spear6xx/spear600_evb.c |
| 5917 | 5922 | ||
| 5918 | SPECIALIX IO8+ MULTIPORT SERIAL CARD DRIVER | 5923 | SPECIALIX IO8+ MULTIPORT SERIAL CARD DRIVER |
| 5919 | M: Roger Wolff <R.E.Wolff@BitWizard.nl> | 5924 | S: Orphan |
| 5920 | S: Supported | ||
| 5921 | F: Documentation/serial/specialix.txt | 5925 | F: Documentation/serial/specialix.txt |
| 5922 | F: drivers/char/specialix* | 5926 | F: drivers/staging/tty/specialix* |
| 5923 | 5927 | ||
| 5924 | SPI SUBSYSTEM | 5928 | SPI SUBSYSTEM |
| 5925 | M: David Brownell <dbrownell@users.sourceforge.net> | 5929 | M: David Brownell <dbrownell@users.sourceforge.net> |
| @@ -5964,7 +5968,6 @@ F: arch/alpha/kernel/srm_env.c | |||
| 5964 | 5968 | ||
| 5965 | STABLE BRANCH | 5969 | STABLE BRANCH |
| 5966 | M: Greg Kroah-Hartman <greg@kroah.com> | 5970 | M: Greg Kroah-Hartman <greg@kroah.com> |
| 5967 | M: Chris Wright <chrisw@sous-sol.org> | ||
| 5968 | L: stable@kernel.org | 5971 | L: stable@kernel.org |
| 5969 | S: Maintained | 5972 | S: Maintained |
| 5970 | 5973 | ||
| @@ -6248,7 +6251,8 @@ M: Greg Ungerer <gerg@uclinux.org> | |||
| 6248 | W: http://www.uclinux.org/ | 6251 | W: http://www.uclinux.org/ |
| 6249 | L: uclinux-dev@uclinux.org (subscribers-only) | 6252 | L: uclinux-dev@uclinux.org (subscribers-only) |
| 6250 | S: Maintained | 6253 | S: Maintained |
| 6251 | F: arch/m68knommu/ | 6254 | F: arch/m68k/*/*_no.* |
| 6255 | F: arch/m68k/include/asm/*_no.* | ||
| 6252 | 6256 | ||
| 6253 | UCLINUX FOR RENESAS H8/300 (H8300) | 6257 | UCLINUX FOR RENESAS H8/300 (H8300) |
| 6254 | M: Yoshinori Sato <ysato@users.sourceforge.jp> | 6258 | M: Yoshinori Sato <ysato@users.sourceforge.jp> |
| @@ -6618,7 +6622,7 @@ F: fs/hostfs/ | |||
| 6618 | F: fs/hppfs/ | 6622 | F: fs/hppfs/ |
| 6619 | 6623 | ||
| 6620 | USERSPACE I/O (UIO) | 6624 | USERSPACE I/O (UIO) |
| 6621 | M: "Hans J. Koch" <hjk@linutronix.de> | 6625 | M: "Hans J. Koch" <hjk@hansjkoch.de> |
| 6622 | M: Greg Kroah-Hartman <gregkh@suse.de> | 6626 | M: Greg Kroah-Hartman <gregkh@suse.de> |
| 6623 | S: Maintained | 6627 | S: Maintained |
| 6624 | F: Documentation/DocBook/uio-howto.tmpl | 6628 | F: Documentation/DocBook/uio-howto.tmpl |
| @@ -6916,6 +6920,13 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86. | |||
| 6916 | S: Maintained | 6920 | S: Maintained |
| 6917 | F: drivers/platform/x86 | 6921 | F: drivers/platform/x86 |
| 6918 | 6922 | ||
| 6923 | XEN NETWORK BACKEND DRIVER | ||
| 6924 | M: Ian Campbell <ian.campbell@citrix.com> | ||
| 6925 | L: xen-devel@lists.xensource.com (moderated for non-subscribers) | ||
| 6926 | L: netdev@vger.kernel.org | ||
| 6927 | S: Supported | ||
| 6928 | F: drivers/net/xen-netback/* | ||
| 6929 | |||
| 6919 | XEN PCI SUBSYSTEM | 6930 | XEN PCI SUBSYSTEM |
| 6920 | M: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 6931 | M: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> |
| 6921 | L: xen-devel@lists.xensource.com (moderated for non-subscribers) | 6932 | L: xen-devel@lists.xensource.com (moderated for non-subscribers) |
| @@ -1,7 +1,7 @@ | |||
| 1 | VERSION = 2 | 1 | VERSION = 2 |
| 2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
| 3 | SUBLEVEL = 39 | 3 | SUBLEVEL = 39 |
| 4 | EXTRAVERSION = -rc1 | 4 | EXTRAVERSION = -rc3 |
| 5 | NAME = Flesh-Eating Bats with Fangs | 5 | NAME = Flesh-Eating Bats with Fangs |
| 6 | 6 | ||
| 7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index bd4160c57196..9808998cc073 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig | |||
| @@ -12,7 +12,6 @@ config ALPHA | |||
| 12 | select GENERIC_IRQ_PROBE | 12 | select GENERIC_IRQ_PROBE |
| 13 | select AUTO_IRQ_AFFINITY if SMP | 13 | select AUTO_IRQ_AFFINITY if SMP |
| 14 | select GENERIC_IRQ_SHOW | 14 | select GENERIC_IRQ_SHOW |
| 15 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
| 16 | help | 15 | help |
| 17 | The Alpha is a 64-bit general-purpose processor designed and | 16 | The Alpha is a 64-bit general-purpose processor designed and |
| 18 | marketed by the Digital Equipment Corporation of blessed memory, | 17 | marketed by the Digital Equipment Corporation of blessed memory, |
diff --git a/arch/alpha/include/asm/elf.h b/arch/alpha/include/asm/elf.h index 9baae8afe8a3..da5449e22175 100644 --- a/arch/alpha/include/asm/elf.h +++ b/arch/alpha/include/asm/elf.h | |||
| @@ -101,7 +101,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | |||
| 101 | 101 | ||
| 102 | #define ELF_PLAT_INIT(_r, load_addr) _r->r0 = 0 | 102 | #define ELF_PLAT_INIT(_r, load_addr) _r->r0 = 0 |
| 103 | 103 | ||
| 104 | /* The registers are layed out in pt_regs for PAL and syscall | 104 | /* The registers are laid out in pt_regs for PAL and syscall |
| 105 | convenience. Re-order them for the linear elf_gregset_t. */ | 105 | convenience. Re-order them for the linear elf_gregset_t. */ |
| 106 | 106 | ||
| 107 | struct pt_regs; | 107 | struct pt_regs; |
diff --git a/arch/alpha/kernel/Makefile b/arch/alpha/kernel/Makefile index 9bb7b858ed23..7a6d908bb865 100644 --- a/arch/alpha/kernel/Makefile +++ b/arch/alpha/kernel/Makefile | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | extra-y := head.o vmlinux.lds | 5 | extra-y := head.o vmlinux.lds |
| 6 | asflags-y := $(KBUILD_CFLAGS) | 6 | asflags-y := $(KBUILD_CFLAGS) |
| 7 | ccflags-y := -Werror -Wno-sign-compare | 7 | ccflags-y := -Wno-sign-compare |
| 8 | 8 | ||
| 9 | obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \ | 9 | obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \ |
| 10 | irq_alpha.o signal.o setup.o ptrace.o time.o \ | 10 | irq_alpha.o signal.o setup.o ptrace.o time.o \ |
diff --git a/arch/alpha/kernel/core_lca.c b/arch/alpha/kernel/core_lca.c index 4843f6ec9f3a..cb2801cfd3df 100644 --- a/arch/alpha/kernel/core_lca.c +++ b/arch/alpha/kernel/core_lca.c | |||
| @@ -133,7 +133,7 @@ conf_read(unsigned long addr) | |||
| 133 | 133 | ||
| 134 | local_irq_save(flags); | 134 | local_irq_save(flags); |
| 135 | 135 | ||
| 136 | /* Reset status register to avoid loosing errors. */ | 136 | /* Reset status register to avoid losing errors. */ |
| 137 | stat0 = *(vulp)LCA_IOC_STAT0; | 137 | stat0 = *(vulp)LCA_IOC_STAT0; |
| 138 | *(vulp)LCA_IOC_STAT0 = stat0; | 138 | *(vulp)LCA_IOC_STAT0 = stat0; |
| 139 | mb(); | 139 | mb(); |
| @@ -170,7 +170,7 @@ conf_write(unsigned long addr, unsigned int value) | |||
| 170 | 170 | ||
| 171 | local_irq_save(flags); /* avoid getting hit by machine check */ | 171 | local_irq_save(flags); /* avoid getting hit by machine check */ |
| 172 | 172 | ||
| 173 | /* Reset status register to avoid loosing errors. */ | 173 | /* Reset status register to avoid losing errors. */ |
| 174 | stat0 = *(vulp)LCA_IOC_STAT0; | 174 | stat0 = *(vulp)LCA_IOC_STAT0; |
| 175 | *(vulp)LCA_IOC_STAT0 = stat0; | 175 | *(vulp)LCA_IOC_STAT0 = stat0; |
| 176 | mb(); | 176 | mb(); |
diff --git a/arch/alpha/kernel/core_mcpcia.c b/arch/alpha/kernel/core_mcpcia.c index 381fec0af52e..da7bcc372f16 100644 --- a/arch/alpha/kernel/core_mcpcia.c +++ b/arch/alpha/kernel/core_mcpcia.c | |||
| @@ -88,7 +88,7 @@ conf_read(unsigned long addr, unsigned char type1, | |||
| 88 | { | 88 | { |
| 89 | unsigned long flags; | 89 | unsigned long flags; |
| 90 | unsigned long mid = MCPCIA_HOSE2MID(hose->index); | 90 | unsigned long mid = MCPCIA_HOSE2MID(hose->index); |
| 91 | unsigned int stat0, value, temp, cpu; | 91 | unsigned int stat0, value, cpu; |
| 92 | 92 | ||
| 93 | cpu = smp_processor_id(); | 93 | cpu = smp_processor_id(); |
| 94 | 94 | ||
| @@ -101,7 +101,7 @@ conf_read(unsigned long addr, unsigned char type1, | |||
| 101 | stat0 = *(vuip)MCPCIA_CAP_ERR(mid); | 101 | stat0 = *(vuip)MCPCIA_CAP_ERR(mid); |
| 102 | *(vuip)MCPCIA_CAP_ERR(mid) = stat0; | 102 | *(vuip)MCPCIA_CAP_ERR(mid) = stat0; |
| 103 | mb(); | 103 | mb(); |
| 104 | temp = *(vuip)MCPCIA_CAP_ERR(mid); | 104 | *(vuip)MCPCIA_CAP_ERR(mid); |
| 105 | DBG_CFG(("conf_read: MCPCIA_CAP_ERR(%d) was 0x%x\n", mid, stat0)); | 105 | DBG_CFG(("conf_read: MCPCIA_CAP_ERR(%d) was 0x%x\n", mid, stat0)); |
| 106 | 106 | ||
| 107 | mb(); | 107 | mb(); |
| @@ -136,7 +136,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1, | |||
| 136 | { | 136 | { |
| 137 | unsigned long flags; | 137 | unsigned long flags; |
| 138 | unsigned long mid = MCPCIA_HOSE2MID(hose->index); | 138 | unsigned long mid = MCPCIA_HOSE2MID(hose->index); |
| 139 | unsigned int stat0, temp, cpu; | 139 | unsigned int stat0, cpu; |
| 140 | 140 | ||
| 141 | cpu = smp_processor_id(); | 141 | cpu = smp_processor_id(); |
| 142 | 142 | ||
| @@ -145,7 +145,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1, | |||
| 145 | /* Reset status register to avoid losing errors. */ | 145 | /* Reset status register to avoid losing errors. */ |
| 146 | stat0 = *(vuip)MCPCIA_CAP_ERR(mid); | 146 | stat0 = *(vuip)MCPCIA_CAP_ERR(mid); |
| 147 | *(vuip)MCPCIA_CAP_ERR(mid) = stat0; mb(); | 147 | *(vuip)MCPCIA_CAP_ERR(mid) = stat0; mb(); |
| 148 | temp = *(vuip)MCPCIA_CAP_ERR(mid); | 148 | *(vuip)MCPCIA_CAP_ERR(mid); |
| 149 | DBG_CFG(("conf_write: MCPCIA CAP_ERR(%d) was 0x%x\n", mid, stat0)); | 149 | DBG_CFG(("conf_write: MCPCIA CAP_ERR(%d) was 0x%x\n", mid, stat0)); |
| 150 | 150 | ||
| 151 | draina(); | 151 | draina(); |
| @@ -157,7 +157,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1, | |||
| 157 | *((vuip)addr) = value; | 157 | *((vuip)addr) = value; |
| 158 | mb(); | 158 | mb(); |
| 159 | mb(); /* magic */ | 159 | mb(); /* magic */ |
| 160 | temp = *(vuip)MCPCIA_CAP_ERR(mid); /* read to force the write */ | 160 | *(vuip)MCPCIA_CAP_ERR(mid); /* read to force the write */ |
| 161 | mcheck_expected(cpu) = 0; | 161 | mcheck_expected(cpu) = 0; |
| 162 | mb(); | 162 | mb(); |
| 163 | 163 | ||
| @@ -572,12 +572,10 @@ mcpcia_print_system_area(unsigned long la_ptr) | |||
| 572 | void | 572 | void |
| 573 | mcpcia_machine_check(unsigned long vector, unsigned long la_ptr) | 573 | mcpcia_machine_check(unsigned long vector, unsigned long la_ptr) |
| 574 | { | 574 | { |
| 575 | struct el_common *mchk_header; | ||
| 576 | struct el_MCPCIA_uncorrected_frame_mcheck *mchk_logout; | 575 | struct el_MCPCIA_uncorrected_frame_mcheck *mchk_logout; |
| 577 | unsigned int cpu = smp_processor_id(); | 576 | unsigned int cpu = smp_processor_id(); |
| 578 | int expected; | 577 | int expected; |
| 579 | 578 | ||
| 580 | mchk_header = (struct el_common *)la_ptr; | ||
| 581 | mchk_logout = (struct el_MCPCIA_uncorrected_frame_mcheck *)la_ptr; | 579 | mchk_logout = (struct el_MCPCIA_uncorrected_frame_mcheck *)la_ptr; |
| 582 | expected = mcheck_expected(cpu); | 580 | expected = mcheck_expected(cpu); |
| 583 | 581 | ||
diff --git a/arch/alpha/kernel/err_marvel.c b/arch/alpha/kernel/err_marvel.c index 648ae88aeb8a..ae54ad91e18f 100644 --- a/arch/alpha/kernel/err_marvel.c +++ b/arch/alpha/kernel/err_marvel.c | |||
| @@ -1027,7 +1027,7 @@ marvel_process_logout_frame(struct ev7_lf_subpackets *lf_subpackets, int print) | |||
| 1027 | * normal operation, dismiss them. | 1027 | * normal operation, dismiss them. |
| 1028 | * | 1028 | * |
| 1029 | * Dismiss if: | 1029 | * Dismiss if: |
| 1030 | * C_STAT = 0x14 (Error Reponse) | 1030 | * C_STAT = 0x14 (Error Response) |
| 1031 | * C_STS<3> = 0 (C_ADDR valid) | 1031 | * C_STS<3> = 0 (C_ADDR valid) |
| 1032 | * C_ADDR<42> = 1 (I/O) | 1032 | * C_ADDR<42> = 1 (I/O) |
| 1033 | * C_ADDR<31:22> = 111110xxb (PCI Config space) | 1033 | * C_ADDR<31:22> = 111110xxb (PCI Config space) |
diff --git a/arch/alpha/kernel/err_titan.c b/arch/alpha/kernel/err_titan.c index c3b3781a03de..14b26c466c89 100644 --- a/arch/alpha/kernel/err_titan.c +++ b/arch/alpha/kernel/err_titan.c | |||
| @@ -533,8 +533,6 @@ static struct el_subpacket_annotation el_titan_annotations[] = { | |||
| 533 | static struct el_subpacket * | 533 | static struct el_subpacket * |
| 534 | el_process_regatta_subpacket(struct el_subpacket *header) | 534 | el_process_regatta_subpacket(struct el_subpacket *header) |
| 535 | { | 535 | { |
| 536 | int status; | ||
| 537 | |||
| 538 | if (header->class != EL_CLASS__REGATTA_FAMILY) { | 536 | if (header->class != EL_CLASS__REGATTA_FAMILY) { |
| 539 | printk("%s ** Unexpected header CLASS %d TYPE %d, aborting\n", | 537 | printk("%s ** Unexpected header CLASS %d TYPE %d, aborting\n", |
| 540 | err_print_prefix, | 538 | err_print_prefix, |
| @@ -551,7 +549,7 @@ el_process_regatta_subpacket(struct el_subpacket *header) | |||
| 551 | printk("%s ** Occurred on CPU %d:\n", | 549 | printk("%s ** Occurred on CPU %d:\n", |
| 552 | err_print_prefix, | 550 | err_print_prefix, |
| 553 | (int)header->by_type.regatta_frame.cpuid); | 551 | (int)header->by_type.regatta_frame.cpuid); |
| 554 | status = privateer_process_logout_frame((struct el_common *) | 552 | privateer_process_logout_frame((struct el_common *) |
| 555 | header->by_type.regatta_frame.data_start, 1); | 553 | header->by_type.regatta_frame.data_start, 1); |
| 556 | break; | 554 | break; |
| 557 | default: | 555 | default: |
diff --git a/arch/alpha/kernel/irq_alpha.c b/arch/alpha/kernel/irq_alpha.c index 1479dc6ebd97..51b7fbd9e4c1 100644 --- a/arch/alpha/kernel/irq_alpha.c +++ b/arch/alpha/kernel/irq_alpha.c | |||
| @@ -228,7 +228,7 @@ struct irqaction timer_irqaction = { | |||
| 228 | void __init | 228 | void __init |
| 229 | init_rtc_irq(void) | 229 | init_rtc_irq(void) |
| 230 | { | 230 | { |
| 231 | irq_set_chip_and_handler_name(RTC_IRQ, &no_irq_chip, | 231 | irq_set_chip_and_handler_name(RTC_IRQ, &dummy_irq_chip, |
| 232 | handle_simple_irq, "RTC"); | 232 | handle_simple_irq, "RTC"); |
| 233 | setup_irq(RTC_IRQ, &timer_irqaction); | 233 | setup_irq(RTC_IRQ, &timer_irqaction); |
| 234 | } | 234 | } |
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c index d2634e4476b4..edbddcbd5bc6 100644 --- a/arch/alpha/kernel/setup.c +++ b/arch/alpha/kernel/setup.c | |||
| @@ -1404,8 +1404,6 @@ determine_cpu_caches (unsigned int cpu_type) | |||
| 1404 | case PCA56_CPU: | 1404 | case PCA56_CPU: |
| 1405 | case PCA57_CPU: | 1405 | case PCA57_CPU: |
| 1406 | { | 1406 | { |
| 1407 | unsigned long cbox_config, size; | ||
| 1408 | |||
| 1409 | if (cpu_type == PCA56_CPU) { | 1407 | if (cpu_type == PCA56_CPU) { |
| 1410 | L1I = CSHAPE(16*1024, 6, 1); | 1408 | L1I = CSHAPE(16*1024, 6, 1); |
| 1411 | L1D = CSHAPE(8*1024, 5, 1); | 1409 | L1D = CSHAPE(8*1024, 5, 1); |
| @@ -1415,10 +1413,12 @@ determine_cpu_caches (unsigned int cpu_type) | |||
| 1415 | } | 1413 | } |
| 1416 | L3 = -1; | 1414 | L3 = -1; |
| 1417 | 1415 | ||
| 1416 | #if 0 | ||
| 1417 | unsigned long cbox_config, size; | ||
| 1418 | |||
| 1418 | cbox_config = *(vulp) phys_to_virt (0xfffff00008UL); | 1419 | cbox_config = *(vulp) phys_to_virt (0xfffff00008UL); |
| 1419 | size = 512*1024 * (1 << ((cbox_config >> 12) & 3)); | 1420 | size = 512*1024 * (1 << ((cbox_config >> 12) & 3)); |
| 1420 | 1421 | ||
| 1421 | #if 0 | ||
| 1422 | L2 = ((cbox_config >> 31) & 1 ? CSHAPE (size, 6, 1) : -1); | 1422 | L2 = ((cbox_config >> 31) & 1 ? CSHAPE (size, 6, 1) : -1); |
| 1423 | #else | 1423 | #else |
| 1424 | L2 = external_cache_probe(512*1024, 6); | 1424 | L2 = external_cache_probe(512*1024, 6); |
diff --git a/arch/alpha/kernel/smc37c93x.c b/arch/alpha/kernel/smc37c93x.c index 3e6a2893af9f..6886b834f487 100644 --- a/arch/alpha/kernel/smc37c93x.c +++ b/arch/alpha/kernel/smc37c93x.c | |||
| @@ -79,7 +79,6 @@ | |||
| 79 | static unsigned long __init SMCConfigState(unsigned long baseAddr) | 79 | static unsigned long __init SMCConfigState(unsigned long baseAddr) |
| 80 | { | 80 | { |
| 81 | unsigned char devId; | 81 | unsigned char devId; |
| 82 | unsigned char devRev; | ||
| 83 | 82 | ||
| 84 | unsigned long configPort; | 83 | unsigned long configPort; |
| 85 | unsigned long indexPort; | 84 | unsigned long indexPort; |
| @@ -100,7 +99,7 @@ static unsigned long __init SMCConfigState(unsigned long baseAddr) | |||
| 100 | devId = inb(dataPort); | 99 | devId = inb(dataPort); |
| 101 | if (devId == VALID_DEVICE_ID) { | 100 | if (devId == VALID_DEVICE_ID) { |
| 102 | outb(DEVICE_REV, indexPort); | 101 | outb(DEVICE_REV, indexPort); |
| 103 | devRev = inb(dataPort); | 102 | /* unsigned char devRev = */ inb(dataPort); |
| 104 | break; | 103 | break; |
| 105 | } | 104 | } |
| 106 | else | 105 | else |
diff --git a/arch/alpha/kernel/sys_wildfire.c b/arch/alpha/kernel/sys_wildfire.c index d3cb28bb8eb0..d92cdc715c65 100644 --- a/arch/alpha/kernel/sys_wildfire.c +++ b/arch/alpha/kernel/sys_wildfire.c | |||
| @@ -156,7 +156,6 @@ static void __init | |||
| 156 | wildfire_init_irq_per_pca(int qbbno, int pcano) | 156 | wildfire_init_irq_per_pca(int qbbno, int pcano) |
| 157 | { | 157 | { |
| 158 | int i, irq_bias; | 158 | int i, irq_bias; |
| 159 | unsigned long io_bias; | ||
| 160 | static struct irqaction isa_enable = { | 159 | static struct irqaction isa_enable = { |
| 161 | .handler = no_action, | 160 | .handler = no_action, |
| 162 | .name = "isa_enable", | 161 | .name = "isa_enable", |
| @@ -165,10 +164,12 @@ wildfire_init_irq_per_pca(int qbbno, int pcano) | |||
| 165 | irq_bias = qbbno * (WILDFIRE_PCA_PER_QBB * WILDFIRE_IRQ_PER_PCA) | 164 | irq_bias = qbbno * (WILDFIRE_PCA_PER_QBB * WILDFIRE_IRQ_PER_PCA) |
| 166 | + pcano * WILDFIRE_IRQ_PER_PCA; | 165 | + pcano * WILDFIRE_IRQ_PER_PCA; |
| 167 | 166 | ||
| 167 | #if 0 | ||
| 168 | unsigned long io_bias; | ||
| 169 | |||
| 168 | /* Only need the following for first PCI bus per PCA. */ | 170 | /* Only need the following for first PCI bus per PCA. */ |
| 169 | io_bias = WILDFIRE_IO(qbbno, pcano<<1) - WILDFIRE_IO_BIAS; | 171 | io_bias = WILDFIRE_IO(qbbno, pcano<<1) - WILDFIRE_IO_BIAS; |
| 170 | 172 | ||
| 171 | #if 0 | ||
| 172 | outb(0, DMA1_RESET_REG + io_bias); | 173 | outb(0, DMA1_RESET_REG + io_bias); |
| 173 | outb(0, DMA2_RESET_REG + io_bias); | 174 | outb(0, DMA2_RESET_REG + io_bias); |
| 174 | outb(DMA_MODE_CASCADE, DMA2_MODE_REG + io_bias); | 175 | outb(DMA_MODE_CASCADE, DMA2_MODE_REG + io_bias); |
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c index a58e84f1a63b..918e8e0b72ff 100644 --- a/arch/alpha/kernel/time.c +++ b/arch/alpha/kernel/time.c | |||
| @@ -153,6 +153,7 @@ void read_persistent_clock(struct timespec *ts) | |||
| 153 | year += 100; | 153 | year += 100; |
| 154 | 154 | ||
| 155 | ts->tv_sec = mktime(year, mon, day, hour, min, sec); | 155 | ts->tv_sec = mktime(year, mon, day, hour, min, sec); |
| 156 | ts->tv_nsec = 0; | ||
| 156 | } | 157 | } |
| 157 | 158 | ||
| 158 | 159 | ||
diff --git a/arch/alpha/lib/ev67-strrchr.S b/arch/alpha/lib/ev67-strrchr.S index 3fd8bf414c7b..dd0d8c6b9f59 100644 --- a/arch/alpha/lib/ev67-strrchr.S +++ b/arch/alpha/lib/ev67-strrchr.S | |||
| @@ -82,7 +82,7 @@ $loop: | |||
| 82 | $eos: | 82 | $eos: |
| 83 | negq t1, t4 # E : isolate first null byte match | 83 | negq t1, t4 # E : isolate first null byte match |
| 84 | and t1, t4, t4 # E : | 84 | and t1, t4, t4 # E : |
| 85 | subq t4, 1, t5 # E : build a mask of the bytes upto... | 85 | subq t4, 1, t5 # E : build a mask of the bytes up to... |
| 86 | or t4, t5, t4 # E : ... and including the null | 86 | or t4, t5, t4 # E : ... and including the null |
| 87 | 87 | ||
| 88 | and t3, t4, t3 # E : mask out char matches after null | 88 | and t3, t4, t3 # E : mask out char matches after null |
diff --git a/arch/alpha/lib/fls.c b/arch/alpha/lib/fls.c index 32afaa3fa686..ddd048c0d825 100644 --- a/arch/alpha/lib/fls.c +++ b/arch/alpha/lib/fls.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | #include <linux/bitops.h> | 6 | #include <linux/bitops.h> |
| 7 | 7 | ||
| 8 | /* This is fls(x)-1, except zero is held to zero. This allows most | 8 | /* This is fls(x)-1, except zero is held to zero. This allows most |
| 9 | efficent input into extbl, plus it allows easy handling of fls(0)=0. */ | 9 | efficient input into extbl, plus it allows easy handling of fls(0)=0. */ |
| 10 | 10 | ||
| 11 | const unsigned char __flsm1_tab[256] = | 11 | const unsigned char __flsm1_tab[256] = |
| 12 | { | 12 | { |
diff --git a/arch/alpha/lib/strrchr.S b/arch/alpha/lib/strrchr.S index 82cfd0ac907b..1970dc07cfd1 100644 --- a/arch/alpha/lib/strrchr.S +++ b/arch/alpha/lib/strrchr.S | |||
| @@ -54,7 +54,7 @@ $loop: | |||
| 54 | $eos: | 54 | $eos: |
| 55 | negq t1, t4 # e0 : isolate first null byte match | 55 | negq t1, t4 # e0 : isolate first null byte match |
| 56 | and t1, t4, t4 # e1 : | 56 | and t1, t4, t4 # e1 : |
| 57 | subq t4, 1, t5 # e0 : build a mask of the bytes upto... | 57 | subq t4, 1, t5 # e0 : build a mask of the bytes up to... |
| 58 | or t4, t5, t4 # e1 : ... and including the null | 58 | or t4, t5, t4 # e1 : ... and including the null |
| 59 | 59 | ||
| 60 | and t3, t4, t3 # e0 : mask out char matches after null | 60 | and t3, t4, t3 # e0 : mask out char matches after null |
diff --git a/arch/alpha/oprofile/op_model_ev67.c b/arch/alpha/oprofile/op_model_ev67.c index 70302086283c..5b9d178e0228 100644 --- a/arch/alpha/oprofile/op_model_ev67.c +++ b/arch/alpha/oprofile/op_model_ev67.c | |||
| @@ -192,7 +192,7 @@ ev67_handle_interrupt(unsigned long which, struct pt_regs *regs, | |||
| 192 | case TRAP_INVALID1: | 192 | case TRAP_INVALID1: |
| 193 | case TRAP_INVALID2: | 193 | case TRAP_INVALID2: |
| 194 | case TRAP_INVALID3: | 194 | case TRAP_INVALID3: |
| 195 | /* Pipeline redirection ocurred. PMPC points | 195 | /* Pipeline redirection occurred. PMPC points |
| 196 | to PALcode. Recognize ITB miss by PALcode | 196 | to PALcode. Recognize ITB miss by PALcode |
| 197 | offset address, and get actual PC from | 197 | offset address, and get actual PC from |
| 198 | EXC_ADDR. */ | 198 | EXC_ADDR. */ |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7c0effb69fc7..377a7a595b08 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
| @@ -366,6 +366,7 @@ config ARCH_MXC | |||
| 366 | select GENERIC_CLOCKEVENTS | 366 | select GENERIC_CLOCKEVENTS |
| 367 | select ARCH_REQUIRE_GPIOLIB | 367 | select ARCH_REQUIRE_GPIOLIB |
| 368 | select CLKDEV_LOOKUP | 368 | select CLKDEV_LOOKUP |
| 369 | select HAVE_SCHED_CLOCK | ||
| 369 | help | 370 | help |
| 370 | Support for Freescale MXC/iMX-based family of processors | 371 | Support for Freescale MXC/iMX-based family of processors |
| 371 | 372 | ||
| @@ -693,7 +694,7 @@ config ARCH_S3C2410 | |||
| 693 | the Samsung SMDK2410 development board (and derivatives). | 694 | the Samsung SMDK2410 development board (and derivatives). |
| 694 | 695 | ||
| 695 | Note, the S3C2416 and the S3C2450 are so close that they even share | 696 | Note, the S3C2416 and the S3C2450 are so close that they even share |
| 696 | the same SoC ID code. This means that there is no seperate machine | 697 | the same SoC ID code. This means that there is no separate machine |
| 697 | directory (no arch/arm/mach-s3c2450) as the S3C2416 was first. | 698 | directory (no arch/arm/mach-s3c2450) as the S3C2416 was first. |
| 698 | 699 | ||
| 699 | config ARCH_S3C64XX | 700 | config ARCH_S3C64XX |
| @@ -1539,7 +1540,6 @@ config HIGHMEM | |||
| 1539 | config HIGHPTE | 1540 | config HIGHPTE |
| 1540 | bool "Allocate 2nd-level pagetables from highmem" | 1541 | bool "Allocate 2nd-level pagetables from highmem" |
| 1541 | depends on HIGHMEM | 1542 | depends on HIGHMEM |
| 1542 | depends on !OUTER_CACHE | ||
| 1543 | 1543 | ||
| 1544 | config HW_PERF_EVENTS | 1544 | config HW_PERF_EVENTS |
| 1545 | bool "Enable hardware performance counter support for perf events" | 1545 | bool "Enable hardware performance counter support for perf events" |
| @@ -2011,6 +2011,8 @@ source "kernel/power/Kconfig" | |||
| 2011 | 2011 | ||
| 2012 | config ARCH_SUSPEND_POSSIBLE | 2012 | config ARCH_SUSPEND_POSSIBLE |
| 2013 | depends on !ARCH_S5P64X0 && !ARCH_S5P6442 | 2013 | depends on !ARCH_S5P64X0 && !ARCH_S5P6442 |
| 2014 | depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \ | ||
| 2015 | CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE | ||
| 2014 | def_bool y | 2016 | def_bool y |
| 2015 | 2017 | ||
| 2016 | endmenu | 2018 | endmenu |
diff --git a/arch/arm/Kconfig-nommu b/arch/arm/Kconfig-nommu index 901e6dff8437..2cef8e13f9f8 100644 --- a/arch/arm/Kconfig-nommu +++ b/arch/arm/Kconfig-nommu | |||
| @@ -34,7 +34,7 @@ config PROCESSOR_ID | |||
| 34 | used instead of the auto-probing which utilizes the register. | 34 | used instead of the auto-probing which utilizes the register. |
| 35 | 35 | ||
| 36 | config REMAP_VECTORS_TO_RAM | 36 | config REMAP_VECTORS_TO_RAM |
| 37 | bool 'Install vectors to the begining of RAM' if DRAM_BASE | 37 | bool 'Install vectors to the beginning of RAM' if DRAM_BASE |
| 38 | depends on DRAM_BASE | 38 | depends on DRAM_BASE |
| 39 | help | 39 | help |
| 40 | The kernel needs to change the hardware exception vectors. | 40 | The kernel needs to change the hardware exception vectors. |
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 494224a9b459..03d01d783e3b 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
| @@ -63,17 +63,6 @@ config DEBUG_USER | |||
| 63 | 8 - SIGSEGV faults | 63 | 8 - SIGSEGV faults |
| 64 | 16 - SIGBUS faults | 64 | 16 - SIGBUS faults |
| 65 | 65 | ||
| 66 | config DEBUG_ERRORS | ||
| 67 | bool "Verbose kernel error messages" | ||
| 68 | depends on DEBUG_KERNEL | ||
| 69 | help | ||
| 70 | This option controls verbose debugging information which can be | ||
| 71 | printed when the kernel detects an internal error. This debugging | ||
| 72 | information is useful to kernel hackers when tracking down problems, | ||
| 73 | but mostly meaningless to other people. It's safe to say Y unless | ||
| 74 | you are concerned with the code size or don't want to see these | ||
| 75 | messages. | ||
| 76 | |||
| 77 | config DEBUG_STACK_USAGE | 66 | config DEBUG_STACK_USAGE |
| 78 | bool "Enable stack utilization instrumentation" | 67 | bool "Enable stack utilization instrumentation" |
| 79 | depends on DEBUG_KERNEL | 68 | depends on DEBUG_KERNEL |
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 84ac4d656310..adf583cd0c35 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
| @@ -21,20 +21,12 @@ | |||
| 21 | 21 | ||
| 22 | #if defined(CONFIG_DEBUG_ICEDCC) | 22 | #if defined(CONFIG_DEBUG_ICEDCC) |
| 23 | 23 | ||
| 24 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) | 24 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7) |
| 25 | .macro loadsp, rb, tmp | 25 | .macro loadsp, rb, tmp |
| 26 | .endm | 26 | .endm |
| 27 | .macro writeb, ch, rb | 27 | .macro writeb, ch, rb |
| 28 | mcr p14, 0, \ch, c0, c5, 0 | 28 | mcr p14, 0, \ch, c0, c5, 0 |
| 29 | .endm | 29 | .endm |
| 30 | #elif defined(CONFIG_CPU_V7) | ||
| 31 | .macro loadsp, rb, tmp | ||
| 32 | .endm | ||
| 33 | .macro writeb, ch, rb | ||
| 34 | wait: mrc p14, 0, pc, c0, c1, 0 | ||
| 35 | bcs wait | ||
| 36 | mcr p14, 0, \ch, c0, c5, 0 | ||
| 37 | .endm | ||
| 38 | #elif defined(CONFIG_CPU_XSCALE) | 30 | #elif defined(CONFIG_CPU_XSCALE) |
| 39 | .macro loadsp, rb, tmp | 31 | .macro loadsp, rb, tmp |
| 40 | .endm | 32 | .endm |
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index 4657e877bf8f..2df38263124c 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c | |||
| @@ -36,7 +36,7 @@ extern void error(char *x); | |||
| 36 | 36 | ||
| 37 | #ifdef CONFIG_DEBUG_ICEDCC | 37 | #ifdef CONFIG_DEBUG_ICEDCC |
| 38 | 38 | ||
| 39 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) | 39 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7) |
| 40 | 40 | ||
| 41 | static void icedcc_putc(int ch) | 41 | static void icedcc_putc(int ch) |
| 42 | { | 42 | { |
| @@ -52,16 +52,6 @@ static void icedcc_putc(int ch) | |||
| 52 | asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch)); | 52 | asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch)); |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | #elif defined(CONFIG_CPU_V7) | ||
| 56 | |||
| 57 | static void icedcc_putc(int ch) | ||
| 58 | { | ||
| 59 | asm( | ||
| 60 | "wait: mrc p14, 0, pc, c0, c1, 0 \n\ | ||
| 61 | bcs wait \n\ | ||
| 62 | mcr p14, 0, %0, c0, c5, 0 " | ||
| 63 | : : "r" (ch)); | ||
| 64 | } | ||
| 65 | 55 | ||
| 66 | #elif defined(CONFIG_CPU_XSCALE) | 56 | #elif defined(CONFIG_CPU_XSCALE) |
| 67 | 57 | ||
diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile index e7521bca2c35..6ea9b6f3607a 100644 --- a/arch/arm/common/Makefile +++ b/arch/arm/common/Makefile | |||
| @@ -16,5 +16,4 @@ obj-$(CONFIG_SHARP_SCOOP) += scoop.o | |||
| 16 | obj-$(CONFIG_ARCH_IXP2000) += uengine.o | 16 | obj-$(CONFIG_ARCH_IXP2000) += uengine.o |
| 17 | obj-$(CONFIG_ARCH_IXP23XX) += uengine.o | 17 | obj-$(CONFIG_ARCH_IXP23XX) += uengine.o |
| 18 | obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o | 18 | obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o |
| 19 | obj-$(CONFIG_COMMON_CLKDEV) += clkdev.o | ||
| 20 | obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o | 19 | obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o |
diff --git a/arch/arm/common/pl330.c b/arch/arm/common/pl330.c index 8f0f86db3602..97912fa48782 100644 --- a/arch/arm/common/pl330.c +++ b/arch/arm/common/pl330.c | |||
| @@ -1045,7 +1045,7 @@ static inline int _loop(unsigned dry_run, u8 buf[], | |||
| 1045 | unsigned lcnt0, lcnt1, ljmp0, ljmp1; | 1045 | unsigned lcnt0, lcnt1, ljmp0, ljmp1; |
| 1046 | struct _arg_LPEND lpend; | 1046 | struct _arg_LPEND lpend; |
| 1047 | 1047 | ||
| 1048 | /* Max iterations possibile in DMALP is 256 */ | 1048 | /* Max iterations possible in DMALP is 256 */ |
| 1049 | if (*bursts >= 256*256) { | 1049 | if (*bursts >= 256*256) { |
| 1050 | lcnt1 = 256; | 1050 | lcnt1 = 256; |
| 1051 | lcnt0 = 256; | 1051 | lcnt0 = 256; |
| @@ -1446,7 +1446,7 @@ int pl330_update(const struct pl330_info *pi) | |||
| 1446 | } | 1446 | } |
| 1447 | 1447 | ||
| 1448 | for (ev = 0; ev < pi->pcfg.num_events; ev++) { | 1448 | for (ev = 0; ev < pi->pcfg.num_events; ev++) { |
| 1449 | if (val & (1 << ev)) { /* Event occured */ | 1449 | if (val & (1 << ev)) { /* Event occurred */ |
| 1450 | struct pl330_thread *thrd; | 1450 | struct pl330_thread *thrd; |
| 1451 | u32 inten = readl(regs + INTEN); | 1451 | u32 inten = readl(regs + INTEN); |
| 1452 | int active; | 1452 | int active; |
diff --git a/arch/arm/include/asm/fpstate.h b/arch/arm/include/asm/fpstate.h index ee5e03efc1bb..3ad4c10d0d84 100644 --- a/arch/arm/include/asm/fpstate.h +++ b/arch/arm/include/asm/fpstate.h | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | * VFP storage area has: | 18 | * VFP storage area has: |
| 19 | * - FPEXC, FPSCR, FPINST and FPINST2. | 19 | * - FPEXC, FPSCR, FPINST and FPINST2. |
| 20 | * - 16 or 32 double precision data registers | 20 | * - 16 or 32 double precision data registers |
| 21 | * - an implementation-dependant word of state for FLDMX/FSTMX (pre-ARMv6) | 21 | * - an implementation-dependent word of state for FLDMX/FSTMX (pre-ARMv6) |
| 22 | * | 22 | * |
| 23 | * FPEXC will always be non-zero once the VFP has been used in this process. | 23 | * FPEXC will always be non-zero once the VFP has been used in this process. |
| 24 | */ | 24 | */ |
diff --git a/arch/arm/include/asm/glue-cache.h b/arch/arm/include/asm/glue-cache.h index c7afbc552c7f..7e30874377e6 100644 --- a/arch/arm/include/asm/glue-cache.h +++ b/arch/arm/include/asm/glue-cache.h | |||
| @@ -126,7 +126,7 @@ | |||
| 126 | #endif | 126 | #endif |
| 127 | 127 | ||
| 128 | #if !defined(_CACHE) && !defined(MULTI_CACHE) | 128 | #if !defined(_CACHE) && !defined(MULTI_CACHE) |
| 129 | #error Unknown cache maintainence model | 129 | #error Unknown cache maintenance model |
| 130 | #endif | 130 | #endif |
| 131 | 131 | ||
| 132 | #ifndef MULTI_CACHE | 132 | #ifndef MULTI_CACHE |
diff --git a/arch/arm/include/asm/glue.h b/arch/arm/include/asm/glue.h index 0ec35d1698aa..fbf71d75ec83 100644 --- a/arch/arm/include/asm/glue.h +++ b/arch/arm/include/asm/glue.h | |||
| @@ -10,8 +10,8 @@ | |||
| 10 | * | 10 | * |
| 11 | * This file provides the glue to stick the processor-specific bits | 11 | * This file provides the glue to stick the processor-specific bits |
| 12 | * into the kernel in an efficient manner. The idea is to use branches | 12 | * into the kernel in an efficient manner. The idea is to use branches |
| 13 | * when we're only targetting one class of TLB, or indirect calls | 13 | * when we're only targeting one class of TLB, or indirect calls |
| 14 | * when we're targetting multiple classes of TLBs. | 14 | * when we're targeting multiple classes of TLBs. |
| 15 | */ | 15 | */ |
| 16 | #ifdef __KERNEL__ | 16 | #ifdef __KERNEL__ |
| 17 | 17 | ||
diff --git a/arch/arm/include/asm/hardware/pl080.h b/arch/arm/include/asm/hardware/pl080.h index f35b86e68dd5..e4a04e4e5627 100644 --- a/arch/arm/include/asm/hardware/pl080.h +++ b/arch/arm/include/asm/hardware/pl080.h | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | * make it not entierly compatible with the PL080 specification from | 16 | * make it not entierly compatible with the PL080 specification from |
| 17 | * ARM. When in doubt, check the Samsung documentation first. | 17 | * ARM. When in doubt, check the Samsung documentation first. |
| 18 | * | 18 | * |
| 19 | * The Samsung defines are PL080S, and add an extra controll register, | 19 | * The Samsung defines are PL080S, and add an extra control register, |
| 20 | * the ability to move more than 2^11 counts of data and some extra | 20 | * the ability to move more than 2^11 counts of data and some extra |
| 21 | * OneNAND features. | 21 | * OneNAND features. |
| 22 | */ | 22 | */ |
diff --git a/arch/arm/include/asm/mach/udc_pxa2xx.h b/arch/arm/include/asm/mach/udc_pxa2xx.h index 833306ee9e7f..ea297ac70bc6 100644 --- a/arch/arm/include/asm/mach/udc_pxa2xx.h +++ b/arch/arm/include/asm/mach/udc_pxa2xx.h | |||
| @@ -20,8 +20,6 @@ struct pxa2xx_udc_mach_info { | |||
| 20 | * VBUS IRQ and omit the methods above. Store the GPIO number | 20 | * VBUS IRQ and omit the methods above. Store the GPIO number |
| 21 | * here. Note that sometimes the signals go through inverters... | 21 | * here. Note that sometimes the signals go through inverters... |
| 22 | */ | 22 | */ |
| 23 | bool gpio_vbus_inverted; | ||
| 24 | int gpio_vbus; /* high == vbus present */ | ||
| 25 | bool gpio_pullup_inverted; | 23 | bool gpio_pullup_inverted; |
| 26 | int gpio_pullup; /* high == pullup activated */ | 24 | int gpio_pullup; /* high == pullup activated */ |
| 27 | }; | 25 | }; |
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 9a87823642d0..885be097769d 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h | |||
| @@ -249,7 +249,7 @@ do { \ | |||
| 249 | * cache totally. This means that the cache becomes inconsistent, and, | 249 | * cache totally. This means that the cache becomes inconsistent, and, |
| 250 | * since we use normal loads/stores as well, this is really bad. | 250 | * since we use normal loads/stores as well, this is really bad. |
| 251 | * Typically, this causes oopsen in filp_close, but could have other, | 251 | * Typically, this causes oopsen in filp_close, but could have other, |
| 252 | * more disasterous effects. There are two work-arounds: | 252 | * more disastrous effects. There are two work-arounds: |
| 253 | * 1. Disable interrupts and emulate the atomic swap | 253 | * 1. Disable interrupts and emulate the atomic swap |
| 254 | * 2. Clean the cache, perform atomic swap, flush the cache | 254 | * 2. Clean the cache, perform atomic swap, flush the cache |
| 255 | * | 255 | * |
diff --git a/arch/arm/include/asm/thread_notify.h b/arch/arm/include/asm/thread_notify.h index c4391ba20350..1dc980675894 100644 --- a/arch/arm/include/asm/thread_notify.h +++ b/arch/arm/include/asm/thread_notify.h | |||
| @@ -43,6 +43,7 @@ static inline void thread_notify(unsigned long rc, struct thread_info *thread) | |||
| 43 | #define THREAD_NOTIFY_FLUSH 0 | 43 | #define THREAD_NOTIFY_FLUSH 0 |
| 44 | #define THREAD_NOTIFY_EXIT 1 | 44 | #define THREAD_NOTIFY_EXIT 1 |
| 45 | #define THREAD_NOTIFY_SWITCH 2 | 45 | #define THREAD_NOTIFY_SWITCH 2 |
| 46 | #define THREAD_NOTIFY_COPY 3 | ||
| 46 | 47 | ||
| 47 | #endif | 48 | #endif |
| 48 | #endif | 49 | #endif |
diff --git a/arch/arm/include/asm/ucontext.h b/arch/arm/include/asm/ucontext.h index 47f023aa8495..14749aec94bf 100644 --- a/arch/arm/include/asm/ucontext.h +++ b/arch/arm/include/asm/ucontext.h | |||
| @@ -47,7 +47,7 @@ struct crunch_sigframe { | |||
| 47 | #endif | 47 | #endif |
| 48 | 48 | ||
| 49 | #ifdef CONFIG_IWMMXT | 49 | #ifdef CONFIG_IWMMXT |
| 50 | /* iwmmxt_area is 0x98 bytes long, preceeded by 8 bytes of signature */ | 50 | /* iwmmxt_area is 0x98 bytes long, preceded by 8 bytes of signature */ |
| 51 | #define IWMMXT_MAGIC 0x12ef842a | 51 | #define IWMMXT_MAGIC 0x12ef842a |
| 52 | #define IWMMXT_STORAGE_SIZE (IWMMXT_SIZE + 8) | 52 | #define IWMMXT_STORAGE_SIZE (IWMMXT_SIZE + 8) |
| 53 | 53 | ||
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 74554f1742d7..8d95446150a3 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
| @@ -29,7 +29,7 @@ obj-$(CONFIG_MODULES) += armksyms.o module.o | |||
| 29 | obj-$(CONFIG_ARTHUR) += arthur.o | 29 | obj-$(CONFIG_ARTHUR) += arthur.o |
| 30 | obj-$(CONFIG_ISA_DMA) += dma-isa.o | 30 | obj-$(CONFIG_ISA_DMA) += dma-isa.o |
| 31 | obj-$(CONFIG_PCI) += bios32.o isa.o | 31 | obj-$(CONFIG_PCI) += bios32.o isa.o |
| 32 | obj-$(CONFIG_PM) += sleep.o | 32 | obj-$(CONFIG_PM_SLEEP) += sleep.o |
| 33 | obj-$(CONFIG_HAVE_SCHED_CLOCK) += sched_clock.o | 33 | obj-$(CONFIG_HAVE_SCHED_CLOCK) += sched_clock.o |
| 34 | obj-$(CONFIG_SMP) += smp.o smp_tlb.o | 34 | obj-$(CONFIG_SMP) += smp.o smp_tlb.o |
| 35 | obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o | 35 | obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o |
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S index d2d983be096d..bcd66e00bdbe 100644 --- a/arch/arm/kernel/debug.S +++ b/arch/arm/kernel/debug.S | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | .macro addruart, rp, rv | 25 | .macro addruart, rp, rv |
| 26 | .endm | 26 | .endm |
| 27 | 27 | ||
| 28 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) | 28 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7) |
| 29 | 29 | ||
| 30 | .macro senduart, rd, rx | 30 | .macro senduart, rd, rx |
| 31 | mcr p14, 0, \rd, c0, c5, 0 | 31 | mcr p14, 0, \rd, c0, c5, 0 |
| @@ -49,23 +49,6 @@ | |||
| 49 | 1002: | 49 | 1002: |
| 50 | .endm | 50 | .endm |
| 51 | 51 | ||
| 52 | #elif defined(CONFIG_CPU_V7) | ||
| 53 | |||
| 54 | .macro senduart, rd, rx | ||
| 55 | mcr p14, 0, \rd, c0, c5, 0 | ||
| 56 | .endm | ||
| 57 | |||
| 58 | .macro busyuart, rd, rx | ||
| 59 | busy: mrc p14, 0, pc, c0, c1, 0 | ||
| 60 | bcs busy | ||
| 61 | .endm | ||
| 62 | |||
| 63 | .macro waituart, rd, rx | ||
| 64 | wait: mrc p14, 0, pc, c0, c1, 0 | ||
| 65 | bcs wait | ||
| 66 | |||
| 67 | .endm | ||
| 68 | |||
| 69 | #elif defined(CONFIG_CPU_XSCALE) | 52 | #elif defined(CONFIG_CPU_XSCALE) |
| 70 | 53 | ||
| 71 | .macro senduart, rd, rx | 54 | .macro senduart, rd, rx |
diff --git a/arch/arm/kernel/elf.c b/arch/arm/kernel/elf.c index d4a0da1e48f4..9b05c6a0dcea 100644 --- a/arch/arm/kernel/elf.c +++ b/arch/arm/kernel/elf.c | |||
| @@ -40,15 +40,22 @@ EXPORT_SYMBOL(elf_check_arch); | |||
| 40 | void elf_set_personality(const struct elf32_hdr *x) | 40 | void elf_set_personality(const struct elf32_hdr *x) |
| 41 | { | 41 | { |
| 42 | unsigned int eflags = x->e_flags; | 42 | unsigned int eflags = x->e_flags; |
| 43 | unsigned int personality = PER_LINUX_32BIT; | 43 | unsigned int personality = current->personality & ~PER_MASK; |
| 44 | |||
| 45 | /* | ||
| 46 | * We only support Linux ELF executables, so always set the | ||
| 47 | * personality to LINUX. | ||
| 48 | */ | ||
| 49 | personality |= PER_LINUX; | ||
| 44 | 50 | ||
| 45 | /* | 51 | /* |
| 46 | * APCS-26 is only valid for OABI executables | 52 | * APCS-26 is only valid for OABI executables |
| 47 | */ | 53 | */ |
| 48 | if ((eflags & EF_ARM_EABI_MASK) == EF_ARM_EABI_UNKNOWN) { | 54 | if ((eflags & EF_ARM_EABI_MASK) == EF_ARM_EABI_UNKNOWN && |
| 49 | if (eflags & EF_ARM_APCS_26) | 55 | (eflags & EF_ARM_APCS_26)) |
| 50 | personality = PER_LINUX; | 56 | personality &= ~ADDR_LIMIT_32BIT; |
| 51 | } | 57 | else |
| 58 | personality |= ADDR_LIMIT_32BIT; | ||
| 52 | 59 | ||
| 53 | set_personality(personality); | 60 | set_personality(personality); |
| 54 | 61 | ||
diff --git a/arch/arm/kernel/etm.c b/arch/arm/kernel/etm.c index 052b509e2d5f..1bec8b5f22f0 100644 --- a/arch/arm/kernel/etm.c +++ b/arch/arm/kernel/etm.c | |||
| @@ -338,7 +338,7 @@ static struct miscdevice etb_miscdev = { | |||
| 338 | .fops = &etb_fops, | 338 | .fops = &etb_fops, |
| 339 | }; | 339 | }; |
| 340 | 340 | ||
| 341 | static int __init etb_probe(struct amba_device *dev, const struct amba_id *id) | 341 | static int __devinit etb_probe(struct amba_device *dev, const struct amba_id *id) |
| 342 | { | 342 | { |
| 343 | struct tracectx *t = &tracer; | 343 | struct tracectx *t = &tracer; |
| 344 | int ret = 0; | 344 | int ret = 0; |
| @@ -530,7 +530,7 @@ static ssize_t trace_mode_store(struct kobject *kobj, | |||
| 530 | static struct kobj_attribute trace_mode_attr = | 530 | static struct kobj_attribute trace_mode_attr = |
| 531 | __ATTR(trace_mode, 0644, trace_mode_show, trace_mode_store); | 531 | __ATTR(trace_mode, 0644, trace_mode_show, trace_mode_store); |
| 532 | 532 | ||
| 533 | static int __init etm_probe(struct amba_device *dev, const struct amba_id *id) | 533 | static int __devinit etm_probe(struct amba_device *dev, const struct amba_id *id) |
| 534 | { | 534 | { |
| 535 | struct tracectx *t = &tracer; | 535 | struct tracectx *t = &tracer; |
| 536 | int ret = 0; | 536 | int ret = 0; |
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c index 8dbc126f7152..87acc25d7a3e 100644 --- a/arch/arm/kernel/hw_breakpoint.c +++ b/arch/arm/kernel/hw_breakpoint.c | |||
| @@ -868,6 +868,13 @@ static void reset_ctrl_regs(void *info) | |||
| 868 | */ | 868 | */ |
| 869 | asm volatile("mcr p14, 0, %0, c1, c0, 4" : : "r" (0)); | 869 | asm volatile("mcr p14, 0, %0, c1, c0, 4" : : "r" (0)); |
| 870 | isb(); | 870 | isb(); |
| 871 | |||
| 872 | /* | ||
| 873 | * Clear any configured vector-catch events before | ||
| 874 | * enabling monitor mode. | ||
| 875 | */ | ||
| 876 | asm volatile("mcr p14, 0, %0, c0, c7, 0" : : "r" (0)); | ||
| 877 | isb(); | ||
| 871 | } | 878 | } |
| 872 | 879 | ||
| 873 | if (enable_monitor_mode()) | 880 | if (enable_monitor_mode()) |
diff --git a/arch/arm/kernel/kprobes-decode.c b/arch/arm/kernel/kprobes-decode.c index 8f6ed43861f1..23891317dc4b 100644 --- a/arch/arm/kernel/kprobes-decode.c +++ b/arch/arm/kernel/kprobes-decode.c | |||
| @@ -594,7 +594,8 @@ static void __kprobes emulate_ldr(struct kprobe *p, struct pt_regs *regs) | |||
| 594 | long cpsr = regs->ARM_cpsr; | 594 | long cpsr = regs->ARM_cpsr; |
| 595 | 595 | ||
| 596 | fnr.dr = insnslot_llret_3arg_rflags(rnv, 0, rmv, cpsr, i_fn); | 596 | fnr.dr = insnslot_llret_3arg_rflags(rnv, 0, rmv, cpsr, i_fn); |
| 597 | regs->uregs[rn] = fnr.r0; /* Save Rn in case of writeback. */ | 597 | if (rn != 15) |
| 598 | regs->uregs[rn] = fnr.r0; /* Save Rn in case of writeback. */ | ||
| 598 | rdv = fnr.r1; | 599 | rdv = fnr.r1; |
| 599 | 600 | ||
| 600 | if (rd == 15) { | 601 | if (rd == 15) { |
| @@ -622,10 +623,11 @@ static void __kprobes emulate_str(struct kprobe *p, struct pt_regs *regs) | |||
| 622 | long rdv = (rd == 15) ? iaddr + str_pc_offset : regs->uregs[rd]; | 623 | long rdv = (rd == 15) ? iaddr + str_pc_offset : regs->uregs[rd]; |
| 623 | long rnv = (rn == 15) ? iaddr + 8 : regs->uregs[rn]; | 624 | long rnv = (rn == 15) ? iaddr + 8 : regs->uregs[rn]; |
| 624 | long rmv = regs->uregs[rm]; /* rm/rmv may be invalid, don't care. */ | 625 | long rmv = regs->uregs[rm]; /* rm/rmv may be invalid, don't care. */ |
| 626 | long rnv_wb; | ||
| 625 | 627 | ||
| 626 | /* Save Rn in case of writeback. */ | 628 | rnv_wb = insnslot_3arg_rflags(rnv, rdv, rmv, regs->ARM_cpsr, i_fn); |
| 627 | regs->uregs[rn] = | 629 | if (rn != 15) |
| 628 | insnslot_3arg_rflags(rnv, rdv, rmv, regs->ARM_cpsr, i_fn); | 630 | regs->uregs[rn] = rnv_wb; /* Save Rn in case of writeback. */ |
| 629 | } | 631 | } |
| 630 | 632 | ||
| 631 | static void __kprobes emulate_mrrc(struct kprobe *p, struct pt_regs *regs) | 633 | static void __kprobes emulate_mrrc(struct kprobe *p, struct pt_regs *regs) |
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 22e194eb8536..979da3947f42 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
| @@ -79,6 +79,7 @@ struct arm_pmu { | |||
| 79 | void (*write_counter)(int idx, u32 val); | 79 | void (*write_counter)(int idx, u32 val); |
| 80 | void (*start)(void); | 80 | void (*start)(void); |
| 81 | void (*stop)(void); | 81 | void (*stop)(void); |
| 82 | void (*reset)(void *); | ||
| 82 | const unsigned (*cache_map)[PERF_COUNT_HW_CACHE_MAX] | 83 | const unsigned (*cache_map)[PERF_COUNT_HW_CACHE_MAX] |
| 83 | [PERF_COUNT_HW_CACHE_OP_MAX] | 84 | [PERF_COUNT_HW_CACHE_OP_MAX] |
| 84 | [PERF_COUNT_HW_CACHE_RESULT_MAX]; | 85 | [PERF_COUNT_HW_CACHE_RESULT_MAX]; |
| @@ -204,11 +205,9 @@ armpmu_event_set_period(struct perf_event *event, | |||
| 204 | static u64 | 205 | static u64 |
| 205 | armpmu_event_update(struct perf_event *event, | 206 | armpmu_event_update(struct perf_event *event, |
| 206 | struct hw_perf_event *hwc, | 207 | struct hw_perf_event *hwc, |
| 207 | int idx) | 208 | int idx, int overflow) |
| 208 | { | 209 | { |
| 209 | int shift = 64 - 32; | 210 | u64 delta, prev_raw_count, new_raw_count; |
| 210 | s64 prev_raw_count, new_raw_count; | ||
| 211 | u64 delta; | ||
| 212 | 211 | ||
| 213 | again: | 212 | again: |
| 214 | prev_raw_count = local64_read(&hwc->prev_count); | 213 | prev_raw_count = local64_read(&hwc->prev_count); |
| @@ -218,8 +217,13 @@ again: | |||
| 218 | new_raw_count) != prev_raw_count) | 217 | new_raw_count) != prev_raw_count) |
| 219 | goto again; | 218 | goto again; |
| 220 | 219 | ||
| 221 | delta = (new_raw_count << shift) - (prev_raw_count << shift); | 220 | new_raw_count &= armpmu->max_period; |
| 222 | delta >>= shift; | 221 | prev_raw_count &= armpmu->max_period; |
| 222 | |||
| 223 | if (overflow) | ||
| 224 | delta = armpmu->max_period - prev_raw_count + new_raw_count + 1; | ||
| 225 | else | ||
| 226 | delta = new_raw_count - prev_raw_count; | ||
| 223 | 227 | ||
| 224 | local64_add(delta, &event->count); | 228 | local64_add(delta, &event->count); |
| 225 | local64_sub(delta, &hwc->period_left); | 229 | local64_sub(delta, &hwc->period_left); |
| @@ -236,7 +240,7 @@ armpmu_read(struct perf_event *event) | |||
| 236 | if (hwc->idx < 0) | 240 | if (hwc->idx < 0) |
| 237 | return; | 241 | return; |
| 238 | 242 | ||
| 239 | armpmu_event_update(event, hwc, hwc->idx); | 243 | armpmu_event_update(event, hwc, hwc->idx, 0); |
| 240 | } | 244 | } |
| 241 | 245 | ||
| 242 | static void | 246 | static void |
| @@ -254,7 +258,7 @@ armpmu_stop(struct perf_event *event, int flags) | |||
| 254 | if (!(hwc->state & PERF_HES_STOPPED)) { | 258 | if (!(hwc->state & PERF_HES_STOPPED)) { |
| 255 | armpmu->disable(hwc, hwc->idx); | 259 | armpmu->disable(hwc, hwc->idx); |
| 256 | barrier(); /* why? */ | 260 | barrier(); /* why? */ |
| 257 | armpmu_event_update(event, hwc, hwc->idx); | 261 | armpmu_event_update(event, hwc, hwc->idx, 0); |
| 258 | hwc->state |= PERF_HES_STOPPED | PERF_HES_UPTODATE; | 262 | hwc->state |= PERF_HES_STOPPED | PERF_HES_UPTODATE; |
| 259 | } | 263 | } |
| 260 | } | 264 | } |
| @@ -624,6 +628,19 @@ static struct pmu pmu = { | |||
| 624 | #include "perf_event_v6.c" | 628 | #include "perf_event_v6.c" |
| 625 | #include "perf_event_v7.c" | 629 | #include "perf_event_v7.c" |
| 626 | 630 | ||
| 631 | /* | ||
| 632 | * Ensure the PMU has sane values out of reset. | ||
| 633 | * This requires SMP to be available, so exists as a separate initcall. | ||
| 634 | */ | ||
| 635 | static int __init | ||
| 636 | armpmu_reset(void) | ||
| 637 | { | ||
| 638 | if (armpmu && armpmu->reset) | ||
| 639 | return on_each_cpu(armpmu->reset, NULL, 1); | ||
| 640 | return 0; | ||
| 641 | } | ||
| 642 | arch_initcall(armpmu_reset); | ||
| 643 | |||
| 627 | static int __init | 644 | static int __init |
| 628 | init_hw_perf_events(void) | 645 | init_hw_perf_events(void) |
| 629 | { | 646 | { |
diff --git a/arch/arm/kernel/perf_event_v6.c b/arch/arm/kernel/perf_event_v6.c index 6fc2d228db55..f1e8dd94afe8 100644 --- a/arch/arm/kernel/perf_event_v6.c +++ b/arch/arm/kernel/perf_event_v6.c | |||
| @@ -474,7 +474,7 @@ armv6pmu_handle_irq(int irq_num, | |||
| 474 | continue; | 474 | continue; |
| 475 | 475 | ||
| 476 | hwc = &event->hw; | 476 | hwc = &event->hw; |
| 477 | armpmu_event_update(event, hwc, idx); | 477 | armpmu_event_update(event, hwc, idx, 1); |
| 478 | data.period = event->hw.last_period; | 478 | data.period = event->hw.last_period; |
| 479 | if (!armpmu_event_set_period(event, hwc, idx)) | 479 | if (!armpmu_event_set_period(event, hwc, idx)) |
| 480 | continue; | 480 | continue; |
diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c index 2e1402556fa0..4960686afb58 100644 --- a/arch/arm/kernel/perf_event_v7.c +++ b/arch/arm/kernel/perf_event_v7.c | |||
| @@ -466,6 +466,7 @@ static inline unsigned long armv7_pmnc_read(void) | |||
| 466 | static inline void armv7_pmnc_write(unsigned long val) | 466 | static inline void armv7_pmnc_write(unsigned long val) |
| 467 | { | 467 | { |
| 468 | val &= ARMV7_PMNC_MASK; | 468 | val &= ARMV7_PMNC_MASK; |
| 469 | isb(); | ||
| 469 | asm volatile("mcr p15, 0, %0, c9, c12, 0" : : "r"(val)); | 470 | asm volatile("mcr p15, 0, %0, c9, c12, 0" : : "r"(val)); |
| 470 | } | 471 | } |
| 471 | 472 | ||
| @@ -502,6 +503,7 @@ static inline int armv7_pmnc_select_counter(unsigned int idx) | |||
| 502 | 503 | ||
| 503 | val = (idx - ARMV7_EVENT_CNT_TO_CNTx) & ARMV7_SELECT_MASK; | 504 | val = (idx - ARMV7_EVENT_CNT_TO_CNTx) & ARMV7_SELECT_MASK; |
| 504 | asm volatile("mcr p15, 0, %0, c9, c12, 5" : : "r" (val)); | 505 | asm volatile("mcr p15, 0, %0, c9, c12, 5" : : "r" (val)); |
| 506 | isb(); | ||
| 505 | 507 | ||
| 506 | return idx; | 508 | return idx; |
| 507 | } | 509 | } |
| @@ -780,7 +782,7 @@ static irqreturn_t armv7pmu_handle_irq(int irq_num, void *dev) | |||
| 780 | continue; | 782 | continue; |
| 781 | 783 | ||
| 782 | hwc = &event->hw; | 784 | hwc = &event->hw; |
| 783 | armpmu_event_update(event, hwc, idx); | 785 | armpmu_event_update(event, hwc, idx, 1); |
| 784 | data.period = event->hw.last_period; | 786 | data.period = event->hw.last_period; |
| 785 | if (!armpmu_event_set_period(event, hwc, idx)) | 787 | if (!armpmu_event_set_period(event, hwc, idx)) |
| 786 | continue; | 788 | continue; |
| @@ -847,6 +849,18 @@ static int armv7pmu_get_event_idx(struct cpu_hw_events *cpuc, | |||
| 847 | } | 849 | } |
| 848 | } | 850 | } |
| 849 | 851 | ||
| 852 | static void armv7pmu_reset(void *info) | ||
| 853 | { | ||
| 854 | u32 idx, nb_cnt = armpmu->num_events; | ||
| 855 | |||
| 856 | /* The counter and interrupt enable registers are unknown at reset. */ | ||
| 857 | for (idx = 1; idx < nb_cnt; ++idx) | ||
| 858 | armv7pmu_disable_event(NULL, idx); | ||
| 859 | |||
| 860 | /* Initialize & Reset PMNC: C and P bits */ | ||
| 861 | armv7_pmnc_write(ARMV7_PMNC_P | ARMV7_PMNC_C); | ||
| 862 | } | ||
| 863 | |||
| 850 | static struct arm_pmu armv7pmu = { | 864 | static struct arm_pmu armv7pmu = { |
| 851 | .handle_irq = armv7pmu_handle_irq, | 865 | .handle_irq = armv7pmu_handle_irq, |
| 852 | .enable = armv7pmu_enable_event, | 866 | .enable = armv7pmu_enable_event, |
| @@ -856,17 +870,15 @@ static struct arm_pmu armv7pmu = { | |||
| 856 | .get_event_idx = armv7pmu_get_event_idx, | 870 | .get_event_idx = armv7pmu_get_event_idx, |
| 857 | .start = armv7pmu_start, | 871 | .start = armv7pmu_start, |
| 858 | .stop = armv7pmu_stop, | 872 | .stop = armv7pmu_stop, |
| 873 | .reset = armv7pmu_reset, | ||
| 859 | .raw_event_mask = 0xFF, | 874 | .raw_event_mask = 0xFF, |
| 860 | .max_period = (1LLU << 32) - 1, | 875 | .max_period = (1LLU << 32) - 1, |
| 861 | }; | 876 | }; |
| 862 | 877 | ||
| 863 | static u32 __init armv7_reset_read_pmnc(void) | 878 | static u32 __init armv7_read_num_pmnc_events(void) |
| 864 | { | 879 | { |
| 865 | u32 nb_cnt; | 880 | u32 nb_cnt; |
| 866 | 881 | ||
| 867 | /* Initialize & Reset PMNC: C and P bits */ | ||
| 868 | armv7_pmnc_write(ARMV7_PMNC_P | ARMV7_PMNC_C); | ||
| 869 | |||
| 870 | /* Read the nb of CNTx counters supported from PMNC */ | 882 | /* Read the nb of CNTx counters supported from PMNC */ |
| 871 | nb_cnt = (armv7_pmnc_read() >> ARMV7_PMNC_N_SHIFT) & ARMV7_PMNC_N_MASK; | 883 | nb_cnt = (armv7_pmnc_read() >> ARMV7_PMNC_N_SHIFT) & ARMV7_PMNC_N_MASK; |
| 872 | 884 | ||
| @@ -880,7 +892,7 @@ static const struct arm_pmu *__init armv7_a8_pmu_init(void) | |||
| 880 | armv7pmu.name = "ARMv7 Cortex-A8"; | 892 | armv7pmu.name = "ARMv7 Cortex-A8"; |
| 881 | armv7pmu.cache_map = &armv7_a8_perf_cache_map; | 893 | armv7pmu.cache_map = &armv7_a8_perf_cache_map; |
| 882 | armv7pmu.event_map = &armv7_a8_perf_map; | 894 | armv7pmu.event_map = &armv7_a8_perf_map; |
| 883 | armv7pmu.num_events = armv7_reset_read_pmnc(); | 895 | armv7pmu.num_events = armv7_read_num_pmnc_events(); |
| 884 | return &armv7pmu; | 896 | return &armv7pmu; |
| 885 | } | 897 | } |
| 886 | 898 | ||
| @@ -890,7 +902,7 @@ static const struct arm_pmu *__init armv7_a9_pmu_init(void) | |||
| 890 | armv7pmu.name = "ARMv7 Cortex-A9"; | 902 | armv7pmu.name = "ARMv7 Cortex-A9"; |
| 891 | armv7pmu.cache_map = &armv7_a9_perf_cache_map; | 903 | armv7pmu.cache_map = &armv7_a9_perf_cache_map; |
| 892 | armv7pmu.event_map = &armv7_a9_perf_map; | 904 | armv7pmu.event_map = &armv7_a9_perf_map; |
| 893 | armv7pmu.num_events = armv7_reset_read_pmnc(); | 905 | armv7pmu.num_events = armv7_read_num_pmnc_events(); |
| 894 | return &armv7pmu; | 906 | return &armv7pmu; |
| 895 | } | 907 | } |
| 896 | #else | 908 | #else |
diff --git a/arch/arm/kernel/perf_event_xscale.c b/arch/arm/kernel/perf_event_xscale.c index 28cd3b025bc3..39affbe4fdb2 100644 --- a/arch/arm/kernel/perf_event_xscale.c +++ b/arch/arm/kernel/perf_event_xscale.c | |||
| @@ -246,7 +246,7 @@ xscale1pmu_handle_irq(int irq_num, void *dev) | |||
| 246 | continue; | 246 | continue; |
| 247 | 247 | ||
| 248 | hwc = &event->hw; | 248 | hwc = &event->hw; |
| 249 | armpmu_event_update(event, hwc, idx); | 249 | armpmu_event_update(event, hwc, idx, 1); |
| 250 | data.period = event->hw.last_period; | 250 | data.period = event->hw.last_period; |
| 251 | if (!armpmu_event_set_period(event, hwc, idx)) | 251 | if (!armpmu_event_set_period(event, hwc, idx)) |
| 252 | continue; | 252 | continue; |
| @@ -578,7 +578,7 @@ xscale2pmu_handle_irq(int irq_num, void *dev) | |||
| 578 | continue; | 578 | continue; |
| 579 | 579 | ||
| 580 | hwc = &event->hw; | 580 | hwc = &event->hw; |
| 581 | armpmu_event_update(event, hwc, idx); | 581 | armpmu_event_update(event, hwc, idx, 1); |
| 582 | data.period = event->hw.last_period; | 582 | data.period = event->hw.last_period; |
| 583 | if (!armpmu_event_set_period(event, hwc, idx)) | 583 | if (!armpmu_event_set_period(event, hwc, idx)) |
| 584 | continue; | 584 | continue; |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 94bbedbed639..5e1e54197227 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
| @@ -372,6 +372,8 @@ copy_thread(unsigned long clone_flags, unsigned long stack_start, | |||
| 372 | if (clone_flags & CLONE_SETTLS) | 372 | if (clone_flags & CLONE_SETTLS) |
| 373 | thread->tp_value = regs->ARM_r3; | 373 | thread->tp_value = regs->ARM_r3; |
| 374 | 374 | ||
| 375 | thread_notify(THREAD_NOTIFY_COPY, thread); | ||
| 376 | |||
| 375 | return 0; | 377 | return 0; |
| 376 | } | 378 | } |
| 377 | 379 | ||
diff --git a/arch/arm/kernel/sleep.S b/arch/arm/kernel/sleep.S index bfad698a02e7..6398ead9d1c0 100644 --- a/arch/arm/kernel/sleep.S +++ b/arch/arm/kernel/sleep.S | |||
| @@ -119,11 +119,19 @@ ENTRY(cpu_resume) | |||
| 119 | #else | 119 | #else |
| 120 | ldr r0, sleep_save_sp @ stack phys addr | 120 | ldr r0, sleep_save_sp @ stack phys addr |
| 121 | #endif | 121 | #endif |
| 122 | msr cpsr_c, #PSR_I_BIT | PSR_F_BIT | SVC_MODE @ set SVC, irqs off | 122 | setmode PSR_I_BIT | PSR_F_BIT | SVC_MODE, r1 @ set SVC, irqs off |
| 123 | #ifdef MULTI_CPU | 123 | #ifdef MULTI_CPU |
| 124 | ldmia r0!, {r1, sp, lr, pc} @ load v:p, stack, return fn, resume fn | 124 | @ load v:p, stack, return fn, resume fn |
| 125 | ARM( ldmia r0!, {r1, sp, lr, pc} ) | ||
| 126 | THUMB( ldmia r0!, {r1, r2, r3, r4} ) | ||
| 127 | THUMB( mov sp, r2 ) | ||
| 128 | THUMB( mov lr, r3 ) | ||
| 129 | THUMB( bx r4 ) | ||
| 125 | #else | 130 | #else |
| 126 | ldmia r0!, {r1, sp, lr} @ load v:p, stack, return fn | 131 | @ load v:p, stack, return fn |
| 132 | ARM( ldmia r0!, {r1, sp, lr} ) | ||
| 133 | THUMB( ldmia r0!, {r1, r2, lr} ) | ||
| 134 | THUMB( mov sp, r2 ) | ||
| 127 | b cpu_do_resume | 135 | b cpu_do_resume |
| 128 | #endif | 136 | #endif |
| 129 | ENDPROC(cpu_resume) | 137 | ENDPROC(cpu_resume) |
diff --git a/arch/arm/kernel/swp_emulate.c b/arch/arm/kernel/swp_emulate.c index 7a5760922914..40ee7e5045e4 100644 --- a/arch/arm/kernel/swp_emulate.c +++ b/arch/arm/kernel/swp_emulate.c | |||
| @@ -158,7 +158,7 @@ static int emulate_swpX(unsigned int address, unsigned int *data, | |||
| 158 | 158 | ||
| 159 | if (res == 0) { | 159 | if (res == 0) { |
| 160 | /* | 160 | /* |
| 161 | * Barrier also required between aquiring a lock for a | 161 | * Barrier also required between acquiring a lock for a |
| 162 | * protected resource and accessing the resource. Inserted for | 162 | * protected resource and accessing the resource. Inserted for |
| 163 | * same reason as above. | 163 | * same reason as above. |
| 164 | */ | 164 | */ |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index f0000e188c8c..3b54ad19d489 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
| @@ -410,8 +410,7 @@ static int bad_syscall(int n, struct pt_regs *regs) | |||
| 410 | struct thread_info *thread = current_thread_info(); | 410 | struct thread_info *thread = current_thread_info(); |
| 411 | siginfo_t info; | 411 | siginfo_t info; |
| 412 | 412 | ||
| 413 | if (current->personality != PER_LINUX && | 413 | if ((current->personality & PER_MASK) != PER_LINUX && |
| 414 | current->personality != PER_LINUX_32BIT && | ||
| 415 | thread->exec_domain->handler) { | 414 | thread->exec_domain->handler) { |
| 416 | thread->exec_domain->handler(n, regs); | 415 | thread->exec_domain->handler(n, regs); |
| 417 | return regs->ARM_r0; | 416 | return regs->ARM_r0; |
diff --git a/arch/arm/mach-at91/board-carmeva.c b/arch/arm/mach-at91/board-carmeva.c index 2e74a19874d1..295e1e77fa60 100644 --- a/arch/arm/mach-at91/board-carmeva.c +++ b/arch/arm/mach-at91/board-carmeva.c | |||
| @@ -76,7 +76,7 @@ static struct at91_udc_data __initdata carmeva_udc_data = { | |||
| 76 | .pullup_pin = AT91_PIN_PD9, | 76 | .pullup_pin = AT91_PIN_PD9, |
| 77 | }; | 77 | }; |
| 78 | 78 | ||
| 79 | /* FIXME: user dependant */ | 79 | /* FIXME: user dependent */ |
| 80 | // static struct at91_cf_data __initdata carmeva_cf_data = { | 80 | // static struct at91_cf_data __initdata carmeva_cf_data = { |
| 81 | // .det_pin = AT91_PIN_PB0, | 81 | // .det_pin = AT91_PIN_PB0, |
| 82 | // .rst_pin = AT91_PIN_PC5, | 82 | // .rst_pin = AT91_PIN_PC5, |
diff --git a/arch/arm/mach-at91/include/mach/at91_mci.h b/arch/arm/mach-at91/include/mach/at91_mci.h index 27ac6f550fe3..02182c16a022 100644 --- a/arch/arm/mach-at91/include/mach/at91_mci.h +++ b/arch/arm/mach-at91/include/mach/at91_mci.h | |||
| @@ -102,7 +102,7 @@ | |||
| 102 | #define AT91_MCI_RDIRE (1 << 17) /* Response Direction Error */ | 102 | #define AT91_MCI_RDIRE (1 << 17) /* Response Direction Error */ |
| 103 | #define AT91_MCI_RCRCE (1 << 18) /* Response CRC Error */ | 103 | #define AT91_MCI_RCRCE (1 << 18) /* Response CRC Error */ |
| 104 | #define AT91_MCI_RENDE (1 << 19) /* Response End Bit Error */ | 104 | #define AT91_MCI_RENDE (1 << 19) /* Response End Bit Error */ |
| 105 | #define AT91_MCI_RTOE (1 << 20) /* Reponse Time-out Error */ | 105 | #define AT91_MCI_RTOE (1 << 20) /* Response Time-out Error */ |
| 106 | #define AT91_MCI_DCRCE (1 << 21) /* Data CRC Error */ | 106 | #define AT91_MCI_DCRCE (1 << 21) /* Data CRC Error */ |
| 107 | #define AT91_MCI_DTOE (1 << 22) /* Data Time-out Error */ | 107 | #define AT91_MCI_DTOE (1 << 22) /* Data Time-out Error */ |
| 108 | #define AT91_MCI_OVRE (1 << 30) /* Overrun */ | 108 | #define AT91_MCI_OVRE (1 << 30) /* Overrun */ |
diff --git a/arch/arm/mach-at91/include/mach/gpio.h b/arch/arm/mach-at91/include/mach/gpio.h index ddeb64536756..056dc6674b6b 100644 --- a/arch/arm/mach-at91/include/mach/gpio.h +++ b/arch/arm/mach-at91/include/mach/gpio.h | |||
| @@ -208,7 +208,7 @@ extern void at91_gpio_resume(void); | |||
| 208 | 208 | ||
| 209 | /*-------------------------------------------------------------------------*/ | 209 | /*-------------------------------------------------------------------------*/ |
| 210 | 210 | ||
| 211 | /* wrappers for "new style" GPIO calls. the old AT91-specfic ones should | 211 | /* wrappers for "new style" GPIO calls. the old AT91-specific ones should |
| 212 | * eventually be removed (along with this errno.h inclusion), and the | 212 | * eventually be removed (along with this errno.h inclusion), and the |
| 213 | * gpio request/free calls should probably be implemented. | 213 | * gpio request/free calls should probably be implemented. |
| 214 | */ | 214 | */ |
diff --git a/arch/arm/mach-bcmring/csp/dmac/dmacHw_extra.c b/arch/arm/mach-bcmring/csp/dmac/dmacHw_extra.c index 77f84b40dda9..a1f328357aa4 100644 --- a/arch/arm/mach-bcmring/csp/dmac/dmacHw_extra.c +++ b/arch/arm/mach-bcmring/csp/dmac/dmacHw_extra.c | |||
| @@ -551,7 +551,7 @@ int dmacHw_calculateDescriptorCount(dmacHw_CONFIG_t *pConfig, /* [ IN ] Config | |||
| 551 | 551 | ||
| 552 | /****************************************************************************/ | 552 | /****************************************************************************/ |
| 553 | /** | 553 | /** |
| 554 | * @brief Check the existance of pending descriptor | 554 | * @brief Check the existence of pending descriptor |
| 555 | * | 555 | * |
| 556 | * This function confirmes if there is any pending descriptor in the chain | 556 | * This function confirmes if there is any pending descriptor in the chain |
| 557 | * to program the channel | 557 | * to program the channel |
| @@ -775,7 +775,7 @@ int dmacHw_setVariableDataDescriptor(dmacHw_HANDLE_t handle, /* [ IN ] DMA Cha | |||
| 775 | /** | 775 | /** |
| 776 | * @brief Read data DMAed to memory | 776 | * @brief Read data DMAed to memory |
| 777 | * | 777 | * |
| 778 | * This function will read data that has been DMAed to memory while transfering from: | 778 | * This function will read data that has been DMAed to memory while transferring from: |
| 779 | * - Memory to memory | 779 | * - Memory to memory |
| 780 | * - Peripheral to memory | 780 | * - Peripheral to memory |
| 781 | * | 781 | * |
| @@ -941,7 +941,7 @@ int dmacHw_setControlDescriptor(dmacHw_CONFIG_t *pConfig, /* [ IN ] Configurat | |||
| 941 | /** | 941 | /** |
| 942 | * @brief Sets channel specific user data | 942 | * @brief Sets channel specific user data |
| 943 | * | 943 | * |
| 944 | * This function associates user data to a specif DMA channel | 944 | * This function associates user data to a specific DMA channel |
| 945 | * | 945 | * |
| 946 | */ | 946 | */ |
| 947 | /****************************************************************************/ | 947 | /****************************************************************************/ |
diff --git a/arch/arm/mach-bcmring/dma.c b/arch/arm/mach-bcmring/dma.c index 8d1baf3f4683..d87ad30dda35 100644 --- a/arch/arm/mach-bcmring/dma.c +++ b/arch/arm/mach-bcmring/dma.c | |||
| @@ -629,7 +629,7 @@ EXPORT_SYMBOL(dma_get_device_descriptor_ring); | |||
| 629 | * Configures a DMA channel. | 629 | * Configures a DMA channel. |
| 630 | * | 630 | * |
| 631 | * @return | 631 | * @return |
| 632 | * >= 0 - Initialization was successfull. | 632 | * >= 0 - Initialization was successful. |
| 633 | * | 633 | * |
| 634 | * -EBUSY - Device is currently being used. | 634 | * -EBUSY - Device is currently being used. |
| 635 | * -ENODEV - Device handed in is invalid. | 635 | * -ENODEV - Device handed in is invalid. |
| @@ -673,7 +673,7 @@ static int ConfigChannel(DMA_Handle_t handle) | |||
| 673 | /** | 673 | /** |
| 674 | * Initializes all of the data structures associated with the DMA. | 674 | * Initializes all of the data structures associated with the DMA. |
| 675 | * @return | 675 | * @return |
| 676 | * >= 0 - Initialization was successfull. | 676 | * >= 0 - Initialization was successful. |
| 677 | * | 677 | * |
| 678 | * -EBUSY - Device is currently being used. | 678 | * -EBUSY - Device is currently being used. |
| 679 | * -ENODEV - Device handed in is invalid. | 679 | * -ENODEV - Device handed in is invalid. |
diff --git a/arch/arm/mach-bcmring/include/csp/dmacHw.h b/arch/arm/mach-bcmring/include/csp/dmacHw.h index 6c8da2b9fc1f..e6a1dc484ca7 100644 --- a/arch/arm/mach-bcmring/include/csp/dmacHw.h +++ b/arch/arm/mach-bcmring/include/csp/dmacHw.h | |||
| @@ -362,7 +362,7 @@ int dmacHw_setControlDescriptor(dmacHw_CONFIG_t *pConfig, /* [ IN ] Configurati | |||
| 362 | /** | 362 | /** |
| 363 | * @brief Read data DMA transferred to memory | 363 | * @brief Read data DMA transferred to memory |
| 364 | * | 364 | * |
| 365 | * This function will read data that has been DMAed to memory while transfering from: | 365 | * This function will read data that has been DMAed to memory while transferring from: |
| 366 | * - Memory to memory | 366 | * - Memory to memory |
| 367 | * - Peripheral to memory | 367 | * - Peripheral to memory |
| 368 | * | 368 | * |
| @@ -446,7 +446,7 @@ void dmacHw_stopTransfer(dmacHw_HANDLE_t handle /* [ IN ] DMA Channel handle * | |||
| 446 | 446 | ||
| 447 | /****************************************************************************/ | 447 | /****************************************************************************/ |
| 448 | /** | 448 | /** |
| 449 | * @brief Check the existance of pending descriptor | 449 | * @brief Check the existence of pending descriptor |
| 450 | * | 450 | * |
| 451 | * This function confirmes if there is any pending descriptor in the chain | 451 | * This function confirmes if there is any pending descriptor in the chain |
| 452 | * to program the channel | 452 | * to program the channel |
| @@ -542,7 +542,7 @@ dmacHw_HANDLE_t dmacHw_getInterruptSource(void); | |||
| 542 | /** | 542 | /** |
| 543 | * @brief Sets channel specific user data | 543 | * @brief Sets channel specific user data |
| 544 | * | 544 | * |
| 545 | * This function associates user data to a specif DMA channel | 545 | * This function associates user data to a specific DMA channel |
| 546 | * | 546 | * |
| 547 | */ | 547 | */ |
| 548 | /****************************************************************************/ | 548 | /****************************************************************************/ |
diff --git a/arch/arm/mach-bcmring/include/mach/csp/chipcHw_def.h b/arch/arm/mach-bcmring/include/mach/csp/chipcHw_def.h index 70eaea866cfe..161973385faf 100644 --- a/arch/arm/mach-bcmring/include/mach/csp/chipcHw_def.h +++ b/arch/arm/mach-bcmring/include/mach/csp/chipcHw_def.h | |||
| @@ -180,7 +180,7 @@ typedef enum { | |||
| 180 | 180 | ||
| 181 | #define chipcHw_XTAL_FREQ_Hz 25000000 /* Reference clock frequency in Hz */ | 181 | #define chipcHw_XTAL_FREQ_Hz 25000000 /* Reference clock frequency in Hz */ |
| 182 | 182 | ||
| 183 | /* Programable pin defines */ | 183 | /* Programmable pin defines */ |
| 184 | #define chipcHw_PIN_GPIO(n) ((((n) >= 0) && ((n) < (chipcHw_GPIO_COUNT))) ? (n) : 0xFFFFFFFF) | 184 | #define chipcHw_PIN_GPIO(n) ((((n) >= 0) && ((n) < (chipcHw_GPIO_COUNT))) ? (n) : 0xFFFFFFFF) |
| 185 | /* GPIO pin 0 - 60 */ | 185 | /* GPIO pin 0 - 60 */ |
| 186 | #define chipcHw_PIN_UARTTXD (chipcHw_GPIO_COUNT + 0) /* UART Transmit */ | 186 | #define chipcHw_PIN_UARTTXD (chipcHw_GPIO_COUNT + 0) /* UART Transmit */ |
diff --git a/arch/arm/mach-bcmring/include/mach/csp/chipcHw_inline.h b/arch/arm/mach-bcmring/include/mach/csp/chipcHw_inline.h index c78833acb37a..03238c299001 100644 --- a/arch/arm/mach-bcmring/include/mach/csp/chipcHw_inline.h +++ b/arch/arm/mach-bcmring/include/mach/csp/chipcHw_inline.h | |||
| @@ -832,7 +832,7 @@ static inline void chipcHw_setUsbDevice(void) | |||
| 832 | 832 | ||
| 833 | /****************************************************************************/ | 833 | /****************************************************************************/ |
| 834 | /** | 834 | /** |
| 835 | * @brief Lower layer funtion to enable/disable a clock of a certain device | 835 | * @brief Lower layer function to enable/disable a clock of a certain device |
| 836 | * | 836 | * |
| 837 | * This function enables/disables a core clock | 837 | * This function enables/disables a core clock |
| 838 | * | 838 | * |
diff --git a/arch/arm/mach-bcmring/include/mach/csp/intcHw_reg.h b/arch/arm/mach-bcmring/include/mach/csp/intcHw_reg.h index e01fc4607c91..0aeb6a6fe7f8 100644 --- a/arch/arm/mach-bcmring/include/mach/csp/intcHw_reg.h +++ b/arch/arm/mach-bcmring/include/mach/csp/intcHw_reg.h | |||
| @@ -109,9 +109,9 @@ | |||
| 109 | #define INTCHW_INTC0_DMA0C0 (1<<INTCHW_INTC0_DMA0C0_BITNUM) | 109 | #define INTCHW_INTC0_DMA0C0 (1<<INTCHW_INTC0_DMA0C0_BITNUM) |
| 110 | 110 | ||
| 111 | /* INTC1 - interrupt controller 1 */ | 111 | /* INTC1 - interrupt controller 1 */ |
| 112 | #define INTCHW_INTC1_DDRVPMP_BITNUM 27 /* DDR and VPM PLL clock phase relationship interupt (Not for A0) */ | 112 | #define INTCHW_INTC1_DDRVPMP_BITNUM 27 /* DDR and VPM PLL clock phase relationship interrupt (Not for A0) */ |
| 113 | #define INTCHW_INTC1_DDRVPMT_BITNUM 26 /* DDR and VPM HW phase align timeout interrupt (Not for A0) */ | 113 | #define INTCHW_INTC1_DDRVPMT_BITNUM 26 /* DDR and VPM HW phase align timeout interrupt (Not for A0) */ |
| 114 | #define INTCHW_INTC1_DDRP_BITNUM 26 /* DDR and PLL clock phase relationship interupt (For A0 only)) */ | 114 | #define INTCHW_INTC1_DDRP_BITNUM 26 /* DDR and PLL clock phase relationship interrupt (For A0 only)) */ |
| 115 | #define INTCHW_INTC1_RTC2_BITNUM 25 /* Real time clock tamper interrupt */ | 115 | #define INTCHW_INTC1_RTC2_BITNUM 25 /* Real time clock tamper interrupt */ |
| 116 | #define INTCHW_INTC1_VDEC_BITNUM 24 /* Hantro Video Decoder interrupt */ | 116 | #define INTCHW_INTC1_VDEC_BITNUM 24 /* Hantro Video Decoder interrupt */ |
| 117 | /* Bits 13-23 are non-secure versions of the corresponding secure bits in SINTC bits 0-10. */ | 117 | /* Bits 13-23 are non-secure versions of the corresponding secure bits in SINTC bits 0-10. */ |
diff --git a/arch/arm/mach-bcmring/include/mach/reg_umi.h b/arch/arm/mach-bcmring/include/mach/reg_umi.h index 06a355481ea6..0992842caa77 100644 --- a/arch/arm/mach-bcmring/include/mach/reg_umi.h +++ b/arch/arm/mach-bcmring/include/mach/reg_umi.h | |||
| @@ -88,7 +88,7 @@ | |||
| 88 | /* REG_UMI_FLASH0/1/2_TCR, REG_UMI_SRAM0/1_TCR bits */ | 88 | /* REG_UMI_FLASH0/1/2_TCR, REG_UMI_SRAM0/1_TCR bits */ |
| 89 | /* Enable wait pin during burst write or read */ | 89 | /* Enable wait pin during burst write or read */ |
| 90 | #define REG_UMI_TCR_WAITEN 0x80000000 | 90 | #define REG_UMI_TCR_WAITEN 0x80000000 |
| 91 | /* Enable mem ctrlr to work iwth ext mem of lower freq than AHB clk */ | 91 | /* Enable mem ctrlr to work with ext mem of lower freq than AHB clk */ |
| 92 | #define REG_UMI_TCR_LOWFREQ 0x40000000 | 92 | #define REG_UMI_TCR_LOWFREQ 0x40000000 |
| 93 | /* 1=synch write, 0=async write */ | 93 | /* 1=synch write, 0=async write */ |
| 94 | #define REG_UMI_TCR_MEMTYPE_SYNCWRITE 0x20000000 | 94 | #define REG_UMI_TCR_MEMTYPE_SYNCWRITE 0x20000000 |
diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c index 6c389ff1020e..3e7be2de96de 100644 --- a/arch/arm/mach-davinci/board-neuros-osd2.c +++ b/arch/arm/mach-davinci/board-neuros-osd2.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | * DM644X-EVM board. It has: | 11 | * DM644X-EVM board. It has: |
| 12 | * DM6446M02 module with 256MB NAND, 256MB RAM, TLV320AIC32 AIC, | 12 | * DM6446M02 module with 256MB NAND, 256MB RAM, TLV320AIC32 AIC, |
| 13 | * USB, Ethernet, SD/MMC, UART, THS8200, TVP7000 for video. | 13 | * USB, Ethernet, SD/MMC, UART, THS8200, TVP7000 for video. |
| 14 | * Additionaly realtime clock, IR remote control receiver, | 14 | * Additionally realtime clock, IR remote control receiver, |
| 15 | * IR Blaster based on MSP430 (firmware although is different | 15 | * IR Blaster based on MSP430 (firmware although is different |
| 16 | * from used in DM644X-EVM), internal ATA-6 3.5†HDD drive | 16 | * from used in DM644X-EVM), internal ATA-6 3.5†HDD drive |
| 17 | * with PATA interface, two muxed red-green leds. | 17 | * with PATA interface, two muxed red-green leds. |
diff --git a/arch/arm/mach-davinci/cpufreq.c b/arch/arm/mach-davinci/cpufreq.c index 4a68c2b1ec11..0a95be1512bb 100644 --- a/arch/arm/mach-davinci/cpufreq.c +++ b/arch/arm/mach-davinci/cpufreq.c | |||
| @@ -167,7 +167,7 @@ static int davinci_cpu_init(struct cpufreq_policy *policy) | |||
| 167 | /* | 167 | /* |
| 168 | * Time measurement across the target() function yields ~1500-1800us | 168 | * Time measurement across the target() function yields ~1500-1800us |
| 169 | * time taken with no drivers on notification list. | 169 | * time taken with no drivers on notification list. |
| 170 | * Setting the latency to 2000 us to accomodate addition of drivers | 170 | * Setting the latency to 2000 us to accommodate addition of drivers |
| 171 | * to pre/post change notification list. | 171 | * to pre/post change notification list. |
| 172 | */ | 172 | */ |
| 173 | policy->cpuinfo.transition_latency = 2000 * 1000; | 173 | policy->cpuinfo.transition_latency = 2000 * 1000; |
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 68fe4c289d77..b95b9196deed 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c | |||
| @@ -1123,7 +1123,7 @@ void __init da850_init(void) | |||
| 1123 | * This helps keeping the peripherals on this domain insulated | 1123 | * This helps keeping the peripherals on this domain insulated |
| 1124 | * from CPU frequency changes caused by DVFS. The firmware sets | 1124 | * from CPU frequency changes caused by DVFS. The firmware sets |
| 1125 | * both PLL0 and PLL1 to the same frequency so, there should not | 1125 | * both PLL0 and PLL1 to the same frequency so, there should not |
| 1126 | * be any noticible change even in non-DVFS use cases. | 1126 | * be any noticeable change even in non-DVFS use cases. |
| 1127 | */ | 1127 | */ |
| 1128 | da850_set_async3_src(1); | 1128 | da850_set_async3_src(1); |
| 1129 | 1129 | ||
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index 76364d1345df..f68012239641 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c | |||
| @@ -314,7 +314,7 @@ static struct clk timer2_clk = { | |||
| 314 | .name = "timer2", | 314 | .name = "timer2", |
| 315 | .parent = &pll1_aux_clk, | 315 | .parent = &pll1_aux_clk, |
| 316 | .lpsc = DAVINCI_LPSC_TIMER2, | 316 | .lpsc = DAVINCI_LPSC_TIMER2, |
| 317 | .usecount = 1, /* REVISIT: why cant' this be disabled? */ | 317 | .usecount = 1, /* REVISIT: why can't' this be disabled? */ |
| 318 | }; | 318 | }; |
| 319 | 319 | ||
| 320 | static struct clk timer3_clk = { | 320 | static struct clk timer3_clk = { |
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index 9a2376b3137c..5f8a65424184 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c | |||
| @@ -274,7 +274,7 @@ static struct clk timer2_clk = { | |||
| 274 | .name = "timer2", | 274 | .name = "timer2", |
| 275 | .parent = &pll1_aux_clk, | 275 | .parent = &pll1_aux_clk, |
| 276 | .lpsc = DAVINCI_LPSC_TIMER2, | 276 | .lpsc = DAVINCI_LPSC_TIMER2, |
| 277 | .usecount = 1, /* REVISIT: why cant' this be disabled? */ | 277 | .usecount = 1, /* REVISIT: why can't' this be disabled? */ |
| 278 | }; | 278 | }; |
| 279 | 279 | ||
| 280 | static struct clk_lookup dm644x_clks[] = { | 280 | static struct clk_lookup dm644x_clks[] = { |
diff --git a/arch/arm/mach-davinci/include/mach/cputype.h b/arch/arm/mach-davinci/include/mach/cputype.h index cea6b8972043..957fb87e832e 100644 --- a/arch/arm/mach-davinci/include/mach/cputype.h +++ b/arch/arm/mach-davinci/include/mach/cputype.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Author: Kevin Hilman, Deep Root Systems, LLC | 4 | * Author: Kevin Hilman, Deep Root Systems, LLC |
| 5 | * | 5 | * |
| 6 | * Defines the cpu_is_*() macros for runtime detection of DaVinci | 6 | * Defines the cpu_is_*() macros for runtime detection of DaVinci |
| 7 | * device type. In addtion, if support for a given device is not | 7 | * device type. In addition, if support for a given device is not |
| 8 | * compiled in to the kernel, the macros return 0 so that | 8 | * compiled in to the kernel, the macros return 0 so that |
| 9 | * resulting code can be optimized out. | 9 | * resulting code can be optimized out. |
| 10 | * | 10 | * |
diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c index 180b8a9d0d21..a5a9ff70b198 100644 --- a/arch/arm/mach-ep93xx/gpio.c +++ b/arch/arm/mach-ep93xx/gpio.c | |||
| @@ -101,7 +101,7 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
| 101 | static void ep93xx_gpio_f_irq_handler(unsigned int irq, struct irq_desc *desc) | 101 | static void ep93xx_gpio_f_irq_handler(unsigned int irq, struct irq_desc *desc) |
| 102 | { | 102 | { |
| 103 | /* | 103 | /* |
| 104 | * map discontiguous hw irq range to continous sw irq range: | 104 | * map discontiguous hw irq range to continuous sw irq range: |
| 105 | * | 105 | * |
| 106 | * IRQ_EP93XX_GPIO{0..7}MUX -> gpio_to_irq(EP93XX_GPIO_LINE_F({0..7}) | 106 | * IRQ_EP93XX_GPIO{0..7}MUX -> gpio_to_irq(EP93XX_GPIO_LINE_F({0..7}) |
| 107 | */ | 107 | */ |
diff --git a/arch/arm/mach-exynos4/include/mach/gpio.h b/arch/arm/mach-exynos4/include/mach/gpio.h index 939728b38d48..be9266b10fdb 100644 --- a/arch/arm/mach-exynos4/include/mach/gpio.h +++ b/arch/arm/mach-exynos4/include/mach/gpio.h | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | #define gpio_cansleep __gpio_cansleep | 18 | #define gpio_cansleep __gpio_cansleep |
| 19 | #define gpio_to_irq __gpio_to_irq | 19 | #define gpio_to_irq __gpio_to_irq |
| 20 | 20 | ||
| 21 | /* Practically, GPIO banks upto GPZ are the configurable gpio banks */ | 21 | /* Practically, GPIO banks up to GPZ are the configurable gpio banks */ |
| 22 | 22 | ||
| 23 | /* GPIO bank sizes */ | 23 | /* GPIO bank sizes */ |
| 24 | #define EXYNOS4_GPIO_A0_NR (8) | 24 | #define EXYNOS4_GPIO_A0_NR (8) |
diff --git a/arch/arm/mach-exynos4/mct.c b/arch/arm/mach-exynos4/mct.c index af82a8fbb68b..14ac10b7ec02 100644 --- a/arch/arm/mach-exynos4/mct.c +++ b/arch/arm/mach-exynos4/mct.c | |||
| @@ -276,7 +276,7 @@ static void exynos4_mct_tick_start(unsigned long cycles, | |||
| 276 | /* update interrupt count buffer */ | 276 | /* update interrupt count buffer */ |
| 277 | exynos4_mct_write(tmp, mevt->base + MCT_L_ICNTB_OFFSET); | 277 | exynos4_mct_write(tmp, mevt->base + MCT_L_ICNTB_OFFSET); |
| 278 | 278 | ||
| 279 | /* enable MCT tick interupt */ | 279 | /* enable MCT tick interrupt */ |
| 280 | exynos4_mct_write(0x1, mevt->base + MCT_L_INT_ENB_OFFSET); | 280 | exynos4_mct_write(0x1, mevt->base + MCT_L_INT_ENB_OFFSET); |
| 281 | 281 | ||
| 282 | tmp = __raw_readl(mevt->base + MCT_L_TCON_OFFSET); | 282 | tmp = __raw_readl(mevt->base + MCT_L_TCON_OFFSET); |
diff --git a/arch/arm/mach-exynos4/setup-sdhci-gpio.c b/arch/arm/mach-exynos4/setup-sdhci-gpio.c index 1b3d3a2de95c..e8d08bf8965a 100644 --- a/arch/arm/mach-exynos4/setup-sdhci-gpio.c +++ b/arch/arm/mach-exynos4/setup-sdhci-gpio.c | |||
| @@ -38,14 +38,14 @@ void exynos4_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) | |||
| 38 | switch (width) { | 38 | switch (width) { |
| 39 | case 8: | 39 | case 8: |
| 40 | for (gpio = EXYNOS4_GPK1(3); gpio <= EXYNOS4_GPK1(6); gpio++) { | 40 | for (gpio = EXYNOS4_GPK1(3); gpio <= EXYNOS4_GPK1(6); gpio++) { |
| 41 | /* Data pin GPK1[3:6] to special-funtion 3 */ | 41 | /* Data pin GPK1[3:6] to special-function 3 */ |
| 42 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3)); | 42 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3)); |
| 43 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP); | 43 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP); |
| 44 | s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4); | 44 | s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4); |
| 45 | } | 45 | } |
| 46 | case 4: | 46 | case 4: |
| 47 | for (gpio = EXYNOS4_GPK0(3); gpio <= EXYNOS4_GPK0(6); gpio++) { | 47 | for (gpio = EXYNOS4_GPK0(3); gpio <= EXYNOS4_GPK0(6); gpio++) { |
| 48 | /* Data pin GPK0[3:6] to special-funtion 2 */ | 48 | /* Data pin GPK0[3:6] to special-function 2 */ |
| 49 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); | 49 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); |
| 50 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP); | 50 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP); |
| 51 | s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4); | 51 | s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4); |
diff --git a/arch/arm/mach-exynos4/setup-sdhci.c b/arch/arm/mach-exynos4/setup-sdhci.c index 85f9433d4836..1e83f8cf236d 100644 --- a/arch/arm/mach-exynos4/setup-sdhci.c +++ b/arch/arm/mach-exynos4/setup-sdhci.c | |||
| @@ -35,7 +35,7 @@ void exynos4_setup_sdhci_cfg_card(struct platform_device *dev, void __iomem *r, | |||
| 35 | { | 35 | { |
| 36 | u32 ctrl2, ctrl3; | 36 | u32 ctrl2, ctrl3; |
| 37 | 37 | ||
| 38 | /* don't need to alter anything acording to card-type */ | 38 | /* don't need to alter anything according to card-type */ |
| 39 | 39 | ||
| 40 | ctrl2 = readl(r + S3C_SDHCI_CONTROL2); | 40 | ctrl2 = readl(r + S3C_SDHCI_CONTROL2); |
| 41 | 41 | ||
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 5eec099e0c72..56b930a13443 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
| @@ -255,6 +255,7 @@ config MACH_IMX27_VISSTRIM_M10 | |||
| 255 | bool "Vista Silicon i.MX27 Visstrim_m10" | 255 | bool "Vista Silicon i.MX27 Visstrim_m10" |
| 256 | select SOC_IMX27 | 256 | select SOC_IMX27 |
| 257 | select IMX_HAVE_PLATFORM_IMX_I2C | 257 | select IMX_HAVE_PLATFORM_IMX_I2C |
| 258 | select IMX_HAVE_PLATFORM_IMX_SSI | ||
| 258 | select IMX_HAVE_PLATFORM_IMX_UART | 259 | select IMX_HAVE_PLATFORM_IMX_UART |
| 259 | select IMX_HAVE_PLATFORM_MXC_MMC | 260 | select IMX_HAVE_PLATFORM_MXC_MMC |
| 260 | select IMX_HAVE_PLATFORM_MXC_EHCI | 261 | select IMX_HAVE_PLATFORM_MXC_EHCI |
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c index cb705c28de02..6269053505f7 100644 --- a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | #include <mach/mx25.h> | 34 | #include <mach/mx25.h> |
| 35 | #include <mach/imx-uart.h> | 35 | #include <mach/imx-uart.h> |
| 36 | #include <mach/audmux.h> | 36 | #include <mach/audmux.h> |
| 37 | #include <mach/esdhc.h> | ||
| 37 | 38 | ||
| 38 | #include "devices-imx25.h" | 39 | #include "devices-imx25.h" |
| 39 | 40 | ||
| @@ -242,6 +243,11 @@ struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata __initconst = { | |||
| 242 | .flags = IMX_SSI_SYN | IMX_SSI_NET | IMX_SSI_USE_I2S_SLAVE, | 243 | .flags = IMX_SSI_SYN | IMX_SSI_NET | IMX_SSI_USE_I2S_SLAVE, |
| 243 | }; | 244 | }; |
| 244 | 245 | ||
| 246 | static struct esdhc_platform_data sd1_pdata = { | ||
| 247 | .cd_gpio = GPIO_SD1CD, | ||
| 248 | .wp_gpio = -EINVAL, | ||
| 249 | }; | ||
| 250 | |||
| 245 | /* | 251 | /* |
| 246 | * system init for baseboard usage. Will be called by cpuimx25 init. | 252 | * system init for baseboard usage. Will be called by cpuimx25 init. |
| 247 | * | 253 | * |
| @@ -275,7 +281,7 @@ void __init eukrea_mbimxsd25_baseboard_init(void) | |||
| 275 | imx25_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); | 281 | imx25_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); |
| 276 | 282 | ||
| 277 | imx25_add_flexcan1(NULL); | 283 | imx25_add_flexcan1(NULL); |
| 278 | imx25_add_sdhci_esdhc_imx(0, NULL); | 284 | imx25_add_sdhci_esdhc_imx(0, &sd1_pdata); |
| 279 | 285 | ||
| 280 | gpio_request(GPIO_LED1, "LED1"); | 286 | gpio_request(GPIO_LED1, "LED1"); |
| 281 | gpio_direction_output(GPIO_LED1, 1); | 287 | gpio_direction_output(GPIO_LED1, 1); |
diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c index 773ea0c95b9f..ba3dae352a2d 100644 --- a/arch/arm/mach-iop13xx/pci.c +++ b/arch/arm/mach-iop13xx/pci.c | |||
| @@ -225,7 +225,7 @@ static u32 iop13xx_atue_cfg_address(struct pci_bus *bus, int devfn, int where) | |||
| 225 | /* This routine checks the status of the last configuration cycle. If an error | 225 | /* This routine checks the status of the last configuration cycle. If an error |
| 226 | * was detected it returns >0, else it returns a 0. The errors being checked | 226 | * was detected it returns >0, else it returns a 0. The errors being checked |
| 227 | * are parity, master abort, target abort (master and target). These types of | 227 | * are parity, master abort, target abort (master and target). These types of |
| 228 | * errors occure during a config cycle where there is no device, like during | 228 | * errors occur during a config cycle where there is no device, like during |
| 229 | * the discovery stage. | 229 | * the discovery stage. |
| 230 | */ | 230 | */ |
| 231 | static int iop13xx_atux_pci_status(int clear) | 231 | static int iop13xx_atux_pci_status(int clear) |
| @@ -332,7 +332,7 @@ static struct pci_ops iop13xx_atux_ops = { | |||
| 332 | /* This routine checks the status of the last configuration cycle. If an error | 332 | /* This routine checks the status of the last configuration cycle. If an error |
| 333 | * was detected it returns >0, else it returns a 0. The errors being checked | 333 | * was detected it returns >0, else it returns a 0. The errors being checked |
| 334 | * are parity, master abort, target abort (master and target). These types of | 334 | * are parity, master abort, target abort (master and target). These types of |
| 335 | * errors occure during a config cycle where there is no device, like during | 335 | * errors occur during a config cycle where there is no device, like during |
| 336 | * the discovery stage. | 336 | * the discovery stage. |
| 337 | */ | 337 | */ |
| 338 | static int iop13xx_atue_pci_status(int clear) | 338 | static int iop13xx_atue_pci_status(int clear) |
diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c index 0a95063f6d32..17de0bf53c08 100644 --- a/arch/arm/mach-kirkwood/sheevaplug-setup.c +++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c | |||
| @@ -58,6 +58,12 @@ static struct mvsdio_platform_data sheeva_esata_mvsdio_data = { | |||
| 58 | 58 | ||
| 59 | static struct gpio_led sheevaplug_led_pins[] = { | 59 | static struct gpio_led sheevaplug_led_pins[] = { |
| 60 | { | 60 | { |
| 61 | .name = "plug:red:misc", | ||
| 62 | .default_trigger = "none", | ||
| 63 | .gpio = 46, | ||
| 64 | .active_low = 1, | ||
| 65 | }, | ||
| 66 | { | ||
| 61 | .name = "plug:green:health", | 67 | .name = "plug:green:health", |
| 62 | .default_trigger = "default-on", | 68 | .default_trigger = "default-on", |
| 63 | .gpio = 49, | 69 | .gpio = 49, |
| @@ -80,6 +86,7 @@ static struct platform_device sheevaplug_leds = { | |||
| 80 | 86 | ||
| 81 | static unsigned int sheevaplug_mpp_config[] __initdata = { | 87 | static unsigned int sheevaplug_mpp_config[] __initdata = { |
| 82 | MPP29_GPIO, /* USB Power Enable */ | 88 | MPP29_GPIO, /* USB Power Enable */ |
| 89 | MPP46_GPIO, /* LED Red */ | ||
| 83 | MPP49_GPIO, /* LED */ | 90 | MPP49_GPIO, /* LED */ |
| 84 | 0 | 91 | 0 |
| 85 | }; | 92 | }; |
diff --git a/arch/arm/mach-kirkwood/tsx1x-common.c b/arch/arm/mach-kirkwood/tsx1x-common.c index f781164e623f..24294b2bc469 100644 --- a/arch/arm/mach-kirkwood/tsx1x-common.c +++ b/arch/arm/mach-kirkwood/tsx1x-common.c | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | 15 | ||
| 16 | /**************************************************************************** | 16 | /**************************************************************************** |
| 17 | * 16 MiB NOR flash. The struct mtd_partition is not in the same order as the | 17 | * 16 MiB NOR flash. The struct mtd_partition is not in the same order as the |
| 18 | * partitions on the device because we want to keep compatability with | 18 | * partitions on the device because we want to keep compatibility with |
| 19 | * the QNAP firmware. | 19 | * the QNAP firmware. |
| 20 | * Layout as used by QNAP: | 20 | * Layout as used by QNAP: |
| 21 | * 0x00000000-0x00080000 : "U-Boot" | 21 | * 0x00000000-0x00080000 : "U-Boot" |
diff --git a/arch/arm/mach-lpc32xx/pm.c b/arch/arm/mach-lpc32xx/pm.c index e76d41bb7056..b9c80597b7bf 100644 --- a/arch/arm/mach-lpc32xx/pm.c +++ b/arch/arm/mach-lpc32xx/pm.c | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | * DRAM clocking and refresh are slightly different for systems with DDR | 41 | * DRAM clocking and refresh are slightly different for systems with DDR |
| 42 | * DRAM or regular SDRAM devices. If SDRAM is used in the system, the | 42 | * DRAM or regular SDRAM devices. If SDRAM is used in the system, the |
| 43 | * SDRAM will still be accessible in direct-run mode. In DDR based systems, | 43 | * SDRAM will still be accessible in direct-run mode. In DDR based systems, |
| 44 | * a transistion to direct-run mode will stop all DDR accesses (no clocks). | 44 | * a transition to direct-run mode will stop all DDR accesses (no clocks). |
| 45 | * Because of this, the code to switch power modes and the code to enter | 45 | * Because of this, the code to switch power modes and the code to enter |
| 46 | * and exit DRAM self-refresh modes must not be executed in DRAM. A small | 46 | * and exit DRAM self-refresh modes must not be executed in DRAM. A small |
| 47 | * section of IRAM is used instead for this. | 47 | * section of IRAM is used instead for this. |
diff --git a/arch/arm/mach-mmp/include/mach/gpio.h b/arch/arm/mach-mmp/include/mach/gpio.h index ee8b02ed8011..7bfb827f3fe3 100644 --- a/arch/arm/mach-mmp/include/mach/gpio.h +++ b/arch/arm/mach-mmp/include/mach/gpio.h | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | #define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) | 10 | #define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) |
| 11 | #define GPIO_REG(x) (*((volatile u32 *)(GPIO_REGS_VIRT + (x)))) | 11 | #define GPIO_REG(x) (*((volatile u32 *)(GPIO_REGS_VIRT + (x)))) |
| 12 | 12 | ||
| 13 | #define NR_BUILTIN_GPIO (192) | 13 | #define NR_BUILTIN_GPIO IRQ_GPIO_NUM |
| 14 | 14 | ||
| 15 | #define gpio_to_bank(gpio) ((gpio) >> 5) | 15 | #define gpio_to_bank(gpio) ((gpio) >> 5) |
| 16 | #define gpio_to_irq(gpio) (IRQ_GPIO_START + (gpio)) | 16 | #define gpio_to_irq(gpio) (IRQ_GPIO_START + (gpio)) |
diff --git a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h index 4621067c7720..713be155a44d 100644 --- a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h +++ b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h | |||
| @@ -8,6 +8,15 @@ | |||
| 8 | #define MFP_DRIVE_MEDIUM (0x2 << 13) | 8 | #define MFP_DRIVE_MEDIUM (0x2 << 13) |
| 9 | #define MFP_DRIVE_FAST (0x3 << 13) | 9 | #define MFP_DRIVE_FAST (0x3 << 13) |
| 10 | 10 | ||
| 11 | #undef MFP_CFG | ||
| 12 | #undef MFP_CFG_DRV | ||
| 13 | |||
| 14 | #define MFP_CFG(pin, af) \ | ||
| 15 | (MFP_LPM_INPUT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_MEDIUM) | ||
| 16 | |||
| 17 | #define MFP_CFG_DRV(pin, af, drv) \ | ||
| 18 | (MFP_LPM_INPUT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_##drv) | ||
| 19 | |||
| 11 | /* GPIO */ | 20 | /* GPIO */ |
| 12 | #define GPIO0_GPIO MFP_CFG(GPIO0, AF5) | 21 | #define GPIO0_GPIO MFP_CFG(GPIO0, AF5) |
| 13 | #define GPIO1_GPIO MFP_CFG(GPIO1, AF5) | 22 | #define GPIO1_GPIO MFP_CFG(GPIO1, AF5) |
diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c index aeb9ae23e6ce..99833b9485cf 100644 --- a/arch/arm/mach-mmp/time.c +++ b/arch/arm/mach-mmp/time.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * 2008-04-11: Jason Chagas <Jason.chagas@marvell.com> | 9 | * 2008-04-11: Jason Chagas <Jason.chagas@marvell.com> |
| 10 | * 2008-10-08: Bin Yang <bin.yang@marvell.com> | 10 | * 2008-10-08: Bin Yang <bin.yang@marvell.com> |
| 11 | * | 11 | * |
| 12 | * The timers module actually includes three timers, each timer with upto | 12 | * The timers module actually includes three timers, each timer with up to |
| 13 | * three match comparators. Timer #0 is used here in free-running mode as | 13 | * three match comparators. Timer #0 is used here in free-running mode as |
| 14 | * the clock source, and match comparator #1 used as clock event device. | 14 | * the clock source, and match comparator #1 used as clock event device. |
| 15 | * | 15 | * |
diff --git a/arch/arm/mach-msm/acpuclock-arm11.c b/arch/arm/mach-msm/acpuclock-arm11.c index 7ffbd987eb5d..805d4ee53f7e 100644 --- a/arch/arm/mach-msm/acpuclock-arm11.c +++ b/arch/arm/mach-msm/acpuclock-arm11.c | |||
| @@ -343,7 +343,7 @@ int acpuclk_set_rate(unsigned long rate, int for_power_collapse) | |||
| 343 | } | 343 | } |
| 344 | } | 344 | } |
| 345 | 345 | ||
| 346 | /* Set wait states for CPU inbetween frequency changes */ | 346 | /* Set wait states for CPU between frequency changes */ |
| 347 | reg_clkctl = readl(A11S_CLK_CNTL_ADDR); | 347 | reg_clkctl = readl(A11S_CLK_CNTL_ADDR); |
| 348 | reg_clkctl |= (100 << 16); /* set WT_ST_CNT */ | 348 | reg_clkctl |= (100 << 16); /* set WT_ST_CNT */ |
| 349 | writel(reg_clkctl, A11S_CLK_CNTL_ADDR); | 349 | writel(reg_clkctl, A11S_CLK_CNTL_ADDR); |
diff --git a/arch/arm/mach-msm/scm.c b/arch/arm/mach-msm/scm.c index cfa808dd4897..232f97a04504 100644 --- a/arch/arm/mach-msm/scm.c +++ b/arch/arm/mach-msm/scm.c | |||
| @@ -46,7 +46,7 @@ static DEFINE_MUTEX(scm_lock); | |||
| 46 | * @id: command to be executed | 46 | * @id: command to be executed |
| 47 | * @buf: buffer returned from scm_get_command_buffer() | 47 | * @buf: buffer returned from scm_get_command_buffer() |
| 48 | * | 48 | * |
| 49 | * An SCM command is layed out in memory as follows: | 49 | * An SCM command is laid out in memory as follows: |
| 50 | * | 50 | * |
| 51 | * ------------------- <--- struct scm_command | 51 | * ------------------- <--- struct scm_command |
| 52 | * | command header | | 52 | * | command header | |
diff --git a/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c b/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c index 80761474c0f8..2e288b38b4ad 100644 --- a/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c +++ b/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c | |||
| @@ -43,6 +43,7 @@ | |||
| 43 | #include <mach/ipu.h> | 43 | #include <mach/ipu.h> |
| 44 | #include <mach/mx3fb.h> | 44 | #include <mach/mx3fb.h> |
| 45 | #include <mach/audmux.h> | 45 | #include <mach/audmux.h> |
| 46 | #include <mach/esdhc.h> | ||
| 46 | 47 | ||
| 47 | #include "devices-imx35.h" | 48 | #include "devices-imx35.h" |
| 48 | #include "devices.h" | 49 | #include "devices.h" |
| @@ -163,11 +164,14 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { | |||
| 163 | MX35_PAD_SD1_DATA1__ESDHC1_DAT1, | 164 | MX35_PAD_SD1_DATA1__ESDHC1_DAT1, |
| 164 | MX35_PAD_SD1_DATA2__ESDHC1_DAT2, | 165 | MX35_PAD_SD1_DATA2__ESDHC1_DAT2, |
| 165 | MX35_PAD_SD1_DATA3__ESDHC1_DAT3, | 166 | MX35_PAD_SD1_DATA3__ESDHC1_DAT3, |
| 167 | /* SD1 CD */ | ||
| 168 | MX35_PAD_LD18__GPIO3_24, | ||
| 166 | }; | 169 | }; |
| 167 | 170 | ||
| 168 | #define GPIO_LED1 IMX_GPIO_NR(3, 29) | 171 | #define GPIO_LED1 IMX_GPIO_NR(3, 29) |
| 169 | #define GPIO_SWITCH1 IMX_GPIO_NR(3, 25) | 172 | #define GPIO_SWITCH1 IMX_GPIO_NR(3, 25) |
| 170 | #define GPIO_LCDPWR (4) | 173 | #define GPIO_LCDPWR IMX_GPIO_NR(1, 4) |
| 174 | #define GPIO_SD1CD IMX_GPIO_NR(3, 24) | ||
| 171 | 175 | ||
| 172 | static void eukrea_mbimxsd_lcd_power_set(struct plat_lcd_data *pd, | 176 | static void eukrea_mbimxsd_lcd_power_set(struct plat_lcd_data *pd, |
| 173 | unsigned int power) | 177 | unsigned int power) |
| @@ -254,6 +258,11 @@ struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata __initconst = { | |||
| 254 | .flags = IMX_SSI_SYN | IMX_SSI_NET | IMX_SSI_USE_I2S_SLAVE, | 258 | .flags = IMX_SSI_SYN | IMX_SSI_NET | IMX_SSI_USE_I2S_SLAVE, |
| 255 | }; | 259 | }; |
| 256 | 260 | ||
| 261 | static struct esdhc_platform_data sd1_pdata = { | ||
| 262 | .cd_gpio = GPIO_SD1CD, | ||
| 263 | .wp_gpio = -EINVAL, | ||
| 264 | }; | ||
| 265 | |||
| 257 | /* | 266 | /* |
| 258 | * system init for baseboard usage. Will be called by cpuimx35 init. | 267 | * system init for baseboard usage. Will be called by cpuimx35 init. |
| 259 | * | 268 | * |
| @@ -289,7 +298,7 @@ void __init eukrea_mbimxsd35_baseboard_init(void) | |||
| 289 | imx35_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); | 298 | imx35_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); |
| 290 | 299 | ||
| 291 | imx35_add_flexcan1(NULL); | 300 | imx35_add_flexcan1(NULL); |
| 292 | imx35_add_sdhci_esdhc_imx(0, NULL); | 301 | imx35_add_sdhci_esdhc_imx(0, &sd1_pdata); |
| 293 | 302 | ||
| 294 | gpio_request(GPIO_LED1, "LED1"); | 303 | gpio_request(GPIO_LED1, "LED1"); |
| 295 | gpio_direction_output(GPIO_LED1, 1); | 304 | gpio_direction_output(GPIO_LED1, 1); |
| @@ -301,7 +310,6 @@ void __init eukrea_mbimxsd35_baseboard_init(void) | |||
| 301 | 310 | ||
| 302 | gpio_request(GPIO_LCDPWR, "LCDPWR"); | 311 | gpio_request(GPIO_LCDPWR, "LCDPWR"); |
| 303 | gpio_direction_output(GPIO_LCDPWR, 1); | 312 | gpio_direction_output(GPIO_LCDPWR, 1); |
| 304 | gpio_free(GPIO_LCDPWR); | ||
| 305 | 313 | ||
| 306 | i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices, | 314 | i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices, |
| 307 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); | 315 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); |
diff --git a/arch/arm/mach-mx3/mach-pcm043.c b/arch/arm/mach-mx3/mach-pcm043.c index b3ecfb22d241..036ba1a4704b 100644 --- a/arch/arm/mach-mx3/mach-pcm043.c +++ b/arch/arm/mach-mx3/mach-pcm043.c | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | #include <mach/mx3fb.h> | 40 | #include <mach/mx3fb.h> |
| 41 | #include <mach/ulpi.h> | 41 | #include <mach/ulpi.h> |
| 42 | #include <mach/audmux.h> | 42 | #include <mach/audmux.h> |
| 43 | #include <mach/esdhc.h> | ||
| 43 | 44 | ||
| 44 | #include "devices-imx35.h" | 45 | #include "devices-imx35.h" |
| 45 | #include "devices.h" | 46 | #include "devices.h" |
| @@ -217,11 +218,15 @@ static iomux_v3_cfg_t pcm043_pads[] = { | |||
| 217 | MX35_PAD_SD1_DATA1__ESDHC1_DAT1, | 218 | MX35_PAD_SD1_DATA1__ESDHC1_DAT1, |
| 218 | MX35_PAD_SD1_DATA2__ESDHC1_DAT2, | 219 | MX35_PAD_SD1_DATA2__ESDHC1_DAT2, |
| 219 | MX35_PAD_SD1_DATA3__ESDHC1_DAT3, | 220 | MX35_PAD_SD1_DATA3__ESDHC1_DAT3, |
| 221 | MX35_PAD_ATA_DATA10__GPIO2_23, /* WriteProtect */ | ||
| 222 | MX35_PAD_ATA_DATA11__GPIO2_24, /* CardDetect */ | ||
| 220 | }; | 223 | }; |
| 221 | 224 | ||
| 222 | #define AC97_GPIO_TXFS IMX_GPIO_NR(2, 31) | 225 | #define AC97_GPIO_TXFS IMX_GPIO_NR(2, 31) |
| 223 | #define AC97_GPIO_TXD IMX_GPIO_NR(2, 28) | 226 | #define AC97_GPIO_TXD IMX_GPIO_NR(2, 28) |
| 224 | #define AC97_GPIO_RESET IMX_GPIO_NR(2, 0) | 227 | #define AC97_GPIO_RESET IMX_GPIO_NR(2, 0) |
| 228 | #define SD1_GPIO_WP IMX_GPIO_NR(2, 23) | ||
| 229 | #define SD1_GPIO_CD IMX_GPIO_NR(2, 24) | ||
| 225 | 230 | ||
| 226 | static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97) | 231 | static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97) |
| 227 | { | 232 | { |
| @@ -346,6 +351,11 @@ static int __init pcm043_otg_mode(char *options) | |||
| 346 | } | 351 | } |
| 347 | __setup("otg_mode=", pcm043_otg_mode); | 352 | __setup("otg_mode=", pcm043_otg_mode); |
| 348 | 353 | ||
| 354 | static struct esdhc_platform_data sd1_pdata = { | ||
| 355 | .wp_gpio = SD1_GPIO_WP, | ||
| 356 | .cd_gpio = SD1_GPIO_CD, | ||
| 357 | }; | ||
| 358 | |||
| 349 | /* | 359 | /* |
| 350 | * Board specific initialization. | 360 | * Board specific initialization. |
| 351 | */ | 361 | */ |
| @@ -395,7 +405,7 @@ static void __init pcm043_init(void) | |||
| 395 | imx35_add_fsl_usb2_udc(&otg_device_pdata); | 405 | imx35_add_fsl_usb2_udc(&otg_device_pdata); |
| 396 | 406 | ||
| 397 | imx35_add_flexcan1(NULL); | 407 | imx35_add_flexcan1(NULL); |
| 398 | imx35_add_sdhci_esdhc_imx(0, NULL); | 408 | imx35_add_sdhci_esdhc_imx(0, &sd1_pdata); |
| 399 | } | 409 | } |
| 400 | 410 | ||
| 401 | static void __init pcm043_timer_init(void) | 411 | static void __init pcm043_timer_init(void) |
diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig index 83ee08847d4d..159340da9191 100644 --- a/arch/arm/mach-mx5/Kconfig +++ b/arch/arm/mach-mx5/Kconfig | |||
| @@ -165,6 +165,7 @@ config MACH_MX53_LOCO | |||
| 165 | select IMX_HAVE_PLATFORM_IMX_I2C | 165 | select IMX_HAVE_PLATFORM_IMX_I2C |
| 166 | select IMX_HAVE_PLATFORM_IMX_UART | 166 | select IMX_HAVE_PLATFORM_IMX_UART |
| 167 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 167 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
| 168 | select IMX_HAVE_PLATFORM_GPIO_KEYS | ||
| 168 | help | 169 | help |
| 169 | Include support for MX53 LOCO platform. This includes specific | 170 | Include support for MX53 LOCO platform. This includes specific |
| 170 | configurations for the board and its peripherals. | 171 | configurations for the board and its peripherals. |
diff --git a/arch/arm/mach-mx5/Makefile b/arch/arm/mach-mx5/Makefile index 4f63048be3ca..0b9338cec516 100644 --- a/arch/arm/mach-mx5/Makefile +++ b/arch/arm/mach-mx5/Makefile | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | # Object file lists. | 5 | # Object file lists. |
| 6 | obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o ehci.o | 6 | obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o ehci.o system.o |
| 7 | obj-$(CONFIG_SOC_IMX50) += mm-mx50.o | 7 | obj-$(CONFIG_SOC_IMX50) += mm-mx50.o |
| 8 | 8 | ||
| 9 | obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o | 9 | obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o |
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c index b2ecd194e76d..bea4e4135f9d 100644 --- a/arch/arm/mach-mx5/board-mx51_babbage.c +++ b/arch/arm/mach-mx5/board-mx51_babbage.c | |||
| @@ -228,13 +228,12 @@ static inline void babbage_fec_reset(void) | |||
| 228 | int ret; | 228 | int ret; |
| 229 | 229 | ||
| 230 | /* reset FEC PHY */ | 230 | /* reset FEC PHY */ |
| 231 | ret = gpio_request(BABBAGE_FEC_PHY_RESET, "fec-phy-reset"); | 231 | ret = gpio_request_one(BABBAGE_FEC_PHY_RESET, |
| 232 | GPIOF_OUT_INIT_LOW, "fec-phy-reset"); | ||
| 232 | if (ret) { | 233 | if (ret) { |
| 233 | printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret); | 234 | printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret); |
| 234 | return; | 235 | return; |
| 235 | } | 236 | } |
| 236 | gpio_direction_output(BABBAGE_FEC_PHY_RESET, 0); | ||
| 237 | gpio_set_value(BABBAGE_FEC_PHY_RESET, 0); | ||
| 238 | msleep(1); | 237 | msleep(1); |
| 239 | gpio_set_value(BABBAGE_FEC_PHY_RESET, 1); | 238 | gpio_set_value(BABBAGE_FEC_PHY_RESET, 1); |
| 240 | } | 239 | } |
diff --git a/arch/arm/mach-mx5/board-mx53_evk.c b/arch/arm/mach-mx5/board-mx53_evk.c index 7b5735c5ea59..2af3f43f74db 100644 --- a/arch/arm/mach-mx5/board-mx53_evk.c +++ b/arch/arm/mach-mx5/board-mx53_evk.c | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | #include <mach/imx-uart.h> | 34 | #include <mach/imx-uart.h> |
| 35 | #include <mach/iomux-mx53.h> | 35 | #include <mach/iomux-mx53.h> |
| 36 | 36 | ||
| 37 | #define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6) | 37 | #define MX53_EVK_FEC_PHY_RST IMX_GPIO_NR(7, 6) |
| 38 | #define EVK_ECSPI1_CS0 IMX_GPIO_NR(2, 30) | 38 | #define EVK_ECSPI1_CS0 IMX_GPIO_NR(2, 30) |
| 39 | #define EVK_ECSPI1_CS1 IMX_GPIO_NR(3, 19) | 39 | #define EVK_ECSPI1_CS1 IMX_GPIO_NR(3, 19) |
| 40 | 40 | ||
| @@ -82,15 +82,14 @@ static inline void mx53_evk_fec_reset(void) | |||
| 82 | int ret; | 82 | int ret; |
| 83 | 83 | ||
| 84 | /* reset FEC PHY */ | 84 | /* reset FEC PHY */ |
| 85 | ret = gpio_request(SMD_FEC_PHY_RST, "fec-phy-reset"); | 85 | ret = gpio_request_one(MX53_EVK_FEC_PHY_RST, GPIOF_OUT_INIT_LOW, |
| 86 | "fec-phy-reset"); | ||
| 86 | if (ret) { | 87 | if (ret) { |
| 87 | printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret); | 88 | printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret); |
| 88 | return; | 89 | return; |
| 89 | } | 90 | } |
| 90 | gpio_direction_output(SMD_FEC_PHY_RST, 0); | ||
| 91 | gpio_set_value(SMD_FEC_PHY_RST, 0); | ||
| 92 | msleep(1); | 91 | msleep(1); |
| 93 | gpio_set_value(SMD_FEC_PHY_RST, 1); | 92 | gpio_set_value(MX53_EVK_FEC_PHY_RST, 1); |
| 94 | } | 93 | } |
| 95 | 94 | ||
| 96 | static struct fec_platform_data mx53_evk_fec_pdata = { | 95 | static struct fec_platform_data mx53_evk_fec_pdata = { |
diff --git a/arch/arm/mach-mx5/board-mx53_loco.c b/arch/arm/mach-mx5/board-mx53_loco.c index 0a18f8d23eb0..10a1bea10548 100644 --- a/arch/arm/mach-mx5/board-mx53_loco.c +++ b/arch/arm/mach-mx5/board-mx53_loco.c | |||
| @@ -36,6 +36,9 @@ | |||
| 36 | #include "crm_regs.h" | 36 | #include "crm_regs.h" |
| 37 | #include "devices-imx53.h" | 37 | #include "devices-imx53.h" |
| 38 | 38 | ||
| 39 | #define MX53_LOCO_POWER IMX_GPIO_NR(1, 8) | ||
| 40 | #define MX53_LOCO_UI1 IMX_GPIO_NR(2, 14) | ||
| 41 | #define MX53_LOCO_UI2 IMX_GPIO_NR(2, 15) | ||
| 39 | #define LOCO_FEC_PHY_RST IMX_GPIO_NR(7, 6) | 42 | #define LOCO_FEC_PHY_RST IMX_GPIO_NR(7, 6) |
| 40 | 43 | ||
| 41 | static iomux_v3_cfg_t mx53_loco_pads[] = { | 44 | static iomux_v3_cfg_t mx53_loco_pads[] = { |
| @@ -180,6 +183,27 @@ static iomux_v3_cfg_t mx53_loco_pads[] = { | |||
| 180 | MX53_PAD_GPIO_8__GPIO1_8, | 183 | MX53_PAD_GPIO_8__GPIO1_8, |
| 181 | }; | 184 | }; |
| 182 | 185 | ||
| 186 | #define GPIO_BUTTON(gpio_num, ev_code, act_low, descr, wake) \ | ||
| 187 | { \ | ||
| 188 | .gpio = gpio_num, \ | ||
| 189 | .type = EV_KEY, \ | ||
| 190 | .code = ev_code, \ | ||
| 191 | .active_low = act_low, \ | ||
| 192 | .desc = "btn " descr, \ | ||
| 193 | .wakeup = wake, \ | ||
| 194 | } | ||
| 195 | |||
| 196 | static const struct gpio_keys_button loco_buttons[] __initconst = { | ||
| 197 | GPIO_BUTTON(MX53_LOCO_POWER, KEY_POWER, 1, "power", 0), | ||
| 198 | GPIO_BUTTON(MX53_LOCO_UI1, KEY_VOLUMEUP, 1, "volume-up", 0), | ||
| 199 | GPIO_BUTTON(MX53_LOCO_UI2, KEY_VOLUMEDOWN, 1, "volume-down", 0), | ||
| 200 | }; | ||
| 201 | |||
| 202 | static const struct gpio_keys_platform_data loco_button_data __initconst = { | ||
| 203 | .buttons = loco_buttons, | ||
| 204 | .nbuttons = ARRAY_SIZE(loco_buttons), | ||
| 205 | }; | ||
| 206 | |||
| 183 | static inline void mx53_loco_fec_reset(void) | 207 | static inline void mx53_loco_fec_reset(void) |
| 184 | { | 208 | { |
| 185 | int ret; | 209 | int ret; |
| @@ -215,6 +239,7 @@ static void __init mx53_loco_board_init(void) | |||
| 215 | imx53_add_imx_i2c(1, &mx53_loco_i2c_data); | 239 | imx53_add_imx_i2c(1, &mx53_loco_i2c_data); |
| 216 | imx53_add_sdhci_esdhc_imx(0, NULL); | 240 | imx53_add_sdhci_esdhc_imx(0, NULL); |
| 217 | imx53_add_sdhci_esdhc_imx(2, NULL); | 241 | imx53_add_sdhci_esdhc_imx(2, NULL); |
| 242 | imx_add_gpio_keys(&loco_button_data); | ||
| 218 | } | 243 | } |
| 219 | 244 | ||
| 220 | static void __init mx53_loco_timer_init(void) | 245 | static void __init mx53_loco_timer_init(void) |
diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c index 652ace413825..fdbc05ed5513 100644 --- a/arch/arm/mach-mx5/clock-mx51-mx53.c +++ b/arch/arm/mach-mx5/clock-mx51-mx53.c | |||
| @@ -865,6 +865,13 @@ static struct clk aips_tz2_clk = { | |||
| 865 | .disable = _clk_ccgr_disable_inwait, | 865 | .disable = _clk_ccgr_disable_inwait, |
| 866 | }; | 866 | }; |
| 867 | 867 | ||
| 868 | static struct clk gpc_dvfs_clk = { | ||
| 869 | .enable_reg = MXC_CCM_CCGR5, | ||
| 870 | .enable_shift = MXC_CCM_CCGRx_CG12_OFFSET, | ||
| 871 | .enable = _clk_ccgr_enable, | ||
| 872 | .disable = _clk_ccgr_disable, | ||
| 873 | }; | ||
| 874 | |||
| 868 | static struct clk gpt_32k_clk = { | 875 | static struct clk gpt_32k_clk = { |
| 869 | .id = 0, | 876 | .id = 0, |
| 870 | .parent = &ckil_clk, | 877 | .parent = &ckil_clk, |
| @@ -1448,6 +1455,7 @@ static struct clk_lookup mx51_lookups[] = { | |||
| 1448 | _REGISTER_CLOCK("imx-ipuv3", NULL, ipu_clk) | 1455 | _REGISTER_CLOCK("imx-ipuv3", NULL, ipu_clk) |
| 1449 | _REGISTER_CLOCK("imx-ipuv3", "di0", ipu_di0_clk) | 1456 | _REGISTER_CLOCK("imx-ipuv3", "di0", ipu_di0_clk) |
| 1450 | _REGISTER_CLOCK("imx-ipuv3", "di1", ipu_di1_clk) | 1457 | _REGISTER_CLOCK("imx-ipuv3", "di1", ipu_di1_clk) |
| 1458 | _REGISTER_CLOCK(NULL, "gpc_dvfs", gpc_dvfs_clk) | ||
| 1451 | }; | 1459 | }; |
| 1452 | 1460 | ||
| 1453 | static struct clk_lookup mx53_lookups[] = { | 1461 | static struct clk_lookup mx53_lookups[] = { |
| @@ -1511,6 +1519,7 @@ int __init mx51_clocks_init(unsigned long ckil, unsigned long osc, | |||
| 1511 | clk_enable(&iim_clk); | 1519 | clk_enable(&iim_clk); |
| 1512 | mx51_revision(); | 1520 | mx51_revision(); |
| 1513 | clk_disable(&iim_clk); | 1521 | clk_disable(&iim_clk); |
| 1522 | mx51_display_revision(); | ||
| 1514 | 1523 | ||
| 1515 | /* move usb_phy_clk to 24MHz */ | 1524 | /* move usb_phy_clk to 24MHz */ |
| 1516 | clk_set_parent(&usb_phy1_clk, &osc_clk); | 1525 | clk_set_parent(&usb_phy1_clk, &osc_clk); |
diff --git a/arch/arm/mach-mx5/cpu.c b/arch/arm/mach-mx5/cpu.c index df46b5e60857..472bdfab2e55 100644 --- a/arch/arm/mach-mx5/cpu.c +++ b/arch/arm/mach-mx5/cpu.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | static int cpu_silicon_rev = -1; | 21 | static int cpu_silicon_rev = -1; |
| 22 | 22 | ||
| 23 | #define IIM_SREV 0x24 | 23 | #define IIM_SREV 0x24 |
| 24 | #define MX50_HW_ADADIG_DIGPROG 0xB0 | ||
| 24 | 25 | ||
| 25 | static int get_mx51_srev(void) | 26 | static int get_mx51_srev(void) |
| 26 | { | 27 | { |
| @@ -51,6 +52,26 @@ int mx51_revision(void) | |||
| 51 | } | 52 | } |
| 52 | EXPORT_SYMBOL(mx51_revision); | 53 | EXPORT_SYMBOL(mx51_revision); |
| 53 | 54 | ||
| 55 | void mx51_display_revision(void) | ||
| 56 | { | ||
| 57 | int rev; | ||
| 58 | char *srev; | ||
| 59 | rev = mx51_revision(); | ||
| 60 | |||
| 61 | switch (rev) { | ||
| 62 | case IMX_CHIP_REVISION_2_0: | ||
| 63 | srev = IMX_CHIP_REVISION_2_0_STRING; | ||
| 64 | break; | ||
| 65 | case IMX_CHIP_REVISION_3_0: | ||
| 66 | srev = IMX_CHIP_REVISION_3_0_STRING; | ||
| 67 | break; | ||
| 68 | default: | ||
| 69 | srev = IMX_CHIP_REVISION_UNKNOWN_STRING; | ||
| 70 | } | ||
| 71 | printk(KERN_INFO "CPU identified as i.MX51, silicon rev %s\n", srev); | ||
| 72 | } | ||
| 73 | EXPORT_SYMBOL(mx51_display_revision); | ||
| 74 | |||
| 54 | #ifdef CONFIG_NEON | 75 | #ifdef CONFIG_NEON |
| 55 | 76 | ||
| 56 | /* | 77 | /* |
| @@ -107,6 +128,44 @@ int mx53_revision(void) | |||
| 107 | } | 128 | } |
| 108 | EXPORT_SYMBOL(mx53_revision); | 129 | EXPORT_SYMBOL(mx53_revision); |
| 109 | 130 | ||
| 131 | static int get_mx50_srev(void) | ||
| 132 | { | ||
| 133 | void __iomem *anatop = ioremap(MX50_ANATOP_BASE_ADDR, SZ_8K); | ||
| 134 | u32 rev; | ||
| 135 | |||
| 136 | if (!anatop) { | ||
| 137 | cpu_silicon_rev = -EINVAL; | ||
| 138 | return 0; | ||
| 139 | } | ||
| 140 | |||
| 141 | rev = readl(anatop + MX50_HW_ADADIG_DIGPROG); | ||
| 142 | rev &= 0xff; | ||
| 143 | |||
| 144 | iounmap(anatop); | ||
| 145 | if (rev == 0x0) | ||
| 146 | return IMX_CHIP_REVISION_1_0; | ||
| 147 | else if (rev == 0x1) | ||
| 148 | return IMX_CHIP_REVISION_1_1; | ||
| 149 | return 0; | ||
| 150 | } | ||
| 151 | |||
| 152 | /* | ||
| 153 | * Returns: | ||
| 154 | * the silicon revision of the cpu | ||
| 155 | * -EINVAL - not a mx50 | ||
| 156 | */ | ||
| 157 | int mx50_revision(void) | ||
| 158 | { | ||
| 159 | if (!cpu_is_mx50()) | ||
| 160 | return -EINVAL; | ||
| 161 | |||
| 162 | if (cpu_silicon_rev == -1) | ||
| 163 | cpu_silicon_rev = get_mx50_srev(); | ||
| 164 | |||
| 165 | return cpu_silicon_rev; | ||
| 166 | } | ||
| 167 | EXPORT_SYMBOL(mx50_revision); | ||
| 168 | |||
| 110 | static int __init post_cpu_init(void) | 169 | static int __init post_cpu_init(void) |
| 111 | { | 170 | { |
| 112 | unsigned int reg; | 171 | unsigned int reg; |
diff --git a/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c b/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c index c372a4373691..e6c1119c20ae 100644 --- a/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c +++ b/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c | |||
| @@ -67,6 +67,10 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { | |||
| 67 | MX51_PAD_SD1_DATA1__SD1_DATA1, | 67 | MX51_PAD_SD1_DATA1__SD1_DATA1, |
| 68 | MX51_PAD_SD1_DATA2__SD1_DATA2, | 68 | MX51_PAD_SD1_DATA2__SD1_DATA2, |
| 69 | MX51_PAD_SD1_DATA3__SD1_DATA3, | 69 | MX51_PAD_SD1_DATA3__SD1_DATA3, |
| 70 | /* SD1 CD */ | ||
| 71 | _MX51_PAD_GPIO1_0__SD1_CD | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP | | ||
| 72 | PAD_CTL_PKE | PAD_CTL_SRE_FAST | | ||
| 73 | PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), | ||
| 70 | }; | 74 | }; |
| 71 | 75 | ||
| 72 | #define GPIO_LED1 IMX_GPIO_NR(3, 30) | 76 | #define GPIO_LED1 IMX_GPIO_NR(3, 30) |
diff --git a/arch/arm/mach-mx5/mx51_efika.c b/arch/arm/mach-mx5/mx51_efika.c index 868af8f435fa..d0c7075937cf 100644 --- a/arch/arm/mach-mx5/mx51_efika.c +++ b/arch/arm/mach-mx5/mx51_efika.c | |||
| @@ -42,7 +42,6 @@ | |||
| 42 | #include <asm/mach-types.h> | 42 | #include <asm/mach-types.h> |
| 43 | #include <asm/mach/arch.h> | 43 | #include <asm/mach/arch.h> |
| 44 | #include <asm/mach/time.h> | 44 | #include <asm/mach/time.h> |
| 45 | #include <asm/mach-types.h> | ||
| 46 | 45 | ||
| 47 | #include "devices-imx51.h" | 46 | #include "devices-imx51.h" |
| 48 | #include "devices.h" | 47 | #include "devices.h" |
diff --git a/arch/arm/mach-mx5/system.c b/arch/arm/mach-mx5/system.c new file mode 100644 index 000000000000..76ae8dc33e00 --- /dev/null +++ b/arch/arm/mach-mx5/system.c | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 3 | */ | ||
| 4 | |||
| 5 | /* | ||
| 6 | * The code contained herein is licensed under the GNU General Public | ||
| 7 | * License. You may obtain a copy of the GNU General Public License | ||
| 8 | * Version 2 or later at the following locations: | ||
| 9 | * | ||
| 10 | * http://www.opensource.org/licenses/gpl-license.html | ||
| 11 | * http://www.gnu.org/copyleft/gpl.html | ||
| 12 | */ | ||
| 13 | #include <linux/platform_device.h> | ||
| 14 | #include <linux/io.h> | ||
| 15 | #include <mach/hardware.h> | ||
| 16 | #include "crm_regs.h" | ||
| 17 | |||
| 18 | /* set cpu low power mode before WFI instruction. This function is called | ||
| 19 | * mx5 because it can be used for mx50, mx51, and mx53.*/ | ||
| 20 | void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode) | ||
| 21 | { | ||
| 22 | u32 plat_lpc, arm_srpgcr, ccm_clpcr; | ||
| 23 | u32 empgc0, empgc1; | ||
| 24 | int stop_mode = 0; | ||
| 25 | |||
| 26 | /* always allow platform to issue a deep sleep mode request */ | ||
| 27 | plat_lpc = __raw_readl(MXC_CORTEXA8_PLAT_LPC) & | ||
| 28 | ~(MXC_CORTEXA8_PLAT_LPC_DSM); | ||
| 29 | ccm_clpcr = __raw_readl(MXC_CCM_CLPCR) & ~(MXC_CCM_CLPCR_LPM_MASK); | ||
| 30 | arm_srpgcr = __raw_readl(MXC_SRPG_ARM_SRPGCR) & ~(MXC_SRPGCR_PCR); | ||
| 31 | empgc0 = __raw_readl(MXC_SRPG_EMPGC0_SRPGCR) & ~(MXC_SRPGCR_PCR); | ||
| 32 | empgc1 = __raw_readl(MXC_SRPG_EMPGC1_SRPGCR) & ~(MXC_SRPGCR_PCR); | ||
| 33 | |||
| 34 | switch (mode) { | ||
| 35 | case WAIT_CLOCKED: | ||
| 36 | break; | ||
| 37 | case WAIT_UNCLOCKED: | ||
| 38 | ccm_clpcr |= 0x1 << MXC_CCM_CLPCR_LPM_OFFSET; | ||
| 39 | break; | ||
| 40 | case WAIT_UNCLOCKED_POWER_OFF: | ||
| 41 | case STOP_POWER_OFF: | ||
| 42 | plat_lpc |= MXC_CORTEXA8_PLAT_LPC_DSM | ||
| 43 | | MXC_CORTEXA8_PLAT_LPC_DBG_DSM; | ||
| 44 | if (mode == WAIT_UNCLOCKED_POWER_OFF) { | ||
| 45 | ccm_clpcr |= 0x1 << MXC_CCM_CLPCR_LPM_OFFSET; | ||
| 46 | ccm_clpcr &= ~MXC_CCM_CLPCR_VSTBY; | ||
| 47 | ccm_clpcr &= ~MXC_CCM_CLPCR_SBYOS; | ||
| 48 | stop_mode = 0; | ||
| 49 | } else { | ||
| 50 | ccm_clpcr |= 0x2 << MXC_CCM_CLPCR_LPM_OFFSET; | ||
| 51 | ccm_clpcr |= 0x3 << MXC_CCM_CLPCR_STBY_COUNT_OFFSET; | ||
| 52 | ccm_clpcr |= MXC_CCM_CLPCR_VSTBY; | ||
| 53 | ccm_clpcr |= MXC_CCM_CLPCR_SBYOS; | ||
| 54 | stop_mode = 1; | ||
| 55 | } | ||
| 56 | arm_srpgcr |= MXC_SRPGCR_PCR; | ||
| 57 | |||
| 58 | if (tzic_enable_wake(1) != 0) | ||
| 59 | return; | ||
| 60 | break; | ||
| 61 | case STOP_POWER_ON: | ||
| 62 | ccm_clpcr |= 0x2 << MXC_CCM_CLPCR_LPM_OFFSET; | ||
| 63 | break; | ||
| 64 | default: | ||
| 65 | printk(KERN_WARNING "UNKNOWN cpu power mode: %d\n", mode); | ||
| 66 | return; | ||
| 67 | } | ||
| 68 | |||
| 69 | __raw_writel(plat_lpc, MXC_CORTEXA8_PLAT_LPC); | ||
| 70 | __raw_writel(ccm_clpcr, MXC_CCM_CLPCR); | ||
| 71 | __raw_writel(arm_srpgcr, MXC_SRPG_ARM_SRPGCR); | ||
| 72 | |||
| 73 | /* Enable NEON SRPG for all but MX50TO1.0. */ | ||
| 74 | if (mx50_revision() != IMX_CHIP_REVISION_1_0) | ||
| 75 | __raw_writel(arm_srpgcr, MXC_SRPG_NEON_SRPGCR); | ||
| 76 | |||
| 77 | if (stop_mode) { | ||
| 78 | empgc0 |= MXC_SRPGCR_PCR; | ||
| 79 | empgc1 |= MXC_SRPGCR_PCR; | ||
| 80 | |||
| 81 | __raw_writel(empgc0, MXC_SRPG_EMPGC0_SRPGCR); | ||
| 82 | __raw_writel(empgc1, MXC_SRPG_EMPGC1_SRPGCR); | ||
| 83 | } | ||
| 84 | } | ||
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig index 4f6f174af6c8..4522fbb235d5 100644 --- a/arch/arm/mach-mxs/Kconfig +++ b/arch/arm/mach-mxs/Kconfig | |||
| @@ -22,6 +22,7 @@ config MACH_MX23EVK | |||
| 22 | select SOC_IMX23 | 22 | select SOC_IMX23 |
| 23 | select MXS_HAVE_AMBA_DUART | 23 | select MXS_HAVE_AMBA_DUART |
| 24 | select MXS_HAVE_PLATFORM_AUART | 24 | select MXS_HAVE_PLATFORM_AUART |
| 25 | select MXS_HAVE_PLATFORM_MXS_MMC | ||
| 25 | select MXS_HAVE_PLATFORM_MXSFB | 26 | select MXS_HAVE_PLATFORM_MXSFB |
| 26 | default y | 27 | default y |
| 27 | help | 28 | help |
| @@ -35,6 +36,7 @@ config MACH_MX28EVK | |||
| 35 | select MXS_HAVE_PLATFORM_AUART | 36 | select MXS_HAVE_PLATFORM_AUART |
| 36 | select MXS_HAVE_PLATFORM_FEC | 37 | select MXS_HAVE_PLATFORM_FEC |
| 37 | select MXS_HAVE_PLATFORM_FLEXCAN | 38 | select MXS_HAVE_PLATFORM_FLEXCAN |
| 39 | select MXS_HAVE_PLATFORM_MXS_MMC | ||
| 38 | select MXS_HAVE_PLATFORM_MXSFB | 40 | select MXS_HAVE_PLATFORM_MXSFB |
| 39 | select MXS_OCOTP | 41 | select MXS_OCOTP |
| 40 | default y | 42 | default y |
diff --git a/arch/arm/mach-mxs/clock-mx23.c b/arch/arm/mach-mxs/clock-mx23.c index d133c7f30940..c3577ea789ac 100644 --- a/arch/arm/mach-mxs/clock-mx23.c +++ b/arch/arm/mach-mxs/clock-mx23.c | |||
| @@ -521,6 +521,15 @@ static int clk_misc_init(void) | |||
| 521 | __raw_writel(BM_CLKCTRL_CPU_INTERRUPT_WAIT, | 521 | __raw_writel(BM_CLKCTRL_CPU_INTERRUPT_WAIT, |
| 522 | CLKCTRL_BASE_ADDR + HW_CLKCTRL_CPU_SET); | 522 | CLKCTRL_BASE_ADDR + HW_CLKCTRL_CPU_SET); |
| 523 | 523 | ||
| 524 | /* | ||
| 525 | * 480 MHz seems too high to be ssp clock source directly, | ||
| 526 | * so set frac to get a 288 MHz ref_io. | ||
| 527 | */ | ||
| 528 | reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_FRAC); | ||
| 529 | reg &= ~BM_CLKCTRL_FRAC_IOFRAC; | ||
| 530 | reg |= 30 << BP_CLKCTRL_FRAC_IOFRAC; | ||
| 531 | __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_FRAC); | ||
| 532 | |||
| 524 | return 0; | 533 | return 0; |
| 525 | } | 534 | } |
| 526 | 535 | ||
| @@ -528,6 +537,12 @@ int __init mx23_clocks_init(void) | |||
| 528 | { | 537 | { |
| 529 | clk_misc_init(); | 538 | clk_misc_init(); |
| 530 | 539 | ||
| 540 | /* | ||
| 541 | * source ssp clock from ref_io than ref_xtal, | ||
| 542 | * as ref_xtal only provides 24 MHz as maximum. | ||
| 543 | */ | ||
| 544 | clk_set_parent(&ssp_clk, &ref_io_clk); | ||
| 545 | |||
| 531 | clk_enable(&cpu_clk); | 546 | clk_enable(&cpu_clk); |
| 532 | clk_enable(&hbus_clk); | 547 | clk_enable(&hbus_clk); |
| 533 | clk_enable(&xbus_clk); | 548 | clk_enable(&xbus_clk); |
diff --git a/arch/arm/mach-mxs/clock-mx28.c b/arch/arm/mach-mxs/clock-mx28.c index 5e489a2b2023..1ad97fed1e94 100644 --- a/arch/arm/mach-mxs/clock-mx28.c +++ b/arch/arm/mach-mxs/clock-mx28.c | |||
| @@ -618,6 +618,8 @@ static struct clk_lookup lookups[] = { | |||
| 618 | _REGISTER_CLOCK("pll2", NULL, pll2_clk) | 618 | _REGISTER_CLOCK("pll2", NULL, pll2_clk) |
| 619 | _REGISTER_CLOCK("mxs-dma-apbh", NULL, hbus_clk) | 619 | _REGISTER_CLOCK("mxs-dma-apbh", NULL, hbus_clk) |
| 620 | _REGISTER_CLOCK("mxs-dma-apbx", NULL, xbus_clk) | 620 | _REGISTER_CLOCK("mxs-dma-apbx", NULL, xbus_clk) |
| 621 | _REGISTER_CLOCK("mxs-mmc.0", NULL, ssp0_clk) | ||
| 622 | _REGISTER_CLOCK("mxs-mmc.1", NULL, ssp1_clk) | ||
| 621 | _REGISTER_CLOCK("flexcan.0", NULL, can0_clk) | 623 | _REGISTER_CLOCK("flexcan.0", NULL, can0_clk) |
| 622 | _REGISTER_CLOCK("flexcan.1", NULL, can1_clk) | 624 | _REGISTER_CLOCK("flexcan.1", NULL, can1_clk) |
| 623 | _REGISTER_CLOCK(NULL, "usb0", usb0_clk) | 625 | _REGISTER_CLOCK(NULL, "usb0", usb0_clk) |
| @@ -737,6 +739,15 @@ static int clk_misc_init(void) | |||
| 737 | reg |= BM_CLKCTRL_ENET_CLK_OUT_EN; | 739 | reg |= BM_CLKCTRL_ENET_CLK_OUT_EN; |
| 738 | __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_ENET); | 740 | __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_ENET); |
| 739 | 741 | ||
| 742 | /* | ||
| 743 | * 480 MHz seems too high to be ssp clock source directly, | ||
| 744 | * so set frac0 to get a 288 MHz ref_io0. | ||
| 745 | */ | ||
| 746 | reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_FRAC0); | ||
| 747 | reg &= ~BM_CLKCTRL_FRAC0_IO0FRAC; | ||
| 748 | reg |= 30 << BP_CLKCTRL_FRAC0_IO0FRAC; | ||
| 749 | __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_FRAC0); | ||
| 750 | |||
| 740 | return 0; | 751 | return 0; |
| 741 | } | 752 | } |
| 742 | 753 | ||
| @@ -744,6 +755,13 @@ int __init mx28_clocks_init(void) | |||
| 744 | { | 755 | { |
| 745 | clk_misc_init(); | 756 | clk_misc_init(); |
| 746 | 757 | ||
| 758 | /* | ||
| 759 | * source ssp clock from ref_io0 than ref_xtal, | ||
| 760 | * as ref_xtal only provides 24 MHz as maximum. | ||
| 761 | */ | ||
| 762 | clk_set_parent(&ssp0_clk, &ref_io0_clk); | ||
| 763 | clk_set_parent(&ssp1_clk, &ref_io0_clk); | ||
| 764 | |||
| 747 | clk_enable(&cpu_clk); | 765 | clk_enable(&cpu_clk); |
| 748 | clk_enable(&hbus_clk); | 766 | clk_enable(&hbus_clk); |
| 749 | clk_enable(&xbus_clk); | 767 | clk_enable(&xbus_clk); |
diff --git a/arch/arm/mach-mxs/devices-mx23.h b/arch/arm/mach-mxs/devices-mx23.h index c7e14f4e3669..c6f345febd39 100644 --- a/arch/arm/mach-mxs/devices-mx23.h +++ b/arch/arm/mach-mxs/devices-mx23.h | |||
| @@ -21,6 +21,10 @@ extern const struct mxs_auart_data mx23_auart_data[] __initconst; | |||
| 21 | #define mx23_add_auart0() mx23_add_auart(0) | 21 | #define mx23_add_auart0() mx23_add_auart(0) |
| 22 | #define mx23_add_auart1() mx23_add_auart(1) | 22 | #define mx23_add_auart1() mx23_add_auart(1) |
| 23 | 23 | ||
| 24 | extern const struct mxs_mxs_mmc_data mx23_mxs_mmc_data[] __initconst; | ||
| 25 | #define mx23_add_mxs_mmc(id, pdata) \ | ||
| 26 | mxs_add_mxs_mmc(&mx23_mxs_mmc_data[id], pdata) | ||
| 27 | |||
| 24 | #define mx23_add_mxs_pwm(id) mxs_add_mxs_pwm(MX23_PWM_BASE_ADDR, id) | 28 | #define mx23_add_mxs_pwm(id) mxs_add_mxs_pwm(MX23_PWM_BASE_ADDR, id) |
| 25 | 29 | ||
| 26 | struct platform_device *__init mx23_add_mxsfb( | 30 | struct platform_device *__init mx23_add_mxsfb( |
diff --git a/arch/arm/mach-mxs/devices-mx28.h b/arch/arm/mach-mxs/devices-mx28.h index 9d08555c4cf0..c473eddce8cf 100644 --- a/arch/arm/mach-mxs/devices-mx28.h +++ b/arch/arm/mach-mxs/devices-mx28.h | |||
| @@ -37,6 +37,10 @@ extern const struct mxs_flexcan_data mx28_flexcan_data[] __initconst; | |||
| 37 | extern const struct mxs_i2c_data mx28_mxs_i2c_data[] __initconst; | 37 | extern const struct mxs_i2c_data mx28_mxs_i2c_data[] __initconst; |
| 38 | #define mx28_add_mxs_i2c(id) mxs_add_mxs_i2c(&mx28_mxs_i2c_data[id]) | 38 | #define mx28_add_mxs_i2c(id) mxs_add_mxs_i2c(&mx28_mxs_i2c_data[id]) |
| 39 | 39 | ||
| 40 | extern const struct mxs_mxs_mmc_data mx28_mxs_mmc_data[] __initconst; | ||
| 41 | #define mx28_add_mxs_mmc(id, pdata) \ | ||
| 42 | mxs_add_mxs_mmc(&mx28_mxs_mmc_data[id], pdata) | ||
| 43 | |||
| 40 | #define mx28_add_mxs_pwm(id) mxs_add_mxs_pwm(MX28_PWM_BASE_ADDR, id) | 44 | #define mx28_add_mxs_pwm(id) mxs_add_mxs_pwm(MX28_PWM_BASE_ADDR, id) |
| 41 | 45 | ||
| 42 | struct platform_device *__init mx28_add_mxsfb( | 46 | struct platform_device *__init mx28_add_mxsfb( |
diff --git a/arch/arm/mach-mxs/devices/Kconfig b/arch/arm/mach-mxs/devices/Kconfig index 1451ad060d82..acf9eea124c0 100644 --- a/arch/arm/mach-mxs/devices/Kconfig +++ b/arch/arm/mach-mxs/devices/Kconfig | |||
| @@ -15,6 +15,9 @@ config MXS_HAVE_PLATFORM_FLEXCAN | |||
| 15 | config MXS_HAVE_PLATFORM_MXS_I2C | 15 | config MXS_HAVE_PLATFORM_MXS_I2C |
| 16 | bool | 16 | bool |
| 17 | 17 | ||
| 18 | config MXS_HAVE_PLATFORM_MXS_MMC | ||
| 19 | bool | ||
| 20 | |||
| 18 | config MXS_HAVE_PLATFORM_MXS_PWM | 21 | config MXS_HAVE_PLATFORM_MXS_PWM |
| 19 | bool | 22 | bool |
| 20 | 23 | ||
diff --git a/arch/arm/mach-mxs/devices/Makefile b/arch/arm/mach-mxs/devices/Makefile index 0d9bea30b0a2..324f2824d38d 100644 --- a/arch/arm/mach-mxs/devices/Makefile +++ b/arch/arm/mach-mxs/devices/Makefile | |||
| @@ -4,5 +4,6 @@ obj-y += platform-dma.o | |||
| 4 | obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC) += platform-fec.o | 4 | obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC) += platform-fec.o |
| 5 | obj-$(CONFIG_MXS_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o | 5 | obj-$(CONFIG_MXS_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o |
| 6 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_I2C) += platform-mxs-i2c.o | 6 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_I2C) += platform-mxs-i2c.o |
| 7 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_MMC) += platform-mxs-mmc.o | ||
| 7 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_PWM) += platform-mxs-pwm.o | 8 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_PWM) += platform-mxs-pwm.o |
| 8 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXSFB) += platform-mxsfb.o | 9 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXSFB) += platform-mxsfb.o |
diff --git a/arch/arm/mach-mxs/devices/platform-mxs-mmc.c b/arch/arm/mach-mxs/devices/platform-mxs-mmc.c new file mode 100644 index 000000000000..382dacbeca21 --- /dev/null +++ b/arch/arm/mach-mxs/devices/platform-mxs-mmc.c | |||
| @@ -0,0 +1,73 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 Pengutronix | ||
| 3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
| 4 | * | ||
| 5 | * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it under | ||
| 8 | * the terms of the GNU General Public License version 2 as published by the | ||
| 9 | * Free Software Foundation. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <linux/compiler.h> | ||
| 13 | #include <linux/err.h> | ||
| 14 | #include <linux/init.h> | ||
| 15 | |||
| 16 | #include <mach/mx23.h> | ||
| 17 | #include <mach/mx28.h> | ||
| 18 | #include <mach/devices-common.h> | ||
| 19 | |||
| 20 | #define mxs_mxs_mmc_data_entry_single(soc, _id, hwid) \ | ||
| 21 | { \ | ||
| 22 | .id = _id, \ | ||
| 23 | .iobase = soc ## _SSP ## hwid ## _BASE_ADDR, \ | ||
| 24 | .dma = soc ## _DMA_SSP ## hwid, \ | ||
| 25 | .irq_err = soc ## _INT_SSP ## hwid ## _ERROR, \ | ||
| 26 | .irq_dma = soc ## _INT_SSP ## hwid ## _DMA, \ | ||
| 27 | } | ||
| 28 | |||
| 29 | #define mxs_mxs_mmc_data_entry(soc, _id, hwid) \ | ||
| 30 | [_id] = mxs_mxs_mmc_data_entry_single(soc, _id, hwid) | ||
| 31 | |||
| 32 | |||
| 33 | #ifdef CONFIG_SOC_IMX23 | ||
| 34 | const struct mxs_mxs_mmc_data mx23_mxs_mmc_data[] __initconst = { | ||
| 35 | mxs_mxs_mmc_data_entry(MX23, 0, 1), | ||
| 36 | mxs_mxs_mmc_data_entry(MX23, 1, 2), | ||
| 37 | }; | ||
| 38 | #endif | ||
| 39 | |||
| 40 | #ifdef CONFIG_SOC_IMX28 | ||
| 41 | const struct mxs_mxs_mmc_data mx28_mxs_mmc_data[] __initconst = { | ||
| 42 | mxs_mxs_mmc_data_entry(MX28, 0, 0), | ||
| 43 | mxs_mxs_mmc_data_entry(MX28, 1, 1), | ||
| 44 | }; | ||
| 45 | #endif | ||
| 46 | |||
| 47 | struct platform_device *__init mxs_add_mxs_mmc( | ||
| 48 | const struct mxs_mxs_mmc_data *data, | ||
| 49 | const struct mxs_mmc_platform_data *pdata) | ||
| 50 | { | ||
| 51 | struct resource res[] = { | ||
| 52 | { | ||
| 53 | .start = data->iobase, | ||
| 54 | .end = data->iobase + SZ_8K - 1, | ||
| 55 | .flags = IORESOURCE_MEM, | ||
| 56 | }, { | ||
| 57 | .start = data->dma, | ||
| 58 | .end = data->dma, | ||
| 59 | .flags = IORESOURCE_DMA, | ||
| 60 | }, { | ||
| 61 | .start = data->irq_err, | ||
| 62 | .end = data->irq_err, | ||
| 63 | .flags = IORESOURCE_IRQ, | ||
| 64 | }, { | ||
| 65 | .start = data->irq_dma, | ||
| 66 | .end = data->irq_dma, | ||
| 67 | .flags = IORESOURCE_IRQ, | ||
| 68 | }, | ||
| 69 | }; | ||
| 70 | |||
| 71 | return mxs_add_platform_device("mxs-mmc", data->id, | ||
| 72 | res, ARRAY_SIZE(res), pdata, sizeof(*pdata)); | ||
| 73 | } | ||
diff --git a/arch/arm/mach-mxs/include/mach/devices-common.h b/arch/arm/mach-mxs/include/mach/devices-common.h index 71f24484b044..c5137f14c364 100644 --- a/arch/arm/mach-mxs/include/mach/devices-common.h +++ b/arch/arm/mach-mxs/include/mach/devices-common.h | |||
| @@ -73,6 +73,19 @@ struct mxs_i2c_data { | |||
| 73 | }; | 73 | }; |
| 74 | struct platform_device * __init mxs_add_mxs_i2c(const struct mxs_i2c_data *data); | 74 | struct platform_device * __init mxs_add_mxs_i2c(const struct mxs_i2c_data *data); |
| 75 | 75 | ||
| 76 | /* mmc */ | ||
| 77 | #include <mach/mmc.h> | ||
| 78 | struct mxs_mxs_mmc_data { | ||
| 79 | int id; | ||
| 80 | resource_size_t iobase; | ||
| 81 | resource_size_t dma; | ||
| 82 | resource_size_t irq_err; | ||
| 83 | resource_size_t irq_dma; | ||
| 84 | }; | ||
| 85 | struct platform_device *__init mxs_add_mxs_mmc( | ||
| 86 | const struct mxs_mxs_mmc_data *data, | ||
| 87 | const struct mxs_mmc_platform_data *pdata); | ||
| 88 | |||
| 76 | /* pwm */ | 89 | /* pwm */ |
| 77 | struct platform_device *__init mxs_add_mxs_pwm( | 90 | struct platform_device *__init mxs_add_mxs_pwm( |
| 78 | resource_size_t iobase, int id); | 91 | resource_size_t iobase, int id); |
diff --git a/arch/arm/mach-mxs/mach-mx23evk.c b/arch/arm/mach-mxs/mach-mx23evk.c index a66994f0518f..214e5b641bbc 100644 --- a/arch/arm/mach-mxs/mach-mx23evk.c +++ b/arch/arm/mach-mxs/mach-mx23evk.c | |||
| @@ -28,6 +28,8 @@ | |||
| 28 | 28 | ||
| 29 | #define MX23EVK_LCD_ENABLE MXS_GPIO_NR(1, 18) | 29 | #define MX23EVK_LCD_ENABLE MXS_GPIO_NR(1, 18) |
| 30 | #define MX23EVK_BL_ENABLE MXS_GPIO_NR(1, 28) | 30 | #define MX23EVK_BL_ENABLE MXS_GPIO_NR(1, 28) |
| 31 | #define MX23EVK_MMC0_WRITE_PROTECT MXS_GPIO_NR(1, 30) | ||
| 32 | #define MX23EVK_MMC0_SLOT_POWER MXS_GPIO_NR(1, 29) | ||
| 31 | 33 | ||
| 32 | static const iomux_cfg_t mx23evk_pads[] __initconst = { | 34 | static const iomux_cfg_t mx23evk_pads[] __initconst = { |
| 33 | /* duart */ | 35 | /* duart */ |
| @@ -73,6 +75,36 @@ static const iomux_cfg_t mx23evk_pads[] __initconst = { | |||
| 73 | MX23_PAD_LCD_RESET__GPIO_1_18 | MXS_PAD_CTRL, | 75 | MX23_PAD_LCD_RESET__GPIO_1_18 | MXS_PAD_CTRL, |
| 74 | /* backlight control */ | 76 | /* backlight control */ |
| 75 | MX23_PAD_PWM2__GPIO_1_28 | MXS_PAD_CTRL, | 77 | MX23_PAD_PWM2__GPIO_1_28 | MXS_PAD_CTRL, |
| 78 | |||
| 79 | /* mmc */ | ||
| 80 | MX23_PAD_SSP1_DATA0__SSP1_DATA0 | | ||
| 81 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 82 | MX23_PAD_SSP1_DATA1__SSP1_DATA1 | | ||
| 83 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 84 | MX23_PAD_SSP1_DATA2__SSP1_DATA2 | | ||
| 85 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 86 | MX23_PAD_SSP1_DATA3__SSP1_DATA3 | | ||
| 87 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 88 | MX23_PAD_GPMI_D08__SSP1_DATA4 | | ||
| 89 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 90 | MX23_PAD_GPMI_D09__SSP1_DATA5 | | ||
| 91 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 92 | MX23_PAD_GPMI_D10__SSP1_DATA6 | | ||
| 93 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 94 | MX23_PAD_GPMI_D11__SSP1_DATA7 | | ||
| 95 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 96 | MX23_PAD_SSP1_CMD__SSP1_CMD | | ||
| 97 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 98 | MX23_PAD_SSP1_DETECT__SSP1_DETECT | | ||
| 99 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 100 | MX23_PAD_SSP1_SCK__SSP1_SCK | | ||
| 101 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 102 | /* write protect */ | ||
| 103 | MX23_PAD_PWM4__GPIO_1_30 | | ||
| 104 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 105 | /* slot power enable */ | ||
| 106 | MX23_PAD_PWM3__GPIO_1_29 | | ||
| 107 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 76 | }; | 108 | }; |
| 77 | 109 | ||
| 78 | /* mxsfb (lcdif) */ | 110 | /* mxsfb (lcdif) */ |
| @@ -101,6 +133,11 @@ static const struct mxsfb_platform_data mx23evk_mxsfb_pdata __initconst = { | |||
| 101 | .ld_intf_width = STMLCDIF_24BIT, | 133 | .ld_intf_width = STMLCDIF_24BIT, |
| 102 | }; | 134 | }; |
| 103 | 135 | ||
| 136 | static struct mxs_mmc_platform_data mx23evk_mmc_pdata __initdata = { | ||
| 137 | .wp_gpio = MX23EVK_MMC0_WRITE_PROTECT, | ||
| 138 | .flags = SLOTF_8_BIT_CAPABLE, | ||
| 139 | }; | ||
| 140 | |||
| 104 | static void __init mx23evk_init(void) | 141 | static void __init mx23evk_init(void) |
| 105 | { | 142 | { |
| 106 | int ret; | 143 | int ret; |
| @@ -110,6 +147,13 @@ static void __init mx23evk_init(void) | |||
| 110 | mx23_add_duart(); | 147 | mx23_add_duart(); |
| 111 | mx23_add_auart0(); | 148 | mx23_add_auart0(); |
| 112 | 149 | ||
| 150 | /* power on mmc slot by writing 0 to the gpio */ | ||
| 151 | ret = gpio_request_one(MX23EVK_MMC0_SLOT_POWER, GPIOF_DIR_OUT, | ||
| 152 | "mmc0-slot-power"); | ||
| 153 | if (ret) | ||
| 154 | pr_warn("failed to request gpio mmc0-slot-power: %d\n", ret); | ||
| 155 | mx23_add_mxs_mmc(0, &mx23evk_mmc_pdata); | ||
| 156 | |||
| 113 | ret = gpio_request_one(MX23EVK_LCD_ENABLE, GPIOF_DIR_OUT, "lcd-enable"); | 157 | ret = gpio_request_one(MX23EVK_LCD_ENABLE, GPIOF_DIR_OUT, "lcd-enable"); |
| 114 | if (ret) | 158 | if (ret) |
| 115 | pr_warn("failed to request gpio lcd-enable: %d\n", ret); | 159 | pr_warn("failed to request gpio lcd-enable: %d\n", ret); |
diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c index 08002d02267a..bb329b9a2608 100644 --- a/arch/arm/mach-mxs/mach-mx28evk.c +++ b/arch/arm/mach-mxs/mach-mx28evk.c | |||
| @@ -34,6 +34,11 @@ | |||
| 34 | #define MX28EVK_LCD_ENABLE MXS_GPIO_NR(3, 30) | 34 | #define MX28EVK_LCD_ENABLE MXS_GPIO_NR(3, 30) |
| 35 | #define MX28EVK_FEC_PHY_RESET MXS_GPIO_NR(4, 13) | 35 | #define MX28EVK_FEC_PHY_RESET MXS_GPIO_NR(4, 13) |
| 36 | 36 | ||
| 37 | #define MX28EVK_MMC0_WRITE_PROTECT MXS_GPIO_NR(2, 12) | ||
| 38 | #define MX28EVK_MMC1_WRITE_PROTECT MXS_GPIO_NR(0, 28) | ||
| 39 | #define MX28EVK_MMC0_SLOT_POWER MXS_GPIO_NR(3, 28) | ||
| 40 | #define MX28EVK_MMC1_SLOT_POWER MXS_GPIO_NR(3, 29) | ||
| 41 | |||
| 37 | static const iomux_cfg_t mx28evk_pads[] __initconst = { | 42 | static const iomux_cfg_t mx28evk_pads[] __initconst = { |
| 38 | /* duart */ | 43 | /* duart */ |
| 39 | MX28_PAD_PWM0__DUART_RX | MXS_PAD_CTRL, | 44 | MX28_PAD_PWM0__DUART_RX | MXS_PAD_CTRL, |
| @@ -115,6 +120,65 @@ static const iomux_cfg_t mx28evk_pads[] __initconst = { | |||
| 115 | MX28_PAD_LCD_RESET__GPIO_3_30 | MXS_PAD_CTRL, | 120 | MX28_PAD_LCD_RESET__GPIO_3_30 | MXS_PAD_CTRL, |
| 116 | /* backlight control */ | 121 | /* backlight control */ |
| 117 | MX28_PAD_PWM2__GPIO_3_18 | MXS_PAD_CTRL, | 122 | MX28_PAD_PWM2__GPIO_3_18 | MXS_PAD_CTRL, |
| 123 | /* mmc0 */ | ||
| 124 | MX28_PAD_SSP0_DATA0__SSP0_D0 | | ||
| 125 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 126 | MX28_PAD_SSP0_DATA1__SSP0_D1 | | ||
| 127 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 128 | MX28_PAD_SSP0_DATA2__SSP0_D2 | | ||
| 129 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 130 | MX28_PAD_SSP0_DATA3__SSP0_D3 | | ||
| 131 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 132 | MX28_PAD_SSP0_DATA4__SSP0_D4 | | ||
| 133 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 134 | MX28_PAD_SSP0_DATA5__SSP0_D5 | | ||
| 135 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 136 | MX28_PAD_SSP0_DATA6__SSP0_D6 | | ||
| 137 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 138 | MX28_PAD_SSP0_DATA7__SSP0_D7 | | ||
| 139 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 140 | MX28_PAD_SSP0_CMD__SSP0_CMD | | ||
| 141 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 142 | MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT | | ||
| 143 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 144 | MX28_PAD_SSP0_SCK__SSP0_SCK | | ||
| 145 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 146 | /* write protect */ | ||
| 147 | MX28_PAD_SSP1_SCK__GPIO_2_12 | | ||
| 148 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 149 | /* slot power enable */ | ||
| 150 | MX28_PAD_PWM3__GPIO_3_28 | | ||
| 151 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 152 | |||
| 153 | /* mmc1 */ | ||
| 154 | MX28_PAD_GPMI_D00__SSP1_D0 | | ||
| 155 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 156 | MX28_PAD_GPMI_D01__SSP1_D1 | | ||
| 157 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 158 | MX28_PAD_GPMI_D02__SSP1_D2 | | ||
| 159 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 160 | MX28_PAD_GPMI_D03__SSP1_D3 | | ||
| 161 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 162 | MX28_PAD_GPMI_D04__SSP1_D4 | | ||
| 163 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 164 | MX28_PAD_GPMI_D05__SSP1_D5 | | ||
| 165 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 166 | MX28_PAD_GPMI_D06__SSP1_D6 | | ||
| 167 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 168 | MX28_PAD_GPMI_D07__SSP1_D7 | | ||
| 169 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 170 | MX28_PAD_GPMI_RDY1__SSP1_CMD | | ||
| 171 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 172 | MX28_PAD_GPMI_RDY0__SSP1_CARD_DETECT | | ||
| 173 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 174 | MX28_PAD_GPMI_WRN__SSP1_SCK | | ||
| 175 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 176 | /* write protect */ | ||
| 177 | MX28_PAD_GPMI_RESETN__GPIO_0_28 | | ||
| 178 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 179 | /* slot power enable */ | ||
| 180 | MX28_PAD_PWM4__GPIO_3_29 | | ||
| 181 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 118 | }; | 182 | }; |
| 119 | 183 | ||
| 120 | /* fec */ | 184 | /* fec */ |
| @@ -258,6 +322,18 @@ static const struct mxsfb_platform_data mx28evk_mxsfb_pdata __initconst = { | |||
| 258 | .ld_intf_width = STMLCDIF_24BIT, | 322 | .ld_intf_width = STMLCDIF_24BIT, |
| 259 | }; | 323 | }; |
| 260 | 324 | ||
| 325 | static struct mxs_mmc_platform_data mx28evk_mmc_pdata[] __initdata = { | ||
| 326 | { | ||
| 327 | /* mmc0 */ | ||
| 328 | .wp_gpio = MX28EVK_MMC0_WRITE_PROTECT, | ||
| 329 | .flags = SLOTF_8_BIT_CAPABLE, | ||
| 330 | }, { | ||
| 331 | /* mmc1 */ | ||
| 332 | .wp_gpio = MX28EVK_MMC1_WRITE_PROTECT, | ||
| 333 | .flags = SLOTF_8_BIT_CAPABLE, | ||
| 334 | }, | ||
| 335 | }; | ||
| 336 | |||
| 261 | static void __init mx28evk_init(void) | 337 | static void __init mx28evk_init(void) |
| 262 | { | 338 | { |
| 263 | int ret; | 339 | int ret; |
| @@ -297,6 +373,19 @@ static void __init mx28evk_init(void) | |||
| 297 | gpio_set_value(MX28EVK_BL_ENABLE, 1); | 373 | gpio_set_value(MX28EVK_BL_ENABLE, 1); |
| 298 | 374 | ||
| 299 | mx28_add_mxsfb(&mx28evk_mxsfb_pdata); | 375 | mx28_add_mxsfb(&mx28evk_mxsfb_pdata); |
| 376 | |||
| 377 | /* power on mmc slot by writing 0 to the gpio */ | ||
| 378 | ret = gpio_request_one(MX28EVK_MMC0_SLOT_POWER, GPIOF_DIR_OUT, | ||
| 379 | "mmc0-slot-power"); | ||
| 380 | if (ret) | ||
| 381 | pr_warn("failed to request gpio mmc0-slot-power: %d\n", ret); | ||
| 382 | mx28_add_mxs_mmc(0, &mx28evk_mmc_pdata[0]); | ||
| 383 | |||
| 384 | ret = gpio_request_one(MX28EVK_MMC1_SLOT_POWER, GPIOF_DIR_OUT, | ||
| 385 | "mmc1-slot-power"); | ||
| 386 | if (ret) | ||
| 387 | pr_warn("failed to request gpio mmc1-slot-power: %d\n", ret); | ||
| 388 | mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]); | ||
| 300 | } | 389 | } |
| 301 | 390 | ||
| 302 | static void __init mx28evk_timer_init(void) | 391 | static void __init mx28evk_timer_init(void) |
diff --git a/arch/arm/mach-mxs/module-tx28.c b/arch/arm/mach-mxs/module-tx28.c index fa0b154da67b..0fcff47009cf 100644 --- a/arch/arm/mach-mxs/module-tx28.c +++ b/arch/arm/mach-mxs/module-tx28.c | |||
| @@ -45,7 +45,7 @@ static const iomux_cfg_t tx28_fec_gpio_pads[] __initconst = { | |||
| 45 | }; | 45 | }; |
| 46 | 46 | ||
| 47 | #define FEC_MODE (MXS_PAD_8MA | MXS_PAD_PULLUP | MXS_PAD_3V3) | 47 | #define FEC_MODE (MXS_PAD_8MA | MXS_PAD_PULLUP | MXS_PAD_3V3) |
| 48 | static const iomux_cfg_t tx28_fec_pads[] __initconst = { | 48 | static const iomux_cfg_t tx28_fec0_pads[] __initconst = { |
| 49 | MX28_PAD_ENET0_MDC__ENET0_MDC | FEC_MODE, | 49 | MX28_PAD_ENET0_MDC__ENET0_MDC | FEC_MODE, |
| 50 | MX28_PAD_ENET0_MDIO__ENET0_MDIO | FEC_MODE, | 50 | MX28_PAD_ENET0_MDIO__ENET0_MDIO | FEC_MODE, |
| 51 | MX28_PAD_ENET0_RX_EN__ENET0_RX_EN | FEC_MODE, | 51 | MX28_PAD_ENET0_RX_EN__ENET0_RX_EN | FEC_MODE, |
| @@ -57,7 +57,20 @@ static const iomux_cfg_t tx28_fec_pads[] __initconst = { | |||
| 57 | MX28_PAD_ENET_CLK__CLKCTRL_ENET | FEC_MODE, | 57 | MX28_PAD_ENET_CLK__CLKCTRL_ENET | FEC_MODE, |
| 58 | }; | 58 | }; |
| 59 | 59 | ||
| 60 | static const struct fec_platform_data tx28_fec_data __initconst = { | 60 | static const iomux_cfg_t tx28_fec1_pads[] __initconst = { |
| 61 | MX28_PAD_ENET0_RXD2__ENET1_RXD0, | ||
| 62 | MX28_PAD_ENET0_RXD3__ENET1_RXD1, | ||
| 63 | MX28_PAD_ENET0_TXD2__ENET1_TXD0, | ||
| 64 | MX28_PAD_ENET0_TXD3__ENET1_TXD1, | ||
| 65 | MX28_PAD_ENET0_COL__ENET1_TX_EN, | ||
| 66 | MX28_PAD_ENET0_CRS__ENET1_RX_EN, | ||
| 67 | }; | ||
| 68 | |||
| 69 | static struct fec_platform_data tx28_fec0_data = { | ||
| 70 | .phy = PHY_INTERFACE_MODE_RMII, | ||
| 71 | }; | ||
| 72 | |||
| 73 | static struct fec_platform_data tx28_fec1_data = { | ||
| 61 | .phy = PHY_INTERFACE_MODE_RMII, | 74 | .phy = PHY_INTERFACE_MODE_RMII, |
| 62 | }; | 75 | }; |
| 63 | 76 | ||
| @@ -108,15 +121,15 @@ int __init tx28_add_fec0(void) | |||
| 108 | pr_debug("%s: Deasserting FEC PHY RESET\n", __func__); | 121 | pr_debug("%s: Deasserting FEC PHY RESET\n", __func__); |
| 109 | gpio_set_value(TX28_FEC_PHY_RESET, 1); | 122 | gpio_set_value(TX28_FEC_PHY_RESET, 1); |
| 110 | 123 | ||
| 111 | ret = mxs_iomux_setup_multiple_pads(tx28_fec_pads, | 124 | ret = mxs_iomux_setup_multiple_pads(tx28_fec0_pads, |
| 112 | ARRAY_SIZE(tx28_fec_pads)); | 125 | ARRAY_SIZE(tx28_fec0_pads)); |
| 113 | if (ret) { | 126 | if (ret) { |
| 114 | pr_debug("%s: mxs_iomux_setup_multiple_pads() failed with rc: %d\n", | 127 | pr_debug("%s: mxs_iomux_setup_multiple_pads() failed with rc: %d\n", |
| 115 | __func__, ret); | 128 | __func__, ret); |
| 116 | goto free_gpios; | 129 | goto free_gpios; |
| 117 | } | 130 | } |
| 118 | pr_debug("%s: Registering FEC device\n", __func__); | 131 | pr_debug("%s: Registering FEC0 device\n", __func__); |
| 119 | mx28_add_fec(0, &tx28_fec_data); | 132 | mx28_add_fec(0, &tx28_fec0_data); |
| 120 | return 0; | 133 | return 0; |
| 121 | 134 | ||
| 122 | free_gpios: | 135 | free_gpios: |
| @@ -129,3 +142,19 @@ free_gpios: | |||
| 129 | 142 | ||
| 130 | return ret; | 143 | return ret; |
| 131 | } | 144 | } |
| 145 | |||
| 146 | int __init tx28_add_fec1(void) | ||
| 147 | { | ||
| 148 | int ret; | ||
| 149 | |||
| 150 | ret = mxs_iomux_setup_multiple_pads(tx28_fec1_pads, | ||
| 151 | ARRAY_SIZE(tx28_fec1_pads)); | ||
| 152 | if (ret) { | ||
| 153 | pr_debug("%s: mxs_iomux_setup_multiple_pads() failed with rc: %d\n", | ||
| 154 | __func__, ret); | ||
| 155 | return ret; | ||
| 156 | } | ||
| 157 | pr_debug("%s: Registering FEC1 device\n", __func__); | ||
| 158 | mx28_add_fec(1, &tx28_fec1_data); | ||
| 159 | return 0; | ||
| 160 | } | ||
diff --git a/arch/arm/mach-mxs/module-tx28.h b/arch/arm/mach-mxs/module-tx28.h index df9e1b6e81bf..8ed425457d30 100644 --- a/arch/arm/mach-mxs/module-tx28.h +++ b/arch/arm/mach-mxs/module-tx28.h | |||
| @@ -7,3 +7,4 @@ | |||
| 7 | * Free Software Foundation. | 7 | * Free Software Foundation. |
| 8 | */ | 8 | */ |
| 9 | int __init tx28_add_fec0(void); | 9 | int __init tx28_add_fec0(void); |
| 10 | int __init tx28_add_fec1(void); | ||
diff --git a/arch/arm/mach-omap1/ams-delta-fiq-handler.S b/arch/arm/mach-omap1/ams-delta-fiq-handler.S index 927d5a181760..c1c5fb6a5b4c 100644 --- a/arch/arm/mach-omap1/ams-delta-fiq-handler.S +++ b/arch/arm/mach-omap1/ams-delta-fiq-handler.S | |||
| @@ -79,7 +79,7 @@ | |||
| 79 | 79 | ||
| 80 | 80 | ||
| 81 | /* | 81 | /* |
| 82 | * Register useage | 82 | * Register usage |
| 83 | * r8 - temporary | 83 | * r8 - temporary |
| 84 | * r9 - the driver buffer | 84 | * r9 - the driver buffer |
| 85 | * r10 - temporary | 85 | * r10 - temporary |
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c index d41fe2d0616a..0ad781db4e66 100644 --- a/arch/arm/mach-omap1/board-sx1.c +++ b/arch/arm/mach-omap1/board-sx1.c | |||
| @@ -399,7 +399,7 @@ static void __init omap_sx1_init(void) | |||
| 399 | sx1_mmc_init(); | 399 | sx1_mmc_init(); |
| 400 | 400 | ||
| 401 | /* turn on USB power */ | 401 | /* turn on USB power */ |
| 402 | /* sx1_setusbpower(1); cant do it here because i2c is not ready */ | 402 | /* sx1_setusbpower(1); can't do it here because i2c is not ready */ |
| 403 | gpio_request(1, "A_IRDA_OFF"); | 403 | gpio_request(1, "A_IRDA_OFF"); |
| 404 | gpio_request(11, "A_SWITCH"); | 404 | gpio_request(11, "A_SWITCH"); |
| 405 | gpio_request(15, "A_USB_ON"); | 405 | gpio_request(15, "A_USB_ON"); |
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index b0f4c231595f..36f26c3fa25e 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
| @@ -281,7 +281,7 @@ static inline void omap_init_audio(void) {} | |||
| 281 | * Claiming GPIOs, and setting their direction and initial values, is the | 281 | * Claiming GPIOs, and setting their direction and initial values, is the |
| 282 | * responsibility of the device drivers. So is responding to probe(). | 282 | * responsibility of the device drivers. So is responding to probe(). |
| 283 | * | 283 | * |
| 284 | * Board-specific knowlege like creating devices or pin setup is to be | 284 | * Board-specific knowledge like creating devices or pin setup is to be |
| 285 | * kept out of drivers as much as possible. In particular, pin setup | 285 | * kept out of drivers as much as possible. In particular, pin setup |
| 286 | * may be handled by the boot loader, and drivers should expect it will | 286 | * may be handled by the boot loader, and drivers should expect it will |
| 287 | * normally have been done by the time they're probed. | 287 | * normally have been done by the time they're probed. |
diff --git a/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h b/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h index 7a2df29400ca..23eed0035ed8 100644 --- a/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h +++ b/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | #endif | 31 | #endif |
| 32 | 32 | ||
| 33 | /* | 33 | /* |
| 34 | * These are the offsets from the begining of the fiq_buffer. They are put here | 34 | * These are the offsets from the beginning of the fiq_buffer. They are put here |
| 35 | * since the buffer and header need to be accessed by drivers servicing devices | 35 | * since the buffer and header need to be accessed by drivers servicing devices |
| 36 | * which generate GPIO interrupts - e.g. keyboard, modem, hook switch. | 36 | * which generate GPIO interrupts - e.g. keyboard, modem, hook switch. |
| 37 | */ | 37 | */ |
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 5f8a2fd06337..34cf982b9679 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
| @@ -696,7 +696,7 @@ static void __init igep2_init(void) | |||
| 696 | igep2_init_smsc911x(); | 696 | igep2_init_smsc911x(); |
| 697 | 697 | ||
| 698 | /* | 698 | /* |
| 699 | * WLAN-BT combo module from MuRata wich has a Marvell WLAN | 699 | * WLAN-BT combo module from MuRata which has a Marvell WLAN |
| 700 | * (88W8686) + CSR Bluetooth chipset. Uses SDIO interface. | 700 | * (88W8686) + CSR Bluetooth chipset. Uses SDIO interface. |
| 701 | */ | 701 | */ |
| 702 | igep2_wlan_bt_init(); | 702 | igep2_wlan_bt_init(); |
diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c index b10db0e6ee62..2cf86c3cb1a3 100644 --- a/arch/arm/mach-omap2/board-igep0030.c +++ b/arch/arm/mach-omap2/board-igep0030.c | |||
| @@ -440,7 +440,7 @@ static void __init igep3_init(void) | |||
| 440 | igep3_leds_init(); | 440 | igep3_leds_init(); |
| 441 | 441 | ||
| 442 | /* | 442 | /* |
| 443 | * WLAN-BT combo module from MuRata wich has a Marvell WLAN | 443 | * WLAN-BT combo module from MuRata which has a Marvell WLAN |
| 444 | * (88W8686) + CSR Bluetooth chipset. Uses SDIO interface. | 444 | * (88W8686) + CSR Bluetooth chipset. Uses SDIO interface. |
| 445 | */ | 445 | */ |
| 446 | igep3_wifi_bt_init(); | 446 | igep3_wifi_bt_init(); |
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index ab878545bd9b..6cb6c03293df 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c | |||
| @@ -258,7 +258,7 @@ static void _resolve_clkdm_deps(struct clockdomain *clkdm, | |||
| 258 | * clkdm_init - set up the clockdomain layer | 258 | * clkdm_init - set up the clockdomain layer |
| 259 | * @clkdms: optional pointer to an array of clockdomains to register | 259 | * @clkdms: optional pointer to an array of clockdomains to register |
| 260 | * @init_autodeps: optional pointer to an array of autodeps to register | 260 | * @init_autodeps: optional pointer to an array of autodeps to register |
| 261 | * @custom_funcs: func pointers for arch specfic implementations | 261 | * @custom_funcs: func pointers for arch specific implementations |
| 262 | * | 262 | * |
| 263 | * Set up internal state. If a pointer to an array of clockdomains | 263 | * Set up internal state. If a pointer to an array of clockdomains |
| 264 | * @clkdms was supplied, loop through the list of clockdomains, | 264 | * @clkdms was supplied, loop through the list of clockdomains, |
diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h index 85b3dce65640..5823584d9cd7 100644 --- a/arch/arm/mach-omap2/clockdomain.h +++ b/arch/arm/mach-omap2/clockdomain.h | |||
| @@ -125,7 +125,7 @@ struct clockdomain { | |||
| 125 | }; | 125 | }; |
| 126 | 126 | ||
| 127 | /** | 127 | /** |
| 128 | * struct clkdm_ops - Arch specfic function implementations | 128 | * struct clkdm_ops - Arch specific function implementations |
| 129 | * @clkdm_add_wkdep: Add a wakeup dependency between clk domains | 129 | * @clkdm_add_wkdep: Add a wakeup dependency between clk domains |
| 130 | * @clkdm_del_wkdep: Delete a wakeup dependency between clk domains | 130 | * @clkdm_del_wkdep: Delete a wakeup dependency between clk domains |
| 131 | * @clkdm_read_wkdep: Read wakeup dependency state between clk domains | 131 | * @clkdm_read_wkdep: Read wakeup dependency state between clk domains |
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index a44c52303405..1c240eff3918 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c | |||
| @@ -297,8 +297,8 @@ DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev); | |||
| 297 | 297 | ||
| 298 | /** | 298 | /** |
| 299 | * omap3_cpuidle_update_states() - Update the cpuidle states | 299 | * omap3_cpuidle_update_states() - Update the cpuidle states |
| 300 | * @mpu_deepest_state: Enable states upto and including this for mpu domain | 300 | * @mpu_deepest_state: Enable states up to and including this for mpu domain |
| 301 | * @core_deepest_state: Enable states upto and including this for core domain | 301 | * @core_deepest_state: Enable states up to and including this for core domain |
| 302 | * | 302 | * |
| 303 | * This goes through the list of states available and enables and disables the | 303 | * This goes through the list of states available and enables and disables the |
| 304 | * validity of C states based on deepest state that can be achieved for the | 304 | * validity of C states based on deepest state that can be achieved for the |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 84d1b735fe80..7b8558564591 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
| @@ -253,7 +253,7 @@ int __init omap4_keyboard_init(struct omap4_keypad_platform_data | |||
| 253 | ARRAY_SIZE(omap_keyboard_latency), 0); | 253 | ARRAY_SIZE(omap_keyboard_latency), 0); |
| 254 | 254 | ||
| 255 | if (IS_ERR(od)) { | 255 | if (IS_ERR(od)) { |
| 256 | WARN(1, "Cant build omap_device for %s:%s.\n", | 256 | WARN(1, "Can't build omap_device for %s:%s.\n", |
| 257 | name, oh->name); | 257 | name, oh->name); |
| 258 | return PTR_ERR(od); | 258 | return PTR_ERR(od); |
| 259 | } | 259 | } |
| @@ -373,7 +373,7 @@ static int omap_mcspi_init(struct omap_hwmod *oh, void *unused) | |||
| 373 | od = omap_device_build(name, spi_num, oh, pdata, | 373 | od = omap_device_build(name, spi_num, oh, pdata, |
| 374 | sizeof(*pdata), omap_mcspi_latency, | 374 | sizeof(*pdata), omap_mcspi_latency, |
| 375 | ARRAY_SIZE(omap_mcspi_latency), 0); | 375 | ARRAY_SIZE(omap_mcspi_latency), 0); |
| 376 | WARN(IS_ERR(od), "Cant build omap_device for %s:%s\n", | 376 | WARN(IS_ERR(od), "Can't build omap_device for %s:%s\n", |
| 377 | name, oh->name); | 377 | name, oh->name); |
| 378 | kfree(pdata); | 378 | kfree(pdata); |
| 379 | return 0; | 379 | return 0; |
| @@ -725,7 +725,7 @@ static int __init omap_init_wdt(void) | |||
| 725 | od = omap_device_build(dev_name, id, oh, NULL, 0, | 725 | od = omap_device_build(dev_name, id, oh, NULL, 0, |
| 726 | omap_wdt_latency, | 726 | omap_wdt_latency, |
| 727 | ARRAY_SIZE(omap_wdt_latency), 0); | 727 | ARRAY_SIZE(omap_wdt_latency), 0); |
| 728 | WARN(IS_ERR(od), "Cant build omap_device for %s:%s.\n", | 728 | WARN(IS_ERR(od), "Can't build omap_device for %s:%s.\n", |
| 729 | dev_name, oh->name); | 729 | dev_name, oh->name); |
| 730 | return 0; | 730 | return 0; |
| 731 | } | 731 | } |
diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c index 34922b2d2e3f..c9ff0e79703d 100644 --- a/arch/arm/mach-omap2/dma.c +++ b/arch/arm/mach-omap2/dma.c | |||
| @@ -262,7 +262,7 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused) | |||
| 262 | omap2_dma_latency, ARRAY_SIZE(omap2_dma_latency), 0); | 262 | omap2_dma_latency, ARRAY_SIZE(omap2_dma_latency), 0); |
| 263 | kfree(p); | 263 | kfree(p); |
| 264 | if (IS_ERR(od)) { | 264 | if (IS_ERR(od)) { |
| 265 | pr_err("%s: Cant build omap_device for %s:%s.\n", | 265 | pr_err("%s: Can't build omap_device for %s:%s.\n", |
| 266 | __func__, name, oh->name); | 266 | __func__, name, oh->name); |
| 267 | return PTR_ERR(od); | 267 | return PTR_ERR(od); |
| 268 | } | 268 | } |
diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c index 413de18c1d2b..9529842ae054 100644 --- a/arch/arm/mach-omap2/gpio.c +++ b/arch/arm/mach-omap2/gpio.c | |||
| @@ -82,7 +82,7 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) | |||
| 82 | kfree(pdata); | 82 | kfree(pdata); |
| 83 | 83 | ||
| 84 | if (IS_ERR(od)) { | 84 | if (IS_ERR(od)) { |
| 85 | WARN(1, "Cant build omap_device for %s:%s.\n", | 85 | WARN(1, "Can't build omap_device for %s:%s.\n", |
| 86 | name, oh->name); | 86 | name, oh->name); |
| 87 | return PTR_ERR(od); | 87 | return PTR_ERR(od); |
| 88 | } | 88 | } |
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index 137e1a5f3d85..b2f30bed5a20 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
| @@ -465,7 +465,7 @@ void __init omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr) | |||
| 465 | od = omap_device_build(name, ctrl_nr - 1, oh, mmc_data, | 465 | od = omap_device_build(name, ctrl_nr - 1, oh, mmc_data, |
| 466 | sizeof(struct omap_mmc_platform_data), ohl, ohl_cnt, false); | 466 | sizeof(struct omap_mmc_platform_data), ohl, ohl_cnt, false); |
| 467 | if (IS_ERR(od)) { | 467 | if (IS_ERR(od)) { |
| 468 | WARN(1, "Cant build omap_device for %s:%s.\n", name, oh->name); | 468 | WARN(1, "Can't build omap_device for %s:%s.\n", name, oh->name); |
| 469 | kfree(mmc_data->slots[0].name); | 469 | kfree(mmc_data->slots[0].name); |
| 470 | goto done; | 470 | goto done; |
| 471 | } | 471 | } |
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c index 565b9064a328..4a6ef6ab8458 100644 --- a/arch/arm/mach-omap2/mcbsp.c +++ b/arch/arm/mach-omap2/mcbsp.c | |||
| @@ -149,7 +149,7 @@ static int omap_init_mcbsp(struct omap_hwmod *oh, void *unused) | |||
| 149 | ARRAY_SIZE(omap2_mcbsp_latency), false); | 149 | ARRAY_SIZE(omap2_mcbsp_latency), false); |
| 150 | kfree(pdata); | 150 | kfree(pdata); |
| 151 | if (IS_ERR(od)) { | 151 | if (IS_ERR(od)) { |
| 152 | pr_err("%s: Cant build omap_device for %s:%s.\n", __func__, | 152 | pr_err("%s: Can't build omap_device for %s:%s.\n", __func__, |
| 153 | name, oh->name); | 153 | name, oh->name); |
| 154 | return PTR_ERR(od); | 154 | return PTR_ERR(od); |
| 155 | } | 155 | } |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index bb043cbb3886..a4ab1e364313 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
| @@ -518,7 +518,7 @@ static int omap_mux_dbg_board_show(struct seq_file *s, void *unused) | |||
| 518 | seq_printf(s, "/* %s */\n", m->muxnames[mode]); | 518 | seq_printf(s, "/* %s */\n", m->muxnames[mode]); |
| 519 | 519 | ||
| 520 | /* | 520 | /* |
| 521 | * XXX: Might be revisited to support differences accross | 521 | * XXX: Might be revisited to support differences across |
| 522 | * same OMAP generation. | 522 | * same OMAP generation. |
| 523 | */ | 523 | */ |
| 524 | seq_printf(s, "OMAP%d_MUX(%s, ", omap_gen, m0_def); | 524 | seq_printf(s, "OMAP%d_MUX(%s, ", omap_gen, m0_def); |
diff --git a/arch/arm/mach-omap2/mux2430.h b/arch/arm/mach-omap2/mux2430.h index adbea0d03e08..9fd93149ebd9 100644 --- a/arch/arm/mach-omap2/mux2430.h +++ b/arch/arm/mach-omap2/mux2430.h | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | * absolute addresses. The name in the macro is the mode-0 name of | 22 | * absolute addresses. The name in the macro is the mode-0 name of |
| 23 | * the pin. NOTE: These registers are 8-bits wide. | 23 | * the pin. NOTE: These registers are 8-bits wide. |
| 24 | * | 24 | * |
| 25 | * Note that these defines use SDMMC instead of MMC for compability | 25 | * Note that these defines use SDMMC instead of MMC for compatibility |
| 26 | * with signal names used in 3630. | 26 | * with signal names used in 3630. |
| 27 | */ | 27 | */ |
| 28 | #define OMAP2430_CONTROL_PADCONF_GPMC_CLK_OFFSET 0x000 | 28 | #define OMAP2430_CONTROL_PADCONF_GPMC_CLK_OFFSET 0x000 |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index a860fb5024c2..e6e3810db77f 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c | |||
| @@ -1559,7 +1559,7 @@ static struct omap_hwmod omap2430_i2c1_hwmod = { | |||
| 1559 | * I2CHS IP's do not follow the usual pattern. | 1559 | * I2CHS IP's do not follow the usual pattern. |
| 1560 | * prcm_reg_id alone cannot be used to program | 1560 | * prcm_reg_id alone cannot be used to program |
| 1561 | * the iclk and fclk. Needs to be handled using | 1561 | * the iclk and fclk. Needs to be handled using |
| 1562 | * additonal flags when clk handling is moved | 1562 | * additional flags when clk handling is moved |
| 1563 | * to hwmod framework. | 1563 | * to hwmod framework. |
| 1564 | */ | 1564 | */ |
| 1565 | .module_offs = CORE_MOD, | 1565 | .module_offs = CORE_MOD, |
diff --git a/arch/arm/mach-omap2/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c index e2e605fe9138..05f6abc96b0d 100644 --- a/arch/arm/mach-omap2/omap_phy_internal.c +++ b/arch/arm/mach-omap2/omap_phy_internal.c | |||
| @@ -112,12 +112,12 @@ int omap4430_phy_power(struct device *dev, int ID, int on) | |||
| 112 | else | 112 | else |
| 113 | /* | 113 | /* |
| 114 | * Enable VBUS Valid, AValid and IDDIG | 114 | * Enable VBUS Valid, AValid and IDDIG |
| 115 | * high impedence | 115 | * high impedance |
| 116 | */ | 116 | */ |
| 117 | __raw_writel(IDDIG | AVALID | VBUSVALID, | 117 | __raw_writel(IDDIG | AVALID | VBUSVALID, |
| 118 | ctrl_base + USBOTGHS_CONTROL); | 118 | ctrl_base + USBOTGHS_CONTROL); |
| 119 | } else { | 119 | } else { |
| 120 | /* Enable session END and IDIG to high impedence. */ | 120 | /* Enable session END and IDIG to high impedance. */ |
| 121 | __raw_writel(SESSEND | IDDIG, ctrl_base + | 121 | __raw_writel(SESSEND | IDDIG, ctrl_base + |
| 122 | USBOTGHS_CONTROL); | 122 | USBOTGHS_CONTROL); |
| 123 | } | 123 | } |
diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c index 0a8e74e3e811..07d6140baa9d 100644 --- a/arch/arm/mach-omap2/omap_twl.c +++ b/arch/arm/mach-omap2/omap_twl.c | |||
| @@ -308,7 +308,7 @@ int __init omap3_twl_init(void) | |||
| 308 | * Strategy Software Scaling Mode (ENABLE_VMODE=0), for setting the voltages, | 308 | * Strategy Software Scaling Mode (ENABLE_VMODE=0), for setting the voltages, |
| 309 | * in those scenarios this bit is to be cleared (enable = false). | 309 | * in those scenarios this bit is to be cleared (enable = false). |
| 310 | * | 310 | * |
| 311 | * Returns 0 on sucess, error is returned if I2C read/write fails. | 311 | * Returns 0 on success, error is returned if I2C read/write fails. |
| 312 | */ | 312 | */ |
| 313 | int __init omap3_twl_set_sr_bit(bool enable) | 313 | int __init omap3_twl_set_sr_bit(bool enable) |
| 314 | { | 314 | { |
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 49c6513e90d8..9af08473bf10 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c | |||
| @@ -196,7 +196,7 @@ static int _pwrdm_post_transition_cb(struct powerdomain *pwrdm, void *unused) | |||
| 196 | /** | 196 | /** |
| 197 | * pwrdm_init - set up the powerdomain layer | 197 | * pwrdm_init - set up the powerdomain layer |
| 198 | * @pwrdm_list: array of struct powerdomain pointers to register | 198 | * @pwrdm_list: array of struct powerdomain pointers to register |
| 199 | * @custom_funcs: func pointers for arch specfic implementations | 199 | * @custom_funcs: func pointers for arch specific implementations |
| 200 | * | 200 | * |
| 201 | * Loop through the array of powerdomains @pwrdm_list, registering all | 201 | * Loop through the array of powerdomains @pwrdm_list, registering all |
| 202 | * that are available on the current CPU. If pwrdm_list is supplied | 202 | * that are available on the current CPU. If pwrdm_list is supplied |
diff --git a/arch/arm/mach-omap2/powerdomain.h b/arch/arm/mach-omap2/powerdomain.h index 027f40bd235d..d23d979b9c34 100644 --- a/arch/arm/mach-omap2/powerdomain.h +++ b/arch/arm/mach-omap2/powerdomain.h | |||
| @@ -121,7 +121,7 @@ struct powerdomain { | |||
| 121 | }; | 121 | }; |
| 122 | 122 | ||
| 123 | /** | 123 | /** |
| 124 | * struct pwrdm_ops - Arch specfic function implementations | 124 | * struct pwrdm_ops - Arch specific function implementations |
| 125 | * @pwrdm_set_next_pwrst: Set the target power state for a pd | 125 | * @pwrdm_set_next_pwrst: Set the target power state for a pd |
| 126 | * @pwrdm_read_next_pwrst: Read the target power state set for a pd | 126 | * @pwrdm_read_next_pwrst: Read the target power state set for a pd |
| 127 | * @pwrdm_read_pwrst: Read the current power state of a pd | 127 | * @pwrdm_read_pwrst: Read the current power state of a pd |
diff --git a/arch/arm/mach-omap2/powerdomains3xxx_data.c b/arch/arm/mach-omap2/powerdomains3xxx_data.c index 9c9c113788b9..469a920a74dc 100644 --- a/arch/arm/mach-omap2/powerdomains3xxx_data.c +++ b/arch/arm/mach-omap2/powerdomains3xxx_data.c | |||
| @@ -72,7 +72,7 @@ static struct powerdomain mpu_3xxx_pwrdm = { | |||
| 72 | 72 | ||
| 73 | /* | 73 | /* |
| 74 | * The USBTLL Save-and-Restore mechanism is broken on | 74 | * The USBTLL Save-and-Restore mechanism is broken on |
| 75 | * 3430s upto ES3.0 and 3630ES1.0. Hence this feature | 75 | * 3430s up to ES3.0 and 3630ES1.0. Hence this feature |
| 76 | * needs to be disabled on these chips. | 76 | * needs to be disabled on these chips. |
| 77 | * Refer: 3430 errata ID i459 and 3630 errata ID i579 | 77 | * Refer: 3430 errata ID i459 and 3630 errata ID i579 |
| 78 | * | 78 | * |
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index 8f674c9442bf..13e24f913dd4 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c | |||
| @@ -247,7 +247,7 @@ static void sr_stop_vddautocomp(struct omap_sr *sr) | |||
| 247 | * driver register and sr device intializtion API's. Only one call | 247 | * driver register and sr device intializtion API's. Only one call |
| 248 | * will ultimately succeed. | 248 | * will ultimately succeed. |
| 249 | * | 249 | * |
| 250 | * Currenly this function registers interrrupt handler for a particular SR | 250 | * Currently this function registers interrrupt handler for a particular SR |
| 251 | * if smartreflex class driver is already registered and has | 251 | * if smartreflex class driver is already registered and has |
| 252 | * requested for interrupts and the SR interrupt line in present. | 252 | * requested for interrupts and the SR interrupt line in present. |
| 253 | */ | 253 | */ |
diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c index c6facf7becf8..6fb520999b6e 100644 --- a/arch/arm/mach-omap2/voltage.c +++ b/arch/arm/mach-omap2/voltage.c | |||
| @@ -851,7 +851,7 @@ int omap_voltage_scale_vdd(struct voltagedomain *voltdm, | |||
| 851 | * @voltdm: pointer to the VDD whose voltage is to be reset. | 851 | * @voltdm: pointer to the VDD whose voltage is to be reset. |
| 852 | * | 852 | * |
| 853 | * This API finds out the correct voltage the voltage domain is supposed | 853 | * This API finds out the correct voltage the voltage domain is supposed |
| 854 | * to be at and resets the voltage to that level. Should be used expecially | 854 | * to be at and resets the voltage to that level. Should be used especially |
| 855 | * while disabling any voltage compensation modules. | 855 | * while disabling any voltage compensation modules. |
| 856 | */ | 856 | */ |
| 857 | void omap_voltage_reset(struct voltagedomain *voltdm) | 857 | void omap_voltage_reset(struct voltagedomain *voltdm) |
| @@ -912,7 +912,7 @@ void omap_voltage_get_volttable(struct voltagedomain *voltdm, | |||
| 912 | * This API searches only through the non-compensated voltages int the | 912 | * This API searches only through the non-compensated voltages int the |
| 913 | * voltage table. | 913 | * voltage table. |
| 914 | * Returns pointer to the voltage table entry corresponding to volt on | 914 | * Returns pointer to the voltage table entry corresponding to volt on |
| 915 | * sucess. Returns -ENODATA if no voltage table exisits for the passed voltage | 915 | * success. Returns -ENODATA if no voltage table exisits for the passed voltage |
| 916 | * domain or if there is no matching entry. | 916 | * domain or if there is no matching entry. |
| 917 | */ | 917 | */ |
| 918 | struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm, | 918 | struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm, |
diff --git a/arch/arm/mach-orion5x/addr-map.c b/arch/arm/mach-orion5x/addr-map.c index 1a5d6a0e2602..5ceafdccc456 100644 --- a/arch/arm/mach-orion5x/addr-map.c +++ b/arch/arm/mach-orion5x/addr-map.c | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | #include "common.h" | 19 | #include "common.h" |
| 20 | 20 | ||
| 21 | /* | 21 | /* |
| 22 | * The Orion has fully programable address map. There's a separate address | 22 | * The Orion has fully programmable address map. There's a separate address |
| 23 | * map for each of the device _master_ interfaces, e.g. CPU, PCI, PCIe, USB, | 23 | * map for each of the device _master_ interfaces, e.g. CPU, PCI, PCIe, USB, |
| 24 | * Gigabit Ethernet, DMA/XOR engines, etc. Each interface has its own | 24 | * Gigabit Ethernet, DMA/XOR engines, etc. Each interface has its own |
| 25 | * address decode windows that allow it to access any of the Orion resources. | 25 | * address decode windows that allow it to access any of the Orion resources. |
diff --git a/arch/arm/mach-orion5x/net2big-setup.c b/arch/arm/mach-orion5x/net2big-setup.c index 429ecafe9fdd..a5930f83958b 100644 --- a/arch/arm/mach-orion5x/net2big-setup.c +++ b/arch/arm/mach-orion5x/net2big-setup.c | |||
| @@ -190,7 +190,7 @@ err_free_1: | |||
| 190 | * The power front LEDs (blue and red) and SATA red LEDs are controlled via a | 190 | * The power front LEDs (blue and red) and SATA red LEDs are controlled via a |
| 191 | * single GPIO line and are compatible with the leds-gpio driver. | 191 | * single GPIO line and are compatible with the leds-gpio driver. |
| 192 | * | 192 | * |
| 193 | * The SATA blue LEDs have some hardware blink capabilities which are detailled | 193 | * The SATA blue LEDs have some hardware blink capabilities which are detailed |
| 194 | * in the following array: | 194 | * in the following array: |
| 195 | * | 195 | * |
| 196 | * SATAx blue LED | SATAx activity | LED state | 196 | * SATAx blue LED | SATAx activity | LED state |
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c index f0f43e13ac87..e6d64494d3de 100644 --- a/arch/arm/mach-orion5x/ts209-setup.c +++ b/arch/arm/mach-orion5x/ts209-setup.c | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | 36 | ||
| 37 | /**************************************************************************** | 37 | /**************************************************************************** |
| 38 | * 8MiB NOR flash. The struct mtd_partition is not in the same order as the | 38 | * 8MiB NOR flash. The struct mtd_partition is not in the same order as the |
| 39 | * partitions on the device because we want to keep compatability with | 39 | * partitions on the device because we want to keep compatibility with |
| 40 | * existing QNAP firmware. | 40 | * existing QNAP firmware. |
| 41 | * | 41 | * |
| 42 | * Layout as used by QNAP: | 42 | * Layout as used by QNAP: |
diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts409-setup.c index 92f393f08fa4..9eac8192d923 100644 --- a/arch/arm/mach-orion5x/ts409-setup.c +++ b/arch/arm/mach-orion5x/ts409-setup.c | |||
| @@ -56,7 +56,7 @@ | |||
| 56 | 56 | ||
| 57 | /**************************************************************************** | 57 | /**************************************************************************** |
| 58 | * 8MiB NOR flash. The struct mtd_partition is not in the same order as the | 58 | * 8MiB NOR flash. The struct mtd_partition is not in the same order as the |
| 59 | * partitions on the device because we want to keep compatability with | 59 | * partitions on the device because we want to keep compatibility with |
| 60 | * existing QNAP firmware. | 60 | * existing QNAP firmware. |
| 61 | * | 61 | * |
| 62 | * Layout as used by QNAP: | 62 | * Layout as used by QNAP: |
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c index 8554707d20a9..edb1dd2d1611 100644 --- a/arch/arm/mach-orion5x/ts78xx-setup.c +++ b/arch/arm/mach-orion5x/ts78xx-setup.c | |||
| @@ -402,7 +402,7 @@ static void ts78xx_fpga_supports(void) | |||
| 402 | /* enable devices if magic matches */ | 402 | /* enable devices if magic matches */ |
| 403 | switch ((ts78xx_fpga.id >> 8) & 0xffffff) { | 403 | switch ((ts78xx_fpga.id >> 8) & 0xffffff) { |
| 404 | case TS7800_FPGA_MAGIC: | 404 | case TS7800_FPGA_MAGIC: |
| 405 | printk(KERN_WARNING "TS-7800 FPGA: unrecognized revision 0x%.2x\n", | 405 | pr_warning("TS-7800 FPGA: unrecognized revision 0x%.2x\n", |
| 406 | ts78xx_fpga.id & 0xff); | 406 | ts78xx_fpga.id & 0xff); |
| 407 | ts78xx_fpga.supports.ts_rtc.present = 1; | 407 | ts78xx_fpga.supports.ts_rtc.present = 1; |
| 408 | ts78xx_fpga.supports.ts_nand.present = 1; | 408 | ts78xx_fpga.supports.ts_nand.present = 1; |
| @@ -423,7 +423,7 @@ static int ts78xx_fpga_load_devices(void) | |||
| 423 | if (ts78xx_fpga.supports.ts_rtc.present == 1) { | 423 | if (ts78xx_fpga.supports.ts_rtc.present == 1) { |
| 424 | tmp = ts78xx_ts_rtc_load(); | 424 | tmp = ts78xx_ts_rtc_load(); |
| 425 | if (tmp) { | 425 | if (tmp) { |
| 426 | printk(KERN_INFO "TS-78xx: RTC not registered\n"); | 426 | pr_info("TS-78xx: RTC not registered\n"); |
| 427 | ts78xx_fpga.supports.ts_rtc.present = 0; | 427 | ts78xx_fpga.supports.ts_rtc.present = 0; |
| 428 | } | 428 | } |
| 429 | ret |= tmp; | 429 | ret |= tmp; |
| @@ -431,7 +431,7 @@ static int ts78xx_fpga_load_devices(void) | |||
| 431 | if (ts78xx_fpga.supports.ts_nand.present == 1) { | 431 | if (ts78xx_fpga.supports.ts_nand.present == 1) { |
| 432 | tmp = ts78xx_ts_nand_load(); | 432 | tmp = ts78xx_ts_nand_load(); |
| 433 | if (tmp) { | 433 | if (tmp) { |
| 434 | printk(KERN_INFO "TS-78xx: NAND not registered\n"); | 434 | pr_info("TS-78xx: NAND not registered\n"); |
| 435 | ts78xx_fpga.supports.ts_nand.present = 0; | 435 | ts78xx_fpga.supports.ts_nand.present = 0; |
| 436 | } | 436 | } |
| 437 | ret |= tmp; | 437 | ret |= tmp; |
| @@ -439,7 +439,7 @@ static int ts78xx_fpga_load_devices(void) | |||
| 439 | if (ts78xx_fpga.supports.ts_rng.present == 1) { | 439 | if (ts78xx_fpga.supports.ts_rng.present == 1) { |
| 440 | tmp = ts78xx_ts_rng_load(); | 440 | tmp = ts78xx_ts_rng_load(); |
| 441 | if (tmp) { | 441 | if (tmp) { |
| 442 | printk(KERN_INFO "TS-78xx: RNG not registered\n"); | 442 | pr_info("TS-78xx: RNG not registered\n"); |
| 443 | ts78xx_fpga.supports.ts_rng.present = 0; | 443 | ts78xx_fpga.supports.ts_rng.present = 0; |
| 444 | } | 444 | } |
| 445 | ret |= tmp; | 445 | ret |= tmp; |
| @@ -466,7 +466,7 @@ static int ts78xx_fpga_load(void) | |||
| 466 | { | 466 | { |
| 467 | ts78xx_fpga.id = readl(TS78XX_FPGA_REGS_VIRT_BASE); | 467 | ts78xx_fpga.id = readl(TS78XX_FPGA_REGS_VIRT_BASE); |
| 468 | 468 | ||
| 469 | printk(KERN_INFO "TS-78xx FPGA: magic=0x%.6x, rev=0x%.2x\n", | 469 | pr_info("TS-78xx FPGA: magic=0x%.6x, rev=0x%.2x\n", |
| 470 | (ts78xx_fpga.id >> 8) & 0xffffff, | 470 | (ts78xx_fpga.id >> 8) & 0xffffff, |
| 471 | ts78xx_fpga.id & 0xff); | 471 | ts78xx_fpga.id & 0xff); |
| 472 | 472 | ||
| @@ -494,7 +494,7 @@ static int ts78xx_fpga_unload(void) | |||
| 494 | * UrJTAG SVN since r1381 can be used to reprogram the FPGA | 494 | * UrJTAG SVN since r1381 can be used to reprogram the FPGA |
| 495 | */ | 495 | */ |
| 496 | if (ts78xx_fpga.id != fpga_id) { | 496 | if (ts78xx_fpga.id != fpga_id) { |
| 497 | printk(KERN_ERR "TS-78xx FPGA: magic/rev mismatch\n" | 497 | pr_err("TS-78xx FPGA: magic/rev mismatch\n" |
| 498 | "TS-78xx FPGA: was 0x%.6x/%.2x but now 0x%.6x/%.2x\n", | 498 | "TS-78xx FPGA: was 0x%.6x/%.2x but now 0x%.6x/%.2x\n", |
| 499 | (ts78xx_fpga.id >> 8) & 0xffffff, ts78xx_fpga.id & 0xff, | 499 | (ts78xx_fpga.id >> 8) & 0xffffff, ts78xx_fpga.id & 0xff, |
| 500 | (fpga_id >> 8) & 0xffffff, fpga_id & 0xff); | 500 | (fpga_id >> 8) & 0xffffff, fpga_id & 0xff); |
| @@ -525,7 +525,7 @@ static ssize_t ts78xx_fpga_store(struct kobject *kobj, | |||
| 525 | int value, ret; | 525 | int value, ret; |
| 526 | 526 | ||
| 527 | if (ts78xx_fpga.state < 0) { | 527 | if (ts78xx_fpga.state < 0) { |
| 528 | printk(KERN_ERR "TS-78xx FPGA: borked, you must powercycle asap\n"); | 528 | pr_err("TS-78xx FPGA: borked, you must powercycle asap\n"); |
| 529 | return -EBUSY; | 529 | return -EBUSY; |
| 530 | } | 530 | } |
| 531 | 531 | ||
| @@ -534,7 +534,7 @@ static ssize_t ts78xx_fpga_store(struct kobject *kobj, | |||
| 534 | else if (strncmp(buf, "offline", sizeof("offline") - 1) == 0) | 534 | else if (strncmp(buf, "offline", sizeof("offline") - 1) == 0) |
| 535 | value = 0; | 535 | value = 0; |
| 536 | else { | 536 | else { |
| 537 | printk(KERN_ERR "ts78xx_fpga_store: Invalid value\n"); | 537 | pr_err("ts78xx_fpga_store: Invalid value\n"); |
| 538 | return -EINVAL; | 538 | return -EINVAL; |
| 539 | } | 539 | } |
| 540 | 540 | ||
| @@ -616,7 +616,7 @@ static void __init ts78xx_init(void) | |||
| 616 | ret = ts78xx_fpga_load(); | 616 | ret = ts78xx_fpga_load(); |
| 617 | ret = sysfs_create_file(power_kobj, &ts78xx_fpga_attr.attr); | 617 | ret = sysfs_create_file(power_kobj, &ts78xx_fpga_attr.attr); |
| 618 | if (ret) | 618 | if (ret) |
| 619 | printk(KERN_ERR "sysfs_create_file failed: %d\n", ret); | 619 | pr_err("sysfs_create_file failed: %d\n", ret); |
| 620 | } | 620 | } |
| 621 | 621 | ||
| 622 | MACHINE_START(TS78XX, "Technologic Systems TS-78xx SBC") | 622 | MACHINE_START(TS78XX, "Technologic Systems TS-78xx SBC") |
diff --git a/arch/arm/mach-pxa/am200epd.c b/arch/arm/mach-pxa/am200epd.c index 3499fada73ae..4cb069fd9af2 100644 --- a/arch/arm/mach-pxa/am200epd.c +++ b/arch/arm/mach-pxa/am200epd.c | |||
| @@ -128,8 +128,8 @@ static int am200_init_gpio_regs(struct metronomefb_par *par) | |||
| 128 | return 0; | 128 | return 0; |
| 129 | 129 | ||
| 130 | err_req_gpio: | 130 | err_req_gpio: |
| 131 | while (i > 0) | 131 | while (--i >= 0) |
| 132 | gpio_free(gpios[i--]); | 132 | gpio_free(gpios[i]); |
| 133 | 133 | ||
| 134 | return err; | 134 | return err; |
| 135 | } | 135 | } |
| @@ -194,7 +194,7 @@ static struct notifier_block am200_fb_notif = { | |||
| 194 | }; | 194 | }; |
| 195 | 195 | ||
| 196 | /* this gets called as part of our init. these steps must be done now so | 196 | /* this gets called as part of our init. these steps must be done now so |
| 197 | * that we can use set_pxa_fb_info */ | 197 | * that we can use pxa_set_fb_info */ |
| 198 | static void __init am200_presetup_fb(void) | 198 | static void __init am200_presetup_fb(void) |
| 199 | { | 199 | { |
| 200 | int fw; | 200 | int fw; |
| @@ -249,7 +249,7 @@ static void __init am200_presetup_fb(void) | |||
| 249 | /* we divide since we told the LCD controller we're 16bpp */ | 249 | /* we divide since we told the LCD controller we're 16bpp */ |
| 250 | am200_fb_info.modes->xres /= 2; | 250 | am200_fb_info.modes->xres /= 2; |
| 251 | 251 | ||
| 252 | set_pxa_fb_info(&am200_fb_info); | 252 | pxa_set_fb_info(NULL, &am200_fb_info); |
| 253 | 253 | ||
| 254 | } | 254 | } |
| 255 | 255 | ||
diff --git a/arch/arm/mach-pxa/am300epd.c b/arch/arm/mach-pxa/am300epd.c index 993d75e66390..fa8bad235d9f 100644 --- a/arch/arm/mach-pxa/am300epd.c +++ b/arch/arm/mach-pxa/am300epd.c | |||
| @@ -125,10 +125,7 @@ static int am300_init_gpio_regs(struct broadsheetfb_par *par) | |||
| 125 | if (err) { | 125 | if (err) { |
| 126 | dev_err(&am300_device->dev, "failed requesting " | 126 | dev_err(&am300_device->dev, "failed requesting " |
| 127 | "gpio %d, err=%d\n", i, err); | 127 | "gpio %d, err=%d\n", i, err); |
| 128 | while (i >= DB0_GPIO_PIN) | 128 | goto err_req_gpio2; |
| 129 | gpio_free(i--); | ||
| 130 | i = ARRAY_SIZE(gpios) - 1; | ||
| 131 | goto err_req_gpio; | ||
| 132 | } | 129 | } |
| 133 | } | 130 | } |
| 134 | 131 | ||
| @@ -159,9 +156,13 @@ static int am300_init_gpio_regs(struct broadsheetfb_par *par) | |||
| 159 | 156 | ||
| 160 | return 0; | 157 | return 0; |
| 161 | 158 | ||
| 159 | err_req_gpio2: | ||
| 160 | while (--i >= DB0_GPIO_PIN) | ||
| 161 | gpio_free(i); | ||
| 162 | i = ARRAY_SIZE(gpios); | ||
| 162 | err_req_gpio: | 163 | err_req_gpio: |
| 163 | while (i > 0) | 164 | while (--i >= 0) |
| 164 | gpio_free(gpios[i--]); | 165 | gpio_free(gpios[i]); |
| 165 | 166 | ||
| 166 | return err; | 167 | return err; |
| 167 | } | 168 | } |
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c index 38dea05df7f8..bfbecec6d05f 100644 --- a/arch/arm/mach-pxa/balloon3.c +++ b/arch/arm/mach-pxa/balloon3.c | |||
| @@ -263,7 +263,7 @@ static void __init balloon3_lcd_init(void) | |||
| 263 | } | 263 | } |
| 264 | 264 | ||
| 265 | balloon3_lcd_screen.pxafb_backlight_power = balloon3_backlight_power; | 265 | balloon3_lcd_screen.pxafb_backlight_power = balloon3_backlight_power; |
| 266 | set_pxa_fb_info(&balloon3_lcd_screen); | 266 | pxa_set_fb_info(NULL, &balloon3_lcd_screen); |
| 267 | return; | 267 | return; |
| 268 | 268 | ||
| 269 | err2: | 269 | err2: |
diff --git a/arch/arm/mach-pxa/cm-x2xx.c b/arch/arm/mach-pxa/cm-x2xx.c index b734d8468168..8225e2e58c6e 100644 --- a/arch/arm/mach-pxa/cm-x2xx.c +++ b/arch/arm/mach-pxa/cm-x2xx.c | |||
| @@ -379,7 +379,7 @@ __setup("monitor=", cmx2xx_set_display); | |||
| 379 | 379 | ||
| 380 | static void __init cmx2xx_init_display(void) | 380 | static void __init cmx2xx_init_display(void) |
| 381 | { | 381 | { |
| 382 | set_pxa_fb_info(cmx2xx_display); | 382 | pxa_set_fb_info(NULL, cmx2xx_display); |
| 383 | } | 383 | } |
| 384 | #else | 384 | #else |
| 385 | static inline void cmx2xx_init_display(void) {} | 385 | static inline void cmx2xx_init_display(void) {} |
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index 06d0a03f462d..b2248e76ec8b 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c | |||
| @@ -296,7 +296,7 @@ static struct pxafb_mach_info cm_x300_lcd = { | |||
| 296 | 296 | ||
| 297 | static void __init cm_x300_init_lcd(void) | 297 | static void __init cm_x300_init_lcd(void) |
| 298 | { | 298 | { |
| 299 | set_pxa_fb_info(&cm_x300_lcd); | 299 | pxa_set_fb_info(NULL, &cm_x300_lcd); |
| 300 | } | 300 | } |
| 301 | #else | 301 | #else |
| 302 | static inline void cm_x300_init_lcd(void) {} | 302 | static inline void cm_x300_init_lcd(void) {} |
diff --git a/arch/arm/mach-pxa/colibri-pxa270-income.c b/arch/arm/mach-pxa/colibri-pxa270-income.c index ee797397dc5b..44c1b77ece67 100644 --- a/arch/arm/mach-pxa/colibri-pxa270-income.c +++ b/arch/arm/mach-pxa/colibri-pxa270-income.c | |||
| @@ -175,7 +175,7 @@ static struct pxafb_mach_info income_lcd_screen = { | |||
| 175 | 175 | ||
| 176 | static void __init income_lcd_init(void) | 176 | static void __init income_lcd_init(void) |
| 177 | { | 177 | { |
| 178 | set_pxa_fb_info(&income_lcd_screen); | 178 | pxa_set_fb_info(NULL, &income_lcd_screen); |
| 179 | } | 179 | } |
| 180 | #else | 180 | #else |
| 181 | static inline void income_lcd_init(void) {} | 181 | static inline void income_lcd_init(void) {} |
diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c index 96b2d9fbfef0..3f9be419959d 100644 --- a/arch/arm/mach-pxa/colibri-pxa3xx.c +++ b/arch/arm/mach-pxa/colibri-pxa3xx.c | |||
| @@ -105,7 +105,7 @@ void __init colibri_pxa3xx_init_lcd(int bl_pin) | |||
| 105 | lcd_bl_pin = bl_pin; | 105 | lcd_bl_pin = bl_pin; |
| 106 | gpio_request(bl_pin, "lcd backlight"); | 106 | gpio_request(bl_pin, "lcd backlight"); |
| 107 | gpio_direction_output(bl_pin, 0); | 107 | gpio_direction_output(bl_pin, 0); |
| 108 | set_pxa_fb_info(&sharp_lq43_info); | 108 | pxa_set_fb_info(NULL, &sharp_lq43_info); |
| 109 | } | 109 | } |
| 110 | #endif | 110 | #endif |
| 111 | 111 | ||
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index d4e705caefea..3a5507e31919 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
| @@ -462,7 +462,6 @@ static struct pxaficp_platform_data corgi_ficp_platform_data = { | |||
| 462 | * USB Device Controller | 462 | * USB Device Controller |
| 463 | */ | 463 | */ |
| 464 | static struct pxa2xx_udc_mach_info udc_info __initdata = { | 464 | static struct pxa2xx_udc_mach_info udc_info __initdata = { |
| 465 | .gpio_vbus = -1, | ||
| 466 | /* no connect GPIO; corgi can't tell connection status */ | 465 | /* no connect GPIO; corgi can't tell connection status */ |
| 467 | .gpio_pullup = CORGI_GPIO_USB_PULLUP, | 466 | .gpio_pullup = CORGI_GPIO_USB_PULLUP, |
| 468 | }; | 467 | }; |
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index c4bf08b3eb61..2e0425404de5 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c | |||
| @@ -90,7 +90,6 @@ void __init pxa_set_mci_info(struct pxamci_platform_data *info) | |||
| 90 | 90 | ||
| 91 | static struct pxa2xx_udc_mach_info pxa_udc_info = { | 91 | static struct pxa2xx_udc_mach_info pxa_udc_info = { |
| 92 | .gpio_pullup = -1, | 92 | .gpio_pullup = -1, |
| 93 | .gpio_vbus = -1, | ||
| 94 | }; | 93 | }; |
| 95 | 94 | ||
| 96 | void __init pxa_set_udc_info(struct pxa2xx_udc_mach_info *info) | 95 | void __init pxa_set_udc_info(struct pxa2xx_udc_mach_info *info) |
| @@ -188,16 +187,12 @@ struct platform_device pxa_device_fb = { | |||
| 188 | .resource = pxafb_resources, | 187 | .resource = pxafb_resources, |
| 189 | }; | 188 | }; |
| 190 | 189 | ||
| 191 | void __init set_pxa_fb_info(struct pxafb_mach_info *info) | 190 | void __init pxa_set_fb_info(struct device *parent, struct pxafb_mach_info *info) |
| 192 | { | 191 | { |
| 192 | pxa_device_fb.dev.parent = parent; | ||
| 193 | pxa_register_device(&pxa_device_fb, info); | 193 | pxa_register_device(&pxa_device_fb, info); |
| 194 | } | 194 | } |
| 195 | 195 | ||
| 196 | void __init set_pxa_fb_parent(struct device *parent_dev) | ||
| 197 | { | ||
| 198 | pxa_device_fb.dev.parent = parent_dev; | ||
| 199 | } | ||
| 200 | |||
| 201 | static struct resource pxa_resource_ffuart[] = { | 196 | static struct resource pxa_resource_ffuart[] = { |
| 202 | { | 197 | { |
| 203 | .start = 0x40100000, | 198 | .start = 0x40100000, |
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c index b411d7cbf5a1..f8a6e9d79a3a 100644 --- a/arch/arm/mach-pxa/em-x270.c +++ b/arch/arm/mach-pxa/em-x270.c | |||
| @@ -689,7 +689,7 @@ static struct pxafb_mach_info em_x270_lcd = { | |||
| 689 | 689 | ||
| 690 | static void __init em_x270_init_lcd(void) | 690 | static void __init em_x270_init_lcd(void) |
| 691 | { | 691 | { |
| 692 | set_pxa_fb_info(&em_x270_lcd); | 692 | pxa_set_fb_info(NULL, &em_x270_lcd); |
| 693 | } | 693 | } |
| 694 | #else | 694 | #else |
| 695 | static inline void em_x270_init_lcd(void) {} | 695 | static inline void em_x270_init_lcd(void) {} |
diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c index edca0a043293..2e3970fdde0b 100644 --- a/arch/arm/mach-pxa/eseries.c +++ b/arch/arm/mach-pxa/eseries.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <linux/mfd/t7l66xb.h> | 20 | #include <linux/mfd/t7l66xb.h> |
| 21 | #include <linux/mtd/nand.h> | 21 | #include <linux/mtd/nand.h> |
| 22 | #include <linux/mtd/partitions.h> | 22 | #include <linux/mtd/partitions.h> |
| 23 | #include <linux/usb/gpio_vbus.h> | ||
| 23 | 24 | ||
| 24 | #include <video/w100fb.h> | 25 | #include <video/w100fb.h> |
| 25 | 26 | ||
| @@ -51,12 +52,20 @@ void __init eseries_fixup(struct machine_desc *desc, | |||
| 51 | mi->bank[0].size = (64*1024*1024); | 52 | mi->bank[0].size = (64*1024*1024); |
| 52 | } | 53 | } |
| 53 | 54 | ||
| 54 | struct pxa2xx_udc_mach_info e7xx_udc_mach_info = { | 55 | struct gpio_vbus_mach_info e7xx_udc_info = { |
| 55 | .gpio_vbus = GPIO_E7XX_USB_DISC, | 56 | .gpio_vbus = GPIO_E7XX_USB_DISC, |
| 56 | .gpio_pullup = GPIO_E7XX_USB_PULLUP, | 57 | .gpio_pullup = GPIO_E7XX_USB_PULLUP, |
| 57 | .gpio_pullup_inverted = 1 | 58 | .gpio_pullup_inverted = 1 |
| 58 | }; | 59 | }; |
| 59 | 60 | ||
| 61 | static struct platform_device e7xx_gpio_vbus = { | ||
| 62 | .name = "gpio-vbus", | ||
| 63 | .id = -1, | ||
| 64 | .dev = { | ||
| 65 | .platform_data = &e7xx_udc_info, | ||
| 66 | }, | ||
| 67 | }; | ||
| 68 | |||
| 60 | struct pxaficp_platform_data e7xx_ficp_platform_data = { | 69 | struct pxaficp_platform_data e7xx_ficp_platform_data = { |
| 61 | .gpio_pwdown = GPIO_E7XX_IR_OFF, | 70 | .gpio_pwdown = GPIO_E7XX_IR_OFF, |
| 62 | .transceiver_cap = IR_SIRMODE | IR_OFF, | 71 | .transceiver_cap = IR_SIRMODE | IR_OFF, |
| @@ -165,6 +174,7 @@ static struct platform_device e330_tc6387xb_device = { | |||
| 165 | 174 | ||
| 166 | static struct platform_device *e330_devices[] __initdata = { | 175 | static struct platform_device *e330_devices[] __initdata = { |
| 167 | &e330_tc6387xb_device, | 176 | &e330_tc6387xb_device, |
| 177 | &e7xx_gpio_vbus, | ||
| 168 | }; | 178 | }; |
| 169 | 179 | ||
| 170 | static void __init e330_init(void) | 180 | static void __init e330_init(void) |
| @@ -175,7 +185,6 @@ static void __init e330_init(void) | |||
| 175 | eseries_register_clks(); | 185 | eseries_register_clks(); |
| 176 | eseries_get_tmio_gpios(); | 186 | eseries_get_tmio_gpios(); |
| 177 | platform_add_devices(ARRAY_AND_SIZE(e330_devices)); | 187 | platform_add_devices(ARRAY_AND_SIZE(e330_devices)); |
| 178 | pxa_set_udc_info(&e7xx_udc_mach_info); | ||
| 179 | } | 188 | } |
| 180 | 189 | ||
| 181 | MACHINE_START(E330, "Toshiba e330") | 190 | MACHINE_START(E330, "Toshiba e330") |
| @@ -214,6 +223,7 @@ static struct platform_device e350_t7l66xb_device = { | |||
| 214 | 223 | ||
| 215 | static struct platform_device *e350_devices[] __initdata = { | 224 | static struct platform_device *e350_devices[] __initdata = { |
| 216 | &e350_t7l66xb_device, | 225 | &e350_t7l66xb_device, |
| 226 | &e7xx_gpio_vbus, | ||
| 217 | }; | 227 | }; |
| 218 | 228 | ||
| 219 | static void __init e350_init(void) | 229 | static void __init e350_init(void) |
| @@ -224,7 +234,6 @@ static void __init e350_init(void) | |||
| 224 | eseries_register_clks(); | 234 | eseries_register_clks(); |
| 225 | eseries_get_tmio_gpios(); | 235 | eseries_get_tmio_gpios(); |
| 226 | platform_add_devices(ARRAY_AND_SIZE(e350_devices)); | 236 | platform_add_devices(ARRAY_AND_SIZE(e350_devices)); |
| 227 | pxa_set_udc_info(&e7xx_udc_mach_info); | ||
| 228 | } | 237 | } |
| 229 | 238 | ||
| 230 | MACHINE_START(E350, "Toshiba e350") | 239 | MACHINE_START(E350, "Toshiba e350") |
| @@ -333,6 +342,7 @@ static struct platform_device e400_t7l66xb_device = { | |||
| 333 | 342 | ||
| 334 | static struct platform_device *e400_devices[] __initdata = { | 343 | static struct platform_device *e400_devices[] __initdata = { |
| 335 | &e400_t7l66xb_device, | 344 | &e400_t7l66xb_device, |
| 345 | &e7xx_gpio_vbus, | ||
| 336 | }; | 346 | }; |
| 337 | 347 | ||
| 338 | static void __init e400_init(void) | 348 | static void __init e400_init(void) |
| @@ -344,9 +354,8 @@ static void __init e400_init(void) | |||
| 344 | /* Fixme - e400 may have a switched clock */ | 354 | /* Fixme - e400 may have a switched clock */ |
| 345 | eseries_register_clks(); | 355 | eseries_register_clks(); |
| 346 | eseries_get_tmio_gpios(); | 356 | eseries_get_tmio_gpios(); |
| 347 | set_pxa_fb_info(&e400_pxafb_mach_info); | 357 | pxa_set_fb_info(NULL, &e400_pxafb_mach_info); |
| 348 | platform_add_devices(ARRAY_AND_SIZE(e400_devices)); | 358 | platform_add_devices(ARRAY_AND_SIZE(e400_devices)); |
| 349 | pxa_set_udc_info(&e7xx_udc_mach_info); | ||
| 350 | } | 359 | } |
| 351 | 360 | ||
| 352 | MACHINE_START(E400, "Toshiba e400") | 361 | MACHINE_START(E400, "Toshiba e400") |
| @@ -519,6 +528,7 @@ static struct platform_device e740_t7l66xb_device = { | |||
| 519 | static struct platform_device *e740_devices[] __initdata = { | 528 | static struct platform_device *e740_devices[] __initdata = { |
| 520 | &e740_fb_device, | 529 | &e740_fb_device, |
| 521 | &e740_t7l66xb_device, | 530 | &e740_t7l66xb_device, |
| 531 | &e7xx_gpio_vbus, | ||
| 522 | }; | 532 | }; |
| 523 | 533 | ||
| 524 | static void __init e740_init(void) | 534 | static void __init e740_init(void) |
| @@ -532,7 +542,6 @@ static void __init e740_init(void) | |||
| 532 | "UDCCLK", &pxa25x_device_udc.dev), | 542 | "UDCCLK", &pxa25x_device_udc.dev), |
| 533 | eseries_get_tmio_gpios(); | 543 | eseries_get_tmio_gpios(); |
| 534 | platform_add_devices(ARRAY_AND_SIZE(e740_devices)); | 544 | platform_add_devices(ARRAY_AND_SIZE(e740_devices)); |
| 535 | pxa_set_udc_info(&e7xx_udc_mach_info); | ||
| 536 | pxa_set_ac97_info(NULL); | 545 | pxa_set_ac97_info(NULL); |
| 537 | pxa_set_ficp_info(&e7xx_ficp_platform_data); | 546 | pxa_set_ficp_info(&e7xx_ficp_platform_data); |
| 538 | } | 547 | } |
| @@ -711,6 +720,7 @@ static struct platform_device e750_tc6393xb_device = { | |||
| 711 | static struct platform_device *e750_devices[] __initdata = { | 720 | static struct platform_device *e750_devices[] __initdata = { |
| 712 | &e750_fb_device, | 721 | &e750_fb_device, |
| 713 | &e750_tc6393xb_device, | 722 | &e750_tc6393xb_device, |
| 723 | &e7xx_gpio_vbus, | ||
| 714 | }; | 724 | }; |
| 715 | 725 | ||
| 716 | static void __init e750_init(void) | 726 | static void __init e750_init(void) |
| @@ -723,7 +733,6 @@ static void __init e750_init(void) | |||
| 723 | "GPIO11_CLK", NULL), | 733 | "GPIO11_CLK", NULL), |
| 724 | eseries_get_tmio_gpios(); | 734 | eseries_get_tmio_gpios(); |
| 725 | platform_add_devices(ARRAY_AND_SIZE(e750_devices)); | 735 | platform_add_devices(ARRAY_AND_SIZE(e750_devices)); |
| 726 | pxa_set_udc_info(&e7xx_udc_mach_info); | ||
| 727 | pxa_set_ac97_info(NULL); | 736 | pxa_set_ac97_info(NULL); |
| 728 | pxa_set_ficp_info(&e7xx_ficp_platform_data); | 737 | pxa_set_ficp_info(&e7xx_ficp_platform_data); |
| 729 | } | 738 | } |
| @@ -873,12 +882,21 @@ static struct platform_device e800_fb_device = { | |||
| 873 | 882 | ||
| 874 | /* --------------------------- UDC definitions --------------------------- */ | 883 | /* --------------------------- UDC definitions --------------------------- */ |
| 875 | 884 | ||
| 876 | static struct pxa2xx_udc_mach_info e800_udc_mach_info = { | 885 | static struct gpio_vbus_mach_info e800_udc_info = { |
| 877 | .gpio_vbus = GPIO_E800_USB_DISC, | 886 | .gpio_vbus = GPIO_E800_USB_DISC, |
| 878 | .gpio_pullup = GPIO_E800_USB_PULLUP, | 887 | .gpio_pullup = GPIO_E800_USB_PULLUP, |
| 879 | .gpio_pullup_inverted = 1 | 888 | .gpio_pullup_inverted = 1 |
| 880 | }; | 889 | }; |
| 881 | 890 | ||
| 891 | static struct platform_device e800_gpio_vbus = { | ||
| 892 | .name = "gpio-vbus", | ||
| 893 | .id = -1, | ||
| 894 | .dev = { | ||
| 895 | .platform_data = &e800_udc_info, | ||
| 896 | }, | ||
| 897 | }; | ||
| 898 | |||
| 899 | |||
| 882 | /* ----------------- e800 tc6393xb parameters ------------------ */ | 900 | /* ----------------- e800 tc6393xb parameters ------------------ */ |
| 883 | 901 | ||
| 884 | static struct tc6393xb_platform_data e800_tc6393xb_info = { | 902 | static struct tc6393xb_platform_data e800_tc6393xb_info = { |
| @@ -907,6 +925,7 @@ static struct platform_device e800_tc6393xb_device = { | |||
| 907 | static struct platform_device *e800_devices[] __initdata = { | 925 | static struct platform_device *e800_devices[] __initdata = { |
| 908 | &e800_fb_device, | 926 | &e800_fb_device, |
| 909 | &e800_tc6393xb_device, | 927 | &e800_tc6393xb_device, |
| 928 | &e800_gpio_vbus, | ||
| 910 | }; | 929 | }; |
| 911 | 930 | ||
| 912 | static void __init e800_init(void) | 931 | static void __init e800_init(void) |
| @@ -919,7 +938,6 @@ static void __init e800_init(void) | |||
| 919 | "GPIO11_CLK", NULL), | 938 | "GPIO11_CLK", NULL), |
| 920 | eseries_get_tmio_gpios(); | 939 | eseries_get_tmio_gpios(); |
| 921 | platform_add_devices(ARRAY_AND_SIZE(e800_devices)); | 940 | platform_add_devices(ARRAY_AND_SIZE(e800_devices)); |
| 922 | pxa_set_udc_info(&e800_udc_mach_info); | ||
| 923 | pxa_set_ac97_info(NULL); | 941 | pxa_set_ac97_info(NULL); |
| 924 | } | 942 | } |
| 925 | 943 | ||
diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c index 93f05e024313..d88aed8fbe15 100644 --- a/arch/arm/mach-pxa/ezx.c +++ b/arch/arm/mach-pxa/ezx.c | |||
| @@ -783,7 +783,7 @@ static void __init a780_init(void) | |||
| 783 | 783 | ||
| 784 | pxa_set_i2c_info(NULL); | 784 | pxa_set_i2c_info(NULL); |
| 785 | 785 | ||
| 786 | set_pxa_fb_info(&ezx_fb_info_1); | 786 | pxa_set_fb_info(NULL, &ezx_fb_info_1); |
| 787 | 787 | ||
| 788 | pxa_set_keypad_info(&a780_keypad_platform_data); | 788 | pxa_set_keypad_info(&a780_keypad_platform_data); |
| 789 | 789 | ||
| @@ -853,7 +853,7 @@ static void __init e680_init(void) | |||
| 853 | pxa_set_i2c_info(NULL); | 853 | pxa_set_i2c_info(NULL); |
| 854 | i2c_register_board_info(0, ARRAY_AND_SIZE(e680_i2c_board_info)); | 854 | i2c_register_board_info(0, ARRAY_AND_SIZE(e680_i2c_board_info)); |
| 855 | 855 | ||
| 856 | set_pxa_fb_info(&ezx_fb_info_1); | 856 | pxa_set_fb_info(NULL, &ezx_fb_info_1); |
| 857 | 857 | ||
| 858 | pxa_set_keypad_info(&e680_keypad_platform_data); | 858 | pxa_set_keypad_info(&e680_keypad_platform_data); |
| 859 | 859 | ||
| @@ -918,7 +918,7 @@ static void __init a1200_init(void) | |||
| 918 | pxa_set_i2c_info(NULL); | 918 | pxa_set_i2c_info(NULL); |
| 919 | i2c_register_board_info(0, ARRAY_AND_SIZE(a1200_i2c_board_info)); | 919 | i2c_register_board_info(0, ARRAY_AND_SIZE(a1200_i2c_board_info)); |
| 920 | 920 | ||
| 921 | set_pxa_fb_info(&ezx_fb_info_2); | 921 | pxa_set_fb_info(NULL, &ezx_fb_info_2); |
| 922 | 922 | ||
| 923 | pxa_set_keypad_info(&a1200_keypad_platform_data); | 923 | pxa_set_keypad_info(&a1200_keypad_platform_data); |
| 924 | 924 | ||
| @@ -1103,7 +1103,7 @@ static void __init a910_init(void) | |||
| 1103 | pxa_set_i2c_info(NULL); | 1103 | pxa_set_i2c_info(NULL); |
| 1104 | i2c_register_board_info(0, ARRAY_AND_SIZE(a910_i2c_board_info)); | 1104 | i2c_register_board_info(0, ARRAY_AND_SIZE(a910_i2c_board_info)); |
| 1105 | 1105 | ||
| 1106 | set_pxa_fb_info(&ezx_fb_info_2); | 1106 | pxa_set_fb_info(NULL, &ezx_fb_info_2); |
| 1107 | 1107 | ||
| 1108 | pxa_set_keypad_info(&a910_keypad_platform_data); | 1108 | pxa_set_keypad_info(&a910_keypad_platform_data); |
| 1109 | 1109 | ||
| @@ -1173,7 +1173,7 @@ static void __init e6_init(void) | |||
| 1173 | pxa_set_i2c_info(NULL); | 1173 | pxa_set_i2c_info(NULL); |
| 1174 | i2c_register_board_info(0, ARRAY_AND_SIZE(e6_i2c_board_info)); | 1174 | i2c_register_board_info(0, ARRAY_AND_SIZE(e6_i2c_board_info)); |
| 1175 | 1175 | ||
| 1176 | set_pxa_fb_info(&ezx_fb_info_2); | 1176 | pxa_set_fb_info(NULL, &ezx_fb_info_2); |
| 1177 | 1177 | ||
| 1178 | pxa_set_keypad_info(&e6_keypad_platform_data); | 1178 | pxa_set_keypad_info(&e6_keypad_platform_data); |
| 1179 | 1179 | ||
| @@ -1212,7 +1212,7 @@ static void __init e2_init(void) | |||
| 1212 | pxa_set_i2c_info(NULL); | 1212 | pxa_set_i2c_info(NULL); |
| 1213 | i2c_register_board_info(0, ARRAY_AND_SIZE(e2_i2c_board_info)); | 1213 | i2c_register_board_info(0, ARRAY_AND_SIZE(e2_i2c_board_info)); |
| 1214 | 1214 | ||
| 1215 | set_pxa_fb_info(&ezx_fb_info_2); | 1215 | pxa_set_fb_info(NULL, &ezx_fb_info_2); |
| 1216 | 1216 | ||
| 1217 | pxa_set_keypad_info(&e2_keypad_platform_data); | 1217 | pxa_set_keypad_info(&e2_keypad_platform_data); |
| 1218 | 1218 | ||
diff --git a/arch/arm/mach-pxa/gumstix.c b/arch/arm/mach-pxa/gumstix.c index 6fd319ea5284..d65e4bde9b91 100644 --- a/arch/arm/mach-pxa/gumstix.c +++ b/arch/arm/mach-pxa/gumstix.c | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #include <linux/gpio.h> | 26 | #include <linux/gpio.h> |
| 27 | #include <linux/err.h> | 27 | #include <linux/err.h> |
| 28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
| 29 | #include <linux/usb/gpio_vbus.h> | ||
| 29 | 30 | ||
| 30 | #include <asm/setup.h> | 31 | #include <asm/setup.h> |
| 31 | #include <asm/memory.h> | 32 | #include <asm/memory.h> |
| @@ -106,14 +107,22 @@ static void __init gumstix_mmc_init(void) | |||
| 106 | #endif | 107 | #endif |
| 107 | 108 | ||
| 108 | #ifdef CONFIG_USB_GADGET_PXA25X | 109 | #ifdef CONFIG_USB_GADGET_PXA25X |
| 109 | static struct pxa2xx_udc_mach_info gumstix_udc_info __initdata = { | 110 | static struct gpio_vbus_mach_info gumstix_udc_info = { |
| 110 | .gpio_vbus = GPIO_GUMSTIX_USB_GPIOn, | 111 | .gpio_vbus = GPIO_GUMSTIX_USB_GPIOn, |
| 111 | .gpio_pullup = GPIO_GUMSTIX_USB_GPIOx, | 112 | .gpio_pullup = GPIO_GUMSTIX_USB_GPIOx, |
| 112 | }; | 113 | }; |
| 113 | 114 | ||
| 115 | static struct platform_device gumstix_gpio_vbus = { | ||
| 116 | .name = "gpio-vbus", | ||
| 117 | .id = -1, | ||
| 118 | .dev = { | ||
| 119 | .platform_data = &gumstix_udc_info, | ||
| 120 | }, | ||
| 121 | }; | ||
| 122 | |||
| 114 | static void __init gumstix_udc_init(void) | 123 | static void __init gumstix_udc_init(void) |
| 115 | { | 124 | { |
| 116 | pxa_set_udc_info(&gumstix_udc_info); | 125 | platform_device_register(&gumstix_gpio_vbus); |
| 117 | } | 126 | } |
| 118 | #else | 127 | #else |
| 119 | static void gumstix_udc_init(void) | 128 | static void gumstix_udc_init(void) |
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c index dd40e4a9291c..f7fb64f11a7d 100644 --- a/arch/arm/mach-pxa/idp.c +++ b/arch/arm/mach-pxa/idp.c | |||
| @@ -167,7 +167,7 @@ static void __init idp_init(void) | |||
| 167 | 167 | ||
| 168 | platform_device_register(&smc91x_device); | 168 | platform_device_register(&smc91x_device); |
| 169 | //platform_device_register(&mst_audio_device); | 169 | //platform_device_register(&mst_audio_device); |
| 170 | set_pxa_fb_info(&sharp_lm8v31); | 170 | pxa_set_fb_info(NULL, &sharp_lm8v31); |
| 171 | pxa_set_mci_info(&idp_mci_platform_data); | 171 | pxa_set_mci_info(&idp_mci_platform_data); |
| 172 | } | 172 | } |
| 173 | 173 | ||
diff --git a/arch/arm/mach-pxa/include/mach/gpio.h b/arch/arm/mach-pxa/include/mach/gpio.h index b024a8b37439..c4639502efca 100644 --- a/arch/arm/mach-pxa/include/mach/gpio.h +++ b/arch/arm/mach-pxa/include/mach/gpio.h | |||
| @@ -99,11 +99,24 @@ | |||
| 99 | #define GAFR(x) GPIO_REG(0x54 + (((x) & 0x70) >> 2)) | 99 | #define GAFR(x) GPIO_REG(0x54 + (((x) & 0x70) >> 2)) |
| 100 | 100 | ||
| 101 | 101 | ||
| 102 | #define NR_BUILTIN_GPIO 128 | 102 | #define NR_BUILTIN_GPIO PXA_GPIO_IRQ_NUM |
| 103 | 103 | ||
| 104 | #define gpio_to_bank(gpio) ((gpio) >> 5) | 104 | #define gpio_to_bank(gpio) ((gpio) >> 5) |
| 105 | #define gpio_to_irq(gpio) IRQ_GPIO(gpio) | 105 | #define gpio_to_irq(gpio) IRQ_GPIO(gpio) |
| 106 | #define irq_to_gpio(irq) IRQ_TO_GPIO(irq) | 106 | |
| 107 | static inline int irq_to_gpio(unsigned int irq) | ||
| 108 | { | ||
| 109 | int gpio; | ||
| 110 | |||
| 111 | if (irq == IRQ_GPIO0 || irq == IRQ_GPIO1) | ||
| 112 | return irq - IRQ_GPIO0; | ||
| 113 | |||
| 114 | gpio = irq - PXA_GPIO_IRQ_BASE; | ||
| 115 | if (gpio >= 2 && gpio < NR_BUILTIN_GPIO) | ||
| 116 | return gpio; | ||
| 117 | |||
| 118 | return -1; | ||
| 119 | } | ||
| 107 | 120 | ||
| 108 | #ifdef CONFIG_CPU_PXA26x | 121 | #ifdef CONFIG_CPU_PXA26x |
| 109 | /* GPIO86/87/88/89 on PXA26x have their direction bits in GPDR2 inverted, | 122 | /* GPIO86/87/88/89 on PXA26x have their direction bits in GPDR2 inverted, |
diff --git a/arch/arm/mach-pxa/include/mach/irqs.h b/arch/arm/mach-pxa/include/mach/irqs.h index a4285fc00878..038402404e39 100644 --- a/arch/arm/mach-pxa/include/mach/irqs.h +++ b/arch/arm/mach-pxa/include/mach/irqs.h | |||
| @@ -93,9 +93,6 @@ | |||
| 93 | #define GPIO_2_x_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x)) | 93 | #define GPIO_2_x_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x)) |
| 94 | #define IRQ_GPIO(x) (((x) < 2) ? (IRQ_GPIO0 + (x)) : GPIO_2_x_TO_IRQ(x)) | 94 | #define IRQ_GPIO(x) (((x) < 2) ? (IRQ_GPIO0 + (x)) : GPIO_2_x_TO_IRQ(x)) |
| 95 | 95 | ||
| 96 | #define IRQ_TO_GPIO_2_x(i) ((i) - PXA_GPIO_IRQ_BASE) | ||
| 97 | #define IRQ_TO_GPIO(i) (((i) < IRQ_GPIO(2)) ? ((i) - IRQ_GPIO0) : IRQ_TO_GPIO_2_x(i)) | ||
| 98 | |||
| 99 | /* | 96 | /* |
| 100 | * The following interrupts are for board specific purposes. Since | 97 | * The following interrupts are for board specific purposes. Since |
| 101 | * the kernel can only run on one machine at a time, we can re-use | 98 | * the kernel can only run on one machine at a time, we can re-use |
diff --git a/arch/arm/mach-pxa/include/mach/palmz72.h b/arch/arm/mach-pxa/include/mach/palmz72.h index 2bbcf70dd935..0d4700a79612 100644 --- a/arch/arm/mach-pxa/include/mach/palmz72.h +++ b/arch/arm/mach-pxa/include/mach/palmz72.h | |||
| @@ -44,6 +44,11 @@ | |||
| 44 | #define GPIO_NR_PALMZ72_BT_POWER 17 | 44 | #define GPIO_NR_PALMZ72_BT_POWER 17 |
| 45 | #define GPIO_NR_PALMZ72_BT_RESET 83 | 45 | #define GPIO_NR_PALMZ72_BT_RESET 83 |
| 46 | 46 | ||
| 47 | /* Camera */ | ||
| 48 | #define GPIO_NR_PALMZ72_CAM_PWDN 56 | ||
| 49 | #define GPIO_NR_PALMZ72_CAM_RESET 57 | ||
| 50 | #define GPIO_NR_PALMZ72_CAM_POWER 91 | ||
| 51 | |||
| 47 | /** Initial values **/ | 52 | /** Initial values **/ |
| 48 | 53 | ||
| 49 | /* Battery */ | 54 | /* Battery */ |
diff --git a/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h b/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h index e4fb4668c26e..207ecb49a61b 100644 --- a/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h +++ b/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | #define PCMD(x) __REG(0x40F50110 + ((x) << 2)) | 38 | #define PCMD(x) __REG(0x40F50110 + ((x) << 2)) |
| 39 | 39 | ||
| 40 | /* | 40 | /* |
| 41 | * Slave Power Managment Unit | 41 | * Slave Power Management Unit |
| 42 | */ | 42 | */ |
| 43 | #define ASCR __REG(0x40f40000) /* Application Subsystem Power Status/Configuration */ | 43 | #define ASCR __REG(0x40f40000) /* Application Subsystem Power Status/Configuration */ |
| 44 | #define ARSR __REG(0x40f40004) /* Application Subsystem Reset Status */ | 44 | #define ARSR __REG(0x40f40004) /* Application Subsystem Reset Status */ |
diff --git a/arch/arm/mach-pxa/include/mach/pxafb.h b/arch/arm/mach-pxa/include/mach/pxafb.h index 160ec83f51a6..01a45ac48114 100644 --- a/arch/arm/mach-pxa/include/mach/pxafb.h +++ b/arch/arm/mach-pxa/include/mach/pxafb.h | |||
| @@ -154,8 +154,8 @@ struct pxafb_mach_info { | |||
| 154 | void (*pxafb_lcd_power)(int, struct fb_var_screeninfo *); | 154 | void (*pxafb_lcd_power)(int, struct fb_var_screeninfo *); |
| 155 | void (*smart_update)(struct fb_info *); | 155 | void (*smart_update)(struct fb_info *); |
| 156 | }; | 156 | }; |
| 157 | void set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info); | 157 | |
| 158 | void set_pxa_fb_parent(struct device *parent_dev); | 158 | void pxa_set_fb_info(struct device *, struct pxafb_mach_info *); |
| 159 | unsigned long pxafb_get_hsync_time(struct device *dev); | 159 | unsigned long pxafb_get_hsync_time(struct device *dev); |
| 160 | 160 | ||
| 161 | extern int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int); | 161 | extern int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int); |
diff --git a/arch/arm/mach-pxa/include/mach/z2.h b/arch/arm/mach-pxa/include/mach/z2.h index 8835c16bc82f..7b0f71ef3167 100644 --- a/arch/arm/mach-pxa/include/mach/z2.h +++ b/arch/arm/mach-pxa/include/mach/z2.h | |||
| @@ -25,8 +25,7 @@ | |||
| 25 | #define GPIO98_ZIPITZ2_LID_BUTTON 98 | 25 | #define GPIO98_ZIPITZ2_LID_BUTTON 98 |
| 26 | 26 | ||
| 27 | /* Libertas GSPI8686 WiFi */ | 27 | /* Libertas GSPI8686 WiFi */ |
| 28 | #define GPIO14_ZIPITZ2_WIFI_RESET 14 | 28 | #define GPIO14_ZIPITZ2_WIFI_POWER 14 |
| 29 | #define GPIO15_ZIPITZ2_WIFI_POWER 15 | ||
| 30 | #define GPIO24_ZIPITZ2_WIFI_CS 24 | 29 | #define GPIO24_ZIPITZ2_WIFI_CS 24 |
| 31 | #define GPIO36_ZIPITZ2_WIFI_IRQ 36 | 30 | #define GPIO36_ZIPITZ2_WIFI_IRQ 36 |
| 32 | 31 | ||
diff --git a/arch/arm/mach-pxa/include/mach/zeus.h b/arch/arm/mach-pxa/include/mach/zeus.h index faa408ab7ad7..0641f31a56b7 100644 --- a/arch/arm/mach-pxa/include/mach/zeus.h +++ b/arch/arm/mach-pxa/include/mach/zeus.h | |||
| @@ -64,7 +64,7 @@ | |||
| 64 | 64 | ||
| 65 | /* | 65 | /* |
| 66 | * CPLD registers: | 66 | * CPLD registers: |
| 67 | * Only 4 registers, but spreaded over a 32MB address space. | 67 | * Only 4 registers, but spread over a 32MB address space. |
| 68 | * Be gentle, and remap that over 32kB... | 68 | * Be gentle, and remap that over 32kB... |
| 69 | */ | 69 | */ |
| 70 | 70 | ||
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c index 87c1ed9ccd2f..e5e326d2cdc9 100644 --- a/arch/arm/mach-pxa/littleton.c +++ b/arch/arm/mach-pxa/littleton.c | |||
| @@ -185,7 +185,7 @@ static struct pxafb_mach_info littleton_lcd_info = { | |||
| 185 | 185 | ||
| 186 | static void littleton_init_lcd(void) | 186 | static void littleton_init_lcd(void) |
| 187 | { | 187 | { |
| 188 | set_pxa_fb_info(&littleton_lcd_info); | 188 | pxa_set_fb_info(NULL, &littleton_lcd_info); |
| 189 | } | 189 | } |
| 190 | #else | 190 | #else |
| 191 | static inline void littleton_init_lcd(void) {}; | 191 | static inline void littleton_init_lcd(void) {}; |
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c index 6307f70ae22a..f5de541725b1 100644 --- a/arch/arm/mach-pxa/lpd270.c +++ b/arch/arm/mach-pxa/lpd270.c | |||
| @@ -480,7 +480,7 @@ static void __init lpd270_init(void) | |||
| 480 | pxa_set_ac97_info(NULL); | 480 | pxa_set_ac97_info(NULL); |
| 481 | 481 | ||
| 482 | if (lpd270_lcd_to_use != NULL) | 482 | if (lpd270_lcd_to_use != NULL) |
| 483 | set_pxa_fb_info(lpd270_lcd_to_use); | 483 | pxa_set_fb_info(NULL, lpd270_lcd_to_use); |
| 484 | 484 | ||
| 485 | pxa_set_ohci_info(&lpd270_ohci_platform_data); | 485 | pxa_set_ohci_info(&lpd270_ohci_platform_data); |
| 486 | } | 486 | } |
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index 0fea945dd6f2..3ede978c83d9 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c | |||
| @@ -521,7 +521,7 @@ static void __init lubbock_init(void) | |||
| 521 | 521 | ||
| 522 | clk_add_alias("SA1111_CLK", NULL, "GPIO11_CLK", NULL); | 522 | clk_add_alias("SA1111_CLK", NULL, "GPIO11_CLK", NULL); |
| 523 | pxa_set_udc_info(&udc_info); | 523 | pxa_set_udc_info(&udc_info); |
| 524 | set_pxa_fb_info(&sharp_lm8v31); | 524 | pxa_set_fb_info(NULL, &sharp_lm8v31); |
| 525 | pxa_set_mci_info(&lubbock_mci_platform_data); | 525 | pxa_set_mci_info(&lubbock_mci_platform_data); |
| 526 | pxa_set_ficp_info(&lubbock_ficp_platform_data); | 526 | pxa_set_ficp_info(&lubbock_ficp_platform_data); |
| 527 | pxa_set_ac97_info(NULL); | 527 | pxa_set_ac97_info(NULL); |
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index 5535991c4a3c..a72993dde2b3 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c | |||
| @@ -757,7 +757,7 @@ static void __init magician_init(void) | |||
| 757 | gpio_direction_output(GPIO104_MAGICIAN_LCD_POWER_1, 0); | 757 | gpio_direction_output(GPIO104_MAGICIAN_LCD_POWER_1, 0); |
| 758 | gpio_direction_output(GPIO105_MAGICIAN_LCD_POWER_2, 0); | 758 | gpio_direction_output(GPIO105_MAGICIAN_LCD_POWER_2, 0); |
| 759 | gpio_direction_output(GPIO106_MAGICIAN_LCD_POWER_3, 0); | 759 | gpio_direction_output(GPIO106_MAGICIAN_LCD_POWER_3, 0); |
| 760 | set_pxa_fb_info(lcd_select ? &samsung_info : &toppoly_info); | 760 | pxa_set_fb_info(NULL, lcd_select ? &samsung_info : &toppoly_info); |
| 761 | } else | 761 | } else |
| 762 | pr_err("LCD detection: CPLD mapping failed\n"); | 762 | pr_err("LCD detection: CPLD mapping failed\n"); |
| 763 | } | 763 | } |
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index 29b6e7a94e11..95163baca29e 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
| @@ -592,7 +592,7 @@ static void __init mainstone_init(void) | |||
| 592 | else | 592 | else |
| 593 | mainstone_pxafb_info.modes = &toshiba_ltm035a776c_mode; | 593 | mainstone_pxafb_info.modes = &toshiba_ltm035a776c_mode; |
| 594 | 594 | ||
| 595 | set_pxa_fb_info(&mainstone_pxafb_info); | 595 | pxa_set_fb_info(NULL, &mainstone_pxafb_info); |
| 596 | mainstone_backlight_register(); | 596 | mainstone_backlight_register(); |
| 597 | 597 | ||
| 598 | pxa_set_mci_info(&mainstone_mci_platform_data); | 598 | pxa_set_mci_info(&mainstone_mci_platform_data); |
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index 78d98a8607ec..23925db8ff74 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c | |||
| @@ -458,7 +458,7 @@ static struct platform_device strataflash = { | |||
| 458 | /* | 458 | /* |
| 459 | * Suspend/Resume bootstrap management | 459 | * Suspend/Resume bootstrap management |
| 460 | * | 460 | * |
| 461 | * MIO A701 reboot sequence is highly ROM dependant. From the one dissassembled, | 461 | * MIO A701 reboot sequence is highly ROM dependent. From the one dissassembled, |
| 462 | * this sequence is as follows : | 462 | * this sequence is as follows : |
| 463 | * - disables interrupts | 463 | * - disables interrupts |
| 464 | * - initialize SDRAM (self refresh RAM into active RAM) | 464 | * - initialize SDRAM (self refresh RAM into active RAM) |
| @@ -795,7 +795,7 @@ static void __init mioa701_machine_init(void) | |||
| 795 | pxa_set_stuart_info(NULL); | 795 | pxa_set_stuart_info(NULL); |
| 796 | mio_gpio_request(ARRAY_AND_SIZE(global_gpios)); | 796 | mio_gpio_request(ARRAY_AND_SIZE(global_gpios)); |
| 797 | bootstrap_init(); | 797 | bootstrap_init(); |
| 798 | set_pxa_fb_info(&mioa701_pxafb_info); | 798 | pxa_set_fb_info(NULL, &mioa701_pxafb_info); |
| 799 | pxa_set_mci_info(&mioa701_mci_info); | 799 | pxa_set_mci_info(&mioa701_mci_info); |
| 800 | pxa_set_keypad_info(&mioa701_keypad_info); | 800 | pxa_set_keypad_info(&mioa701_keypad_info); |
| 801 | pxa_set_udc_info(&mioa701_udc_info); | 801 | pxa_set_udc_info(&mioa701_udc_info); |
diff --git a/arch/arm/mach-pxa/palm27x.c b/arch/arm/mach-pxa/palm27x.c index 72adb3ae2b43..325c245c0a0d 100644 --- a/arch/arm/mach-pxa/palm27x.c +++ b/arch/arm/mach-pxa/palm27x.c | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Common code for Palm LD, T5, TX, Z72 | 2 | * Common code for Palm LD, T5, TX, Z72 |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2010 | 4 | * Copyright (C) 2010-2011 Marek Vasut <marek.vasut@gmail.com> |
| 5 | * Marek Vasut <marek.vasut@gmail.com> | ||
| 6 | * | 5 | * |
| 7 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
| @@ -158,7 +157,7 @@ void __init palm27x_lcd_init(int power, struct pxafb_mode_info *mode) | |||
| 158 | palm27x_lcd_screen.pxafb_lcd_power = palm27x_lcd_ctl; | 157 | palm27x_lcd_screen.pxafb_lcd_power = palm27x_lcd_ctl; |
| 159 | } | 158 | } |
| 160 | 159 | ||
| 161 | set_pxa_fb_info(&palm27x_lcd_screen); | 160 | pxa_set_fb_info(NULL, &palm27x_lcd_screen); |
| 162 | } | 161 | } |
| 163 | #endif | 162 | #endif |
| 164 | 163 | ||
diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c index a09a2374697b..fb06bd047272 100644 --- a/arch/arm/mach-pxa/palmtc.c +++ b/arch/arm/mach-pxa/palmtc.c | |||
| @@ -507,7 +507,7 @@ static struct pxafb_mach_info palmtc_lcd_screen = { | |||
| 507 | 507 | ||
| 508 | static void __init palmtc_lcd_init(void) | 508 | static void __init palmtc_lcd_init(void) |
| 509 | { | 509 | { |
| 510 | set_pxa_fb_info(&palmtc_lcd_screen); | 510 | pxa_set_fb_info(NULL, &palmtc_lcd_screen); |
| 511 | } | 511 | } |
| 512 | #else | 512 | #else |
| 513 | static inline void palmtc_lcd_init(void) {} | 513 | static inline void palmtc_lcd_init(void) {} |
diff --git a/arch/arm/mach-pxa/palmte2.c b/arch/arm/mach-pxa/palmte2.c index 3f25014a136c..726f5b98dcd3 100644 --- a/arch/arm/mach-pxa/palmte2.c +++ b/arch/arm/mach-pxa/palmte2.c | |||
| @@ -136,30 +136,14 @@ static struct platform_device palmte2_pxa_keys = { | |||
| 136 | /****************************************************************************** | 136 | /****************************************************************************** |
| 137 | * Backlight | 137 | * Backlight |
| 138 | ******************************************************************************/ | 138 | ******************************************************************************/ |
| 139 | static struct gpio palmte_bl_gpios[] = { | ||
| 140 | { GPIO_NR_PALMTE2_BL_POWER, GPIOF_INIT_LOW, "Backlight power" }, | ||
| 141 | { GPIO_NR_PALMTE2_LCD_POWER, GPIOF_INIT_LOW, "LCD power" }, | ||
| 142 | }; | ||
| 143 | |||
| 139 | static int palmte2_backlight_init(struct device *dev) | 144 | static int palmte2_backlight_init(struct device *dev) |
| 140 | { | 145 | { |
| 141 | int ret; | 146 | return gpio_request_array(ARRAY_AND_SIZE(palmte_bl_gpios)); |
| 142 | |||
| 143 | ret = gpio_request(GPIO_NR_PALMTE2_BL_POWER, "BL POWER"); | ||
| 144 | if (ret) | ||
| 145 | goto err; | ||
| 146 | ret = gpio_direction_output(GPIO_NR_PALMTE2_BL_POWER, 0); | ||
| 147 | if (ret) | ||
| 148 | goto err2; | ||
| 149 | ret = gpio_request(GPIO_NR_PALMTE2_LCD_POWER, "LCD POWER"); | ||
| 150 | if (ret) | ||
| 151 | goto err2; | ||
| 152 | ret = gpio_direction_output(GPIO_NR_PALMTE2_LCD_POWER, 0); | ||
| 153 | if (ret) | ||
| 154 | goto err3; | ||
| 155 | |||
| 156 | return 0; | ||
| 157 | err3: | ||
| 158 | gpio_free(GPIO_NR_PALMTE2_LCD_POWER); | ||
| 159 | err2: | ||
| 160 | gpio_free(GPIO_NR_PALMTE2_BL_POWER); | ||
| 161 | err: | ||
| 162 | return ret; | ||
| 163 | } | 147 | } |
| 164 | 148 | ||
| 165 | static int palmte2_backlight_notify(struct device *dev, int brightness) | 149 | static int palmte2_backlight_notify(struct device *dev, int brightness) |
| @@ -171,8 +155,7 @@ static int palmte2_backlight_notify(struct device *dev, int brightness) | |||
| 171 | 155 | ||
| 172 | static void palmte2_backlight_exit(struct device *dev) | 156 | static void palmte2_backlight_exit(struct device *dev) |
| 173 | { | 157 | { |
| 174 | gpio_free(GPIO_NR_PALMTE2_BL_POWER); | 158 | gpio_free_array(ARRAY_AND_SIZE(palmte_bl_gpios)); |
| 175 | gpio_free(GPIO_NR_PALMTE2_LCD_POWER); | ||
| 176 | } | 159 | } |
| 177 | 160 | ||
| 178 | static struct platform_pwm_backlight_data palmte2_backlight_data = { | 161 | static struct platform_pwm_backlight_data palmte2_backlight_data = { |
| @@ -363,7 +346,7 @@ static void __init palmte2_init(void) | |||
| 363 | pxa_set_btuart_info(NULL); | 346 | pxa_set_btuart_info(NULL); |
| 364 | pxa_set_stuart_info(NULL); | 347 | pxa_set_stuart_info(NULL); |
| 365 | 348 | ||
| 366 | set_pxa_fb_info(&palmte2_lcd_screen); | 349 | pxa_set_fb_info(NULL, &palmte2_lcd_screen); |
| 367 | pxa_set_mci_info(&palmte2_mci_platform_data); | 350 | pxa_set_mci_info(&palmte2_mci_platform_data); |
| 368 | palmte2_udc_init(); | 351 | palmte2_udc_init(); |
| 369 | pxa_set_ac97_info(&palmte2_ac97_pdata); | 352 | pxa_set_ac97_info(&palmte2_ac97_pdata); |
diff --git a/arch/arm/mach-pxa/palmz72.c b/arch/arm/mach-pxa/palmz72.c index 3010193b081e..3b8a4f37dbbe 100644 --- a/arch/arm/mach-pxa/palmz72.c +++ b/arch/arm/mach-pxa/palmz72.c | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | #include <linux/wm97xx.h> | 30 | #include <linux/wm97xx.h> |
| 31 | #include <linux/power_supply.h> | 31 | #include <linux/power_supply.h> |
| 32 | #include <linux/usb/gpio_vbus.h> | 32 | #include <linux/usb/gpio_vbus.h> |
| 33 | #include <linux/i2c-gpio.h> | ||
| 33 | 34 | ||
| 34 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
| 35 | #include <asm/mach/arch.h> | 36 | #include <asm/mach/arch.h> |
| @@ -47,6 +48,9 @@ | |||
| 47 | #include <mach/palm27x.h> | 48 | #include <mach/palm27x.h> |
| 48 | 49 | ||
| 49 | #include <mach/pm.h> | 50 | #include <mach/pm.h> |
| 51 | #include <mach/camera.h> | ||
| 52 | |||
| 53 | #include <media/soc_camera.h> | ||
| 50 | 54 | ||
| 51 | #include "generic.h" | 55 | #include "generic.h" |
| 52 | #include "devices.h" | 56 | #include "devices.h" |
| @@ -103,6 +107,28 @@ static unsigned long palmz72_pin_config[] __initdata = { | |||
| 103 | GPIO22_GPIO, /* LCD border color */ | 107 | GPIO22_GPIO, /* LCD border color */ |
| 104 | GPIO96_GPIO, /* lcd power */ | 108 | GPIO96_GPIO, /* lcd power */ |
| 105 | 109 | ||
| 110 | /* PXA Camera */ | ||
| 111 | GPIO81_CIF_DD_0, | ||
| 112 | GPIO48_CIF_DD_5, | ||
| 113 | GPIO50_CIF_DD_3, | ||
| 114 | GPIO51_CIF_DD_2, | ||
| 115 | GPIO52_CIF_DD_4, | ||
| 116 | GPIO53_CIF_MCLK, | ||
| 117 | GPIO54_CIF_PCLK, | ||
| 118 | GPIO55_CIF_DD_1, | ||
| 119 | GPIO84_CIF_FV, | ||
| 120 | GPIO85_CIF_LV, | ||
| 121 | GPIO93_CIF_DD_6, | ||
| 122 | GPIO108_CIF_DD_7, | ||
| 123 | |||
| 124 | GPIO56_GPIO, /* OV9640 Powerdown */ | ||
| 125 | GPIO57_GPIO, /* OV9640 Reset */ | ||
| 126 | GPIO91_GPIO, /* OV9640 Power */ | ||
| 127 | |||
| 128 | /* I2C */ | ||
| 129 | GPIO117_GPIO, /* I2C_SCL */ | ||
| 130 | GPIO118_GPIO, /* I2C_SDA */ | ||
| 131 | |||
| 106 | /* Misc. */ | 132 | /* Misc. */ |
| 107 | GPIO0_GPIO | WAKEUP_ON_LEVEL_HIGH, /* power detect */ | 133 | GPIO0_GPIO | WAKEUP_ON_LEVEL_HIGH, /* power detect */ |
| 108 | GPIO88_GPIO, /* green led */ | 134 | GPIO88_GPIO, /* green led */ |
| @@ -254,6 +280,106 @@ device_initcall(palmz72_pm_init); | |||
| 254 | #endif | 280 | #endif |
| 255 | 281 | ||
| 256 | /****************************************************************************** | 282 | /****************************************************************************** |
| 283 | * SoC Camera | ||
| 284 | ******************************************************************************/ | ||
| 285 | #if defined(CONFIG_SOC_CAMERA_OV9640) || \ | ||
| 286 | defined(CONFIG_SOC_CAMERA_OV9640_MODULE) | ||
| 287 | static struct pxacamera_platform_data palmz72_pxacamera_platform_data = { | ||
| 288 | .flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 | | ||
| 289 | PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN, | ||
| 290 | .mclk_10khz = 2600, | ||
| 291 | }; | ||
| 292 | |||
| 293 | /* Board I2C devices. */ | ||
| 294 | static struct i2c_board_info palmz72_i2c_device[] = { | ||
| 295 | { | ||
| 296 | I2C_BOARD_INFO("ov9640", 0x30), | ||
| 297 | } | ||
| 298 | }; | ||
| 299 | |||
| 300 | static int palmz72_camera_power(struct device *dev, int power) | ||
| 301 | { | ||
| 302 | gpio_set_value(GPIO_NR_PALMZ72_CAM_PWDN, !power); | ||
| 303 | mdelay(50); | ||
| 304 | return 0; | ||
| 305 | } | ||
| 306 | |||
| 307 | static int palmz72_camera_reset(struct device *dev) | ||
| 308 | { | ||
| 309 | gpio_set_value(GPIO_NR_PALMZ72_CAM_RESET, 1); | ||
| 310 | mdelay(50); | ||
| 311 | gpio_set_value(GPIO_NR_PALMZ72_CAM_RESET, 0); | ||
| 312 | mdelay(50); | ||
| 313 | return 0; | ||
| 314 | } | ||
| 315 | |||
| 316 | static struct soc_camera_link palmz72_iclink = { | ||
| 317 | .bus_id = 0, /* Match id in pxa27x_device_camera in device.c */ | ||
| 318 | .board_info = &palmz72_i2c_device[0], | ||
| 319 | .i2c_adapter_id = 0, | ||
| 320 | .module_name = "ov96xx", | ||
| 321 | .power = &palmz72_camera_power, | ||
| 322 | .reset = &palmz72_camera_reset, | ||
| 323 | .flags = SOCAM_DATAWIDTH_8, | ||
| 324 | }; | ||
| 325 | |||
| 326 | static struct i2c_gpio_platform_data palmz72_i2c_bus_data = { | ||
| 327 | .sda_pin = 118, | ||
| 328 | .scl_pin = 117, | ||
| 329 | .udelay = 10, | ||
| 330 | .timeout = 100, | ||
| 331 | }; | ||
| 332 | |||
| 333 | static struct platform_device palmz72_i2c_bus_device = { | ||
| 334 | .name = "i2c-gpio", | ||
| 335 | .id = 0, /* we use this as a replacement for i2c-pxa */ | ||
| 336 | .dev = { | ||
| 337 | .platform_data = &palmz72_i2c_bus_data, | ||
| 338 | } | ||
| 339 | }; | ||
| 340 | |||
| 341 | static struct platform_device palmz72_camera = { | ||
| 342 | .name = "soc-camera-pdrv", | ||
| 343 | .id = -1, | ||
| 344 | .dev = { | ||
| 345 | .platform_data = &palmz72_iclink, | ||
| 346 | }, | ||
| 347 | }; | ||
| 348 | |||
| 349 | /* Here we request the camera GPIOs and configure them. We power up the camera | ||
| 350 | * module, deassert the reset pin, but put it into powerdown (low to no power | ||
| 351 | * consumption) mode. This allows us to later bring the module up fast. */ | ||
| 352 | static struct gpio palmz72_camera_gpios[] = { | ||
| 353 | { GPIO_NR_PALMZ72_CAM_POWER, GPIOF_INIT_HIGH,"Camera DVDD" }, | ||
| 354 | { GPIO_NR_PALMZ72_CAM_RESET, GPIOF_INIT_LOW, "Camera RESET" }, | ||
| 355 | { GPIO_NR_PALMZ72_CAM_PWDN, GPIOF_INIT_LOW, "Camera PWDN" }, | ||
| 356 | }; | ||
| 357 | |||
| 358 | static inline void __init palmz72_cam_gpio_init(void) | ||
| 359 | { | ||
| 360 | int ret; | ||
| 361 | |||
| 362 | ret = gpio_request_array(ARRAY_AND_SIZE(palmz72_camera_gpios)); | ||
| 363 | if (!ret) | ||
| 364 | gpio_free_array(ARRAY_AND_SIZE(palmz72_camera_gpios)); | ||
| 365 | else | ||
| 366 | printk(KERN_ERR "Camera GPIO init failed!\n"); | ||
| 367 | |||
| 368 | return; | ||
| 369 | } | ||
| 370 | |||
| 371 | static void __init palmz72_camera_init(void) | ||
| 372 | { | ||
| 373 | palmz72_cam_gpio_init(); | ||
| 374 | pxa_set_camera_info(&palmz72_pxacamera_platform_data); | ||
| 375 | platform_device_register(&palmz72_i2c_bus_device); | ||
| 376 | platform_device_register(&palmz72_camera); | ||
| 377 | } | ||
| 378 | #else | ||
| 379 | static inline void palmz72_camera_init(void) {} | ||
| 380 | #endif | ||
| 381 | |||
| 382 | /****************************************************************************** | ||
| 257 | * Machine init | 383 | * Machine init |
| 258 | ******************************************************************************/ | 384 | ******************************************************************************/ |
| 259 | static void __init palmz72_init(void) | 385 | static void __init palmz72_init(void) |
| @@ -276,6 +402,7 @@ static void __init palmz72_init(void) | |||
| 276 | palm27x_pmic_init(); | 402 | palm27x_pmic_init(); |
| 277 | palmz72_kpc_init(); | 403 | palmz72_kpc_init(); |
| 278 | palmz72_leds_init(); | 404 | palmz72_leds_init(); |
| 405 | palmz72_camera_init(); | ||
| 279 | } | 406 | } |
| 280 | 407 | ||
| 281 | MACHINE_START(PALMZ72, "Palm Zire72") | 408 | MACHINE_START(PALMZ72, "Palm Zire72") |
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c index 4d0120540124..6d5b7e062124 100644 --- a/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/arch/arm/mach-pxa/pcm990-baseboard.c | |||
| @@ -515,7 +515,7 @@ void __init pcm990_baseboard_init(void) | |||
| 515 | pcm990_init_irq(); | 515 | pcm990_init_irq(); |
| 516 | 516 | ||
| 517 | #ifndef CONFIG_PCM990_DISPLAY_NONE | 517 | #ifndef CONFIG_PCM990_DISPLAY_NONE |
| 518 | set_pxa_fb_info(&pcm990_fbinfo); | 518 | pxa_set_fb_info(NULL, &pcm990_fbinfo); |
| 519 | #endif | 519 | #endif |
| 520 | platform_device_register(&pcm990_backlight_device); | 520 | platform_device_register(&pcm990_backlight_device); |
| 521 | 521 | ||
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index 35353af345d5..16d14fd79b4b 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
| @@ -445,8 +445,7 @@ static void __init poodle_init(void) | |||
| 445 | if (ret) | 445 | if (ret) |
| 446 | pr_warning("poodle: Unable to register LoCoMo device\n"); | 446 | pr_warning("poodle: Unable to register LoCoMo device\n"); |
| 447 | 447 | ||
| 448 | set_pxa_fb_parent(&poodle_locomo_device.dev); | 448 | pxa_set_fb_info(&poodle_locomo_device.dev, &poodle_fb_info); |
| 449 | set_pxa_fb_info(&poodle_fb_info); | ||
| 450 | pxa_set_udc_info(&udc_info); | 449 | pxa_set_udc_info(&udc_info); |
| 451 | pxa_set_mci_info(&poodle_mci_platform_data); | 450 | pxa_set_mci_info(&poodle_mci_platform_data); |
| 452 | pxa_set_ficp_info(&poodle_ficp_platform_data); | 451 | pxa_set_ficp_info(&poodle_ficp_platform_data); |
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 6bde5956358d..a4af8c52d7ee 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
| @@ -285,7 +285,7 @@ static inline void pxa25x_init_pm(void) {} | |||
| 285 | 285 | ||
| 286 | static int pxa25x_set_wake(struct irq_data *d, unsigned int on) | 286 | static int pxa25x_set_wake(struct irq_data *d, unsigned int on) |
| 287 | { | 287 | { |
| 288 | int gpio = IRQ_TO_GPIO(d->irq); | 288 | int gpio = irq_to_gpio(d->irq); |
| 289 | uint32_t mask = 0; | 289 | uint32_t mask = 0; |
| 290 | 290 | ||
| 291 | if (gpio >= 0 && gpio < 85) | 291 | if (gpio >= 0 && gpio < 85) |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 1cb5d0f9723f..909756eaf4b7 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
| @@ -345,7 +345,7 @@ static inline void pxa27x_init_pm(void) {} | |||
| 345 | */ | 345 | */ |
| 346 | static int pxa27x_set_wake(struct irq_data *d, unsigned int on) | 346 | static int pxa27x_set_wake(struct irq_data *d, unsigned int on) |
| 347 | { | 347 | { |
| 348 | int gpio = IRQ_TO_GPIO(d->irq); | 348 | int gpio = irq_to_gpio(d->irq); |
| 349 | uint32_t mask; | 349 | uint32_t mask; |
| 350 | 350 | ||
| 351 | if (gpio >= 0 && gpio < 128) | 351 | if (gpio >= 0 && gpio < 128) |
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c index 47094188e029..cd1861351f75 100644 --- a/arch/arm/mach-pxa/raumfeld.c +++ b/arch/arm/mach-pxa/raumfeld.c | |||
| @@ -597,7 +597,7 @@ static void __init raumfeld_lcd_init(void) | |||
| 597 | { | 597 | { |
| 598 | int ret; | 598 | int ret; |
| 599 | 599 | ||
| 600 | set_pxa_fb_info(&raumfeld_sharp_lcd_info); | 600 | pxa_set_fb_info(NULL, &raumfeld_sharp_lcd_info); |
| 601 | 601 | ||
| 602 | /* Earlier devices had the backlight regulator controlled | 602 | /* Earlier devices had the backlight regulator controlled |
| 603 | * via PWM, later versions use another controller for that */ | 603 | * via PWM, later versions use another controller for that */ |
diff --git a/arch/arm/mach-pxa/saar.c b/arch/arm/mach-pxa/saar.c index eb83c89428ef..fee97a935122 100644 --- a/arch/arm/mach-pxa/saar.c +++ b/arch/arm/mach-pxa/saar.c | |||
| @@ -473,7 +473,7 @@ static struct pxafb_mach_info saar_lcd_info = { | |||
| 473 | 473 | ||
| 474 | static void __init saar_init_lcd(void) | 474 | static void __init saar_init_lcd(void) |
| 475 | { | 475 | { |
| 476 | set_pxa_fb_info(&saar_lcd_info); | 476 | pxa_set_fb_info(NULL, &saar_lcd_info); |
| 477 | } | 477 | } |
| 478 | #else | 478 | #else |
| 479 | static inline void saar_init_lcd(void) {} | 479 | static inline void saar_init_lcd(void) {} |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 38e2c0912b9a..01c576963e94 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
| @@ -724,7 +724,7 @@ static struct pxafb_mach_info spitz_pxafb_info = { | |||
| 724 | 724 | ||
| 725 | static void __init spitz_lcd_init(void) | 725 | static void __init spitz_lcd_init(void) |
| 726 | { | 726 | { |
| 727 | set_pxa_fb_info(&spitz_pxafb_info); | 727 | pxa_set_fb_info(NULL, &spitz_pxafb_info); |
| 728 | } | 728 | } |
| 729 | #else | 729 | #else |
| 730 | static inline void spitz_lcd_init(void) {} | 730 | static inline void spitz_lcd_init(void) {} |
diff --git a/arch/arm/mach-pxa/tavorevb.c b/arch/arm/mach-pxa/tavorevb.c index 9cecf8366db8..53d4a472b699 100644 --- a/arch/arm/mach-pxa/tavorevb.c +++ b/arch/arm/mach-pxa/tavorevb.c | |||
| @@ -466,7 +466,7 @@ static void __init tavorevb_init_lcd(void) | |||
| 466 | { | 466 | { |
| 467 | platform_device_register(&tavorevb_backlight_devices[0]); | 467 | platform_device_register(&tavorevb_backlight_devices[0]); |
| 468 | platform_device_register(&tavorevb_backlight_devices[1]); | 468 | platform_device_register(&tavorevb_backlight_devices[1]); |
| 469 | set_pxa_fb_info(&tavorevb_lcd_info); | 469 | pxa_set_fb_info(NULL, &tavorevb_lcd_info); |
| 470 | } | 470 | } |
| 471 | #else | 471 | #else |
| 472 | static inline void tavorevb_init_lcd(void) {} | 472 | static inline void tavorevb_init_lcd(void) {} |
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c index e7f64d9b4f2d..428da3ff33a5 100644 --- a/arch/arm/mach-pxa/time.c +++ b/arch/arm/mach-pxa/time.c | |||
| @@ -100,7 +100,6 @@ pxa_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *dev) | |||
| 100 | static struct clock_event_device ckevt_pxa_osmr0 = { | 100 | static struct clock_event_device ckevt_pxa_osmr0 = { |
| 101 | .name = "osmr0", | 101 | .name = "osmr0", |
| 102 | .features = CLOCK_EVT_FEAT_ONESHOT, | 102 | .features = CLOCK_EVT_FEAT_ONESHOT, |
| 103 | .shift = 32, | ||
| 104 | .rating = 200, | 103 | .rating = 200, |
| 105 | .set_next_event = pxa_osmr0_set_next_event, | 104 | .set_next_event = pxa_osmr0_set_next_event, |
| 106 | .set_mode = pxa_osmr0_set_mode, | 105 | .set_mode = pxa_osmr0_set_mode, |
| @@ -135,8 +134,8 @@ static void __init pxa_timer_init(void) | |||
| 135 | 134 | ||
| 136 | init_sched_clock(&cd, pxa_update_sched_clock, 32, clock_tick_rate); | 135 | init_sched_clock(&cd, pxa_update_sched_clock, 32, clock_tick_rate); |
| 137 | 136 | ||
| 138 | ckevt_pxa_osmr0.mult = | 137 | clocksource_calc_mult_shift(&cksrc_pxa_oscr0, clock_tick_rate, 4); |
| 139 | div_sc(clock_tick_rate, NSEC_PER_SEC, ckevt_pxa_osmr0.shift); | 138 | clockevents_calc_mult_shift(&ckevt_pxa_osmr0, clock_tick_rate, 4); |
| 140 | ckevt_pxa_osmr0.max_delta_ns = | 139 | ckevt_pxa_osmr0.max_delta_ns = |
| 141 | clockevent_delta2ns(0x7fffffff, &ckevt_pxa_osmr0); | 140 | clockevent_delta2ns(0x7fffffff, &ckevt_pxa_osmr0); |
| 142 | ckevt_pxa_osmr0.min_delta_ns = | 141 | ckevt_pxa_osmr0.min_delta_ns = |
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 5ad3807af334..5fa145778e7d 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | #include <linux/spi/pxa2xx_spi.h> | 35 | #include <linux/spi/pxa2xx_spi.h> |
| 36 | #include <linux/input/matrix_keypad.h> | 36 | #include <linux/input/matrix_keypad.h> |
| 37 | #include <linux/i2c/pxa-i2c.h> | 37 | #include <linux/i2c/pxa-i2c.h> |
| 38 | #include <linux/usb/gpio_vbus.h> | ||
| 38 | 39 | ||
| 39 | #include <asm/setup.h> | 40 | #include <asm/setup.h> |
| 40 | #include <asm/mach-types.h> | 41 | #include <asm/mach-types.h> |
| @@ -240,12 +241,20 @@ static struct scoop_pcmcia_config tosa_pcmcia_config = { | |||
| 240 | /* | 241 | /* |
| 241 | * USB Device Controller | 242 | * USB Device Controller |
| 242 | */ | 243 | */ |
| 243 | static struct pxa2xx_udc_mach_info udc_info __initdata = { | 244 | static struct gpio_vbus_mach_info tosa_udc_info = { |
| 244 | .gpio_pullup = TOSA_GPIO_USB_PULLUP, | 245 | .gpio_pullup = TOSA_GPIO_USB_PULLUP, |
| 245 | .gpio_vbus = TOSA_GPIO_USB_IN, | 246 | .gpio_vbus = TOSA_GPIO_USB_IN, |
| 246 | .gpio_vbus_inverted = 1, | 247 | .gpio_vbus_inverted = 1, |
| 247 | }; | 248 | }; |
| 248 | 249 | ||
| 250 | static struct platform_device tosa_gpio_vbus = { | ||
| 251 | .name = "gpio-vbus", | ||
| 252 | .id = -1, | ||
| 253 | .dev = { | ||
| 254 | .platform_data = &tosa_udc_info, | ||
| 255 | }, | ||
| 256 | }; | ||
| 257 | |||
| 249 | /* | 258 | /* |
| 250 | * MMC/SD Device | 259 | * MMC/SD Device |
| 251 | */ | 260 | */ |
| @@ -891,6 +900,7 @@ static struct platform_device *devices[] __initdata = { | |||
| 891 | &tosa_bt_device, | 900 | &tosa_bt_device, |
| 892 | &sharpsl_rom_device, | 901 | &sharpsl_rom_device, |
| 893 | &wm9712_device, | 902 | &wm9712_device, |
| 903 | &tosa_gpio_vbus, | ||
| 894 | }; | 904 | }; |
| 895 | 905 | ||
| 896 | static void tosa_poweroff(void) | 906 | static void tosa_poweroff(void) |
| @@ -937,7 +947,6 @@ static void __init tosa_init(void) | |||
| 937 | dummy = gpiochip_reserve(TOSA_TC6393XB_GPIO_BASE, 16); | 947 | dummy = gpiochip_reserve(TOSA_TC6393XB_GPIO_BASE, 16); |
| 938 | 948 | ||
| 939 | pxa_set_mci_info(&tosa_mci_platform_data); | 949 | pxa_set_mci_info(&tosa_mci_platform_data); |
| 940 | pxa_set_udc_info(&udc_info); | ||
| 941 | pxa_set_ficp_info(&tosa_ficp_platform_data); | 950 | pxa_set_ficp_info(&tosa_ficp_platform_data); |
| 942 | pxa_set_i2c_info(NULL); | 951 | pxa_set_i2c_info(NULL); |
| 943 | pxa_set_ac97_info(NULL); | 952 | pxa_set_ac97_info(NULL); |
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c index 857bb2e63486..b9cfbebdfe9c 100644 --- a/arch/arm/mach-pxa/trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4.c | |||
| @@ -516,9 +516,9 @@ static void __init trizeps4_init(void) | |||
| 516 | pxa_set_stuart_info(NULL); | 516 | pxa_set_stuart_info(NULL); |
| 517 | 517 | ||
| 518 | if (0) /* dont know how to determine LCD */ | 518 | if (0) /* dont know how to determine LCD */ |
| 519 | set_pxa_fb_info(&sharp_lcd); | 519 | pxa_set_fb_info(NULL, &sharp_lcd); |
| 520 | else | 520 | else |
| 521 | set_pxa_fb_info(&toshiba_lcd); | 521 | pxa_set_fb_info(NULL, &toshiba_lcd); |
| 522 | 522 | ||
| 523 | pxa_set_mci_info(&trizeps4_mci_platform_data); | 523 | pxa_set_mci_info(&trizeps4_mci_platform_data); |
| 524 | #ifndef STATUS_LEDS_ON_STUART_PINS | 524 | #ifndef STATUS_LEDS_ON_STUART_PINS |
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index aa70331c0805..b523f119e0f0 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c | |||
| @@ -932,7 +932,7 @@ static void __init viper_init(void) | |||
| 932 | /* Wake-up serial console */ | 932 | /* Wake-up serial console */ |
| 933 | viper_init_serial_gpio(); | 933 | viper_init_serial_gpio(); |
| 934 | 934 | ||
| 935 | set_pxa_fb_info(&fb_info); | 935 | pxa_set_fb_info(NULL, &fb_info); |
| 936 | 936 | ||
| 937 | /* v1 hardware cannot use the datacs line */ | 937 | /* v1 hardware cannot use the datacs line */ |
| 938 | version = viper_hw_version(); | 938 | version = viper_hw_version(); |
diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c index e709fd459268..f71d377c8640 100644 --- a/arch/arm/mach-pxa/vpac270.c +++ b/arch/arm/mach-pxa/vpac270.c | |||
| @@ -572,7 +572,7 @@ static void __init vpac270_lcd_init(void) | |||
| 572 | } | 572 | } |
| 573 | 573 | ||
| 574 | vpac270_lcd_screen.pxafb_lcd_power = vpac270_lcd_power; | 574 | vpac270_lcd_screen.pxafb_lcd_power = vpac270_lcd_power; |
| 575 | set_pxa_fb_info(&vpac270_lcd_screen); | 575 | pxa_set_fb_info(NULL, &vpac270_lcd_screen); |
| 576 | return; | 576 | return; |
| 577 | 577 | ||
| 578 | err2: | 578 | err2: |
diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c index aaf883754ef4..fbe9e02e2f9f 100644 --- a/arch/arm/mach-pxa/z2.c +++ b/arch/arm/mach-pxa/z2.c | |||
| @@ -91,13 +91,13 @@ static unsigned long z2_pin_config[] = { | |||
| 91 | GPIO47_STUART_TXD, | 91 | GPIO47_STUART_TXD, |
| 92 | 92 | ||
| 93 | /* Keypad */ | 93 | /* Keypad */ |
| 94 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, | 94 | GPIO100_KP_MKIN_0, |
| 95 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, | 95 | GPIO101_KP_MKIN_1, |
| 96 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, | 96 | GPIO102_KP_MKIN_2, |
| 97 | GPIO34_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, | 97 | GPIO34_KP_MKIN_3, |
| 98 | GPIO38_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH, | 98 | GPIO38_KP_MKIN_4, |
| 99 | GPIO16_KP_MKIN_5 | WAKEUP_ON_LEVEL_HIGH, | 99 | GPIO16_KP_MKIN_5, |
| 100 | GPIO17_KP_MKIN_6 | WAKEUP_ON_LEVEL_HIGH, | 100 | GPIO17_KP_MKIN_6, |
| 101 | GPIO103_KP_MKOUT_0, | 101 | GPIO103_KP_MKOUT_0, |
| 102 | GPIO104_KP_MKOUT_1, | 102 | GPIO104_KP_MKOUT_1, |
| 103 | GPIO105_KP_MKOUT_2, | 103 | GPIO105_KP_MKOUT_2, |
| @@ -138,8 +138,7 @@ static unsigned long z2_pin_config[] = { | |||
| 138 | GPIO1_GPIO, /* Power button */ | 138 | GPIO1_GPIO, /* Power button */ |
| 139 | GPIO37_GPIO, /* Headphone detect */ | 139 | GPIO37_GPIO, /* Headphone detect */ |
| 140 | GPIO98_GPIO, /* Lid switch */ | 140 | GPIO98_GPIO, /* Lid switch */ |
| 141 | GPIO14_GPIO, /* WiFi Reset */ | 141 | GPIO14_GPIO, /* WiFi Power */ |
| 142 | GPIO15_GPIO, /* WiFi Power */ | ||
| 143 | GPIO24_GPIO, /* WiFi CS */ | 142 | GPIO24_GPIO, /* WiFi CS */ |
| 144 | GPIO36_GPIO, /* WiFi IRQ */ | 143 | GPIO36_GPIO, /* WiFi IRQ */ |
| 145 | GPIO88_GPIO, /* LCD CS */ | 144 | GPIO88_GPIO, /* LCD CS */ |
| @@ -204,7 +203,7 @@ static struct platform_pwm_backlight_data z2_backlight_data[] = { | |||
| 204 | /* Keypad Backlight */ | 203 | /* Keypad Backlight */ |
| 205 | .pwm_id = 1, | 204 | .pwm_id = 1, |
| 206 | .max_brightness = 1023, | 205 | .max_brightness = 1023, |
| 207 | .dft_brightness = 512, | 206 | .dft_brightness = 0, |
| 208 | .pwm_period_ns = 1260320, | 207 | .pwm_period_ns = 1260320, |
| 209 | }, | 208 | }, |
| 210 | [1] = { | 209 | [1] = { |
| @@ -271,7 +270,7 @@ static struct pxafb_mach_info z2_lcd_screen = { | |||
| 271 | 270 | ||
| 272 | static void __init z2_lcd_init(void) | 271 | static void __init z2_lcd_init(void) |
| 273 | { | 272 | { |
| 274 | set_pxa_fb_info(&z2_lcd_screen); | 273 | pxa_set_fb_info(NULL, &z2_lcd_screen); |
| 275 | } | 274 | } |
| 276 | #else | 275 | #else |
| 277 | static inline void z2_lcd_init(void) {} | 276 | static inline void z2_lcd_init(void) {} |
| @@ -309,12 +308,12 @@ struct gpio_led z2_gpio_leds[] = { | |||
| 309 | .active_low = 1, | 308 | .active_low = 1, |
| 310 | }, { | 309 | }, { |
| 311 | .name = "z2:green:charged", | 310 | .name = "z2:green:charged", |
| 312 | .default_trigger = "none", | 311 | .default_trigger = "mmc0", |
| 313 | .gpio = GPIO85_ZIPITZ2_LED_CHARGED, | 312 | .gpio = GPIO85_ZIPITZ2_LED_CHARGED, |
| 314 | .active_low = 1, | 313 | .active_low = 1, |
| 315 | }, { | 314 | }, { |
| 316 | .name = "z2:amber:charging", | 315 | .name = "z2:amber:charging", |
| 317 | .default_trigger = "none", | 316 | .default_trigger = "Z2-charging-or-full", |
| 318 | .gpio = GPIO83_ZIPITZ2_LED_CHARGING, | 317 | .gpio = GPIO83_ZIPITZ2_LED_CHARGING, |
| 319 | .active_low = 1, | 318 | .active_low = 1, |
| 320 | }, | 319 | }, |
| @@ -427,8 +426,22 @@ static inline void z2_mkp_init(void) {} | |||
| 427 | ******************************************************************************/ | 426 | ******************************************************************************/ |
| 428 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 427 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
| 429 | static struct gpio_keys_button z2_pxa_buttons[] = { | 428 | static struct gpio_keys_button z2_pxa_buttons[] = { |
| 430 | {KEY_POWER, GPIO1_ZIPITZ2_POWER_BUTTON, 0, "Power Button" }, | 429 | { |
| 431 | {KEY_CLOSE, GPIO98_ZIPITZ2_LID_BUTTON, 0, "Lid Button" }, | 430 | .code = KEY_POWER, |
| 431 | .gpio = GPIO1_ZIPITZ2_POWER_BUTTON, | ||
| 432 | .active_low = 0, | ||
| 433 | .desc = "Power Button", | ||
| 434 | .wakeup = 1, | ||
| 435 | .type = EV_KEY, | ||
| 436 | }, | ||
| 437 | { | ||
| 438 | .code = SW_LID, | ||
| 439 | .gpio = GPIO98_ZIPITZ2_LID_BUTTON, | ||
| 440 | .active_low = 1, | ||
| 441 | .desc = "Lid Switch", | ||
| 442 | .wakeup = 0, | ||
| 443 | .type = EV_SW, | ||
| 444 | }, | ||
| 432 | }; | 445 | }; |
| 433 | 446 | ||
| 434 | static struct gpio_keys_platform_data z2_pxa_keys_data = { | 447 | static struct gpio_keys_platform_data z2_pxa_keys_data = { |
| @@ -461,9 +474,9 @@ static struct z2_battery_info batt_chip_info = { | |||
| 461 | .batt_I2C_addr = 0x55, | 474 | .batt_I2C_addr = 0x55, |
| 462 | .batt_I2C_reg = 2, | 475 | .batt_I2C_reg = 2, |
| 463 | .charge_gpio = GPIO0_ZIPITZ2_AC_DETECT, | 476 | .charge_gpio = GPIO0_ZIPITZ2_AC_DETECT, |
| 464 | .min_voltage = 2400000, | 477 | .min_voltage = 3475000, |
| 465 | .max_voltage = 3700000, | 478 | .max_voltage = 4190000, |
| 466 | .batt_div = 69, | 479 | .batt_div = 59, |
| 467 | .batt_mult = 1000000, | 480 | .batt_mult = 1000000, |
| 468 | .batt_tech = POWER_SUPPLY_TECHNOLOGY_LION, | 481 | .batt_tech = POWER_SUPPLY_TECHNOLOGY_LION, |
| 469 | .batt_name = "Z2", | 482 | .batt_name = "Z2", |
| @@ -497,26 +510,16 @@ static int z2_lbs_spi_setup(struct spi_device *spi) | |||
| 497 | { | 510 | { |
| 498 | int ret = 0; | 511 | int ret = 0; |
| 499 | 512 | ||
| 500 | ret = gpio_request(GPIO15_ZIPITZ2_WIFI_POWER, "WiFi Power"); | 513 | ret = gpio_request(GPIO14_ZIPITZ2_WIFI_POWER, "WiFi Power"); |
| 501 | if (ret) | 514 | if (ret) |
| 502 | goto err; | 515 | goto err; |
| 503 | 516 | ||
| 504 | ret = gpio_direction_output(GPIO15_ZIPITZ2_WIFI_POWER, 1); | 517 | ret = gpio_direction_output(GPIO14_ZIPITZ2_WIFI_POWER, 1); |
| 505 | if (ret) | 518 | if (ret) |
| 506 | goto err2; | 519 | goto err2; |
| 507 | 520 | ||
| 508 | ret = gpio_request(GPIO14_ZIPITZ2_WIFI_RESET, "WiFi Reset"); | 521 | /* Wait until card is powered on */ |
| 509 | if (ret) | ||
| 510 | goto err2; | ||
| 511 | |||
| 512 | ret = gpio_direction_output(GPIO14_ZIPITZ2_WIFI_RESET, 0); | ||
| 513 | if (ret) | ||
| 514 | goto err3; | ||
| 515 | |||
| 516 | /* Reset the card */ | ||
| 517 | mdelay(180); | 522 | mdelay(180); |
| 518 | gpio_set_value(GPIO14_ZIPITZ2_WIFI_RESET, 1); | ||
| 519 | mdelay(20); | ||
| 520 | 523 | ||
| 521 | spi->bits_per_word = 16; | 524 | spi->bits_per_word = 16; |
| 522 | spi->mode = SPI_MODE_2, | 525 | spi->mode = SPI_MODE_2, |
| @@ -525,22 +528,18 @@ static int z2_lbs_spi_setup(struct spi_device *spi) | |||
| 525 | 528 | ||
| 526 | return 0; | 529 | return 0; |
| 527 | 530 | ||
| 528 | err3: | ||
| 529 | gpio_free(GPIO14_ZIPITZ2_WIFI_RESET); | ||
| 530 | err2: | 531 | err2: |
| 531 | gpio_free(GPIO15_ZIPITZ2_WIFI_POWER); | 532 | gpio_free(GPIO14_ZIPITZ2_WIFI_POWER); |
| 532 | err: | 533 | err: |
| 533 | return ret; | 534 | return ret; |
| 534 | }; | 535 | }; |
| 535 | 536 | ||
| 536 | static int z2_lbs_spi_teardown(struct spi_device *spi) | 537 | static int z2_lbs_spi_teardown(struct spi_device *spi) |
| 537 | { | 538 | { |
| 538 | gpio_set_value(GPIO14_ZIPITZ2_WIFI_RESET, 0); | 539 | gpio_set_value(GPIO14_ZIPITZ2_WIFI_POWER, 0); |
| 539 | gpio_set_value(GPIO15_ZIPITZ2_WIFI_POWER, 0); | 540 | gpio_free(GPIO14_ZIPITZ2_WIFI_POWER); |
| 540 | gpio_free(GPIO14_ZIPITZ2_WIFI_RESET); | ||
| 541 | gpio_free(GPIO15_ZIPITZ2_WIFI_POWER); | ||
| 542 | return 0; | ||
| 543 | 541 | ||
| 542 | return 0; | ||
| 544 | }; | 543 | }; |
| 545 | 544 | ||
| 546 | static struct pxa2xx_spi_chip z2_lbs_chip_info = { | 545 | static struct pxa2xx_spi_chip z2_lbs_chip_info = { |
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 139aa7f2ed90..00363c7ac182 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c | |||
| @@ -847,7 +847,7 @@ static void __init zeus_init(void) | |||
| 847 | if (zeus_setup_fb_gpios()) | 847 | if (zeus_setup_fb_gpios()) |
| 848 | pr_err("Failed to setup fb gpios\n"); | 848 | pr_err("Failed to setup fb gpios\n"); |
| 849 | else | 849 | else |
| 850 | set_pxa_fb_info(&zeus_fb_info); | 850 | pxa_set_fb_info(NULL, &zeus_fb_info); |
| 851 | 851 | ||
| 852 | pxa_set_mci_info(&zeus_mci_platform_data); | 852 | pxa_set_mci_info(&zeus_mci_platform_data); |
| 853 | pxa_set_udc_info(&zeus_udc_info); | 853 | pxa_set_udc_info(&zeus_udc_info); |
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c index a4c784aab764..5821185f77ab 100644 --- a/arch/arm/mach-pxa/zylonite.c +++ b/arch/arm/mach-pxa/zylonite.c | |||
| @@ -208,7 +208,7 @@ static void __init zylonite_init_lcd(void) | |||
| 208 | platform_device_register(&zylonite_backlight_device); | 208 | platform_device_register(&zylonite_backlight_device); |
| 209 | 209 | ||
| 210 | if (lcd_id & 0x20) { | 210 | if (lcd_id & 0x20) { |
| 211 | set_pxa_fb_info(&zylonite_sharp_lcd_info); | 211 | pxa_set_fb_info(NULL, &zylonite_sharp_lcd_info); |
| 212 | return; | 212 | return; |
| 213 | } | 213 | } |
| 214 | 214 | ||
| @@ -220,7 +220,7 @@ static void __init zylonite_init_lcd(void) | |||
| 220 | else | 220 | else |
| 221 | zylonite_toshiba_lcd_info.modes = &toshiba_ltm04c380k_mode; | 221 | zylonite_toshiba_lcd_info.modes = &toshiba_ltm04c380k_mode; |
| 222 | 222 | ||
| 223 | set_pxa_fb_info(&zylonite_toshiba_lcd_info); | 223 | pxa_set_fb_info(NULL, &zylonite_toshiba_lcd_info); |
| 224 | } | 224 | } |
| 225 | #else | 225 | #else |
| 226 | static inline void zylonite_init_lcd(void) {} | 226 | static inline void zylonite_init_lcd(void) {} |
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index 2ecc1d94284e..10e75faba4c9 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
| @@ -348,7 +348,7 @@ static void __init gic_init_irq(void) | |||
| 348 | 348 | ||
| 349 | #ifndef CONFIG_REALVIEW_EB_ARM11MP_REVB | 349 | #ifndef CONFIG_REALVIEW_EB_ARM11MP_REVB |
| 350 | /* board GIC, secondary */ | 350 | /* board GIC, secondary */ |
| 351 | gic_init(1, 64, __io_address(REALVIEW_EB_GIC_DIST_BASE), | 351 | gic_init(1, 96, __io_address(REALVIEW_EB_GIC_DIST_BASE), |
| 352 | __io_address(REALVIEW_EB_GIC_CPU_BASE)); | 352 | __io_address(REALVIEW_EB_GIC_CPU_BASE)); |
| 353 | gic_cascade_irq(1, IRQ_EB11MP_EB_IRQ1); | 353 | gic_cascade_irq(1, IRQ_EB11MP_EB_IRQ1); |
| 354 | #endif | 354 | #endif |
diff --git a/arch/arm/mach-s3c2410/include/mach/dma.h b/arch/arm/mach-s3c2410/include/mach/dma.h index cf68136cc668..b2b2a5bb275e 100644 --- a/arch/arm/mach-s3c2410/include/mach/dma.h +++ b/arch/arm/mach-s3c2410/include/mach/dma.h | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | #define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */ | 19 | #define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */ |
| 20 | 20 | ||
| 21 | /* We use `virtual` dma channels to hide the fact we have only a limited | 21 | /* We use `virtual` dma channels to hide the fact we have only a limited |
| 22 | * number of DMA channels, and not of all of them (dependant on the device) | 22 | * number of DMA channels, and not of all of them (dependent on the device) |
| 23 | * can be attached to any DMA source. We therefore let the DMA core handle | 23 | * can be attached to any DMA source. We therefore let the DMA core handle |
| 24 | * the allocation of hardware channels to clients. | 24 | * the allocation of hardware channels to clients. |
| 25 | */ | 25 | */ |
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-mem.h b/arch/arm/mach-s3c2410/include/mach/regs-mem.h index 7f7c52947963..988a6863e54b 100644 --- a/arch/arm/mach-s3c2410/include/mach/regs-mem.h +++ b/arch/arm/mach-s3c2410/include/mach/regs-mem.h | |||
| @@ -101,7 +101,7 @@ | |||
| 101 | #define S3C2410_BANKCON_PMC16 (0x03) | 101 | #define S3C2410_BANKCON_PMC16 (0x03) |
| 102 | 102 | ||
| 103 | /* bank configurations for banks 0..7, note banks | 103 | /* bank configurations for banks 0..7, note banks |
| 104 | * 6 and 7 have differnt configurations depending on | 104 | * 6 and 7 have different configurations depending on |
| 105 | * the memory type bits */ | 105 | * the memory type bits */ |
| 106 | 106 | ||
| 107 | #define S3C2410_BANKCON_Tacp2 (0x0 << 2) | 107 | #define S3C2410_BANKCON_Tacp2 (0x0 << 2) |
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c index 66f44440d5d3..079dcaa602d3 100644 --- a/arch/arm/mach-s3c2410/mach-n30.c +++ b/arch/arm/mach-s3c2410/mach-n30.c | |||
| @@ -252,7 +252,7 @@ static struct s3c24xx_led_platdata n30_blue_led_pdata = { | |||
| 252 | .def_trigger = "", | 252 | .def_trigger = "", |
| 253 | }; | 253 | }; |
| 254 | 254 | ||
| 255 | /* This is the blue LED on the device. Originaly used to indicate GPS activity | 255 | /* This is the blue LED on the device. Originally used to indicate GPS activity |
| 256 | * by flashing. */ | 256 | * by flashing. */ |
| 257 | static struct s3c24xx_led_platdata n35_blue_led_pdata = { | 257 | static struct s3c24xx_led_platdata n35_blue_led_pdata = { |
| 258 | .name = "blue_led", | 258 | .name = "blue_led", |
diff --git a/arch/arm/mach-s3c2440/mach-mini2440.c b/arch/arm/mach-s3c2440/mach-mini2440.c index dfedc9c9e005..dd3120df09fe 100644 --- a/arch/arm/mach-s3c2440/mach-mini2440.c +++ b/arch/arm/mach-s3c2440/mach-mini2440.c | |||
| @@ -155,7 +155,7 @@ static struct s3c2410fb_display mini2440_lcd_cfg[] __initdata = { | |||
| 155 | * the same timings, however, anything smaller than 1024x768 | 155 | * the same timings, however, anything smaller than 1024x768 |
| 156 | * will only be displayed in the top left corner of a 1024x768 | 156 | * will only be displayed in the top left corner of a 1024x768 |
| 157 | * XGA output unless you add optional dip switches to the shield. | 157 | * XGA output unless you add optional dip switches to the shield. |
| 158 | * Therefore timings for other resolutions have been ommited here. | 158 | * Therefore timings for other resolutions have been omitted here. |
| 159 | */ | 159 | */ |
| 160 | [2] = { | 160 | [2] = { |
| 161 | _LCD_DECLARE( | 161 | _LCD_DECLARE( |
diff --git a/arch/arm/mach-s3c64xx/dma.c b/arch/arm/mach-s3c64xx/dma.c index c35585cf8c4f..b197171e7d03 100644 --- a/arch/arm/mach-s3c64xx/dma.c +++ b/arch/arm/mach-s3c64xx/dma.c | |||
| @@ -315,7 +315,7 @@ int s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op op) | |||
| 315 | case S3C2410_DMAOP_FLUSH: | 315 | case S3C2410_DMAOP_FLUSH: |
| 316 | return s3c64xx_dma_flush(chan); | 316 | return s3c64xx_dma_flush(chan); |
| 317 | 317 | ||
| 318 | /* belive PAUSE/RESUME are no-ops */ | 318 | /* believe PAUSE/RESUME are no-ops */ |
| 319 | case S3C2410_DMAOP_PAUSE: | 319 | case S3C2410_DMAOP_PAUSE: |
| 320 | case S3C2410_DMAOP_RESUME: | 320 | case S3C2410_DMAOP_RESUME: |
| 321 | case S3C2410_DMAOP_STARTED: | 321 | case S3C2410_DMAOP_STARTED: |
diff --git a/arch/arm/mach-s5pc100/include/mach/regs-fb.h b/arch/arm/mach-s5pc100/include/mach/regs-fb.h index 4be4cc9abf75..07aa4d6054fe 100644 --- a/arch/arm/mach-s5pc100/include/mach/regs-fb.h +++ b/arch/arm/mach-s5pc100/include/mach/regs-fb.h | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | #define WPALCON_H (0x19c) | 29 | #define WPALCON_H (0x19c) |
| 30 | #define WPALCON_L (0x1a0) | 30 | #define WPALCON_L (0x1a0) |
| 31 | 31 | ||
| 32 | /* Pallete contro for WPAL0 and WPAL1 is the same as in S3C64xx, but | 32 | /* Palette control for WPAL0 and WPAL1 is the same as in S3C64xx, but |
| 33 | * different for WPAL2-4 | 33 | * different for WPAL2-4 |
| 34 | */ | 34 | */ |
| 35 | /* In WPALCON_L (aka WPALCON) */ | 35 | /* In WPALCON_L (aka WPALCON) */ |
diff --git a/arch/arm/mach-s5pc100/setup-sdhci.c b/arch/arm/mach-s5pc100/setup-sdhci.c index f16946e456e9..be25879bb2ee 100644 --- a/arch/arm/mach-s5pc100/setup-sdhci.c +++ b/arch/arm/mach-s5pc100/setup-sdhci.c | |||
| @@ -40,7 +40,7 @@ void s5pc100_setup_sdhci0_cfg_card(struct platform_device *dev, | |||
| 40 | { | 40 | { |
| 41 | u32 ctrl2, ctrl3; | 41 | u32 ctrl2, ctrl3; |
| 42 | 42 | ||
| 43 | /* don't need to alter anything acording to card-type */ | 43 | /* don't need to alter anything according to card-type */ |
| 44 | 44 | ||
| 45 | writel(S3C64XX_SDHCI_CONTROL4_DRIVE_9mA, r + S3C64XX_SDHCI_CONTROL4); | 45 | writel(S3C64XX_SDHCI_CONTROL4_DRIVE_9mA, r + S3C64XX_SDHCI_CONTROL4); |
| 46 | 46 | ||
diff --git a/arch/arm/mach-s5pv210/include/mach/gpio.h b/arch/arm/mach-s5pv210/include/mach/gpio.h index 1f4b595534c2..a5a1e331f8ed 100644 --- a/arch/arm/mach-s5pv210/include/mach/gpio.h +++ b/arch/arm/mach-s5pv210/include/mach/gpio.h | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | #define gpio_cansleep __gpio_cansleep | 18 | #define gpio_cansleep __gpio_cansleep |
| 19 | #define gpio_to_irq __gpio_to_irq | 19 | #define gpio_to_irq __gpio_to_irq |
| 20 | 20 | ||
| 21 | /* Practically, GPIO banks upto MP03 are the configurable gpio banks */ | 21 | /* Practically, GPIO banks up to MP03 are the configurable gpio banks */ |
| 22 | 22 | ||
| 23 | /* GPIO bank sizes */ | 23 | /* GPIO bank sizes */ |
| 24 | #define S5PV210_GPIO_A0_NR (8) | 24 | #define S5PV210_GPIO_A0_NR (8) |
diff --git a/arch/arm/mach-s5pv210/setup-sdhci-gpio.c b/arch/arm/mach-s5pv210/setup-sdhci-gpio.c index 746777d56df9..3e3ac05bb7b1 100644 --- a/arch/arm/mach-s5pv210/setup-sdhci-gpio.c +++ b/arch/arm/mach-s5pv210/setup-sdhci-gpio.c | |||
| @@ -32,10 +32,10 @@ void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) | |||
| 32 | 32 | ||
| 33 | switch (width) { | 33 | switch (width) { |
| 34 | case 8: | 34 | case 8: |
| 35 | /* GPG1[3:6] special-funtion 3 */ | 35 | /* GPG1[3:6] special-function 3 */ |
| 36 | s3c_gpio_cfgrange_nopull(S5PV210_GPG1(3), 4, S3C_GPIO_SFN(3)); | 36 | s3c_gpio_cfgrange_nopull(S5PV210_GPG1(3), 4, S3C_GPIO_SFN(3)); |
| 37 | case 4: | 37 | case 4: |
| 38 | /* GPG0[3:6] special-funtion 2 */ | 38 | /* GPG0[3:6] special-function 2 */ |
| 39 | s3c_gpio_cfgrange_nopull(S5PV210_GPG0(3), 4, S3C_GPIO_SFN(2)); | 39 | s3c_gpio_cfgrange_nopull(S5PV210_GPG0(3), 4, S3C_GPIO_SFN(2)); |
| 40 | default: | 40 | default: |
| 41 | break; | 41 | break; |
diff --git a/arch/arm/mach-s5pv210/setup-sdhci.c b/arch/arm/mach-s5pv210/setup-sdhci.c index c32e202731c1..a83b6c909f6b 100644 --- a/arch/arm/mach-s5pv210/setup-sdhci.c +++ b/arch/arm/mach-s5pv210/setup-sdhci.c | |||
| @@ -38,7 +38,7 @@ void s5pv210_setup_sdhci_cfg_card(struct platform_device *dev, | |||
| 38 | { | 38 | { |
| 39 | u32 ctrl2, ctrl3; | 39 | u32 ctrl2, ctrl3; |
| 40 | 40 | ||
| 41 | /* don't need to alter anything acording to card-type */ | 41 | /* don't need to alter anything according to card-type */ |
| 42 | 42 | ||
| 43 | writel(S3C64XX_SDHCI_CONTROL4_DRIVE_9mA, r + S3C64XX_SDHCI_CONTROL4); | 43 | writel(S3C64XX_SDHCI_CONTROL4_DRIVE_9mA, r + S3C64XX_SDHCI_CONTROL4); |
| 44 | 44 | ||
diff --git a/arch/arm/mach-sa1100/Makefile b/arch/arm/mach-sa1100/Makefile index e697691eed28..41252d22e659 100644 --- a/arch/arm/mach-sa1100/Makefile +++ b/arch/arm/mach-sa1100/Makefile | |||
| @@ -50,7 +50,7 @@ led-$(CONFIG_SA1100_SIMPAD) += leds-simpad.o | |||
| 50 | # LEDs support | 50 | # LEDs support |
| 51 | obj-$(CONFIG_LEDS) += $(led-y) | 51 | obj-$(CONFIG_LEDS) += $(led-y) |
| 52 | 52 | ||
| 53 | # Miscelaneous functions | 53 | # Miscellaneous functions |
| 54 | obj-$(CONFIG_PM) += pm.o sleep.o | 54 | obj-$(CONFIG_PM) += pm.o sleep.o |
| 55 | obj-$(CONFIG_SA1100_SSP) += ssp.o | 55 | obj-$(CONFIG_SA1100_SSP) += ssp.o |
| 56 | 56 | ||
diff --git a/arch/arm/mach-sa1100/cpu-sa1100.c b/arch/arm/mach-sa1100/cpu-sa1100.c index 07d4e8ba3719..aaa8acf76b7b 100644 --- a/arch/arm/mach-sa1100/cpu-sa1100.c +++ b/arch/arm/mach-sa1100/cpu-sa1100.c | |||
| @@ -68,7 +68,7 @@ | |||
| 68 | * clock change in ROM and jump to that code from the kernel. The main | 68 | * clock change in ROM and jump to that code from the kernel. The main |
| 69 | * disadvantage is that the ROM has to be modified, which is not | 69 | * disadvantage is that the ROM has to be modified, which is not |
| 70 | * possible on all SA-1100 platforms. Another disadvantage is that | 70 | * possible on all SA-1100 platforms. Another disadvantage is that |
| 71 | * jumping to ROM makes clock switching unecessary complicated. | 71 | * jumping to ROM makes clock switching unnecessary complicated. |
| 72 | * | 72 | * |
| 73 | * The idea behind this driver is that the memory configuration can be | 73 | * The idea behind this driver is that the memory configuration can be |
| 74 | * changed while running from DRAM (even with interrupts turned on!) | 74 | * changed while running from DRAM (even with interrupts turned on!) |
diff --git a/arch/arm/mach-sa1100/include/mach/SA-1100.h b/arch/arm/mach-sa1100/include/mach/SA-1100.h index 4f7ea012e1e5..bae8296f5dbf 100644 --- a/arch/arm/mach-sa1100/include/mach/SA-1100.h +++ b/arch/arm/mach-sa1100/include/mach/SA-1100.h | |||
| @@ -1794,7 +1794,7 @@ | |||
| 1794 | (DDAR_DevRd + DDAR_Brst4 + DDAR_16BitDev + \ | 1794 | (DDAR_DevRd + DDAR_Brst4 + DDAR_16BitDev + \ |
| 1795 | DDAR_Ser4SSPRc + DDAR_DevAdd (__PREG(Ser4SSDR))) | 1795 | DDAR_Ser4SSPRc + DDAR_DevAdd (__PREG(Ser4SSDR))) |
| 1796 | 1796 | ||
| 1797 | #define DCSR_RUN 0x00000001 /* DMA RUNing */ | 1797 | #define DCSR_RUN 0x00000001 /* DMA running */ |
| 1798 | #define DCSR_IE 0x00000002 /* DMA Interrupt Enable */ | 1798 | #define DCSR_IE 0x00000002 /* DMA Interrupt Enable */ |
| 1799 | #define DCSR_ERROR 0x00000004 /* DMA ERROR */ | 1799 | #define DCSR_ERROR 0x00000004 /* DMA ERROR */ |
| 1800 | #define DCSR_DONEA 0x00000008 /* DONE DMA transfer buffer A */ | 1800 | #define DCSR_DONEA 0x00000008 /* DONE DMA transfer buffer A */ |
diff --git a/arch/arm/mach-sa1100/jornada720_ssp.c b/arch/arm/mach-sa1100/jornada720_ssp.c index 9d490c66891c..f50b00bd18a0 100644 --- a/arch/arm/mach-sa1100/jornada720_ssp.c +++ b/arch/arm/mach-sa1100/jornada720_ssp.c | |||
| @@ -29,7 +29,7 @@ static unsigned long jornada_ssp_flags; | |||
| 29 | /** | 29 | /** |
| 30 | * jornada_ssp_reverse - reverses input byte | 30 | * jornada_ssp_reverse - reverses input byte |
| 31 | * | 31 | * |
| 32 | * we need to reverse all data we recieve from the mcu due to its physical location | 32 | * we need to reverse all data we receive from the mcu due to its physical location |
| 33 | * returns : 01110111 -> 11101110 | 33 | * returns : 01110111 -> 11101110 |
| 34 | */ | 34 | */ |
| 35 | u8 inline jornada_ssp_reverse(u8 byte) | 35 | u8 inline jornada_ssp_reverse(u8 byte) |
| @@ -179,7 +179,7 @@ static int __devinit jornada_ssp_probe(struct platform_device *dev) | |||
| 179 | 179 | ||
| 180 | static int jornada_ssp_remove(struct platform_device *dev) | 180 | static int jornada_ssp_remove(struct platform_device *dev) |
| 181 | { | 181 | { |
| 182 | /* Note that this doesnt actually remove the driver, since theres nothing to remove | 182 | /* Note that this doesn't actually remove the driver, since theres nothing to remove |
| 183 | * It just makes sure everything is turned off */ | 183 | * It just makes sure everything is turned off */ |
| 184 | GPSR = GPIO_GPIO25; | 184 | GPSR = GPIO_GPIO25; |
| 185 | ssp_exit(); | 185 | ssp_exit(); |
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 783b66fa95fb..1e35fa976d64 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
| @@ -947,7 +947,7 @@ static struct platform_device *ap4evb_devices[] __initdata = { | |||
| 947 | &ap4evb_camera, | 947 | &ap4evb_camera, |
| 948 | }; | 948 | }; |
| 949 | 949 | ||
| 950 | static int __init hdmi_init_pm_clock(void) | 950 | static void __init hdmi_init_pm_clock(void) |
| 951 | { | 951 | { |
| 952 | struct clk *hdmi_ick = clk_get(&hdmi_device.dev, "ick"); | 952 | struct clk *hdmi_ick = clk_get(&hdmi_device.dev, "ick"); |
| 953 | int ret; | 953 | int ret; |
| @@ -988,20 +988,15 @@ static int __init hdmi_init_pm_clock(void) | |||
| 988 | pr_debug("PLLC2 set frequency %lu\n", rate); | 988 | pr_debug("PLLC2 set frequency %lu\n", rate); |
| 989 | 989 | ||
| 990 | ret = clk_set_parent(hdmi_ick, &sh7372_pllc2_clk); | 990 | ret = clk_set_parent(hdmi_ick, &sh7372_pllc2_clk); |
| 991 | if (ret < 0) { | 991 | if (ret < 0) |
| 992 | pr_err("Cannot set HDMI parent: %d\n", ret); | 992 | pr_err("Cannot set HDMI parent: %d\n", ret); |
| 993 | goto out; | ||
| 994 | } | ||
| 995 | 993 | ||
| 996 | out: | 994 | out: |
| 997 | if (!IS_ERR(hdmi_ick)) | 995 | if (!IS_ERR(hdmi_ick)) |
| 998 | clk_put(hdmi_ick); | 996 | clk_put(hdmi_ick); |
| 999 | return ret; | ||
| 1000 | } | 997 | } |
| 1001 | 998 | ||
| 1002 | device_initcall(hdmi_init_pm_clock); | 999 | static void __init fsi_init_pm_clock(void) |
| 1003 | |||
| 1004 | static int __init fsi_init_pm_clock(void) | ||
| 1005 | { | 1000 | { |
| 1006 | struct clk *fsia_ick; | 1001 | struct clk *fsia_ick; |
| 1007 | int ret; | 1002 | int ret; |
| @@ -1010,7 +1005,7 @@ static int __init fsi_init_pm_clock(void) | |||
| 1010 | if (IS_ERR(fsia_ick)) { | 1005 | if (IS_ERR(fsia_ick)) { |
| 1011 | ret = PTR_ERR(fsia_ick); | 1006 | ret = PTR_ERR(fsia_ick); |
| 1012 | pr_err("Cannot get FSI ICK: %d\n", ret); | 1007 | pr_err("Cannot get FSI ICK: %d\n", ret); |
| 1013 | return ret; | 1008 | return; |
| 1014 | } | 1009 | } |
| 1015 | 1010 | ||
| 1016 | ret = clk_set_parent(fsia_ick, &sh7372_fsiack_clk); | 1011 | ret = clk_set_parent(fsia_ick, &sh7372_fsiack_clk); |
| @@ -1018,10 +1013,7 @@ static int __init fsi_init_pm_clock(void) | |||
| 1018 | pr_err("Cannot set FSI-A parent: %d\n", ret); | 1013 | pr_err("Cannot set FSI-A parent: %d\n", ret); |
| 1019 | 1014 | ||
| 1020 | clk_put(fsia_ick); | 1015 | clk_put(fsia_ick); |
| 1021 | |||
| 1022 | return ret; | ||
| 1023 | } | 1016 | } |
| 1024 | device_initcall(fsi_init_pm_clock); | ||
| 1025 | 1017 | ||
| 1026 | /* | 1018 | /* |
| 1027 | * FIXME !! | 1019 | * FIXME !! |
| @@ -1348,6 +1340,9 @@ static void __init ap4evb_init(void) | |||
| 1348 | __raw_writel(srcr4 & ~(1 << 13), SRCR4); | 1340 | __raw_writel(srcr4 & ~(1 << 13), SRCR4); |
| 1349 | 1341 | ||
| 1350 | platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices)); | 1342 | platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices)); |
| 1343 | |||
| 1344 | hdmi_init_pm_clock(); | ||
| 1345 | fsi_init_pm_clock(); | ||
| 1351 | } | 1346 | } |
| 1352 | 1347 | ||
| 1353 | static void __init ap4evb_timer_init(void) | 1348 | static void __init ap4evb_timer_init(void) |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 8184d4d4f234..7da2ca24229d 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
| @@ -423,7 +423,7 @@ static struct platform_device fsi_hdmi_device = { | |||
| 423 | .name = "sh_fsi2_b_hdmi", | 423 | .name = "sh_fsi2_b_hdmi", |
| 424 | }; | 424 | }; |
| 425 | 425 | ||
| 426 | static int __init hdmi_init_pm_clock(void) | 426 | static void __init hdmi_init_pm_clock(void) |
| 427 | { | 427 | { |
| 428 | struct clk *hdmi_ick = clk_get(&hdmi_device.dev, "ick"); | 428 | struct clk *hdmi_ick = clk_get(&hdmi_device.dev, "ick"); |
| 429 | int ret; | 429 | int ret; |
| @@ -467,17 +467,13 @@ static int __init hdmi_init_pm_clock(void) | |||
| 467 | pr_debug("PLLC2 set frequency %lu\n", rate); | 467 | pr_debug("PLLC2 set frequency %lu\n", rate); |
| 468 | 468 | ||
| 469 | ret = clk_set_parent(hdmi_ick, &sh7372_pllc2_clk); | 469 | ret = clk_set_parent(hdmi_ick, &sh7372_pllc2_clk); |
| 470 | if (ret < 0) { | 470 | if (ret < 0) |
| 471 | pr_err("Cannot set HDMI parent: %d\n", ret); | 471 | pr_err("Cannot set HDMI parent: %d\n", ret); |
| 472 | goto out; | ||
| 473 | } | ||
| 474 | 472 | ||
| 475 | out: | 473 | out: |
| 476 | if (!IS_ERR(hdmi_ick)) | 474 | if (!IS_ERR(hdmi_ick)) |
| 477 | clk_put(hdmi_ick); | 475 | clk_put(hdmi_ick); |
| 478 | return ret; | ||
| 479 | } | 476 | } |
| 480 | device_initcall(hdmi_init_pm_clock); | ||
| 481 | 477 | ||
| 482 | /* USB1 (Host) */ | 478 | /* USB1 (Host) */ |
| 483 | static void usb1_host_port_power(int port, int power) | 479 | static void usb1_host_port_power(int port, int power) |
| @@ -1218,6 +1214,8 @@ static void __init mackerel_init(void) | |||
| 1218 | sh7372_add_standard_devices(); | 1214 | sh7372_add_standard_devices(); |
| 1219 | 1215 | ||
| 1220 | platform_add_devices(mackerel_devices, ARRAY_SIZE(mackerel_devices)); | 1216 | platform_add_devices(mackerel_devices, ARRAY_SIZE(mackerel_devices)); |
| 1217 | |||
| 1218 | hdmi_init_pm_clock(); | ||
| 1221 | } | 1219 | } |
| 1222 | 1220 | ||
| 1223 | static void __init mackerel_timer_init(void) | 1221 | static void __init mackerel_timer_init(void) |
diff --git a/arch/arm/mach-shmobile/include/mach/mmc.h b/arch/arm/mach-shmobile/include/mach/mmc.h index e11560a525a1..21a59db638bb 100644 --- a/arch/arm/mach-shmobile/include/mach/mmc.h +++ b/arch/arm/mach-shmobile/include/mach/mmc.h | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | #ifdef CONFIG_MACH_AP4EVB | 10 | #ifdef CONFIG_MACH_AP4EVB |
| 11 | #include "mach/mmc-ap4eb.h" | 11 | #include "mach/mmc-ap4eb.h" |
| 12 | #elif CONFIG_MACH_MACKEREL | 12 | #elif defined(CONFIG_MACH_MACKEREL) |
| 13 | #include "mach/mmc-mackerel.h" | 13 | #include "mach/mmc-mackerel.h" |
| 14 | #else | 14 | #else |
| 15 | #error "unsupported board." | 15 | #error "unsupported board." |
diff --git a/arch/arm/mach-shmobile/include/mach/zboot.h b/arch/arm/mach-shmobile/include/mach/zboot.h index 6d6a205bcf90..9320aff0a20f 100644 --- a/arch/arm/mach-shmobile/include/mach/zboot.h +++ b/arch/arm/mach-shmobile/include/mach/zboot.h | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | #ifdef CONFIG_MACH_AP4EVB | 13 | #ifdef CONFIG_MACH_AP4EVB |
| 14 | #define MACH_TYPE MACH_TYPE_AP4EVB | 14 | #define MACH_TYPE MACH_TYPE_AP4EVB |
| 15 | #include "mach/head-ap4evb.txt" | 15 | #include "mach/head-ap4evb.txt" |
| 16 | #elif CONFIG_MACH_MACKEREL | 16 | #elif defined(CONFIG_MACH_MACKEREL) |
| 17 | #define MACH_TYPE MACH_TYPE_MACKEREL | 17 | #define MACH_TYPE MACH_TYPE_MACKEREL |
| 18 | #include "mach/head-mackerel.txt" | 18 | #include "mach/head-mackerel.txt" |
| 19 | #else | 19 | #else |
diff --git a/arch/arm/mach-tegra/dma.c b/arch/arm/mach-tegra/dma.c index e945ae28ee77..f4ef5eb317bd 100644 --- a/arch/arm/mach-tegra/dma.c +++ b/arch/arm/mach-tegra/dma.c | |||
| @@ -223,7 +223,7 @@ int tegra_dma_dequeue_req(struct tegra_dma_channel *ch, | |||
| 223 | * - Change the source selector to invalid to stop the DMA from | 223 | * - Change the source selector to invalid to stop the DMA from |
| 224 | * FIFO to memory. | 224 | * FIFO to memory. |
| 225 | * - Read the status register to know the number of pending | 225 | * - Read the status register to know the number of pending |
| 226 | * bytes to be transfered. | 226 | * bytes to be transferred. |
| 227 | * - Finally stop or program the DMA to the next buffer in the | 227 | * - Finally stop or program the DMA to the next buffer in the |
| 228 | * list. | 228 | * list. |
| 229 | */ | 229 | */ |
| @@ -244,7 +244,7 @@ int tegra_dma_dequeue_req(struct tegra_dma_channel *ch, | |||
| 244 | if (status & STA_BUSY) | 244 | if (status & STA_BUSY) |
| 245 | req->bytes_transferred -= to_transfer; | 245 | req->bytes_transferred -= to_transfer; |
| 246 | 246 | ||
| 247 | /* In continous transfer mode, DMA only tracks the count of the | 247 | /* In continuous transfer mode, DMA only tracks the count of the |
| 248 | * half DMA buffer. So, if the DMA already finished half the DMA | 248 | * half DMA buffer. So, if the DMA already finished half the DMA |
| 249 | * then add the half buffer to the completed count. | 249 | * then add the half buffer to the completed count. |
| 250 | * | 250 | * |
diff --git a/arch/arm/mach-tegra/gpio.c b/arch/arm/mach-tegra/gpio.c index 76a3f654220f..65a1aba6823d 100644 --- a/arch/arm/mach-tegra/gpio.c +++ b/arch/arm/mach-tegra/gpio.c | |||
| @@ -257,7 +257,8 @@ static void tegra_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
| 257 | void tegra_gpio_resume(void) | 257 | void tegra_gpio_resume(void) |
| 258 | { | 258 | { |
| 259 | unsigned long flags; | 259 | unsigned long flags; |
| 260 | int b, p, i; | 260 | int b; |
| 261 | int p; | ||
| 261 | 262 | ||
| 262 | local_irq_save(flags); | 263 | local_irq_save(flags); |
| 263 | 264 | ||
| @@ -280,7 +281,8 @@ void tegra_gpio_resume(void) | |||
| 280 | void tegra_gpio_suspend(void) | 281 | void tegra_gpio_suspend(void) |
| 281 | { | 282 | { |
| 282 | unsigned long flags; | 283 | unsigned long flags; |
| 283 | int b, p, i; | 284 | int b; |
| 285 | int p; | ||
| 284 | 286 | ||
| 285 | local_irq_save(flags); | 287 | local_irq_save(flags); |
| 286 | for (b = 0; b < ARRAY_SIZE(tegra_gpio_banks); b++) { | 288 | for (b = 0; b < ARRAY_SIZE(tegra_gpio_banks); b++) { |
diff --git a/arch/arm/mach-tegra/include/mach/dma.h b/arch/arm/mach-tegra/include/mach/dma.h index 39011bd9a925..d0132e8031a1 100644 --- a/arch/arm/mach-tegra/include/mach/dma.h +++ b/arch/arm/mach-tegra/include/mach/dma.h | |||
| @@ -92,11 +92,11 @@ struct tegra_dma_req { | |||
| 92 | /* This is a called from the DMA ISR context when the DMA is still in | 92 | /* This is a called from the DMA ISR context when the DMA is still in |
| 93 | * progress and is actively filling same buffer. | 93 | * progress and is actively filling same buffer. |
| 94 | * | 94 | * |
| 95 | * In case of continous mode receive, this threshold is 1/2 the buffer | 95 | * In case of continuous mode receive, this threshold is 1/2 the buffer |
| 96 | * size. In other cases, this will not even be called as there is no | 96 | * size. In other cases, this will not even be called as there is no |
| 97 | * hardware support for it. | 97 | * hardware support for it. |
| 98 | * | 98 | * |
| 99 | * In the case of continous mode receive, if there is next req already | 99 | * In the case of continuous mode receive, if there is next req already |
| 100 | * queued, DMA programs the HW to use that req when this req is | 100 | * queued, DMA programs the HW to use that req when this req is |
| 101 | * completed. If there is no "next req" queued, then DMA ISR doesn't do | 101 | * completed. If there is no "next req" queued, then DMA ISR doesn't do |
| 102 | * anything before calling this callback. | 102 | * anything before calling this callback. |
diff --git a/arch/arm/mach-tegra/tegra2_clocks.c b/arch/arm/mach-tegra/tegra2_clocks.c index 6d7c4eea4dcb..4459470c052d 100644 --- a/arch/arm/mach-tegra/tegra2_clocks.c +++ b/arch/arm/mach-tegra/tegra2_clocks.c | |||
| @@ -1362,14 +1362,15 @@ static int tegra_clk_shared_bus_set_rate(struct clk *c, unsigned long rate) | |||
| 1362 | { | 1362 | { |
| 1363 | unsigned long flags; | 1363 | unsigned long flags; |
| 1364 | int ret; | 1364 | int ret; |
| 1365 | long new_rate = rate; | ||
| 1365 | 1366 | ||
| 1366 | rate = clk_round_rate(c->parent, rate); | 1367 | new_rate = clk_round_rate(c->parent, new_rate); |
| 1367 | if (rate < 0) | 1368 | if (new_rate < 0) |
| 1368 | return rate; | 1369 | return new_rate; |
| 1369 | 1370 | ||
| 1370 | spin_lock_irqsave(&c->parent->spinlock, flags); | 1371 | spin_lock_irqsave(&c->parent->spinlock, flags); |
| 1371 | 1372 | ||
| 1372 | c->u.shared_bus_user.rate = rate; | 1373 | c->u.shared_bus_user.rate = new_rate; |
| 1373 | ret = tegra_clk_shared_bus_update(c->parent); | 1374 | ret = tegra_clk_shared_bus_update(c->parent); |
| 1374 | 1375 | ||
| 1375 | spin_unlock_irqrestore(&c->parent->spinlock, flags); | 1376 | spin_unlock_irqrestore(&c->parent->spinlock, flags); |
diff --git a/arch/arm/mach-u300/clock.c b/arch/arm/mach-u300/clock.c index fabcc49abe80..5535dd0a78c9 100644 --- a/arch/arm/mach-u300/clock.c +++ b/arch/arm/mach-u300/clock.c | |||
| @@ -263,7 +263,7 @@ static void disable_i2s0_vcxo(void) | |||
| 263 | val = readw(U300_SYSCON_VBASE + U300_SYSCON_CCR); | 263 | val = readw(U300_SYSCON_VBASE + U300_SYSCON_CCR); |
| 264 | val &= ~U300_SYSCON_CCR_I2S0_USE_VCXO; | 264 | val &= ~U300_SYSCON_CCR_I2S0_USE_VCXO; |
| 265 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_CCR); | 265 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_CCR); |
| 266 | /* Deactivate VCXO if noone else is using VCXO */ | 266 | /* Deactivate VCXO if no one else is using VCXO */ |
| 267 | if (!(val & U300_SYSCON_CCR_I2S1_USE_VCXO)) | 267 | if (!(val & U300_SYSCON_CCR_I2S1_USE_VCXO)) |
| 268 | val &= ~U300_SYSCON_CCR_TURN_VCXO_ON; | 268 | val &= ~U300_SYSCON_CCR_TURN_VCXO_ON; |
| 269 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_CCR); | 269 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_CCR); |
| @@ -283,7 +283,7 @@ static void disable_i2s1_vcxo(void) | |||
| 283 | val = readw(U300_SYSCON_VBASE + U300_SYSCON_CCR); | 283 | val = readw(U300_SYSCON_VBASE + U300_SYSCON_CCR); |
| 284 | val &= ~U300_SYSCON_CCR_I2S1_USE_VCXO; | 284 | val &= ~U300_SYSCON_CCR_I2S1_USE_VCXO; |
| 285 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_CCR); | 285 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_CCR); |
| 286 | /* Deactivate VCXO if noone else is using VCXO */ | 286 | /* Deactivate VCXO if no one else is using VCXO */ |
| 287 | if (!(val & U300_SYSCON_CCR_I2S0_USE_VCXO)) | 287 | if (!(val & U300_SYSCON_CCR_I2S0_USE_VCXO)) |
| 288 | val &= ~U300_SYSCON_CCR_TURN_VCXO_ON; | 288 | val &= ~U300_SYSCON_CCR_TURN_VCXO_ON; |
| 289 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_CCR); | 289 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_CCR); |
| @@ -649,7 +649,7 @@ static unsigned long clk_round_rate_cpuclk(struct clk *clk, unsigned long rate) | |||
| 649 | */ | 649 | */ |
| 650 | long clk_round_rate(struct clk *clk, unsigned long rate) | 650 | long clk_round_rate(struct clk *clk, unsigned long rate) |
| 651 | { | 651 | { |
| 652 | /* TODO: get apropriate switches for EMIFCLK, AHBCLK and MCLK */ | 652 | /* TODO: get appropriate switches for EMIFCLK, AHBCLK and MCLK */ |
| 653 | /* Else default to fixed value */ | 653 | /* Else default to fixed value */ |
| 654 | 654 | ||
| 655 | if (clk->round_rate) { | 655 | if (clk->round_rate) { |
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index dc8746d7826e..af913741e6ec 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
| @@ -52,7 +52,7 @@ static struct ab8500_gpio_platform_data ab8500_gpio_pdata = { | |||
| 52 | * on value present in GpioSel1 to GpioSel6 and AlternatFunction | 52 | * on value present in GpioSel1 to GpioSel6 and AlternatFunction |
| 53 | * register. This is the array of 7 configuration settings. | 53 | * register. This is the array of 7 configuration settings. |
| 54 | * One has to compile time decide these settings. Below is the | 54 | * One has to compile time decide these settings. Below is the |
| 55 | * explaination of these setting | 55 | * explanation of these setting |
| 56 | * GpioSel1 = 0x00 => Pins GPIO1 to GPIO8 are not used as GPIO | 56 | * GpioSel1 = 0x00 => Pins GPIO1 to GPIO8 are not used as GPIO |
| 57 | * GpioSel2 = 0x1E => Pins GPIO10 to GPIO13 are configured as GPIO | 57 | * GpioSel2 = 0x1E => Pins GPIO10 to GPIO13 are configured as GPIO |
| 58 | * GpioSel3 = 0x80 => Pin GPIO24 is configured as GPIO | 58 | * GpioSel3 = 0x80 => Pin GPIO24 is configured as GPIO |
diff --git a/arch/arm/mach-ux500/include/mach/db8500-regs.h b/arch/arm/mach-ux500/include/mach/db8500-regs.h index 0fefb34c11e4..16647b255378 100644 --- a/arch/arm/mach-ux500/include/mach/db8500-regs.h +++ b/arch/arm/mach-ux500/include/mach/db8500-regs.h | |||
| @@ -58,7 +58,7 @@ | |||
| 58 | #define U8500_GPIO2_BASE (U8500_PER2_BASE + 0xE000) | 58 | #define U8500_GPIO2_BASE (U8500_PER2_BASE + 0xE000) |
| 59 | #define U8500_GPIO3_BASE (U8500_PER5_BASE + 0x1E000) | 59 | #define U8500_GPIO3_BASE (U8500_PER5_BASE + 0x1E000) |
| 60 | 60 | ||
| 61 | /* per7 base addressess */ | 61 | /* per7 base addresses */ |
| 62 | #define U8500_CR_BASE_ED (U8500_PER7_BASE_ED + 0x8000) | 62 | #define U8500_CR_BASE_ED (U8500_PER7_BASE_ED + 0x8000) |
| 63 | #define U8500_MTU0_BASE_ED (U8500_PER7_BASE_ED + 0xa000) | 63 | #define U8500_MTU0_BASE_ED (U8500_PER7_BASE_ED + 0xa000) |
| 64 | #define U8500_MTU1_BASE_ED (U8500_PER7_BASE_ED + 0xb000) | 64 | #define U8500_MTU1_BASE_ED (U8500_PER7_BASE_ED + 0xb000) |
| @@ -68,7 +68,7 @@ | |||
| 68 | #define U8500_UART0_BASE (U8500_PER1_BASE + 0x0000) | 68 | #define U8500_UART0_BASE (U8500_PER1_BASE + 0x0000) |
| 69 | #define U8500_UART1_BASE (U8500_PER1_BASE + 0x1000) | 69 | #define U8500_UART1_BASE (U8500_PER1_BASE + 0x1000) |
| 70 | 70 | ||
| 71 | /* per6 base addressess */ | 71 | /* per6 base addresses */ |
| 72 | #define U8500_RNG_BASE (U8500_PER6_BASE + 0x0000) | 72 | #define U8500_RNG_BASE (U8500_PER6_BASE + 0x0000) |
| 73 | #define U8500_PKA_BASE (U8500_PER6_BASE + 0x1000) | 73 | #define U8500_PKA_BASE (U8500_PER6_BASE + 0x1000) |
| 74 | #define U8500_PKAM_BASE (U8500_PER6_BASE + 0x2000) | 74 | #define U8500_PKAM_BASE (U8500_PER6_BASE + 0x2000) |
| @@ -79,11 +79,11 @@ | |||
| 79 | #define U8500_CRYPTO1_BASE (U8500_PER6_BASE + 0xb000) | 79 | #define U8500_CRYPTO1_BASE (U8500_PER6_BASE + 0xb000) |
| 80 | #define U8500_CLKRST6_BASE (U8500_PER6_BASE + 0xf000) | 80 | #define U8500_CLKRST6_BASE (U8500_PER6_BASE + 0xf000) |
| 81 | 81 | ||
| 82 | /* per5 base addressess */ | 82 | /* per5 base addresses */ |
| 83 | #define U8500_USBOTG_BASE (U8500_PER5_BASE + 0x00000) | 83 | #define U8500_USBOTG_BASE (U8500_PER5_BASE + 0x00000) |
| 84 | #define U8500_CLKRST5_BASE (U8500_PER5_BASE + 0x1f000) | 84 | #define U8500_CLKRST5_BASE (U8500_PER5_BASE + 0x1f000) |
| 85 | 85 | ||
| 86 | /* per4 base addressess */ | 86 | /* per4 base addresses */ |
| 87 | #define U8500_BACKUPRAM0_BASE (U8500_PER4_BASE + 0x00000) | 87 | #define U8500_BACKUPRAM0_BASE (U8500_PER4_BASE + 0x00000) |
| 88 | #define U8500_BACKUPRAM1_BASE (U8500_PER4_BASE + 0x01000) | 88 | #define U8500_BACKUPRAM1_BASE (U8500_PER4_BASE + 0x01000) |
| 89 | #define U8500_RTT0_BASE (U8500_PER4_BASE + 0x02000) | 89 | #define U8500_RTT0_BASE (U8500_PER4_BASE + 0x02000) |
| @@ -106,7 +106,7 @@ | |||
| 106 | #define U8500_SDI5_BASE (U8500_PER3_BASE + 0x8000) | 106 | #define U8500_SDI5_BASE (U8500_PER3_BASE + 0x8000) |
| 107 | #define U8500_CLKRST3_BASE (U8500_PER3_BASE + 0xf000) | 107 | #define U8500_CLKRST3_BASE (U8500_PER3_BASE + 0xf000) |
| 108 | 108 | ||
| 109 | /* per2 base addressess */ | 109 | /* per2 base addresses */ |
| 110 | #define U8500_I2C3_BASE (U8500_PER2_BASE + 0x0000) | 110 | #define U8500_I2C3_BASE (U8500_PER2_BASE + 0x0000) |
| 111 | #define U8500_SPI2_BASE (U8500_PER2_BASE + 0x1000) | 111 | #define U8500_SPI2_BASE (U8500_PER2_BASE + 0x1000) |
| 112 | #define U8500_SPI1_BASE (U8500_PER2_BASE + 0x2000) | 112 | #define U8500_SPI1_BASE (U8500_PER2_BASE + 0x2000) |
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 96e59e3ee4f5..eb7ffa0ee8b5 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
| @@ -314,7 +314,7 @@ static struct mmci_platform_data mmc0_plat_data = { | |||
| 314 | .gpio_cd = -1, | 314 | .gpio_cd = -1, |
| 315 | }; | 315 | }; |
| 316 | 316 | ||
| 317 | static struct resource chalcd_resources[] = { | 317 | static struct resource char_lcd_resources[] = { |
| 318 | { | 318 | { |
| 319 | .start = VERSATILE_CHAR_LCD_BASE, | 319 | .start = VERSATILE_CHAR_LCD_BASE, |
| 320 | .end = (VERSATILE_CHAR_LCD_BASE + SZ_4K - 1), | 320 | .end = (VERSATILE_CHAR_LCD_BASE + SZ_4K - 1), |
diff --git a/arch/arm/mm/cache-v4wb.S b/arch/arm/mm/cache-v4wb.S index d3644db467b7..f40c69656d8d 100644 --- a/arch/arm/mm/cache-v4wb.S +++ b/arch/arm/mm/cache-v4wb.S | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | /* | 32 | /* |
| 33 | * This is the size at which it becomes more efficient to | 33 | * This is the size at which it becomes more efficient to |
| 34 | * clean the whole cache, rather than using the individual | 34 | * clean the whole cache, rather than using the individual |
| 35 | * cache line maintainence instructions. | 35 | * cache line maintenance instructions. |
| 36 | * | 36 | * |
| 37 | * Size Clean (ticks) Dirty (ticks) | 37 | * Size Clean (ticks) Dirty (ticks) |
| 38 | * 4096 21 20 21 53 55 54 | 38 | * 4096 21 20 21 53 55 54 |
diff --git a/arch/arm/mm/cache-v4wt.S b/arch/arm/mm/cache-v4wt.S index 49c2b66cf3dd..a7b276dbda11 100644 --- a/arch/arm/mm/cache-v4wt.S +++ b/arch/arm/mm/cache-v4wt.S | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | /* | 34 | /* |
| 35 | * This is the size at which it becomes more efficient to | 35 | * This is the size at which it becomes more efficient to |
| 36 | * clean the whole cache, rather than using the individual | 36 | * clean the whole cache, rather than using the individual |
| 37 | * cache line maintainence instructions. | 37 | * cache line maintenance instructions. |
| 38 | * | 38 | * |
| 39 | * *** This needs benchmarking | 39 | * *** This needs benchmarking |
| 40 | */ | 40 | */ |
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index 6136e68ce953..dc18d81ef8ce 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
| @@ -96,7 +96,7 @@ ENDPROC(v7_flush_dcache_all) | |||
| 96 | * Flush the entire cache system. | 96 | * Flush the entire cache system. |
| 97 | * The data cache flush is now achieved using atomic clean / invalidates | 97 | * The data cache flush is now achieved using atomic clean / invalidates |
| 98 | * working outwards from L1 cache. This is done using Set/Way based cache | 98 | * working outwards from L1 cache. This is done using Set/Way based cache |
| 99 | * maintainance instructions. | 99 | * maintenance instructions. |
| 100 | * The instruction cache can still be invalidated back to the point of | 100 | * The instruction cache can still be invalidated back to the point of |
| 101 | * unification in a single instruction. | 101 | * unification in a single instruction. |
| 102 | * | 102 | * |
diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c index afe209e1e1f8..74be05f3e03a 100644 --- a/arch/arm/mm/mmap.c +++ b/arch/arm/mm/mmap.c | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | #include <linux/shm.h> | 7 | #include <linux/shm.h> |
| 8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
| 9 | #include <linux/io.h> | 9 | #include <linux/io.h> |
| 10 | #include <linux/personality.h> | ||
| 10 | #include <linux/random.h> | 11 | #include <linux/random.h> |
| 11 | #include <asm/cputype.h> | 12 | #include <asm/cputype.h> |
| 12 | #include <asm/system.h> | 13 | #include <asm/system.h> |
| @@ -82,7 +83,8 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, | |||
| 82 | mm->cached_hole_size = 0; | 83 | mm->cached_hole_size = 0; |
| 83 | } | 84 | } |
| 84 | /* 8 bits of randomness in 20 address space bits */ | 85 | /* 8 bits of randomness in 20 address space bits */ |
| 85 | if (current->flags & PF_RANDOMIZE) | 86 | if ((current->flags & PF_RANDOMIZE) && |
| 87 | !(current->personality & ADDR_NO_RANDOMIZE)) | ||
| 86 | addr += (get_random_int() % (1 << 8)) << PAGE_SHIFT; | 88 | addr += (get_random_int() % (1 << 8)) << PAGE_SHIFT; |
| 87 | 89 | ||
| 88 | full_search: | 90 | full_search: |
diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S index 226e3d8351c2..6c4e7fd6c8af 100644 --- a/arch/arm/mm/proc-arm1020.S +++ b/arch/arm/mm/proc-arm1020.S | |||
| @@ -64,7 +64,7 @@ | |||
| 64 | /* | 64 | /* |
| 65 | * This is the size at which it becomes more efficient to | 65 | * This is the size at which it becomes more efficient to |
| 66 | * clean the whole cache, rather than using the individual | 66 | * clean the whole cache, rather than using the individual |
| 67 | * cache line maintainence instructions. | 67 | * cache line maintenance instructions. |
| 68 | */ | 68 | */ |
| 69 | #define CACHE_DLIMIT 32768 | 69 | #define CACHE_DLIMIT 32768 |
| 70 | 70 | ||
diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S index 86d9c2cf0bce..4ce947c19623 100644 --- a/arch/arm/mm/proc-arm1020e.S +++ b/arch/arm/mm/proc-arm1020e.S | |||
| @@ -64,7 +64,7 @@ | |||
| 64 | /* | 64 | /* |
| 65 | * This is the size at which it becomes more efficient to | 65 | * This is the size at which it becomes more efficient to |
| 66 | * clean the whole cache, rather than using the individual | 66 | * clean the whole cache, rather than using the individual |
| 67 | * cache line maintainence instructions. | 67 | * cache line maintenance instructions. |
| 68 | */ | 68 | */ |
| 69 | #define CACHE_DLIMIT 32768 | 69 | #define CACHE_DLIMIT 32768 |
| 70 | 70 | ||
diff --git a/arch/arm/mm/proc-arm1022.S b/arch/arm/mm/proc-arm1022.S index 83d3dd34f846..c8884c5413a2 100644 --- a/arch/arm/mm/proc-arm1022.S +++ b/arch/arm/mm/proc-arm1022.S | |||
| @@ -53,7 +53,7 @@ | |||
| 53 | /* | 53 | /* |
| 54 | * This is the size at which it becomes more efficient to | 54 | * This is the size at which it becomes more efficient to |
| 55 | * clean the whole cache, rather than using the individual | 55 | * clean the whole cache, rather than using the individual |
| 56 | * cache line maintainence instructions. | 56 | * cache line maintenance instructions. |
| 57 | */ | 57 | */ |
| 58 | #define CACHE_DLIMIT 32768 | 58 | #define CACHE_DLIMIT 32768 |
| 59 | 59 | ||
diff --git a/arch/arm/mm/proc-arm1026.S b/arch/arm/mm/proc-arm1026.S index 686043ee7281..413684660aad 100644 --- a/arch/arm/mm/proc-arm1026.S +++ b/arch/arm/mm/proc-arm1026.S | |||
| @@ -53,7 +53,7 @@ | |||
| 53 | /* | 53 | /* |
| 54 | * This is the size at which it becomes more efficient to | 54 | * This is the size at which it becomes more efficient to |
| 55 | * clean the whole cache, rather than using the individual | 55 | * clean the whole cache, rather than using the individual |
| 56 | * cache line maintainence instructions. | 56 | * cache line maintenance instructions. |
| 57 | */ | 57 | */ |
| 58 | #define CACHE_DLIMIT 32768 | 58 | #define CACHE_DLIMIT 32768 |
| 59 | 59 | ||
diff --git a/arch/arm/mm/proc-arm720.S b/arch/arm/mm/proc-arm720.S index 665266da143c..7a06e5964f59 100644 --- a/arch/arm/mm/proc-arm720.S +++ b/arch/arm/mm/proc-arm720.S | |||
| @@ -63,7 +63,7 @@ ENTRY(cpu_arm720_proc_fin) | |||
| 63 | /* | 63 | /* |
| 64 | * Function: arm720_proc_do_idle(void) | 64 | * Function: arm720_proc_do_idle(void) |
| 65 | * Params : r0 = unused | 65 | * Params : r0 = unused |
| 66 | * Purpose : put the processer in proper idle mode | 66 | * Purpose : put the processor in proper idle mode |
| 67 | */ | 67 | */ |
| 68 | ENTRY(cpu_arm720_do_idle) | 68 | ENTRY(cpu_arm720_do_idle) |
| 69 | mov pc, lr | 69 | mov pc, lr |
diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S index 219980ec8b6e..bf8a1d1cccb6 100644 --- a/arch/arm/mm/proc-arm920.S +++ b/arch/arm/mm/proc-arm920.S | |||
| @@ -53,7 +53,7 @@ | |||
| 53 | /* | 53 | /* |
| 54 | * This is the size at which it becomes more efficient to | 54 | * This is the size at which it becomes more efficient to |
| 55 | * clean the whole cache, rather than using the individual | 55 | * clean the whole cache, rather than using the individual |
| 56 | * cache line maintainence instructions. | 56 | * cache line maintenance instructions. |
| 57 | */ | 57 | */ |
| 58 | #define CACHE_DLIMIT 65536 | 58 | #define CACHE_DLIMIT 65536 |
| 59 | 59 | ||
| @@ -390,7 +390,7 @@ ENTRY(cpu_arm920_set_pte_ext) | |||
| 390 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ | 390 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ |
| 391 | .globl cpu_arm920_suspend_size | 391 | .globl cpu_arm920_suspend_size |
| 392 | .equ cpu_arm920_suspend_size, 4 * 3 | 392 | .equ cpu_arm920_suspend_size, 4 * 3 |
| 393 | #ifdef CONFIG_PM | 393 | #ifdef CONFIG_PM_SLEEP |
| 394 | ENTRY(cpu_arm920_do_suspend) | 394 | ENTRY(cpu_arm920_do_suspend) |
| 395 | stmfd sp!, {r4 - r7, lr} | 395 | stmfd sp!, {r4 - r7, lr} |
| 396 | mrc p15, 0, r4, c13, c0, 0 @ PID | 396 | mrc p15, 0, r4, c13, c0, 0 @ PID |
diff --git a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S index 36154b1e792a..95ba1fc56e4d 100644 --- a/arch/arm/mm/proc-arm922.S +++ b/arch/arm/mm/proc-arm922.S | |||
| @@ -54,7 +54,7 @@ | |||
| 54 | /* | 54 | /* |
| 55 | * This is the size at which it becomes more efficient to | 55 | * This is the size at which it becomes more efficient to |
| 56 | * clean the whole cache, rather than using the individual | 56 | * clean the whole cache, rather than using the individual |
| 57 | * cache line maintainence instructions. (I think this should | 57 | * cache line maintenance instructions. (I think this should |
| 58 | * be 32768). | 58 | * be 32768). |
| 59 | */ | 59 | */ |
| 60 | #define CACHE_DLIMIT 8192 | 60 | #define CACHE_DLIMIT 8192 |
diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S index 89c5e0009c4c..541e4774eea1 100644 --- a/arch/arm/mm/proc-arm925.S +++ b/arch/arm/mm/proc-arm925.S | |||
| @@ -77,7 +77,7 @@ | |||
| 77 | /* | 77 | /* |
| 78 | * This is the size at which it becomes more efficient to | 78 | * This is the size at which it becomes more efficient to |
| 79 | * clean the whole cache, rather than using the individual | 79 | * clean the whole cache, rather than using the individual |
| 80 | * cache line maintainence instructions. | 80 | * cache line maintenance instructions. |
| 81 | */ | 81 | */ |
| 82 | #define CACHE_DLIMIT 8192 | 82 | #define CACHE_DLIMIT 8192 |
| 83 | 83 | ||
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S index 6a4bdb2c94a7..0ed85d930c09 100644 --- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S | |||
| @@ -404,7 +404,7 @@ ENTRY(cpu_arm926_set_pte_ext) | |||
| 404 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ | 404 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ |
| 405 | .globl cpu_arm926_suspend_size | 405 | .globl cpu_arm926_suspend_size |
| 406 | .equ cpu_arm926_suspend_size, 4 * 3 | 406 | .equ cpu_arm926_suspend_size, 4 * 3 |
| 407 | #ifdef CONFIG_PM | 407 | #ifdef CONFIG_PM_SLEEP |
| 408 | ENTRY(cpu_arm926_do_suspend) | 408 | ENTRY(cpu_arm926_do_suspend) |
| 409 | stmfd sp!, {r4 - r7, lr} | 409 | stmfd sp!, {r4 - r7, lr} |
| 410 | mrc p15, 0, r4, c13, c0, 0 @ PID | 410 | mrc p15, 0, r4, c13, c0, 0 @ PID |
diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S index e32fa499194c..34261f9486b9 100644 --- a/arch/arm/mm/proc-macros.S +++ b/arch/arm/mm/proc-macros.S | |||
| @@ -85,7 +85,7 @@ | |||
| 85 | 85 | ||
| 86 | /* | 86 | /* |
| 87 | * Sanity check the PTE configuration for the code below - which makes | 87 | * Sanity check the PTE configuration for the code below - which makes |
| 88 | * certain assumptions about how these bits are layed out. | 88 | * certain assumptions about how these bits are laid out. |
| 89 | */ | 89 | */ |
| 90 | #ifdef CONFIG_MMU | 90 | #ifdef CONFIG_MMU |
| 91 | #if L_PTE_SHARED != PTE_EXT_SHARED | 91 | #if L_PTE_SHARED != PTE_EXT_SHARED |
diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S index 74483d1977fe..184a9c997e36 100644 --- a/arch/arm/mm/proc-sa1100.S +++ b/arch/arm/mm/proc-sa1100.S | |||
| @@ -171,7 +171,7 @@ ENTRY(cpu_sa1100_set_pte_ext) | |||
| 171 | 171 | ||
| 172 | .globl cpu_sa1100_suspend_size | 172 | .globl cpu_sa1100_suspend_size |
| 173 | .equ cpu_sa1100_suspend_size, 4*4 | 173 | .equ cpu_sa1100_suspend_size, 4*4 |
| 174 | #ifdef CONFIG_PM | 174 | #ifdef CONFIG_PM_SLEEP |
| 175 | ENTRY(cpu_sa1100_do_suspend) | 175 | ENTRY(cpu_sa1100_do_suspend) |
| 176 | stmfd sp!, {r4 - r7, lr} | 176 | stmfd sp!, {r4 - r7, lr} |
| 177 | mrc p15, 0, r4, c3, c0, 0 @ domain ID | 177 | mrc p15, 0, r4, c3, c0, 0 @ domain ID |
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index 832b6bdc192c..7c99cb4c8e4f 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
| @@ -124,7 +124,7 @@ ENTRY(cpu_v6_set_pte_ext) | |||
| 124 | /* Suspend/resume support: taken from arch/arm/mach-s3c64xx/sleep.S */ | 124 | /* Suspend/resume support: taken from arch/arm/mach-s3c64xx/sleep.S */ |
| 125 | .globl cpu_v6_suspend_size | 125 | .globl cpu_v6_suspend_size |
| 126 | .equ cpu_v6_suspend_size, 4 * 8 | 126 | .equ cpu_v6_suspend_size, 4 * 8 |
| 127 | #ifdef CONFIG_PM | 127 | #ifdef CONFIG_PM_SLEEP |
| 128 | ENTRY(cpu_v6_do_suspend) | 128 | ENTRY(cpu_v6_do_suspend) |
| 129 | stmfd sp!, {r4 - r11, lr} | 129 | stmfd sp!, {r4 - r11, lr} |
| 130 | mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID | 130 | mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID |
| @@ -132,7 +132,7 @@ ENTRY(cpu_v6_do_suspend) | |||
| 132 | mrc p15, 0, r6, c3, c0, 0 @ Domain ID | 132 | mrc p15, 0, r6, c3, c0, 0 @ Domain ID |
| 133 | mrc p15, 0, r7, c2, c0, 0 @ Translation table base 0 | 133 | mrc p15, 0, r7, c2, c0, 0 @ Translation table base 0 |
| 134 | mrc p15, 0, r8, c2, c0, 1 @ Translation table base 1 | 134 | mrc p15, 0, r8, c2, c0, 1 @ Translation table base 1 |
| 135 | mrc p15, 0, r9, c1, c0, 1 @ auxillary control register | 135 | mrc p15, 0, r9, c1, c0, 1 @ auxiliary control register |
| 136 | mrc p15, 0, r10, c1, c0, 2 @ co-processor access control | 136 | mrc p15, 0, r10, c1, c0, 2 @ co-processor access control |
| 137 | mrc p15, 0, r11, c1, c0, 0 @ control register | 137 | mrc p15, 0, r11, c1, c0, 0 @ control register |
| 138 | stmia r0, {r4 - r11} | 138 | stmia r0, {r4 - r11} |
| @@ -151,7 +151,7 @@ ENTRY(cpu_v6_do_resume) | |||
| 151 | mcr p15, 0, r6, c3, c0, 0 @ Domain ID | 151 | mcr p15, 0, r6, c3, c0, 0 @ Domain ID |
| 152 | mcr p15, 0, r7, c2, c0, 0 @ Translation table base 0 | 152 | mcr p15, 0, r7, c2, c0, 0 @ Translation table base 0 |
| 153 | mcr p15, 0, r8, c2, c0, 1 @ Translation table base 1 | 153 | mcr p15, 0, r8, c2, c0, 1 @ Translation table base 1 |
| 154 | mcr p15, 0, r9, c1, c0, 1 @ auxillary control register | 154 | mcr p15, 0, r9, c1, c0, 1 @ auxiliary control register |
| 155 | mcr p15, 0, r10, c1, c0, 2 @ co-processor access control | 155 | mcr p15, 0, r10, c1, c0, 2 @ co-processor access control |
| 156 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register | 156 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register |
| 157 | mcr p15, 0, ip, c7, c5, 4 @ ISB | 157 | mcr p15, 0, ip, c7, c5, 4 @ ISB |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 262fa88a7439..babfba09c89f 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
| @@ -211,7 +211,7 @@ cpu_v7_name: | |||
| 211 | /* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */ | 211 | /* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */ |
| 212 | .globl cpu_v7_suspend_size | 212 | .globl cpu_v7_suspend_size |
| 213 | .equ cpu_v7_suspend_size, 4 * 8 | 213 | .equ cpu_v7_suspend_size, 4 * 8 |
| 214 | #ifdef CONFIG_PM | 214 | #ifdef CONFIG_PM_SLEEP |
| 215 | ENTRY(cpu_v7_do_suspend) | 215 | ENTRY(cpu_v7_do_suspend) |
| 216 | stmfd sp!, {r4 - r11, lr} | 216 | stmfd sp!, {r4 - r11, lr} |
| 217 | mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID | 217 | mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID |
| @@ -237,7 +237,7 @@ ENTRY(cpu_v7_do_resume) | |||
| 237 | mcr p15, 0, r7, c2, c0, 0 @ TTB 0 | 237 | mcr p15, 0, r7, c2, c0, 0 @ TTB 0 |
| 238 | mcr p15, 0, r8, c2, c0, 1 @ TTB 1 | 238 | mcr p15, 0, r8, c2, c0, 1 @ TTB 1 |
| 239 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register | 239 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register |
| 240 | mcr p15, 0, r10, c1, c0, 1 @ Auxillary control register | 240 | mcr p15, 0, r10, c1, c0, 1 @ Auxiliary control register |
| 241 | mcr p15, 0, r11, c1, c0, 2 @ Co-processor access control | 241 | mcr p15, 0, r11, c1, c0, 2 @ Co-processor access control |
| 242 | ldr r4, =PRRR @ PRRR | 242 | ldr r4, =PRRR @ PRRR |
| 243 | ldr r5, =NMRR @ NMRR | 243 | ldr r5, =NMRR @ NMRR |
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S index 63d8b2044e84..596213699f37 100644 --- a/arch/arm/mm/proc-xsc3.S +++ b/arch/arm/mm/proc-xsc3.S | |||
| @@ -417,7 +417,7 @@ ENTRY(cpu_xsc3_set_pte_ext) | |||
| 417 | 417 | ||
| 418 | .globl cpu_xsc3_suspend_size | 418 | .globl cpu_xsc3_suspend_size |
| 419 | .equ cpu_xsc3_suspend_size, 4 * 8 | 419 | .equ cpu_xsc3_suspend_size, 4 * 8 |
| 420 | #ifdef CONFIG_PM | 420 | #ifdef CONFIG_PM_SLEEP |
| 421 | ENTRY(cpu_xsc3_do_suspend) | 421 | ENTRY(cpu_xsc3_do_suspend) |
| 422 | stmfd sp!, {r4 - r10, lr} | 422 | stmfd sp!, {r4 - r10, lr} |
| 423 | mrc p14, 0, r4, c6, c0, 0 @ clock configuration, for turbo mode | 423 | mrc p14, 0, r4, c6, c0, 0 @ clock configuration, for turbo mode |
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S index 086038cd86ab..ce233bcbf506 100644 --- a/arch/arm/mm/proc-xscale.S +++ b/arch/arm/mm/proc-xscale.S | |||
| @@ -518,7 +518,7 @@ ENTRY(cpu_xscale_set_pte_ext) | |||
| 518 | 518 | ||
| 519 | .globl cpu_xscale_suspend_size | 519 | .globl cpu_xscale_suspend_size |
| 520 | .equ cpu_xscale_suspend_size, 4 * 7 | 520 | .equ cpu_xscale_suspend_size, 4 * 7 |
| 521 | #ifdef CONFIG_PM | 521 | #ifdef CONFIG_PM_SLEEP |
| 522 | ENTRY(cpu_xscale_do_suspend) | 522 | ENTRY(cpu_xscale_do_suspend) |
| 523 | stmfd sp!, {r4 - r10, lr} | 523 | stmfd sp!, {r4 - r10, lr} |
| 524 | mrc p14, 0, r4, c6, c0, 0 @ clock configuration, for turbo mode | 524 | mrc p14, 0, r4, c6, c0, 0 @ clock configuration, for turbo mode |
diff --git a/arch/arm/plat-mxc/cpufreq.c b/arch/arm/plat-mxc/cpufreq.c index ce81481becf1..4268a2bdf145 100644 --- a/arch/arm/plat-mxc/cpufreq.c +++ b/arch/arm/plat-mxc/cpufreq.c | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | 13 | ||
| 14 | /* | 14 | /* |
| 15 | * A driver for the Freescale Semiconductor i.MXC CPUfreq module. | 15 | * A driver for the Freescale Semiconductor i.MXC CPUfreq module. |
| 16 | * The CPUFREQ driver is for controling CPU frequency. It allows you to change | 16 | * The CPUFREQ driver is for controlling CPU frequency. It allows you to change |
| 17 | * the CPU clock speed on the fly. | 17 | * the CPU clock speed on the fly. |
| 18 | */ | 18 | */ |
| 19 | 19 | ||
diff --git a/arch/arm/plat-mxc/devices/platform-fec.c b/arch/arm/plat-mxc/devices/platform-fec.c index 6561c9df5f0d..ccc789e21daa 100644 --- a/arch/arm/plat-mxc/devices/platform-fec.c +++ b/arch/arm/plat-mxc/devices/platform-fec.c | |||
| @@ -53,7 +53,7 @@ struct platform_device *__init imx_add_fec( | |||
| 53 | struct resource res[] = { | 53 | struct resource res[] = { |
| 54 | { | 54 | { |
| 55 | .start = data->iobase, | 55 | .start = data->iobase, |
| 56 | .end = data->iobase + SZ_4K, | 56 | .end = data->iobase + SZ_4K - 1, |
| 57 | .flags = IORESOURCE_MEM, | 57 | .flags = IORESOURCE_MEM, |
| 58 | }, { | 58 | }, { |
| 59 | .start = data->irq, | 59 | .start = data->irq, |
diff --git a/arch/arm/plat-mxc/devices/platform-imxdi_rtc.c b/arch/arm/plat-mxc/devices/platform-imxdi_rtc.c index 10653cc8d1fa..805336fdc252 100644 --- a/arch/arm/plat-mxc/devices/platform-imxdi_rtc.c +++ b/arch/arm/plat-mxc/devices/platform-imxdi_rtc.c | |||
| @@ -27,7 +27,7 @@ struct platform_device *__init imx_add_imxdi_rtc( | |||
| 27 | struct resource res[] = { | 27 | struct resource res[] = { |
| 28 | { | 28 | { |
| 29 | .start = data->iobase, | 29 | .start = data->iobase, |
| 30 | .end = data->iobase + SZ_16K, | 30 | .end = data->iobase + SZ_16K - 1, |
| 31 | .flags = IORESOURCE_MEM, | 31 | .flags = IORESOURCE_MEM, |
| 32 | }, { | 32 | }, { |
| 33 | .start = data->irq, | 33 | .start = data->irq, |
diff --git a/arch/arm/plat-mxc/include/mach/audmux.h b/arch/arm/plat-mxc/include/mach/audmux.h index 5cd6466964af..6fda788ed0e9 100644 --- a/arch/arm/plat-mxc/include/mach/audmux.h +++ b/arch/arm/plat-mxc/include/mach/audmux.h | |||
| @@ -15,6 +15,14 @@ | |||
| 15 | #define MX31_AUDMUX_PORT5_SSI_PINS_5 4 | 15 | #define MX31_AUDMUX_PORT5_SSI_PINS_5 4 |
| 16 | #define MX31_AUDMUX_PORT6_SSI_PINS_6 5 | 16 | #define MX31_AUDMUX_PORT6_SSI_PINS_6 5 |
| 17 | 17 | ||
| 18 | #define MX51_AUDMUX_PORT1_SSI0 0 | ||
| 19 | #define MX51_AUDMUX_PORT2_SSI1 1 | ||
| 20 | #define MX51_AUDMUX_PORT3 2 | ||
| 21 | #define MX51_AUDMUX_PORT4 3 | ||
| 22 | #define MX51_AUDMUX_PORT5 4 | ||
| 23 | #define MX51_AUDMUX_PORT6 5 | ||
| 24 | #define MX51_AUDMUX_PORT7 6 | ||
| 25 | |||
| 18 | /* Register definitions for the i.MX21/27 Digital Audio Multiplexer */ | 26 | /* Register definitions for the i.MX21/27 Digital Audio Multiplexer */ |
| 19 | #define MXC_AUDMUX_V1_PCR_INMMASK(x) ((x) & 0xff) | 27 | #define MXC_AUDMUX_V1_PCR_INMMASK(x) ((x) & 0xff) |
| 20 | #define MXC_AUDMUX_V1_PCR_INMEN (1 << 8) | 28 | #define MXC_AUDMUX_V1_PCR_INMEN (1 << 8) |
| @@ -28,7 +36,7 @@ | |||
| 28 | #define MXC_AUDMUX_V1_PCR_TCLKDIR (1 << 30) | 36 | #define MXC_AUDMUX_V1_PCR_TCLKDIR (1 << 30) |
| 29 | #define MXC_AUDMUX_V1_PCR_TFSDIR (1 << 31) | 37 | #define MXC_AUDMUX_V1_PCR_TFSDIR (1 << 31) |
| 30 | 38 | ||
| 31 | /* Register definitions for the i.MX25/31/35 Digital Audio Multiplexer */ | 39 | /* Register definitions for the i.MX25/31/35/51 Digital Audio Multiplexer */ |
| 32 | #define MXC_AUDMUX_V2_PTCR_TFSDIR (1 << 31) | 40 | #define MXC_AUDMUX_V2_PTCR_TFSDIR (1 << 31) |
| 33 | #define MXC_AUDMUX_V2_PTCR_TFSEL(x) (((x) & 0xf) << 27) | 41 | #define MXC_AUDMUX_V2_PTCR_TFSEL(x) (((x) & 0xf) << 27) |
| 34 | #define MXC_AUDMUX_V2_PTCR_TCLKDIR (1 << 26) | 42 | #define MXC_AUDMUX_V2_PTCR_TCLKDIR (1 << 26) |
diff --git a/arch/arm/plat-mxc/include/mach/entry-macro.S b/arch/arm/plat-mxc/include/mach/entry-macro.S index bd9bb9799141..2e49e71b1b98 100644 --- a/arch/arm/plat-mxc/include/mach/entry-macro.S +++ b/arch/arm/plat-mxc/include/mach/entry-macro.S | |||
| @@ -33,9 +33,9 @@ | |||
| 33 | .macro arch_ret_to_user, tmp1, tmp2 | 33 | .macro arch_ret_to_user, tmp1, tmp2 |
| 34 | .endm | 34 | .endm |
| 35 | 35 | ||
| 36 | @ this macro checks which interrupt occured | 36 | @ this macro checks which interrupt occurred |
| 37 | @ and returns its number in irqnr | 37 | @ and returns its number in irqnr |
| 38 | @ and returns if an interrupt occured in irqstat | 38 | @ and returns if an interrupt occurred in irqstat |
| 39 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 39 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
| 40 | #ifndef CONFIG_MXC_TZIC | 40 | #ifndef CONFIG_MXC_TZIC |
| 41 | @ Load offset & priority of the highest priority | 41 | @ Load offset & priority of the highest priority |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx2x.h b/arch/arm/plat-mxc/include/mach/iomux-mx2x.h index c4f116d214f2..7a9b20abda09 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx2x.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx2x.h | |||
| @@ -90,12 +90,12 @@ | |||
| 90 | #define PC31_PF_SSI3_CLK (GPIO_PORTC | GPIO_PF | GPIO_IN | 31) | 90 | #define PC31_PF_SSI3_CLK (GPIO_PORTC | GPIO_PF | GPIO_IN | 31) |
| 91 | #define PD17_PF_I2C_DATA (GPIO_PORTD | GPIO_PF | GPIO_OUT | 17) | 91 | #define PD17_PF_I2C_DATA (GPIO_PORTD | GPIO_PF | GPIO_OUT | 17) |
| 92 | #define PD18_PF_I2C_CLK (GPIO_PORTD | GPIO_PF | GPIO_OUT | 18) | 92 | #define PD18_PF_I2C_CLK (GPIO_PORTD | GPIO_PF | GPIO_OUT | 18) |
| 93 | #define PD19_PF_CSPI2_SS2 (GPIO_PORTD | GPIO_PF | 19) | 93 | #define PD19_PF_CSPI2_SS2 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 19) |
| 94 | #define PD20_PF_CSPI2_SS1 (GPIO_PORTD | GPIO_PF | 20) | 94 | #define PD20_PF_CSPI2_SS1 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 20) |
| 95 | #define PD21_PF_CSPI2_SS0 (GPIO_PORTD | GPIO_PF | 21) | 95 | #define PD21_PF_CSPI2_SS0 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 21) |
| 96 | #define PD22_PF_CSPI2_SCLK (GPIO_PORTD | GPIO_PF | 22) | 96 | #define PD22_PF_CSPI2_SCLK (GPIO_PORTD | GPIO_PF | GPIO_OUT | 22) |
| 97 | #define PD23_PF_CSPI2_MISO (GPIO_PORTD | GPIO_PF | 23) | 97 | #define PD23_PF_CSPI2_MISO (GPIO_PORTD | GPIO_PF | GPIO_IN | 23) |
| 98 | #define PD24_PF_CSPI2_MOSI (GPIO_PORTD | GPIO_PF | 24) | 98 | #define PD24_PF_CSPI2_MOSI (GPIO_PORTD | GPIO_PF | GPIO_OUT | 24) |
| 99 | #define PD25_PF_CSPI1_RDY (GPIO_PORTD | GPIO_PF | GPIO_OUT | 25) | 99 | #define PD25_PF_CSPI1_RDY (GPIO_PORTD | GPIO_PF | GPIO_OUT | 25) |
| 100 | #define PD26_PF_CSPI1_SS2 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 26) | 100 | #define PD26_PF_CSPI1_SS2 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 26) |
| 101 | #define PD27_PF_CSPI1_SS1 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 27) | 101 | #define PD27_PF_CSPI1_SS1 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 27) |
diff --git a/arch/arm/plat-mxc/include/mach/mx50.h b/arch/arm/plat-mxc/include/mach/mx50.h index aaec2a6e7b3a..5f2da75a47f4 100644 --- a/arch/arm/plat-mxc/include/mach/mx50.h +++ b/arch/arm/plat-mxc/include/mach/mx50.h | |||
| @@ -282,4 +282,8 @@ | |||
| 282 | #define MX50_INT_APBHDMA_CHAN6 116 | 282 | #define MX50_INT_APBHDMA_CHAN6 116 |
| 283 | #define MX50_INT_APBHDMA_CHAN7 117 | 283 | #define MX50_INT_APBHDMA_CHAN7 117 |
| 284 | 284 | ||
| 285 | #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) | ||
| 286 | extern int mx50_revision(void); | ||
| 287 | #endif | ||
| 288 | |||
| 285 | #endif /* ifndef __MACH_MX50_H__ */ | 289 | #endif /* ifndef __MACH_MX50_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/mx51.h b/arch/arm/plat-mxc/include/mach/mx51.h index 1eb339e6c857..dede19a766ff 100644 --- a/arch/arm/plat-mxc/include/mach/mx51.h +++ b/arch/arm/plat-mxc/include/mach/mx51.h | |||
| @@ -347,6 +347,7 @@ | |||
| 347 | 347 | ||
| 348 | #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) | 348 | #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) |
| 349 | extern int mx51_revision(void); | 349 | extern int mx51_revision(void); |
| 350 | extern void mx51_display_revision(void); | ||
| 350 | #endif | 351 | #endif |
| 351 | 352 | ||
| 352 | /* tape-out 1 defines */ | 353 | /* tape-out 1 defines */ |
diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h index 7e072637eefa..1aea818d9d31 100644 --- a/arch/arm/plat-mxc/include/mach/mxc.h +++ b/arch/arm/plat-mxc/include/mach/mxc.h | |||
| @@ -51,6 +51,20 @@ | |||
| 51 | #define IMX_CHIP_REVISION_3_3 0x33 | 51 | #define IMX_CHIP_REVISION_3_3 0x33 |
| 52 | #define IMX_CHIP_REVISION_UNKNOWN 0xff | 52 | #define IMX_CHIP_REVISION_UNKNOWN 0xff |
| 53 | 53 | ||
| 54 | #define IMX_CHIP_REVISION_1_0_STRING "1.0" | ||
| 55 | #define IMX_CHIP_REVISION_1_1_STRING "1.1" | ||
| 56 | #define IMX_CHIP_REVISION_1_2_STRING "1.2" | ||
| 57 | #define IMX_CHIP_REVISION_1_3_STRING "1.3" | ||
| 58 | #define IMX_CHIP_REVISION_2_0_STRING "2.0" | ||
| 59 | #define IMX_CHIP_REVISION_2_1_STRING "2.1" | ||
| 60 | #define IMX_CHIP_REVISION_2_2_STRING "2.2" | ||
| 61 | #define IMX_CHIP_REVISION_2_3_STRING "2.3" | ||
| 62 | #define IMX_CHIP_REVISION_3_0_STRING "3.0" | ||
| 63 | #define IMX_CHIP_REVISION_3_1_STRING "3.1" | ||
| 64 | #define IMX_CHIP_REVISION_3_2_STRING "3.2" | ||
| 65 | #define IMX_CHIP_REVISION_3_3_STRING "3.3" | ||
| 66 | #define IMX_CHIP_REVISION_UNKNOWN_STRING "unknown" | ||
| 67 | |||
| 54 | #ifndef __ASSEMBLY__ | 68 | #ifndef __ASSEMBLY__ |
| 55 | extern unsigned int __mxc_cpu_type; | 69 | extern unsigned int __mxc_cpu_type; |
| 56 | #endif | 70 | #endif |
| @@ -181,6 +195,15 @@ struct cpu_op { | |||
| 181 | u32 cpu_rate; | 195 | u32 cpu_rate; |
| 182 | }; | 196 | }; |
| 183 | 197 | ||
| 198 | int tzic_enable_wake(int is_idle); | ||
| 199 | enum mxc_cpu_pwr_mode { | ||
| 200 | WAIT_CLOCKED, /* wfi only */ | ||
| 201 | WAIT_UNCLOCKED, /* WAIT */ | ||
| 202 | WAIT_UNCLOCKED_POWER_OFF, /* WAIT + SRPG */ | ||
| 203 | STOP_POWER_ON, /* just STOP */ | ||
| 204 | STOP_POWER_OFF, /* STOP + SRPG */ | ||
| 205 | }; | ||
| 206 | |||
| 184 | extern struct cpu_op *(*get_cpu_op)(int *op); | 207 | extern struct cpu_op *(*get_cpu_op)(int *op); |
| 185 | #endif | 208 | #endif |
| 186 | 209 | ||
diff --git a/arch/arm/plat-mxc/include/mach/mxc_nand.h b/arch/arm/plat-mxc/include/mach/mxc_nand.h index 04c0d060d814..6bb96ef1600b 100644 --- a/arch/arm/plat-mxc/include/mach/mxc_nand.h +++ b/arch/arm/plat-mxc/include/mach/mxc_nand.h | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | struct mxc_nand_platform_data { | 25 | struct mxc_nand_platform_data { |
| 26 | unsigned int width; /* data bus width in bytes */ | 26 | unsigned int width; /* data bus width in bytes */ |
| 27 | unsigned int hw_ecc:1; /* 0 if supress hardware ECC */ | 27 | unsigned int hw_ecc:1; /* 0 if suppress hardware ECC */ |
| 28 | unsigned int flash_bbt:1; /* set to 1 to use a flash based bbt */ | 28 | unsigned int flash_bbt:1; /* set to 1 to use a flash based bbt */ |
| 29 | struct mtd_partition *parts; /* partition table */ | 29 | struct mtd_partition *parts; /* partition table */ |
| 30 | int nr_parts; /* size of parts */ | 30 | int nr_parts; /* size of parts */ |
diff --git a/arch/arm/plat-mxc/include/mach/system.h b/arch/arm/plat-mxc/include/mach/system.h index 95be51bfe9a9..0417da9f710d 100644 --- a/arch/arm/plat-mxc/include/mach/system.h +++ b/arch/arm/plat-mxc/include/mach/system.h | |||
| @@ -20,6 +20,8 @@ | |||
| 20 | #include <mach/hardware.h> | 20 | #include <mach/hardware.h> |
| 21 | #include <mach/common.h> | 21 | #include <mach/common.h> |
| 22 | 22 | ||
| 23 | extern void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode); | ||
| 24 | |||
| 23 | static inline void arch_idle(void) | 25 | static inline void arch_idle(void) |
| 24 | { | 26 | { |
| 25 | #ifdef CONFIG_ARCH_MXC91231 | 27 | #ifdef CONFIG_ARCH_MXC91231 |
| @@ -54,7 +56,9 @@ static inline void arch_idle(void) | |||
| 54 | "orr %0, %0, #0x00000004\n" | 56 | "orr %0, %0, #0x00000004\n" |
| 55 | "mcr p15, 0, %0, c1, c0, 0\n" | 57 | "mcr p15, 0, %0, c1, c0, 0\n" |
| 56 | : "=r" (reg)); | 58 | : "=r" (reg)); |
| 57 | } else | 59 | } else if (cpu_is_mx51()) |
| 60 | mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF); | ||
| 61 | else | ||
| 58 | cpu_do_idle(); | 62 | cpu_do_idle(); |
| 59 | } | 63 | } |
| 60 | 64 | ||
diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c index 9f0c2610595e..2237ff8b434f 100644 --- a/arch/arm/plat-mxc/time.c +++ b/arch/arm/plat-mxc/time.c | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | #include <linux/clk.h> | 27 | #include <linux/clk.h> |
| 28 | 28 | ||
| 29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
| 30 | #include <asm/sched_clock.h> | ||
| 30 | #include <asm/mach/time.h> | 31 | #include <asm/mach/time.h> |
| 31 | #include <mach/common.h> | 32 | #include <mach/common.h> |
| 32 | 33 | ||
| @@ -105,6 +106,11 @@ static void gpt_irq_acknowledge(void) | |||
| 105 | __raw_writel(V2_TSTAT_OF1, timer_base + V2_TSTAT); | 106 | __raw_writel(V2_TSTAT_OF1, timer_base + V2_TSTAT); |
| 106 | } | 107 | } |
| 107 | 108 | ||
| 109 | static cycle_t dummy_get_cycles(struct clocksource *cs) | ||
| 110 | { | ||
| 111 | return 0; | ||
| 112 | } | ||
| 113 | |||
| 108 | static cycle_t mx1_2_get_cycles(struct clocksource *cs) | 114 | static cycle_t mx1_2_get_cycles(struct clocksource *cs) |
| 109 | { | 115 | { |
| 110 | return __raw_readl(timer_base + MX1_2_TCN); | 116 | return __raw_readl(timer_base + MX1_2_TCN); |
| @@ -118,18 +124,35 @@ static cycle_t v2_get_cycles(struct clocksource *cs) | |||
| 118 | static struct clocksource clocksource_mxc = { | 124 | static struct clocksource clocksource_mxc = { |
| 119 | .name = "mxc_timer1", | 125 | .name = "mxc_timer1", |
| 120 | .rating = 200, | 126 | .rating = 200, |
| 121 | .read = mx1_2_get_cycles, | 127 | .read = dummy_get_cycles, |
| 122 | .mask = CLOCKSOURCE_MASK(32), | 128 | .mask = CLOCKSOURCE_MASK(32), |
| 123 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 129 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
| 124 | }; | 130 | }; |
| 125 | 131 | ||
| 132 | static DEFINE_CLOCK_DATA(cd); | ||
| 133 | unsigned long long notrace sched_clock(void) | ||
| 134 | { | ||
| 135 | cycle_t cyc = clocksource_mxc.read(&clocksource_mxc); | ||
| 136 | |||
| 137 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | ||
| 138 | } | ||
| 139 | |||
| 140 | static void notrace mxc_update_sched_clock(void) | ||
| 141 | { | ||
| 142 | cycle_t cyc = clocksource_mxc.read(&clocksource_mxc); | ||
| 143 | update_sched_clock(&cd, cyc, (u32)~0); | ||
| 144 | } | ||
| 145 | |||
| 126 | static int __init mxc_clocksource_init(struct clk *timer_clk) | 146 | static int __init mxc_clocksource_init(struct clk *timer_clk) |
| 127 | { | 147 | { |
| 128 | unsigned int c = clk_get_rate(timer_clk); | 148 | unsigned int c = clk_get_rate(timer_clk); |
| 129 | 149 | ||
| 130 | if (timer_is_v2()) | 150 | if (timer_is_v2()) |
| 131 | clocksource_mxc.read = v2_get_cycles; | 151 | clocksource_mxc.read = v2_get_cycles; |
| 152 | else | ||
| 153 | clocksource_mxc.read = mx1_2_get_cycles; | ||
| 132 | 154 | ||
| 155 | init_sched_clock(&cd, mxc_update_sched_clock, 32, c); | ||
| 133 | clocksource_register_hz(&clocksource_mxc, c); | 156 | clocksource_register_hz(&clocksource_mxc, c); |
| 134 | 157 | ||
| 135 | return 0; | 158 | return 0; |
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index 7d9f815cedec..ea28f98d5d6a 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
| @@ -280,7 +280,7 @@ EXPORT_SYMBOL(omap_dsp_get_mempool_base); | |||
| 280 | * Claiming GPIOs, and setting their direction and initial values, is the | 280 | * Claiming GPIOs, and setting their direction and initial values, is the |
| 281 | * responsibility of the device drivers. So is responding to probe(). | 281 | * responsibility of the device drivers. So is responding to probe(). |
| 282 | * | 282 | * |
| 283 | * Board-specific knowlege like creating devices or pin setup is to be | 283 | * Board-specific knowledge like creating devices or pin setup is to be |
| 284 | * kept out of drivers as much as possible. In particular, pin setup | 284 | * kept out of drivers as much as possible. In particular, pin setup |
| 285 | * may be handled by the boot loader, and drivers should expect it will | 285 | * may be handled by the boot loader, and drivers should expect it will |
| 286 | * normally have been done by the time they're probed. | 286 | * normally have been done by the time they're probed. |
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 2ec3b5d9f214..c22217c2ee5f 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
| @@ -1019,7 +1019,7 @@ EXPORT_SYMBOL(omap_set_dma_callback); | |||
| 1019 | * If the channel is running the caller must disable interrupts prior calling | 1019 | * If the channel is running the caller must disable interrupts prior calling |
| 1020 | * this function and process the returned value before re-enabling interrupt to | 1020 | * this function and process the returned value before re-enabling interrupt to |
| 1021 | * prevent races with the interrupt handler. Note that in continuous mode there | 1021 | * prevent races with the interrupt handler. Note that in continuous mode there |
| 1022 | * is a chance for CSSA_L register overflow inbetween the two reads resulting | 1022 | * is a chance for CSSA_L register overflow between the two reads resulting |
| 1023 | * in incorrect return value. | 1023 | * in incorrect return value. |
| 1024 | */ | 1024 | */ |
| 1025 | dma_addr_t omap_get_dma_src_pos(int lch) | 1025 | dma_addr_t omap_get_dma_src_pos(int lch) |
| @@ -1046,7 +1046,7 @@ EXPORT_SYMBOL(omap_get_dma_src_pos); | |||
| 1046 | * If the channel is running the caller must disable interrupts prior calling | 1046 | * If the channel is running the caller must disable interrupts prior calling |
| 1047 | * this function and process the returned value before re-enabling interrupt to | 1047 | * this function and process the returned value before re-enabling interrupt to |
| 1048 | * prevent races with the interrupt handler. Note that in continuous mode there | 1048 | * prevent races with the interrupt handler. Note that in continuous mode there |
| 1049 | * is a chance for CDSA_L register overflow inbetween the two reads resulting | 1049 | * is a chance for CDSA_L register overflow between the two reads resulting |
| 1050 | * in incorrect return value. | 1050 | * in incorrect return value. |
| 1051 | */ | 1051 | */ |
| 1052 | dma_addr_t omap_get_dma_dst_pos(int lch) | 1052 | dma_addr_t omap_get_dma_dst_pos(int lch) |
diff --git a/arch/arm/plat-omap/include/plat/gpio.h b/arch/arm/plat-omap/include/plat/gpio.h index d6f9fa0f62af..cac2e8ac6968 100644 --- a/arch/arm/plat-omap/include/plat/gpio.h +++ b/arch/arm/plat-omap/include/plat/gpio.h | |||
| @@ -93,7 +93,7 @@ extern void omap_gpio_restore_context(void); | |||
| 93 | /* Wrappers for "new style" GPIO calls, using the new infrastructure | 93 | /* Wrappers for "new style" GPIO calls, using the new infrastructure |
| 94 | * which lets us plug in FPGA, I2C, and other implementations. | 94 | * which lets us plug in FPGA, I2C, and other implementations. |
| 95 | * * | 95 | * * |
| 96 | * The original OMAP-specfic calls should eventually be removed. | 96 | * The original OMAP-specific calls should eventually be removed. |
| 97 | */ | 97 | */ |
| 98 | 98 | ||
| 99 | #include <linux/errno.h> | 99 | #include <linux/errno.h> |
diff --git a/arch/arm/plat-omap/include/plat/gpmc.h b/arch/arm/plat-omap/include/plat/gpmc.h index 12b316165037..1527929b445a 100644 --- a/arch/arm/plat-omap/include/plat/gpmc.h +++ b/arch/arm/plat-omap/include/plat/gpmc.h | |||
| @@ -90,7 +90,7 @@ enum omap_ecc { | |||
| 90 | /* 1-bit ecc: stored at end of spare area */ | 90 | /* 1-bit ecc: stored at end of spare area */ |
| 91 | OMAP_ECC_HAMMING_CODE_DEFAULT = 0, /* Default, s/w method */ | 91 | OMAP_ECC_HAMMING_CODE_DEFAULT = 0, /* Default, s/w method */ |
| 92 | OMAP_ECC_HAMMING_CODE_HW, /* gpmc to detect the error */ | 92 | OMAP_ECC_HAMMING_CODE_HW, /* gpmc to detect the error */ |
| 93 | /* 1-bit ecc: stored at begining of spare area as romcode */ | 93 | /* 1-bit ecc: stored at beginning of spare area as romcode */ |
| 94 | OMAP_ECC_HAMMING_CODE_HW_ROMCODE, /* gpmc method & romcode layout */ | 94 | OMAP_ECC_HAMMING_CODE_HW_ROMCODE, /* gpmc method & romcode layout */ |
| 95 | }; | 95 | }; |
| 96 | 96 | ||
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index d598d9fd65ac..5587acf0eb2c 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c | |||
| @@ -1103,7 +1103,7 @@ int omap_mcbsp_pollread(unsigned int id, u16 *buf) | |||
| 1103 | /* resend */ | 1103 | /* resend */ |
| 1104 | return -1; | 1104 | return -1; |
| 1105 | } else { | 1105 | } else { |
| 1106 | /* wait for recieve confirmation */ | 1106 | /* wait for receive confirmation */ |
| 1107 | int attemps = 0; | 1107 | int attemps = 0; |
| 1108 | while (!(MCBSP_READ(mcbsp, SPCR1) & RRDY)) { | 1108 | while (!(MCBSP_READ(mcbsp, SPCR1) & RRDY)) { |
| 1109 | if (attemps++ > 1000) { | 1109 | if (attemps++ > 1000) { |
diff --git a/arch/arm/plat-pxa/include/plat/mfp.h b/arch/arm/plat-pxa/include/plat/mfp.h index 75f656471240..89e68e07b0a8 100644 --- a/arch/arm/plat-pxa/include/plat/mfp.h +++ b/arch/arm/plat-pxa/include/plat/mfp.h | |||
| @@ -434,7 +434,7 @@ typedef unsigned long mfp_cfg_t; | |||
| 434 | * | 434 | * |
| 435 | * mfp_init_addr() - accepts a table of "mfp_addr_map" structure, which | 435 | * mfp_init_addr() - accepts a table of "mfp_addr_map" structure, which |
| 436 | * represents a range of MFP pins from "start" to "end", with the offset | 436 | * represents a range of MFP pins from "start" to "end", with the offset |
| 437 | * begining at "offset", to define a single pin, let "end" = -1. | 437 | * beginning at "offset", to define a single pin, let "end" = -1. |
| 438 | * | 438 | * |
| 439 | * use | 439 | * use |
| 440 | * | 440 | * |
diff --git a/arch/arm/plat-s3c24xx/Makefile b/arch/arm/plat-s3c24xx/Makefile index c2064c308719..0291bd6e236e 100644 --- a/arch/arm/plat-s3c24xx/Makefile +++ b/arch/arm/plat-s3c24xx/Makefile | |||
| @@ -23,7 +23,7 @@ obj-$(CONFIG_S3C24XX_DCLK) += clock-dclk.o | |||
| 23 | obj-$(CONFIG_CPU_FREQ_S3C24XX) += cpu-freq.o | 23 | obj-$(CONFIG_CPU_FREQ_S3C24XX) += cpu-freq.o |
| 24 | obj-$(CONFIG_CPU_FREQ_S3C24XX_DEBUGFS) += cpu-freq-debugfs.o | 24 | obj-$(CONFIG_CPU_FREQ_S3C24XX_DEBUGFS) += cpu-freq-debugfs.o |
| 25 | 25 | ||
| 26 | # Architecture dependant builds | 26 | # Architecture dependent builds |
| 27 | 27 | ||
| 28 | obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o | 28 | obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o |
| 29 | obj-$(CONFIG_PM) += pm.o | 29 | obj-$(CONFIG_PM) += pm.o |
diff --git a/arch/arm/plat-s3c24xx/cpu-freq.c b/arch/arm/plat-s3c24xx/cpu-freq.c index eea75ff81d15..b3d3d0278997 100644 --- a/arch/arm/plat-s3c24xx/cpu-freq.c +++ b/arch/arm/plat-s3c24xx/cpu-freq.c | |||
| @@ -455,7 +455,7 @@ static int s3c_cpufreq_resume(struct cpufreq_policy *policy) | |||
| 455 | 455 | ||
| 456 | /* whilst we will be called later on, we try and re-set the | 456 | /* whilst we will be called later on, we try and re-set the |
| 457 | * cpu frequencies as soon as possible so that we do not end | 457 | * cpu frequencies as soon as possible so that we do not end |
| 458 | * up resuming devices and then immediatley having to re-set | 458 | * up resuming devices and then immediately having to re-set |
| 459 | * a number of settings once these devices have restarted. | 459 | * a number of settings once these devices have restarted. |
| 460 | * | 460 | * |
| 461 | * as a note, it is expected devices are not used until they | 461 | * as a note, it is expected devices are not used until they |
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index 6ad274e7593d..27ea852e3370 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c | |||
| @@ -557,7 +557,7 @@ s3c2410_dma_lastxfer(struct s3c2410_dma_chan *chan) | |||
| 557 | break; | 557 | break; |
| 558 | 558 | ||
| 559 | case S3C2410_DMALOAD_1LOADED_1RUNNING: | 559 | case S3C2410_DMALOAD_1LOADED_1RUNNING: |
| 560 | /* I belive in this case we do not have anything to do | 560 | /* I believe in this case we do not have anything to do |
| 561 | * until the next buffer comes along, and we turn off the | 561 | * until the next buffer comes along, and we turn off the |
| 562 | * reload */ | 562 | * reload */ |
| 563 | return; | 563 | return; |
diff --git a/arch/arm/plat-s5p/irq-gpioint.c b/arch/arm/plat-s5p/irq-gpioint.c index 46dd078147d8..cd6d67c8382a 100644 --- a/arch/arm/plat-s5p/irq-gpioint.c +++ b/arch/arm/plat-s5p/irq-gpioint.c | |||
| @@ -208,7 +208,7 @@ static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip) | |||
| 208 | } | 208 | } |
| 209 | 209 | ||
| 210 | /* | 210 | /* |
| 211 | * chained GPIO irq has been sucessfully registered, allocate new gpio | 211 | * chained GPIO irq has been successfully registered, allocate new gpio |
| 212 | * int group and assign irq nubmers | 212 | * int group and assign irq nubmers |
| 213 | */ | 213 | */ |
| 214 | 214 | ||
diff --git a/arch/arm/plat-s5p/pm.c b/arch/arm/plat-s5p/pm.c index d592b6304b48..d15dc47b0e3d 100644 --- a/arch/arm/plat-s5p/pm.c +++ b/arch/arm/plat-s5p/pm.c | |||
| @@ -19,17 +19,6 @@ | |||
| 19 | 19 | ||
| 20 | #define PFX "s5p pm: " | 20 | #define PFX "s5p pm: " |
| 21 | 21 | ||
| 22 | /* s3c_pm_check_resume_pin | ||
| 23 | * | ||
| 24 | * check to see if the pin is configured correctly for sleep mode, and | ||
| 25 | * make any necessary adjustments if it is not | ||
| 26 | */ | ||
| 27 | |||
| 28 | static void s3c_pm_check_resume_pin(unsigned int pin, unsigned int irqoffs) | ||
| 29 | { | ||
| 30 | /* nothing here yet */ | ||
| 31 | } | ||
| 32 | |||
| 33 | /* s3c_pm_configure_extint | 22 | /* s3c_pm_configure_extint |
| 34 | * | 23 | * |
| 35 | * configure all external interrupt pins | 24 | * configure all external interrupt pins |
diff --git a/arch/arm/plat-samsung/include/plat/clock.h b/arch/arm/plat-samsung/include/plat/clock.h index 9a82b8874918..983c578b8276 100644 --- a/arch/arm/plat-samsung/include/plat/clock.h +++ b/arch/arm/plat-samsung/include/plat/clock.h | |||
| @@ -21,7 +21,7 @@ struct clk; | |||
| 21 | * @set_parent: set the clock's parent, see clk_set_parent(). | 21 | * @set_parent: set the clock's parent, see clk_set_parent(). |
| 22 | * | 22 | * |
| 23 | * Group the common clock implementations together so that we | 23 | * Group the common clock implementations together so that we |
| 24 | * don't have to keep setting the same fiels again. We leave | 24 | * don't have to keep setting the same fields again. We leave |
| 25 | * enable in struct clk. | 25 | * enable in struct clk. |
| 26 | * | 26 | * |
| 27 | * Adding an extra layer of indirection into the process should | 27 | * Adding an extra layer of indirection into the process should |
diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h b/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h index 5603db0b79bc..3ad8386599c3 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h +++ b/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h | |||
| @@ -114,7 +114,7 @@ extern unsigned s3c_gpio_getcfg_s3c24xx_a(struct s3c_gpio_chip *chip, | |||
| 114 | * of control per GPIO, generally in the form of: | 114 | * of control per GPIO, generally in the form of: |
| 115 | * 0000 = Input | 115 | * 0000 = Input |
| 116 | * 0001 = Output | 116 | * 0001 = Output |
| 117 | * others = Special functions (dependant on bank) | 117 | * others = Special functions (dependent on bank) |
| 118 | * | 118 | * |
| 119 | * Note, since the code to deal with the case where there are two control | 119 | * Note, since the code to deal with the case where there are two control |
| 120 | * registers instead of one, we do not have a separate set of functions for | 120 | * registers instead of one, we do not have a separate set of functions for |
diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg.h b/arch/arm/plat-samsung/include/plat/gpio-cfg.h index 5e04fa6eda74..1762dcb4cb9e 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-cfg.h +++ b/arch/arm/plat-samsung/include/plat/gpio-cfg.h | |||
| @@ -125,7 +125,7 @@ extern int s3c_gpio_cfgpin_range(unsigned int start, unsigned int nr, | |||
| 125 | * | 125 | * |
| 126 | * These values control the state of the weak pull-{up,down} resistors | 126 | * These values control the state of the weak pull-{up,down} resistors |
| 127 | * available on most pins on the S3C series. Not all chips support both | 127 | * available on most pins on the S3C series. Not all chips support both |
| 128 | * up or down settings, and it may be dependant on the chip that is being | 128 | * up or down settings, and it may be dependent on the chip that is being |
| 129 | * used to whether the particular mode is available. | 129 | * used to whether the particular mode is available. |
| 130 | */ | 130 | */ |
| 131 | #define S3C_GPIO_PULL_NONE ((__force s3c_gpio_pull_t)0x00) | 131 | #define S3C_GPIO_PULL_NONE ((__force s3c_gpio_pull_t)0x00) |
| @@ -138,7 +138,7 @@ extern int s3c_gpio_cfgpin_range(unsigned int start, unsigned int nr, | |||
| 138 | * @pull: The configuration for the pull resistor. | 138 | * @pull: The configuration for the pull resistor. |
| 139 | * | 139 | * |
| 140 | * This function sets the state of the pull-{up,down} resistor for the | 140 | * This function sets the state of the pull-{up,down} resistor for the |
| 141 | * specified pin. It will return 0 if successfull, or a negative error | 141 | * specified pin. It will return 0 if successful, or a negative error |
| 142 | * code if the pin cannot support the requested pull setting. | 142 | * code if the pin cannot support the requested pull setting. |
| 143 | * | 143 | * |
| 144 | * @pull is one of S3C_GPIO_PULL_NONE, S3C_GPIO_PULL_DOWN or S3C_GPIO_PULL_UP. | 144 | * @pull is one of S3C_GPIO_PULL_NONE, S3C_GPIO_PULL_DOWN or S3C_GPIO_PULL_UP. |
| @@ -202,7 +202,7 @@ extern s5p_gpio_drvstr_t s5p_gpio_get_drvstr(unsigned int pin); | |||
| 202 | * @drvstr: The new value of the driver strength | 202 | * @drvstr: The new value of the driver strength |
| 203 | * | 203 | * |
| 204 | * This function sets the driver strength value for the specified pin. | 204 | * This function sets the driver strength value for the specified pin. |
| 205 | * It will return 0 if successfull, or a negative error code if the pin | 205 | * It will return 0 if successful, or a negative error code if the pin |
| 206 | * cannot support the requested setting. | 206 | * cannot support the requested setting. |
| 207 | */ | 207 | */ |
| 208 | extern int s5p_gpio_set_drvstr(unsigned int pin, s5p_gpio_drvstr_t drvstr); | 208 | extern int s5p_gpio_set_drvstr(unsigned int pin, s5p_gpio_drvstr_t drvstr); |
diff --git a/arch/arm/plat-samsung/include/plat/gpio-core.h b/arch/arm/plat-samsung/include/plat/gpio-core.h index dac35d0a711d..8cad4cf19c3c 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-core.h +++ b/arch/arm/plat-samsung/include/plat/gpio-core.h | |||
| @@ -108,7 +108,7 @@ extern void s3c_gpiolib_add(struct s3c_gpio_chip *chip); | |||
| 108 | * of control per GPIO, generally in the form of: | 108 | * of control per GPIO, generally in the form of: |
| 109 | * 0000 = Input | 109 | * 0000 = Input |
| 110 | * 0001 = Output | 110 | * 0001 = Output |
| 111 | * others = Special functions (dependant on bank) | 111 | * others = Special functions (dependent on bank) |
| 112 | * | 112 | * |
| 113 | * Note, since the code to deal with the case where there are two control | 113 | * Note, since the code to deal with the case where there are two control |
| 114 | * registers instead of one, we do not have a separate set of function | 114 | * registers instead of one, we do not have a separate set of function |
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h index b0bdf16549d5..058e09654fe8 100644 --- a/arch/arm/plat-samsung/include/plat/sdhci.h +++ b/arch/arm/plat-samsung/include/plat/sdhci.h | |||
| @@ -57,7 +57,7 @@ enum clk_types { | |||
| 57 | * @cfg_gpio: Configure the GPIO for a specific card bit-width | 57 | * @cfg_gpio: Configure the GPIO for a specific card bit-width |
| 58 | * @cfg_card: Configure the interface for a specific card and speed. This | 58 | * @cfg_card: Configure the interface for a specific card and speed. This |
| 59 | * is necessary the controllers and/or GPIO blocks require the | 59 | * is necessary the controllers and/or GPIO blocks require the |
| 60 | * changing of driver-strength and other controls dependant on | 60 | * changing of driver-strength and other controls dependent on |
| 61 | * the card and speed of operation. | 61 | * the card and speed of operation. |
| 62 | * | 62 | * |
| 63 | * Initialisation data specific to either the machine or the platform | 63 | * Initialisation data specific to either the machine or the platform |
| @@ -108,7 +108,7 @@ extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata; | |||
| 108 | extern struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata; | 108 | extern struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata; |
| 109 | extern struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata; | 109 | extern struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata; |
| 110 | 110 | ||
| 111 | /* Helper function availablity */ | 111 | /* Helper function availability */ |
| 112 | 112 | ||
| 113 | extern void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | 113 | extern void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *, int w); |
| 114 | extern void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | 114 | extern void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *, int w); |
diff --git a/arch/arm/plat-samsung/pm-check.c b/arch/arm/plat-samsung/pm-check.c index e4baf76f374a..6b733fafe7cd 100644 --- a/arch/arm/plat-samsung/pm-check.c +++ b/arch/arm/plat-samsung/pm-check.c | |||
| @@ -164,7 +164,6 @@ static inline int in_region(void *ptr, int size, void *what, size_t whatsz) | |||
| 164 | */ | 164 | */ |
| 165 | static u32 *s3c_pm_runcheck(struct resource *res, u32 *val) | 165 | static u32 *s3c_pm_runcheck(struct resource *res, u32 *val) |
| 166 | { | 166 | { |
| 167 | void *save_at = phys_to_virt(s3c_sleep_save_phys); | ||
| 168 | unsigned long addr; | 167 | unsigned long addr; |
| 169 | unsigned long left; | 168 | unsigned long left; |
| 170 | void *stkpage; | 169 | void *stkpage; |
| @@ -192,11 +191,6 @@ static u32 *s3c_pm_runcheck(struct resource *res, u32 *val) | |||
| 192 | goto skip_check; | 191 | goto skip_check; |
| 193 | } | 192 | } |
| 194 | 193 | ||
| 195 | if (in_region(ptr, left, save_at, 32*4 )) { | ||
| 196 | S3C_PMDBG("skipping %08lx, has save block in\n", addr); | ||
| 197 | goto skip_check; | ||
| 198 | } | ||
| 199 | |||
| 200 | /* calculate and check the checksum */ | 194 | /* calculate and check the checksum */ |
| 201 | 195 | ||
| 202 | calc = crc32_le(~0, ptr, left); | 196 | calc = crc32_le(~0, ptr, left); |
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c index d5b58d31903c..5c0a440d6e16 100644 --- a/arch/arm/plat-samsung/pm.c +++ b/arch/arm/plat-samsung/pm.c | |||
| @@ -214,8 +214,9 @@ void s3c_pm_do_restore_core(struct sleep_save *ptr, int count) | |||
| 214 | * | 214 | * |
| 215 | * print any IRQs asserted at resume time (ie, we woke from) | 215 | * print any IRQs asserted at resume time (ie, we woke from) |
| 216 | */ | 216 | */ |
| 217 | static void s3c_pm_show_resume_irqs(int start, unsigned long which, | 217 | static void __maybe_unused s3c_pm_show_resume_irqs(int start, |
| 218 | unsigned long mask) | 218 | unsigned long which, |
| 219 | unsigned long mask) | ||
| 219 | { | 220 | { |
| 220 | int i; | 221 | int i; |
| 221 | 222 | ||
diff --git a/arch/arm/plat-samsung/s3c-pl330.c b/arch/arm/plat-samsung/s3c-pl330.c index b4ff8d74ac40..f85638c6f5ae 100644 --- a/arch/arm/plat-samsung/s3c-pl330.c +++ b/arch/arm/plat-samsung/s3c-pl330.c | |||
| @@ -68,7 +68,7 @@ struct s3c_pl330_xfer { | |||
| 68 | * @req: Two requests to communicate with the PL330 engine. | 68 | * @req: Two requests to communicate with the PL330 engine. |
| 69 | * @callback_fn: Callback function to the client. | 69 | * @callback_fn: Callback function to the client. |
| 70 | * @rqcfg: Channel configuration for the xfers. | 70 | * @rqcfg: Channel configuration for the xfers. |
| 71 | * @xfer_head: Pointer to the xfer to be next excecuted. | 71 | * @xfer_head: Pointer to the xfer to be next executed. |
| 72 | * @dmac: Pointer to the DMAC that manages this channel, NULL if the | 72 | * @dmac: Pointer to the DMAC that manages this channel, NULL if the |
| 73 | * channel is available to be acquired. | 73 | * channel is available to be acquired. |
| 74 | * @client: Client of this channel. NULL if the | 74 | * @client: Client of this channel. NULL if the |
diff --git a/arch/arm/plat-spear/include/plat/clock.h b/arch/arm/plat-spear/include/plat/clock.h index 2ae6606930a6..fcc0d0ad4a1f 100644 --- a/arch/arm/plat-spear/include/plat/clock.h +++ b/arch/arm/plat-spear/include/plat/clock.h | |||
| @@ -89,7 +89,7 @@ struct rate_config { | |||
| 89 | * @sibling: node for list of clocks having same parents | 89 | * @sibling: node for list of clocks having same parents |
| 90 | * @private_data: clock specific private data | 90 | * @private_data: clock specific private data |
| 91 | * @node: list to maintain clocks linearly | 91 | * @node: list to maintain clocks linearly |
| 92 | * @cl: clocklook up assoicated with this clock | 92 | * @cl: clocklook up associated with this clock |
| 93 | * @dent: object for debugfs | 93 | * @dent: object for debugfs |
| 94 | */ | 94 | */ |
| 95 | struct clk { | 95 | struct clk { |
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index bbf3da012afd..f74695075e64 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
| @@ -78,6 +78,14 @@ static void vfp_thread_exit(struct thread_info *thread) | |||
| 78 | put_cpu(); | 78 | put_cpu(); |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | static void vfp_thread_copy(struct thread_info *thread) | ||
| 82 | { | ||
| 83 | struct thread_info *parent = current_thread_info(); | ||
| 84 | |||
| 85 | vfp_sync_hwstate(parent); | ||
| 86 | thread->vfpstate = parent->vfpstate; | ||
| 87 | } | ||
| 88 | |||
| 81 | /* | 89 | /* |
| 82 | * When this function is called with the following 'cmd's, the following | 90 | * When this function is called with the following 'cmd's, the following |
| 83 | * is true while this function is being run: | 91 | * is true while this function is being run: |
| @@ -104,12 +112,17 @@ static void vfp_thread_exit(struct thread_info *thread) | |||
| 104 | static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v) | 112 | static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v) |
| 105 | { | 113 | { |
| 106 | struct thread_info *thread = v; | 114 | struct thread_info *thread = v; |
| 115 | u32 fpexc; | ||
| 116 | #ifdef CONFIG_SMP | ||
| 117 | unsigned int cpu; | ||
| 118 | #endif | ||
| 107 | 119 | ||
| 108 | if (likely(cmd == THREAD_NOTIFY_SWITCH)) { | 120 | switch (cmd) { |
| 109 | u32 fpexc = fmrx(FPEXC); | 121 | case THREAD_NOTIFY_SWITCH: |
| 122 | fpexc = fmrx(FPEXC); | ||
| 110 | 123 | ||
| 111 | #ifdef CONFIG_SMP | 124 | #ifdef CONFIG_SMP |
| 112 | unsigned int cpu = thread->cpu; | 125 | cpu = thread->cpu; |
| 113 | 126 | ||
| 114 | /* | 127 | /* |
| 115 | * On SMP, if VFP is enabled, save the old state in | 128 | * On SMP, if VFP is enabled, save the old state in |
| @@ -134,13 +147,20 @@ static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v) | |||
| 134 | * old state. | 147 | * old state. |
| 135 | */ | 148 | */ |
| 136 | fmxr(FPEXC, fpexc & ~FPEXC_EN); | 149 | fmxr(FPEXC, fpexc & ~FPEXC_EN); |
| 137 | return NOTIFY_DONE; | 150 | break; |
| 138 | } | ||
| 139 | 151 | ||
| 140 | if (cmd == THREAD_NOTIFY_FLUSH) | 152 | case THREAD_NOTIFY_FLUSH: |
| 141 | vfp_thread_flush(thread); | 153 | vfp_thread_flush(thread); |
| 142 | else | 154 | break; |
| 155 | |||
| 156 | case THREAD_NOTIFY_EXIT: | ||
| 143 | vfp_thread_exit(thread); | 157 | vfp_thread_exit(thread); |
| 158 | break; | ||
| 159 | |||
| 160 | case THREAD_NOTIFY_COPY: | ||
| 161 | vfp_thread_copy(thread); | ||
| 162 | break; | ||
| 163 | } | ||
| 144 | 164 | ||
| 145 | return NOTIFY_DONE; | 165 | return NOTIFY_DONE; |
| 146 | } | 166 | } |
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig index 49642b59f73d..e9d689b7c833 100644 --- a/arch/avr32/Kconfig +++ b/arch/avr32/Kconfig | |||
| @@ -10,7 +10,6 @@ config AVR32 | |||
| 10 | select GENERIC_IRQ_PROBE | 10 | select GENERIC_IRQ_PROBE |
| 11 | select HARDIRQS_SW_RESEND | 11 | select HARDIRQS_SW_RESEND |
| 12 | select GENERIC_IRQ_SHOW | 12 | select GENERIC_IRQ_SHOW |
| 13 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
| 14 | help | 13 | help |
| 15 | AVR32 is a high-performance 32-bit RISC microprocessor core, | 14 | AVR32 is a high-performance 32-bit RISC microprocessor core, |
| 16 | designed for cost-sensitive embedded applications, with particular | 15 | designed for cost-sensitive embedded applications, with particular |
diff --git a/arch/avr32/include/asm/setup.h b/arch/avr32/include/asm/setup.h index ff5b7cf6be4d..160543dbec7e 100644 --- a/arch/avr32/include/asm/setup.h +++ b/arch/avr32/include/asm/setup.h | |||
| @@ -94,6 +94,13 @@ struct tag_ethernet { | |||
| 94 | 94 | ||
| 95 | #define ETH_INVALID_PHY 0xff | 95 | #define ETH_INVALID_PHY 0xff |
| 96 | 96 | ||
| 97 | /* board information */ | ||
| 98 | #define ATAG_BOARDINFO 0x54410008 | ||
| 99 | |||
| 100 | struct tag_boardinfo { | ||
| 101 | u32 board_number; | ||
| 102 | }; | ||
| 103 | |||
| 97 | struct tag { | 104 | struct tag { |
| 98 | struct tag_header hdr; | 105 | struct tag_header hdr; |
| 99 | union { | 106 | union { |
| @@ -102,6 +109,7 @@ struct tag { | |||
| 102 | struct tag_cmdline cmdline; | 109 | struct tag_cmdline cmdline; |
| 103 | struct tag_clock clock; | 110 | struct tag_clock clock; |
| 104 | struct tag_ethernet ethernet; | 111 | struct tag_ethernet ethernet; |
| 112 | struct tag_boardinfo boardinfo; | ||
| 105 | } u; | 113 | } u; |
| 106 | }; | 114 | }; |
| 107 | 115 | ||
| @@ -128,6 +136,7 @@ extern struct tag *bootloader_tags; | |||
| 128 | 136 | ||
| 129 | extern resource_size_t fbmem_start; | 137 | extern resource_size_t fbmem_start; |
| 130 | extern resource_size_t fbmem_size; | 138 | extern resource_size_t fbmem_size; |
| 139 | extern u32 board_number; | ||
| 131 | 140 | ||
| 132 | void setup_processor(void); | 141 | void setup_processor(void); |
| 133 | 142 | ||
diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c index 5c7083916c33..bb0974cce4ac 100644 --- a/arch/avr32/kernel/setup.c +++ b/arch/avr32/kernel/setup.c | |||
| @@ -391,6 +391,21 @@ static int __init parse_tag_clock(struct tag *tag) | |||
| 391 | __tagtable(ATAG_CLOCK, parse_tag_clock); | 391 | __tagtable(ATAG_CLOCK, parse_tag_clock); |
| 392 | 392 | ||
| 393 | /* | 393 | /* |
| 394 | * The board_number correspond to the bd->bi_board_number in U-Boot. This | ||
| 395 | * parameter is only available during initialisation and can be used in some | ||
| 396 | * kind of board identification. | ||
| 397 | */ | ||
| 398 | u32 __initdata board_number; | ||
| 399 | |||
| 400 | static int __init parse_tag_boardinfo(struct tag *tag) | ||
| 401 | { | ||
| 402 | board_number = tag->u.boardinfo.board_number; | ||
| 403 | |||
| 404 | return 0; | ||
| 405 | } | ||
| 406 | __tagtable(ATAG_BOARDINFO, parse_tag_boardinfo); | ||
| 407 | |||
| 408 | /* | ||
| 394 | * Scan the tag table for this tag, and call its parse function. The | 409 | * Scan the tag table for this tag, and call its parse function. The |
| 395 | * tag table is built by the linker from all the __tagtable | 410 | * tag table is built by the linker from all the __tagtable |
| 396 | * declarations. | 411 | * declarations. |
diff --git a/arch/avr32/kernel/traps.c b/arch/avr32/kernel/traps.c index b91b2044af9c..7aa25756412f 100644 --- a/arch/avr32/kernel/traps.c +++ b/arch/avr32/kernel/traps.c | |||
| @@ -95,28 +95,6 @@ void _exception(long signr, struct pt_regs *regs, int code, | |||
| 95 | info.si_code = code; | 95 | info.si_code = code; |
| 96 | info.si_addr = (void __user *)addr; | 96 | info.si_addr = (void __user *)addr; |
| 97 | force_sig_info(signr, &info, current); | 97 | force_sig_info(signr, &info, current); |
| 98 | |||
| 99 | /* | ||
| 100 | * Init gets no signals that it doesn't have a handler for. | ||
| 101 | * That's all very well, but if it has caused a synchronous | ||
| 102 | * exception and we ignore the resulting signal, it will just | ||
| 103 | * generate the same exception over and over again and we get | ||
| 104 | * nowhere. Better to kill it and let the kernel panic. | ||
| 105 | */ | ||
| 106 | if (is_global_init(current)) { | ||
| 107 | __sighandler_t handler; | ||
| 108 | |||
| 109 | spin_lock_irq(¤t->sighand->siglock); | ||
| 110 | handler = current->sighand->action[signr-1].sa.sa_handler; | ||
| 111 | spin_unlock_irq(¤t->sighand->siglock); | ||
| 112 | if (handler == SIG_DFL) { | ||
| 113 | /* init has generated a synchronous exception | ||
| 114 | and it doesn't have a handler for the signal */ | ||
| 115 | printk(KERN_CRIT "init has generated signal %ld " | ||
| 116 | "but has no handler for it\n", signr); | ||
| 117 | do_exit(signr); | ||
| 118 | } | ||
| 119 | } | ||
| 120 | } | 98 | } |
| 121 | 99 | ||
| 122 | asmlinkage void do_nmi(unsigned long ecr, struct pt_regs *regs) | 100 | asmlinkage void do_nmi(unsigned long ecr, struct pt_regs *regs) |
diff --git a/arch/avr32/mach-at32ap/clock.c b/arch/avr32/mach-at32ap/clock.c index 442f08c5e641..86925fd6ea5b 100644 --- a/arch/avr32/mach-at32ap/clock.c +++ b/arch/avr32/mach-at32ap/clock.c | |||
| @@ -35,22 +35,30 @@ void at32_clk_register(struct clk *clk) | |||
| 35 | spin_unlock(&clk_list_lock); | 35 | spin_unlock(&clk_list_lock); |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | struct clk *clk_get(struct device *dev, const char *id) | 38 | static struct clk *__clk_get(struct device *dev, const char *id) |
| 39 | { | 39 | { |
| 40 | struct clk *clk; | 40 | struct clk *clk; |
| 41 | 41 | ||
| 42 | spin_lock(&clk_list_lock); | ||
| 43 | |||
| 44 | list_for_each_entry(clk, &at32_clock_list, list) { | 42 | list_for_each_entry(clk, &at32_clock_list, list) { |
| 45 | if (clk->dev == dev && strcmp(id, clk->name) == 0) { | 43 | if (clk->dev == dev && strcmp(id, clk->name) == 0) { |
| 46 | spin_unlock(&clk_list_lock); | ||
| 47 | return clk; | 44 | return clk; |
| 48 | } | 45 | } |
| 49 | } | 46 | } |
| 50 | 47 | ||
| 51 | spin_unlock(&clk_list_lock); | ||
| 52 | return ERR_PTR(-ENOENT); | 48 | return ERR_PTR(-ENOENT); |
| 53 | } | 49 | } |
| 50 | |||
| 51 | struct clk *clk_get(struct device *dev, const char *id) | ||
| 52 | { | ||
| 53 | struct clk *clk; | ||
| 54 | |||
| 55 | spin_lock(&clk_list_lock); | ||
| 56 | clk = __clk_get(dev, id); | ||
| 57 | spin_unlock(&clk_list_lock); | ||
| 58 | |||
| 59 | return clk; | ||
| 60 | } | ||
| 61 | |||
| 54 | EXPORT_SYMBOL(clk_get); | 62 | EXPORT_SYMBOL(clk_get); |
| 55 | 63 | ||
| 56 | void clk_put(struct clk *clk) | 64 | void clk_put(struct clk *clk) |
| @@ -257,15 +265,15 @@ static int clk_show(struct seq_file *s, void *unused) | |||
| 257 | spin_lock(&clk_list_lock); | 265 | spin_lock(&clk_list_lock); |
| 258 | 266 | ||
| 259 | /* show clock tree as derived from the three oscillators */ | 267 | /* show clock tree as derived from the three oscillators */ |
| 260 | clk = clk_get(NULL, "osc32k"); | 268 | clk = __clk_get(NULL, "osc32k"); |
| 261 | dump_clock(clk, &r); | 269 | dump_clock(clk, &r); |
| 262 | clk_put(clk); | 270 | clk_put(clk); |
| 263 | 271 | ||
| 264 | clk = clk_get(NULL, "osc0"); | 272 | clk = __clk_get(NULL, "osc0"); |
| 265 | dump_clock(clk, &r); | 273 | dump_clock(clk, &r); |
| 266 | clk_put(clk); | 274 | clk_put(clk); |
| 267 | 275 | ||
| 268 | clk = clk_get(NULL, "osc1"); | 276 | clk = __clk_get(NULL, "osc1"); |
| 269 | dump_clock(clk, &r); | 277 | dump_clock(clk, &r); |
| 270 | clk_put(clk); | 278 | clk_put(clk); |
| 271 | 279 | ||
diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c index 47ba4b9b6db1..fbc2aeaebddb 100644 --- a/arch/avr32/mach-at32ap/extint.c +++ b/arch/avr32/mach-at32ap/extint.c | |||
| @@ -61,34 +61,34 @@ struct eic { | |||
| 61 | static struct eic *nmi_eic; | 61 | static struct eic *nmi_eic; |
| 62 | static bool nmi_enabled; | 62 | static bool nmi_enabled; |
| 63 | 63 | ||
| 64 | static void eic_ack_irq(struct irq_chip *d) | 64 | static void eic_ack_irq(struct irq_data *d) |
| 65 | { | 65 | { |
| 66 | struct eic *eic = irq_data_get_irq_chip_data(data); | 66 | struct eic *eic = irq_data_get_irq_chip_data(d); |
| 67 | eic_writel(eic, ICR, 1 << (d->irq - eic->first_irq)); | 67 | eic_writel(eic, ICR, 1 << (d->irq - eic->first_irq)); |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | static void eic_mask_irq(struct irq_chip *d) | 70 | static void eic_mask_irq(struct irq_data *d) |
| 71 | { | 71 | { |
| 72 | struct eic *eic = irq_data_get_irq_chip_data(data); | 72 | struct eic *eic = irq_data_get_irq_chip_data(d); |
| 73 | eic_writel(eic, IDR, 1 << (d->irq - eic->first_irq)); | 73 | eic_writel(eic, IDR, 1 << (d->irq - eic->first_irq)); |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | static void eic_mask_ack_irq(struct irq_chip *d) | 76 | static void eic_mask_ack_irq(struct irq_data *d) |
| 77 | { | 77 | { |
| 78 | struct eic *eic = irq_data_get_irq_chip_data(data); | 78 | struct eic *eic = irq_data_get_irq_chip_data(d); |
| 79 | eic_writel(eic, ICR, 1 << (d->irq - eic->first_irq)); | 79 | eic_writel(eic, ICR, 1 << (d->irq - eic->first_irq)); |
| 80 | eic_writel(eic, IDR, 1 << (d->irq - eic->first_irq)); | 80 | eic_writel(eic, IDR, 1 << (d->irq - eic->first_irq)); |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | static void eic_unmask_irq(struct irq_chip *d) | 83 | static void eic_unmask_irq(struct irq_data *d) |
| 84 | { | 84 | { |
| 85 | struct eic *eic = irq_data_get_irq_chip_data(data); | 85 | struct eic *eic = irq_data_get_irq_chip_data(d); |
| 86 | eic_writel(eic, IER, 1 << (d->irq - eic->first_irq)); | 86 | eic_writel(eic, IER, 1 << (d->irq - eic->first_irq)); |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | static int eic_set_irq_type(struct irq_chip *d, unsigned int flow_type) | 89 | static int eic_set_irq_type(struct irq_data *d, unsigned int flow_type) |
| 90 | { | 90 | { |
| 91 | struct eic *eic = irq_data_get_irq_chip_data(data); | 91 | struct eic *eic = irq_data_get_irq_chip_data(d); |
| 92 | unsigned int irq = d->irq; | 92 | unsigned int irq = d->irq; |
| 93 | unsigned int i = irq - eic->first_irq; | 93 | unsigned int i = irq - eic->first_irq; |
| 94 | u32 mode, edge, level; | 94 | u32 mode, edge, level; |
| @@ -191,7 +191,7 @@ static int __init eic_probe(struct platform_device *pdev) | |||
| 191 | 191 | ||
| 192 | regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 192 | regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 193 | int_irq = platform_get_irq(pdev, 0); | 193 | int_irq = platform_get_irq(pdev, 0); |
| 194 | if (!regs || !int_irq) { | 194 | if (!regs || (int)int_irq <= 0) { |
| 195 | dev_dbg(&pdev->dev, "missing regs and/or irq resource\n"); | 195 | dev_dbg(&pdev->dev, "missing regs and/or irq resource\n"); |
| 196 | return -ENXIO; | 196 | return -ENXIO; |
| 197 | } | 197 | } |
diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c index 37534103574e..2e0aa853a4bc 100644 --- a/arch/avr32/mach-at32ap/pio.c +++ b/arch/avr32/mach-at32ap/pio.c | |||
| @@ -257,7 +257,7 @@ static void gpio_irq_mask(struct irq_data *d) | |||
| 257 | pio_writel(pio, IDR, 1 << (gpio & 0x1f)); | 257 | pio_writel(pio, IDR, 1 << (gpio & 0x1f)); |
| 258 | } | 258 | } |
| 259 | 259 | ||
| 260 | static void gpio_irq_unmask(struct irq_data *d)) | 260 | static void gpio_irq_unmask(struct irq_data *d) |
| 261 | { | 261 | { |
| 262 | unsigned gpio = irq_to_gpio(d->irq); | 262 | unsigned gpio = irq_to_gpio(d->irq); |
| 263 | struct pio_device *pio = &pio_dev[gpio >> 5]; | 263 | struct pio_device *pio = &pio_dev[gpio >> 5]; |
| @@ -282,7 +282,7 @@ static struct irq_chip gpio_irqchip = { | |||
| 282 | 282 | ||
| 283 | static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) | 283 | static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) |
| 284 | { | 284 | { |
| 285 | struct pio_device *pio = get_irq_desc_chip_data(desc); | 285 | struct pio_device *pio = irq_desc_get_chip_data(desc); |
| 286 | unsigned gpio_irq; | 286 | unsigned gpio_irq; |
| 287 | 287 | ||
| 288 | gpio_irq = (unsigned) irq_get_handler_data(irq); | 288 | gpio_irq = (unsigned) irq_get_handler_data(irq); |
diff --git a/arch/avr32/mach-at32ap/pm-at32ap700x.S b/arch/avr32/mach-at32ap/pm-at32ap700x.S index 17503b0ed6c9..f868f4ce761b 100644 --- a/arch/avr32/mach-at32ap/pm-at32ap700x.S +++ b/arch/avr32/mach-at32ap/pm-at32ap700x.S | |||
| @@ -53,7 +53,7 @@ cpu_enter_idle: | |||
| 53 | st.w r8[TI_flags], r9 | 53 | st.w r8[TI_flags], r9 |
| 54 | unmask_interrupts | 54 | unmask_interrupts |
| 55 | sleep CPU_SLEEP_IDLE | 55 | sleep CPU_SLEEP_IDLE |
| 56 | .size cpu_idle_sleep, . - cpu_idle_sleep | 56 | .size cpu_enter_idle, . - cpu_enter_idle |
| 57 | 57 | ||
| 58 | /* | 58 | /* |
| 59 | * Common return path for PM functions that don't run from | 59 | * Common return path for PM functions that don't run from |
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 672c21632f2f..8addb1220b4f 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
| @@ -34,7 +34,6 @@ config BLACKFIN | |||
| 34 | select GENERIC_ATOMIC64 | 34 | select GENERIC_ATOMIC64 |
| 35 | select GENERIC_IRQ_PROBE | 35 | select GENERIC_IRQ_PROBE |
| 36 | select IRQ_PER_CPU if SMP | 36 | select IRQ_PER_CPU if SMP |
| 37 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
| 38 | 37 | ||
| 39 | config GENERIC_CSUM | 38 | config GENERIC_CSUM |
| 40 | def_bool y | 39 | def_bool y |
diff --git a/arch/blackfin/Kconfig.debug b/arch/blackfin/Kconfig.debug index acb83799a215..2641731f24cd 100644 --- a/arch/blackfin/Kconfig.debug +++ b/arch/blackfin/Kconfig.debug | |||
| @@ -59,7 +59,7 @@ config EXACT_HWERR | |||
| 59 | be reported multiple cycles after the error happens. This delay | 59 | be reported multiple cycles after the error happens. This delay |
| 60 | can cause the wrong application, or even the kernel to receive a | 60 | can cause the wrong application, or even the kernel to receive a |
| 61 | signal to be killed. If you are getting HW errors in your system, | 61 | signal to be killed. If you are getting HW errors in your system, |
| 62 | try turning this on to ensure they are at least comming from the | 62 | try turning this on to ensure they are at least coming from the |
| 63 | proper thread. | 63 | proper thread. |
| 64 | 64 | ||
| 65 | On production systems, it is safe (and a small optimization) to say N. | 65 | On production systems, it is safe (and a small optimization) to say N. |
diff --git a/arch/blackfin/configs/BF527-AD7160-EVAL_defconfig b/arch/blackfin/configs/BF527-AD7160-EVAL_defconfig index 362f59dd5228..ad0881ba30af 100644 --- a/arch/blackfin/configs/BF527-AD7160-EVAL_defconfig +++ b/arch/blackfin/configs/BF527-AD7160-EVAL_defconfig | |||
| @@ -46,7 +46,6 @@ CONFIG_UNIX=y | |||
| 46 | # CONFIG_WIRELESS is not set | 46 | # CONFIG_WIRELESS is not set |
| 47 | CONFIG_BLK_DEV_LOOP=y | 47 | CONFIG_BLK_DEV_LOOP=y |
| 48 | CONFIG_BLK_DEV_RAM=y | 48 | CONFIG_BLK_DEV_RAM=y |
| 49 | # CONFIG_MISC_DEVICES is not set | ||
| 50 | # CONFIG_INPUT_MOUSEDEV is not set | 49 | # CONFIG_INPUT_MOUSEDEV is not set |
| 51 | CONFIG_INPUT_EVDEV=y | 50 | CONFIG_INPUT_EVDEV=y |
| 52 | # CONFIG_INPUT_KEYBOARD is not set | 51 | # CONFIG_INPUT_KEYBOARD is not set |
diff --git a/arch/blackfin/configs/BF538-EZKIT_defconfig b/arch/blackfin/configs/BF538-EZKIT_defconfig index 6883803e6ca8..580bf4296a14 100644 --- a/arch/blackfin/configs/BF538-EZKIT_defconfig +++ b/arch/blackfin/configs/BF538-EZKIT_defconfig | |||
| @@ -70,7 +70,6 @@ CONFIG_MTD_ROM=m | |||
| 70 | CONFIG_MTD_PHYSMAP=m | 70 | CONFIG_MTD_PHYSMAP=m |
| 71 | CONFIG_MTD_NAND=m | 71 | CONFIG_MTD_NAND=m |
| 72 | CONFIG_BLK_DEV_RAM=y | 72 | CONFIG_BLK_DEV_RAM=y |
| 73 | # CONFIG_MISC_DEVICES is not set | ||
| 74 | CONFIG_NETDEVICES=y | 73 | CONFIG_NETDEVICES=y |
| 75 | CONFIG_PHYLIB=y | 74 | CONFIG_PHYLIB=y |
| 76 | CONFIG_SMSC_PHY=y | 75 | CONFIG_SMSC_PHY=y |
diff --git a/arch/blackfin/configs/BF561-ACVILON_defconfig b/arch/blackfin/configs/BF561-ACVILON_defconfig index b7c8451f26ac..77a27e31d6d1 100644 --- a/arch/blackfin/configs/BF561-ACVILON_defconfig +++ b/arch/blackfin/configs/BF561-ACVILON_defconfig | |||
| @@ -63,7 +63,6 @@ CONFIG_BLK_DEV_LOOP=y | |||
| 63 | CONFIG_BLK_DEV_RAM=y | 63 | CONFIG_BLK_DEV_RAM=y |
| 64 | CONFIG_BLK_DEV_RAM_COUNT=2 | 64 | CONFIG_BLK_DEV_RAM_COUNT=2 |
| 65 | CONFIG_BLK_DEV_RAM_SIZE=16384 | 65 | CONFIG_BLK_DEV_RAM_SIZE=16384 |
| 66 | # CONFIG_MISC_DEVICES is not set | ||
| 67 | CONFIG_SCSI=y | 66 | CONFIG_SCSI=y |
| 68 | # CONFIG_SCSI_PROC_FS is not set | 67 | # CONFIG_SCSI_PROC_FS is not set |
| 69 | CONFIG_BLK_DEV_SD=y | 68 | CONFIG_BLK_DEV_SD=y |
diff --git a/arch/blackfin/configs/BlackStamp_defconfig b/arch/blackfin/configs/BlackStamp_defconfig index 97ebe09a7370..85014319672c 100644 --- a/arch/blackfin/configs/BlackStamp_defconfig +++ b/arch/blackfin/configs/BlackStamp_defconfig | |||
| @@ -58,6 +58,7 @@ CONFIG_MTD_M25P80=y | |||
| 58 | CONFIG_BLK_DEV_LOOP=y | 58 | CONFIG_BLK_DEV_LOOP=y |
| 59 | CONFIG_BLK_DEV_NBD=y | 59 | CONFIG_BLK_DEV_NBD=y |
| 60 | CONFIG_BLK_DEV_RAM=y | 60 | CONFIG_BLK_DEV_RAM=y |
| 61 | CONFIG_MISC_DEVICES=y | ||
| 61 | CONFIG_EEPROM_AT25=y | 62 | CONFIG_EEPROM_AT25=y |
| 62 | CONFIG_NETDEVICES=y | 63 | CONFIG_NETDEVICES=y |
| 63 | CONFIG_NET_ETHERNET=y | 64 | CONFIG_NET_ETHERNET=y |
diff --git a/arch/blackfin/configs/CM-BF527_defconfig b/arch/blackfin/configs/CM-BF527_defconfig index c2457543e58c..dbf750cd2db8 100644 --- a/arch/blackfin/configs/CM-BF527_defconfig +++ b/arch/blackfin/configs/CM-BF527_defconfig | |||
| @@ -64,7 +64,6 @@ CONFIG_MTD_ROM=m | |||
| 64 | CONFIG_MTD_COMPLEX_MAPPINGS=y | 64 | CONFIG_MTD_COMPLEX_MAPPINGS=y |
| 65 | CONFIG_MTD_GPIO_ADDR=y | 65 | CONFIG_MTD_GPIO_ADDR=y |
| 66 | CONFIG_BLK_DEV_RAM=y | 66 | CONFIG_BLK_DEV_RAM=y |
| 67 | # CONFIG_MISC_DEVICES is not set | ||
| 68 | CONFIG_SCSI=y | 67 | CONFIG_SCSI=y |
| 69 | CONFIG_BLK_DEV_SD=y | 68 | CONFIG_BLK_DEV_SD=y |
| 70 | # CONFIG_SCSI_LOWLEVEL is not set | 69 | # CONFIG_SCSI_LOWLEVEL is not set |
diff --git a/arch/blackfin/configs/CM-BF533_defconfig b/arch/blackfin/configs/CM-BF533_defconfig index baf1c1573e5e..07ffbdae34ee 100644 --- a/arch/blackfin/configs/CM-BF533_defconfig +++ b/arch/blackfin/configs/CM-BF533_defconfig | |||
| @@ -44,7 +44,6 @@ CONFIG_MTD_CFI=y | |||
| 44 | CONFIG_MTD_CFI_INTELEXT=y | 44 | CONFIG_MTD_CFI_INTELEXT=y |
| 45 | CONFIG_MTD_RAM=y | 45 | CONFIG_MTD_RAM=y |
| 46 | CONFIG_MTD_PHYSMAP=y | 46 | CONFIG_MTD_PHYSMAP=y |
| 47 | # CONFIG_MISC_DEVICES is not set | ||
| 48 | CONFIG_NETDEVICES=y | 47 | CONFIG_NETDEVICES=y |
| 49 | # CONFIG_NETDEV_1000 is not set | 48 | # CONFIG_NETDEV_1000 is not set |
| 50 | # CONFIG_NETDEV_10000 is not set | 49 | # CONFIG_NETDEV_10000 is not set |
diff --git a/arch/blackfin/configs/CM-BF548_defconfig b/arch/blackfin/configs/CM-BF548_defconfig index df267588efec..31d954216c05 100644 --- a/arch/blackfin/configs/CM-BF548_defconfig +++ b/arch/blackfin/configs/CM-BF548_defconfig | |||
| @@ -63,7 +63,6 @@ CONFIG_MTD_RAM=y | |||
| 63 | CONFIG_MTD_COMPLEX_MAPPINGS=y | 63 | CONFIG_MTD_COMPLEX_MAPPINGS=y |
| 64 | CONFIG_MTD_PHYSMAP=y | 64 | CONFIG_MTD_PHYSMAP=y |
| 65 | CONFIG_BLK_DEV_RAM=y | 65 | CONFIG_BLK_DEV_RAM=y |
| 66 | # CONFIG_MISC_DEVICES is not set | ||
| 67 | CONFIG_SCSI=m | 66 | CONFIG_SCSI=m |
| 68 | CONFIG_BLK_DEV_SD=m | 67 | CONFIG_BLK_DEV_SD=m |
| 69 | # CONFIG_SCSI_LOWLEVEL is not set | 68 | # CONFIG_SCSI_LOWLEVEL is not set |
diff --git a/arch/blackfin/configs/DNP5370_defconfig b/arch/blackfin/configs/DNP5370_defconfig index f50313657f3e..b192acfae386 100644 --- a/arch/blackfin/configs/DNP5370_defconfig +++ b/arch/blackfin/configs/DNP5370_defconfig | |||
| @@ -55,7 +55,6 @@ CONFIG_MTD_NAND=y | |||
| 55 | CONFIG_MTD_NAND_PLATFORM=y | 55 | CONFIG_MTD_NAND_PLATFORM=y |
| 56 | CONFIG_BLK_DEV_LOOP=y | 56 | CONFIG_BLK_DEV_LOOP=y |
| 57 | CONFIG_BLK_DEV_RAM=y | 57 | CONFIG_BLK_DEV_RAM=y |
| 58 | # CONFIG_MISC_DEVICES is not set | ||
| 59 | CONFIG_NETDEVICES=y | 58 | CONFIG_NETDEVICES=y |
| 60 | CONFIG_DAVICOM_PHY=y | 59 | CONFIG_DAVICOM_PHY=y |
| 61 | CONFIG_NET_ETHERNET=y | 60 | CONFIG_NET_ETHERNET=y |
diff --git a/arch/blackfin/configs/H8606_defconfig b/arch/blackfin/configs/H8606_defconfig index 7450127b6455..06e9f497faed 100644 --- a/arch/blackfin/configs/H8606_defconfig +++ b/arch/blackfin/configs/H8606_defconfig | |||
| @@ -45,6 +45,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y | |||
| 45 | CONFIG_MTD_M25P80=y | 45 | CONFIG_MTD_M25P80=y |
| 46 | # CONFIG_M25PXX_USE_FAST_READ is not set | 46 | # CONFIG_M25PXX_USE_FAST_READ is not set |
| 47 | CONFIG_BLK_DEV_RAM=y | 47 | CONFIG_BLK_DEV_RAM=y |
| 48 | CONFIG_MISC_DEVICES=y | ||
| 48 | CONFIG_EEPROM_AT25=y | 49 | CONFIG_EEPROM_AT25=y |
| 49 | CONFIG_NETDEVICES=y | 50 | CONFIG_NETDEVICES=y |
| 50 | CONFIG_NET_ETHERNET=y | 51 | CONFIG_NET_ETHERNET=y |
diff --git a/arch/blackfin/configs/SRV1_defconfig b/arch/blackfin/configs/SRV1_defconfig index 853809510ee9..12e66cd7cdaa 100644 --- a/arch/blackfin/configs/SRV1_defconfig +++ b/arch/blackfin/configs/SRV1_defconfig | |||
| @@ -48,6 +48,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y | |||
| 48 | CONFIG_MTD_UCLINUX=y | 48 | CONFIG_MTD_UCLINUX=y |
| 49 | CONFIG_MTD_NAND=m | 49 | CONFIG_MTD_NAND=m |
| 50 | CONFIG_BLK_DEV_RAM=y | 50 | CONFIG_BLK_DEV_RAM=y |
| 51 | CONFIG_MISC_DEVICES=y | ||
| 51 | CONFIG_EEPROM_AT25=m | 52 | CONFIG_EEPROM_AT25=m |
| 52 | CONFIG_NETDEVICES=y | 53 | CONFIG_NETDEVICES=y |
| 53 | # CONFIG_NETDEV_1000 is not set | 54 | # CONFIG_NETDEV_1000 is not set |
diff --git a/arch/blackfin/include/asm/bitops.h b/arch/blackfin/include/asm/bitops.h index 49762c6bb0d5..8a0fed16058f 100644 --- a/arch/blackfin/include/asm/bitops.h +++ b/arch/blackfin/include/asm/bitops.h | |||
| @@ -25,7 +25,6 @@ | |||
| 25 | #include <asm-generic/bitops/const_hweight.h> | 25 | #include <asm-generic/bitops/const_hweight.h> |
| 26 | #include <asm-generic/bitops/lock.h> | 26 | #include <asm-generic/bitops/lock.h> |
| 27 | 27 | ||
| 28 | #include <asm-generic/bitops/le.h> | ||
| 29 | #include <asm-generic/bitops/ext2-atomic.h> | 28 | #include <asm-generic/bitops/ext2-atomic.h> |
| 30 | 29 | ||
| 31 | #ifndef CONFIG_SMP | 30 | #ifndef CONFIG_SMP |
| @@ -113,6 +112,9 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr) | |||
| 113 | 112 | ||
| 114 | #endif /* CONFIG_SMP */ | 113 | #endif /* CONFIG_SMP */ |
| 115 | 114 | ||
| 115 | /* Needs to be after test_bit and friends */ | ||
| 116 | #include <asm-generic/bitops/le.h> | ||
| 117 | |||
| 116 | /* | 118 | /* |
| 117 | * hweightN: returns the hamming weight (i.e. the number | 119 | * hweightN: returns the hamming weight (i.e. the number |
| 118 | * of bits set) of a N-bit word | 120 | * of bits set) of a N-bit word |
diff --git a/arch/blackfin/include/asm/system.h b/arch/blackfin/include/asm/system.h index 19e2c7c3e63a..44bd0cced725 100644 --- a/arch/blackfin/include/asm/system.h +++ b/arch/blackfin/include/asm/system.h | |||
| @@ -19,11 +19,11 @@ | |||
| 19 | * Force strict CPU ordering. | 19 | * Force strict CPU ordering. |
| 20 | */ | 20 | */ |
| 21 | #define nop() __asm__ __volatile__ ("nop;\n\t" : : ) | 21 | #define nop() __asm__ __volatile__ ("nop;\n\t" : : ) |
| 22 | #define mb() __asm__ __volatile__ ("" : : : "memory") | 22 | #define smp_mb() mb() |
| 23 | #define rmb() __asm__ __volatile__ ("" : : : "memory") | 23 | #define smp_rmb() rmb() |
| 24 | #define wmb() __asm__ __volatile__ ("" : : : "memory") | 24 | #define smp_wmb() wmb() |
| 25 | #define set_mb(var, value) do { (void) xchg(&var, value); } while (0) | 25 | #define set_mb(var, value) do { var = value; mb(); } while (0) |
| 26 | #define read_barrier_depends() do { } while(0) | 26 | #define smp_read_barrier_depends() read_barrier_depends() |
| 27 | 27 | ||
| 28 | #ifdef CONFIG_SMP | 28 | #ifdef CONFIG_SMP |
| 29 | asmlinkage unsigned long __raw_xchg_1_asm(volatile void *ptr, unsigned long value); | 29 | asmlinkage unsigned long __raw_xchg_1_asm(volatile void *ptr, unsigned long value); |
| @@ -37,16 +37,16 @@ asmlinkage unsigned long __raw_cmpxchg_4_asm(volatile void *ptr, | |||
| 37 | unsigned long new, unsigned long old); | 37 | unsigned long new, unsigned long old); |
| 38 | 38 | ||
| 39 | #ifdef __ARCH_SYNC_CORE_DCACHE | 39 | #ifdef __ARCH_SYNC_CORE_DCACHE |
| 40 | # define smp_mb() do { barrier(); smp_check_barrier(); smp_mark_barrier(); } while (0) | 40 | /* Force Core data cache coherence */ |
| 41 | # define smp_rmb() do { barrier(); smp_check_barrier(); } while (0) | 41 | # define mb() do { barrier(); smp_check_barrier(); smp_mark_barrier(); } while (0) |
| 42 | # define smp_wmb() do { barrier(); smp_mark_barrier(); } while (0) | 42 | # define rmb() do { barrier(); smp_check_barrier(); } while (0) |
| 43 | #define smp_read_barrier_depends() do { barrier(); smp_check_barrier(); } while (0) | 43 | # define wmb() do { barrier(); smp_mark_barrier(); } while (0) |
| 44 | 44 | # define read_barrier_depends() do { barrier(); smp_check_barrier(); } while (0) | |
| 45 | #else | 45 | #else |
| 46 | # define smp_mb() barrier() | 46 | # define mb() barrier() |
| 47 | # define smp_rmb() barrier() | 47 | # define rmb() barrier() |
| 48 | # define smp_wmb() barrier() | 48 | # define wmb() barrier() |
| 49 | #define smp_read_barrier_depends() barrier() | 49 | # define read_barrier_depends() do { } while (0) |
| 50 | #endif | 50 | #endif |
| 51 | 51 | ||
| 52 | static inline unsigned long __xchg(unsigned long x, volatile void *ptr, | 52 | static inline unsigned long __xchg(unsigned long x, volatile void *ptr, |
| @@ -99,10 +99,10 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, | |||
| 99 | 99 | ||
| 100 | #else /* !CONFIG_SMP */ | 100 | #else /* !CONFIG_SMP */ |
| 101 | 101 | ||
| 102 | #define smp_mb() barrier() | 102 | #define mb() barrier() |
| 103 | #define smp_rmb() barrier() | 103 | #define rmb() barrier() |
| 104 | #define smp_wmb() barrier() | 104 | #define wmb() barrier() |
| 105 | #define smp_read_barrier_depends() do { } while(0) | 105 | #define read_barrier_depends() do { } while (0) |
| 106 | 106 | ||
| 107 | struct __xchg_dummy { | 107 | struct __xchg_dummy { |
| 108 | unsigned long a[100]; | 108 | unsigned long a[100]; |
diff --git a/arch/blackfin/include/asm/traps.h b/arch/blackfin/include/asm/traps.h index 9fe0da612c09..70c4e511cae6 100644 --- a/arch/blackfin/include/asm/traps.h +++ b/arch/blackfin/include/asm/traps.h | |||
| @@ -57,7 +57,7 @@ | |||
| 57 | #define HWC_x3(level) \ | 57 | #define HWC_x3(level) \ |
| 58 | "External Memory Addressing Error\n" | 58 | "External Memory Addressing Error\n" |
| 59 | #define EXC_0x04(level) \ | 59 | #define EXC_0x04(level) \ |
| 60 | "Unimplmented exception occured\n" \ | 60 | "Unimplmented exception occurred\n" \ |
| 61 | level " - Maybe you forgot to install a custom exception handler?\n" | 61 | level " - Maybe you forgot to install a custom exception handler?\n" |
| 62 | #define HWC_x12(level) \ | 62 | #define HWC_x12(level) \ |
| 63 | "Performance Monitor Overflow\n" | 63 | "Performance Monitor Overflow\n" |
diff --git a/arch/blackfin/kernel/gptimers.c b/arch/blackfin/kernel/gptimers.c index cdbe075de1dc..8b81dc04488a 100644 --- a/arch/blackfin/kernel/gptimers.c +++ b/arch/blackfin/kernel/gptimers.c | |||
| @@ -268,7 +268,7 @@ void disable_gptimers(uint16_t mask) | |||
| 268 | _disable_gptimers(mask); | 268 | _disable_gptimers(mask); |
| 269 | for (i = 0; i < MAX_BLACKFIN_GPTIMERS; ++i) | 269 | for (i = 0; i < MAX_BLACKFIN_GPTIMERS; ++i) |
| 270 | if (mask & (1 << i)) | 270 | if (mask & (1 << i)) |
| 271 | group_regs[BFIN_TIMER_OCTET(i)]->status |= trun_mask[i]; | 271 | group_regs[BFIN_TIMER_OCTET(i)]->status = trun_mask[i]; |
| 272 | SSYNC(); | 272 | SSYNC(); |
| 273 | } | 273 | } |
| 274 | EXPORT_SYMBOL(disable_gptimers); | 274 | EXPORT_SYMBOL(disable_gptimers); |
diff --git a/arch/blackfin/kernel/kgdb.c b/arch/blackfin/kernel/kgdb.c index b8cfe34989e4..9b80b152435e 100644 --- a/arch/blackfin/kernel/kgdb.c +++ b/arch/blackfin/kernel/kgdb.c | |||
| @@ -181,7 +181,7 @@ static int bfin_set_hw_break(unsigned long addr, int len, enum kgdb_bptype type) | |||
| 181 | return -ENOSPC; | 181 | return -ENOSPC; |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | /* Becasue hardware data watchpoint impelemented in current | 184 | /* Because hardware data watchpoint impelemented in current |
| 185 | * Blackfin can not trigger an exception event as the hardware | 185 | * Blackfin can not trigger an exception event as the hardware |
| 186 | * instrction watchpoint does, we ignaore all data watch point here. | 186 | * instrction watchpoint does, we ignaore all data watch point here. |
| 187 | * They can be turned on easily after future blackfin design | 187 | * They can be turned on easily after future blackfin design |
diff --git a/arch/blackfin/kernel/module.c b/arch/blackfin/kernel/module.c index a6dfa6b71e63..35e350cad9d9 100644 --- a/arch/blackfin/kernel/module.c +++ b/arch/blackfin/kernel/module.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Licensed under the GPL-2 or later | 4 | * Licensed under the GPL-2 or later |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | #define pr_fmt(fmt) "module %s: " fmt | 7 | #define pr_fmt(fmt) "module %s: " fmt, mod->name |
| 8 | 8 | ||
| 9 | #include <linux/moduleloader.h> | 9 | #include <linux/moduleloader.h> |
| 10 | #include <linux/elf.h> | 10 | #include <linux/elf.h> |
| @@ -57,8 +57,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
| 57 | dest = l1_inst_sram_alloc(s->sh_size); | 57 | dest = l1_inst_sram_alloc(s->sh_size); |
| 58 | mod->arch.text_l1 = dest; | 58 | mod->arch.text_l1 = dest; |
| 59 | if (dest == NULL) { | 59 | if (dest == NULL) { |
| 60 | pr_err("L1 inst memory allocation failed\n", | 60 | pr_err("L1 inst memory allocation failed\n"); |
| 61 | mod->name); | ||
| 62 | return -1; | 61 | return -1; |
| 63 | } | 62 | } |
| 64 | dma_memcpy(dest, (void *)s->sh_addr, s->sh_size); | 63 | dma_memcpy(dest, (void *)s->sh_addr, s->sh_size); |
| @@ -70,8 +69,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
| 70 | dest = l1_data_sram_alloc(s->sh_size); | 69 | dest = l1_data_sram_alloc(s->sh_size); |
| 71 | mod->arch.data_a_l1 = dest; | 70 | mod->arch.data_a_l1 = dest; |
| 72 | if (dest == NULL) { | 71 | if (dest == NULL) { |
| 73 | pr_err("L1 data memory allocation failed\n", | 72 | pr_err("L1 data memory allocation failed\n"); |
| 74 | mod->name); | ||
| 75 | return -1; | 73 | return -1; |
| 76 | } | 74 | } |
| 77 | memcpy(dest, (void *)s->sh_addr, s->sh_size); | 75 | memcpy(dest, (void *)s->sh_addr, s->sh_size); |
| @@ -83,8 +81,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
| 83 | dest = l1_data_sram_zalloc(s->sh_size); | 81 | dest = l1_data_sram_zalloc(s->sh_size); |
| 84 | mod->arch.bss_a_l1 = dest; | 82 | mod->arch.bss_a_l1 = dest; |
| 85 | if (dest == NULL) { | 83 | if (dest == NULL) { |
| 86 | pr_err("L1 data memory allocation failed\n", | 84 | pr_err("L1 data memory allocation failed\n"); |
| 87 | mod->name); | ||
| 88 | return -1; | 85 | return -1; |
| 89 | } | 86 | } |
| 90 | 87 | ||
| @@ -93,8 +90,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
| 93 | dest = l1_data_B_sram_alloc(s->sh_size); | 90 | dest = l1_data_B_sram_alloc(s->sh_size); |
| 94 | mod->arch.data_b_l1 = dest; | 91 | mod->arch.data_b_l1 = dest; |
| 95 | if (dest == NULL) { | 92 | if (dest == NULL) { |
| 96 | pr_err("L1 data memory allocation failed\n", | 93 | pr_err("L1 data memory allocation failed\n"); |
| 97 | mod->name); | ||
| 98 | return -1; | 94 | return -1; |
| 99 | } | 95 | } |
| 100 | memcpy(dest, (void *)s->sh_addr, s->sh_size); | 96 | memcpy(dest, (void *)s->sh_addr, s->sh_size); |
| @@ -104,8 +100,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
| 104 | dest = l1_data_B_sram_alloc(s->sh_size); | 100 | dest = l1_data_B_sram_alloc(s->sh_size); |
| 105 | mod->arch.bss_b_l1 = dest; | 101 | mod->arch.bss_b_l1 = dest; |
| 106 | if (dest == NULL) { | 102 | if (dest == NULL) { |
| 107 | pr_err("L1 data memory allocation failed\n", | 103 | pr_err("L1 data memory allocation failed\n"); |
| 108 | mod->name); | ||
| 109 | return -1; | 104 | return -1; |
| 110 | } | 105 | } |
| 111 | memset(dest, 0, s->sh_size); | 106 | memset(dest, 0, s->sh_size); |
| @@ -117,8 +112,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
| 117 | dest = l2_sram_alloc(s->sh_size); | 112 | dest = l2_sram_alloc(s->sh_size); |
| 118 | mod->arch.text_l2 = dest; | 113 | mod->arch.text_l2 = dest; |
| 119 | if (dest == NULL) { | 114 | if (dest == NULL) { |
| 120 | pr_err("L2 SRAM allocation failed\n", | 115 | pr_err("L2 SRAM allocation failed\n"); |
| 121 | mod->name); | ||
| 122 | return -1; | 116 | return -1; |
| 123 | } | 117 | } |
| 124 | memcpy(dest, (void *)s->sh_addr, s->sh_size); | 118 | memcpy(dest, (void *)s->sh_addr, s->sh_size); |
| @@ -130,8 +124,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
| 130 | dest = l2_sram_alloc(s->sh_size); | 124 | dest = l2_sram_alloc(s->sh_size); |
| 131 | mod->arch.data_l2 = dest; | 125 | mod->arch.data_l2 = dest; |
| 132 | if (dest == NULL) { | 126 | if (dest == NULL) { |
| 133 | pr_err("L2 SRAM allocation failed\n", | 127 | pr_err("L2 SRAM allocation failed\n"); |
| 134 | mod->name); | ||
| 135 | return -1; | 128 | return -1; |
| 136 | } | 129 | } |
| 137 | memcpy(dest, (void *)s->sh_addr, s->sh_size); | 130 | memcpy(dest, (void *)s->sh_addr, s->sh_size); |
| @@ -143,8 +136,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
| 143 | dest = l2_sram_zalloc(s->sh_size); | 136 | dest = l2_sram_zalloc(s->sh_size); |
| 144 | mod->arch.bss_l2 = dest; | 137 | mod->arch.bss_l2 = dest; |
| 145 | if (dest == NULL) { | 138 | if (dest == NULL) { |
| 146 | pr_err("L2 SRAM allocation failed\n", | 139 | pr_err("L2 SRAM allocation failed\n"); |
| 147 | mod->name); | ||
| 148 | return -1; | 140 | return -1; |
| 149 | } | 141 | } |
| 150 | 142 | ||
| @@ -160,9 +152,9 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
| 160 | 152 | ||
| 161 | int | 153 | int |
| 162 | apply_relocate(Elf_Shdr * sechdrs, const char *strtab, | 154 | apply_relocate(Elf_Shdr * sechdrs, const char *strtab, |
| 163 | unsigned int symindex, unsigned int relsec, struct module *me) | 155 | unsigned int symindex, unsigned int relsec, struct module *mod) |
| 164 | { | 156 | { |
| 165 | pr_err(".rel unsupported\n", me->name); | 157 | pr_err(".rel unsupported\n"); |
| 166 | return -ENOEXEC; | 158 | return -ENOEXEC; |
| 167 | } | 159 | } |
| 168 | 160 | ||
| @@ -186,7 +178,7 @@ apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, | |||
| 186 | Elf32_Sym *sym; | 178 | Elf32_Sym *sym; |
| 187 | unsigned long location, value, size; | 179 | unsigned long location, value, size; |
| 188 | 180 | ||
| 189 | pr_debug("applying relocate section %u to %u\n", mod->name, | 181 | pr_debug("applying relocate section %u to %u\n", |
| 190 | relsec, sechdrs[relsec].sh_info); | 182 | relsec, sechdrs[relsec].sh_info); |
| 191 | 183 | ||
| 192 | for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { | 184 | for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { |
| @@ -203,14 +195,14 @@ apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, | |||
| 203 | 195 | ||
| 204 | #ifdef CONFIG_SMP | 196 | #ifdef CONFIG_SMP |
| 205 | if (location >= COREB_L1_DATA_A_START) { | 197 | if (location >= COREB_L1_DATA_A_START) { |
| 206 | pr_err("cannot relocate in L1: %u (SMP kernel)", | 198 | pr_err("cannot relocate in L1: %u (SMP kernel)\n", |
| 207 | mod->name, ELF32_R_TYPE(rel[i].r_info)); | 199 | ELF32_R_TYPE(rel[i].r_info)); |
| 208 | return -ENOEXEC; | 200 | return -ENOEXEC; |
| 209 | } | 201 | } |
| 210 | #endif | 202 | #endif |
| 211 | 203 | ||
| 212 | pr_debug("location is %lx, value is %lx type is %d\n", | 204 | pr_debug("location is %lx, value is %lx type is %d\n", |
| 213 | mod->name, location, value, ELF32_R_TYPE(rel[i].r_info)); | 205 | location, value, ELF32_R_TYPE(rel[i].r_info)); |
| 214 | 206 | ||
| 215 | switch (ELF32_R_TYPE(rel[i].r_info)) { | 207 | switch (ELF32_R_TYPE(rel[i].r_info)) { |
| 216 | 208 | ||
| @@ -230,11 +222,11 @@ apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, | |||
| 230 | case R_BFIN_PCREL12_JUMP_S: | 222 | case R_BFIN_PCREL12_JUMP_S: |
| 231 | case R_BFIN_PCREL10: | 223 | case R_BFIN_PCREL10: |
| 232 | pr_err("unsupported relocation: %u (no -mlong-calls?)\n", | 224 | pr_err("unsupported relocation: %u (no -mlong-calls?)\n", |
| 233 | mod->name, ELF32_R_TYPE(rel[i].r_info)); | 225 | ELF32_R_TYPE(rel[i].r_info)); |
| 234 | return -ENOEXEC; | 226 | return -ENOEXEC; |
| 235 | 227 | ||
| 236 | default: | 228 | default: |
| 237 | pr_err("unknown relocation: %u\n", mod->name, | 229 | pr_err("unknown relocation: %u\n", |
| 238 | ELF32_R_TYPE(rel[i].r_info)); | 230 | ELF32_R_TYPE(rel[i].r_info)); |
| 239 | return -ENOEXEC; | 231 | return -ENOEXEC; |
| 240 | } | 232 | } |
| @@ -251,8 +243,7 @@ apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, | |||
| 251 | isram_memcpy((void *)location, &value, size); | 243 | isram_memcpy((void *)location, &value, size); |
| 252 | break; | 244 | break; |
| 253 | default: | 245 | default: |
| 254 | pr_err("invalid relocation for %#lx\n", | 246 | pr_err("invalid relocation for %#lx\n", location); |
| 255 | mod->name, location); | ||
| 256 | return -ENOEXEC; | 247 | return -ENOEXEC; |
| 257 | } | 248 | } |
| 258 | } | 249 | } |
diff --git a/arch/blackfin/kernel/time-ts.c b/arch/blackfin/kernel/time-ts.c index 8c9a43daf80f..cdb4beb6bc8f 100644 --- a/arch/blackfin/kernel/time-ts.c +++ b/arch/blackfin/kernel/time-ts.c | |||
| @@ -206,8 +206,14 @@ irqreturn_t bfin_gptmr0_interrupt(int irq, void *dev_id) | |||
| 206 | { | 206 | { |
| 207 | struct clock_event_device *evt = dev_id; | 207 | struct clock_event_device *evt = dev_id; |
| 208 | smp_mb(); | 208 | smp_mb(); |
| 209 | evt->event_handler(evt); | 209 | /* |
| 210 | * We want to ACK before we handle so that we can handle smaller timer | ||
| 211 | * intervals. This way if the timer expires again while we're handling | ||
| 212 | * things, we're more likely to see that 2nd int rather than swallowing | ||
| 213 | * it by ACKing the int at the end of this handler. | ||
| 214 | */ | ||
| 210 | bfin_gptmr0_ack(); | 215 | bfin_gptmr0_ack(); |
| 216 | evt->event_handler(evt); | ||
| 211 | return IRQ_HANDLED; | 217 | return IRQ_HANDLED; |
| 212 | } | 218 | } |
| 213 | 219 | ||
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 59c1df75e4de..655f25d139a7 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c | |||
| @@ -98,7 +98,7 @@ asmlinkage notrace void trap_c(struct pt_regs *fp) | |||
| 98 | /* send the appropriate signal to the user program */ | 98 | /* send the appropriate signal to the user program */ |
| 99 | switch (trapnr) { | 99 | switch (trapnr) { |
| 100 | 100 | ||
| 101 | /* This table works in conjuction with the one in ./mach-common/entry.S | 101 | /* This table works in conjunction with the one in ./mach-common/entry.S |
| 102 | * Some exceptions are handled there (in assembly, in exception space) | 102 | * Some exceptions are handled there (in assembly, in exception space) |
| 103 | * Some are handled here, (in C, in interrupt space) | 103 | * Some are handled here, (in C, in interrupt space) |
| 104 | * Some, like CPLB, are handled in both, where the normal path is | 104 | * Some, like CPLB, are handled in both, where the normal path is |
diff --git a/arch/blackfin/lib/ins.S b/arch/blackfin/lib/ins.S index 3edbd8db6598..79caccea85ca 100644 --- a/arch/blackfin/lib/ins.S +++ b/arch/blackfin/lib/ins.S | |||
| @@ -67,7 +67,7 @@ | |||
| 67 | * - DMA version, which do not suffer from this issue. DMA versions have | 67 | * - DMA version, which do not suffer from this issue. DMA versions have |
| 68 | * different name (prefixed by dma_ ), and are located in | 68 | * different name (prefixed by dma_ ), and are located in |
| 69 | * ../kernel/bfin_dma_5xx.c | 69 | * ../kernel/bfin_dma_5xx.c |
| 70 | * Using the dma related functions are recommended for transfering large | 70 | * Using the dma related functions are recommended for transferring large |
| 71 | * buffers in/out of FIFOs. | 71 | * buffers in/out of FIFOs. |
| 72 | */ | 72 | */ |
| 73 | 73 | ||
diff --git a/arch/blackfin/lib/memmove.S b/arch/blackfin/lib/memmove.S index 80c240acac60..4eca566237a4 100644 --- a/arch/blackfin/lib/memmove.S +++ b/arch/blackfin/lib/memmove.S | |||
| @@ -60,7 +60,7 @@ ENTRY(_memmove) | |||
| 60 | [P0++] = R1; | 60 | [P0++] = R1; |
| 61 | 61 | ||
| 62 | CC = P2 == 0; /* any remaining bytes? */ | 62 | CC = P2 == 0; /* any remaining bytes? */ |
| 63 | P3 = I0; /* Ammend P3 to updated ptr. */ | 63 | P3 = I0; /* Amend P3 to updated ptr. */ |
| 64 | IF !CC JUMP .Lbytes; | 64 | IF !CC JUMP .Lbytes; |
| 65 | P3 = I1; | 65 | P3 = I1; |
| 66 | RTS; | 66 | RTS; |
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 2c69785a7bbe..3fa335405b31 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
| @@ -2530,7 +2530,7 @@ static struct resource bfin_pata_resources[] = { | |||
| 2530 | static struct pata_platform_info bfin_pata_platform_data = { | 2530 | static struct pata_platform_info bfin_pata_platform_data = { |
| 2531 | .ioport_shift = 0, | 2531 | .ioport_shift = 0, |
| 2532 | }; | 2532 | }; |
| 2533 | /* CompactFlash Storage Card Memory Mapped Adressing | 2533 | /* CompactFlash Storage Card Memory Mapped Addressing |
| 2534 | * /REG = A11 = 1 | 2534 | * /REG = A11 = 1 |
| 2535 | */ | 2535 | */ |
| 2536 | static struct resource bfin_pata_resources[] = { | 2536 | static struct resource bfin_pata_resources[] = { |
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index 46ab45704c89..f96933f48a7f 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S | |||
| @@ -268,7 +268,7 @@ ENTRY(_handle_bad_cplb) | |||
| 268 | /* To get here, we just tried and failed to change a CPLB | 268 | /* To get here, we just tried and failed to change a CPLB |
| 269 | * so, handle things in trap_c (C code), by lowering to | 269 | * so, handle things in trap_c (C code), by lowering to |
| 270 | * IRQ5, just like we normally do. Since this is not a | 270 | * IRQ5, just like we normally do. Since this is not a |
| 271 | * "normal" return path, we have a do alot of stuff to | 271 | * "normal" return path, we have a do a lot of stuff to |
| 272 | * the stack to get ready so, we can fall through - we | 272 | * the stack to get ready so, we can fall through - we |
| 273 | * need to make a CPLB exception look like a normal exception | 273 | * need to make a CPLB exception look like a normal exception |
| 274 | */ | 274 | */ |
| @@ -817,7 +817,7 @@ _new_old_task: | |||
| 817 | rets = [sp++]; | 817 | rets = [sp++]; |
| 818 | 818 | ||
| 819 | /* | 819 | /* |
| 820 | * When we come out of resume, r0 carries "old" task, becuase we are | 820 | * When we come out of resume, r0 carries "old" task, because we are |
| 821 | * in "new" task. | 821 | * in "new" task. |
| 822 | */ | 822 | */ |
| 823 | rts; | 823 | rts; |
diff --git a/arch/blackfin/mach-common/head.S b/arch/blackfin/mach-common/head.S index 581e2b0a71ac..76de5724c1e3 100644 --- a/arch/blackfin/mach-common/head.S +++ b/arch/blackfin/mach-common/head.S | |||
| @@ -174,7 +174,7 @@ ENTRY(__start) | |||
| 174 | sp.l = lo(KERNEL_CLOCK_STACK); | 174 | sp.l = lo(KERNEL_CLOCK_STACK); |
| 175 | sp.h = hi(KERNEL_CLOCK_STACK); | 175 | sp.h = hi(KERNEL_CLOCK_STACK); |
| 176 | call _init_clocks; | 176 | call _init_clocks; |
| 177 | sp = usp; /* usp hasnt been touched, so restore from there */ | 177 | sp = usp; /* usp hasn't been touched, so restore from there */ |
| 178 | #endif | 178 | #endif |
| 179 | 179 | ||
| 180 | /* This section keeps the processor in supervisor mode | 180 | /* This section keeps the processor in supervisor mode |
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c index 6e17a265c4d3..8bce5ed031e4 100644 --- a/arch/blackfin/mach-common/smp.c +++ b/arch/blackfin/mach-common/smp.c | |||
| @@ -109,10 +109,23 @@ static void ipi_flush_icache(void *info) | |||
| 109 | struct blackfin_flush_data *fdata = info; | 109 | struct blackfin_flush_data *fdata = info; |
| 110 | 110 | ||
| 111 | /* Invalidate the memory holding the bounds of the flushed region. */ | 111 | /* Invalidate the memory holding the bounds of the flushed region. */ |
| 112 | invalidate_dcache_range((unsigned long)fdata, | 112 | blackfin_dcache_invalidate_range((unsigned long)fdata, |
| 113 | (unsigned long)fdata + sizeof(*fdata)); | 113 | (unsigned long)fdata + sizeof(*fdata)); |
| 114 | |||
| 115 | /* Make sure all write buffers in the data side of the core | ||
| 116 | * are flushed before trying to invalidate the icache. This | ||
| 117 | * needs to be after the data flush and before the icache | ||
| 118 | * flush so that the SSYNC does the right thing in preventing | ||
| 119 | * the instruction prefetcher from hitting things in cached | ||
| 120 | * memory at the wrong time -- it runs much further ahead than | ||
| 121 | * the pipeline. | ||
| 122 | */ | ||
| 123 | SSYNC(); | ||
| 114 | 124 | ||
| 115 | flush_icache_range(fdata->start, fdata->end); | 125 | /* ipi_flaush_icache is invoked by generic flush_icache_range, |
| 126 | * so call blackfin arch icache flush directly here. | ||
| 127 | */ | ||
| 128 | blackfin_icache_flush_range(fdata->start, fdata->end); | ||
| 116 | } | 129 | } |
| 117 | 130 | ||
| 118 | static void ipi_call_function(unsigned int cpu, struct ipi_message *msg) | 131 | static void ipi_call_function(unsigned int cpu, struct ipi_message *msg) |
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index 617925ddd142..a6d03069d0ff 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig | |||
| @@ -55,7 +55,6 @@ config CRIS | |||
| 55 | default y | 55 | default y |
| 56 | select HAVE_IDE | 56 | select HAVE_IDE |
| 57 | select HAVE_GENERIC_HARDIRQS | 57 | select HAVE_GENERIC_HARDIRQS |
| 58 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
| 59 | select GENERIC_IRQ_SHOW | 58 | select GENERIC_IRQ_SHOW |
| 60 | 59 | ||
| 61 | config HZ | 60 | config HZ |
diff --git a/arch/cris/arch-v10/README.mm b/arch/cris/arch-v10/README.mm index 517d1f027fe8..67731d75cb51 100644 --- a/arch/cris/arch-v10/README.mm +++ b/arch/cris/arch-v10/README.mm | |||
| @@ -38,7 +38,7 @@ space. We also use it to keep the user-mode virtual mapping in the same | |||
| 38 | map during kernel-mode, so that the kernel easily can access the corresponding | 38 | map during kernel-mode, so that the kernel easily can access the corresponding |
| 39 | user-mode process' data. | 39 | user-mode process' data. |
| 40 | 40 | ||
| 41 | As a comparision, the Linux/i386 2.0 puts the kernel and physical RAM at | 41 | As a comparison, the Linux/i386 2.0 puts the kernel and physical RAM at |
| 42 | address 0, overlapping with the user-mode virtual space, so that descriptor | 42 | address 0, overlapping with the user-mode virtual space, so that descriptor |
| 43 | registers are needed for each memory access to specify which MMU space to | 43 | registers are needed for each memory access to specify which MMU space to |
| 44 | map through. That changed in 2.2, putting the kernel/physical RAM at | 44 | map through. That changed in 2.2, putting the kernel/physical RAM at |
diff --git a/arch/cris/arch-v10/drivers/sync_serial.c b/arch/cris/arch-v10/drivers/sync_serial.c index 399dc1ec8e6f..850265373611 100644 --- a/arch/cris/arch-v10/drivers/sync_serial.c +++ b/arch/cris/arch-v10/drivers/sync_serial.c | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | #include <asm/sync_serial.h> | 31 | #include <asm/sync_serial.h> |
| 32 | #include <arch/io_interface_mux.h> | 32 | #include <arch/io_interface_mux.h> |
| 33 | 33 | ||
| 34 | /* The receiver is a bit tricky beacuse of the continuous stream of data.*/ | 34 | /* The receiver is a bit tricky because of the continuous stream of data.*/ |
| 35 | /* */ | 35 | /* */ |
| 36 | /* Three DMA descriptors are linked together. Each DMA descriptor is */ | 36 | /* Three DMA descriptors are linked together. Each DMA descriptor is */ |
| 37 | /* responsible for port->bufchunk of a common buffer. */ | 37 | /* responsible for port->bufchunk of a common buffer. */ |
diff --git a/arch/cris/arch-v32/drivers/axisflashmap.c b/arch/cris/arch-v32/drivers/axisflashmap.c index 3d751250271b..7b155f8203b8 100644 --- a/arch/cris/arch-v32/drivers/axisflashmap.c +++ b/arch/cris/arch-v32/drivers/axisflashmap.c | |||
| @@ -215,7 +215,7 @@ static struct mtd_partition main_partition = { | |||
| 215 | }; | 215 | }; |
| 216 | #endif | 216 | #endif |
| 217 | 217 | ||
| 218 | /* Auxilliary partition if we find another flash */ | 218 | /* Auxiliary partition if we find another flash */ |
| 219 | static struct mtd_partition aux_partition = { | 219 | static struct mtd_partition aux_partition = { |
| 220 | .name = "aux", | 220 | .name = "aux", |
| 221 | .size = 0, | 221 | .size = 0, |
diff --git a/arch/cris/arch-v32/drivers/mach-a3/nandflash.c b/arch/cris/arch-v32/drivers/mach-a3/nandflash.c index 25d6f2b3a721..f58f2c1c5295 100644 --- a/arch/cris/arch-v32/drivers/mach-a3/nandflash.c +++ b/arch/cris/arch-v32/drivers/mach-a3/nandflash.c | |||
| @@ -165,7 +165,7 @@ struct mtd_info *__init crisv32_nand_flash_probe(void) | |||
| 165 | /* Enable the following for a flash based bad block table */ | 165 | /* Enable the following for a flash based bad block table */ |
| 166 | /* this->options = NAND_USE_FLASH_BBT; */ | 166 | /* this->options = NAND_USE_FLASH_BBT; */ |
| 167 | 167 | ||
| 168 | /* Scan to find existance of the device */ | 168 | /* Scan to find existence of the device */ |
| 169 | if (nand_scan(crisv32_mtd, 1)) { | 169 | if (nand_scan(crisv32_mtd, 1)) { |
| 170 | err = -ENXIO; | 170 | err = -ENXIO; |
| 171 | goto out_mtd; | 171 | goto out_mtd; |
diff --git a/arch/cris/arch-v32/drivers/mach-fs/nandflash.c b/arch/cris/arch-v32/drivers/mach-fs/nandflash.c index c5a0f54763cc..d5b0cc9f976b 100644 --- a/arch/cris/arch-v32/drivers/mach-fs/nandflash.c +++ b/arch/cris/arch-v32/drivers/mach-fs/nandflash.c | |||
| @@ -156,7 +156,7 @@ struct mtd_info *__init crisv32_nand_flash_probe(void) | |||
| 156 | /* Enable the following for a flash based bad block table */ | 156 | /* Enable the following for a flash based bad block table */ |
| 157 | /* this->options = NAND_USE_FLASH_BBT; */ | 157 | /* this->options = NAND_USE_FLASH_BBT; */ |
| 158 | 158 | ||
| 159 | /* Scan to find existance of the device */ | 159 | /* Scan to find existence of the device */ |
| 160 | if (nand_scan(crisv32_mtd, 1)) { | 160 | if (nand_scan(crisv32_mtd, 1)) { |
| 161 | err = -ENXIO; | 161 | err = -ENXIO; |
| 162 | goto out_ior; | 162 | goto out_ior; |
diff --git a/arch/cris/arch-v32/drivers/sync_serial.c b/arch/cris/arch-v32/drivers/sync_serial.c index c8637a9195ea..a6a180bc566f 100644 --- a/arch/cris/arch-v32/drivers/sync_serial.c +++ b/arch/cris/arch-v32/drivers/sync_serial.c | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | #include <asm/sync_serial.h> | 33 | #include <asm/sync_serial.h> |
| 34 | 34 | ||
| 35 | 35 | ||
| 36 | /* The receiver is a bit tricky beacuse of the continuous stream of data.*/ | 36 | /* The receiver is a bit tricky because of the continuous stream of data.*/ |
| 37 | /* */ | 37 | /* */ |
| 38 | /* Three DMA descriptors are linked together. Each DMA descriptor is */ | 38 | /* Three DMA descriptors are linked together. Each DMA descriptor is */ |
| 39 | /* responsible for port->bufchunk of a common buffer. */ | 39 | /* responsible for port->bufchunk of a common buffer. */ |
diff --git a/arch/cris/arch-v32/kernel/entry.S b/arch/cris/arch-v32/kernel/entry.S index 0ecb50b8f0d9..3abf12c23e5f 100644 --- a/arch/cris/arch-v32/kernel/entry.S +++ b/arch/cris/arch-v32/kernel/entry.S | |||
| @@ -182,7 +182,7 @@ _syscall_traced: | |||
| 182 | move.d $r0, [$sp] | 182 | move.d $r0, [$sp] |
| 183 | 183 | ||
| 184 | ;; The registers carrying parameters (R10-R13) are intact. The optional | 184 | ;; The registers carrying parameters (R10-R13) are intact. The optional |
| 185 | ;; fifth and sixth parameters is in MOF and SRP respectivly. Put them | 185 | ;; fifth and sixth parameters is in MOF and SRP respectively. Put them |
| 186 | ;; back on the stack. | 186 | ;; back on the stack. |
| 187 | subq 4, $sp | 187 | subq 4, $sp |
| 188 | move $srp, [$sp] | 188 | move $srp, [$sp] |
diff --git a/arch/cris/arch-v32/kernel/irq.c b/arch/cris/arch-v32/kernel/irq.c index 8023176e19b2..68a1a5901ca5 100644 --- a/arch/cris/arch-v32/kernel/irq.c +++ b/arch/cris/arch-v32/kernel/irq.c | |||
| @@ -374,7 +374,7 @@ crisv32_do_multiple(struct pt_regs* regs) | |||
| 374 | irq_enter(); | 374 | irq_enter(); |
| 375 | 375 | ||
| 376 | for (i = 0; i < NBR_REGS; i++) { | 376 | for (i = 0; i < NBR_REGS; i++) { |
| 377 | /* Get which IRQs that happend. */ | 377 | /* Get which IRQs that happened. */ |
| 378 | masked[i] = REG_RD_INT_VECT(intr_vect, irq_regs[cpu], | 378 | masked[i] = REG_RD_INT_VECT(intr_vect, irq_regs[cpu], |
| 379 | r_masked_vect, i); | 379 | r_masked_vect, i); |
| 380 | 380 | ||
diff --git a/arch/cris/arch-v32/kernel/kgdb.c b/arch/cris/arch-v32/kernel/kgdb.c index 6b653323d796..c0343c3ea7f8 100644 --- a/arch/cris/arch-v32/kernel/kgdb.c +++ b/arch/cris/arch-v32/kernel/kgdb.c | |||
| @@ -925,7 +925,7 @@ stub_is_stopped(int sigval) | |||
| 925 | 925 | ||
| 926 | if (reg.eda >= bp_d_regs[bp * 2] && | 926 | if (reg.eda >= bp_d_regs[bp * 2] && |
| 927 | reg.eda <= bp_d_regs[bp * 2 + 1]) { | 927 | reg.eda <= bp_d_regs[bp * 2 + 1]) { |
| 928 | /* EDA withing range for this BP; it must be the one | 928 | /* EDA within range for this BP; it must be the one |
| 929 | we're looking for. */ | 929 | we're looking for. */ |
| 930 | stopped_data_address = reg.eda; | 930 | stopped_data_address = reg.eda; |
| 931 | break; | 931 | break; |
diff --git a/arch/cris/arch-v32/kernel/process.c b/arch/cris/arch-v32/kernel/process.c index 562f84718906..0570e8ce603d 100644 --- a/arch/cris/arch-v32/kernel/process.c +++ b/arch/cris/arch-v32/kernel/process.c | |||
| @@ -149,7 +149,7 @@ copy_thread(unsigned long clone_flags, unsigned long usp, | |||
| 149 | childregs->r10 = 0; /* Child returns 0 after a fork/clone. */ | 149 | childregs->r10 = 0; /* Child returns 0 after a fork/clone. */ |
| 150 | 150 | ||
| 151 | /* Set a new TLS ? | 151 | /* Set a new TLS ? |
| 152 | * The TLS is in $mof beacuse it is the 5th argument to sys_clone. | 152 | * The TLS is in $mof because it is the 5th argument to sys_clone. |
| 153 | */ | 153 | */ |
| 154 | if (p->mm && (clone_flags & CLONE_SETTLS)) { | 154 | if (p->mm && (clone_flags & CLONE_SETTLS)) { |
| 155 | task_thread_info(p)->tls = regs->mof; | 155 | task_thread_info(p)->tls = regs->mof; |
diff --git a/arch/cris/arch-v32/kernel/signal.c b/arch/cris/arch-v32/kernel/signal.c index b3a05ae56214..ce4ab1a5552c 100644 --- a/arch/cris/arch-v32/kernel/signal.c +++ b/arch/cris/arch-v32/kernel/signal.c | |||
| @@ -610,7 +610,7 @@ ugdb_trap_user(struct thread_info *ti, int sig) | |||
| 610 | user_regs(ti)->spc = 0; | 610 | user_regs(ti)->spc = 0; |
| 611 | } | 611 | } |
| 612 | /* FIXME: Filter out false h/w breakpoint hits (i.e. EDA | 612 | /* FIXME: Filter out false h/w breakpoint hits (i.e. EDA |
| 613 | not withing any configured h/w breakpoint range). Synchronize with | 613 | not within any configured h/w breakpoint range). Synchronize with |
| 614 | what already exists for kernel debugging. */ | 614 | what already exists for kernel debugging. */ |
| 615 | if (((user_regs(ti)->exs & 0xff00) >> 8) == BREAK_8_INTR_VECT) { | 615 | if (((user_regs(ti)->exs & 0xff00) >> 8) == BREAK_8_INTR_VECT) { |
| 616 | /* Break 8: subtract 2 from ERP unless in a delay slot. */ | 616 | /* Break 8: subtract 2 from ERP unless in a delay slot. */ |
diff --git a/arch/cris/arch-v32/mach-a3/arbiter.c b/arch/cris/arch-v32/mach-a3/arbiter.c index 8b924db71c9a..15f5c9de2639 100644 --- a/arch/cris/arch-v32/mach-a3/arbiter.c +++ b/arch/cris/arch-v32/mach-a3/arbiter.c | |||
| @@ -568,7 +568,7 @@ crisv32_foo_arbiter_irq(int irq, void *dev_id) | |||
| 568 | REG_WR(marb_foo_bp, watch->instance, rw_ack, ack); | 568 | REG_WR(marb_foo_bp, watch->instance, rw_ack, ack); |
| 569 | REG_WR(marb_foo, regi_marb_foo, rw_ack_intr, ack_intr); | 569 | REG_WR(marb_foo, regi_marb_foo, rw_ack_intr, ack_intr); |
| 570 | 570 | ||
| 571 | printk(KERN_DEBUG "IRQ occured at %X\n", (unsigned)get_irq_regs()); | 571 | printk(KERN_DEBUG "IRQ occurred at %X\n", (unsigned)get_irq_regs()); |
| 572 | 572 | ||
| 573 | if (watch->cb) | 573 | if (watch->cb) |
| 574 | watch->cb(); | 574 | watch->cb(); |
| @@ -624,7 +624,7 @@ crisv32_bar_arbiter_irq(int irq, void *dev_id) | |||
| 624 | REG_WR(marb_bar_bp, watch->instance, rw_ack, ack); | 624 | REG_WR(marb_bar_bp, watch->instance, rw_ack, ack); |
| 625 | REG_WR(marb_bar, regi_marb_bar, rw_ack_intr, ack_intr); | 625 | REG_WR(marb_bar, regi_marb_bar, rw_ack_intr, ack_intr); |
| 626 | 626 | ||
| 627 | printk(KERN_DEBUG "IRQ occured at %X\n", (unsigned)get_irq_regs()->erp); | 627 | printk(KERN_DEBUG "IRQ occurred at %X\n", (unsigned)get_irq_regs()->erp); |
| 628 | 628 | ||
| 629 | if (watch->cb) | 629 | if (watch->cb) |
| 630 | watch->cb(); | 630 | watch->cb(); |
diff --git a/arch/cris/arch-v32/mach-fs/arbiter.c b/arch/cris/arch-v32/mach-fs/arbiter.c index 82ef293c4c81..3f8ebb5c1477 100644 --- a/arch/cris/arch-v32/mach-fs/arbiter.c +++ b/arch/cris/arch-v32/mach-fs/arbiter.c | |||
| @@ -395,7 +395,7 @@ static irqreturn_t crisv32_arbiter_irq(int irq, void *dev_id) | |||
| 395 | REG_WR(marb_bp, watch->instance, rw_ack, ack); | 395 | REG_WR(marb_bp, watch->instance, rw_ack, ack); |
| 396 | REG_WR(marb, regi_marb, rw_ack_intr, ack_intr); | 396 | REG_WR(marb, regi_marb, rw_ack_intr, ack_intr); |
| 397 | 397 | ||
| 398 | printk(KERN_INFO "IRQ occured at %lX\n", get_irq_regs()->erp); | 398 | printk(KERN_INFO "IRQ occurred at %lX\n", get_irq_regs()->erp); |
| 399 | 399 | ||
| 400 | if (watch->cb) | 400 | if (watch->cb) |
| 401 | watch->cb(); | 401 | watch->cb(); |
diff --git a/arch/cris/boot/rescue/head_v10.S b/arch/cris/boot/rescue/head_v10.S index 2fafe247a25b..af55df0994b3 100644 --- a/arch/cris/boot/rescue/head_v10.S +++ b/arch/cris/boot/rescue/head_v10.S | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * for each partition that this code should check. | 7 | * for each partition that this code should check. |
| 8 | * | 8 | * |
| 9 | * If any of the checksums fail, we assume the flash is so | 9 | * If any of the checksums fail, we assume the flash is so |
| 10 | * corrupt that we cant use it to boot into the ftp flash | 10 | * corrupt that we can't use it to boot into the ftp flash |
| 11 | * loader, and instead we initialize the serial port to | 11 | * loader, and instead we initialize the serial port to |
| 12 | * receive a flash-loader and new flash image. we dont include | 12 | * receive a flash-loader and new flash image. we dont include |
| 13 | * any flash code here, but just accept a certain amount of | 13 | * any flash code here, but just accept a certain amount of |
diff --git a/arch/cris/include/arch-v32/arch/hwregs/Makefile b/arch/cris/include/arch-v32/arch/hwregs/Makefile index f9a05d2aa061..b8b3f8d666e4 100644 --- a/arch/cris/include/arch-v32/arch/hwregs/Makefile +++ b/arch/cris/include/arch-v32/arch/hwregs/Makefile | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # Makefile to generate or copy the latest register definitions | 1 | # Makefile to generate or copy the latest register definitions |
| 2 | # and related datastructures and helpermacros. | 2 | # and related datastructures and helpermacros. |
| 3 | # The offical place for these files is at: | 3 | # The official place for these files is at: |
| 4 | RELEASE ?= r1_alfa5 | 4 | RELEASE ?= r1_alfa5 |
| 5 | OFFICIAL_INCDIR = /n/asic/projects/guinness/releases/$(RELEASE)/design/top/sw/include/ | 5 | OFFICIAL_INCDIR = /n/asic/projects/guinness/releases/$(RELEASE)/design/top/sw/include/ |
| 6 | 6 | ||
diff --git a/arch/cris/include/arch-v32/arch/hwregs/iop/Makefile b/arch/cris/include/arch-v32/arch/hwregs/iop/Makefile index a90056a095e3..0747a22e3c07 100644 --- a/arch/cris/include/arch-v32/arch/hwregs/iop/Makefile +++ b/arch/cris/include/arch-v32/arch/hwregs/iop/Makefile | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | # $Id: Makefile,v 1.3 2004/01/07 20:34:55 johana Exp $ | 1 | # $Id: Makefile,v 1.3 2004/01/07 20:34:55 johana Exp $ |
| 2 | # Makefile to generate or copy the latest register definitions | 2 | # Makefile to generate or copy the latest register definitions |
| 3 | # and related datastructures and helpermacros. | 3 | # and related datastructures and helpermacros. |
| 4 | # The offical place for these files is probably at: | 4 | # The official place for these files is probably at: |
| 5 | RELEASE ?= r1_alfa5 | 5 | RELEASE ?= r1_alfa5 |
| 6 | IOPOFFICIAL_INCDIR = /n/asic/projects/guinness/releases/$(RELEASE)/design/top/sw/include/ | 6 | IOPOFFICIAL_INCDIR = /n/asic/projects/guinness/releases/$(RELEASE)/design/top/sw/include/ |
| 7 | 7 | ||
diff --git a/arch/cris/include/asm/pgtable.h b/arch/cris/include/asm/pgtable.h index 9eaae217b21b..7df430138355 100644 --- a/arch/cris/include/asm/pgtable.h +++ b/arch/cris/include/asm/pgtable.h | |||
| @@ -97,7 +97,7 @@ extern unsigned long empty_zero_page; | |||
| 97 | #define pte_clear(mm,addr,xp) do { pte_val(*(xp)) = 0; } while (0) | 97 | #define pte_clear(mm,addr,xp) do { pte_val(*(xp)) = 0; } while (0) |
| 98 | 98 | ||
| 99 | #define pmd_none(x) (!pmd_val(x)) | 99 | #define pmd_none(x) (!pmd_val(x)) |
| 100 | /* by removing the _PAGE_KERNEL bit from the comparision, the same pmd_bad | 100 | /* by removing the _PAGE_KERNEL bit from the comparison, the same pmd_bad |
| 101 | * works for both _PAGE_TABLE and _KERNPG_TABLE pmd entries. | 101 | * works for both _PAGE_TABLE and _KERNPG_TABLE pmd entries. |
| 102 | */ | 102 | */ |
| 103 | #define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_KERNEL)) != _PAGE_TABLE) | 103 | #define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_KERNEL)) != _PAGE_TABLE) |
diff --git a/arch/cris/kernel/traps.c b/arch/cris/kernel/traps.c index 541efbf09371..8da53f34c7a7 100644 --- a/arch/cris/kernel/traps.c +++ b/arch/cris/kernel/traps.c | |||
| @@ -183,7 +183,7 @@ __initcall(oops_nmi_register); | |||
| 183 | 183 | ||
| 184 | /* | 184 | /* |
| 185 | * This gets called from entry.S when the watchdog has bitten. Show something | 185 | * This gets called from entry.S when the watchdog has bitten. Show something |
| 186 | * similiar to an Oops dump, and if the kernel is configured to be a nice | 186 | * similar to an Oops dump, and if the kernel is configured to be a nice |
| 187 | * doggy, then halt instead of reboot. | 187 | * doggy, then halt instead of reboot. |
| 188 | */ | 188 | */ |
| 189 | void | 189 | void |
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index 6db8aea5667f..064f62196745 100644 --- a/arch/frv/Kconfig +++ b/arch/frv/Kconfig | |||
| @@ -7,7 +7,6 @@ config FRV | |||
| 7 | select HAVE_PERF_EVENTS | 7 | select HAVE_PERF_EVENTS |
| 8 | select HAVE_GENERIC_HARDIRQS | 8 | select HAVE_GENERIC_HARDIRQS |
| 9 | select GENERIC_IRQ_SHOW | 9 | select GENERIC_IRQ_SHOW |
| 10 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
| 11 | 10 | ||
| 12 | config ZONE_DMA | 11 | config ZONE_DMA |
| 13 | bool | 12 | bool |
diff --git a/arch/frv/include/asm/pci.h b/arch/frv/include/asm/pci.h index 0d5997909850..ef03baf5d89d 100644 --- a/arch/frv/include/asm/pci.h +++ b/arch/frv/include/asm/pci.h | |||
| @@ -54,7 +54,7 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
| 54 | #endif | 54 | #endif |
| 55 | 55 | ||
| 56 | /* | 56 | /* |
| 57 | * These are pretty much arbitary with the CoMEM implementation. | 57 | * These are pretty much arbitrary with the CoMEM implementation. |
| 58 | * We have the whole address space to ourselves. | 58 | * We have the whole address space to ourselves. |
| 59 | */ | 59 | */ |
| 60 | #define PCIBIOS_MIN_IO 0x100 | 60 | #define PCIBIOS_MIN_IO 0x100 |
diff --git a/arch/frv/include/asm/spr-regs.h b/arch/frv/include/asm/spr-regs.h index 01e6af5e99b8..d3883021f236 100644 --- a/arch/frv/include/asm/spr-regs.h +++ b/arch/frv/include/asm/spr-regs.h | |||
| @@ -274,7 +274,7 @@ | |||
| 274 | #define MSR0_RD 0xc0000000 /* rounding mode */ | 274 | #define MSR0_RD 0xc0000000 /* rounding mode */ |
| 275 | #define MSR0_RD_NEAREST 0x00000000 /* - nearest */ | 275 | #define MSR0_RD_NEAREST 0x00000000 /* - nearest */ |
| 276 | #define MSR0_RD_ZERO 0x40000000 /* - zero */ | 276 | #define MSR0_RD_ZERO 0x40000000 /* - zero */ |
| 277 | #define MSR0_RD_POS_INF 0x80000000 /* - postive infinity */ | 277 | #define MSR0_RD_POS_INF 0x80000000 /* - positive infinity */ |
| 278 | #define MSR0_RD_NEG_INF 0xc0000000 /* - negative infinity */ | 278 | #define MSR0_RD_NEG_INF 0xc0000000 /* - negative infinity */ |
| 279 | 279 | ||
| 280 | /* | 280 | /* |
diff --git a/arch/frv/include/asm/virtconvert.h b/arch/frv/include/asm/virtconvert.h index 59788fa2a813..b26d70ab9111 100644 --- a/arch/frv/include/asm/virtconvert.h +++ b/arch/frv/include/asm/virtconvert.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* virtconvert.h: virtual/physical/page address convertion | 1 | /* virtconvert.h: virtual/physical/page address conversion |
| 2 | * | 2 | * |
| 3 | * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. | 3 | * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. |
| 4 | * Written by David Howells (dhowells@redhat.com) | 4 | * Written by David Howells (dhowells@redhat.com) |
diff --git a/arch/frv/kernel/entry-table.S b/arch/frv/kernel/entry-table.S index bf35f33e48c9..06c5ae191e59 100644 --- a/arch/frv/kernel/entry-table.S +++ b/arch/frv/kernel/entry-table.S | |||
| @@ -86,7 +86,7 @@ __break_usertrap_fixup_table: | |||
| 86 | .globl __break_kerneltrap_fixup_table | 86 | .globl __break_kerneltrap_fixup_table |
| 87 | __break_kerneltrap_fixup_table: | 87 | __break_kerneltrap_fixup_table: |
| 88 | 88 | ||
| 89 | # handler declaration for a sofware or program interrupt | 89 | # handler declaration for a software or program interrupt |
| 90 | .macro VECTOR_SOFTPROG tbr_tt, vec | 90 | .macro VECTOR_SOFTPROG tbr_tt, vec |
| 91 | .section .trap.user | 91 | .section .trap.user |
| 92 | .org \tbr_tt | 92 | .org \tbr_tt |
| @@ -145,7 +145,7 @@ __break_kerneltrap_fixup_table: | |||
| 145 | .long \vec | 145 | .long \vec |
| 146 | .endm | 146 | .endm |
| 147 | 147 | ||
| 148 | # handler declaration for an MMU only sofware or program interrupt | 148 | # handler declaration for an MMU only software or program interrupt |
| 149 | .macro VECTOR_SP_MMU tbr_tt, vec | 149 | .macro VECTOR_SP_MMU tbr_tt, vec |
| 150 | #ifdef CONFIG_MMU | 150 | #ifdef CONFIG_MMU |
| 151 | VECTOR_SOFTPROG \tbr_tt, \vec | 151 | VECTOR_SOFTPROG \tbr_tt, \vec |
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig index 931a1ac99ff1..e20322ffcaf8 100644 --- a/arch/h8300/Kconfig +++ b/arch/h8300/Kconfig | |||
| @@ -3,7 +3,6 @@ config H8300 | |||
| 3 | default y | 3 | default y |
| 4 | select HAVE_IDE | 4 | select HAVE_IDE |
| 5 | select HAVE_GENERIC_HARDIRQS | 5 | select HAVE_GENERIC_HARDIRQS |
| 6 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
| 7 | select GENERIC_IRQ_SHOW | 6 | select GENERIC_IRQ_SHOW |
| 8 | 7 | ||
| 9 | config SYMBOL_PREFIX | 8 | config SYMBOL_PREFIX |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index c4ea0925cdbd..e5cc56ae6ce3 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
| @@ -414,11 +414,11 @@ config PERMIT_BSP_REMOVE | |||
| 414 | support. | 414 | support. |
| 415 | 415 | ||
| 416 | config FORCE_CPEI_RETARGET | 416 | config FORCE_CPEI_RETARGET |
| 417 | bool "Force assumption that CPEI can be re-targetted" | 417 | bool "Force assumption that CPEI can be re-targeted" |
| 418 | depends on PERMIT_BSP_REMOVE | 418 | depends on PERMIT_BSP_REMOVE |
| 419 | default n | 419 | default n |
| 420 | ---help--- | 420 | ---help--- |
| 421 | Say Y if you need to force the assumption that CPEI can be re-targetted to | 421 | Say Y if you need to force the assumption that CPEI can be re-targeted to |
| 422 | any cpu in the system. This hint is available via ACPI 3.0 specifications. | 422 | any cpu in the system. This hint is available via ACPI 3.0 specifications. |
| 423 | Tiger4 systems are capable of re-directing CPEI to any CPU other than BSP. | 423 | Tiger4 systems are capable of re-directing CPEI to any CPU other than BSP. |
| 424 | This option it useful to enable this feature on older BIOS's as well. | 424 | This option it useful to enable this feature on older BIOS's as well. |
diff --git a/arch/ia64/include/asm/pal.h b/arch/ia64/include/asm/pal.h index 6a292505b396..2e69284df8e7 100644 --- a/arch/ia64/include/asm/pal.h +++ b/arch/ia64/include/asm/pal.h | |||
| @@ -1669,7 +1669,7 @@ typedef union pal_vp_info_u { | |||
| 1669 | } pal_vp_info_u_t; | 1669 | } pal_vp_info_u_t; |
| 1670 | 1670 | ||
| 1671 | /* | 1671 | /* |
| 1672 | * Returns infomation about virtual processor features | 1672 | * Returns information about virtual processor features |
| 1673 | */ | 1673 | */ |
| 1674 | static inline s64 | 1674 | static inline s64 |
| 1675 | ia64_pal_vp_info (u64 feature_set, u64 vp_buffer, u64 *vp_info, u64 *vmm_id) | 1675 | ia64_pal_vp_info (u64 feature_set, u64 vp_buffer, u64 *vp_info, u64 *vmm_id) |
diff --git a/arch/ia64/include/asm/perfmon_default_smpl.h b/arch/ia64/include/asm/perfmon_default_smpl.h index 74724b24c2b7..a2d560c67230 100644 --- a/arch/ia64/include/asm/perfmon_default_smpl.h +++ b/arch/ia64/include/asm/perfmon_default_smpl.h | |||
| @@ -67,8 +67,8 @@ typedef struct { | |||
| 67 | unsigned long ip; /* where did the overflow interrupt happened */ | 67 | unsigned long ip; /* where did the overflow interrupt happened */ |
| 68 | unsigned long tstamp; /* ar.itc when entering perfmon intr. handler */ | 68 | unsigned long tstamp; /* ar.itc when entering perfmon intr. handler */ |
| 69 | 69 | ||
| 70 | unsigned short cpu; /* cpu on which the overflow occured */ | 70 | unsigned short cpu; /* cpu on which the overflow occurred */ |
| 71 | unsigned short set; /* event set active when overflow ocurred */ | 71 | unsigned short set; /* event set active when overflow occurred */ |
| 72 | int tgid; /* thread group id (for NPTL, this is getpid()) */ | 72 | int tgid; /* thread group id (for NPTL, this is getpid()) */ |
| 73 | } pfm_default_smpl_entry_t; | 73 | } pfm_default_smpl_entry_t; |
| 74 | 74 | ||
diff --git a/arch/ia64/include/asm/sn/bte.h b/arch/ia64/include/asm/sn/bte.h index 96798d2da7c2..cc6c4dbf53af 100644 --- a/arch/ia64/include/asm/sn/bte.h +++ b/arch/ia64/include/asm/sn/bte.h | |||
| @@ -216,7 +216,7 @@ extern void bte_error_handler(unsigned long); | |||
| 216 | bte_copy(0, dest, len, ((mode) | BTE_ZERO_FILL), notification) | 216 | bte_copy(0, dest, len, ((mode) | BTE_ZERO_FILL), notification) |
| 217 | 217 | ||
| 218 | /* | 218 | /* |
| 219 | * The following is the prefered way of calling bte_unaligned_copy | 219 | * The following is the preferred way of calling bte_unaligned_copy |
| 220 | * If the copy is fully cache line aligned, then bte_copy is | 220 | * If the copy is fully cache line aligned, then bte_copy is |
| 221 | * used instead. Since bte_copy is inlined, this saves a call | 221 | * used instead. Since bte_copy is inlined, this saves a call |
| 222 | * stack. NOTE: bte_copy is called synchronously and does block | 222 | * stack. NOTE: bte_copy is called synchronously and does block |
diff --git a/arch/ia64/include/asm/sn/shub_mmr.h b/arch/ia64/include/asm/sn/shub_mmr.h index 7de1d1d4b71a..a84d870f4294 100644 --- a/arch/ia64/include/asm/sn/shub_mmr.h +++ b/arch/ia64/include/asm/sn/shub_mmr.h | |||
| @@ -459,7 +459,7 @@ | |||
| 459 | /* ==================================================================== */ | 459 | /* ==================================================================== */ |
| 460 | /* Some MMRs are functionally identical (or close enough) on both SHUB1 */ | 460 | /* Some MMRs are functionally identical (or close enough) on both SHUB1 */ |
| 461 | /* and SHUB2 that it makes sense to define a geberic name for the MMR. */ | 461 | /* and SHUB2 that it makes sense to define a geberic name for the MMR. */ |
| 462 | /* It is acceptible to use (for example) SH_IPI_INT to reference the */ | 462 | /* It is acceptable to use (for example) SH_IPI_INT to reference the */ |
| 463 | /* the IPI MMR. The value of SH_IPI_INT is determined at runtime based */ | 463 | /* the IPI MMR. The value of SH_IPI_INT is determined at runtime based */ |
| 464 | /* on the type of the SHUB. Do not use these #defines in performance */ | 464 | /* on the type of the SHUB. Do not use these #defines in performance */ |
| 465 | /* critical code or loops - there is a small performance penalty. */ | 465 | /* critical code or loops - there is a small performance penalty. */ |
diff --git a/arch/ia64/include/asm/sn/shubio.h b/arch/ia64/include/asm/sn/shubio.h index 6052422a22b3..ecb8a49476b6 100644 --- a/arch/ia64/include/asm/sn/shubio.h +++ b/arch/ia64/include/asm/sn/shubio.h | |||
| @@ -1383,7 +1383,7 @@ typedef union ii_ibcr_u { | |||
| 1383 | * response is capture in IXSM and IXSS, and IXSS[VALID] is set. The * | 1383 | * response is capture in IXSM and IXSS, and IXSS[VALID] is set. The * |
| 1384 | * errant header is thereby captured, and no further spurious read * | 1384 | * errant header is thereby captured, and no further spurious read * |
| 1385 | * respones are captured until IXSS[VALID] is cleared by setting the * | 1385 | * respones are captured until IXSS[VALID] is cleared by setting the * |
| 1386 | * appropriate bit in IECLR.Everytime a spurious read response is * | 1386 | * appropriate bit in IECLR. Every time a spurious read response is * |
| 1387 | * detected, the SPUR_RD bit of the PRB corresponding to the incoming * | 1387 | * detected, the SPUR_RD bit of the PRB corresponding to the incoming * |
| 1388 | * message's SIDN field is set. This always happens, regarless of * | 1388 | * message's SIDN field is set. This always happens, regarless of * |
| 1389 | * whether a header is captured. The programmer should check * | 1389 | * whether a header is captured. The programmer should check * |
| @@ -2738,7 +2738,7 @@ typedef union ii_ippr_u { | |||
| 2738 | /************************************************************************ | 2738 | /************************************************************************ |
| 2739 | * * | 2739 | * * |
| 2740 | * The following defines which were not formed into structures are * | 2740 | * The following defines which were not formed into structures are * |
| 2741 | * probably indentical to another register, and the name of the * | 2741 | * probably identical to another register, and the name of the * |
| 2742 | * register is provided against each of these registers. This * | 2742 | * register is provided against each of these registers. This * |
| 2743 | * information needs to be checked carefully * | 2743 | * information needs to be checked carefully * |
| 2744 | * * | 2744 | * * |
diff --git a/arch/ia64/kernel/cyclone.c b/arch/ia64/kernel/cyclone.c index d52f1f78eff2..1b811c61bdc6 100644 --- a/arch/ia64/kernel/cyclone.c +++ b/arch/ia64/kernel/cyclone.c | |||
| @@ -31,7 +31,7 @@ static struct clocksource clocksource_cyclone = { | |||
| 31 | .rating = 300, | 31 | .rating = 300, |
| 32 | .read = read_cyclone, | 32 | .read = read_cyclone, |
| 33 | .mask = (1LL << 40) - 1, | 33 | .mask = (1LL << 40) - 1, |
| 34 | .mult = 0, /*to be caluclated*/ | 34 | .mult = 0, /*to be calculated*/ |
| 35 | .shift = 16, | 35 | .shift = 16, |
| 36 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 36 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
| 37 | }; | 37 | }; |
diff --git a/arch/ia64/kernel/perfmon_default_smpl.c b/arch/ia64/kernel/perfmon_default_smpl.c index 5f637bbfcccd..30c644ea44c9 100644 --- a/arch/ia64/kernel/perfmon_default_smpl.c +++ b/arch/ia64/kernel/perfmon_default_smpl.c | |||
| @@ -150,7 +150,7 @@ default_handler(struct task_struct *task, void *buf, pfm_ovfl_arg_t *arg, struct | |||
| 150 | * current = task running at the time of the overflow. | 150 | * current = task running at the time of the overflow. |
| 151 | * | 151 | * |
| 152 | * per-task mode: | 152 | * per-task mode: |
| 153 | * - this is ususally the task being monitored. | 153 | * - this is usually the task being monitored. |
| 154 | * Under certain conditions, it might be a different task | 154 | * Under certain conditions, it might be a different task |
| 155 | * | 155 | * |
| 156 | * system-wide: | 156 | * system-wide: |
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 44f11ee411c0..14ec641003da 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
| @@ -703,7 +703,7 @@ int migrate_platform_irqs(unsigned int cpu) | |||
| 703 | data->chip->irq_disable(data); | 703 | data->chip->irq_disable(data); |
| 704 | data->chip->irq_set_affinity(data, mask, false); | 704 | data->chip->irq_set_affinity(data, mask, false); |
| 705 | data->chip->irq_enable(data); | 705 | data->chip->irq_enable(data); |
| 706 | printk ("Re-targetting CPEI to cpu %d\n", new_cpei_cpu); | 706 | printk ("Re-targeting CPEI to cpu %d\n", new_cpei_cpu); |
| 707 | } | 707 | } |
| 708 | } | 708 | } |
| 709 | if (!data) { | 709 | if (!data) { |
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index 0baa1bbb65fe..0e0e0cc9e392 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
| @@ -43,7 +43,7 @@ int __ref arch_register_cpu(int num) | |||
| 43 | { | 43 | { |
| 44 | #ifdef CONFIG_ACPI | 44 | #ifdef CONFIG_ACPI |
| 45 | /* | 45 | /* |
| 46 | * If CPEI can be re-targetted or if this is not | 46 | * If CPEI can be re-targeted or if this is not |
| 47 | * CPEI target, then it is hotpluggable | 47 | * CPEI target, then it is hotpluggable |
| 48 | */ | 48 | */ |
| 49 | if (can_cpei_retarget() || !is_cpu_cpei_target(num)) | 49 | if (can_cpei_retarget() || !is_cpu_cpei_target(num)) |
diff --git a/arch/ia64/kvm/process.c b/arch/ia64/kvm/process.c index bb862fb224f2..b0398740b48d 100644 --- a/arch/ia64/kvm/process.c +++ b/arch/ia64/kvm/process.c | |||
| @@ -987,7 +987,7 @@ static void vmm_sanity_check(struct kvm_vcpu *vcpu) | |||
| 987 | 987 | ||
| 988 | static void kvm_do_resume_op(struct kvm_vcpu *vcpu) | 988 | static void kvm_do_resume_op(struct kvm_vcpu *vcpu) |
| 989 | { | 989 | { |
| 990 | vmm_sanity_check(vcpu); /*Guarantee vcpu runing on healthy vmm!*/ | 990 | vmm_sanity_check(vcpu); /*Guarantee vcpu running on healthy vmm!*/ |
| 991 | 991 | ||
| 992 | if (test_and_clear_bit(KVM_REQ_RESUME, &vcpu->requests)) { | 992 | if (test_and_clear_bit(KVM_REQ_RESUME, &vcpu->requests)) { |
| 993 | vcpu_do_resume(vcpu); | 993 | vcpu_do_resume(vcpu); |
diff --git a/arch/ia64/lib/do_csum.S b/arch/ia64/lib/do_csum.S index 6bec2fc9f5b2..1a431a5cf86f 100644 --- a/arch/ia64/lib/do_csum.S +++ b/arch/ia64/lib/do_csum.S | |||
| @@ -201,7 +201,7 @@ GLOBAL_ENTRY(do_csum) | |||
| 201 | ;; | 201 | ;; |
| 202 | (p6) adds result1[0]=1,result1[0] | 202 | (p6) adds result1[0]=1,result1[0] |
| 203 | (p9) br.cond.sptk .do_csum_exit // if (count == 1) exit | 203 | (p9) br.cond.sptk .do_csum_exit // if (count == 1) exit |
| 204 | // Fall through to caluculate the checksum, feeding result1[0] as | 204 | // Fall through to calculate the checksum, feeding result1[0] as |
| 205 | // the initial value in result1[0]. | 205 | // the initial value in result1[0]. |
| 206 | // | 206 | // |
| 207 | // Calculate the checksum loading two 8-byte words per loop. | 207 | // Calculate the checksum loading two 8-byte words per loop. |
diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c index 7f399f9d99c7..81a1f4e6bcd8 100644 --- a/arch/ia64/sn/kernel/irq.c +++ b/arch/ia64/sn/kernel/irq.c | |||
| @@ -227,7 +227,7 @@ void sn_set_err_irq_affinity(unsigned int irq) | |||
| 227 | { | 227 | { |
| 228 | /* | 228 | /* |
| 229 | * On systems which support CPU disabling (SHub2), all error interrupts | 229 | * On systems which support CPU disabling (SHub2), all error interrupts |
| 230 | * are targetted at the boot CPU. | 230 | * are targeted at the boot CPU. |
| 231 | */ | 231 | */ |
| 232 | if (is_shub2() && sn_prom_feature_available(PRF_CPU_DISABLE_SUPPORT)) | 232 | if (is_shub2() && sn_prom_feature_available(PRF_CPU_DISABLE_SUPPORT)) |
| 233 | set_irq_affinity_info(irq, cpu_physical_id(0), 0); | 233 | set_irq_affinity_info(irq, cpu_physical_id(0), 0); |
| @@ -412,7 +412,7 @@ sn_call_force_intr_provider(struct sn_irq_info *sn_irq_info) | |||
| 412 | pci_provider = sn_pci_provider[sn_irq_info->irq_bridge_type]; | 412 | pci_provider = sn_pci_provider[sn_irq_info->irq_bridge_type]; |
| 413 | 413 | ||
| 414 | /* Don't force an interrupt if the irq has been disabled */ | 414 | /* Don't force an interrupt if the irq has been disabled */ |
| 415 | if (!irqd_irq_disabled(sn_irq_info->irq_irq) && | 415 | if (!irqd_irq_disabled(irq_get_irq_data(sn_irq_info->irq_irq)) && |
| 416 | pci_provider && pci_provider->force_interrupt) | 416 | pci_provider && pci_provider->force_interrupt) |
| 417 | (*pci_provider->force_interrupt)(sn_irq_info); | 417 | (*pci_provider->force_interrupt)(sn_irq_info); |
| 418 | } | 418 | } |
| @@ -435,7 +435,7 @@ static void sn_check_intr(int irq, struct sn_irq_info *sn_irq_info) | |||
| 435 | /* | 435 | /* |
| 436 | * Bridge types attached to TIO (anything but PIC) do not need this WAR | 436 | * Bridge types attached to TIO (anything but PIC) do not need this WAR |
| 437 | * since they do not target Shub II interrupt registers. If that | 437 | * since they do not target Shub II interrupt registers. If that |
| 438 | * ever changes, this check needs to accomodate. | 438 | * ever changes, this check needs to accommodate. |
| 439 | */ | 439 | */ |
| 440 | if (sn_irq_info->irq_bridge_type != PCIIO_ASIC_TYPE_PIC) | 440 | if (sn_irq_info->irq_bridge_type != PCIIO_ASIC_TYPE_PIC) |
| 441 | return; | 441 | return; |
diff --git a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c index c76d8dc3aea3..7aab87f48060 100644 --- a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c +++ b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c | |||
| @@ -45,38 +45,6 @@ static int licenseID_open(struct inode *inode, struct file *file) | |||
| 45 | return single_open(file, licenseID_show, NULL); | 45 | return single_open(file, licenseID_show, NULL); |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | /* | ||
| 49 | * Enable forced interrupt by default. | ||
| 50 | * When set, the sn interrupt handler writes the force interrupt register on | ||
| 51 | * the bridge chip. The hardware will then send an interrupt message if the | ||
| 52 | * interrupt line is active. This mimics a level sensitive interrupt. | ||
| 53 | */ | ||
| 54 | extern int sn_force_interrupt_flag; | ||
| 55 | |||
| 56 | static int sn_force_interrupt_show(struct seq_file *s, void *p) | ||
| 57 | { | ||
| 58 | seq_printf(s, "Force interrupt is %s\n", | ||
| 59 | sn_force_interrupt_flag ? "enabled" : "disabled"); | ||
| 60 | return 0; | ||
| 61 | } | ||
| 62 | |||
| 63 | static ssize_t sn_force_interrupt_write_proc(struct file *file, | ||
| 64 | const char __user *buffer, size_t count, loff_t *data) | ||
| 65 | { | ||
| 66 | char val; | ||
| 67 | |||
| 68 | if (copy_from_user(&val, buffer, 1)) | ||
| 69 | return -EFAULT; | ||
| 70 | |||
| 71 | sn_force_interrupt_flag = (val == '0') ? 0 : 1; | ||
| 72 | return count; | ||
| 73 | } | ||
| 74 | |||
| 75 | static int sn_force_interrupt_open(struct inode *inode, struct file *file) | ||
| 76 | { | ||
| 77 | return single_open(file, sn_force_interrupt_show, NULL); | ||
| 78 | } | ||
| 79 | |||
| 80 | static int coherence_id_show(struct seq_file *s, void *p) | 48 | static int coherence_id_show(struct seq_file *s, void *p) |
| 81 | { | 49 | { |
| 82 | seq_printf(s, "%d\n", partition_coherence_id()); | 50 | seq_printf(s, "%d\n", partition_coherence_id()); |
| @@ -114,14 +82,6 @@ static const struct file_operations proc_license_id_fops = { | |||
| 114 | .release = single_release, | 82 | .release = single_release, |
| 115 | }; | 83 | }; |
| 116 | 84 | ||
| 117 | static const struct file_operations proc_sn_force_intr_fops = { | ||
| 118 | .open = sn_force_interrupt_open, | ||
| 119 | .read = seq_read, | ||
| 120 | .write = sn_force_interrupt_write_proc, | ||
| 121 | .llseek = seq_lseek, | ||
| 122 | .release = single_release, | ||
| 123 | }; | ||
| 124 | |||
| 125 | static const struct file_operations proc_coherence_id_fops = { | 85 | static const struct file_operations proc_coherence_id_fops = { |
| 126 | .open = coherence_id_open, | 86 | .open = coherence_id_open, |
| 127 | .read = seq_read, | 87 | .read = seq_read, |
| @@ -149,8 +109,6 @@ void register_sn_procfs(void) | |||
| 149 | proc_create("system_serial_number", 0444, sgi_proc_dir, | 109 | proc_create("system_serial_number", 0444, sgi_proc_dir, |
| 150 | &proc_system_sn_fops); | 110 | &proc_system_sn_fops); |
| 151 | proc_create("licenseID", 0444, sgi_proc_dir, &proc_license_id_fops); | 111 | proc_create("licenseID", 0444, sgi_proc_dir, &proc_license_id_fops); |
| 152 | proc_create("sn_force_interrupt", 0644, sgi_proc_dir, | ||
| 153 | &proc_sn_force_intr_fops); | ||
| 154 | proc_create("coherence_id", 0444, sgi_proc_dir, | 112 | proc_create("coherence_id", 0444, sgi_proc_dir, |
| 155 | &proc_coherence_id_fops); | 113 | &proc_coherence_id_fops); |
| 156 | proc_create("sn_topology", 0444, sgi_proc_dir, &proc_sn_topo_fops); | 114 | proc_create("sn_topology", 0444, sgi_proc_dir, &proc_sn_topo_fops); |
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_dma.c b/arch/ia64/sn/pci/pcibr/pcibr_dma.c index c659ad5613a0..33def666a664 100644 --- a/arch/ia64/sn/pci/pcibr/pcibr_dma.c +++ b/arch/ia64/sn/pci/pcibr/pcibr_dma.c | |||
| @@ -227,7 +227,7 @@ pcibr_dma_unmap(struct pci_dev *hwdev, dma_addr_t dma_handle, int direction) | |||
| 227 | * after doing the read. For PIC this routine then forces a fake interrupt | 227 | * after doing the read. For PIC this routine then forces a fake interrupt |
| 228 | * on another line, which is logically associated with the slot that the PIO | 228 | * on another line, which is logically associated with the slot that the PIO |
| 229 | * is addressed to. It then spins while watching the memory location that | 229 | * is addressed to. It then spins while watching the memory location that |
| 230 | * the interrupt is targetted to. When the interrupt response arrives, we | 230 | * the interrupt is targeted to. When the interrupt response arrives, we |
| 231 | * are sure that the DMA has landed in memory and it is safe for the driver | 231 | * are sure that the DMA has landed in memory and it is safe for the driver |
| 232 | * to proceed. For TIOCP use the Device(x) Write Request Buffer Flush | 232 | * to proceed. For TIOCP use the Device(x) Write Request Buffer Flush |
| 233 | * Bridge register since it ensures the data has entered the coherence domain, | 233 | * Bridge register since it ensures the data has entered the coherence domain, |
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index b28d0908a402..736b808d2291 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig | |||
| @@ -8,7 +8,6 @@ config M32R | |||
| 8 | select HAVE_KERNEL_BZIP2 | 8 | select HAVE_KERNEL_BZIP2 |
| 9 | select HAVE_KERNEL_LZMA | 9 | select HAVE_KERNEL_LZMA |
| 10 | select HAVE_GENERIC_HARDIRQS | 10 | select HAVE_GENERIC_HARDIRQS |
| 11 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
| 12 | select GENERIC_IRQ_PROBE | 11 | select GENERIC_IRQ_PROBE |
| 13 | select GENERIC_IRQ_SHOW | 12 | select GENERIC_IRQ_SHOW |
| 14 | 13 | ||
diff --git a/arch/m32r/include/asm/m32104ut/m32104ut_pld.h b/arch/m32r/include/asm/m32104ut/m32104ut_pld.h index 2dc89d68b6d9..1feae9709f24 100644 --- a/arch/m32r/include/asm/m32104ut/m32104ut_pld.h +++ b/arch/m32r/include/asm/m32104ut/m32104ut_pld.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | /* | 4 | /* |
| 5 | * include/asm-m32r/m32104ut/m32104ut_pld.h | 5 | * include/asm-m32r/m32104ut/m32104ut_pld.h |
| 6 | * | 6 | * |
| 7 | * Definitions for Programable Logic Device(PLD) on M32104UT board. | 7 | * Definitions for Programmable Logic Device(PLD) on M32104UT board. |
| 8 | * Based on m32700ut_pld.h | 8 | * Based on m32700ut_pld.h |
| 9 | * | 9 | * |
| 10 | * Copyright (c) 2002 Takeo Takahashi | 10 | * Copyright (c) 2002 Takeo Takahashi |
diff --git a/arch/m32r/include/asm/m32700ut/m32700ut_pld.h b/arch/m32r/include/asm/m32700ut/m32700ut_pld.h index 57623beb44cb..35294670b187 100644 --- a/arch/m32r/include/asm/m32700ut/m32700ut_pld.h +++ b/arch/m32r/include/asm/m32700ut/m32700ut_pld.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | /* | 4 | /* |
| 5 | * include/asm-m32r/m32700ut/m32700ut_pld.h | 5 | * include/asm-m32r/m32700ut/m32700ut_pld.h |
| 6 | * | 6 | * |
| 7 | * Definitions for Programable Logic Device(PLD) on M32700UT board. | 7 | * Definitions for Programmable Logic Device(PLD) on M32700UT board. |
| 8 | * | 8 | * |
| 9 | * Copyright (c) 2002 Takeo Takahashi | 9 | * Copyright (c) 2002 Takeo Takahashi |
| 10 | * | 10 | * |
diff --git a/arch/m32r/include/asm/opsput/opsput_pld.h b/arch/m32r/include/asm/opsput/opsput_pld.h index 3f11ea1aac2d..6901401fe9eb 100644 --- a/arch/m32r/include/asm/opsput/opsput_pld.h +++ b/arch/m32r/include/asm/opsput/opsput_pld.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | /* | 4 | /* |
| 5 | * include/asm-m32r/opsput/opsput_pld.h | 5 | * include/asm-m32r/opsput/opsput_pld.h |
| 6 | * | 6 | * |
| 7 | * Definitions for Programable Logic Device(PLD) on OPSPUT board. | 7 | * Definitions for Programmable Logic Device(PLD) on OPSPUT board. |
| 8 | * | 8 | * |
| 9 | * Copyright (c) 2002 Takeo Takahashi | 9 | * Copyright (c) 2002 Takeo Takahashi |
| 10 | * | 10 | * |
diff --git a/arch/m32r/include/asm/pgtable-2level.h b/arch/m32r/include/asm/pgtable-2level.h index bca3475f9595..9cdaf7350ef6 100644 --- a/arch/m32r/include/asm/pgtable-2level.h +++ b/arch/m32r/include/asm/pgtable-2level.h | |||
| @@ -44,7 +44,7 @@ static inline int pgd_present(pgd_t pgd) { return 1; } | |||
| 44 | #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) | 44 | #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) |
| 45 | 45 | ||
| 46 | /* | 46 | /* |
| 47 | * (pmds are folded into pgds so this doesnt get actually called, | 47 | * (pmds are folded into pgds so this doesn't get actually called, |
| 48 | * but the define is needed for a generic inline function.) | 48 | * but the define is needed for a generic inline function.) |
| 49 | */ | 49 | */ |
| 50 | #define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval) | 50 | #define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval) |
diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c index b8ec002aef8e..2c9aeb453847 100644 --- a/arch/m32r/mm/fault.c +++ b/arch/m32r/mm/fault.c | |||
| @@ -120,7 +120,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, | |||
| 120 | 120 | ||
| 121 | /* When running in the kernel we expect faults to occur only to | 121 | /* When running in the kernel we expect faults to occur only to |
| 122 | * addresses in user space. All other faults represent errors in the | 122 | * addresses in user space. All other faults represent errors in the |
| 123 | * kernel and should generate an OOPS. Unfortunatly, in the case of an | 123 | * kernel and should generate an OOPS. Unfortunately, in the case of an |
| 124 | * erroneous fault occurring in a code path which already holds mmap_sem | 124 | * erroneous fault occurring in a code path which already holds mmap_sem |
| 125 | * we will deadlock attempting to validate the fault against the | 125 | * we will deadlock attempting to validate the fault against the |
| 126 | * address space. Luckily the kernel only validly references user | 126 | * address space. Luckily the kernel only validly references user |
| @@ -128,7 +128,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, | |||
| 128 | * exceptions table. | 128 | * exceptions table. |
| 129 | * | 129 | * |
| 130 | * As the vast majority of faults will be valid we will only perform | 130 | * As the vast majority of faults will be valid we will only perform |
| 131 | * the source reference check when there is a possibilty of a deadlock. | 131 | * the source reference check when there is a possibility of a deadlock. |
| 132 | * Attempt to lock the address space, if we cannot we then validate the | 132 | * Attempt to lock the address space, if we cannot we then validate the |
| 133 | * source. If this is invalid we can skip the address space check, | 133 | * source. If this is invalid we can skip the address space check, |
| 134 | * thus avoiding the deadlock. | 134 | * thus avoiding the deadlock. |
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 6e056d3c5d01..75531da02a40 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig | |||
| @@ -5,7 +5,6 @@ config M68K | |||
| 5 | select HAVE_AOUT if MMU | 5 | select HAVE_AOUT if MMU |
| 6 | select GENERIC_ATOMIC64 if MMU | 6 | select GENERIC_ATOMIC64 if MMU |
| 7 | select HAVE_GENERIC_HARDIRQS if !MMU | 7 | select HAVE_GENERIC_HARDIRQS if !MMU |
| 8 | select GENERIC_HARDIRQS_NO_DEPRECATED if !MMU | ||
| 9 | 8 | ||
| 10 | config RWSEM_GENERIC_SPINLOCK | 9 | config RWSEM_GENERIC_SPINLOCK |
| 11 | bool | 10 | bool |
diff --git a/arch/m68k/atari/atakeyb.c b/arch/m68k/atari/atakeyb.c index 5890897d28bf..b995513d527f 100644 --- a/arch/m68k/atari/atakeyb.c +++ b/arch/m68k/atari/atakeyb.c | |||
| @@ -130,7 +130,7 @@ KEYBOARD_STATE kb_state; | |||
| 130 | * it's really hard to decide whether they're mouse or keyboard bytes. Since | 130 | * it's really hard to decide whether they're mouse or keyboard bytes. Since |
| 131 | * overruns usually occur when moving the Atari mouse rapidly, they're seen as | 131 | * overruns usually occur when moving the Atari mouse rapidly, they're seen as |
| 132 | * mouse bytes here. If this is wrong, only a make code of the keyboard gets | 132 | * mouse bytes here. If this is wrong, only a make code of the keyboard gets |
| 133 | * lost, which isn't too bad. Loosing a break code would be disastrous, | 133 | * lost, which isn't too bad. Losing a break code would be disastrous, |
| 134 | * because then the keyboard repeat strikes... | 134 | * because then the keyboard repeat strikes... |
| 135 | */ | 135 | */ |
| 136 | 136 | ||
diff --git a/arch/m68k/fpsp040/bindec.S b/arch/m68k/fpsp040/bindec.S index 72f1159cb804..f2e795231046 100644 --- a/arch/m68k/fpsp040/bindec.S +++ b/arch/m68k/fpsp040/bindec.S | |||
| @@ -609,7 +609,7 @@ do_fint: | |||
| 609 | | A6. This test occurs only on the first pass. If the | 609 | | A6. This test occurs only on the first pass. If the |
| 610 | | result is exactly 10^LEN, decrement ILOG and divide | 610 | | result is exactly 10^LEN, decrement ILOG and divide |
| 611 | | the mantissa by 10. The calculation of 10^LEN cannot | 611 | | the mantissa by 10. The calculation of 10^LEN cannot |
| 612 | | be inexact, since all powers of ten upto 10^27 are exact | 612 | | be inexact, since all powers of ten up to 10^27 are exact |
| 613 | | in extended precision, so the use of a previous power-of-ten | 613 | | in extended precision, so the use of a previous power-of-ten |
| 614 | | table will introduce no error. | 614 | | table will introduce no error. |
| 615 | | | 615 | | |
diff --git a/arch/m68k/ifpsp060/src/fpsp.S b/arch/m68k/ifpsp060/src/fpsp.S index 26e85e2b7a5e..78cb60f5bb4d 100644 --- a/arch/m68k/ifpsp060/src/fpsp.S +++ b/arch/m68k/ifpsp060/src/fpsp.S | |||
| @@ -11813,7 +11813,7 @@ fmul_unfl_ena: | |||
| 11813 | bne.b fmul_unfl_ena_sd # no, sgl or dbl | 11813 | bne.b fmul_unfl_ena_sd # no, sgl or dbl |
| 11814 | 11814 | ||
| 11815 | # if the rnd mode is anything but RZ, then we have to re-do the above | 11815 | # if the rnd mode is anything but RZ, then we have to re-do the above |
| 11816 | # multiplication becuase we used RZ for all. | 11816 | # multiplication because we used RZ for all. |
| 11817 | fmov.l L_SCR3(%a6),%fpcr # set FPCR | 11817 | fmov.l L_SCR3(%a6),%fpcr # set FPCR |
| 11818 | 11818 | ||
| 11819 | fmul_unfl_ena_cont: | 11819 | fmul_unfl_ena_cont: |
| @@ -18095,7 +18095,7 @@ fscc_mem_op: | |||
| 18095 | 18095 | ||
| 18096 | rts | 18096 | rts |
| 18097 | 18097 | ||
| 18098 | # addresing mode is post-increment. write the result byte. if the write | 18098 | # addressing mode is post-increment. write the result byte. if the write |
| 18099 | # fails then don't update the address register. if write passes then | 18099 | # fails then don't update the address register. if write passes then |
| 18100 | # call inc_areg() to update the address register. | 18100 | # call inc_areg() to update the address register. |
| 18101 | fscc_mem_inc: | 18101 | fscc_mem_inc: |
| @@ -20876,7 +20876,7 @@ dst_get_dupper: | |||
| 20876 | swap %d0 # d0 now in upper word | 20876 | swap %d0 # d0 now in upper word |
| 20877 | lsl.l &0x4,%d0 # d0 in proper place for dbl prec exp | 20877 | lsl.l &0x4,%d0 # d0 in proper place for dbl prec exp |
| 20878 | tst.b FTEMP_EX(%a0) # test sign | 20878 | tst.b FTEMP_EX(%a0) # test sign |
| 20879 | bpl.b dst_get_dman # if postive, go process mantissa | 20879 | bpl.b dst_get_dman # if positive, go process mantissa |
| 20880 | bset &0x1f,%d0 # if negative, set sign | 20880 | bset &0x1f,%d0 # if negative, set sign |
| 20881 | dst_get_dman: | 20881 | dst_get_dman: |
| 20882 | mov.l FTEMP_HI(%a0),%d1 # get ms mantissa | 20882 | mov.l FTEMP_HI(%a0),%d1 # get ms mantissa |
| @@ -22943,7 +22943,7 @@ tbl_ovfl_result: | |||
| 22943 | # FP_SRC(a6) = packed operand now as a binary FP number # | 22943 | # FP_SRC(a6) = packed operand now as a binary FP number # |
| 22944 | # # | 22944 | # # |
| 22945 | # ALGORITHM *********************************************************** # | 22945 | # ALGORITHM *********************************************************** # |
| 22946 | # Get the correct <ea> whihc is the value on the exception stack # | 22946 | # Get the correct <ea> which is the value on the exception stack # |
| 22947 | # frame w/ maybe a correction factor if the <ea> is -(an) or (an)+. # | 22947 | # frame w/ maybe a correction factor if the <ea> is -(an) or (an)+. # |
| 22948 | # Then, fetch the operand from memory. If the fetch fails, exit # | 22948 | # Then, fetch the operand from memory. If the fetch fails, exit # |
| 22949 | # through facc_in_x(). # | 22949 | # through facc_in_x(). # |
| @@ -24096,7 +24096,7 @@ do_fint12: | |||
| 24096 | # A6. This test occurs only on the first pass. If the | 24096 | # A6. This test occurs only on the first pass. If the |
| 24097 | # result is exactly 10^LEN, decrement ILOG and divide | 24097 | # result is exactly 10^LEN, decrement ILOG and divide |
| 24098 | # the mantissa by 10. The calculation of 10^LEN cannot | 24098 | # the mantissa by 10. The calculation of 10^LEN cannot |
| 24099 | # be inexact, since all powers of ten upto 10^27 are exact | 24099 | # be inexact, since all powers of ten up to 10^27 are exact |
| 24100 | # in extended precision, so the use of a previous power-of-ten | 24100 | # in extended precision, so the use of a previous power-of-ten |
| 24101 | # table will introduce no error. | 24101 | # table will introduce no error. |
| 24102 | # | 24102 | # |
diff --git a/arch/m68k/ifpsp060/src/pfpsp.S b/arch/m68k/ifpsp060/src/pfpsp.S index e71ba0ab013c..4aedef973cf6 100644 --- a/arch/m68k/ifpsp060/src/pfpsp.S +++ b/arch/m68k/ifpsp060/src/pfpsp.S | |||
| @@ -7777,7 +7777,7 @@ dst_get_dupper: | |||
| 7777 | swap %d0 # d0 now in upper word | 7777 | swap %d0 # d0 now in upper word |
| 7778 | lsl.l &0x4,%d0 # d0 in proper place for dbl prec exp | 7778 | lsl.l &0x4,%d0 # d0 in proper place for dbl prec exp |
| 7779 | tst.b FTEMP_EX(%a0) # test sign | 7779 | tst.b FTEMP_EX(%a0) # test sign |
| 7780 | bpl.b dst_get_dman # if postive, go process mantissa | 7780 | bpl.b dst_get_dman # if positive, go process mantissa |
| 7781 | bset &0x1f,%d0 # if negative, set sign | 7781 | bset &0x1f,%d0 # if negative, set sign |
| 7782 | dst_get_dman: | 7782 | dst_get_dman: |
| 7783 | mov.l FTEMP_HI(%a0),%d1 # get ms mantissa | 7783 | mov.l FTEMP_HI(%a0),%d1 # get ms mantissa |
| @@ -8244,7 +8244,7 @@ fmul_unfl_ena: | |||
| 8244 | bne.b fmul_unfl_ena_sd # no, sgl or dbl | 8244 | bne.b fmul_unfl_ena_sd # no, sgl or dbl |
| 8245 | 8245 | ||
| 8246 | # if the rnd mode is anything but RZ, then we have to re-do the above | 8246 | # if the rnd mode is anything but RZ, then we have to re-do the above |
| 8247 | # multiplication becuase we used RZ for all. | 8247 | # multiplication because we used RZ for all. |
| 8248 | fmov.l L_SCR3(%a6),%fpcr # set FPCR | 8248 | fmov.l L_SCR3(%a6),%fpcr # set FPCR |
| 8249 | 8249 | ||
| 8250 | fmul_unfl_ena_cont: | 8250 | fmul_unfl_ena_cont: |
| @@ -12903,7 +12903,7 @@ store_fpreg_7: | |||
| 12903 | # FP_SRC(a6) = packed operand now as a binary FP number # | 12903 | # FP_SRC(a6) = packed operand now as a binary FP number # |
| 12904 | # # | 12904 | # # |
| 12905 | # ALGORITHM *********************************************************** # | 12905 | # ALGORITHM *********************************************************** # |
| 12906 | # Get the correct <ea> whihc is the value on the exception stack # | 12906 | # Get the correct <ea> which is the value on the exception stack # |
| 12907 | # frame w/ maybe a correction factor if the <ea> is -(an) or (an)+. # | 12907 | # frame w/ maybe a correction factor if the <ea> is -(an) or (an)+. # |
| 12908 | # Then, fetch the operand from memory. If the fetch fails, exit # | 12908 | # Then, fetch the operand from memory. If the fetch fails, exit # |
| 12909 | # through facc_in_x(). # | 12909 | # through facc_in_x(). # |
| @@ -14056,7 +14056,7 @@ do_fint12: | |||
| 14056 | # A6. This test occurs only on the first pass. If the | 14056 | # A6. This test occurs only on the first pass. If the |
| 14057 | # result is exactly 10^LEN, decrement ILOG and divide | 14057 | # result is exactly 10^LEN, decrement ILOG and divide |
| 14058 | # the mantissa by 10. The calculation of 10^LEN cannot | 14058 | # the mantissa by 10. The calculation of 10^LEN cannot |
| 14059 | # be inexact, since all powers of ten upto 10^27 are exact | 14059 | # be inexact, since all powers of ten up to 10^27 are exact |
| 14060 | # in extended precision, so the use of a previous power-of-ten | 14060 | # in extended precision, so the use of a previous power-of-ten |
| 14061 | # table will introduce no error. | 14061 | # table will introduce no error. |
| 14062 | # | 14062 | # |
diff --git a/arch/m68k/include/asm/atariints.h b/arch/m68k/include/asm/atariints.h index f597892e43a0..656bbbf5a6ff 100644 --- a/arch/m68k/include/asm/atariints.h +++ b/arch/m68k/include/asm/atariints.h | |||
| @@ -146,7 +146,7 @@ static inline void clear_mfp_bit( unsigned irq, int type ) | |||
| 146 | 146 | ||
| 147 | /* | 147 | /* |
| 148 | * {en,dis}able_irq have the usual semantics of temporary blocking the | 148 | * {en,dis}able_irq have the usual semantics of temporary blocking the |
| 149 | * interrupt, but not loosing requests that happen between disabling and | 149 | * interrupt, but not losing requests that happen between disabling and |
| 150 | * enabling. This is done with the MFP mask registers. | 150 | * enabling. This is done with the MFP mask registers. |
| 151 | */ | 151 | */ |
| 152 | 152 | ||
diff --git a/arch/m68k/include/asm/bootstd.h b/arch/m68k/include/asm/bootstd.h index bdc1a4ac4fe9..e518f5a575b7 100644 --- a/arch/m68k/include/asm/bootstd.h +++ b/arch/m68k/include/asm/bootstd.h | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | #define __BN_flash_write_range 20 | 31 | #define __BN_flash_write_range 20 |
| 32 | 32 | ||
| 33 | /* Calling conventions compatible to (uC)linux/68k | 33 | /* Calling conventions compatible to (uC)linux/68k |
| 34 | * We use simmilar macros to call into the bootloader as for uClinux | 34 | * We use similar macros to call into the bootloader as for uClinux |
| 35 | */ | 35 | */ |
| 36 | 36 | ||
| 37 | #define __bsc_return(type, res) \ | 37 | #define __bsc_return(type, res) \ |
diff --git a/arch/m68k/include/asm/commproc.h b/arch/m68k/include/asm/commproc.h index edf5eb6c08d2..a73998528d26 100644 --- a/arch/m68k/include/asm/commproc.h +++ b/arch/m68k/include/asm/commproc.h | |||
| @@ -88,7 +88,7 @@ typedef struct cpm_buf_desc { | |||
| 88 | 88 | ||
| 89 | 89 | ||
| 90 | /* rx bd status/control bits */ | 90 | /* rx bd status/control bits */ |
| 91 | #define BD_SC_EMPTY ((ushort)0x8000) /* Recieve is empty */ | 91 | #define BD_SC_EMPTY ((ushort)0x8000) /* Receive is empty */ |
| 92 | #define BD_SC_WRAP ((ushort)0x2000) /* Last buffer descriptor in table */ | 92 | #define BD_SC_WRAP ((ushort)0x2000) /* Last buffer descriptor in table */ |
| 93 | #define BD_SC_INTRPT ((ushort)0x1000) /* Interrupt on change */ | 93 | #define BD_SC_INTRPT ((ushort)0x1000) /* Interrupt on change */ |
| 94 | #define BD_SC_LAST ((ushort)0x0800) /* Last buffer in frame OR control char */ | 94 | #define BD_SC_LAST ((ushort)0x0800) /* Last buffer in frame OR control char */ |
| @@ -96,7 +96,7 @@ typedef struct cpm_buf_desc { | |||
| 96 | #define BD_SC_FIRST ((ushort)0x0400) /* 1st buffer in an HDLC frame */ | 96 | #define BD_SC_FIRST ((ushort)0x0400) /* 1st buffer in an HDLC frame */ |
| 97 | #define BD_SC_ADDR ((ushort)0x0400) /* 1st byte is a multidrop address */ | 97 | #define BD_SC_ADDR ((ushort)0x0400) /* 1st byte is a multidrop address */ |
| 98 | 98 | ||
| 99 | #define BD_SC_CM ((ushort)0x0200) /* Continous mode */ | 99 | #define BD_SC_CM ((ushort)0x0200) /* Continuous mode */ |
| 100 | #define BD_SC_ID ((ushort)0x0100) /* Received too many idles */ | 100 | #define BD_SC_ID ((ushort)0x0100) /* Received too many idles */ |
| 101 | 101 | ||
| 102 | #define BD_SC_AM ((ushort)0x0080) /* Multidrop address match */ | 102 | #define BD_SC_AM ((ushort)0x0080) /* Multidrop address match */ |
diff --git a/arch/m68k/include/asm/delay_no.h b/arch/m68k/include/asm/delay_no.h index 55cbd6294ab6..c3a0edc90f21 100644 --- a/arch/m68k/include/asm/delay_no.h +++ b/arch/m68k/include/asm/delay_no.h | |||
| @@ -16,7 +16,7 @@ static inline void __delay(unsigned long loops) | |||
| 16 | * long word alignment which is the faster version. | 16 | * long word alignment which is the faster version. |
| 17 | * The 0x4a8e is of course a 'tstl %fp' instruction. This is better | 17 | * The 0x4a8e is of course a 'tstl %fp' instruction. This is better |
| 18 | * than using a NOP (0x4e71) instruction because it executes in one | 18 | * than using a NOP (0x4e71) instruction because it executes in one |
| 19 | * cycle not three and doesn't allow for an arbitary delay waiting | 19 | * cycle not three and doesn't allow for an arbitrary delay waiting |
| 20 | * for bus cycles to finish. Also fp/a6 isn't likely to cause a | 20 | * for bus cycles to finish. Also fp/a6 isn't likely to cause a |
| 21 | * stall waiting for the register to become valid if such is added | 21 | * stall waiting for the register to become valid if such is added |
| 22 | * to the coldfire at some stage. | 22 | * to the coldfire at some stage. |
diff --git a/arch/m68k/include/asm/gpio.h b/arch/m68k/include/asm/gpio.h index c64c7b74cf86..b2046839f4b2 100644 --- a/arch/m68k/include/asm/gpio.h +++ b/arch/m68k/include/asm/gpio.h | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | * GPIOs in a single control area, others have some GPIOs implemented in | 31 | * GPIOs in a single control area, others have some GPIOs implemented in |
| 32 | * different modules. | 32 | * different modules. |
| 33 | * | 33 | * |
| 34 | * This implementation attempts accomodate the differences while presenting | 34 | * This implementation attempts accommodate the differences while presenting |
| 35 | * a generic interface that will optimize to as few instructions as possible. | 35 | * a generic interface that will optimize to as few instructions as possible. |
| 36 | */ | 36 | */ |
| 37 | #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ | 37 | #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ |
diff --git a/arch/m68k/include/asm/m520xsim.h b/arch/m68k/include/asm/m520xsim.h index 55d5a4c5fe0b..b6bf2c518bac 100644 --- a/arch/m68k/include/asm/m520xsim.h +++ b/arch/m68k/include/asm/m520xsim.h | |||
| @@ -157,7 +157,7 @@ | |||
| 157 | #define MCFFEC_SIZE 0x800 /* Register set size */ | 157 | #define MCFFEC_SIZE 0x800 /* Register set size */ |
| 158 | 158 | ||
| 159 | /* | 159 | /* |
| 160 | * Reset Controll Unit. | 160 | * Reset Control Unit. |
| 161 | */ | 161 | */ |
| 162 | #define MCF_RCR 0xFC0A0000 | 162 | #define MCF_RCR 0xFC0A0000 |
| 163 | #define MCF_RSR 0xFC0A0001 | 163 | #define MCF_RSR 0xFC0A0001 |
diff --git a/arch/m68k/include/asm/m523xsim.h b/arch/m68k/include/asm/m523xsim.h index 8996df62ede4..6235921eca4e 100644 --- a/arch/m68k/include/asm/m523xsim.h +++ b/arch/m68k/include/asm/m523xsim.h | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | #define MCFSIM_DMR1 (MCF_IPSBAR + 0x54) /* Address mask 1 */ | 48 | #define MCFSIM_DMR1 (MCF_IPSBAR + 0x54) /* Address mask 1 */ |
| 49 | 49 | ||
| 50 | /* | 50 | /* |
| 51 | * Reset Controll Unit (relative to IPSBAR). | 51 | * Reset Control Unit (relative to IPSBAR). |
| 52 | */ | 52 | */ |
| 53 | #define MCF_RCR 0x110000 | 53 | #define MCF_RCR 0x110000 |
| 54 | #define MCF_RSR 0x110001 | 54 | #define MCF_RSR 0x110001 |
diff --git a/arch/m68k/include/asm/m527xsim.h b/arch/m68k/include/asm/m527xsim.h index 74855a66c050..758810ef91ec 100644 --- a/arch/m68k/include/asm/m527xsim.h +++ b/arch/m68k/include/asm/m527xsim.h | |||
| @@ -283,7 +283,7 @@ | |||
| 283 | #endif | 283 | #endif |
| 284 | 284 | ||
| 285 | /* | 285 | /* |
| 286 | * Reset Controll Unit (relative to IPSBAR). | 286 | * Reset Control Unit (relative to IPSBAR). |
| 287 | */ | 287 | */ |
| 288 | #define MCF_RCR 0x110000 | 288 | #define MCF_RCR 0x110000 |
| 289 | #define MCF_RSR 0x110001 | 289 | #define MCF_RSR 0x110001 |
diff --git a/arch/m68k/include/asm/m5307sim.h b/arch/m68k/include/asm/m5307sim.h index 4c94c01f36c4..8f8609fcc9b8 100644 --- a/arch/m68k/include/asm/m5307sim.h +++ b/arch/m68k/include/asm/m5307sim.h | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | #define MCFSIM_SWSR 0x03 /* SW Watchdog service (r/w) */ | 29 | #define MCFSIM_SWSR 0x03 /* SW Watchdog service (r/w) */ |
| 30 | #define MCFSIM_PAR 0x04 /* Pin Assignment reg (r/w) */ | 30 | #define MCFSIM_PAR 0x04 /* Pin Assignment reg (r/w) */ |
| 31 | #define MCFSIM_IRQPAR 0x06 /* Interrupt Assignment reg (r/w) */ | 31 | #define MCFSIM_IRQPAR 0x06 /* Interrupt Assignment reg (r/w) */ |
| 32 | #define MCFSIM_PLLCR 0x08 /* PLL Controll Reg*/ | 32 | #define MCFSIM_PLLCR 0x08 /* PLL Control Reg*/ |
| 33 | #define MCFSIM_MPARK 0x0C /* BUS Master Control Reg*/ | 33 | #define MCFSIM_MPARK 0x0C /* BUS Master Control Reg*/ |
| 34 | #define MCFSIM_IPR 0x40 /* Interrupt Pend reg (r/w) */ | 34 | #define MCFSIM_IPR 0x40 /* Interrupt Pend reg (r/w) */ |
| 35 | #define MCFSIM_IMR 0x44 /* Interrupt Mask reg (r/w) */ | 35 | #define MCFSIM_IMR 0x44 /* Interrupt Mask reg (r/w) */ |
diff --git a/arch/m68k/include/asm/m5407sim.h b/arch/m68k/include/asm/m5407sim.h index 762c58c89050..51e00b00b8a6 100644 --- a/arch/m68k/include/asm/m5407sim.h +++ b/arch/m68k/include/asm/m5407sim.h | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | #define MCFSIM_SWSR 0x03 /* SW Watchdog service (r/w) */ | 29 | #define MCFSIM_SWSR 0x03 /* SW Watchdog service (r/w) */ |
| 30 | #define MCFSIM_PAR 0x04 /* Pin Assignment reg (r/w) */ | 30 | #define MCFSIM_PAR 0x04 /* Pin Assignment reg (r/w) */ |
| 31 | #define MCFSIM_IRQPAR 0x06 /* Interrupt Assignment reg (r/w) */ | 31 | #define MCFSIM_IRQPAR 0x06 /* Interrupt Assignment reg (r/w) */ |
| 32 | #define MCFSIM_PLLCR 0x08 /* PLL Controll Reg*/ | 32 | #define MCFSIM_PLLCR 0x08 /* PLL Control Reg*/ |
| 33 | #define MCFSIM_MPARK 0x0C /* BUS Master Control Reg*/ | 33 | #define MCFSIM_MPARK 0x0C /* BUS Master Control Reg*/ |
| 34 | #define MCFSIM_IPR 0x40 /* Interrupt Pend reg (r/w) */ | 34 | #define MCFSIM_IPR 0x40 /* Interrupt Pend reg (r/w) */ |
| 35 | #define MCFSIM_IMR 0x44 /* Interrupt Mask reg (r/w) */ | 35 | #define MCFSIM_IMR 0x44 /* Interrupt Mask reg (r/w) */ |
diff --git a/arch/m68k/include/asm/m68360_quicc.h b/arch/m68k/include/asm/m68360_quicc.h index 6d40f4d18e10..59414cc108d3 100644 --- a/arch/m68k/include/asm/m68360_quicc.h +++ b/arch/m68k/include/asm/m68360_quicc.h | |||
| @@ -32,7 +32,7 @@ struct user_data { | |||
| 32 | /* BASE + 0x000: user data memory */ | 32 | /* BASE + 0x000: user data memory */ |
| 33 | volatile unsigned char udata_bd_ucode[0x400]; /*user data bd's Ucode*/ | 33 | volatile unsigned char udata_bd_ucode[0x400]; /*user data bd's Ucode*/ |
| 34 | volatile unsigned char udata_bd[0x200]; /*user data Ucode */ | 34 | volatile unsigned char udata_bd[0x200]; /*user data Ucode */ |
| 35 | volatile unsigned char ucode_ext[0x100]; /*Ucode Extention ram */ | 35 | volatile unsigned char ucode_ext[0x100]; /*Ucode Extension ram */ |
| 36 | volatile unsigned char RESERVED1[0x500]; /* Reserved area */ | 36 | volatile unsigned char RESERVED1[0x500]; /* Reserved area */ |
| 37 | }; | 37 | }; |
| 38 | #else | 38 | #else |
diff --git a/arch/m68k/include/asm/mac_oss.h b/arch/m68k/include/asm/mac_oss.h index 7221f7251934..3cf2b6ed685a 100644 --- a/arch/m68k/include/asm/mac_oss.h +++ b/arch/m68k/include/asm/mac_oss.h | |||
| @@ -61,7 +61,7 @@ | |||
| 61 | /* | 61 | /* |
| 62 | * OSS Interrupt levels for various sub-systems | 62 | * OSS Interrupt levels for various sub-systems |
| 63 | * | 63 | * |
| 64 | * This mapping is layed out with two things in mind: first, we try to keep | 64 | * This mapping is laid out with two things in mind: first, we try to keep |
| 65 | * things on their own levels to avoid having to do double-dispatches. Second, | 65 | * things on their own levels to avoid having to do double-dispatches. Second, |
| 66 | * the levels match as closely as possible the alternate IRQ mapping mode (aka | 66 | * the levels match as closely as possible the alternate IRQ mapping mode (aka |
| 67 | * "A/UX mode") available on some VIA machines. | 67 | * "A/UX mode") available on some VIA machines. |
diff --git a/arch/m68k/include/asm/mac_via.h b/arch/m68k/include/asm/mac_via.h index 39afb438b656..a59665e1d41b 100644 --- a/arch/m68k/include/asm/mac_via.h +++ b/arch/m68k/include/asm/mac_via.h | |||
| @@ -204,7 +204,7 @@ | |||
| 204 | #define vT2CL 0x1000 /* [VIA only] Timer two counter low. */ | 204 | #define vT2CL 0x1000 /* [VIA only] Timer two counter low. */ |
| 205 | #define vT2CH 0x1200 /* [VIA only] Timer two counter high. */ | 205 | #define vT2CH 0x1200 /* [VIA only] Timer two counter high. */ |
| 206 | #define vSR 0x1400 /* [VIA only] Shift register. */ | 206 | #define vSR 0x1400 /* [VIA only] Shift register. */ |
| 207 | #define vACR 0x1600 /* [VIA only] Auxilary control register. */ | 207 | #define vACR 0x1600 /* [VIA only] Auxiliary control register. */ |
| 208 | #define vPCR 0x1800 /* [VIA only] Peripheral control register. */ | 208 | #define vPCR 0x1800 /* [VIA only] Peripheral control register. */ |
| 209 | /* CHRP sez never ever to *write* this. | 209 | /* CHRP sez never ever to *write* this. |
| 210 | * Mac family says never to *change* this. | 210 | * Mac family says never to *change* this. |
diff --git a/arch/m68k/include/asm/macintosh.h b/arch/m68k/include/asm/macintosh.h index 50db3591ca15..c2a1c5eac1a6 100644 --- a/arch/m68k/include/asm/macintosh.h +++ b/arch/m68k/include/asm/macintosh.h | |||
| @@ -14,7 +14,7 @@ extern void mac_init_IRQ(void); | |||
| 14 | extern int mac_irq_pending(unsigned int); | 14 | extern int mac_irq_pending(unsigned int); |
| 15 | 15 | ||
| 16 | /* | 16 | /* |
| 17 | * Floppy driver magic hook - probably shouldnt be here | 17 | * Floppy driver magic hook - probably shouldn't be here |
| 18 | */ | 18 | */ |
| 19 | 19 | ||
| 20 | extern void via1_set_head(int); | 20 | extern void via1_set_head(int); |
diff --git a/arch/m68k/include/asm/mcftimer.h b/arch/m68k/include/asm/mcftimer.h index 92b276fe8240..351c27237874 100644 --- a/arch/m68k/include/asm/mcftimer.h +++ b/arch/m68k/include/asm/mcftimer.h | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | 27 | ||
| 28 | /* | 28 | /* |
| 29 | * Bit definitions for the Timer Mode Register (TMR). | 29 | * Bit definitions for the Timer Mode Register (TMR). |
| 30 | * Register bit flags are common accross ColdFires. | 30 | * Register bit flags are common across ColdFires. |
| 31 | */ | 31 | */ |
| 32 | #define MCFTIMER_TMR_PREMASK 0xff00 /* Prescalar mask */ | 32 | #define MCFTIMER_TMR_PREMASK 0xff00 /* Prescalar mask */ |
| 33 | #define MCFTIMER_TMR_DISCE 0x0000 /* Disable capture */ | 33 | #define MCFTIMER_TMR_DISCE 0x0000 /* Disable capture */ |
diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h index 26d851d385bb..29e17907d9f2 100644 --- a/arch/m68k/include/asm/unistd.h +++ b/arch/m68k/include/asm/unistd.h | |||
| @@ -343,10 +343,14 @@ | |||
| 343 | #define __NR_fanotify_init 337 | 343 | #define __NR_fanotify_init 337 |
| 344 | #define __NR_fanotify_mark 338 | 344 | #define __NR_fanotify_mark 338 |
| 345 | #define __NR_prlimit64 339 | 345 | #define __NR_prlimit64 339 |
| 346 | #define __NR_name_to_handle_at 340 | ||
| 347 | #define __NR_open_by_handle_at 341 | ||
| 348 | #define __NR_clock_adjtime 342 | ||
| 349 | #define __NR_syncfs 343 | ||
| 346 | 350 | ||
| 347 | #ifdef __KERNEL__ | 351 | #ifdef __KERNEL__ |
| 348 | 352 | ||
| 349 | #define NR_syscalls 340 | 353 | #define NR_syscalls 344 |
| 350 | 354 | ||
| 351 | #define __ARCH_WANT_IPC_PARSE_VERSION | 355 | #define __ARCH_WANT_IPC_PARSE_VERSION |
| 352 | #define __ARCH_WANT_OLD_READDIR | 356 | #define __ARCH_WANT_OLD_READDIR |
diff --git a/arch/m68k/kernel/entry_mm.S b/arch/m68k/kernel/entry_mm.S index 1559dea36e55..1359ee659574 100644 --- a/arch/m68k/kernel/entry_mm.S +++ b/arch/m68k/kernel/entry_mm.S | |||
| @@ -750,4 +750,8 @@ sys_call_table: | |||
| 750 | .long sys_fanotify_init | 750 | .long sys_fanotify_init |
| 751 | .long sys_fanotify_mark | 751 | .long sys_fanotify_mark |
| 752 | .long sys_prlimit64 | 752 | .long sys_prlimit64 |
| 753 | .long sys_name_to_handle_at /* 340 */ | ||
| 754 | .long sys_open_by_handle_at | ||
| 755 | .long sys_clock_adjtime | ||
| 756 | .long sys_syncfs | ||
| 753 | 757 | ||
diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S index ef54128baa0b..27622b3273c1 100644 --- a/arch/m68k/kernel/head.S +++ b/arch/m68k/kernel/head.S | |||
| @@ -134,7 +134,7 @@ | |||
| 134 | * Thanks to a small helping routine enabling the mmu got quite simple | 134 | * Thanks to a small helping routine enabling the mmu got quite simple |
| 135 | * and there is only one way left. mmu_engage makes a complete a new mapping | 135 | * and there is only one way left. mmu_engage makes a complete a new mapping |
| 136 | * that only includes the absolute necessary to be able to jump to the final | 136 | * that only includes the absolute necessary to be able to jump to the final |
| 137 | * postion and to restore the original mapping. | 137 | * position and to restore the original mapping. |
| 138 | * As this code doesn't need a transparent translation register anymore this | 138 | * As this code doesn't need a transparent translation register anymore this |
| 139 | * means all registers are free to be used by machines that needs them for | 139 | * means all registers are free to be used by machines that needs them for |
| 140 | * other purposes. | 140 | * other purposes. |
| @@ -969,7 +969,7 @@ L(mmu_init_amiga): | |||
| 969 | is_not_040_or_060(1f) | 969 | is_not_040_or_060(1f) |
| 970 | 970 | ||
| 971 | /* | 971 | /* |
| 972 | * 040: Map the 16Meg range physical 0x0 upto logical 0x8000.0000 | 972 | * 040: Map the 16Meg range physical 0x0 up to logical 0x8000.0000 |
| 973 | */ | 973 | */ |
| 974 | mmu_map #0x80000000,#0,#0x01000000,#_PAGE_NOCACHE_S | 974 | mmu_map #0x80000000,#0,#0x01000000,#_PAGE_NOCACHE_S |
| 975 | /* | 975 | /* |
| @@ -982,7 +982,7 @@ L(mmu_init_amiga): | |||
| 982 | 982 | ||
| 983 | 1: | 983 | 1: |
| 984 | /* | 984 | /* |
| 985 | * 030: Map the 32Meg range physical 0x0 upto logical 0x8000.0000 | 985 | * 030: Map the 32Meg range physical 0x0 up to logical 0x8000.0000 |
| 986 | */ | 986 | */ |
| 987 | mmu_map #0x80000000,#0,#0x02000000,#_PAGE_NOCACHE030 | 987 | mmu_map #0x80000000,#0,#0x02000000,#_PAGE_NOCACHE030 |
| 988 | mmu_map_tt #1,#0x40000000,#0x20000000,#_PAGE_NOCACHE030 | 988 | mmu_map_tt #1,#0x40000000,#0x20000000,#_PAGE_NOCACHE030 |
| @@ -1074,7 +1074,7 @@ L(notq40): | |||
| 1074 | is_040(1f) | 1074 | is_040(1f) |
| 1075 | 1075 | ||
| 1076 | /* | 1076 | /* |
| 1077 | * 030: Map the 32Meg range physical 0x0 upto logical 0xf000.0000 | 1077 | * 030: Map the 32Meg range physical 0x0 up to logical 0xf000.0000 |
| 1078 | */ | 1078 | */ |
| 1079 | mmu_map #0xf0000000,#0,#0x02000000,#_PAGE_NOCACHE030 | 1079 | mmu_map #0xf0000000,#0,#0x02000000,#_PAGE_NOCACHE030 |
| 1080 | 1080 | ||
| @@ -1082,7 +1082,7 @@ L(notq40): | |||
| 1082 | 1082 | ||
| 1083 | 1: | 1083 | 1: |
| 1084 | /* | 1084 | /* |
| 1085 | * 040: Map the 16Meg range physical 0x0 upto logical 0xf000.0000 | 1085 | * 040: Map the 16Meg range physical 0x0 up to logical 0xf000.0000 |
| 1086 | */ | 1086 | */ |
| 1087 | mmu_map #0xf0000000,#0,#0x01000000,#_PAGE_NOCACHE_S | 1087 | mmu_map #0xf0000000,#0,#0x01000000,#_PAGE_NOCACHE_S |
| 1088 | 1088 | ||
| @@ -3078,7 +3078,7 @@ func_start serial_putc,%d0/%d1/%a0/%a1 | |||
| 3078 | /* | 3078 | /* |
| 3079 | * If the loader gave us a board type then we can use that to | 3079 | * If the loader gave us a board type then we can use that to |
| 3080 | * select an appropriate output routine; otherwise we just use | 3080 | * select an appropriate output routine; otherwise we just use |
| 3081 | * the Bug code. If we haev to use the Bug that means the Bug | 3081 | * the Bug code. If we have to use the Bug that means the Bug |
| 3082 | * workspace has to be valid, which means the Bug has to use | 3082 | * workspace has to be valid, which means the Bug has to use |
| 3083 | * the SRAM, which is non-standard. | 3083 | * the SRAM, which is non-standard. |
| 3084 | */ | 3084 | */ |
diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S index 79b1ed198c07..9b8393d8adb8 100644 --- a/arch/m68k/kernel/syscalltable.S +++ b/arch/m68k/kernel/syscalltable.S | |||
| @@ -358,6 +358,10 @@ ENTRY(sys_call_table) | |||
| 358 | .long sys_fanotify_init | 358 | .long sys_fanotify_init |
| 359 | .long sys_fanotify_mark | 359 | .long sys_fanotify_mark |
| 360 | .long sys_prlimit64 | 360 | .long sys_prlimit64 |
| 361 | .long sys_name_to_handle_at /* 340 */ | ||
| 362 | .long sys_open_by_handle_at | ||
| 363 | .long sys_clock_adjtime | ||
| 364 | .long sys_syncfs | ||
| 361 | 365 | ||
| 362 | .rept NR_syscalls-(.-sys_call_table)/4 | 366 | .rept NR_syscalls-(.-sys_call_table)/4 |
| 363 | .long sys_ni_syscall | 367 | .long sys_ni_syscall |
diff --git a/arch/m68k/kernel/vmlinux.lds_no.S b/arch/m68k/kernel/vmlinux.lds_no.S index 47e15ebfd893..f4d715cdca0e 100644 --- a/arch/m68k/kernel/vmlinux.lds_no.S +++ b/arch/m68k/kernel/vmlinux.lds_no.S | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * | 3 | * |
| 4 | * (C) Copyright 2002-2006, Greg Ungerer <gerg@snapgear.com> | 4 | * (C) Copyright 2002-2006, Greg Ungerer <gerg@snapgear.com> |
| 5 | * | 5 | * |
| 6 | * This linker script is equiped to build either ROM loaded or RAM | 6 | * This linker script is equipped to build either ROM loaded or RAM |
| 7 | * run kernels. | 7 | * run kernels. |
| 8 | */ | 8 | */ |
| 9 | 9 | ||
diff --git a/arch/m68k/platform/523x/config.c b/arch/m68k/platform/523x/config.c index 418a76feb1e3..71f4436ec809 100644 --- a/arch/m68k/platform/523x/config.c +++ b/arch/m68k/platform/523x/config.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | /* | 3 | /* |
| 4 | * linux/arch/m68knommu/platform/523x/config.c | 4 | * linux/arch/m68knommu/platform/523x/config.c |
| 5 | * | 5 | * |
| 6 | * Sub-architcture dependant initialization code for the Freescale | 6 | * Sub-architcture dependent initialization code for the Freescale |
| 7 | * 523x CPUs. | 7 | * 523x CPUs. |
| 8 | * | 8 | * |
| 9 | * Copyright (C) 1999-2005, Greg Ungerer (gerg@snapgear.com) | 9 | * Copyright (C) 1999-2005, Greg Ungerer (gerg@snapgear.com) |
diff --git a/arch/m68k/platform/5272/intc.c b/arch/m68k/platform/5272/intc.c index 43e6e96f087f..7e715dfe2819 100644 --- a/arch/m68k/platform/5272/intc.c +++ b/arch/m68k/platform/5272/intc.c | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | * | 33 | * |
| 34 | * Note that the external interrupts are edge triggered (unlike the | 34 | * Note that the external interrupts are edge triggered (unlike the |
| 35 | * internal interrupt sources which are level triggered). Which means | 35 | * internal interrupt sources which are level triggered). Which means |
| 36 | * they also need acknowledgeing via acknowledge bits. | 36 | * they also need acknowledging via acknowledge bits. |
| 37 | */ | 37 | */ |
| 38 | struct irqmap { | 38 | struct irqmap { |
| 39 | unsigned char icr; | 39 | unsigned char icr; |
diff --git a/arch/m68k/platform/527x/config.c b/arch/m68k/platform/527x/config.c index fa359593b613..3ebc769cefda 100644 --- a/arch/m68k/platform/527x/config.c +++ b/arch/m68k/platform/527x/config.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | /* | 3 | /* |
| 4 | * linux/arch/m68knommu/platform/527x/config.c | 4 | * linux/arch/m68knommu/platform/527x/config.c |
| 5 | * | 5 | * |
| 6 | * Sub-architcture dependant initialization code for the Freescale | 6 | * Sub-architcture dependent initialization code for the Freescale |
| 7 | * 5270/5271 CPUs. | 7 | * 5270/5271 CPUs. |
| 8 | * | 8 | * |
| 9 | * Copyright (C) 1999-2004, Greg Ungerer (gerg@snapgear.com) | 9 | * Copyright (C) 1999-2004, Greg Ungerer (gerg@snapgear.com) |
diff --git a/arch/m68k/platform/528x/config.c b/arch/m68k/platform/528x/config.c index ac39fc661219..7abe77a2f3e3 100644 --- a/arch/m68k/platform/528x/config.c +++ b/arch/m68k/platform/528x/config.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | /* | 3 | /* |
| 4 | * linux/arch/m68knommu/platform/528x/config.c | 4 | * linux/arch/m68knommu/platform/528x/config.c |
| 5 | * | 5 | * |
| 6 | * Sub-architcture dependant initialization code for the Freescale | 6 | * Sub-architcture dependent initialization code for the Freescale |
| 7 | * 5280, 5281 and 5282 CPUs. | 7 | * 5280, 5281 and 5282 CPUs. |
| 8 | * | 8 | * |
| 9 | * Copyright (C) 1999-2003, Greg Ungerer (gerg@snapgear.com) | 9 | * Copyright (C) 1999-2003, Greg Ungerer (gerg@snapgear.com) |
diff --git a/arch/m68k/platform/coldfire/cache.c b/arch/m68k/platform/coldfire/cache.c index 235d3c4f4f0f..71beeaf0c5c4 100644 --- a/arch/m68k/platform/coldfire/cache.c +++ b/arch/m68k/platform/coldfire/cache.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /***************************************************************************/ | 1 | /***************************************************************************/ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * cache.c -- general ColdFire Cache maintainence code | 4 | * cache.c -- general ColdFire Cache maintenance code |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2010, Greg Ungerer (gerg@snapgear.com) | 6 | * Copyright (C) 2010, Greg Ungerer (gerg@snapgear.com) |
| 7 | */ | 7 | */ |
diff --git a/arch/m68k/platform/coldfire/entry.S b/arch/m68k/platform/coldfire/entry.S index 5837cf080b6d..eab63f09965b 100644 --- a/arch/m68k/platform/coldfire/entry.S +++ b/arch/m68k/platform/coldfire/entry.S | |||
| @@ -163,7 +163,7 @@ Lsignal_return: | |||
| 163 | 163 | ||
| 164 | /* | 164 | /* |
| 165 | * This is the generic interrupt handler (for all hardware interrupt | 165 | * This is the generic interrupt handler (for all hardware interrupt |
| 166 | * sources). Calls upto high level code to do all the work. | 166 | * sources). Calls up to high level code to do all the work. |
| 167 | */ | 167 | */ |
| 168 | ENTRY(inthandler) | 168 | ENTRY(inthandler) |
| 169 | SAVE_ALL | 169 | SAVE_ALL |
diff --git a/arch/m68k/platform/coldfire/head.S b/arch/m68k/platform/coldfire/head.S index 129bff4956b5..6ae91a499184 100644 --- a/arch/m68k/platform/coldfire/head.S +++ b/arch/m68k/platform/coldfire/head.S | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | 20 | ||
| 21 | /* | 21 | /* |
| 22 | * If we don't have a fixed memory size, then lets build in code | 22 | * If we don't have a fixed memory size, then lets build in code |
| 23 | * to auto detect the DRAM size. Obviously this is the prefered | 23 | * to auto detect the DRAM size. Obviously this is the preferred |
| 24 | * method, and should work for most boards. It won't work for those | 24 | * method, and should work for most boards. It won't work for those |
| 25 | * that do not have their RAM starting at address 0, and it only | 25 | * that do not have their RAM starting at address 0, and it only |
| 26 | * works on SDRAM (not boards fitted with SRAM). | 26 | * works on SDRAM (not boards fitted with SRAM). |
diff --git a/arch/m68k/platform/coldfire/intc.c b/arch/m68k/platform/coldfire/intc.c index c28a6ed6cb23..0bbb414856eb 100644 --- a/arch/m68k/platform/coldfire/intc.c +++ b/arch/m68k/platform/coldfire/intc.c | |||
| @@ -37,7 +37,7 @@ unsigned char mcf_irq2imr[NR_IRQS]; | |||
| 37 | /* | 37 | /* |
| 38 | * In the early version 2 core ColdFire parts the IMR register was 16 bits | 38 | * In the early version 2 core ColdFire parts the IMR register was 16 bits |
| 39 | * in size. Version 3 (and later version 2) core parts have a 32 bit | 39 | * in size. Version 3 (and later version 2) core parts have a 32 bit |
| 40 | * sized IMR register. Provide some size independant methods to access the | 40 | * sized IMR register. Provide some size independent methods to access the |
| 41 | * IMR register. | 41 | * IMR register. |
| 42 | */ | 42 | */ |
| 43 | #ifdef MCFSIM_IMR_IS_16BITS | 43 | #ifdef MCFSIM_IMR_IS_16BITS |
diff --git a/arch/m68k/platform/coldfire/sltimers.c b/arch/m68k/platform/coldfire/sltimers.c index 0a1b937c3e18..6a85daf9a7fd 100644 --- a/arch/m68k/platform/coldfire/sltimers.c +++ b/arch/m68k/platform/coldfire/sltimers.c | |||
| @@ -106,7 +106,7 @@ static cycle_t mcfslt_read_clk(struct clocksource *cs) | |||
| 106 | cycles = mcfslt_cnt; | 106 | cycles = mcfslt_cnt; |
| 107 | local_irq_restore(flags); | 107 | local_irq_restore(flags); |
| 108 | 108 | ||
| 109 | /* substract because slice timers count down */ | 109 | /* subtract because slice timers count down */ |
| 110 | return cycles - scnt; | 110 | return cycles - scnt; |
| 111 | } | 111 | } |
| 112 | 112 | ||
diff --git a/arch/m68k/q40/README b/arch/m68k/q40/README index f877b7249790..b26d5f55e91d 100644 --- a/arch/m68k/q40/README +++ b/arch/m68k/q40/README | |||
| @@ -89,7 +89,7 @@ The main interrupt register IIRQ_REG will indicate whether an IRQ was internal | |||
| 89 | or from some ISA devices, EIRQ_REG can distinguish up to 8 ISA IRQs. | 89 | or from some ISA devices, EIRQ_REG can distinguish up to 8 ISA IRQs. |
| 90 | 90 | ||
| 91 | The Q40 custom chip is programmable to provide 2 periodic timers: | 91 | The Q40 custom chip is programmable to provide 2 periodic timers: |
| 92 | - 50 or 200 Hz - level 2, !!THIS CANT BE DISABLED!! | 92 | - 50 or 200 Hz - level 2, !!THIS CAN'T BE DISABLED!! |
| 93 | - 10 or 20 KHz - level 4, used for dma-sound | 93 | - 10 or 20 KHz - level 4, used for dma-sound |
| 94 | 94 | ||
| 95 | Linux uses the 200 Hz interrupt for timer and beep by default. | 95 | Linux uses the 200 Hz interrupt for timer and beep by default. |
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index c49c326e7af1..eccdefe70d4e 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig | |||
| @@ -6,7 +6,6 @@ config MICROBLAZE | |||
| 6 | select HAVE_FUNCTION_GRAPH_TRACER | 6 | select HAVE_FUNCTION_GRAPH_TRACER |
| 7 | select HAVE_DYNAMIC_FTRACE | 7 | select HAVE_DYNAMIC_FTRACE |
| 8 | select HAVE_FTRACE_MCOUNT_RECORD | 8 | select HAVE_FTRACE_MCOUNT_RECORD |
| 9 | select USB_ARCH_HAS_EHCI | ||
| 10 | select ARCH_WANT_OPTIONAL_GPIOLIB | 9 | select ARCH_WANT_OPTIONAL_GPIOLIB |
| 11 | select HAVE_OPROFILE | 10 | select HAVE_OPROFILE |
| 12 | select HAVE_ARCH_KGDB | 11 | select HAVE_ARCH_KGDB |
| @@ -17,7 +16,6 @@ config MICROBLAZE | |||
| 17 | select OF_EARLY_FLATTREE | 16 | select OF_EARLY_FLATTREE |
| 18 | select HAVE_GENERIC_HARDIRQS | 17 | select HAVE_GENERIC_HARDIRQS |
| 19 | select GENERIC_IRQ_PROBE | 18 | select GENERIC_IRQ_PROBE |
| 20 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
| 21 | select GENERIC_IRQ_SHOW | 19 | select GENERIC_IRQ_SHOW |
| 22 | 20 | ||
| 23 | config SWAP | 21 | config SWAP |
diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile index 6f432e6df9af..b23c40eb7a52 100644 --- a/arch/microblaze/Makefile +++ b/arch/microblaze/Makefile | |||
| @@ -18,7 +18,7 @@ export CPU_VER CPU_MAJOR CPU_MINOR CPU_REV | |||
| 18 | # rather than bools y/n | 18 | # rather than bools y/n |
| 19 | 19 | ||
| 20 | # Work out HW multipler support. This is tricky. | 20 | # Work out HW multipler support. This is tricky. |
| 21 | # 1. Spartan2 has no HW multiplers. | 21 | # 1. Spartan2 has no HW multipliers. |
| 22 | # 2. MicroBlaze v3.x always uses them, except in Spartan 2 | 22 | # 2. MicroBlaze v3.x always uses them, except in Spartan 2 |
| 23 | # 3. All other FPGa/CPU ver combos, we can trust the CONFIG_ settings | 23 | # 3. All other FPGa/CPU ver combos, we can trust the CONFIG_ settings |
| 24 | ifeq (,$(findstring spartan2,$(CONFIG_XILINX_MICROBLAZE0_FAMILY))) | 24 | ifeq (,$(findstring spartan2,$(CONFIG_XILINX_MICROBLAZE0_FAMILY))) |
diff --git a/arch/microblaze/include/asm/io.h b/arch/microblaze/include/asm/io.h index eae32220f447..8cdac14b55b0 100644 --- a/arch/microblaze/include/asm/io.h +++ b/arch/microblaze/include/asm/io.h | |||
| @@ -70,7 +70,7 @@ static inline void __raw_writeq(unsigned long v, volatile void __iomem *addr) | |||
| 70 | 70 | ||
| 71 | /* | 71 | /* |
| 72 | * read (readb, readw, readl, readq) and write (writeb, writew, | 72 | * read (readb, readw, readl, readq) and write (writeb, writew, |
| 73 | * writel, writeq) accessors are for PCI and thus littel endian. | 73 | * writel, writeq) accessors are for PCI and thus little endian. |
| 74 | * Linux 2.4 for Microblaze had this wrong. | 74 | * Linux 2.4 for Microblaze had this wrong. |
| 75 | */ | 75 | */ |
| 76 | static inline unsigned char readb(const volatile void __iomem *addr) | 76 | static inline unsigned char readb(const volatile void __iomem *addr) |
diff --git a/arch/microblaze/include/asm/pci-bridge.h b/arch/microblaze/include/asm/pci-bridge.h index 10717669e0c2..746df91e5796 100644 --- a/arch/microblaze/include/asm/pci-bridge.h +++ b/arch/microblaze/include/asm/pci-bridge.h | |||
| @@ -76,7 +76,7 @@ struct pci_controller { | |||
| 76 | * Used for variants of PCI indirect handling and possible quirks: | 76 | * Used for variants of PCI indirect handling and possible quirks: |
| 77 | * SET_CFG_TYPE - used on 4xx or any PHB that does explicit type0/1 | 77 | * SET_CFG_TYPE - used on 4xx or any PHB that does explicit type0/1 |
| 78 | * EXT_REG - provides access to PCI-e extended registers | 78 | * EXT_REG - provides access to PCI-e extended registers |
| 79 | * SURPRESS_PRIMARY_BUS - we surpress the setting of PCI_PRIMARY_BUS | 79 | * SURPRESS_PRIMARY_BUS - we suppress the setting of PCI_PRIMARY_BUS |
| 80 | * on Freescale PCI-e controllers since they used the PCI_PRIMARY_BUS | 80 | * on Freescale PCI-e controllers since they used the PCI_PRIMARY_BUS |
| 81 | * to determine which bus number to match on when generating type0 | 81 | * to determine which bus number to match on when generating type0 |
| 82 | * config cycles | 82 | * config cycles |
diff --git a/arch/microblaze/include/asm/pci.h b/arch/microblaze/include/asm/pci.h index 2232ff942ba9..ba65cf472544 100644 --- a/arch/microblaze/include/asm/pci.h +++ b/arch/microblaze/include/asm/pci.h | |||
| @@ -158,7 +158,7 @@ extern void pci_resource_to_user(const struct pci_dev *dev, int bar, | |||
| 158 | extern void pcibios_setup_bus_devices(struct pci_bus *bus); | 158 | extern void pcibios_setup_bus_devices(struct pci_bus *bus); |
| 159 | extern void pcibios_setup_bus_self(struct pci_bus *bus); | 159 | extern void pcibios_setup_bus_self(struct pci_bus *bus); |
| 160 | 160 | ||
| 161 | /* This part of code was originaly in xilinx-pci.h */ | 161 | /* This part of code was originally in xilinx-pci.h */ |
| 162 | #ifdef CONFIG_PCI_XILINX | 162 | #ifdef CONFIG_PCI_XILINX |
| 163 | extern void __init xilinx_pci_init(void); | 163 | extern void __init xilinx_pci_init(void); |
| 164 | #else | 164 | #else |
diff --git a/arch/microblaze/include/asm/unistd.h b/arch/microblaze/include/asm/unistd.h index d770b00ec6b1..30edd61a6b8f 100644 --- a/arch/microblaze/include/asm/unistd.h +++ b/arch/microblaze/include/asm/unistd.h | |||
| @@ -386,8 +386,12 @@ | |||
| 386 | #define __NR_fanotify_init 368 | 386 | #define __NR_fanotify_init 368 |
| 387 | #define __NR_fanotify_mark 369 | 387 | #define __NR_fanotify_mark 369 |
| 388 | #define __NR_prlimit64 370 | 388 | #define __NR_prlimit64 370 |
| 389 | #define __NR_name_to_handle_at 371 | ||
| 390 | #define __NR_open_by_handle_at 372 | ||
| 391 | #define __NR_clock_adjtime 373 | ||
| 392 | #define __NR_syncfs 374 | ||
| 389 | 393 | ||
| 390 | #define __NR_syscalls 371 | 394 | #define __NR_syscalls 375 |
| 391 | 395 | ||
| 392 | #ifdef __KERNEL__ | 396 | #ifdef __KERNEL__ |
| 393 | #ifndef __ASSEMBLY__ | 397 | #ifndef __ASSEMBLY__ |
diff --git a/arch/microblaze/kernel/Makefile b/arch/microblaze/kernel/Makefile index f0cb5c26c81c..494b63b72dd7 100644 --- a/arch/microblaze/kernel/Makefile +++ b/arch/microblaze/kernel/Makefile | |||
| @@ -10,6 +10,7 @@ CFLAGS_REMOVE_early_printk.o = -pg | |||
| 10 | CFLAGS_REMOVE_selfmod.o = -pg | 10 | CFLAGS_REMOVE_selfmod.o = -pg |
| 11 | CFLAGS_REMOVE_heartbeat.o = -pg | 11 | CFLAGS_REMOVE_heartbeat.o = -pg |
| 12 | CFLAGS_REMOVE_ftrace.o = -pg | 12 | CFLAGS_REMOVE_ftrace.o = -pg |
| 13 | CFLAGS_REMOVE_process.o = -pg | ||
| 13 | endif | 14 | endif |
| 14 | 15 | ||
| 15 | extra-y := head.o vmlinux.lds | 16 | extra-y := head.o vmlinux.lds |
diff --git a/arch/microblaze/kernel/cpu/cache.c b/arch/microblaze/kernel/cpu/cache.c index cf0afd90a2c0..4b7d8a3f4aef 100644 --- a/arch/microblaze/kernel/cpu/cache.c +++ b/arch/microblaze/kernel/cpu/cache.c | |||
| @@ -129,7 +129,7 @@ do { \ | |||
| 129 | * to use for simple wdc or wic. | 129 | * to use for simple wdc or wic. |
| 130 | * | 130 | * |
| 131 | * start address is cache aligned | 131 | * start address is cache aligned |
| 132 | * end address is not aligned, if end is aligned then I have to substract | 132 | * end address is not aligned, if end is aligned then I have to subtract |
| 133 | * cacheline length because I can't flush/invalidate the next cacheline. | 133 | * cacheline length because I can't flush/invalidate the next cacheline. |
| 134 | * If is not, I align it because I will flush/invalidate whole line. | 134 | * If is not, I align it because I will flush/invalidate whole line. |
| 135 | */ | 135 | */ |
diff --git a/arch/microblaze/kernel/ftrace.c b/arch/microblaze/kernel/ftrace.c index 515feb404555..357d56abe24a 100644 --- a/arch/microblaze/kernel/ftrace.c +++ b/arch/microblaze/kernel/ftrace.c | |||
| @@ -51,6 +51,9 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) | |||
| 51 | : "r" (parent), "r" (return_hooker) | 51 | : "r" (parent), "r" (return_hooker) |
| 52 | ); | 52 | ); |
| 53 | 53 | ||
| 54 | flush_dcache_range((u32)parent, (u32)parent + 4); | ||
| 55 | flush_icache_range((u32)parent, (u32)parent + 4); | ||
| 56 | |||
| 54 | if (unlikely(faulted)) { | 57 | if (unlikely(faulted)) { |
| 55 | ftrace_graph_stop(); | 58 | ftrace_graph_stop(); |
| 56 | WARN_ON(1); | 59 | WARN_ON(1); |
| @@ -95,6 +98,9 @@ static int ftrace_modify_code(unsigned long addr, unsigned int value) | |||
| 95 | if (unlikely(faulted)) | 98 | if (unlikely(faulted)) |
| 96 | return -EFAULT; | 99 | return -EFAULT; |
| 97 | 100 | ||
| 101 | flush_dcache_range(addr, addr + 4); | ||
| 102 | flush_icache_range(addr, addr + 4); | ||
| 103 | |||
| 98 | return 0; | 104 | return 0; |
| 99 | } | 105 | } |
| 100 | 106 | ||
| @@ -195,8 +201,6 @@ int ftrace_update_ftrace_func(ftrace_func_t func) | |||
| 195 | ret += ftrace_modify_code((unsigned long)&ftrace_caller, | 201 | ret += ftrace_modify_code((unsigned long)&ftrace_caller, |
| 196 | MICROBLAZE_NOP); | 202 | MICROBLAZE_NOP); |
| 197 | 203 | ||
| 198 | /* All changes are done - lets do caches consistent */ | ||
| 199 | flush_icache(); | ||
| 200 | return ret; | 204 | return ret; |
| 201 | } | 205 | } |
| 202 | 206 | ||
| @@ -210,7 +214,6 @@ int ftrace_enable_ftrace_graph_caller(void) | |||
| 210 | 214 | ||
| 211 | old_jump = *(unsigned int *)ip; /* save jump over instruction */ | 215 | old_jump = *(unsigned int *)ip; /* save jump over instruction */ |
| 212 | ret = ftrace_modify_code(ip, MICROBLAZE_NOP); | 216 | ret = ftrace_modify_code(ip, MICROBLAZE_NOP); |
| 213 | flush_icache(); | ||
| 214 | 217 | ||
| 215 | pr_debug("%s: Replace instruction: 0x%x\n", __func__, old_jump); | 218 | pr_debug("%s: Replace instruction: 0x%x\n", __func__, old_jump); |
| 216 | return ret; | 219 | return ret; |
| @@ -222,7 +225,6 @@ int ftrace_disable_ftrace_graph_caller(void) | |||
| 222 | unsigned long ip = (unsigned long)(&ftrace_call_graph); | 225 | unsigned long ip = (unsigned long)(&ftrace_call_graph); |
| 223 | 226 | ||
| 224 | ret = ftrace_modify_code(ip, old_jump); | 227 | ret = ftrace_modify_code(ip, old_jump); |
| 225 | flush_icache(); | ||
| 226 | 228 | ||
| 227 | pr_debug("%s\n", __func__); | 229 | pr_debug("%s\n", __func__); |
| 228 | return ret; | 230 | return ret; |
diff --git a/arch/microblaze/kernel/intc.c b/arch/microblaze/kernel/intc.c index 5ba7e162833b..c88f066f41bd 100644 --- a/arch/microblaze/kernel/intc.c +++ b/arch/microblaze/kernel/intc.c | |||
| @@ -158,11 +158,11 @@ void __init init_IRQ(void) | |||
| 158 | for (i = 0; i < nr_irq; ++i) { | 158 | for (i = 0; i < nr_irq; ++i) { |
| 159 | if (intr_type & (0x00000001 << i)) { | 159 | if (intr_type & (0x00000001 << i)) { |
| 160 | irq_set_chip_and_handler_name(i, &intc_dev, | 160 | irq_set_chip_and_handler_name(i, &intc_dev, |
| 161 | handle_edge_irq, intc_dev.name); | 161 | handle_edge_irq, "edge"); |
| 162 | irq_clear_status_flags(i, IRQ_LEVEL); | 162 | irq_clear_status_flags(i, IRQ_LEVEL); |
| 163 | } else { | 163 | } else { |
| 164 | irq_set_chip_and_handler_name(i, &intc_dev, | 164 | irq_set_chip_and_handler_name(i, &intc_dev, |
| 165 | handle_level_irq, intc_dev.name); | 165 | handle_level_irq, "level"); |
| 166 | irq_set_status_flags(i, IRQ_LEVEL); | 166 | irq_set_status_flags(i, IRQ_LEVEL); |
| 167 | } | 167 | } |
| 168 | } | 168 | } |
diff --git a/arch/microblaze/kernel/syscall_table.S b/arch/microblaze/kernel/syscall_table.S index e88a930fd1e3..85cea81d1ca1 100644 --- a/arch/microblaze/kernel/syscall_table.S +++ b/arch/microblaze/kernel/syscall_table.S | |||
| @@ -375,3 +375,7 @@ ENTRY(sys_call_table) | |||
| 375 | .long sys_fanotify_init | 375 | .long sys_fanotify_init |
| 376 | .long sys_fanotify_mark | 376 | .long sys_fanotify_mark |
| 377 | .long sys_prlimit64 /* 370 */ | 377 | .long sys_prlimit64 /* 370 */ |
| 378 | .long sys_name_to_handle_at | ||
| 379 | .long sys_open_by_handle_at | ||
| 380 | .long sys_clock_adjtime | ||
| 381 | .long sys_syncfs | ||
diff --git a/arch/microblaze/lib/Makefile b/arch/microblaze/lib/Makefile index f1fcbff3da25..10c320aa908b 100644 --- a/arch/microblaze/lib/Makefile +++ b/arch/microblaze/lib/Makefile | |||
| @@ -2,6 +2,12 @@ | |||
| 2 | # Makefile | 2 | # Makefile |
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | ifdef CONFIG_FUNCTION_TRACER | ||
| 6 | CFLAGS_REMOVE_ashldi3.o = -pg | ||
| 7 | CFLAGS_REMOVE_ashrdi3.o = -pg | ||
| 8 | CFLAGS_REMOVE_lshrdi3.o = -pg | ||
| 9 | endif | ||
| 10 | |||
| 5 | lib-y := memset.o | 11 | lib-y := memset.o |
| 6 | 12 | ||
| 7 | ifeq ($(CONFIG_OPT_LIB_ASM),y) | 13 | ifeq ($(CONFIG_OPT_LIB_ASM),y) |
diff --git a/arch/microblaze/lib/memcpy.c b/arch/microblaze/lib/memcpy.c index cc495d7d99cc..52746e718dfa 100644 --- a/arch/microblaze/lib/memcpy.c +++ b/arch/microblaze/lib/memcpy.c | |||
| @@ -63,8 +63,8 @@ void *memcpy(void *v_dst, const void *v_src, __kernel_size_t c) | |||
| 63 | if (likely(c >= 4)) { | 63 | if (likely(c >= 4)) { |
| 64 | unsigned value, buf_hold; | 64 | unsigned value, buf_hold; |
| 65 | 65 | ||
| 66 | /* Align the dstination to a word boundry. */ | 66 | /* Align the destination to a word boundary. */ |
| 67 | /* This is done in an endian independant manner. */ | 67 | /* This is done in an endian independent manner. */ |
| 68 | switch ((unsigned long)dst & 3) { | 68 | switch ((unsigned long)dst & 3) { |
| 69 | case 1: | 69 | case 1: |
| 70 | *dst++ = *src++; | 70 | *dst++ = *src++; |
| @@ -80,7 +80,7 @@ void *memcpy(void *v_dst, const void *v_src, __kernel_size_t c) | |||
| 80 | i_dst = (void *)dst; | 80 | i_dst = (void *)dst; |
| 81 | 81 | ||
| 82 | /* Choose a copy scheme based on the source */ | 82 | /* Choose a copy scheme based on the source */ |
| 83 | /* alignment relative to dstination. */ | 83 | /* alignment relative to destination. */ |
| 84 | switch ((unsigned long)src & 3) { | 84 | switch ((unsigned long)src & 3) { |
| 85 | case 0x0: /* Both byte offsets are aligned */ | 85 | case 0x0: /* Both byte offsets are aligned */ |
| 86 | i_src = (const void *)src; | 86 | i_src = (const void *)src; |
| @@ -173,7 +173,7 @@ void *memcpy(void *v_dst, const void *v_src, __kernel_size_t c) | |||
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | /* Finish off any remaining bytes */ | 175 | /* Finish off any remaining bytes */ |
| 176 | /* simple fast copy, ... unless a cache boundry is crossed */ | 176 | /* simple fast copy, ... unless a cache boundary is crossed */ |
| 177 | switch (c) { | 177 | switch (c) { |
| 178 | case 3: | 178 | case 3: |
| 179 | *dst++ = *src++; | 179 | *dst++ = *src++; |
diff --git a/arch/microblaze/lib/memmove.c b/arch/microblaze/lib/memmove.c index 810fd68775e3..2146c3752a80 100644 --- a/arch/microblaze/lib/memmove.c +++ b/arch/microblaze/lib/memmove.c | |||
| @@ -83,8 +83,8 @@ void *memmove(void *v_dst, const void *v_src, __kernel_size_t c) | |||
| 83 | if (c >= 4) { | 83 | if (c >= 4) { |
| 84 | unsigned value, buf_hold; | 84 | unsigned value, buf_hold; |
| 85 | 85 | ||
| 86 | /* Align the destination to a word boundry. */ | 86 | /* Align the destination to a word boundary. */ |
| 87 | /* This is done in an endian independant manner. */ | 87 | /* This is done in an endian independent manner. */ |
| 88 | 88 | ||
| 89 | switch ((unsigned long)dst & 3) { | 89 | switch ((unsigned long)dst & 3) { |
| 90 | case 3: | 90 | case 3: |
| @@ -193,7 +193,7 @@ void *memmove(void *v_dst, const void *v_src, __kernel_size_t c) | |||
| 193 | dst = (void *)i_dst; | 193 | dst = (void *)i_dst; |
| 194 | } | 194 | } |
| 195 | 195 | ||
| 196 | /* simple fast copy, ... unless a cache boundry is crossed */ | 196 | /* simple fast copy, ... unless a cache boundary is crossed */ |
| 197 | /* Finish off any remaining bytes */ | 197 | /* Finish off any remaining bytes */ |
| 198 | switch (c) { | 198 | switch (c) { |
| 199 | case 4: | 199 | case 4: |
diff --git a/arch/microblaze/lib/memset.c b/arch/microblaze/lib/memset.c index 834565d1607e..ddf67939576d 100644 --- a/arch/microblaze/lib/memset.c +++ b/arch/microblaze/lib/memset.c | |||
| @@ -64,7 +64,7 @@ void *memset(void *v_src, int c, __kernel_size_t n) | |||
| 64 | 64 | ||
| 65 | if (likely(n >= 4)) { | 65 | if (likely(n >= 4)) { |
| 66 | /* Align the destination to a word boundary */ | 66 | /* Align the destination to a word boundary */ |
| 67 | /* This is done in an endian independant manner */ | 67 | /* This is done in an endian independent manner */ |
| 68 | switch ((unsigned) src & 3) { | 68 | switch ((unsigned) src & 3) { |
| 69 | case 1: | 69 | case 1: |
| 70 | *src++ = c; | 70 | *src++ = c; |
diff --git a/arch/microblaze/pci/indirect_pci.c b/arch/microblaze/pci/indirect_pci.c index 25f18f017f21..4196eb6bd764 100644 --- a/arch/microblaze/pci/indirect_pci.c +++ b/arch/microblaze/pci/indirect_pci.c | |||
| @@ -108,7 +108,7 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
| 108 | out_le32(hose->cfg_addr, (0x80000000 | (bus_no << 16) | | 108 | out_le32(hose->cfg_addr, (0x80000000 | (bus_no << 16) | |
| 109 | (devfn << 8) | reg | cfg_type)); | 109 | (devfn << 8) | reg | cfg_type)); |
| 110 | 110 | ||
| 111 | /* surpress setting of PCI_PRIMARY_BUS */ | 111 | /* suppress setting of PCI_PRIMARY_BUS */ |
| 112 | if (hose->indirect_type & INDIRECT_TYPE_SURPRESS_PRIMARY_BUS) | 112 | if (hose->indirect_type & INDIRECT_TYPE_SURPRESS_PRIMARY_BUS) |
| 113 | if ((offset == PCI_PRIMARY_BUS) && | 113 | if ((offset == PCI_PRIMARY_BUS) && |
| 114 | (bus->number == hose->first_busno)) | 114 | (bus->number == hose->first_busno)) |
diff --git a/arch/microblaze/platform/generic/Kconfig.auto b/arch/microblaze/platform/generic/Kconfig.auto index 5d86fc19029d..25a6f019e94d 100644 --- a/arch/microblaze/platform/generic/Kconfig.auto +++ b/arch/microblaze/platform/generic/Kconfig.auto | |||
| @@ -29,7 +29,7 @@ config KERNEL_BASE_ADDR | |||
| 29 | BASE Address for kernel | 29 | BASE Address for kernel |
| 30 | 30 | ||
| 31 | config XILINX_MICROBLAZE0_FAMILY | 31 | config XILINX_MICROBLAZE0_FAMILY |
| 32 | string "Targetted FPGA family" | 32 | string "Targeted FPGA family" |
| 33 | default "virtex5" | 33 | default "virtex5" |
| 34 | 34 | ||
| 35 | config XILINX_MICROBLAZE0_USE_MSR_INSTR | 35 | config XILINX_MICROBLAZE0_USE_MSR_INSTR |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 83aa5fb8e8f1..8e256cc5dcd9 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
| @@ -1135,7 +1135,7 @@ config CPU_LOONGSON2E | |||
| 1135 | The Loongson 2E processor implements the MIPS III instruction set | 1135 | The Loongson 2E processor implements the MIPS III instruction set |
| 1136 | with many extensions. | 1136 | with many extensions. |
| 1137 | 1137 | ||
| 1138 | It has an internal FPGA northbridge, which is compatiable to | 1138 | It has an internal FPGA northbridge, which is compatible to |
| 1139 | bonito64. | 1139 | bonito64. |
| 1140 | 1140 | ||
| 1141 | config CPU_LOONGSON2F | 1141 | config CPU_LOONGSON2F |
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index ac1d5b611a27..53e3514ba10e 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
| @@ -101,7 +101,7 @@ cflags-y += -ffreestanding | |||
| 101 | # carefully avoid to add it redundantly because gcc 3.3/3.4 complains | 101 | # carefully avoid to add it redundantly because gcc 3.3/3.4 complains |
| 102 | # when fed the toolchain default! | 102 | # when fed the toolchain default! |
| 103 | # | 103 | # |
| 104 | # Certain gcc versions upto gcc 4.1.1 (probably 4.2-subversion as of | 104 | # Certain gcc versions up to gcc 4.1.1 (probably 4.2-subversion as of |
| 105 | # 2006-10-10 don't properly change the predefined symbols if -EB / -EL | 105 | # 2006-10-10 don't properly change the predefined symbols if -EB / -EL |
| 106 | # are used, so we kludge that here. A bug has been filed at | 106 | # are used, so we kludge that here. A bug has been filed at |
| 107 | # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29413. | 107 | # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29413. |
| @@ -314,5 +314,5 @@ define archhelp | |||
| 314 | echo ' vmlinuz.bin - Raw binary zboot image' | 314 | echo ' vmlinuz.bin - Raw binary zboot image' |
| 315 | echo ' vmlinuz.srec - SREC zboot image' | 315 | echo ' vmlinuz.srec - SREC zboot image' |
| 316 | echo | 316 | echo |
| 317 | echo ' These will be default as apropriate for a configured platform.' | 317 | echo ' These will be default as appropriate for a configured platform.' |
| 318 | endef | 318 | endef |
diff --git a/arch/mips/alchemy/common/clocks.c b/arch/mips/alchemy/common/clocks.c index af0fe41055af..f38298a8b98c 100644 --- a/arch/mips/alchemy/common/clocks.c +++ b/arch/mips/alchemy/common/clocks.c | |||
| @@ -75,7 +75,7 @@ void set_au1x00_uart_baud_base(unsigned long new_baud_base) | |||
| 75 | * counter, if it exists. If we don't have an accurate processor | 75 | * counter, if it exists. If we don't have an accurate processor |
| 76 | * speed, all of the peripherals that derive their clocks based on | 76 | * speed, all of the peripherals that derive their clocks based on |
| 77 | * this advertised speed will introduce error and sometimes not work | 77 | * this advertised speed will introduce error and sometimes not work |
| 78 | * properly. This function is futher convoluted to still allow configurations | 78 | * properly. This function is further convoluted to still allow configurations |
| 79 | * to do that in case they have really, really old silicon with a | 79 | * to do that in case they have really, really old silicon with a |
| 80 | * write-only PLL register. -- Dan | 80 | * write-only PLL register. -- Dan |
| 81 | */ | 81 | */ |
diff --git a/arch/mips/cavium-octeon/executive/octeon-model.c b/arch/mips/cavium-octeon/executive/octeon-model.c index 9afc3794ed1b..c8d35684504e 100644 --- a/arch/mips/cavium-octeon/executive/octeon-model.c +++ b/arch/mips/cavium-octeon/executive/octeon-model.c | |||
| @@ -75,7 +75,7 @@ const char *octeon_model_get_string_buffer(uint32_t chip_id, char *buffer) | |||
| 75 | 75 | ||
| 76 | num_cores = cvmx_octeon_num_cores(); | 76 | num_cores = cvmx_octeon_num_cores(); |
| 77 | 77 | ||
| 78 | /* Make sure the non existant devices look disabled */ | 78 | /* Make sure the non existent devices look disabled */ |
| 79 | switch ((chip_id >> 8) & 0xff) { | 79 | switch ((chip_id >> 8) & 0xff) { |
| 80 | case 6: /* CN50XX */ | 80 | case 6: /* CN50XX */ |
| 81 | case 2: /* CN30XX */ | 81 | case 2: /* CN30XX */ |
diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c index cecaf62aef32..cd61d7281d91 100644 --- a/arch/mips/cavium-octeon/octeon-platform.c +++ b/arch/mips/cavium-octeon/octeon-platform.c | |||
| @@ -75,7 +75,7 @@ static int __init octeon_cf_device_init(void) | |||
| 75 | * zero. | 75 | * zero. |
| 76 | */ | 76 | */ |
| 77 | 77 | ||
| 78 | /* Asume that CS1 immediately follows. */ | 78 | /* Assume that CS1 immediately follows. */ |
| 79 | mio_boot_reg_cfg.u64 = | 79 | mio_boot_reg_cfg.u64 = |
| 80 | cvmx_read_csr(CVMX_MIO_BOOT_REG_CFGX(i + 1)); | 80 | cvmx_read_csr(CVMX_MIO_BOOT_REG_CFGX(i + 1)); |
| 81 | region_base = mio_boot_reg_cfg.s.base << 16; | 81 | region_base = mio_boot_reg_cfg.s.base << 16; |
diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c index 8b139bf4a1b5..0707fae3f0ee 100644 --- a/arch/mips/cavium-octeon/setup.c +++ b/arch/mips/cavium-octeon/setup.c | |||
| @@ -662,7 +662,7 @@ void __init plat_mem_setup(void) | |||
| 662 | * some memory vectors. When SPARSEMEM is in use, it doesn't | 662 | * some memory vectors. When SPARSEMEM is in use, it doesn't |
| 663 | * verify that the size is big enough for the final | 663 | * verify that the size is big enough for the final |
| 664 | * vectors. Making the smallest chuck 4MB seems to be enough | 664 | * vectors. Making the smallest chuck 4MB seems to be enough |
| 665 | * to consistantly work. | 665 | * to consistently work. |
| 666 | */ | 666 | */ |
| 667 | mem_alloc_size = 4 << 20; | 667 | mem_alloc_size = 4 << 20; |
| 668 | if (mem_alloc_size > MAX_MEMORY) | 668 | if (mem_alloc_size > MAX_MEMORY) |
diff --git a/arch/mips/fw/arc/promlib.c b/arch/mips/fw/arc/promlib.c index c508c00dbb64..b7f9dd3c93c6 100644 --- a/arch/mips/fw/arc/promlib.c +++ b/arch/mips/fw/arc/promlib.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * for more details. | 4 | * for more details. |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 1996 David S. Miller (dm@sgi.com) | 6 | * Copyright (C) 1996 David S. Miller (dm@sgi.com) |
| 7 | * Compability with board caches, Ulf Carlsson | 7 | * Compatibility with board caches, Ulf Carlsson |
| 8 | */ | 8 | */ |
| 9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
| 10 | #include <asm/sgialib.h> | 10 | #include <asm/sgialib.h> |
diff --git a/arch/mips/include/asm/dec/prom.h b/arch/mips/include/asm/dec/prom.h index b9c8203688d5..c0ead6313845 100644 --- a/arch/mips/include/asm/dec/prom.h +++ b/arch/mips/include/asm/dec/prom.h | |||
| @@ -108,7 +108,7 @@ extern int (*__pmax_close)(int); | |||
| 108 | 108 | ||
| 109 | /* | 109 | /* |
| 110 | * On MIPS64 we have to call PROM functions via a helper | 110 | * On MIPS64 we have to call PROM functions via a helper |
| 111 | * dispatcher to accomodate ABI incompatibilities. | 111 | * dispatcher to accommodate ABI incompatibilities. |
| 112 | */ | 112 | */ |
| 113 | #define __DEC_PROM_O32(fun, arg) fun arg __asm__(#fun); \ | 113 | #define __DEC_PROM_O32(fun, arg) fun arg __asm__(#fun); \ |
| 114 | __asm__(#fun " = call_o32") | 114 | __asm__(#fun " = call_o32") |
diff --git a/arch/mips/include/asm/floppy.h b/arch/mips/include/asm/floppy.h index 992d232adc83..c5c7c0e6064c 100644 --- a/arch/mips/include/asm/floppy.h +++ b/arch/mips/include/asm/floppy.h | |||
| @@ -24,7 +24,7 @@ static inline void fd_cacheflush(char * addr, long size) | |||
| 24 | * And on Mips's the CMOS info fails also ... | 24 | * And on Mips's the CMOS info fails also ... |
| 25 | * | 25 | * |
| 26 | * FIXME: This information should come from the ARC configuration tree | 26 | * FIXME: This information should come from the ARC configuration tree |
| 27 | * or whereever a particular machine has stored this ... | 27 | * or wherever a particular machine has stored this ... |
| 28 | */ | 28 | */ |
| 29 | #define FLOPPY0_TYPE fd_drive_type(0) | 29 | #define FLOPPY0_TYPE fd_drive_type(0) |
| 30 | #define FLOPPY1_TYPE fd_drive_type(1) | 30 | #define FLOPPY1_TYPE fd_drive_type(1) |
diff --git a/arch/mips/include/asm/hw_irq.h b/arch/mips/include/asm/hw_irq.h index aca05a43a97b..77adda297ad9 100644 --- a/arch/mips/include/asm/hw_irq.h +++ b/arch/mips/include/asm/hw_irq.h | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | extern atomic_t irq_err_count; | 13 | extern atomic_t irq_err_count; |
| 14 | 14 | ||
| 15 | /* | 15 | /* |
| 16 | * interrupt-retrigger: NOP for now. This may not be apropriate for all | 16 | * interrupt-retrigger: NOP for now. This may not be appropriate for all |
| 17 | * machines, we'll see ... | 17 | * machines, we'll see ... |
| 18 | */ | 18 | */ |
| 19 | 19 | ||
diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h index 5b017f23e243..b04e4de5dd2e 100644 --- a/arch/mips/include/asm/io.h +++ b/arch/mips/include/asm/io.h | |||
| @@ -242,7 +242,7 @@ static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size, | |||
| 242 | * This version of ioremap ensures that the memory is marked uncachable | 242 | * This version of ioremap ensures that the memory is marked uncachable |
| 243 | * on the CPU as well as honouring existing caching rules from things like | 243 | * on the CPU as well as honouring existing caching rules from things like |
| 244 | * the PCI bus. Note that there are other caches and buffers on many | 244 | * the PCI bus. Note that there are other caches and buffers on many |
| 245 | * busses. In paticular driver authors should read up on PCI writes | 245 | * busses. In particular driver authors should read up on PCI writes |
| 246 | * | 246 | * |
| 247 | * It's useful if some control registers are in such an area and | 247 | * It's useful if some control registers are in such an area and |
| 248 | * write combining or read caching is not desirable: | 248 | * write combining or read caching is not desirable: |
diff --git a/arch/mips/include/asm/irqflags.h b/arch/mips/include/asm/irqflags.h index 9ef3b0d17896..309cbcd6909c 100644 --- a/arch/mips/include/asm/irqflags.h +++ b/arch/mips/include/asm/irqflags.h | |||
| @@ -174,7 +174,7 @@ __asm__( | |||
| 174 | "mtc0 \\flags, $2, 1 \n" | 174 | "mtc0 \\flags, $2, 1 \n" |
| 175 | #elif defined(CONFIG_CPU_MIPSR2) && defined(CONFIG_IRQ_CPU) | 175 | #elif defined(CONFIG_CPU_MIPSR2) && defined(CONFIG_IRQ_CPU) |
| 176 | /* | 176 | /* |
| 177 | * Slow, but doesn't suffer from a relativly unlikely race | 177 | * Slow, but doesn't suffer from a relatively unlikely race |
| 178 | * condition we're having since days 1. | 178 | * condition we're having since days 1. |
| 179 | */ | 179 | */ |
| 180 | " beqz \\flags, 1f \n" | 180 | " beqz \\flags, 1f \n" |
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h b/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h index 5325084d5c48..32978d32561a 100644 --- a/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | #define TAGVER_LEN 4 /* Length of Tag Version */ | 4 | #define TAGVER_LEN 4 /* Length of Tag Version */ |
| 5 | #define TAGLAYOUT_LEN 4 /* Length of FlashLayoutVer */ | 5 | #define TAGLAYOUT_LEN 4 /* Length of FlashLayoutVer */ |
| 6 | #define SIG1_LEN 20 /* Company Signature 1 Length */ | 6 | #define SIG1_LEN 20 /* Company Signature 1 Length */ |
| 7 | #define SIG2_LEN 14 /* Company Signature 2 Lenght */ | 7 | #define SIG2_LEN 14 /* Company Signature 2 Length */ |
| 8 | #define BOARDID_LEN 16 /* Length of BoardId */ | 8 | #define BOARDID_LEN 16 /* Length of BoardId */ |
| 9 | #define ENDIANFLAG_LEN 2 /* Endian Flag Length */ | 9 | #define ENDIANFLAG_LEN 2 /* Endian Flag Length */ |
| 10 | #define CHIPID_LEN 6 /* Chip Id Length */ | 10 | #define CHIPID_LEN 6 /* Chip Id Length */ |
diff --git a/arch/mips/include/asm/mach-ip32/mc146818rtc.h b/arch/mips/include/asm/mach-ip32/mc146818rtc.h index c28ba8d84076..6b6bab43d5c1 100644 --- a/arch/mips/include/asm/mach-ip32/mc146818rtc.h +++ b/arch/mips/include/asm/mach-ip32/mc146818rtc.h | |||
| @@ -26,7 +26,7 @@ static inline void CMOS_WRITE(unsigned char data, unsigned long addr) | |||
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | /* | 28 | /* |
| 29 | * FIXME: Do it right. For now just assume that noone lives in 20th century | 29 | * FIXME: Do it right. For now just assume that no one lives in 20th century |
| 30 | * and no O2 user in 22th century ;-) | 30 | * and no O2 user in 22th century ;-) |
| 31 | */ | 31 | */ |
| 32 | #define mc146818_decode_year(year) ((year) + 2000) | 32 | #define mc146818_decode_year(year) ((year) + 2000) |
diff --git a/arch/mips/include/asm/mach-loongson/cs5536/cs5536.h b/arch/mips/include/asm/mach-loongson/cs5536/cs5536.h index 021f77ca59ec..2a8e2bb5d539 100644 --- a/arch/mips/include/asm/mach-loongson/cs5536/cs5536.h +++ b/arch/mips/include/asm/mach-loongson/cs5536/cs5536.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * The header file of cs5536 sourth bridge. | 2 | * The header file of cs5536 south bridge. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007 Lemote, Inc. | 4 | * Copyright (C) 2007 Lemote, Inc. |
| 5 | * Author : jlliu <liujl@lemote.com> | 5 | * Author : jlliu <liujl@lemote.com> |
diff --git a/arch/mips/include/asm/mach-pb1x00/pb1000.h b/arch/mips/include/asm/mach-pb1x00/pb1000.h index 6d1ff9060e44..65059255dc1e 100644 --- a/arch/mips/include/asm/mach-pb1x00/pb1000.h +++ b/arch/mips/include/asm/mach-pb1x00/pb1000.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Alchemy Semi Pb1000 Referrence Board | 2 | * Alchemy Semi Pb1000 Reference Board |
| 3 | * | 3 | * |
| 4 | * Copyright 2001, 2008 MontaVista Software Inc. | 4 | * Copyright 2001, 2008 MontaVista Software Inc. |
| 5 | * Author: MontaVista Software, Inc. <source@mvista.com> | 5 | * Author: MontaVista Software, Inc. <source@mvista.com> |
diff --git a/arch/mips/include/asm/mach-pb1x00/pb1200.h b/arch/mips/include/asm/mach-pb1x00/pb1200.h index 962eb55dc880..fce4332ebb7f 100644 --- a/arch/mips/include/asm/mach-pb1x00/pb1200.h +++ b/arch/mips/include/asm/mach-pb1x00/pb1200.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * AMD Alchemy Pb1200 Referrence Board | 2 | * AMD Alchemy Pb1200 Reference Board |
| 3 | * Board Registers defines. | 3 | * Board Registers defines. |
| 4 | * | 4 | * |
| 5 | * ######################################################################## | 5 | * ######################################################################## |
diff --git a/arch/mips/include/asm/mach-pb1x00/pb1550.h b/arch/mips/include/asm/mach-pb1x00/pb1550.h index fc4d766641ce..f835c88e9593 100644 --- a/arch/mips/include/asm/mach-pb1x00/pb1550.h +++ b/arch/mips/include/asm/mach-pb1x00/pb1550.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * AMD Alchemy Semi PB1550 Referrence Board | 2 | * AMD Alchemy Semi PB1550 Reference Board |
| 3 | * Board Registers defines. | 3 | * Board Registers defines. |
| 4 | * | 4 | * |
| 5 | * Copyright 2004 Embedded Edge LLC. | 5 | * Copyright 2004 Embedded Edge LLC. |
diff --git a/arch/mips/include/asm/mach-powertv/dma-coherence.h b/arch/mips/include/asm/mach-powertv/dma-coherence.h index f76029c2406e..a8e72cf12142 100644 --- a/arch/mips/include/asm/mach-powertv/dma-coherence.h +++ b/arch/mips/include/asm/mach-powertv/dma-coherence.h | |||
| @@ -48,7 +48,7 @@ static inline unsigned long virt_to_phys_from_pte(void *addr) | |||
| 48 | /* check for a valid page */ | 48 | /* check for a valid page */ |
| 49 | if (pte_present(pte)) { | 49 | if (pte_present(pte)) { |
| 50 | /* get the physical address the page is | 50 | /* get the physical address the page is |
| 51 | * refering to */ | 51 | * referring to */ |
| 52 | phys_addr = (unsigned long) | 52 | phys_addr = (unsigned long) |
| 53 | page_to_phys(pte_page(pte)); | 53 | page_to_phys(pte_page(pte)); |
| 54 | /* add the offset within the page */ | 54 | /* add the offset within the page */ |
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index 4d9870975382..6a6f8a8f542d 100644 --- a/arch/mips/include/asm/mipsregs.h +++ b/arch/mips/include/asm/mipsregs.h | |||
| @@ -922,7 +922,7 @@ do { \ | |||
| 922 | #define write_c0_config7(val) __write_32bit_c0_register($16, 7, val) | 922 | #define write_c0_config7(val) __write_32bit_c0_register($16, 7, val) |
| 923 | 923 | ||
| 924 | /* | 924 | /* |
| 925 | * The WatchLo register. There may be upto 8 of them. | 925 | * The WatchLo register. There may be up to 8 of them. |
| 926 | */ | 926 | */ |
| 927 | #define read_c0_watchlo0() __read_ulong_c0_register($18, 0) | 927 | #define read_c0_watchlo0() __read_ulong_c0_register($18, 0) |
| 928 | #define read_c0_watchlo1() __read_ulong_c0_register($18, 1) | 928 | #define read_c0_watchlo1() __read_ulong_c0_register($18, 1) |
| @@ -942,7 +942,7 @@ do { \ | |||
| 942 | #define write_c0_watchlo7(val) __write_ulong_c0_register($18, 7, val) | 942 | #define write_c0_watchlo7(val) __write_ulong_c0_register($18, 7, val) |
| 943 | 943 | ||
| 944 | /* | 944 | /* |
| 945 | * The WatchHi register. There may be upto 8 of them. | 945 | * The WatchHi register. There may be up to 8 of them. |
| 946 | */ | 946 | */ |
| 947 | #define read_c0_watchhi0() __read_32bit_c0_register($19, 0) | 947 | #define read_c0_watchhi0() __read_32bit_c0_register($19, 0) |
| 948 | #define read_c0_watchhi1() __read_32bit_c0_register($19, 1) | 948 | #define read_c0_watchhi1() __read_32bit_c0_register($19, 1) |
diff --git a/arch/mips/include/asm/octeon/cvmx-bootinfo.h b/arch/mips/include/asm/octeon/cvmx-bootinfo.h index f3c23a43f845..4e4c3a8282d6 100644 --- a/arch/mips/include/asm/octeon/cvmx-bootinfo.h +++ b/arch/mips/include/asm/octeon/cvmx-bootinfo.h | |||
| @@ -200,7 +200,7 @@ enum cvmx_chip_types_enum { | |||
| 200 | CVMX_CHIP_TYPE_MAX, | 200 | CVMX_CHIP_TYPE_MAX, |
| 201 | }; | 201 | }; |
| 202 | 202 | ||
| 203 | /* Compatability alias for NAC38 name change, planned to be removed | 203 | /* Compatibility alias for NAC38 name change, planned to be removed |
| 204 | * from SDK 1.7 */ | 204 | * from SDK 1.7 */ |
| 205 | #define CVMX_BOARD_TYPE_NAO38 CVMX_BOARD_TYPE_NAC38 | 205 | #define CVMX_BOARD_TYPE_NAO38 CVMX_BOARD_TYPE_NAC38 |
| 206 | 206 | ||
diff --git a/arch/mips/include/asm/octeon/cvmx-bootmem.h b/arch/mips/include/asm/octeon/cvmx-bootmem.h index 8e708bdb43f7..877845b84b14 100644 --- a/arch/mips/include/asm/octeon/cvmx-bootmem.h +++ b/arch/mips/include/asm/octeon/cvmx-bootmem.h | |||
| @@ -67,7 +67,7 @@ struct cvmx_bootmem_block_header { | |||
| 67 | 67 | ||
| 68 | /* | 68 | /* |
| 69 | * Structure for named memory blocks. Number of descriptors available | 69 | * Structure for named memory blocks. Number of descriptors available |
| 70 | * can be changed without affecting compatiblity, but name length | 70 | * can be changed without affecting compatibility, but name length |
| 71 | * changes require a bump in the bootmem descriptor version Note: This | 71 | * changes require a bump in the bootmem descriptor version Note: This |
| 72 | * structure must be naturally 64 bit aligned, as a single memory | 72 | * structure must be naturally 64 bit aligned, as a single memory |
| 73 | * image will be used by both 32 and 64 bit programs. | 73 | * image will be used by both 32 and 64 bit programs. |
diff --git a/arch/mips/include/asm/octeon/cvmx-l2c.h b/arch/mips/include/asm/octeon/cvmx-l2c.h index 0b32c5b118e2..2c8ff9e33ec3 100644 --- a/arch/mips/include/asm/octeon/cvmx-l2c.h +++ b/arch/mips/include/asm/octeon/cvmx-l2c.h | |||
| @@ -157,7 +157,7 @@ enum cvmx_l2c_tad_event { | |||
| 157 | 157 | ||
| 158 | /** | 158 | /** |
| 159 | * Configure one of the four L2 Cache performance counters to capture event | 159 | * Configure one of the four L2 Cache performance counters to capture event |
| 160 | * occurences. | 160 | * occurrences. |
| 161 | * | 161 | * |
| 162 | * @counter: The counter to configure. Range 0..3. | 162 | * @counter: The counter to configure. Range 0..3. |
| 163 | * @event: The type of L2 Cache event occurrence to count. | 163 | * @event: The type of L2 Cache event occurrence to count. |
diff --git a/arch/mips/include/asm/octeon/cvmx.h b/arch/mips/include/asm/octeon/cvmx.h index 9d9381e2e3d8..7e1286706d46 100644 --- a/arch/mips/include/asm/octeon/cvmx.h +++ b/arch/mips/include/asm/octeon/cvmx.h | |||
| @@ -151,7 +151,7 @@ enum cvmx_mips_space { | |||
| 151 | #endif | 151 | #endif |
| 152 | 152 | ||
| 153 | /** | 153 | /** |
| 154 | * Convert a memory pointer (void*) into a hardware compatable | 154 | * Convert a memory pointer (void*) into a hardware compatible |
| 155 | * memory address (uint64_t). Octeon hardware widgets don't | 155 | * memory address (uint64_t). Octeon hardware widgets don't |
| 156 | * understand logical addresses. | 156 | * understand logical addresses. |
| 157 | * | 157 | * |
diff --git a/arch/mips/include/asm/paccess.h b/arch/mips/include/asm/paccess.h index c2394f8b0fe1..9ce5a1e7e14c 100644 --- a/arch/mips/include/asm/paccess.h +++ b/arch/mips/include/asm/paccess.h | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. | 7 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. |
| 8 | * | 8 | * |
| 9 | * Protected memory access. Used for everything that might take revenge | 9 | * Protected memory access. Used for everything that might take revenge |
| 10 | * by sending a DBE error like accessing possibly non-existant memory or | 10 | * by sending a DBE error like accessing possibly non-existent memory or |
| 11 | * devices. | 11 | * devices. |
| 12 | */ | 12 | */ |
| 13 | #ifndef _ASM_PACCESS_H | 13 | #ifndef _ASM_PACCESS_H |
diff --git a/arch/mips/include/asm/pci/bridge.h b/arch/mips/include/asm/pci/bridge.h index f1f508e4f971..be44fb0266da 100644 --- a/arch/mips/include/asm/pci/bridge.h +++ b/arch/mips/include/asm/pci/bridge.h | |||
| @@ -262,7 +262,7 @@ typedef volatile struct bridge_s { | |||
| 262 | } bridge_t; | 262 | } bridge_t; |
| 263 | 263 | ||
| 264 | /* | 264 | /* |
| 265 | * Field formats for Error Command Word and Auxillary Error Command Word | 265 | * Field formats for Error Command Word and Auxiliary Error Command Word |
| 266 | * of bridge. | 266 | * of bridge. |
| 267 | */ | 267 | */ |
| 268 | typedef struct bridge_err_cmdword_s { | 268 | typedef struct bridge_err_cmdword_s { |
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regops.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regops.h index 60a5a38dd5b2..7d41474e5488 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regops.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regops.h | |||
| @@ -205,7 +205,7 @@ static inline u32 blocking_read_reg32(volatile u32 *const addr) | |||
| 205 | * custom_read_reg32(address, tmp); <-- Reads the address and put the value | 205 | * custom_read_reg32(address, tmp); <-- Reads the address and put the value |
| 206 | * in the 'tmp' variable given | 206 | * in the 'tmp' variable given |
| 207 | * | 207 | * |
| 208 | * From here on out, you are (basicly) atomic, so don't do anything too | 208 | * From here on out, you are (basically) atomic, so don't do anything too |
| 209 | * fancy! | 209 | * fancy! |
| 210 | * Also, this code may loop if the end of this block fails to write | 210 | * Also, this code may loop if the end of this block fails to write |
| 211 | * everything back safely due do the other CPU, so do NOT do anything | 211 | * everything back safely due do the other CPU, so do NOT do anything |
diff --git a/arch/mips/include/asm/processor.h b/arch/mips/include/asm/processor.h index ead6928fa6b8..c104f1039a69 100644 --- a/arch/mips/include/asm/processor.h +++ b/arch/mips/include/asm/processor.h | |||
| @@ -337,7 +337,7 @@ unsigned long get_wchan(struct task_struct *p); | |||
| 337 | /* | 337 | /* |
| 338 | * Return_address is a replacement for __builtin_return_address(count) | 338 | * Return_address is a replacement for __builtin_return_address(count) |
| 339 | * which on certain architectures cannot reasonably be implemented in GCC | 339 | * which on certain architectures cannot reasonably be implemented in GCC |
| 340 | * (MIPS, Alpha) or is unuseable with -fomit-frame-pointer (i386). | 340 | * (MIPS, Alpha) or is unusable with -fomit-frame-pointer (i386). |
| 341 | * Note that __builtin_return_address(x>=1) is forbidden because GCC | 341 | * Note that __builtin_return_address(x>=1) is forbidden because GCC |
| 342 | * aborts compilation on some CPUs. It's simply not possible to unwind | 342 | * aborts compilation on some CPUs. It's simply not possible to unwind |
| 343 | * some CPU's stackframes. | 343 | * some CPU's stackframes. |
diff --git a/arch/mips/include/asm/sgi/ioc.h b/arch/mips/include/asm/sgi/ioc.h index 57a971904cfe..380347b648e2 100644 --- a/arch/mips/include/asm/sgi/ioc.h +++ b/arch/mips/include/asm/sgi/ioc.h | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | #include <asm/sgi/pi1.h> | 17 | #include <asm/sgi/pi1.h> |
| 18 | 18 | ||
| 19 | /* | 19 | /* |
| 20 | * All registers are 8-bit wide alligned on 32-bit boundary. Bad things | 20 | * All registers are 8-bit wide aligned on 32-bit boundary. Bad things |
| 21 | * happen if you try word access them. You have been warned. | 21 | * happen if you try word access them. You have been warned. |
| 22 | */ | 22 | */ |
| 23 | 23 | ||
diff --git a/arch/mips/include/asm/sibyte/sb1250_mac.h b/arch/mips/include/asm/sibyte/sb1250_mac.h index 591b9061fd8e..77f787284235 100644 --- a/arch/mips/include/asm/sibyte/sb1250_mac.h +++ b/arch/mips/include/asm/sibyte/sb1250_mac.h | |||
| @@ -520,7 +520,7 @@ | |||
| 520 | #define G_MAC_RX_EOP_COUNTER(x) _SB_GETVALUE(x, S_MAC_RX_EOP_COUNTER, M_MAC_RX_EOP_COUNTER) | 520 | #define G_MAC_RX_EOP_COUNTER(x) _SB_GETVALUE(x, S_MAC_RX_EOP_COUNTER, M_MAC_RX_EOP_COUNTER) |
| 521 | 521 | ||
| 522 | /* | 522 | /* |
| 523 | * MAC Recieve Address Filter Exact Match Registers (Table 9-21) | 523 | * MAC Receive Address Filter Exact Match Registers (Table 9-21) |
| 524 | * Registers: MAC_ADDR0_0 through MAC_ADDR7_0 | 524 | * Registers: MAC_ADDR0_0 through MAC_ADDR7_0 |
| 525 | * Registers: MAC_ADDR0_1 through MAC_ADDR7_1 | 525 | * Registers: MAC_ADDR0_1 through MAC_ADDR7_1 |
| 526 | * Registers: MAC_ADDR0_2 through MAC_ADDR7_2 | 526 | * Registers: MAC_ADDR0_2 through MAC_ADDR7_2 |
| @@ -538,7 +538,7 @@ | |||
| 538 | /* No bitfields */ | 538 | /* No bitfields */ |
| 539 | 539 | ||
| 540 | /* | 540 | /* |
| 541 | * MAC Recieve Address Filter Hash Match Registers (Table 9-22) | 541 | * MAC Receive Address Filter Hash Match Registers (Table 9-22) |
| 542 | * Registers: MAC_HASH0_0 through MAC_HASH7_0 | 542 | * Registers: MAC_HASH0_0 through MAC_HASH7_0 |
| 543 | * Registers: MAC_HASH0_1 through MAC_HASH7_1 | 543 | * Registers: MAC_HASH0_1 through MAC_HASH7_1 |
| 544 | * Registers: MAC_HASH0_2 through MAC_HASH7_2 | 544 | * Registers: MAC_HASH0_2 through MAC_HASH7_2 |
diff --git a/arch/mips/include/asm/siginfo.h b/arch/mips/include/asm/siginfo.h index 1ca64b4d33d9..20ebeb875ee6 100644 --- a/arch/mips/include/asm/siginfo.h +++ b/arch/mips/include/asm/siginfo.h | |||
| @@ -101,7 +101,7 @@ typedef struct siginfo { | |||
| 101 | 101 | ||
| 102 | /* | 102 | /* |
| 103 | * si_code values | 103 | * si_code values |
| 104 | * Again these have been choosen to be IRIX compatible. | 104 | * Again these have been chosen to be IRIX compatible. |
| 105 | */ | 105 | */ |
| 106 | #undef SI_ASYNCIO | 106 | #undef SI_ASYNCIO |
| 107 | #undef SI_TIMER | 107 | #undef SI_TIMER |
diff --git a/arch/mips/include/asm/sn/klconfig.h b/arch/mips/include/asm/sn/klconfig.h index 09e590daca17..fe02900b930d 100644 --- a/arch/mips/include/asm/sn/klconfig.h +++ b/arch/mips/include/asm/sn/klconfig.h | |||
| @@ -78,7 +78,7 @@ typedef s32 klconf_off_t; | |||
| 78 | */ | 78 | */ |
| 79 | #define MAX_SLOTS_PER_NODE (1 + 2 + 6 + 2) | 79 | #define MAX_SLOTS_PER_NODE (1 + 2 + 6 + 2) |
| 80 | 80 | ||
| 81 | /* XXX if each node is guranteed to have some memory */ | 81 | /* XXX if each node is guaranteed to have some memory */ |
| 82 | 82 | ||
| 83 | #define MAX_PCI_DEVS 8 | 83 | #define MAX_PCI_DEVS 8 |
| 84 | 84 | ||
| @@ -539,7 +539,7 @@ typedef struct klinfo_s { /* Generic info */ | |||
| 539 | #define KLSTRUCT_IOC3_TTY 24 | 539 | #define KLSTRUCT_IOC3_TTY 24 |
| 540 | 540 | ||
| 541 | /* Early Access IO proms are compatible | 541 | /* Early Access IO proms are compatible |
| 542 | only with KLSTRUCT values upto 24. */ | 542 | only with KLSTRUCT values up to 24. */ |
| 543 | 543 | ||
| 544 | #define KLSTRUCT_FIBERCHANNEL 25 | 544 | #define KLSTRUCT_FIBERCHANNEL 25 |
| 545 | #define KLSTRUCT_MOD_SERIAL_NUM 26 | 545 | #define KLSTRUCT_MOD_SERIAL_NUM 26 |
diff --git a/arch/mips/include/asm/sn/sn0/hubio.h b/arch/mips/include/asm/sn/sn0/hubio.h index 31c76c021bb6..46286d8302a7 100644 --- a/arch/mips/include/asm/sn/sn0/hubio.h +++ b/arch/mips/include/asm/sn/sn0/hubio.h | |||
| @@ -622,7 +622,7 @@ typedef union h1_icrbb_u { | |||
| 622 | */ | 622 | */ |
| 623 | #define IIO_ICRB_PROC0 0 /* Source of request is Proc 0 */ | 623 | #define IIO_ICRB_PROC0 0 /* Source of request is Proc 0 */ |
| 624 | #define IIO_ICRB_PROC1 1 /* Source of request is Proc 1 */ | 624 | #define IIO_ICRB_PROC1 1 /* Source of request is Proc 1 */ |
| 625 | #define IIO_ICRB_GB_REQ 2 /* Source is Guranteed BW request */ | 625 | #define IIO_ICRB_GB_REQ 2 /* Source is Guaranteed BW request */ |
| 626 | #define IIO_ICRB_IO_REQ 3 /* Source is Normal IO request */ | 626 | #define IIO_ICRB_IO_REQ 3 /* Source is Normal IO request */ |
| 627 | 627 | ||
| 628 | /* | 628 | /* |
diff --git a/arch/mips/include/asm/stackframe.h b/arch/mips/include/asm/stackframe.h index 58730c5ce4bf..b4ba2449444b 100644 --- a/arch/mips/include/asm/stackframe.h +++ b/arch/mips/include/asm/stackframe.h | |||
| @@ -346,7 +346,7 @@ | |||
| 346 | * we can't dispatch it directly without trashing | 346 | * we can't dispatch it directly without trashing |
| 347 | * some registers, so we'll try to detect this unlikely | 347 | * some registers, so we'll try to detect this unlikely |
| 348 | * case and program a software interrupt in the VPE, | 348 | * case and program a software interrupt in the VPE, |
| 349 | * as would be done for a cross-VPE IPI. To accomodate | 349 | * as would be done for a cross-VPE IPI. To accommodate |
| 350 | * the handling of that case, we're doing a DVPE instead | 350 | * the handling of that case, we're doing a DVPE instead |
| 351 | * of just a DMT here to protect against other threads. | 351 | * of just a DMT here to protect against other threads. |
| 352 | * This is a lot of cruft to cover a tiny window. | 352 | * This is a lot of cruft to cover a tiny window. |
diff --git a/arch/mips/include/asm/war.h b/arch/mips/include/asm/war.h index 22361d5e3bf0..fa133c1bc1f9 100644 --- a/arch/mips/include/asm/war.h +++ b/arch/mips/include/asm/war.h | |||
| @@ -227,7 +227,7 @@ | |||
| 227 | #endif | 227 | #endif |
| 228 | 228 | ||
| 229 | /* | 229 | /* |
| 230 | * On the R10000 upto version 2.6 (not sure about 2.7) there is a bug that | 230 | * On the R10000 up to version 2.6 (not sure about 2.7) there is a bug that |
| 231 | * may cause ll / sc and lld / scd sequences to execute non-atomically. | 231 | * may cause ll / sc and lld / scd sequences to execute non-atomically. |
| 232 | */ | 232 | */ |
| 233 | #ifndef R10000_LLSC_WAR | 233 | #ifndef R10000_LLSC_WAR |
diff --git a/arch/mips/jz4740/board-qi_lb60.c b/arch/mips/jz4740/board-qi_lb60.c index bc18daaa8f84..c3b04be3fb2b 100644 --- a/arch/mips/jz4740/board-qi_lb60.c +++ b/arch/mips/jz4740/board-qi_lb60.c | |||
| @@ -65,7 +65,7 @@ static struct nand_ecclayout qi_lb60_ecclayout_1gb = { | |||
| 65 | }; | 65 | }; |
| 66 | 66 | ||
| 67 | /* Early prototypes of the QI LB60 had only 1GB of NAND. | 67 | /* Early prototypes of the QI LB60 had only 1GB of NAND. |
| 68 | * In order to support these devices aswell the partition and ecc layout is | 68 | * In order to support these devices as well the partition and ecc layout is |
| 69 | * initialized depending on the NAND size */ | 69 | * initialized depending on the NAND size */ |
| 70 | static struct mtd_partition qi_lb60_partitions_1gb[] = { | 70 | static struct mtd_partition qi_lb60_partitions_1gb[] = { |
| 71 | { | 71 | { |
| @@ -439,7 +439,7 @@ static struct platform_device *jz_platform_devices[] __initdata = { | |||
| 439 | static void __init board_gpio_setup(void) | 439 | static void __init board_gpio_setup(void) |
| 440 | { | 440 | { |
| 441 | /* We only need to enable/disable pullup here for pins used in generic | 441 | /* We only need to enable/disable pullup here for pins used in generic |
| 442 | * drivers. Everything else is done by the drivers themselfs. */ | 442 | * drivers. Everything else is done by the drivers themselves. */ |
| 443 | jz_gpio_disable_pullup(QI_LB60_GPIO_SD_VCC_EN_N); | 443 | jz_gpio_disable_pullup(QI_LB60_GPIO_SD_VCC_EN_N); |
| 444 | jz_gpio_disable_pullup(QI_LB60_GPIO_SD_CD); | 444 | jz_gpio_disable_pullup(QI_LB60_GPIO_SD_CD); |
| 445 | } | 445 | } |
diff --git a/arch/mips/kernel/cpu-bugs64.c b/arch/mips/kernel/cpu-bugs64.c index b8bb8ba60869..f305ca14351b 100644 --- a/arch/mips/kernel/cpu-bugs64.c +++ b/arch/mips/kernel/cpu-bugs64.c | |||
| @@ -73,7 +73,7 @@ static inline void mult_sh_align_mod(long *v1, long *v2, long *w, | |||
| 73 | : "0" (5), "1" (8), "2" (5)); | 73 | : "0" (5), "1" (8), "2" (5)); |
| 74 | align_mod(align, mod); | 74 | align_mod(align, mod); |
| 75 | /* | 75 | /* |
| 76 | * The trailing nop is needed to fullfill the two-instruction | 76 | * The trailing nop is needed to fulfill the two-instruction |
| 77 | * requirement between reading hi/lo and staring a mult/div. | 77 | * requirement between reading hi/lo and staring a mult/div. |
| 78 | * Leaving it out may cause gas insert a nop itself breaking | 78 | * Leaving it out may cause gas insert a nop itself breaking |
| 79 | * the desired alignment of the next chunk. | 79 | * the desired alignment of the next chunk. |
diff --git a/arch/mips/kernel/perf_event_mipsxx.c b/arch/mips/kernel/perf_event_mipsxx.c index d9a7db78ed62..75266ff4cc33 100644 --- a/arch/mips/kernel/perf_event_mipsxx.c +++ b/arch/mips/kernel/perf_event_mipsxx.c | |||
| @@ -721,7 +721,7 @@ static void mipsxx_pmu_start(void) | |||
| 721 | 721 | ||
| 722 | /* | 722 | /* |
| 723 | * MIPS performance counters can be per-TC. The control registers can | 723 | * MIPS performance counters can be per-TC. The control registers can |
| 724 | * not be directly accessed accross CPUs. Hence if we want to do global | 724 | * not be directly accessed across CPUs. Hence if we want to do global |
| 725 | * control, we need cross CPU calls. on_each_cpu() can help us, but we | 725 | * control, we need cross CPU calls. on_each_cpu() can help us, but we |
| 726 | * can not make sure this function is called with interrupts enabled. So | 726 | * can not make sure this function is called with interrupts enabled. So |
| 727 | * here we pause local counters and then grab a rwlock and leave the | 727 | * here we pause local counters and then grab a rwlock and leave the |
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index ae167df73ddd..d2112d3cf115 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
| @@ -410,7 +410,7 @@ unsigned long unwind_stack(struct task_struct *task, unsigned long *sp, | |||
| 410 | if (!kallsyms_lookup_size_offset(pc, &size, &ofs)) | 410 | if (!kallsyms_lookup_size_offset(pc, &size, &ofs)) |
| 411 | return 0; | 411 | return 0; |
| 412 | /* | 412 | /* |
| 413 | * Return ra if an exception occured at the first instruction | 413 | * Return ra if an exception occurred at the first instruction |
| 414 | */ | 414 | */ |
| 415 | if (unlikely(ofs == 0)) { | 415 | if (unlikely(ofs == 0)) { |
| 416 | pc = *ra; | 416 | pc = *ra; |
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c index c0e81418ba21..1ec56e635d04 100644 --- a/arch/mips/kernel/smp-mt.c +++ b/arch/mips/kernel/smp-mt.c | |||
| @@ -120,7 +120,7 @@ static void vsmp_send_ipi_single(int cpu, unsigned int action) | |||
| 120 | 120 | ||
| 121 | local_irq_save(flags); | 121 | local_irq_save(flags); |
| 122 | 122 | ||
| 123 | vpflags = dvpe(); /* cant access the other CPU's registers whilst MVPE enabled */ | 123 | vpflags = dvpe(); /* can't access the other CPU's registers whilst MVPE enabled */ |
| 124 | 124 | ||
| 125 | switch (action) { | 125 | switch (action) { |
| 126 | case SMP_CALL_FUNCTION: | 126 | case SMP_CALL_FUNCTION: |
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index fb7497405510..1083ad4e1017 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
| @@ -102,7 +102,7 @@ static __init int cpu_has_mfc0_count_bug(void) | |||
| 102 | case CPU_R4400SC: | 102 | case CPU_R4400SC: |
| 103 | case CPU_R4400MC: | 103 | case CPU_R4400MC: |
| 104 | /* | 104 | /* |
| 105 | * The published errata for the R4400 upto 3.0 say the CPU | 105 | * The published errata for the R4400 up to 3.0 say the CPU |
| 106 | * has the mfc0 from count bug. | 106 | * has the mfc0 from count bug. |
| 107 | */ | 107 | */ |
| 108 | if ((current_cpu_data.processor_id & 0xff) <= 0x30) | 108 | if ((current_cpu_data.processor_id & 0xff) <= 0x30) |
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c index ab52b7cf3b6b..dbb6b408f001 100644 --- a/arch/mips/kernel/vpe.c +++ b/arch/mips/kernel/vpe.c | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | * VPE support module | 19 | * VPE support module |
| 20 | * | 20 | * |
| 21 | * Provides support for loading a MIPS SP program on VPE1. | 21 | * Provides support for loading a MIPS SP program on VPE1. |
| 22 | * The SP enviroment is rather simple, no tlb's. It needs to be relocatable | 22 | * The SP environment is rather simple, no tlb's. It needs to be relocatable |
| 23 | * (or partially linked). You should initialise your stack in the startup | 23 | * (or partially linked). You should initialise your stack in the startup |
| 24 | * code. This loader looks for the symbol __start and sets up | 24 | * code. This loader looks for the symbol __start and sets up |
| 25 | * execution to resume from there. The MIPS SDE kit contains suitable examples. | 25 | * execution to resume from there. The MIPS SDE kit contains suitable examples. |
diff --git a/arch/mips/lib/strnlen_user.S b/arch/mips/lib/strnlen_user.S index c768e3000616..64457162f7e0 100644 --- a/arch/mips/lib/strnlen_user.S +++ b/arch/mips/lib/strnlen_user.S | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | .previous | 17 | .previous |
| 18 | 18 | ||
| 19 | /* | 19 | /* |
| 20 | * Return the size of a string including the ending NUL character upto a | 20 | * Return the size of a string including the ending NUL character up to a |
| 21 | * maximum of a1 or 0 in case of error. | 21 | * maximum of a1 or 0 in case of error. |
| 22 | * | 22 | * |
| 23 | * Note: for performance reasons we deliberately accept that a user may | 23 | * Note: for performance reasons we deliberately accept that a user may |
diff --git a/arch/mips/math-emu/dp_fsp.c b/arch/mips/math-emu/dp_fsp.c index 1dfbd92ba9d0..daed6834dc15 100644 --- a/arch/mips/math-emu/dp_fsp.c +++ b/arch/mips/math-emu/dp_fsp.c | |||
| @@ -62,7 +62,7 @@ ieee754dp ieee754dp_fsp(ieee754sp x) | |||
| 62 | break; | 62 | break; |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | /* CANT possibly overflow,underflow, or need rounding | 65 | /* CAN'T possibly overflow,underflow, or need rounding |
| 66 | */ | 66 | */ |
| 67 | 67 | ||
| 68 | /* drop the hidden bit */ | 68 | /* drop the hidden bit */ |
diff --git a/arch/mips/math-emu/dp_mul.c b/arch/mips/math-emu/dp_mul.c index aa566e785f5a..09175f461920 100644 --- a/arch/mips/math-emu/dp_mul.c +++ b/arch/mips/math-emu/dp_mul.c | |||
| @@ -104,7 +104,7 @@ ieee754dp ieee754dp_mul(ieee754dp x, ieee754dp y) | |||
| 104 | case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_NORM): | 104 | case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_NORM): |
| 105 | break; | 105 | break; |
| 106 | } | 106 | } |
| 107 | /* rm = xm * ym, re = xe+ye basicly */ | 107 | /* rm = xm * ym, re = xe+ye basically */ |
| 108 | assert(xm & DP_HIDDEN_BIT); | 108 | assert(xm & DP_HIDDEN_BIT); |
| 109 | assert(ym & DP_HIDDEN_BIT); | 109 | assert(ym & DP_HIDDEN_BIT); |
| 110 | { | 110 | { |
diff --git a/arch/mips/math-emu/dsemul.c b/arch/mips/math-emu/dsemul.c index 36d975ae08f8..3c4a8c5ba7f2 100644 --- a/arch/mips/math-emu/dsemul.c +++ b/arch/mips/math-emu/dsemul.c | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | * not change cp0_epc due to the instruction | 32 | * not change cp0_epc due to the instruction |
| 33 | * | 33 | * |
| 34 | * According to the spec: | 34 | * According to the spec: |
| 35 | * 1) it shouldnt be a branch :-) | 35 | * 1) it shouldn't be a branch :-) |
| 36 | * 2) it can be a COP instruction :-( | 36 | * 2) it can be a COP instruction :-( |
| 37 | * 3) if we are tring to run a protected memory space we must take | 37 | * 3) if we are tring to run a protected memory space we must take |
| 38 | * special care on memory access instructions :-( | 38 | * special care on memory access instructions :-( |
diff --git a/arch/mips/math-emu/sp_mul.c b/arch/mips/math-emu/sp_mul.c index c06bb4022be5..2722a2570ea4 100644 --- a/arch/mips/math-emu/sp_mul.c +++ b/arch/mips/math-emu/sp_mul.c | |||
| @@ -104,7 +104,7 @@ ieee754sp ieee754sp_mul(ieee754sp x, ieee754sp y) | |||
| 104 | case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_NORM): | 104 | case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_NORM): |
| 105 | break; | 105 | break; |
| 106 | } | 106 | } |
| 107 | /* rm = xm * ym, re = xe+ye basicly */ | 107 | /* rm = xm * ym, re = xe+ye basically */ |
| 108 | assert(xm & SP_HIDDEN_BIT); | 108 | assert(xm & SP_HIDDEN_BIT); |
| 109 | assert(ym & SP_HIDDEN_BIT); | 109 | assert(ym & SP_HIDDEN_BIT); |
| 110 | 110 | ||
diff --git a/arch/mips/mm/cex-sb1.S b/arch/mips/mm/cex-sb1.S index 2d08268bb705..89c412bc4b64 100644 --- a/arch/mips/mm/cex-sb1.S +++ b/arch/mips/mm/cex-sb1.S | |||
| @@ -79,7 +79,7 @@ LEAF(except_vec2_sb1) | |||
| 79 | recovered_dcache: | 79 | recovered_dcache: |
| 80 | /* | 80 | /* |
| 81 | * Unlock CacheErr-D (which in turn unlocks CacheErr-DPA). | 81 | * Unlock CacheErr-D (which in turn unlocks CacheErr-DPA). |
| 82 | * Ought to log the occurence of this recovered dcache error. | 82 | * Ought to log the occurrence of this recovered dcache error. |
| 83 | */ | 83 | */ |
| 84 | b recovered | 84 | b recovered |
| 85 | mtc0 $0,C0_CERR_D | 85 | mtc0 $0,C0_CERR_D |
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 04f9e17db9d0..5ef294fbb6e7 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
| @@ -352,7 +352,7 @@ static void __cpuinit __maybe_unused build_tlb_probe_entry(u32 **p) | |||
| 352 | 352 | ||
| 353 | /* | 353 | /* |
| 354 | * Write random or indexed TLB entry, and care about the hazards from | 354 | * Write random or indexed TLB entry, and care about the hazards from |
| 355 | * the preceeding mtc0 and for the following eret. | 355 | * the preceding mtc0 and for the following eret. |
| 356 | */ | 356 | */ |
| 357 | enum tlb_write_entry { tlb_random, tlb_indexed }; | 357 | enum tlb_write_entry { tlb_random, tlb_indexed }; |
| 358 | 358 | ||
diff --git a/arch/mips/mti-malta/malta-smtc.c b/arch/mips/mti-malta/malta-smtc.c index e67891521ac1..49a38b09a488 100644 --- a/arch/mips/mti-malta/malta-smtc.c +++ b/arch/mips/mti-malta/malta-smtc.c | |||
| @@ -130,7 +130,7 @@ int plat_set_irq_affinity(struct irq_data *d, const struct cpumask *affinity, | |||
| 130 | * cleared in the affinity mask, there will never be any | 130 | * cleared in the affinity mask, there will never be any |
| 131 | * interrupt forwarding. But as soon as a program or operator | 131 | * interrupt forwarding. But as soon as a program or operator |
| 132 | * sets affinity for one of the related IRQs, we need to make | 132 | * sets affinity for one of the related IRQs, we need to make |
| 133 | * sure that we don't ever try to forward across the VPE boundry, | 133 | * sure that we don't ever try to forward across the VPE boundary, |
| 134 | * at least not until we engineer a system where the interrupt | 134 | * at least not until we engineer a system where the interrupt |
| 135 | * _ack() or _end() function can somehow know that it corresponds | 135 | * _ack() or _end() function can somehow know that it corresponds |
| 136 | * to an interrupt taken on another VPE, and perform the appropriate | 136 | * to an interrupt taken on another VPE, and perform the appropriate |
diff --git a/arch/mips/pci/ops-pmcmsp.c b/arch/mips/pci/ops-pmcmsp.c index 68798f869c0f..8fbfbf2b931c 100644 --- a/arch/mips/pci/ops-pmcmsp.c +++ b/arch/mips/pci/ops-pmcmsp.c | |||
| @@ -344,7 +344,7 @@ static irqreturn_t bpci_interrupt(int irq, void *dev_id) | |||
| 344 | * PCI_ACCESS_WRITE and PCI_ACCESS_READ. | 344 | * PCI_ACCESS_WRITE and PCI_ACCESS_READ. |
| 345 | * | 345 | * |
| 346 | * bus - pointer to the bus number of the device to | 346 | * bus - pointer to the bus number of the device to |
| 347 | * be targetted for the configuration cycle. | 347 | * be targeted for the configuration cycle. |
| 348 | * The only element of the pci_bus structure | 348 | * The only element of the pci_bus structure |
| 349 | * used is bus->number. This argument determines | 349 | * used is bus->number. This argument determines |
| 350 | * if the configuration access will be Type 0 or | 350 | * if the configuration access will be Type 0 or |
| @@ -354,7 +354,7 @@ static irqreturn_t bpci_interrupt(int irq, void *dev_id) | |||
| 354 | * | 354 | * |
| 355 | * devfn - this is an 8-bit field. The lower three bits | 355 | * devfn - this is an 8-bit field. The lower three bits |
| 356 | * specify the function number of the device to | 356 | * specify the function number of the device to |
| 357 | * be targetted for the configuration cycle, with | 357 | * be targeted for the configuration cycle, with |
| 358 | * all three-bit combinations being legal. The | 358 | * all three-bit combinations being legal. The |
| 359 | * upper five bits specify the device number, | 359 | * upper five bits specify the device number, |
| 360 | * with legal values being 10 to 31. | 360 | * with legal values being 10 to 31. |
diff --git a/arch/mips/pci/pci-bcm1480.c b/arch/mips/pci/pci-bcm1480.c index 6f5e24c6ae67..af8c31996965 100644 --- a/arch/mips/pci/pci-bcm1480.c +++ b/arch/mips/pci/pci-bcm1480.c | |||
| @@ -210,7 +210,7 @@ static int __init bcm1480_pcibios_init(void) | |||
| 210 | PCIBIOS_MIN_IO = 0x00008000UL; | 210 | PCIBIOS_MIN_IO = 0x00008000UL; |
| 211 | PCIBIOS_MIN_MEM = 0x01000000UL; | 211 | PCIBIOS_MIN_MEM = 0x01000000UL; |
| 212 | 212 | ||
| 213 | /* Set I/O resource limits. - unlimited for now to accomodate HT */ | 213 | /* Set I/O resource limits. - unlimited for now to accommodate HT */ |
| 214 | ioport_resource.end = 0xffffffffUL; | 214 | ioport_resource.end = 0xffffffffUL; |
| 215 | iomem_resource.end = 0xffffffffUL; | 215 | iomem_resource.end = 0xffffffffUL; |
| 216 | 216 | ||
diff --git a/arch/mips/pci/pci-octeon.c b/arch/mips/pci/pci-octeon.c index 2d74fc9ae3ba..ed1c54284b8f 100644 --- a/arch/mips/pci/pci-octeon.c +++ b/arch/mips/pci/pci-octeon.c | |||
| @@ -441,7 +441,7 @@ static void octeon_pci_initialize(void) | |||
| 441 | 441 | ||
| 442 | /* | 442 | /* |
| 443 | * TDOMC must be set to one in PCI mode. TDOMC should be set to 4 | 443 | * TDOMC must be set to one in PCI mode. TDOMC should be set to 4 |
| 444 | * in PCI-X mode to allow four oustanding splits. Otherwise, | 444 | * in PCI-X mode to allow four outstanding splits. Otherwise, |
| 445 | * should not change from its reset value. Don't write PCI_CFG19 | 445 | * should not change from its reset value. Don't write PCI_CFG19 |
| 446 | * in PCI mode (0x82000001 reset value), write it to 0x82000004 | 446 | * in PCI mode (0x82000001 reset value), write it to 0x82000004 |
| 447 | * after PCI-X mode is known. MRBCI,MDWE,MDRE -> must be zero. | 447 | * after PCI-X mode is known. MRBCI,MDWE,MDRE -> must be zero. |
| @@ -515,7 +515,7 @@ static void octeon_pci_initialize(void) | |||
| 515 | #endif /* USE_OCTEON_INTERNAL_ARBITER */ | 515 | #endif /* USE_OCTEON_INTERNAL_ARBITER */ |
| 516 | 516 | ||
| 517 | /* | 517 | /* |
| 518 | * Preferrably written to 1 to set MLTD. [RDSATI,TRTAE, | 518 | * Preferably written to 1 to set MLTD. [RDSATI,TRTAE, |
| 519 | * TWTAE,TMAE,DPPMR -> must be zero. TILT -> must not be set to | 519 | * TWTAE,TMAE,DPPMR -> must be zero. TILT -> must not be set to |
| 520 | * 1..7. | 520 | * 1..7. |
| 521 | */ | 521 | */ |
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index 38bc28005b4a..33bba7bff258 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c | |||
| @@ -125,7 +125,7 @@ void __devinit register_pci_controller(struct pci_controller *hose) | |||
| 125 | hose_tail = &hose->next; | 125 | hose_tail = &hose->next; |
| 126 | 126 | ||
| 127 | /* | 127 | /* |
| 128 | * Do not panic here but later - this might hapen before console init. | 128 | * Do not panic here but later - this might happen before console init. |
| 129 | */ | 129 | */ |
| 130 | if (!hose->io_map_base) { | 130 | if (!hose->io_map_base) { |
| 131 | printk(KERN_WARNING | 131 | printk(KERN_WARNING |
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_setup.c b/arch/mips/pmc-sierra/msp71xx/msp_setup.c index fb37a10e0309..2413ea67877e 100644 --- a/arch/mips/pmc-sierra/msp71xx/msp_setup.c +++ b/arch/mips/pmc-sierra/msp71xx/msp_setup.c | |||
| @@ -239,7 +239,7 @@ void __init prom_init(void) | |||
| 239 | #ifdef CONFIG_PMCTWILED | 239 | #ifdef CONFIG_PMCTWILED |
| 240 | /* | 240 | /* |
| 241 | * Setup LED states before the subsys_initcall loads other | 241 | * Setup LED states before the subsys_initcall loads other |
| 242 | * dependant drivers/modules. | 242 | * dependent drivers/modules. |
| 243 | */ | 243 | */ |
| 244 | pmctwiled_setup(); | 244 | pmctwiled_setup(); |
| 245 | #endif | 245 | #endif |
diff --git a/arch/mips/pnx833x/common/platform.c b/arch/mips/pnx833x/common/platform.c index ce45df17fd09..87167dcc79fa 100644 --- a/arch/mips/pnx833x/common/platform.c +++ b/arch/mips/pnx833x/common/platform.c | |||
| @@ -165,7 +165,7 @@ static struct i2c_pnx0105_dev pnx833x_i2c_dev[] = { | |||
| 165 | { | 165 | { |
| 166 | .base = PNX833X_I2C0_PORTS_START, | 166 | .base = PNX833X_I2C0_PORTS_START, |
| 167 | .irq = -1, /* should be PNX833X_PIC_I2C0_INT but polling is faster */ | 167 | .irq = -1, /* should be PNX833X_PIC_I2C0_INT but polling is faster */ |
| 168 | .clock = 6, /* 0 == 400 kHz, 4 == 100 kHz(Maximum HDMI), 6 = 50kHz(Prefered HDCP) */ | 168 | .clock = 6, /* 0 == 400 kHz, 4 == 100 kHz(Maximum HDMI), 6 = 50kHz(Preferred HDCP) */ |
| 169 | .bus_addr = 0, /* no slave support */ | 169 | .bus_addr = 0, /* no slave support */ |
| 170 | }, | 170 | }, |
| 171 | { | 171 | { |
diff --git a/arch/mips/sgi-ip27/Kconfig b/arch/mips/sgi-ip27/Kconfig index 5e960ae9735a..bc5e9769bb73 100644 --- a/arch/mips/sgi-ip27/Kconfig +++ b/arch/mips/sgi-ip27/Kconfig | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #config SGI_SN0_XXL | 1 | #config SGI_SN0_XXL |
| 2 | # bool "IP27 XXL" | 2 | # bool "IP27 XXL" |
| 3 | # depends on SGI_IP27 | 3 | # depends on SGI_IP27 |
| 4 | # This options adds support for userspace processes upto 16TB size. | 4 | # This options adds support for userspace processes up to 16TB size. |
| 5 | # Normally the limit is just .5TB. | 5 | # Normally the limit is just .5TB. |
| 6 | 6 | ||
| 7 | choice | 7 | choice |
diff --git a/arch/mips/sgi-ip27/TODO b/arch/mips/sgi-ip27/TODO index 19f1512c8f2e..160857ff1483 100644 --- a/arch/mips/sgi-ip27/TODO +++ b/arch/mips/sgi-ip27/TODO | |||
| @@ -13,7 +13,7 @@ being invoked on all nodes in ip27-memory.c. | |||
| 13 | 9. start_thread must turn off UX64 ... and define tlb_refill_debug. | 13 | 9. start_thread must turn off UX64 ... and define tlb_refill_debug. |
| 14 | 10. Need a bad pmd table, bad pte table. __bad_pmd_table/__bad_pagetable | 14 | 10. Need a bad pmd table, bad pte table. __bad_pmd_table/__bad_pagetable |
| 15 | does not agree with pgd_bad/pmd_bad. | 15 | does not agree with pgd_bad/pmd_bad. |
| 16 | 11. All intrs (ip27_do_irq handlers) are targetted at cpu A on the node. | 16 | 11. All intrs (ip27_do_irq handlers) are targeted at cpu A on the node. |
| 17 | This might need to change later. Only the timer intr is set up to be | 17 | This might need to change later. Only the timer intr is set up to be |
| 18 | received on both Cpu A and B. (ip27_do_irq()/bridge_startup()) | 18 | received on both Cpu A and B. (ip27_do_irq()/bridge_startup()) |
| 19 | 13. Cache flushing (specially the SMP version) has to be investigated. | 19 | 13. Cache flushing (specially the SMP version) has to be investigated. |
diff --git a/arch/mips/sgi-ip27/ip27-init.c b/arch/mips/sgi-ip27/ip27-init.c index 51d3a4f2d7e1..923c080f77bd 100644 --- a/arch/mips/sgi-ip27/ip27-init.c +++ b/arch/mips/sgi-ip27/ip27-init.c | |||
| @@ -93,7 +93,7 @@ static void __cpuinit per_hub_init(cnodeid_t cnode) | |||
| 93 | 93 | ||
| 94 | /* | 94 | /* |
| 95 | * Some interrupts are reserved by hardware or by software convention. | 95 | * Some interrupts are reserved by hardware or by software convention. |
| 96 | * Mark these as reserved right away so they won't be used accidently | 96 | * Mark these as reserved right away so they won't be used accidentally |
| 97 | * later. | 97 | * later. |
| 98 | */ | 98 | */ |
| 99 | for (i = 0; i <= BASE_PCI_IRQ; i++) { | 99 | for (i = 0; i <= BASE_PCI_IRQ; i++) { |
diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c index 11488719dd97..0a04603d577c 100644 --- a/arch/mips/sgi-ip27/ip27-irq.c +++ b/arch/mips/sgi-ip27/ip27-irq.c | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | * Linux has a controller-independent x86 interrupt architecture. | 41 | * Linux has a controller-independent x86 interrupt architecture. |
| 42 | * every controller has a 'controller-template', that is used | 42 | * every controller has a 'controller-template', that is used |
| 43 | * by the main code to do the right thing. Each driver-visible | 43 | * by the main code to do the right thing. Each driver-visible |
| 44 | * interrupt source is transparently wired to the apropriate | 44 | * interrupt source is transparently wired to the appropriate |
| 45 | * controller. Thus drivers need not be aware of the | 45 | * controller. Thus drivers need not be aware of the |
| 46 | * interrupt-controller. | 46 | * interrupt-controller. |
| 47 | * | 47 | * |
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig index a523c94fa698..feaf09cc8632 100644 --- a/arch/mn10300/Kconfig +++ b/arch/mn10300/Kconfig | |||
| @@ -2,7 +2,6 @@ config MN10300 | |||
| 2 | def_bool y | 2 | def_bool y |
| 3 | select HAVE_OPROFILE | 3 | select HAVE_OPROFILE |
| 4 | select HAVE_GENERIC_HARDIRQS | 4 | select HAVE_GENERIC_HARDIRQS |
| 5 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
| 6 | select GENERIC_IRQ_SHOW | 5 | select GENERIC_IRQ_SHOW |
| 7 | select HAVE_ARCH_TRACEHOOK | 6 | select HAVE_ARCH_TRACEHOOK |
| 8 | select HAVE_ARCH_KGDB | 7 | select HAVE_ARCH_KGDB |
diff --git a/arch/mn10300/include/asm/cpu-regs.h b/arch/mn10300/include/asm/cpu-regs.h index 90ed4a365c97..c54effae2202 100644 --- a/arch/mn10300/include/asm/cpu-regs.h +++ b/arch/mn10300/include/asm/cpu-regs.h | |||
| @@ -49,7 +49,7 @@ asm(" .am33_2\n"); | |||
| 49 | #define EPSW_IM_6 0x00000600 /* interrupt mode 6 */ | 49 | #define EPSW_IM_6 0x00000600 /* interrupt mode 6 */ |
| 50 | #define EPSW_IM_7 0x00000700 /* interrupt mode 7 */ | 50 | #define EPSW_IM_7 0x00000700 /* interrupt mode 7 */ |
| 51 | #define EPSW_IE 0x00000800 /* interrupt enable */ | 51 | #define EPSW_IE 0x00000800 /* interrupt enable */ |
| 52 | #define EPSW_S 0x00003000 /* software auxilliary bits */ | 52 | #define EPSW_S 0x00003000 /* software auxiliary bits */ |
| 53 | #define EPSW_T 0x00008000 /* trace enable */ | 53 | #define EPSW_T 0x00008000 /* trace enable */ |
| 54 | #define EPSW_nSL 0x00010000 /* not supervisor level */ | 54 | #define EPSW_nSL 0x00010000 /* not supervisor level */ |
| 55 | #define EPSW_NMID 0x00020000 /* nonmaskable interrupt disable */ | 55 | #define EPSW_NMID 0x00020000 /* nonmaskable interrupt disable */ |
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 9b1f427cdc37..69ff049c8571 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
| @@ -15,7 +15,6 @@ config PARISC | |||
| 15 | select HAVE_GENERIC_HARDIRQS | 15 | select HAVE_GENERIC_HARDIRQS |
| 16 | select GENERIC_IRQ_PROBE | 16 | select GENERIC_IRQ_PROBE |
| 17 | select IRQ_PER_CPU | 17 | select IRQ_PER_CPU |
| 18 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
| 19 | 18 | ||
| 20 | help | 19 | help |
| 21 | The PA-RISC microprocessor is designed by Hewlett-Packard and used | 20 | The PA-RISC microprocessor is designed by Hewlett-Packard and used |
diff --git a/arch/parisc/include/asm/eisa_eeprom.h b/arch/parisc/include/asm/eisa_eeprom.h index 9c9da980402a..8ce8b85ca588 100644 --- a/arch/parisc/include/asm/eisa_eeprom.h +++ b/arch/parisc/include/asm/eisa_eeprom.h | |||
| @@ -27,7 +27,7 @@ struct eeprom_header | |||
| 27 | u_int8_t ver_maj; | 27 | u_int8_t ver_maj; |
| 28 | u_int8_t ver_min; | 28 | u_int8_t ver_min; |
| 29 | u_int8_t num_slots; /* number of EISA slots in system */ | 29 | u_int8_t num_slots; /* number of EISA slots in system */ |
| 30 | u_int16_t csum; /* checksum, I don't know how to calulate this */ | 30 | u_int16_t csum; /* checksum, I don't know how to calculate this */ |
| 31 | u_int8_t pad[10]; | 31 | u_int8_t pad[10]; |
| 32 | } __attribute__ ((packed)); | 32 | } __attribute__ ((packed)); |
| 33 | 33 | ||
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index e5477092a5d4..ead8d2a1034c 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
| @@ -187,8 +187,8 @@ | |||
| 187 | 187 | ||
| 188 | /* Register definitions for tlb miss handler macros */ | 188 | /* Register definitions for tlb miss handler macros */ |
| 189 | 189 | ||
| 190 | va = r8 /* virtual address for which the trap occured */ | 190 | va = r8 /* virtual address for which the trap occurred */ |
| 191 | spc = r24 /* space for which the trap occured */ | 191 | spc = r24 /* space for which the trap occurred */ |
| 192 | 192 | ||
| 193 | #ifndef CONFIG_64BIT | 193 | #ifndef CONFIG_64BIT |
| 194 | 194 | ||
| @@ -882,7 +882,7 @@ ENTRY(syscall_exit_rfi) | |||
| 882 | * (we don't store them in the sigcontext), so set them | 882 | * (we don't store them in the sigcontext), so set them |
| 883 | * to "proper" values now (otherwise we'll wind up restoring | 883 | * to "proper" values now (otherwise we'll wind up restoring |
| 884 | * whatever was last stored in the task structure, which might | 884 | * whatever was last stored in the task structure, which might |
| 885 | * be inconsistent if an interrupt occured while on the gateway | 885 | * be inconsistent if an interrupt occurred while on the gateway |
| 886 | * page). Note that we may be "trashing" values the user put in | 886 | * page). Note that we may be "trashing" values the user put in |
| 887 | * them, but we don't support the user changing them. | 887 | * them, but we don't support the user changing them. |
| 888 | */ | 888 | */ |
| @@ -1156,11 +1156,11 @@ ENDPROC(intr_save) | |||
| 1156 | */ | 1156 | */ |
| 1157 | 1157 | ||
| 1158 | t0 = r1 /* temporary register 0 */ | 1158 | t0 = r1 /* temporary register 0 */ |
| 1159 | va = r8 /* virtual address for which the trap occured */ | 1159 | va = r8 /* virtual address for which the trap occurred */ |
| 1160 | t1 = r9 /* temporary register 1 */ | 1160 | t1 = r9 /* temporary register 1 */ |
| 1161 | pte = r16 /* pte/phys page # */ | 1161 | pte = r16 /* pte/phys page # */ |
| 1162 | prot = r17 /* prot bits */ | 1162 | prot = r17 /* prot bits */ |
| 1163 | spc = r24 /* space for which the trap occured */ | 1163 | spc = r24 /* space for which the trap occurred */ |
| 1164 | ptp = r25 /* page directory/page table pointer */ | 1164 | ptp = r25 /* page directory/page table pointer */ |
| 1165 | 1165 | ||
| 1166 | #ifdef CONFIG_64BIT | 1166 | #ifdef CONFIG_64BIT |
diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S index 4dbdf0ed6fa0..145c5e4caaa0 100644 --- a/arch/parisc/kernel/head.S +++ b/arch/parisc/kernel/head.S | |||
| @@ -131,7 +131,7 @@ $pgt_fill_loop: | |||
| 131 | ldo THREAD_SZ_ALGN(%r6),%sp | 131 | ldo THREAD_SZ_ALGN(%r6),%sp |
| 132 | 132 | ||
| 133 | #ifdef CONFIG_SMP | 133 | #ifdef CONFIG_SMP |
| 134 | /* Set the smp rendevous address into page zero. | 134 | /* Set the smp rendezvous address into page zero. |
| 135 | ** It would be safer to do this in init_smp_config() but | 135 | ** It would be safer to do this in init_smp_config() but |
| 136 | ** it's just way easier to deal with here because | 136 | ** it's just way easier to deal with here because |
| 137 | ** of 64-bit function ptrs and the address is local to this file. | 137 | ** of 64-bit function ptrs and the address is local to this file. |
diff --git a/arch/parisc/kernel/inventory.c b/arch/parisc/kernel/inventory.c index d228d8237879..08324aac3544 100644 --- a/arch/parisc/kernel/inventory.c +++ b/arch/parisc/kernel/inventory.c | |||
| @@ -93,7 +93,7 @@ void __init setup_pdc(void) | |||
| 93 | case 0x6: /* 705, 710 */ | 93 | case 0x6: /* 705, 710 */ |
| 94 | case 0x7: /* 715, 725 */ | 94 | case 0x7: /* 715, 725 */ |
| 95 | case 0x8: /* 745, 747, 742 */ | 95 | case 0x8: /* 745, 747, 742 */ |
| 96 | case 0xA: /* 712 and similiar */ | 96 | case 0xA: /* 712 and similar */ |
| 97 | case 0xC: /* 715/64, at least */ | 97 | case 0xC: /* 715/64, at least */ |
| 98 | 98 | ||
| 99 | pdc_type = PDC_TYPE_SNAKE; | 99 | pdc_type = PDC_TYPE_SNAKE; |
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index 609a331878e7..12c1ed33dc18 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c | |||
| @@ -291,7 +291,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
| 291 | DBG(1,"setup_rt_frame: frame->uc = 0x%p\n", &frame->uc); | 291 | DBG(1,"setup_rt_frame: frame->uc = 0x%p\n", &frame->uc); |
| 292 | DBG(1,"setup_rt_frame: frame->uc.uc_mcontext = 0x%p\n", &frame->uc.uc_mcontext); | 292 | DBG(1,"setup_rt_frame: frame->uc.uc_mcontext = 0x%p\n", &frame->uc.uc_mcontext); |
| 293 | err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, in_syscall); | 293 | err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, in_syscall); |
| 294 | /* FIXME: Should probably be converted aswell for the compat case */ | 294 | /* FIXME: Should probably be converted as well for the compat case */ |
| 295 | err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); | 295 | err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); |
| 296 | } | 296 | } |
| 297 | 297 | ||
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S index 68e75ce838d6..82a52b2fb13f 100644 --- a/arch/parisc/kernel/syscall.S +++ b/arch/parisc/kernel/syscall.S | |||
| @@ -605,7 +605,7 @@ cas_action: | |||
| 605 | copy %r0, %r21 | 605 | copy %r0, %r21 |
| 606 | 606 | ||
| 607 | 3: | 607 | 3: |
| 608 | /* Error occured on load or store */ | 608 | /* Error occurred on load or store */ |
| 609 | /* Free lock */ | 609 | /* Free lock */ |
| 610 | stw %r20, 0(%sr2,%r20) | 610 | stw %r20, 0(%sr2,%r20) |
| 611 | #if ENABLE_LWS_DEBUG | 611 | #if ENABLE_LWS_DEBUG |
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index 74867dfdabe5..4be85ee10b85 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | /* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and | 34 | /* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and |
| 35 | * narrow palinux. Use ENTRY_DIFF for those where a 32-bit specific | 35 | * narrow palinux. Use ENTRY_DIFF for those where a 32-bit specific |
| 36 | * implementation is required on wide palinux. Use ENTRY_COMP where | 36 | * implementation is required on wide palinux. Use ENTRY_COMP where |
| 37 | * the compatability layer has a useful 32-bit implementation. | 37 | * the compatibility layer has a useful 32-bit implementation. |
| 38 | */ | 38 | */ |
| 39 | #define ENTRY_SAME(_name_) .dword sys_##_name_ | 39 | #define ENTRY_SAME(_name_) .dword sys_##_name_ |
| 40 | #define ENTRY_DIFF(_name_) .dword sys32_##_name_ | 40 | #define ENTRY_DIFF(_name_) .dword sys32_##_name_ |
diff --git a/arch/parisc/math-emu/dfadd.c b/arch/parisc/math-emu/dfadd.c index e147d7d3b0f4..d37e2d2cb6fe 100644 --- a/arch/parisc/math-emu/dfadd.c +++ b/arch/parisc/math-emu/dfadd.c | |||
| @@ -303,7 +303,7 @@ dbl_fadd( | |||
| 303 | if(Dbl_iszero_hidden(resultp1)) | 303 | if(Dbl_iszero_hidden(resultp1)) |
| 304 | { | 304 | { |
| 305 | /* Handle normalization */ | 305 | /* Handle normalization */ |
| 306 | /* A straight foward algorithm would now shift the result | 306 | /* A straight forward algorithm would now shift the result |
| 307 | * and extension left until the hidden bit becomes one. Not | 307 | * and extension left until the hidden bit becomes one. Not |
| 308 | * all of the extension bits need participate in the shift. | 308 | * all of the extension bits need participate in the shift. |
| 309 | * Only the two most significant bits (round and guard) are | 309 | * Only the two most significant bits (round and guard) are |
diff --git a/arch/parisc/math-emu/dfsub.c b/arch/parisc/math-emu/dfsub.c index 87ebc60d465b..2e8b5a79bff7 100644 --- a/arch/parisc/math-emu/dfsub.c +++ b/arch/parisc/math-emu/dfsub.c | |||
| @@ -306,7 +306,7 @@ dbl_fsub( | |||
| 306 | if(Dbl_iszero_hidden(resultp1)) | 306 | if(Dbl_iszero_hidden(resultp1)) |
| 307 | { | 307 | { |
| 308 | /* Handle normalization */ | 308 | /* Handle normalization */ |
| 309 | /* A straight foward algorithm would now shift the result | 309 | /* A straight forward algorithm would now shift the result |
| 310 | * and extension left until the hidden bit becomes one. Not | 310 | * and extension left until the hidden bit becomes one. Not |
| 311 | * all of the extension bits need participate in the shift. | 311 | * all of the extension bits need participate in the shift. |
| 312 | * Only the two most significant bits (round and guard) are | 312 | * Only the two most significant bits (round and guard) are |
diff --git a/arch/parisc/math-emu/fmpyfadd.c b/arch/parisc/math-emu/fmpyfadd.c index 5dd7f93a89be..b067c45c872d 100644 --- a/arch/parisc/math-emu/fmpyfadd.c +++ b/arch/parisc/math-emu/fmpyfadd.c | |||
| @@ -531,7 +531,7 @@ dbl_fmpyfadd( | |||
| 531 | sign_save = Dbl_signextendedsign(resultp1); | 531 | sign_save = Dbl_signextendedsign(resultp1); |
| 532 | if (Dbl_iszero_hidden(resultp1)) { | 532 | if (Dbl_iszero_hidden(resultp1)) { |
| 533 | /* Handle normalization */ | 533 | /* Handle normalization */ |
| 534 | /* A straight foward algorithm would now shift the | 534 | /* A straightforward algorithm would now shift the |
| 535 | * result and extension left until the hidden bit | 535 | * result and extension left until the hidden bit |
| 536 | * becomes one. Not all of the extension bits need | 536 | * becomes one. Not all of the extension bits need |
| 537 | * participate in the shift. Only the two most | 537 | * participate in the shift. Only the two most |
| @@ -1191,7 +1191,7 @@ unsigned int *status; | |||
| 1191 | sign_save = Dbl_signextendedsign(resultp1); | 1191 | sign_save = Dbl_signextendedsign(resultp1); |
| 1192 | if (Dbl_iszero_hidden(resultp1)) { | 1192 | if (Dbl_iszero_hidden(resultp1)) { |
| 1193 | /* Handle normalization */ | 1193 | /* Handle normalization */ |
| 1194 | /* A straight foward algorithm would now shift the | 1194 | /* A straightforward algorithm would now shift the |
| 1195 | * result and extension left until the hidden bit | 1195 | * result and extension left until the hidden bit |
| 1196 | * becomes one. Not all of the extension bits need | 1196 | * becomes one. Not all of the extension bits need |
| 1197 | * participate in the shift. Only the two most | 1197 | * participate in the shift. Only the two most |
| @@ -1841,7 +1841,7 @@ unsigned int *status; | |||
| 1841 | sign_save = Sgl_signextendedsign(resultp1); | 1841 | sign_save = Sgl_signextendedsign(resultp1); |
| 1842 | if (Sgl_iszero_hidden(resultp1)) { | 1842 | if (Sgl_iszero_hidden(resultp1)) { |
| 1843 | /* Handle normalization */ | 1843 | /* Handle normalization */ |
| 1844 | /* A straight foward algorithm would now shift the | 1844 | /* A straightforward algorithm would now shift the |
| 1845 | * result and extension left until the hidden bit | 1845 | * result and extension left until the hidden bit |
| 1846 | * becomes one. Not all of the extension bits need | 1846 | * becomes one. Not all of the extension bits need |
| 1847 | * participate in the shift. Only the two most | 1847 | * participate in the shift. Only the two most |
| @@ -2483,7 +2483,7 @@ unsigned int *status; | |||
| 2483 | sign_save = Sgl_signextendedsign(resultp1); | 2483 | sign_save = Sgl_signextendedsign(resultp1); |
| 2484 | if (Sgl_iszero_hidden(resultp1)) { | 2484 | if (Sgl_iszero_hidden(resultp1)) { |
| 2485 | /* Handle normalization */ | 2485 | /* Handle normalization */ |
| 2486 | /* A straight foward algorithm would now shift the | 2486 | /* A straightforward algorithm would now shift the |
| 2487 | * result and extension left until the hidden bit | 2487 | * result and extension left until the hidden bit |
| 2488 | * becomes one. Not all of the extension bits need | 2488 | * becomes one. Not all of the extension bits need |
| 2489 | * participate in the shift. Only the two most | 2489 | * participate in the shift. Only the two most |
diff --git a/arch/parisc/math-emu/sfadd.c b/arch/parisc/math-emu/sfadd.c index 008d721b5d22..f802cd6c7869 100644 --- a/arch/parisc/math-emu/sfadd.c +++ b/arch/parisc/math-emu/sfadd.c | |||
| @@ -298,7 +298,7 @@ sgl_fadd( | |||
| 298 | if(Sgl_iszero_hidden(result)) | 298 | if(Sgl_iszero_hidden(result)) |
| 299 | { | 299 | { |
| 300 | /* Handle normalization */ | 300 | /* Handle normalization */ |
| 301 | /* A straight foward algorithm would now shift the result | 301 | /* A straightforward algorithm would now shift the result |
| 302 | * and extension left until the hidden bit becomes one. Not | 302 | * and extension left until the hidden bit becomes one. Not |
| 303 | * all of the extension bits need participate in the shift. | 303 | * all of the extension bits need participate in the shift. |
| 304 | * Only the two most significant bits (round and guard) are | 304 | * Only the two most significant bits (round and guard) are |
diff --git a/arch/parisc/math-emu/sfsub.c b/arch/parisc/math-emu/sfsub.c index 24eef61c8e3b..5f90d0f31a52 100644 --- a/arch/parisc/math-emu/sfsub.c +++ b/arch/parisc/math-emu/sfsub.c | |||
| @@ -301,7 +301,7 @@ sgl_fsub( | |||
| 301 | if(Sgl_iszero_hidden(result)) | 301 | if(Sgl_iszero_hidden(result)) |
| 302 | { | 302 | { |
| 303 | /* Handle normalization */ | 303 | /* Handle normalization */ |
| 304 | /* A straight foward algorithm would now shift the result | 304 | /* A straightforward algorithm would now shift the result |
| 305 | * and extension left until the hidden bit becomes one. Not | 305 | * and extension left until the hidden bit becomes one. Not |
| 306 | * all of the extension bits need participate in the shift. | 306 | * all of the extension bits need participate in the shift. |
| 307 | * Only the two most significant bits (round and guard) are | 307 | * Only the two most significant bits (round and guard) are |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index d0e8a1dbf822..8f4d50b0adfa 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
| @@ -138,7 +138,6 @@ config PPC | |||
| 138 | select HAVE_GENERIC_HARDIRQS | 138 | select HAVE_GENERIC_HARDIRQS |
| 139 | select HAVE_SPARSE_IRQ | 139 | select HAVE_SPARSE_IRQ |
| 140 | select IRQ_PER_CPU | 140 | select IRQ_PER_CPU |
| 141 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
| 142 | select GENERIC_IRQ_SHOW | 141 | select GENERIC_IRQ_SHOW |
| 143 | select GENERIC_IRQ_SHOW_LEVEL | 142 | select GENERIC_IRQ_SHOW_LEVEL |
| 144 | 143 | ||
| @@ -210,7 +209,7 @@ config ARCH_HIBERNATION_POSSIBLE | |||
| 210 | config ARCH_SUSPEND_POSSIBLE | 209 | config ARCH_SUSPEND_POSSIBLE |
| 211 | def_bool y | 210 | def_bool y |
| 212 | depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \ | 211 | depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \ |
| 213 | PPC_85xx || PPC_86xx || PPC_PSERIES || 44x || 40x | 212 | (PPC_85xx && !SMP) || PPC_86xx || PPC_PSERIES || 44x || 40x |
| 214 | 213 | ||
| 215 | config PPC_DCR_NATIVE | 214 | config PPC_DCR_NATIVE |
| 216 | bool | 215 | bool |
diff --git a/arch/powerpc/boot/dts/p1020rdb.dts b/arch/powerpc/boot/dts/p1020rdb.dts index 22f64b62d7f6..e0668f877794 100644 --- a/arch/powerpc/boot/dts/p1020rdb.dts +++ b/arch/powerpc/boot/dts/p1020rdb.dts | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * P1020 RDB Device Tree Source | 2 | * P1020 RDB Device Tree Source |
| 3 | * | 3 | * |
| 4 | * Copyright 2009 Freescale Semiconductor Inc. | 4 | * Copyright 2009-2011 Freescale Semiconductor Inc. |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
| @@ -553,7 +553,7 @@ | |||
| 553 | reg = <0 0xffe09000 0 0x1000>; | 553 | reg = <0 0xffe09000 0 0x1000>; |
| 554 | bus-range = <0 255>; | 554 | bus-range = <0 255>; |
| 555 | ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 | 555 | ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 |
| 556 | 0x1000000 0x0 0x00000000 0 0xffc30000 0x0 0x10000>; | 556 | 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; |
| 557 | clock-frequency = <33333333>; | 557 | clock-frequency = <33333333>; |
| 558 | interrupt-parent = <&mpic>; | 558 | interrupt-parent = <&mpic>; |
| 559 | interrupts = <16 2>; | 559 | interrupts = <16 2>; |
| @@ -580,8 +580,8 @@ | |||
| 580 | #address-cells = <3>; | 580 | #address-cells = <3>; |
| 581 | reg = <0 0xffe0a000 0 0x1000>; | 581 | reg = <0 0xffe0a000 0 0x1000>; |
| 582 | bus-range = <0 255>; | 582 | bus-range = <0 255>; |
| 583 | ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000 | 583 | ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 |
| 584 | 0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>; | 584 | 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; |
| 585 | clock-frequency = <33333333>; | 585 | clock-frequency = <33333333>; |
| 586 | interrupt-parent = <&mpic>; | 586 | interrupt-parent = <&mpic>; |
| 587 | interrupts = <16 2>; | 587 | interrupts = <16 2>; |
| @@ -590,8 +590,8 @@ | |||
| 590 | #size-cells = <2>; | 590 | #size-cells = <2>; |
| 591 | #address-cells = <3>; | 591 | #address-cells = <3>; |
| 592 | device_type = "pci"; | 592 | device_type = "pci"; |
| 593 | ranges = <0x2000000 0x0 0xc0000000 | 593 | ranges = <0x2000000 0x0 0x80000000 |
| 594 | 0x2000000 0x0 0xc0000000 | 594 | 0x2000000 0x0 0x80000000 |
| 595 | 0x0 0x20000000 | 595 | 0x0 0x20000000 |
| 596 | 596 | ||
| 597 | 0x1000000 0x0 0x0 | 597 | 0x1000000 0x0 0x0 |
diff --git a/arch/powerpc/boot/dts/p2020rdb.dts b/arch/powerpc/boot/dts/p2020rdb.dts index da4cb0d8d215..e2d48fd4416e 100644 --- a/arch/powerpc/boot/dts/p2020rdb.dts +++ b/arch/powerpc/boot/dts/p2020rdb.dts | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * P2020 RDB Device Tree Source | 2 | * P2020 RDB Device Tree Source |
| 3 | * | 3 | * |
| 4 | * Copyright 2009 Freescale Semiconductor Inc. | 4 | * Copyright 2009-2011 Freescale Semiconductor Inc. |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
| @@ -537,7 +537,7 @@ | |||
| 537 | reg = <0 0xffe09000 0 0x1000>; | 537 | reg = <0 0xffe09000 0 0x1000>; |
| 538 | bus-range = <0 255>; | 538 | bus-range = <0 255>; |
| 539 | ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 | 539 | ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 |
| 540 | 0x1000000 0x0 0x00000000 0 0xffc30000 0x0 0x10000>; | 540 | 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; |
| 541 | clock-frequency = <33333333>; | 541 | clock-frequency = <33333333>; |
| 542 | interrupt-parent = <&mpic>; | 542 | interrupt-parent = <&mpic>; |
| 543 | interrupts = <25 2>; | 543 | interrupts = <25 2>; |
| @@ -564,8 +564,8 @@ | |||
| 564 | #address-cells = <3>; | 564 | #address-cells = <3>; |
| 565 | reg = <0 0xffe0a000 0 0x1000>; | 565 | reg = <0 0xffe0a000 0 0x1000>; |
| 566 | bus-range = <0 255>; | 566 | bus-range = <0 255>; |
| 567 | ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000 | 567 | ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 |
| 568 | 0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>; | 568 | 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; |
| 569 | clock-frequency = <33333333>; | 569 | clock-frequency = <33333333>; |
| 570 | interrupt-parent = <&mpic>; | 570 | interrupt-parent = <&mpic>; |
| 571 | interrupts = <26 2>; | 571 | interrupts = <26 2>; |
| @@ -574,8 +574,8 @@ | |||
| 574 | #size-cells = <2>; | 574 | #size-cells = <2>; |
| 575 | #address-cells = <3>; | 575 | #address-cells = <3>; |
| 576 | device_type = "pci"; | 576 | device_type = "pci"; |
| 577 | ranges = <0x2000000 0x0 0xc0000000 | 577 | ranges = <0x2000000 0x0 0x80000000 |
| 578 | 0x2000000 0x0 0xc0000000 | 578 | 0x2000000 0x0 0x80000000 |
| 579 | 0x0 0x20000000 | 579 | 0x0 0x20000000 |
| 580 | 580 | ||
| 581 | 0x1000000 0x0 0x0 | 581 | 0x1000000 0x0 0x0 |
diff --git a/arch/powerpc/boot/dts/p2020rdb_camp_core0.dts b/arch/powerpc/boot/dts/p2020rdb_camp_core0.dts index 0fe93d0c8b2e..b69c3a5dc858 100644 --- a/arch/powerpc/boot/dts/p2020rdb_camp_core0.dts +++ b/arch/powerpc/boot/dts/p2020rdb_camp_core0.dts | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * This dts file allows core0 to have memory, l2, i2c, spi, gpio, dma1, usb, | 6 | * This dts file allows core0 to have memory, l2, i2c, spi, gpio, dma1, usb, |
| 7 | * eth1, eth2, sdhc, crypto, global-util, pci0. | 7 | * eth1, eth2, sdhc, crypto, global-util, pci0. |
| 8 | * | 8 | * |
| 9 | * Copyright 2009 Freescale Semiconductor Inc. | 9 | * Copyright 2009-2011 Freescale Semiconductor Inc. |
| 10 | * | 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify it | 11 | * This program is free software; you can redistribute it and/or modify it |
| 12 | * under the terms of the GNU General Public License as published by the | 12 | * under the terms of the GNU General Public License as published by the |
| @@ -342,7 +342,7 @@ | |||
| 342 | reg = <0 0xffe09000 0 0x1000>; | 342 | reg = <0 0xffe09000 0 0x1000>; |
| 343 | bus-range = <0 255>; | 343 | bus-range = <0 255>; |
| 344 | ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 | 344 | ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 |
| 345 | 0x1000000 0x0 0x00000000 0 0xffc30000 0x0 0x10000>; | 345 | 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; |
| 346 | clock-frequency = <33333333>; | 346 | clock-frequency = <33333333>; |
| 347 | interrupt-parent = <&mpic>; | 347 | interrupt-parent = <&mpic>; |
| 348 | interrupts = <25 2>; | 348 | interrupts = <25 2>; |
diff --git a/arch/powerpc/boot/dts/p2020rdb_camp_core1.dts b/arch/powerpc/boot/dts/p2020rdb_camp_core1.dts index e95a51285328..7a31d46c01b0 100644 --- a/arch/powerpc/boot/dts/p2020rdb_camp_core1.dts +++ b/arch/powerpc/boot/dts/p2020rdb_camp_core1.dts | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * | 7 | * |
| 8 | * Please note to add "-b 1" for core1's dts compiling. | 8 | * Please note to add "-b 1" for core1's dts compiling. |
| 9 | * | 9 | * |
| 10 | * Copyright 2009 Freescale Semiconductor Inc. | 10 | * Copyright 2009-2011 Freescale Semiconductor Inc. |
| 11 | * | 11 | * |
| 12 | * This program is free software; you can redistribute it and/or modify it | 12 | * This program is free software; you can redistribute it and/or modify it |
| 13 | * under the terms of the GNU General Public License as published by the | 13 | * under the terms of the GNU General Public License as published by the |
| @@ -162,8 +162,8 @@ | |||
| 162 | #address-cells = <3>; | 162 | #address-cells = <3>; |
| 163 | reg = <0 0xffe0a000 0 0x1000>; | 163 | reg = <0 0xffe0a000 0 0x1000>; |
| 164 | bus-range = <0 255>; | 164 | bus-range = <0 255>; |
| 165 | ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000 | 165 | ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 |
| 166 | 0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>; | 166 | 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; |
| 167 | clock-frequency = <33333333>; | 167 | clock-frequency = <33333333>; |
| 168 | interrupt-parent = <&mpic>; | 168 | interrupt-parent = <&mpic>; |
| 169 | interrupts = <26 2>; | 169 | interrupts = <26 2>; |
| @@ -172,8 +172,8 @@ | |||
| 172 | #size-cells = <2>; | 172 | #size-cells = <2>; |
| 173 | #address-cells = <3>; | 173 | #address-cells = <3>; |
| 174 | device_type = "pci"; | 174 | device_type = "pci"; |
| 175 | ranges = <0x2000000 0x0 0xc0000000 | 175 | ranges = <0x2000000 0x0 0x80000000 |
| 176 | 0x2000000 0x0 0xc0000000 | 176 | 0x2000000 0x0 0x80000000 |
| 177 | 0x0 0x20000000 | 177 | 0x0 0x20000000 |
| 178 | 178 | ||
| 179 | 0x1000000 0x0 0x0 | 179 | 0x1000000 0x0 0x0 |
diff --git a/arch/powerpc/configs/44x/warp_defconfig b/arch/powerpc/configs/44x/warp_defconfig index 6cf9d6614805..abf74dc1f79c 100644 --- a/arch/powerpc/configs/44x/warp_defconfig +++ b/arch/powerpc/configs/44x/warp_defconfig | |||
| @@ -47,6 +47,7 @@ CONFIG_MTD_NAND_NDFC=y | |||
| 47 | CONFIG_MTD_UBI=y | 47 | CONFIG_MTD_UBI=y |
| 48 | CONFIG_PROC_DEVICETREE=y | 48 | CONFIG_PROC_DEVICETREE=y |
| 49 | CONFIG_BLK_DEV_RAM=y | 49 | CONFIG_BLK_DEV_RAM=y |
| 50 | CONFIG_MISC_DEVICES=y | ||
| 50 | CONFIG_EEPROM_AT24=y | 51 | CONFIG_EEPROM_AT24=y |
| 51 | CONFIG_SCSI=y | 52 | CONFIG_SCSI=y |
| 52 | CONFIG_BLK_DEV_SD=y | 53 | CONFIG_BLK_DEV_SD=y |
diff --git a/arch/powerpc/configs/52xx/motionpro_defconfig b/arch/powerpc/configs/52xx/motionpro_defconfig index 6828eda02bdc..0c7de9620ea6 100644 --- a/arch/powerpc/configs/52xx/motionpro_defconfig +++ b/arch/powerpc/configs/52xx/motionpro_defconfig | |||
| @@ -43,6 +43,7 @@ CONFIG_PROC_DEVICETREE=y | |||
| 43 | CONFIG_BLK_DEV_LOOP=y | 43 | CONFIG_BLK_DEV_LOOP=y |
| 44 | CONFIG_BLK_DEV_RAM=y | 44 | CONFIG_BLK_DEV_RAM=y |
| 45 | CONFIG_BLK_DEV_RAM_SIZE=32768 | 45 | CONFIG_BLK_DEV_RAM_SIZE=32768 |
| 46 | CONFIG_MISC_DEVICES=y | ||
| 46 | CONFIG_EEPROM_LEGACY=y | 47 | CONFIG_EEPROM_LEGACY=y |
| 47 | CONFIG_SCSI_TGT=y | 48 | CONFIG_SCSI_TGT=y |
| 48 | CONFIG_BLK_DEV_SD=y | 49 | CONFIG_BLK_DEV_SD=y |
diff --git a/arch/powerpc/configs/86xx/gef_ppc9a_defconfig b/arch/powerpc/configs/86xx/gef_ppc9a_defconfig index 4b2441244eab..d41857a5152d 100644 --- a/arch/powerpc/configs/86xx/gef_ppc9a_defconfig +++ b/arch/powerpc/configs/86xx/gef_ppc9a_defconfig | |||
| @@ -85,6 +85,7 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m | |||
| 85 | CONFIG_BLK_DEV_NBD=m | 85 | CONFIG_BLK_DEV_NBD=m |
| 86 | CONFIG_BLK_DEV_RAM=y | 86 | CONFIG_BLK_DEV_RAM=y |
| 87 | CONFIG_BLK_DEV_RAM_SIZE=131072 | 87 | CONFIG_BLK_DEV_RAM_SIZE=131072 |
| 88 | CONFIG_MISC_DEVICES=y | ||
| 88 | CONFIG_DS1682=y | 89 | CONFIG_DS1682=y |
| 89 | CONFIG_IDE=y | 90 | CONFIG_IDE=y |
| 90 | CONFIG_BLK_DEV_IDECS=y | 91 | CONFIG_BLK_DEV_IDECS=y |
diff --git a/arch/powerpc/configs/86xx/gef_sbc310_defconfig b/arch/powerpc/configs/86xx/gef_sbc310_defconfig index a360ba44b928..38303ec11bcd 100644 --- a/arch/powerpc/configs/86xx/gef_sbc310_defconfig +++ b/arch/powerpc/configs/86xx/gef_sbc310_defconfig | |||
| @@ -85,6 +85,7 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m | |||
| 85 | CONFIG_BLK_DEV_NBD=m | 85 | CONFIG_BLK_DEV_NBD=m |
| 86 | CONFIG_BLK_DEV_RAM=y | 86 | CONFIG_BLK_DEV_RAM=y |
| 87 | CONFIG_BLK_DEV_RAM_SIZE=131072 | 87 | CONFIG_BLK_DEV_RAM_SIZE=131072 |
| 88 | CONFIG_MISC_DEVICES=y | ||
| 88 | CONFIG_DS1682=y | 89 | CONFIG_DS1682=y |
| 89 | CONFIG_IDE=y | 90 | CONFIG_IDE=y |
| 90 | CONFIG_BLK_DEV_IDECS=y | 91 | CONFIG_BLK_DEV_IDECS=y |
diff --git a/arch/powerpc/configs/86xx/gef_sbc610_defconfig b/arch/powerpc/configs/86xx/gef_sbc610_defconfig index be2829dd129f..98533973d20f 100644 --- a/arch/powerpc/configs/86xx/gef_sbc610_defconfig +++ b/arch/powerpc/configs/86xx/gef_sbc610_defconfig | |||
| @@ -138,6 +138,7 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m | |||
| 138 | CONFIG_BLK_DEV_NBD=m | 138 | CONFIG_BLK_DEV_NBD=m |
| 139 | CONFIG_BLK_DEV_RAM=y | 139 | CONFIG_BLK_DEV_RAM=y |
| 140 | CONFIG_BLK_DEV_RAM_SIZE=131072 | 140 | CONFIG_BLK_DEV_RAM_SIZE=131072 |
| 141 | CONFIG_MISC_DEVICES=y | ||
| 141 | CONFIG_DS1682=y | 142 | CONFIG_DS1682=y |
| 142 | CONFIG_BLK_DEV_SD=y | 143 | CONFIG_BLK_DEV_SD=y |
| 143 | CONFIG_CHR_DEV_ST=y | 144 | CONFIG_CHR_DEV_ST=y |
diff --git a/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig b/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig index 0c9c7ed7ec75..b614508d6fd2 100644 --- a/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig +++ b/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig | |||
| @@ -63,6 +63,7 @@ CONFIG_BLK_DEV_LOOP=y | |||
| 63 | CONFIG_BLK_DEV_NBD=y | 63 | CONFIG_BLK_DEV_NBD=y |
| 64 | CONFIG_BLK_DEV_RAM=y | 64 | CONFIG_BLK_DEV_RAM=y |
| 65 | CONFIG_BLK_DEV_RAM_SIZE=131072 | 65 | CONFIG_BLK_DEV_RAM_SIZE=131072 |
| 66 | CONFIG_MISC_DEVICES=y | ||
| 66 | CONFIG_EEPROM_LEGACY=y | 67 | CONFIG_EEPROM_LEGACY=y |
| 67 | CONFIG_BLK_DEV_SD=y | 68 | CONFIG_BLK_DEV_SD=y |
| 68 | CONFIG_CHR_DEV_ST=y | 69 | CONFIG_CHR_DEV_ST=y |
diff --git a/arch/powerpc/configs/e55xx_smp_defconfig b/arch/powerpc/configs/e55xx_smp_defconfig index 06f95492afc7..9fa1613e5e2b 100644 --- a/arch/powerpc/configs/e55xx_smp_defconfig +++ b/arch/powerpc/configs/e55xx_smp_defconfig | |||
| @@ -32,6 +32,7 @@ CONFIG_PROC_DEVICETREE=y | |||
| 32 | CONFIG_BLK_DEV_LOOP=y | 32 | CONFIG_BLK_DEV_LOOP=y |
| 33 | CONFIG_BLK_DEV_RAM=y | 33 | CONFIG_BLK_DEV_RAM=y |
| 34 | CONFIG_BLK_DEV_RAM_SIZE=131072 | 34 | CONFIG_BLK_DEV_RAM_SIZE=131072 |
| 35 | CONFIG_MISC_DEVICES=y | ||
| 35 | CONFIG_EEPROM_LEGACY=y | 36 | CONFIG_EEPROM_LEGACY=y |
| 36 | CONFIG_INPUT_FF_MEMLESS=m | 37 | CONFIG_INPUT_FF_MEMLESS=m |
| 37 | # CONFIG_INPUT_MOUSEDEV is not set | 38 | # CONFIG_INPUT_MOUSEDEV is not set |
diff --git a/arch/powerpc/configs/linkstation_defconfig b/arch/powerpc/configs/linkstation_defconfig index f39d0cf876dd..8a874b999867 100644 --- a/arch/powerpc/configs/linkstation_defconfig +++ b/arch/powerpc/configs/linkstation_defconfig | |||
| @@ -78,6 +78,7 @@ CONFIG_BLK_DEV_LOOP=y | |||
| 78 | CONFIG_BLK_DEV_RAM=y | 78 | CONFIG_BLK_DEV_RAM=y |
| 79 | CONFIG_BLK_DEV_RAM_COUNT=2 | 79 | CONFIG_BLK_DEV_RAM_COUNT=2 |
| 80 | CONFIG_BLK_DEV_RAM_SIZE=8192 | 80 | CONFIG_BLK_DEV_RAM_SIZE=8192 |
| 81 | CONFIG_MISC_DEVICES=y | ||
| 81 | CONFIG_EEPROM_LEGACY=m | 82 | CONFIG_EEPROM_LEGACY=m |
| 82 | CONFIG_BLK_DEV_SD=y | 83 | CONFIG_BLK_DEV_SD=y |
| 83 | CONFIG_CHR_DEV_SG=y | 84 | CONFIG_CHR_DEV_SG=y |
diff --git a/arch/powerpc/configs/mpc512x_defconfig b/arch/powerpc/configs/mpc512x_defconfig index 62db8a3df162..c02bbb2fddf8 100644 --- a/arch/powerpc/configs/mpc512x_defconfig +++ b/arch/powerpc/configs/mpc512x_defconfig | |||
| @@ -61,6 +61,7 @@ CONFIG_BLK_DEV_RAM=y | |||
| 61 | CONFIG_BLK_DEV_RAM_COUNT=1 | 61 | CONFIG_BLK_DEV_RAM_COUNT=1 |
| 62 | CONFIG_BLK_DEV_RAM_SIZE=8192 | 62 | CONFIG_BLK_DEV_RAM_SIZE=8192 |
| 63 | CONFIG_BLK_DEV_XIP=y | 63 | CONFIG_BLK_DEV_XIP=y |
| 64 | CONFIG_MISC_DEVICES=y | ||
| 64 | CONFIG_EEPROM_AT24=y | 65 | CONFIG_EEPROM_AT24=y |
| 65 | CONFIG_SCSI=y | 66 | CONFIG_SCSI=y |
| 66 | # CONFIG_SCSI_PROC_FS is not set | 67 | # CONFIG_SCSI_PROC_FS is not set |
diff --git a/arch/powerpc/configs/mpc5200_defconfig b/arch/powerpc/configs/mpc5200_defconfig index 7376e27b8ed4..e63f537b854a 100644 --- a/arch/powerpc/configs/mpc5200_defconfig +++ b/arch/powerpc/configs/mpc5200_defconfig | |||
| @@ -52,6 +52,7 @@ CONFIG_PROC_DEVICETREE=y | |||
| 52 | CONFIG_BLK_DEV_LOOP=y | 52 | CONFIG_BLK_DEV_LOOP=y |
| 53 | CONFIG_BLK_DEV_RAM=y | 53 | CONFIG_BLK_DEV_RAM=y |
| 54 | CONFIG_BLK_DEV_RAM_SIZE=32768 | 54 | CONFIG_BLK_DEV_RAM_SIZE=32768 |
| 55 | CONFIG_MISC_DEVICES=y | ||
| 55 | CONFIG_EEPROM_AT24=y | 56 | CONFIG_EEPROM_AT24=y |
| 56 | CONFIG_SCSI_TGT=y | 57 | CONFIG_SCSI_TGT=y |
| 57 | CONFIG_BLK_DEV_SD=y | 58 | CONFIG_BLK_DEV_SD=y |
diff --git a/arch/powerpc/configs/mpc85xx_defconfig b/arch/powerpc/configs/mpc85xx_defconfig index 99a19d1e9bf8..c06a86c33098 100644 --- a/arch/powerpc/configs/mpc85xx_defconfig +++ b/arch/powerpc/configs/mpc85xx_defconfig | |||
| @@ -82,6 +82,7 @@ CONFIG_BLK_DEV_LOOP=y | |||
| 82 | CONFIG_BLK_DEV_NBD=y | 82 | CONFIG_BLK_DEV_NBD=y |
| 83 | CONFIG_BLK_DEV_RAM=y | 83 | CONFIG_BLK_DEV_RAM=y |
| 84 | CONFIG_BLK_DEV_RAM_SIZE=131072 | 84 | CONFIG_BLK_DEV_RAM_SIZE=131072 |
| 85 | CONFIG_MISC_DEVICES=y | ||
| 85 | CONFIG_EEPROM_LEGACY=y | 86 | CONFIG_EEPROM_LEGACY=y |
| 86 | CONFIG_BLK_DEV_SD=y | 87 | CONFIG_BLK_DEV_SD=y |
| 87 | CONFIG_CHR_DEV_ST=y | 88 | CONFIG_CHR_DEV_ST=y |
diff --git a/arch/powerpc/configs/mpc85xx_smp_defconfig b/arch/powerpc/configs/mpc85xx_smp_defconfig index c636f23f8c92..942ced90557c 100644 --- a/arch/powerpc/configs/mpc85xx_smp_defconfig +++ b/arch/powerpc/configs/mpc85xx_smp_defconfig | |||
| @@ -84,6 +84,7 @@ CONFIG_BLK_DEV_LOOP=y | |||
| 84 | CONFIG_BLK_DEV_NBD=y | 84 | CONFIG_BLK_DEV_NBD=y |
| 85 | CONFIG_BLK_DEV_RAM=y | 85 | CONFIG_BLK_DEV_RAM=y |
| 86 | CONFIG_BLK_DEV_RAM_SIZE=131072 | 86 | CONFIG_BLK_DEV_RAM_SIZE=131072 |
| 87 | CONFIG_MISC_DEVICES=y | ||
| 87 | CONFIG_EEPROM_LEGACY=y | 88 | CONFIG_EEPROM_LEGACY=y |
| 88 | CONFIG_BLK_DEV_SD=y | 89 | CONFIG_BLK_DEV_SD=y |
| 89 | CONFIG_CHR_DEV_ST=y | 90 | CONFIG_CHR_DEV_ST=y |
diff --git a/arch/powerpc/configs/mpc86xx_defconfig b/arch/powerpc/configs/mpc86xx_defconfig index 55b54318fef6..038a308cbfc4 100644 --- a/arch/powerpc/configs/mpc86xx_defconfig +++ b/arch/powerpc/configs/mpc86xx_defconfig | |||
| @@ -66,6 +66,7 @@ CONFIG_BLK_DEV_LOOP=y | |||
| 66 | CONFIG_BLK_DEV_NBD=y | 66 | CONFIG_BLK_DEV_NBD=y |
| 67 | CONFIG_BLK_DEV_RAM=y | 67 | CONFIG_BLK_DEV_RAM=y |
| 68 | CONFIG_BLK_DEV_RAM_SIZE=131072 | 68 | CONFIG_BLK_DEV_RAM_SIZE=131072 |
| 69 | CONFIG_MISC_DEVICES=y | ||
| 69 | CONFIG_EEPROM_LEGACY=y | 70 | CONFIG_EEPROM_LEGACY=y |
| 70 | CONFIG_BLK_DEV_SD=y | 71 | CONFIG_BLK_DEV_SD=y |
| 71 | CONFIG_CHR_DEV_ST=y | 72 | CONFIG_CHR_DEV_ST=y |
diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig index edd2d54c8196..f4deb0b78cf0 100644 --- a/arch/powerpc/configs/pasemi_defconfig +++ b/arch/powerpc/configs/pasemi_defconfig | |||
| @@ -59,6 +59,7 @@ CONFIG_PROC_DEVICETREE=y | |||
| 59 | CONFIG_BLK_DEV_LOOP=y | 59 | CONFIG_BLK_DEV_LOOP=y |
| 60 | CONFIG_BLK_DEV_RAM=y | 60 | CONFIG_BLK_DEV_RAM=y |
| 61 | CONFIG_BLK_DEV_RAM_SIZE=16384 | 61 | CONFIG_BLK_DEV_RAM_SIZE=16384 |
| 62 | CONFIG_MISC_DEVICES=y | ||
| 62 | CONFIG_EEPROM_LEGACY=y | 63 | CONFIG_EEPROM_LEGACY=y |
| 63 | CONFIG_IDE=y | 64 | CONFIG_IDE=y |
| 64 | CONFIG_BLK_DEV_IDECD=y | 65 | CONFIG_BLK_DEV_IDECD=y |
diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/ppc6xx_defconfig index 9d64a6822d86..0a10fb009ef7 100644 --- a/arch/powerpc/configs/ppc6xx_defconfig +++ b/arch/powerpc/configs/ppc6xx_defconfig | |||
| @@ -398,6 +398,7 @@ CONFIG_BLK_DEV_RAM_SIZE=16384 | |||
| 398 | CONFIG_CDROM_PKTCDVD=m | 398 | CONFIG_CDROM_PKTCDVD=m |
| 399 | CONFIG_VIRTIO_BLK=m | 399 | CONFIG_VIRTIO_BLK=m |
| 400 | CONFIG_BLK_DEV_HD=y | 400 | CONFIG_BLK_DEV_HD=y |
| 401 | CONFIG_MISC_DEVICES=y | ||
| 401 | CONFIG_ENCLOSURE_SERVICES=m | 402 | CONFIG_ENCLOSURE_SERVICES=m |
| 402 | CONFIG_SENSORS_TSL2550=m | 403 | CONFIG_SENSORS_TSL2550=m |
| 403 | CONFIG_EEPROM_AT24=m | 404 | CONFIG_EEPROM_AT24=m |
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig index 9c3f22c6cde1..249ddd0a27cd 100644 --- a/arch/powerpc/configs/pseries_defconfig +++ b/arch/powerpc/configs/pseries_defconfig | |||
| @@ -189,6 +189,7 @@ CONFIG_TIGON3=y | |||
| 189 | CONFIG_BNX2=m | 189 | CONFIG_BNX2=m |
| 190 | CONFIG_CHELSIO_T1=m | 190 | CONFIG_CHELSIO_T1=m |
| 191 | CONFIG_CHELSIO_T3=m | 191 | CONFIG_CHELSIO_T3=m |
| 192 | CONFIG_CHELSIO_T4=m | ||
| 192 | CONFIG_EHEA=y | 193 | CONFIG_EHEA=y |
| 193 | CONFIG_IXGBE=m | 194 | CONFIG_IXGBE=m |
| 194 | CONFIG_IXGB=m | 195 | CONFIG_IXGB=m |
| @@ -255,6 +256,8 @@ CONFIG_INFINIBAND_USER_MAD=m | |||
| 255 | CONFIG_INFINIBAND_USER_ACCESS=m | 256 | CONFIG_INFINIBAND_USER_ACCESS=m |
| 256 | CONFIG_INFINIBAND_MTHCA=m | 257 | CONFIG_INFINIBAND_MTHCA=m |
| 257 | CONFIG_INFINIBAND_EHCA=m | 258 | CONFIG_INFINIBAND_EHCA=m |
| 259 | CONFIG_INFINIBAND_CXGB3=m | ||
| 260 | CONFIG_INFINIBAND_CXGB4=m | ||
| 258 | CONFIG_MLX4_INFINIBAND=m | 261 | CONFIG_MLX4_INFINIBAND=m |
| 259 | CONFIG_INFINIBAND_IPOIB=m | 262 | CONFIG_INFINIBAND_IPOIB=m |
| 260 | CONFIG_INFINIBAND_IPOIB_CM=y | 263 | CONFIG_INFINIBAND_IPOIB_CM=y |
diff --git a/arch/powerpc/include/asm/bitops.h b/arch/powerpc/include/asm/bitops.h index 2e561876fc89..f18c6d9b9510 100644 --- a/arch/powerpc/include/asm/bitops.h +++ b/arch/powerpc/include/asm/bitops.h | |||
| @@ -209,8 +209,8 @@ static __inline__ unsigned long ffz(unsigned long x) | |||
| 209 | return BITS_PER_LONG; | 209 | return BITS_PER_LONG; |
| 210 | 210 | ||
| 211 | /* | 211 | /* |
| 212 | * Calculate the bit position of the least signficant '1' bit in x | 212 | * Calculate the bit position of the least significant '1' bit in x |
| 213 | * (since x has been changed this will actually be the least signficant | 213 | * (since x has been changed this will actually be the least significant |
| 214 | * '0' bit in * the original x). Note: (x & -x) gives us a mask that | 214 | * '0' bit in * the original x). Note: (x & -x) gives us a mask that |
| 215 | * is the least significant * (RIGHT-most) 1-bit of the value in x. | 215 | * is the least significant * (RIGHT-most) 1-bit of the value in x. |
| 216 | */ | 216 | */ |
diff --git a/arch/powerpc/include/asm/compat.h b/arch/powerpc/include/asm/compat.h index 2296112e247b..91010e8f8479 100644 --- a/arch/powerpc/include/asm/compat.h +++ b/arch/powerpc/include/asm/compat.h | |||
| @@ -140,7 +140,7 @@ static inline void __user *arch_compat_alloc_user_space(long len) | |||
| 140 | unsigned long usp = regs->gpr[1]; | 140 | unsigned long usp = regs->gpr[1]; |
| 141 | 141 | ||
| 142 | /* | 142 | /* |
| 143 | * We cant access below the stack pointer in the 32bit ABI and | 143 | * We can't access below the stack pointer in the 32bit ABI and |
| 144 | * can access 288 bytes in the 64bit ABI | 144 | * can access 288 bytes in the 64bit ABI |
| 145 | */ | 145 | */ |
| 146 | if (!is_32bit_task()) | 146 | if (!is_32bit_task()) |
diff --git a/arch/powerpc/include/asm/cpm.h b/arch/powerpc/include/asm/cpm.h index e50323fe941f..4398a6cdcf53 100644 --- a/arch/powerpc/include/asm/cpm.h +++ b/arch/powerpc/include/asm/cpm.h | |||
| @@ -98,7 +98,7 @@ typedef struct cpm_buf_desc { | |||
| 98 | #define BD_SC_INTRPT (0x1000) /* Interrupt on change */ | 98 | #define BD_SC_INTRPT (0x1000) /* Interrupt on change */ |
| 99 | #define BD_SC_LAST (0x0800) /* Last buffer in frame */ | 99 | #define BD_SC_LAST (0x0800) /* Last buffer in frame */ |
| 100 | #define BD_SC_TC (0x0400) /* Transmit CRC */ | 100 | #define BD_SC_TC (0x0400) /* Transmit CRC */ |
| 101 | #define BD_SC_CM (0x0200) /* Continous mode */ | 101 | #define BD_SC_CM (0x0200) /* Continuous mode */ |
| 102 | #define BD_SC_ID (0x0100) /* Rec'd too many idles */ | 102 | #define BD_SC_ID (0x0100) /* Rec'd too many idles */ |
| 103 | #define BD_SC_P (0x0100) /* xmt preamble */ | 103 | #define BD_SC_P (0x0100) /* xmt preamble */ |
| 104 | #define BD_SC_BR (0x0020) /* Break received */ | 104 | #define BD_SC_BR (0x0020) /* Break received */ |
diff --git a/arch/powerpc/include/asm/cpm1.h b/arch/powerpc/include/asm/cpm1.h index bd07650dca56..8ee4211ca0c6 100644 --- a/arch/powerpc/include/asm/cpm1.h +++ b/arch/powerpc/include/asm/cpm1.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * | 4 | * |
| 5 | * This file contains structures and information for the communication | 5 | * This file contains structures and information for the communication |
| 6 | * processor channels. Some CPM control and status is available | 6 | * processor channels. Some CPM control and status is available |
| 7 | * throught the MPC8xx internal memory map. See immap.h for details. | 7 | * through the MPC8xx internal memory map. See immap.h for details. |
| 8 | * This file only contains what I need for the moment, not the total | 8 | * This file only contains what I need for the moment, not the total |
| 9 | * CPM capabilities. I (or someone else) will add definitions as they | 9 | * CPM capabilities. I (or someone else) will add definitions as they |
| 10 | * are needed. -- Dan | 10 | * are needed. -- Dan |
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index be3cdf9134ce..1833d1a07e79 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc/include/asm/cputable.h | |||
| @@ -382,10 +382,12 @@ extern const char *powerpc_base_platform; | |||
| 382 | #define CPU_FTRS_E500_2 (CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | \ | 382 | #define CPU_FTRS_E500_2 (CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | \ |
| 383 | CPU_FTR_SPE_COMP | CPU_FTR_MAYBE_CAN_NAP | \ | 383 | CPU_FTR_SPE_COMP | CPU_FTR_MAYBE_CAN_NAP | \ |
| 384 | CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE) | 384 | CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE) |
| 385 | #define CPU_FTRS_E500MC (CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | \ | 385 | #define CPU_FTRS_E500MC (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN | \ |
| 386 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_NODSISRALIGN | \ | ||
| 387 | CPU_FTR_L2CSR | CPU_FTR_LWSYNC | CPU_FTR_NOEXECUTE | \ | 386 | CPU_FTR_L2CSR | CPU_FTR_LWSYNC | CPU_FTR_NOEXECUTE | \ |
| 388 | CPU_FTR_DBELL) | 387 | CPU_FTR_DBELL) |
| 388 | #define CPU_FTRS_E5500 (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN | \ | ||
| 389 | CPU_FTR_L2CSR | CPU_FTR_LWSYNC | CPU_FTR_NOEXECUTE | \ | ||
| 390 | CPU_FTR_DBELL | CPU_FTR_POPCNTB | CPU_FTR_POPCNTD) | ||
| 389 | #define CPU_FTRS_GENERIC_32 (CPU_FTR_COMMON | CPU_FTR_NODSISRALIGN) | 391 | #define CPU_FTRS_GENERIC_32 (CPU_FTR_COMMON | CPU_FTR_NODSISRALIGN) |
| 390 | 392 | ||
| 391 | /* 64-bit CPUs */ | 393 | /* 64-bit CPUs */ |
| @@ -435,11 +437,15 @@ extern const char *powerpc_base_platform; | |||
| 435 | #define CPU_FTRS_COMPATIBLE (CPU_FTR_USE_TB | CPU_FTR_PPCAS_ARCH_V2) | 437 | #define CPU_FTRS_COMPATIBLE (CPU_FTR_USE_TB | CPU_FTR_PPCAS_ARCH_V2) |
| 436 | 438 | ||
| 437 | #ifdef __powerpc64__ | 439 | #ifdef __powerpc64__ |
| 440 | #ifdef CONFIG_PPC_BOOK3E | ||
| 441 | #define CPU_FTRS_POSSIBLE (CPU_FTRS_E5500) | ||
| 442 | #else | ||
| 438 | #define CPU_FTRS_POSSIBLE \ | 443 | #define CPU_FTRS_POSSIBLE \ |
| 439 | (CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 | \ | 444 | (CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 | \ |
| 440 | CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_POWER6 | \ | 445 | CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_POWER6 | \ |
| 441 | CPU_FTRS_POWER7 | CPU_FTRS_CELL | CPU_FTRS_PA6T | \ | 446 | CPU_FTRS_POWER7 | CPU_FTRS_CELL | CPU_FTRS_PA6T | \ |
| 442 | CPU_FTR_1T_SEGMENT | CPU_FTR_VSX) | 447 | CPU_FTR_1T_SEGMENT | CPU_FTR_VSX) |
| 448 | #endif | ||
| 443 | #else | 449 | #else |
| 444 | enum { | 450 | enum { |
| 445 | CPU_FTRS_POSSIBLE = | 451 | CPU_FTRS_POSSIBLE = |
| @@ -473,16 +479,21 @@ enum { | |||
| 473 | #endif | 479 | #endif |
| 474 | #ifdef CONFIG_E500 | 480 | #ifdef CONFIG_E500 |
| 475 | CPU_FTRS_E500 | CPU_FTRS_E500_2 | CPU_FTRS_E500MC | | 481 | CPU_FTRS_E500 | CPU_FTRS_E500_2 | CPU_FTRS_E500MC | |
| 482 | CPU_FTRS_E5500 | | ||
| 476 | #endif | 483 | #endif |
| 477 | 0, | 484 | 0, |
| 478 | }; | 485 | }; |
| 479 | #endif /* __powerpc64__ */ | 486 | #endif /* __powerpc64__ */ |
| 480 | 487 | ||
| 481 | #ifdef __powerpc64__ | 488 | #ifdef __powerpc64__ |
| 489 | #ifdef CONFIG_PPC_BOOK3E | ||
| 490 | #define CPU_FTRS_ALWAYS (CPU_FTRS_E5500) | ||
| 491 | #else | ||
| 482 | #define CPU_FTRS_ALWAYS \ | 492 | #define CPU_FTRS_ALWAYS \ |
| 483 | (CPU_FTRS_POWER3 & CPU_FTRS_RS64 & CPU_FTRS_POWER4 & \ | 493 | (CPU_FTRS_POWER3 & CPU_FTRS_RS64 & CPU_FTRS_POWER4 & \ |
| 484 | CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & CPU_FTRS_POWER6 & \ | 494 | CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & CPU_FTRS_POWER6 & \ |
| 485 | CPU_FTRS_POWER7 & CPU_FTRS_CELL & CPU_FTRS_PA6T & CPU_FTRS_POSSIBLE) | 495 | CPU_FTRS_POWER7 & CPU_FTRS_CELL & CPU_FTRS_PA6T & CPU_FTRS_POSSIBLE) |
| 496 | #endif | ||
| 486 | #else | 497 | #else |
| 487 | enum { | 498 | enum { |
| 488 | CPU_FTRS_ALWAYS = | 499 | CPU_FTRS_ALWAYS = |
| @@ -513,6 +524,7 @@ enum { | |||
| 513 | #endif | 524 | #endif |
| 514 | #ifdef CONFIG_E500 | 525 | #ifdef CONFIG_E500 |
| 515 | CPU_FTRS_E500 & CPU_FTRS_E500_2 & CPU_FTRS_E500MC & | 526 | CPU_FTRS_E500 & CPU_FTRS_E500_2 & CPU_FTRS_E500MC & |
| 527 | CPU_FTRS_E5500 & | ||
| 516 | #endif | 528 | #endif |
| 517 | CPU_FTRS_POSSIBLE, | 529 | CPU_FTRS_POSSIBLE, |
| 518 | }; | 530 | }; |
diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h index 6d2416a85709..dd70fac57ec8 100644 --- a/arch/powerpc/include/asm/dma-mapping.h +++ b/arch/powerpc/include/asm/dma-mapping.h | |||
| @@ -42,6 +42,7 @@ extern void __dma_free_coherent(size_t size, void *vaddr); | |||
| 42 | extern void __dma_sync(void *vaddr, size_t size, int direction); | 42 | extern void __dma_sync(void *vaddr, size_t size, int direction); |
| 43 | extern void __dma_sync_page(struct page *page, unsigned long offset, | 43 | extern void __dma_sync_page(struct page *page, unsigned long offset, |
| 44 | size_t size, int direction); | 44 | size_t size, int direction); |
| 45 | extern unsigned long __dma_get_coherent_pfn(unsigned long cpu_addr); | ||
| 45 | 46 | ||
| 46 | #else /* ! CONFIG_NOT_COHERENT_CACHE */ | 47 | #else /* ! CONFIG_NOT_COHERENT_CACHE */ |
| 47 | /* | 48 | /* |
| @@ -198,6 +199,11 @@ static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr) | |||
| 198 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | 199 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) |
| 199 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | 200 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) |
| 200 | 201 | ||
| 202 | extern int dma_mmap_coherent(struct device *, struct vm_area_struct *, | ||
| 203 | void *, dma_addr_t, size_t); | ||
| 204 | #define ARCH_HAS_DMA_MMAP_COHERENT | ||
| 205 | |||
| 206 | |||
| 201 | static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, | 207 | static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, |
| 202 | enum dma_data_direction direction) | 208 | enum dma_data_direction direction) |
| 203 | { | 209 | { |
diff --git a/arch/powerpc/include/asm/hvcall.h b/arch/powerpc/include/asm/hvcall.h index ec089acfa56b..8edec710cc6d 100644 --- a/arch/powerpc/include/asm/hvcall.h +++ b/arch/powerpc/include/asm/hvcall.h | |||
| @@ -122,7 +122,7 @@ | |||
| 122 | #define H_DABRX_KERNEL (1UL<<(63-62)) | 122 | #define H_DABRX_KERNEL (1UL<<(63-62)) |
| 123 | #define H_DABRX_USER (1UL<<(63-63)) | 123 | #define H_DABRX_USER (1UL<<(63-63)) |
| 124 | 124 | ||
| 125 | /* Each control block has to be on a 4K bondary */ | 125 | /* Each control block has to be on a 4K boundary */ |
| 126 | #define H_CB_ALIGNMENT 4096 | 126 | #define H_CB_ALIGNMENT 4096 |
| 127 | 127 | ||
| 128 | /* pSeries hypervisor opcodes */ | 128 | /* pSeries hypervisor opcodes */ |
diff --git a/arch/powerpc/include/asm/kprobes.h b/arch/powerpc/include/asm/kprobes.h index d0e7701fa1f6..be0171afdc0f 100644 --- a/arch/powerpc/include/asm/kprobes.h +++ b/arch/powerpc/include/asm/kprobes.h | |||
| @@ -50,7 +50,7 @@ typedef unsigned int kprobe_opcode_t; | |||
| 50 | * Handle cases where: | 50 | * Handle cases where: |
| 51 | * - User passes a <.symbol> or <module:.symbol> | 51 | * - User passes a <.symbol> or <module:.symbol> |
| 52 | * - User passes a <symbol> or <module:symbol> | 52 | * - User passes a <symbol> or <module:symbol> |
| 53 | * - User passes a non-existant symbol, kallsyms_lookup_name | 53 | * - User passes a non-existent symbol, kallsyms_lookup_name |
| 54 | * returns 0. Don't deref the NULL pointer in that case | 54 | * returns 0. Don't deref the NULL pointer in that case |
| 55 | */ | 55 | */ |
| 56 | #define kprobe_lookup_name(name, addr) \ | 56 | #define kprobe_lookup_name(name, addr) \ |
diff --git a/arch/powerpc/include/asm/lppaca.h b/arch/powerpc/include/asm/lppaca.h index 26b8c807f8f1..a077adc0b35e 100644 --- a/arch/powerpc/include/asm/lppaca.h +++ b/arch/powerpc/include/asm/lppaca.h | |||
| @@ -105,7 +105,7 @@ struct lppaca { | |||
| 105 | // processing of external interrupts. Note that PLIC will store the | 105 | // processing of external interrupts. Note that PLIC will store the |
| 106 | // XIRR directly into the xXirrValue field so that another XIRR will | 106 | // XIRR directly into the xXirrValue field so that another XIRR will |
| 107 | // not be presented until this one clears. The layout of the low | 107 | // not be presented until this one clears. The layout of the low |
| 108 | // 4-bytes of this Dword is upto SLIC - PLIC just checks whether the | 108 | // 4-bytes of this Dword is up to SLIC - PLIC just checks whether the |
| 109 | // entire Dword is zero or not. A non-zero value in the low order | 109 | // entire Dword is zero or not. A non-zero value in the low order |
| 110 | // 2-bytes will result in SLIC being granted the highest thread | 110 | // 2-bytes will result in SLIC being granted the highest thread |
| 111 | // priority upon return. A 0 will return to SLIC as medium priority. | 111 | // priority upon return. A 0 will return to SLIC as medium priority. |
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h index fe56a23e1ff0..e4f01915fbb0 100644 --- a/arch/powerpc/include/asm/machdep.h +++ b/arch/powerpc/include/asm/machdep.h | |||
| @@ -35,9 +35,9 @@ struct smp_ops_t { | |||
| 35 | int (*probe)(void); | 35 | int (*probe)(void); |
| 36 | void (*kick_cpu)(int nr); | 36 | void (*kick_cpu)(int nr); |
| 37 | void (*setup_cpu)(int nr); | 37 | void (*setup_cpu)(int nr); |
| 38 | void (*bringup_done)(void); | ||
| 38 | void (*take_timebase)(void); | 39 | void (*take_timebase)(void); |
| 39 | void (*give_timebase)(void); | 40 | void (*give_timebase)(void); |
| 40 | int (*cpu_enable)(unsigned int nr); | ||
| 41 | int (*cpu_disable)(void); | 41 | int (*cpu_disable)(void); |
| 42 | void (*cpu_die)(unsigned int nr); | 42 | void (*cpu_die)(unsigned int nr); |
| 43 | int (*cpu_bootable)(unsigned int nr); | 43 | int (*cpu_bootable)(unsigned int nr); |
| @@ -267,7 +267,6 @@ struct machdep_calls { | |||
| 267 | 267 | ||
| 268 | extern void e500_idle(void); | 268 | extern void e500_idle(void); |
| 269 | extern void power4_idle(void); | 269 | extern void power4_idle(void); |
| 270 | extern void power4_cpu_offline_powersave(void); | ||
| 271 | extern void ppc6xx_idle(void); | 270 | extern void ppc6xx_idle(void); |
| 272 | extern void book3e_idle(void); | 271 | extern void book3e_idle(void); |
| 273 | 272 | ||
diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h index acac35d5b382..ae7b3efec8e5 100644 --- a/arch/powerpc/include/asm/mmu-hash64.h +++ b/arch/powerpc/include/asm/mmu-hash64.h | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | #define STE_VSID_SHIFT 12 | 27 | #define STE_VSID_SHIFT 12 |
| 28 | 28 | ||
| 29 | /* Location of cpu0's segment table */ | 29 | /* Location of cpu0's segment table */ |
| 30 | #define STAB0_PAGE 0x6 | 30 | #define STAB0_PAGE 0x8 |
| 31 | #define STAB0_OFFSET (STAB0_PAGE << 12) | 31 | #define STAB0_OFFSET (STAB0_PAGE << 12) |
| 32 | #define STAB0_PHYS_ADDR (STAB0_OFFSET + PHYSICAL_START) | 32 | #define STAB0_PHYS_ADDR (STAB0_OFFSET + PHYSICAL_START) |
| 33 | 33 | ||
diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h index da4b20008541..2cd664ef0a5e 100644 --- a/arch/powerpc/include/asm/page.h +++ b/arch/powerpc/include/asm/page.h | |||
| @@ -100,7 +100,7 @@ extern phys_addr_t kernstart_addr; | |||
| 100 | #endif | 100 | #endif |
| 101 | 101 | ||
| 102 | #ifdef CONFIG_FLATMEM | 102 | #ifdef CONFIG_FLATMEM |
| 103 | #define ARCH_PFN_OFFSET (MEMORY_START >> PAGE_SHIFT) | 103 | #define ARCH_PFN_OFFSET ((unsigned long)(MEMORY_START >> PAGE_SHIFT)) |
| 104 | #define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && (pfn) < max_mapnr) | 104 | #define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && (pfn) < max_mapnr) |
| 105 | #endif | 105 | #endif |
| 106 | 106 | ||
diff --git a/arch/powerpc/include/asm/page_64.h b/arch/powerpc/include/asm/page_64.h index 932f88dcf6fa..812b2cd80aed 100644 --- a/arch/powerpc/include/asm/page_64.h +++ b/arch/powerpc/include/asm/page_64.h | |||
| @@ -169,7 +169,7 @@ do { \ | |||
| 169 | /* | 169 | /* |
| 170 | * This is the default if a program doesn't have a PT_GNU_STACK | 170 | * This is the default if a program doesn't have a PT_GNU_STACK |
| 171 | * program header entry. The PPC64 ELF ABI has a non executable stack | 171 | * program header entry. The PPC64 ELF ABI has a non executable stack |
| 172 | * stack by default, so in the absense of a PT_GNU_STACK program header | 172 | * stack by default, so in the absence of a PT_GNU_STACK program header |
| 173 | * we turn execute permission off. | 173 | * we turn execute permission off. |
| 174 | */ | 174 | */ |
| 175 | #define VM_STACK_DEFAULT_FLAGS32 (VM_READ | VM_WRITE | VM_EXEC | \ | 175 | #define VM_STACK_DEFAULT_FLAGS32 (VM_READ | VM_WRITE | VM_EXEC | \ |
diff --git a/arch/powerpc/include/asm/pasemi_dma.h b/arch/powerpc/include/asm/pasemi_dma.h index 19fd7933e2d9..eafa5a5f56de 100644 --- a/arch/powerpc/include/asm/pasemi_dma.h +++ b/arch/powerpc/include/asm/pasemi_dma.h | |||
| @@ -522,7 +522,7 @@ extern void *pasemi_dma_alloc_buf(struct pasemi_dmachan *chan, int size, | |||
| 522 | extern void pasemi_dma_free_buf(struct pasemi_dmachan *chan, int size, | 522 | extern void pasemi_dma_free_buf(struct pasemi_dmachan *chan, int size, |
| 523 | dma_addr_t *handle); | 523 | dma_addr_t *handle); |
| 524 | 524 | ||
| 525 | /* Routines to allocate flags (events) for channel syncronization */ | 525 | /* Routines to allocate flags (events) for channel synchronization */ |
| 526 | extern int pasemi_dma_alloc_flag(void); | 526 | extern int pasemi_dma_alloc_flag(void); |
| 527 | extern void pasemi_dma_free_flag(int flag); | 527 | extern void pasemi_dma_free_flag(int flag); |
| 528 | extern void pasemi_dma_set_flag(int flag); | 528 | extern void pasemi_dma_set_flag(int flag); |
diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h index 5e156e034fe2..b90dbf8e5cd9 100644 --- a/arch/powerpc/include/asm/pci-bridge.h +++ b/arch/powerpc/include/asm/pci-bridge.h | |||
| @@ -106,7 +106,7 @@ struct pci_controller { | |||
| 106 | * Used for variants of PCI indirect handling and possible quirks: | 106 | * Used for variants of PCI indirect handling and possible quirks: |
| 107 | * SET_CFG_TYPE - used on 4xx or any PHB that does explicit type0/1 | 107 | * SET_CFG_TYPE - used on 4xx or any PHB that does explicit type0/1 |
| 108 | * EXT_REG - provides access to PCI-e extended registers | 108 | * EXT_REG - provides access to PCI-e extended registers |
| 109 | * SURPRESS_PRIMARY_BUS - we surpress the setting of PCI_PRIMARY_BUS | 109 | * SURPRESS_PRIMARY_BUS - we suppress the setting of PCI_PRIMARY_BUS |
| 110 | * on Freescale PCI-e controllers since they used the PCI_PRIMARY_BUS | 110 | * on Freescale PCI-e controllers since they used the PCI_PRIMARY_BUS |
| 111 | * to determine which bus number to match on when generating type0 | 111 | * to determine which bus number to match on when generating type0 |
| 112 | * config cycles | 112 | * config cycles |
diff --git a/arch/powerpc/include/asm/pmac_feature.h b/arch/powerpc/include/asm/pmac_feature.h index 00eedc5a4e61..10902c9375d0 100644 --- a/arch/powerpc/include/asm/pmac_feature.h +++ b/arch/powerpc/include/asm/pmac_feature.h | |||
| @@ -53,8 +53,8 @@ | |||
| 53 | 53 | ||
| 54 | /* Here is the infamous serie of OHare based machines | 54 | /* Here is the infamous serie of OHare based machines |
| 55 | */ | 55 | */ |
| 56 | #define PMAC_TYPE_COMET 0x20 /* Beleived to be PowerBook 2400 */ | 56 | #define PMAC_TYPE_COMET 0x20 /* Believed to be PowerBook 2400 */ |
| 57 | #define PMAC_TYPE_HOOPER 0x21 /* Beleived to be PowerBook 3400 */ | 57 | #define PMAC_TYPE_HOOPER 0x21 /* Believed to be PowerBook 3400 */ |
| 58 | #define PMAC_TYPE_KANGA 0x22 /* PowerBook 3500 (first G3) */ | 58 | #define PMAC_TYPE_KANGA 0x22 /* PowerBook 3500 (first G3) */ |
| 59 | #define PMAC_TYPE_ALCHEMY 0x23 /* Alchemy motherboard base */ | 59 | #define PMAC_TYPE_ALCHEMY 0x23 /* Alchemy motherboard base */ |
| 60 | #define PMAC_TYPE_GAZELLE 0x24 /* Spartacus, some 5xxx/6xxx */ | 60 | #define PMAC_TYPE_GAZELLE 0x24 /* Spartacus, some 5xxx/6xxx */ |
diff --git a/arch/powerpc/include/asm/pte-common.h b/arch/powerpc/include/asm/pte-common.h index 76bb195e4f24..8d1569c29042 100644 --- a/arch/powerpc/include/asm/pte-common.h +++ b/arch/powerpc/include/asm/pte-common.h | |||
| @@ -86,7 +86,7 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void); | |||
| 86 | #define PTE_RPN_MASK (~((1UL<<PTE_RPN_SHIFT)-1)) | 86 | #define PTE_RPN_MASK (~((1UL<<PTE_RPN_SHIFT)-1)) |
| 87 | #endif | 87 | #endif |
| 88 | 88 | ||
| 89 | /* _PAGE_CHG_MASK masks of bits that are to be preserved accross | 89 | /* _PAGE_CHG_MASK masks of bits that are to be preserved across |
| 90 | * pgprot changes | 90 | * pgprot changes |
| 91 | */ | 91 | */ |
| 92 | #define _PAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \ | 92 | #define _PAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \ |
| @@ -162,7 +162,7 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void); | |||
| 162 | * on platforms where such control is possible. | 162 | * on platforms where such control is possible. |
| 163 | */ | 163 | */ |
| 164 | #if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) ||\ | 164 | #if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) ||\ |
| 165 | defined(CONFIG_KPROBES) | 165 | defined(CONFIG_KPROBES) || defined(CONFIG_DYNAMIC_FTRACE) |
| 166 | #define PAGE_KERNEL_TEXT PAGE_KERNEL_X | 166 | #define PAGE_KERNEL_TEXT PAGE_KERNEL_X |
| 167 | #else | 167 | #else |
| 168 | #define PAGE_KERNEL_TEXT PAGE_KERNEL_ROX | 168 | #define PAGE_KERNEL_TEXT PAGE_KERNEL_ROX |
| @@ -174,7 +174,7 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void); | |||
| 174 | /* | 174 | /* |
| 175 | * Don't just check for any non zero bits in __PAGE_USER, since for book3e | 175 | * Don't just check for any non zero bits in __PAGE_USER, since for book3e |
| 176 | * and PTE_64BIT, PAGE_KERNEL_X contains _PAGE_BAP_SR which is also in | 176 | * and PTE_64BIT, PAGE_KERNEL_X contains _PAGE_BAP_SR which is also in |
| 177 | * _PAGE_USER. Need to explictly match _PAGE_BAP_UR bit in that case too. | 177 | * _PAGE_USER. Need to explicitly match _PAGE_BAP_UR bit in that case too. |
| 178 | */ | 178 | */ |
| 179 | #define pte_user(val) ((val & _PAGE_USER) == _PAGE_USER) | 179 | #define pte_user(val) ((val & _PAGE_USER) == _PAGE_USER) |
| 180 | 180 | ||
diff --git a/arch/powerpc/include/asm/qe_ic.h b/arch/powerpc/include/asm/qe_ic.h index 9e2cb2019161..f706164b0bd0 100644 --- a/arch/powerpc/include/asm/qe_ic.h +++ b/arch/powerpc/include/asm/qe_ic.h | |||
| @@ -81,7 +81,7 @@ int qe_ic_set_high_priority(unsigned int virq, unsigned int priority, int high); | |||
| 81 | static inline void qe_ic_cascade_low_ipic(unsigned int irq, | 81 | static inline void qe_ic_cascade_low_ipic(unsigned int irq, |
| 82 | struct irq_desc *desc) | 82 | struct irq_desc *desc) |
| 83 | { | 83 | { |
| 84 | struct qe_ic *qe_ic = get_irq_desc_data(desc); | 84 | struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); |
| 85 | unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); | 85 | unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); |
| 86 | 86 | ||
| 87 | if (cascade_irq != NO_IRQ) | 87 | if (cascade_irq != NO_IRQ) |
| @@ -91,7 +91,7 @@ static inline void qe_ic_cascade_low_ipic(unsigned int irq, | |||
| 91 | static inline void qe_ic_cascade_high_ipic(unsigned int irq, | 91 | static inline void qe_ic_cascade_high_ipic(unsigned int irq, |
| 92 | struct irq_desc *desc) | 92 | struct irq_desc *desc) |
| 93 | { | 93 | { |
| 94 | struct qe_ic *qe_ic = get_irq_desc_data(desc); | 94 | struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); |
| 95 | unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); | 95 | unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); |
| 96 | 96 | ||
| 97 | if (cascade_irq != NO_IRQ) | 97 | if (cascade_irq != NO_IRQ) |
| @@ -101,9 +101,9 @@ static inline void qe_ic_cascade_high_ipic(unsigned int irq, | |||
| 101 | static inline void qe_ic_cascade_low_mpic(unsigned int irq, | 101 | static inline void qe_ic_cascade_low_mpic(unsigned int irq, |
| 102 | struct irq_desc *desc) | 102 | struct irq_desc *desc) |
| 103 | { | 103 | { |
| 104 | struct qe_ic *qe_ic = get_irq_desc_data(desc); | 104 | struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); |
| 105 | unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); | 105 | unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); |
| 106 | struct irq_chip *chip = get_irq_desc_chip(desc); | 106 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 107 | 107 | ||
| 108 | if (cascade_irq != NO_IRQ) | 108 | if (cascade_irq != NO_IRQ) |
| 109 | generic_handle_irq(cascade_irq); | 109 | generic_handle_irq(cascade_irq); |
| @@ -114,9 +114,9 @@ static inline void qe_ic_cascade_low_mpic(unsigned int irq, | |||
| 114 | static inline void qe_ic_cascade_high_mpic(unsigned int irq, | 114 | static inline void qe_ic_cascade_high_mpic(unsigned int irq, |
| 115 | struct irq_desc *desc) | 115 | struct irq_desc *desc) |
| 116 | { | 116 | { |
| 117 | struct qe_ic *qe_ic = get_irq_desc_data(desc); | 117 | struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); |
| 118 | unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); | 118 | unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); |
| 119 | struct irq_chip *chip = get_irq_desc_chip(desc); | 119 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 120 | 120 | ||
| 121 | if (cascade_irq != NO_IRQ) | 121 | if (cascade_irq != NO_IRQ) |
| 122 | generic_handle_irq(cascade_irq); | 122 | generic_handle_irq(cascade_irq); |
| @@ -127,9 +127,9 @@ static inline void qe_ic_cascade_high_mpic(unsigned int irq, | |||
| 127 | static inline void qe_ic_cascade_muxed_mpic(unsigned int irq, | 127 | static inline void qe_ic_cascade_muxed_mpic(unsigned int irq, |
| 128 | struct irq_desc *desc) | 128 | struct irq_desc *desc) |
| 129 | { | 129 | { |
| 130 | struct qe_ic *qe_ic = get_irq_desc_data(desc); | 130 | struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); |
| 131 | unsigned int cascade_irq; | 131 | unsigned int cascade_irq; |
| 132 | struct irq_chip *chip = get_irq_desc_chip(desc); | 132 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 133 | 133 | ||
| 134 | cascade_irq = qe_ic_get_high_irq(qe_ic); | 134 | cascade_irq = qe_ic_get_high_irq(qe_ic); |
| 135 | if (cascade_irq == NO_IRQ) | 135 | if (cascade_irq == NO_IRQ) |
diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm/reg_booke.h index 86ad8128963a..b316794aa2b5 100644 --- a/arch/powerpc/include/asm/reg_booke.h +++ b/arch/powerpc/include/asm/reg_booke.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * Contains register definitions common to the Book E PowerPC | 2 | * Contains register definitions common to the Book E PowerPC |
| 3 | * specification. Notice that while the IBM-40x series of CPUs | 3 | * specification. Notice that while the IBM-40x series of CPUs |
| 4 | * are not true Book E PowerPCs, they borrowed a number of features | 4 | * are not true Book E PowerPCs, they borrowed a number of features |
| 5 | * before Book E was finalized, and are included here as well. Unfortunatly, | 5 | * before Book E was finalized, and are included here as well. Unfortunately, |
| 6 | * they sometimes used different locations than true Book E CPUs did. | 6 | * they sometimes used different locations than true Book E CPUs did. |
| 7 | * | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or | 8 | * This program is free software; you can redistribute it and/or |
| @@ -110,7 +110,7 @@ | |||
| 110 | #define SPRN_MAS2 0x272 /* MMU Assist Register 2 */ | 110 | #define SPRN_MAS2 0x272 /* MMU Assist Register 2 */ |
| 111 | #define SPRN_MAS3 0x273 /* MMU Assist Register 3 */ | 111 | #define SPRN_MAS3 0x273 /* MMU Assist Register 3 */ |
| 112 | #define SPRN_MAS4 0x274 /* MMU Assist Register 4 */ | 112 | #define SPRN_MAS4 0x274 /* MMU Assist Register 4 */ |
| 113 | #define SPRN_MAS5 0x275 /* MMU Assist Register 5 */ | 113 | #define SPRN_MAS5 0x153 /* MMU Assist Register 5 */ |
| 114 | #define SPRN_MAS6 0x276 /* MMU Assist Register 6 */ | 114 | #define SPRN_MAS6 0x276 /* MMU Assist Register 6 */ |
| 115 | #define SPRN_PID1 0x279 /* Process ID Register 1 */ | 115 | #define SPRN_PID1 0x279 /* Process ID Register 1 */ |
| 116 | #define SPRN_PID2 0x27A /* Process ID Register 2 */ | 116 | #define SPRN_PID2 0x27A /* Process ID Register 2 */ |
diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h index 66e237bbe15f..a902a0d3ae0d 100644 --- a/arch/powerpc/include/asm/smp.h +++ b/arch/powerpc/include/asm/smp.h | |||
| @@ -36,15 +36,16 @@ extern void cpu_die(void); | |||
| 36 | 36 | ||
| 37 | extern void smp_send_debugger_break(int cpu); | 37 | extern void smp_send_debugger_break(int cpu); |
| 38 | extern void smp_message_recv(int); | 38 | extern void smp_message_recv(int); |
| 39 | extern void start_secondary_resume(void); | ||
| 39 | 40 | ||
| 40 | DECLARE_PER_CPU(unsigned int, cpu_pvr); | 41 | DECLARE_PER_CPU(unsigned int, cpu_pvr); |
| 41 | 42 | ||
| 42 | #ifdef CONFIG_HOTPLUG_CPU | 43 | #ifdef CONFIG_HOTPLUG_CPU |
| 43 | extern void fixup_irqs(const struct cpumask *map); | 44 | extern void migrate_irqs(void); |
| 44 | int generic_cpu_disable(void); | 45 | int generic_cpu_disable(void); |
| 45 | int generic_cpu_enable(unsigned int cpu); | ||
| 46 | void generic_cpu_die(unsigned int cpu); | 46 | void generic_cpu_die(unsigned int cpu); |
| 47 | void generic_mach_cpu_die(void); | 47 | void generic_mach_cpu_die(void); |
| 48 | void generic_set_cpu_dead(unsigned int cpu); | ||
| 48 | #endif | 49 | #endif |
| 49 | 50 | ||
| 50 | #ifdef CONFIG_PPC64 | 51 | #ifdef CONFIG_PPC64 |
diff --git a/arch/powerpc/include/asm/spu_priv1.h b/arch/powerpc/include/asm/spu_priv1.h index 25020a34ce7f..d8f5c60f61c1 100644 --- a/arch/powerpc/include/asm/spu_priv1.h +++ b/arch/powerpc/include/asm/spu_priv1.h | |||
| @@ -223,7 +223,7 @@ spu_disable_spu (struct spu_context *ctx) | |||
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | /* | 225 | /* |
| 226 | * The declarations folowing are put here for convenience | 226 | * The declarations following are put here for convenience |
| 227 | * and only intended to be used by the platform setup code. | 227 | * and only intended to be used by the platform setup code. |
| 228 | */ | 228 | */ |
| 229 | 229 | ||
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h index aa0f1ebb4aaf..60f64b132bd4 100644 --- a/arch/powerpc/include/asm/systbl.h +++ b/arch/powerpc/include/asm/systbl.h | |||
| @@ -348,3 +348,7 @@ COMPAT_SYS_SPU(sendmsg) | |||
| 348 | COMPAT_SYS_SPU(recvmsg) | 348 | COMPAT_SYS_SPU(recvmsg) |
| 349 | COMPAT_SYS_SPU(recvmmsg) | 349 | COMPAT_SYS_SPU(recvmmsg) |
| 350 | SYSCALL_SPU(accept4) | 350 | SYSCALL_SPU(accept4) |
| 351 | SYSCALL_SPU(name_to_handle_at) | ||
| 352 | COMPAT_SYS_SPU(open_by_handle_at) | ||
| 353 | COMPAT_SYS_SPU(clock_adjtime) | ||
| 354 | SYSCALL_SPU(syncfs) | ||
diff --git a/arch/powerpc/include/asm/uninorth.h b/arch/powerpc/include/asm/uninorth.h index f737732c3861..ae9c899c8a6d 100644 --- a/arch/powerpc/include/asm/uninorth.h +++ b/arch/powerpc/include/asm/uninorth.h | |||
| @@ -60,7 +60,7 @@ | |||
| 60 | * | 60 | * |
| 61 | * Obviously, the GART is not cache coherent and so any change to it | 61 | * Obviously, the GART is not cache coherent and so any change to it |
| 62 | * must be flushed to memory (or maybe just make the GART space non | 62 | * must be flushed to memory (or maybe just make the GART space non |
| 63 | * cachable). AGP memory itself doens't seem to be cache coherent neither. | 63 | * cachable). AGP memory itself does't seem to be cache coherent neither. |
| 64 | * | 64 | * |
| 65 | * In order to invalidate the GART (which is probably necessary to inval | 65 | * In order to invalidate the GART (which is probably necessary to inval |
| 66 | * the bridge internal TLBs), the following sequence has to be written, | 66 | * the bridge internal TLBs), the following sequence has to be written, |
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h index 6151937657f6..3c215648ce6d 100644 --- a/arch/powerpc/include/asm/unistd.h +++ b/arch/powerpc/include/asm/unistd.h | |||
| @@ -367,10 +367,14 @@ | |||
| 367 | #define __NR_recvmsg 342 | 367 | #define __NR_recvmsg 342 |
| 368 | #define __NR_recvmmsg 343 | 368 | #define __NR_recvmmsg 343 |
| 369 | #define __NR_accept4 344 | 369 | #define __NR_accept4 344 |
| 370 | #define __NR_name_to_handle_at 345 | ||
| 371 | #define __NR_open_by_handle_at 346 | ||
| 372 | #define __NR_clock_adjtime 347 | ||
| 373 | #define __NR_syncfs 348 | ||
| 370 | 374 | ||
| 371 | #ifdef __KERNEL__ | 375 | #ifdef __KERNEL__ |
| 372 | 376 | ||
| 373 | #define __NR_syscalls 345 | 377 | #define __NR_syscalls 349 |
| 374 | 378 | ||
| 375 | #define __NR__exit __NR_exit | 379 | #define __NR__exit __NR_exit |
| 376 | #define NR_syscalls __NR_syscalls | 380 | #define NR_syscalls __NR_syscalls |
diff --git a/arch/powerpc/include/asm/vdso_datapage.h b/arch/powerpc/include/asm/vdso_datapage.h index 25e39220e89c..b73a8199f161 100644 --- a/arch/powerpc/include/asm/vdso_datapage.h +++ b/arch/powerpc/include/asm/vdso_datapage.h | |||
| @@ -57,7 +57,7 @@ struct vdso_data { | |||
| 57 | } version; | 57 | } version; |
| 58 | 58 | ||
| 59 | /* Note about the platform flags: it now only contains the lpar | 59 | /* Note about the platform flags: it now only contains the lpar |
| 60 | * bit. The actual platform number is dead and burried | 60 | * bit. The actual platform number is dead and buried |
| 61 | */ | 61 | */ |
| 62 | __u32 platform; /* Platform flags 0x18 */ | 62 | __u32 platform; /* Platform flags 0x18 */ |
| 63 | __u32 processor; /* Processor type 0x1C */ | 63 | __u32 processor; /* Processor type 0x1C */ |
diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c index 625942ae5585..60b3e377b1e4 100644 --- a/arch/powerpc/kernel/btext.c +++ b/arch/powerpc/kernel/btext.c | |||
| @@ -99,7 +99,7 @@ void __init btext_prepare_BAT(void) | |||
| 99 | 99 | ||
| 100 | /* This function can be used to enable the early boot text when doing | 100 | /* This function can be used to enable the early boot text when doing |
| 101 | * OF booting or within bootx init. It must be followed by a btext_unmap() | 101 | * OF booting or within bootx init. It must be followed by a btext_unmap() |
| 102 | * call before the logical address becomes unuseable | 102 | * call before the logical address becomes unusable |
| 103 | */ | 103 | */ |
| 104 | void __init btext_setup_display(int width, int height, int depth, int pitch, | 104 | void __init btext_setup_display(int width, int height, int depth, int pitch, |
| 105 | unsigned long address) | 105 | unsigned long address) |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index c9b68d07ac4f..b9602ee06deb 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
| @@ -1973,7 +1973,7 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
| 1973 | .pvr_mask = 0xffff0000, | 1973 | .pvr_mask = 0xffff0000, |
| 1974 | .pvr_value = 0x80240000, | 1974 | .pvr_value = 0x80240000, |
| 1975 | .cpu_name = "e5500", | 1975 | .cpu_name = "e5500", |
| 1976 | .cpu_features = CPU_FTRS_E500MC, | 1976 | .cpu_features = CPU_FTRS_E5500, |
| 1977 | .cpu_user_features = COMMON_USER_BOOKE, | 1977 | .cpu_user_features = COMMON_USER_BOOKE, |
| 1978 | .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS | | 1978 | .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS | |
| 1979 | MMU_FTR_USE_TLBILX, | 1979 | MMU_FTR_USE_TLBILX, |
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c index 3d569e2aff18..5b5e1f002a8e 100644 --- a/arch/powerpc/kernel/crash.c +++ b/arch/powerpc/kernel/crash.c | |||
| @@ -188,7 +188,7 @@ static void crash_kexec_wait_realmode(int cpu) | |||
| 188 | } | 188 | } |
| 189 | mb(); | 189 | mb(); |
| 190 | } | 190 | } |
| 191 | #endif | 191 | #endif /* CONFIG_PPC_STD_MMU_64 */ |
| 192 | 192 | ||
| 193 | /* | 193 | /* |
| 194 | * This function will be called by secondary cpus or by kexec cpu | 194 | * This function will be called by secondary cpus or by kexec cpu |
| @@ -233,7 +233,9 @@ void crash_kexec_secondary(struct pt_regs *regs) | |||
| 233 | crash_ipi_callback(regs); | 233 | crash_ipi_callback(regs); |
| 234 | } | 234 | } |
| 235 | 235 | ||
| 236 | #else | 236 | #else /* ! CONFIG_SMP */ |
| 237 | static inline void crash_kexec_wait_realmode(int cpu) {} | ||
| 238 | |||
| 237 | static void crash_kexec_prepare_cpus(int cpu) | 239 | static void crash_kexec_prepare_cpus(int cpu) |
| 238 | { | 240 | { |
| 239 | /* | 241 | /* |
| @@ -253,7 +255,7 @@ void crash_kexec_secondary(struct pt_regs *regs) | |||
| 253 | { | 255 | { |
| 254 | cpus_in_sr = CPU_MASK_NONE; | 256 | cpus_in_sr = CPU_MASK_NONE; |
| 255 | } | 257 | } |
| 256 | #endif | 258 | #endif /* CONFIG_SMP */ |
| 257 | 259 | ||
| 258 | /* | 260 | /* |
| 259 | * Register a function to be called on shutdown. Only use this if you | 261 | * Register a function to be called on shutdown. Only use this if you |
| @@ -344,9 +346,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs) | |||
| 344 | crash_save_cpu(regs, crashing_cpu); | 346 | crash_save_cpu(regs, crashing_cpu); |
| 345 | crash_kexec_prepare_cpus(crashing_cpu); | 347 | crash_kexec_prepare_cpus(crashing_cpu); |
| 346 | cpu_set(crashing_cpu, cpus_in_crash); | 348 | cpu_set(crashing_cpu, cpus_in_crash); |
| 347 | #if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP) | ||
| 348 | crash_kexec_wait_realmode(crashing_cpu); | 349 | crash_kexec_wait_realmode(crashing_cpu); |
| 349 | #endif | ||
| 350 | 350 | ||
| 351 | machine_kexec_mask_interrupts(); | 351 | machine_kexec_mask_interrupts(); |
| 352 | 352 | ||
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c index cf02cad62d9a..d238c082c3c5 100644 --- a/arch/powerpc/kernel/dma.c +++ b/arch/powerpc/kernel/dma.c | |||
| @@ -179,3 +179,21 @@ static int __init dma_init(void) | |||
| 179 | return 0; | 179 | return 0; |
| 180 | } | 180 | } |
| 181 | fs_initcall(dma_init); | 181 | fs_initcall(dma_init); |
| 182 | |||
| 183 | int dma_mmap_coherent(struct device *dev, struct vm_area_struct *vma, | ||
| 184 | void *cpu_addr, dma_addr_t handle, size_t size) | ||
| 185 | { | ||
| 186 | unsigned long pfn; | ||
| 187 | |||
| 188 | #ifdef CONFIG_NOT_COHERENT_CACHE | ||
| 189 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | ||
| 190 | pfn = __dma_get_coherent_pfn((unsigned long)cpu_addr); | ||
| 191 | #else | ||
| 192 | pfn = page_to_pfn(virt_to_page(cpu_addr)); | ||
| 193 | #endif | ||
| 194 | return remap_pfn_range(vma, vma->vm_start, | ||
| 195 | pfn + vma->vm_pgoff, | ||
| 196 | vma->vm_end - vma->vm_start, | ||
| 197 | vma->vm_page_prot); | ||
| 198 | } | ||
| 199 | EXPORT_SYMBOL_GPL(dma_mmap_coherent); | ||
diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S index 5c43063d2506..9651acc3504a 100644 --- a/arch/powerpc/kernel/exceptions-64e.S +++ b/arch/powerpc/kernel/exceptions-64e.S | |||
| @@ -379,7 +379,7 @@ interrupt_end_book3e: | |||
| 379 | mfspr r13,SPRN_SPRG_PACA /* get our PACA */ | 379 | mfspr r13,SPRN_SPRG_PACA /* get our PACA */ |
| 380 | b system_call_common | 380 | b system_call_common |
| 381 | 381 | ||
| 382 | /* Auxillary Processor Unavailable Interrupt */ | 382 | /* Auxiliary Processor Unavailable Interrupt */ |
| 383 | START_EXCEPTION(ap_unavailable); | 383 | START_EXCEPTION(ap_unavailable); |
| 384 | NORMAL_EXCEPTION_PROLOG(0xf20, PROLOG_ADDITION_NONE) | 384 | NORMAL_EXCEPTION_PROLOG(0xf20, PROLOG_ADDITION_NONE) |
| 385 | EXCEPTION_COMMON(0xf20, PACA_EXGEN, INTS_KEEP) | 385 | EXCEPTION_COMMON(0xf20, PACA_EXGEN, INTS_KEEP) |
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index 8a817995b4cd..aeb739e18769 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * handling and other fixed offset specific things. | 5 | * handling and other fixed offset specific things. |
| 6 | * | 6 | * |
| 7 | * This file is meant to be #included from head_64.S due to | 7 | * This file is meant to be #included from head_64.S due to |
| 8 | * position dependant assembly. | 8 | * position dependent assembly. |
| 9 | * | 9 | * |
| 10 | * Most of this originates from head_64.S and thus has the same | 10 | * Most of this originates from head_64.S and thus has the same |
| 11 | * copyright history. | 11 | * copyright history. |
| @@ -977,20 +977,6 @@ _GLOBAL(do_stab_bolted) | |||
| 977 | rfid | 977 | rfid |
| 978 | b . /* prevent speculative execution */ | 978 | b . /* prevent speculative execution */ |
| 979 | 979 | ||
| 980 | /* | ||
| 981 | * Space for CPU0's segment table. | ||
| 982 | * | ||
| 983 | * On iSeries, the hypervisor must fill in at least one entry before | ||
| 984 | * we get control (with relocate on). The address is given to the hv | ||
| 985 | * as a page number (see xLparMap below), so this must be at a | ||
| 986 | * fixed address (the linker can't compute (u64)&initial_stab >> | ||
| 987 | * PAGE_SHIFT). | ||
| 988 | */ | ||
| 989 | . = STAB0_OFFSET /* 0x6000 */ | ||
| 990 | .globl initial_stab | ||
| 991 | initial_stab: | ||
| 992 | .space 4096 | ||
| 993 | |||
| 994 | #ifdef CONFIG_PPC_PSERIES | 980 | #ifdef CONFIG_PPC_PSERIES |
| 995 | /* | 981 | /* |
| 996 | * Data area reserved for FWNMI option. | 982 | * Data area reserved for FWNMI option. |
| @@ -1027,3 +1013,17 @@ xLparMap: | |||
| 1027 | #ifdef CONFIG_PPC_PSERIES | 1013 | #ifdef CONFIG_PPC_PSERIES |
| 1028 | . = 0x8000 | 1014 | . = 0x8000 |
| 1029 | #endif /* CONFIG_PPC_PSERIES */ | 1015 | #endif /* CONFIG_PPC_PSERIES */ |
| 1016 | |||
| 1017 | /* | ||
| 1018 | * Space for CPU0's segment table. | ||
| 1019 | * | ||
| 1020 | * On iSeries, the hypervisor must fill in at least one entry before | ||
| 1021 | * we get control (with relocate on). The address is given to the hv | ||
| 1022 | * as a page number (see xLparMap above), so this must be at a | ||
| 1023 | * fixed address (the linker can't compute (u64)&initial_stab >> | ||
| 1024 | * PAGE_SHIFT). | ||
| 1025 | */ | ||
| 1026 | . = STAB0_OFFSET /* 0x8000 */ | ||
| 1027 | .globl initial_stab | ||
| 1028 | initial_stab: | ||
| 1029 | .space 4096 | ||
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S index 98c4b29a56f4..c5c24beb8387 100644 --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S | |||
| @@ -890,6 +890,15 @@ __secondary_start: | |||
| 890 | mtspr SPRN_SRR1,r4 | 890 | mtspr SPRN_SRR1,r4 |
| 891 | SYNC | 891 | SYNC |
| 892 | RFI | 892 | RFI |
| 893 | |||
| 894 | _GLOBAL(start_secondary_resume) | ||
| 895 | /* Reset stack */ | ||
| 896 | rlwinm r1,r1,0,0,(31-THREAD_SHIFT) /* current_thread_info() */ | ||
| 897 | addi r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD | ||
| 898 | li r3,0 | ||
| 899 | std r3,0(r1) /* Zero the stack frame pointer */ | ||
| 900 | bl start_secondary | ||
| 901 | b . | ||
| 893 | #endif /* CONFIG_SMP */ | 902 | #endif /* CONFIG_SMP */ |
| 894 | 903 | ||
| 895 | #ifdef CONFIG_KVM_BOOK3S_HANDLER | 904 | #ifdef CONFIG_KVM_BOOK3S_HANDLER |
diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S index 9dd21a8c4d52..a91626d87fc9 100644 --- a/arch/powerpc/kernel/head_40x.S +++ b/arch/powerpc/kernel/head_40x.S | |||
| @@ -766,7 +766,7 @@ DataAccess: | |||
| 766 | * miss get to this point to load the TLB. | 766 | * miss get to this point to load the TLB. |
| 767 | * r10 - TLB_TAG value | 767 | * r10 - TLB_TAG value |
| 768 | * r11 - Linux PTE | 768 | * r11 - Linux PTE |
| 769 | * r12, r9 - avilable to use | 769 | * r12, r9 - available to use |
| 770 | * PID - loaded with proper value when we get here | 770 | * PID - loaded with proper value when we get here |
| 771 | * Upon exit, we reload everything and RFI. | 771 | * Upon exit, we reload everything and RFI. |
| 772 | * Actually, it will fit now, but oh well.....a common place | 772 | * Actually, it will fit now, but oh well.....a common place |
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S index cbb3436b592d..5e12b741ba5f 100644 --- a/arch/powerpc/kernel/head_44x.S +++ b/arch/powerpc/kernel/head_44x.S | |||
| @@ -178,7 +178,7 @@ interrupt_base: | |||
| 178 | NORMAL_EXCEPTION_PROLOG | 178 | NORMAL_EXCEPTION_PROLOG |
| 179 | EXC_XFER_EE_LITE(0x0c00, DoSyscall) | 179 | EXC_XFER_EE_LITE(0x0c00, DoSyscall) |
| 180 | 180 | ||
| 181 | /* Auxillary Processor Unavailable Interrupt */ | 181 | /* Auxiliary Processor Unavailable Interrupt */ |
| 182 | EXCEPTION(0x2020, AuxillaryProcessorUnavailable, unknown_exception, EXC_XFER_EE) | 182 | EXCEPTION(0x2020, AuxillaryProcessorUnavailable, unknown_exception, EXC_XFER_EE) |
| 183 | 183 | ||
| 184 | /* Decrementer Interrupt */ | 184 | /* Decrementer Interrupt */ |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 782f23df7c85..3a319f9c9d3e 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | #include <asm/kvm_book3s_asm.h> | 40 | #include <asm/kvm_book3s_asm.h> |
| 41 | #include <asm/ptrace.h> | 41 | #include <asm/ptrace.h> |
| 42 | 42 | ||
| 43 | /* The physical memory is layed out such that the secondary processor | 43 | /* The physical memory is laid out such that the secondary processor |
| 44 | * spin code sits at 0x0000...0x00ff. On server, the vectors follow | 44 | * spin code sits at 0x0000...0x00ff. On server, the vectors follow |
| 45 | * using the layout described in exceptions-64s.S | 45 | * using the layout described in exceptions-64s.S |
| 46 | */ | 46 | */ |
| @@ -536,6 +536,13 @@ _GLOBAL(pmac_secondary_start) | |||
| 536 | add r13,r13,r4 /* for this processor. */ | 536 | add r13,r13,r4 /* for this processor. */ |
| 537 | mtspr SPRN_SPRG_PACA,r13 /* Save vaddr of paca in an SPRG*/ | 537 | mtspr SPRN_SPRG_PACA,r13 /* Save vaddr of paca in an SPRG*/ |
| 538 | 538 | ||
| 539 | /* Mark interrupts soft and hard disabled (they might be enabled | ||
| 540 | * in the PACA when doing hotplug) | ||
| 541 | */ | ||
| 542 | li r0,0 | ||
| 543 | stb r0,PACASOFTIRQEN(r13) | ||
| 544 | stb r0,PACAHARDIRQEN(r13) | ||
| 545 | |||
| 539 | /* Create a temp kernel stack for use before relocation is on. */ | 546 | /* Create a temp kernel stack for use before relocation is on. */ |
| 540 | ld r1,PACAEMERGSP(r13) | 547 | ld r1,PACAEMERGSP(r13) |
| 541 | subi r1,r1,STACK_FRAME_OVERHEAD | 548 | subi r1,r1,STACK_FRAME_OVERHEAD |
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index 3e02710d9562..5ecf54cfa7d4 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S | |||
| @@ -326,7 +326,7 @@ interrupt_base: | |||
| 326 | NORMAL_EXCEPTION_PROLOG | 326 | NORMAL_EXCEPTION_PROLOG |
| 327 | EXC_XFER_EE_LITE(0x0c00, DoSyscall) | 327 | EXC_XFER_EE_LITE(0x0c00, DoSyscall) |
| 328 | 328 | ||
| 329 | /* Auxillary Processor Unavailable Interrupt */ | 329 | /* Auxiliary Processor Unavailable Interrupt */ |
| 330 | EXCEPTION(0x2900, AuxillaryProcessorUnavailable, unknown_exception, EXC_XFER_EE) | 330 | EXCEPTION(0x2900, AuxillaryProcessorUnavailable, unknown_exception, EXC_XFER_EE) |
| 331 | 331 | ||
| 332 | /* Decrementer Interrupt */ | 332 | /* Decrementer Interrupt */ |
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c index c00d4ca1ee15..28581f1ad2c0 100644 --- a/arch/powerpc/kernel/ibmebus.c +++ b/arch/powerpc/kernel/ibmebus.c | |||
| @@ -527,7 +527,7 @@ static int ibmebus_bus_pm_resume_noirq(struct device *dev) | |||
| 527 | 527 | ||
| 528 | #endif /* !CONFIG_SUSPEND */ | 528 | #endif /* !CONFIG_SUSPEND */ |
| 529 | 529 | ||
| 530 | #ifdef CONFIG_HIBERNATION | 530 | #ifdef CONFIG_HIBERNATE_CALLBACKS |
| 531 | 531 | ||
| 532 | static int ibmebus_bus_pm_freeze(struct device *dev) | 532 | static int ibmebus_bus_pm_freeze(struct device *dev) |
| 533 | { | 533 | { |
| @@ -665,7 +665,7 @@ static int ibmebus_bus_pm_restore_noirq(struct device *dev) | |||
| 665 | return ret; | 665 | return ret; |
| 666 | } | 666 | } |
| 667 | 667 | ||
| 668 | #else /* !CONFIG_HIBERNATION */ | 668 | #else /* !CONFIG_HIBERNATE_CALLBACKS */ |
| 669 | 669 | ||
| 670 | #define ibmebus_bus_pm_freeze NULL | 670 | #define ibmebus_bus_pm_freeze NULL |
| 671 | #define ibmebus_bus_pm_thaw NULL | 671 | #define ibmebus_bus_pm_thaw NULL |
| @@ -676,7 +676,7 @@ static int ibmebus_bus_pm_restore_noirq(struct device *dev) | |||
| 676 | #define ibmebus_bus_pm_poweroff_noirq NULL | 676 | #define ibmebus_bus_pm_poweroff_noirq NULL |
| 677 | #define ibmebus_bus_pm_restore_noirq NULL | 677 | #define ibmebus_bus_pm_restore_noirq NULL |
| 678 | 678 | ||
| 679 | #endif /* !CONFIG_HIBERNATION */ | 679 | #endif /* !CONFIG_HIBERNATE_CALLBACKS */ |
| 680 | 680 | ||
| 681 | static struct dev_pm_ops ibmebus_bus_dev_pm_ops = { | 681 | static struct dev_pm_ops ibmebus_bus_dev_pm_ops = { |
| 682 | .prepare = ibmebus_bus_pm_prepare, | 682 | .prepare = ibmebus_bus_pm_prepare, |
diff --git a/arch/powerpc/kernel/idle_power4.S b/arch/powerpc/kernel/idle_power4.S index 5328709eeedc..ba3195478600 100644 --- a/arch/powerpc/kernel/idle_power4.S +++ b/arch/powerpc/kernel/idle_power4.S | |||
| @@ -53,24 +53,3 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | |||
| 53 | isync | 53 | isync |
| 54 | b 1b | 54 | b 1b |
| 55 | 55 | ||
| 56 | _GLOBAL(power4_cpu_offline_powersave) | ||
| 57 | /* Go to NAP now */ | ||
| 58 | mfmsr r7 | ||
| 59 | rldicl r0,r7,48,1 | ||
| 60 | rotldi r0,r0,16 | ||
| 61 | mtmsrd r0,1 /* hard-disable interrupts */ | ||
| 62 | li r0,1 | ||
| 63 | li r6,0 | ||
| 64 | stb r0,PACAHARDIRQEN(r13) /* we'll hard-enable shortly */ | ||
| 65 | stb r6,PACASOFTIRQEN(r13) /* soft-disable irqs */ | ||
| 66 | BEGIN_FTR_SECTION | ||
| 67 | DSSALL | ||
| 68 | sync | ||
| 69 | END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | ||
| 70 | ori r7,r7,MSR_EE | ||
| 71 | oris r7,r7,MSR_POW@h | ||
| 72 | sync | ||
| 73 | isync | ||
| 74 | mtmsrd r7 | ||
| 75 | isync | ||
| 76 | blr | ||
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 63625e0650b5..f621b7d2d869 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
| @@ -246,12 +246,13 @@ u64 arch_irq_stat_cpu(unsigned int cpu) | |||
| 246 | } | 246 | } |
| 247 | 247 | ||
| 248 | #ifdef CONFIG_HOTPLUG_CPU | 248 | #ifdef CONFIG_HOTPLUG_CPU |
| 249 | void fixup_irqs(const struct cpumask *map) | 249 | void migrate_irqs(void) |
| 250 | { | 250 | { |
| 251 | struct irq_desc *desc; | 251 | struct irq_desc *desc; |
| 252 | unsigned int irq; | 252 | unsigned int irq; |
| 253 | static int warned; | 253 | static int warned; |
| 254 | cpumask_var_t mask; | 254 | cpumask_var_t mask; |
| 255 | const struct cpumask *map = cpu_online_mask; | ||
| 255 | 256 | ||
| 256 | alloc_cpumask_var(&mask, GFP_KERNEL); | 257 | alloc_cpumask_var(&mask, GFP_KERNEL); |
| 257 | 258 | ||
diff --git a/arch/powerpc/kernel/l2cr_6xx.S b/arch/powerpc/kernel/l2cr_6xx.S index 2a2f3c3f6d80..97ec8557f974 100644 --- a/arch/powerpc/kernel/l2cr_6xx.S +++ b/arch/powerpc/kernel/l2cr_6xx.S | |||
| @@ -151,7 +151,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | |||
| 151 | /**** Might be a good idea to set L2DO here - to prevent instructions | 151 | /**** Might be a good idea to set L2DO here - to prevent instructions |
| 152 | from getting into the cache. But since we invalidate | 152 | from getting into the cache. But since we invalidate |
| 153 | the next time we enable the cache it doesn't really matter. | 153 | the next time we enable the cache it doesn't really matter. |
| 154 | Don't do this unless you accomodate all processor variations. | 154 | Don't do this unless you accommodate all processor variations. |
| 155 | The bit moved on the 7450..... | 155 | The bit moved on the 7450..... |
| 156 | ****/ | 156 | ****/ |
| 157 | 157 | ||
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c index c834757bebc0..2b97b80d6d7d 100644 --- a/arch/powerpc/kernel/legacy_serial.c +++ b/arch/powerpc/kernel/legacy_serial.c | |||
| @@ -330,9 +330,11 @@ void __init find_legacy_serial_ports(void) | |||
| 330 | if (!parent) | 330 | if (!parent) |
| 331 | continue; | 331 | continue; |
| 332 | if (of_match_node(legacy_serial_parents, parent) != NULL) { | 332 | if (of_match_node(legacy_serial_parents, parent) != NULL) { |
| 333 | index = add_legacy_soc_port(np, np); | 333 | if (of_device_is_available(np)) { |
| 334 | if (index >= 0 && np == stdout) | 334 | index = add_legacy_soc_port(np, np); |
| 335 | legacy_serial_console = index; | 335 | if (index >= 0 && np == stdout) |
| 336 | legacy_serial_console = index; | ||
| 337 | } | ||
| 336 | } | 338 | } |
| 337 | of_node_put(parent); | 339 | of_node_put(parent); |
| 338 | } | 340 | } |
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 16468362ad57..301db65f05a1 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
| @@ -262,7 +262,7 @@ static void parse_ppp_data(struct seq_file *m) | |||
| 262 | seq_printf(m, "system_active_processors=%d\n", | 262 | seq_printf(m, "system_active_processors=%d\n", |
| 263 | ppp_data.active_system_procs); | 263 | ppp_data.active_system_procs); |
| 264 | 264 | ||
| 265 | /* pool related entries are apropriate for shared configs */ | 265 | /* pool related entries are appropriate for shared configs */ |
| 266 | if (lppaca_of(0).shared_proc) { | 266 | if (lppaca_of(0).shared_proc) { |
| 267 | unsigned long pool_idle_time, pool_procs; | 267 | unsigned long pool_idle_time, pool_procs; |
| 268 | 268 | ||
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c index f4adf89d7614..10f0aadee95b 100644 --- a/arch/powerpc/kernel/paca.c +++ b/arch/powerpc/kernel/paca.c | |||
| @@ -203,7 +203,7 @@ void __init free_unused_pacas(void) | |||
| 203 | { | 203 | { |
| 204 | int new_size; | 204 | int new_size; |
| 205 | 205 | ||
| 206 | new_size = PAGE_ALIGN(sizeof(struct paca_struct) * num_possible_cpus()); | 206 | new_size = PAGE_ALIGN(sizeof(struct paca_struct) * nr_cpu_ids); |
| 207 | 207 | ||
| 208 | if (new_size >= paca_size) | 208 | if (new_size >= paca_size) |
| 209 | return; | 209 | return; |
diff --git a/arch/powerpc/kernel/perf_event.c b/arch/powerpc/kernel/perf_event.c index 97e0ae414940..822f63008ae1 100644 --- a/arch/powerpc/kernel/perf_event.c +++ b/arch/powerpc/kernel/perf_event.c | |||
| @@ -398,6 +398,25 @@ static int check_excludes(struct perf_event **ctrs, unsigned int cflags[], | |||
| 398 | return 0; | 398 | return 0; |
| 399 | } | 399 | } |
| 400 | 400 | ||
| 401 | static u64 check_and_compute_delta(u64 prev, u64 val) | ||
| 402 | { | ||
| 403 | u64 delta = (val - prev) & 0xfffffffful; | ||
| 404 | |||
| 405 | /* | ||
| 406 | * POWER7 can roll back counter values, if the new value is smaller | ||
| 407 | * than the previous value it will cause the delta and the counter to | ||
| 408 | * have bogus values unless we rolled a counter over. If a coutner is | ||
| 409 | * rolled back, it will be smaller, but within 256, which is the maximum | ||
| 410 | * number of events to rollback at once. If we dectect a rollback | ||
| 411 | * return 0. This can lead to a small lack of precision in the | ||
| 412 | * counters. | ||
| 413 | */ | ||
| 414 | if (prev > val && (prev - val) < 256) | ||
| 415 | delta = 0; | ||
| 416 | |||
| 417 | return delta; | ||
| 418 | } | ||
| 419 | |||
| 401 | static void power_pmu_read(struct perf_event *event) | 420 | static void power_pmu_read(struct perf_event *event) |
| 402 | { | 421 | { |
| 403 | s64 val, delta, prev; | 422 | s64 val, delta, prev; |
| @@ -416,10 +435,11 @@ static void power_pmu_read(struct perf_event *event) | |||
| 416 | prev = local64_read(&event->hw.prev_count); | 435 | prev = local64_read(&event->hw.prev_count); |
| 417 | barrier(); | 436 | barrier(); |
| 418 | val = read_pmc(event->hw.idx); | 437 | val = read_pmc(event->hw.idx); |
| 438 | delta = check_and_compute_delta(prev, val); | ||
| 439 | if (!delta) | ||
| 440 | return; | ||
| 419 | } while (local64_cmpxchg(&event->hw.prev_count, prev, val) != prev); | 441 | } while (local64_cmpxchg(&event->hw.prev_count, prev, val) != prev); |
| 420 | 442 | ||
| 421 | /* The counters are only 32 bits wide */ | ||
| 422 | delta = (val - prev) & 0xfffffffful; | ||
| 423 | local64_add(delta, &event->count); | 443 | local64_add(delta, &event->count); |
| 424 | local64_sub(delta, &event->hw.period_left); | 444 | local64_sub(delta, &event->hw.period_left); |
| 425 | } | 445 | } |
| @@ -449,8 +469,9 @@ static void freeze_limited_counters(struct cpu_hw_events *cpuhw, | |||
| 449 | val = (event->hw.idx == 5) ? pmc5 : pmc6; | 469 | val = (event->hw.idx == 5) ? pmc5 : pmc6; |
| 450 | prev = local64_read(&event->hw.prev_count); | 470 | prev = local64_read(&event->hw.prev_count); |
| 451 | event->hw.idx = 0; | 471 | event->hw.idx = 0; |
| 452 | delta = (val - prev) & 0xfffffffful; | 472 | delta = check_and_compute_delta(prev, val); |
| 453 | local64_add(delta, &event->count); | 473 | if (delta) |
| 474 | local64_add(delta, &event->count); | ||
| 454 | } | 475 | } |
| 455 | } | 476 | } |
| 456 | 477 | ||
| @@ -458,14 +479,16 @@ static void thaw_limited_counters(struct cpu_hw_events *cpuhw, | |||
| 458 | unsigned long pmc5, unsigned long pmc6) | 479 | unsigned long pmc5, unsigned long pmc6) |
| 459 | { | 480 | { |
| 460 | struct perf_event *event; | 481 | struct perf_event *event; |
| 461 | u64 val; | 482 | u64 val, prev; |
| 462 | int i; | 483 | int i; |
| 463 | 484 | ||
| 464 | for (i = 0; i < cpuhw->n_limited; ++i) { | 485 | for (i = 0; i < cpuhw->n_limited; ++i) { |
| 465 | event = cpuhw->limited_counter[i]; | 486 | event = cpuhw->limited_counter[i]; |
| 466 | event->hw.idx = cpuhw->limited_hwidx[i]; | 487 | event->hw.idx = cpuhw->limited_hwidx[i]; |
| 467 | val = (event->hw.idx == 5) ? pmc5 : pmc6; | 488 | val = (event->hw.idx == 5) ? pmc5 : pmc6; |
| 468 | local64_set(&event->hw.prev_count, val); | 489 | prev = local64_read(&event->hw.prev_count); |
| 490 | if (check_and_compute_delta(prev, val)) | ||
| 491 | local64_set(&event->hw.prev_count, val); | ||
| 469 | perf_event_update_userpage(event); | 492 | perf_event_update_userpage(event); |
| 470 | } | 493 | } |
| 471 | } | 494 | } |
| @@ -759,7 +782,7 @@ static int power_pmu_add(struct perf_event *event, int ef_flags) | |||
| 759 | 782 | ||
| 760 | /* | 783 | /* |
| 761 | * If group events scheduling transaction was started, | 784 | * If group events scheduling transaction was started, |
| 762 | * skip the schedulability test here, it will be peformed | 785 | * skip the schedulability test here, it will be performed |
| 763 | * at commit time(->commit_txn) as a whole | 786 | * at commit time(->commit_txn) as a whole |
| 764 | */ | 787 | */ |
| 765 | if (cpuhw->group_flag & PERF_EVENT_TXN) | 788 | if (cpuhw->group_flag & PERF_EVENT_TXN) |
| @@ -1197,7 +1220,7 @@ static void record_and_restart(struct perf_event *event, unsigned long val, | |||
| 1197 | 1220 | ||
| 1198 | /* we don't have to worry about interrupts here */ | 1221 | /* we don't have to worry about interrupts here */ |
| 1199 | prev = local64_read(&event->hw.prev_count); | 1222 | prev = local64_read(&event->hw.prev_count); |
| 1200 | delta = (val - prev) & 0xfffffffful; | 1223 | delta = check_and_compute_delta(prev, val); |
| 1201 | local64_add(delta, &event->count); | 1224 | local64_add(delta, &event->count); |
| 1202 | 1225 | ||
| 1203 | /* | 1226 | /* |
diff --git a/arch/powerpc/kernel/ppc_save_regs.S b/arch/powerpc/kernel/ppc_save_regs.S index e83ba3f078e4..1b1787d52896 100644 --- a/arch/powerpc/kernel/ppc_save_regs.S +++ b/arch/powerpc/kernel/ppc_save_regs.S | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | 15 | ||
| 16 | /* | 16 | /* |
| 17 | * Grab the register values as they are now. | 17 | * Grab the register values as they are now. |
| 18 | * This won't do a particularily good job because we really | 18 | * This won't do a particularly good job because we really |
| 19 | * want our caller's caller's registers, and our caller has | 19 | * want our caller's caller's registers, and our caller has |
| 20 | * already executed its prologue. | 20 | * already executed its prologue. |
| 21 | * ToDo: We could reach back into the caller's save area to do | 21 | * ToDo: We could reach back into the caller's save area to do |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 05b7139d6a27..e74fa12afc82 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
| @@ -683,7 +683,7 @@ void __init early_init_devtree(void *params) | |||
| 683 | #endif | 683 | #endif |
| 684 | 684 | ||
| 685 | #ifdef CONFIG_PHYP_DUMP | 685 | #ifdef CONFIG_PHYP_DUMP |
| 686 | /* scan tree to see if dump occured during last boot */ | 686 | /* scan tree to see if dump occurred during last boot */ |
| 687 | of_scan_flat_dt(early_init_dt_scan_phyp_dump, NULL); | 687 | of_scan_flat_dt(early_init_dt_scan_phyp_dump, NULL); |
| 688 | #endif | 688 | #endif |
| 689 | 689 | ||
| @@ -739,7 +739,7 @@ void __init early_init_devtree(void *params) | |||
| 739 | 739 | ||
| 740 | DBG("Scanning CPUs ...\n"); | 740 | DBG("Scanning CPUs ...\n"); |
| 741 | 741 | ||
| 742 | /* Retreive CPU related informations from the flat tree | 742 | /* Retrieve CPU related informations from the flat tree |
| 743 | * (altivec support, boot CPU ID, ...) | 743 | * (altivec support, boot CPU ID, ...) |
| 744 | */ | 744 | */ |
| 745 | of_scan_flat_dt(early_init_dt_scan_cpus, NULL); | 745 | of_scan_flat_dt(early_init_dt_scan_cpus, NULL); |
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 895b082f1e48..55613e33e263 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
| @@ -463,7 +463,7 @@ static int vr_set(struct task_struct *target, const struct user_regset *regset, | |||
| 463 | #ifdef CONFIG_VSX | 463 | #ifdef CONFIG_VSX |
| 464 | /* | 464 | /* |
| 465 | * Currently to set and and get all the vsx state, you need to call | 465 | * Currently to set and and get all the vsx state, you need to call |
| 466 | * the fp and VMX calls aswell. This only get/sets the lower 32 | 466 | * the fp and VMX calls as well. This only get/sets the lower 32 |
| 467 | * 128bit VSX registers. | 467 | * 128bit VSX registers. |
| 468 | */ | 468 | */ |
| 469 | 469 | ||
diff --git a/arch/powerpc/kernel/rtasd.c b/arch/powerpc/kernel/rtasd.c index 7980ec0e1e1a..67f6c3b51357 100644 --- a/arch/powerpc/kernel/rtasd.c +++ b/arch/powerpc/kernel/rtasd.c | |||
| @@ -465,7 +465,7 @@ static void start_event_scan(void) | |||
| 465 | pr_debug("rtasd: will sleep for %d milliseconds\n", | 465 | pr_debug("rtasd: will sleep for %d milliseconds\n", |
| 466 | (30000 / rtas_event_scan_rate)); | 466 | (30000 / rtas_event_scan_rate)); |
| 467 | 467 | ||
| 468 | /* Retreive errors from nvram if any */ | 468 | /* Retrieve errors from nvram if any */ |
| 469 | retreive_nvram_error_log(); | 469 | retreive_nvram_error_log(); |
| 470 | 470 | ||
| 471 | schedule_delayed_work_on(cpumask_first(cpu_online_mask), | 471 | schedule_delayed_work_on(cpumask_first(cpu_online_mask), |
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 9d4882a46647..21f30cb68077 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
| @@ -509,6 +509,9 @@ void __init smp_setup_cpu_maps(void) | |||
| 509 | */ | 509 | */ |
| 510 | cpu_init_thread_core_maps(nthreads); | 510 | cpu_init_thread_core_maps(nthreads); |
| 511 | 511 | ||
| 512 | /* Now that possible cpus are set, set nr_cpu_ids for later use */ | ||
| 513 | nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1; | ||
| 514 | |||
| 512 | free_unused_pacas(); | 515 | free_unused_pacas(); |
| 513 | } | 516 | } |
| 514 | #endif /* CONFIG_SMP */ | 517 | #endif /* CONFIG_SMP */ |
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 981360509172..cbdbb14be4b0 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
| @@ -57,6 +57,25 @@ | |||
| 57 | #define DBG(fmt...) | 57 | #define DBG(fmt...) |
| 58 | #endif | 58 | #endif |
| 59 | 59 | ||
| 60 | |||
| 61 | /* Store all idle threads, this can be reused instead of creating | ||
| 62 | * a new thread. Also avoids complicated thread destroy functionality | ||
| 63 | * for idle threads. | ||
| 64 | */ | ||
| 65 | #ifdef CONFIG_HOTPLUG_CPU | ||
| 66 | /* | ||
| 67 | * Needed only for CONFIG_HOTPLUG_CPU because __cpuinitdata is | ||
| 68 | * removed after init for !CONFIG_HOTPLUG_CPU. | ||
| 69 | */ | ||
| 70 | static DEFINE_PER_CPU(struct task_struct *, idle_thread_array); | ||
| 71 | #define get_idle_for_cpu(x) (per_cpu(idle_thread_array, x)) | ||
| 72 | #define set_idle_for_cpu(x, p) (per_cpu(idle_thread_array, x) = (p)) | ||
| 73 | #else | ||
| 74 | static struct task_struct *idle_thread_array[NR_CPUS] __cpuinitdata ; | ||
| 75 | #define get_idle_for_cpu(x) (idle_thread_array[(x)]) | ||
| 76 | #define set_idle_for_cpu(x, p) (idle_thread_array[(x)] = (p)) | ||
| 77 | #endif | ||
| 78 | |||
| 60 | struct thread_info *secondary_ti; | 79 | struct thread_info *secondary_ti; |
| 61 | 80 | ||
| 62 | DEFINE_PER_CPU(cpumask_var_t, cpu_sibling_map); | 81 | DEFINE_PER_CPU(cpumask_var_t, cpu_sibling_map); |
| @@ -238,23 +257,6 @@ static void __devinit smp_store_cpu_info(int id) | |||
| 238 | per_cpu(cpu_pvr, id) = mfspr(SPRN_PVR); | 257 | per_cpu(cpu_pvr, id) = mfspr(SPRN_PVR); |
| 239 | } | 258 | } |
| 240 | 259 | ||
| 241 | static void __init smp_create_idle(unsigned int cpu) | ||
| 242 | { | ||
| 243 | struct task_struct *p; | ||
| 244 | |||
| 245 | /* create a process for the processor */ | ||
| 246 | p = fork_idle(cpu); | ||
| 247 | if (IS_ERR(p)) | ||
| 248 | panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p)); | ||
| 249 | #ifdef CONFIG_PPC64 | ||
| 250 | paca[cpu].__current = p; | ||
| 251 | paca[cpu].kstack = (unsigned long) task_thread_info(p) | ||
| 252 | + THREAD_SIZE - STACK_FRAME_OVERHEAD; | ||
| 253 | #endif | ||
| 254 | current_set[cpu] = task_thread_info(p); | ||
| 255 | task_thread_info(p)->cpu = cpu; | ||
| 256 | } | ||
| 257 | |||
| 258 | void __init smp_prepare_cpus(unsigned int max_cpus) | 260 | void __init smp_prepare_cpus(unsigned int max_cpus) |
| 259 | { | 261 | { |
| 260 | unsigned int cpu; | 262 | unsigned int cpu; |
| @@ -288,10 +290,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
| 288 | max_cpus = NR_CPUS; | 290 | max_cpus = NR_CPUS; |
| 289 | else | 291 | else |
| 290 | max_cpus = 1; | 292 | max_cpus = 1; |
| 291 | |||
| 292 | for_each_possible_cpu(cpu) | ||
| 293 | if (cpu != boot_cpuid) | ||
| 294 | smp_create_idle(cpu); | ||
| 295 | } | 293 | } |
| 296 | 294 | ||
| 297 | void __devinit smp_prepare_boot_cpu(void) | 295 | void __devinit smp_prepare_boot_cpu(void) |
| @@ -305,7 +303,7 @@ void __devinit smp_prepare_boot_cpu(void) | |||
| 305 | 303 | ||
| 306 | #ifdef CONFIG_HOTPLUG_CPU | 304 | #ifdef CONFIG_HOTPLUG_CPU |
| 307 | /* State of each CPU during hotplug phases */ | 305 | /* State of each CPU during hotplug phases */ |
| 308 | DEFINE_PER_CPU(int, cpu_state) = { 0 }; | 306 | static DEFINE_PER_CPU(int, cpu_state) = { 0 }; |
| 309 | 307 | ||
| 310 | int generic_cpu_disable(void) | 308 | int generic_cpu_disable(void) |
| 311 | { | 309 | { |
| @@ -317,30 +315,8 @@ int generic_cpu_disable(void) | |||
| 317 | set_cpu_online(cpu, false); | 315 | set_cpu_online(cpu, false); |
| 318 | #ifdef CONFIG_PPC64 | 316 | #ifdef CONFIG_PPC64 |
| 319 | vdso_data->processorCount--; | 317 | vdso_data->processorCount--; |
| 320 | fixup_irqs(cpu_online_mask); | ||
| 321 | #endif | ||
| 322 | return 0; | ||
| 323 | } | ||
| 324 | |||
| 325 | int generic_cpu_enable(unsigned int cpu) | ||
| 326 | { | ||
| 327 | /* Do the normal bootup if we haven't | ||
| 328 | * already bootstrapped. */ | ||
| 329 | if (system_state != SYSTEM_RUNNING) | ||
| 330 | return -ENOSYS; | ||
| 331 | |||
| 332 | /* get the target out of it's holding state */ | ||
| 333 | per_cpu(cpu_state, cpu) = CPU_UP_PREPARE; | ||
| 334 | smp_wmb(); | ||
| 335 | |||
| 336 | while (!cpu_online(cpu)) | ||
| 337 | cpu_relax(); | ||
| 338 | |||
| 339 | #ifdef CONFIG_PPC64 | ||
| 340 | fixup_irqs(cpu_online_mask); | ||
| 341 | /* counter the irq disable in fixup_irqs */ | ||
| 342 | local_irq_enable(); | ||
| 343 | #endif | 318 | #endif |
| 319 | migrate_irqs(); | ||
| 344 | return 0; | 320 | return 0; |
| 345 | } | 321 | } |
| 346 | 322 | ||
| @@ -362,37 +338,89 @@ void generic_mach_cpu_die(void) | |||
| 362 | unsigned int cpu; | 338 | unsigned int cpu; |
| 363 | 339 | ||
| 364 | local_irq_disable(); | 340 | local_irq_disable(); |
| 341 | idle_task_exit(); | ||
| 365 | cpu = smp_processor_id(); | 342 | cpu = smp_processor_id(); |
| 366 | printk(KERN_DEBUG "CPU%d offline\n", cpu); | 343 | printk(KERN_DEBUG "CPU%d offline\n", cpu); |
| 367 | __get_cpu_var(cpu_state) = CPU_DEAD; | 344 | __get_cpu_var(cpu_state) = CPU_DEAD; |
| 368 | smp_wmb(); | 345 | smp_wmb(); |
| 369 | while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE) | 346 | while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE) |
| 370 | cpu_relax(); | 347 | cpu_relax(); |
| 371 | set_cpu_online(cpu, true); | 348 | } |
| 372 | local_irq_enable(); | 349 | |
| 350 | void generic_set_cpu_dead(unsigned int cpu) | ||
| 351 | { | ||
| 352 | per_cpu(cpu_state, cpu) = CPU_DEAD; | ||
| 373 | } | 353 | } |
| 374 | #endif | 354 | #endif |
| 375 | 355 | ||
| 376 | static int __devinit cpu_enable(unsigned int cpu) | 356 | struct create_idle { |
| 357 | struct work_struct work; | ||
| 358 | struct task_struct *idle; | ||
| 359 | struct completion done; | ||
| 360 | int cpu; | ||
| 361 | }; | ||
| 362 | |||
| 363 | static void __cpuinit do_fork_idle(struct work_struct *work) | ||
| 377 | { | 364 | { |
| 378 | if (smp_ops && smp_ops->cpu_enable) | 365 | struct create_idle *c_idle = |
| 379 | return smp_ops->cpu_enable(cpu); | 366 | container_of(work, struct create_idle, work); |
| 367 | |||
| 368 | c_idle->idle = fork_idle(c_idle->cpu); | ||
| 369 | complete(&c_idle->done); | ||
| 370 | } | ||
| 371 | |||
| 372 | static int __cpuinit create_idle(unsigned int cpu) | ||
| 373 | { | ||
| 374 | struct thread_info *ti; | ||
| 375 | struct create_idle c_idle = { | ||
| 376 | .cpu = cpu, | ||
| 377 | .done = COMPLETION_INITIALIZER_ONSTACK(c_idle.done), | ||
| 378 | }; | ||
| 379 | INIT_WORK_ONSTACK(&c_idle.work, do_fork_idle); | ||
| 380 | |||
| 381 | c_idle.idle = get_idle_for_cpu(cpu); | ||
| 382 | |||
| 383 | /* We can't use kernel_thread since we must avoid to | ||
| 384 | * reschedule the child. We use a workqueue because | ||
| 385 | * we want to fork from a kernel thread, not whatever | ||
| 386 | * userspace process happens to be trying to online us. | ||
| 387 | */ | ||
| 388 | if (!c_idle.idle) { | ||
| 389 | schedule_work(&c_idle.work); | ||
| 390 | wait_for_completion(&c_idle.done); | ||
| 391 | } else | ||
| 392 | init_idle(c_idle.idle, cpu); | ||
| 393 | if (IS_ERR(c_idle.idle)) { | ||
| 394 | pr_err("Failed fork for CPU %u: %li", cpu, PTR_ERR(c_idle.idle)); | ||
| 395 | return PTR_ERR(c_idle.idle); | ||
| 396 | } | ||
| 397 | ti = task_thread_info(c_idle.idle); | ||
| 398 | |||
| 399 | #ifdef CONFIG_PPC64 | ||
| 400 | paca[cpu].__current = c_idle.idle; | ||
| 401 | paca[cpu].kstack = (unsigned long)ti + THREAD_SIZE - STACK_FRAME_OVERHEAD; | ||
| 402 | #endif | ||
| 403 | ti->cpu = cpu; | ||
| 404 | current_set[cpu] = ti; | ||
| 380 | 405 | ||
| 381 | return -ENOSYS; | 406 | return 0; |
| 382 | } | 407 | } |
| 383 | 408 | ||
| 384 | int __cpuinit __cpu_up(unsigned int cpu) | 409 | int __cpuinit __cpu_up(unsigned int cpu) |
| 385 | { | 410 | { |
| 386 | int c; | 411 | int rc, c; |
| 387 | 412 | ||
| 388 | secondary_ti = current_set[cpu]; | 413 | secondary_ti = current_set[cpu]; |
| 389 | if (!cpu_enable(cpu)) | ||
| 390 | return 0; | ||
| 391 | 414 | ||
| 392 | if (smp_ops == NULL || | 415 | if (smp_ops == NULL || |
| 393 | (smp_ops->cpu_bootable && !smp_ops->cpu_bootable(cpu))) | 416 | (smp_ops->cpu_bootable && !smp_ops->cpu_bootable(cpu))) |
| 394 | return -EINVAL; | 417 | return -EINVAL; |
| 395 | 418 | ||
| 419 | /* Make sure we have an idle thread */ | ||
| 420 | rc = create_idle(cpu); | ||
| 421 | if (rc) | ||
| 422 | return rc; | ||
| 423 | |||
| 396 | /* Make sure callin-map entry is 0 (can be leftover a CPU | 424 | /* Make sure callin-map entry is 0 (can be leftover a CPU |
| 397 | * hotplug | 425 | * hotplug |
| 398 | */ | 426 | */ |
| @@ -502,7 +530,7 @@ static struct device_node *cpu_to_l2cache(int cpu) | |||
| 502 | } | 530 | } |
| 503 | 531 | ||
| 504 | /* Activate a secondary processor. */ | 532 | /* Activate a secondary processor. */ |
| 505 | int __devinit start_secondary(void *unused) | 533 | void __devinit start_secondary(void *unused) |
| 506 | { | 534 | { |
| 507 | unsigned int cpu = smp_processor_id(); | 535 | unsigned int cpu = smp_processor_id(); |
| 508 | struct device_node *l2_cache; | 536 | struct device_node *l2_cache; |
| @@ -523,6 +551,10 @@ int __devinit start_secondary(void *unused) | |||
| 523 | 551 | ||
| 524 | secondary_cpu_time_init(); | 552 | secondary_cpu_time_init(); |
| 525 | 553 | ||
| 554 | #ifdef CONFIG_PPC64 | ||
| 555 | if (system_state == SYSTEM_RUNNING) | ||
| 556 | vdso_data->processorCount++; | ||
| 557 | #endif | ||
| 526 | ipi_call_lock(); | 558 | ipi_call_lock(); |
| 527 | notify_cpu_starting(cpu); | 559 | notify_cpu_starting(cpu); |
| 528 | set_cpu_online(cpu, true); | 560 | set_cpu_online(cpu, true); |
| @@ -558,7 +590,8 @@ int __devinit start_secondary(void *unused) | |||
| 558 | local_irq_enable(); | 590 | local_irq_enable(); |
| 559 | 591 | ||
| 560 | cpu_idle(); | 592 | cpu_idle(); |
| 561 | return 0; | 593 | |
| 594 | BUG(); | ||
| 562 | } | 595 | } |
| 563 | 596 | ||
| 564 | int setup_profiling_timer(unsigned int multiplier) | 597 | int setup_profiling_timer(unsigned int multiplier) |
| @@ -585,7 +618,11 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
| 585 | 618 | ||
| 586 | free_cpumask_var(old_mask); | 619 | free_cpumask_var(old_mask); |
| 587 | 620 | ||
| 621 | if (smp_ops && smp_ops->bringup_done) | ||
| 622 | smp_ops->bringup_done(); | ||
| 623 | |||
| 588 | dump_numa_cpu_topology(); | 624 | dump_numa_cpu_topology(); |
| 625 | |||
| 589 | } | 626 | } |
| 590 | 627 | ||
| 591 | int arch_sd_sibling_asym_packing(void) | 628 | int arch_sd_sibling_asym_packing(void) |
| @@ -660,5 +697,9 @@ void cpu_die(void) | |||
| 660 | { | 697 | { |
| 661 | if (ppc_md.cpu_die) | 698 | if (ppc_md.cpu_die) |
| 662 | ppc_md.cpu_die(); | 699 | ppc_md.cpu_die(); |
| 700 | |||
| 701 | /* If we return, we re-enter start_secondary */ | ||
| 702 | start_secondary_resume(); | ||
| 663 | } | 703 | } |
| 704 | |||
| 664 | #endif | 705 | #endif |
diff --git a/arch/powerpc/kernel/swsusp_32.S b/arch/powerpc/kernel/swsusp_32.S index b0754e237438..ba4dee3d233f 100644 --- a/arch/powerpc/kernel/swsusp_32.S +++ b/arch/powerpc/kernel/swsusp_32.S | |||
| @@ -143,7 +143,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | |||
| 143 | 143 | ||
| 144 | /* Disable MSR:DR to make sure we don't take a TLB or | 144 | /* Disable MSR:DR to make sure we don't take a TLB or |
| 145 | * hash miss during the copy, as our hash table will | 145 | * hash miss during the copy, as our hash table will |
| 146 | * for a while be unuseable. For .text, we assume we are | 146 | * for a while be unusable. For .text, we assume we are |
| 147 | * covered by a BAT. This works only for non-G5 at this | 147 | * covered by a BAT. This works only for non-G5 at this |
| 148 | * point. G5 will need a better approach, possibly using | 148 | * point. G5 will need a better approach, possibly using |
| 149 | * a small temporary hash table filled with large mappings, | 149 | * a small temporary hash table filled with large mappings, |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 09d31dbf43f9..f33acfd872ad 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
| @@ -229,6 +229,9 @@ static u64 scan_dispatch_log(u64 stop_tb) | |||
| 229 | u64 stolen = 0; | 229 | u64 stolen = 0; |
| 230 | u64 dtb; | 230 | u64 dtb; |
| 231 | 231 | ||
| 232 | if (!dtl) | ||
| 233 | return 0; | ||
| 234 | |||
| 232 | if (i == vpa->dtl_idx) | 235 | if (i == vpa->dtl_idx) |
| 233 | return 0; | 236 | return 0; |
| 234 | while (i < vpa->dtl_idx) { | 237 | while (i < vpa->dtl_idx) { |
| @@ -356,7 +359,7 @@ void account_system_vtime(struct task_struct *tsk) | |||
| 356 | } | 359 | } |
| 357 | get_paca()->user_time_scaled += user_scaled; | 360 | get_paca()->user_time_scaled += user_scaled; |
| 358 | 361 | ||
| 359 | if (in_irq() || idle_task(smp_processor_id()) != tsk) { | 362 | if (in_interrupt() || idle_task(smp_processor_id()) != tsk) { |
| 360 | account_system_time(tsk, 0, delta, sys_scaled); | 363 | account_system_time(tsk, 0, delta, sys_scaled); |
| 361 | if (stolen) | 364 | if (stolen) |
| 362 | account_steal_time(stolen); | 365 | account_steal_time(stolen); |
| @@ -577,14 +580,21 @@ void timer_interrupt(struct pt_regs * regs) | |||
| 577 | struct clock_event_device *evt = &decrementer->event; | 580 | struct clock_event_device *evt = &decrementer->event; |
| 578 | u64 now; | 581 | u64 now; |
| 579 | 582 | ||
| 583 | /* Ensure a positive value is written to the decrementer, or else | ||
| 584 | * some CPUs will continue to take decrementer exceptions. | ||
| 585 | */ | ||
| 586 | set_dec(DECREMENTER_MAX); | ||
| 587 | |||
| 588 | /* Some implementations of hotplug will get timer interrupts while | ||
| 589 | * offline, just ignore these | ||
| 590 | */ | ||
| 591 | if (!cpu_online(smp_processor_id())) | ||
| 592 | return; | ||
| 593 | |||
| 580 | trace_timer_interrupt_entry(regs); | 594 | trace_timer_interrupt_entry(regs); |
| 581 | 595 | ||
| 582 | __get_cpu_var(irq_stat).timer_irqs++; | 596 | __get_cpu_var(irq_stat).timer_irqs++; |
| 583 | 597 | ||
| 584 | /* Ensure a positive value is written to the decrementer, or else | ||
| 585 | * some CPUs will continuue to take decrementer exceptions */ | ||
| 586 | set_dec(DECREMENTER_MAX); | ||
| 587 | |||
| 588 | #if defined(CONFIG_PPC32) && defined(CONFIG_PMAC) | 598 | #if defined(CONFIG_PPC32) && defined(CONFIG_PMAC) |
| 589 | if (atomic_read(&ppc_n_lost_interrupts) != 0) | 599 | if (atomic_read(&ppc_n_lost_interrupts) != 0) |
| 590 | do_IRQ(regs); | 600 | do_IRQ(regs); |
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index bd74fac169be..5ddb801bc154 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
| @@ -959,7 +959,7 @@ void __kprobes program_check_exception(struct pt_regs *regs) | |||
| 959 | * ESR_DST (!?) or 0. In the process of chasing this with the | 959 | * ESR_DST (!?) or 0. In the process of chasing this with the |
| 960 | * hardware people - not sure if it can happen on any illegal | 960 | * hardware people - not sure if it can happen on any illegal |
| 961 | * instruction or only on FP instructions, whether there is a | 961 | * instruction or only on FP instructions, whether there is a |
| 962 | * pattern to occurences etc. -dgibson 31/Mar/2003 */ | 962 | * pattern to occurrences etc. -dgibson 31/Mar/2003 */ |
| 963 | switch (do_mathemu(regs)) { | 963 | switch (do_mathemu(regs)) { |
| 964 | case 0: | 964 | case 0: |
| 965 | emulate_single_step(regs); | 965 | emulate_single_step(regs); |
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c index b4b167b33643..baa33a7517bc 100644 --- a/arch/powerpc/kernel/udbg_16550.c +++ b/arch/powerpc/kernel/udbg_16550.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * udbg for NS16550 compatable serial ports | 2 | * udbg for NS16550 compatible serial ports |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2001-2005 PPC 64 Team, IBM Corp | 4 | * Copyright (C) 2001-2005 PPC 64 Team, IBM Corp |
| 5 | * | 5 | * |
diff --git a/arch/powerpc/kernel/vdso32/sigtramp.S b/arch/powerpc/kernel/vdso32/sigtramp.S index 68d49dd71dcc..cf0c9c9c24f9 100644 --- a/arch/powerpc/kernel/vdso32/sigtramp.S +++ b/arch/powerpc/kernel/vdso32/sigtramp.S | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | 19 | ||
| 20 | /* The nop here is a hack. The dwarf2 unwind routines subtract 1 from | 20 | /* The nop here is a hack. The dwarf2 unwind routines subtract 1 from |
| 21 | the return address to get an address in the middle of the presumed | 21 | the return address to get an address in the middle of the presumed |
| 22 | call instruction. Since we don't have a call here, we artifically | 22 | call instruction. Since we don't have a call here, we artificially |
| 23 | extend the range covered by the unwind info by adding a nop before | 23 | extend the range covered by the unwind info by adding a nop before |
| 24 | the real start. */ | 24 | the real start. */ |
| 25 | nop | 25 | nop |
diff --git a/arch/powerpc/kernel/vdso64/sigtramp.S b/arch/powerpc/kernel/vdso64/sigtramp.S index 59eb59bb4082..45ea281e9a21 100644 --- a/arch/powerpc/kernel/vdso64/sigtramp.S +++ b/arch/powerpc/kernel/vdso64/sigtramp.S | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | 20 | ||
| 21 | /* The nop here is a hack. The dwarf2 unwind routines subtract 1 from | 21 | /* The nop here is a hack. The dwarf2 unwind routines subtract 1 from |
| 22 | the return address to get an address in the middle of the presumed | 22 | the return address to get an address in the middle of the presumed |
| 23 | call instruction. Since we don't have a call here, we artifically | 23 | call instruction. Since we don't have a call here, we artificially |
| 24 | extend the range covered by the unwind info by padding before the | 24 | extend the range covered by the unwind info by padding before the |
| 25 | real start. */ | 25 | real start. */ |
| 26 | nop | 26 | nop |
diff --git a/arch/powerpc/mm/dma-noncoherent.c b/arch/powerpc/mm/dma-noncoherent.c index 757c0bed9a91..b42f76c4948d 100644 --- a/arch/powerpc/mm/dma-noncoherent.c +++ b/arch/powerpc/mm/dma-noncoherent.c | |||
| @@ -399,3 +399,23 @@ void __dma_sync_page(struct page *page, unsigned long offset, | |||
| 399 | #endif | 399 | #endif |
| 400 | } | 400 | } |
| 401 | EXPORT_SYMBOL(__dma_sync_page); | 401 | EXPORT_SYMBOL(__dma_sync_page); |
| 402 | |||
| 403 | /* | ||
| 404 | * Return the PFN for a given cpu virtual address returned by | ||
| 405 | * __dma_alloc_coherent. This is used by dma_mmap_coherent() | ||
| 406 | */ | ||
| 407 | unsigned long __dma_get_coherent_pfn(unsigned long cpu_addr) | ||
| 408 | { | ||
| 409 | /* This should always be populated, so we don't test every | ||
| 410 | * level. If that fails, we'll have a nice crash which | ||
| 411 | * will be as good as a BUG_ON() | ||
| 412 | */ | ||
| 413 | pgd_t *pgd = pgd_offset_k(cpu_addr); | ||
| 414 | pud_t *pud = pud_offset(pgd, cpu_addr); | ||
| 415 | pmd_t *pmd = pmd_offset(pud, cpu_addr); | ||
| 416 | pte_t *ptep = pte_offset_kernel(pmd, cpu_addr); | ||
| 417 | |||
| 418 | if (pte_none(*ptep) || !pte_present(*ptep)) | ||
| 419 | return 0; | ||
| 420 | return pte_pfn(*ptep); | ||
| 421 | } | ||
diff --git a/arch/powerpc/mm/hash_low_64.S b/arch/powerpc/mm/hash_low_64.S index 3079f6b44cf5..5b7dd4ea02b5 100644 --- a/arch/powerpc/mm/hash_low_64.S +++ b/arch/powerpc/mm/hash_low_64.S | |||
| @@ -192,8 +192,8 @@ htab_insert_pte: | |||
| 192 | rldicr r3,r0,3,63-3 /* r3 = (hash & mask) << 3 */ | 192 | rldicr r3,r0,3,63-3 /* r3 = (hash & mask) << 3 */ |
| 193 | 193 | ||
| 194 | /* Call ppc_md.hpte_insert */ | 194 | /* Call ppc_md.hpte_insert */ |
| 195 | ld r6,STK_PARM(r4)(r1) /* Retreive new pp bits */ | 195 | ld r6,STK_PARM(r4)(r1) /* Retrieve new pp bits */ |
| 196 | mr r4,r29 /* Retreive va */ | 196 | mr r4,r29 /* Retrieve va */ |
| 197 | li r7,0 /* !bolted, !secondary */ | 197 | li r7,0 /* !bolted, !secondary */ |
| 198 | li r8,MMU_PAGE_4K /* page size */ | 198 | li r8,MMU_PAGE_4K /* page size */ |
| 199 | ld r9,STK_PARM(r9)(r1) /* segment size */ | 199 | ld r9,STK_PARM(r9)(r1) /* segment size */ |
| @@ -215,8 +215,8 @@ _GLOBAL(htab_call_hpte_insert1) | |||
| 215 | rldicr r3,r0,3,63-3 /* r0 = (~hash & mask) << 3 */ | 215 | rldicr r3,r0,3,63-3 /* r0 = (~hash & mask) << 3 */ |
| 216 | 216 | ||
| 217 | /* Call ppc_md.hpte_insert */ | 217 | /* Call ppc_md.hpte_insert */ |
| 218 | ld r6,STK_PARM(r4)(r1) /* Retreive new pp bits */ | 218 | ld r6,STK_PARM(r4)(r1) /* Retrieve new pp bits */ |
| 219 | mr r4,r29 /* Retreive va */ | 219 | mr r4,r29 /* Retrieve va */ |
| 220 | li r7,HPTE_V_SECONDARY /* !bolted, secondary */ | 220 | li r7,HPTE_V_SECONDARY /* !bolted, secondary */ |
| 221 | li r8,MMU_PAGE_4K /* page size */ | 221 | li r8,MMU_PAGE_4K /* page size */ |
| 222 | ld r9,STK_PARM(r9)(r1) /* segment size */ | 222 | ld r9,STK_PARM(r9)(r1) /* segment size */ |
| @@ -495,8 +495,8 @@ htab_special_pfn: | |||
| 495 | rldicr r3,r0,3,63-3 /* r0 = (hash & mask) << 3 */ | 495 | rldicr r3,r0,3,63-3 /* r0 = (hash & mask) << 3 */ |
| 496 | 496 | ||
| 497 | /* Call ppc_md.hpte_insert */ | 497 | /* Call ppc_md.hpte_insert */ |
| 498 | ld r6,STK_PARM(r4)(r1) /* Retreive new pp bits */ | 498 | ld r6,STK_PARM(r4)(r1) /* Retrieve new pp bits */ |
| 499 | mr r4,r29 /* Retreive va */ | 499 | mr r4,r29 /* Retrieve va */ |
| 500 | li r7,0 /* !bolted, !secondary */ | 500 | li r7,0 /* !bolted, !secondary */ |
| 501 | li r8,MMU_PAGE_4K /* page size */ | 501 | li r8,MMU_PAGE_4K /* page size */ |
| 502 | ld r9,STK_PARM(r9)(r1) /* segment size */ | 502 | ld r9,STK_PARM(r9)(r1) /* segment size */ |
| @@ -522,8 +522,8 @@ _GLOBAL(htab_call_hpte_insert1) | |||
| 522 | rldicr r3,r0,3,63-3 /* r0 = (~hash & mask) << 3 */ | 522 | rldicr r3,r0,3,63-3 /* r0 = (~hash & mask) << 3 */ |
| 523 | 523 | ||
| 524 | /* Call ppc_md.hpte_insert */ | 524 | /* Call ppc_md.hpte_insert */ |
| 525 | ld r6,STK_PARM(r4)(r1) /* Retreive new pp bits */ | 525 | ld r6,STK_PARM(r4)(r1) /* Retrieve new pp bits */ |
| 526 | mr r4,r29 /* Retreive va */ | 526 | mr r4,r29 /* Retrieve va */ |
| 527 | li r7,HPTE_V_SECONDARY /* !bolted, secondary */ | 527 | li r7,HPTE_V_SECONDARY /* !bolted, secondary */ |
| 528 | li r8,MMU_PAGE_4K /* page size */ | 528 | li r8,MMU_PAGE_4K /* page size */ |
| 529 | ld r9,STK_PARM(r9)(r1) /* segment size */ | 529 | ld r9,STK_PARM(r9)(r1) /* segment size */ |
| @@ -813,8 +813,8 @@ ht64_insert_pte: | |||
| 813 | rldicr r3,r0,3,63-3 /* r0 = (hash & mask) << 3 */ | 813 | rldicr r3,r0,3,63-3 /* r0 = (hash & mask) << 3 */ |
| 814 | 814 | ||
| 815 | /* Call ppc_md.hpte_insert */ | 815 | /* Call ppc_md.hpte_insert */ |
| 816 | ld r6,STK_PARM(r4)(r1) /* Retreive new pp bits */ | 816 | ld r6,STK_PARM(r4)(r1) /* Retrieve new pp bits */ |
| 817 | mr r4,r29 /* Retreive va */ | 817 | mr r4,r29 /* Retrieve va */ |
| 818 | li r7,0 /* !bolted, !secondary */ | 818 | li r7,0 /* !bolted, !secondary */ |
| 819 | li r8,MMU_PAGE_64K | 819 | li r8,MMU_PAGE_64K |
| 820 | ld r9,STK_PARM(r9)(r1) /* segment size */ | 820 | ld r9,STK_PARM(r9)(r1) /* segment size */ |
| @@ -836,8 +836,8 @@ _GLOBAL(ht64_call_hpte_insert1) | |||
| 836 | rldicr r3,r0,3,63-3 /* r0 = (~hash & mask) << 3 */ | 836 | rldicr r3,r0,3,63-3 /* r0 = (~hash & mask) << 3 */ |
| 837 | 837 | ||
| 838 | /* Call ppc_md.hpte_insert */ | 838 | /* Call ppc_md.hpte_insert */ |
| 839 | ld r6,STK_PARM(r4)(r1) /* Retreive new pp bits */ | 839 | ld r6,STK_PARM(r4)(r1) /* Retrieve new pp bits */ |
| 840 | mr r4,r29 /* Retreive va */ | 840 | mr r4,r29 /* Retrieve va */ |
| 841 | li r7,HPTE_V_SECONDARY /* !bolted, secondary */ | 841 | li r7,HPTE_V_SECONDARY /* !bolted, secondary */ |
| 842 | li r8,MMU_PAGE_64K | 842 | li r8,MMU_PAGE_64K |
| 843 | ld r9,STK_PARM(r9)(r1) /* segment size */ | 843 | ld r9,STK_PARM(r9)(r1) /* segment size */ |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index a5991facddce..58a022d0f463 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
| @@ -753,7 +753,7 @@ void __cpuinit early_init_mmu_secondary(void) | |||
| 753 | mtspr(SPRN_SDR1, _SDR1); | 753 | mtspr(SPRN_SDR1, _SDR1); |
| 754 | 754 | ||
| 755 | /* Initialize STAB/SLB. We use a virtual address as it works | 755 | /* Initialize STAB/SLB. We use a virtual address as it works |
| 756 | * in real mode on pSeries and we want a virutal address on | 756 | * in real mode on pSeries and we want a virtual address on |
| 757 | * iSeries anyway | 757 | * iSeries anyway |
| 758 | */ | 758 | */ |
| 759 | if (cpu_has_feature(CPU_FTR_SLB)) | 759 | if (cpu_has_feature(CPU_FTR_SLB)) |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index a66499650909..57e545b84bf1 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
| @@ -424,7 +424,7 @@ void clear_user_page(void *page, unsigned long vaddr, struct page *pg) | |||
| 424 | clear_page(page); | 424 | clear_page(page); |
| 425 | 425 | ||
| 426 | /* | 426 | /* |
| 427 | * We shouldnt have to do this, but some versions of glibc | 427 | * We shouldn't have to do this, but some versions of glibc |
| 428 | * require it (ld.so assumes zero filled pages are icache clean) | 428 | * require it (ld.so assumes zero filled pages are icache clean) |
| 429 | * - Anton | 429 | * - Anton |
| 430 | */ | 430 | */ |
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 0dc95c0aa3be..5ec1dad2a19d 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
| @@ -440,11 +440,11 @@ static void read_drconf_cell(struct of_drconf_cell *drmem, const u32 **cellp) | |||
| 440 | } | 440 | } |
| 441 | 441 | ||
| 442 | /* | 442 | /* |
| 443 | * Retreive and validate the ibm,dynamic-memory property of the device tree. | 443 | * Retrieve and validate the ibm,dynamic-memory property of the device tree. |
| 444 | * | 444 | * |
| 445 | * The layout of the ibm,dynamic-memory property is a number N of memblock | 445 | * The layout of the ibm,dynamic-memory property is a number N of memblock |
| 446 | * list entries followed by N memblock list entries. Each memblock list entry | 446 | * list entries followed by N memblock list entries. Each memblock list entry |
| 447 | * contains information as layed out in the of_drconf_cell struct above. | 447 | * contains information as laid out in the of_drconf_cell struct above. |
| 448 | */ | 448 | */ |
| 449 | static int of_get_drconf_memory(struct device_node *memory, const u32 **dm) | 449 | static int of_get_drconf_memory(struct device_node *memory, const u32 **dm) |
| 450 | { | 450 | { |
| @@ -468,7 +468,7 @@ static int of_get_drconf_memory(struct device_node *memory, const u32 **dm) | |||
| 468 | } | 468 | } |
| 469 | 469 | ||
| 470 | /* | 470 | /* |
| 471 | * Retreive and validate the ibm,lmb-size property for drconf memory | 471 | * Retrieve and validate the ibm,lmb-size property for drconf memory |
| 472 | * from the device tree. | 472 | * from the device tree. |
| 473 | */ | 473 | */ |
| 474 | static u64 of_get_lmb_size(struct device_node *memory) | 474 | static u64 of_get_lmb_size(struct device_node *memory) |
| @@ -490,7 +490,7 @@ struct assoc_arrays { | |||
| 490 | }; | 490 | }; |
| 491 | 491 | ||
| 492 | /* | 492 | /* |
| 493 | * Retreive and validate the list of associativity arrays for drconf | 493 | * Retrieve and validate the list of associativity arrays for drconf |
| 494 | * memory from the ibm,associativity-lookup-arrays property of the | 494 | * memory from the ibm,associativity-lookup-arrays property of the |
| 495 | * device tree.. | 495 | * device tree.. |
| 496 | * | 496 | * |
| @@ -604,7 +604,7 @@ static int __cpuinit cpu_numa_callback(struct notifier_block *nfb, | |||
| 604 | * Returns the size the region should have to enforce the memory limit. | 604 | * Returns the size the region should have to enforce the memory limit. |
| 605 | * This will either be the original value of size, a truncated value, | 605 | * This will either be the original value of size, a truncated value, |
| 606 | * or zero. If the returned value of size is 0 the region should be | 606 | * or zero. If the returned value of size is 0 the region should be |
| 607 | * discarded as it lies wholy above the memory limit. | 607 | * discarded as it lies wholly above the memory limit. |
| 608 | */ | 608 | */ |
| 609 | static unsigned long __init numa_enforce_memory_limit(unsigned long start, | 609 | static unsigned long __init numa_enforce_memory_limit(unsigned long start, |
| 610 | unsigned long size) | 610 | unsigned long size) |
diff --git a/arch/powerpc/mm/tlb_low_64e.S b/arch/powerpc/mm/tlb_low_64e.S index 8526bd9d2aa3..af0892209417 100644 --- a/arch/powerpc/mm/tlb_low_64e.S +++ b/arch/powerpc/mm/tlb_low_64e.S | |||
| @@ -192,7 +192,7 @@ normal_tlb_miss: | |||
| 192 | or r10,r15,r14 | 192 | or r10,r15,r14 |
| 193 | 193 | ||
| 194 | BEGIN_MMU_FTR_SECTION | 194 | BEGIN_MMU_FTR_SECTION |
| 195 | /* Set the TLB reservation and seach for existing entry. Then load | 195 | /* Set the TLB reservation and search for existing entry. Then load |
| 196 | * the entry. | 196 | * the entry. |
| 197 | */ | 197 | */ |
| 198 | PPC_TLBSRX_DOT(0,r16) | 198 | PPC_TLBSRX_DOT(0,r16) |
| @@ -425,13 +425,13 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_USE_TLBRSRV) | |||
| 425 | 425 | ||
| 426 | virt_page_table_tlb_miss_fault: | 426 | virt_page_table_tlb_miss_fault: |
| 427 | /* If we fault here, things are a little bit tricky. We need to call | 427 | /* If we fault here, things are a little bit tricky. We need to call |
| 428 | * either data or instruction store fault, and we need to retreive | 428 | * either data or instruction store fault, and we need to retrieve |
| 429 | * the original fault address and ESR (for data). | 429 | * the original fault address and ESR (for data). |
| 430 | * | 430 | * |
| 431 | * The thing is, we know that in normal circumstances, this is | 431 | * The thing is, we know that in normal circumstances, this is |
| 432 | * always called as a second level tlb miss for SW load or as a first | 432 | * always called as a second level tlb miss for SW load or as a first |
| 433 | * level TLB miss for HW load, so we should be able to peek at the | 433 | * level TLB miss for HW load, so we should be able to peek at the |
| 434 | * relevant informations in the first exception frame in the PACA. | 434 | * relevant information in the first exception frame in the PACA. |
| 435 | * | 435 | * |
| 436 | * However, we do need to double check that, because we may just hit | 436 | * However, we do need to double check that, because we may just hit |
| 437 | * a stray kernel pointer or a userland attack trying to hit those | 437 | * a stray kernel pointer or a userland attack trying to hit those |
diff --git a/arch/powerpc/oprofile/op_model_cell.c b/arch/powerpc/oprofile/op_model_cell.c index c4d2b7167568..cb515cff745c 100644 --- a/arch/powerpc/oprofile/op_model_cell.c +++ b/arch/powerpc/oprofile/op_model_cell.c | |||
| @@ -67,7 +67,7 @@ | |||
| 67 | 67 | ||
| 68 | #define MAX_SPU_COUNT 0xFFFFFF /* maximum 24 bit LFSR value */ | 68 | #define MAX_SPU_COUNT 0xFFFFFF /* maximum 24 bit LFSR value */ |
| 69 | 69 | ||
| 70 | /* Minumum HW interval timer setting to send value to trace buffer is 10 cycle. | 70 | /* Minimum HW interval timer setting to send value to trace buffer is 10 cycle. |
| 71 | * To configure counter to send value every N cycles set counter to | 71 | * To configure counter to send value every N cycles set counter to |
| 72 | * 2^32 - 1 - N. | 72 | * 2^32 - 1 - N. |
| 73 | */ | 73 | */ |
| @@ -1470,7 +1470,7 @@ static int cell_global_start(struct op_counter_config *ctr) | |||
| 1470 | * trace buffer at the maximum rate possible. The trace buffer is configured | 1470 | * trace buffer at the maximum rate possible. The trace buffer is configured |
| 1471 | * to store the PCs, wrapping when it is full. The performance counter is | 1471 | * to store the PCs, wrapping when it is full. The performance counter is |
| 1472 | * initialized to the max hardware count minus the number of events, N, between | 1472 | * initialized to the max hardware count minus the number of events, N, between |
| 1473 | * samples. Once the N events have occured, a HW counter overflow occurs | 1473 | * samples. Once the N events have occurred, a HW counter overflow occurs |
| 1474 | * causing the generation of a HW counter interrupt which also stops the | 1474 | * causing the generation of a HW counter interrupt which also stops the |
| 1475 | * writing of the SPU PC values to the trace buffer. Hence the last PC | 1475 | * writing of the SPU PC values to the trace buffer. Hence the last PC |
| 1476 | * written to the trace buffer is the SPU PC that we want. Unfortunately, | 1476 | * written to the trace buffer is the SPU PC that we want. Unfortunately, |
| @@ -1656,7 +1656,7 @@ static void cell_handle_interrupt_ppu(struct pt_regs *regs, | |||
| 1656 | * The counters were frozen by the interrupt. | 1656 | * The counters were frozen by the interrupt. |
| 1657 | * Reenable the interrupt and restart the counters. | 1657 | * Reenable the interrupt and restart the counters. |
| 1658 | * If there was a race between the interrupt handler and | 1658 | * If there was a race between the interrupt handler and |
| 1659 | * the virtual counter routine. The virutal counter | 1659 | * the virtual counter routine. The virtual counter |
| 1660 | * routine may have cleared the interrupts. Hence must | 1660 | * routine may have cleared the interrupts. Hence must |
| 1661 | * use the virt_cntr_inter_mask to re-enable the interrupts. | 1661 | * use the virt_cntr_inter_mask to re-enable the interrupts. |
| 1662 | */ | 1662 | */ |
diff --git a/arch/powerpc/oprofile/op_model_power4.c b/arch/powerpc/oprofile/op_model_power4.c index 80774092db77..8ee51a252cf1 100644 --- a/arch/powerpc/oprofile/op_model_power4.c +++ b/arch/powerpc/oprofile/op_model_power4.c | |||
| @@ -207,7 +207,7 @@ static unsigned long get_pc(struct pt_regs *regs) | |||
| 207 | unsigned long mmcra; | 207 | unsigned long mmcra; |
| 208 | unsigned long slot; | 208 | unsigned long slot; |
| 209 | 209 | ||
| 210 | /* Cant do much about it */ | 210 | /* Can't do much about it */ |
| 211 | if (!cur_cpu_spec->oprofile_mmcra_sihv) | 211 | if (!cur_cpu_spec->oprofile_mmcra_sihv) |
| 212 | return pc; | 212 | return pc; |
| 213 | 213 | ||
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c index 6385d883cb8d..9940ce8a2d4e 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | |||
| @@ -57,7 +57,7 @@ struct mpc52xx_lpbfifo { | |||
| 57 | static struct mpc52xx_lpbfifo lpbfifo; | 57 | static struct mpc52xx_lpbfifo lpbfifo; |
| 58 | 58 | ||
| 59 | /** | 59 | /** |
| 60 | * mpc52xx_lpbfifo_kick - Trigger the next block of data to be transfered | 60 | * mpc52xx_lpbfifo_kick - Trigger the next block of data to be transferred |
| 61 | */ | 61 | */ |
| 62 | static void mpc52xx_lpbfifo_kick(struct mpc52xx_lpbfifo_request *req) | 62 | static void mpc52xx_lpbfifo_kick(struct mpc52xx_lpbfifo_request *req) |
| 63 | { | 63 | { |
| @@ -179,7 +179,7 @@ static void mpc52xx_lpbfifo_kick(struct mpc52xx_lpbfifo_request *req) | |||
| 179 | * | 179 | * |
| 180 | * On transmit, the dma completion irq triggers before the fifo completion | 180 | * On transmit, the dma completion irq triggers before the fifo completion |
| 181 | * triggers. Handle the dma completion here instead of the LPB FIFO Bestcomm | 181 | * triggers. Handle the dma completion here instead of the LPB FIFO Bestcomm |
| 182 | * task completion irq becuase everyting is not really done until the LPB FIFO | 182 | * task completion irq because everything is not really done until the LPB FIFO |
| 183 | * completion irq triggers. | 183 | * completion irq triggers. |
| 184 | * | 184 | * |
| 185 | * In other words: | 185 | * In other words: |
| @@ -195,7 +195,7 @@ static void mpc52xx_lpbfifo_kick(struct mpc52xx_lpbfifo_request *req) | |||
| 195 | * Exit conditions: | 195 | * Exit conditions: |
| 196 | * 1) Transfer aborted | 196 | * 1) Transfer aborted |
| 197 | * 2) FIFO complete without DMA; more data to do | 197 | * 2) FIFO complete without DMA; more data to do |
| 198 | * 3) FIFO complete without DMA; all data transfered | 198 | * 3) FIFO complete without DMA; all data transferred |
| 199 | * 4) FIFO complete using DMA | 199 | * 4) FIFO complete using DMA |
| 200 | * | 200 | * |
| 201 | * Condition 1 can occur regardless of whether or not DMA is used. | 201 | * Condition 1 can occur regardless of whether or not DMA is used. |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c index 3ddea96273ca..1dd15400f6f0 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c | |||
| @@ -512,7 +512,7 @@ void __init mpc52xx_init_irq(void) | |||
| 512 | /** | 512 | /** |
| 513 | * mpc52xx_get_irq - Get pending interrupt number hook function | 513 | * mpc52xx_get_irq - Get pending interrupt number hook function |
| 514 | * | 514 | * |
| 515 | * Called by the interupt handler to determine what IRQ handler needs to be | 515 | * Called by the interrupt handler to determine what IRQ handler needs to be |
| 516 | * executed. | 516 | * executed. |
| 517 | * | 517 | * |
| 518 | * Status of pending interrupts is determined by reading the encoded status | 518 | * Status of pending interrupts is determined by reading the encoded status |
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index 20576829eca5..f7b07720aa30 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig | |||
| @@ -46,7 +46,7 @@ config PPC_OF_BOOT_TRAMPOLINE | |||
| 46 | help | 46 | help |
| 47 | Support from booting from Open Firmware or yaboot using an | 47 | Support from booting from Open Firmware or yaboot using an |
| 48 | Open Firmware client interface. This enables the kernel to | 48 | Open Firmware client interface. This enables the kernel to |
| 49 | communicate with open firmware to retrieve system informations | 49 | communicate with open firmware to retrieve system information |
| 50 | such as the device tree. | 50 | such as the device tree. |
| 51 | 51 | ||
| 52 | In case of doubt, say Y | 52 | In case of doubt, say Y |
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c index a19bec078703..44cfd1bef89b 100644 --- a/arch/powerpc/platforms/cell/interrupt.c +++ b/arch/powerpc/platforms/cell/interrupt.c | |||
| @@ -244,7 +244,7 @@ static int iic_host_map(struct irq_host *h, unsigned int virq, | |||
| 244 | break; | 244 | break; |
| 245 | case IIC_IRQ_TYPE_IOEXC: | 245 | case IIC_IRQ_TYPE_IOEXC: |
| 246 | irq_set_chip_and_handler(virq, &iic_ioexc_chip, | 246 | irq_set_chip_and_handler(virq, &iic_ioexc_chip, |
| 247 | handle_iic_irq); | 247 | handle_edge_eoi_irq); |
| 248 | break; | 248 | break; |
| 249 | default: | 249 | default: |
| 250 | irq_set_chip_and_handler(virq, &iic_chip, handle_edge_eoi_irq); | 250 | irq_set_chip_and_handler(virq, &iic_chip, handle_edge_eoi_irq); |
diff --git a/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c b/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c index 3b894f585280..147069938cfe 100644 --- a/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c +++ b/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c | |||
| @@ -90,7 +90,7 @@ int spu_alloc_lscsa(struct spu_state *csa) | |||
| 90 | */ | 90 | */ |
| 91 | for (i = 0; i < SPU_LSCSA_NUM_BIG_PAGES; i++) { | 91 | for (i = 0; i < SPU_LSCSA_NUM_BIG_PAGES; i++) { |
| 92 | /* XXX This is likely to fail, we should use a special pool | 92 | /* XXX This is likely to fail, we should use a special pool |
| 93 | * similiar to what hugetlbfs does. | 93 | * similar to what hugetlbfs does. |
| 94 | */ | 94 | */ |
| 95 | csa->lscsa_pages[i] = alloc_pages(GFP_KERNEL, | 95 | csa->lscsa_pages[i] = alloc_pages(GFP_KERNEL, |
| 96 | SPU_64K_PAGE_ORDER); | 96 | SPU_64K_PAGE_ORDER); |
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 0b0466284932..65203857b0ce 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c | |||
| @@ -846,7 +846,7 @@ static struct spu_context *grab_runnable_context(int prio, int node) | |||
| 846 | struct list_head *rq = &spu_prio->runq[best]; | 846 | struct list_head *rq = &spu_prio->runq[best]; |
| 847 | 847 | ||
| 848 | list_for_each_entry(ctx, rq, rq) { | 848 | list_for_each_entry(ctx, rq, rq) { |
| 849 | /* XXX(hch): check for affinity here aswell */ | 849 | /* XXX(hch): check for affinity here as well */ |
| 850 | if (__node_allowed(ctx, node)) { | 850 | if (__node_allowed(ctx, node)) { |
| 851 | __spu_del_from_rq(ctx); | 851 | __spu_del_from_rq(ctx); |
| 852 | goto found; | 852 | goto found; |
diff --git a/arch/powerpc/platforms/cell/spufs/spu_restore.c b/arch/powerpc/platforms/cell/spufs/spu_restore.c index 21a9c952d88b..72c905f1ee7a 100644 --- a/arch/powerpc/platforms/cell/spufs/spu_restore.c +++ b/arch/powerpc/platforms/cell/spufs/spu_restore.c | |||
| @@ -284,7 +284,7 @@ static inline void restore_complete(void) | |||
| 284 | exit_instrs[3] = BR_INSTR; | 284 | exit_instrs[3] = BR_INSTR; |
| 285 | break; | 285 | break; |
| 286 | default: | 286 | default: |
| 287 | /* SPU_Status[R]=1. No additonal instructions. */ | 287 | /* SPU_Status[R]=1. No additional instructions. */ |
| 288 | break; | 288 | break; |
| 289 | } | 289 | } |
| 290 | spu_sync(); | 290 | spu_sync(); |
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c index b5e026bdca21..62dabe3c2bfa 100644 --- a/arch/powerpc/platforms/iseries/mf.c +++ b/arch/powerpc/platforms/iseries/mf.c | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | static int mf_initialized; | 51 | static int mf_initialized; |
| 52 | 52 | ||
| 53 | /* | 53 | /* |
| 54 | * This is the structure layout for the Machine Facilites LPAR event | 54 | * This is the structure layout for the Machine Facilities LPAR event |
| 55 | * flows. | 55 | * flows. |
| 56 | */ | 56 | */ |
| 57 | struct vsp_cmd_data { | 57 | struct vsp_cmd_data { |
diff --git a/arch/powerpc/platforms/iseries/viopath.c b/arch/powerpc/platforms/iseries/viopath.c index b5f05d943a90..2376069cdc14 100644 --- a/arch/powerpc/platforms/iseries/viopath.c +++ b/arch/powerpc/platforms/iseries/viopath.c | |||
| @@ -396,7 +396,7 @@ static void vio_handleEvent(struct HvLpEvent *event) | |||
| 396 | viopathStatus[remoteLp].mTargetInst)) { | 396 | viopathStatus[remoteLp].mTargetInst)) { |
| 397 | printk(VIOPATH_KERN_WARN | 397 | printk(VIOPATH_KERN_WARN |
| 398 | "message from invalid partition. " | 398 | "message from invalid partition. " |
| 399 | "int msg rcvd, source inst (%d) doesnt match (%d)\n", | 399 | "int msg rcvd, source inst (%d) doesn't match (%d)\n", |
| 400 | viopathStatus[remoteLp].mTargetInst, | 400 | viopathStatus[remoteLp].mTargetInst, |
| 401 | event->xSourceInstanceId); | 401 | event->xSourceInstanceId); |
| 402 | return; | 402 | return; |
| @@ -407,7 +407,7 @@ static void vio_handleEvent(struct HvLpEvent *event) | |||
| 407 | viopathStatus[remoteLp].mSourceInst)) { | 407 | viopathStatus[remoteLp].mSourceInst)) { |
| 408 | printk(VIOPATH_KERN_WARN | 408 | printk(VIOPATH_KERN_WARN |
| 409 | "message from invalid partition. " | 409 | "message from invalid partition. " |
| 410 | "int msg rcvd, target inst (%d) doesnt match (%d)\n", | 410 | "int msg rcvd, target inst (%d) doesn't match (%d)\n", |
| 411 | viopathStatus[remoteLp].mSourceInst, | 411 | viopathStatus[remoteLp].mSourceInst, |
| 412 | event->xTargetInstanceId); | 412 | event->xTargetInstanceId); |
| 413 | return; | 413 | return; |
| @@ -418,7 +418,7 @@ static void vio_handleEvent(struct HvLpEvent *event) | |||
| 418 | viopathStatus[remoteLp].mSourceInst) { | 418 | viopathStatus[remoteLp].mSourceInst) { |
| 419 | printk(VIOPATH_KERN_WARN | 419 | printk(VIOPATH_KERN_WARN |
| 420 | "message from invalid partition. " | 420 | "message from invalid partition. " |
| 421 | "ack msg rcvd, source inst (%d) doesnt match (%d)\n", | 421 | "ack msg rcvd, source inst (%d) doesn't match (%d)\n", |
| 422 | viopathStatus[remoteLp].mSourceInst, | 422 | viopathStatus[remoteLp].mSourceInst, |
| 423 | event->xSourceInstanceId); | 423 | event->xSourceInstanceId); |
| 424 | return; | 424 | return; |
| @@ -428,7 +428,7 @@ static void vio_handleEvent(struct HvLpEvent *event) | |||
| 428 | viopathStatus[remoteLp].mTargetInst) { | 428 | viopathStatus[remoteLp].mTargetInst) { |
| 429 | printk(VIOPATH_KERN_WARN | 429 | printk(VIOPATH_KERN_WARN |
| 430 | "message from invalid partition. " | 430 | "message from invalid partition. " |
| 431 | "viopath: ack msg rcvd, target inst (%d) doesnt match (%d)\n", | 431 | "viopath: ack msg rcvd, target inst (%d) doesn't match (%d)\n", |
| 432 | viopathStatus[remoteLp].mTargetInst, | 432 | viopathStatus[remoteLp].mTargetInst, |
| 433 | event->xTargetInstanceId); | 433 | event->xTargetInstanceId); |
| 434 | return; | 434 | return; |
diff --git a/arch/powerpc/platforms/pasemi/dma_lib.c b/arch/powerpc/platforms/pasemi/dma_lib.c index 09695ae50f91..321a9b3a2d00 100644 --- a/arch/powerpc/platforms/pasemi/dma_lib.c +++ b/arch/powerpc/platforms/pasemi/dma_lib.c | |||
| @@ -379,9 +379,9 @@ void pasemi_dma_free_buf(struct pasemi_dmachan *chan, int size, | |||
| 379 | } | 379 | } |
| 380 | EXPORT_SYMBOL(pasemi_dma_free_buf); | 380 | EXPORT_SYMBOL(pasemi_dma_free_buf); |
| 381 | 381 | ||
| 382 | /* pasemi_dma_alloc_flag - Allocate a flag (event) for channel syncronization | 382 | /* pasemi_dma_alloc_flag - Allocate a flag (event) for channel synchronization |
| 383 | * | 383 | * |
| 384 | * Allocates a flag for use with channel syncronization (event descriptors). | 384 | * Allocates a flag for use with channel synchronization (event descriptors). |
| 385 | * Returns allocated flag (0-63), < 0 on error. | 385 | * Returns allocated flag (0-63), < 0 on error. |
| 386 | */ | 386 | */ |
| 387 | int pasemi_dma_alloc_flag(void) | 387 | int pasemi_dma_alloc_flag(void) |
diff --git a/arch/powerpc/platforms/powermac/Makefile b/arch/powerpc/platforms/powermac/Makefile index 50f169392551..ea47df66fee5 100644 --- a/arch/powerpc/platforms/powermac/Makefile +++ b/arch/powerpc/platforms/powermac/Makefile | |||
| @@ -11,7 +11,7 @@ obj-y += pic.o setup.o time.o feature.o pci.o \ | |||
| 11 | obj-$(CONFIG_PMAC_BACKLIGHT) += backlight.o | 11 | obj-$(CONFIG_PMAC_BACKLIGHT) += backlight.o |
| 12 | obj-$(CONFIG_CPU_FREQ_PMAC) += cpufreq_32.o | 12 | obj-$(CONFIG_CPU_FREQ_PMAC) += cpufreq_32.o |
| 13 | obj-$(CONFIG_CPU_FREQ_PMAC64) += cpufreq_64.o | 13 | obj-$(CONFIG_CPU_FREQ_PMAC64) += cpufreq_64.o |
| 14 | # CONFIG_NVRAM is an arch. independant tristate symbol, for pmac32 we really | 14 | # CONFIG_NVRAM is an arch. independent tristate symbol, for pmac32 we really |
| 15 | # need this to be a bool. Cheat here and pretend CONFIG_NVRAM=m is really | 15 | # need this to be a bool. Cheat here and pretend CONFIG_NVRAM=m is really |
| 16 | # CONFIG_NVRAM=y | 16 | # CONFIG_NVRAM=y |
| 17 | obj-$(CONFIG_NVRAM:m=y) += nvram.o | 17 | obj-$(CONFIG_NVRAM:m=y) += nvram.o |
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c index 480567e5fa9a..e9c8a607268e 100644 --- a/arch/powerpc/platforms/powermac/low_i2c.c +++ b/arch/powerpc/platforms/powermac/low_i2c.c | |||
| @@ -904,7 +904,7 @@ static void __init smu_i2c_probe(void) | |||
| 904 | printk(KERN_INFO "SMU i2c %s\n", controller->full_name); | 904 | printk(KERN_INFO "SMU i2c %s\n", controller->full_name); |
| 905 | 905 | ||
| 906 | /* Look for childs, note that they might not be of the right | 906 | /* Look for childs, note that they might not be of the right |
| 907 | * type as older device trees mix i2c busses and other thigns | 907 | * type as older device trees mix i2c busses and other things |
| 908 | * at the same level | 908 | * at the same level |
| 909 | */ | 909 | */ |
| 910 | for (busnode = NULL; | 910 | for (busnode = NULL; |
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c index ab6898942700..f33e08d573ce 100644 --- a/arch/powerpc/platforms/powermac/pci.c +++ b/arch/powerpc/platforms/powermac/pci.c | |||
| @@ -299,7 +299,7 @@ static void __init setup_chaos(struct pci_controller *hose, | |||
| 299 | * This function deals with some "special cases" devices. | 299 | * This function deals with some "special cases" devices. |
| 300 | * | 300 | * |
| 301 | * 0 -> No special case | 301 | * 0 -> No special case |
| 302 | * 1 -> Skip the device but act as if the access was successfull | 302 | * 1 -> Skip the device but act as if the access was successful |
| 303 | * (return 0xff's on reads, eventually, cache config space | 303 | * (return 0xff's on reads, eventually, cache config space |
| 304 | * accesses in a later version) | 304 | * accesses in a later version) |
| 305 | * -1 -> Hide the device (unsuccessful access) | 305 | * -1 -> Hide the device (unsuccessful access) |
diff --git a/arch/powerpc/platforms/powermac/pmac.h b/arch/powerpc/platforms/powermac/pmac.h index f0bc08f6c1f0..20468f49aec0 100644 --- a/arch/powerpc/platforms/powermac/pmac.h +++ b/arch/powerpc/platforms/powermac/pmac.h | |||
| @@ -33,7 +33,6 @@ extern void pmac_setup_pci_dma(void); | |||
| 33 | extern void pmac_check_ht_link(void); | 33 | extern void pmac_check_ht_link(void); |
| 34 | 34 | ||
| 35 | extern void pmac_setup_smp(void); | 35 | extern void pmac_setup_smp(void); |
| 36 | extern void pmac32_cpu_die(void); | ||
| 37 | extern void low_cpu_die(void) __attribute__((noreturn)); | 36 | extern void low_cpu_die(void) __attribute__((noreturn)); |
| 38 | 37 | ||
| 39 | extern int pmac_nvram_init(void); | 38 | extern int pmac_nvram_init(void); |
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index d5aceb7fb125..aa45281bd296 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
| @@ -650,51 +650,6 @@ static int pmac_pci_probe_mode(struct pci_bus *bus) | |||
| 650 | return PCI_PROBE_NORMAL; | 650 | return PCI_PROBE_NORMAL; |
| 651 | return PCI_PROBE_DEVTREE; | 651 | return PCI_PROBE_DEVTREE; |
| 652 | } | 652 | } |
| 653 | |||
| 654 | #ifdef CONFIG_HOTPLUG_CPU | ||
| 655 | /* access per cpu vars from generic smp.c */ | ||
| 656 | DECLARE_PER_CPU(int, cpu_state); | ||
| 657 | |||
| 658 | static void pmac64_cpu_die(void) | ||
| 659 | { | ||
| 660 | /* | ||
| 661 | * turn off as much as possible, we'll be | ||
| 662 | * kicked out as this will only be invoked | ||
| 663 | * on core99 platforms for now ... | ||
| 664 | */ | ||
| 665 | |||
| 666 | printk(KERN_INFO "CPU#%d offline\n", smp_processor_id()); | ||
| 667 | __get_cpu_var(cpu_state) = CPU_DEAD; | ||
| 668 | smp_wmb(); | ||
| 669 | |||
| 670 | /* | ||
| 671 | * during the path that leads here preemption is disabled, | ||
| 672 | * reenable it now so that when coming up preempt count is | ||
| 673 | * zero correctly | ||
| 674 | */ | ||
| 675 | preempt_enable(); | ||
| 676 | |||
| 677 | /* | ||
| 678 | * hard-disable interrupts for the non-NAP case, the NAP code | ||
| 679 | * needs to re-enable interrupts (but soft-disables them) | ||
| 680 | */ | ||
| 681 | hard_irq_disable(); | ||
| 682 | |||
| 683 | while (1) { | ||
| 684 | /* let's not take timer interrupts too often ... */ | ||
| 685 | set_dec(0x7fffffff); | ||
| 686 | |||
| 687 | /* should always be true at this point */ | ||
| 688 | if (cpu_has_feature(CPU_FTR_CAN_NAP)) | ||
| 689 | power4_cpu_offline_powersave(); | ||
| 690 | else { | ||
| 691 | HMT_low(); | ||
| 692 | HMT_very_low(); | ||
| 693 | } | ||
| 694 | } | ||
| 695 | } | ||
| 696 | #endif /* CONFIG_HOTPLUG_CPU */ | ||
| 697 | |||
| 698 | #endif /* CONFIG_PPC64 */ | 653 | #endif /* CONFIG_PPC64 */ |
| 699 | 654 | ||
| 700 | define_machine(powermac) { | 655 | define_machine(powermac) { |
| @@ -726,15 +681,4 @@ define_machine(powermac) { | |||
| 726 | .pcibios_after_init = pmac_pcibios_after_init, | 681 | .pcibios_after_init = pmac_pcibios_after_init, |
| 727 | .phys_mem_access_prot = pci_phys_mem_access_prot, | 682 | .phys_mem_access_prot = pci_phys_mem_access_prot, |
| 728 | #endif | 683 | #endif |
| 729 | #ifdef CONFIG_HOTPLUG_CPU | ||
| 730 | #ifdef CONFIG_PPC64 | ||
| 731 | .cpu_die = pmac64_cpu_die, | ||
| 732 | #endif | ||
| 733 | #ifdef CONFIG_PPC32 | ||
| 734 | .cpu_die = pmac32_cpu_die, | ||
| 735 | #endif | ||
| 736 | #endif | ||
| 737 | #if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PPC32) | ||
| 738 | .cpu_die = generic_mach_cpu_die, | ||
| 739 | #endif | ||
| 740 | }; | 684 | }; |
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index c95215f4f8b6..bc5f0dc6ae1e 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c | |||
| @@ -840,92 +840,151 @@ static void __devinit smp_core99_setup_cpu(int cpu_nr) | |||
| 840 | 840 | ||
| 841 | /* Setup openpic */ | 841 | /* Setup openpic */ |
| 842 | mpic_setup_this_cpu(); | 842 | mpic_setup_this_cpu(); |
| 843 | } | ||
| 843 | 844 | ||
| 844 | if (cpu_nr == 0) { | ||
| 845 | #ifdef CONFIG_PPC64 | 845 | #ifdef CONFIG_PPC64 |
| 846 | extern void g5_phy_disable_cpu1(void); | 846 | #ifdef CONFIG_HOTPLUG_CPU |
| 847 | static int smp_core99_cpu_notify(struct notifier_block *self, | ||
| 848 | unsigned long action, void *hcpu) | ||
| 849 | { | ||
| 850 | int rc; | ||
| 847 | 851 | ||
| 848 | /* Close i2c bus if it was used for tb sync */ | 852 | switch(action) { |
| 853 | case CPU_UP_PREPARE: | ||
| 854 | case CPU_UP_PREPARE_FROZEN: | ||
| 855 | /* Open i2c bus if it was used for tb sync */ | ||
| 849 | if (pmac_tb_clock_chip_host) { | 856 | if (pmac_tb_clock_chip_host) { |
| 850 | pmac_i2c_close(pmac_tb_clock_chip_host); | 857 | rc = pmac_i2c_open(pmac_tb_clock_chip_host, 1); |
| 851 | pmac_tb_clock_chip_host = NULL; | 858 | if (rc) { |
| 859 | pr_err("Failed to open i2c bus for time sync\n"); | ||
| 860 | return notifier_from_errno(rc); | ||
| 861 | } | ||
| 852 | } | 862 | } |
| 863 | break; | ||
| 864 | case CPU_ONLINE: | ||
| 865 | case CPU_UP_CANCELED: | ||
| 866 | /* Close i2c bus if it was used for tb sync */ | ||
| 867 | if (pmac_tb_clock_chip_host) | ||
| 868 | pmac_i2c_close(pmac_tb_clock_chip_host); | ||
| 869 | break; | ||
| 870 | default: | ||
| 871 | break; | ||
| 872 | } | ||
| 873 | return NOTIFY_OK; | ||
| 874 | } | ||
| 853 | 875 | ||
| 854 | /* If we didn't start the second CPU, we must take | 876 | static struct notifier_block __cpuinitdata smp_core99_cpu_nb = { |
| 855 | * it off the bus | 877 | .notifier_call = smp_core99_cpu_notify, |
| 856 | */ | 878 | }; |
| 857 | if (of_machine_is_compatible("MacRISC4") && | 879 | #endif /* CONFIG_HOTPLUG_CPU */ |
| 858 | num_online_cpus() < 2) | 880 | |
| 859 | g5_phy_disable_cpu1(); | 881 | static void __init smp_core99_bringup_done(void) |
| 860 | #endif /* CONFIG_PPC64 */ | 882 | { |
| 883 | extern void g5_phy_disable_cpu1(void); | ||
| 861 | 884 | ||
| 862 | if (ppc_md.progress) | 885 | /* Close i2c bus if it was used for tb sync */ |
| 863 | ppc_md.progress("core99_setup_cpu 0 done", 0x349); | 886 | if (pmac_tb_clock_chip_host) |
| 887 | pmac_i2c_close(pmac_tb_clock_chip_host); | ||
| 888 | |||
| 889 | /* If we didn't start the second CPU, we must take | ||
| 890 | * it off the bus. | ||
| 891 | */ | ||
| 892 | if (of_machine_is_compatible("MacRISC4") && | ||
| 893 | num_online_cpus() < 2) { | ||
| 894 | set_cpu_present(1, false); | ||
| 895 | g5_phy_disable_cpu1(); | ||
| 864 | } | 896 | } |
| 865 | } | 897 | #ifdef CONFIG_HOTPLUG_CPU |
| 898 | register_cpu_notifier(&smp_core99_cpu_nb); | ||
| 899 | #endif | ||
| 866 | 900 | ||
| 901 | if (ppc_md.progress) | ||
| 902 | ppc_md.progress("smp_core99_bringup_done", 0x349); | ||
| 903 | } | ||
| 904 | #endif /* CONFIG_PPC64 */ | ||
| 867 | 905 | ||
| 868 | #if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PPC32) | 906 | #ifdef CONFIG_HOTPLUG_CPU |
| 869 | 907 | ||
| 870 | int smp_core99_cpu_disable(void) | 908 | static int smp_core99_cpu_disable(void) |
| 871 | { | 909 | { |
| 872 | set_cpu_online(smp_processor_id(), false); | 910 | int rc = generic_cpu_disable(); |
| 911 | if (rc) | ||
| 912 | return rc; | ||
| 873 | 913 | ||
| 874 | /* XXX reset cpu affinity here */ | ||
| 875 | mpic_cpu_set_priority(0xf); | 914 | mpic_cpu_set_priority(0xf); |
| 876 | asm volatile("mtdec %0" : : "r" (0x7fffffff)); | 915 | |
| 877 | mb(); | ||
| 878 | udelay(20); | ||
| 879 | asm volatile("mtdec %0" : : "r" (0x7fffffff)); | ||
| 880 | return 0; | 916 | return 0; |
| 881 | } | 917 | } |
| 882 | 918 | ||
| 883 | static int cpu_dead[NR_CPUS]; | 919 | #ifdef CONFIG_PPC32 |
| 884 | 920 | ||
| 885 | void pmac32_cpu_die(void) | 921 | static void pmac_cpu_die(void) |
| 886 | { | 922 | { |
| 923 | int cpu = smp_processor_id(); | ||
| 924 | |||
| 887 | local_irq_disable(); | 925 | local_irq_disable(); |
| 888 | cpu_dead[smp_processor_id()] = 1; | 926 | idle_task_exit(); |
| 927 | pr_debug("CPU%d offline\n", cpu); | ||
| 928 | generic_set_cpu_dead(cpu); | ||
| 929 | smp_wmb(); | ||
| 889 | mb(); | 930 | mb(); |
| 890 | low_cpu_die(); | 931 | low_cpu_die(); |
| 891 | } | 932 | } |
| 892 | 933 | ||
| 893 | void smp_core99_cpu_die(unsigned int cpu) | 934 | #else /* CONFIG_PPC32 */ |
| 935 | |||
| 936 | static void pmac_cpu_die(void) | ||
| 894 | { | 937 | { |
| 895 | int timeout; | 938 | int cpu = smp_processor_id(); |
| 896 | 939 | ||
| 897 | timeout = 1000; | 940 | local_irq_disable(); |
| 898 | while (!cpu_dead[cpu]) { | 941 | idle_task_exit(); |
| 899 | if (--timeout == 0) { | 942 | |
| 900 | printk("CPU %u refused to die!\n", cpu); | 943 | /* |
| 901 | break; | 944 | * turn off as much as possible, we'll be |
| 902 | } | 945 | * kicked out as this will only be invoked |
| 903 | msleep(1); | 946 | * on core99 platforms for now ... |
| 947 | */ | ||
| 948 | |||
| 949 | printk(KERN_INFO "CPU#%d offline\n", cpu); | ||
| 950 | generic_set_cpu_dead(cpu); | ||
| 951 | smp_wmb(); | ||
| 952 | |||
| 953 | /* | ||
| 954 | * Re-enable interrupts. The NAP code needs to enable them | ||
| 955 | * anyways, do it now so we deal with the case where one already | ||
| 956 | * happened while soft-disabled. | ||
| 957 | * We shouldn't get any external interrupts, only decrementer, and the | ||
| 958 | * decrementer handler is safe for use on offline CPUs | ||
| 959 | */ | ||
| 960 | local_irq_enable(); | ||
| 961 | |||
| 962 | while (1) { | ||
| 963 | /* let's not take timer interrupts too often ... */ | ||
| 964 | set_dec(0x7fffffff); | ||
| 965 | |||
| 966 | /* Enter NAP mode */ | ||
| 967 | power4_idle(); | ||
| 904 | } | 968 | } |
| 905 | cpu_dead[cpu] = 0; | ||
| 906 | } | 969 | } |
| 907 | 970 | ||
| 908 | #endif /* CONFIG_HOTPLUG_CPU && CONFIG_PP32 */ | 971 | #endif /* else CONFIG_PPC32 */ |
| 972 | #endif /* CONFIG_HOTPLUG_CPU */ | ||
| 909 | 973 | ||
| 910 | /* Core99 Macs (dual G4s and G5s) */ | 974 | /* Core99 Macs (dual G4s and G5s) */ |
| 911 | struct smp_ops_t core99_smp_ops = { | 975 | struct smp_ops_t core99_smp_ops = { |
| 912 | .message_pass = smp_mpic_message_pass, | 976 | .message_pass = smp_mpic_message_pass, |
| 913 | .probe = smp_core99_probe, | 977 | .probe = smp_core99_probe, |
| 978 | #ifdef CONFIG_PPC64 | ||
| 979 | .bringup_done = smp_core99_bringup_done, | ||
| 980 | #endif | ||
| 914 | .kick_cpu = smp_core99_kick_cpu, | 981 | .kick_cpu = smp_core99_kick_cpu, |
| 915 | .setup_cpu = smp_core99_setup_cpu, | 982 | .setup_cpu = smp_core99_setup_cpu, |
| 916 | .give_timebase = smp_core99_give_timebase, | 983 | .give_timebase = smp_core99_give_timebase, |
| 917 | .take_timebase = smp_core99_take_timebase, | 984 | .take_timebase = smp_core99_take_timebase, |
| 918 | #if defined(CONFIG_HOTPLUG_CPU) | 985 | #if defined(CONFIG_HOTPLUG_CPU) |
| 919 | # if defined(CONFIG_PPC32) | ||
| 920 | .cpu_disable = smp_core99_cpu_disable, | 986 | .cpu_disable = smp_core99_cpu_disable, |
| 921 | .cpu_die = smp_core99_cpu_die, | ||
| 922 | # endif | ||
| 923 | # if defined(CONFIG_PPC64) | ||
| 924 | .cpu_disable = generic_cpu_disable, | ||
| 925 | .cpu_die = generic_cpu_die, | 987 | .cpu_die = generic_cpu_die, |
| 926 | /* intentionally do *NOT* assign cpu_enable, | ||
| 927 | * the generic code will use kick_cpu then! */ | ||
| 928 | # endif | ||
| 929 | #endif | 988 | #endif |
| 930 | }; | 989 | }; |
| 931 | 990 | ||
| @@ -957,5 +1016,10 @@ void __init pmac_setup_smp(void) | |||
| 957 | smp_ops = &psurge_smp_ops; | 1016 | smp_ops = &psurge_smp_ops; |
| 958 | } | 1017 | } |
| 959 | #endif /* CONFIG_PPC32 */ | 1018 | #endif /* CONFIG_PPC32 */ |
| 1019 | |||
| 1020 | #ifdef CONFIG_HOTPLUG_CPU | ||
| 1021 | ppc_md.cpu_die = pmac_cpu_die; | ||
| 1022 | #endif | ||
| 960 | } | 1023 | } |
| 961 | 1024 | ||
| 1025 | |||
diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c index b74a9230edc9..57ceb92b2288 100644 --- a/arch/powerpc/platforms/pseries/dlpar.c +++ b/arch/powerpc/platforms/pseries/dlpar.c | |||
| @@ -74,7 +74,7 @@ static struct device_node *dlpar_parse_cc_node(struct cc_workarea *ccwa) | |||
| 74 | return NULL; | 74 | return NULL; |
| 75 | 75 | ||
| 76 | /* The configure connector reported name does not contain a | 76 | /* The configure connector reported name does not contain a |
| 77 | * preceeding '/', so we allocate a buffer large enough to | 77 | * preceding '/', so we allocate a buffer large enough to |
| 78 | * prepend this to the full_name. | 78 | * prepend this to the full_name. |
| 79 | */ | 79 | */ |
| 80 | name = (char *)ccwa + ccwa->name_offset; | 80 | name = (char *)ccwa + ccwa->name_offset; |
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 3cc4d102b1f1..89649173d3a3 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c | |||
| @@ -65,7 +65,7 @@ | |||
| 65 | * with EEH. | 65 | * with EEH. |
| 66 | * | 66 | * |
| 67 | * Ideally, a PCI device driver, when suspecting that an isolation | 67 | * Ideally, a PCI device driver, when suspecting that an isolation |
| 68 | * event has occured (e.g. by reading 0xff's), will then ask EEH | 68 | * event has occurred (e.g. by reading 0xff's), will then ask EEH |
| 69 | * whether this is the case, and then take appropriate steps to | 69 | * whether this is the case, and then take appropriate steps to |
| 70 | * reset the PCI slot, the PCI device, and then resume operations. | 70 | * reset the PCI slot, the PCI device, and then resume operations. |
| 71 | * However, until that day, the checking is done here, with the | 71 | * However, until that day, the checking is done here, with the |
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index fd50ccd4bac1..ef8c45489e20 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c | |||
| @@ -216,7 +216,7 @@ static void pseries_cpu_die(unsigned int cpu) | |||
| 216 | cpu, pcpu, cpu_status); | 216 | cpu, pcpu, cpu_status); |
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | /* Isolation and deallocation are definatly done by | 219 | /* Isolation and deallocation are definitely done by |
| 220 | * drslot_chrp_cpu. If they were not they would be | 220 | * drslot_chrp_cpu. If they were not they would be |
| 221 | * done here. Change isolate state to Isolate and | 221 | * done here. Change isolate state to Isolate and |
| 222 | * change allocation-state to Unusable. | 222 | * change allocation-state to Unusable. |
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 154c464cdca5..6d5412a18b26 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
| @@ -272,7 +272,7 @@ static unsigned long tce_get_pSeriesLP(struct iommu_table *tbl, long tcenum) | |||
| 272 | return tce_ret; | 272 | return tce_ret; |
| 273 | } | 273 | } |
| 274 | 274 | ||
| 275 | /* this is compatable with cells for the device tree property */ | 275 | /* this is compatible with cells for the device tree property */ |
| 276 | struct dynamic_dma_window_prop { | 276 | struct dynamic_dma_window_prop { |
| 277 | __be32 liobn; /* tce table number */ | 277 | __be32 liobn; /* tce table number */ |
| 278 | __be64 dma_base; /* address hi,lo */ | 278 | __be64 dma_base; /* address hi,lo */ |
| @@ -976,7 +976,7 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev) | |||
| 976 | pr_debug("pci_dma_dev_setup_pSeriesLP: %s\n", pci_name(dev)); | 976 | pr_debug("pci_dma_dev_setup_pSeriesLP: %s\n", pci_name(dev)); |
| 977 | 977 | ||
| 978 | /* dev setup for LPAR is a little tricky, since the device tree might | 978 | /* dev setup for LPAR is a little tricky, since the device tree might |
| 979 | * contain the dma-window properties per-device and not neccesarily | 979 | * contain the dma-window properties per-device and not necessarily |
| 980 | * for the bus. So we need to search upwards in the tree until we | 980 | * for the bus. So we need to search upwards in the tree until we |
| 981 | * either hit a dma-window property, OR find a parent with a table | 981 | * either hit a dma-window property, OR find a parent with a table |
| 982 | * already allocated. | 982 | * already allocated. |
| @@ -1033,7 +1033,7 @@ static int dma_set_mask_pSeriesLP(struct device *dev, u64 dma_mask) | |||
| 1033 | 1033 | ||
| 1034 | /* | 1034 | /* |
| 1035 | * the device tree might contain the dma-window properties | 1035 | * the device tree might contain the dma-window properties |
| 1036 | * per-device and not neccesarily for the bus. So we need to | 1036 | * per-device and not necessarily for the bus. So we need to |
| 1037 | * search upwards in the tree until we either hit a dma-window | 1037 | * search upwards in the tree until we either hit a dma-window |
| 1038 | * property, OR find a parent with a table already allocated. | 1038 | * property, OR find a parent with a table already allocated. |
| 1039 | */ | 1039 | */ |
diff --git a/arch/powerpc/platforms/pseries/nvram.c b/arch/powerpc/platforms/pseries/nvram.c index 419707b07248..00cc3a094885 100644 --- a/arch/powerpc/platforms/pseries/nvram.c +++ b/arch/powerpc/platforms/pseries/nvram.c | |||
| @@ -480,8 +480,32 @@ static void oops_to_nvram(struct kmsg_dumper *dumper, | |||
| 480 | const char *new_msgs, unsigned long new_len) | 480 | const char *new_msgs, unsigned long new_len) |
| 481 | { | 481 | { |
| 482 | static unsigned int oops_count = 0; | 482 | static unsigned int oops_count = 0; |
| 483 | static bool panicking = false; | ||
| 483 | size_t text_len; | 484 | size_t text_len; |
| 484 | 485 | ||
| 486 | switch (reason) { | ||
| 487 | case KMSG_DUMP_RESTART: | ||
| 488 | case KMSG_DUMP_HALT: | ||
| 489 | case KMSG_DUMP_POWEROFF: | ||
| 490 | /* These are almost always orderly shutdowns. */ | ||
| 491 | return; | ||
| 492 | case KMSG_DUMP_OOPS: | ||
| 493 | case KMSG_DUMP_KEXEC: | ||
| 494 | break; | ||
| 495 | case KMSG_DUMP_PANIC: | ||
| 496 | panicking = true; | ||
| 497 | break; | ||
| 498 | case KMSG_DUMP_EMERG: | ||
| 499 | if (panicking) | ||
| 500 | /* Panic report already captured. */ | ||
| 501 | return; | ||
| 502 | break; | ||
| 503 | default: | ||
| 504 | pr_err("%s: ignoring unrecognized KMSG_DUMP_* reason %d\n", | ||
| 505 | __FUNCTION__, (int) reason); | ||
| 506 | return; | ||
| 507 | } | ||
| 508 | |||
| 485 | if (clobbering_unread_rtas_event()) | 509 | if (clobbering_unread_rtas_event()) |
| 486 | return; | 510 | return; |
| 487 | 511 | ||
diff --git a/arch/powerpc/platforms/pseries/offline_states.h b/arch/powerpc/platforms/pseries/offline_states.h index 75a6f480d931..08672d9136ab 100644 --- a/arch/powerpc/platforms/pseries/offline_states.h +++ b/arch/powerpc/platforms/pseries/offline_states.h | |||
| @@ -34,6 +34,4 @@ static inline void set_default_offline_state(int cpu) | |||
| 34 | #endif | 34 | #endif |
| 35 | 35 | ||
| 36 | extern enum cpu_state_vals get_preferred_offline_state(int cpu); | 36 | extern enum cpu_state_vals get_preferred_offline_state(int cpu); |
| 37 | extern int start_secondary(void); | ||
| 38 | extern void start_secondary_resume(void); | ||
| 39 | #endif | 37 | #endif |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index c319d04aa799..6c42cfde8415 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
| @@ -287,14 +287,22 @@ static int alloc_dispatch_logs(void) | |||
| 287 | int cpu, ret; | 287 | int cpu, ret; |
| 288 | struct paca_struct *pp; | 288 | struct paca_struct *pp; |
| 289 | struct dtl_entry *dtl; | 289 | struct dtl_entry *dtl; |
| 290 | struct kmem_cache *dtl_cache; | ||
| 290 | 291 | ||
| 291 | if (!firmware_has_feature(FW_FEATURE_SPLPAR)) | 292 | if (!firmware_has_feature(FW_FEATURE_SPLPAR)) |
| 292 | return 0; | 293 | return 0; |
| 293 | 294 | ||
| 295 | dtl_cache = kmem_cache_create("dtl", DISPATCH_LOG_BYTES, | ||
| 296 | DISPATCH_LOG_BYTES, 0, NULL); | ||
| 297 | if (!dtl_cache) { | ||
| 298 | pr_warn("Failed to create dispatch trace log buffer cache\n"); | ||
| 299 | pr_warn("Stolen time statistics will be unreliable\n"); | ||
| 300 | return 0; | ||
| 301 | } | ||
| 302 | |||
| 294 | for_each_possible_cpu(cpu) { | 303 | for_each_possible_cpu(cpu) { |
| 295 | pp = &paca[cpu]; | 304 | pp = &paca[cpu]; |
| 296 | dtl = kmalloc_node(DISPATCH_LOG_BYTES, GFP_KERNEL, | 305 | dtl = kmem_cache_alloc(dtl_cache, GFP_KERNEL); |
| 297 | cpu_to_node(cpu)); | ||
| 298 | if (!dtl) { | 306 | if (!dtl) { |
| 299 | pr_warn("Failed to allocate dispatch trace log for cpu %d\n", | 307 | pr_warn("Failed to allocate dispatch trace log for cpu %d\n", |
| 300 | cpu); | 308 | cpu); |
| @@ -378,7 +386,7 @@ static int __init pSeries_init_panel(void) | |||
| 378 | 386 | ||
| 379 | return 0; | 387 | return 0; |
| 380 | } | 388 | } |
| 381 | arch_initcall(pSeries_init_panel); | 389 | machine_arch_initcall(pseries, pSeries_init_panel); |
| 382 | 390 | ||
| 383 | static int pseries_set_dabr(unsigned long dabr) | 391 | static int pseries_set_dabr(unsigned long dabr) |
| 384 | { | 392 | { |
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c index 0317cce877c6..a509c5292a67 100644 --- a/arch/powerpc/platforms/pseries/smp.c +++ b/arch/powerpc/platforms/pseries/smp.c | |||
| @@ -64,8 +64,8 @@ int smp_query_cpu_stopped(unsigned int pcpu) | |||
| 64 | int qcss_tok = rtas_token("query-cpu-stopped-state"); | 64 | int qcss_tok = rtas_token("query-cpu-stopped-state"); |
| 65 | 65 | ||
| 66 | if (qcss_tok == RTAS_UNKNOWN_SERVICE) { | 66 | if (qcss_tok == RTAS_UNKNOWN_SERVICE) { |
| 67 | printk(KERN_INFO "Firmware doesn't support " | 67 | printk_once(KERN_INFO |
| 68 | "query-cpu-stopped-state\n"); | 68 | "Firmware doesn't support query-cpu-stopped-state\n"); |
| 69 | return QCSS_HARDWARE_ERROR; | 69 | return QCSS_HARDWARE_ERROR; |
| 70 | } | 70 | } |
| 71 | 71 | ||
| @@ -112,10 +112,10 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu) | |||
| 112 | 112 | ||
| 113 | /* Fixup atomic count: it exited inside IRQ handler. */ | 113 | /* Fixup atomic count: it exited inside IRQ handler. */ |
| 114 | task_thread_info(paca[lcpu].__current)->preempt_count = 0; | 114 | task_thread_info(paca[lcpu].__current)->preempt_count = 0; |
| 115 | 115 | #ifdef CONFIG_HOTPLUG_CPU | |
| 116 | if (get_cpu_current_state(lcpu) == CPU_STATE_INACTIVE) | 116 | if (get_cpu_current_state(lcpu) == CPU_STATE_INACTIVE) |
| 117 | goto out; | 117 | goto out; |
| 118 | 118 | #endif | |
| 119 | /* | 119 | /* |
| 120 | * If the RTAS start-cpu token does not exist then presume the | 120 | * If the RTAS start-cpu token does not exist then presume the |
| 121 | * cpu is already spinning. | 121 | * cpu is already spinning. |
| @@ -130,7 +130,9 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu) | |||
| 130 | return 0; | 130 | return 0; |
| 131 | } | 131 | } |
| 132 | 132 | ||
| 133 | #ifdef CONFIG_HOTPLUG_CPU | ||
| 133 | out: | 134 | out: |
| 135 | #endif | ||
| 134 | return 1; | 136 | return 1; |
| 135 | } | 137 | } |
| 136 | 138 | ||
| @@ -144,16 +146,15 @@ static void __devinit smp_xics_setup_cpu(int cpu) | |||
| 144 | vpa_init(cpu); | 146 | vpa_init(cpu); |
| 145 | 147 | ||
| 146 | cpumask_clear_cpu(cpu, of_spin_mask); | 148 | cpumask_clear_cpu(cpu, of_spin_mask); |
| 149 | #ifdef CONFIG_HOTPLUG_CPU | ||
| 147 | set_cpu_current_state(cpu, CPU_STATE_ONLINE); | 150 | set_cpu_current_state(cpu, CPU_STATE_ONLINE); |
| 148 | set_default_offline_state(cpu); | 151 | set_default_offline_state(cpu); |
| 149 | 152 | #endif | |
| 150 | } | 153 | } |
| 151 | #endif /* CONFIG_XICS */ | 154 | #endif /* CONFIG_XICS */ |
| 152 | 155 | ||
| 153 | static void __devinit smp_pSeries_kick_cpu(int nr) | 156 | static void __devinit smp_pSeries_kick_cpu(int nr) |
| 154 | { | 157 | { |
| 155 | long rc; | ||
| 156 | unsigned long hcpuid; | ||
| 157 | BUG_ON(nr < 0 || nr >= NR_CPUS); | 158 | BUG_ON(nr < 0 || nr >= NR_CPUS); |
| 158 | 159 | ||
| 159 | if (!smp_startup_cpu(nr)) | 160 | if (!smp_startup_cpu(nr)) |
| @@ -165,16 +166,20 @@ static void __devinit smp_pSeries_kick_cpu(int nr) | |||
| 165 | * the processor will continue on to secondary_start | 166 | * the processor will continue on to secondary_start |
| 166 | */ | 167 | */ |
| 167 | paca[nr].cpu_start = 1; | 168 | paca[nr].cpu_start = 1; |
| 168 | 169 | #ifdef CONFIG_HOTPLUG_CPU | |
| 169 | set_preferred_offline_state(nr, CPU_STATE_ONLINE); | 170 | set_preferred_offline_state(nr, CPU_STATE_ONLINE); |
| 170 | 171 | ||
| 171 | if (get_cpu_current_state(nr) == CPU_STATE_INACTIVE) { | 172 | if (get_cpu_current_state(nr) == CPU_STATE_INACTIVE) { |
| 173 | long rc; | ||
| 174 | unsigned long hcpuid; | ||
| 175 | |||
| 172 | hcpuid = get_hard_smp_processor_id(nr); | 176 | hcpuid = get_hard_smp_processor_id(nr); |
| 173 | rc = plpar_hcall_norets(H_PROD, hcpuid); | 177 | rc = plpar_hcall_norets(H_PROD, hcpuid); |
| 174 | if (rc != H_SUCCESS) | 178 | if (rc != H_SUCCESS) |
| 175 | printk(KERN_ERR "Error: Prod to wake up processor %d " | 179 | printk(KERN_ERR "Error: Prod to wake up processor %d " |
| 176 | "Ret= %ld\n", nr, rc); | 180 | "Ret= %ld\n", nr, rc); |
| 177 | } | 181 | } |
| 182 | #endif | ||
| 178 | } | 183 | } |
| 179 | 184 | ||
| 180 | static int smp_pSeries_cpu_bootable(unsigned int nr) | 185 | static int smp_pSeries_cpu_bootable(unsigned int nr) |
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index 6c1e638f0ce9..d6901334d66e 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c | |||
| @@ -204,33 +204,33 @@ static int get_irq_server(unsigned int virq, const struct cpumask *cpumask, | |||
| 204 | 204 | ||
| 205 | static void xics_unmask_irq(struct irq_data *d) | 205 | static void xics_unmask_irq(struct irq_data *d) |
| 206 | { | 206 | { |
| 207 | unsigned int irq; | 207 | unsigned int hwirq; |
| 208 | int call_status; | 208 | int call_status; |
| 209 | int server; | 209 | int server; |
| 210 | 210 | ||
| 211 | pr_devel("xics: unmask virq %d\n", d->irq); | 211 | pr_devel("xics: unmask virq %d\n", d->irq); |
| 212 | 212 | ||
| 213 | irq = (unsigned int)irq_map[d->irq].hwirq; | 213 | hwirq = (unsigned int)irq_map[d->irq].hwirq; |
| 214 | pr_devel(" -> map to hwirq 0x%x\n", irq); | 214 | pr_devel(" -> map to hwirq 0x%x\n", hwirq); |
| 215 | if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS) | 215 | if (hwirq == XICS_IPI || hwirq == XICS_IRQ_SPURIOUS) |
| 216 | return; | 216 | return; |
| 217 | 217 | ||
| 218 | server = get_irq_server(d->irq, d->affinity, 0); | 218 | server = get_irq_server(d->irq, d->affinity, 0); |
| 219 | 219 | ||
| 220 | call_status = rtas_call(ibm_set_xive, 3, 1, NULL, irq, server, | 220 | call_status = rtas_call(ibm_set_xive, 3, 1, NULL, hwirq, server, |
| 221 | DEFAULT_PRIORITY); | 221 | DEFAULT_PRIORITY); |
| 222 | if (call_status != 0) { | 222 | if (call_status != 0) { |
| 223 | printk(KERN_ERR | 223 | printk(KERN_ERR |
| 224 | "%s: ibm_set_xive irq %u server %x returned %d\n", | 224 | "%s: ibm_set_xive irq %u server %x returned %d\n", |
| 225 | __func__, irq, server, call_status); | 225 | __func__, hwirq, server, call_status); |
| 226 | return; | 226 | return; |
| 227 | } | 227 | } |
| 228 | 228 | ||
| 229 | /* Now unmask the interrupt (often a no-op) */ | 229 | /* Now unmask the interrupt (often a no-op) */ |
| 230 | call_status = rtas_call(ibm_int_on, 1, 1, NULL, irq); | 230 | call_status = rtas_call(ibm_int_on, 1, 1, NULL, hwirq); |
| 231 | if (call_status != 0) { | 231 | if (call_status != 0) { |
| 232 | printk(KERN_ERR "%s: ibm_int_on irq=%u returned %d\n", | 232 | printk(KERN_ERR "%s: ibm_int_on irq=%u returned %d\n", |
| 233 | __func__, irq, call_status); | 233 | __func__, hwirq, call_status); |
| 234 | return; | 234 | return; |
| 235 | } | 235 | } |
| 236 | } | 236 | } |
| @@ -250,46 +250,46 @@ static unsigned int xics_startup(struct irq_data *d) | |||
| 250 | return 0; | 250 | return 0; |
| 251 | } | 251 | } |
| 252 | 252 | ||
| 253 | static void xics_mask_real_irq(struct irq_data *d) | 253 | static void xics_mask_real_irq(unsigned int hwirq) |
| 254 | { | 254 | { |
| 255 | int call_status; | 255 | int call_status; |
| 256 | 256 | ||
| 257 | if (d->irq == XICS_IPI) | 257 | if (hwirq == XICS_IPI) |
| 258 | return; | 258 | return; |
| 259 | 259 | ||
| 260 | call_status = rtas_call(ibm_int_off, 1, 1, NULL, d->irq); | 260 | call_status = rtas_call(ibm_int_off, 1, 1, NULL, hwirq); |
| 261 | if (call_status != 0) { | 261 | if (call_status != 0) { |
| 262 | printk(KERN_ERR "%s: ibm_int_off irq=%u returned %d\n", | 262 | printk(KERN_ERR "%s: ibm_int_off irq=%u returned %d\n", |
| 263 | __func__, d->irq, call_status); | 263 | __func__, hwirq, call_status); |
| 264 | return; | 264 | return; |
| 265 | } | 265 | } |
| 266 | 266 | ||
| 267 | /* Have to set XIVE to 0xff to be able to remove a slot */ | 267 | /* Have to set XIVE to 0xff to be able to remove a slot */ |
| 268 | call_status = rtas_call(ibm_set_xive, 3, 1, NULL, d->irq, | 268 | call_status = rtas_call(ibm_set_xive, 3, 1, NULL, hwirq, |
| 269 | default_server, 0xff); | 269 | default_server, 0xff); |
| 270 | if (call_status != 0) { | 270 | if (call_status != 0) { |
| 271 | printk(KERN_ERR "%s: ibm_set_xive(0xff) irq=%u returned %d\n", | 271 | printk(KERN_ERR "%s: ibm_set_xive(0xff) irq=%u returned %d\n", |
| 272 | __func__, d->irq, call_status); | 272 | __func__, hwirq, call_status); |
| 273 | return; | 273 | return; |
| 274 | } | 274 | } |
| 275 | } | 275 | } |
| 276 | 276 | ||
| 277 | static void xics_mask_irq(struct irq_data *d) | 277 | static void xics_mask_irq(struct irq_data *d) |
| 278 | { | 278 | { |
| 279 | unsigned int irq; | 279 | unsigned int hwirq; |
| 280 | 280 | ||
| 281 | pr_devel("xics: mask virq %d\n", d->irq); | 281 | pr_devel("xics: mask virq %d\n", d->irq); |
| 282 | 282 | ||
| 283 | irq = (unsigned int)irq_map[d->irq].hwirq; | 283 | hwirq = (unsigned int)irq_map[d->irq].hwirq; |
| 284 | if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS) | 284 | if (hwirq == XICS_IPI || hwirq == XICS_IRQ_SPURIOUS) |
| 285 | return; | 285 | return; |
| 286 | xics_mask_real_irq(d); | 286 | xics_mask_real_irq(hwirq); |
| 287 | } | 287 | } |
| 288 | 288 | ||
| 289 | static void xics_mask_unknown_vec(unsigned int vec) | 289 | static void xics_mask_unknown_vec(unsigned int vec) |
| 290 | { | 290 | { |
| 291 | printk(KERN_ERR "Interrupt %u (real) is invalid, disabling it.\n", vec); | 291 | printk(KERN_ERR "Interrupt %u (real) is invalid, disabling it.\n", vec); |
| 292 | xics_mask_real_irq(irq_get_irq_data(vec)); | 292 | xics_mask_real_irq(vec); |
| 293 | } | 293 | } |
| 294 | 294 | ||
| 295 | static inline unsigned int xics_xirr_vector(unsigned int xirr) | 295 | static inline unsigned int xics_xirr_vector(unsigned int xirr) |
| @@ -373,37 +373,37 @@ static unsigned char pop_cppr(void) | |||
| 373 | 373 | ||
| 374 | static void xics_eoi_direct(struct irq_data *d) | 374 | static void xics_eoi_direct(struct irq_data *d) |
| 375 | { | 375 | { |
| 376 | unsigned int irq = (unsigned int)irq_map[d->irq].hwirq; | 376 | unsigned int hwirq = (unsigned int)irq_map[d->irq].hwirq; |
| 377 | 377 | ||
| 378 | iosync(); | 378 | iosync(); |
| 379 | direct_xirr_info_set((pop_cppr() << 24) | irq); | 379 | direct_xirr_info_set((pop_cppr() << 24) | hwirq); |
| 380 | } | 380 | } |
| 381 | 381 | ||
| 382 | static void xics_eoi_lpar(struct irq_data *d) | 382 | static void xics_eoi_lpar(struct irq_data *d) |
| 383 | { | 383 | { |
| 384 | unsigned int irq = (unsigned int)irq_map[d->irq].hwirq; | 384 | unsigned int hwirq = (unsigned int)irq_map[d->irq].hwirq; |
| 385 | 385 | ||
| 386 | iosync(); | 386 | iosync(); |
| 387 | lpar_xirr_info_set((pop_cppr() << 24) | irq); | 387 | lpar_xirr_info_set((pop_cppr() << 24) | hwirq); |
| 388 | } | 388 | } |
| 389 | 389 | ||
| 390 | static int | 390 | static int |
| 391 | xics_set_affinity(struct irq_data *d, const struct cpumask *cpumask, bool force) | 391 | xics_set_affinity(struct irq_data *d, const struct cpumask *cpumask, bool force) |
| 392 | { | 392 | { |
| 393 | unsigned int irq; | 393 | unsigned int hwirq; |
| 394 | int status; | 394 | int status; |
| 395 | int xics_status[2]; | 395 | int xics_status[2]; |
| 396 | int irq_server; | 396 | int irq_server; |
| 397 | 397 | ||
| 398 | irq = (unsigned int)irq_map[d->irq].hwirq; | 398 | hwirq = (unsigned int)irq_map[d->irq].hwirq; |
| 399 | if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS) | 399 | if (hwirq == XICS_IPI || hwirq == XICS_IRQ_SPURIOUS) |
| 400 | return -1; | 400 | return -1; |
| 401 | 401 | ||
| 402 | status = rtas_call(ibm_get_xive, 1, 3, xics_status, irq); | 402 | status = rtas_call(ibm_get_xive, 1, 3, xics_status, hwirq); |
| 403 | 403 | ||
| 404 | if (status) { | 404 | if (status) { |
| 405 | printk(KERN_ERR "%s: ibm,get-xive irq=%u returns %d\n", | 405 | printk(KERN_ERR "%s: ibm,get-xive irq=%u returns %d\n", |
| 406 | __func__, irq, status); | 406 | __func__, hwirq, status); |
| 407 | return -1; | 407 | return -1; |
| 408 | } | 408 | } |
| 409 | 409 | ||
| @@ -418,11 +418,11 @@ xics_set_affinity(struct irq_data *d, const struct cpumask *cpumask, bool force) | |||
| 418 | } | 418 | } |
| 419 | 419 | ||
| 420 | status = rtas_call(ibm_set_xive, 3, 1, NULL, | 420 | status = rtas_call(ibm_set_xive, 3, 1, NULL, |
| 421 | irq, irq_server, xics_status[1]); | 421 | hwirq, irq_server, xics_status[1]); |
| 422 | 422 | ||
| 423 | if (status) { | 423 | if (status) { |
| 424 | printk(KERN_ERR "%s: ibm,set-xive irq=%u returns %d\n", | 424 | printk(KERN_ERR "%s: ibm,set-xive irq=%u returns %d\n", |
| 425 | __func__, irq, status); | 425 | __func__, hwirq, status); |
| 426 | return -1; | 426 | return -1; |
| 427 | } | 427 | } |
| 428 | 428 | ||
| @@ -874,7 +874,7 @@ void xics_kexec_teardown_cpu(int secondary) | |||
| 874 | void xics_migrate_irqs_away(void) | 874 | void xics_migrate_irqs_away(void) |
| 875 | { | 875 | { |
| 876 | int cpu = smp_processor_id(), hw_cpu = hard_smp_processor_id(); | 876 | int cpu = smp_processor_id(), hw_cpu = hard_smp_processor_id(); |
| 877 | unsigned int irq, virq; | 877 | int virq; |
| 878 | 878 | ||
| 879 | /* If we used to be the default server, move to the new "boot_cpuid" */ | 879 | /* If we used to be the default server, move to the new "boot_cpuid" */ |
| 880 | if (hw_cpu == default_server) | 880 | if (hw_cpu == default_server) |
| @@ -892,18 +892,19 @@ void xics_migrate_irqs_away(void) | |||
| 892 | for_each_irq(virq) { | 892 | for_each_irq(virq) { |
| 893 | struct irq_desc *desc; | 893 | struct irq_desc *desc; |
| 894 | struct irq_chip *chip; | 894 | struct irq_chip *chip; |
| 895 | unsigned int hwirq; | ||
| 895 | int xics_status[2]; | 896 | int xics_status[2]; |
| 896 | int status; | 897 | int status; |
| 897 | unsigned long flags; | 898 | unsigned long flags; |
| 898 | 899 | ||
| 899 | /* We cant set affinity on ISA interrupts */ | 900 | /* We can't set affinity on ISA interrupts */ |
| 900 | if (virq < NUM_ISA_INTERRUPTS) | 901 | if (virq < NUM_ISA_INTERRUPTS) |
| 901 | continue; | 902 | continue; |
| 902 | if (irq_map[virq].host != xics_host) | 903 | if (irq_map[virq].host != xics_host) |
| 903 | continue; | 904 | continue; |
| 904 | irq = (unsigned int)irq_map[virq].hwirq; | 905 | hwirq = (unsigned int)irq_map[virq].hwirq; |
| 905 | /* We need to get IPIs still. */ | 906 | /* We need to get IPIs still. */ |
| 906 | if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS) | 907 | if (hwirq == XICS_IPI || hwirq == XICS_IRQ_SPURIOUS) |
| 907 | continue; | 908 | continue; |
| 908 | 909 | ||
| 909 | desc = irq_to_desc(virq); | 910 | desc = irq_to_desc(virq); |
| @@ -918,10 +919,10 @@ void xics_migrate_irqs_away(void) | |||
| 918 | 919 | ||
| 919 | raw_spin_lock_irqsave(&desc->lock, flags); | 920 | raw_spin_lock_irqsave(&desc->lock, flags); |
| 920 | 921 | ||
| 921 | status = rtas_call(ibm_get_xive, 1, 3, xics_status, irq); | 922 | status = rtas_call(ibm_get_xive, 1, 3, xics_status, hwirq); |
| 922 | if (status) { | 923 | if (status) { |
| 923 | printk(KERN_ERR "%s: ibm,get-xive irq=%u returns %d\n", | 924 | printk(KERN_ERR "%s: ibm,get-xive irq=%u returns %d\n", |
| 924 | __func__, irq, status); | 925 | __func__, hwirq, status); |
| 925 | goto unlock; | 926 | goto unlock; |
| 926 | } | 927 | } |
| 927 | 928 | ||
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c index 27402c7d309d..1636dd896707 100644 --- a/arch/powerpc/sysdev/axonram.c +++ b/arch/powerpc/sysdev/axonram.c | |||
| @@ -95,7 +95,7 @@ axon_ram_irq_handler(int irq, void *dev) | |||
| 95 | 95 | ||
| 96 | BUG_ON(!bank); | 96 | BUG_ON(!bank); |
| 97 | 97 | ||
| 98 | dev_err(&device->dev, "Correctable memory error occured\n"); | 98 | dev_err(&device->dev, "Correctable memory error occurred\n"); |
| 99 | bank->ecc_counter++; | 99 | bank->ecc_counter++; |
| 100 | return IRQ_HANDLED; | 100 | return IRQ_HANDLED; |
| 101 | } | 101 | } |
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.h b/arch/powerpc/sysdev/bestcomm/bestcomm.h index 23a95f80dfdb..a0e2e6b19b57 100644 --- a/arch/powerpc/sysdev/bestcomm/bestcomm.h +++ b/arch/powerpc/sysdev/bestcomm/bestcomm.h | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | * struct bcom_bd - Structure describing a generic BestComm buffer descriptor | 20 | * struct bcom_bd - Structure describing a generic BestComm buffer descriptor |
| 21 | * @status: The current status of this buffer. Exact meaning depends on the | 21 | * @status: The current status of this buffer. Exact meaning depends on the |
| 22 | * task type | 22 | * task type |
| 23 | * @data: An array of u32 extra data. Size of array is task dependant. | 23 | * @data: An array of u32 extra data. Size of array is task dependent. |
| 24 | * | 24 | * |
| 25 | * Note: Don't dereference a bcom_bd pointer as an array. The size of the | 25 | * Note: Don't dereference a bcom_bd pointer as an array. The size of the |
| 26 | * bcom_bd is variable. Use bcom_get_bd() instead. | 26 | * bcom_bd is variable. Use bcom_get_bd() instead. |
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm_priv.h b/arch/powerpc/sysdev/bestcomm/bestcomm_priv.h index eb0d1c883c31..3b52f3ffbdf8 100644 --- a/arch/powerpc/sysdev/bestcomm/bestcomm_priv.h +++ b/arch/powerpc/sysdev/bestcomm/bestcomm_priv.h | |||
| @@ -97,7 +97,7 @@ struct bcom_task_header { | |||
| 97 | u8 reserved[8]; | 97 | u8 reserved[8]; |
| 98 | }; | 98 | }; |
| 99 | 99 | ||
| 100 | /* Descriptors stucture & co */ | 100 | /* Descriptors structure & co */ |
| 101 | #define BCOM_DESC_NOP 0x000001f8 | 101 | #define BCOM_DESC_NOP 0x000001f8 |
| 102 | #define BCOM_LCD_MASK 0x80000000 | 102 | #define BCOM_LCD_MASK 0x80000000 |
| 103 | #define BCOM_DRD_EXTENDED 0x40000000 | 103 | #define BCOM_DRD_EXTENDED 0x40000000 |
diff --git a/arch/powerpc/sysdev/cpm1.c b/arch/powerpc/sysdev/cpm1.c index 8b5aba263323..e0bc944eb23f 100644 --- a/arch/powerpc/sysdev/cpm1.c +++ b/arch/powerpc/sysdev/cpm1.c | |||
| @@ -223,7 +223,7 @@ void __init cpm_reset(void) | |||
| 223 | 223 | ||
| 224 | /* Set SDMA Bus Request priority 5. | 224 | /* Set SDMA Bus Request priority 5. |
| 225 | * On 860T, this also enables FEC priority 6. I am not sure | 225 | * On 860T, this also enables FEC priority 6. I am not sure |
| 226 | * this is what we realy want for some applications, but the | 226 | * this is what we really want for some applications, but the |
| 227 | * manual recommends it. | 227 | * manual recommends it. |
| 228 | * Bit 25, FAM can also be set to use FEC aggressive mode (860T). | 228 | * Bit 25, FAM can also be set to use FEC aggressive mode (860T). |
| 229 | */ | 229 | */ |
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index f8f7f28c6343..68ca9290df94 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c | |||
| @@ -324,6 +324,11 @@ int __init fsl_add_bridge(struct device_node *dev, int is_primary) | |||
| 324 | struct resource rsrc; | 324 | struct resource rsrc; |
| 325 | const int *bus_range; | 325 | const int *bus_range; |
| 326 | 326 | ||
| 327 | if (!of_device_is_available(dev)) { | ||
| 328 | pr_warning("%s: disabled\n", dev->full_name); | ||
| 329 | return -ENODEV; | ||
| 330 | } | ||
| 331 | |||
| 327 | pr_debug("Adding PCI host bridge %s\n", dev->full_name); | 332 | pr_debug("Adding PCI host bridge %s\n", dev->full_name); |
| 328 | 333 | ||
| 329 | /* Fetch host bridge registers address */ | 334 | /* Fetch host bridge registers address */ |
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index 14232d57369c..49798532b477 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c | |||
| @@ -1457,7 +1457,6 @@ int fsl_rio_setup(struct platform_device *dev) | |||
| 1457 | port->ops = ops; | 1457 | port->ops = ops; |
| 1458 | port->priv = priv; | 1458 | port->priv = priv; |
| 1459 | port->phys_efptr = 0x100; | 1459 | port->phys_efptr = 0x100; |
| 1460 | rio_register_mport(port); | ||
| 1461 | 1460 | ||
| 1462 | priv->regs_win = ioremap(regs.start, regs.end - regs.start + 1); | 1461 | priv->regs_win = ioremap(regs.start, regs.end - regs.start + 1); |
| 1463 | rio_regs_win = priv->regs_win; | 1462 | rio_regs_win = priv->regs_win; |
| @@ -1504,6 +1503,9 @@ int fsl_rio_setup(struct platform_device *dev) | |||
| 1504 | dev_info(&dev->dev, "RapidIO Common Transport System size: %d\n", | 1503 | dev_info(&dev->dev, "RapidIO Common Transport System size: %d\n", |
| 1505 | port->sys_size ? 65536 : 256); | 1504 | port->sys_size ? 65536 : 256); |
| 1506 | 1505 | ||
| 1506 | if (rio_register_mport(port)) | ||
| 1507 | goto err; | ||
| 1508 | |||
| 1507 | if (port->host_deviceid >= 0) | 1509 | if (port->host_deviceid >= 0) |
| 1508 | out_be32(priv->regs_win + RIO_GCCSR, RIO_PORT_GEN_HOST | | 1510 | out_be32(priv->regs_win + RIO_GCCSR, RIO_PORT_GEN_HOST | |
| 1509 | RIO_PORT_GEN_MASTER | RIO_PORT_GEN_DISCOVERED); | 1511 | RIO_PORT_GEN_MASTER | RIO_PORT_GEN_DISCOVERED); |
diff --git a/arch/powerpc/sysdev/indirect_pci.c b/arch/powerpc/sysdev/indirect_pci.c index 7ed809676642..82fdad885d20 100644 --- a/arch/powerpc/sysdev/indirect_pci.c +++ b/arch/powerpc/sysdev/indirect_pci.c | |||
| @@ -117,7 +117,7 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
| 117 | out_le32(hose->cfg_addr, (0x80000000 | (bus_no << 16) | | 117 | out_le32(hose->cfg_addr, (0x80000000 | (bus_no << 16) | |
| 118 | (devfn << 8) | reg | cfg_type)); | 118 | (devfn << 8) | reg | cfg_type)); |
| 119 | 119 | ||
| 120 | /* surpress setting of PCI_PRIMARY_BUS */ | 120 | /* suppress setting of PCI_PRIMARY_BUS */ |
| 121 | if (hose->indirect_type & PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS) | 121 | if (hose->indirect_type & PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS) |
| 122 | if ((offset == PCI_PRIMARY_BUS) && | 122 | if ((offset == PCI_PRIMARY_BUS) && |
| 123 | (bus->number == hose->first_busno)) | 123 | (bus->number == hose->first_busno)) |
diff --git a/arch/powerpc/sysdev/mpc8xx_pic.c b/arch/powerpc/sysdev/mpc8xx_pic.c index f550e23632f8..a88800ff4d01 100644 --- a/arch/powerpc/sysdev/mpc8xx_pic.c +++ b/arch/powerpc/sysdev/mpc8xx_pic.c | |||
| @@ -80,7 +80,7 @@ static int mpc8xx_set_irq_type(struct irq_data *d, unsigned int flow_type) | |||
| 80 | if ((hw & 1) == 0) { | 80 | if ((hw & 1) == 0) { |
| 81 | siel |= (0x80000000 >> hw); | 81 | siel |= (0x80000000 >> hw); |
| 82 | out_be32(&siu_reg->sc_siel, siel); | 82 | out_be32(&siu_reg->sc_siel, siel); |
| 83 | __irq_set_handler_locked(irq, handle_edge_irq); | 83 | __irq_set_handler_locked(d->irq, handle_edge_irq); |
| 84 | } | 84 | } |
| 85 | } | 85 | } |
| 86 | return 0; | 86 | return 0; |
diff --git a/arch/powerpc/sysdev/ppc4xx_pci.h b/arch/powerpc/sysdev/ppc4xx_pci.h index 56d9e5deccbf..c39a134e8684 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.h +++ b/arch/powerpc/sysdev/ppc4xx_pci.h | |||
| @@ -324,7 +324,7 @@ | |||
| 324 | #define PESDR0_460EX_IHS2 0x036D | 324 | #define PESDR0_460EX_IHS2 0x036D |
| 325 | 325 | ||
| 326 | /* | 326 | /* |
| 327 | * 460SX addtional DCRs | 327 | * 460SX additional DCRs |
| 328 | */ | 328 | */ |
| 329 | #define PESDRn_460SX_RCEI 0x02 | 329 | #define PESDRn_460SX_RCEI 0x02 |
| 330 | 330 | ||
diff --git a/arch/s390/include/asm/atomic.h b/arch/s390/include/asm/atomic.h index 5c5ba10384c2..d9db13810d15 100644 --- a/arch/s390/include/asm/atomic.h +++ b/arch/s390/include/asm/atomic.h | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * | 9 | * |
| 10 | * Atomic operations that C can't guarantee us. | 10 | * Atomic operations that C can't guarantee us. |
| 11 | * Useful for resource counting etc. | 11 | * Useful for resource counting etc. |
| 12 | * s390 uses 'Compare And Swap' for atomicity in SMP enviroment. | 12 | * s390 uses 'Compare And Swap' for atomicity in SMP environment. |
| 13 | * | 13 | * |
| 14 | */ | 14 | */ |
| 15 | 15 | ||
diff --git a/arch/s390/include/asm/cio.h b/arch/s390/include/asm/cio.h index e34347d567a6..fc50a3342da3 100644 --- a/arch/s390/include/asm/cio.h +++ b/arch/s390/include/asm/cio.h | |||
| @@ -183,7 +183,7 @@ struct esw3 { | |||
| 183 | * The irb that is handed to the device driver when an interrupt occurs. For | 183 | * The irb that is handed to the device driver when an interrupt occurs. For |
| 184 | * solicited interrupts, the common I/O layer already performs checks whether | 184 | * solicited interrupts, the common I/O layer already performs checks whether |
| 185 | * a field is valid; a field not being valid is always passed as %0. | 185 | * a field is valid; a field not being valid is always passed as %0. |
| 186 | * If a unit check occured, @ecw may contain sense data; this is retrieved | 186 | * If a unit check occurred, @ecw may contain sense data; this is retrieved |
| 187 | * by the common I/O layer itself if the device doesn't support concurrent | 187 | * by the common I/O layer itself if the device doesn't support concurrent |
| 188 | * sense (so that the device driver never needs to perform basic sene itself). | 188 | * sense (so that the device driver never needs to perform basic sene itself). |
| 189 | * For unsolicited interrupts, the irb is passed as-is (expect for sense data, | 189 | * For unsolicited interrupts, the irb is passed as-is (expect for sense data, |
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S index 7061398341d5..fb317bf2c378 100644 --- a/arch/s390/kernel/head.S +++ b/arch/s390/kernel/head.S | |||
| @@ -460,7 +460,7 @@ startup: | |||
| 460 | #ifndef CONFIG_MARCH_G5 | 460 | #ifndef CONFIG_MARCH_G5 |
| 461 | # check capabilities against MARCH_{G5,Z900,Z990,Z9_109,Z10} | 461 | # check capabilities against MARCH_{G5,Z900,Z990,Z9_109,Z10} |
| 462 | xc __LC_STFL_FAC_LIST(8),__LC_STFL_FAC_LIST | 462 | xc __LC_STFL_FAC_LIST(8),__LC_STFL_FAC_LIST |
| 463 | stfl __LC_STFL_FAC_LIST # store facility list | 463 | .insn s,0xb2b10000,__LC_STFL_FAC_LIST # store facility list |
| 464 | tm __LC_STFL_FAC_LIST,0x01 # stfle available ? | 464 | tm __LC_STFL_FAC_LIST,0x01 # stfle available ? |
| 465 | jz 0f | 465 | jz 0f |
| 466 | la %r0,0 | 466 | la %r0,0 |
diff --git a/arch/s390/kernel/reipl64.S b/arch/s390/kernel/reipl64.S index 5e73dee63baa..9eabbc90795d 100644 --- a/arch/s390/kernel/reipl64.S +++ b/arch/s390/kernel/reipl64.S | |||
| @@ -78,7 +78,7 @@ do_reipl_asm: basr %r13,0 | |||
| 78 | * in the ESA psw. | 78 | * in the ESA psw. |
| 79 | * Bit 31 of the addresses has to be 0 for the | 79 | * Bit 31 of the addresses has to be 0 for the |
| 80 | * 31bit lpswe instruction a fact they appear to have | 80 | * 31bit lpswe instruction a fact they appear to have |
| 81 | * ommited from the pop. | 81 | * omitted from the pop. |
| 82 | */ | 82 | */ |
| 83 | .Lnewpsw: .quad 0x0000000080000000 | 83 | .Lnewpsw: .quad 0x0000000080000000 |
| 84 | .quad .Lpg1 | 84 | .quad .Lpg1 |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index ed183c2c6168..f5434d1ecb31 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
| @@ -708,7 +708,7 @@ static void __init setup_hwcaps(void) | |||
| 708 | * and 1ULL<<0 as bit 63. Bits 0-31 contain the same information | 708 | * and 1ULL<<0 as bit 63. Bits 0-31 contain the same information |
| 709 | * as stored by stfl, bits 32-xxx contain additional facilities. | 709 | * as stored by stfl, bits 32-xxx contain additional facilities. |
| 710 | * How many facility words are stored depends on the number of | 710 | * How many facility words are stored depends on the number of |
| 711 | * doublewords passed to the instruction. The additional facilites | 711 | * doublewords passed to the instruction. The additional facilities |
| 712 | * are: | 712 | * are: |
| 713 | * Bit 42: decimal floating point facility is installed | 713 | * Bit 42: decimal floating point facility is installed |
| 714 | * Bit 44: perform floating point operation facility is installed | 714 | * Bit 44: perform floating point operation facility is installed |
diff --git a/arch/s390/kernel/switch_cpu.S b/arch/s390/kernel/switch_cpu.S index 469f11b574fa..20530dd2eab1 100644 --- a/arch/s390/kernel/switch_cpu.S +++ b/arch/s390/kernel/switch_cpu.S | |||
| @@ -46,7 +46,9 @@ smp_restart_cpu: | |||
| 46 | ltr %r4,%r4 /* New stack ? */ | 46 | ltr %r4,%r4 /* New stack ? */ |
| 47 | jz 1f | 47 | jz 1f |
| 48 | lr %r15,%r4 | 48 | lr %r15,%r4 |
| 49 | 1: basr %r14,%r2 | 49 | 1: lr %r14,%r2 /* r14: Function to call */ |
| 50 | lr %r2,%r3 /* r2 : Parameter for function*/ | ||
| 51 | basr %r14,%r14 /* Call function */ | ||
| 50 | 52 | ||
| 51 | .gprregs_addr: | 53 | .gprregs_addr: |
| 52 | .long .gprregs | 54 | .long .gprregs |
diff --git a/arch/s390/kernel/switch_cpu64.S b/arch/s390/kernel/switch_cpu64.S index d94aacc898cb..5be3f43898f9 100644 --- a/arch/s390/kernel/switch_cpu64.S +++ b/arch/s390/kernel/switch_cpu64.S | |||
| @@ -42,7 +42,9 @@ smp_restart_cpu: | |||
| 42 | ltgr %r4,%r4 /* New stack ? */ | 42 | ltgr %r4,%r4 /* New stack ? */ |
| 43 | jz 1f | 43 | jz 1f |
| 44 | lgr %r15,%r4 | 44 | lgr %r15,%r4 |
| 45 | 1: basr %r14,%r2 | 45 | 1: lgr %r14,%r2 /* r14: Function to call */ |
| 46 | lgr %r2,%r3 /* r2 : Parameter for function*/ | ||
| 47 | basr %r14,%r14 /* Call function */ | ||
| 46 | 48 | ||
| 47 | .section .data,"aw",@progbits | 49 | .section .data,"aw",@progbits |
| 48 | .gprregs: | 50 | .gprregs: |
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 9e7b039458da..87be655557aa 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
| @@ -724,7 +724,7 @@ static void clock_sync_cpu(struct clock_sync_data *sync) | |||
| 724 | } | 724 | } |
| 725 | 725 | ||
| 726 | /* | 726 | /* |
| 727 | * Sync the TOD clock using the port refered to by aibp. This port | 727 | * Sync the TOD clock using the port referred to by aibp. This port |
| 728 | * has to be enabled and the other port has to be disabled. The | 728 | * has to be enabled and the other port has to be disabled. The |
| 729 | * last eacr update has to be more than 1.6 seconds in the past. | 729 | * last eacr update has to be more than 1.6 seconds in the past. |
| 730 | */ | 730 | */ |
| @@ -1012,7 +1012,7 @@ static void etr_work_fn(struct work_struct *work) | |||
| 1012 | eacr = etr_handle_update(&aib, eacr); | 1012 | eacr = etr_handle_update(&aib, eacr); |
| 1013 | 1013 | ||
| 1014 | /* | 1014 | /* |
| 1015 | * Select ports to enable. The prefered synchronization mode is PPS. | 1015 | * Select ports to enable. The preferred synchronization mode is PPS. |
| 1016 | * If a port can be enabled depends on a number of things: | 1016 | * If a port can be enabled depends on a number of things: |
| 1017 | * 1) The port needs to be online and uptodate. A port is not | 1017 | * 1) The port needs to be online and uptodate. A port is not |
| 1018 | * disabled just because it is not uptodate, but it is only | 1018 | * disabled just because it is not uptodate, but it is only |
| @@ -1091,7 +1091,7 @@ static void etr_work_fn(struct work_struct *work) | |||
| 1091 | /* | 1091 | /* |
| 1092 | * Update eacr and try to synchronize the clock. If the update | 1092 | * Update eacr and try to synchronize the clock. If the update |
| 1093 | * of eacr caused a stepping port switch (or if we have to | 1093 | * of eacr caused a stepping port switch (or if we have to |
| 1094 | * assume that a stepping port switch has occured) or the | 1094 | * assume that a stepping port switch has occurred) or the |
| 1095 | * clock syncing failed, reset the sync check control bit | 1095 | * clock syncing failed, reset the sync check control bit |
| 1096 | * and set up a timer to try again after 0.5 seconds | 1096 | * and set up a timer to try again after 0.5 seconds |
| 1097 | */ | 1097 | */ |
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index 1ccdf4d8aa85..5e8ead4b4aba 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c | |||
| @@ -44,7 +44,7 @@ static inline void set_vtimer(__u64 expires) | |||
| 44 | __u64 timer; | 44 | __u64 timer; |
| 45 | 45 | ||
| 46 | asm volatile (" STPT %0\n" /* Store current cpu timer value */ | 46 | asm volatile (" STPT %0\n" /* Store current cpu timer value */ |
| 47 | " SPT %1" /* Set new value immediatly afterwards */ | 47 | " SPT %1" /* Set new value immediately afterwards */ |
| 48 | : "=m" (timer) : "m" (expires) ); | 48 | : "=m" (timer) : "m" (expires) ); |
| 49 | S390_lowcore.system_timer += S390_lowcore.last_update_timer - timer; | 49 | S390_lowcore.system_timer += S390_lowcore.last_update_timer - timer; |
| 50 | S390_lowcore.last_update_timer = expires; | 50 | S390_lowcore.last_update_timer = expires; |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index bade533ba288..30ca85cce314 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
| @@ -721,7 +721,7 @@ static int __init kvm_s390_init(void) | |||
| 721 | 721 | ||
| 722 | /* | 722 | /* |
| 723 | * guests can ask for up to 255+1 double words, we need a full page | 723 | * guests can ask for up to 255+1 double words, we need a full page |
| 724 | * to hold the maximum amount of facilites. On the other hand, we | 724 | * to hold the maximum amount of facilities. On the other hand, we |
| 725 | * only set facilities that are known to work in KVM. | 725 | * only set facilities that are known to work in KVM. |
| 726 | */ | 726 | */ |
| 727 | facilities = (unsigned long long *) get_zeroed_page(GFP_KERNEL|GFP_DMA); | 727 | facilities = (unsigned long long *) get_zeroed_page(GFP_KERNEL|GFP_DMA); |
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index 9194a4b52b22..73c47bd95db3 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c | |||
| @@ -311,7 +311,7 @@ int kvm_s390_handle_b2(struct kvm_vcpu *vcpu) | |||
| 311 | 311 | ||
| 312 | /* | 312 | /* |
| 313 | * a lot of B2 instructions are priviledged. We first check for | 313 | * a lot of B2 instructions are priviledged. We first check for |
| 314 | * the priviledges ones, that we can handle in the kernel. If the | 314 | * the privileged ones, that we can handle in the kernel. If the |
| 315 | * kernel can handle this instruction, we check for the problem | 315 | * kernel can handle this instruction, we check for the problem |
| 316 | * state bit and (a) handle the instruction or (b) send a code 2 | 316 | * state bit and (a) handle the instruction or (b) send a code 2 |
| 317 | * program check. | 317 | * program check. |
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 2c57806c0858..9217e332b118 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
| @@ -392,7 +392,7 @@ void __kprobes do_protection_exception(struct pt_regs *regs, long pgm_int_code, | |||
| 392 | { | 392 | { |
| 393 | int fault; | 393 | int fault; |
| 394 | 394 | ||
| 395 | /* Protection exception is supressing, decrement psw address. */ | 395 | /* Protection exception is suppressing, decrement psw address. */ |
| 396 | regs->psw.addr -= (pgm_int_code >> 16); | 396 | regs->psw.addr -= (pgm_int_code >> 16); |
| 397 | /* | 397 | /* |
| 398 | * Check for low-address protection. This needs to be treated | 398 | * Check for low-address protection. This needs to be treated |
diff --git a/arch/s390/oprofile/hwsampler.c b/arch/s390/oprofile/hwsampler.c index 3d48f4db246d..4952872d6f0a 100644 --- a/arch/s390/oprofile/hwsampler.c +++ b/arch/s390/oprofile/hwsampler.c | |||
| @@ -517,12 +517,8 @@ stop_exit: | |||
| 517 | 517 | ||
| 518 | static int check_hardware_prerequisites(void) | 518 | static int check_hardware_prerequisites(void) |
| 519 | { | 519 | { |
| 520 | unsigned long long facility_bits[2]; | 520 | if (!test_facility(68)) |
| 521 | |||
| 522 | memcpy(facility_bits, S390_lowcore.stfle_fac_list, 32); | ||
| 523 | if (!(facility_bits[1] & (1ULL << 59))) | ||
| 524 | return -EOPNOTSUPP; | 521 | return -EOPNOTSUPP; |
| 525 | |||
| 526 | return 0; | 522 | return 0; |
| 527 | } | 523 | } |
| 528 | /* | 524 | /* |
diff --git a/arch/score/Kconfig b/arch/score/Kconfig index 4278bbc032ce..e73bc781cc14 100644 --- a/arch/score/Kconfig +++ b/arch/score/Kconfig | |||
| @@ -3,7 +3,6 @@ menu "Machine selection" | |||
| 3 | config SCORE | 3 | config SCORE |
| 4 | def_bool y | 4 | def_bool y |
| 5 | select HAVE_GENERIC_HARDIRQS | 5 | select HAVE_GENERIC_HARDIRQS |
| 6 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
| 7 | select GENERIC_IRQ_SHOW | 6 | select GENERIC_IRQ_SHOW |
| 8 | 7 | ||
| 9 | choice | 8 | choice |
diff --git a/arch/score/Makefile b/arch/score/Makefile index d77dc639d8e3..974aefe86123 100644 --- a/arch/score/Makefile +++ b/arch/score/Makefile | |||
| @@ -40,5 +40,5 @@ archclean: | |||
| 40 | define archhelp | 40 | define archhelp |
| 41 | echo ' vmlinux.bin - Raw binary boot image' | 41 | echo ' vmlinux.bin - Raw binary boot image' |
| 42 | echo | 42 | echo |
| 43 | echo ' These will be default as apropriate for a configured platform.' | 43 | echo ' These will be default as appropriate for a configured platform.' |
| 44 | endef | 44 | endef |
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 9af3c8d0776b..4b89da248d17 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
| @@ -23,8 +23,8 @@ config SUPERH | |||
| 23 | select HAVE_SPARSE_IRQ | 23 | select HAVE_SPARSE_IRQ |
| 24 | select RTC_LIB | 24 | select RTC_LIB |
| 25 | select GENERIC_ATOMIC64 | 25 | select GENERIC_ATOMIC64 |
| 26 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
| 27 | select GENERIC_IRQ_SHOW | 26 | select GENERIC_IRQ_SHOW |
| 27 | select ARCH_NO_SYSDEV_OPS | ||
| 28 | help | 28 | help |
| 29 | The SuperH is a RISC processor targeted for use in embedded systems | 29 | The SuperH is a RISC processor targeted for use in embedded systems |
| 30 | and consumer electronics; it was also used in the Sega Dreamcast | 30 | and consumer electronics; it was also used in the Sega Dreamcast |
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug index 12fec72fec5f..1553d56cf4e0 100644 --- a/arch/sh/Kconfig.debug +++ b/arch/sh/Kconfig.debug | |||
| @@ -82,7 +82,7 @@ config SH_NO_BSS_INIT | |||
| 82 | help | 82 | help |
| 83 | If running in painfully slow environments, such as an RTL | 83 | If running in painfully slow environments, such as an RTL |
| 84 | simulation or from remote memory via SHdebug, where the memory | 84 | simulation or from remote memory via SHdebug, where the memory |
| 85 | can already be gauranteed to ber zeroed on boot, say Y. | 85 | can already be guaranteed to ber zeroed on boot, say Y. |
| 86 | 86 | ||
| 87 | For all other cases, say N. If this option seems perplexing, or | 87 | For all other cases, say N. If this option seems perplexing, or |
| 88 | you aren't sure, say N. | 88 | you aren't sure, say N. |
diff --git a/arch/sh/boards/board-sh7757lcr.c b/arch/sh/boards/board-sh7757lcr.c index a9e33569ad38..fa2a208ec6cb 100644 --- a/arch/sh/boards/board-sh7757lcr.c +++ b/arch/sh/boards/board-sh7757lcr.c | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
| 18 | #include <linux/mmc/host.h> | 18 | #include <linux/mmc/host.h> |
| 19 | #include <linux/mmc/sh_mmcif.h> | 19 | #include <linux/mmc/sh_mmcif.h> |
| 20 | #include <linux/mfd/sh_mobile_sdhi.h> | 20 | #include <linux/mmc/sh_mobile_sdhi.h> |
| 21 | #include <cpu/sh7757.h> | 21 | #include <cpu/sh7757.h> |
| 22 | #include <asm/sh_eth.h> | 22 | #include <asm/sh_eth.h> |
| 23 | #include <asm/heartbeat.h> | 23 | #include <asm/heartbeat.h> |
diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c index 636d8318a72a..618bd566cf53 100644 --- a/arch/sh/boards/mach-ap325rxa/setup.c +++ b/arch/sh/boards/mach-ap325rxa/setup.c | |||
| @@ -156,24 +156,34 @@ static struct platform_device nand_flash_device = { | |||
| 156 | #define PORT_DRVCRA 0xA405018A | 156 | #define PORT_DRVCRA 0xA405018A |
| 157 | #define PORT_DRVCRB 0xA405018C | 157 | #define PORT_DRVCRB 0xA405018C |
| 158 | 158 | ||
| 159 | static int ap320_wvga_set_brightness(void *board_data, int brightness) | ||
| 160 | { | ||
| 161 | if (brightness) { | ||
| 162 | gpio_set_value(GPIO_PTS3, 0); | ||
| 163 | __raw_writew(0x100, FPGA_BKLREG); | ||
| 164 | } else { | ||
| 165 | __raw_writew(0, FPGA_BKLREG); | ||
| 166 | gpio_set_value(GPIO_PTS3, 1); | ||
| 167 | } | ||
| 168 | |||
| 169 | return 0; | ||
| 170 | } | ||
| 171 | |||
| 172 | static int ap320_wvga_get_brightness(void *board_data) | ||
| 173 | { | ||
| 174 | return gpio_get_value(GPIO_PTS3); | ||
| 175 | } | ||
| 176 | |||
| 159 | static void ap320_wvga_power_on(void *board_data, struct fb_info *info) | 177 | static void ap320_wvga_power_on(void *board_data, struct fb_info *info) |
| 160 | { | 178 | { |
| 161 | msleep(100); | 179 | msleep(100); |
| 162 | 180 | ||
| 163 | /* ASD AP-320/325 LCD ON */ | 181 | /* ASD AP-320/325 LCD ON */ |
| 164 | __raw_writew(FPGA_LCDREG_VAL, FPGA_LCDREG); | 182 | __raw_writew(FPGA_LCDREG_VAL, FPGA_LCDREG); |
| 165 | |||
| 166 | /* backlight */ | ||
| 167 | gpio_set_value(GPIO_PTS3, 0); | ||
| 168 | __raw_writew(0x100, FPGA_BKLREG); | ||
| 169 | } | 183 | } |
| 170 | 184 | ||
| 171 | static void ap320_wvga_power_off(void *board_data) | 185 | static void ap320_wvga_power_off(void *board_data) |
| 172 | { | 186 | { |
| 173 | /* backlight */ | ||
| 174 | __raw_writew(0, FPGA_BKLREG); | ||
| 175 | gpio_set_value(GPIO_PTS3, 1); | ||
| 176 | |||
| 177 | /* ASD AP-320/325 LCD OFF */ | 187 | /* ASD AP-320/325 LCD OFF */ |
| 178 | __raw_writew(0, FPGA_LCDREG); | 188 | __raw_writew(0, FPGA_LCDREG); |
| 179 | } | 189 | } |
| @@ -209,6 +219,12 @@ static struct sh_mobile_lcdc_info lcdc_info = { | |||
| 209 | .board_cfg = { | 219 | .board_cfg = { |
| 210 | .display_on = ap320_wvga_power_on, | 220 | .display_on = ap320_wvga_power_on, |
| 211 | .display_off = ap320_wvga_power_off, | 221 | .display_off = ap320_wvga_power_off, |
| 222 | .set_brightness = ap320_wvga_set_brightness, | ||
| 223 | .get_brightness = ap320_wvga_get_brightness, | ||
| 224 | }, | ||
| 225 | .bl_info = { | ||
| 226 | .name = "sh_mobile_lcdc_bl", | ||
| 227 | .max_brightness = 1, | ||
| 212 | }, | 228 | }, |
| 213 | } | 229 | } |
| 214 | }; | 230 | }; |
diff --git a/arch/sh/boards/mach-dreamcast/irq.c b/arch/sh/boards/mach-dreamcast/irq.c index 78cf2ab89d7a..f63d323f411f 100644 --- a/arch/sh/boards/mach-dreamcast/irq.c +++ b/arch/sh/boards/mach-dreamcast/irq.c | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | */ | 51 | */ |
| 52 | #define LEVEL(event) (((event) - HW_EVENT_IRQ_BASE) / 32) | 52 | #define LEVEL(event) (((event) - HW_EVENT_IRQ_BASE) / 32) |
| 53 | 53 | ||
| 54 | /* Return the hardware event's bit positon within the EMR/ESR */ | 54 | /* Return the hardware event's bit position within the EMR/ESR */ |
| 55 | #define EVENT_BIT(event) (((event) - HW_EVENT_IRQ_BASE) & 31) | 55 | #define EVENT_BIT(event) (((event) - HW_EVENT_IRQ_BASE) & 31) |
| 56 | 56 | ||
| 57 | /* | 57 | /* |
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index fd4ff25f23b2..86a0d565aded 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
| @@ -263,6 +263,18 @@ const static struct fb_videomode ecovec_dvi_modes[] = { | |||
| 263 | }, | 263 | }, |
| 264 | }; | 264 | }; |
| 265 | 265 | ||
| 266 | static int ecovec24_set_brightness(void *board_data, int brightness) | ||
| 267 | { | ||
| 268 | gpio_set_value(GPIO_PTR1, brightness); | ||
| 269 | |||
| 270 | return 0; | ||
| 271 | } | ||
| 272 | |||
| 273 | static int ecovec24_get_brightness(void *board_data) | ||
| 274 | { | ||
| 275 | return gpio_get_value(GPIO_PTR1); | ||
| 276 | } | ||
| 277 | |||
| 266 | static struct sh_mobile_lcdc_info lcdc_info = { | 278 | static struct sh_mobile_lcdc_info lcdc_info = { |
| 267 | .ch[0] = { | 279 | .ch[0] = { |
| 268 | .interface_type = RGB18, | 280 | .interface_type = RGB18, |
| @@ -273,6 +285,12 @@ static struct sh_mobile_lcdc_info lcdc_info = { | |||
| 273 | .height = 91, | 285 | .height = 91, |
| 274 | }, | 286 | }, |
| 275 | .board_cfg = { | 287 | .board_cfg = { |
| 288 | .set_brightness = ecovec24_set_brightness, | ||
| 289 | .get_brightness = ecovec24_get_brightness, | ||
| 290 | }, | ||
| 291 | .bl_info = { | ||
| 292 | .name = "sh_mobile_lcdc_bl", | ||
| 293 | .max_brightness = 1, | ||
| 276 | }, | 294 | }, |
| 277 | } | 295 | } |
| 278 | }; | 296 | }; |
| @@ -936,7 +954,7 @@ static void __init sh_eth_init(struct sh_eth_plat_data *pd) | |||
| 936 | return; | 954 | return; |
| 937 | } | 955 | } |
| 938 | 956 | ||
| 939 | /* read MAC address frome EEPROM */ | 957 | /* read MAC address from EEPROM */ |
| 940 | for (i = 0; i < sizeof(pd->mac_addr); i++) { | 958 | for (i = 0; i < sizeof(pd->mac_addr); i++) { |
| 941 | pd->mac_addr[i] = mac_read(a, 0x10 + i); | 959 | pd->mac_addr[i] = mac_read(a, 0x10 + i); |
| 942 | msleep(10); | 960 | msleep(10); |
diff --git a/arch/sh/boards/mach-landisk/setup.c b/arch/sh/boards/mach-landisk/setup.c index 94186cf079b6..f1147caebacf 100644 --- a/arch/sh/boards/mach-landisk/setup.c +++ b/arch/sh/boards/mach-landisk/setup.c | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | 23 | ||
| 24 | static void landisk_power_off(void) | 24 | static void landisk_power_off(void) |
| 25 | { | 25 | { |
| 26 | __raw_writeb(0x01, PA_SHUTDOWN); | 26 | __raw_writeb(0x01, PA_SHUTDOWN); |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | static struct resource cf_ide_resources[3]; | 29 | static struct resource cf_ide_resources[3]; |
| @@ -85,7 +85,7 @@ device_initcall(landisk_devices_setup); | |||
| 85 | 85 | ||
| 86 | static void __init landisk_setup(char **cmdline_p) | 86 | static void __init landisk_setup(char **cmdline_p) |
| 87 | { | 87 | { |
| 88 | /* LED ON */ | 88 | /* LED ON */ |
| 89 | __raw_writeb(__raw_readb(PA_LED) | 0x03, PA_LED); | 89 | __raw_writeb(__raw_readb(PA_LED) | 0x03, PA_LED); |
| 90 | 90 | ||
| 91 | printk(KERN_INFO "I-O DATA DEVICE, INC. \"LANDISK Series\" support.\n"); | 91 | printk(KERN_INFO "I-O DATA DEVICE, INC. \"LANDISK Series\" support.\n"); |
| @@ -97,7 +97,6 @@ static void __init landisk_setup(char **cmdline_p) | |||
| 97 | */ | 97 | */ |
| 98 | static struct sh_machine_vector mv_landisk __initmv = { | 98 | static struct sh_machine_vector mv_landisk __initmv = { |
| 99 | .mv_name = "LANDISK", | 99 | .mv_name = "LANDISK", |
| 100 | .mv_nr_irqs = 72, | ||
| 101 | .mv_setup = landisk_setup, | 100 | .mv_setup = landisk_setup, |
| 102 | .mv_init_irq = init_landisk_IRQ, | 101 | .mv_init_irq = init_landisk_IRQ, |
| 103 | }; | 102 | }; |
diff --git a/arch/sh/drivers/pci/pci-sh7751.h b/arch/sh/drivers/pci/pci-sh7751.h index 4983a4d20355..5ede38c330d3 100644 --- a/arch/sh/drivers/pci/pci-sh7751.h +++ b/arch/sh/drivers/pci/pci-sh7751.h | |||
| @@ -61,7 +61,7 @@ | |||
| 61 | #define SH7751_PCICONF3_BIST7 0x80000000 /* Bist Supported */ | 61 | #define SH7751_PCICONF3_BIST7 0x80000000 /* Bist Supported */ |
| 62 | #define SH7751_PCICONF3_BIST6 0x40000000 /* Bist Executing */ | 62 | #define SH7751_PCICONF3_BIST6 0x40000000 /* Bist Executing */ |
| 63 | #define SH7751_PCICONF3_BIST3_0 0x0F000000 /* Bist Passed */ | 63 | #define SH7751_PCICONF3_BIST3_0 0x0F000000 /* Bist Passed */ |
| 64 | #define SH7751_PCICONF3_HD7 0x00800000 /* Single Funtion device */ | 64 | #define SH7751_PCICONF3_HD7 0x00800000 /* Single Function device */ |
| 65 | #define SH7751_PCICONF3_HD6_0 0x007F0000 /* Configuration Layout */ | 65 | #define SH7751_PCICONF3_HD6_0 0x007F0000 /* Configuration Layout */ |
| 66 | #define SH7751_PCICONF3_LAT 0x0000FF00 /* Latency Timer */ | 66 | #define SH7751_PCICONF3_LAT 0x0000FF00 /* Latency Timer */ |
| 67 | #define SH7751_PCICONF3_CLS 0x000000FF /* Cache Line Size */ | 67 | #define SH7751_PCICONF3_CLS 0x000000FF /* Cache Line Size */ |
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c index a09c77dd09db..194231cb5a70 100644 --- a/arch/sh/drivers/pci/pci.c +++ b/arch/sh/drivers/pci/pci.c | |||
| @@ -84,7 +84,7 @@ int __devinit register_pci_controller(struct pci_channel *hose) | |||
| 84 | hose_tail = &hose->next; | 84 | hose_tail = &hose->next; |
| 85 | 85 | ||
| 86 | /* | 86 | /* |
| 87 | * Do not panic here but later - this might hapen before console init. | 87 | * Do not panic here but later - this might happen before console init. |
| 88 | */ | 88 | */ |
| 89 | if (!hose->io_map_base) { | 89 | if (!hose->io_map_base) { |
| 90 | printk(KERN_WARNING | 90 | printk(KERN_WARNING |
diff --git a/arch/sh/include/asm/page.h b/arch/sh/include/asm/page.h index c4e0b3d472b9..822d6084195b 100644 --- a/arch/sh/include/asm/page.h +++ b/arch/sh/include/asm/page.h | |||
| @@ -186,7 +186,7 @@ typedef struct page *pgtable_t; | |||
| 186 | /* | 186 | /* |
| 187 | * While BYTES_PER_WORD == 4 on the current sh64 ABI, GCC will still | 187 | * While BYTES_PER_WORD == 4 on the current sh64 ABI, GCC will still |
| 188 | * happily generate {ld/st}.q pairs, requiring us to have 8-byte | 188 | * happily generate {ld/st}.q pairs, requiring us to have 8-byte |
| 189 | * alignment to avoid traps. The kmalloc alignment is gauranteed by | 189 | * alignment to avoid traps. The kmalloc alignment is guaranteed by |
| 190 | * virtue of L1_CACHE_BYTES, requiring this to only be special cased | 190 | * virtue of L1_CACHE_BYTES, requiring this to only be special cased |
| 191 | * for slab caches. | 191 | * for slab caches. |
| 192 | */ | 192 | */ |
diff --git a/arch/sh/include/asm/pgtable_32.h b/arch/sh/include/asm/pgtable_32.h index b799fe71114c..0bce3d81569e 100644 --- a/arch/sh/include/asm/pgtable_32.h +++ b/arch/sh/include/asm/pgtable_32.h | |||
| @@ -167,7 +167,7 @@ static inline unsigned long copy_ptea_attributes(unsigned long x) | |||
| 167 | #endif | 167 | #endif |
| 168 | 168 | ||
| 169 | /* | 169 | /* |
| 170 | * Mask of bits that are to be preserved accross pgprot changes. | 170 | * Mask of bits that are to be preserved across pgprot changes. |
| 171 | */ | 171 | */ |
| 172 | #define _PAGE_CHG_MASK \ | 172 | #define _PAGE_CHG_MASK \ |
| 173 | (PTE_MASK | _PAGE_ACCESSED | _PAGE_CACHABLE | \ | 173 | (PTE_MASK | _PAGE_ACCESSED | _PAGE_CACHABLE | \ |
diff --git a/arch/sh/include/asm/unaligned-sh4a.h b/arch/sh/include/asm/unaligned-sh4a.h index c48a9c3420da..95adc500cabc 100644 --- a/arch/sh/include/asm/unaligned-sh4a.h +++ b/arch/sh/include/asm/unaligned-sh4a.h | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * struct. | 9 | * struct. |
| 10 | * | 10 | * |
| 11 | * The same note as with the movli.l/movco.l pair applies here, as long | 11 | * The same note as with the movli.l/movco.l pair applies here, as long |
| 12 | * as the load is gauranteed to be inlined, nothing else will hook in to | 12 | * as the load is guaranteed to be inlined, nothing else will hook in to |
| 13 | * r0 and we get the return value for free. | 13 | * r0 and we get the return value for free. |
| 14 | * | 14 | * |
| 15 | * NOTE: Due to the fact we require r0 encoding, care should be taken to | 15 | * NOTE: Due to the fact we require r0 encoding, care should be taken to |
diff --git a/arch/sh/include/mach-common/mach/highlander.h b/arch/sh/include/mach-common/mach/highlander.h index 5d9d4d5154be..6ce944e33e59 100644 --- a/arch/sh/include/mach-common/mach/highlander.h +++ b/arch/sh/include/mach-common/mach/highlander.h | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | #define PA_OBLED (PA_BCR+0x001c) /* On Board LED control */ | 24 | #define PA_OBLED (PA_BCR+0x001c) /* On Board LED control */ |
| 25 | #define PA_OBSW (PA_BCR+0x001e) /* On Board Switch control */ | 25 | #define PA_OBSW (PA_BCR+0x001e) /* On Board Switch control */ |
| 26 | #define PA_AUDIOSEL (PA_BCR+0x0020) /* Sound Interface Select control */ | 26 | #define PA_AUDIOSEL (PA_BCR+0x0020) /* Sound Interface Select control */ |
| 27 | #define PA_EXTPLR (PA_BCR+0x001e) /* Extention Pin Polarity control */ | 27 | #define PA_EXTPLR (PA_BCR+0x001e) /* Extension Pin Polarity control */ |
| 28 | #define PA_TPCTL (PA_BCR+0x0100) /* Touch Panel Access control */ | 28 | #define PA_TPCTL (PA_BCR+0x0100) /* Touch Panel Access control */ |
| 29 | #define PA_TPDCKCTL (PA_BCR+0x0102) /* Touch Panel Access data control */ | 29 | #define PA_TPDCKCTL (PA_BCR+0x0102) /* Touch Panel Access data control */ |
| 30 | #define PA_TPCTLCLR (PA_BCR+0x0104) /* Touch Panel Access control */ | 30 | #define PA_TPCTLCLR (PA_BCR+0x0104) /* Touch Panel Access control */ |
| @@ -89,7 +89,7 @@ | |||
| 89 | #define PA_OBLED (PA_BCR+0x0018) /* On Board LED control */ | 89 | #define PA_OBLED (PA_BCR+0x0018) /* On Board LED control */ |
| 90 | #define PA_OBSW (PA_BCR+0x001a) /* On Board Switch control */ | 90 | #define PA_OBSW (PA_BCR+0x001a) /* On Board Switch control */ |
| 91 | #define PA_AUDIOSEL (PA_BCR+0x001c) /* Sound Interface Select control */ | 91 | #define PA_AUDIOSEL (PA_BCR+0x001c) /* Sound Interface Select control */ |
| 92 | #define PA_EXTPLR (PA_BCR+0x001e) /* Extention Pin Polarity control */ | 92 | #define PA_EXTPLR (PA_BCR+0x001e) /* Extension Pin Polarity control */ |
| 93 | #define PA_TPCTL (PA_BCR+0x0100) /* Touch Panel Access control */ | 93 | #define PA_TPCTL (PA_BCR+0x0100) /* Touch Panel Access control */ |
| 94 | #define PA_TPDCKCTL (PA_BCR+0x0102) /* Touch Panel Access data control */ | 94 | #define PA_TPDCKCTL (PA_BCR+0x0102) /* Touch Panel Access data control */ |
| 95 | #define PA_TPCTLCLR (PA_BCR+0x0104) /* Touch Panel Access control */ | 95 | #define PA_TPCTLCLR (PA_BCR+0x0104) /* Touch Panel Access control */ |
diff --git a/arch/sh/include/mach-common/mach/r2d.h b/arch/sh/include/mach-common/mach/r2d.h index 0a800157b826..e04f75eaa153 100644 --- a/arch/sh/include/mach-common/mach/r2d.h +++ b/arch/sh/include/mach-common/mach/r2d.h | |||
| @@ -18,18 +18,18 @@ | |||
| 18 | #define PA_DISPCTL 0xa4000008 /* Display Timing control */ | 18 | #define PA_DISPCTL 0xa4000008 /* Display Timing control */ |
| 19 | #define PA_SDMPOW 0xa400000a /* SD Power control */ | 19 | #define PA_SDMPOW 0xa400000a /* SD Power control */ |
| 20 | #define PA_RTCCE 0xa400000c /* RTC(9701) Enable control */ | 20 | #define PA_RTCCE 0xa400000c /* RTC(9701) Enable control */ |
| 21 | #define PA_PCICD 0xa400000e /* PCI Extention detect control */ | 21 | #define PA_PCICD 0xa400000e /* PCI Extension detect control */ |
| 22 | #define PA_VOYAGERRTS 0xa4000020 /* VOYAGER Reset control */ | 22 | #define PA_VOYAGERRTS 0xa4000020 /* VOYAGER Reset control */ |
| 23 | 23 | ||
| 24 | #define PA_R2D1_AXRST 0xa4000022 /* AX_LAN Reset control */ | 24 | #define PA_R2D1_AXRST 0xa4000022 /* AX_LAN Reset control */ |
| 25 | #define PA_R2D1_CFRST 0xa4000024 /* CF Reset control */ | 25 | #define PA_R2D1_CFRST 0xa4000024 /* CF Reset control */ |
| 26 | #define PA_R2D1_ADMRTS 0xa4000026 /* SD Reset control */ | 26 | #define PA_R2D1_ADMRTS 0xa4000026 /* SD Reset control */ |
| 27 | #define PA_R2D1_EXTRST 0xa4000028 /* Extention Reset control */ | 27 | #define PA_R2D1_EXTRST 0xa4000028 /* Extension Reset control */ |
| 28 | #define PA_R2D1_CFCDINTCLR 0xa400002a /* CF Insert Interrupt clear */ | 28 | #define PA_R2D1_CFCDINTCLR 0xa400002a /* CF Insert Interrupt clear */ |
| 29 | 29 | ||
| 30 | #define PA_R2DPLUS_CFRST 0xa4000022 /* CF Reset control */ | 30 | #define PA_R2DPLUS_CFRST 0xa4000022 /* CF Reset control */ |
| 31 | #define PA_R2DPLUS_ADMRTS 0xa4000024 /* SD Reset control */ | 31 | #define PA_R2DPLUS_ADMRTS 0xa4000024 /* SD Reset control */ |
| 32 | #define PA_R2DPLUS_EXTRST 0xa4000026 /* Extention Reset control */ | 32 | #define PA_R2DPLUS_EXTRST 0xa4000026 /* Extension Reset control */ |
| 33 | #define PA_R2DPLUS_CFCDINTCLR 0xa4000028 /* CF Insert Interrupt clear */ | 33 | #define PA_R2DPLUS_CFCDINTCLR 0xa4000028 /* CF Insert Interrupt clear */ |
| 34 | #define PA_R2DPLUS_KEYCTLCLR 0xa400002a /* Key Interrupt clear */ | 34 | #define PA_R2DPLUS_KEYCTLCLR 0xa400002a /* Key Interrupt clear */ |
| 35 | 35 | ||
diff --git a/arch/sh/kernel/cpu/clock-cpg.c b/arch/sh/kernel/cpu/clock-cpg.c index dd0e0f211359..8f63a264a842 100644 --- a/arch/sh/kernel/cpu/clock-cpg.c +++ b/arch/sh/kernel/cpu/clock-cpg.c | |||
| @@ -67,7 +67,7 @@ int __init __deprecated cpg_clk_init(void) | |||
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | /* | 69 | /* |
| 70 | * Placeholder for compatability, until the lazy CPUs do this | 70 | * Placeholder for compatibility, until the lazy CPUs do this |
| 71 | * on their own. | 71 | * on their own. |
| 72 | */ | 72 | */ |
| 73 | int __init __weak arch_clk_init(void) | 73 | int __init __weak arch_clk_init(void) |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c index 1656b8c91faf..beba32beb6d9 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c | |||
| @@ -648,7 +648,7 @@ static void __init sh7786_usb_setup(void) | |||
| 648 | * The following settings are necessary | 648 | * The following settings are necessary |
| 649 | * for using the USB modules. | 649 | * for using the USB modules. |
| 650 | * | 650 | * |
| 651 | * see "USB Inital Settings" for detail | 651 | * see "USB Initial Settings" for detail |
| 652 | */ | 652 | */ |
| 653 | __raw_writel(USBINITVAL1, USBINITREG1); | 653 | __raw_writel(USBINITVAL1, USBINITREG1); |
| 654 | __raw_writel(USBINITVAL2, USBINITREG2); | 654 | __raw_writel(USBINITVAL2, USBINITREG2); |
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c index 64ea0b165399..91971103b62b 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c | |||
| @@ -183,7 +183,7 @@ asmlinkage void do_softirq(void) | |||
| 183 | ); | 183 | ); |
| 184 | 184 | ||
| 185 | /* | 185 | /* |
| 186 | * Shouldnt happen, we returned above if in_interrupt(): | 186 | * Shouldn't happen, we returned above if in_interrupt(): |
| 187 | */ | 187 | */ |
| 188 | WARN_ON_ONCE(softirq_count()); | 188 | WARN_ON_ONCE(softirq_count()); |
| 189 | } | 189 | } |
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 4f267160c515..58bff45d1156 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
| @@ -150,7 +150,7 @@ void __init check_for_initrd(void) | |||
| 150 | } | 150 | } |
| 151 | 151 | ||
| 152 | /* | 152 | /* |
| 153 | * If we got this far inspite of the boot loader's best efforts | 153 | * If we got this far in spite of the boot loader's best efforts |
| 154 | * to the contrary, assume we actually have a valid initrd and | 154 | * to the contrary, assume we actually have a valid initrd and |
| 155 | * fix up the root dev. | 155 | * fix up the root dev. |
| 156 | */ | 156 | */ |
diff --git a/arch/sh/lib64/copy_user_memcpy.S b/arch/sh/lib64/copy_user_memcpy.S index 2a62816d2ddd..49aeabeba2c2 100644 --- a/arch/sh/lib64/copy_user_memcpy.S +++ b/arch/sh/lib64/copy_user_memcpy.S | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | ! 2.: When there are two or three bytes in the last word of an 11-or-more | 27 | ! 2.: When there are two or three bytes in the last word of an 11-or-more |
| 28 | ! bytes memory chunk to b copied, the rest of the word can be read | 28 | ! bytes memory chunk to b copied, the rest of the word can be read |
| 29 | ! without side effects. | 29 | ! without side effects. |
| 30 | ! This could be easily changed by increasing the minumum size of | 30 | ! This could be easily changed by increasing the minimum size of |
| 31 | ! a fast memcpy and the amount subtracted from r7 before L_2l_loop be 2, | 31 | ! a fast memcpy and the amount subtracted from r7 before L_2l_loop be 2, |
| 32 | ! however, this would cost a few extra cyles on average. | 32 | ! however, this would cost a few extra cyles on average. |
| 33 | ! For SHmedia, the assumption is that any quadword can be read in its | 33 | ! For SHmedia, the assumption is that any quadword can be read in its |
diff --git a/arch/sh/lib64/memcpy.S b/arch/sh/lib64/memcpy.S index dd300c372ce1..5d682e0ee24f 100644 --- a/arch/sh/lib64/memcpy.S +++ b/arch/sh/lib64/memcpy.S | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | ! 2.: When there are two or three bytes in the last word of an 11-or-more | 29 | ! 2.: When there are two or three bytes in the last word of an 11-or-more |
| 30 | ! bytes memory chunk to b copied, the rest of the word can be read | 30 | ! bytes memory chunk to b copied, the rest of the word can be read |
| 31 | ! without side effects. | 31 | ! without side effects. |
| 32 | ! This could be easily changed by increasing the minumum size of | 32 | ! This could be easily changed by increasing the minimum size of |
| 33 | ! a fast memcpy and the amount subtracted from r7 before L_2l_loop be 2, | 33 | ! a fast memcpy and the amount subtracted from r7 before L_2l_loop be 2, |
| 34 | ! however, this would cost a few extra cyles on average. | 34 | ! however, this would cost a few extra cyles on average. |
| 35 | ! For SHmedia, the assumption is that any quadword can be read in its | 35 | ! For SHmedia, the assumption is that any quadword can be read in its |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 14b234631f5f..e560d102215a 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
| @@ -51,7 +51,6 @@ config SPARC64 | |||
| 51 | select HAVE_PERF_EVENTS | 51 | select HAVE_PERF_EVENTS |
| 52 | select PERF_USE_VMALLOC | 52 | select PERF_USE_VMALLOC |
| 53 | select HAVE_GENERIC_HARDIRQS | 53 | select HAVE_GENERIC_HARDIRQS |
| 54 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
| 55 | select GENERIC_IRQ_SHOW | 54 | select GENERIC_IRQ_SHOW |
| 56 | select IRQ_PREFLOW_FASTEOI | 55 | select IRQ_PREFLOW_FASTEOI |
| 57 | 56 | ||
diff --git a/arch/sparc/include/asm/hypervisor.h b/arch/sparc/include/asm/hypervisor.h index bafe5a631b6d..75686409be24 100644 --- a/arch/sparc/include/asm/hypervisor.h +++ b/arch/sparc/include/asm/hypervisor.h | |||
| @@ -654,7 +654,7 @@ extern unsigned long sun4v_mmu_tsb_ctx0(unsigned long num_descriptions, | |||
| 654 | * ARG3: mmu context | 654 | * ARG3: mmu context |
| 655 | * ARG4: flags (HV_MMU_{IMMU,DMMU}) | 655 | * ARG4: flags (HV_MMU_{IMMU,DMMU}) |
| 656 | * RET0: status | 656 | * RET0: status |
| 657 | * ERRORS: EINVAL Invalid virutal address, context, or | 657 | * ERRORS: EINVAL Invalid virtual address, context, or |
| 658 | * flags value | 658 | * flags value |
| 659 | * ENOTSUPPORTED ARG0 or ARG1 is non-zero | 659 | * ENOTSUPPORTED ARG0 or ARG1 is non-zero |
| 660 | * | 660 | * |
| @@ -721,7 +721,7 @@ extern void sun4v_mmu_demap_all(void); | |||
| 721 | * ARG2: TTE | 721 | * ARG2: TTE |
| 722 | * ARG3: flags (HV_MMU_{IMMU,DMMU}) | 722 | * ARG3: flags (HV_MMU_{IMMU,DMMU}) |
| 723 | * RET0: status | 723 | * RET0: status |
| 724 | * ERRORS: EINVAL Invalid virutal address or flags value | 724 | * ERRORS: EINVAL Invalid virtual address or flags value |
| 725 | * EBADPGSZ Invalid page size value | 725 | * EBADPGSZ Invalid page size value |
| 726 | * ENORADDR Invalid real address in TTE | 726 | * ENORADDR Invalid real address in TTE |
| 727 | * ETOOMANY Too many mappings (max of 8 reached) | 727 | * ETOOMANY Too many mappings (max of 8 reached) |
| @@ -800,7 +800,7 @@ extern unsigned long sun4v_mmu_map_perm_addr(unsigned long vaddr, | |||
| 800 | * ARG1: reserved, must be zero | 800 | * ARG1: reserved, must be zero |
| 801 | * ARG2: flags (HV_MMU_{IMMU,DMMU}) | 801 | * ARG2: flags (HV_MMU_{IMMU,DMMU}) |
| 802 | * RET0: status | 802 | * RET0: status |
| 803 | * ERRORS: EINVAL Invalid virutal address or flags value | 803 | * ERRORS: EINVAL Invalid virtual address or flags value |
| 804 | * ENOMAP Specified mapping was not found | 804 | * ENOMAP Specified mapping was not found |
| 805 | * | 805 | * |
| 806 | * Demaps any permanent page mapping (established via | 806 | * Demaps any permanent page mapping (established via |
| @@ -1205,7 +1205,7 @@ struct hv_trap_trace_control { | |||
| 1205 | * structure contents. Attempts to do so will result in undefined | 1205 | * structure contents. Attempts to do so will result in undefined |
| 1206 | * behavior for the guest. | 1206 | * behavior for the guest. |
| 1207 | * | 1207 | * |
| 1208 | * Each trap trace buffer entry is layed out as follows: | 1208 | * Each trap trace buffer entry is laid out as follows: |
| 1209 | */ | 1209 | */ |
| 1210 | #ifndef __ASSEMBLY__ | 1210 | #ifndef __ASSEMBLY__ |
| 1211 | struct hv_trap_trace_entry { | 1211 | struct hv_trap_trace_entry { |
| @@ -1300,7 +1300,7 @@ struct hv_trap_trace_entry { | |||
| 1300 | * state in RET1. Future systems may define various flags for the | 1300 | * state in RET1. Future systems may define various flags for the |
| 1301 | * enable argument (ARG0), for the moment a guest should pass | 1301 | * enable argument (ARG0), for the moment a guest should pass |
| 1302 | * "(uint64_t) -1" to enable, and "(uint64_t) 0" to disable all | 1302 | * "(uint64_t) -1" to enable, and "(uint64_t) 0" to disable all |
| 1303 | * tracing - which will ensure future compatability. | 1303 | * tracing - which will ensure future compatibility. |
| 1304 | */ | 1304 | */ |
| 1305 | #define HV_FAST_TTRACE_ENABLE 0x92 | 1305 | #define HV_FAST_TTRACE_ENABLE 0x92 |
| 1306 | 1306 | ||
| @@ -1880,7 +1880,7 @@ extern unsigned long sun4v_vintr_set_target(unsigned long dev_handle, | |||
| 1880 | * pci_device, at pci_config_offset from the beginning of the device's | 1880 | * pci_device, at pci_config_offset from the beginning of the device's |
| 1881 | * configuration space. If there was no error, RET1 is set to zero and | 1881 | * configuration space. If there was no error, RET1 is set to zero and |
| 1882 | * RET2 is set to the data read. Insignificant bits in RET2 are not | 1882 | * RET2 is set to the data read. Insignificant bits in RET2 are not |
| 1883 | * guarenteed to have any specific value and therefore must be ignored. | 1883 | * guaranteed to have any specific value and therefore must be ignored. |
| 1884 | * | 1884 | * |
| 1885 | * The data returned in RET2 is size based byte swapped. | 1885 | * The data returned in RET2 is size based byte swapped. |
| 1886 | * | 1886 | * |
| @@ -1941,9 +1941,9 @@ extern unsigned long sun4v_vintr_set_target(unsigned long dev_handle, | |||
| 1941 | * and return the actual data read in RET2. The data returned is size based | 1941 | * and return the actual data read in RET2. The data returned is size based |
| 1942 | * byte swapped. | 1942 | * byte swapped. |
| 1943 | * | 1943 | * |
| 1944 | * Non-significant bits in RET2 are not guarenteed to have any specific value | 1944 | * Non-significant bits in RET2 are not guaranteed to have any specific value |
| 1945 | * and therefore must be ignored. If RET1 is returned as non-zero, the data | 1945 | * and therefore must be ignored. If RET1 is returned as non-zero, the data |
| 1946 | * value is not guarenteed to have any specific value and should be ignored. | 1946 | * value is not guaranteed to have any specific value and should be ignored. |
| 1947 | * | 1947 | * |
| 1948 | * The caller must have permission to read from the given devhandle, real | 1948 | * The caller must have permission to read from the given devhandle, real |
| 1949 | * address, which must be an IO address. The argument real address must be a | 1949 | * address, which must be an IO address. The argument real address must be a |
| @@ -2456,9 +2456,9 @@ extern unsigned long sun4v_vintr_set_target(unsigned long dev_handle, | |||
| 2456 | * | 2456 | * |
| 2457 | * As receive queue configuration causes a reset of the queue's head and | 2457 | * As receive queue configuration causes a reset of the queue's head and |
| 2458 | * tail pointers there is no way for a gues to determine how many entries | 2458 | * tail pointers there is no way for a gues to determine how many entries |
| 2459 | * have been received between a preceeding ldc_get_rx_state() API call | 2459 | * have been received between a preceding ldc_get_rx_state() API call |
| 2460 | * and the completion of the configuration operation. It should be noted | 2460 | * and the completion of the configuration operation. It should be noted |
| 2461 | * that datagram delivery is not guarenteed via domain channels anyway, | 2461 | * that datagram delivery is not guaranteed via domain channels anyway, |
| 2462 | * and therefore any higher protocol should be resilient to datagram | 2462 | * and therefore any higher protocol should be resilient to datagram |
| 2463 | * loss if necessary. However, to overcome this specific race potential | 2463 | * loss if necessary. However, to overcome this specific race potential |
| 2464 | * it is recommended, for example, that a higher level protocol be employed | 2464 | * it is recommended, for example, that a higher level protocol be employed |
diff --git a/arch/sparc/include/asm/ns87303.h b/arch/sparc/include/asm/ns87303.h index 686defe6aaa0..af755483e17d 100644 --- a/arch/sparc/include/asm/ns87303.h +++ b/arch/sparc/include/asm/ns87303.h | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | /* Power and Test Register (PTR) bits */ | 37 | /* Power and Test Register (PTR) bits */ |
| 38 | #define PTR_LPTB_IRQ7 0x08 | 38 | #define PTR_LPTB_IRQ7 0x08 |
| 39 | #define PTR_LEVEL_IRQ 0x80 /* When not ECP/EPP: Use level IRQ */ | 39 | #define PTR_LEVEL_IRQ 0x80 /* When not ECP/EPP: Use level IRQ */ |
| 40 | #define PTR_LPT_REG_DIR 0x80 /* When ECP/EPP: LPT CTR controlls direction */ | 40 | #define PTR_LPT_REG_DIR 0x80 /* When ECP/EPP: LPT CTR controls direction */ |
| 41 | /* of the parallel port */ | 41 | /* of the parallel port */ |
| 42 | 42 | ||
| 43 | /* Function Control Register (FCR) bits */ | 43 | /* Function Control Register (FCR) bits */ |
diff --git a/arch/sparc/include/asm/pcr.h b/arch/sparc/include/asm/pcr.h index 843e4faf6a50..288d7beba051 100644 --- a/arch/sparc/include/asm/pcr.h +++ b/arch/sparc/include/asm/pcr.h | |||
| @@ -31,7 +31,7 @@ extern unsigned int picl_shift; | |||
| 31 | 31 | ||
| 32 | /* In order to commonize as much of the implementation as | 32 | /* In order to commonize as much of the implementation as |
| 33 | * possible, we use PICH as our counter. Mostly this is | 33 | * possible, we use PICH as our counter. Mostly this is |
| 34 | * to accomodate Niagara-1 which can only count insn cycles | 34 | * to accommodate Niagara-1 which can only count insn cycles |
| 35 | * in PICH. | 35 | * in PICH. |
| 36 | */ | 36 | */ |
| 37 | static inline u64 picl_value(unsigned int nmi_hz) | 37 | static inline u64 picl_value(unsigned int nmi_hz) |
diff --git a/arch/sparc/include/asm/ptrace.h b/arch/sparc/include/asm/ptrace.h index 30b0b797dc0c..c7ad3fe2b252 100644 --- a/arch/sparc/include/asm/ptrace.h +++ b/arch/sparc/include/asm/ptrace.h | |||
| @@ -33,7 +33,7 @@ struct pt_regs { | |||
| 33 | * things like "in a system call" etc. for an arbitray | 33 | * things like "in a system call" etc. for an arbitray |
| 34 | * process. | 34 | * process. |
| 35 | * | 35 | * |
| 36 | * The PT_REGS_MAGIC is choosen such that it can be | 36 | * The PT_REGS_MAGIC is chosen such that it can be |
| 37 | * loaded completely using just a sethi instruction. | 37 | * loaded completely using just a sethi instruction. |
| 38 | */ | 38 | */ |
| 39 | unsigned int magic; | 39 | unsigned int magic; |
diff --git a/arch/sparc/include/asm/unistd.h b/arch/sparc/include/asm/unistd.h index 2f475d7c0b53..9d897b6db983 100644 --- a/arch/sparc/include/asm/unistd.h +++ b/arch/sparc/include/asm/unistd.h | |||
| @@ -403,8 +403,9 @@ | |||
| 403 | #define __NR_name_to_handle_at 332 | 403 | #define __NR_name_to_handle_at 332 |
| 404 | #define __NR_open_by_handle_at 333 | 404 | #define __NR_open_by_handle_at 333 |
| 405 | #define __NR_clock_adjtime 334 | 405 | #define __NR_clock_adjtime 334 |
| 406 | #define __NR_syncfs 335 | ||
| 406 | 407 | ||
| 407 | #define NR_syscalls 335 | 408 | #define NR_syscalls 336 |
| 408 | 409 | ||
| 409 | #ifdef __32bit_syscall_numbers__ | 410 | #ifdef __32bit_syscall_numbers__ |
| 410 | /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, | 411 | /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, |
diff --git a/arch/sparc/kernel/auxio_64.c b/arch/sparc/kernel/auxio_64.c index 2abace076c7d..773091ac71a3 100644 --- a/arch/sparc/kernel/auxio_64.c +++ b/arch/sparc/kernel/auxio_64.c | |||
| @@ -93,7 +93,7 @@ void auxio_set_lte(int on) | |||
| 93 | } | 93 | } |
| 94 | EXPORT_SYMBOL(auxio_set_lte); | 94 | EXPORT_SYMBOL(auxio_set_lte); |
| 95 | 95 | ||
| 96 | static struct of_device_id __initdata auxio_match[] = { | 96 | static const struct of_device_id auxio_match[] = { |
| 97 | { | 97 | { |
| 98 | .name = "auxio", | 98 | .name = "auxio", |
| 99 | }, | 99 | }, |
diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c index 136d3718a74a..7eef3f741963 100644 --- a/arch/sparc/kernel/central.c +++ b/arch/sparc/kernel/central.c | |||
| @@ -140,7 +140,7 @@ out_free: | |||
| 140 | goto out; | 140 | goto out; |
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | static struct of_device_id __initdata clock_board_match[] = { | 143 | static const struct of_device_id clock_board_match[] = { |
| 144 | { | 144 | { |
| 145 | .name = "clock-board", | 145 | .name = "clock-board", |
| 146 | }, | 146 | }, |
| @@ -245,7 +245,7 @@ out_free: | |||
| 245 | goto out; | 245 | goto out; |
| 246 | } | 246 | } |
| 247 | 247 | ||
| 248 | static struct of_device_id __initdata fhc_match[] = { | 248 | static const struct of_device_id fhc_match[] = { |
| 249 | { | 249 | { |
| 250 | .name = "fhc", | 250 | .name = "fhc", |
| 251 | }, | 251 | }, |
diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c index 4a700f4b79ce..3add4de8a1a9 100644 --- a/arch/sparc/kernel/ds.c +++ b/arch/sparc/kernel/ds.c | |||
| @@ -1218,7 +1218,7 @@ static int ds_remove(struct vio_dev *vdev) | |||
| 1218 | return 0; | 1218 | return 0; |
| 1219 | } | 1219 | } |
| 1220 | 1220 | ||
| 1221 | static struct vio_device_id __initdata ds_match[] = { | 1221 | static const struct vio_device_id ds_match[] = { |
| 1222 | { | 1222 | { |
| 1223 | .type = "domain-services-port", | 1223 | .type = "domain-services-port", |
| 1224 | }, | 1224 | }, |
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index 1504df8ddf70..6da784a5612b 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S | |||
| @@ -801,7 +801,7 @@ vac_linesize_patch_32: subcc %l7, 32, %l7 | |||
| 801 | .globl vac_hwflush_patch1_on, vac_hwflush_patch2_on | 801 | .globl vac_hwflush_patch1_on, vac_hwflush_patch2_on |
| 802 | 802 | ||
| 803 | /* | 803 | /* |
| 804 | * Ugly, but we cant use hardware flushing on the sun4 and we'd require | 804 | * Ugly, but we can't use hardware flushing on the sun4 and we'd require |
| 805 | * two instructions (Anton) | 805 | * two instructions (Anton) |
| 806 | */ | 806 | */ |
| 807 | vac_hwflush_patch1_on: addcc %l7, -PAGE_SIZE, %l7 | 807 | vac_hwflush_patch1_on: addcc %l7, -PAGE_SIZE, %l7 |
| @@ -851,7 +851,7 @@ sun4c_fault: | |||
| 851 | sethi %hi(~((1 << SUN4C_REAL_PGDIR_SHIFT) - 1)), %l4 | 851 | sethi %hi(~((1 << SUN4C_REAL_PGDIR_SHIFT) - 1)), %l4 |
| 852 | 852 | ||
| 853 | /* If the kernel references a bum kernel pointer, or a pte which | 853 | /* If the kernel references a bum kernel pointer, or a pte which |
| 854 | * points to a non existant page in ram, we will run this code | 854 | * points to a non existent page in ram, we will run this code |
| 855 | * _forever_ and lock up the machine!!!!! So we must check for | 855 | * _forever_ and lock up the machine!!!!! So we must check for |
| 856 | * this condition, the AC_SYNC_ERR bits are what we must examine. | 856 | * this condition, the AC_SYNC_ERR bits are what we must examine. |
| 857 | * Also a parity error would make this happen as well. So we just | 857 | * Also a parity error would make this happen as well. So we just |
| @@ -1283,7 +1283,7 @@ linux_syscall_trace: | |||
| 1283 | .globl ret_from_fork | 1283 | .globl ret_from_fork |
| 1284 | ret_from_fork: | 1284 | ret_from_fork: |
| 1285 | call schedule_tail | 1285 | call schedule_tail |
| 1286 | mov %g3, %o0 | 1286 | ld [%g3 + TI_TASK], %o0 |
| 1287 | b ret_sys_call | 1287 | b ret_sys_call |
| 1288 | ld [%sp + STACKFRAME_SZ + PT_I0], %o0 | 1288 | ld [%sp + STACKFRAME_SZ + PT_I0], %o0 |
| 1289 | 1289 | ||
diff --git a/arch/sparc/kernel/head_64.S b/arch/sparc/kernel/head_64.S index f8f21050448b..aa594c792d19 100644 --- a/arch/sparc/kernel/head_64.S +++ b/arch/sparc/kernel/head_64.S | |||
| @@ -85,7 +85,7 @@ sparc_ramdisk_image64: | |||
| 85 | sparc64_boot: | 85 | sparc64_boot: |
| 86 | mov %o4, %l7 | 86 | mov %o4, %l7 |
| 87 | 87 | ||
| 88 | /* We need to remap the kernel. Use position independant | 88 | /* We need to remap the kernel. Use position independent |
| 89 | * code to remap us to KERNBASE. | 89 | * code to remap us to KERNBASE. |
| 90 | * | 90 | * |
| 91 | * SILO can invoke us with 32-bit address masking enabled, | 91 | * SILO can invoke us with 32-bit address masking enabled, |
diff --git a/arch/sparc/kernel/init_task.c b/arch/sparc/kernel/init_task.c index 5fe3d65581f7..35f141a9f506 100644 --- a/arch/sparc/kernel/init_task.c +++ b/arch/sparc/kernel/init_task.c | |||
| @@ -15,7 +15,7 @@ EXPORT_SYMBOL(init_task); | |||
| 15 | 15 | ||
| 16 | /* .text section in head.S is aligned at 8k boundary and this gets linked | 16 | /* .text section in head.S is aligned at 8k boundary and this gets linked |
| 17 | * right after that so that the init_thread_union is aligned properly as well. | 17 | * right after that so that the init_thread_union is aligned properly as well. |
| 18 | * If this is not aligned on a 8k boundry, then you should change code | 18 | * If this is not aligned on a 8k boundary, then you should change code |
| 19 | * in etrap.S which assumes it. | 19 | * in etrap.S which assumes it. |
| 20 | */ | 20 | */ |
| 21 | union thread_union init_thread_union __init_task_data = | 21 | union thread_union init_thread_union __init_task_data = |
diff --git a/arch/sparc/kernel/mdesc.c b/arch/sparc/kernel/mdesc.c index 6addb914fcc8..56db06432ce9 100644 --- a/arch/sparc/kernel/mdesc.c +++ b/arch/sparc/kernel/mdesc.c | |||
| @@ -107,7 +107,7 @@ static struct mdesc_handle * __init mdesc_memblock_alloc(unsigned int mdesc_size | |||
| 107 | return hp; | 107 | return hp; |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | static void mdesc_memblock_free(struct mdesc_handle *hp) | 110 | static void __init mdesc_memblock_free(struct mdesc_handle *hp) |
| 111 | { | 111 | { |
| 112 | unsigned int alloc_size; | 112 | unsigned int alloc_size; |
| 113 | unsigned long start; | 113 | unsigned long start; |
diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c index 63cd4e5d47c2..5c149689bb20 100644 --- a/arch/sparc/kernel/of_device_64.c +++ b/arch/sparc/kernel/of_device_64.c | |||
| @@ -459,7 +459,7 @@ apply_interrupt_map(struct device_node *dp, struct device_node *pp, | |||
| 459 | * | 459 | * |
| 460 | * Handle this by deciding that, if we didn't get a | 460 | * Handle this by deciding that, if we didn't get a |
| 461 | * match in the parent's 'interrupt-map', and the | 461 | * match in the parent's 'interrupt-map', and the |
| 462 | * parent is an IRQ translater, then use the parent as | 462 | * parent is an IRQ translator, then use the parent as |
| 463 | * our IRQ controller. | 463 | * our IRQ controller. |
| 464 | */ | 464 | */ |
| 465 | if (pp->irq_trans) | 465 | if (pp->irq_trans) |
diff --git a/arch/sparc/kernel/pci_fire.c b/arch/sparc/kernel/pci_fire.c index 3d70f8326efd..d29a32fcc5e4 100644 --- a/arch/sparc/kernel/pci_fire.c +++ b/arch/sparc/kernel/pci_fire.c | |||
| @@ -496,7 +496,7 @@ out_err: | |||
| 496 | return err; | 496 | return err; |
| 497 | } | 497 | } |
| 498 | 498 | ||
| 499 | static struct of_device_id __initdata fire_match[] = { | 499 | static const struct of_device_id fire_match[] = { |
| 500 | { | 500 | { |
| 501 | .name = "pci", | 501 | .name = "pci", |
| 502 | .compatible = "pciex108e,80f0", | 502 | .compatible = "pciex108e,80f0", |
diff --git a/arch/sparc/kernel/pci_psycho.c b/arch/sparc/kernel/pci_psycho.c index 56ee745064de..86ae08d9b6ee 100644 --- a/arch/sparc/kernel/pci_psycho.c +++ b/arch/sparc/kernel/pci_psycho.c | |||
| @@ -592,7 +592,7 @@ out_err: | |||
| 592 | return err; | 592 | return err; |
| 593 | } | 593 | } |
| 594 | 594 | ||
| 595 | static struct of_device_id __initdata psycho_match[] = { | 595 | static const struct of_device_id psycho_match[] = { |
| 596 | { | 596 | { |
| 597 | .name = "pci", | 597 | .name = "pci", |
| 598 | .compatible = "pci108e,8000", | 598 | .compatible = "pci108e,8000", |
diff --git a/arch/sparc/kernel/pci_sabre.c b/arch/sparc/kernel/pci_sabre.c index 2857073342d2..948068a083fc 100644 --- a/arch/sparc/kernel/pci_sabre.c +++ b/arch/sparc/kernel/pci_sabre.c | |||
| @@ -581,7 +581,7 @@ out_err: | |||
| 581 | return err; | 581 | return err; |
| 582 | } | 582 | } |
| 583 | 583 | ||
| 584 | static struct of_device_id __initdata sabre_match[] = { | 584 | static const struct of_device_id sabre_match[] = { |
| 585 | { | 585 | { |
| 586 | .name = "pci", | 586 | .name = "pci", |
| 587 | .compatible = "pci108e,a001", | 587 | .compatible = "pci108e,a001", |
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c index 1d41af73a92f..fecfcb2063c8 100644 --- a/arch/sparc/kernel/pci_schizo.c +++ b/arch/sparc/kernel/pci_schizo.c | |||
| @@ -1470,7 +1470,7 @@ static int __devinit schizo_probe(struct platform_device *op) | |||
| 1470 | * and pci108e,8001. So list the chips in reverse chronological | 1470 | * and pci108e,8001. So list the chips in reverse chronological |
| 1471 | * order. | 1471 | * order. |
| 1472 | */ | 1472 | */ |
| 1473 | static struct of_device_id __initdata schizo_match[] = { | 1473 | static const struct of_device_id schizo_match[] = { |
| 1474 | { | 1474 | { |
| 1475 | .name = "pci", | 1475 | .name = "pci", |
| 1476 | .compatible = "pci108e,a801", | 1476 | .compatible = "pci108e,a801", |
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c index 6cf534681788..b01a06e9ae4e 100644 --- a/arch/sparc/kernel/pci_sun4v.c +++ b/arch/sparc/kernel/pci_sun4v.c | |||
| @@ -998,7 +998,7 @@ out_err: | |||
| 998 | return err; | 998 | return err; |
| 999 | } | 999 | } |
| 1000 | 1000 | ||
| 1001 | static struct of_device_id __initdata pci_sun4v_match[] = { | 1001 | static const struct of_device_id pci_sun4v_match[] = { |
| 1002 | { | 1002 | { |
| 1003 | .name = "pci", | 1003 | .name = "pci", |
| 1004 | .compatible = "SUNW,sun4v-pci", | 1004 | .compatible = "SUNW,sun4v-pci", |
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c index 760578687e7c..ee8426ede7c7 100644 --- a/arch/sparc/kernel/perf_event.c +++ b/arch/sparc/kernel/perf_event.c | |||
| @@ -1027,7 +1027,7 @@ static int sparc_pmu_add(struct perf_event *event, int ef_flags) | |||
| 1027 | 1027 | ||
| 1028 | /* | 1028 | /* |
| 1029 | * If group events scheduling transaction was started, | 1029 | * If group events scheduling transaction was started, |
| 1030 | * skip the schedulability test here, it will be peformed | 1030 | * skip the schedulability test here, it will be performed |
| 1031 | * at commit time(->commit_txn) as a whole | 1031 | * at commit time(->commit_txn) as a whole |
| 1032 | */ | 1032 | */ |
| 1033 | if (cpuc->group_flag & PERF_EVENT_TXN) | 1033 | if (cpuc->group_flag & PERF_EVENT_TXN) |
diff --git a/arch/sparc/kernel/power.c b/arch/sparc/kernel/power.c index cd725fe238b2..cb4c0f57c024 100644 --- a/arch/sparc/kernel/power.c +++ b/arch/sparc/kernel/power.c | |||
| @@ -52,7 +52,7 @@ static int __devinit power_probe(struct platform_device *op) | |||
| 52 | return 0; | 52 | return 0; |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | static struct of_device_id __initdata power_match[] = { | 55 | static const struct of_device_id power_match[] = { |
| 56 | { | 56 | { |
| 57 | .name = "power", | 57 | .name = "power", |
| 58 | }, | 58 | }, |
diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S index 4b86eaf04fe5..47ac73c32e88 100644 --- a/arch/sparc/kernel/systbls_32.S +++ b/arch/sparc/kernel/systbls_32.S | |||
| @@ -84,4 +84,4 @@ sys_call_table: | |||
| 84 | /*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv | 84 | /*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv |
| 85 | /*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init | 85 | /*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init |
| 86 | /*330*/ .long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime | 86 | /*330*/ .long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime |
| 87 | 87 | /*335*/ .long sys_syncfs | |
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S index 0331bafdf3a3..4f3170c1ef47 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S | |||
| @@ -85,6 +85,7 @@ sys_call_table32: | |||
| 85 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv | 85 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv |
| 86 | .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init | 86 | .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init |
| 87 | /*330*/ .word sys32_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime | 87 | /*330*/ .word sys32_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime |
| 88 | .word sys_syncfs | ||
| 88 | 89 | ||
| 89 | #endif /* CONFIG_COMPAT */ | 90 | #endif /* CONFIG_COMPAT */ |
| 90 | 91 | ||
| @@ -161,3 +162,4 @@ sys_call_table: | |||
| 161 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv | 162 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv |
| 162 | .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init | 163 | .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init |
| 163 | /*330*/ .word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime | 164 | /*330*/ .word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime |
| 165 | .word sys_syncfs | ||
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c index 95ec25faba39..2b8d54b2d850 100644 --- a/arch/sparc/kernel/time_64.c +++ b/arch/sparc/kernel/time_64.c | |||
| @@ -442,7 +442,7 @@ static int __devinit rtc_probe(struct platform_device *op) | |||
| 442 | return platform_device_register(&rtc_cmos_device); | 442 | return platform_device_register(&rtc_cmos_device); |
| 443 | } | 443 | } |
| 444 | 444 | ||
| 445 | static struct of_device_id __initdata rtc_match[] = { | 445 | static const struct of_device_id rtc_match[] = { |
| 446 | { | 446 | { |
| 447 | .name = "rtc", | 447 | .name = "rtc", |
| 448 | .compatible = "m5819", | 448 | .compatible = "m5819", |
| @@ -487,7 +487,7 @@ static int __devinit bq4802_probe(struct platform_device *op) | |||
| 487 | return platform_device_register(&rtc_bq4802_device); | 487 | return platform_device_register(&rtc_bq4802_device); |
| 488 | } | 488 | } |
| 489 | 489 | ||
| 490 | static struct of_device_id __initdata bq4802_match[] = { | 490 | static const struct of_device_id bq4802_match[] = { |
| 491 | { | 491 | { |
| 492 | .name = "rtc", | 492 | .name = "rtc", |
| 493 | .compatible = "bq4802", | 493 | .compatible = "bq4802", |
| @@ -552,7 +552,7 @@ static int __devinit mostek_probe(struct platform_device *op) | |||
| 552 | return platform_device_register(&m48t59_rtc); | 552 | return platform_device_register(&m48t59_rtc); |
| 553 | } | 553 | } |
| 554 | 554 | ||
| 555 | static struct of_device_id __initdata mostek_match[] = { | 555 | static const struct of_device_id mostek_match[] = { |
| 556 | { | 556 | { |
| 557 | .name = "eeprom", | 557 | .name = "eeprom", |
| 558 | }, | 558 | }, |
diff --git a/arch/sparc/math-emu/Makefile b/arch/sparc/math-emu/Makefile index b9085ecbb27b..825dbee94d84 100644 --- a/arch/sparc/math-emu/Makefile +++ b/arch/sparc/math-emu/Makefile | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | # Makefile for the FPU instruction emulation. | 2 | # Makefile for the FPU instruction emulation. |
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | # supress all warnings - as math.c produces a lot! | 5 | # suppress all warnings - as math.c produces a lot! |
| 6 | ccflags-y := -w | 6 | ccflags-y := -w |
| 7 | 7 | ||
| 8 | obj-y := math_$(BITS).o | 8 | obj-y := math_$(BITS).o |
diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig index 5e34a9fee9b3..e32b0c23c4c8 100644 --- a/arch/tile/Kconfig +++ b/arch/tile/Kconfig | |||
| @@ -11,7 +11,6 @@ config TILE | |||
| 11 | select HAVE_GENERIC_HARDIRQS | 11 | select HAVE_GENERIC_HARDIRQS |
| 12 | select GENERIC_IRQ_PROBE | 12 | select GENERIC_IRQ_PROBE |
| 13 | select GENERIC_PENDING_IRQ if SMP | 13 | select GENERIC_PENDING_IRQ if SMP |
| 14 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
| 15 | select GENERIC_IRQ_SHOW | 14 | select GENERIC_IRQ_SHOW |
| 16 | 15 | ||
| 17 | # FIXME: investigate whether we need/want these options. | 16 | # FIXME: investigate whether we need/want these options. |
| @@ -52,7 +51,7 @@ config GENERIC_TIME | |||
| 52 | config GENERIC_CLOCKEVENTS | 51 | config GENERIC_CLOCKEVENTS |
| 53 | def_bool y | 52 | def_bool y |
| 54 | 53 | ||
| 55 | # FIXME: tilegx can implement a more efficent rwsem. | 54 | # FIXME: tilegx can implement a more efficient rwsem. |
| 56 | config RWSEM_GENERIC_SPINLOCK | 55 | config RWSEM_GENERIC_SPINLOCK |
| 57 | def_bool y | 56 | def_bool y |
| 58 | 57 | ||
diff --git a/arch/tile/include/hv/drv_xgbe_intf.h b/arch/tile/include/hv/drv_xgbe_intf.h index 146e47d5334b..f13188ac281a 100644 --- a/arch/tile/include/hv/drv_xgbe_intf.h +++ b/arch/tile/include/hv/drv_xgbe_intf.h | |||
| @@ -319,7 +319,7 @@ typedef union | |||
| 319 | * is an error code, or zero if no error. The val0 member is the | 319 | * is an error code, or zero if no error. The val0 member is the |
| 320 | * updated value of seqno; it has been incremented by 1 for each | 320 | * updated value of seqno; it has been incremented by 1 for each |
| 321 | * packet sent. That increment may be less than nentries if an | 321 | * packet sent. That increment may be less than nentries if an |
| 322 | * error occured, or if some of the entries in the vector contain | 322 | * error occurred, or if some of the entries in the vector contain |
| 323 | * handles equal to NETIO_PKT_HANDLE_NONE. The val1 member is the | 323 | * handles equal to NETIO_PKT_HANDLE_NONE. The val1 member is the |
| 324 | * updated value of nentries; it has been decremented by 1 for each | 324 | * updated value of nentries; it has been decremented by 1 for each |
| 325 | * vector entry processed. Again, that decrement may be less than | 325 | * vector entry processed. Again, that decrement may be less than |
diff --git a/arch/tile/include/hv/hypervisor.h b/arch/tile/include/hv/hypervisor.h index 1b8bf03d62a0..ee41bca4c8c4 100644 --- a/arch/tile/include/hv/hypervisor.h +++ b/arch/tile/include/hv/hypervisor.h | |||
| @@ -1340,7 +1340,7 @@ typedef struct | |||
| 1340 | * this operation. If any permanent delivery errors were encountered, | 1340 | * this operation. If any permanent delivery errors were encountered, |
| 1341 | * the routine returns HV_ERECIP. In the event of permanent delivery | 1341 | * the routine returns HV_ERECIP. In the event of permanent delivery |
| 1342 | * errors, it may be the case that delivery was not attempted to all | 1342 | * errors, it may be the case that delivery was not attempted to all |
| 1343 | * recipients; if any messages were succesfully delivered, however, | 1343 | * recipients; if any messages were successfully delivered, however, |
| 1344 | * recipients' state values will be updated appropriately. | 1344 | * recipients' state values will be updated appropriately. |
| 1345 | * | 1345 | * |
| 1346 | * It is explicitly legal to specify a recipient structure whose state | 1346 | * It is explicitly legal to specify a recipient structure whose state |
| @@ -1359,7 +1359,7 @@ typedef struct | |||
| 1359 | * never call hv_receive_message, or could register a different state | 1359 | * never call hv_receive_message, or could register a different state |
| 1360 | * buffer, losing the message. | 1360 | * buffer, losing the message. |
| 1361 | * | 1361 | * |
| 1362 | * Specifiying the same recipient more than once in the recipient list | 1362 | * Specifying the same recipient more than once in the recipient list |
| 1363 | * is an error, which will not result in an error return but which may | 1363 | * is an error, which will not result in an error return but which may |
| 1364 | * or may not result in more than one message being delivered to the | 1364 | * or may not result in more than one message being delivered to the |
| 1365 | * recipient tile. | 1365 | * recipient tile. |
diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c index a1ee25be9ad9..ea38f0c9ec7c 100644 --- a/arch/tile/kernel/pci.c +++ b/arch/tile/kernel/pci.c | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | * Initialization flow and process | 36 | * Initialization flow and process |
| 37 | * ------------------------------- | 37 | * ------------------------------- |
| 38 | * | 38 | * |
| 39 | * This files containes the routines to search for PCI buses, | 39 | * This files contains the routines to search for PCI buses, |
| 40 | * enumerate the buses, and configure any attached devices. | 40 | * enumerate the buses, and configure any attached devices. |
| 41 | * | 41 | * |
| 42 | * There are two entry points here: | 42 | * There are two entry points here: |
| @@ -519,7 +519,7 @@ static int __devinit tile_cfg_read(struct pci_bus *bus, | |||
| 519 | 519 | ||
| 520 | 520 | ||
| 521 | /* | 521 | /* |
| 522 | * See tile_cfg_read() for relevent comments. | 522 | * See tile_cfg_read() for relevant comments. |
| 523 | * Note that "val" is the value to write, not a pointer to that value. | 523 | * Note that "val" is the value to write, not a pointer to that value. |
| 524 | */ | 524 | */ |
| 525 | static int __devinit tile_cfg_write(struct pci_bus *bus, | 525 | static int __devinit tile_cfg_write(struct pci_bus *bus, |
diff --git a/arch/tile/mm/fault.c b/arch/tile/mm/fault.c index 758f597f488c..51f8663bf074 100644 --- a/arch/tile/mm/fault.c +++ b/arch/tile/mm/fault.c | |||
| @@ -290,7 +290,7 @@ static int handle_page_fault(struct pt_regs *regs, | |||
| 290 | /* | 290 | /* |
| 291 | * Early on, we need to check for migrating PTE entries; | 291 | * Early on, we need to check for migrating PTE entries; |
| 292 | * see homecache.c. If we find a migrating PTE, we wait until | 292 | * see homecache.c. If we find a migrating PTE, we wait until |
| 293 | * the backing page claims to be done migrating, then we procede. | 293 | * the backing page claims to be done migrating, then we proceed. |
| 294 | * For kernel PTEs, we rewrite the PTE and return and retry. | 294 | * For kernel PTEs, we rewrite the PTE and return and retry. |
| 295 | * Otherwise, we treat the fault like a normal "no PTE" fault, | 295 | * Otherwise, we treat the fault like a normal "no PTE" fault, |
| 296 | * rather than trying to patch up the existing PTE. | 296 | * rather than trying to patch up the existing PTE. |
diff --git a/arch/tile/mm/hugetlbpage.c b/arch/tile/mm/hugetlbpage.c index 201a582c4137..42cfcba4e1ef 100644 --- a/arch/tile/mm/hugetlbpage.c +++ b/arch/tile/mm/hugetlbpage.c | |||
| @@ -219,7 +219,7 @@ try_again: | |||
| 219 | if (mm->free_area_cache < len) | 219 | if (mm->free_area_cache < len) |
| 220 | goto fail; | 220 | goto fail; |
| 221 | 221 | ||
| 222 | /* either no address requested or cant fit in requested address hole */ | 222 | /* either no address requested or can't fit in requested address hole */ |
| 223 | addr = (mm->free_area_cache - len) & huge_page_mask(h); | 223 | addr = (mm->free_area_cache - len) & huge_page_mask(h); |
| 224 | do { | 224 | do { |
| 225 | /* | 225 | /* |
diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common index 109ddc0071c6..a9234838e8a2 100644 --- a/arch/um/Kconfig.common +++ b/arch/um/Kconfig.common | |||
| @@ -7,7 +7,6 @@ config UML | |||
| 7 | bool | 7 | bool |
| 8 | default y | 8 | default y |
| 9 | select HAVE_GENERIC_HARDIRQS | 9 | select HAVE_GENERIC_HARDIRQS |
| 10 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
| 11 | select GENERIC_IRQ_SHOW | 10 | select GENERIC_IRQ_SHOW |
| 12 | 11 | ||
| 13 | config MMU | 12 | config MMU |
diff --git a/arch/um/Kconfig.net b/arch/um/Kconfig.net index 9e9a4aaa703d..3160b1a5adb7 100644 --- a/arch/um/Kconfig.net +++ b/arch/um/Kconfig.net | |||
| @@ -186,7 +186,7 @@ config UML_NET_SLIRP | |||
| 186 | other transports, SLiRP works without the need of root level | 186 | other transports, SLiRP works without the need of root level |
| 187 | privleges, setuid binaries, or SLIP devices on the host. This | 187 | privleges, setuid binaries, or SLIP devices on the host. This |
| 188 | also means not every type of connection is possible, but most | 188 | also means not every type of connection is possible, but most |
| 189 | situations can be accomodated with carefully crafted slirp | 189 | situations can be accommodated with carefully crafted slirp |
| 190 | commands that can be passed along as part of the network device's | 190 | commands that can be passed along as part of the network device's |
| 191 | setup string. The effect of this transport on the UML is similar | 191 | setup string. The effect of this transport on the UML is similar |
| 192 | that of a host behind a firewall that masquerades all network | 192 | that of a host behind a firewall that masquerades all network |
diff --git a/arch/um/Kconfig.x86 b/arch/um/Kconfig.x86 index 02fb017fed47..a9da516a5274 100644 --- a/arch/um/Kconfig.x86 +++ b/arch/um/Kconfig.x86 | |||
| @@ -4,6 +4,10 @@ menu "UML-specific options" | |||
| 4 | 4 | ||
| 5 | menu "Host processor type and features" | 5 | menu "Host processor type and features" |
| 6 | 6 | ||
| 7 | config CMPXCHG_LOCAL | ||
| 8 | bool | ||
| 9 | default n | ||
| 10 | |||
| 7 | source "arch/x86/Kconfig.cpu" | 11 | source "arch/x86/Kconfig.cpu" |
| 8 | 12 | ||
| 9 | endmenu | 13 | endmenu |
diff --git a/arch/um/include/asm/bug.h b/arch/um/include/asm/bug.h new file mode 100644 index 000000000000..9e33b864c359 --- /dev/null +++ b/arch/um/include/asm/bug.h | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | #ifndef __UM_BUG_H | ||
| 2 | #define __UM_BUG_H | ||
| 3 | |||
| 4 | #include <asm-generic/bug.h> | ||
| 5 | |||
| 6 | #endif | ||
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig index 04e024919b2b..d3a303246c9f 100644 --- a/arch/unicore32/Kconfig +++ b/arch/unicore32/Kconfig | |||
| @@ -10,7 +10,6 @@ config UNICORE32 | |||
| 10 | select HAVE_KERNEL_LZMA | 10 | select HAVE_KERNEL_LZMA |
| 11 | select GENERIC_FIND_FIRST_BIT | 11 | select GENERIC_FIND_FIRST_BIT |
| 12 | select GENERIC_IRQ_PROBE | 12 | select GENERIC_IRQ_PROBE |
| 13 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
| 14 | select GENERIC_IRQ_SHOW | 13 | select GENERIC_IRQ_SHOW |
| 15 | select ARCH_WANT_FRAME_POINTERS | 14 | select ARCH_WANT_FRAME_POINTERS |
| 16 | help | 15 | help |
diff --git a/arch/unicore32/Makefile b/arch/unicore32/Makefile index e08d6d370a8a..76a8beec7d03 100644 --- a/arch/unicore32/Makefile +++ b/arch/unicore32/Makefile | |||
| @@ -48,7 +48,7 @@ ASM_GENERIC_HEADERS += bitsperlong.h bug.h bugs.h | |||
| 48 | ASM_GENERIC_HEADERS += cputime.h current.h | 48 | ASM_GENERIC_HEADERS += cputime.h current.h |
| 49 | ASM_GENERIC_HEADERS += device.h div64.h | 49 | ASM_GENERIC_HEADERS += device.h div64.h |
| 50 | ASM_GENERIC_HEADERS += emergency-restart.h errno.h | 50 | ASM_GENERIC_HEADERS += emergency-restart.h errno.h |
| 51 | ASM_GENERIC_HEADERS += fb.h fcntl.h ftrace.h | 51 | ASM_GENERIC_HEADERS += fb.h fcntl.h ftrace.h futex.h |
| 52 | ASM_GENERIC_HEADERS += hardirq.h hw_irq.h | 52 | ASM_GENERIC_HEADERS += hardirq.h hw_irq.h |
| 53 | ASM_GENERIC_HEADERS += ioctl.h ioctls.h ipcbuf.h irq_regs.h | 53 | ASM_GENERIC_HEADERS += ioctl.h ioctls.h ipcbuf.h irq_regs.h |
| 54 | ASM_GENERIC_HEADERS += kdebug.h kmap_types.h | 54 | ASM_GENERIC_HEADERS += kdebug.h kmap_types.h |
diff --git a/arch/unicore32/include/asm/futex.h b/arch/unicore32/include/asm/futex.h deleted file mode 100644 index 07dea6170558..000000000000 --- a/arch/unicore32/include/asm/futex.h +++ /dev/null | |||
| @@ -1,143 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/unicore32/include/asm/futex.h | ||
| 3 | * | ||
| 4 | * Code specific to PKUnity SoC and UniCore ISA | ||
| 5 | * | ||
| 6 | * Copyright (C) 2001-2010 GUAN Xue-tao | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License version 2 as | ||
| 10 | * published by the Free Software Foundation. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef __UNICORE_FUTEX_H__ | ||
| 14 | #define __UNICORE_FUTEX_H__ | ||
| 15 | |||
| 16 | #ifdef __KERNEL__ | ||
| 17 | |||
| 18 | #include <linux/futex.h> | ||
| 19 | #include <linux/preempt.h> | ||
| 20 | #include <linux/uaccess.h> | ||
| 21 | #include <linux/errno.h> | ||
| 22 | |||
| 23 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ | ||
| 24 | __asm__ __volatile__( \ | ||
| 25 | "1: ldw.u %1, [%2]\n" \ | ||
| 26 | " " insn "\n" \ | ||
| 27 | "2: stw.u %0, [%2]\n" \ | ||
| 28 | " mov %0, #0\n" \ | ||
| 29 | "3:\n" \ | ||
| 30 | " .pushsection __ex_table,\"a\"\n" \ | ||
| 31 | " .align 3\n" \ | ||
| 32 | " .long 1b, 4f, 2b, 4f\n" \ | ||
| 33 | " .popsection\n" \ | ||
| 34 | " .pushsection .fixup,\"ax\"\n" \ | ||
| 35 | "4: mov %0, %4\n" \ | ||
| 36 | " b 3b\n" \ | ||
| 37 | " .popsection" \ | ||
| 38 | : "=&r" (ret), "=&r" (oldval) \ | ||
| 39 | : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \ | ||
| 40 | : "cc", "memory") | ||
| 41 | |||
| 42 | static inline int | ||
| 43 | futex_atomic_op_inuser(int encoded_op, int __user *uaddr) | ||
| 44 | { | ||
| 45 | int op = (encoded_op >> 28) & 7; | ||
| 46 | int cmp = (encoded_op >> 24) & 15; | ||
| 47 | int oparg = (encoded_op << 8) >> 20; | ||
| 48 | int cmparg = (encoded_op << 20) >> 20; | ||
| 49 | int oldval = 0, ret; | ||
| 50 | |||
| 51 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
| 52 | oparg = 1 << oparg; | ||
| 53 | |||
| 54 | if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) | ||
| 55 | return -EFAULT; | ||
| 56 | |||
| 57 | pagefault_disable(); /* implies preempt_disable() */ | ||
| 58 | |||
| 59 | switch (op) { | ||
| 60 | case FUTEX_OP_SET: | ||
| 61 | __futex_atomic_op("mov %0, %3", ret, oldval, uaddr, oparg); | ||
| 62 | break; | ||
| 63 | case FUTEX_OP_ADD: | ||
| 64 | __futex_atomic_op("add %0, %1, %3", ret, oldval, uaddr, oparg); | ||
| 65 | break; | ||
| 66 | case FUTEX_OP_OR: | ||
| 67 | __futex_atomic_op("or %0, %1, %3", ret, oldval, uaddr, oparg); | ||
| 68 | break; | ||
| 69 | case FUTEX_OP_ANDN: | ||
| 70 | __futex_atomic_op("and %0, %1, %3", | ||
| 71 | ret, oldval, uaddr, ~oparg); | ||
| 72 | break; | ||
| 73 | case FUTEX_OP_XOR: | ||
| 74 | __futex_atomic_op("xor %0, %1, %3", ret, oldval, uaddr, oparg); | ||
| 75 | break; | ||
| 76 | default: | ||
| 77 | ret = -ENOSYS; | ||
| 78 | } | ||
| 79 | |||
| 80 | pagefault_enable(); /* subsumes preempt_enable() */ | ||
| 81 | |||
| 82 | if (!ret) { | ||
| 83 | switch (cmp) { | ||
| 84 | case FUTEX_OP_CMP_EQ: | ||
| 85 | ret = (oldval == cmparg); | ||
| 86 | break; | ||
| 87 | case FUTEX_OP_CMP_NE: | ||
| 88 | ret = (oldval != cmparg); | ||
| 89 | break; | ||
| 90 | case FUTEX_OP_CMP_LT: | ||
| 91 | ret = (oldval < cmparg); | ||
| 92 | break; | ||
| 93 | case FUTEX_OP_CMP_GE: | ||
| 94 | ret = (oldval >= cmparg); | ||
| 95 | break; | ||
| 96 | case FUTEX_OP_CMP_LE: | ||
| 97 | ret = (oldval <= cmparg); | ||
| 98 | break; | ||
| 99 | case FUTEX_OP_CMP_GT: | ||
| 100 | ret = (oldval > cmparg); | ||
| 101 | break; | ||
| 102 | default: | ||
| 103 | ret = -ENOSYS; | ||
| 104 | } | ||
| 105 | } | ||
| 106 | return ret; | ||
| 107 | } | ||
| 108 | |||
| 109 | static inline int | ||
| 110 | futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) | ||
| 111 | { | ||
| 112 | int val; | ||
| 113 | |||
| 114 | if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) | ||
| 115 | return -EFAULT; | ||
| 116 | |||
| 117 | pagefault_disable(); /* implies preempt_disable() */ | ||
| 118 | |||
| 119 | __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n" | ||
| 120 | "1: ldw.u %0, [%3]\n" | ||
| 121 | " cmpxor.a %0, %1\n" | ||
| 122 | " bne 3f\n" | ||
| 123 | "2: stw.u %2, [%3]\n" | ||
| 124 | "3:\n" | ||
| 125 | " .pushsection __ex_table,\"a\"\n" | ||
| 126 | " .align 3\n" | ||
| 127 | " .long 1b, 4f, 2b, 4f\n" | ||
| 128 | " .popsection\n" | ||
| 129 | " .pushsection .fixup,\"ax\"\n" | ||
| 130 | "4: mov %0, %4\n" | ||
| 131 | " b 3b\n" | ||
| 132 | " .popsection" | ||
| 133 | : "=&r" (val) | ||
| 134 | : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT) | ||
| 135 | : "cc", "memory"); | ||
| 136 | |||
| 137 | pagefault_enable(); /* subsumes preempt_enable() */ | ||
| 138 | |||
| 139 | return val; | ||
| 140 | } | ||
| 141 | |||
| 142 | #endif /* __KERNEL__ */ | ||
| 143 | #endif /* __UNICORE_FUTEX_H__ */ | ||
diff --git a/arch/unicore32/include/mach/PKUnity.h b/arch/unicore32/include/mach/PKUnity.h index a18bdc3810e6..8040d575dddb 100644 --- a/arch/unicore32/include/mach/PKUnity.h +++ b/arch/unicore32/include/mach/PKUnity.h | |||
| @@ -24,16 +24,6 @@ | |||
| 24 | #define PKUNITY_MMIO_BASE 0x80000000 /* 0x80000000 - 0xFFFFFFFF 2GB */ | 24 | #define PKUNITY_MMIO_BASE 0x80000000 /* 0x80000000 - 0xFFFFFFFF 2GB */ |
| 25 | 25 | ||
| 26 | /* | 26 | /* |
| 27 | * PKUNITY Memory Map Addresses: 0x0D000000 - 0x0EFFFFFF (32MB) | ||
| 28 | * 0x0D000000 - 0x0DFFFFFF 16MB: for UVC | ||
| 29 | * 0x0E000000 - 0x0EFFFFFF 16MB: for UNIGFX | ||
| 30 | */ | ||
| 31 | #define PKUNITY_UVC_MMAP_BASE 0x0D000000 | ||
| 32 | #define PKUNITY_UVC_MMAP_SIZE 0x01000000 /* 16MB */ | ||
| 33 | #define PKUNITY_UNIGFX_MMAP_BASE 0x0E000000 | ||
| 34 | #define PKUNITY_UNIGFX_MMAP_SIZE 0x01000000 /* 16MB */ | ||
| 35 | |||
| 36 | /* | ||
| 37 | * PKUNITY System Bus Addresses (PCI): 0x80000000 - 0xBFFFFFFF (1GB) | 27 | * PKUNITY System Bus Addresses (PCI): 0x80000000 - 0xBFFFFFFF (1GB) |
| 38 | * 0x80000000 - 0x8000000B 12B PCI Configuration regs | 28 | * 0x80000000 - 0x8000000B 12B PCI Configuration regs |
| 39 | * 0x80010000 - 0x80010250 592B PCI Bridge Base | 29 | * 0x80010000 - 0x80010250 592B PCI Bridge Base |
diff --git a/arch/unicore32/include/mach/memory.h b/arch/unicore32/include/mach/memory.h index 0bf21c944710..4be72c21d491 100644 --- a/arch/unicore32/include/mach/memory.h +++ b/arch/unicore32/include/mach/memory.h | |||
| @@ -50,7 +50,6 @@ void puv3_pci_adjust_zones(unsigned long *size, unsigned long *holes); | |||
| 50 | 50 | ||
| 51 | /* kuser area */ | 51 | /* kuser area */ |
| 52 | #define KUSER_VECPAGE_BASE (KUSER_BASE + UL(0x3fff0000)) | 52 | #define KUSER_VECPAGE_BASE (KUSER_BASE + UL(0x3fff0000)) |
| 53 | #define KUSER_UNIGFX_BASE (PAGE_OFFSET + PKUNITY_UNIGFX_MMAP_BASE) | ||
| 54 | /* kuser_vecpage (0xbfff0000) is ro, and vectors page (0xffff0000) is rw */ | 53 | /* kuser_vecpage (0xbfff0000) is ro, and vectors page (0xffff0000) is rw */ |
| 55 | #define kuser_vecpage_to_vectors(x) ((x) - (KUSER_VECPAGE_BASE) \ | 54 | #define kuser_vecpage_to_vectors(x) ((x) - (KUSER_VECPAGE_BASE) \ |
| 56 | + (VECTORS_BASE)) | 55 | + (VECTORS_BASE)) |
diff --git a/arch/unicore32/include/mach/regs-umal.h b/arch/unicore32/include/mach/regs-umal.h index 885bb62fee71..aa22df74e11d 100644 --- a/arch/unicore32/include/mach/regs-umal.h +++ b/arch/unicore32/include/mach/regs-umal.h | |||
| @@ -52,7 +52,7 @@ | |||
| 52 | */ | 52 | */ |
| 53 | #define UMAL_MIISTATUS (PKUNITY_UMAL_BASE + 0x0030) | 53 | #define UMAL_MIISTATUS (PKUNITY_UMAL_BASE + 0x0030) |
| 54 | /* | 54 | /* |
| 55 | * MII Managment Indicator UMAL_MIIIDCT | 55 | * MII Management Indicator UMAL_MIIIDCT |
| 56 | */ | 56 | */ |
| 57 | #define UMAL_MIIIDCT (PKUNITY_UMAL_BASE + 0x0034) | 57 | #define UMAL_MIIIDCT (PKUNITY_UMAL_BASE + 0x0034) |
| 58 | /* | 58 | /* |
| @@ -91,7 +91,7 @@ | |||
| 91 | #define UMAL_FIFORAM6 (PKUNITY_UMAL_BASE + 0x0078) | 91 | #define UMAL_FIFORAM6 (PKUNITY_UMAL_BASE + 0x0078) |
| 92 | #define UMAL_FIFORAM7 (PKUNITY_UMAL_BASE + 0x007c) | 92 | #define UMAL_FIFORAM7 (PKUNITY_UMAL_BASE + 0x007c) |
| 93 | 93 | ||
| 94 | /* MAHBE MODUEL OF UMAL */ | 94 | /* MAHBE MODULE OF UMAL */ |
| 95 | /* UMAL's MAHBE module interfaces to the host system through 32-bit AHB Master | 95 | /* UMAL's MAHBE module interfaces to the host system through 32-bit AHB Master |
| 96 | * and Slave ports.Registers within the M-AHBE provide Control and Status | 96 | * and Slave ports.Registers within the M-AHBE provide Control and Status |
| 97 | * information concerning these transfers. | 97 | * information concerning these transfers. |
diff --git a/arch/unicore32/kernel/head.S b/arch/unicore32/kernel/head.S index 92255f3ab6a7..8caf322e110d 100644 --- a/arch/unicore32/kernel/head.S +++ b/arch/unicore32/kernel/head.S | |||
| @@ -164,7 +164,7 @@ ENTRY(stext) | |||
| 164 | ENDPROC(stext) | 164 | ENDPROC(stext) |
| 165 | 165 | ||
| 166 | /* | 166 | /* |
| 167 | * Enable the MMU. This completely changes the stucture of the visible | 167 | * Enable the MMU. This completely changes the structure of the visible |
| 168 | * memory space. You will not be able to trace execution through this. | 168 | * memory space. You will not be able to trace execution through this. |
| 169 | * | 169 | * |
| 170 | * r0 = cp#0 control register | 170 | * r0 = cp#0 control register |
diff --git a/arch/unicore32/kernel/puv3-core.c b/arch/unicore32/kernel/puv3-core.c index 8b1b6beb858e..1a505a787765 100644 --- a/arch/unicore32/kernel/puv3-core.c +++ b/arch/unicore32/kernel/puv3-core.c | |||
| @@ -99,11 +99,6 @@ static struct resource puv3_unigfx_resources[] = { | |||
| 99 | .end = io_v2p(PKUNITY_UNIGFX_BASE) + 0xfff, | 99 | .end = io_v2p(PKUNITY_UNIGFX_BASE) + 0xfff, |
| 100 | .flags = IORESOURCE_MEM, | 100 | .flags = IORESOURCE_MEM, |
| 101 | }, | 101 | }, |
| 102 | [1] = { | ||
| 103 | .start = PKUNITY_UNIGFX_MMAP_BASE, | ||
| 104 | .end = PKUNITY_UNIGFX_MMAP_BASE + PKUNITY_UNIGFX_MMAP_SIZE, | ||
| 105 | .flags = IORESOURCE_MEM, | ||
| 106 | }, | ||
| 107 | }; | 102 | }; |
| 108 | 103 | ||
| 109 | static struct resource puv3_rtc_resources[] = { | 104 | static struct resource puv3_rtc_resources[] = { |
diff --git a/arch/unicore32/kernel/rtc.c b/arch/unicore32/kernel/rtc.c index c5f068295b51..8cad70b3302c 100644 --- a/arch/unicore32/kernel/rtc.c +++ b/arch/unicore32/kernel/rtc.c | |||
| @@ -88,11 +88,6 @@ static int puv3_rtc_setpie(struct device *dev, int enabled) | |||
| 88 | return 0; | 88 | return 0; |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | static int puv3_rtc_setfreq(struct device *dev, int freq) | ||
| 92 | { | ||
| 93 | return 0; | ||
| 94 | } | ||
| 95 | |||
| 96 | /* Time read/write */ | 91 | /* Time read/write */ |
| 97 | 92 | ||
| 98 | static int puv3_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm) | 93 | static int puv3_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm) |
| @@ -214,8 +209,6 @@ static const struct rtc_class_ops puv3_rtcops = { | |||
| 214 | .set_time = puv3_rtc_settime, | 209 | .set_time = puv3_rtc_settime, |
| 215 | .read_alarm = puv3_rtc_getalarm, | 210 | .read_alarm = puv3_rtc_getalarm, |
| 216 | .set_alarm = puv3_rtc_setalarm, | 211 | .set_alarm = puv3_rtc_setalarm, |
| 217 | .irq_set_freq = puv3_rtc_setfreq, | ||
| 218 | .irq_set_state = puv3_rtc_setpie, | ||
| 219 | .proc = puv3_rtc_proc, | 212 | .proc = puv3_rtc_proc, |
| 220 | }; | 213 | }; |
| 221 | 214 | ||
| @@ -294,8 +287,6 @@ static int puv3_rtc_probe(struct platform_device *pdev) | |||
| 294 | 287 | ||
| 295 | puv3_rtc_enable(pdev, 1); | 288 | puv3_rtc_enable(pdev, 1); |
| 296 | 289 | ||
| 297 | puv3_rtc_setfreq(&pdev->dev, 1); | ||
| 298 | |||
| 299 | /* register RTC and exit */ | 290 | /* register RTC and exit */ |
| 300 | 291 | ||
| 301 | rtc = rtc_device_register("pkunity", &pdev->dev, &puv3_rtcops, | 292 | rtc = rtc_device_register("pkunity", &pdev->dev, &puv3_rtcops, |
diff --git a/arch/unicore32/kernel/setup.c b/arch/unicore32/kernel/setup.c index 1e175a82844d..471b6bca8da4 100644 --- a/arch/unicore32/kernel/setup.c +++ b/arch/unicore32/kernel/setup.c | |||
| @@ -64,12 +64,6 @@ static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE; | |||
| 64 | */ | 64 | */ |
| 65 | static struct resource mem_res[] = { | 65 | static struct resource mem_res[] = { |
| 66 | { | 66 | { |
| 67 | .name = "Video RAM", | ||
| 68 | .start = 0, | ||
| 69 | .end = 0, | ||
| 70 | .flags = IORESOURCE_MEM | ||
| 71 | }, | ||
| 72 | { | ||
| 73 | .name = "Kernel text", | 67 | .name = "Kernel text", |
| 74 | .start = 0, | 68 | .start = 0, |
| 75 | .end = 0, | 69 | .end = 0, |
| @@ -83,9 +77,8 @@ static struct resource mem_res[] = { | |||
| 83 | } | 77 | } |
| 84 | }; | 78 | }; |
| 85 | 79 | ||
| 86 | #define video_ram mem_res[0] | 80 | #define kernel_code mem_res[0] |
| 87 | #define kernel_code mem_res[1] | 81 | #define kernel_data mem_res[1] |
| 88 | #define kernel_data mem_res[2] | ||
| 89 | 82 | ||
| 90 | /* | 83 | /* |
| 91 | * These functions re-use the assembly code in head.S, which | 84 | * These functions re-use the assembly code in head.S, which |
| @@ -224,10 +217,6 @@ request_standard_resources(struct meminfo *mi) | |||
| 224 | kernel_data.end <= res->end) | 217 | kernel_data.end <= res->end) |
| 225 | request_resource(res, &kernel_data); | 218 | request_resource(res, &kernel_data); |
| 226 | } | 219 | } |
| 227 | |||
| 228 | video_ram.start = PKUNITY_UNIGFX_MMAP_BASE; | ||
| 229 | video_ram.end = PKUNITY_UNIGFX_MMAP_BASE + PKUNITY_UNIGFX_MMAP_SIZE; | ||
| 230 | request_resource(&iomem_resource, &video_ram); | ||
| 231 | } | 220 | } |
| 232 | 221 | ||
| 233 | static void (*init_machine)(void) __initdata; | 222 | static void (*init_machine)(void) __initdata; |
diff --git a/arch/unicore32/kernel/traps.c b/arch/unicore32/kernel/traps.c index 25abbb101729..254e36fa9513 100644 --- a/arch/unicore32/kernel/traps.c +++ b/arch/unicore32/kernel/traps.c | |||
| @@ -22,7 +22,6 @@ | |||
| 22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
| 23 | #include <linux/hardirq.h> | 23 | #include <linux/hardirq.h> |
| 24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
| 25 | #include <linux/uaccess.h> | ||
| 26 | #include <linux/atomic.h> | 25 | #include <linux/atomic.h> |
| 27 | #include <linux/unistd.h> | 26 | #include <linux/unistd.h> |
| 28 | 27 | ||
diff --git a/arch/unicore32/kernel/vmlinux.lds.S b/arch/unicore32/kernel/vmlinux.lds.S index 0b4eb89729e7..9bf7f7af52c5 100644 --- a/arch/unicore32/kernel/vmlinux.lds.S +++ b/arch/unicore32/kernel/vmlinux.lds.S | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <asm/thread_info.h> | 14 | #include <asm/thread_info.h> |
| 15 | #include <asm/memory.h> | 15 | #include <asm/memory.h> |
| 16 | #include <asm/page.h> | 16 | #include <asm/page.h> |
| 17 | #include <asm/cache.h> | ||
| 17 | 18 | ||
| 18 | OUTPUT_ARCH(unicore32) | 19 | OUTPUT_ARCH(unicore32) |
| 19 | ENTRY(stext) | 20 | ENTRY(stext) |
| @@ -29,7 +30,7 @@ SECTIONS | |||
| 29 | HEAD_TEXT_SECTION | 30 | HEAD_TEXT_SECTION |
| 30 | INIT_TEXT_SECTION(PAGE_SIZE) | 31 | INIT_TEXT_SECTION(PAGE_SIZE) |
| 31 | INIT_DATA_SECTION(16) | 32 | INIT_DATA_SECTION(16) |
| 32 | PERCPU(PAGE_SIZE) | 33 | PERCPU(L1_CACHE_BYTES, PAGE_SIZE) |
| 33 | __init_end = .; | 34 | __init_end = .; |
| 34 | 35 | ||
| 35 | _stext = .; | 36 | _stext = .; |
| @@ -45,10 +46,10 @@ SECTIONS | |||
| 45 | 46 | ||
| 46 | _sdata = .; | 47 | _sdata = .; |
| 47 | RO_DATA_SECTION(PAGE_SIZE) | 48 | RO_DATA_SECTION(PAGE_SIZE) |
| 48 | RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE) | 49 | RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) |
| 49 | _edata = .; | 50 | _edata = .; |
| 50 | 51 | ||
| 51 | EXCEPTION_TABLE(32) | 52 | EXCEPTION_TABLE(L1_CACHE_BYTES) |
| 52 | NOTES | 53 | NOTES |
| 53 | 54 | ||
| 54 | BSS_SECTION(0, 0, 0) | 55 | BSS_SECTION(0, 0, 0) |
diff --git a/arch/unicore32/mm/mmu.c b/arch/unicore32/mm/mmu.c index 7bf3d588631f..db2d334941b4 100644 --- a/arch/unicore32/mm/mmu.c +++ b/arch/unicore32/mm/mmu.c | |||
| @@ -338,15 +338,6 @@ void __init uc32_mm_memblock_reserve(void) | |||
| 338 | * and can only be in node 0. | 338 | * and can only be in node 0. |
| 339 | */ | 339 | */ |
| 340 | memblock_reserve(__pa(swapper_pg_dir), PTRS_PER_PGD * sizeof(pgd_t)); | 340 | memblock_reserve(__pa(swapper_pg_dir), PTRS_PER_PGD * sizeof(pgd_t)); |
| 341 | |||
| 342 | #ifdef CONFIG_PUV3_UNIGFX | ||
| 343 | /* | ||
| 344 | * These should likewise go elsewhere. They pre-reserve the | ||
| 345 | * screen/video memory region at the 48M~64M of main system memory. | ||
| 346 | */ | ||
| 347 | memblock_reserve(PKUNITY_UNIGFX_MMAP_BASE, PKUNITY_UNIGFX_MMAP_SIZE); | ||
| 348 | memblock_reserve(PKUNITY_UVC_MMAP_BASE, PKUNITY_UVC_MMAP_SIZE); | ||
| 349 | #endif | ||
| 350 | } | 341 | } |
| 351 | 342 | ||
| 352 | /* | 343 | /* |
| @@ -371,17 +362,6 @@ static void __init devicemaps_init(void) | |||
| 371 | pmd_clear(pmd_off_k(addr)); | 362 | pmd_clear(pmd_off_k(addr)); |
| 372 | 363 | ||
| 373 | /* | 364 | /* |
| 374 | * Create a mapping for UniGFX VRAM | ||
| 375 | */ | ||
| 376 | #ifdef CONFIG_PUV3_UNIGFX | ||
| 377 | map.pfn = __phys_to_pfn(PKUNITY_UNIGFX_MMAP_BASE); | ||
| 378 | map.virtual = KUSER_UNIGFX_BASE; | ||
| 379 | map.length = PKUNITY_UNIGFX_MMAP_SIZE; | ||
| 380 | map.type = MT_KUSER; | ||
| 381 | create_mapping(&map); | ||
| 382 | #endif | ||
| 383 | |||
| 384 | /* | ||
| 385 | * Create a mapping for the machine vectors at the high-vectors | 365 | * Create a mapping for the machine vectors at the high-vectors |
| 386 | * location (0xffff0000). If we aren't using high-vectors, also | 366 | * location (0xffff0000). If we aren't using high-vectors, also |
| 387 | * create a mapping at the low-vectors virtual address. | 367 | * create a mapping at the low-vectors virtual address. |
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index a279d98ea95e..2b7d573be549 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
| @@ -2,7 +2,6 @@ | |||
| 2 | #define _ASM_X86_APIC_H | 2 | #define _ASM_X86_APIC_H |
| 3 | 3 | ||
| 4 | #include <linux/cpumask.h> | 4 | #include <linux/cpumask.h> |
| 5 | #include <linux/delay.h> | ||
| 6 | #include <linux/pm.h> | 5 | #include <linux/pm.h> |
| 7 | 6 | ||
| 8 | #include <asm/alternative.h> | 7 | #include <asm/alternative.h> |
diff --git a/arch/x86/include/asm/dma.h b/arch/x86/include/asm/dma.h index 97b6d8114a43..057099e5faba 100644 --- a/arch/x86/include/asm/dma.h +++ b/arch/x86/include/asm/dma.h | |||
| @@ -10,7 +10,6 @@ | |||
| 10 | 10 | ||
| 11 | #include <linux/spinlock.h> /* And spinlocks */ | 11 | #include <linux/spinlock.h> /* And spinlocks */ |
| 12 | #include <asm/io.h> /* need byte IO */ | 12 | #include <asm/io.h> /* need byte IO */ |
| 13 | #include <linux/delay.h> | ||
| 14 | 13 | ||
| 15 | #ifdef HAVE_REALLY_SLOW_DMA_CONTROLLER | 14 | #ifdef HAVE_REALLY_SLOW_DMA_CONTROLLER |
| 16 | #define dma_outb outb_p | 15 | #define dma_outb outb_p |
diff --git a/arch/x86/include/asm/i387.h b/arch/x86/include/asm/i387.h index ef328901c802..c9e09ea05644 100644 --- a/arch/x86/include/asm/i387.h +++ b/arch/x86/include/asm/i387.h | |||
| @@ -237,7 +237,7 @@ static inline void fpu_save_init(struct fpu *fpu) | |||
| 237 | } else if (use_fxsr()) { | 237 | } else if (use_fxsr()) { |
| 238 | fpu_fxsave(fpu); | 238 | fpu_fxsave(fpu); |
| 239 | } else { | 239 | } else { |
| 240 | asm volatile("fsave %[fx]; fwait" | 240 | asm volatile("fnsave %[fx]; fwait" |
| 241 | : [fx] "=m" (fpu->state->fsave)); | 241 | : [fx] "=m" (fpu->state->fsave)); |
| 242 | return; | 242 | return; |
| 243 | } | 243 | } |
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index fd5a1f365c95..3cce71413d0b 100644 --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h | |||
| @@ -96,11 +96,15 @@ | |||
| 96 | #define MSR_IA32_MC0_ADDR 0x00000402 | 96 | #define MSR_IA32_MC0_ADDR 0x00000402 |
| 97 | #define MSR_IA32_MC0_MISC 0x00000403 | 97 | #define MSR_IA32_MC0_MISC 0x00000403 |
| 98 | 98 | ||
| 99 | #define MSR_AMD64_MC0_MASK 0xc0010044 | ||
| 100 | |||
| 99 | #define MSR_IA32_MCx_CTL(x) (MSR_IA32_MC0_CTL + 4*(x)) | 101 | #define MSR_IA32_MCx_CTL(x) (MSR_IA32_MC0_CTL + 4*(x)) |
| 100 | #define MSR_IA32_MCx_STATUS(x) (MSR_IA32_MC0_STATUS + 4*(x)) | 102 | #define MSR_IA32_MCx_STATUS(x) (MSR_IA32_MC0_STATUS + 4*(x)) |
| 101 | #define MSR_IA32_MCx_ADDR(x) (MSR_IA32_MC0_ADDR + 4*(x)) | 103 | #define MSR_IA32_MCx_ADDR(x) (MSR_IA32_MC0_ADDR + 4*(x)) |
| 102 | #define MSR_IA32_MCx_MISC(x) (MSR_IA32_MC0_MISC + 4*(x)) | 104 | #define MSR_IA32_MCx_MISC(x) (MSR_IA32_MC0_MISC + 4*(x)) |
| 103 | 105 | ||
| 106 | #define MSR_AMD64_MCx_MASK(x) (MSR_AMD64_MC0_MASK + (x)) | ||
| 107 | |||
| 104 | /* These are consecutive and not in the normal 4er MCE bank block */ | 108 | /* These are consecutive and not in the normal 4er MCE bank block */ |
| 105 | #define MSR_IA32_MC0_CTL2 0x00000280 | 109 | #define MSR_IA32_MC0_CTL2 0x00000280 |
| 106 | #define MSR_IA32_MCx_CTL2(x) (MSR_IA32_MC0_CTL2 + (x)) | 110 | #define MSR_IA32_MCx_CTL2(x) (MSR_IA32_MC0_CTL2 + (x)) |
diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c index 6801959a8b2a..4c39baa8facc 100644 --- a/arch/x86/kernel/amd_nb.c +++ b/arch/x86/kernel/amd_nb.c | |||
| @@ -21,7 +21,7 @@ const struct pci_device_id amd_nb_misc_ids[] = { | |||
| 21 | EXPORT_SYMBOL(amd_nb_misc_ids); | 21 | EXPORT_SYMBOL(amd_nb_misc_ids); |
| 22 | 22 | ||
| 23 | static struct pci_device_id amd_nb_link_ids[] = { | 23 | static struct pci_device_id amd_nb_link_ids[] = { |
| 24 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_LINK) }, | 24 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) }, |
| 25 | {} | 25 | {} |
| 26 | }; | 26 | }; |
| 27 | 27 | ||
diff --git a/arch/x86/kernel/apb_timer.c b/arch/x86/kernel/apb_timer.c index 1293c709ee85..cd1ffed4ee22 100644 --- a/arch/x86/kernel/apb_timer.c +++ b/arch/x86/kernel/apb_timer.c | |||
| @@ -316,7 +316,7 @@ static void apbt_setup_irq(struct apbt_dev *adev) | |||
| 316 | irq_modify_status(adev->irq, 0, IRQ_MOVE_PCNTXT); | 316 | irq_modify_status(adev->irq, 0, IRQ_MOVE_PCNTXT); |
| 317 | irq_set_affinity(adev->irq, cpumask_of(adev->cpu)); | 317 | irq_set_affinity(adev->irq, cpumask_of(adev->cpu)); |
| 318 | /* APB timer irqs are set up as mp_irqs, timer is edge type */ | 318 | /* APB timer irqs are set up as mp_irqs, timer is edge type */ |
| 319 | __set_irq_handler(adev->irq, handle_edge_irq, 0, "edge"); | 319 | __irq_set_handler(adev->irq, handle_edge_irq, 0, "edge"); |
| 320 | 320 | ||
| 321 | if (system_state == SYSTEM_BOOTING) { | 321 | if (system_state == SYSTEM_BOOTING) { |
| 322 | if (request_irq(adev->irq, apbt_interrupt_handler, | 322 | if (request_irq(adev->irq, apbt_interrupt_handler, |
diff --git a/arch/x86/kernel/apic/hw_nmi.c b/arch/x86/kernel/apic/hw_nmi.c index c4e557a1ebb6..5260fe91bcb6 100644 --- a/arch/x86/kernel/apic/hw_nmi.c +++ b/arch/x86/kernel/apic/hw_nmi.c | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/kprobes.h> | 16 | #include <linux/kprobes.h> |
| 17 | #include <linux/nmi.h> | 17 | #include <linux/nmi.h> |
| 18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
| 19 | #include <linux/delay.h> | ||
| 19 | 20 | ||
| 20 | #ifdef CONFIG_HARDLOCKUP_DETECTOR | 21 | #ifdef CONFIG_HARDLOCKUP_DETECTOR |
| 21 | u64 hw_nmi_get_sample_period(void) | 22 | u64 hw_nmi_get_sample_period(void) |
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index 3c289281394c..33b10a0fc095 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c | |||
| @@ -23,6 +23,8 @@ | |||
| 23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
| 24 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
| 25 | #include <linux/kdebug.h> | 25 | #include <linux/kdebug.h> |
| 26 | #include <linux/delay.h> | ||
| 27 | #include <linux/crash_dump.h> | ||
| 26 | 28 | ||
| 27 | #include <asm/uv/uv_mmrs.h> | 29 | #include <asm/uv/uv_mmrs.h> |
| 28 | #include <asm/uv/uv_hub.h> | 30 | #include <asm/uv/uv_hub.h> |
| @@ -34,6 +36,7 @@ | |||
| 34 | #include <asm/ipi.h> | 36 | #include <asm/ipi.h> |
| 35 | #include <asm/smp.h> | 37 | #include <asm/smp.h> |
| 36 | #include <asm/x86_init.h> | 38 | #include <asm/x86_init.h> |
| 39 | #include <asm/emergency-restart.h> | ||
| 37 | 40 | ||
| 38 | DEFINE_PER_CPU(int, x2apic_extra_bits); | 41 | DEFINE_PER_CPU(int, x2apic_extra_bits); |
| 39 | 42 | ||
| @@ -810,4 +813,11 @@ void __init uv_system_init(void) | |||
| 810 | 813 | ||
| 811 | /* register Legacy VGA I/O redirection handler */ | 814 | /* register Legacy VGA I/O redirection handler */ |
| 812 | pci_register_set_vga_state(uv_set_vga_state); | 815 | pci_register_set_vga_state(uv_set_vga_state); |
| 816 | |||
| 817 | /* | ||
| 818 | * For a kdump kernel the reset must be BOOT_ACPI, not BOOT_EFI, as | ||
| 819 | * EFI is not enabled in the kdump kernel. | ||
| 820 | */ | ||
| 821 | if (is_kdump_kernel()) | ||
| 822 | reboot_type = BOOT_ACPI; | ||
| 813 | } | 823 | } |
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 3ecece0217ef..3532d3bf8105 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
| @@ -615,6 +615,25 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) | |||
| 615 | /* As a rule processors have APIC timer running in deep C states */ | 615 | /* As a rule processors have APIC timer running in deep C states */ |
| 616 | if (c->x86 >= 0xf && !cpu_has_amd_erratum(amd_erratum_400)) | 616 | if (c->x86 >= 0xf && !cpu_has_amd_erratum(amd_erratum_400)) |
| 617 | set_cpu_cap(c, X86_FEATURE_ARAT); | 617 | set_cpu_cap(c, X86_FEATURE_ARAT); |
| 618 | |||
| 619 | /* | ||
| 620 | * Disable GART TLB Walk Errors on Fam10h. We do this here | ||
| 621 | * because this is always needed when GART is enabled, even in a | ||
| 622 | * kernel which has no MCE support built in. | ||
| 623 | */ | ||
| 624 | if (c->x86 == 0x10) { | ||
| 625 | /* | ||
| 626 | * BIOS should disable GartTlbWlk Errors themself. If | ||
| 627 | * it doesn't do it here as suggested by the BKDG. | ||
| 628 | * | ||
| 629 | * Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=33012 | ||
| 630 | */ | ||
| 631 | u64 mask; | ||
| 632 | |||
| 633 | rdmsrl(MSR_AMD64_MCx_MASK(4), mask); | ||
| 634 | mask |= (1 << 10); | ||
| 635 | wrmsrl(MSR_AMD64_MCx_MASK(4), mask); | ||
| 636 | } | ||
| 618 | } | 637 | } |
| 619 | 638 | ||
| 620 | #ifdef CONFIG_X86_32 | 639 | #ifdef CONFIG_X86_32 |
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 5a05ef63eb4a..3385ea26f684 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c | |||
| @@ -1626,7 +1626,7 @@ out: | |||
| 1626 | static unsigned int mce_poll(struct file *file, poll_table *wait) | 1626 | static unsigned int mce_poll(struct file *file, poll_table *wait) |
| 1627 | { | 1627 | { |
| 1628 | poll_wait(file, &mce_wait, wait); | 1628 | poll_wait(file, &mce_wait, wait); |
| 1629 | if (rcu_dereference_check_mce(mcelog.next)) | 1629 | if (rcu_access_index(mcelog.next)) |
| 1630 | return POLLIN | POLLRDNORM; | 1630 | return POLLIN | POLLRDNORM; |
| 1631 | if (!mce_apei_read_done && apei_check_mce()) | 1631 | if (!mce_apei_read_done && apei_check_mce()) |
| 1632 | return POLLIN | POLLRDNORM; | 1632 | return POLLIN | POLLRDNORM; |
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index 307dfbbf4a8e..929739a653d1 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c | |||
| @@ -293,14 +293,24 @@ set_mtrr(unsigned int reg, unsigned long base, unsigned long size, mtrr_type typ | |||
| 293 | 293 | ||
| 294 | /* | 294 | /* |
| 295 | * HACK! | 295 | * HACK! |
| 296 | * We use this same function to initialize the mtrrs on boot. | 296 | * |
| 297 | * The state of the boot cpu's mtrrs has been saved, and we want | 297 | * We use this same function to initialize the mtrrs during boot, |
| 298 | * to replicate across all the APs. | 298 | * resume, runtime cpu online and on an explicit request to set a |
| 299 | * If we're doing that @reg is set to something special... | 299 | * specific MTRR. |
| 300 | * | ||
| 301 | * During boot or suspend, the state of the boot cpu's mtrrs has been | ||
| 302 | * saved, and we want to replicate that across all the cpus that come | ||
| 303 | * online (either at the end of boot or resume or during a runtime cpu | ||
| 304 | * online). If we're doing that, @reg is set to something special and on | ||
| 305 | * this cpu we still do mtrr_if->set_all(). During boot/resume, this | ||
| 306 | * is unnecessary if at this point we are still on the cpu that started | ||
| 307 | * the boot/resume sequence. But there is no guarantee that we are still | ||
| 308 | * on the same cpu. So we do mtrr_if->set_all() on this cpu aswell to be | ||
| 309 | * sure that we are in sync with everyone else. | ||
| 300 | */ | 310 | */ |
| 301 | if (reg != ~0U) | 311 | if (reg != ~0U) |
| 302 | mtrr_if->set(reg, base, size, type); | 312 | mtrr_if->set(reg, base, size, type); |
| 303 | else if (!mtrr_aps_delayed_init) | 313 | else |
| 304 | mtrr_if->set_all(); | 314 | mtrr_if->set_all(); |
| 305 | 315 | ||
| 306 | /* Wait for the others */ | 316 | /* Wait for the others */ |
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index 948a31eae75f..1cb0b9fc78dc 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | #include <linux/seq_file.h> | 8 | #include <linux/seq_file.h> |
| 9 | #include <linux/smp.h> | 9 | #include <linux/smp.h> |
| 10 | #include <linux/ftrace.h> | 10 | #include <linux/ftrace.h> |
| 11 | #include <linux/delay.h> | ||
| 11 | 12 | ||
| 12 | #include <asm/apic.h> | 13 | #include <asm/apic.h> |
| 13 | #include <asm/io_apic.h> | 14 | #include <asm/io_apic.h> |
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c index 5ed0ab549eb8..f9242800bc84 100644 --- a/arch/x86/kernel/microcode_core.c +++ b/arch/x86/kernel/microcode_core.c | |||
| @@ -550,6 +550,7 @@ static void __exit microcode_exit(void) | |||
| 550 | microcode_dev_exit(); | 550 | microcode_dev_exit(); |
| 551 | 551 | ||
| 552 | unregister_hotcpu_notifier(&mc_cpu_notifier); | 552 | unregister_hotcpu_notifier(&mc_cpu_notifier); |
| 553 | unregister_syscore_ops(&mc_syscore_ops); | ||
| 553 | 554 | ||
| 554 | get_online_cpus(); | 555 | get_online_cpus(); |
| 555 | mutex_lock(µcode_mutex); | 556 | mutex_lock(µcode_mutex); |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index d3ce37edb54d..08c44b08bf5b 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | #include <linux/dmi.h> | 6 | #include <linux/dmi.h> |
| 7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
| 8 | #include <linux/tboot.h> | 8 | #include <linux/tboot.h> |
| 9 | #include <linux/delay.h> | ||
| 9 | #include <acpi/reboot.h> | 10 | #include <acpi/reboot.h> |
| 10 | #include <asm/io.h> | 11 | #include <asm/io.h> |
| 11 | #include <asm/apic.h> | 12 | #include <asm/apic.h> |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 5a0484a95ad6..4be9b398470e 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
| @@ -976,6 +976,11 @@ void __init setup_arch(char **cmdline_p) | |||
| 976 | paging_init(); | 976 | paging_init(); |
| 977 | x86_init.paging.pagetable_setup_done(swapper_pg_dir); | 977 | x86_init.paging.pagetable_setup_done(swapper_pg_dir); |
| 978 | 978 | ||
| 979 | if (boot_cpu_data.cpuid_level >= 0) { | ||
| 980 | /* A CPU has %cr4 if and only if it has CPUID */ | ||
| 981 | mmu_cr4_features = read_cr4(); | ||
| 982 | } | ||
| 983 | |||
| 979 | #ifdef CONFIG_X86_32 | 984 | #ifdef CONFIG_X86_32 |
| 980 | /* sync back kernel address range */ | 985 | /* sync back kernel address range */ |
| 981 | clone_pgd_range(initial_page_table + KERNEL_PGD_BOUNDARY, | 986 | clone_pgd_range(initial_page_table + KERNEL_PGD_BOUNDARY, |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index c2871d3c71b6..8ed8908cc9f7 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
| @@ -312,6 +312,26 @@ void __cpuinit smp_store_cpu_info(int id) | |||
| 312 | identify_secondary_cpu(c); | 312 | identify_secondary_cpu(c); |
| 313 | } | 313 | } |
| 314 | 314 | ||
| 315 | static void __cpuinit check_cpu_siblings_on_same_node(int cpu1, int cpu2) | ||
| 316 | { | ||
| 317 | int node1 = early_cpu_to_node(cpu1); | ||
| 318 | int node2 = early_cpu_to_node(cpu2); | ||
| 319 | |||
| 320 | /* | ||
| 321 | * Our CPU scheduler assumes all logical cpus in the same physical cpu | ||
| 322 | * share the same node. But, buggy ACPI or NUMA emulation might assign | ||
| 323 | * them to different node. Fix it. | ||
| 324 | */ | ||
| 325 | if (node1 != node2) { | ||
| 326 | pr_warning("CPU %d in node %d and CPU %d in node %d are in the same physical CPU. forcing same node %d\n", | ||
| 327 | cpu1, node1, cpu2, node2, node2); | ||
| 328 | |||
| 329 | numa_remove_cpu(cpu1); | ||
| 330 | numa_set_node(cpu1, node2); | ||
| 331 | numa_add_cpu(cpu1); | ||
| 332 | } | ||
| 333 | } | ||
| 334 | |||
| 315 | static void __cpuinit link_thread_siblings(int cpu1, int cpu2) | 335 | static void __cpuinit link_thread_siblings(int cpu1, int cpu2) |
| 316 | { | 336 | { |
| 317 | cpumask_set_cpu(cpu1, cpu_sibling_mask(cpu2)); | 337 | cpumask_set_cpu(cpu1, cpu_sibling_mask(cpu2)); |
| @@ -320,6 +340,7 @@ static void __cpuinit link_thread_siblings(int cpu1, int cpu2) | |||
| 320 | cpumask_set_cpu(cpu2, cpu_core_mask(cpu1)); | 340 | cpumask_set_cpu(cpu2, cpu_core_mask(cpu1)); |
| 321 | cpumask_set_cpu(cpu1, cpu_llc_shared_mask(cpu2)); | 341 | cpumask_set_cpu(cpu1, cpu_llc_shared_mask(cpu2)); |
| 322 | cpumask_set_cpu(cpu2, cpu_llc_shared_mask(cpu1)); | 342 | cpumask_set_cpu(cpu2, cpu_llc_shared_mask(cpu1)); |
| 343 | check_cpu_siblings_on_same_node(cpu1, cpu2); | ||
| 323 | } | 344 | } |
| 324 | 345 | ||
| 325 | 346 | ||
| @@ -361,10 +382,12 @@ void __cpuinit set_cpu_sibling_map(int cpu) | |||
| 361 | per_cpu(cpu_llc_id, cpu) == per_cpu(cpu_llc_id, i)) { | 382 | per_cpu(cpu_llc_id, cpu) == per_cpu(cpu_llc_id, i)) { |
| 362 | cpumask_set_cpu(i, cpu_llc_shared_mask(cpu)); | 383 | cpumask_set_cpu(i, cpu_llc_shared_mask(cpu)); |
| 363 | cpumask_set_cpu(cpu, cpu_llc_shared_mask(i)); | 384 | cpumask_set_cpu(cpu, cpu_llc_shared_mask(i)); |
| 385 | check_cpu_siblings_on_same_node(cpu, i); | ||
| 364 | } | 386 | } |
| 365 | if (c->phys_proc_id == cpu_data(i).phys_proc_id) { | 387 | if (c->phys_proc_id == cpu_data(i).phys_proc_id) { |
| 366 | cpumask_set_cpu(i, cpu_core_mask(cpu)); | 388 | cpumask_set_cpu(i, cpu_core_mask(cpu)); |
| 367 | cpumask_set_cpu(cpu, cpu_core_mask(i)); | 389 | cpumask_set_cpu(cpu, cpu_core_mask(i)); |
| 390 | check_cpu_siblings_on_same_node(cpu, i); | ||
| 368 | /* | 391 | /* |
| 369 | * Does this new cpu bringup a new core? | 392 | * Does this new cpu bringup a new core? |
| 370 | */ | 393 | */ |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 58f517b59645..934b4c6b0bf9 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
| @@ -2395,9 +2395,9 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function, | |||
| 2395 | int i; | 2395 | int i; |
| 2396 | 2396 | ||
| 2397 | entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX; | 2397 | entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX; |
| 2398 | for (i = 1; *nent < maxnent; ++i) { | 2398 | for (i = 1; *nent < maxnent && i < 64; ++i) { |
| 2399 | if (entry[i - 1].eax == 0 && i != 2) | 2399 | if (entry[i].eax == 0) |
| 2400 | break; | 2400 | continue; |
| 2401 | do_cpuid_1_ent(&entry[i], function, i); | 2401 | do_cpuid_1_ent(&entry[i], function, i); |
| 2402 | entry[i].flags |= | 2402 | entry[i].flags |= |
| 2403 | KVM_CPUID_FLAG_SIGNIFCANT_INDEX; | 2403 | KVM_CPUID_FLAG_SIGNIFCANT_INDEX; |
| @@ -4958,12 +4958,6 @@ struct kvm_cpuid_entry2 *kvm_find_cpuid_entry(struct kvm_vcpu *vcpu, | |||
| 4958 | best = e; | 4958 | best = e; |
| 4959 | break; | 4959 | break; |
| 4960 | } | 4960 | } |
| 4961 | /* | ||
| 4962 | * Both basic or both extended? | ||
| 4963 | */ | ||
| 4964 | if (((e->function ^ function) & 0x80000000) == 0) | ||
| 4965 | if (!best || e->function > best->function) | ||
| 4966 | best = e; | ||
| 4967 | } | 4961 | } |
| 4968 | return best; | 4962 | return best; |
| 4969 | } | 4963 | } |
| @@ -4983,6 +4977,27 @@ not_found: | |||
| 4983 | return 36; | 4977 | return 36; |
| 4984 | } | 4978 | } |
| 4985 | 4979 | ||
| 4980 | /* | ||
| 4981 | * If no match is found, check whether we exceed the vCPU's limit | ||
| 4982 | * and return the content of the highest valid _standard_ leaf instead. | ||
| 4983 | * This is to satisfy the CPUID specification. | ||
| 4984 | */ | ||
| 4985 | static struct kvm_cpuid_entry2* check_cpuid_limit(struct kvm_vcpu *vcpu, | ||
| 4986 | u32 function, u32 index) | ||
| 4987 | { | ||
| 4988 | struct kvm_cpuid_entry2 *maxlevel; | ||
| 4989 | |||
| 4990 | maxlevel = kvm_find_cpuid_entry(vcpu, function & 0x80000000, 0); | ||
| 4991 | if (!maxlevel || maxlevel->eax >= function) | ||
| 4992 | return NULL; | ||
| 4993 | if (function & 0x80000000) { | ||
| 4994 | maxlevel = kvm_find_cpuid_entry(vcpu, 0, 0); | ||
| 4995 | if (!maxlevel) | ||
| 4996 | return NULL; | ||
| 4997 | } | ||
| 4998 | return kvm_find_cpuid_entry(vcpu, maxlevel->eax, index); | ||
| 4999 | } | ||
| 5000 | |||
| 4986 | void kvm_emulate_cpuid(struct kvm_vcpu *vcpu) | 5001 | void kvm_emulate_cpuid(struct kvm_vcpu *vcpu) |
| 4987 | { | 5002 | { |
| 4988 | u32 function, index; | 5003 | u32 function, index; |
| @@ -4995,6 +5010,10 @@ void kvm_emulate_cpuid(struct kvm_vcpu *vcpu) | |||
| 4995 | kvm_register_write(vcpu, VCPU_REGS_RCX, 0); | 5010 | kvm_register_write(vcpu, VCPU_REGS_RCX, 0); |
| 4996 | kvm_register_write(vcpu, VCPU_REGS_RDX, 0); | 5011 | kvm_register_write(vcpu, VCPU_REGS_RDX, 0); |
| 4997 | best = kvm_find_cpuid_entry(vcpu, function, index); | 5012 | best = kvm_find_cpuid_entry(vcpu, function, index); |
| 5013 | |||
| 5014 | if (!best) | ||
| 5015 | best = check_cpuid_limit(vcpu, function, index); | ||
| 5016 | |||
| 4998 | if (best) { | 5017 | if (best) { |
| 4999 | kvm_register_write(vcpu, VCPU_REGS_RAX, best->eax); | 5018 | kvm_register_write(vcpu, VCPU_REGS_RAX, best->eax); |
| 5000 | kvm_register_write(vcpu, VCPU_REGS_RBX, best->ebx); | 5019 | kvm_register_write(vcpu, VCPU_REGS_RBX, best->ebx); |
diff --git a/arch/x86/mm/srat_32.c b/arch/x86/mm/srat_32.c index 48651c6f657d..364f36bdfad8 100644 --- a/arch/x86/mm/srat_32.c +++ b/arch/x86/mm/srat_32.c | |||
| @@ -211,10 +211,12 @@ int __init get_memcfg_from_srat(void) | |||
| 211 | { | 211 | { |
| 212 | int i, j, nid; | 212 | int i, j, nid; |
| 213 | 213 | ||
| 214 | |||
| 215 | if (srat_disabled()) | 214 | if (srat_disabled()) |
| 216 | goto out_fail; | 215 | goto out_fail; |
| 217 | 216 | ||
| 217 | if (acpi_numa_init() < 0) | ||
| 218 | goto out_fail; | ||
| 219 | |||
| 218 | if (num_memory_chunks == 0) { | 220 | if (num_memory_chunks == 0) { |
| 219 | printk(KERN_DEBUG | 221 | printk(KERN_DEBUG |
| 220 | "could not find any ACPI SRAT memory areas.\n"); | 222 | "could not find any ACPI SRAT memory areas.\n"); |
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index 8dace181c88e..cf9750004a08 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c | |||
| @@ -49,6 +49,10 @@ u64 op_x86_get_ctrl(struct op_x86_model_spec const *model, | |||
| 49 | val |= counter_config->user ? ARCH_PERFMON_EVENTSEL_USR : 0; | 49 | val |= counter_config->user ? ARCH_PERFMON_EVENTSEL_USR : 0; |
| 50 | val |= counter_config->kernel ? ARCH_PERFMON_EVENTSEL_OS : 0; | 50 | val |= counter_config->kernel ? ARCH_PERFMON_EVENTSEL_OS : 0; |
| 51 | val |= (counter_config->unit_mask & 0xFF) << 8; | 51 | val |= (counter_config->unit_mask & 0xFF) << 8; |
| 52 | counter_config->extra &= (ARCH_PERFMON_EVENTSEL_INV | | ||
| 53 | ARCH_PERFMON_EVENTSEL_EDGE | | ||
| 54 | ARCH_PERFMON_EVENTSEL_CMASK); | ||
| 55 | val |= counter_config->extra; | ||
| 52 | event &= model->event_mask ? model->event_mask : 0xFF; | 56 | event &= model->event_mask ? model->event_mask : 0xFF; |
| 53 | val |= event & 0xFF; | 57 | val |= event & 0xFF; |
| 54 | val |= (event & 0x0F00) << 24; | 58 | val |= (event & 0x0F00) << 24; |
| @@ -440,6 +444,7 @@ static int nmi_create_files(struct super_block *sb, struct dentry *root) | |||
| 440 | oprofilefs_create_ulong(sb, dir, "unit_mask", &counter_config[i].unit_mask); | 444 | oprofilefs_create_ulong(sb, dir, "unit_mask", &counter_config[i].unit_mask); |
| 441 | oprofilefs_create_ulong(sb, dir, "kernel", &counter_config[i].kernel); | 445 | oprofilefs_create_ulong(sb, dir, "kernel", &counter_config[i].kernel); |
| 442 | oprofilefs_create_ulong(sb, dir, "user", &counter_config[i].user); | 446 | oprofilefs_create_ulong(sb, dir, "user", &counter_config[i].user); |
| 447 | oprofilefs_create_ulong(sb, dir, "extra", &counter_config[i].extra); | ||
| 443 | } | 448 | } |
| 444 | 449 | ||
| 445 | return 0; | 450 | return 0; |
diff --git a/arch/x86/oprofile/op_counter.h b/arch/x86/oprofile/op_counter.h index e28398df0df2..0b7b7b179cbe 100644 --- a/arch/x86/oprofile/op_counter.h +++ b/arch/x86/oprofile/op_counter.h | |||
| @@ -22,6 +22,7 @@ struct op_counter_config { | |||
| 22 | unsigned long kernel; | 22 | unsigned long kernel; |
| 23 | unsigned long user; | 23 | unsigned long user; |
| 24 | unsigned long unit_mask; | 24 | unsigned long unit_mask; |
| 25 | unsigned long extra; | ||
| 25 | }; | 26 | }; |
| 26 | 27 | ||
| 27 | extern struct op_counter_config counter_config[]; | 28 | extern struct op_counter_config counter_config[]; |
diff --git a/arch/x86/platform/ce4100/falconfalls.dts b/arch/x86/platform/ce4100/falconfalls.dts index dc701ea58546..2d6d226f2b10 100644 --- a/arch/x86/platform/ce4100/falconfalls.dts +++ b/arch/x86/platform/ce4100/falconfalls.dts | |||
| @@ -74,6 +74,7 @@ | |||
| 74 | compatible = "intel,ce4100-pci", "pci"; | 74 | compatible = "intel,ce4100-pci", "pci"; |
| 75 | device_type = "pci"; | 75 | device_type = "pci"; |
| 76 | bus-range = <1 1>; | 76 | bus-range = <1 1>; |
| 77 | reg = <0x0800 0x0 0x0 0x0 0x0>; | ||
| 77 | ranges = <0x2000000 0 0xdffe0000 0x2000000 0 0xdffe0000 0 0x1000>; | 78 | ranges = <0x2000000 0 0xdffe0000 0x2000000 0 0xdffe0000 0 0x1000>; |
| 78 | 79 | ||
| 79 | interrupt-parent = <&ioapic2>; | 80 | interrupt-parent = <&ioapic2>; |
| @@ -412,6 +413,7 @@ | |||
| 412 | #address-cells = <2>; | 413 | #address-cells = <2>; |
| 413 | #size-cells = <1>; | 414 | #size-cells = <1>; |
| 414 | compatible = "isa"; | 415 | compatible = "isa"; |
| 416 | reg = <0xf800 0x0 0x0 0x0 0x0>; | ||
| 415 | ranges = <1 0 0 0 0 0x100>; | 417 | ranges = <1 0 0 0 0 0x100>; |
| 416 | 418 | ||
| 417 | rtc@70 { | 419 | rtc@70 { |
diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c index 5c0207bf959b..275dbc19e2cf 100644 --- a/arch/x86/platform/mrst/mrst.c +++ b/arch/x86/platform/mrst/mrst.c | |||
| @@ -97,11 +97,11 @@ static int __init sfi_parse_mtmr(struct sfi_table_header *table) | |||
| 97 | pentry->freq_hz, pentry->irq); | 97 | pentry->freq_hz, pentry->irq); |
| 98 | if (!pentry->irq) | 98 | if (!pentry->irq) |
| 99 | continue; | 99 | continue; |
| 100 | mp_irq.type = MP_IOAPIC; | 100 | mp_irq.type = MP_INTSRC; |
| 101 | mp_irq.irqtype = mp_INT; | 101 | mp_irq.irqtype = mp_INT; |
| 102 | /* triggering mode edge bit 2-3, active high polarity bit 0-1 */ | 102 | /* triggering mode edge bit 2-3, active high polarity bit 0-1 */ |
| 103 | mp_irq.irqflag = 5; | 103 | mp_irq.irqflag = 5; |
| 104 | mp_irq.srcbus = 0; | 104 | mp_irq.srcbus = MP_BUS_ISA; |
| 105 | mp_irq.srcbusirq = pentry->irq; /* IRQ */ | 105 | mp_irq.srcbusirq = pentry->irq; /* IRQ */ |
| 106 | mp_irq.dstapic = MP_APIC_ALL; | 106 | mp_irq.dstapic = MP_APIC_ALL; |
| 107 | mp_irq.dstirq = pentry->irq; | 107 | mp_irq.dstirq = pentry->irq; |
| @@ -168,10 +168,10 @@ int __init sfi_parse_mrtc(struct sfi_table_header *table) | |||
| 168 | for (totallen = 0; totallen < sfi_mrtc_num; totallen++, pentry++) { | 168 | for (totallen = 0; totallen < sfi_mrtc_num; totallen++, pentry++) { |
| 169 | pr_debug("RTC[%d]: paddr = 0x%08x, irq = %d\n", | 169 | pr_debug("RTC[%d]: paddr = 0x%08x, irq = %d\n", |
| 170 | totallen, (u32)pentry->phys_addr, pentry->irq); | 170 | totallen, (u32)pentry->phys_addr, pentry->irq); |
| 171 | mp_irq.type = MP_IOAPIC; | 171 | mp_irq.type = MP_INTSRC; |
| 172 | mp_irq.irqtype = mp_INT; | 172 | mp_irq.irqtype = mp_INT; |
| 173 | mp_irq.irqflag = 0xf; /* level trigger and active low */ | 173 | mp_irq.irqflag = 0xf; /* level trigger and active low */ |
| 174 | mp_irq.srcbus = 0; | 174 | mp_irq.srcbus = MP_BUS_ISA; |
| 175 | mp_irq.srcbusirq = pentry->irq; /* IRQ */ | 175 | mp_irq.srcbusirq = pentry->irq; /* IRQ */ |
| 176 | mp_irq.dstapic = MP_APIC_ALL; | 176 | mp_irq.dstapic = MP_APIC_ALL; |
| 177 | mp_irq.dstirq = pentry->irq; | 177 | mp_irq.dstirq = pentry->irq; |
| @@ -282,7 +282,7 @@ void __init x86_mrst_early_setup(void) | |||
| 282 | /* Avoid searching for BIOS MP tables */ | 282 | /* Avoid searching for BIOS MP tables */ |
| 283 | x86_init.mpparse.find_smp_config = x86_init_noop; | 283 | x86_init.mpparse.find_smp_config = x86_init_noop; |
| 284 | x86_init.mpparse.get_smp_config = x86_init_uint_noop; | 284 | x86_init.mpparse.get_smp_config = x86_init_uint_noop; |
| 285 | 285 | set_bit(MP_BUS_ISA, mp_bus_not_pci); | |
| 286 | } | 286 | } |
| 287 | 287 | ||
| 288 | /* | 288 | /* |
diff --git a/arch/x86/platform/mrst/vrtc.c b/arch/x86/platform/mrst/vrtc.c index 04cf645feb92..73d70d65e76e 100644 --- a/arch/x86/platform/mrst/vrtc.c +++ b/arch/x86/platform/mrst/vrtc.c | |||
| @@ -100,9 +100,11 @@ int vrtc_set_mmss(unsigned long nowtime) | |||
| 100 | 100 | ||
| 101 | void __init mrst_rtc_init(void) | 101 | void __init mrst_rtc_init(void) |
| 102 | { | 102 | { |
| 103 | unsigned long vrtc_paddr = sfi_mrtc_array[0].phys_addr; | 103 | unsigned long vrtc_paddr; |
| 104 | 104 | ||
| 105 | sfi_table_parse(SFI_SIG_MRTC, NULL, NULL, sfi_parse_mrtc); | 105 | sfi_table_parse(SFI_SIG_MRTC, NULL, NULL, sfi_parse_mrtc); |
| 106 | |||
| 107 | vrtc_paddr = sfi_mrtc_array[0].phys_addr; | ||
| 106 | if (!sfi_mrtc_num || !vrtc_paddr) | 108 | if (!sfi_mrtc_num || !vrtc_paddr) |
| 107 | return; | 109 | return; |
| 108 | 110 | ||
diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c index a7b38d35c29a..7cb6424317f6 100644 --- a/arch/x86/platform/uv/tlb_uv.c +++ b/arch/x86/platform/uv/tlb_uv.c | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #include <linux/debugfs.h> | 11 | #include <linux/debugfs.h> |
| 12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
| 13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
| 14 | #include <linux/delay.h> | ||
| 14 | 15 | ||
| 15 | #include <asm/mmu_context.h> | 16 | #include <asm/mmu_context.h> |
| 16 | #include <asm/uv/uv.h> | 17 | #include <asm/uv/uv.h> |
diff --git a/arch/x86/platform/visws/visws_quirks.c b/arch/x86/platform/visws/visws_quirks.c index fe4cf8294878..c7abf13a213f 100644 --- a/arch/x86/platform/visws/visws_quirks.c +++ b/arch/x86/platform/visws/visws_quirks.c | |||
| @@ -471,15 +471,7 @@ static unsigned int startup_piix4_master_irq(struct irq_data *data) | |||
| 471 | { | 471 | { |
| 472 | legacy_pic->init(0); | 472 | legacy_pic->init(0); |
| 473 | enable_cobalt_irq(data); | 473 | enable_cobalt_irq(data); |
| 474 | } | 474 | return 0; |
| 475 | |||
| 476 | static void end_piix4_master_irq(struct irq_data *data) | ||
| 477 | { | ||
| 478 | unsigned long flags; | ||
| 479 | |||
| 480 | spin_lock_irqsave(&cobalt_lock, flags); | ||
| 481 | enable_cobalt_irq(data); | ||
| 482 | spin_unlock_irqrestore(&cobalt_lock, flags); | ||
| 483 | } | 475 | } |
| 484 | 476 | ||
| 485 | static struct irq_chip piix4_master_irq_type = { | 477 | static struct irq_chip piix4_master_irq_type = { |
| @@ -492,7 +484,7 @@ static void pii4_mask(struct irq_data *data) { } | |||
| 492 | 484 | ||
| 493 | static struct irq_chip piix4_virtual_irq_type = { | 485 | static struct irq_chip piix4_virtual_irq_type = { |
| 494 | .name = "PIIX4-virtual", | 486 | .name = "PIIX4-virtual", |
| 495 | .mask = pii4_mask, | 487 | .irq_mask = pii4_mask, |
| 496 | }; | 488 | }; |
| 497 | 489 | ||
| 498 | /* | 490 | /* |
| @@ -580,9 +572,9 @@ static struct irqaction cascade_action = { | |||
| 580 | 572 | ||
| 581 | static inline void set_piix4_virtual_irq_type(void) | 573 | static inline void set_piix4_virtual_irq_type(void) |
| 582 | { | 574 | { |
| 583 | piix4_virtual_irq_type.enable = i8259A_chip.unmask; | 575 | piix4_virtual_irq_type.irq_enable = i8259A_chip.irq_unmask; |
| 584 | piix4_virtual_irq_type.disable = i8259A_chip.mask; | 576 | piix4_virtual_irq_type.irq_disable = i8259A_chip.irq_mask; |
| 585 | piix4_virtual_irq_type.unmask = i8259A_chip.unmask; | 577 | piix4_virtual_irq_type.irq_unmask = i8259A_chip.irq_unmask; |
| 586 | } | 578 | } |
| 587 | 579 | ||
| 588 | static void __init visws_pre_intr_init(void) | 580 | static void __init visws_pre_intr_init(void) |
| @@ -599,7 +591,7 @@ static void __init visws_pre_intr_init(void) | |||
| 599 | else if (i == CO_IRQ_IDE0) | 591 | else if (i == CO_IRQ_IDE0) |
| 600 | chip = &cobalt_irq_type; | 592 | chip = &cobalt_irq_type; |
| 601 | else if (i == CO_IRQ_IDE1) | 593 | else if (i == CO_IRQ_IDE1) |
| 602 | >chip = &cobalt_irq_type; | 594 | chip = &cobalt_irq_type; |
| 603 | else if (i == CO_IRQ_8259) | 595 | else if (i == CO_IRQ_8259) |
| 604 | chip = &piix4_master_irq_type; | 596 | chip = &piix4_master_irq_type; |
| 605 | else if (i < CO_IRQ_APIC0) | 597 | else if (i < CO_IRQ_APIC0) |
diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig index 1c7121ba18ff..5cc821cb2e09 100644 --- a/arch/x86/xen/Kconfig +++ b/arch/x86/xen/Kconfig | |||
| @@ -39,6 +39,7 @@ config XEN_MAX_DOMAIN_MEMORY | |||
| 39 | config XEN_SAVE_RESTORE | 39 | config XEN_SAVE_RESTORE |
| 40 | bool | 40 | bool |
| 41 | depends on XEN | 41 | depends on XEN |
| 42 | select HIBERNATE_CALLBACKS | ||
| 42 | default y | 43 | default y |
| 43 | 44 | ||
| 44 | config XEN_DEBUG_FS | 45 | config XEN_DEBUG_FS |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 49dbd78ec3cb..e3c6a06cf725 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
| @@ -238,6 +238,7 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx, | |||
| 238 | static __init void xen_init_cpuid_mask(void) | 238 | static __init void xen_init_cpuid_mask(void) |
| 239 | { | 239 | { |
| 240 | unsigned int ax, bx, cx, dx; | 240 | unsigned int ax, bx, cx, dx; |
| 241 | unsigned int xsave_mask; | ||
| 241 | 242 | ||
| 242 | cpuid_leaf1_edx_mask = | 243 | cpuid_leaf1_edx_mask = |
| 243 | ~((1 << X86_FEATURE_MCE) | /* disable MCE */ | 244 | ~((1 << X86_FEATURE_MCE) | /* disable MCE */ |
| @@ -249,24 +250,16 @@ static __init void xen_init_cpuid_mask(void) | |||
| 249 | cpuid_leaf1_edx_mask &= | 250 | cpuid_leaf1_edx_mask &= |
| 250 | ~((1 << X86_FEATURE_APIC) | /* disable local APIC */ | 251 | ~((1 << X86_FEATURE_APIC) | /* disable local APIC */ |
| 251 | (1 << X86_FEATURE_ACPI)); /* disable ACPI */ | 252 | (1 << X86_FEATURE_ACPI)); /* disable ACPI */ |
| 252 | |||
| 253 | ax = 1; | 253 | ax = 1; |
| 254 | cx = 0; | ||
| 255 | xen_cpuid(&ax, &bx, &cx, &dx); | 254 | xen_cpuid(&ax, &bx, &cx, &dx); |
| 256 | 255 | ||
| 257 | /* cpuid claims we support xsave; try enabling it to see what happens */ | 256 | xsave_mask = |
| 258 | if (cx & (1 << (X86_FEATURE_XSAVE % 32))) { | 257 | (1 << (X86_FEATURE_XSAVE % 32)) | |
| 259 | unsigned long cr4; | 258 | (1 << (X86_FEATURE_OSXSAVE % 32)); |
| 260 | |||
| 261 | set_in_cr4(X86_CR4_OSXSAVE); | ||
| 262 | |||
| 263 | cr4 = read_cr4(); | ||
| 264 | 259 | ||
| 265 | if ((cr4 & X86_CR4_OSXSAVE) == 0) | 260 | /* Xen will set CR4.OSXSAVE if supported and not disabled by force */ |
| 266 | cpuid_leaf1_ecx_mask &= ~(1 << (X86_FEATURE_XSAVE % 32)); | 261 | if ((cx & xsave_mask) != xsave_mask) |
| 267 | 262 | cpuid_leaf1_ecx_mask &= ~xsave_mask; /* disable XSAVE & OSXSAVE */ | |
| 268 | clear_in_cr4(X86_CR4_OSXSAVE); | ||
| 269 | } | ||
| 270 | } | 263 | } |
| 271 | 264 | ||
| 272 | static void xen_set_debugreg(int reg, unsigned long val) | 265 | static void xen_set_debugreg(int reg, unsigned long val) |
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index c82df6c9c0f0..a991b57f91fe 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
| @@ -565,13 +565,13 @@ pte_t xen_make_pte_debug(pteval_t pte) | |||
| 565 | if (io_page && | 565 | if (io_page && |
| 566 | (xen_initial_domain() || addr >= ISA_END_ADDRESS)) { | 566 | (xen_initial_domain() || addr >= ISA_END_ADDRESS)) { |
| 567 | other_addr = pfn_to_mfn(addr >> PAGE_SHIFT) << PAGE_SHIFT; | 567 | other_addr = pfn_to_mfn(addr >> PAGE_SHIFT) << PAGE_SHIFT; |
| 568 | WARN(addr != other_addr, | 568 | WARN_ONCE(addr != other_addr, |
| 569 | "0x%lx is using VM_IO, but it is 0x%lx!\n", | 569 | "0x%lx is using VM_IO, but it is 0x%lx!\n", |
| 570 | (unsigned long)addr, (unsigned long)other_addr); | 570 | (unsigned long)addr, (unsigned long)other_addr); |
| 571 | } else { | 571 | } else { |
| 572 | pteval_t iomap_set = (_pte.pte & PTE_FLAGS_MASK) & _PAGE_IOMAP; | 572 | pteval_t iomap_set = (_pte.pte & PTE_FLAGS_MASK) & _PAGE_IOMAP; |
| 573 | other_addr = (_pte.pte & PTE_PFN_MASK); | 573 | other_addr = (_pte.pte & PTE_PFN_MASK); |
| 574 | WARN((addr == other_addr) && (!io_page) && (!iomap_set), | 574 | WARN_ONCE((addr == other_addr) && (!io_page) && (!iomap_set), |
| 575 | "0x%lx is missing VM_IO (and wasn't fixed)!\n", | 575 | "0x%lx is missing VM_IO (and wasn't fixed)!\n", |
| 576 | (unsigned long)addr); | 576 | (unsigned long)addr); |
| 577 | } | 577 | } |
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 1d730b5579a0..7c275f5d0df0 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig | |||
| @@ -9,7 +9,6 @@ config XTENSA | |||
| 9 | select HAVE_IDE | 9 | select HAVE_IDE |
| 10 | select HAVE_GENERIC_HARDIRQS | 10 | select HAVE_GENERIC_HARDIRQS |
| 11 | select GENERIC_IRQ_SHOW | 11 | select GENERIC_IRQ_SHOW |
| 12 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
| 13 | help | 12 | help |
| 14 | Xtensa processors are 32-bit RISC machines designed by Tensilica | 13 | Xtensa processors are 32-bit RISC machines designed by Tensilica |
| 15 | primarily for embedded systems. These processors are both | 14 | primarily for embedded systems. These processors are both |
diff --git a/arch/xtensa/include/asm/dma.h b/arch/xtensa/include/asm/dma.h index 137ca3945b07..bb099a373b5a 100644 --- a/arch/xtensa/include/asm/dma.h +++ b/arch/xtensa/include/asm/dma.h | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | * the size of the statically mapped kernel segment | 37 | * the size of the statically mapped kernel segment |
| 38 | * (XCHAL_KSEG_{CACHED,BYPASS}_SIZE), ie. 128 MB. | 38 | * (XCHAL_KSEG_{CACHED,BYPASS}_SIZE), ie. 128 MB. |
| 39 | * | 39 | * |
| 40 | * NOTE: When the entire KSEG area is DMA capable, we substract | 40 | * NOTE: When the entire KSEG area is DMA capable, we subtract |
| 41 | * one from the max address so that the virt_to_phys() macro | 41 | * one from the max address so that the virt_to_phys() macro |
| 42 | * works correctly on the address (otherwise the address | 42 | * works correctly on the address (otherwise the address |
| 43 | * enters another area, and virt_to_phys() may not return | 43 | * enters another area, and virt_to_phys() may not return |
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S index 5fd01f6aaf37..6223f3346b5c 100644 --- a/arch/xtensa/kernel/entry.S +++ b/arch/xtensa/kernel/entry.S | |||
| @@ -1026,7 +1026,7 @@ ENTRY(fast_syscall_unrecoverable) | |||
| 1026 | * TRY adds an entry to the __ex_table fixup table for the immediately | 1026 | * TRY adds an entry to the __ex_table fixup table for the immediately |
| 1027 | * following instruction. | 1027 | * following instruction. |
| 1028 | * | 1028 | * |
| 1029 | * CATCH catches any exception that occurred at one of the preceeding TRY | 1029 | * CATCH catches any exception that occurred at one of the preceding TRY |
| 1030 | * statements and continues from there | 1030 | * statements and continues from there |
| 1031 | * | 1031 | * |
| 1032 | * Usage TRY l32i a0, a1, 0 | 1032 | * Usage TRY l32i a0, a1, 0 |
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 2bef5705ce24..f0605ab2a761 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
| @@ -868,7 +868,7 @@ static void blkio_update_policy_rule(struct blkio_policy_node *oldpn, | |||
| 868 | } | 868 | } |
| 869 | 869 | ||
| 870 | /* | 870 | /* |
| 871 | * Some rules/values in blkg have changed. Propogate those to respective | 871 | * Some rules/values in blkg have changed. Propagate those to respective |
| 872 | * policies. | 872 | * policies. |
| 873 | */ | 873 | */ |
| 874 | static void blkio_update_blkg_policy(struct blkio_cgroup *blkcg, | 874 | static void blkio_update_blkg_policy(struct blkio_cgroup *blkcg, |
| @@ -903,7 +903,7 @@ static void blkio_update_blkg_policy(struct blkio_cgroup *blkcg, | |||
| 903 | } | 903 | } |
| 904 | 904 | ||
| 905 | /* | 905 | /* |
| 906 | * A policy node rule has been updated. Propogate this update to all the | 906 | * A policy node rule has been updated. Propagate this update to all the |
| 907 | * block groups which might be affected by this update. | 907 | * block groups which might be affected by this update. |
| 908 | */ | 908 | */ |
| 909 | static void blkio_update_policy_node_blkg(struct blkio_cgroup *blkcg, | 909 | static void blkio_update_policy_node_blkg(struct blkio_cgroup *blkcg, |
diff --git a/block/blk-core.c b/block/blk-core.c index e0a062363937..5fa3dd2705c6 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
| @@ -198,26 +198,13 @@ void blk_dump_rq_flags(struct request *rq, char *msg) | |||
| 198 | } | 198 | } |
| 199 | EXPORT_SYMBOL(blk_dump_rq_flags); | 199 | EXPORT_SYMBOL(blk_dump_rq_flags); |
| 200 | 200 | ||
| 201 | /* | ||
| 202 | * Make sure that plugs that were pending when this function was entered, | ||
| 203 | * are now complete and requests pushed to the queue. | ||
| 204 | */ | ||
| 205 | static inline void queue_sync_plugs(struct request_queue *q) | ||
| 206 | { | ||
| 207 | /* | ||
| 208 | * If the current process is plugged and has barriers submitted, | ||
| 209 | * we will livelock if we don't unplug first. | ||
| 210 | */ | ||
| 211 | blk_flush_plug(current); | ||
| 212 | } | ||
| 213 | |||
| 214 | static void blk_delay_work(struct work_struct *work) | 201 | static void blk_delay_work(struct work_struct *work) |
| 215 | { | 202 | { |
| 216 | struct request_queue *q; | 203 | struct request_queue *q; |
| 217 | 204 | ||
| 218 | q = container_of(work, struct request_queue, delay_work.work); | 205 | q = container_of(work, struct request_queue, delay_work.work); |
| 219 | spin_lock_irq(q->queue_lock); | 206 | spin_lock_irq(q->queue_lock); |
| 220 | __blk_run_queue(q, false); | 207 | __blk_run_queue(q); |
| 221 | spin_unlock_irq(q->queue_lock); | 208 | spin_unlock_irq(q->queue_lock); |
| 222 | } | 209 | } |
| 223 | 210 | ||
| @@ -233,7 +220,8 @@ static void blk_delay_work(struct work_struct *work) | |||
| 233 | */ | 220 | */ |
| 234 | void blk_delay_queue(struct request_queue *q, unsigned long msecs) | 221 | void blk_delay_queue(struct request_queue *q, unsigned long msecs) |
| 235 | { | 222 | { |
| 236 | schedule_delayed_work(&q->delay_work, msecs_to_jiffies(msecs)); | 223 | queue_delayed_work(kblockd_workqueue, &q->delay_work, |
| 224 | msecs_to_jiffies(msecs)); | ||
| 237 | } | 225 | } |
| 238 | EXPORT_SYMBOL(blk_delay_queue); | 226 | EXPORT_SYMBOL(blk_delay_queue); |
| 239 | 227 | ||
| @@ -251,7 +239,7 @@ void blk_start_queue(struct request_queue *q) | |||
| 251 | WARN_ON(!irqs_disabled()); | 239 | WARN_ON(!irqs_disabled()); |
| 252 | 240 | ||
| 253 | queue_flag_clear(QUEUE_FLAG_STOPPED, q); | 241 | queue_flag_clear(QUEUE_FLAG_STOPPED, q); |
| 254 | __blk_run_queue(q, false); | 242 | __blk_run_queue(q); |
| 255 | } | 243 | } |
| 256 | EXPORT_SYMBOL(blk_start_queue); | 244 | EXPORT_SYMBOL(blk_start_queue); |
| 257 | 245 | ||
| @@ -298,7 +286,6 @@ void blk_sync_queue(struct request_queue *q) | |||
| 298 | { | 286 | { |
| 299 | del_timer_sync(&q->timeout); | 287 | del_timer_sync(&q->timeout); |
| 300 | cancel_delayed_work_sync(&q->delay_work); | 288 | cancel_delayed_work_sync(&q->delay_work); |
| 301 | queue_sync_plugs(q); | ||
| 302 | } | 289 | } |
| 303 | EXPORT_SYMBOL(blk_sync_queue); | 290 | EXPORT_SYMBOL(blk_sync_queue); |
| 304 | 291 | ||
| @@ -310,9 +297,8 @@ EXPORT_SYMBOL(blk_sync_queue); | |||
| 310 | * Description: | 297 | * Description: |
| 311 | * See @blk_run_queue. This variant must be called with the queue lock | 298 | * See @blk_run_queue. This variant must be called with the queue lock |
| 312 | * held and interrupts disabled. | 299 | * held and interrupts disabled. |
| 313 | * | ||
| 314 | */ | 300 | */ |
| 315 | void __blk_run_queue(struct request_queue *q, bool force_kblockd) | 301 | void __blk_run_queue(struct request_queue *q) |
| 316 | { | 302 | { |
| 317 | if (unlikely(blk_queue_stopped(q))) | 303 | if (unlikely(blk_queue_stopped(q))) |
| 318 | return; | 304 | return; |
| @@ -321,7 +307,7 @@ void __blk_run_queue(struct request_queue *q, bool force_kblockd) | |||
| 321 | * Only recurse once to avoid overrunning the stack, let the unplug | 307 | * Only recurse once to avoid overrunning the stack, let the unplug |
| 322 | * handling reinvoke the handler shortly if we already got there. | 308 | * handling reinvoke the handler shortly if we already got there. |
| 323 | */ | 309 | */ |
| 324 | if (!force_kblockd && !queue_flag_test_and_set(QUEUE_FLAG_REENTER, q)) { | 310 | if (!queue_flag_test_and_set(QUEUE_FLAG_REENTER, q)) { |
| 325 | q->request_fn(q); | 311 | q->request_fn(q); |
| 326 | queue_flag_clear(QUEUE_FLAG_REENTER, q); | 312 | queue_flag_clear(QUEUE_FLAG_REENTER, q); |
| 327 | } else | 313 | } else |
| @@ -330,6 +316,20 @@ void __blk_run_queue(struct request_queue *q, bool force_kblockd) | |||
| 330 | EXPORT_SYMBOL(__blk_run_queue); | 316 | EXPORT_SYMBOL(__blk_run_queue); |
| 331 | 317 | ||
| 332 | /** | 318 | /** |
| 319 | * blk_run_queue_async - run a single device queue in workqueue context | ||
| 320 | * @q: The queue to run | ||
| 321 | * | ||
| 322 | * Description: | ||
| 323 | * Tells kblockd to perform the equivalent of @blk_run_queue on behalf | ||
| 324 | * of us. | ||
| 325 | */ | ||
| 326 | void blk_run_queue_async(struct request_queue *q) | ||
| 327 | { | ||
| 328 | if (likely(!blk_queue_stopped(q))) | ||
| 329 | queue_delayed_work(kblockd_workqueue, &q->delay_work, 0); | ||
| 330 | } | ||
| 331 | |||
| 332 | /** | ||
| 333 | * blk_run_queue - run a single device queue | 333 | * blk_run_queue - run a single device queue |
| 334 | * @q: The queue to run | 334 | * @q: The queue to run |
| 335 | * | 335 | * |
| @@ -342,7 +342,7 @@ void blk_run_queue(struct request_queue *q) | |||
| 342 | unsigned long flags; | 342 | unsigned long flags; |
| 343 | 343 | ||
| 344 | spin_lock_irqsave(q->queue_lock, flags); | 344 | spin_lock_irqsave(q->queue_lock, flags); |
| 345 | __blk_run_queue(q, false); | 345 | __blk_run_queue(q); |
| 346 | spin_unlock_irqrestore(q->queue_lock, flags); | 346 | spin_unlock_irqrestore(q->queue_lock, flags); |
| 347 | } | 347 | } |
| 348 | EXPORT_SYMBOL(blk_run_queue); | 348 | EXPORT_SYMBOL(blk_run_queue); |
| @@ -991,7 +991,7 @@ void blk_insert_request(struct request_queue *q, struct request *rq, | |||
| 991 | blk_queue_end_tag(q, rq); | 991 | blk_queue_end_tag(q, rq); |
| 992 | 992 | ||
| 993 | add_acct_request(q, rq, where); | 993 | add_acct_request(q, rq, where); |
| 994 | __blk_run_queue(q, false); | 994 | __blk_run_queue(q); |
| 995 | spin_unlock_irqrestore(q->queue_lock, flags); | 995 | spin_unlock_irqrestore(q->queue_lock, flags); |
| 996 | } | 996 | } |
| 997 | EXPORT_SYMBOL(blk_insert_request); | 997 | EXPORT_SYMBOL(blk_insert_request); |
| @@ -1184,7 +1184,7 @@ static bool bio_attempt_front_merge(struct request_queue *q, | |||
| 1184 | 1184 | ||
| 1185 | /* | 1185 | /* |
| 1186 | * Attempts to merge with the plugged list in the current process. Returns | 1186 | * Attempts to merge with the plugged list in the current process. Returns |
| 1187 | * true if merge was succesful, otherwise false. | 1187 | * true if merge was successful, otherwise false. |
| 1188 | */ | 1188 | */ |
| 1189 | static bool attempt_plug_merge(struct task_struct *tsk, struct request_queue *q, | 1189 | static bool attempt_plug_merge(struct task_struct *tsk, struct request_queue *q, |
| 1190 | struct bio *bio) | 1190 | struct bio *bio) |
| @@ -1311,7 +1311,15 @@ get_rq: | |||
| 1311 | 1311 | ||
| 1312 | plug = current->plug; | 1312 | plug = current->plug; |
| 1313 | if (plug) { | 1313 | if (plug) { |
| 1314 | if (!plug->should_sort && !list_empty(&plug->list)) { | 1314 | /* |
| 1315 | * If this is the first request added after a plug, fire | ||
| 1316 | * of a plug trace. If others have been added before, check | ||
| 1317 | * if we have multiple devices in this plug. If so, make a | ||
| 1318 | * note to sort the list before dispatch. | ||
| 1319 | */ | ||
| 1320 | if (list_empty(&plug->list)) | ||
| 1321 | trace_block_plug(q); | ||
| 1322 | else if (!plug->should_sort) { | ||
| 1315 | struct request *__rq; | 1323 | struct request *__rq; |
| 1316 | 1324 | ||
| 1317 | __rq = list_entry_rq(plug->list.prev); | 1325 | __rq = list_entry_rq(plug->list.prev); |
| @@ -1327,7 +1335,7 @@ get_rq: | |||
| 1327 | } else { | 1335 | } else { |
| 1328 | spin_lock_irq(q->queue_lock); | 1336 | spin_lock_irq(q->queue_lock); |
| 1329 | add_acct_request(q, req, where); | 1337 | add_acct_request(q, req, where); |
| 1330 | __blk_run_queue(q, false); | 1338 | __blk_run_queue(q); |
| 1331 | out_unlock: | 1339 | out_unlock: |
| 1332 | spin_unlock_irq(q->queue_lock); | 1340 | spin_unlock_irq(q->queue_lock); |
| 1333 | } | 1341 | } |
| @@ -2163,7 +2171,7 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes) | |||
| 2163 | * size, something has gone terribly wrong. | 2171 | * size, something has gone terribly wrong. |
| 2164 | */ | 2172 | */ |
| 2165 | if (blk_rq_bytes(req) < blk_rq_cur_bytes(req)) { | 2173 | if (blk_rq_bytes(req) < blk_rq_cur_bytes(req)) { |
| 2166 | printk(KERN_ERR "blk: request botched\n"); | 2174 | blk_dump_rq_flags(req, "request botched"); |
| 2167 | req->__data_len = blk_rq_cur_bytes(req); | 2175 | req->__data_len = blk_rq_cur_bytes(req); |
| 2168 | } | 2176 | } |
| 2169 | 2177 | ||
| @@ -2644,6 +2652,7 @@ void blk_start_plug(struct blk_plug *plug) | |||
| 2644 | 2652 | ||
| 2645 | plug->magic = PLUG_MAGIC; | 2653 | plug->magic = PLUG_MAGIC; |
| 2646 | INIT_LIST_HEAD(&plug->list); | 2654 | INIT_LIST_HEAD(&plug->list); |
| 2655 | INIT_LIST_HEAD(&plug->cb_list); | ||
| 2647 | plug->should_sort = 0; | 2656 | plug->should_sort = 0; |
| 2648 | 2657 | ||
| 2649 | /* | 2658 | /* |
| @@ -2665,36 +2674,96 @@ static int plug_rq_cmp(void *priv, struct list_head *a, struct list_head *b) | |||
| 2665 | struct request *rqa = container_of(a, struct request, queuelist); | 2674 | struct request *rqa = container_of(a, struct request, queuelist); |
| 2666 | struct request *rqb = container_of(b, struct request, queuelist); | 2675 | struct request *rqb = container_of(b, struct request, queuelist); |
| 2667 | 2676 | ||
| 2668 | return !(rqa->q == rqb->q); | 2677 | return !(rqa->q <= rqb->q); |
| 2678 | } | ||
| 2679 | |||
| 2680 | /* | ||
| 2681 | * If 'from_schedule' is true, then postpone the dispatch of requests | ||
| 2682 | * until a safe kblockd context. We due this to avoid accidental big | ||
| 2683 | * additional stack usage in driver dispatch, in places where the originally | ||
| 2684 | * plugger did not intend it. | ||
| 2685 | */ | ||
| 2686 | static void queue_unplugged(struct request_queue *q, unsigned int depth, | ||
| 2687 | bool from_schedule) | ||
| 2688 | __releases(q->queue_lock) | ||
| 2689 | { | ||
| 2690 | trace_block_unplug(q, depth, !from_schedule); | ||
| 2691 | |||
| 2692 | /* | ||
| 2693 | * If we are punting this to kblockd, then we can safely drop | ||
| 2694 | * the queue_lock before waking kblockd (which needs to take | ||
| 2695 | * this lock). | ||
| 2696 | */ | ||
| 2697 | if (from_schedule) { | ||
| 2698 | spin_unlock(q->queue_lock); | ||
| 2699 | blk_run_queue_async(q); | ||
| 2700 | } else { | ||
| 2701 | __blk_run_queue(q); | ||
| 2702 | spin_unlock(q->queue_lock); | ||
| 2703 | } | ||
| 2704 | |||
| 2669 | } | 2705 | } |
| 2670 | 2706 | ||
| 2671 | static void flush_plug_list(struct blk_plug *plug) | 2707 | static void flush_plug_callbacks(struct blk_plug *plug) |
| 2708 | { | ||
| 2709 | LIST_HEAD(callbacks); | ||
| 2710 | |||
| 2711 | if (list_empty(&plug->cb_list)) | ||
| 2712 | return; | ||
| 2713 | |||
| 2714 | list_splice_init(&plug->cb_list, &callbacks); | ||
| 2715 | |||
| 2716 | while (!list_empty(&callbacks)) { | ||
| 2717 | struct blk_plug_cb *cb = list_first_entry(&callbacks, | ||
| 2718 | struct blk_plug_cb, | ||
| 2719 | list); | ||
| 2720 | list_del(&cb->list); | ||
| 2721 | cb->callback(cb); | ||
| 2722 | } | ||
| 2723 | } | ||
| 2724 | |||
| 2725 | void blk_flush_plug_list(struct blk_plug *plug, bool from_schedule) | ||
| 2672 | { | 2726 | { |
| 2673 | struct request_queue *q; | 2727 | struct request_queue *q; |
| 2674 | unsigned long flags; | 2728 | unsigned long flags; |
| 2675 | struct request *rq; | 2729 | struct request *rq; |
| 2730 | LIST_HEAD(list); | ||
| 2731 | unsigned int depth; | ||
| 2676 | 2732 | ||
| 2677 | BUG_ON(plug->magic != PLUG_MAGIC); | 2733 | BUG_ON(plug->magic != PLUG_MAGIC); |
| 2678 | 2734 | ||
| 2735 | flush_plug_callbacks(plug); | ||
| 2679 | if (list_empty(&plug->list)) | 2736 | if (list_empty(&plug->list)) |
| 2680 | return; | 2737 | return; |
| 2681 | 2738 | ||
| 2682 | if (plug->should_sort) | 2739 | list_splice_init(&plug->list, &list); |
| 2683 | list_sort(NULL, &plug->list, plug_rq_cmp); | 2740 | |
| 2741 | if (plug->should_sort) { | ||
| 2742 | list_sort(NULL, &list, plug_rq_cmp); | ||
| 2743 | plug->should_sort = 0; | ||
| 2744 | } | ||
| 2684 | 2745 | ||
| 2685 | q = NULL; | 2746 | q = NULL; |
| 2747 | depth = 0; | ||
| 2748 | |||
| 2749 | /* | ||
| 2750 | * Save and disable interrupts here, to avoid doing it for every | ||
| 2751 | * queue lock we have to take. | ||
| 2752 | */ | ||
| 2686 | local_irq_save(flags); | 2753 | local_irq_save(flags); |
| 2687 | while (!list_empty(&plug->list)) { | 2754 | while (!list_empty(&list)) { |
| 2688 | rq = list_entry_rq(plug->list.next); | 2755 | rq = list_entry_rq(list.next); |
| 2689 | list_del_init(&rq->queuelist); | 2756 | list_del_init(&rq->queuelist); |
| 2690 | BUG_ON(!(rq->cmd_flags & REQ_ON_PLUG)); | 2757 | BUG_ON(!(rq->cmd_flags & REQ_ON_PLUG)); |
| 2691 | BUG_ON(!rq->q); | 2758 | BUG_ON(!rq->q); |
| 2692 | if (rq->q != q) { | 2759 | if (rq->q != q) { |
| 2693 | if (q) { | 2760 | /* |
| 2694 | __blk_run_queue(q, false); | 2761 | * This drops the queue lock |
| 2695 | spin_unlock(q->queue_lock); | 2762 | */ |
| 2696 | } | 2763 | if (q) |
| 2764 | queue_unplugged(q, depth, from_schedule); | ||
| 2697 | q = rq->q; | 2765 | q = rq->q; |
| 2766 | depth = 0; | ||
| 2698 | spin_lock(q->queue_lock); | 2767 | spin_lock(q->queue_lock); |
| 2699 | } | 2768 | } |
| 2700 | rq->cmd_flags &= ~REQ_ON_PLUG; | 2769 | rq->cmd_flags &= ~REQ_ON_PLUG; |
| @@ -2706,38 +2775,28 @@ static void flush_plug_list(struct blk_plug *plug) | |||
| 2706 | __elv_add_request(q, rq, ELEVATOR_INSERT_FLUSH); | 2775 | __elv_add_request(q, rq, ELEVATOR_INSERT_FLUSH); |
| 2707 | else | 2776 | else |
| 2708 | __elv_add_request(q, rq, ELEVATOR_INSERT_SORT_MERGE); | 2777 | __elv_add_request(q, rq, ELEVATOR_INSERT_SORT_MERGE); |
| 2709 | } | ||
| 2710 | 2778 | ||
| 2711 | if (q) { | 2779 | depth++; |
| 2712 | __blk_run_queue(q, false); | ||
| 2713 | spin_unlock(q->queue_lock); | ||
| 2714 | } | 2780 | } |
| 2715 | 2781 | ||
| 2716 | BUG_ON(!list_empty(&plug->list)); | 2782 | /* |
| 2717 | local_irq_restore(flags); | 2783 | * This drops the queue lock |
| 2718 | } | 2784 | */ |
| 2719 | 2785 | if (q) | |
| 2720 | static void __blk_finish_plug(struct task_struct *tsk, struct blk_plug *plug) | 2786 | queue_unplugged(q, depth, from_schedule); |
| 2721 | { | ||
| 2722 | flush_plug_list(plug); | ||
| 2723 | 2787 | ||
| 2724 | if (plug == tsk->plug) | 2788 | local_irq_restore(flags); |
| 2725 | tsk->plug = NULL; | ||
| 2726 | } | 2789 | } |
| 2790 | EXPORT_SYMBOL(blk_flush_plug_list); | ||
| 2727 | 2791 | ||
| 2728 | void blk_finish_plug(struct blk_plug *plug) | 2792 | void blk_finish_plug(struct blk_plug *plug) |
| 2729 | { | 2793 | { |
| 2730 | if (plug) | 2794 | blk_flush_plug_list(plug, false); |
| 2731 | __blk_finish_plug(current, plug); | ||
| 2732 | } | ||
| 2733 | EXPORT_SYMBOL(blk_finish_plug); | ||
| 2734 | 2795 | ||
| 2735 | void __blk_flush_plug(struct task_struct *tsk, struct blk_plug *plug) | 2796 | if (plug == current->plug) |
| 2736 | { | 2797 | current->plug = NULL; |
| 2737 | __blk_finish_plug(tsk, plug); | ||
| 2738 | tsk->plug = plug; | ||
| 2739 | } | 2798 | } |
| 2740 | EXPORT_SYMBOL(__blk_flush_plug); | 2799 | EXPORT_SYMBOL(blk_finish_plug); |
| 2741 | 2800 | ||
| 2742 | int __init blk_dev_init(void) | 2801 | int __init blk_dev_init(void) |
| 2743 | { | 2802 | { |
diff --git a/block/blk-exec.c b/block/blk-exec.c index 7482b7fa863b..81e31819a597 100644 --- a/block/blk-exec.c +++ b/block/blk-exec.c | |||
| @@ -55,7 +55,7 @@ void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk, | |||
| 55 | WARN_ON(irqs_disabled()); | 55 | WARN_ON(irqs_disabled()); |
| 56 | spin_lock_irq(q->queue_lock); | 56 | spin_lock_irq(q->queue_lock); |
| 57 | __elv_add_request(q, rq, where); | 57 | __elv_add_request(q, rq, where); |
| 58 | __blk_run_queue(q, false); | 58 | __blk_run_queue(q); |
| 59 | /* the queue is stopped so it won't be plugged+unplugged */ | 59 | /* the queue is stopped so it won't be plugged+unplugged */ |
| 60 | if (rq->cmd_type == REQ_TYPE_PM_RESUME) | 60 | if (rq->cmd_type == REQ_TYPE_PM_RESUME) |
| 61 | q->request_fn(q); | 61 | q->request_fn(q); |
diff --git a/block/blk-flush.c b/block/blk-flush.c index 93d5fd8e51eb..6c9b5e189e62 100644 --- a/block/blk-flush.c +++ b/block/blk-flush.c | |||
| @@ -218,7 +218,7 @@ static void flush_end_io(struct request *flush_rq, int error) | |||
| 218 | * request_fn may confuse the driver. Always use kblockd. | 218 | * request_fn may confuse the driver. Always use kblockd. |
| 219 | */ | 219 | */ |
| 220 | if (queued) | 220 | if (queued) |
| 221 | __blk_run_queue(q, true); | 221 | blk_run_queue_async(q); |
| 222 | } | 222 | } |
| 223 | 223 | ||
| 224 | /** | 224 | /** |
| @@ -261,7 +261,7 @@ static bool blk_kick_flush(struct request_queue *q) | |||
| 261 | q->flush_rq.end_io = flush_end_io; | 261 | q->flush_rq.end_io = flush_end_io; |
| 262 | 262 | ||
| 263 | q->flush_pending_idx ^= 1; | 263 | q->flush_pending_idx ^= 1; |
| 264 | elv_insert(q, &q->flush_rq, ELEVATOR_INSERT_REQUEUE); | 264 | list_add_tail(&q->flush_rq.queuelist, &q->queue_head); |
| 265 | return true; | 265 | return true; |
| 266 | } | 266 | } |
| 267 | 267 | ||
| @@ -274,14 +274,14 @@ static void flush_data_end_io(struct request *rq, int error) | |||
| 274 | * the comment in flush_end_io(). | 274 | * the comment in flush_end_io(). |
| 275 | */ | 275 | */ |
| 276 | if (blk_flush_complete_seq(rq, REQ_FSEQ_DATA, error)) | 276 | if (blk_flush_complete_seq(rq, REQ_FSEQ_DATA, error)) |
| 277 | __blk_run_queue(q, true); | 277 | blk_run_queue_async(q); |
| 278 | } | 278 | } |
| 279 | 279 | ||
| 280 | /** | 280 | /** |
| 281 | * blk_insert_flush - insert a new FLUSH/FUA request | 281 | * blk_insert_flush - insert a new FLUSH/FUA request |
| 282 | * @rq: request to insert | 282 | * @rq: request to insert |
| 283 | * | 283 | * |
| 284 | * To be called from elv_insert() for %ELEVATOR_INSERT_FLUSH insertions. | 284 | * To be called from __elv_add_request() for %ELEVATOR_INSERT_FLUSH insertions. |
| 285 | * @rq is being submitted. Analyze what needs to be done and put it on the | 285 | * @rq is being submitted. Analyze what needs to be done and put it on the |
| 286 | * right queue. | 286 | * right queue. |
| 287 | * | 287 | * |
| @@ -312,7 +312,7 @@ void blk_insert_flush(struct request *rq) | |||
| 312 | */ | 312 | */ |
| 313 | if ((policy & REQ_FSEQ_DATA) && | 313 | if ((policy & REQ_FSEQ_DATA) && |
| 314 | !(policy & (REQ_FSEQ_PREFLUSH | REQ_FSEQ_POSTFLUSH))) { | 314 | !(policy & (REQ_FSEQ_PREFLUSH | REQ_FSEQ_POSTFLUSH))) { |
| 315 | list_add(&rq->queuelist, &q->queue_head); | 315 | list_add_tail(&rq->queuelist, &q->queue_head); |
| 316 | return; | 316 | return; |
| 317 | } | 317 | } |
| 318 | 318 | ||
diff --git a/block/blk-integrity.c b/block/blk-integrity.c index 54bcba6c02a7..129b9e209a3b 100644 --- a/block/blk-integrity.c +++ b/block/blk-integrity.c | |||
| @@ -30,6 +30,8 @@ | |||
| 30 | 30 | ||
| 31 | static struct kmem_cache *integrity_cachep; | 31 | static struct kmem_cache *integrity_cachep; |
| 32 | 32 | ||
| 33 | static const char *bi_unsupported_name = "unsupported"; | ||
| 34 | |||
| 33 | /** | 35 | /** |
| 34 | * blk_rq_count_integrity_sg - Count number of integrity scatterlist elements | 36 | * blk_rq_count_integrity_sg - Count number of integrity scatterlist elements |
| 35 | * @q: request queue | 37 | * @q: request queue |
| @@ -358,6 +360,14 @@ static struct kobj_type integrity_ktype = { | |||
| 358 | .release = blk_integrity_release, | 360 | .release = blk_integrity_release, |
| 359 | }; | 361 | }; |
| 360 | 362 | ||
| 363 | bool blk_integrity_is_initialized(struct gendisk *disk) | ||
| 364 | { | ||
| 365 | struct blk_integrity *bi = blk_get_integrity(disk); | ||
| 366 | |||
| 367 | return (bi && bi->name && strcmp(bi->name, bi_unsupported_name) != 0); | ||
| 368 | } | ||
| 369 | EXPORT_SYMBOL(blk_integrity_is_initialized); | ||
| 370 | |||
| 361 | /** | 371 | /** |
| 362 | * blk_integrity_register - Register a gendisk as being integrity-capable | 372 | * blk_integrity_register - Register a gendisk as being integrity-capable |
| 363 | * @disk: struct gendisk pointer to make integrity-aware | 373 | * @disk: struct gendisk pointer to make integrity-aware |
| @@ -407,7 +417,7 @@ int blk_integrity_register(struct gendisk *disk, struct blk_integrity *template) | |||
| 407 | bi->get_tag_fn = template->get_tag_fn; | 417 | bi->get_tag_fn = template->get_tag_fn; |
| 408 | bi->tag_size = template->tag_size; | 418 | bi->tag_size = template->tag_size; |
| 409 | } else | 419 | } else |
| 410 | bi->name = "unsupported"; | 420 | bi->name = bi_unsupported_name; |
| 411 | 421 | ||
| 412 | return 0; | 422 | return 0; |
| 413 | } | 423 | } |
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 261c75c665ae..6d735122bc59 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c | |||
| @@ -498,7 +498,6 @@ int blk_register_queue(struct gendisk *disk) | |||
| 498 | { | 498 | { |
| 499 | int ret; | 499 | int ret; |
| 500 | struct device *dev = disk_to_dev(disk); | 500 | struct device *dev = disk_to_dev(disk); |
| 501 | |||
| 502 | struct request_queue *q = disk->queue; | 501 | struct request_queue *q = disk->queue; |
| 503 | 502 | ||
| 504 | if (WARN_ON(!q)) | 503 | if (WARN_ON(!q)) |
| @@ -521,7 +520,7 @@ int blk_register_queue(struct gendisk *disk) | |||
| 521 | if (ret) { | 520 | if (ret) { |
| 522 | kobject_uevent(&q->kobj, KOBJ_REMOVE); | 521 | kobject_uevent(&q->kobj, KOBJ_REMOVE); |
| 523 | kobject_del(&q->kobj); | 522 | kobject_del(&q->kobj); |
| 524 | blk_trace_remove_sysfs(disk_to_dev(disk)); | 523 | blk_trace_remove_sysfs(dev); |
| 525 | kobject_put(&dev->kobj); | 524 | kobject_put(&dev->kobj); |
| 526 | return ret; | 525 | return ret; |
| 527 | } | 526 | } |
diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 5352bdafbcf0..0475a22a420d 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c | |||
| @@ -77,7 +77,7 @@ struct throtl_grp { | |||
| 77 | unsigned long slice_end[2]; | 77 | unsigned long slice_end[2]; |
| 78 | 78 | ||
| 79 | /* Some throttle limits got updated for the group */ | 79 | /* Some throttle limits got updated for the group */ |
| 80 | bool limits_changed; | 80 | int limits_changed; |
| 81 | }; | 81 | }; |
| 82 | 82 | ||
| 83 | struct throtl_data | 83 | struct throtl_data |
| @@ -102,7 +102,7 @@ struct throtl_data | |||
| 102 | /* Work for dispatching throttled bios */ | 102 | /* Work for dispatching throttled bios */ |
| 103 | struct delayed_work throtl_work; | 103 | struct delayed_work throtl_work; |
| 104 | 104 | ||
| 105 | bool limits_changed; | 105 | int limits_changed; |
| 106 | }; | 106 | }; |
| 107 | 107 | ||
| 108 | enum tg_state_flags { | 108 | enum tg_state_flags { |
| @@ -916,7 +916,7 @@ static void throtl_update_blkio_group_common(struct throtl_data *td, | |||
| 916 | /* | 916 | /* |
| 917 | * For all update functions, key should be a valid pointer because these | 917 | * For all update functions, key should be a valid pointer because these |
| 918 | * update functions are called under blkcg_lock, that means, blkg is | 918 | * update functions are called under blkcg_lock, that means, blkg is |
| 919 | * valid and in turn key is valid. queue exit path can not race becuase | 919 | * valid and in turn key is valid. queue exit path can not race because |
| 920 | * of blkcg_lock | 920 | * of blkcg_lock |
| 921 | * | 921 | * |
| 922 | * Can not take queue lock in update functions as queue lock under blkcg_lock | 922 | * Can not take queue lock in update functions as queue lock under blkcg_lock |
diff --git a/block/blk.h b/block/blk.h index c8db371a921d..c9df8fc3c999 100644 --- a/block/blk.h +++ b/block/blk.h | |||
| @@ -22,6 +22,7 @@ void blk_rq_timed_out_timer(unsigned long data); | |||
| 22 | void blk_delete_timer(struct request *); | 22 | void blk_delete_timer(struct request *); |
| 23 | void blk_add_timer(struct request *); | 23 | void blk_add_timer(struct request *); |
| 24 | void __generic_unplug_device(struct request_queue *); | 24 | void __generic_unplug_device(struct request_queue *); |
| 25 | void blk_run_queue_async(struct request_queue *q); | ||
| 25 | 26 | ||
| 26 | /* | 27 | /* |
| 27 | * Internal atomic flags for request handling | 28 | * Internal atomic flags for request handling |
| @@ -32,7 +33,7 @@ enum rq_atomic_flags { | |||
| 32 | 33 | ||
| 33 | /* | 34 | /* |
| 34 | * EH timer and IO completion will both attempt to 'grab' the request, make | 35 | * EH timer and IO completion will both attempt to 'grab' the request, make |
| 35 | * sure that only one of them suceeds | 36 | * sure that only one of them succeeds |
| 36 | */ | 37 | */ |
| 37 | static inline int blk_mark_rq_complete(struct request *rq) | 38 | static inline int blk_mark_rq_complete(struct request *rq) |
| 38 | { | 39 | { |
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 7785169f3c8f..46b0a1d1d925 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
| @@ -888,7 +888,7 @@ cfq_group_notify_queue_add(struct cfq_data *cfqd, struct cfq_group *cfqg) | |||
| 888 | /* | 888 | /* |
| 889 | * Currently put the group at the end. Later implement something | 889 | * Currently put the group at the end. Later implement something |
| 890 | * so that groups get lesser vtime based on their weights, so that | 890 | * so that groups get lesser vtime based on their weights, so that |
| 891 | * if group does not loose all if it was not continously backlogged. | 891 | * if group does not loose all if it was not continuously backlogged. |
| 892 | */ | 892 | */ |
| 893 | n = rb_last(&st->rb); | 893 | n = rb_last(&st->rb); |
| 894 | if (n) { | 894 | if (n) { |
| @@ -3368,7 +3368,7 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq, | |||
| 3368 | cfqd->busy_queues > 1) { | 3368 | cfqd->busy_queues > 1) { |
| 3369 | cfq_del_timer(cfqd, cfqq); | 3369 | cfq_del_timer(cfqd, cfqq); |
| 3370 | cfq_clear_cfqq_wait_request(cfqq); | 3370 | cfq_clear_cfqq_wait_request(cfqq); |
| 3371 | __blk_run_queue(cfqd->queue, false); | 3371 | __blk_run_queue(cfqd->queue); |
| 3372 | } else { | 3372 | } else { |
| 3373 | cfq_blkiocg_update_idle_time_stats( | 3373 | cfq_blkiocg_update_idle_time_stats( |
| 3374 | &cfqq->cfqg->blkg); | 3374 | &cfqq->cfqg->blkg); |
| @@ -3383,7 +3383,7 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq, | |||
| 3383 | * this new queue is RT and the current one is BE | 3383 | * this new queue is RT and the current one is BE |
| 3384 | */ | 3384 | */ |
| 3385 | cfq_preempt_queue(cfqd, cfqq); | 3385 | cfq_preempt_queue(cfqd, cfqq); |
| 3386 | __blk_run_queue(cfqd->queue, false); | 3386 | __blk_run_queue(cfqd->queue); |
| 3387 | } | 3387 | } |
| 3388 | } | 3388 | } |
| 3389 | 3389 | ||
| @@ -3743,7 +3743,7 @@ static void cfq_kick_queue(struct work_struct *work) | |||
| 3743 | struct request_queue *q = cfqd->queue; | 3743 | struct request_queue *q = cfqd->queue; |
| 3744 | 3744 | ||
| 3745 | spin_lock_irq(q->queue_lock); | 3745 | spin_lock_irq(q->queue_lock); |
| 3746 | __blk_run_queue(cfqd->queue, false); | 3746 | __blk_run_queue(cfqd->queue); |
| 3747 | spin_unlock_irq(q->queue_lock); | 3747 | spin_unlock_irq(q->queue_lock); |
| 3748 | } | 3748 | } |
| 3749 | 3749 | ||
diff --git a/block/elevator.c b/block/elevator.c index c387d3168734..6f6abc08bb56 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
| @@ -610,7 +610,7 @@ void elv_requeue_request(struct request_queue *q, struct request *rq) | |||
| 610 | 610 | ||
| 611 | rq->cmd_flags &= ~REQ_STARTED; | 611 | rq->cmd_flags &= ~REQ_STARTED; |
| 612 | 612 | ||
| 613 | elv_insert(q, rq, ELEVATOR_INSERT_REQUEUE); | 613 | __elv_add_request(q, rq, ELEVATOR_INSERT_REQUEUE); |
| 614 | } | 614 | } |
| 615 | 615 | ||
| 616 | void elv_drain_elevator(struct request_queue *q) | 616 | void elv_drain_elevator(struct request_queue *q) |
| @@ -642,7 +642,7 @@ void elv_quiesce_start(struct request_queue *q) | |||
| 642 | */ | 642 | */ |
| 643 | elv_drain_elevator(q); | 643 | elv_drain_elevator(q); |
| 644 | while (q->rq.elvpriv) { | 644 | while (q->rq.elvpriv) { |
| 645 | __blk_run_queue(q, false); | 645 | __blk_run_queue(q); |
| 646 | spin_unlock_irq(q->queue_lock); | 646 | spin_unlock_irq(q->queue_lock); |
| 647 | msleep(10); | 647 | msleep(10); |
| 648 | spin_lock_irq(q->queue_lock); | 648 | spin_lock_irq(q->queue_lock); |
| @@ -655,12 +655,25 @@ void elv_quiesce_end(struct request_queue *q) | |||
| 655 | queue_flag_clear(QUEUE_FLAG_ELVSWITCH, q); | 655 | queue_flag_clear(QUEUE_FLAG_ELVSWITCH, q); |
| 656 | } | 656 | } |
| 657 | 657 | ||
| 658 | void elv_insert(struct request_queue *q, struct request *rq, int where) | 658 | void __elv_add_request(struct request_queue *q, struct request *rq, int where) |
| 659 | { | 659 | { |
| 660 | trace_block_rq_insert(q, rq); | 660 | trace_block_rq_insert(q, rq); |
| 661 | 661 | ||
| 662 | rq->q = q; | 662 | rq->q = q; |
| 663 | 663 | ||
| 664 | BUG_ON(rq->cmd_flags & REQ_ON_PLUG); | ||
| 665 | |||
| 666 | if (rq->cmd_flags & REQ_SOFTBARRIER) { | ||
| 667 | /* barriers are scheduling boundary, update end_sector */ | ||
| 668 | if (rq->cmd_type == REQ_TYPE_FS || | ||
| 669 | (rq->cmd_flags & REQ_DISCARD)) { | ||
| 670 | q->end_sector = rq_end_sector(rq); | ||
| 671 | q->boundary_rq = rq; | ||
| 672 | } | ||
| 673 | } else if (!(rq->cmd_flags & REQ_ELVPRIV) && | ||
| 674 | where == ELEVATOR_INSERT_SORT) | ||
| 675 | where = ELEVATOR_INSERT_BACK; | ||
| 676 | |||
| 664 | switch (where) { | 677 | switch (where) { |
| 665 | case ELEVATOR_INSERT_REQUEUE: | 678 | case ELEVATOR_INSERT_REQUEUE: |
| 666 | case ELEVATOR_INSERT_FRONT: | 679 | case ELEVATOR_INSERT_FRONT: |
| @@ -682,7 +695,7 @@ void elv_insert(struct request_queue *q, struct request *rq, int where) | |||
| 682 | * with anything. There's no point in delaying queue | 695 | * with anything. There's no point in delaying queue |
| 683 | * processing. | 696 | * processing. |
| 684 | */ | 697 | */ |
| 685 | __blk_run_queue(q, false); | 698 | __blk_run_queue(q); |
| 686 | break; | 699 | break; |
| 687 | 700 | ||
| 688 | case ELEVATOR_INSERT_SORT_MERGE: | 701 | case ELEVATOR_INSERT_SORT_MERGE: |
| @@ -722,24 +735,6 @@ void elv_insert(struct request_queue *q, struct request *rq, int where) | |||
| 722 | BUG(); | 735 | BUG(); |
| 723 | } | 736 | } |
| 724 | } | 737 | } |
| 725 | |||
| 726 | void __elv_add_request(struct request_queue *q, struct request *rq, int where) | ||
| 727 | { | ||
| 728 | BUG_ON(rq->cmd_flags & REQ_ON_PLUG); | ||
| 729 | |||
| 730 | if (rq->cmd_flags & REQ_SOFTBARRIER) { | ||
| 731 | /* barriers are scheduling boundary, update end_sector */ | ||
| 732 | if (rq->cmd_type == REQ_TYPE_FS || | ||
| 733 | (rq->cmd_flags & REQ_DISCARD)) { | ||
| 734 | q->end_sector = rq_end_sector(rq); | ||
| 735 | q->boundary_rq = rq; | ||
| 736 | } | ||
| 737 | } else if (!(rq->cmd_flags & REQ_ELVPRIV) && | ||
| 738 | where == ELEVATOR_INSERT_SORT) | ||
| 739 | where = ELEVATOR_INSERT_BACK; | ||
| 740 | |||
| 741 | elv_insert(q, rq, where); | ||
| 742 | } | ||
| 743 | EXPORT_SYMBOL(__elv_add_request); | 738 | EXPORT_SYMBOL(__elv_add_request); |
| 744 | 739 | ||
| 745 | void elv_add_request(struct request_queue *q, struct request *rq, int where) | 740 | void elv_add_request(struct request_queue *q, struct request *rq, int where) |
diff --git a/block/genhd.c b/block/genhd.c index c91a2dac6b6b..b364bd038a18 100644 --- a/block/genhd.c +++ b/block/genhd.c | |||
| @@ -739,7 +739,7 @@ void __init printk_all_partitions(void) | |||
| 739 | 739 | ||
| 740 | /* | 740 | /* |
| 741 | * Don't show empty devices or things that have been | 741 | * Don't show empty devices or things that have been |
| 742 | * surpressed | 742 | * suppressed |
| 743 | */ | 743 | */ |
| 744 | if (get_capacity(disk) == 0 || | 744 | if (get_capacity(disk) == 0 || |
| 745 | (disk->flags & GENHD_FL_SUPPRESS_PARTITION_INFO)) | 745 | (disk->flags & GENHD_FL_SUPPRESS_PARTITION_INFO)) |
diff --git a/crypto/ansi_cprng.c b/crypto/ansi_cprng.c index 2bc332142849..ffa0245e2abc 100644 --- a/crypto/ansi_cprng.c +++ b/crypto/ansi_cprng.c | |||
| @@ -83,7 +83,7 @@ static void xor_vectors(unsigned char *in1, unsigned char *in2, | |||
| 83 | } | 83 | } |
| 84 | /* | 84 | /* |
| 85 | * Returns DEFAULT_BLK_SZ bytes of random data per call | 85 | * Returns DEFAULT_BLK_SZ bytes of random data per call |
| 86 | * returns 0 if generation succeded, <0 if something went wrong | 86 | * returns 0 if generation succeeded, <0 if something went wrong |
| 87 | */ | 87 | */ |
| 88 | static int _get_more_prng_bytes(struct prng_context *ctx, int cont_test) | 88 | static int _get_more_prng_bytes(struct prng_context *ctx, int cont_test) |
| 89 | { | 89 | { |
diff --git a/crypto/async_tx/async_xor.c b/crypto/async_tx/async_xor.c index 079ae8ca590b..bc28337fded2 100644 --- a/crypto/async_tx/async_xor.c +++ b/crypto/async_tx/async_xor.c | |||
| @@ -94,7 +94,7 @@ do_async_xor(struct dma_chan *chan, struct page *dest, struct page **src_list, | |||
| 94 | if (unlikely(!tx)) | 94 | if (unlikely(!tx)) |
| 95 | async_tx_quiesce(&submit->depend_tx); | 95 | async_tx_quiesce(&submit->depend_tx); |
| 96 | 96 | ||
| 97 | /* spin wait for the preceeding transactions to complete */ | 97 | /* spin wait for the preceding transactions to complete */ |
| 98 | while (unlikely(!tx)) { | 98 | while (unlikely(!tx)) { |
| 99 | dma_async_issue_pending(chan); | 99 | dma_async_issue_pending(chan); |
| 100 | tx = dma->device_prep_dma_xor(chan, dma_dest, | 100 | tx = dma->device_prep_dma_xor(chan, dma_dest, |
diff --git a/crypto/gf128mul.c b/crypto/gf128mul.c index a90d260528d4..df35e4ccd07e 100644 --- a/crypto/gf128mul.c +++ b/crypto/gf128mul.c | |||
| @@ -89,7 +89,7 @@ | |||
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | /* Given the value i in 0..255 as the byte overflow when a field element | 91 | /* Given the value i in 0..255 as the byte overflow when a field element |
| 92 | in GHASH is multipled by x^8, this function will return the values that | 92 | in GHASH is multiplied by x^8, this function will return the values that |
| 93 | are generated in the lo 16-bit word of the field value by applying the | 93 | are generated in the lo 16-bit word of the field value by applying the |
| 94 | modular polynomial. The values lo_byte and hi_byte are returned via the | 94 | modular polynomial. The values lo_byte and hi_byte are returned via the |
| 95 | macro xp_fun(lo_byte, hi_byte) so that the values can be assembled into | 95 | macro xp_fun(lo_byte, hi_byte) so that the values can be assembled into |
diff --git a/crypto/vmac.c b/crypto/vmac.c index 0999274a27ac..f35ff8a3926e 100644 --- a/crypto/vmac.c +++ b/crypto/vmac.c | |||
| @@ -95,7 +95,7 @@ const u64 mpoly = UINT64_C(0x1fffffff1fffffff); /* Poly key mask */ | |||
| 95 | 95 | ||
| 96 | /* | 96 | /* |
| 97 | * For highest performance the L1 NH and L2 polynomial hashes should be | 97 | * For highest performance the L1 NH and L2 polynomial hashes should be |
| 98 | * carefully implemented to take advantage of one's target architechture. | 98 | * carefully implemented to take advantage of one's target architecture. |
| 99 | * Here these two hash functions are defined multiple time; once for | 99 | * Here these two hash functions are defined multiple time; once for |
| 100 | * 64-bit architectures, once for 32-bit SSE2 architectures, and once | 100 | * 64-bit architectures, once for 32-bit SSE2 architectures, and once |
| 101 | * for the rest (32-bit) architectures. | 101 | * for the rest (32-bit) architectures. |
diff --git a/crypto/xts.c b/crypto/xts.c index 555ecaab1e54..851705446c82 100644 --- a/crypto/xts.c +++ b/crypto/xts.c | |||
| @@ -45,7 +45,7 @@ static int setkey(struct crypto_tfm *parent, const u8 *key, | |||
| 45 | return -EINVAL; | 45 | return -EINVAL; |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | /* we need two cipher instances: one to compute the inital 'tweak' | 48 | /* we need two cipher instances: one to compute the initial 'tweak' |
| 49 | * by encrypting the IV (usually the 'plain' iv) and the other | 49 | * by encrypting the IV (usually the 'plain' iv) and the other |
| 50 | * one to encrypt and decrypt the data */ | 50 | * one to encrypt and decrypt the data */ |
| 51 | 51 | ||
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index d1d484d4a06a..f703b2881153 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c | |||
| @@ -241,7 +241,7 @@ static inline int ghes_severity(int severity) | |||
| 241 | case CPER_SEV_FATAL: | 241 | case CPER_SEV_FATAL: |
| 242 | return GHES_SEV_PANIC; | 242 | return GHES_SEV_PANIC; |
| 243 | default: | 243 | default: |
| 244 | /* Unkown, go panic */ | 244 | /* Unknown, go panic */ |
| 245 | return GHES_SEV_PANIC; | 245 | return GHES_SEV_PANIC; |
| 246 | } | 246 | } |
| 247 | } | 247 | } |
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c index fa84e9744330..ad3501739563 100644 --- a/drivers/acpi/processor_throttling.c +++ b/drivers/acpi/processor_throttling.c | |||
| @@ -1164,7 +1164,7 @@ int acpi_processor_set_throttling(struct acpi_processor *pr, | |||
| 1164 | */ | 1164 | */ |
| 1165 | if (!match_pr->flags.throttling) { | 1165 | if (!match_pr->flags.throttling) { |
| 1166 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 1166 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
| 1167 | "Throttling Controll is unsupported " | 1167 | "Throttling Control is unsupported " |
| 1168 | "on CPU %d\n", i)); | 1168 | "on CPU %d\n", i)); |
| 1169 | continue; | 1169 | continue; |
| 1170 | } | 1170 | } |
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 31e9e10f657e..ec574fc8fbc6 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
| @@ -1354,7 +1354,7 @@ acpi_video_bus_get_devices(struct acpi_video_bus *video, | |||
| 1354 | status = acpi_video_bus_get_one_device(dev, video); | 1354 | status = acpi_video_bus_get_one_device(dev, video); |
| 1355 | if (ACPI_FAILURE(status)) { | 1355 | if (ACPI_FAILURE(status)) { |
| 1356 | printk(KERN_WARNING PREFIX | 1356 | printk(KERN_WARNING PREFIX |
| 1357 | "Cant attach device\n"); | 1357 | "Can't attach device\n"); |
| 1358 | continue; | 1358 | continue; |
| 1359 | } | 1359 | } |
| 1360 | } | 1360 | } |
| @@ -1373,7 +1373,7 @@ static int acpi_video_bus_put_one_device(struct acpi_video_device *device) | |||
| 1373 | acpi_video_device_notify); | 1373 | acpi_video_device_notify); |
| 1374 | if (ACPI_FAILURE(status)) { | 1374 | if (ACPI_FAILURE(status)) { |
| 1375 | printk(KERN_WARNING PREFIX | 1375 | printk(KERN_WARNING PREFIX |
| 1376 | "Cant remove video notify handler\n"); | 1376 | "Can't remove video notify handler\n"); |
| 1377 | } | 1377 | } |
| 1378 | if (device->backlight) { | 1378 | if (device->backlight) { |
| 1379 | backlight_device_unregister(device->backlight); | 1379 | backlight_device_unregister(device->backlight); |
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index 6d2bb2524b6e..7025593a58c8 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c | |||
| @@ -214,7 +214,7 @@ static int amba_pm_resume_noirq(struct device *dev) | |||
| 214 | 214 | ||
| 215 | #endif /* !CONFIG_SUSPEND */ | 215 | #endif /* !CONFIG_SUSPEND */ |
| 216 | 216 | ||
| 217 | #ifdef CONFIG_HIBERNATION | 217 | #ifdef CONFIG_HIBERNATE_CALLBACKS |
| 218 | 218 | ||
| 219 | static int amba_pm_freeze(struct device *dev) | 219 | static int amba_pm_freeze(struct device *dev) |
| 220 | { | 220 | { |
| @@ -352,7 +352,7 @@ static int amba_pm_restore_noirq(struct device *dev) | |||
| 352 | return ret; | 352 | return ret; |
| 353 | } | 353 | } |
| 354 | 354 | ||
| 355 | #else /* !CONFIG_HIBERNATION */ | 355 | #else /* !CONFIG_HIBERNATE_CALLBACKS */ |
| 356 | 356 | ||
| 357 | #define amba_pm_freeze NULL | 357 | #define amba_pm_freeze NULL |
| 358 | #define amba_pm_thaw NULL | 358 | #define amba_pm_thaw NULL |
| @@ -363,7 +363,7 @@ static int amba_pm_restore_noirq(struct device *dev) | |||
| 363 | #define amba_pm_poweroff_noirq NULL | 363 | #define amba_pm_poweroff_noirq NULL |
| 364 | #define amba_pm_restore_noirq NULL | 364 | #define amba_pm_restore_noirq NULL |
| 365 | 365 | ||
| 366 | #endif /* !CONFIG_HIBERNATION */ | 366 | #endif /* !CONFIG_HIBERNATE_CALLBACKS */ |
| 367 | 367 | ||
| 368 | #ifdef CONFIG_PM | 368 | #ifdef CONFIG_PM |
| 369 | 369 | ||
| @@ -760,7 +760,7 @@ int amba_request_regions(struct amba_device *dev, const char *name) | |||
| 760 | } | 760 | } |
| 761 | 761 | ||
| 762 | /** | 762 | /** |
| 763 | * amba_release_regions - release mem regions assoicated with device | 763 | * amba_release_regions - release mem regions associated with device |
| 764 | * @dev: amba_device structure for device | 764 | * @dev: amba_device structure for device |
| 765 | * | 765 | * |
| 766 | * Release regions claimed by a successful call to amba_request_regions. | 766 | * Release regions claimed by a successful call to amba_request_regions. |
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index e62f693be8ea..39d829cd82dd 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
| @@ -926,7 +926,7 @@ static bool ahci_broken_suspend(struct pci_dev *pdev) | |||
| 926 | /* | 926 | /* |
| 927 | * Acer eMachines G725 has the same problem. BIOS | 927 | * Acer eMachines G725 has the same problem. BIOS |
| 928 | * V1.03 is known to be broken. V3.04 is known to | 928 | * V1.03 is known to be broken. V3.04 is known to |
| 929 | * work. Inbetween, there are V1.06, V2.06 and V3.03 | 929 | * work. Between, there are V1.06, V2.06 and V3.03 |
| 930 | * that we don't have much idea about. For now, | 930 | * that we don't have much idea about. For now, |
| 931 | * blacklist anything older than V3.04. | 931 | * blacklist anything older than V3.04. |
| 932 | * | 932 | * |
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h index ccaf08122058..39865009c251 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h | |||
| @@ -225,7 +225,7 @@ enum { | |||
| 225 | /* em_ctl bits */ | 225 | /* em_ctl bits */ |
| 226 | EM_CTL_RST = (1 << 9), /* Reset */ | 226 | EM_CTL_RST = (1 << 9), /* Reset */ |
| 227 | EM_CTL_TM = (1 << 8), /* Transmit Message */ | 227 | EM_CTL_TM = (1 << 8), /* Transmit Message */ |
| 228 | EM_CTL_MR = (1 << 0), /* Message Recieved */ | 228 | EM_CTL_MR = (1 << 0), /* Message Received */ |
| 229 | EM_CTL_ALHD = (1 << 26), /* Activity LED */ | 229 | EM_CTL_ALHD = (1 << 26), /* Activity LED */ |
| 230 | EM_CTL_XMT = (1 << 25), /* Transmit Only */ | 230 | EM_CTL_XMT = (1 << 25), /* Transmit Only */ |
| 231 | EM_CTL_SMB = (1 << 24), /* Single Message Buffer */ | 231 | EM_CTL_SMB = (1 << 24), /* Single Message Buffer */ |
| @@ -281,7 +281,7 @@ struct ahci_port_priv { | |||
| 281 | }; | 281 | }; |
| 282 | 282 | ||
| 283 | struct ahci_host_priv { | 283 | struct ahci_host_priv { |
| 284 | void __iomem * mmio; /* bus-independant mem map */ | 284 | void __iomem * mmio; /* bus-independent mem map */ |
| 285 | unsigned int flags; /* AHCI_HFLAG_* */ | 285 | unsigned int flags; /* AHCI_HFLAG_* */ |
| 286 | u32 cap; /* cap to use */ | 286 | u32 cap; /* cap to use */ |
| 287 | u32 cap2; /* cap2 to use */ | 287 | u32 cap2; /* cap2 to use */ |
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index cdec4ab3b159..0bc3fd6c3fdb 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
| @@ -38,16 +38,16 @@ | |||
| 38 | * Hardware documentation available at http://developer.intel.com/ | 38 | * Hardware documentation available at http://developer.intel.com/ |
| 39 | * | 39 | * |
| 40 | * Documentation | 40 | * Documentation |
| 41 | * Publically available from Intel web site. Errata documentation | 41 | * Publicly available from Intel web site. Errata documentation |
| 42 | * is also publically available. As an aide to anyone hacking on this | 42 | * is also publicly available. As an aide to anyone hacking on this |
| 43 | * driver the list of errata that are relevant is below, going back to | 43 | * driver the list of errata that are relevant is below, going back to |
| 44 | * PIIX4. Older device documentation is now a bit tricky to find. | 44 | * PIIX4. Older device documentation is now a bit tricky to find. |
| 45 | * | 45 | * |
| 46 | * The chipsets all follow very much the same design. The original Triton | 46 | * The chipsets all follow very much the same design. The original Triton |
| 47 | * series chipsets do _not_ support independant device timings, but this | 47 | * series chipsets do _not_ support independent device timings, but this |
| 48 | * is fixed in Triton II. With the odd mobile exception the chips then | 48 | * is fixed in Triton II. With the odd mobile exception the chips then |
| 49 | * change little except in gaining more modes until SATA arrives. This | 49 | * change little except in gaining more modes until SATA arrives. This |
| 50 | * driver supports only the chips with independant timing (that is those | 50 | * driver supports only the chips with independent timing (that is those |
| 51 | * with SITRE and the 0x44 timing register). See pata_oldpiix and pata_mpiix | 51 | * with SITRE and the 0x44 timing register). See pata_oldpiix and pata_mpiix |
| 52 | * for the early chip drivers. | 52 | * for the early chip drivers. |
| 53 | * | 53 | * |
| @@ -122,7 +122,7 @@ enum { | |||
| 122 | P2 = 2, /* port 2 */ | 122 | P2 = 2, /* port 2 */ |
| 123 | P3 = 3, /* port 3 */ | 123 | P3 = 3, /* port 3 */ |
| 124 | IDE = -1, /* IDE */ | 124 | IDE = -1, /* IDE */ |
| 125 | NA = -2, /* not avaliable */ | 125 | NA = -2, /* not available */ |
| 126 | RV = -3, /* reserved */ | 126 | RV = -3, /* reserved */ |
| 127 | 127 | ||
| 128 | PIIX_AHCI_DEVICE = 6, | 128 | PIIX_AHCI_DEVICE = 6, |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index b91e19cab102..423c0a6952b2 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
| @@ -5340,7 +5340,7 @@ int ata_host_suspend(struct ata_host *host, pm_message_t mesg) | |||
| 5340 | * | 5340 | * |
| 5341 | * Resume @host. Actual operation is performed by EH. This | 5341 | * Resume @host. Actual operation is performed by EH. This |
| 5342 | * function requests EH to perform PM operations and returns. | 5342 | * function requests EH to perform PM operations and returns. |
| 5343 | * Note that all resume operations are performed parallely. | 5343 | * Note that all resume operations are performed parallelly. |
| 5344 | * | 5344 | * |
| 5345 | * LOCKING: | 5345 | * LOCKING: |
| 5346 | * Kernel thread context (may sleep). | 5346 | * Kernel thread context (may sleep). |
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index df3f3140c9c7..88cd22fa65cd 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
| @@ -771,7 +771,7 @@ void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap) | |||
| 771 | /* process port suspend request */ | 771 | /* process port suspend request */ |
| 772 | ata_eh_handle_port_suspend(ap); | 772 | ata_eh_handle_port_suspend(ap); |
| 773 | 773 | ||
| 774 | /* Exception might have happend after ->error_handler | 774 | /* Exception might have happened after ->error_handler |
| 775 | * recovered the port but before this point. Repeat | 775 | * recovered the port but before this point. Repeat |
| 776 | * EH in such case. | 776 | * EH in such case. |
| 777 | */ | 777 | */ |
| @@ -1742,7 +1742,7 @@ void ata_eh_analyze_ncq_error(struct ata_link *link) | |||
| 1742 | * | 1742 | * |
| 1743 | * Analyze taskfile of @qc and further determine cause of | 1743 | * Analyze taskfile of @qc and further determine cause of |
| 1744 | * failure. This function also requests ATAPI sense data if | 1744 | * failure. This function also requests ATAPI sense data if |
| 1745 | * avaliable. | 1745 | * available. |
| 1746 | * | 1746 | * |
| 1747 | * LOCKING: | 1747 | * LOCKING: |
| 1748 | * Kernel thread context (may sleep). | 1748 | * Kernel thread context (may sleep). |
| @@ -1893,7 +1893,7 @@ static int speed_down_verdict_cb(struct ata_ering_entry *ent, void *void_arg) | |||
| 1893 | * occurred during last 5 mins, NCQ_OFF. | 1893 | * occurred during last 5 mins, NCQ_OFF. |
| 1894 | * | 1894 | * |
| 1895 | * 3. If more than 8 ATA_BUS, TOUT_HSM or UNK_DEV errors | 1895 | * 3. If more than 8 ATA_BUS, TOUT_HSM or UNK_DEV errors |
| 1896 | * ocurred during last 5 mins, FALLBACK_TO_PIO | 1896 | * occurred during last 5 mins, FALLBACK_TO_PIO |
| 1897 | * | 1897 | * |
| 1898 | * 4. If more than 3 TOUT_HSM or UNK_DEV errors occurred | 1898 | * 4. If more than 3 TOUT_HSM or UNK_DEV errors occurred |
| 1899 | * during last 10 mins, NCQ_OFF. | 1899 | * during last 10 mins, NCQ_OFF. |
| @@ -2577,7 +2577,7 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
| 2577 | if (link->flags & ATA_LFLAG_NO_SRST) | 2577 | if (link->flags & ATA_LFLAG_NO_SRST) |
| 2578 | softreset = NULL; | 2578 | softreset = NULL; |
| 2579 | 2579 | ||
| 2580 | /* make sure each reset attemp is at least COOL_DOWN apart */ | 2580 | /* make sure each reset attempt is at least COOL_DOWN apart */ |
| 2581 | if (ehc->i.flags & ATA_EHI_DID_RESET) { | 2581 | if (ehc->i.flags & ATA_EHI_DID_RESET) { |
| 2582 | now = jiffies; | 2582 | now = jiffies; |
| 2583 | WARN_ON(time_after(ehc->last_reset, now)); | 2583 | WARN_ON(time_after(ehc->last_reset, now)); |
| @@ -2736,7 +2736,7 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
| 2736 | if (!reset) { | 2736 | if (!reset) { |
| 2737 | ata_link_printk(link, KERN_ERR, | 2737 | ata_link_printk(link, KERN_ERR, |
| 2738 | "follow-up softreset required " | 2738 | "follow-up softreset required " |
| 2739 | "but no softreset avaliable\n"); | 2739 | "but no softreset available\n"); |
| 2740 | failed_link = link; | 2740 | failed_link = link; |
| 2741 | rc = -EINVAL; | 2741 | rc = -EINVAL; |
| 2742 | goto fail; | 2742 | goto fail; |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index a83419991357..e2f57e9e12f0 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
| @@ -999,7 +999,7 @@ static void ata_gen_passthru_sense(struct ata_queued_cmd *qc) | |||
| 999 | * @qc: Command that we are erroring out | 999 | * @qc: Command that we are erroring out |
| 1000 | * | 1000 | * |
| 1001 | * Generate sense block for a failed ATA command @qc. Descriptor | 1001 | * Generate sense block for a failed ATA command @qc. Descriptor |
| 1002 | * format is used to accomodate LBA48 block address. | 1002 | * format is used to accommodate LBA48 block address. |
| 1003 | * | 1003 | * |
| 1004 | * LOCKING: | 1004 | * LOCKING: |
| 1005 | * None. | 1005 | * None. |
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index cf7acbc0cfcb..f8380ce0f4d1 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
| @@ -2839,7 +2839,7 @@ unsigned int ata_bmdma_port_intr(struct ata_port *ap, struct ata_queued_cmd *qc) | |||
| 2839 | bmdma_stopped = true; | 2839 | bmdma_stopped = true; |
| 2840 | 2840 | ||
| 2841 | if (unlikely(host_stat & ATA_DMA_ERR)) { | 2841 | if (unlikely(host_stat & ATA_DMA_ERR)) { |
| 2842 | /* error when transfering data to/from memory */ | 2842 | /* error when transferring data to/from memory */ |
| 2843 | qc->err_mask |= AC_ERR_HOST_BUS; | 2843 | qc->err_mask |= AC_ERR_HOST_BUS; |
| 2844 | ap->hsm_task_state = HSM_ST_ERR; | 2844 | ap->hsm_task_state = HSM_ST_ERR; |
| 2845 | } | 2845 | } |
| @@ -3032,7 +3032,7 @@ void ata_bmdma_start(struct ata_queued_cmd *qc) | |||
| 3032 | * Or maybe I'm just being paranoid. | 3032 | * Or maybe I'm just being paranoid. |
| 3033 | * | 3033 | * |
| 3034 | * FIXME: The posting of this write means I/O starts are | 3034 | * FIXME: The posting of this write means I/O starts are |
| 3035 | * unneccessarily delayed for MMIO | 3035 | * unnecessarily delayed for MMIO |
| 3036 | */ | 3036 | */ |
| 3037 | } | 3037 | } |
| 3038 | EXPORT_SYMBOL_GPL(ata_bmdma_start); | 3038 | EXPORT_SYMBOL_GPL(ata_bmdma_start); |
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c index 620a07cabe31..b0975a5ad8c4 100644 --- a/drivers/ata/pata_amd.c +++ b/drivers/ata/pata_amd.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | * Power management on ports | 11 | * Power management on ports |
| 12 | * | 12 | * |
| 13 | * | 13 | * |
| 14 | * Documentation publically available. | 14 | * Documentation publicly available. |
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c index 65cee74605b4..719bb73a73e0 100644 --- a/drivers/ata/pata_arasan_cf.c +++ b/drivers/ata/pata_arasan_cf.c | |||
| @@ -385,7 +385,7 @@ static inline int wait4buf(struct arasan_cf_dev *acdev) | |||
| 385 | return -ETIMEDOUT; | 385 | return -ETIMEDOUT; |
| 386 | } | 386 | } |
| 387 | 387 | ||
| 388 | /* Check if PIO Error interrupt has occured */ | 388 | /* Check if PIO Error interrupt has occurred */ |
| 389 | if (acdev->dma_status & ATA_DMA_ERR) | 389 | if (acdev->dma_status & ATA_DMA_ERR) |
| 390 | return -EAGAIN; | 390 | return -EAGAIN; |
| 391 | 391 | ||
| @@ -450,7 +450,7 @@ static int sg_xfer(struct arasan_cf_dev *acdev, struct scatterlist *sg) | |||
| 450 | /* | 450 | /* |
| 451 | * For each sg: | 451 | * For each sg: |
| 452 | * MAX_XFER_COUNT data will be transferred before we get transfer | 452 | * MAX_XFER_COUNT data will be transferred before we get transfer |
| 453 | * complete interrupt. Inbetween after FIFO_SIZE data | 453 | * complete interrupt. Between after FIFO_SIZE data |
| 454 | * buffer available interrupt will be generated. At this time we will | 454 | * buffer available interrupt will be generated. At this time we will |
| 455 | * fill FIFO again: max FIFO_SIZE data. | 455 | * fill FIFO again: max FIFO_SIZE data. |
| 456 | */ | 456 | */ |
| @@ -463,7 +463,7 @@ static int sg_xfer(struct arasan_cf_dev *acdev, struct scatterlist *sg) | |||
| 463 | acdev->vbase + XFER_CTR); | 463 | acdev->vbase + XFER_CTR); |
| 464 | spin_unlock_irqrestore(&acdev->host->lock, flags); | 464 | spin_unlock_irqrestore(&acdev->host->lock, flags); |
| 465 | 465 | ||
| 466 | /* continue dma xfers untill current sg is completed */ | 466 | /* continue dma xfers until current sg is completed */ |
| 467 | while (xfer_cnt) { | 467 | while (xfer_cnt) { |
| 468 | /* wait for read to complete */ | 468 | /* wait for read to complete */ |
| 469 | if (!write) { | 469 | if (!write) { |
| @@ -563,7 +563,7 @@ static void data_xfer(struct work_struct *work) | |||
| 563 | 563 | ||
| 564 | chan_request_fail: | 564 | chan_request_fail: |
| 565 | spin_lock_irqsave(&acdev->host->lock, flags); | 565 | spin_lock_irqsave(&acdev->host->lock, flags); |
| 566 | /* error when transfering data to/from memory */ | 566 | /* error when transferring data to/from memory */ |
| 567 | qc->err_mask |= AC_ERR_HOST_BUS; | 567 | qc->err_mask |= AC_ERR_HOST_BUS; |
| 568 | qc->ap->hsm_task_state = HSM_ST_ERR; | 568 | qc->ap->hsm_task_state = HSM_ST_ERR; |
| 569 | 569 | ||
diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c index e0b58b8dfe6f..ea64967000ff 100644 --- a/drivers/ata/pata_bf54x.c +++ b/drivers/ata/pata_bf54x.c | |||
| @@ -1342,7 +1342,7 @@ static unsigned int bfin_ata_host_intr(struct ata_port *ap, | |||
| 1342 | ap->ops->bmdma_stop(qc); | 1342 | ap->ops->bmdma_stop(qc); |
| 1343 | 1343 | ||
| 1344 | if (unlikely(host_stat & ATA_DMA_ERR)) { | 1344 | if (unlikely(host_stat & ATA_DMA_ERR)) { |
| 1345 | /* error when transfering data to/from memory */ | 1345 | /* error when transferring data to/from memory */ |
| 1346 | qc->err_mask |= AC_ERR_HOST_BUS; | 1346 | qc->err_mask |= AC_ERR_HOST_BUS; |
| 1347 | ap->hsm_task_state = HSM_ST_ERR; | 1347 | ap->hsm_task_state = HSM_ST_ERR; |
| 1348 | } | 1348 | } |
diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c index 030952f1f97c..e3254fcff0f1 100644 --- a/drivers/ata/pata_cs5520.c +++ b/drivers/ata/pata_cs5520.c | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | * General Public License for more details. | 29 | * General Public License for more details. |
| 30 | * | 30 | * |
| 31 | * Documentation: | 31 | * Documentation: |
| 32 | * Not publically available. | 32 | * Not publicly available. |
| 33 | */ | 33 | */ |
| 34 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
| 35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
diff --git a/drivers/ata/pata_mpiix.c b/drivers/ata/pata_mpiix.c index b21f0021f54a..d8d9c5807740 100644 --- a/drivers/ata/pata_mpiix.c +++ b/drivers/ata/pata_mpiix.c | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | * with PCI IDE and also that we do not disable the device when our driver is | 15 | * with PCI IDE and also that we do not disable the device when our driver is |
| 16 | * unloaded (as it has many other functions). | 16 | * unloaded (as it has many other functions). |
| 17 | * | 17 | * |
| 18 | * The driver conciously keeps this logic internally to avoid pushing quirky | 18 | * The driver consciously keeps this logic internally to avoid pushing quirky |
| 19 | * PATA history into the clean libata layer. | 19 | * PATA history into the clean libata layer. |
| 20 | * | 20 | * |
| 21 | * Thinkpad specific note: If you boot an MPIIX using a thinkpad with a PCMCIA | 21 | * Thinkpad specific note: If you boot an MPIIX using a thinkpad with a PCMCIA |
diff --git a/drivers/ata/pata_palmld.c b/drivers/ata/pata_palmld.c index a2a73d953840..b86d7e22595e 100644 --- a/drivers/ata/pata_palmld.c +++ b/drivers/ata/pata_palmld.c | |||
| @@ -33,6 +33,11 @@ | |||
| 33 | 33 | ||
| 34 | #define DRV_NAME "pata_palmld" | 34 | #define DRV_NAME "pata_palmld" |
| 35 | 35 | ||
| 36 | static struct gpio palmld_hdd_gpios[] = { | ||
| 37 | { GPIO_NR_PALMLD_IDE_PWEN, GPIOF_INIT_HIGH, "HDD Power" }, | ||
| 38 | { GPIO_NR_PALMLD_IDE_RESET, GPIOF_INIT_LOW, "HDD Reset" }, | ||
| 39 | }; | ||
| 40 | |||
| 36 | static struct scsi_host_template palmld_sht = { | 41 | static struct scsi_host_template palmld_sht = { |
| 37 | ATA_PIO_SHT(DRV_NAME), | 42 | ATA_PIO_SHT(DRV_NAME), |
| 38 | }; | 43 | }; |
| @@ -52,28 +57,23 @@ static __devinit int palmld_pata_probe(struct platform_device *pdev) | |||
| 52 | 57 | ||
| 53 | /* allocate host */ | 58 | /* allocate host */ |
| 54 | host = ata_host_alloc(&pdev->dev, 1); | 59 | host = ata_host_alloc(&pdev->dev, 1); |
| 55 | if (!host) | 60 | if (!host) { |
| 56 | return -ENOMEM; | 61 | ret = -ENOMEM; |
| 62 | goto err1; | ||
| 63 | } | ||
| 57 | 64 | ||
| 58 | /* remap drive's physical memory address */ | 65 | /* remap drive's physical memory address */ |
| 59 | mem = devm_ioremap(&pdev->dev, PALMLD_IDE_PHYS, 0x1000); | 66 | mem = devm_ioremap(&pdev->dev, PALMLD_IDE_PHYS, 0x1000); |
| 60 | if (!mem) | 67 | if (!mem) { |
| 61 | return -ENOMEM; | 68 | ret = -ENOMEM; |
| 69 | goto err1; | ||
| 70 | } | ||
| 62 | 71 | ||
| 63 | /* request and activate power GPIO, IRQ GPIO */ | 72 | /* request and activate power GPIO, IRQ GPIO */ |
| 64 | ret = gpio_request(GPIO_NR_PALMLD_IDE_PWEN, "HDD PWR"); | 73 | ret = gpio_request_array(palmld_hdd_gpios, |
| 74 | ARRAY_SIZE(palmld_hdd_gpios)); | ||
| 65 | if (ret) | 75 | if (ret) |
| 66 | goto err1; | 76 | goto err1; |
| 67 | ret = gpio_direction_output(GPIO_NR_PALMLD_IDE_PWEN, 1); | ||
| 68 | if (ret) | ||
| 69 | goto err2; | ||
| 70 | |||
| 71 | ret = gpio_request(GPIO_NR_PALMLD_IDE_RESET, "HDD RST"); | ||
| 72 | if (ret) | ||
| 73 | goto err2; | ||
| 74 | ret = gpio_direction_output(GPIO_NR_PALMLD_IDE_RESET, 0); | ||
| 75 | if (ret) | ||
| 76 | goto err3; | ||
| 77 | 77 | ||
| 78 | /* reset the drive */ | 78 | /* reset the drive */ |
| 79 | gpio_set_value(GPIO_NR_PALMLD_IDE_RESET, 0); | 79 | gpio_set_value(GPIO_NR_PALMLD_IDE_RESET, 0); |
| @@ -96,13 +96,15 @@ static __devinit int palmld_pata_probe(struct platform_device *pdev) | |||
| 96 | ata_sff_std_ports(&ap->ioaddr); | 96 | ata_sff_std_ports(&ap->ioaddr); |
| 97 | 97 | ||
| 98 | /* activate host */ | 98 | /* activate host */ |
| 99 | return ata_host_activate(host, 0, NULL, IRQF_TRIGGER_RISING, | 99 | ret = ata_host_activate(host, 0, NULL, IRQF_TRIGGER_RISING, |
| 100 | &palmld_sht); | 100 | &palmld_sht); |
| 101 | if (ret) | ||
| 102 | goto err2; | ||
| 103 | |||
| 104 | return ret; | ||
| 101 | 105 | ||
| 102 | err3: | ||
| 103 | gpio_free(GPIO_NR_PALMLD_IDE_RESET); | ||
| 104 | err2: | 106 | err2: |
| 105 | gpio_free(GPIO_NR_PALMLD_IDE_PWEN); | 107 | gpio_free_array(palmld_hdd_gpios, ARRAY_SIZE(palmld_hdd_gpios)); |
| 106 | err1: | 108 | err1: |
| 107 | return ret; | 109 | return ret; |
| 108 | } | 110 | } |
| @@ -116,8 +118,7 @@ static __devexit int palmld_pata_remove(struct platform_device *dev) | |||
| 116 | /* power down the HDD */ | 118 | /* power down the HDD */ |
| 117 | gpio_set_value(GPIO_NR_PALMLD_IDE_PWEN, 0); | 119 | gpio_set_value(GPIO_NR_PALMLD_IDE_PWEN, 0); |
| 118 | 120 | ||
| 119 | gpio_free(GPIO_NR_PALMLD_IDE_RESET); | 121 | gpio_free_array(palmld_hdd_gpios, ARRAY_SIZE(palmld_hdd_gpios)); |
| 120 | gpio_free(GPIO_NR_PALMLD_IDE_PWEN); | ||
| 121 | 122 | ||
| 122 | return 0; | 123 | return 0; |
| 123 | } | 124 | } |
diff --git a/drivers/ata/pata_rz1000.c b/drivers/ata/pata_rz1000.c index 4a454a88aa9d..4d04471794b6 100644 --- a/drivers/ata/pata_rz1000.c +++ b/drivers/ata/pata_rz1000.c | |||
| @@ -112,7 +112,7 @@ static int rz1000_reinit_one(struct pci_dev *pdev) | |||
| 112 | if (rc) | 112 | if (rc) |
| 113 | return rc; | 113 | return rc; |
| 114 | 114 | ||
| 115 | /* If this fails on resume (which is a "cant happen" case), we | 115 | /* If this fails on resume (which is a "can't happen" case), we |
| 116 | must stop as any progress risks data loss */ | 116 | must stop as any progress risks data loss */ |
| 117 | if (rz1000_fifo_disable(pdev)) | 117 | if (rz1000_fifo_disable(pdev)) |
| 118 | panic("rz1000 fifo"); | 118 | panic("rz1000 fifo"); |
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c index 00eefbd84b33..118787caa93f 100644 --- a/drivers/ata/pata_sil680.c +++ b/drivers/ata/pata_sil680.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | * | 11 | * |
| 12 | * May be copied or modified under the terms of the GNU General Public License | 12 | * May be copied or modified under the terms of the GNU General Public License |
| 13 | * | 13 | * |
| 14 | * Documentation publically available. | 14 | * Documentation publicly available. |
| 15 | * | 15 | * |
| 16 | * If you have strange problems with nVidia chipset systems please | 16 | * If you have strange problems with nVidia chipset systems please |
| 17 | * see the SI support documentation and update your system BIOS | 17 | * see the SI support documentation and update your system BIOS |
| @@ -43,7 +43,7 @@ | |||
| 43 | * | 43 | * |
| 44 | * Turn a config register offset into the right address in either | 44 | * Turn a config register offset into the right address in either |
| 45 | * PCI space or MMIO space to access the control register in question | 45 | * PCI space or MMIO space to access the control register in question |
| 46 | * Thankfully this is a configuration operation so isnt performance | 46 | * Thankfully this is a configuration operation so isn't performance |
| 47 | * criticial. | 47 | * criticial. |
| 48 | */ | 48 | */ |
| 49 | 49 | ||
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c index c04abc393fc5..be08ff92db17 100644 --- a/drivers/ata/pata_sis.c +++ b/drivers/ata/pata_sis.c | |||
| @@ -331,7 +331,7 @@ static void sis_old_set_dmamode (struct ata_port *ap, struct ata_device *adev) | |||
| 331 | 331 | ||
| 332 | if (adev->dma_mode < XFER_UDMA_0) { | 332 | if (adev->dma_mode < XFER_UDMA_0) { |
| 333 | /* bits 3-0 hold recovery timing bits 8-10 active timing and | 333 | /* bits 3-0 hold recovery timing bits 8-10 active timing and |
| 334 | the higher bits are dependant on the device */ | 334 | the higher bits are dependent on the device */ |
| 335 | timing &= ~0x870F; | 335 | timing &= ~0x870F; |
| 336 | timing |= mwdma_bits[speed]; | 336 | timing |= mwdma_bits[speed]; |
| 337 | } else { | 337 | } else { |
| @@ -371,7 +371,7 @@ static void sis_66_set_dmamode (struct ata_port *ap, struct ata_device *adev) | |||
| 371 | 371 | ||
| 372 | if (adev->dma_mode < XFER_UDMA_0) { | 372 | if (adev->dma_mode < XFER_UDMA_0) { |
| 373 | /* bits 3-0 hold recovery timing bits 8-10 active timing and | 373 | /* bits 3-0 hold recovery timing bits 8-10 active timing and |
| 374 | the higher bits are dependant on the device, bit 15 udma */ | 374 | the higher bits are dependent on the device, bit 15 udma */ |
| 375 | timing &= ~0x870F; | 375 | timing &= ~0x870F; |
| 376 | timing |= mwdma_bits[speed]; | 376 | timing |= mwdma_bits[speed]; |
| 377 | } else { | 377 | } else { |
diff --git a/drivers/ata/pata_triflex.c b/drivers/ata/pata_triflex.c index 0d1f89e571dd..03b6d69d6197 100644 --- a/drivers/ata/pata_triflex.c +++ b/drivers/ata/pata_triflex.c | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | * Loosely based on the piix & svwks drivers. | 30 | * Loosely based on the piix & svwks drivers. |
| 31 | * | 31 | * |
| 32 | * Documentation: | 32 | * Documentation: |
| 33 | * Not publically available. | 33 | * Not publicly available. |
| 34 | */ | 34 | */ |
| 35 | 35 | ||
| 36 | #include <linux/kernel.h> | 36 | #include <linux/kernel.h> |
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index 0f91e583892e..35a71d875d0e 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c | |||
| @@ -42,7 +42,7 @@ enum { | |||
| 42 | 42 | ||
| 43 | /* | 43 | /* |
| 44 | * SATA-FSL host controller supports a max. of (15+1) direct PRDEs, and | 44 | * SATA-FSL host controller supports a max. of (15+1) direct PRDEs, and |
| 45 | * chained indirect PRDEs upto a max count of 63. | 45 | * chained indirect PRDEs up to a max count of 63. |
| 46 | * We are allocating an array of 63 PRDEs contiguously, but PRDE#15 will | 46 | * We are allocating an array of 63 PRDEs contiguously, but PRDE#15 will |
| 47 | * be setup as an indirect descriptor, pointing to it's next | 47 | * be setup as an indirect descriptor, pointing to it's next |
| 48 | * (contiguous) PRDE. Though chained indirect PRDE arrays are | 48 | * (contiguous) PRDE. Though chained indirect PRDE arrays are |
| @@ -907,7 +907,7 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, | |||
| 907 | ata_msleep(ap, 1); | 907 | ata_msleep(ap, 1); |
| 908 | 908 | ||
| 909 | /* | 909 | /* |
| 910 | * SATA device enters reset state after receving a Control register | 910 | * SATA device enters reset state after receiving a Control register |
| 911 | * FIS with SRST bit asserted and it awaits another H2D Control reg. | 911 | * FIS with SRST bit asserted and it awaits another H2D Control reg. |
| 912 | * FIS with SRST bit cleared, then the device does internal diags & | 912 | * FIS with SRST bit cleared, then the device does internal diags & |
| 913 | * initialization, followed by indicating it's initialization status | 913 | * initialization, followed by indicating it's initialization status |
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index cd40651e9b72..b52c0519ad0b 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
| @@ -1352,7 +1352,7 @@ static int mv_scr_write(struct ata_link *link, unsigned int sc_reg_in, u32 val) | |||
| 1352 | /* | 1352 | /* |
| 1353 | * Workaround for 88SX60x1 FEr SATA#26: | 1353 | * Workaround for 88SX60x1 FEr SATA#26: |
| 1354 | * | 1354 | * |
| 1355 | * COMRESETs have to take care not to accidently | 1355 | * COMRESETs have to take care not to accidentally |
| 1356 | * put the drive to sleep when writing SCR_CONTROL. | 1356 | * put the drive to sleep when writing SCR_CONTROL. |
| 1357 | * Setting bits 12..15 prevents this problem. | 1357 | * Setting bits 12..15 prevents this problem. |
| 1358 | * | 1358 | * |
| @@ -2044,7 +2044,7 @@ static void mv_qc_prep(struct ata_queued_cmd *qc) | |||
| 2044 | 2044 | ||
| 2045 | cw = &pp->crqb[in_index].ata_cmd[0]; | 2045 | cw = &pp->crqb[in_index].ata_cmd[0]; |
| 2046 | 2046 | ||
| 2047 | /* Sadly, the CRQB cannot accomodate all registers--there are | 2047 | /* Sadly, the CRQB cannot accommodate all registers--there are |
| 2048 | * only 11 bytes...so we must pick and choose required | 2048 | * only 11 bytes...so we must pick and choose required |
| 2049 | * registers based on the command. So, we drop feature and | 2049 | * registers based on the command. So, we drop feature and |
| 2050 | * hob_feature for [RW] DMA commands, but they are needed for | 2050 | * hob_feature for [RW] DMA commands, but they are needed for |
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index 42344e3c686d..f173ef3bfc10 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c | |||
| @@ -2121,7 +2121,7 @@ static int nv_swncq_sdbfis(struct ata_port *ap) | |||
| 2121 | 2121 | ||
| 2122 | host_stat = ap->ops->bmdma_status(ap); | 2122 | host_stat = ap->ops->bmdma_status(ap); |
| 2123 | if (unlikely(host_stat & ATA_DMA_ERR)) { | 2123 | if (unlikely(host_stat & ATA_DMA_ERR)) { |
| 2124 | /* error when transfering data to/from memory */ | 2124 | /* error when transferring data to/from memory */ |
| 2125 | ata_ehi_clear_desc(ehi); | 2125 | ata_ehi_clear_desc(ehi); |
| 2126 | ata_ehi_push_desc(ehi, "BMDMA stat 0x%x", host_stat); | 2126 | ata_ehi_push_desc(ehi, "BMDMA stat 0x%x", host_stat); |
| 2127 | ehi->err_mask |= AC_ERR_HOST_BUS; | 2127 | ehi->err_mask |= AC_ERR_HOST_BUS; |
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c index 21242c5709a0..54434db15b12 100644 --- a/drivers/ata/sata_via.c +++ b/drivers/ata/sata_via.c | |||
| @@ -582,7 +582,7 @@ static void svia_configure(struct pci_dev *pdev, int board_id) | |||
| 582 | * When host issues HOLD, device may send up to 20DW of data | 582 | * When host issues HOLD, device may send up to 20DW of data |
| 583 | * before acknowledging it with HOLDA and the host should be | 583 | * before acknowledging it with HOLDA and the host should be |
| 584 | * able to buffer them in FIFO. Unfortunately, some WD drives | 584 | * able to buffer them in FIFO. Unfortunately, some WD drives |
| 585 | * send upto 40DW before acknowledging HOLD and, in the | 585 | * send up to 40DW before acknowledging HOLD and, in the |
| 586 | * default configuration, this ends up overflowing vt6421's | 586 | * default configuration, this ends up overflowing vt6421's |
| 587 | * FIFO, making the controller abort the transaction with | 587 | * FIFO, making the controller abort the transaction with |
| 588 | * R_ERR. | 588 | * R_ERR. |
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c index 9f47e8625266..a5fcb1eb862f 100644 --- a/drivers/atm/ambassador.c +++ b/drivers/atm/ambassador.c | |||
| @@ -497,7 +497,7 @@ static void rx_complete (amb_dev * dev, rx_out * rx) { | |||
| 497 | // VC layer stats | 497 | // VC layer stats |
| 498 | atomic_inc(&atm_vcc->stats->rx); | 498 | atomic_inc(&atm_vcc->stats->rx); |
| 499 | __net_timestamp(skb); | 499 | __net_timestamp(skb); |
| 500 | // end of our responsability | 500 | // end of our responsibility |
| 501 | atm_vcc->push (atm_vcc, skb); | 501 | atm_vcc->push (atm_vcc, skb); |
| 502 | return; | 502 | return; |
| 503 | 503 | ||
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index 049650d42c88..ef7a658312a6 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c | |||
| @@ -1782,7 +1782,7 @@ static int __devinit fs_init (struct fs_dev *dev) | |||
| 1782 | write_fs (dev, RAS0, RAS0_DCD_XHLT | 1782 | write_fs (dev, RAS0, RAS0_DCD_XHLT |
| 1783 | | (((1 << FS155_VPI_BITS) - 1) * RAS0_VPSEL) | 1783 | | (((1 << FS155_VPI_BITS) - 1) * RAS0_VPSEL) |
| 1784 | | (((1 << FS155_VCI_BITS) - 1) * RAS0_VCSEL)); | 1784 | | (((1 << FS155_VCI_BITS) - 1) * RAS0_VCSEL)); |
| 1785 | /* We can chose the split arbitarily. We might be able to | 1785 | /* We can chose the split arbitrarily. We might be able to |
| 1786 | support more. Whatever. This should do for now. */ | 1786 | support more. Whatever. This should do for now. */ |
| 1787 | dev->atm_dev->ci_range.vpi_bits = FS155_VPI_BITS; | 1787 | dev->atm_dev->ci_range.vpi_bits = FS155_VPI_BITS; |
| 1788 | dev->atm_dev->ci_range.vci_bits = FS155_VCI_BITS; | 1788 | dev->atm_dev->ci_range.vci_bits = FS155_VCI_BITS; |
diff --git a/drivers/atm/fore200e.h b/drivers/atm/fore200e.h index 7f97c09aaea5..ba34a02b717d 100644 --- a/drivers/atm/fore200e.h +++ b/drivers/atm/fore200e.h | |||
| @@ -263,7 +263,7 @@ typedef enum opcode { | |||
| 263 | } opcode_t; | 263 | } opcode_t; |
| 264 | 264 | ||
| 265 | 265 | ||
| 266 | /* virtual path / virtual channel identifers */ | 266 | /* virtual path / virtual channel identifiers */ |
| 267 | 267 | ||
| 268 | typedef struct vpvc { | 268 | typedef struct vpvc { |
| 269 | BITFIELD3( | 269 | BITFIELD3( |
| @@ -926,7 +926,7 @@ typedef struct fore200e_vcc { | |||
| 926 | 926 | ||
| 927 | #define PCA200E_PCI_LATENCY 0x40 /* maximum slave latenty */ | 927 | #define PCA200E_PCI_LATENCY 0x40 /* maximum slave latenty */ |
| 928 | #define PCA200E_PCI_MASTER_CTRL 0x41 /* master control */ | 928 | #define PCA200E_PCI_MASTER_CTRL 0x41 /* master control */ |
| 929 | #define PCA200E_PCI_THRESHOLD 0x42 /* burst / continous req threshold */ | 929 | #define PCA200E_PCI_THRESHOLD 0x42 /* burst / continuous req threshold */ |
| 930 | 930 | ||
| 931 | /* PBI master control register */ | 931 | /* PBI master control register */ |
| 932 | 932 | ||
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c index 24761e1d6642..d58e3fcb9db3 100644 --- a/drivers/atm/horizon.c +++ b/drivers/atm/horizon.c | |||
| @@ -169,13 +169,13 @@ static inline void __init show_version (void) { | |||
| 169 | Real Time (cdv and max CDT given) | 169 | Real Time (cdv and max CDT given) |
| 170 | 170 | ||
| 171 | CBR(pcr) pcr bandwidth always available | 171 | CBR(pcr) pcr bandwidth always available |
| 172 | rtVBR(pcr,scr,mbs) scr bandwidth always available, upto pcr at mbs too | 172 | rtVBR(pcr,scr,mbs) scr bandwidth always available, up to pcr at mbs too |
| 173 | 173 | ||
| 174 | Non Real Time | 174 | Non Real Time |
| 175 | 175 | ||
| 176 | nrtVBR(pcr,scr,mbs) scr bandwidth always available, upto pcr at mbs too | 176 | nrtVBR(pcr,scr,mbs) scr bandwidth always available, up to pcr at mbs too |
| 177 | UBR() | 177 | UBR() |
| 178 | ABR(mcr,pcr) mcr bandwidth always available, upto pcr (depending) too | 178 | ABR(mcr,pcr) mcr bandwidth always available, up to pcr (depending) too |
| 179 | 179 | ||
| 180 | mbs is max burst size (bucket) | 180 | mbs is max burst size (bucket) |
| 181 | pcr and scr have associated cdvt values | 181 | pcr and scr have associated cdvt values |
| @@ -944,7 +944,7 @@ static void hrz_close_rx (hrz_dev * dev, u16 vc) { | |||
| 944 | // to be fixed soon, so do not define TAILRECUSRIONWORKS unless you | 944 | // to be fixed soon, so do not define TAILRECUSRIONWORKS unless you |
| 945 | // are sure it does as you may otherwise overflow the kernel stack. | 945 | // are sure it does as you may otherwise overflow the kernel stack. |
| 946 | 946 | ||
| 947 | // giving this fn a return value would help GCC, alledgedly | 947 | // giving this fn a return value would help GCC, allegedly |
| 948 | 948 | ||
| 949 | static void rx_schedule (hrz_dev * dev, int irq) { | 949 | static void rx_schedule (hrz_dev * dev, int irq) { |
| 950 | unsigned int rx_bytes; | 950 | unsigned int rx_bytes; |
| @@ -1036,7 +1036,7 @@ static void rx_schedule (hrz_dev * dev, int irq) { | |||
| 1036 | // VC layer stats | 1036 | // VC layer stats |
| 1037 | atomic_inc(&vcc->stats->rx); | 1037 | atomic_inc(&vcc->stats->rx); |
| 1038 | __net_timestamp(skb); | 1038 | __net_timestamp(skb); |
| 1039 | // end of our responsability | 1039 | // end of our responsibility |
| 1040 | vcc->push (vcc, skb); | 1040 | vcc->push (vcc, skb); |
| 1041 | } | 1041 | } |
| 1042 | } | 1042 | } |
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c index bfb7feee0400..048f99fe6f83 100644 --- a/drivers/atm/idt77252.c +++ b/drivers/atm/idt77252.c | |||
| @@ -3495,7 +3495,7 @@ init_card(struct atm_dev *dev) | |||
| 3495 | return -1; | 3495 | return -1; |
| 3496 | } | 3496 | } |
| 3497 | if (dev->phy->ioctl == NULL) { | 3497 | if (dev->phy->ioctl == NULL) { |
| 3498 | printk("%s: LT had no IOCTL funtion defined.\n", card->name); | 3498 | printk("%s: LT had no IOCTL function defined.\n", card->name); |
| 3499 | deinit_card(card); | 3499 | deinit_card(card); |
| 3500 | return -1; | 3500 | return -1; |
| 3501 | } | 3501 | } |
diff --git a/drivers/atm/idt77252.h b/drivers/atm/idt77252.h index f53a43ae2bbe..3a82cc23a053 100644 --- a/drivers/atm/idt77252.h +++ b/drivers/atm/idt77252.h | |||
| @@ -766,7 +766,7 @@ struct idt77252_dev | |||
| 766 | #define SAR_RCTE_BUFFSTAT_MASK 0x00003000 /* buffer status */ | 766 | #define SAR_RCTE_BUFFSTAT_MASK 0x00003000 /* buffer status */ |
| 767 | #define SAR_RCTE_EFCI 0x00000800 /* EFCI Congestion flag */ | 767 | #define SAR_RCTE_EFCI 0x00000800 /* EFCI Congestion flag */ |
| 768 | #define SAR_RCTE_CLP 0x00000400 /* Cell Loss Priority flag */ | 768 | #define SAR_RCTE_CLP 0x00000400 /* Cell Loss Priority flag */ |
| 769 | #define SAR_RCTE_CRC 0x00000200 /* Recieved CRC Error */ | 769 | #define SAR_RCTE_CRC 0x00000200 /* Received CRC Error */ |
| 770 | #define SAR_RCTE_CELLCNT_MASK 0x000001FF /* cell Count */ | 770 | #define SAR_RCTE_CELLCNT_MASK 0x000001FF /* cell Count */ |
| 771 | 771 | ||
| 772 | #define SAR_RCTE_AAL0 0x00000000 /* AAL types for ALL field */ | 772 | #define SAR_RCTE_AAL0 0x00000000 /* AAL types for ALL field */ |
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index d80d51b62a1a..1c674a91f146 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c | |||
| @@ -1025,7 +1025,7 @@ static void desc_dbg(IADEV *iadev) { | |||
| 1025 | } | 1025 | } |
| 1026 | 1026 | ||
| 1027 | 1027 | ||
| 1028 | /*----------------------------- Recieving side stuff --------------------------*/ | 1028 | /*----------------------------- Receiving side stuff --------------------------*/ |
| 1029 | 1029 | ||
| 1030 | static void rx_excp_rcvd(struct atm_dev *dev) | 1030 | static void rx_excp_rcvd(struct atm_dev *dev) |
| 1031 | { | 1031 | { |
| @@ -1195,7 +1195,7 @@ static void rx_intr(struct atm_dev *dev) | |||
| 1195 | if (status & RX_PKT_RCVD) | 1195 | if (status & RX_PKT_RCVD) |
| 1196 | { | 1196 | { |
| 1197 | /* do something */ | 1197 | /* do something */ |
| 1198 | /* Basically recvd an interrupt for receving a packet. | 1198 | /* Basically recvd an interrupt for receiving a packet. |
| 1199 | A descriptor would have been written to the packet complete | 1199 | A descriptor would have been written to the packet complete |
| 1200 | queue. Get all the descriptors and set up dma to move the | 1200 | queue. Get all the descriptors and set up dma to move the |
| 1201 | packets till the packet complete queue is empty.. | 1201 | packets till the packet complete queue is empty.. |
| @@ -1855,7 +1855,7 @@ static int open_tx(struct atm_vcc *vcc) | |||
| 1855 | return -EINVAL; | 1855 | return -EINVAL; |
| 1856 | } | 1856 | } |
| 1857 | if (vcc->qos.txtp.max_pcr > iadev->LineRate) { | 1857 | if (vcc->qos.txtp.max_pcr > iadev->LineRate) { |
| 1858 | IF_CBR(printk("PCR is not availble\n");) | 1858 | IF_CBR(printk("PCR is not available\n");) |
| 1859 | return -1; | 1859 | return -1; |
| 1860 | } | 1860 | } |
| 1861 | vc->type = CBR; | 1861 | vc->type = CBR; |
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c index 52880c8387d8..4e8ba56f75d3 100644 --- a/drivers/atm/lanai.c +++ b/drivers/atm/lanai.c | |||
| @@ -1255,7 +1255,7 @@ static inline void lanai_endtx(struct lanai_dev *lanai, | |||
| 1255 | /* | 1255 | /* |
| 1256 | * Since the "butt register" is a shared resounce on the card we | 1256 | * Since the "butt register" is a shared resounce on the card we |
| 1257 | * serialize all accesses to it through this spinlock. This is | 1257 | * serialize all accesses to it through this spinlock. This is |
| 1258 | * mostly just paranoia sicne the register is rarely "busy" anyway | 1258 | * mostly just paranoia since the register is rarely "busy" anyway |
| 1259 | * but is needed for correctness. | 1259 | * but is needed for correctness. |
| 1260 | */ | 1260 | */ |
| 1261 | spin_lock(&lanai->endtxlock); | 1261 | spin_lock(&lanai->endtxlock); |
| @@ -1990,7 +1990,7 @@ static int __devinit lanai_pci_start(struct lanai_dev *lanai) | |||
| 1990 | 1990 | ||
| 1991 | /* | 1991 | /* |
| 1992 | * We _can_ use VCI==0 for normal traffic, but only for UBR (or we'll | 1992 | * We _can_ use VCI==0 for normal traffic, but only for UBR (or we'll |
| 1993 | * get a CBRZERO interrupt), and we can use it only if noone is receiving | 1993 | * get a CBRZERO interrupt), and we can use it only if no one is receiving |
| 1994 | * AAL0 traffic (since they will use the same queue) - according to the | 1994 | * AAL0 traffic (since they will use the same queue) - according to the |
| 1995 | * docs we shouldn't even use it for AAL0 traffic | 1995 | * docs we shouldn't even use it for AAL0 traffic |
| 1996 | */ | 1996 | */ |
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c index 25ef1a4556e6..cd0ff66469b2 100644 --- a/drivers/atm/solos-pci.c +++ b/drivers/atm/solos-pci.c | |||
| @@ -165,7 +165,6 @@ static uint32_t fpga_tx(struct solos_card *); | |||
| 165 | static irqreturn_t solos_irq(int irq, void *dev_id); | 165 | static irqreturn_t solos_irq(int irq, void *dev_id); |
| 166 | static struct atm_vcc* find_vcc(struct atm_dev *dev, short vpi, int vci); | 166 | static struct atm_vcc* find_vcc(struct atm_dev *dev, short vpi, int vci); |
| 167 | static int list_vccs(int vci); | 167 | static int list_vccs(int vci); |
| 168 | static void release_vccs(struct atm_dev *dev); | ||
| 169 | static int atm_init(struct solos_card *, struct device *); | 168 | static int atm_init(struct solos_card *, struct device *); |
| 170 | static void atm_remove(struct solos_card *); | 169 | static void atm_remove(struct solos_card *); |
| 171 | static int send_command(struct solos_card *card, int dev, const char *buf, size_t size); | 170 | static int send_command(struct solos_card *card, int dev, const char *buf, size_t size); |
| @@ -384,7 +383,6 @@ static int process_status(struct solos_card *card, int port, struct sk_buff *skb | |||
| 384 | /* Anything but 'Showtime' is down */ | 383 | /* Anything but 'Showtime' is down */ |
| 385 | if (strcmp(state_str, "Showtime")) { | 384 | if (strcmp(state_str, "Showtime")) { |
| 386 | atm_dev_signal_change(card->atmdev[port], ATM_PHY_SIG_LOST); | 385 | atm_dev_signal_change(card->atmdev[port], ATM_PHY_SIG_LOST); |
| 387 | release_vccs(card->atmdev[port]); | ||
| 388 | dev_info(&card->dev->dev, "Port %d: %s\n", port, state_str); | 386 | dev_info(&card->dev->dev, "Port %d: %s\n", port, state_str); |
| 389 | return 0; | 387 | return 0; |
| 390 | } | 388 | } |
| @@ -697,7 +695,7 @@ void solos_bh(unsigned long card_arg) | |||
| 697 | size); | 695 | size); |
| 698 | } | 696 | } |
| 699 | if (atmdebug) { | 697 | if (atmdebug) { |
| 700 | dev_info(&card->dev->dev, "Received: device %d\n", port); | 698 | dev_info(&card->dev->dev, "Received: port %d\n", port); |
| 701 | dev_info(&card->dev->dev, "size: %d VPI: %d VCI: %d\n", | 699 | dev_info(&card->dev->dev, "size: %d VPI: %d VCI: %d\n", |
| 702 | size, le16_to_cpu(header->vpi), | 700 | size, le16_to_cpu(header->vpi), |
| 703 | le16_to_cpu(header->vci)); | 701 | le16_to_cpu(header->vci)); |
| @@ -710,8 +708,8 @@ void solos_bh(unsigned long card_arg) | |||
| 710 | le16_to_cpu(header->vci)); | 708 | le16_to_cpu(header->vci)); |
| 711 | if (!vcc) { | 709 | if (!vcc) { |
| 712 | if (net_ratelimit()) | 710 | if (net_ratelimit()) |
| 713 | dev_warn(&card->dev->dev, "Received packet for unknown VCI.VPI %d.%d on port %d\n", | 711 | dev_warn(&card->dev->dev, "Received packet for unknown VPI.VCI %d.%d on port %d\n", |
| 714 | le16_to_cpu(header->vci), le16_to_cpu(header->vpi), | 712 | le16_to_cpu(header->vpi), le16_to_cpu(header->vci), |
| 715 | port); | 713 | port); |
| 716 | continue; | 714 | continue; |
| 717 | } | 715 | } |
| @@ -830,28 +828,6 @@ static int list_vccs(int vci) | |||
| 830 | return num_found; | 828 | return num_found; |
| 831 | } | 829 | } |
| 832 | 830 | ||
| 833 | static void release_vccs(struct atm_dev *dev) | ||
| 834 | { | ||
| 835 | int i; | ||
| 836 | |||
| 837 | write_lock_irq(&vcc_sklist_lock); | ||
| 838 | for (i = 0; i < VCC_HTABLE_SIZE; i++) { | ||
| 839 | struct hlist_head *head = &vcc_hash[i]; | ||
| 840 | struct hlist_node *node, *tmp; | ||
| 841 | struct sock *s; | ||
| 842 | struct atm_vcc *vcc; | ||
| 843 | |||
| 844 | sk_for_each_safe(s, node, tmp, head) { | ||
| 845 | vcc = atm_sk(s); | ||
| 846 | if (vcc->dev == dev) { | ||
| 847 | vcc_release_async(vcc, -EPIPE); | ||
| 848 | sk_del_node_init(s); | ||
| 849 | } | ||
| 850 | } | ||
| 851 | } | ||
| 852 | write_unlock_irq(&vcc_sklist_lock); | ||
| 853 | } | ||
| 854 | |||
| 855 | 831 | ||
| 856 | static int popen(struct atm_vcc *vcc) | 832 | static int popen(struct atm_vcc *vcc) |
| 857 | { | 833 | { |
| @@ -1018,8 +994,15 @@ static uint32_t fpga_tx(struct solos_card *card) | |||
| 1018 | 994 | ||
| 1019 | /* Clean up and free oldskb now it's gone */ | 995 | /* Clean up and free oldskb now it's gone */ |
| 1020 | if (atmdebug) { | 996 | if (atmdebug) { |
| 997 | struct pkt_hdr *header = (void *)oldskb->data; | ||
| 998 | int size = le16_to_cpu(header->size); | ||
| 999 | |||
| 1000 | skb_pull(oldskb, sizeof(*header)); | ||
| 1021 | dev_info(&card->dev->dev, "Transmitted: port %d\n", | 1001 | dev_info(&card->dev->dev, "Transmitted: port %d\n", |
| 1022 | port); | 1002 | port); |
| 1003 | dev_info(&card->dev->dev, "size: %d VPI: %d VCI: %d\n", | ||
| 1004 | size, le16_to_cpu(header->vpi), | ||
| 1005 | le16_to_cpu(header->vci)); | ||
| 1023 | print_buffer(oldskb); | 1006 | print_buffer(oldskb); |
| 1024 | } | 1007 | } |
| 1025 | 1008 | ||
| @@ -1262,7 +1245,7 @@ static int atm_init(struct solos_card *card, struct device *parent) | |||
| 1262 | card->atmdev[i]->ci_range.vci_bits = 16; | 1245 | card->atmdev[i]->ci_range.vci_bits = 16; |
| 1263 | card->atmdev[i]->dev_data = card; | 1246 | card->atmdev[i]->dev_data = card; |
| 1264 | card->atmdev[i]->phy_data = (void *)(unsigned long)i; | 1247 | card->atmdev[i]->phy_data = (void *)(unsigned long)i; |
| 1265 | atm_dev_signal_change(card->atmdev[i], ATM_PHY_SIG_UNKNOWN); | 1248 | atm_dev_signal_change(card->atmdev[i], ATM_PHY_SIG_FOUND); |
| 1266 | 1249 | ||
| 1267 | skb = alloc_skb(sizeof(*header), GFP_ATOMIC); | 1250 | skb = alloc_skb(sizeof(*header), GFP_ATOMIC); |
| 1268 | if (!skb) { | 1251 | if (!skb) { |
diff --git a/drivers/auxdisplay/cfag12864b.c b/drivers/auxdisplay/cfag12864b.c index 49758593a5ba..41ce4bd96813 100644 --- a/drivers/auxdisplay/cfag12864b.c +++ b/drivers/auxdisplay/cfag12864b.c | |||
| @@ -49,7 +49,7 @@ | |||
| 49 | static unsigned int cfag12864b_rate = CONFIG_CFAG12864B_RATE; | 49 | static unsigned int cfag12864b_rate = CONFIG_CFAG12864B_RATE; |
| 50 | module_param(cfag12864b_rate, uint, S_IRUGO); | 50 | module_param(cfag12864b_rate, uint, S_IRUGO); |
| 51 | MODULE_PARM_DESC(cfag12864b_rate, | 51 | MODULE_PARM_DESC(cfag12864b_rate, |
| 52 | "Refresh rate (hertzs)"); | 52 | "Refresh rate (hertz)"); |
| 53 | 53 | ||
| 54 | unsigned int cfag12864b_getrate(void) | 54 | unsigned int cfag12864b_getrate(void) |
| 55 | { | 55 | { |
| @@ -60,7 +60,7 @@ unsigned int cfag12864b_getrate(void) | |||
| 60 | * cfag12864b Commands | 60 | * cfag12864b Commands |
| 61 | * | 61 | * |
| 62 | * E = Enable signal | 62 | * E = Enable signal |
| 63 | * Everytime E switch from low to high, | 63 | * Every time E switch from low to high, |
| 64 | * cfag12864b/ks0108 reads the command/data. | 64 | * cfag12864b/ks0108 reads the command/data. |
| 65 | * | 65 | * |
| 66 | * CS1 = First ks0108controller. | 66 | * CS1 = First ks0108controller. |
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index f051cfff18af..9e0e4fc24c46 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
| @@ -149,6 +149,7 @@ static void platform_device_release(struct device *dev) | |||
| 149 | 149 | ||
| 150 | of_device_node_put(&pa->pdev.dev); | 150 | of_device_node_put(&pa->pdev.dev); |
| 151 | kfree(pa->pdev.dev.platform_data); | 151 | kfree(pa->pdev.dev.platform_data); |
| 152 | kfree(pa->pdev.mfd_cell); | ||
| 152 | kfree(pa->pdev.resource); | 153 | kfree(pa->pdev.resource); |
| 153 | kfree(pa); | 154 | kfree(pa); |
| 154 | } | 155 | } |
| @@ -771,7 +772,7 @@ int __weak platform_pm_resume_noirq(struct device *dev) | |||
| 771 | 772 | ||
| 772 | #endif /* !CONFIG_SUSPEND */ | 773 | #endif /* !CONFIG_SUSPEND */ |
| 773 | 774 | ||
| 774 | #ifdef CONFIG_HIBERNATION | 775 | #ifdef CONFIG_HIBERNATE_CALLBACKS |
| 775 | 776 | ||
| 776 | static int platform_pm_freeze(struct device *dev) | 777 | static int platform_pm_freeze(struct device *dev) |
| 777 | { | 778 | { |
| @@ -909,7 +910,7 @@ static int platform_pm_restore_noirq(struct device *dev) | |||
| 909 | return ret; | 910 | return ret; |
| 910 | } | 911 | } |
| 911 | 912 | ||
| 912 | #else /* !CONFIG_HIBERNATION */ | 913 | #else /* !CONFIG_HIBERNATE_CALLBACKS */ |
| 913 | 914 | ||
| 914 | #define platform_pm_freeze NULL | 915 | #define platform_pm_freeze NULL |
| 915 | #define platform_pm_thaw NULL | 916 | #define platform_pm_thaw NULL |
| @@ -920,7 +921,7 @@ static int platform_pm_restore_noirq(struct device *dev) | |||
| 920 | #define platform_pm_poweroff_noirq NULL | 921 | #define platform_pm_poweroff_noirq NULL |
| 921 | #define platform_pm_restore_noirq NULL | 922 | #define platform_pm_restore_noirq NULL |
| 922 | 923 | ||
| 923 | #endif /* !CONFIG_HIBERNATION */ | 924 | #endif /* !CONFIG_HIBERNATE_CALLBACKS */ |
| 924 | 925 | ||
| 925 | #ifdef CONFIG_PM_RUNTIME | 926 | #ifdef CONFIG_PM_RUNTIME |
| 926 | 927 | ||
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 052dc53eef38..fbc5b6e7c591 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
| @@ -233,7 +233,7 @@ static int pm_op(struct device *dev, | |||
| 233 | } | 233 | } |
| 234 | break; | 234 | break; |
| 235 | #endif /* CONFIG_SUSPEND */ | 235 | #endif /* CONFIG_SUSPEND */ |
| 236 | #ifdef CONFIG_HIBERNATION | 236 | #ifdef CONFIG_HIBERNATE_CALLBACKS |
| 237 | case PM_EVENT_FREEZE: | 237 | case PM_EVENT_FREEZE: |
| 238 | case PM_EVENT_QUIESCE: | 238 | case PM_EVENT_QUIESCE: |
| 239 | if (ops->freeze) { | 239 | if (ops->freeze) { |
| @@ -260,7 +260,7 @@ static int pm_op(struct device *dev, | |||
| 260 | suspend_report_result(ops->restore, error); | 260 | suspend_report_result(ops->restore, error); |
| 261 | } | 261 | } |
| 262 | break; | 262 | break; |
| 263 | #endif /* CONFIG_HIBERNATION */ | 263 | #endif /* CONFIG_HIBERNATE_CALLBACKS */ |
| 264 | default: | 264 | default: |
| 265 | error = -EINVAL; | 265 | error = -EINVAL; |
| 266 | } | 266 | } |
| @@ -308,7 +308,7 @@ static int pm_noirq_op(struct device *dev, | |||
| 308 | } | 308 | } |
| 309 | break; | 309 | break; |
| 310 | #endif /* CONFIG_SUSPEND */ | 310 | #endif /* CONFIG_SUSPEND */ |
| 311 | #ifdef CONFIG_HIBERNATION | 311 | #ifdef CONFIG_HIBERNATE_CALLBACKS |
| 312 | case PM_EVENT_FREEZE: | 312 | case PM_EVENT_FREEZE: |
| 313 | case PM_EVENT_QUIESCE: | 313 | case PM_EVENT_QUIESCE: |
| 314 | if (ops->freeze_noirq) { | 314 | if (ops->freeze_noirq) { |
| @@ -335,7 +335,7 @@ static int pm_noirq_op(struct device *dev, | |||
| 335 | suspend_report_result(ops->restore_noirq, error); | 335 | suspend_report_result(ops->restore_noirq, error); |
| 336 | } | 336 | } |
| 337 | break; | 337 | break; |
| 338 | #endif /* CONFIG_HIBERNATION */ | 338 | #endif /* CONFIG_HIBERNATE_CALLBACKS */ |
| 339 | default: | 339 | default: |
| 340 | error = -EINVAL; | 340 | error = -EINVAL; |
| 341 | } | 341 | } |
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index 54597c859ecb..3172c60d23a9 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c | |||
| @@ -443,7 +443,7 @@ static int rpm_suspend(struct device *dev, int rpmflags) | |||
| 443 | * | 443 | * |
| 444 | * Check if the device's run-time PM status allows it to be resumed. Cancel | 444 | * Check if the device's run-time PM status allows it to be resumed. Cancel |
| 445 | * any scheduled or pending requests. If another resume has been started | 445 | * any scheduled or pending requests. If another resume has been started |
| 446 | * earlier, either return imediately or wait for it to finish, depending on the | 446 | * earlier, either return immediately or wait for it to finish, depending on the |
| 447 | * RPM_NOWAIT and RPM_ASYNC flags. Similarly, if there's a suspend running in | 447 | * RPM_NOWAIT and RPM_ASYNC flags. Similarly, if there's a suspend running in |
| 448 | * parallel with this function, either tell the other process to resume after | 448 | * parallel with this function, either tell the other process to resume after |
| 449 | * suspending (deferred_resume) or wait for it to finish. If the RPM_ASYNC | 449 | * suspending (deferred_resume) or wait for it to finish. If the RPM_ASYNC |
diff --git a/drivers/base/sys.c b/drivers/base/sys.c index fbe72da6c414..acde9b5ee131 100644 --- a/drivers/base/sys.c +++ b/drivers/base/sys.c | |||
| @@ -197,7 +197,7 @@ kset_put: | |||
| 197 | } | 197 | } |
| 198 | 198 | ||
| 199 | /** | 199 | /** |
| 200 | * sysdev_driver_register - Register auxillary driver | 200 | * sysdev_driver_register - Register auxiliary driver |
| 201 | * @cls: Device class driver belongs to. | 201 | * @cls: Device class driver belongs to. |
| 202 | * @drv: Driver. | 202 | * @drv: Driver. |
| 203 | * | 203 | * |
| @@ -250,7 +250,7 @@ unlock: | |||
| 250 | } | 250 | } |
| 251 | 251 | ||
| 252 | /** | 252 | /** |
| 253 | * sysdev_driver_unregister - Remove an auxillary driver. | 253 | * sysdev_driver_unregister - Remove an auxiliary driver. |
| 254 | * @cls: Class driver belongs to. | 254 | * @cls: Class driver belongs to. |
| 255 | * @drv: Driver. | 255 | * @drv: Driver. |
| 256 | */ | 256 | */ |
| @@ -302,7 +302,7 @@ int sysdev_register(struct sys_device *sysdev) | |||
| 302 | * code that should have called us. | 302 | * code that should have called us. |
| 303 | */ | 303 | */ |
| 304 | 304 | ||
| 305 | /* Notify class auxillary drivers */ | 305 | /* Notify class auxiliary drivers */ |
| 306 | list_for_each_entry(drv, &cls->drivers, entry) { | 306 | list_for_each_entry(drv, &cls->drivers, entry) { |
| 307 | if (drv->add) | 307 | if (drv->add) |
| 308 | drv->add(sysdev); | 308 | drv->add(sysdev); |
| @@ -335,7 +335,7 @@ void sysdev_unregister(struct sys_device *sysdev) | |||
| 335 | * | 335 | * |
| 336 | * Loop over each class of system devices, and the devices in each | 336 | * Loop over each class of system devices, and the devices in each |
| 337 | * of those classes. For each device, we call the shutdown method for | 337 | * of those classes. For each device, we call the shutdown method for |
| 338 | * each driver registered for the device - the auxillaries, | 338 | * each driver registered for the device - the auxiliaries, |
| 339 | * and the class driver. | 339 | * and the class driver. |
| 340 | * | 340 | * |
| 341 | * Note: The list is iterated in reverse order, so that we shut down | 341 | * Note: The list is iterated in reverse order, so that we shut down |
| @@ -360,7 +360,7 @@ void sysdev_shutdown(void) | |||
| 360 | struct sysdev_driver *drv; | 360 | struct sysdev_driver *drv; |
| 361 | pr_debug(" %s\n", kobject_name(&sysdev->kobj)); | 361 | pr_debug(" %s\n", kobject_name(&sysdev->kobj)); |
| 362 | 362 | ||
| 363 | /* Call auxillary drivers first */ | 363 | /* Call auxiliary drivers first */ |
| 364 | list_for_each_entry(drv, &cls->drivers, entry) { | 364 | list_for_each_entry(drv, &cls->drivers, entry) { |
| 365 | if (drv->shutdown) | 365 | if (drv->shutdown) |
| 366 | drv->shutdown(sysdev); | 366 | drv->shutdown(sysdev); |
| @@ -385,7 +385,7 @@ static void __sysdev_resume(struct sys_device *dev) | |||
| 385 | WARN_ONCE(!irqs_disabled(), | 385 | WARN_ONCE(!irqs_disabled(), |
| 386 | "Interrupts enabled after %pF\n", cls->resume); | 386 | "Interrupts enabled after %pF\n", cls->resume); |
| 387 | 387 | ||
| 388 | /* Call auxillary drivers next. */ | 388 | /* Call auxiliary drivers next. */ |
| 389 | list_for_each_entry(drv, &cls->drivers, entry) { | 389 | list_for_each_entry(drv, &cls->drivers, entry) { |
| 390 | if (drv->resume) | 390 | if (drv->resume) |
| 391 | drv->resume(dev); | 391 | drv->resume(dev); |
| @@ -432,7 +432,7 @@ int sysdev_suspend(pm_message_t state) | |||
| 432 | list_for_each_entry(sysdev, &cls->kset.list, kobj.entry) { | 432 | list_for_each_entry(sysdev, &cls->kset.list, kobj.entry) { |
| 433 | pr_debug(" %s\n", kobject_name(&sysdev->kobj)); | 433 | pr_debug(" %s\n", kobject_name(&sysdev->kobj)); |
| 434 | 434 | ||
| 435 | /* Call auxillary drivers first */ | 435 | /* Call auxiliary drivers first */ |
| 436 | list_for_each_entry(drv, &cls->drivers, entry) { | 436 | list_for_each_entry(drv, &cls->drivers, entry) { |
| 437 | if (drv->suspend) { | 437 | if (drv->suspend) { |
| 438 | ret = drv->suspend(sysdev, state); | 438 | ret = drv->suspend(sysdev, state); |
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 79882104e431..8066d086578a 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c | |||
| @@ -1790,7 +1790,7 @@ static bool DAC960_V2_ReadControllerConfiguration(DAC960_Controller_T | |||
| 1790 | unsigned short LogicalDeviceNumber = 0; | 1790 | unsigned short LogicalDeviceNumber = 0; |
| 1791 | int ModelNameLength; | 1791 | int ModelNameLength; |
| 1792 | 1792 | ||
| 1793 | /* Get data into dma-able area, then copy into permanant location */ | 1793 | /* Get data into dma-able area, then copy into permanent location */ |
| 1794 | if (!DAC960_V2_NewControllerInfo(Controller)) | 1794 | if (!DAC960_V2_NewControllerInfo(Controller)) |
| 1795 | return DAC960_Failure(Controller, "GET CONTROLLER INFO"); | 1795 | return DAC960_Failure(Controller, "GET CONTROLLER INFO"); |
| 1796 | memcpy(ControllerInfo, Controller->V2.NewControllerInformation, | 1796 | memcpy(ControllerInfo, Controller->V2.NewControllerInformation, |
diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c index 2a1642bc451d..c6828b68d77b 100644 --- a/drivers/block/drbd/drbd_actlog.c +++ b/drivers/block/drbd/drbd_actlog.c | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | 30 | ||
| 31 | /* We maintain a trivial check sum in our on disk activity log. | 31 | /* We maintain a trivial check sum in our on disk activity log. |
| 32 | * With that we can ensure correct operation even when the storage | 32 | * With that we can ensure correct operation even when the storage |
| 33 | * device might do a partial (last) sector write while loosing power. | 33 | * device might do a partial (last) sector write while losing power. |
| 34 | */ | 34 | */ |
| 35 | struct __packed al_transaction { | 35 | struct __packed al_transaction { |
| 36 | u32 magic; | 36 | u32 magic; |
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index 81030d8d654b..b2699bb2e530 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h | |||
| @@ -622,7 +622,7 @@ DCBP_set_pad_bits(struct p_compressed_bm *p, int n) | |||
| 622 | /* one bitmap packet, including the p_header, | 622 | /* one bitmap packet, including the p_header, |
| 623 | * should fit within one _architecture independend_ page. | 623 | * should fit within one _architecture independend_ page. |
| 624 | * so we need to use the fixed size 4KiB page size | 624 | * so we need to use the fixed size 4KiB page size |
| 625 | * most architechtures have used for a long time. | 625 | * most architectures have used for a long time. |
| 626 | */ | 626 | */ |
| 627 | #define BM_PACKET_PAYLOAD_BYTES (4096 - sizeof(struct p_header80)) | 627 | #define BM_PACKET_PAYLOAD_BYTES (4096 - sizeof(struct p_header80)) |
| 628 | #define BM_PACKET_WORDS (BM_PACKET_PAYLOAD_BYTES/sizeof(long)) | 628 | #define BM_PACKET_WORDS (BM_PACKET_PAYLOAD_BYTES/sizeof(long)) |
| @@ -810,7 +810,7 @@ enum { | |||
| 810 | 810 | ||
| 811 | /* global flag bits */ | 811 | /* global flag bits */ |
| 812 | enum { | 812 | enum { |
| 813 | CREATE_BARRIER, /* next P_DATA is preceeded by a P_BARRIER */ | 813 | CREATE_BARRIER, /* next P_DATA is preceded by a P_BARRIER */ |
| 814 | SIGNAL_ASENDER, /* whether asender wants to be interrupted */ | 814 | SIGNAL_ASENDER, /* whether asender wants to be interrupted */ |
| 815 | SEND_PING, /* whether asender should send a ping asap */ | 815 | SEND_PING, /* whether asender should send a ping asap */ |
| 816 | 816 | ||
| @@ -1126,7 +1126,7 @@ struct drbd_conf { | |||
| 1126 | int c_sync_rate; /* current resync rate after syncer throttle magic */ | 1126 | int c_sync_rate; /* current resync rate after syncer throttle magic */ |
| 1127 | struct fifo_buffer rs_plan_s; /* correction values of resync planer */ | 1127 | struct fifo_buffer rs_plan_s; /* correction values of resync planer */ |
| 1128 | int rs_in_flight; /* resync sectors in flight (to proxy, in proxy and from proxy) */ | 1128 | int rs_in_flight; /* resync sectors in flight (to proxy, in proxy and from proxy) */ |
| 1129 | int rs_planed; /* resync sectors already planed */ | 1129 | int rs_planed; /* resync sectors already planned */ |
| 1130 | atomic_t ap_in_flight; /* App sectors in flight (waiting for ack) */ | 1130 | atomic_t ap_in_flight; /* App sectors in flight (waiting for ack) */ |
| 1131 | }; | 1131 | }; |
| 1132 | 1132 | ||
| @@ -1144,7 +1144,7 @@ static inline unsigned int mdev_to_minor(struct drbd_conf *mdev) | |||
| 1144 | return mdev->minor; | 1144 | return mdev->minor; |
| 1145 | } | 1145 | } |
| 1146 | 1146 | ||
| 1147 | /* returns 1 if it was successfull, | 1147 | /* returns 1 if it was successful, |
| 1148 | * returns 0 if there was no data socket. | 1148 | * returns 0 if there was no data socket. |
| 1149 | * so wherever you are going to use the data.socket, e.g. do | 1149 | * so wherever you are going to use the data.socket, e.g. do |
| 1150 | * if (!drbd_get_data_sock(mdev)) | 1150 | * if (!drbd_get_data_sock(mdev)) |
| @@ -2079,7 +2079,7 @@ static inline void inc_ap_pending(struct drbd_conf *mdev) | |||
| 2079 | /* counts how many resync-related answers we still expect from the peer | 2079 | /* counts how many resync-related answers we still expect from the peer |
| 2080 | * increase decrease | 2080 | * increase decrease |
| 2081 | * C_SYNC_TARGET sends P_RS_DATA_REQUEST (and expects P_RS_DATA_REPLY) | 2081 | * C_SYNC_TARGET sends P_RS_DATA_REQUEST (and expects P_RS_DATA_REPLY) |
| 2082 | * C_SYNC_SOURCE sends P_RS_DATA_REPLY (and expects P_WRITE_ACK whith ID_SYNCER) | 2082 | * C_SYNC_SOURCE sends P_RS_DATA_REPLY (and expects P_WRITE_ACK with ID_SYNCER) |
| 2083 | * (or P_NEG_ACK with ID_SYNCER) | 2083 | * (or P_NEG_ACK with ID_SYNCER) |
| 2084 | */ | 2084 | */ |
| 2085 | static inline void inc_rs_pending(struct drbd_conf *mdev) | 2085 | static inline void inc_rs_pending(struct drbd_conf *mdev) |
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index dfc85f32d317..5b525c179f39 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
| @@ -1561,7 +1561,7 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os, | |||
| 1561 | if (drbd_send_state(mdev)) | 1561 | if (drbd_send_state(mdev)) |
| 1562 | dev_warn(DEV, "Notified peer that I'm now diskless.\n"); | 1562 | dev_warn(DEV, "Notified peer that I'm now diskless.\n"); |
| 1563 | /* corresponding get_ldev in __drbd_set_state | 1563 | /* corresponding get_ldev in __drbd_set_state |
| 1564 | * this may finaly trigger drbd_ldev_destroy. */ | 1564 | * this may finally trigger drbd_ldev_destroy. */ |
| 1565 | put_ldev(mdev); | 1565 | put_ldev(mdev); |
| 1566 | } | 1566 | } |
| 1567 | 1567 | ||
| @@ -3706,7 +3706,7 @@ int drbd_md_read(struct drbd_conf *mdev, struct drbd_backing_dev *bdev) | |||
| 3706 | buffer = (struct meta_data_on_disk *)page_address(mdev->md_io_page); | 3706 | buffer = (struct meta_data_on_disk *)page_address(mdev->md_io_page); |
| 3707 | 3707 | ||
| 3708 | if (!drbd_md_sync_page_io(mdev, bdev, bdev->md.md_offset, READ)) { | 3708 | if (!drbd_md_sync_page_io(mdev, bdev, bdev->md.md_offset, READ)) { |
| 3709 | /* NOTE: cant do normal error processing here as this is | 3709 | /* NOTE: can't do normal error processing here as this is |
| 3710 | called BEFORE disk is attached */ | 3710 | called BEFORE disk is attached */ |
| 3711 | dev_err(DEV, "Error while reading metadata.\n"); | 3711 | dev_err(DEV, "Error while reading metadata.\n"); |
| 3712 | rv = ERR_IO_MD_DISK; | 3712 | rv = ERR_IO_MD_DISK; |
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index fe1564c7d8b6..fd26666c0b08 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
| @@ -862,7 +862,7 @@ retry: | |||
| 862 | msock->sk->sk_rcvtimeo = mdev->net_conf->ping_int*HZ; | 862 | msock->sk->sk_rcvtimeo = mdev->net_conf->ping_int*HZ; |
| 863 | 863 | ||
| 864 | /* we don't want delays. | 864 | /* we don't want delays. |
| 865 | * we use TCP_CORK where apropriate, though */ | 865 | * we use TCP_CORK where appropriate, though */ |
| 866 | drbd_tcp_nodelay(sock); | 866 | drbd_tcp_nodelay(sock); |
| 867 | drbd_tcp_nodelay(msock); | 867 | drbd_tcp_nodelay(msock); |
| 868 | 868 | ||
diff --git a/drivers/block/drbd/drbd_vli.h b/drivers/block/drbd/drbd_vli.h index fc824006e721..8cb1532a3816 100644 --- a/drivers/block/drbd/drbd_vli.h +++ b/drivers/block/drbd/drbd_vli.h | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | * the bitmap transfer time can take much too long, | 32 | * the bitmap transfer time can take much too long, |
| 33 | * if transmitted in plain text. | 33 | * if transmitted in plain text. |
| 34 | * | 34 | * |
| 35 | * We try to reduce the transfered bitmap information | 35 | * We try to reduce the transferred bitmap information |
| 36 | * by encoding runlengths of bit polarity. | 36 | * by encoding runlengths of bit polarity. |
| 37 | * | 37 | * |
| 38 | * We never actually need to encode a "zero" (runlengths are positive). | 38 | * We never actually need to encode a "zero" (runlengths are positive). |
diff --git a/drivers/block/hd.c b/drivers/block/hd.c index 30ec6b37424e..007c630904c1 100644 --- a/drivers/block/hd.c +++ b/drivers/block/hd.c | |||
| @@ -733,7 +733,7 @@ static int __init hd_init(void) | |||
| 733 | * the BIOS or CMOS. This doesn't work all that well, | 733 | * the BIOS or CMOS. This doesn't work all that well, |
| 734 | * since this assumes that this is a primary or secondary | 734 | * since this assumes that this is a primary or secondary |
| 735 | * drive, and if we're using this legacy driver, it's | 735 | * drive, and if we're using this legacy driver, it's |
| 736 | * probably an auxilliary controller added to recover | 736 | * probably an auxiliary controller added to recover |
| 737 | * legacy data off an ST-506 drive. Either way, it's | 737 | * legacy data off an ST-506 drive. Either way, it's |
| 738 | * definitely safest to have the user explicitly specify | 738 | * definitely safest to have the user explicitly specify |
| 739 | * the information. | 739 | * the information. |
diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c index e2ff697697c2..9a5b2a2d616d 100644 --- a/drivers/block/viodasd.c +++ b/drivers/block/viodasd.c | |||
| @@ -94,7 +94,7 @@ static const struct vio_error_entry viodasd_err_table[] = { | |||
| 94 | { 0x0204, EIO, "Use Error" }, | 94 | { 0x0204, EIO, "Use Error" }, |
| 95 | { 0x0205, EIO, "Release Error" }, | 95 | { 0x0205, EIO, "Release Error" }, |
| 96 | { 0x0206, EINVAL, "Invalid Disk" }, | 96 | { 0x0206, EINVAL, "Invalid Disk" }, |
| 97 | { 0x0207, EBUSY, "Cant Lock" }, | 97 | { 0x0207, EBUSY, "Can't Lock" }, |
| 98 | { 0x0208, EIO, "Already Locked" }, | 98 | { 0x0208, EIO, "Already Locked" }, |
| 99 | { 0x0209, EIO, "Already Unlocked" }, | 99 | { 0x0209, EIO, "Already Unlocked" }, |
| 100 | { 0x020A, EIO, "Invalid Arg" }, | 100 | { 0x020A, EIO, "Invalid Arg" }, |
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c index 73354b081ed3..645ff765cd12 100644 --- a/drivers/block/xsysace.c +++ b/drivers/block/xsysace.c | |||
| @@ -621,7 +621,7 @@ static void ace_fsm_dostate(struct ace_device *ace) | |||
| 621 | ace_dump_mem(ace->cf_id, 512); /* Debug: Dump out disk ID */ | 621 | ace_dump_mem(ace->cf_id, 512); /* Debug: Dump out disk ID */ |
| 622 | 622 | ||
| 623 | if (ace->data_result) { | 623 | if (ace->data_result) { |
| 624 | /* Error occured, disable the disk */ | 624 | /* Error occurred, disable the disk */ |
| 625 | ace->media_change = 1; | 625 | ace->media_change = 1; |
| 626 | set_capacity(ace->gd, 0); | 626 | set_capacity(ace->gd, 0); |
| 627 | dev_err(ace->dev, "error fetching CF id (%i)\n", | 627 | dev_err(ace->dev, "error fetching CF id (%i)\n", |
| @@ -801,7 +801,7 @@ static int ace_interrupt_checkstate(struct ace_device *ace) | |||
| 801 | u32 sreg = ace_in32(ace, ACE_STATUS); | 801 | u32 sreg = ace_in32(ace, ACE_STATUS); |
| 802 | u16 creg = ace_in(ace, ACE_CTRL); | 802 | u16 creg = ace_in(ace, ACE_CTRL); |
| 803 | 803 | ||
| 804 | /* Check for error occurance */ | 804 | /* Check for error occurrence */ |
| 805 | if ((sreg & (ACE_STATUS_CFGERROR | ACE_STATUS_CFCERROR)) && | 805 | if ((sreg & (ACE_STATUS_CFGERROR | ACE_STATUS_CFCERROR)) && |
| 806 | (creg & ACE_CTRL_ERRORIRQ)) { | 806 | (creg & ACE_CTRL_ERRORIRQ)) { |
| 807 | dev_err(ace->dev, "transfer failure\n"); | 807 | dev_err(ace->dev, "transfer failure\n"); |
| @@ -1169,7 +1169,7 @@ static int __devinit ace_probe(struct platform_device *dev) | |||
| 1169 | irq = dev->resource[i].start; | 1169 | irq = dev->resource[i].start; |
| 1170 | } | 1170 | } |
| 1171 | 1171 | ||
| 1172 | /* Call the bus-independant setup code */ | 1172 | /* Call the bus-independent setup code */ |
| 1173 | return ace_alloc(&dev->dev, id, physaddr, irq, bus_width); | 1173 | return ace_alloc(&dev->dev, id, physaddr, irq, bus_width); |
| 1174 | } | 1174 | } |
| 1175 | 1175 | ||
| @@ -1222,7 +1222,7 @@ static int __devinit ace_of_probe(struct platform_device *op) | |||
| 1222 | if (of_find_property(op->dev.of_node, "8-bit", NULL)) | 1222 | if (of_find_property(op->dev.of_node, "8-bit", NULL)) |
| 1223 | bus_width = ACE_BUS_WIDTH_8; | 1223 | bus_width = ACE_BUS_WIDTH_8; |
| 1224 | 1224 | ||
| 1225 | /* Call the bus-independant setup code */ | 1225 | /* Call the bus-independent setup code */ |
| 1226 | return ace_alloc(&op->dev, id ? be32_to_cpup(id) : 0, | 1226 | return ace_alloc(&op->dev, id ? be32_to_cpup(id) : 0, |
| 1227 | physaddr, irq, bus_width); | 1227 | physaddr, irq, bus_width); |
| 1228 | } | 1228 | } |
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 866811428e20..762a5109c68a 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
| @@ -71,6 +71,9 @@ static struct usb_device_id btusb_table[] = { | |||
| 71 | /* Apple MacBookAir3,1, MacBookAir3,2 */ | 71 | /* Apple MacBookAir3,1, MacBookAir3,2 */ |
| 72 | { USB_DEVICE(0x05ac, 0x821b) }, | 72 | { USB_DEVICE(0x05ac, 0x821b) }, |
| 73 | 73 | ||
| 74 | /* Apple MacBookPro8,2 */ | ||
| 75 | { USB_DEVICE(0x05ac, 0x821a) }, | ||
| 76 | |||
| 74 | /* AVM BlueFRITZ! USB v2.0 */ | 77 | /* AVM BlueFRITZ! USB v2.0 */ |
| 75 | { USB_DEVICE(0x057c, 0x3800) }, | 78 | { USB_DEVICE(0x057c, 0x3800) }, |
| 76 | 79 | ||
| @@ -690,7 +693,8 @@ static int btusb_send_frame(struct sk_buff *skb) | |||
| 690 | break; | 693 | break; |
| 691 | 694 | ||
| 692 | case HCI_ACLDATA_PKT: | 695 | case HCI_ACLDATA_PKT: |
| 693 | if (!data->bulk_tx_ep || hdev->conn_hash.acl_num < 1) | 696 | if (!data->bulk_tx_ep || (hdev->conn_hash.acl_num < 1 && |
| 697 | hdev->conn_hash.le_num < 1)) | ||
| 694 | return -ENODEV; | 698 | return -ENODEV; |
| 695 | 699 | ||
| 696 | urb = usb_alloc_urb(0, GFP_ATOMIC); | 700 | urb = usb_alloc_urb(0, GFP_ATOMIC); |
diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c index 38595e782d02..7e4b435f79f0 100644 --- a/drivers/bluetooth/hci_ll.c +++ b/drivers/bluetooth/hci_ll.c | |||
| @@ -207,7 +207,7 @@ static void ll_device_want_to_wakeup(struct hci_uart *hu) | |||
| 207 | /* | 207 | /* |
| 208 | * This state means that both the host and the BRF chip | 208 | * This state means that both the host and the BRF chip |
| 209 | * have simultaneously sent a wake-up-indication packet. | 209 | * have simultaneously sent a wake-up-indication packet. |
| 210 | * Traditionaly, in this case, receiving a wake-up-indication | 210 | * Traditionally, in this case, receiving a wake-up-indication |
| 211 | * was enough and an additional wake-up-ack wasn't needed. | 211 | * was enough and an additional wake-up-ack wasn't needed. |
| 212 | * This has changed with the BRF6350, which does require an | 212 | * This has changed with the BRF6350, which does require an |
| 213 | * explicit wake-up-ack. Other BRF versions, which do not | 213 | * explicit wake-up-ack. Other BRF versions, which do not |
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index e2c48a7eccff..514dd8efaf73 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | changelog for the 1.x series, David? | 30 | changelog for the 1.x series, David? |
| 31 | 31 | ||
| 32 | 2.00 Dec 2, 1997 -- Erik Andersen <andersee@debian.org> | 32 | 2.00 Dec 2, 1997 -- Erik Andersen <andersee@debian.org> |
| 33 | -- New maintainer! As David A. van Leeuwen has been too busy to activly | 33 | -- New maintainer! As David A. van Leeuwen has been too busy to actively |
| 34 | maintain and improve this driver, I am now carrying on the torch. If | 34 | maintain and improve this driver, I am now carrying on the torch. If |
| 35 | you have a problem with this driver, please feel free to contact me. | 35 | you have a problem with this driver, please feel free to contact me. |
| 36 | 36 | ||
| @@ -2520,7 +2520,7 @@ static int cdrom_ioctl_drive_status(struct cdrom_device_info *cdi, | |||
| 2520 | /* | 2520 | /* |
| 2521 | * Ok, this is where problems start. The current interface for the | 2521 | * Ok, this is where problems start. The current interface for the |
| 2522 | * CDROM_DISC_STATUS ioctl is flawed. It makes the false assumption that | 2522 | * CDROM_DISC_STATUS ioctl is flawed. It makes the false assumption that |
| 2523 | * CDs are all CDS_DATA_1 or all CDS_AUDIO, etc. Unfortunatly, while this | 2523 | * CDs are all CDS_DATA_1 or all CDS_AUDIO, etc. Unfortunately, while this |
| 2524 | * is often the case, it is also very common for CDs to have some tracks | 2524 | * is often the case, it is also very common for CDs to have some tracks |
| 2525 | * with data, and some tracks with audio. Just because I feel like it, | 2525 | * with data, and some tracks with audio. Just because I feel like it, |
| 2526 | * I declare the following to be the best way to cope. If the CD has ANY | 2526 | * I declare the following to be the best way to cope. If the CD has ANY |
diff --git a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h index 3e67ddde9e16..923f99df4f1c 100644 --- a/drivers/char/agp/agp.h +++ b/drivers/char/agp/agp.h | |||
| @@ -237,7 +237,7 @@ extern int agp_try_unsupported_boot; | |||
| 237 | 237 | ||
| 238 | long compat_agp_ioctl(struct file *file, unsigned int cmd, unsigned long arg); | 238 | long compat_agp_ioctl(struct file *file, unsigned int cmd, unsigned long arg); |
| 239 | 239 | ||
| 240 | /* Chipset independant registers (from AGP Spec) */ | 240 | /* Chipset independent registers (from AGP Spec) */ |
| 241 | #define AGP_APBASE 0x10 | 241 | #define AGP_APBASE 0x10 |
| 242 | 242 | ||
| 243 | #define AGPSTAT 0x4 | 243 | #define AGPSTAT 0x4 |
diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c index 45681c0ff3b6..f7e88787af97 100644 --- a/drivers/char/agp/amd-k7-agp.c +++ b/drivers/char/agp/amd-k7-agp.c | |||
| @@ -272,7 +272,7 @@ static void amd_irongate_cleanup(void) | |||
| 272 | * This routine could be implemented by taking the addresses | 272 | * This routine could be implemented by taking the addresses |
| 273 | * written to the GATT, and flushing them individually. However | 273 | * written to the GATT, and flushing them individually. However |
| 274 | * currently it just flushes the whole table. Which is probably | 274 | * currently it just flushes the whole table. Which is probably |
| 275 | * more efficent, since agp_memory blocks can be a large number of | 275 | * more efficient, since agp_memory blocks can be a large number of |
| 276 | * entries. | 276 | * entries. |
| 277 | */ | 277 | */ |
| 278 | 278 | ||
diff --git a/drivers/char/agp/sworks-agp.c b/drivers/char/agp/sworks-agp.c index 13acaaf64edb..f02f9b07fd4c 100644 --- a/drivers/char/agp/sworks-agp.c +++ b/drivers/char/agp/sworks-agp.c | |||
| @@ -229,7 +229,7 @@ static int serverworks_fetch_size(void) | |||
| 229 | * This routine could be implemented by taking the addresses | 229 | * This routine could be implemented by taking the addresses |
| 230 | * written to the GATT, and flushing them individually. However | 230 | * written to the GATT, and flushing them individually. However |
| 231 | * currently it just flushes the whole table. Which is probably | 231 | * currently it just flushes the whole table. Which is probably |
| 232 | * more efficent, since agp_memory blocks can be a large number of | 232 | * more efficient, since agp_memory blocks can be a large number of |
| 233 | * entries. | 233 | * entries. |
| 234 | */ | 234 | */ |
| 235 | static void serverworks_tlbflush(struct agp_memory *temp) | 235 | static void serverworks_tlbflush(struct agp_memory *temp) |
diff --git a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c index df67e80019d2..8bc384937401 100644 --- a/drivers/char/agp/via-agp.c +++ b/drivers/char/agp/via-agp.c | |||
| @@ -400,7 +400,7 @@ static struct agp_device_ids via_agp_device_ids[] __devinitdata = | |||
| 400 | * the traditional AGP which resides only in chipset. AGP is used | 400 | * the traditional AGP which resides only in chipset. AGP is used |
| 401 | * by 3D driver which wasn't available for the VT3336 and VT3364 | 401 | * by 3D driver which wasn't available for the VT3336 and VT3364 |
| 402 | * generation until now. Unfortunately, by testing, VT3364 works | 402 | * generation until now. Unfortunately, by testing, VT3364 works |
| 403 | * but VT3336 doesn't. - explaination from via, just leave this as | 403 | * but VT3336 doesn't. - explanation from via, just leave this as |
| 404 | * as a placeholder to avoid future patches adding it back in. | 404 | * as a placeholder to avoid future patches adding it back in. |
| 405 | */ | 405 | */ |
| 406 | #if 0 | 406 | #if 0 |
diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c index 0dec5da000ef..2efa176beab0 100644 --- a/drivers/char/ipmi/ipmi_poweroff.c +++ b/drivers/char/ipmi/ipmi_poweroff.c | |||
| @@ -122,7 +122,7 @@ static struct ipmi_recv_msg halt_recv_msg = { | |||
| 122 | 122 | ||
| 123 | 123 | ||
| 124 | /* | 124 | /* |
| 125 | * Code to send a message and wait for the reponse. | 125 | * Code to send a message and wait for the response. |
| 126 | */ | 126 | */ |
| 127 | 127 | ||
| 128 | static void receive_handler(struct ipmi_recv_msg *recv_msg, void *handler_data) | 128 | static void receive_handler(struct ipmi_recv_msg *recv_msg, void *handler_data) |
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index d28b484aee45..cc6c9b2546a3 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
| @@ -339,7 +339,7 @@ static void return_hosed_msg(struct smi_info *smi_info, int cCode) | |||
| 339 | cCode = IPMI_ERR_UNSPECIFIED; | 339 | cCode = IPMI_ERR_UNSPECIFIED; |
| 340 | /* else use it as is */ | 340 | /* else use it as is */ |
| 341 | 341 | ||
| 342 | /* Make it a reponse */ | 342 | /* Make it a response */ |
| 343 | msg->rsp[0] = msg->data[0] | 4; | 343 | msg->rsp[0] = msg->data[0] | 4; |
| 344 | msg->rsp[1] = msg->data[1]; | 344 | msg->rsp[1] = msg->data[1]; |
| 345 | msg->rsp[2] = cCode; | 345 | msg->rsp[2] = cCode; |
| @@ -2927,7 +2927,7 @@ static void return_hosed_msg_badsize(struct smi_info *smi_info) | |||
| 2927 | { | 2927 | { |
| 2928 | struct ipmi_smi_msg *msg = smi_info->curr_msg; | 2928 | struct ipmi_smi_msg *msg = smi_info->curr_msg; |
| 2929 | 2929 | ||
| 2930 | /* Make it a reponse */ | 2930 | /* Make it a response */ |
| 2931 | msg->rsp[0] = msg->data[0] | 4; | 2931 | msg->rsp[0] = msg->data[0] | 4; |
| 2932 | msg->rsp[1] = msg->data[1]; | 2932 | msg->rsp[1] = msg->data[1]; |
| 2933 | msg->rsp[2] = CANNOT_RETURN_REQUESTED_LENGTH; | 2933 | msg->rsp[2] = CANNOT_RETURN_REQUESTED_LENGTH; |
diff --git a/drivers/char/mbcs.h b/drivers/char/mbcs.h index ba671589f4cb..1a36884c48b5 100644 --- a/drivers/char/mbcs.h +++ b/drivers/char/mbcs.h | |||
| @@ -36,13 +36,13 @@ | |||
| 36 | #define MBCS_RD_DMA_CTRL 0x0110 /* Read DMA Control */ | 36 | #define MBCS_RD_DMA_CTRL 0x0110 /* Read DMA Control */ |
| 37 | #define MBCS_RD_DMA_AMO_DEST 0x0118 /* Read DMA AMO Destination */ | 37 | #define MBCS_RD_DMA_AMO_DEST 0x0118 /* Read DMA AMO Destination */ |
| 38 | #define MBCS_RD_DMA_INT_DEST 0x0120 /* Read DMA Interrupt Destination */ | 38 | #define MBCS_RD_DMA_INT_DEST 0x0120 /* Read DMA Interrupt Destination */ |
| 39 | #define MBCS_RD_DMA_AUX_STAT 0x0130 /* Read DMA Auxillary Status */ | 39 | #define MBCS_RD_DMA_AUX_STAT 0x0130 /* Read DMA Auxiliary Status */ |
| 40 | #define MBCS_WR_DMA_SYS_ADDR 0x0200 /* Write DMA System Address */ | 40 | #define MBCS_WR_DMA_SYS_ADDR 0x0200 /* Write DMA System Address */ |
| 41 | #define MBCS_WR_DMA_LOC_ADDR 0x0208 /* Write DMA Local Address */ | 41 | #define MBCS_WR_DMA_LOC_ADDR 0x0208 /* Write DMA Local Address */ |
| 42 | #define MBCS_WR_DMA_CTRL 0x0210 /* Write DMA Control */ | 42 | #define MBCS_WR_DMA_CTRL 0x0210 /* Write DMA Control */ |
| 43 | #define MBCS_WR_DMA_AMO_DEST 0x0218 /* Write DMA AMO Destination */ | 43 | #define MBCS_WR_DMA_AMO_DEST 0x0218 /* Write DMA AMO Destination */ |
| 44 | #define MBCS_WR_DMA_INT_DEST 0x0220 /* Write DMA Interrupt Destination */ | 44 | #define MBCS_WR_DMA_INT_DEST 0x0220 /* Write DMA Interrupt Destination */ |
| 45 | #define MBCS_WR_DMA_AUX_STAT 0x0230 /* Write DMA Auxillary Status */ | 45 | #define MBCS_WR_DMA_AUX_STAT 0x0230 /* Write DMA Auxiliary Status */ |
| 46 | #define MBCS_ALG_AMO_DEST 0x0300 /* Algorithm AMO Destination */ | 46 | #define MBCS_ALG_AMO_DEST 0x0300 /* Algorithm AMO Destination */ |
| 47 | #define MBCS_ALG_INT_DEST 0x0308 /* Algorithm Interrupt Destination */ | 47 | #define MBCS_ALG_INT_DEST 0x0308 /* Algorithm Interrupt Destination */ |
| 48 | #define MBCS_ALG_OFFSETS 0x0310 | 48 | #define MBCS_ALG_OFFSETS 0x0310 |
diff --git a/drivers/char/mwave/3780i.h b/drivers/char/mwave/3780i.h index 270431ca7dae..fba6ab1160ce 100644 --- a/drivers/char/mwave/3780i.h +++ b/drivers/char/mwave/3780i.h | |||
| @@ -122,7 +122,7 @@ typedef struct { | |||
| 122 | typedef struct { | 122 | typedef struct { |
| 123 | unsigned char Dma:3; /* RW: DMA channel selection */ | 123 | unsigned char Dma:3; /* RW: DMA channel selection */ |
| 124 | unsigned char NumTransfers:2; /* RW: Maximum # of transfers once being granted the ISA bus */ | 124 | unsigned char NumTransfers:2; /* RW: Maximum # of transfers once being granted the ISA bus */ |
| 125 | unsigned char ReRequest:2; /* RW: Minumum delay between releasing the ISA bus and requesting it again */ | 125 | unsigned char ReRequest:2; /* RW: Minimum delay between releasing the ISA bus and requesting it again */ |
| 126 | unsigned char MEMCS16:1; /* RW: ISA signal MEMCS16: 0=disabled, 1=enabled */ | 126 | unsigned char MEMCS16:1; /* RW: ISA signal MEMCS16: 0=disabled, 1=enabled */ |
| 127 | } DSP_BUSMASTER_CFG_1; | 127 | } DSP_BUSMASTER_CFG_1; |
| 128 | 128 | ||
diff --git a/drivers/char/nwbutton.c b/drivers/char/nwbutton.c index 8994ce32e6c7..04a480f86c6c 100644 --- a/drivers/char/nwbutton.c +++ b/drivers/char/nwbutton.c | |||
| @@ -75,7 +75,7 @@ int button_add_callback (void (*callback) (void), int count) | |||
| 75 | * with -EINVAL. If there is more than one entry with the same address, | 75 | * with -EINVAL. If there is more than one entry with the same address, |
| 76 | * because it searches the list from end to beginning, it will unregister the | 76 | * because it searches the list from end to beginning, it will unregister the |
| 77 | * last one to be registered first (FILO- First In Last Out). | 77 | * last one to be registered first (FILO- First In Last Out). |
| 78 | * Note that this is not neccessarily true if the entries are not submitted | 78 | * Note that this is not necessarily true if the entries are not submitted |
| 79 | * at the same time, because another driver could have unregistered a callback | 79 | * at the same time, because another driver could have unregistered a callback |
| 80 | * between the submissions creating a gap earlier in the list, which would | 80 | * between the submissions creating a gap earlier in the list, which would |
| 81 | * be filled first at submission time. | 81 | * be filled first at submission time. |
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index bcbbc71febb7..90bd01671c70 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c | |||
| @@ -806,7 +806,7 @@ static void monitor_card(unsigned long p) | |||
| 806 | dev->flags1 = 0x01; | 806 | dev->flags1 = 0x01; |
| 807 | xoutb(dev->flags1, REG_FLAGS1(iobase)); | 807 | xoutb(dev->flags1, REG_FLAGS1(iobase)); |
| 808 | 808 | ||
| 809 | /* atr is present (which doesnt mean it's valid) */ | 809 | /* atr is present (which doesn't mean it's valid) */ |
| 810 | set_bit(IS_ATR_PRESENT, &dev->flags); | 810 | set_bit(IS_ATR_PRESENT, &dev->flags); |
| 811 | if (dev->atr[0] == 0x03) | 811 | if (dev->atr[0] == 0x03) |
| 812 | str_invert_revert(dev->atr, dev->atr_len); | 812 | str_invert_revert(dev->atr, dev->atr_len); |
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index beca80bb9bdb..b575411c69b2 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c | |||
| @@ -1290,7 +1290,7 @@ static int startup(MGSLPC_INFO * info, struct tty_struct *tty) | |||
| 1290 | /* Allocate and claim adapter resources */ | 1290 | /* Allocate and claim adapter resources */ |
| 1291 | retval = claim_resources(info); | 1291 | retval = claim_resources(info); |
| 1292 | 1292 | ||
| 1293 | /* perform existance check and diagnostics */ | 1293 | /* perform existence check and diagnostics */ |
| 1294 | if ( !retval ) | 1294 | if ( !retval ) |
| 1295 | retval = adapter_test(info); | 1295 | retval = adapter_test(info); |
| 1296 | 1296 | ||
| @@ -2680,7 +2680,7 @@ static void rx_free_buffers(MGSLPC_INFO *info) | |||
| 2680 | static int claim_resources(MGSLPC_INFO *info) | 2680 | static int claim_resources(MGSLPC_INFO *info) |
| 2681 | { | 2681 | { |
| 2682 | if (rx_alloc_buffers(info) < 0 ) { | 2682 | if (rx_alloc_buffers(info) < 0 ) { |
| 2683 | printk( "Cant allocate rx buffer %s\n", info->device_name); | 2683 | printk( "Can't allocate rx buffer %s\n", info->device_name); |
| 2684 | release_resources(info); | 2684 | release_resources(info); |
| 2685 | return -ENODEV; | 2685 | return -ENODEV; |
| 2686 | } | 2686 | } |
diff --git a/drivers/char/random.c b/drivers/char/random.c index 5e29e8031bbc..d4ddeba56682 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c | |||
| @@ -732,7 +732,7 @@ static ssize_t extract_entropy(struct entropy_store *r, void *buf, | |||
| 732 | size_t nbytes, int min, int rsvd); | 732 | size_t nbytes, int min, int rsvd); |
| 733 | 733 | ||
| 734 | /* | 734 | /* |
| 735 | * This utility inline function is responsible for transfering entropy | 735 | * This utility inline function is responsible for transferring entropy |
| 736 | * from the primary pool to the secondary extraction pool. We make | 736 | * from the primary pool to the secondary extraction pool. We make |
| 737 | * sure we pull enough for a 'catastrophic reseed'. | 737 | * sure we pull enough for a 'catastrophic reseed'. |
| 738 | */ | 738 | */ |
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index 79e36c878a4c..1ee8ce7d2762 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c | |||
| @@ -1241,7 +1241,7 @@ static int __devinit sonypi_setup_ioports(struct sonypi_device *dev, | |||
| 1241 | while (check_ioport && check->port1) { | 1241 | while (check_ioport && check->port1) { |
| 1242 | if (!request_region(check->port1, | 1242 | if (!request_region(check->port1, |
| 1243 | sonypi_device.region_size, | 1243 | sonypi_device.region_size, |
| 1244 | "Sony Programable I/O Device Check")) { | 1244 | "Sony Programmable I/O Device Check")) { |
| 1245 | printk(KERN_ERR "sonypi: ioport 0x%.4x busy, using sony-laptop? " | 1245 | printk(KERN_ERR "sonypi: ioport 0x%.4x busy, using sony-laptop? " |
| 1246 | "if not use check_ioport=0\n", | 1246 | "if not use check_ioport=0\n", |
| 1247 | check->port1); | 1247 | check->port1); |
| @@ -1255,7 +1255,7 @@ static int __devinit sonypi_setup_ioports(struct sonypi_device *dev, | |||
| 1255 | 1255 | ||
| 1256 | if (request_region(ioport_list->port1, | 1256 | if (request_region(ioport_list->port1, |
| 1257 | sonypi_device.region_size, | 1257 | sonypi_device.region_size, |
| 1258 | "Sony Programable I/O Device")) { | 1258 | "Sony Programmable I/O Device")) { |
| 1259 | dev->ioport1 = ioport_list->port1; | 1259 | dev->ioport1 = ioport_list->port1; |
| 1260 | dev->ioport2 = ioport_list->port2; | 1260 | dev->ioport2 = ioport_list->port2; |
| 1261 | return 0; | 1261 | return 0; |
diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/drivers/char/xilinx_hwicap/xilinx_hwicap.c index d3c9d755ed98..d6412c16385f 100644 --- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c +++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c | |||
| @@ -67,7 +67,7 @@ | |||
| 67 | * cp foo.bit /dev/icap0 | 67 | * cp foo.bit /dev/icap0 |
| 68 | * | 68 | * |
| 69 | * Note that unless foo.bit is an appropriately constructed partial | 69 | * Note that unless foo.bit is an appropriately constructed partial |
| 70 | * bitstream, this has a high likelyhood of overwriting the design | 70 | * bitstream, this has a high likelihood of overwriting the design |
| 71 | * currently programmed in the FPGA. | 71 | * currently programmed in the FPGA. |
| 72 | */ | 72 | */ |
| 73 | 73 | ||
diff --git a/drivers/connector/cn_queue.c b/drivers/connector/cn_queue.c index 55653aba6735..c42c9d517790 100644 --- a/drivers/connector/cn_queue.c +++ b/drivers/connector/cn_queue.c | |||
| @@ -31,24 +31,9 @@ | |||
| 31 | #include <linux/connector.h> | 31 | #include <linux/connector.h> |
| 32 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
| 33 | 33 | ||
| 34 | void cn_queue_wrapper(struct work_struct *work) | ||
| 35 | { | ||
| 36 | struct cn_callback_entry *cbq = | ||
| 37 | container_of(work, struct cn_callback_entry, work); | ||
| 38 | struct cn_callback_data *d = &cbq->data; | ||
| 39 | struct cn_msg *msg = NLMSG_DATA(nlmsg_hdr(d->skb)); | ||
| 40 | struct netlink_skb_parms *nsp = &NETLINK_CB(d->skb); | ||
| 41 | |||
| 42 | d->callback(msg, nsp); | ||
| 43 | |||
| 44 | kfree_skb(d->skb); | ||
| 45 | d->skb = NULL; | ||
| 46 | |||
| 47 | kfree(d->free); | ||
| 48 | } | ||
| 49 | |||
| 50 | static struct cn_callback_entry * | 34 | static struct cn_callback_entry * |
| 51 | cn_queue_alloc_callback_entry(const char *name, struct cb_id *id, | 35 | cn_queue_alloc_callback_entry(struct cn_queue_dev *dev, const char *name, |
| 36 | struct cb_id *id, | ||
| 52 | void (*callback)(struct cn_msg *, struct netlink_skb_parms *)) | 37 | void (*callback)(struct cn_msg *, struct netlink_skb_parms *)) |
| 53 | { | 38 | { |
| 54 | struct cn_callback_entry *cbq; | 39 | struct cn_callback_entry *cbq; |
| @@ -59,17 +44,23 @@ cn_queue_alloc_callback_entry(const char *name, struct cb_id *id, | |||
| 59 | return NULL; | 44 | return NULL; |
| 60 | } | 45 | } |
| 61 | 46 | ||
| 47 | atomic_set(&cbq->refcnt, 1); | ||
| 48 | |||
| 49 | atomic_inc(&dev->refcnt); | ||
| 50 | cbq->pdev = dev; | ||
| 51 | |||
| 62 | snprintf(cbq->id.name, sizeof(cbq->id.name), "%s", name); | 52 | snprintf(cbq->id.name, sizeof(cbq->id.name), "%s", name); |
| 63 | memcpy(&cbq->id.id, id, sizeof(struct cb_id)); | 53 | memcpy(&cbq->id.id, id, sizeof(struct cb_id)); |
| 64 | cbq->data.callback = callback; | 54 | cbq->callback = callback; |
| 65 | |||
| 66 | INIT_WORK(&cbq->work, &cn_queue_wrapper); | ||
| 67 | return cbq; | 55 | return cbq; |
| 68 | } | 56 | } |
| 69 | 57 | ||
| 70 | static void cn_queue_free_callback(struct cn_callback_entry *cbq) | 58 | void cn_queue_release_callback(struct cn_callback_entry *cbq) |
| 71 | { | 59 | { |
| 72 | flush_workqueue(cbq->pdev->cn_queue); | 60 | if (!atomic_dec_and_test(&cbq->refcnt)) |
| 61 | return; | ||
| 62 | |||
| 63 | atomic_dec(&cbq->pdev->refcnt); | ||
| 73 | kfree(cbq); | 64 | kfree(cbq); |
| 74 | } | 65 | } |
| 75 | 66 | ||
| @@ -85,13 +76,10 @@ int cn_queue_add_callback(struct cn_queue_dev *dev, const char *name, | |||
| 85 | struct cn_callback_entry *cbq, *__cbq; | 76 | struct cn_callback_entry *cbq, *__cbq; |
| 86 | int found = 0; | 77 | int found = 0; |
| 87 | 78 | ||
| 88 | cbq = cn_queue_alloc_callback_entry(name, id, callback); | 79 | cbq = cn_queue_alloc_callback_entry(dev, name, id, callback); |
| 89 | if (!cbq) | 80 | if (!cbq) |
| 90 | return -ENOMEM; | 81 | return -ENOMEM; |
| 91 | 82 | ||
| 92 | atomic_inc(&dev->refcnt); | ||
| 93 | cbq->pdev = dev; | ||
| 94 | |||
| 95 | spin_lock_bh(&dev->queue_lock); | 83 | spin_lock_bh(&dev->queue_lock); |
| 96 | list_for_each_entry(__cbq, &dev->queue_list, callback_entry) { | 84 | list_for_each_entry(__cbq, &dev->queue_list, callback_entry) { |
| 97 | if (cn_cb_equal(&__cbq->id.id, id)) { | 85 | if (cn_cb_equal(&__cbq->id.id, id)) { |
| @@ -104,8 +92,7 @@ int cn_queue_add_callback(struct cn_queue_dev *dev, const char *name, | |||
| 104 | spin_unlock_bh(&dev->queue_lock); | 92 | spin_unlock_bh(&dev->queue_lock); |
| 105 | 93 | ||
| 106 | if (found) { | 94 | if (found) { |
| 107 | cn_queue_free_callback(cbq); | 95 | cn_queue_release_callback(cbq); |
| 108 | atomic_dec(&dev->refcnt); | ||
| 109 | return -EINVAL; | 96 | return -EINVAL; |
| 110 | } | 97 | } |
| 111 | 98 | ||
| @@ -130,10 +117,8 @@ void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id) | |||
| 130 | } | 117 | } |
| 131 | spin_unlock_bh(&dev->queue_lock); | 118 | spin_unlock_bh(&dev->queue_lock); |
| 132 | 119 | ||
| 133 | if (found) { | 120 | if (found) |
| 134 | cn_queue_free_callback(cbq); | 121 | cn_queue_release_callback(cbq); |
| 135 | atomic_dec(&dev->refcnt); | ||
| 136 | } | ||
| 137 | } | 122 | } |
| 138 | 123 | ||
| 139 | struct cn_queue_dev *cn_queue_alloc_dev(const char *name, struct sock *nls) | 124 | struct cn_queue_dev *cn_queue_alloc_dev(const char *name, struct sock *nls) |
| @@ -151,12 +136,6 @@ struct cn_queue_dev *cn_queue_alloc_dev(const char *name, struct sock *nls) | |||
| 151 | 136 | ||
| 152 | dev->nls = nls; | 137 | dev->nls = nls; |
| 153 | 138 | ||
| 154 | dev->cn_queue = alloc_ordered_workqueue(dev->name, 0); | ||
| 155 | if (!dev->cn_queue) { | ||
| 156 | kfree(dev); | ||
| 157 | return NULL; | ||
| 158 | } | ||
| 159 | |||
| 160 | return dev; | 139 | return dev; |
| 161 | } | 140 | } |
| 162 | 141 | ||
| @@ -164,9 +143,6 @@ void cn_queue_free_dev(struct cn_queue_dev *dev) | |||
| 164 | { | 143 | { |
| 165 | struct cn_callback_entry *cbq, *n; | 144 | struct cn_callback_entry *cbq, *n; |
| 166 | 145 | ||
| 167 | flush_workqueue(dev->cn_queue); | ||
| 168 | destroy_workqueue(dev->cn_queue); | ||
| 169 | |||
| 170 | spin_lock_bh(&dev->queue_lock); | 146 | spin_lock_bh(&dev->queue_lock); |
| 171 | list_for_each_entry_safe(cbq, n, &dev->queue_list, callback_entry) | 147 | list_for_each_entry_safe(cbq, n, &dev->queue_list, callback_entry) |
| 172 | list_del(&cbq->callback_entry); | 148 | list_del(&cbq->callback_entry); |
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c index f7554de3be5e..d77005849af8 100644 --- a/drivers/connector/connector.c +++ b/drivers/connector/connector.c | |||
| @@ -122,51 +122,28 @@ EXPORT_SYMBOL_GPL(cn_netlink_send); | |||
| 122 | */ | 122 | */ |
| 123 | static int cn_call_callback(struct sk_buff *skb) | 123 | static int cn_call_callback(struct sk_buff *skb) |
| 124 | { | 124 | { |
| 125 | struct cn_callback_entry *__cbq, *__new_cbq; | 125 | struct cn_callback_entry *i, *cbq = NULL; |
| 126 | struct cn_dev *dev = &cdev; | 126 | struct cn_dev *dev = &cdev; |
| 127 | struct cn_msg *msg = NLMSG_DATA(nlmsg_hdr(skb)); | 127 | struct cn_msg *msg = NLMSG_DATA(nlmsg_hdr(skb)); |
| 128 | struct netlink_skb_parms *nsp = &NETLINK_CB(skb); | ||
| 128 | int err = -ENODEV; | 129 | int err = -ENODEV; |
| 129 | 130 | ||
| 130 | spin_lock_bh(&dev->cbdev->queue_lock); | 131 | spin_lock_bh(&dev->cbdev->queue_lock); |
| 131 | list_for_each_entry(__cbq, &dev->cbdev->queue_list, callback_entry) { | 132 | list_for_each_entry(i, &dev->cbdev->queue_list, callback_entry) { |
| 132 | if (cn_cb_equal(&__cbq->id.id, &msg->id)) { | 133 | if (cn_cb_equal(&i->id.id, &msg->id)) { |
| 133 | if (likely(!work_pending(&__cbq->work) && | 134 | atomic_inc(&i->refcnt); |
| 134 | __cbq->data.skb == NULL)) { | 135 | cbq = i; |
| 135 | __cbq->data.skb = skb; | ||
| 136 | |||
| 137 | if (queue_work(dev->cbdev->cn_queue, | ||
| 138 | &__cbq->work)) | ||
| 139 | err = 0; | ||
| 140 | else | ||
| 141 | err = -EINVAL; | ||
| 142 | } else { | ||
| 143 | struct cn_callback_data *d; | ||
| 144 | |||
| 145 | err = -ENOMEM; | ||
| 146 | __new_cbq = kzalloc(sizeof(struct cn_callback_entry), GFP_ATOMIC); | ||
| 147 | if (__new_cbq) { | ||
| 148 | d = &__new_cbq->data; | ||
| 149 | d->skb = skb; | ||
| 150 | d->callback = __cbq->data.callback; | ||
| 151 | d->free = __new_cbq; | ||
| 152 | |||
| 153 | INIT_WORK(&__new_cbq->work, | ||
| 154 | &cn_queue_wrapper); | ||
| 155 | |||
| 156 | if (queue_work(dev->cbdev->cn_queue, | ||
| 157 | &__new_cbq->work)) | ||
| 158 | err = 0; | ||
| 159 | else { | ||
| 160 | kfree(__new_cbq); | ||
| 161 | err = -EINVAL; | ||
| 162 | } | ||
| 163 | } | ||
| 164 | } | ||
| 165 | break; | 136 | break; |
| 166 | } | 137 | } |
| 167 | } | 138 | } |
| 168 | spin_unlock_bh(&dev->cbdev->queue_lock); | 139 | spin_unlock_bh(&dev->cbdev->queue_lock); |
| 169 | 140 | ||
| 141 | if (cbq != NULL) { | ||
| 142 | cbq->callback(msg, nsp); | ||
| 143 | kfree_skb(skb); | ||
| 144 | cn_queue_release_callback(cbq); | ||
| 145 | } | ||
| 146 | |||
| 170 | return err; | 147 | return err; |
| 171 | } | 148 | } |
| 172 | 149 | ||
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index b03771d4787c..2dafc5c38ae7 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
| @@ -1782,7 +1782,7 @@ error_out: | |||
| 1782 | * cpufreq_update_policy - re-evaluate an existing cpufreq policy | 1782 | * cpufreq_update_policy - re-evaluate an existing cpufreq policy |
| 1783 | * @cpu: CPU which shall be re-evaluated | 1783 | * @cpu: CPU which shall be re-evaluated |
| 1784 | * | 1784 | * |
| 1785 | * Usefull for policy notifiers which have different necessities | 1785 | * Useful for policy notifiers which have different necessities |
| 1786 | * at different times. | 1786 | * at different times. |
| 1787 | */ | 1787 | */ |
| 1788 | int cpufreq_update_policy(unsigned int cpu) | 1788 | int cpufreq_update_policy(unsigned int cpu) |
diff --git a/drivers/crypto/amcc/crypto4xx_sa.c b/drivers/crypto/amcc/crypto4xx_sa.c index 466fd94cd4a3..de8a7a48775a 100644 --- a/drivers/crypto/amcc/crypto4xx_sa.c +++ b/drivers/crypto/amcc/crypto4xx_sa.c | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | * @file crypto4xx_sa.c | 17 | * @file crypto4xx_sa.c |
| 18 | * | 18 | * |
| 19 | * This file implements the security context | 19 | * This file implements the security context |
| 20 | * assoicate format. | 20 | * associate format. |
| 21 | */ | 21 | */ |
| 22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
| 23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
diff --git a/drivers/crypto/amcc/crypto4xx_sa.h b/drivers/crypto/amcc/crypto4xx_sa.h index 4b83ed7e5570..1352d58d4e34 100644 --- a/drivers/crypto/amcc/crypto4xx_sa.h +++ b/drivers/crypto/amcc/crypto4xx_sa.h | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. |
| 16 | * | 16 | * |
| 17 | * This file defines the security context | 17 | * This file defines the security context |
| 18 | * assoicate format. | 18 | * associate format. |
| 19 | */ | 19 | */ |
| 20 | 20 | ||
| 21 | #ifndef __CRYPTO4XX_SA_H__ | 21 | #ifndef __CRYPTO4XX_SA_H__ |
diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c index 0d662213c066..4c20c5bf6058 100644 --- a/drivers/crypto/ixp4xx_crypto.c +++ b/drivers/crypto/ixp4xx_crypto.c | |||
| @@ -1044,7 +1044,7 @@ static int aead_perform(struct aead_request *req, int encrypt, | |||
| 1044 | memcpy(crypt->iv, req->iv, ivsize); | 1044 | memcpy(crypt->iv, req->iv, ivsize); |
| 1045 | 1045 | ||
| 1046 | if (req->src != req->dst) { | 1046 | if (req->src != req->dst) { |
| 1047 | BUG(); /* -ENOTSUP because of my lazyness */ | 1047 | BUG(); /* -ENOTSUP because of my laziness */ |
| 1048 | } | 1048 | } |
| 1049 | 1049 | ||
| 1050 | /* ASSOC data */ | 1050 | /* ASSOC data */ |
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 3d7d705f026f..235f53bf494e 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c | |||
| @@ -167,7 +167,7 @@ static void atc_desc_put(struct at_dma_chan *atchan, struct at_desc *desc) | |||
| 167 | /** | 167 | /** |
| 168 | * atc_assign_cookie - compute and assign new cookie | 168 | * atc_assign_cookie - compute and assign new cookie |
| 169 | * @atchan: channel we work on | 169 | * @atchan: channel we work on |
| 170 | * @desc: descriptor to asign cookie for | 170 | * @desc: descriptor to assign cookie for |
| 171 | * | 171 | * |
| 172 | * Called with atchan->lock held and bh disabled | 172 | * Called with atchan->lock held and bh disabled |
| 173 | */ | 173 | */ |
diff --git a/drivers/dma/coh901318.c b/drivers/dma/coh901318.c index 00deabd9a04b..f48e54006518 100644 --- a/drivers/dma/coh901318.c +++ b/drivers/dma/coh901318.c | |||
| @@ -529,7 +529,7 @@ static void coh901318_pause(struct dma_chan *chan) | |||
| 529 | val = readl(virtbase + COH901318_CX_CFG + | 529 | val = readl(virtbase + COH901318_CX_CFG + |
| 530 | COH901318_CX_CFG_SPACING * channel); | 530 | COH901318_CX_CFG_SPACING * channel); |
| 531 | 531 | ||
| 532 | /* Stopping infinit transfer */ | 532 | /* Stopping infinite transfer */ |
| 533 | if ((val & COH901318_CX_CTRL_TC_ENABLE) == 0 && | 533 | if ((val & COH901318_CX_CTRL_TC_ENABLE) == 0 && |
| 534 | (val & COH901318_CX_CFG_CH_ENABLE)) | 534 | (val & COH901318_CX_CFG_CH_ENABLE)) |
| 535 | cohc->stopped = 1; | 535 | cohc->stopped = 1; |
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index 6b396759e7f5..8a781540590c 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c | |||
| @@ -1448,7 +1448,7 @@ static const struct of_device_id fsldma_of_ids[] = { | |||
| 1448 | {} | 1448 | {} |
| 1449 | }; | 1449 | }; |
| 1450 | 1450 | ||
| 1451 | static struct of_platform_driver fsldma_of_driver = { | 1451 | static struct platform_driver fsldma_of_driver = { |
| 1452 | .driver = { | 1452 | .driver = { |
| 1453 | .name = "fsl-elo-dma", | 1453 | .name = "fsl-elo-dma", |
| 1454 | .owner = THIS_MODULE, | 1454 | .owner = THIS_MODULE, |
diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c index 798f46a4590d..3d4ec38b9b62 100644 --- a/drivers/dma/intel_mid_dma.c +++ b/drivers/dma/intel_mid_dma.c | |||
| @@ -911,8 +911,8 @@ static int intel_mid_dma_alloc_chan_resources(struct dma_chan *chan) | |||
| 911 | 911 | ||
| 912 | /** | 912 | /** |
| 913 | * midc_handle_error - Handle DMA txn error | 913 | * midc_handle_error - Handle DMA txn error |
| 914 | * @mid: controller where error occured | 914 | * @mid: controller where error occurred |
| 915 | * @midc: chan where error occured | 915 | * @midc: chan where error occurred |
| 916 | * | 916 | * |
| 917 | * Scan the descriptor for error | 917 | * Scan the descriptor for error |
| 918 | */ | 918 | */ |
| @@ -1099,7 +1099,7 @@ static int mid_setup_dma(struct pci_dev *pdev) | |||
| 1099 | dma->mask_reg = ioremap(LNW_PERIPHRAL_MASK_BASE, | 1099 | dma->mask_reg = ioremap(LNW_PERIPHRAL_MASK_BASE, |
| 1100 | LNW_PERIPHRAL_MASK_SIZE); | 1100 | LNW_PERIPHRAL_MASK_SIZE); |
| 1101 | if (dma->mask_reg == NULL) { | 1101 | if (dma->mask_reg == NULL) { |
| 1102 | pr_err("ERR_MDMA:Cant map periphral intr space !!\n"); | 1102 | pr_err("ERR_MDMA:Can't map periphral intr space !!\n"); |
| 1103 | return -ENOMEM; | 1103 | return -ENOMEM; |
| 1104 | } | 1104 | } |
| 1105 | } else | 1105 | } else |
| @@ -1373,7 +1373,7 @@ int dma_resume(struct pci_dev *pci) | |||
| 1373 | pci_restore_state(pci); | 1373 | pci_restore_state(pci); |
| 1374 | ret = pci_enable_device(pci); | 1374 | ret = pci_enable_device(pci); |
| 1375 | if (ret) { | 1375 | if (ret) { |
| 1376 | pr_err("MDMA: device cant be enabled for %x\n", pci->device); | 1376 | pr_err("MDMA: device can't be enabled for %x\n", pci->device); |
| 1377 | return ret; | 1377 | return ret; |
| 1378 | } | 1378 | } |
| 1379 | device->state = RUNNING; | 1379 | device->state = RUNNING; |
diff --git a/drivers/dma/intel_mid_dma_regs.h b/drivers/dma/intel_mid_dma_regs.h index 709fecbdde79..aea5ee88ce03 100644 --- a/drivers/dma/intel_mid_dma_regs.h +++ b/drivers/dma/intel_mid_dma_regs.h | |||
| @@ -174,8 +174,8 @@ union intel_mid_dma_cfg_hi { | |||
| 174 | * @dma: dma device struture pointer | 174 | * @dma: dma device struture pointer |
| 175 | * @busy: bool representing if ch is busy (active txn) or not | 175 | * @busy: bool representing if ch is busy (active txn) or not |
| 176 | * @in_use: bool representing if ch is in use or not | 176 | * @in_use: bool representing if ch is in use or not |
| 177 | * @raw_tfr: raw trf interrupt recieved | 177 | * @raw_tfr: raw trf interrupt received |
| 178 | * @raw_block: raw block interrupt recieved | 178 | * @raw_block: raw block interrupt received |
| 179 | */ | 179 | */ |
| 180 | struct intel_mid_dma_chan { | 180 | struct intel_mid_dma_chan { |
| 181 | struct dma_chan chan; | 181 | struct dma_chan chan; |
diff --git a/drivers/dma/mpc512x_dma.c b/drivers/dma/mpc512x_dma.c index 4f95d31f5a20..b9bae94f2015 100644 --- a/drivers/dma/mpc512x_dma.c +++ b/drivers/dma/mpc512x_dma.c | |||
| @@ -328,7 +328,7 @@ static irqreturn_t mpc_dma_irq(int irq, void *data) | |||
| 328 | return IRQ_HANDLED; | 328 | return IRQ_HANDLED; |
| 329 | } | 329 | } |
| 330 | 330 | ||
| 331 | /* proccess completed descriptors */ | 331 | /* process completed descriptors */ |
| 332 | static void mpc_dma_process_completed(struct mpc_dma *mdma) | 332 | static void mpc_dma_process_completed(struct mpc_dma *mdma) |
| 333 | { | 333 | { |
| 334 | dma_cookie_t last_cookie = 0; | 334 | dma_cookie_t last_cookie = 0; |
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index 6451b581a70b..d50da41ac328 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c | |||
| @@ -865,7 +865,12 @@ static unsigned int sh_dmae_reset(struct sh_dmae_device *shdev) | |||
| 865 | 865 | ||
| 866 | static irqreturn_t sh_dmae_err(int irq, void *data) | 866 | static irqreturn_t sh_dmae_err(int irq, void *data) |
| 867 | { | 867 | { |
| 868 | return IRQ_RETVAL(sh_dmae_reset(data)); | 868 | struct sh_dmae_device *shdev = data; |
| 869 | |||
| 870 | if (dmaor_read(shdev) & DMAOR_AE) | ||
| 871 | return IRQ_RETVAL(sh_dmae_reset(data)); | ||
| 872 | else | ||
| 873 | return IRQ_NONE; | ||
| 869 | } | 874 | } |
| 870 | 875 | ||
| 871 | static void dmae_do_tasklet(unsigned long data) | 876 | static void dmae_do_tasklet(unsigned long data) |
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index af955de035f4..94ee15dd3aed 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c | |||
| @@ -90,7 +90,7 @@ struct d40_lli_pool { | |||
| 90 | * @lli_log: Same as above but for logical channels. | 90 | * @lli_log: Same as above but for logical channels. |
| 91 | * @lli_pool: The pool with two entries pre-allocated. | 91 | * @lli_pool: The pool with two entries pre-allocated. |
| 92 | * @lli_len: Number of llis of current descriptor. | 92 | * @lli_len: Number of llis of current descriptor. |
| 93 | * @lli_current: Number of transfered llis. | 93 | * @lli_current: Number of transferred llis. |
| 94 | * @lcla_alloc: Number of LCLA entries allocated. | 94 | * @lcla_alloc: Number of LCLA entries allocated. |
| 95 | * @txd: DMA engine struct. Used for among other things for communication | 95 | * @txd: DMA engine struct. Used for among other things for communication |
| 96 | * during a transfer. | 96 | * during a transfer. |
| @@ -1214,7 +1214,7 @@ static void dma_tasklet(unsigned long data) | |||
| 1214 | return; | 1214 | return; |
| 1215 | 1215 | ||
| 1216 | err: | 1216 | err: |
| 1217 | /* Rescue manouver if receiving double interrupts */ | 1217 | /* Rescue manoeuvre if receiving double interrupts */ |
| 1218 | if (d40c->pending_tx > 0) | 1218 | if (d40c->pending_tx > 0) |
| 1219 | d40c->pending_tx--; | 1219 | d40c->pending_tx--; |
| 1220 | spin_unlock_irqrestore(&d40c->lock, flags); | 1220 | spin_unlock_irqrestore(&d40c->lock, flags); |
diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig index fac1a2002e67..af1a17d42bd7 100644 --- a/drivers/edac/Kconfig +++ b/drivers/edac/Kconfig | |||
| @@ -45,7 +45,7 @@ config EDAC_DECODE_MCE | |||
| 45 | default y | 45 | default y |
| 46 | ---help--- | 46 | ---help--- |
| 47 | Enable this option if you want to decode Machine Check Exceptions | 47 | Enable this option if you want to decode Machine Check Exceptions |
| 48 | occuring on your machine in human-readable form. | 48 | occurring on your machine in human-readable form. |
| 49 | 49 | ||
| 50 | You should definitely say Y here in case you want to decode MCEs | 50 | You should definitely say Y here in case you want to decode MCEs |
| 51 | which occur really early upon boot, before the module infrastructure | 51 | which occur really early upon boot, before the module infrastructure |
diff --git a/drivers/edac/cpc925_edac.c b/drivers/edac/cpc925_edac.c index b9a781c47e3c..837ad8f85b48 100644 --- a/drivers/edac/cpc925_edac.c +++ b/drivers/edac/cpc925_edac.c | |||
| @@ -817,7 +817,7 @@ static void cpc925_del_edac_devices(void) | |||
| 817 | } | 817 | } |
| 818 | } | 818 | } |
| 819 | 819 | ||
| 820 | /* Convert current back-ground scrub rate into byte/sec bandwith */ | 820 | /* Convert current back-ground scrub rate into byte/sec bandwidth */ |
| 821 | static int cpc925_get_sdram_scrub_rate(struct mem_ctl_info *mci) | 821 | static int cpc925_get_sdram_scrub_rate(struct mem_ctl_info *mci) |
| 822 | { | 822 | { |
| 823 | struct cpc925_mc_pdata *pdata = mci->pvt_info; | 823 | struct cpc925_mc_pdata *pdata = mci->pvt_info; |
diff --git a/drivers/edac/edac_core.h b/drivers/edac/edac_core.h index 3d965347a673..eefa3501916b 100644 --- a/drivers/edac/edac_core.h +++ b/drivers/edac/edac_core.h | |||
| @@ -164,7 +164,7 @@ enum mem_type { | |||
| 164 | /* chipset Error Detection and Correction capabilities and mode */ | 164 | /* chipset Error Detection and Correction capabilities and mode */ |
| 165 | enum edac_type { | 165 | enum edac_type { |
| 166 | EDAC_UNKNOWN = 0, /* Unknown if ECC is available */ | 166 | EDAC_UNKNOWN = 0, /* Unknown if ECC is available */ |
| 167 | EDAC_NONE, /* Doesnt support ECC */ | 167 | EDAC_NONE, /* Doesn't support ECC */ |
| 168 | EDAC_RESERVED, /* Reserved ECC type */ | 168 | EDAC_RESERVED, /* Reserved ECC type */ |
| 169 | EDAC_PARITY, /* Detects parity errors */ | 169 | EDAC_PARITY, /* Detects parity errors */ |
| 170 | EDAC_EC, /* Error Checking - no correction */ | 170 | EDAC_EC, /* Error Checking - no correction */ |
| @@ -233,7 +233,7 @@ enum scrub_type { | |||
| 233 | * of these in parallel provides 64 bits which is common | 233 | * of these in parallel provides 64 bits which is common |
| 234 | * for a memory stick. | 234 | * for a memory stick. |
| 235 | * | 235 | * |
| 236 | * Memory Stick: A printed circuit board that agregates multiple | 236 | * Memory Stick: A printed circuit board that aggregates multiple |
| 237 | * memory devices in parallel. This is the atomic | 237 | * memory devices in parallel. This is the atomic |
| 238 | * memory component that is purchaseable by Joe consumer | 238 | * memory component that is purchaseable by Joe consumer |
| 239 | * and loaded into a memory socket. | 239 | * and loaded into a memory socket. |
| @@ -385,7 +385,7 @@ struct mem_ctl_info { | |||
| 385 | 385 | ||
| 386 | /* Get the current sdram memory scrub rate from the internal | 386 | /* Get the current sdram memory scrub rate from the internal |
| 387 | representation and converts it to the closest matching | 387 | representation and converts it to the closest matching |
| 388 | bandwith in bytes/sec. | 388 | bandwidth in bytes/sec. |
| 389 | */ | 389 | */ |
| 390 | int (*get_sdram_scrub_rate) (struct mem_ctl_info * mci); | 390 | int (*get_sdram_scrub_rate) (struct mem_ctl_info * mci); |
| 391 | 391 | ||
| @@ -823,7 +823,7 @@ extern int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci, | |||
| 823 | * There are a limited number of error logging registers that can | 823 | * There are a limited number of error logging registers that can |
| 824 | * be exausted. When all registers are exhausted and an additional | 824 | * be exausted. When all registers are exhausted and an additional |
| 825 | * error occurs then an error overflow register records that an | 825 | * error occurs then an error overflow register records that an |
| 826 | * error occured and the type of error, but doesn't have any | 826 | * error occurred and the type of error, but doesn't have any |
| 827 | * further information. The ce/ue versions make for cleaner | 827 | * further information. The ce/ue versions make for cleaner |
| 828 | * reporting logic and function interface - reduces conditional | 828 | * reporting logic and function interface - reduces conditional |
| 829 | * statement clutter and extra function arguments. | 829 | * statement clutter and extra function arguments. |
diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c index d5e13c94714f..a7408cf86f37 100644 --- a/drivers/edac/edac_device.c +++ b/drivers/edac/edac_device.c | |||
| @@ -672,7 +672,7 @@ void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev, | |||
| 672 | block->counters.ce_count++; | 672 | block->counters.ce_count++; |
| 673 | } | 673 | } |
| 674 | 674 | ||
| 675 | /* Propogate the count up the 'totals' tree */ | 675 | /* Propagate the count up the 'totals' tree */ |
| 676 | instance->counters.ce_count++; | 676 | instance->counters.ce_count++; |
| 677 | edac_dev->counters.ce_count++; | 677 | edac_dev->counters.ce_count++; |
| 678 | 678 | ||
| @@ -718,7 +718,7 @@ void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev, | |||
| 718 | block->counters.ue_count++; | 718 | block->counters.ue_count++; |
| 719 | } | 719 | } |
| 720 | 720 | ||
| 721 | /* Propogate the count up the 'totals' tree */ | 721 | /* Propagate the count up the 'totals' tree */ |
| 722 | instance->counters.ue_count++; | 722 | instance->counters.ue_count++; |
| 723 | edac_dev->counters.ue_count++; | 723 | edac_dev->counters.ue_count++; |
| 724 | 724 | ||
diff --git a/drivers/edac/edac_device_sysfs.c b/drivers/edac/edac_device_sysfs.c index 400de071cabc..86649df00285 100644 --- a/drivers/edac/edac_device_sysfs.c +++ b/drivers/edac/edac_device_sysfs.c | |||
| @@ -533,7 +533,7 @@ static int edac_device_create_block(struct edac_device_ctl_info *edac_dev, | |||
| 533 | memset(&block->kobj, 0, sizeof(struct kobject)); | 533 | memset(&block->kobj, 0, sizeof(struct kobject)); |
| 534 | 534 | ||
| 535 | /* bump the main kobject's reference count for this controller | 535 | /* bump the main kobject's reference count for this controller |
| 536 | * and this instance is dependant on the main | 536 | * and this instance is dependent on the main |
| 537 | */ | 537 | */ |
| 538 | main_kobj = kobject_get(&edac_dev->kobj); | 538 | main_kobj = kobject_get(&edac_dev->kobj); |
| 539 | if (!main_kobj) { | 539 | if (!main_kobj) { |
| @@ -635,7 +635,7 @@ static int edac_device_create_instance(struct edac_device_ctl_info *edac_dev, | |||
| 635 | instance->ctl = edac_dev; | 635 | instance->ctl = edac_dev; |
| 636 | 636 | ||
| 637 | /* bump the main kobject's reference count for this controller | 637 | /* bump the main kobject's reference count for this controller |
| 638 | * and this instance is dependant on the main | 638 | * and this instance is dependent on the main |
| 639 | */ | 639 | */ |
| 640 | main_kobj = kobject_get(&edac_dev->kobj); | 640 | main_kobj = kobject_get(&edac_dev->kobj); |
| 641 | if (!main_kobj) { | 641 | if (!main_kobj) { |
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c index a4e9db2d6524..1d8056049072 100644 --- a/drivers/edac/edac_mc.c +++ b/drivers/edac/edac_mc.c | |||
| @@ -724,7 +724,7 @@ void edac_mc_handle_ce(struct mem_ctl_info *mci, | |||
| 724 | * Some MC's can remap memory so that it is still available | 724 | * Some MC's can remap memory so that it is still available |
| 725 | * at a different address when PCI devices map into memory. | 725 | * at a different address when PCI devices map into memory. |
| 726 | * MC's that can't do this lose the memory where PCI devices | 726 | * MC's that can't do this lose the memory where PCI devices |
| 727 | * are mapped. This mapping is MC dependant and so we call | 727 | * are mapped. This mapping is MC dependent and so we call |
| 728 | * back into the MC driver for it to map the MC page to | 728 | * back into the MC driver for it to map the MC page to |
| 729 | * a physical (CPU) page which can then be mapped to a virtual | 729 | * a physical (CPU) page which can then be mapped to a virtual |
| 730 | * page - which can then be scrubbed. | 730 | * page - which can then be scrubbed. |
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c index 73196f7b7229..26343fd46596 100644 --- a/drivers/edac/edac_mc_sysfs.c +++ b/drivers/edac/edac_mc_sysfs.c | |||
| @@ -850,7 +850,7 @@ static void edac_remove_mci_instance_attributes(struct mem_ctl_info *mci, | |||
| 850 | 850 | ||
| 851 | /* | 851 | /* |
| 852 | * loop if there are attributes and until we hit a NULL entry | 852 | * loop if there are attributes and until we hit a NULL entry |
| 853 | * Remove first all the atributes | 853 | * Remove first all the attributes |
| 854 | */ | 854 | */ |
| 855 | while (sysfs_attrib) { | 855 | while (sysfs_attrib) { |
| 856 | debugf4("%s() sysfs_attrib = %p\n",__func__, sysfs_attrib); | 856 | debugf4("%s() sysfs_attrib = %p\n",__func__, sysfs_attrib); |
diff --git a/drivers/edac/edac_pci_sysfs.c b/drivers/edac/edac_pci_sysfs.c index 023b01cb5175..495198ad059c 100644 --- a/drivers/edac/edac_pci_sysfs.c +++ b/drivers/edac/edac_pci_sysfs.c | |||
| @@ -352,7 +352,7 @@ static int edac_pci_main_kobj_setup(void) | |||
| 352 | return 0; | 352 | return 0; |
| 353 | 353 | ||
| 354 | /* First time, so create the main kobject and its | 354 | /* First time, so create the main kobject and its |
| 355 | * controls and atributes | 355 | * controls and attributes |
| 356 | */ | 356 | */ |
| 357 | edac_class = edac_get_sysfs_class(); | 357 | edac_class = edac_get_sysfs_class(); |
| 358 | if (edac_class == NULL) { | 358 | if (edac_class == NULL) { |
| @@ -551,7 +551,7 @@ static void edac_pci_dev_parity_clear(struct pci_dev *dev) | |||
| 551 | /* | 551 | /* |
| 552 | * PCI Parity polling | 552 | * PCI Parity polling |
| 553 | * | 553 | * |
| 554 | * Fucntion to retrieve the current parity status | 554 | * Function to retrieve the current parity status |
| 555 | * and decode it | 555 | * and decode it |
| 556 | * | 556 | * |
| 557 | */ | 557 | */ |
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c index a5cefab8d65d..87f427c2ce5c 100644 --- a/drivers/edac/i5000_edac.c +++ b/drivers/edac/i5000_edac.c | |||
| @@ -1372,7 +1372,7 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx) | |||
| 1372 | * actual number of slots/dimms per channel, we thus utilize the | 1372 | * actual number of slots/dimms per channel, we thus utilize the |
| 1373 | * resource as specified by the chipset. Thus, we might have | 1373 | * resource as specified by the chipset. Thus, we might have |
| 1374 | * have more DIMMs per channel than actually on the mobo, but this | 1374 | * have more DIMMs per channel than actually on the mobo, but this |
| 1375 | * allows the driver to support upto the chipset max, without | 1375 | * allows the driver to support up to the chipset max, without |
| 1376 | * some fancy mobo determination. | 1376 | * some fancy mobo determination. |
| 1377 | */ | 1377 | */ |
| 1378 | i5000_get_dimm_and_channel_counts(pdev, &num_dimms_per_channel, | 1378 | i5000_get_dimm_and_channel_counts(pdev, &num_dimms_per_channel, |
diff --git a/drivers/edac/i5100_edac.c b/drivers/edac/i5100_edac.c index 0448da0af75d..bcbdeeca48b8 100644 --- a/drivers/edac/i5100_edac.c +++ b/drivers/edac/i5100_edac.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | * | 11 | * |
| 12 | * The intel 5100 has two independent channels. EDAC core currently | 12 | * The intel 5100 has two independent channels. EDAC core currently |
| 13 | * can not reflect this configuration so instead the chip-select | 13 | * can not reflect this configuration so instead the chip-select |
| 14 | * rows for each respective channel are layed out one after another, | 14 | * rows for each respective channel are laid out one after another, |
| 15 | * the first half belonging to channel 0, the second half belonging | 15 | * the first half belonging to channel 0, the second half belonging |
| 16 | * to channel 1. | 16 | * to channel 1. |
| 17 | */ | 17 | */ |
diff --git a/drivers/edac/i5400_edac.c b/drivers/edac/i5400_edac.c index 38a9be9e1c7c..80a465efbae8 100644 --- a/drivers/edac/i5400_edac.c +++ b/drivers/edac/i5400_edac.c | |||
| @@ -648,7 +648,7 @@ static void i5400_process_nonfatal_error_info(struct mem_ctl_info *mci, | |||
| 648 | return; | 648 | return; |
| 649 | } | 649 | } |
| 650 | 650 | ||
| 651 | /* Miscelaneous errors */ | 651 | /* Miscellaneous errors */ |
| 652 | errnum = find_first_bit(&allErrors, ARRAY_SIZE(error_name)); | 652 | errnum = find_first_bit(&allErrors, ARRAY_SIZE(error_name)); |
| 653 | 653 | ||
| 654 | branch = extract_fbdchan_indx(info->ferr_nf_fbd); | 654 | branch = extract_fbdchan_indx(info->ferr_nf_fbd); |
| @@ -1240,7 +1240,7 @@ static int i5400_probe1(struct pci_dev *pdev, int dev_idx) | |||
| 1240 | * actual number of slots/dimms per channel, we thus utilize the | 1240 | * actual number of slots/dimms per channel, we thus utilize the |
| 1241 | * resource as specified by the chipset. Thus, we might have | 1241 | * resource as specified by the chipset. Thus, we might have |
| 1242 | * have more DIMMs per channel than actually on the mobo, but this | 1242 | * have more DIMMs per channel than actually on the mobo, but this |
| 1243 | * allows the driver to support upto the chipset max, without | 1243 | * allows the driver to support up to the chipset max, without |
| 1244 | * some fancy mobo determination. | 1244 | * some fancy mobo determination. |
| 1245 | */ | 1245 | */ |
| 1246 | num_dimms_per_channel = MAX_DIMMS_PER_CHANNEL; | 1246 | num_dimms_per_channel = MAX_DIMMS_PER_CHANNEL; |
diff --git a/drivers/edac/i7300_edac.c b/drivers/edac/i7300_edac.c index 76d1f576cdc8..363cc1602944 100644 --- a/drivers/edac/i7300_edac.c +++ b/drivers/edac/i7300_edac.c | |||
| @@ -1065,7 +1065,7 @@ static int __devinit i7300_init_one(struct pci_dev *pdev, | |||
| 1065 | * actual number of slots/dimms per channel, we thus utilize the | 1065 | * actual number of slots/dimms per channel, we thus utilize the |
| 1066 | * resource as specified by the chipset. Thus, we might have | 1066 | * resource as specified by the chipset. Thus, we might have |
| 1067 | * have more DIMMs per channel than actually on the mobo, but this | 1067 | * have more DIMMs per channel than actually on the mobo, but this |
| 1068 | * allows the driver to support upto the chipset max, without | 1068 | * allows the driver to support up to the chipset max, without |
| 1069 | * some fancy mobo determination. | 1069 | * some fancy mobo determination. |
| 1070 | */ | 1070 | */ |
| 1071 | num_dimms_per_channel = MAX_SLOTS; | 1071 | num_dimms_per_channel = MAX_SLOTS; |
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c index 81154ab296b6..465cbc25149f 100644 --- a/drivers/edac/i7core_edac.c +++ b/drivers/edac/i7core_edac.c | |||
| @@ -1772,7 +1772,7 @@ static void i7core_check_error(struct mem_ctl_info *mci) | |||
| 1772 | /* | 1772 | /* |
| 1773 | * MCE first step: Copy all mce errors into a temporary buffer | 1773 | * MCE first step: Copy all mce errors into a temporary buffer |
| 1774 | * We use a double buffering here, to reduce the risk of | 1774 | * We use a double buffering here, to reduce the risk of |
| 1775 | * loosing an error. | 1775 | * losing an error. |
| 1776 | */ | 1776 | */ |
| 1777 | smp_rmb(); | 1777 | smp_rmb(); |
| 1778 | count = (pvt->mce_out + MCE_LOG_LEN - pvt->mce_in) | 1778 | count = (pvt->mce_out + MCE_LOG_LEN - pvt->mce_in) |
diff --git a/drivers/edac/i82443bxgx_edac.c b/drivers/edac/i82443bxgx_edac.c index 678405ab04e4..4329d39f902c 100644 --- a/drivers/edac/i82443bxgx_edac.c +++ b/drivers/edac/i82443bxgx_edac.c | |||
| @@ -203,7 +203,7 @@ static void i82443bxgx_init_csrows(struct mem_ctl_info *mci, | |||
| 203 | row_high_limit = ((u32) drbar << 23); | 203 | row_high_limit = ((u32) drbar << 23); |
| 204 | /* find the DRAM Chip Select Base address and mask */ | 204 | /* find the DRAM Chip Select Base address and mask */ |
| 205 | debugf1("MC%d: %s: %s() Row=%d, " | 205 | debugf1("MC%d: %s: %s() Row=%d, " |
| 206 | "Boundry Address=%#0x, Last = %#0x\n", | 206 | "Boundary Address=%#0x, Last = %#0x\n", |
| 207 | mci->mc_idx, __FILE__, __func__, index, row_high_limit, | 207 | mci->mc_idx, __FILE__, __func__, index, row_high_limit, |
| 208 | row_high_limit_last); | 208 | row_high_limit_last); |
| 209 | 209 | ||
| @@ -305,7 +305,7 @@ static int i82443bxgx_edacmc_probe1(struct pci_dev *pdev, int dev_idx) | |||
| 305 | i82443bxgx_init_csrows(mci, pdev, edac_mode, mtype); | 305 | i82443bxgx_init_csrows(mci, pdev, edac_mode, mtype); |
| 306 | 306 | ||
| 307 | /* Many BIOSes don't clear error flags on boot, so do this | 307 | /* Many BIOSes don't clear error flags on boot, so do this |
| 308 | * here, or we get "phantom" errors occuring at module-load | 308 | * here, or we get "phantom" errors occurring at module-load |
| 309 | * time. */ | 309 | * time. */ |
| 310 | pci_write_bits32(pdev, I82443BXGX_EAP, | 310 | pci_write_bits32(pdev, I82443BXGX_EAP, |
| 311 | (I82443BXGX_EAP_OFFSET_SBE | | 311 | (I82443BXGX_EAP_OFFSET_SBE | |
diff --git a/drivers/edac/mce_amd_inj.c b/drivers/edac/mce_amd_inj.c index 733a7e7a8d6f..a4987e03f59e 100644 --- a/drivers/edac/mce_amd_inj.c +++ b/drivers/edac/mce_amd_inj.c | |||
| @@ -90,7 +90,7 @@ static ssize_t edac_inject_bank_store(struct kobject *kobj, | |||
| 90 | 90 | ||
| 91 | if (value > 5) | 91 | if (value > 5) |
| 92 | if (boot_cpu_data.x86 != 0x15 || value > 6) { | 92 | if (boot_cpu_data.x86 != 0x15 || value > 6) { |
| 93 | printk(KERN_ERR "Non-existant MCE bank: %lu\n", value); | 93 | printk(KERN_ERR "Non-existent MCE bank: %lu\n", value); |
| 94 | return -EINVAL; | 94 | return -EINVAL; |
| 95 | } | 95 | } |
| 96 | 96 | ||
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c index ffb5ad080bee..38ab8e2cd7f4 100644 --- a/drivers/edac/mpc85xx_edac.c +++ b/drivers/edac/mpc85xx_edac.c | |||
| @@ -1147,13 +1147,14 @@ static struct platform_driver mpc85xx_mc_err_driver = { | |||
| 1147 | static void __init mpc85xx_mc_clear_rfxe(void *data) | 1147 | static void __init mpc85xx_mc_clear_rfxe(void *data) |
| 1148 | { | 1148 | { |
| 1149 | orig_hid1[smp_processor_id()] = mfspr(SPRN_HID1); | 1149 | orig_hid1[smp_processor_id()] = mfspr(SPRN_HID1); |
| 1150 | mtspr(SPRN_HID1, (orig_hid1[smp_processor_id()] & ~0x20000)); | 1150 | mtspr(SPRN_HID1, (orig_hid1[smp_processor_id()] & ~HID1_RFXE)); |
| 1151 | } | 1151 | } |
| 1152 | #endif | 1152 | #endif |
| 1153 | 1153 | ||
| 1154 | static int __init mpc85xx_mc_init(void) | 1154 | static int __init mpc85xx_mc_init(void) |
| 1155 | { | 1155 | { |
| 1156 | int res = 0; | 1156 | int res = 0; |
| 1157 | u32 pvr = 0; | ||
| 1157 | 1158 | ||
| 1158 | printk(KERN_INFO "Freescale(R) MPC85xx EDAC driver, " | 1159 | printk(KERN_INFO "Freescale(R) MPC85xx EDAC driver, " |
| 1159 | "(C) 2006 Montavista Software\n"); | 1160 | "(C) 2006 Montavista Software\n"); |
| @@ -1183,12 +1184,17 @@ static int __init mpc85xx_mc_init(void) | |||
| 1183 | #endif | 1184 | #endif |
| 1184 | 1185 | ||
| 1185 | #ifdef CONFIG_FSL_SOC_BOOKE | 1186 | #ifdef CONFIG_FSL_SOC_BOOKE |
| 1186 | /* | 1187 | pvr = mfspr(SPRN_PVR); |
| 1187 | * need to clear HID1[RFXE] to disable machine check int | 1188 | |
| 1188 | * so we can catch it | 1189 | if ((PVR_VER(pvr) == PVR_VER_E500V1) || |
| 1189 | */ | 1190 | (PVR_VER(pvr) == PVR_VER_E500V2)) { |
| 1190 | if (edac_op_state == EDAC_OPSTATE_INT) | 1191 | /* |
| 1191 | on_each_cpu(mpc85xx_mc_clear_rfxe, NULL, 0); | 1192 | * need to clear HID1[RFXE] to disable machine check int |
| 1193 | * so we can catch it | ||
| 1194 | */ | ||
| 1195 | if (edac_op_state == EDAC_OPSTATE_INT) | ||
| 1196 | on_each_cpu(mpc85xx_mc_clear_rfxe, NULL, 0); | ||
| 1197 | } | ||
| 1192 | #endif | 1198 | #endif |
| 1193 | 1199 | ||
| 1194 | return 0; | 1200 | return 0; |
| @@ -1206,7 +1212,12 @@ static void __exit mpc85xx_mc_restore_hid1(void *data) | |||
| 1206 | static void __exit mpc85xx_mc_exit(void) | 1212 | static void __exit mpc85xx_mc_exit(void) |
| 1207 | { | 1213 | { |
| 1208 | #ifdef CONFIG_FSL_SOC_BOOKE | 1214 | #ifdef CONFIG_FSL_SOC_BOOKE |
| 1209 | on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0); | 1215 | u32 pvr = mfspr(SPRN_PVR); |
| 1216 | |||
| 1217 | if ((PVR_VER(pvr) == PVR_VER_E500V1) || | ||
| 1218 | (PVR_VER(pvr) == PVR_VER_E500V2)) { | ||
| 1219 | on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0); | ||
| 1220 | } | ||
| 1210 | #endif | 1221 | #endif |
| 1211 | #ifdef CONFIG_PCI | 1222 | #ifdef CONFIG_PCI |
| 1212 | platform_driver_unregister(&mpc85xx_pci_err_driver); | 1223 | platform_driver_unregister(&mpc85xx_pci_err_driver); |
diff --git a/drivers/edac/r82600_edac.c b/drivers/edac/r82600_edac.c index 6a822c631ef5..678513738c33 100644 --- a/drivers/edac/r82600_edac.c +++ b/drivers/edac/r82600_edac.c | |||
| @@ -120,7 +120,7 @@ | |||
| 120 | * write 0=NOP | 120 | * write 0=NOP |
| 121 | */ | 121 | */ |
| 122 | 122 | ||
| 123 | #define R82600_DRBA 0x60 /* + 0x60..0x63 SDRAM Row Boundry Address | 123 | #define R82600_DRBA 0x60 /* + 0x60..0x63 SDRAM Row Boundary Address |
| 124 | * Registers | 124 | * Registers |
| 125 | * | 125 | * |
| 126 | * 7:0 Address lines 30:24 - upper limit of | 126 | * 7:0 Address lines 30:24 - upper limit of |
| @@ -217,7 +217,7 @@ static void r82600_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev, | |||
| 217 | { | 217 | { |
| 218 | struct csrow_info *csrow; | 218 | struct csrow_info *csrow; |
| 219 | int index; | 219 | int index; |
| 220 | u8 drbar; /* SDRAM Row Boundry Address Register */ | 220 | u8 drbar; /* SDRAM Row Boundary Address Register */ |
| 221 | u32 row_high_limit, row_high_limit_last; | 221 | u32 row_high_limit, row_high_limit_last; |
| 222 | u32 reg_sdram, ecc_on, row_base; | 222 | u32 reg_sdram, ecc_on, row_base; |
| 223 | 223 | ||
| @@ -236,7 +236,7 @@ static void r82600_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev, | |||
| 236 | row_high_limit = ((u32) drbar << 24); | 236 | row_high_limit = ((u32) drbar << 24); |
| 237 | /* row_high_limit = ((u32)drbar << 24) | 0xffffffUL; */ | 237 | /* row_high_limit = ((u32)drbar << 24) | 0xffffffUL; */ |
| 238 | 238 | ||
| 239 | debugf1("%s() Row=%d, Boundry Address=%#0x, Last = %#0x\n", | 239 | debugf1("%s() Row=%d, Boundary Address=%#0x, Last = %#0x\n", |
| 240 | __func__, index, row_high_limit, row_high_limit_last); | 240 | __func__, index, row_high_limit, row_high_limit_last); |
| 241 | 241 | ||
| 242 | /* Empty row [p.57] */ | 242 | /* Empty row [p.57] */ |
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c index 7ed08fd1214e..3f04dd3681cf 100644 --- a/drivers/firewire/net.c +++ b/drivers/firewire/net.c | |||
| @@ -453,7 +453,7 @@ static bool fwnet_pd_update(struct fwnet_peer *peer, | |||
| 453 | memcpy(pd->pbuf + frag_off, frag_buf, frag_len); | 453 | memcpy(pd->pbuf + frag_off, frag_buf, frag_len); |
| 454 | 454 | ||
| 455 | /* | 455 | /* |
| 456 | * Move list entry to beginnig of list so that oldest partial | 456 | * Move list entry to beginning of list so that oldest partial |
| 457 | * datagrams percolate to the end of the list | 457 | * datagrams percolate to the end of the list |
| 458 | */ | 458 | */ |
| 459 | list_move_tail(&pd->pd_link, &peer->pd_list); | 459 | list_move_tail(&pd->pd_link, &peer->pd_list); |
diff --git a/drivers/gpio/mc33880.c b/drivers/gpio/mc33880.c index 00f6d24c669d..4ec797593bdb 100644 --- a/drivers/gpio/mc33880.c +++ b/drivers/gpio/mc33880.c | |||
| @@ -45,7 +45,7 @@ | |||
| 45 | * To save time we cache them here in memory | 45 | * To save time we cache them here in memory |
| 46 | */ | 46 | */ |
| 47 | struct mc33880 { | 47 | struct mc33880 { |
| 48 | struct mutex lock; /* protect from simultanous accesses */ | 48 | struct mutex lock; /* protect from simultaneous accesses */ |
| 49 | u8 port_config; | 49 | u8 port_config; |
| 50 | struct gpio_chip chip; | 50 | struct gpio_chip chip; |
| 51 | struct spi_device *spi; | 51 | struct spi_device *spi; |
diff --git a/drivers/gpio/ml_ioh_gpio.c b/drivers/gpio/ml_ioh_gpio.c index 7f6f01a4b145..0a775f7987c2 100644 --- a/drivers/gpio/ml_ioh_gpio.c +++ b/drivers/gpio/ml_ioh_gpio.c | |||
| @@ -116,6 +116,7 @@ static int ioh_gpio_direction_output(struct gpio_chip *gpio, unsigned nr, | |||
| 116 | reg_val |= (1 << nr); | 116 | reg_val |= (1 << nr); |
| 117 | else | 117 | else |
| 118 | reg_val &= ~(1 << nr); | 118 | reg_val &= ~(1 << nr); |
| 119 | iowrite32(reg_val, &chip->reg->regs[chip->ch].po); | ||
| 119 | 120 | ||
| 120 | mutex_unlock(&chip->lock); | 121 | mutex_unlock(&chip->lock); |
| 121 | 122 | ||
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c index 583e92592073..7630ab7b9bec 100644 --- a/drivers/gpio/pca953x.c +++ b/drivers/gpio/pca953x.c | |||
| @@ -558,7 +558,7 @@ static int __devinit pca953x_probe(struct i2c_client *client, | |||
| 558 | 558 | ||
| 559 | ret = gpiochip_add(&chip->gpio_chip); | 559 | ret = gpiochip_add(&chip->gpio_chip); |
| 560 | if (ret) | 560 | if (ret) |
| 561 | goto out_failed; | 561 | goto out_failed_irq; |
| 562 | 562 | ||
| 563 | if (pdata->setup) { | 563 | if (pdata->setup) { |
| 564 | ret = pdata->setup(client, chip->gpio_chip.base, | 564 | ret = pdata->setup(client, chip->gpio_chip.base, |
| @@ -570,8 +570,9 @@ static int __devinit pca953x_probe(struct i2c_client *client, | |||
| 570 | i2c_set_clientdata(client, chip); | 570 | i2c_set_clientdata(client, chip); |
| 571 | return 0; | 571 | return 0; |
| 572 | 572 | ||
| 573 | out_failed: | 573 | out_failed_irq: |
| 574 | pca953x_irq_teardown(chip); | 574 | pca953x_irq_teardown(chip); |
| 575 | out_failed: | ||
| 575 | kfree(chip->dyn_pdata); | 576 | kfree(chip->dyn_pdata); |
| 576 | kfree(chip); | 577 | kfree(chip); |
| 577 | return ret; | 578 | return ret; |
diff --git a/drivers/gpio/pch_gpio.c b/drivers/gpio/pch_gpio.c index 2c6af8705103..f970a5f3585e 100644 --- a/drivers/gpio/pch_gpio.c +++ b/drivers/gpio/pch_gpio.c | |||
| @@ -105,6 +105,7 @@ static int pch_gpio_direction_output(struct gpio_chip *gpio, unsigned nr, | |||
| 105 | reg_val |= (1 << nr); | 105 | reg_val |= (1 << nr); |
| 106 | else | 106 | else |
| 107 | reg_val &= ~(1 << nr); | 107 | reg_val &= ~(1 << nr); |
| 108 | iowrite32(reg_val, &chip->reg->po); | ||
| 108 | 109 | ||
| 109 | mutex_unlock(&chip->lock); | 110 | mutex_unlock(&chip->lock); |
| 110 | 111 | ||
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index a6feb78c404c..c58f691ec3ce 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig | |||
| @@ -96,6 +96,7 @@ config DRM_I915 | |||
| 96 | # i915 depends on ACPI_VIDEO when ACPI is enabled | 96 | # i915 depends on ACPI_VIDEO when ACPI is enabled |
| 97 | # but for select to work, need to select ACPI_VIDEO's dependencies, ick | 97 | # but for select to work, need to select ACPI_VIDEO's dependencies, ick |
| 98 | select BACKLIGHT_CLASS_DEVICE if ACPI | 98 | select BACKLIGHT_CLASS_DEVICE if ACPI |
| 99 | select VIDEO_OUTPUT_CONTROL if ACPI | ||
| 99 | select INPUT if ACPI | 100 | select INPUT if ACPI |
| 100 | select ACPI_VIDEO if ACPI | 101 | select ACPI_VIDEO if ACPI |
| 101 | select ACPI_BUTTON if ACPI | 102 | select ACPI_BUTTON if ACPI |
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 799e1490cf24..872747c5a544 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c | |||
| @@ -1699,7 +1699,7 @@ int drm_mode_addfb(struct drm_device *dev, | |||
| 1699 | 1699 | ||
| 1700 | mutex_lock(&dev->mode_config.mutex); | 1700 | mutex_lock(&dev->mode_config.mutex); |
| 1701 | 1701 | ||
| 1702 | /* TODO check buffer is sufficently large */ | 1702 | /* TODO check buffer is sufficiently large */ |
| 1703 | /* TODO setup destructor callback */ | 1703 | /* TODO setup destructor callback */ |
| 1704 | 1704 | ||
| 1705 | fb = dev->mode_config.funcs->fb_create(dev, file_priv, r); | 1705 | fb = dev->mode_config.funcs->fb_create(dev, file_priv, r); |
| @@ -1750,7 +1750,7 @@ int drm_mode_rmfb(struct drm_device *dev, | |||
| 1750 | 1750 | ||
| 1751 | mutex_lock(&dev->mode_config.mutex); | 1751 | mutex_lock(&dev->mode_config.mutex); |
| 1752 | obj = drm_mode_object_find(dev, *id, DRM_MODE_OBJECT_FB); | 1752 | obj = drm_mode_object_find(dev, *id, DRM_MODE_OBJECT_FB); |
| 1753 | /* TODO check that we realy get a framebuffer back. */ | 1753 | /* TODO check that we really get a framebuffer back. */ |
| 1754 | if (!obj) { | 1754 | if (!obj) { |
| 1755 | DRM_ERROR("mode invalid framebuffer id\n"); | 1755 | DRM_ERROR("mode invalid framebuffer id\n"); |
| 1756 | ret = -EINVAL; | 1756 | ret = -EINVAL; |
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 9c595e3b9c20..adc9358c9bec 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c | |||
| @@ -1297,7 +1297,7 @@ add_detailed_modes(struct drm_connector *connector, struct edid *edid, | |||
| 1297 | /** | 1297 | /** |
| 1298 | * Search EDID for CEA extension block. | 1298 | * Search EDID for CEA extension block. |
| 1299 | */ | 1299 | */ |
| 1300 | static u8 *drm_find_cea_extension(struct edid *edid) | 1300 | u8 *drm_find_cea_extension(struct edid *edid) |
| 1301 | { | 1301 | { |
| 1302 | u8 *edid_ext = NULL; | 1302 | u8 *edid_ext = NULL; |
| 1303 | int i; | 1303 | int i; |
| @@ -1318,6 +1318,7 @@ static u8 *drm_find_cea_extension(struct edid *edid) | |||
| 1318 | 1318 | ||
| 1319 | return edid_ext; | 1319 | return edid_ext; |
| 1320 | } | 1320 | } |
| 1321 | EXPORT_SYMBOL(drm_find_cea_extension); | ||
| 1321 | 1322 | ||
| 1322 | /** | 1323 | /** |
| 1323 | * drm_detect_hdmi_monitor - detect whether monitor is hdmi. | 1324 | * drm_detect_hdmi_monitor - detect whether monitor is hdmi. |
diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c index add1737dae0d..5d00b0fc0d91 100644 --- a/drivers/gpu/drm/drm_mm.c +++ b/drivers/gpu/drm/drm_mm.c | |||
| @@ -551,7 +551,7 @@ EXPORT_SYMBOL(drm_mm_scan_add_block); | |||
| 551 | * corrupted. | 551 | * corrupted. |
| 552 | * | 552 | * |
| 553 | * When the scan list is empty, the selected memory nodes can be freed. An | 553 | * When the scan list is empty, the selected memory nodes can be freed. An |
| 554 | * immediatly following drm_mm_search_free with best_match = 0 will then return | 554 | * immediately following drm_mm_search_free with best_match = 0 will then return |
| 555 | * the just freed block (because its at the top of the free_stack list). | 555 | * the just freed block (because its at the top of the free_stack list). |
| 556 | * | 556 | * |
| 557 | * Returns one if this block should be evicted, zero otherwise. Will always | 557 | * Returns one if this block should be evicted, zero otherwise. Will always |
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 5004724ea57e..1c1b27c97e5c 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
| @@ -630,7 +630,7 @@ typedef struct drm_i915_private { | |||
| 630 | * Flag if the hardware appears to be wedged. | 630 | * Flag if the hardware appears to be wedged. |
| 631 | * | 631 | * |
| 632 | * This is set when attempts to idle the device timeout. | 632 | * This is set when attempts to idle the device timeout. |
| 633 | * It prevents command submission from occuring and makes | 633 | * It prevents command submission from occurring and makes |
| 634 | * every pending request fail | 634 | * every pending request fail |
| 635 | */ | 635 | */ |
| 636 | atomic_t wedged; | 636 | atomic_t wedged; |
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index 8342259f3160..d03fc05b39c0 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c | |||
| @@ -269,21 +269,6 @@ static bool intel_crt_detect_hotplug(struct drm_connector *connector) | |||
| 269 | return ret; | 269 | return ret; |
| 270 | } | 270 | } |
| 271 | 271 | ||
| 272 | static bool intel_crt_ddc_probe(struct drm_i915_private *dev_priv, int ddc_bus) | ||
| 273 | { | ||
| 274 | u8 buf; | ||
| 275 | struct i2c_msg msgs[] = { | ||
| 276 | { | ||
| 277 | .addr = 0xA0, | ||
| 278 | .flags = 0, | ||
| 279 | .len = 1, | ||
| 280 | .buf = &buf, | ||
| 281 | }, | ||
| 282 | }; | ||
| 283 | /* DDC monitor detect: Does it ACK a write to 0xA0? */ | ||
| 284 | return i2c_transfer(&dev_priv->gmbus[ddc_bus].adapter, msgs, 1) == 1; | ||
| 285 | } | ||
| 286 | |||
| 287 | static bool intel_crt_detect_ddc(struct drm_connector *connector) | 272 | static bool intel_crt_detect_ddc(struct drm_connector *connector) |
| 288 | { | 273 | { |
| 289 | struct intel_crt *crt = intel_attached_crt(connector); | 274 | struct intel_crt *crt = intel_attached_crt(connector); |
| @@ -293,11 +278,6 @@ static bool intel_crt_detect_ddc(struct drm_connector *connector) | |||
| 293 | if (crt->base.type != INTEL_OUTPUT_ANALOG) | 278 | if (crt->base.type != INTEL_OUTPUT_ANALOG) |
| 294 | return false; | 279 | return false; |
| 295 | 280 | ||
| 296 | if (intel_crt_ddc_probe(dev_priv, dev_priv->crt_ddc_pin)) { | ||
| 297 | DRM_DEBUG_KMS("CRT detected via DDC:0xa0\n"); | ||
| 298 | return true; | ||
| 299 | } | ||
| 300 | |||
| 301 | if (intel_ddc_probe(&crt->base, dev_priv->crt_ddc_pin)) { | 281 | if (intel_ddc_probe(&crt->base, dev_priv->crt_ddc_pin)) { |
| 302 | struct edid *edid; | 282 | struct edid *edid; |
| 303 | bool is_digital = false; | 283 | bool is_digital = false; |
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 0daefca5cbb8..cb8578b7e443 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
| @@ -213,7 +213,7 @@ intel_dp_mode_valid(struct drm_connector *connector, | |||
| 213 | return MODE_PANEL; | 213 | return MODE_PANEL; |
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | /* only refuse the mode on non eDP since we have seen some wierd eDP panels | 216 | /* only refuse the mode on non eDP since we have seen some weird eDP panels |
| 217 | which are outside spec tolerances but somehow work by magic */ | 217 | which are outside spec tolerances but somehow work by magic */ |
| 218 | if (!is_edp(intel_dp) && | 218 | if (!is_edp(intel_dp) && |
| 219 | (intel_dp_link_required(connector->dev, intel_dp, mode->clock) | 219 | (intel_dp_link_required(connector->dev, intel_dp, mode->clock) |
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 5daa991cb287..f5b0d8306d83 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h | |||
| @@ -39,7 +39,7 @@ | |||
| 39 | ret__ = -ETIMEDOUT; \ | 39 | ret__ = -ETIMEDOUT; \ |
| 40 | break; \ | 40 | break; \ |
| 41 | } \ | 41 | } \ |
| 42 | if (W && !in_dbg_master()) msleep(W); \ | 42 | if (W && !(in_atomic() || in_dbg_master())) msleep(W); \ |
| 43 | } \ | 43 | } \ |
| 44 | ret__; \ | 44 | ret__; \ |
| 45 | }) | 45 | }) |
diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c index 82d04c5899d2..d3b903bce7c5 100644 --- a/drivers/gpu/drm/i915/intel_i2c.c +++ b/drivers/gpu/drm/i915/intel_i2c.c | |||
| @@ -259,7 +259,7 @@ gmbus_xfer(struct i2c_adapter *adapter, | |||
| 259 | if (wait_for(I915_READ(GMBUS2 + reg_offset) & (GMBUS_SATOER | GMBUS_HW_RDY), 50)) | 259 | if (wait_for(I915_READ(GMBUS2 + reg_offset) & (GMBUS_SATOER | GMBUS_HW_RDY), 50)) |
| 260 | goto timeout; | 260 | goto timeout; |
| 261 | if (I915_READ(GMBUS2 + reg_offset) & GMBUS_SATOER) | 261 | if (I915_READ(GMBUS2 + reg_offset) & GMBUS_SATOER) |
| 262 | return 0; | 262 | goto clear_err; |
| 263 | 263 | ||
| 264 | val = I915_READ(GMBUS3 + reg_offset); | 264 | val = I915_READ(GMBUS3 + reg_offset); |
| 265 | do { | 265 | do { |
| @@ -287,7 +287,7 @@ gmbus_xfer(struct i2c_adapter *adapter, | |||
| 287 | if (wait_for(I915_READ(GMBUS2 + reg_offset) & (GMBUS_SATOER | GMBUS_HW_RDY), 50)) | 287 | if (wait_for(I915_READ(GMBUS2 + reg_offset) & (GMBUS_SATOER | GMBUS_HW_RDY), 50)) |
| 288 | goto timeout; | 288 | goto timeout; |
| 289 | if (I915_READ(GMBUS2 + reg_offset) & GMBUS_SATOER) | 289 | if (I915_READ(GMBUS2 + reg_offset) & GMBUS_SATOER) |
| 290 | return 0; | 290 | goto clear_err; |
| 291 | 291 | ||
| 292 | val = loop = 0; | 292 | val = loop = 0; |
| 293 | do { | 293 | do { |
| @@ -302,14 +302,31 @@ gmbus_xfer(struct i2c_adapter *adapter, | |||
| 302 | if (i + 1 < num && wait_for(I915_READ(GMBUS2 + reg_offset) & (GMBUS_SATOER | GMBUS_HW_WAIT_PHASE), 50)) | 302 | if (i + 1 < num && wait_for(I915_READ(GMBUS2 + reg_offset) & (GMBUS_SATOER | GMBUS_HW_WAIT_PHASE), 50)) |
| 303 | goto timeout; | 303 | goto timeout; |
| 304 | if (I915_READ(GMBUS2 + reg_offset) & GMBUS_SATOER) | 304 | if (I915_READ(GMBUS2 + reg_offset) & GMBUS_SATOER) |
| 305 | return 0; | 305 | goto clear_err; |
| 306 | } | 306 | } |
| 307 | 307 | ||
| 308 | return num; | 308 | goto done; |
| 309 | |||
| 310 | clear_err: | ||
| 311 | /* Toggle the Software Clear Interrupt bit. This has the effect | ||
| 312 | * of resetting the GMBUS controller and so clearing the | ||
| 313 | * BUS_ERROR raised by the slave's NAK. | ||
| 314 | */ | ||
| 315 | I915_WRITE(GMBUS1 + reg_offset, GMBUS_SW_CLR_INT); | ||
| 316 | I915_WRITE(GMBUS1 + reg_offset, 0); | ||
| 317 | |||
| 318 | done: | ||
| 319 | /* Mark the GMBUS interface as disabled. We will re-enable it at the | ||
| 320 | * start of the next xfer, till then let it sleep. | ||
| 321 | */ | ||
| 322 | I915_WRITE(GMBUS0 + reg_offset, 0); | ||
| 323 | return i; | ||
| 309 | 324 | ||
| 310 | timeout: | 325 | timeout: |
| 311 | DRM_INFO("GMBUS timed out, falling back to bit banging on pin %d [%s]\n", | 326 | DRM_INFO("GMBUS timed out, falling back to bit banging on pin %d [%s]\n", |
| 312 | bus->reg0 & 0xff, bus->adapter.name); | 327 | bus->reg0 & 0xff, bus->adapter.name); |
| 328 | I915_WRITE(GMBUS0 + reg_offset, 0); | ||
| 329 | |||
| 313 | /* Hardware may not support GMBUS over these pins? Try GPIO bitbanging instead. */ | 330 | /* Hardware may not support GMBUS over these pins? Try GPIO bitbanging instead. */ |
| 314 | bus->force_bit = intel_gpio_create(dev_priv, bus->reg0 & 0xff); | 331 | bus->force_bit = intel_gpio_create(dev_priv, bus->reg0 & 0xff); |
| 315 | if (!bus->force_bit) | 332 | if (!bus->force_bit) |
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 1a311ad01116..a562bd2648c7 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
| @@ -473,19 +473,13 @@ static enum drm_connector_status | |||
| 473 | intel_lvds_detect(struct drm_connector *connector, bool force) | 473 | intel_lvds_detect(struct drm_connector *connector, bool force) |
| 474 | { | 474 | { |
| 475 | struct drm_device *dev = connector->dev; | 475 | struct drm_device *dev = connector->dev; |
| 476 | enum drm_connector_status status = connector_status_connected; | 476 | enum drm_connector_status status; |
| 477 | 477 | ||
| 478 | status = intel_panel_detect(dev); | 478 | status = intel_panel_detect(dev); |
| 479 | if (status != connector_status_unknown) | 479 | if (status != connector_status_unknown) |
| 480 | return status; | 480 | return status; |
| 481 | 481 | ||
| 482 | /* ACPI lid methods were generally unreliable in this generation, so | 482 | return connector_status_connected; |
| 483 | * don't even bother. | ||
| 484 | */ | ||
| 485 | if (IS_GEN2(dev) || IS_GEN3(dev)) | ||
| 486 | return connector_status_connected; | ||
| 487 | |||
| 488 | return status; | ||
| 489 | } | 483 | } |
| 490 | 484 | ||
| 491 | /** | 485 | /** |
| @@ -835,25 +829,6 @@ static bool lvds_is_present_in_vbt(struct drm_device *dev, | |||
| 835 | return false; | 829 | return false; |
| 836 | } | 830 | } |
| 837 | 831 | ||
| 838 | static bool intel_lvds_ddc_probe(struct drm_device *dev, u8 pin) | ||
| 839 | { | ||
| 840 | struct drm_i915_private *dev_priv = dev->dev_private; | ||
| 841 | u8 buf = 0; | ||
| 842 | struct i2c_msg msgs[] = { | ||
| 843 | { | ||
| 844 | .addr = 0xA0, | ||
| 845 | .flags = 0, | ||
| 846 | .len = 1, | ||
| 847 | .buf = &buf, | ||
| 848 | }, | ||
| 849 | }; | ||
| 850 | struct i2c_adapter *i2c = &dev_priv->gmbus[pin].adapter; | ||
| 851 | /* XXX this only appears to work when using GMBUS */ | ||
| 852 | if (intel_gmbus_is_forced_bit(i2c)) | ||
| 853 | return true; | ||
| 854 | return i2c_transfer(i2c, msgs, 1) == 1; | ||
| 855 | } | ||
| 856 | |||
| 857 | /** | 832 | /** |
| 858 | * intel_lvds_init - setup LVDS connectors on this device | 833 | * intel_lvds_init - setup LVDS connectors on this device |
| 859 | * @dev: drm device | 834 | * @dev: drm device |
| @@ -894,11 +869,6 @@ bool intel_lvds_init(struct drm_device *dev) | |||
| 894 | } | 869 | } |
| 895 | } | 870 | } |
| 896 | 871 | ||
| 897 | if (!intel_lvds_ddc_probe(dev, pin)) { | ||
| 898 | DRM_DEBUG_KMS("LVDS did not respond to DDC probe\n"); | ||
| 899 | return false; | ||
| 900 | } | ||
| 901 | |||
| 902 | intel_lvds = kzalloc(sizeof(struct intel_lvds), GFP_KERNEL); | 872 | intel_lvds = kzalloc(sizeof(struct intel_lvds), GFP_KERNEL); |
| 903 | if (!intel_lvds) { | 873 | if (!intel_lvds) { |
| 904 | return false; | 874 | return false; |
diff --git a/drivers/gpu/drm/i915/intel_sdvo_regs.h b/drivers/gpu/drm/i915/intel_sdvo_regs.h index a386b022e538..4f4e23bc2d16 100644 --- a/drivers/gpu/drm/i915/intel_sdvo_regs.h +++ b/drivers/gpu/drm/i915/intel_sdvo_regs.h | |||
| @@ -230,7 +230,7 @@ struct intel_sdvo_set_target_input_args { | |||
| 230 | } __attribute__((packed)); | 230 | } __attribute__((packed)); |
| 231 | 231 | ||
| 232 | /** | 232 | /** |
| 233 | * Takes a struct intel_sdvo_output_flags of which outputs are targetted by | 233 | * Takes a struct intel_sdvo_output_flags of which outputs are targeted by |
| 234 | * future output commands. | 234 | * future output commands. |
| 235 | * | 235 | * |
| 236 | * Affected commands inclue SET_OUTPUT_TIMINGS_PART[12], | 236 | * Affected commands inclue SET_OUTPUT_TIMINGS_PART[12], |
diff --git a/drivers/gpu/drm/mga/mga_dma.c b/drivers/gpu/drm/mga/mga_dma.c index 1e1eb1d7e971..5ccb65deb83c 100644 --- a/drivers/gpu/drm/mga/mga_dma.c +++ b/drivers/gpu/drm/mga/mga_dma.c | |||
| @@ -426,7 +426,7 @@ int mga_driver_load(struct drm_device *dev, unsigned long flags) | |||
| 426 | * Bootstrap the driver for AGP DMA. | 426 | * Bootstrap the driver for AGP DMA. |
| 427 | * | 427 | * |
| 428 | * \todo | 428 | * \todo |
| 429 | * Investigate whether there is any benifit to storing the WARP microcode in | 429 | * Investigate whether there is any benefit to storing the WARP microcode in |
| 430 | * AGP memory. If not, the microcode may as well always be put in PCI | 430 | * AGP memory. If not, the microcode may as well always be put in PCI |
| 431 | * memory. | 431 | * memory. |
| 432 | * | 432 | * |
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 8314a49b6b9a..90aef64b76f2 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c | |||
| @@ -269,7 +269,7 @@ struct init_tbl_entry { | |||
| 269 | int (*handler)(struct nvbios *, uint16_t, struct init_exec *); | 269 | int (*handler)(struct nvbios *, uint16_t, struct init_exec *); |
| 270 | }; | 270 | }; |
| 271 | 271 | ||
| 272 | static int parse_init_table(struct nvbios *, unsigned int, struct init_exec *); | 272 | static int parse_init_table(struct nvbios *, uint16_t, struct init_exec *); |
| 273 | 273 | ||
| 274 | #define MACRO_INDEX_SIZE 2 | 274 | #define MACRO_INDEX_SIZE 2 |
| 275 | #define MACRO_SIZE 8 | 275 | #define MACRO_SIZE 8 |
| @@ -2011,6 +2011,27 @@ init_sub_direct(struct nvbios *bios, uint16_t offset, struct init_exec *iexec) | |||
| 2011 | } | 2011 | } |
| 2012 | 2012 | ||
| 2013 | static int | 2013 | static int |
| 2014 | init_jump(struct nvbios *bios, uint16_t offset, struct init_exec *iexec) | ||
| 2015 | { | ||
| 2016 | /* | ||
| 2017 | * INIT_JUMP opcode: 0x5C ('\') | ||
| 2018 | * | ||
| 2019 | * offset (8 bit): opcode | ||
| 2020 | * offset + 1 (16 bit): offset (in bios) | ||
| 2021 | * | ||
| 2022 | * Continue execution of init table from 'offset' | ||
| 2023 | */ | ||
| 2024 | |||
| 2025 | uint16_t jmp_offset = ROM16(bios->data[offset + 1]); | ||
| 2026 | |||
| 2027 | if (!iexec->execute) | ||
| 2028 | return 3; | ||
| 2029 | |||
| 2030 | BIOSLOG(bios, "0x%04X: Jump to 0x%04X\n", offset, jmp_offset); | ||
| 2031 | return jmp_offset - offset; | ||
| 2032 | } | ||
| 2033 | |||
| 2034 | static int | ||
| 2014 | init_i2c_if(struct nvbios *bios, uint16_t offset, struct init_exec *iexec) | 2035 | init_i2c_if(struct nvbios *bios, uint16_t offset, struct init_exec *iexec) |
| 2015 | { | 2036 | { |
| 2016 | /* | 2037 | /* |
| @@ -3659,6 +3680,7 @@ static struct init_tbl_entry itbl_entry[] = { | |||
| 3659 | { "INIT_ZM_REG_SEQUENCE" , 0x58, init_zm_reg_sequence }, | 3680 | { "INIT_ZM_REG_SEQUENCE" , 0x58, init_zm_reg_sequence }, |
| 3660 | /* INIT_INDIRECT_REG (0x5A, 7, 0, 0) removed due to no example of use */ | 3681 | /* INIT_INDIRECT_REG (0x5A, 7, 0, 0) removed due to no example of use */ |
| 3661 | { "INIT_SUB_DIRECT" , 0x5B, init_sub_direct }, | 3682 | { "INIT_SUB_DIRECT" , 0x5B, init_sub_direct }, |
| 3683 | { "INIT_JUMP" , 0x5C, init_jump }, | ||
| 3662 | { "INIT_I2C_IF" , 0x5E, init_i2c_if }, | 3684 | { "INIT_I2C_IF" , 0x5E, init_i2c_if }, |
| 3663 | { "INIT_COPY_NV_REG" , 0x5F, init_copy_nv_reg }, | 3685 | { "INIT_COPY_NV_REG" , 0x5F, init_copy_nv_reg }, |
| 3664 | { "INIT_ZM_INDEX_IO" , 0x62, init_zm_index_io }, | 3686 | { "INIT_ZM_INDEX_IO" , 0x62, init_zm_index_io }, |
| @@ -3700,8 +3722,7 @@ static struct init_tbl_entry itbl_entry[] = { | |||
| 3700 | #define MAX_TABLE_OPS 1000 | 3722 | #define MAX_TABLE_OPS 1000 |
| 3701 | 3723 | ||
| 3702 | static int | 3724 | static int |
| 3703 | parse_init_table(struct nvbios *bios, unsigned int offset, | 3725 | parse_init_table(struct nvbios *bios, uint16_t offset, struct init_exec *iexec) |
| 3704 | struct init_exec *iexec) | ||
| 3705 | { | 3726 | { |
| 3706 | /* | 3727 | /* |
| 3707 | * Parses all commands in an init table. | 3728 | * Parses all commands in an init table. |
| @@ -6333,6 +6354,32 @@ apply_dcb_encoder_quirks(struct drm_device *dev, int idx, u32 *conn, u32 *conf) | |||
| 6333 | } | 6354 | } |
| 6334 | } | 6355 | } |
| 6335 | 6356 | ||
| 6357 | /* XFX GT-240X-YA | ||
| 6358 | * | ||
| 6359 | * So many things wrong here, replace the entire encoder table.. | ||
| 6360 | */ | ||
| 6361 | if (nv_match_device(dev, 0x0ca3, 0x1682, 0x3003)) { | ||
| 6362 | if (idx == 0) { | ||
| 6363 | *conn = 0x02001300; /* VGA, connector 1 */ | ||
| 6364 | *conf = 0x00000028; | ||
| 6365 | } else | ||
| 6366 | if (idx == 1) { | ||
| 6367 | *conn = 0x01010312; /* DVI, connector 0 */ | ||
| 6368 | *conf = 0x00020030; | ||
| 6369 | } else | ||
| 6370 | if (idx == 2) { | ||
| 6371 | *conn = 0x01010310; /* VGA, connector 0 */ | ||
| 6372 | *conf = 0x00000028; | ||
| 6373 | } else | ||
| 6374 | if (idx == 3) { | ||
| 6375 | *conn = 0x02022362; /* HDMI, connector 2 */ | ||
| 6376 | *conf = 0x00020010; | ||
| 6377 | } else { | ||
| 6378 | *conn = 0x0000000e; /* EOL */ | ||
| 6379 | *conf = 0x00000000; | ||
| 6380 | } | ||
| 6381 | } | ||
| 6382 | |||
| 6336 | return true; | 6383 | return true; |
| 6337 | } | 6384 | } |
| 6338 | 6385 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_channel.c b/drivers/gpu/drm/nouveau/nouveau_channel.c index 3837090d66af..4cea35c57d15 100644 --- a/drivers/gpu/drm/nouveau/nouveau_channel.c +++ b/drivers/gpu/drm/nouveau/nouveau_channel.c | |||
| @@ -200,7 +200,7 @@ nouveau_channel_alloc(struct drm_device *dev, struct nouveau_channel **chan_ret, | |||
| 200 | /* disable the fifo caches */ | 200 | /* disable the fifo caches */ |
| 201 | pfifo->reassign(dev, false); | 201 | pfifo->reassign(dev, false); |
| 202 | 202 | ||
| 203 | /* Construct inital RAMFC for new channel */ | 203 | /* Construct initial RAMFC for new channel */ |
| 204 | ret = pfifo->create_context(chan); | 204 | ret = pfifo->create_context(chan); |
| 205 | if (ret) { | 205 | if (ret) { |
| 206 | nouveau_channel_put(&chan); | 206 | nouveau_channel_put(&chan); |
| @@ -278,7 +278,7 @@ nouveau_channel_put_unlocked(struct nouveau_channel **pchan) | |||
| 278 | return; | 278 | return; |
| 279 | } | 279 | } |
| 280 | 280 | ||
| 281 | /* noone wants the channel anymore */ | 281 | /* no one wants the channel anymore */ |
| 282 | NV_DEBUG(dev, "freeing channel %d\n", chan->id); | 282 | NV_DEBUG(dev, "freeing channel %d\n", chan->id); |
| 283 | nouveau_debugfs_channel_fini(chan); | 283 | nouveau_debugfs_channel_fini(chan); |
| 284 | 284 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index fff180a99867..856d56a98d1e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h | |||
| @@ -216,7 +216,7 @@ struct nouveau_channel { | |||
| 216 | /* mapping of the fifo itself */ | 216 | /* mapping of the fifo itself */ |
| 217 | struct drm_local_map *map; | 217 | struct drm_local_map *map; |
| 218 | 218 | ||
| 219 | /* mapping of the regs controling the fifo */ | 219 | /* mapping of the regs controlling the fifo */ |
| 220 | void __iomem *user; | 220 | void __iomem *user; |
| 221 | uint32_t user_get; | 221 | uint32_t user_get; |
| 222 | uint32_t user_put; | 222 | uint32_t user_put; |
| @@ -1190,7 +1190,7 @@ extern int nv50_graph_load_context(struct nouveau_channel *); | |||
| 1190 | extern int nv50_graph_unload_context(struct drm_device *); | 1190 | extern int nv50_graph_unload_context(struct drm_device *); |
| 1191 | extern int nv50_grctx_init(struct nouveau_grctx *); | 1191 | extern int nv50_grctx_init(struct nouveau_grctx *); |
| 1192 | extern void nv50_graph_tlb_flush(struct drm_device *dev); | 1192 | extern void nv50_graph_tlb_flush(struct drm_device *dev); |
| 1193 | extern void nv86_graph_tlb_flush(struct drm_device *dev); | 1193 | extern void nv84_graph_tlb_flush(struct drm_device *dev); |
| 1194 | extern struct nouveau_enum nv50_data_error_names[]; | 1194 | extern struct nouveau_enum nv50_data_error_names[]; |
| 1195 | 1195 | ||
| 1196 | /* nvc0_graph.c */ | 1196 | /* nvc0_graph.c */ |
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index e8b04f4aed7e..b52e46018245 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gem.c +++ b/drivers/gpu/drm/nouveau/nouveau_gem.c | |||
| @@ -97,7 +97,7 @@ nouveau_gem_new(struct drm_device *dev, struct nouveau_channel *chan, | |||
| 97 | return -ENOMEM; | 97 | return -ENOMEM; |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | nvbo->bo.persistant_swap_storage = nvbo->gem->filp; | 100 | nvbo->bo.persistent_swap_storage = nvbo->gem->filp; |
| 101 | nvbo->gem->driver_private = nvbo; | 101 | nvbo->gem->driver_private = nvbo; |
| 102 | return 0; | 102 | return 0; |
| 103 | } | 103 | } |
diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c index 2683377f4131..78f467fe30be 100644 --- a/drivers/gpu/drm/nouveau/nouveau_mem.c +++ b/drivers/gpu/drm/nouveau/nouveau_mem.c | |||
| @@ -552,6 +552,7 @@ nouveau_mem_timing_init(struct drm_device *dev) | |||
| 552 | u8 tRC; /* Byte 9 */ | 552 | u8 tRC; /* Byte 9 */ |
| 553 | u8 tUNK_10, tUNK_11, tUNK_12, tUNK_13, tUNK_14; | 553 | u8 tUNK_10, tUNK_11, tUNK_12, tUNK_13, tUNK_14; |
| 554 | u8 tUNK_18, tUNK_19, tUNK_20, tUNK_21; | 554 | u8 tUNK_18, tUNK_19, tUNK_20, tUNK_21; |
| 555 | u8 magic_number = 0; /* Yeah... sorry*/ | ||
| 555 | u8 *mem = NULL, *entry; | 556 | u8 *mem = NULL, *entry; |
| 556 | int i, recordlen, entries; | 557 | int i, recordlen, entries; |
| 557 | 558 | ||
| @@ -596,6 +597,12 @@ nouveau_mem_timing_init(struct drm_device *dev) | |||
| 596 | if (!memtimings->timing) | 597 | if (!memtimings->timing) |
| 597 | return; | 598 | return; |
| 598 | 599 | ||
| 600 | /* Get "some number" from the timing reg for NV_40 | ||
| 601 | * Used in calculations later */ | ||
| 602 | if(dev_priv->card_type == NV_40) { | ||
| 603 | magic_number = (nv_rd32(dev,0x100228) & 0x0f000000) >> 24; | ||
| 604 | } | ||
| 605 | |||
| 599 | entry = mem + mem[1]; | 606 | entry = mem + mem[1]; |
| 600 | for (i = 0; i < entries; i++, entry += recordlen) { | 607 | for (i = 0; i < entries; i++, entry += recordlen) { |
| 601 | struct nouveau_pm_memtiming *timing = &pm->memtimings.timing[i]; | 608 | struct nouveau_pm_memtiming *timing = &pm->memtimings.timing[i]; |
| @@ -635,36 +642,51 @@ nouveau_mem_timing_init(struct drm_device *dev) | |||
| 635 | 642 | ||
| 636 | /* XXX: I don't trust the -1's and +1's... they must come | 643 | /* XXX: I don't trust the -1's and +1's... they must come |
| 637 | * from somewhere! */ | 644 | * from somewhere! */ |
| 638 | timing->reg_100224 = ((tUNK_0 + tUNK_19 + 1) << 24 | | 645 | timing->reg_100224 = (tUNK_0 + tUNK_19 + 1 + magic_number) << 24 | |
| 639 | tUNK_18 << 16 | | 646 | tUNK_18 << 16 | |
| 640 | (tUNK_1 + tUNK_19 + 1) << 8 | | 647 | (tUNK_1 + tUNK_19 + 1 + magic_number) << 8; |
| 641 | (tUNK_2 - 1)); | 648 | if(dev_priv->chipset == 0xa8) { |
| 649 | timing->reg_100224 |= (tUNK_2 - 1); | ||
| 650 | } else { | ||
| 651 | timing->reg_100224 |= (tUNK_2 + 2 - magic_number); | ||
| 652 | } | ||
| 642 | 653 | ||
| 643 | timing->reg_100228 = (tUNK_12 << 16 | tUNK_11 << 8 | tUNK_10); | 654 | timing->reg_100228 = (tUNK_12 << 16 | tUNK_11 << 8 | tUNK_10); |
| 644 | if(recordlen > 19) { | 655 | if(dev_priv->chipset >= 0xa3 && dev_priv->chipset < 0xaa) { |
| 645 | timing->reg_100228 += (tUNK_19 - 1) << 24; | 656 | timing->reg_100228 |= (tUNK_19 - 1) << 24; |
| 646 | }/* I cannot back-up this else-statement right now | 657 | } |
| 647 | else { | 658 | |
| 648 | timing->reg_100228 += tUNK_12 << 24; | 659 | if(dev_priv->card_type == NV_40) { |
| 649 | }*/ | 660 | /* NV40: don't know what the rest of the regs are.. |
| 650 | 661 | * And don't need to know either */ | |
| 651 | /* XXX: reg_10022c */ | 662 | timing->reg_100228 |= 0x20200000 | magic_number << 24; |
| 652 | timing->reg_10022c = tUNK_2 - 1; | 663 | } else if(dev_priv->card_type >= NV_50) { |
| 653 | 664 | /* XXX: reg_10022c */ | |
| 654 | timing->reg_100230 = (tUNK_20 << 24 | tUNK_21 << 16 | | 665 | timing->reg_10022c = tUNK_2 - 1; |
| 655 | tUNK_13 << 8 | tUNK_13); | 666 | |
| 656 | 667 | timing->reg_100230 = (tUNK_20 << 24 | tUNK_21 << 16 | | |
| 657 | /* XXX: +6? */ | 668 | tUNK_13 << 8 | tUNK_13); |
| 658 | timing->reg_100234 = (tRAS << 24 | (tUNK_19 + 6) << 8 | tRC); | 669 | |
| 659 | timing->reg_100234 += max(tUNK_10,tUNK_11) << 16; | 670 | timing->reg_100234 = (tRAS << 24 | tRC); |
| 660 | 671 | timing->reg_100234 += max(tUNK_10,tUNK_11) << 16; | |
| 661 | /* XXX; reg_100238, reg_10023c | 672 | |
| 662 | * reg: 0x00?????? | 673 | if(dev_priv->chipset < 0xa3) { |
| 663 | * reg_10023c: | 674 | timing->reg_100234 |= (tUNK_2 + 2) << 8; |
| 664 | * 0 for pre-NV50 cards | 675 | } else { |
| 665 | * 0x????0202 for NV50+ cards (empirical evidence) */ | 676 | /* XXX: +6? */ |
| 666 | if(dev_priv->card_type >= NV_50) { | 677 | timing->reg_100234 |= (tUNK_19 + 6) << 8; |
| 678 | } | ||
| 679 | |||
| 680 | /* XXX; reg_100238, reg_10023c | ||
| 681 | * reg_100238: 0x00?????? | ||
| 682 | * reg_10023c: 0x!!??0202 for NV50+ cards (empirical evidence) */ | ||
| 667 | timing->reg_10023c = 0x202; | 683 | timing->reg_10023c = 0x202; |
| 684 | if(dev_priv->chipset < 0xa3) { | ||
| 685 | timing->reg_10023c |= 0x4000000 | (tUNK_2 - 1) << 16; | ||
| 686 | } else { | ||
| 687 | /* currently unknown | ||
| 688 | * 10023c seen as 06xxxxxx, 0bxxxxxx or 0fxxxxxx */ | ||
| 689 | } | ||
| 668 | } | 690 | } |
| 669 | 691 | ||
| 670 | NV_DEBUG(dev, "Entry %d: 220: %08x %08x %08x %08x\n", i, | 692 | NV_DEBUG(dev, "Entry %d: 220: %08x %08x %08x %08x\n", i, |
| @@ -675,7 +697,7 @@ nouveau_mem_timing_init(struct drm_device *dev) | |||
| 675 | timing->reg_100238, timing->reg_10023c); | 697 | timing->reg_100238, timing->reg_10023c); |
| 676 | } | 698 | } |
| 677 | 699 | ||
| 678 | memtimings->nr_timing = entries; | 700 | memtimings->nr_timing = entries; |
| 679 | memtimings->supported = true; | 701 | memtimings->supported = true; |
| 680 | } | 702 | } |
| 681 | 703 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_perf.c b/drivers/gpu/drm/nouveau/nouveau_perf.c index ac62a1b8c4fc..670e3cb697ec 100644 --- a/drivers/gpu/drm/nouveau/nouveau_perf.c +++ b/drivers/gpu/drm/nouveau/nouveau_perf.c | |||
| @@ -134,7 +134,7 @@ nouveau_perf_init(struct drm_device *dev) | |||
| 134 | case 0x13: | 134 | case 0x13: |
| 135 | case 0x15: | 135 | case 0x15: |
| 136 | perflvl->fanspeed = entry[55]; | 136 | perflvl->fanspeed = entry[55]; |
| 137 | perflvl->voltage = entry[56]; | 137 | perflvl->voltage = (recordlen > 56) ? entry[56] : 0; |
| 138 | perflvl->core = ROM32(entry[1]) * 10; | 138 | perflvl->core = ROM32(entry[1]) * 10; |
| 139 | perflvl->memory = ROM32(entry[5]) * 20; | 139 | perflvl->memory = ROM32(entry[5]) * 20; |
| 140 | break; | 140 | break; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index 4fcbd091a117..6e2b1a6caa2d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c | |||
| @@ -376,15 +376,11 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
| 376 | engine->graph.destroy_context = nv50_graph_destroy_context; | 376 | engine->graph.destroy_context = nv50_graph_destroy_context; |
| 377 | engine->graph.load_context = nv50_graph_load_context; | 377 | engine->graph.load_context = nv50_graph_load_context; |
| 378 | engine->graph.unload_context = nv50_graph_unload_context; | 378 | engine->graph.unload_context = nv50_graph_unload_context; |
| 379 | if (dev_priv->chipset != 0x86) | 379 | if (dev_priv->chipset == 0x50 || |
| 380 | dev_priv->chipset == 0xac) | ||
| 380 | engine->graph.tlb_flush = nv50_graph_tlb_flush; | 381 | engine->graph.tlb_flush = nv50_graph_tlb_flush; |
| 381 | else { | 382 | else |
| 382 | /* from what i can see nvidia do this on every | 383 | engine->graph.tlb_flush = nv84_graph_tlb_flush; |
| 383 | * pre-NVA3 board except NVAC, but, we've only | ||
| 384 | * ever seen problems on NV86 | ||
| 385 | */ | ||
| 386 | engine->graph.tlb_flush = nv86_graph_tlb_flush; | ||
| 387 | } | ||
| 388 | engine->fifo.channels = 128; | 384 | engine->fifo.channels = 128; |
| 389 | engine->fifo.init = nv50_fifo_init; | 385 | engine->fifo.init = nv50_fifo_init; |
| 390 | engine->fifo.takedown = nv50_fifo_takedown; | 386 | engine->fifo.takedown = nv50_fifo_takedown; |
| @@ -963,7 +959,7 @@ int nouveau_load(struct drm_device *dev, unsigned long flags) | |||
| 963 | if (ret) | 959 | if (ret) |
| 964 | goto err_mmio; | 960 | goto err_mmio; |
| 965 | 961 | ||
| 966 | /* Map PRAMIN BAR, or on older cards, the aperture withing BAR0 */ | 962 | /* Map PRAMIN BAR, or on older cards, the aperture within BAR0 */ |
| 967 | if (dev_priv->card_type >= NV_40) { | 963 | if (dev_priv->card_type >= NV_40) { |
| 968 | int ramin_bar = 2; | 964 | int ramin_bar = 2; |
| 969 | if (pci_resource_len(dev->pdev, ramin_bar) == 0) | 965 | if (pci_resource_len(dev->pdev, ramin_bar) == 0) |
diff --git a/drivers/gpu/drm/nouveau/nv04_crtc.c b/drivers/gpu/drm/nouveau/nv04_crtc.c index a260fbbe3d9b..748b9d9c2949 100644 --- a/drivers/gpu/drm/nouveau/nv04_crtc.c +++ b/drivers/gpu/drm/nouveau/nv04_crtc.c | |||
| @@ -164,7 +164,7 @@ nv_crtc_dpms(struct drm_crtc *crtc, int mode) | |||
| 164 | NV_DEBUG_KMS(dev, "Setting dpms mode %d on CRTC %d\n", mode, | 164 | NV_DEBUG_KMS(dev, "Setting dpms mode %d on CRTC %d\n", mode, |
| 165 | nv_crtc->index); | 165 | nv_crtc->index); |
| 166 | 166 | ||
| 167 | if (nv_crtc->last_dpms == mode) /* Don't do unnecesary mode changes. */ | 167 | if (nv_crtc->last_dpms == mode) /* Don't do unnecessary mode changes. */ |
| 168 | return; | 168 | return; |
| 169 | 169 | ||
| 170 | nv_crtc->last_dpms = mode; | 170 | nv_crtc->last_dpms = mode; |
| @@ -677,7 +677,7 @@ static void nv_crtc_prepare(struct drm_crtc *crtc) | |||
| 677 | 677 | ||
| 678 | NVBlankScreen(dev, nv_crtc->index, true); | 678 | NVBlankScreen(dev, nv_crtc->index, true); |
| 679 | 679 | ||
| 680 | /* Some more preperation. */ | 680 | /* Some more preparation. */ |
| 681 | NVWriteCRTC(dev, nv_crtc->index, NV_PCRTC_CONFIG, NV_PCRTC_CONFIG_START_ADDRESS_NON_VGA); | 681 | NVWriteCRTC(dev, nv_crtc->index, NV_PCRTC_CONFIG, NV_PCRTC_CONFIG_START_ADDRESS_NON_VGA); |
| 682 | if (dev_priv->card_type == NV_40) { | 682 | if (dev_priv->card_type == NV_40) { |
| 683 | uint32_t reg900 = NVReadRAMDAC(dev, nv_crtc->index, NV_PRAMDAC_900); | 683 | uint32_t reg900 = NVReadRAMDAC(dev, nv_crtc->index, NV_PRAMDAC_900); |
diff --git a/drivers/gpu/drm/nouveau/nv04_dfp.c b/drivers/gpu/drm/nouveau/nv04_dfp.c index c82db37d9f41..12098bf839c4 100644 --- a/drivers/gpu/drm/nouveau/nv04_dfp.c +++ b/drivers/gpu/drm/nouveau/nv04_dfp.c | |||
| @@ -581,12 +581,13 @@ static void nv04_dfp_restore(struct drm_encoder *encoder) | |||
| 581 | int head = nv_encoder->restore.head; | 581 | int head = nv_encoder->restore.head; |
| 582 | 582 | ||
| 583 | if (nv_encoder->dcb->type == OUTPUT_LVDS) { | 583 | if (nv_encoder->dcb->type == OUTPUT_LVDS) { |
| 584 | struct drm_display_mode *native_mode = nouveau_encoder_connector_get(nv_encoder)->native_mode; | 584 | struct nouveau_connector *connector = |
| 585 | if (native_mode) | 585 | nouveau_encoder_connector_get(nv_encoder); |
| 586 | call_lvds_script(dev, nv_encoder->dcb, head, LVDS_PANEL_ON, | 586 | |
| 587 | native_mode->clock); | 587 | if (connector && connector->native_mode) |
| 588 | else | 588 | call_lvds_script(dev, nv_encoder->dcb, head, |
| 589 | NV_ERROR(dev, "Not restoring LVDS without native mode\n"); | 589 | LVDS_PANEL_ON, |
| 590 | connector->native_mode->clock); | ||
| 590 | 591 | ||
| 591 | } else if (nv_encoder->dcb->type == OUTPUT_TMDS) { | 592 | } else if (nv_encoder->dcb->type == OUTPUT_TMDS) { |
| 592 | int clock = nouveau_hw_pllvals_to_clk | 593 | int clock = nouveau_hw_pllvals_to_clk |
diff --git a/drivers/gpu/drm/nouveau/nv40_graph.c b/drivers/gpu/drm/nouveau/nv40_graph.c index 18d30c2c1aa6..fceb44c0ec74 100644 --- a/drivers/gpu/drm/nouveau/nv40_graph.c +++ b/drivers/gpu/drm/nouveau/nv40_graph.c | |||
| @@ -181,7 +181,7 @@ nv40_graph_load_context(struct nouveau_channel *chan) | |||
| 181 | NV40_PGRAPH_CTXCTL_CUR_LOADED); | 181 | NV40_PGRAPH_CTXCTL_CUR_LOADED); |
| 182 | /* 0x32E0 records the instance address of the active FIFO's PGRAPH | 182 | /* 0x32E0 records the instance address of the active FIFO's PGRAPH |
| 183 | * context. If at any time this doesn't match 0x40032C, you will | 183 | * context. If at any time this doesn't match 0x40032C, you will |
| 184 | * recieve PGRAPH_INTR_CONTEXT_SWITCH | 184 | * receive PGRAPH_INTR_CONTEXT_SWITCH |
| 185 | */ | 185 | */ |
| 186 | nv_wr32(dev, NV40_PFIFO_GRCTX_INSTANCE, inst); | 186 | nv_wr32(dev, NV40_PFIFO_GRCTX_INSTANCE, inst); |
| 187 | return 0; | 187 | return 0; |
diff --git a/drivers/gpu/drm/nouveau/nv50_crtc.c b/drivers/gpu/drm/nouveau/nv50_crtc.c index 2b9984027f41..a19ccaa025b3 100644 --- a/drivers/gpu/drm/nouveau/nv50_crtc.c +++ b/drivers/gpu/drm/nouveau/nv50_crtc.c | |||
| @@ -469,9 +469,6 @@ nv50_crtc_wait_complete(struct drm_crtc *crtc) | |||
| 469 | 469 | ||
| 470 | start = ptimer->read(dev); | 470 | start = ptimer->read(dev); |
| 471 | do { | 471 | do { |
| 472 | nv_wr32(dev, 0x61002c, 0x370); | ||
| 473 | nv_wr32(dev, 0x000140, 1); | ||
| 474 | |||
| 475 | if (nv_ro32(disp->ntfy, 0x000)) | 472 | if (nv_ro32(disp->ntfy, 0x000)) |
| 476 | return 0; | 473 | return 0; |
| 477 | } while (ptimer->read(dev) - start < 2000000000ULL); | 474 | } while (ptimer->read(dev) - start < 2000000000ULL); |
diff --git a/drivers/gpu/drm/nouveau/nv50_evo.c b/drivers/gpu/drm/nouveau/nv50_evo.c index a2cfaa691e9b..c8e83c1a4de8 100644 --- a/drivers/gpu/drm/nouveau/nv50_evo.c +++ b/drivers/gpu/drm/nouveau/nv50_evo.c | |||
| @@ -186,6 +186,7 @@ nv50_evo_channel_init(struct nouveau_channel *evo) | |||
| 186 | nv_mask(dev, 0x610028, 0x00000000, 0x00010001 << id); | 186 | nv_mask(dev, 0x610028, 0x00000000, 0x00010001 << id); |
| 187 | 187 | ||
| 188 | evo->dma.max = (4096/4) - 2; | 188 | evo->dma.max = (4096/4) - 2; |
| 189 | evo->dma.max &= ~7; | ||
| 189 | evo->dma.put = 0; | 190 | evo->dma.put = 0; |
| 190 | evo->dma.cur = evo->dma.put; | 191 | evo->dma.cur = evo->dma.put; |
| 191 | evo->dma.free = evo->dma.max - evo->dma.cur; | 192 | evo->dma.free = evo->dma.max - evo->dma.cur; |
diff --git a/drivers/gpu/drm/nouveau/nv50_graph.c b/drivers/gpu/drm/nouveau/nv50_graph.c index 8675b00caf18..b02a5b1e7d37 100644 --- a/drivers/gpu/drm/nouveau/nv50_graph.c +++ b/drivers/gpu/drm/nouveau/nv50_graph.c | |||
| @@ -503,7 +503,7 @@ nv50_graph_tlb_flush(struct drm_device *dev) | |||
| 503 | } | 503 | } |
| 504 | 504 | ||
| 505 | void | 505 | void |
| 506 | nv86_graph_tlb_flush(struct drm_device *dev) | 506 | nv84_graph_tlb_flush(struct drm_device *dev) |
| 507 | { | 507 | { |
| 508 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 508 | struct drm_nouveau_private *dev_priv = dev->dev_private; |
| 509 | struct nouveau_timer_engine *ptimer = &dev_priv->engine.timer; | 509 | struct nouveau_timer_engine *ptimer = &dev_priv->engine.timer; |
diff --git a/drivers/gpu/drm/nouveau/nvc0_vm.c b/drivers/gpu/drm/nouveau/nvc0_vm.c index 69af0ba7edd3..a0a2a0277f73 100644 --- a/drivers/gpu/drm/nouveau/nvc0_vm.c +++ b/drivers/gpu/drm/nouveau/nvc0_vm.c | |||
| @@ -104,20 +104,26 @@ nvc0_vm_flush(struct nouveau_vm *vm) | |||
| 104 | struct nouveau_instmem_engine *pinstmem = &dev_priv->engine.instmem; | 104 | struct nouveau_instmem_engine *pinstmem = &dev_priv->engine.instmem; |
| 105 | struct drm_device *dev = vm->dev; | 105 | struct drm_device *dev = vm->dev; |
| 106 | struct nouveau_vm_pgd *vpgd; | 106 | struct nouveau_vm_pgd *vpgd; |
| 107 | u32 r100c80, engine; | 107 | u32 engine = (dev_priv->chan_vm == vm) ? 1 : 5; |
| 108 | 108 | ||
| 109 | pinstmem->flush(vm->dev); | 109 | pinstmem->flush(vm->dev); |
| 110 | 110 | ||
| 111 | if (vm == dev_priv->chan_vm) | 111 | spin_lock(&dev_priv->ramin_lock); |
| 112 | engine = 1; | ||
| 113 | else | ||
| 114 | engine = 5; | ||
| 115 | |||
| 116 | list_for_each_entry(vpgd, &vm->pgd_list, head) { | 112 | list_for_each_entry(vpgd, &vm->pgd_list, head) { |
| 117 | r100c80 = nv_rd32(dev, 0x100c80); | 113 | /* looks like maybe a "free flush slots" counter, the |
| 114 | * faster you write to 0x100cbc to more it decreases | ||
| 115 | */ | ||
| 116 | if (!nv_wait_ne(dev, 0x100c80, 0x00ff0000, 0x00000000)) { | ||
| 117 | NV_ERROR(dev, "vm timeout 0: 0x%08x %d\n", | ||
| 118 | nv_rd32(dev, 0x100c80), engine); | ||
| 119 | } | ||
| 118 | nv_wr32(dev, 0x100cb8, vpgd->obj->vinst >> 8); | 120 | nv_wr32(dev, 0x100cb8, vpgd->obj->vinst >> 8); |
| 119 | nv_wr32(dev, 0x100cbc, 0x80000000 | engine); | 121 | nv_wr32(dev, 0x100cbc, 0x80000000 | engine); |
| 120 | if (!nv_wait(dev, 0x100c80, 0xffffffff, r100c80)) | 122 | /* wait for flush to be queued? */ |
| 121 | NV_ERROR(dev, "vm flush timeout eng %d\n", engine); | 123 | if (!nv_wait(dev, 0x100c80, 0x00008000, 0x00008000)) { |
| 124 | NV_ERROR(dev, "vm timeout 1: 0x%08x %d\n", | ||
| 125 | nv_rd32(dev, 0x100c80), engine); | ||
| 126 | } | ||
| 122 | } | 127 | } |
| 128 | spin_unlock(&dev_priv->ramin_lock); | ||
| 123 | } | 129 | } |
diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c index 258fa5e7a2d9..d71d375149f8 100644 --- a/drivers/gpu/drm/radeon/atom.c +++ b/drivers/gpu/drm/radeon/atom.c | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | #include "atom.h" | 32 | #include "atom.h" |
| 33 | #include "atom-names.h" | 33 | #include "atom-names.h" |
| 34 | #include "atom-bits.h" | 34 | #include "atom-bits.h" |
| 35 | #include "radeon.h" | ||
| 35 | 36 | ||
| 36 | #define ATOM_COND_ABOVE 0 | 37 | #define ATOM_COND_ABOVE 0 |
| 37 | #define ATOM_COND_ABOVEOREQUAL 1 | 38 | #define ATOM_COND_ABOVEOREQUAL 1 |
| @@ -101,7 +102,9 @@ static void debug_print_spaces(int n) | |||
| 101 | static uint32_t atom_iio_execute(struct atom_context *ctx, int base, | 102 | static uint32_t atom_iio_execute(struct atom_context *ctx, int base, |
| 102 | uint32_t index, uint32_t data) | 103 | uint32_t index, uint32_t data) |
| 103 | { | 104 | { |
| 105 | struct radeon_device *rdev = ctx->card->dev->dev_private; | ||
| 104 | uint32_t temp = 0xCDCDCDCD; | 106 | uint32_t temp = 0xCDCDCDCD; |
| 107 | |||
| 105 | while (1) | 108 | while (1) |
| 106 | switch (CU8(base)) { | 109 | switch (CU8(base)) { |
| 107 | case ATOM_IIO_NOP: | 110 | case ATOM_IIO_NOP: |
| @@ -112,7 +115,8 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base, | |||
| 112 | base += 3; | 115 | base += 3; |
| 113 | break; | 116 | break; |
| 114 | case ATOM_IIO_WRITE: | 117 | case ATOM_IIO_WRITE: |
| 115 | (void)ctx->card->ioreg_read(ctx->card, CU16(base + 1)); | 118 | if (rdev->family == CHIP_RV515) |
| 119 | (void)ctx->card->ioreg_read(ctx->card, CU16(base + 1)); | ||
| 116 | ctx->card->ioreg_write(ctx->card, CU16(base + 1), temp); | 120 | ctx->card->ioreg_write(ctx->card, CU16(base + 1), temp); |
| 117 | base += 3; | 121 | base += 3; |
| 118 | break; | 122 | break; |
diff --git a/drivers/gpu/drm/radeon/atombios.h b/drivers/gpu/drm/radeon/atombios.h index 04b269d14a59..7fd88497b930 100644 --- a/drivers/gpu/drm/radeon/atombios.h +++ b/drivers/gpu/drm/radeon/atombios.h | |||
| @@ -738,13 +738,13 @@ typedef struct _ATOM_DIG_ENCODER_CONFIG_V3 | |||
| 738 | { | 738 | { |
| 739 | #if ATOM_BIG_ENDIAN | 739 | #if ATOM_BIG_ENDIAN |
| 740 | UCHAR ucReserved1:1; | 740 | UCHAR ucReserved1:1; |
| 741 | UCHAR ucDigSel:3; // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also refered as DIGA/B/C/D/E/F) | 741 | UCHAR ucDigSel:3; // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also referred as DIGA/B/C/D/E/F) |
| 742 | UCHAR ucReserved:3; | 742 | UCHAR ucReserved:3; |
| 743 | UCHAR ucDPLinkRate:1; // =0: 1.62Ghz, =1: 2.7Ghz | 743 | UCHAR ucDPLinkRate:1; // =0: 1.62Ghz, =1: 2.7Ghz |
| 744 | #else | 744 | #else |
| 745 | UCHAR ucDPLinkRate:1; // =0: 1.62Ghz, =1: 2.7Ghz | 745 | UCHAR ucDPLinkRate:1; // =0: 1.62Ghz, =1: 2.7Ghz |
| 746 | UCHAR ucReserved:3; | 746 | UCHAR ucReserved:3; |
| 747 | UCHAR ucDigSel:3; // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also refered as DIGA/B/C/D/E/F) | 747 | UCHAR ucDigSel:3; // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also referred as DIGA/B/C/D/E/F) |
| 748 | UCHAR ucReserved1:1; | 748 | UCHAR ucReserved1:1; |
| 749 | #endif | 749 | #endif |
| 750 | }ATOM_DIG_ENCODER_CONFIG_V3; | 750 | }ATOM_DIG_ENCODER_CONFIG_V3; |
| @@ -785,13 +785,13 @@ typedef struct _ATOM_DIG_ENCODER_CONFIG_V4 | |||
| 785 | { | 785 | { |
| 786 | #if ATOM_BIG_ENDIAN | 786 | #if ATOM_BIG_ENDIAN |
| 787 | UCHAR ucReserved1:1; | 787 | UCHAR ucReserved1:1; |
| 788 | UCHAR ucDigSel:3; // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also refered as DIGA/B/C/D/E/F) | 788 | UCHAR ucDigSel:3; // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also referred as DIGA/B/C/D/E/F) |
| 789 | UCHAR ucReserved:2; | 789 | UCHAR ucReserved:2; |
| 790 | UCHAR ucDPLinkRate:2; // =0: 1.62Ghz, =1: 2.7Ghz, 2=5.4Ghz <= Changed comparing to previous version | 790 | UCHAR ucDPLinkRate:2; // =0: 1.62Ghz, =1: 2.7Ghz, 2=5.4Ghz <= Changed comparing to previous version |
| 791 | #else | 791 | #else |
| 792 | UCHAR ucDPLinkRate:2; // =0: 1.62Ghz, =1: 2.7Ghz, 2=5.4Ghz <= Changed comparing to previous version | 792 | UCHAR ucDPLinkRate:2; // =0: 1.62Ghz, =1: 2.7Ghz, 2=5.4Ghz <= Changed comparing to previous version |
| 793 | UCHAR ucReserved:2; | 793 | UCHAR ucReserved:2; |
| 794 | UCHAR ucDigSel:3; // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also refered as DIGA/B/C/D/E/F) | 794 | UCHAR ucDigSel:3; // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also referred as DIGA/B/C/D/E/F) |
| 795 | UCHAR ucReserved1:1; | 795 | UCHAR ucReserved1:1; |
| 796 | #endif | 796 | #endif |
| 797 | }ATOM_DIG_ENCODER_CONFIG_V4; | 797 | }ATOM_DIG_ENCODER_CONFIG_V4; |
| @@ -2126,7 +2126,7 @@ typedef struct _ATOM_MULTIMEDIA_CONFIG_INFO | |||
| 2126 | // Structures used in FirmwareInfoTable | 2126 | // Structures used in FirmwareInfoTable |
| 2127 | /****************************************************************************/ | 2127 | /****************************************************************************/ |
| 2128 | 2128 | ||
| 2129 | // usBIOSCapability Defintion: | 2129 | // usBIOSCapability Definition: |
| 2130 | // Bit 0 = 0: Bios image is not Posted, =1:Bios image is Posted; | 2130 | // Bit 0 = 0: Bios image is not Posted, =1:Bios image is Posted; |
| 2131 | // Bit 1 = 0: Dual CRTC is not supported, =1: Dual CRTC is supported; | 2131 | // Bit 1 = 0: Dual CRTC is not supported, =1: Dual CRTC is supported; |
| 2132 | // Bit 2 = 0: Extended Desktop is not supported, =1: Extended Desktop is supported; | 2132 | // Bit 2 = 0: Extended Desktop is not supported, =1: Extended Desktop is supported; |
| @@ -3341,7 +3341,7 @@ typedef struct _ATOM_SPREAD_SPECTRUM_INFO | |||
| 3341 | /****************************************************************************/ | 3341 | /****************************************************************************/ |
| 3342 | // Structure used in AnalogTV_InfoTable (Top level) | 3342 | // Structure used in AnalogTV_InfoTable (Top level) |
| 3343 | /****************************************************************************/ | 3343 | /****************************************************************************/ |
| 3344 | //ucTVBootUpDefaultStd definiton: | 3344 | //ucTVBootUpDefaultStd definition: |
| 3345 | 3345 | ||
| 3346 | //ATOM_TV_NTSC 1 | 3346 | //ATOM_TV_NTSC 1 |
| 3347 | //ATOM_TV_NTSCJ 2 | 3347 | //ATOM_TV_NTSCJ 2 |
| @@ -3816,7 +3816,7 @@ typedef struct _ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO | |||
| 3816 | UCHAR Reserved [6]; // for potential expansion | 3816 | UCHAR Reserved [6]; // for potential expansion |
| 3817 | }ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO; | 3817 | }ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO; |
| 3818 | 3818 | ||
| 3819 | //Related definitions, all records are differnt but they have a commond header | 3819 | //Related definitions, all records are different but they have a commond header |
| 3820 | typedef struct _ATOM_COMMON_RECORD_HEADER | 3820 | typedef struct _ATOM_COMMON_RECORD_HEADER |
| 3821 | { | 3821 | { |
| 3822 | UCHAR ucRecordType; //An emun to indicate the record type | 3822 | UCHAR ucRecordType; //An emun to indicate the record type |
| @@ -4365,14 +4365,14 @@ ucUMAChannelNumber: System memory channel numbers. | |||
| 4365 | ulCSR_M3_ARB_CNTL_DEFAULT[10]: Arrays with values for CSR M3 arbiter for default | 4365 | ulCSR_M3_ARB_CNTL_DEFAULT[10]: Arrays with values for CSR M3 arbiter for default |
| 4366 | ulCSR_M3_ARB_CNTL_UVD[10]: Arrays with values for CSR M3 arbiter for UVD playback. | 4366 | ulCSR_M3_ARB_CNTL_UVD[10]: Arrays with values for CSR M3 arbiter for UVD playback. |
| 4367 | ulCSR_M3_ARB_CNTL_FS3D[10]: Arrays with values for CSR M3 arbiter for Full Screen 3D applications. | 4367 | ulCSR_M3_ARB_CNTL_FS3D[10]: Arrays with values for CSR M3 arbiter for Full Screen 3D applications. |
| 4368 | sAvail_SCLK[5]: Arrays to provide availabe list of SLCK and corresponding voltage, order from low to high | 4368 | sAvail_SCLK[5]: Arrays to provide available list of SLCK and corresponding voltage, order from low to high |
| 4369 | ulGMCRestoreResetTime: GMC power restore and GMC reset time to calculate data reconnection latency. Unit in ns. | 4369 | ulGMCRestoreResetTime: GMC power restore and GMC reset time to calculate data reconnection latency. Unit in ns. |
| 4370 | ulMinimumNClk: Minimum NCLK speed among all NB-Pstates to calcualte data reconnection latency. Unit in 10kHz. | 4370 | ulMinimumNClk: Minimum NCLK speed among all NB-Pstates to calcualte data reconnection latency. Unit in 10kHz. |
| 4371 | ulIdleNClk: NCLK speed while memory runs in self-refresh state. Unit in 10kHz. | 4371 | ulIdleNClk: NCLK speed while memory runs in self-refresh state. Unit in 10kHz. |
| 4372 | ulDDR_DLL_PowerUpTime: DDR PHY DLL power up time. Unit in ns. | 4372 | ulDDR_DLL_PowerUpTime: DDR PHY DLL power up time. Unit in ns. |
| 4373 | ulDDR_PLL_PowerUpTime: DDR PHY PLL power up time. Unit in ns. | 4373 | ulDDR_PLL_PowerUpTime: DDR PHY PLL power up time. Unit in ns. |
| 4374 | usPCIEClkSSPercentage: PCIE Clock Spred Spectrum Percentage in unit 0.01%; 100 mean 1%. | 4374 | usPCIEClkSSPercentage: PCIE Clock Spread Spectrum Percentage in unit 0.01%; 100 mean 1%. |
| 4375 | usPCIEClkSSType: PCIE Clock Spred Spectrum Type. 0 for Down spread(default); 1 for Center spread. | 4375 | usPCIEClkSSType: PCIE Clock Spread Spectrum Type. 0 for Down spread(default); 1 for Center spread. |
| 4376 | usLvdsSSPercentage: LVDS panel ( not include eDP ) Spread Spectrum Percentage in unit of 0.01%, =0, use VBIOS default setting. | 4376 | usLvdsSSPercentage: LVDS panel ( not include eDP ) Spread Spectrum Percentage in unit of 0.01%, =0, use VBIOS default setting. |
| 4377 | usLvdsSSpreadRateIn10Hz: LVDS panel ( not include eDP ) Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. | 4377 | usLvdsSSpreadRateIn10Hz: LVDS panel ( not include eDP ) Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. |
| 4378 | usHDMISSPercentage: HDMI Spread Spectrum Percentage in unit 0.01%; 100 mean 1%, =0, use VBIOS default setting. | 4378 | usHDMISSPercentage: HDMI Spread Spectrum Percentage in unit 0.01%; 100 mean 1%, =0, use VBIOS default setting. |
| @@ -4555,7 +4555,7 @@ typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V3 | |||
| 4555 | #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_LITEAC 3 | 4555 | #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_LITEAC 3 |
| 4556 | #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_LIT2AC 4 | 4556 | #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_LIT2AC 4 |
| 4557 | 4557 | ||
| 4558 | //Byte aligned defintion for BIOS usage | 4558 | //Byte aligned definition for BIOS usage |
| 4559 | #define ATOM_S0_CRT1_MONOb0 0x01 | 4559 | #define ATOM_S0_CRT1_MONOb0 0x01 |
| 4560 | #define ATOM_S0_CRT1_COLORb0 0x02 | 4560 | #define ATOM_S0_CRT1_COLORb0 0x02 |
| 4561 | #define ATOM_S0_CRT1_MASKb0 (ATOM_S0_CRT1_MONOb0+ATOM_S0_CRT1_COLORb0) | 4561 | #define ATOM_S0_CRT1_MASKb0 (ATOM_S0_CRT1_MONOb0+ATOM_S0_CRT1_COLORb0) |
| @@ -4621,7 +4621,7 @@ typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V3 | |||
| 4621 | #define ATOM_S2_DISPLAY_ROTATION_ANGLE_MASK 0xC0000000L | 4621 | #define ATOM_S2_DISPLAY_ROTATION_ANGLE_MASK 0xC0000000L |
| 4622 | 4622 | ||
| 4623 | 4623 | ||
| 4624 | //Byte aligned defintion for BIOS usage | 4624 | //Byte aligned definition for BIOS usage |
| 4625 | #define ATOM_S2_TV1_STANDARD_MASKb0 0x0F | 4625 | #define ATOM_S2_TV1_STANDARD_MASKb0 0x0F |
| 4626 | #define ATOM_S2_CURRENT_BL_LEVEL_MASKb1 0xFF | 4626 | #define ATOM_S2_CURRENT_BL_LEVEL_MASKb1 0xFF |
| 4627 | #define ATOM_S2_DEVICE_DPMS_STATEb2 0x01 | 4627 | #define ATOM_S2_DEVICE_DPMS_STATEb2 0x01 |
| @@ -4671,7 +4671,7 @@ typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V3 | |||
| 4671 | #define ATOM_S3_ALLOW_FAST_PWR_SWITCH 0x40000000L | 4671 | #define ATOM_S3_ALLOW_FAST_PWR_SWITCH 0x40000000L |
| 4672 | #define ATOM_S3_RQST_GPU_USE_MIN_PWR 0x80000000L | 4672 | #define ATOM_S3_RQST_GPU_USE_MIN_PWR 0x80000000L |
| 4673 | 4673 | ||
| 4674 | //Byte aligned defintion for BIOS usage | 4674 | //Byte aligned definition for BIOS usage |
| 4675 | #define ATOM_S3_CRT1_ACTIVEb0 0x01 | 4675 | #define ATOM_S3_CRT1_ACTIVEb0 0x01 |
| 4676 | #define ATOM_S3_LCD1_ACTIVEb0 0x02 | 4676 | #define ATOM_S3_LCD1_ACTIVEb0 0x02 |
| 4677 | #define ATOM_S3_TV1_ACTIVEb0 0x04 | 4677 | #define ATOM_S3_TV1_ACTIVEb0 0x04 |
| @@ -4707,7 +4707,7 @@ typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V3 | |||
| 4707 | #define ATOM_S4_LCD1_REFRESH_MASK 0x0000FF00L | 4707 | #define ATOM_S4_LCD1_REFRESH_MASK 0x0000FF00L |
| 4708 | #define ATOM_S4_LCD1_REFRESH_SHIFT 8 | 4708 | #define ATOM_S4_LCD1_REFRESH_SHIFT 8 |
| 4709 | 4709 | ||
| 4710 | //Byte aligned defintion for BIOS usage | 4710 | //Byte aligned definition for BIOS usage |
| 4711 | #define ATOM_S4_LCD1_PANEL_ID_MASKb0 0x0FF | 4711 | #define ATOM_S4_LCD1_PANEL_ID_MASKb0 0x0FF |
| 4712 | #define ATOM_S4_LCD1_REFRESH_MASKb1 ATOM_S4_LCD1_PANEL_ID_MASKb0 | 4712 | #define ATOM_S4_LCD1_REFRESH_MASKb1 ATOM_S4_LCD1_PANEL_ID_MASKb0 |
| 4713 | #define ATOM_S4_VRAM_INFO_MASKb2 ATOM_S4_LCD1_PANEL_ID_MASKb0 | 4713 | #define ATOM_S4_VRAM_INFO_MASKb2 ATOM_S4_LCD1_PANEL_ID_MASKb0 |
| @@ -4786,7 +4786,7 @@ typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V3 | |||
| 4786 | #define ATOM_S6_VRI_BRIGHTNESS_CHANGE 0x40000000L | 4786 | #define ATOM_S6_VRI_BRIGHTNESS_CHANGE 0x40000000L |
| 4787 | #define ATOM_S6_CONFIG_DISPLAY_CHANGE_MASK 0x80000000L | 4787 | #define ATOM_S6_CONFIG_DISPLAY_CHANGE_MASK 0x80000000L |
| 4788 | 4788 | ||
| 4789 | //Byte aligned defintion for BIOS usage | 4789 | //Byte aligned definition for BIOS usage |
| 4790 | #define ATOM_S6_DEVICE_CHANGEb0 0x01 | 4790 | #define ATOM_S6_DEVICE_CHANGEb0 0x01 |
| 4791 | #define ATOM_S6_SCALER_CHANGEb0 0x02 | 4791 | #define ATOM_S6_SCALER_CHANGEb0 0x02 |
| 4792 | #define ATOM_S6_LID_CHANGEb0 0x04 | 4792 | #define ATOM_S6_LID_CHANGEb0 0x04 |
| @@ -5027,7 +5027,7 @@ typedef struct _ENABLE_GRAPH_SURFACE_PS_ALLOCATION | |||
| 5027 | 5027 | ||
| 5028 | typedef struct _MEMORY_CLEAN_UP_PARAMETERS | 5028 | typedef struct _MEMORY_CLEAN_UP_PARAMETERS |
| 5029 | { | 5029 | { |
| 5030 | USHORT usMemoryStart; //in 8Kb boundry, offset from memory base address | 5030 | USHORT usMemoryStart; //in 8Kb boundary, offset from memory base address |
| 5031 | USHORT usMemorySize; //8Kb blocks aligned | 5031 | USHORT usMemorySize; //8Kb blocks aligned |
| 5032 | }MEMORY_CLEAN_UP_PARAMETERS; | 5032 | }MEMORY_CLEAN_UP_PARAMETERS; |
| 5033 | #define MEMORY_CLEAN_UP_PS_ALLOCATION MEMORY_CLEAN_UP_PARAMETERS | 5033 | #define MEMORY_CLEAN_UP_PS_ALLOCATION MEMORY_CLEAN_UP_PARAMETERS |
| @@ -6855,7 +6855,7 @@ typedef struct _ATOM_PPLIB_Clock_Voltage_Limit_Table | |||
| 6855 | /**************************************************************************/ | 6855 | /**************************************************************************/ |
| 6856 | 6856 | ||
| 6857 | 6857 | ||
| 6858 | // Following definitions are for compatiblity issue in different SW components. | 6858 | // Following definitions are for compatibility issue in different SW components. |
| 6859 | #define ATOM_MASTER_DATA_TABLE_REVISION 0x01 | 6859 | #define ATOM_MASTER_DATA_TABLE_REVISION 0x01 |
| 6860 | #define Object_Info Object_Header | 6860 | #define Object_Info Object_Header |
| 6861 | #define AdjustARB_SEQ MC_InitParameter | 6861 | #define AdjustARB_SEQ MC_InitParameter |
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index 10e41af6b026..9d516a8c4dfa 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c | |||
| @@ -531,6 +531,12 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc, | |||
| 531 | pll->flags |= RADEON_PLL_PREFER_HIGH_FB_DIV; | 531 | pll->flags |= RADEON_PLL_PREFER_HIGH_FB_DIV; |
| 532 | else | 532 | else |
| 533 | pll->flags |= RADEON_PLL_PREFER_LOW_REF_DIV; | 533 | pll->flags |= RADEON_PLL_PREFER_LOW_REF_DIV; |
| 534 | |||
| 535 | if ((rdev->family == CHIP_R600) || | ||
| 536 | (rdev->family == CHIP_RV610) || | ||
| 537 | (rdev->family == CHIP_RV630) || | ||
| 538 | (rdev->family == CHIP_RV670)) | ||
| 539 | pll->flags |= RADEON_PLL_PREFER_MINM_OVER_MAXP; | ||
| 534 | } else { | 540 | } else { |
| 535 | pll->flags |= RADEON_PLL_LEGACY; | 541 | pll->flags |= RADEON_PLL_LEGACY; |
| 536 | 542 | ||
| @@ -1009,6 +1015,7 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc, | |||
| 1009 | uint64_t fb_location; | 1015 | uint64_t fb_location; |
| 1010 | uint32_t fb_format, fb_pitch_pixels, tiling_flags; | 1016 | uint32_t fb_format, fb_pitch_pixels, tiling_flags; |
| 1011 | u32 fb_swap = EVERGREEN_GRPH_ENDIAN_SWAP(EVERGREEN_GRPH_ENDIAN_NONE); | 1017 | u32 fb_swap = EVERGREEN_GRPH_ENDIAN_SWAP(EVERGREEN_GRPH_ENDIAN_NONE); |
| 1018 | u32 tmp; | ||
| 1012 | int r; | 1019 | int r; |
| 1013 | 1020 | ||
| 1014 | /* no fb bound */ | 1021 | /* no fb bound */ |
| @@ -1137,6 +1144,15 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc, | |||
| 1137 | WREG32(EVERGREEN_VIEWPORT_SIZE + radeon_crtc->crtc_offset, | 1144 | WREG32(EVERGREEN_VIEWPORT_SIZE + radeon_crtc->crtc_offset, |
| 1138 | (crtc->mode.hdisplay << 16) | crtc->mode.vdisplay); | 1145 | (crtc->mode.hdisplay << 16) | crtc->mode.vdisplay); |
| 1139 | 1146 | ||
| 1147 | /* pageflip setup */ | ||
| 1148 | /* make sure flip is at vb rather than hb */ | ||
| 1149 | tmp = RREG32(EVERGREEN_GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset); | ||
| 1150 | tmp &= ~EVERGREEN_GRPH_SURFACE_UPDATE_H_RETRACE_EN; | ||
| 1151 | WREG32(EVERGREEN_GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset, tmp); | ||
| 1152 | |||
| 1153 | /* set pageflip to happen anywhere in vblank interval */ | ||
| 1154 | WREG32(EVERGREEN_MASTER_UPDATE_MODE + radeon_crtc->crtc_offset, 0); | ||
| 1155 | |||
| 1140 | if (!atomic && fb && fb != crtc->fb) { | 1156 | if (!atomic && fb && fb != crtc->fb) { |
| 1141 | radeon_fb = to_radeon_framebuffer(fb); | 1157 | radeon_fb = to_radeon_framebuffer(fb); |
| 1142 | rbo = gem_to_radeon_bo(radeon_fb->obj); | 1158 | rbo = gem_to_radeon_bo(radeon_fb->obj); |
| @@ -1167,6 +1183,7 @@ static int avivo_crtc_do_set_base(struct drm_crtc *crtc, | |||
| 1167 | uint64_t fb_location; | 1183 | uint64_t fb_location; |
| 1168 | uint32_t fb_format, fb_pitch_pixels, tiling_flags; | 1184 | uint32_t fb_format, fb_pitch_pixels, tiling_flags; |
| 1169 | u32 fb_swap = R600_D1GRPH_SWAP_ENDIAN_NONE; | 1185 | u32 fb_swap = R600_D1GRPH_SWAP_ENDIAN_NONE; |
| 1186 | u32 tmp; | ||
| 1170 | int r; | 1187 | int r; |
| 1171 | 1188 | ||
| 1172 | /* no fb bound */ | 1189 | /* no fb bound */ |
| @@ -1294,6 +1311,15 @@ static int avivo_crtc_do_set_base(struct drm_crtc *crtc, | |||
| 1294 | WREG32(AVIVO_D1MODE_VIEWPORT_SIZE + radeon_crtc->crtc_offset, | 1311 | WREG32(AVIVO_D1MODE_VIEWPORT_SIZE + radeon_crtc->crtc_offset, |
| 1295 | (crtc->mode.hdisplay << 16) | crtc->mode.vdisplay); | 1312 | (crtc->mode.hdisplay << 16) | crtc->mode.vdisplay); |
| 1296 | 1313 | ||
| 1314 | /* pageflip setup */ | ||
| 1315 | /* make sure flip is at vb rather than hb */ | ||
| 1316 | tmp = RREG32(AVIVO_D1GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset); | ||
| 1317 | tmp &= ~AVIVO_D1GRPH_SURFACE_UPDATE_H_RETRACE_EN; | ||
| 1318 | WREG32(AVIVO_D1GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset, tmp); | ||
| 1319 | |||
| 1320 | /* set pageflip to happen anywhere in vblank interval */ | ||
| 1321 | WREG32(AVIVO_D1MODE_MASTER_UPDATE_MODE + radeon_crtc->crtc_offset, 0); | ||
| 1322 | |||
| 1297 | if (!atomic && fb && fb != crtc->fb) { | 1323 | if (!atomic && fb && fb != crtc->fb) { |
| 1298 | radeon_fb = to_radeon_framebuffer(fb); | 1324 | radeon_fb = to_radeon_framebuffer(fb); |
| 1299 | rbo = gem_to_radeon_bo(radeon_fb->obj); | 1325 | rbo = gem_to_radeon_bo(radeon_fb->obj); |
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index 941080a77940..3453910ee0f3 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c | |||
| @@ -43,17 +43,6 @@ static void evergreen_pcie_gen2_enable(struct radeon_device *rdev); | |||
| 43 | 43 | ||
| 44 | void evergreen_pre_page_flip(struct radeon_device *rdev, int crtc) | 44 | void evergreen_pre_page_flip(struct radeon_device *rdev, int crtc) |
| 45 | { | 45 | { |
| 46 | struct radeon_crtc *radeon_crtc = rdev->mode_info.crtcs[crtc]; | ||
| 47 | u32 tmp; | ||
| 48 | |||
| 49 | /* make sure flip is at vb rather than hb */ | ||
| 50 | tmp = RREG32(EVERGREEN_GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset); | ||
| 51 | tmp &= ~EVERGREEN_GRPH_SURFACE_UPDATE_H_RETRACE_EN; | ||
| 52 | WREG32(EVERGREEN_GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset, tmp); | ||
| 53 | |||
| 54 | /* set pageflip to happen anywhere in vblank interval */ | ||
| 55 | WREG32(EVERGREEN_MASTER_UPDATE_MODE + radeon_crtc->crtc_offset, 0); | ||
| 56 | |||
| 57 | /* enable the pflip int */ | 46 | /* enable the pflip int */ |
| 58 | radeon_irq_kms_pflip_irq_get(rdev, crtc); | 47 | radeon_irq_kms_pflip_irq_get(rdev, crtc); |
| 59 | } | 48 | } |
| @@ -131,11 +120,16 @@ void evergreen_pm_misc(struct radeon_device *rdev) | |||
| 131 | struct radeon_power_state *ps = &rdev->pm.power_state[req_ps_idx]; | 120 | struct radeon_power_state *ps = &rdev->pm.power_state[req_ps_idx]; |
| 132 | struct radeon_voltage *voltage = &ps->clock_info[req_cm_idx].voltage; | 121 | struct radeon_voltage *voltage = &ps->clock_info[req_cm_idx].voltage; |
| 133 | 122 | ||
| 134 | if ((voltage->type == VOLTAGE_SW) && voltage->voltage) { | 123 | if (voltage->type == VOLTAGE_SW) { |
| 135 | if (voltage->voltage != rdev->pm.current_vddc) { | 124 | if (voltage->voltage && (voltage->voltage != rdev->pm.current_vddc)) { |
| 136 | radeon_atom_set_voltage(rdev, voltage->voltage); | 125 | radeon_atom_set_voltage(rdev, voltage->voltage, SET_VOLTAGE_TYPE_ASIC_VDDC); |
| 137 | rdev->pm.current_vddc = voltage->voltage; | 126 | rdev->pm.current_vddc = voltage->voltage; |
| 138 | DRM_DEBUG("Setting: v: %d\n", voltage->voltage); | 127 | DRM_DEBUG("Setting: vddc: %d\n", voltage->voltage); |
| 128 | } | ||
| 129 | if (voltage->vddci && (voltage->vddci != rdev->pm.current_vddci)) { | ||
| 130 | radeon_atom_set_voltage(rdev, voltage->vddci, SET_VOLTAGE_TYPE_ASIC_VDDCI); | ||
| 131 | rdev->pm.current_vddci = voltage->vddci; | ||
| 132 | DRM_DEBUG("Setting: vddci: %d\n", voltage->vddci); | ||
| 139 | } | 133 | } |
| 140 | } | 134 | } |
| 141 | } | 135 | } |
| @@ -3047,9 +3041,6 @@ int evergreen_init(struct radeon_device *rdev) | |||
| 3047 | { | 3041 | { |
| 3048 | int r; | 3042 | int r; |
| 3049 | 3043 | ||
| 3050 | r = radeon_dummy_page_init(rdev); | ||
| 3051 | if (r) | ||
| 3052 | return r; | ||
| 3053 | /* This don't do much */ | 3044 | /* This don't do much */ |
| 3054 | r = radeon_gem_init(rdev); | 3045 | r = radeon_gem_init(rdev); |
| 3055 | if (r) | 3046 | if (r) |
| @@ -3161,7 +3152,6 @@ void evergreen_fini(struct radeon_device *rdev) | |||
| 3161 | radeon_atombios_fini(rdev); | 3152 | radeon_atombios_fini(rdev); |
| 3162 | kfree(rdev->bios); | 3153 | kfree(rdev->bios); |
| 3163 | rdev->bios = NULL; | 3154 | rdev->bios = NULL; |
| 3164 | radeon_dummy_page_fini(rdev); | ||
| 3165 | } | 3155 | } |
| 3166 | 3156 | ||
| 3167 | static void evergreen_pcie_gen2_enable(struct radeon_device *rdev) | 3157 | static void evergreen_pcie_gen2_enable(struct radeon_device *rdev) |
diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c b/drivers/gpu/drm/radeon/evergreen_cs.c index edde90b37554..23d36417158d 100644 --- a/drivers/gpu/drm/radeon/evergreen_cs.c +++ b/drivers/gpu/drm/radeon/evergreen_cs.c | |||
| @@ -442,7 +442,7 @@ static inline int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u3 | |||
| 442 | } | 442 | } |
| 443 | ib = p->ib->ptr; | 443 | ib = p->ib->ptr; |
| 444 | switch (reg) { | 444 | switch (reg) { |
| 445 | /* force following reg to 0 in an attemp to disable out buffer | 445 | /* force following reg to 0 in an attempt to disable out buffer |
| 446 | * which will need us to better understand how it works to perform | 446 | * which will need us to better understand how it works to perform |
| 447 | * security check on it (Jerome) | 447 | * security check on it (Jerome) |
| 448 | */ | 448 | */ |
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c index 8713731fa014..55a7f190027e 100644 --- a/drivers/gpu/drm/radeon/r300.c +++ b/drivers/gpu/drm/radeon/r300.c | |||
| @@ -437,7 +437,7 @@ int r300_asic_reset(struct radeon_device *rdev) | |||
| 437 | status = RREG32(R_000E40_RBBM_STATUS); | 437 | status = RREG32(R_000E40_RBBM_STATUS); |
| 438 | dev_info(rdev->dev, "(%s:%d) RBBM_STATUS=0x%08X\n", __func__, __LINE__, status); | 438 | dev_info(rdev->dev, "(%s:%d) RBBM_STATUS=0x%08X\n", __func__, __LINE__, status); |
| 439 | /* resetting the CP seems to be problematic sometimes it end up | 439 | /* resetting the CP seems to be problematic sometimes it end up |
| 440 | * hard locking the computer, but it's necessary for successfull | 440 | * hard locking the computer, but it's necessary for successful |
| 441 | * reset more test & playing is needed on R3XX/R4XX to find a | 441 | * reset more test & playing is needed on R3XX/R4XX to find a |
| 442 | * reliable (if any solution) | 442 | * reliable (if any solution) |
| 443 | */ | 443 | */ |
diff --git a/drivers/gpu/drm/radeon/r300_reg.h b/drivers/gpu/drm/radeon/r300_reg.h index f0bce399c9f3..00c0d2ba22d3 100644 --- a/drivers/gpu/drm/radeon/r300_reg.h +++ b/drivers/gpu/drm/radeon/r300_reg.h | |||
| @@ -608,7 +608,7 @@ | |||
| 608 | * My guess is that there are two bits for each zbias primitive | 608 | * My guess is that there are two bits for each zbias primitive |
| 609 | * (FILL, LINE, POINT). | 609 | * (FILL, LINE, POINT). |
| 610 | * One to enable depth test and one for depth write. | 610 | * One to enable depth test and one for depth write. |
| 611 | * Yet this doesnt explain why depth writes work ... | 611 | * Yet this doesn't explain why depth writes work ... |
| 612 | */ | 612 | */ |
| 613 | #define R300_RE_OCCLUSION_CNTL 0x42B4 | 613 | #define R300_RE_OCCLUSION_CNTL 0x42B4 |
| 614 | # define R300_OCCLUSION_ON (1<<1) | 614 | # define R300_OCCLUSION_ON (1<<1) |
| @@ -817,7 +817,7 @@ | |||
| 817 | # define R300_TX_MIN_FILTER_LINEAR_MIP_NEAREST (6 << 11) | 817 | # define R300_TX_MIN_FILTER_LINEAR_MIP_NEAREST (6 << 11) |
| 818 | # define R300_TX_MIN_FILTER_LINEAR_MIP_LINEAR (10 << 11) | 818 | # define R300_TX_MIN_FILTER_LINEAR_MIP_LINEAR (10 << 11) |
| 819 | 819 | ||
| 820 | /* NOTE: NEAREST doesnt seem to exist. | 820 | /* NOTE: NEAREST doesn't seem to exist. |
| 821 | * Im not seting MAG_FILTER_MASK and (3 << 11) on for all | 821 | * Im not seting MAG_FILTER_MASK and (3 << 11) on for all |
| 822 | * anisotropy modes because that would void selected mag filter | 822 | * anisotropy modes because that would void selected mag filter |
| 823 | */ | 823 | */ |
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index be271c42de4d..15d58292677a 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
| @@ -587,7 +587,7 @@ void r600_pm_misc(struct radeon_device *rdev) | |||
| 587 | 587 | ||
| 588 | if ((voltage->type == VOLTAGE_SW) && voltage->voltage) { | 588 | if ((voltage->type == VOLTAGE_SW) && voltage->voltage) { |
| 589 | if (voltage->voltage != rdev->pm.current_vddc) { | 589 | if (voltage->voltage != rdev->pm.current_vddc) { |
| 590 | radeon_atom_set_voltage(rdev, voltage->voltage); | 590 | radeon_atom_set_voltage(rdev, voltage->voltage, SET_VOLTAGE_TYPE_ASIC_VDDC); |
| 591 | rdev->pm.current_vddc = voltage->voltage; | 591 | rdev->pm.current_vddc = voltage->voltage; |
| 592 | DRM_DEBUG_DRIVER("Setting: v: %d\n", voltage->voltage); | 592 | DRM_DEBUG_DRIVER("Setting: v: %d\n", voltage->voltage); |
| 593 | } | 593 | } |
| @@ -2509,9 +2509,6 @@ int r600_init(struct radeon_device *rdev) | |||
| 2509 | { | 2509 | { |
| 2510 | int r; | 2510 | int r; |
| 2511 | 2511 | ||
| 2512 | r = radeon_dummy_page_init(rdev); | ||
| 2513 | if (r) | ||
| 2514 | return r; | ||
| 2515 | if (r600_debugfs_mc_info_init(rdev)) { | 2512 | if (r600_debugfs_mc_info_init(rdev)) { |
| 2516 | DRM_ERROR("Failed to register debugfs file for mc !\n"); | 2513 | DRM_ERROR("Failed to register debugfs file for mc !\n"); |
| 2517 | } | 2514 | } |
| @@ -2625,7 +2622,6 @@ void r600_fini(struct radeon_device *rdev) | |||
| 2625 | radeon_atombios_fini(rdev); | 2622 | radeon_atombios_fini(rdev); |
| 2626 | kfree(rdev->bios); | 2623 | kfree(rdev->bios); |
| 2627 | rdev->bios = NULL; | 2624 | rdev->bios = NULL; |
| 2628 | radeon_dummy_page_fini(rdev); | ||
| 2629 | } | 2625 | } |
| 2630 | 2626 | ||
| 2631 | 2627 | ||
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c index 3324620b2db6..fd18be9871ab 100644 --- a/drivers/gpu/drm/radeon/r600_cs.c +++ b/drivers/gpu/drm/radeon/r600_cs.c | |||
| @@ -921,7 +921,7 @@ static inline int r600_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx | |||
| 921 | return 0; | 921 | return 0; |
| 922 | ib = p->ib->ptr; | 922 | ib = p->ib->ptr; |
| 923 | switch (reg) { | 923 | switch (reg) { |
| 924 | /* force following reg to 0 in an attemp to disable out buffer | 924 | /* force following reg to 0 in an attempt to disable out buffer |
| 925 | * which will need us to better understand how it works to perform | 925 | * which will need us to better understand how it works to perform |
| 926 | * security check on it (Jerome) | 926 | * security check on it (Jerome) |
| 927 | */ | 927 | */ |
diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c index 50db6d62eec2..f5ac7e788d81 100644 --- a/drivers/gpu/drm/radeon/r600_hdmi.c +++ b/drivers/gpu/drm/radeon/r600_hdmi.c | |||
| @@ -334,7 +334,7 @@ void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mod | |||
| 334 | r600_hdmi_videoinfoframe(encoder, RGB, 0, 0, 0, 0, | 334 | r600_hdmi_videoinfoframe(encoder, RGB, 0, 0, 0, 0, |
| 335 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); | 335 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); |
| 336 | 336 | ||
| 337 | /* it's unknown what these bits do excatly, but it's indeed quite usefull for debugging */ | 337 | /* it's unknown what these bits do excatly, but it's indeed quite useful for debugging */ |
| 338 | WREG32(offset+R600_HDMI_AUDIO_DEBUG_0, 0x00FFFFFF); | 338 | WREG32(offset+R600_HDMI_AUDIO_DEBUG_0, 0x00FFFFFF); |
| 339 | WREG32(offset+R600_HDMI_AUDIO_DEBUG_1, 0x007FFFFF); | 339 | WREG32(offset+R600_HDMI_AUDIO_DEBUG_1, 0x007FFFFF); |
| 340 | WREG32(offset+R600_HDMI_AUDIO_DEBUG_2, 0x00000001); | 340 | WREG32(offset+R600_HDMI_AUDIO_DEBUG_2, 0x00000001); |
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index cfe3af1a7935..ba643b576054 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
| @@ -177,7 +177,7 @@ void radeon_pm_suspend(struct radeon_device *rdev); | |||
| 177 | void radeon_pm_resume(struct radeon_device *rdev); | 177 | void radeon_pm_resume(struct radeon_device *rdev); |
| 178 | void radeon_combios_get_power_modes(struct radeon_device *rdev); | 178 | void radeon_combios_get_power_modes(struct radeon_device *rdev); |
| 179 | void radeon_atombios_get_power_modes(struct radeon_device *rdev); | 179 | void radeon_atombios_get_power_modes(struct radeon_device *rdev); |
| 180 | void radeon_atom_set_voltage(struct radeon_device *rdev, u16 level); | 180 | void radeon_atom_set_voltage(struct radeon_device *rdev, u16 voltage_level, u8 voltage_type); |
| 181 | void rs690_pm_info(struct radeon_device *rdev); | 181 | void rs690_pm_info(struct radeon_device *rdev); |
| 182 | extern int rv6xx_get_temp(struct radeon_device *rdev); | 182 | extern int rv6xx_get_temp(struct radeon_device *rdev); |
| 183 | extern int rv770_get_temp(struct radeon_device *rdev); | 183 | extern int rv770_get_temp(struct radeon_device *rdev); |
| @@ -679,11 +679,11 @@ struct radeon_wb { | |||
| 679 | * @sideport_bandwidth: sideport bandwidth the gpu has (MByte/s) (IGP) | 679 | * @sideport_bandwidth: sideport bandwidth the gpu has (MByte/s) (IGP) |
| 680 | * @ht_bandwidth: ht bandwidth the gpu has (MByte/s) (IGP) | 680 | * @ht_bandwidth: ht bandwidth the gpu has (MByte/s) (IGP) |
| 681 | * @core_bandwidth: core GPU bandwidth the gpu has (MByte/s) (IGP) | 681 | * @core_bandwidth: core GPU bandwidth the gpu has (MByte/s) (IGP) |
| 682 | * @sclk: GPU clock Mhz (core bandwith depends of this clock) | 682 | * @sclk: GPU clock Mhz (core bandwidth depends of this clock) |
| 683 | * @needed_bandwidth: current bandwidth needs | 683 | * @needed_bandwidth: current bandwidth needs |
| 684 | * | 684 | * |
| 685 | * It keeps track of various data needed to take powermanagement decision. | 685 | * It keeps track of various data needed to take powermanagement decision. |
| 686 | * Bandwith need is used to determine minimun clock of the GPU and memory. | 686 | * Bandwidth need is used to determine minimun clock of the GPU and memory. |
| 687 | * Equation between gpu/memory clock and available bandwidth is hw dependent | 687 | * Equation between gpu/memory clock and available bandwidth is hw dependent |
| 688 | * (type of memory, bus size, efficiency, ...) | 688 | * (type of memory, bus size, efficiency, ...) |
| 689 | */ | 689 | */ |
| @@ -767,7 +767,9 @@ struct radeon_voltage { | |||
| 767 | u8 vddci_id; /* index into vddci voltage table */ | 767 | u8 vddci_id; /* index into vddci voltage table */ |
| 768 | bool vddci_enabled; | 768 | bool vddci_enabled; |
| 769 | /* r6xx+ sw */ | 769 | /* r6xx+ sw */ |
| 770 | u32 voltage; | 770 | u16 voltage; |
| 771 | /* evergreen+ vddci */ | ||
| 772 | u16 vddci; | ||
| 771 | }; | 773 | }; |
| 772 | 774 | ||
| 773 | /* clock mode flags */ | 775 | /* clock mode flags */ |
| @@ -835,10 +837,12 @@ struct radeon_pm { | |||
| 835 | int default_power_state_index; | 837 | int default_power_state_index; |
| 836 | u32 current_sclk; | 838 | u32 current_sclk; |
| 837 | u32 current_mclk; | 839 | u32 current_mclk; |
| 838 | u32 current_vddc; | 840 | u16 current_vddc; |
| 841 | u16 current_vddci; | ||
| 839 | u32 default_sclk; | 842 | u32 default_sclk; |
| 840 | u32 default_mclk; | 843 | u32 default_mclk; |
| 841 | u32 default_vddc; | 844 | u16 default_vddc; |
| 845 | u16 default_vddci; | ||
| 842 | struct radeon_i2c_chan *i2c_bus; | 846 | struct radeon_i2c_chan *i2c_bus; |
| 843 | /* selected pm method */ | 847 | /* selected pm method */ |
| 844 | enum radeon_pm_method pm_method; | 848 | enum radeon_pm_method pm_method; |
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c index eb888ee5f674..ca576191d058 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.c +++ b/drivers/gpu/drm/radeon/radeon_asic.c | |||
| @@ -94,7 +94,7 @@ static void radeon_register_accessor_init(struct radeon_device *rdev) | |||
| 94 | rdev->mc_rreg = &rs600_mc_rreg; | 94 | rdev->mc_rreg = &rs600_mc_rreg; |
| 95 | rdev->mc_wreg = &rs600_mc_wreg; | 95 | rdev->mc_wreg = &rs600_mc_wreg; |
| 96 | } | 96 | } |
| 97 | if ((rdev->family >= CHIP_R600) && (rdev->family <= CHIP_HEMLOCK)) { | 97 | if (rdev->family >= CHIP_R600) { |
| 98 | rdev->pciep_rreg = &r600_pciep_rreg; | 98 | rdev->pciep_rreg = &r600_pciep_rreg; |
| 99 | rdev->pciep_wreg = &r600_pciep_wreg; | 99 | rdev->pciep_wreg = &r600_pciep_wreg; |
| 100 | } | 100 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index 02d5c415f499..f5d12fb103fa 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c | |||
| @@ -675,7 +675,8 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev) | |||
| 675 | ATOM_ENCODER_CAP_RECORD *cap_record; | 675 | ATOM_ENCODER_CAP_RECORD *cap_record; |
| 676 | u16 caps = 0; | 676 | u16 caps = 0; |
| 677 | 677 | ||
| 678 | while (record->ucRecordType > 0 && | 678 | while (record->ucRecordSize > 0 && |
| 679 | record->ucRecordType > 0 && | ||
| 679 | record->ucRecordType <= ATOM_MAX_OBJECT_RECORD_NUMBER) { | 680 | record->ucRecordType <= ATOM_MAX_OBJECT_RECORD_NUMBER) { |
| 680 | switch (record->ucRecordType) { | 681 | switch (record->ucRecordType) { |
| 681 | case ATOM_ENCODER_CAP_RECORD_TYPE: | 682 | case ATOM_ENCODER_CAP_RECORD_TYPE: |
| @@ -720,7 +721,8 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev) | |||
| 720 | break; | 721 | break; |
| 721 | } | 722 | } |
| 722 | 723 | ||
| 723 | while (record->ucRecordType > 0 && | 724 | while (record->ucRecordSize > 0 && |
| 725 | record->ucRecordType > 0 && | ||
| 724 | record->ucRecordType <= ATOM_MAX_OBJECT_RECORD_NUMBER) { | 726 | record->ucRecordType <= ATOM_MAX_OBJECT_RECORD_NUMBER) { |
| 725 | switch (record->ucRecordType) { | 727 | switch (record->ucRecordType) { |
| 726 | case ATOM_I2C_RECORD_TYPE: | 728 | case ATOM_I2C_RECORD_TYPE: |
| @@ -782,10 +784,9 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev) | |||
| 782 | ATOM_HPD_INT_RECORD *hpd_record; | 784 | ATOM_HPD_INT_RECORD *hpd_record; |
| 783 | ATOM_I2C_ID_CONFIG_ACCESS *i2c_config; | 785 | ATOM_I2C_ID_CONFIG_ACCESS *i2c_config; |
| 784 | 786 | ||
| 785 | while (record->ucRecordType > 0 | 787 | while (record->ucRecordSize > 0 && |
| 786 | && record-> | 788 | record->ucRecordType > 0 && |
| 787 | ucRecordType <= | 789 | record->ucRecordType <= ATOM_MAX_OBJECT_RECORD_NUMBER) { |
| 788 | ATOM_MAX_OBJECT_RECORD_NUMBER) { | ||
| 789 | switch (record->ucRecordType) { | 790 | switch (record->ucRecordType) { |
| 790 | case ATOM_I2C_RECORD_TYPE: | 791 | case ATOM_I2C_RECORD_TYPE: |
| 791 | i2c_record = | 792 | i2c_record = |
| @@ -2175,24 +2176,27 @@ static void radeon_atombios_add_pplib_thermal_controller(struct radeon_device *r | |||
| 2175 | } | 2176 | } |
| 2176 | } | 2177 | } |
| 2177 | 2178 | ||
| 2178 | static u16 radeon_atombios_get_default_vddc(struct radeon_device *rdev) | 2179 | static void radeon_atombios_get_default_voltages(struct radeon_device *rdev, |
| 2180 | u16 *vddc, u16 *vddci) | ||
| 2179 | { | 2181 | { |
| 2180 | struct radeon_mode_info *mode_info = &rdev->mode_info; | 2182 | struct radeon_mode_info *mode_info = &rdev->mode_info; |
| 2181 | int index = GetIndexIntoMasterTable(DATA, FirmwareInfo); | 2183 | int index = GetIndexIntoMasterTable(DATA, FirmwareInfo); |
| 2182 | u8 frev, crev; | 2184 | u8 frev, crev; |
| 2183 | u16 data_offset; | 2185 | u16 data_offset; |
| 2184 | union firmware_info *firmware_info; | 2186 | union firmware_info *firmware_info; |
| 2185 | u16 vddc = 0; | 2187 | |
| 2188 | *vddc = 0; | ||
| 2189 | *vddci = 0; | ||
| 2186 | 2190 | ||
| 2187 | if (atom_parse_data_header(mode_info->atom_context, index, NULL, | 2191 | if (atom_parse_data_header(mode_info->atom_context, index, NULL, |
| 2188 | &frev, &crev, &data_offset)) { | 2192 | &frev, &crev, &data_offset)) { |
| 2189 | firmware_info = | 2193 | firmware_info = |
| 2190 | (union firmware_info *)(mode_info->atom_context->bios + | 2194 | (union firmware_info *)(mode_info->atom_context->bios + |
| 2191 | data_offset); | 2195 | data_offset); |
| 2192 | vddc = le16_to_cpu(firmware_info->info_14.usBootUpVDDCVoltage); | 2196 | *vddc = le16_to_cpu(firmware_info->info_14.usBootUpVDDCVoltage); |
| 2197 | if ((frev == 2) && (crev >= 2)) | ||
| 2198 | *vddci = le16_to_cpu(firmware_info->info_22.usBootUpVDDCIVoltage); | ||
| 2193 | } | 2199 | } |
| 2194 | |||
| 2195 | return vddc; | ||
| 2196 | } | 2200 | } |
| 2197 | 2201 | ||
| 2198 | static void radeon_atombios_parse_pplib_non_clock_info(struct radeon_device *rdev, | 2202 | static void radeon_atombios_parse_pplib_non_clock_info(struct radeon_device *rdev, |
| @@ -2202,7 +2206,9 @@ static void radeon_atombios_parse_pplib_non_clock_info(struct radeon_device *rde | |||
| 2202 | int j; | 2206 | int j; |
| 2203 | u32 misc = le32_to_cpu(non_clock_info->ulCapsAndSettings); | 2207 | u32 misc = le32_to_cpu(non_clock_info->ulCapsAndSettings); |
| 2204 | u32 misc2 = le16_to_cpu(non_clock_info->usClassification); | 2208 | u32 misc2 = le16_to_cpu(non_clock_info->usClassification); |
| 2205 | u16 vddc = radeon_atombios_get_default_vddc(rdev); | 2209 | u16 vddc, vddci; |
| 2210 | |||
| 2211 | radeon_atombios_get_default_voltages(rdev, &vddc, &vddci); | ||
| 2206 | 2212 | ||
| 2207 | rdev->pm.power_state[state_index].misc = misc; | 2213 | rdev->pm.power_state[state_index].misc = misc; |
| 2208 | rdev->pm.power_state[state_index].misc2 = misc2; | 2214 | rdev->pm.power_state[state_index].misc2 = misc2; |
| @@ -2243,6 +2249,7 @@ static void radeon_atombios_parse_pplib_non_clock_info(struct radeon_device *rde | |||
| 2243 | rdev->pm.default_sclk = rdev->pm.power_state[state_index].clock_info[0].sclk; | 2249 | rdev->pm.default_sclk = rdev->pm.power_state[state_index].clock_info[0].sclk; |
| 2244 | rdev->pm.default_mclk = rdev->pm.power_state[state_index].clock_info[0].mclk; | 2250 | rdev->pm.default_mclk = rdev->pm.power_state[state_index].clock_info[0].mclk; |
| 2245 | rdev->pm.default_vddc = rdev->pm.power_state[state_index].clock_info[0].voltage.voltage; | 2251 | rdev->pm.default_vddc = rdev->pm.power_state[state_index].clock_info[0].voltage.voltage; |
| 2252 | rdev->pm.default_vddci = rdev->pm.power_state[state_index].clock_info[0].voltage.vddci; | ||
| 2246 | } else { | 2253 | } else { |
| 2247 | /* patch the table values with the default slck/mclk from firmware info */ | 2254 | /* patch the table values with the default slck/mclk from firmware info */ |
| 2248 | for (j = 0; j < mode_index; j++) { | 2255 | for (j = 0; j < mode_index; j++) { |
| @@ -2285,6 +2292,8 @@ static bool radeon_atombios_parse_pplib_clock_info(struct radeon_device *rdev, | |||
| 2285 | VOLTAGE_SW; | 2292 | VOLTAGE_SW; |
| 2286 | rdev->pm.power_state[state_index].clock_info[mode_index].voltage.voltage = | 2293 | rdev->pm.power_state[state_index].clock_info[mode_index].voltage.voltage = |
| 2287 | le16_to_cpu(clock_info->evergreen.usVDDC); | 2294 | le16_to_cpu(clock_info->evergreen.usVDDC); |
| 2295 | rdev->pm.power_state[state_index].clock_info[mode_index].voltage.vddci = | ||
| 2296 | le16_to_cpu(clock_info->evergreen.usVDDCI); | ||
| 2288 | } else { | 2297 | } else { |
| 2289 | sclk = le16_to_cpu(clock_info->r600.usEngineClockLow); | 2298 | sclk = le16_to_cpu(clock_info->r600.usEngineClockLow); |
| 2290 | sclk |= clock_info->r600.ucEngineClockHigh << 16; | 2299 | sclk |= clock_info->r600.ucEngineClockHigh << 16; |
| @@ -2576,25 +2585,25 @@ union set_voltage { | |||
| 2576 | struct _SET_VOLTAGE_PARAMETERS_V2 v2; | 2585 | struct _SET_VOLTAGE_PARAMETERS_V2 v2; |
| 2577 | }; | 2586 | }; |
| 2578 | 2587 | ||
| 2579 | void radeon_atom_set_voltage(struct radeon_device *rdev, u16 level) | 2588 | void radeon_atom_set_voltage(struct radeon_device *rdev, u16 voltage_level, u8 voltage_type) |
| 2580 | { | 2589 | { |
| 2581 | union set_voltage args; | 2590 | union set_voltage args; |
| 2582 | int index = GetIndexIntoMasterTable(COMMAND, SetVoltage); | 2591 | int index = GetIndexIntoMasterTable(COMMAND, SetVoltage); |
| 2583 | u8 frev, crev, volt_index = level; | 2592 | u8 frev, crev, volt_index = voltage_level; |
| 2584 | 2593 | ||
| 2585 | if (!atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev)) | 2594 | if (!atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev)) |
| 2586 | return; | 2595 | return; |
| 2587 | 2596 | ||
| 2588 | switch (crev) { | 2597 | switch (crev) { |
| 2589 | case 1: | 2598 | case 1: |
| 2590 | args.v1.ucVoltageType = SET_VOLTAGE_TYPE_ASIC_VDDC; | 2599 | args.v1.ucVoltageType = voltage_type; |
| 2591 | args.v1.ucVoltageMode = SET_ASIC_VOLTAGE_MODE_ALL_SOURCE; | 2600 | args.v1.ucVoltageMode = SET_ASIC_VOLTAGE_MODE_ALL_SOURCE; |
| 2592 | args.v1.ucVoltageIndex = volt_index; | 2601 | args.v1.ucVoltageIndex = volt_index; |
| 2593 | break; | 2602 | break; |
| 2594 | case 2: | 2603 | case 2: |
| 2595 | args.v2.ucVoltageType = SET_VOLTAGE_TYPE_ASIC_VDDC; | 2604 | args.v2.ucVoltageType = voltage_type; |
| 2596 | args.v2.ucVoltageMode = SET_ASIC_VOLTAGE_MODE_SET_VOLTAGE; | 2605 | args.v2.ucVoltageMode = SET_ASIC_VOLTAGE_MODE_SET_VOLTAGE; |
| 2597 | args.v2.usVoltageLevel = cpu_to_le16(level); | 2606 | args.v2.usVoltageLevel = cpu_to_le16(voltage_level); |
| 2598 | break; | 2607 | break; |
| 2599 | default: | 2608 | default: |
| 2600 | DRM_ERROR("Unknown table version %d, %d\n", frev, crev); | 2609 | DRM_ERROR("Unknown table version %d, %d\n", frev, crev); |
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c index cf602e2d0718..8caf546c8e92 100644 --- a/drivers/gpu/drm/radeon/radeon_combios.c +++ b/drivers/gpu/drm/radeon/radeon_combios.c | |||
| @@ -2079,6 +2079,19 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) | |||
| 2079 | DRM_MODE_CONNECTOR_DVII, &ddc_i2c, | 2079 | DRM_MODE_CONNECTOR_DVII, &ddc_i2c, |
| 2080 | CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I, | 2080 | CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I, |
| 2081 | &hpd); | 2081 | &hpd); |
| 2082 | /* TV - TV DAC */ | ||
| 2083 | ddc_i2c.valid = false; | ||
| 2084 | hpd.hpd = RADEON_HPD_NONE; | ||
| 2085 | radeon_add_legacy_encoder(dev, | ||
| 2086 | radeon_get_encoder_enum(dev, | ||
| 2087 | ATOM_DEVICE_TV1_SUPPORT, | ||
| 2088 | 2), | ||
| 2089 | ATOM_DEVICE_TV1_SUPPORT); | ||
| 2090 | radeon_add_legacy_connector(dev, 2, ATOM_DEVICE_TV1_SUPPORT, | ||
| 2091 | DRM_MODE_CONNECTOR_SVIDEO, | ||
| 2092 | &ddc_i2c, | ||
| 2093 | CONNECTOR_OBJECT_ID_SVIDEO, | ||
| 2094 | &hpd); | ||
| 2082 | break; | 2095 | break; |
| 2083 | default: | 2096 | default: |
| 2084 | DRM_INFO("Connector table: %d (invalid)\n", | 2097 | DRM_INFO("Connector table: %d (invalid)\n", |
diff --git a/drivers/gpu/drm/radeon/radeon_cp.c b/drivers/gpu/drm/radeon/radeon_cp.c index 3d599e33b9cc..75867792a4e2 100644 --- a/drivers/gpu/drm/radeon/radeon_cp.c +++ b/drivers/gpu/drm/radeon/radeon_cp.c | |||
| @@ -244,7 +244,7 @@ void radeon_write_agp_base(drm_radeon_private_t *dev_priv, u64 agp_base) | |||
| 244 | u32 agp_base_lo = agp_base & 0xffffffff; | 244 | u32 agp_base_lo = agp_base & 0xffffffff; |
| 245 | u32 r6xx_agp_base = (agp_base >> 22) & 0x3ffff; | 245 | u32 r6xx_agp_base = (agp_base >> 22) & 0x3ffff; |
| 246 | 246 | ||
| 247 | /* R6xx/R7xx must be aligned to a 4MB boundry */ | 247 | /* R6xx/R7xx must be aligned to a 4MB boundary */ |
| 248 | if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RV770) | 248 | if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RV770) |
| 249 | RADEON_WRITE(R700_MC_VM_AGP_BASE, r6xx_agp_base); | 249 | RADEON_WRITE(R700_MC_VM_AGP_BASE, r6xx_agp_base); |
| 250 | else if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) | 250 | else if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) |
diff --git a/drivers/gpu/drm/radeon/radeon_cursor.c b/drivers/gpu/drm/radeon/radeon_cursor.c index 017ac54920fb..bdf2fa1189ae 100644 --- a/drivers/gpu/drm/radeon/radeon_cursor.c +++ b/drivers/gpu/drm/radeon/radeon_cursor.c | |||
| @@ -226,7 +226,7 @@ int radeon_crtc_cursor_move(struct drm_crtc *crtc, | |||
| 226 | y += crtc->y; | 226 | y += crtc->y; |
| 227 | DRM_DEBUG("x %d y %d c->x %d c->y %d\n", x, y, crtc->x, crtc->y); | 227 | DRM_DEBUG("x %d y %d c->x %d c->y %d\n", x, y, crtc->x, crtc->y); |
| 228 | 228 | ||
| 229 | /* avivo cursor image can't end on 128 pixel boundry or | 229 | /* avivo cursor image can't end on 128 pixel boundary or |
| 230 | * go past the end of the frame if both crtcs are enabled | 230 | * go past the end of the frame if both crtcs are enabled |
| 231 | */ | 231 | */ |
| 232 | list_for_each_entry(crtc_p, &crtc->dev->mode_config.crtc_list, head) { | 232 | list_for_each_entry(crtc_p, &crtc->dev->mode_config.crtc_list, head) { |
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index f0209be7a34b..890217e678d3 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c | |||
| @@ -262,7 +262,7 @@ int radeon_wb_init(struct radeon_device *rdev) | |||
| 262 | * Note: GTT start, end, size should be initialized before calling this | 262 | * Note: GTT start, end, size should be initialized before calling this |
| 263 | * function on AGP platform. | 263 | * function on AGP platform. |
| 264 | * | 264 | * |
| 265 | * Note: We don't explictly enforce VRAM start to be aligned on VRAM size, | 265 | * Note: We don't explicitly enforce VRAM start to be aligned on VRAM size, |
| 266 | * this shouldn't be a problem as we are using the PCI aperture as a reference. | 266 | * this shouldn't be a problem as we are using the PCI aperture as a reference. |
| 267 | * Otherwise this would be needed for rv280, all r3xx, and all r4xx, but | 267 | * Otherwise this would be needed for rv280, all r3xx, and all r4xx, but |
| 268 | * not IGP. | 268 | * not IGP. |
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index 4be58793dc17..bdbab5c43bdc 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c | |||
| @@ -1492,7 +1492,7 @@ bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc, | |||
| 1492 | * | 1492 | * |
| 1493 | * \return Flags, or'ed together as follows: | 1493 | * \return Flags, or'ed together as follows: |
| 1494 | * | 1494 | * |
| 1495 | * DRM_SCANOUTPOS_VALID = Query successfull. | 1495 | * DRM_SCANOUTPOS_VALID = Query successful. |
| 1496 | * DRM_SCANOUTPOS_INVBL = Inside vblank. | 1496 | * DRM_SCANOUTPOS_INVBL = Inside vblank. |
| 1497 | * DRM_SCANOUTPOS_ACCURATE = Returned position is accurate. A lack of | 1497 | * DRM_SCANOUTPOS_ACCURATE = Returned position is accurate. A lack of |
| 1498 | * this flag means that returned position may be offset by a constant but | 1498 | * this flag means that returned position may be offset by a constant but |
diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h index 5cba46b9779a..a1b59ca96d01 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.h +++ b/drivers/gpu/drm/radeon/radeon_drv.h | |||
| @@ -271,7 +271,7 @@ typedef struct drm_radeon_private { | |||
| 271 | 271 | ||
| 272 | int have_z_offset; | 272 | int have_z_offset; |
| 273 | 273 | ||
| 274 | /* starting from here on, data is preserved accross an open */ | 274 | /* starting from here on, data is preserved across an open */ |
| 275 | uint32_t flags; /* see radeon_chip_flags */ | 275 | uint32_t flags; /* see radeon_chip_flags */ |
| 276 | resource_size_t fb_aper_offset; | 276 | resource_size_t fb_aper_offset; |
| 277 | 277 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c index 9e59868d354e..bbcd1dd7bac0 100644 --- a/drivers/gpu/drm/radeon/radeon_fence.c +++ b/drivers/gpu/drm/radeon/radeon_fence.c | |||
| @@ -79,7 +79,7 @@ static bool radeon_fence_poll_locked(struct radeon_device *rdev) | |||
| 79 | scratch_index = R600_WB_EVENT_OFFSET + rdev->fence_drv.scratch_reg - rdev->scratch.reg_base; | 79 | scratch_index = R600_WB_EVENT_OFFSET + rdev->fence_drv.scratch_reg - rdev->scratch.reg_base; |
| 80 | else | 80 | else |
| 81 | scratch_index = RADEON_WB_SCRATCH_OFFSET + rdev->fence_drv.scratch_reg - rdev->scratch.reg_base; | 81 | scratch_index = RADEON_WB_SCRATCH_OFFSET + rdev->fence_drv.scratch_reg - rdev->scratch.reg_base; |
| 82 | seq = rdev->wb.wb[scratch_index/4]; | 82 | seq = le32_to_cpu(rdev->wb.wb[scratch_index/4]); |
| 83 | } else | 83 | } else |
| 84 | seq = RREG32(rdev->fence_drv.scratch_reg); | 84 | seq = RREG32(rdev->fence_drv.scratch_reg); |
| 85 | if (seq != rdev->fence_drv.last_seq) { | 85 | if (seq != rdev->fence_drv.last_seq) { |
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c index f0534ef2f331..8a955bbdb608 100644 --- a/drivers/gpu/drm/radeon/radeon_gart.c +++ b/drivers/gpu/drm/radeon/radeon_gart.c | |||
| @@ -285,4 +285,6 @@ void radeon_gart_fini(struct radeon_device *rdev) | |||
| 285 | rdev->gart.pages = NULL; | 285 | rdev->gart.pages = NULL; |
| 286 | rdev->gart.pages_addr = NULL; | 286 | rdev->gart.pages_addr = NULL; |
| 287 | rdev->gart.ttm_alloced = NULL; | 287 | rdev->gart.ttm_alloced = NULL; |
| 288 | |||
| 289 | radeon_dummy_page_fini(rdev); | ||
| 288 | } | 290 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c index ded2a45bc95c..ccbabf734a61 100644 --- a/drivers/gpu/drm/radeon/radeon_i2c.c +++ b/drivers/gpu/drm/radeon/radeon_i2c.c | |||
| @@ -1062,7 +1062,7 @@ void radeon_i2c_get_byte(struct radeon_i2c_chan *i2c_bus, | |||
| 1062 | *val = in_buf[0]; | 1062 | *val = in_buf[0]; |
| 1063 | DRM_DEBUG("val = 0x%02x\n", *val); | 1063 | DRM_DEBUG("val = 0x%02x\n", *val); |
| 1064 | } else { | 1064 | } else { |
| 1065 | DRM_ERROR("i2c 0x%02x 0x%02x read failed\n", | 1065 | DRM_DEBUG("i2c 0x%02x 0x%02x read failed\n", |
| 1066 | addr, *val); | 1066 | addr, *val); |
| 1067 | } | 1067 | } |
| 1068 | } | 1068 | } |
| @@ -1084,7 +1084,7 @@ void radeon_i2c_put_byte(struct radeon_i2c_chan *i2c_bus, | |||
| 1084 | out_buf[1] = val; | 1084 | out_buf[1] = val; |
| 1085 | 1085 | ||
| 1086 | if (i2c_transfer(&i2c_bus->adapter, &msg, 1) != 1) | 1086 | if (i2c_transfer(&i2c_bus->adapter, &msg, 1) != 1) |
| 1087 | DRM_ERROR("i2c 0x%02x 0x%02x write failed\n", | 1087 | DRM_DEBUG("i2c 0x%02x 0x%02x write failed\n", |
| 1088 | addr, val); | 1088 | addr, val); |
| 1089 | } | 1089 | } |
| 1090 | 1090 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c index 5b54268ed6b2..2f46e0c8df53 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c | |||
| @@ -269,7 +269,7 @@ static const struct drm_encoder_helper_funcs radeon_legacy_lvds_helper_funcs = { | |||
| 269 | .disable = radeon_legacy_encoder_disable, | 269 | .disable = radeon_legacy_encoder_disable, |
| 270 | }; | 270 | }; |
| 271 | 271 | ||
| 272 | #ifdef CONFIG_BACKLIGHT_CLASS_DEVICE | 272 | #if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE) |
| 273 | 273 | ||
| 274 | #define MAX_RADEON_LEVEL 0xFF | 274 | #define MAX_RADEON_LEVEL 0xFF |
| 275 | 275 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_object.h b/drivers/gpu/drm/radeon/radeon_object.h index 7f8e778dba46..ede6c13628f2 100644 --- a/drivers/gpu/drm/radeon/radeon_object.h +++ b/drivers/gpu/drm/radeon/radeon_object.h | |||
| @@ -87,7 +87,7 @@ static inline void radeon_bo_unreserve(struct radeon_bo *bo) | |||
| 87 | * Returns current GPU offset of the object. | 87 | * Returns current GPU offset of the object. |
| 88 | * | 88 | * |
| 89 | * Note: object should either be pinned or reserved when calling this | 89 | * Note: object should either be pinned or reserved when calling this |
| 90 | * function, it might be usefull to add check for this for debugging. | 90 | * function, it might be useful to add check for this for debugging. |
| 91 | */ | 91 | */ |
| 92 | static inline u64 radeon_bo_gpu_offset(struct radeon_bo *bo) | 92 | static inline u64 radeon_bo_gpu_offset(struct radeon_bo *bo) |
| 93 | { | 93 | { |
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index 08de669e025a..86eda1ea94df 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include "drmP.h" | 23 | #include "drmP.h" |
| 24 | #include "radeon.h" | 24 | #include "radeon.h" |
| 25 | #include "avivod.h" | 25 | #include "avivod.h" |
| 26 | #include "atom.h" | ||
| 26 | #ifdef CONFIG_ACPI | 27 | #ifdef CONFIG_ACPI |
| 27 | #include <linux/acpi.h> | 28 | #include <linux/acpi.h> |
| 28 | #endif | 29 | #endif |
| @@ -535,7 +536,11 @@ void radeon_pm_resume(struct radeon_device *rdev) | |||
| 535 | /* set up the default clocks if the MC ucode is loaded */ | 536 | /* set up the default clocks if the MC ucode is loaded */ |
| 536 | if (ASIC_IS_DCE5(rdev) && rdev->mc_fw) { | 537 | if (ASIC_IS_DCE5(rdev) && rdev->mc_fw) { |
| 537 | if (rdev->pm.default_vddc) | 538 | if (rdev->pm.default_vddc) |
| 538 | radeon_atom_set_voltage(rdev, rdev->pm.default_vddc); | 539 | radeon_atom_set_voltage(rdev, rdev->pm.default_vddc, |
| 540 | SET_VOLTAGE_TYPE_ASIC_VDDC); | ||
| 541 | if (rdev->pm.default_vddci) | ||
| 542 | radeon_atom_set_voltage(rdev, rdev->pm.default_vddci, | ||
| 543 | SET_VOLTAGE_TYPE_ASIC_VDDCI); | ||
| 539 | if (rdev->pm.default_sclk) | 544 | if (rdev->pm.default_sclk) |
| 540 | radeon_set_engine_clock(rdev, rdev->pm.default_sclk); | 545 | radeon_set_engine_clock(rdev, rdev->pm.default_sclk); |
| 541 | if (rdev->pm.default_mclk) | 546 | if (rdev->pm.default_mclk) |
| @@ -548,6 +553,7 @@ void radeon_pm_resume(struct radeon_device *rdev) | |||
| 548 | rdev->pm.current_sclk = rdev->pm.default_sclk; | 553 | rdev->pm.current_sclk = rdev->pm.default_sclk; |
| 549 | rdev->pm.current_mclk = rdev->pm.default_mclk; | 554 | rdev->pm.current_mclk = rdev->pm.default_mclk; |
| 550 | rdev->pm.current_vddc = rdev->pm.power_state[rdev->pm.default_power_state_index].clock_info[0].voltage.voltage; | 555 | rdev->pm.current_vddc = rdev->pm.power_state[rdev->pm.default_power_state_index].clock_info[0].voltage.voltage; |
| 556 | rdev->pm.current_vddci = rdev->pm.power_state[rdev->pm.default_power_state_index].clock_info[0].voltage.vddci; | ||
| 551 | if (rdev->pm.pm_method == PM_METHOD_DYNPM | 557 | if (rdev->pm.pm_method == PM_METHOD_DYNPM |
| 552 | && rdev->pm.dynpm_state == DYNPM_STATE_SUSPENDED) { | 558 | && rdev->pm.dynpm_state == DYNPM_STATE_SUSPENDED) { |
| 553 | rdev->pm.dynpm_state = DYNPM_STATE_ACTIVE; | 559 | rdev->pm.dynpm_state = DYNPM_STATE_ACTIVE; |
| @@ -585,7 +591,8 @@ int radeon_pm_init(struct radeon_device *rdev) | |||
| 585 | /* set up the default clocks if the MC ucode is loaded */ | 591 | /* set up the default clocks if the MC ucode is loaded */ |
| 586 | if (ASIC_IS_DCE5(rdev) && rdev->mc_fw) { | 592 | if (ASIC_IS_DCE5(rdev) && rdev->mc_fw) { |
| 587 | if (rdev->pm.default_vddc) | 593 | if (rdev->pm.default_vddc) |
| 588 | radeon_atom_set_voltage(rdev, rdev->pm.default_vddc); | 594 | radeon_atom_set_voltage(rdev, rdev->pm.default_vddc, |
| 595 | SET_VOLTAGE_TYPE_ASIC_VDDC); | ||
| 589 | if (rdev->pm.default_sclk) | 596 | if (rdev->pm.default_sclk) |
| 590 | radeon_set_engine_clock(rdev, rdev->pm.default_sclk); | 597 | radeon_set_engine_clock(rdev, rdev->pm.default_sclk); |
| 591 | if (rdev->pm.default_mclk) | 598 | if (rdev->pm.default_mclk) |
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c index bbc9cd823334..c6776e48fdde 100644 --- a/drivers/gpu/drm/radeon/radeon_ring.c +++ b/drivers/gpu/drm/radeon/radeon_ring.c | |||
| @@ -248,7 +248,7 @@ void radeon_ib_pool_fini(struct radeon_device *rdev) | |||
| 248 | void radeon_ring_free_size(struct radeon_device *rdev) | 248 | void radeon_ring_free_size(struct radeon_device *rdev) |
| 249 | { | 249 | { |
| 250 | if (rdev->wb.enabled) | 250 | if (rdev->wb.enabled) |
| 251 | rdev->cp.rptr = rdev->wb.wb[RADEON_WB_CP_RPTR_OFFSET/4]; | 251 | rdev->cp.rptr = le32_to_cpu(rdev->wb.wb[RADEON_WB_CP_RPTR_OFFSET/4]); |
| 252 | else { | 252 | else { |
| 253 | if (rdev->family >= CHIP_R600) | 253 | if (rdev->family >= CHIP_R600) |
| 254 | rdev->cp.rptr = RREG32(R600_CP_RB_RPTR); | 254 | rdev->cp.rptr = RREG32(R600_CP_RB_RPTR); |
diff --git a/drivers/gpu/drm/radeon/radeon_state.c b/drivers/gpu/drm/radeon/radeon_state.c index 4ae5a3d1074e..92e7ea73b7c5 100644 --- a/drivers/gpu/drm/radeon/radeon_state.c +++ b/drivers/gpu/drm/radeon/radeon_state.c | |||
| @@ -980,7 +980,7 @@ static void radeon_cp_dispatch_clear(struct drm_device * dev, | |||
| 980 | } | 980 | } |
| 981 | 981 | ||
| 982 | /* hyper z clear */ | 982 | /* hyper z clear */ |
| 983 | /* no docs available, based on reverse engeneering by Stephane Marchesin */ | 983 | /* no docs available, based on reverse engineering by Stephane Marchesin */ |
| 984 | if ((flags & (RADEON_DEPTH | RADEON_STENCIL)) | 984 | if ((flags & (RADEON_DEPTH | RADEON_STENCIL)) |
| 985 | && (flags & RADEON_CLEAR_FASTZ)) { | 985 | && (flags & RADEON_CLEAR_FASTZ)) { |
| 986 | 986 | ||
diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c index 19763f5df5e1..6e3b11e5abbe 100644 --- a/drivers/gpu/drm/radeon/rs600.c +++ b/drivers/gpu/drm/radeon/rs600.c | |||
| @@ -48,17 +48,6 @@ int rs600_mc_wait_for_idle(struct radeon_device *rdev); | |||
| 48 | 48 | ||
| 49 | void rs600_pre_page_flip(struct radeon_device *rdev, int crtc) | 49 | void rs600_pre_page_flip(struct radeon_device *rdev, int crtc) |
| 50 | { | 50 | { |
| 51 | struct radeon_crtc *radeon_crtc = rdev->mode_info.crtcs[crtc]; | ||
| 52 | u32 tmp; | ||
| 53 | |||
| 54 | /* make sure flip is at vb rather than hb */ | ||
| 55 | tmp = RREG32(AVIVO_D1GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset); | ||
| 56 | tmp &= ~AVIVO_D1GRPH_SURFACE_UPDATE_H_RETRACE_EN; | ||
| 57 | WREG32(AVIVO_D1GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset, tmp); | ||
| 58 | |||
| 59 | /* set pageflip to happen anywhere in vblank interval */ | ||
| 60 | WREG32(AVIVO_D1MODE_MASTER_UPDATE_MODE + radeon_crtc->crtc_offset, 0); | ||
| 61 | |||
| 62 | /* enable the pflip int */ | 51 | /* enable the pflip int */ |
| 63 | radeon_irq_kms_pflip_irq_get(rdev, crtc); | 52 | radeon_irq_kms_pflip_irq_get(rdev, crtc); |
| 64 | } | 53 | } |
| @@ -125,7 +114,7 @@ void rs600_pm_misc(struct radeon_device *rdev) | |||
| 125 | udelay(voltage->delay); | 114 | udelay(voltage->delay); |
| 126 | } | 115 | } |
| 127 | } else if (voltage->type == VOLTAGE_VDDC) | 116 | } else if (voltage->type == VOLTAGE_VDDC) |
| 128 | radeon_atom_set_voltage(rdev, voltage->vddc_id); | 117 | radeon_atom_set_voltage(rdev, voltage->vddc_id, SET_VOLTAGE_TYPE_ASIC_VDDC); |
| 129 | 118 | ||
| 130 | dyn_pwrmgt_sclk_length = RREG32_PLL(DYN_PWRMGT_SCLK_LENGTH); | 119 | dyn_pwrmgt_sclk_length = RREG32_PLL(DYN_PWRMGT_SCLK_LENGTH); |
| 131 | dyn_pwrmgt_sclk_length &= ~REDUCED_POWER_SCLK_HILEN(0xf); | 120 | dyn_pwrmgt_sclk_length &= ~REDUCED_POWER_SCLK_HILEN(0xf); |
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c index b974ac7df8df..ef8a5babe9f7 100644 --- a/drivers/gpu/drm/radeon/rv770.c +++ b/drivers/gpu/drm/radeon/rv770.c | |||
| @@ -106,7 +106,7 @@ void rv770_pm_misc(struct radeon_device *rdev) | |||
| 106 | 106 | ||
| 107 | if ((voltage->type == VOLTAGE_SW) && voltage->voltage) { | 107 | if ((voltage->type == VOLTAGE_SW) && voltage->voltage) { |
| 108 | if (voltage->voltage != rdev->pm.current_vddc) { | 108 | if (voltage->voltage != rdev->pm.current_vddc) { |
| 109 | radeon_atom_set_voltage(rdev, voltage->voltage); | 109 | radeon_atom_set_voltage(rdev, voltage->voltage, SET_VOLTAGE_TYPE_ASIC_VDDC); |
| 110 | rdev->pm.current_vddc = voltage->voltage; | 110 | rdev->pm.current_vddc = voltage->voltage; |
| 111 | DRM_DEBUG("Setting: v: %d\n", voltage->voltage); | 111 | DRM_DEBUG("Setting: v: %d\n", voltage->voltage); |
| 112 | } | 112 | } |
| @@ -1255,9 +1255,6 @@ int rv770_init(struct radeon_device *rdev) | |||
| 1255 | { | 1255 | { |
| 1256 | int r; | 1256 | int r; |
| 1257 | 1257 | ||
| 1258 | r = radeon_dummy_page_init(rdev); | ||
| 1259 | if (r) | ||
| 1260 | return r; | ||
| 1261 | /* This don't do much */ | 1258 | /* This don't do much */ |
| 1262 | r = radeon_gem_init(rdev); | 1259 | r = radeon_gem_init(rdev); |
| 1263 | if (r) | 1260 | if (r) |
| @@ -1372,7 +1369,6 @@ void rv770_fini(struct radeon_device *rdev) | |||
| 1372 | radeon_atombios_fini(rdev); | 1369 | radeon_atombios_fini(rdev); |
| 1373 | kfree(rdev->bios); | 1370 | kfree(rdev->bios); |
| 1374 | rdev->bios = NULL; | 1371 | rdev->bios = NULL; |
| 1375 | radeon_dummy_page_fini(rdev); | ||
| 1376 | } | 1372 | } |
| 1377 | 1373 | ||
| 1378 | static void rv770_pcie_gen2_enable(struct radeon_device *rdev) | 1374 | static void rv770_pcie_gen2_enable(struct radeon_device *rdev) |
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 0b6a55ac2f87..2e618b5ac465 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c | |||
| @@ -1168,7 +1168,7 @@ int ttm_bo_init(struct ttm_bo_device *bdev, | |||
| 1168 | uint32_t page_alignment, | 1168 | uint32_t page_alignment, |
| 1169 | unsigned long buffer_start, | 1169 | unsigned long buffer_start, |
| 1170 | bool interruptible, | 1170 | bool interruptible, |
| 1171 | struct file *persistant_swap_storage, | 1171 | struct file *persistent_swap_storage, |
| 1172 | size_t acc_size, | 1172 | size_t acc_size, |
| 1173 | void (*destroy) (struct ttm_buffer_object *)) | 1173 | void (*destroy) (struct ttm_buffer_object *)) |
| 1174 | { | 1174 | { |
| @@ -1211,7 +1211,7 @@ int ttm_bo_init(struct ttm_bo_device *bdev, | |||
| 1211 | bo->priv_flags = 0; | 1211 | bo->priv_flags = 0; |
| 1212 | bo->mem.placement = (TTM_PL_FLAG_SYSTEM | TTM_PL_FLAG_CACHED); | 1212 | bo->mem.placement = (TTM_PL_FLAG_SYSTEM | TTM_PL_FLAG_CACHED); |
| 1213 | bo->seq_valid = false; | 1213 | bo->seq_valid = false; |
| 1214 | bo->persistant_swap_storage = persistant_swap_storage; | 1214 | bo->persistent_swap_storage = persistent_swap_storage; |
| 1215 | bo->acc_size = acc_size; | 1215 | bo->acc_size = acc_size; |
| 1216 | atomic_inc(&bo->glob->bo_count); | 1216 | atomic_inc(&bo->glob->bo_count); |
| 1217 | 1217 | ||
| @@ -1260,7 +1260,7 @@ int ttm_bo_create(struct ttm_bo_device *bdev, | |||
| 1260 | uint32_t page_alignment, | 1260 | uint32_t page_alignment, |
| 1261 | unsigned long buffer_start, | 1261 | unsigned long buffer_start, |
| 1262 | bool interruptible, | 1262 | bool interruptible, |
| 1263 | struct file *persistant_swap_storage, | 1263 | struct file *persistent_swap_storage, |
| 1264 | struct ttm_buffer_object **p_bo) | 1264 | struct ttm_buffer_object **p_bo) |
| 1265 | { | 1265 | { |
| 1266 | struct ttm_buffer_object *bo; | 1266 | struct ttm_buffer_object *bo; |
| @@ -1282,7 +1282,7 @@ int ttm_bo_create(struct ttm_bo_device *bdev, | |||
| 1282 | 1282 | ||
| 1283 | ret = ttm_bo_init(bdev, bo, size, type, placement, page_alignment, | 1283 | ret = ttm_bo_init(bdev, bo, size, type, placement, page_alignment, |
| 1284 | buffer_start, interruptible, | 1284 | buffer_start, interruptible, |
| 1285 | persistant_swap_storage, acc_size, NULL); | 1285 | persistent_swap_storage, acc_size, NULL); |
| 1286 | if (likely(ret == 0)) | 1286 | if (likely(ret == 0)) |
| 1287 | *p_bo = bo; | 1287 | *p_bo = bo; |
| 1288 | 1288 | ||
| @@ -1863,7 +1863,7 @@ static int ttm_bo_swapout(struct ttm_mem_shrink *shrink) | |||
| 1863 | if (bo->bdev->driver->swap_notify) | 1863 | if (bo->bdev->driver->swap_notify) |
| 1864 | bo->bdev->driver->swap_notify(bo); | 1864 | bo->bdev->driver->swap_notify(bo); |
| 1865 | 1865 | ||
| 1866 | ret = ttm_tt_swapout(bo->ttm, bo->persistant_swap_storage); | 1866 | ret = ttm_tt_swapout(bo->ttm, bo->persistent_swap_storage); |
| 1867 | out: | 1867 | out: |
| 1868 | 1868 | ||
| 1869 | /** | 1869 | /** |
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 737a2a2e46a5..9d9d92945f8c 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c | |||
| @@ -683,22 +683,14 @@ int ttm_get_pages(struct list_head *pages, int flags, | |||
| 683 | gfp_flags |= GFP_HIGHUSER; | 683 | gfp_flags |= GFP_HIGHUSER; |
| 684 | 684 | ||
| 685 | for (r = 0; r < count; ++r) { | 685 | for (r = 0; r < count; ++r) { |
| 686 | if ((flags & TTM_PAGE_FLAG_DMA32) && dma_address) { | 686 | p = alloc_page(gfp_flags); |
| 687 | void *addr; | ||
| 688 | addr = dma_alloc_coherent(NULL, PAGE_SIZE, | ||
| 689 | &dma_address[r], | ||
| 690 | gfp_flags); | ||
| 691 | if (addr == NULL) | ||
| 692 | return -ENOMEM; | ||
| 693 | p = virt_to_page(addr); | ||
| 694 | } else | ||
| 695 | p = alloc_page(gfp_flags); | ||
| 696 | if (!p) { | 687 | if (!p) { |
| 697 | 688 | ||
| 698 | printk(KERN_ERR TTM_PFX | 689 | printk(KERN_ERR TTM_PFX |
| 699 | "Unable to allocate page."); | 690 | "Unable to allocate page."); |
| 700 | return -ENOMEM; | 691 | return -ENOMEM; |
| 701 | } | 692 | } |
| 693 | |||
| 702 | list_add(&p->lru, pages); | 694 | list_add(&p->lru, pages); |
| 703 | } | 695 | } |
| 704 | return 0; | 696 | return 0; |
| @@ -746,24 +738,12 @@ void ttm_put_pages(struct list_head *pages, unsigned page_count, int flags, | |||
| 746 | unsigned long irq_flags; | 738 | unsigned long irq_flags; |
| 747 | struct ttm_page_pool *pool = ttm_get_pool(flags, cstate); | 739 | struct ttm_page_pool *pool = ttm_get_pool(flags, cstate); |
| 748 | struct page *p, *tmp; | 740 | struct page *p, *tmp; |
| 749 | unsigned r; | ||
| 750 | 741 | ||
| 751 | if (pool == NULL) { | 742 | if (pool == NULL) { |
| 752 | /* No pool for this memory type so free the pages */ | 743 | /* No pool for this memory type so free the pages */ |
| 753 | 744 | ||
| 754 | r = page_count-1; | ||
| 755 | list_for_each_entry_safe(p, tmp, pages, lru) { | 745 | list_for_each_entry_safe(p, tmp, pages, lru) { |
| 756 | if ((flags & TTM_PAGE_FLAG_DMA32) && dma_address) { | 746 | __free_page(p); |
| 757 | void *addr = page_address(p); | ||
| 758 | WARN_ON(!addr || !dma_address[r]); | ||
| 759 | if (addr) | ||
| 760 | dma_free_coherent(NULL, PAGE_SIZE, | ||
| 761 | addr, | ||
| 762 | dma_address[r]); | ||
| 763 | dma_address[r] = 0; | ||
| 764 | } else | ||
| 765 | __free_page(p); | ||
| 766 | r--; | ||
| 767 | } | 747 | } |
| 768 | /* Make the pages list empty */ | 748 | /* Make the pages list empty */ |
| 769 | INIT_LIST_HEAD(pages); | 749 | INIT_LIST_HEAD(pages); |
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index 86d5b1745a45..90e23e0bfadb 100644 --- a/drivers/gpu/drm/ttm/ttm_tt.c +++ b/drivers/gpu/drm/ttm/ttm_tt.c | |||
| @@ -332,7 +332,7 @@ void ttm_tt_destroy(struct ttm_tt *ttm) | |||
| 332 | ttm_tt_free_page_directory(ttm); | 332 | ttm_tt_free_page_directory(ttm); |
| 333 | } | 333 | } |
| 334 | 334 | ||
| 335 | if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTANT_SWAP) && | 335 | if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTENT_SWAP) && |
| 336 | ttm->swap_storage) | 336 | ttm->swap_storage) |
| 337 | fput(ttm->swap_storage); | 337 | fput(ttm->swap_storage); |
| 338 | 338 | ||
| @@ -503,7 +503,7 @@ static int ttm_tt_swapin(struct ttm_tt *ttm) | |||
| 503 | page_cache_release(from_page); | 503 | page_cache_release(from_page); |
| 504 | } | 504 | } |
| 505 | 505 | ||
| 506 | if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTANT_SWAP)) | 506 | if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTENT_SWAP)) |
| 507 | fput(swap_storage); | 507 | fput(swap_storage); |
| 508 | ttm->swap_storage = NULL; | 508 | ttm->swap_storage = NULL; |
| 509 | ttm->page_flags &= ~TTM_PAGE_FLAG_SWAPPED; | 509 | ttm->page_flags &= ~TTM_PAGE_FLAG_SWAPPED; |
| @@ -514,7 +514,7 @@ out_err: | |||
| 514 | return ret; | 514 | return ret; |
| 515 | } | 515 | } |
| 516 | 516 | ||
| 517 | int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistant_swap_storage) | 517 | int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage) |
| 518 | { | 518 | { |
| 519 | struct address_space *swap_space; | 519 | struct address_space *swap_space; |
| 520 | struct file *swap_storage; | 520 | struct file *swap_storage; |
| @@ -540,7 +540,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistant_swap_storage) | |||
| 540 | return 0; | 540 | return 0; |
| 541 | } | 541 | } |
| 542 | 542 | ||
| 543 | if (!persistant_swap_storage) { | 543 | if (!persistent_swap_storage) { |
| 544 | swap_storage = shmem_file_setup("ttm swap", | 544 | swap_storage = shmem_file_setup("ttm swap", |
| 545 | ttm->num_pages << PAGE_SHIFT, | 545 | ttm->num_pages << PAGE_SHIFT, |
| 546 | 0); | 546 | 0); |
| @@ -549,7 +549,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistant_swap_storage) | |||
| 549 | return PTR_ERR(swap_storage); | 549 | return PTR_ERR(swap_storage); |
| 550 | } | 550 | } |
| 551 | } else | 551 | } else |
| 552 | swap_storage = persistant_swap_storage; | 552 | swap_storage = persistent_swap_storage; |
| 553 | 553 | ||
| 554 | swap_space = swap_storage->f_path.dentry->d_inode->i_mapping; | 554 | swap_space = swap_storage->f_path.dentry->d_inode->i_mapping; |
| 555 | 555 | ||
| @@ -577,12 +577,12 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistant_swap_storage) | |||
| 577 | ttm_tt_free_alloced_pages(ttm); | 577 | ttm_tt_free_alloced_pages(ttm); |
| 578 | ttm->swap_storage = swap_storage; | 578 | ttm->swap_storage = swap_storage; |
| 579 | ttm->page_flags |= TTM_PAGE_FLAG_SWAPPED; | 579 | ttm->page_flags |= TTM_PAGE_FLAG_SWAPPED; |
| 580 | if (persistant_swap_storage) | 580 | if (persistent_swap_storage) |
| 581 | ttm->page_flags |= TTM_PAGE_FLAG_PERSISTANT_SWAP; | 581 | ttm->page_flags |= TTM_PAGE_FLAG_PERSISTENT_SWAP; |
| 582 | 582 | ||
| 583 | return 0; | 583 | return 0; |
| 584 | out_err: | 584 | out_err: |
| 585 | if (!persistant_swap_storage) | 585 | if (!persistent_swap_storage) |
| 586 | fput(swap_storage); | 586 | fput(swap_storage); |
| 587 | 587 | ||
| 588 | return ret; | 588 | return ret; |
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index cceeb42789b6..dfe32e62bd90 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | |||
| @@ -245,7 +245,7 @@ void vmw_kms_cursor_snoop(struct vmw_surface *srf, | |||
| 245 | /* TODO handle none page aligned offsets */ | 245 | /* TODO handle none page aligned offsets */ |
| 246 | /* TODO handle partial uploads and pitch != 256 */ | 246 | /* TODO handle partial uploads and pitch != 256 */ |
| 247 | /* TODO handle more then one copy (size != 64) */ | 247 | /* TODO handle more then one copy (size != 64) */ |
| 248 | DRM_ERROR("lazy programer, cant handle wierd stuff\n"); | 248 | DRM_ERROR("lazy programmer, can't handle weird stuff\n"); |
| 249 | return; | 249 | return; |
| 250 | } | 250 | } |
| 251 | 251 | ||
diff --git a/drivers/gpu/stub/Kconfig b/drivers/gpu/stub/Kconfig index 70e60a4bb678..419917955bf6 100644 --- a/drivers/gpu/stub/Kconfig +++ b/drivers/gpu/stub/Kconfig | |||
| @@ -5,6 +5,7 @@ config STUB_POULSBO | |||
| 5 | # Poulsbo stub depends on ACPI_VIDEO when ACPI is enabled | 5 | # Poulsbo stub depends on ACPI_VIDEO when ACPI is enabled |
| 6 | # but for select to work, need to select ACPI_VIDEO's dependencies, ick | 6 | # but for select to work, need to select ACPI_VIDEO's dependencies, ick |
| 7 | select BACKLIGHT_CLASS_DEVICE if ACPI | 7 | select BACKLIGHT_CLASS_DEVICE if ACPI |
| 8 | select VIDEO_OUTPUT_CONTROL if ACPI | ||
| 8 | select INPUT if ACPI | 9 | select INPUT if ACPI |
| 9 | select ACPI_VIDEO if ACPI | 10 | select ACPI_VIDEO if ACPI |
| 10 | select THERMAL if ACPI | 11 | select THERMAL if ACPI |
diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c index ace2b1623b21..be8d4cb5861c 100644 --- a/drivers/gpu/vga/vgaarb.c +++ b/drivers/gpu/vga/vgaarb.c | |||
| @@ -151,7 +151,7 @@ static inline void vga_irq_set_state(struct vga_device *vgadev, bool state) | |||
| 151 | static void vga_check_first_use(void) | 151 | static void vga_check_first_use(void) |
| 152 | { | 152 | { |
| 153 | /* we should inform all GPUs in the system that | 153 | /* we should inform all GPUs in the system that |
| 154 | * VGA arb has occured and to try and disable resources | 154 | * VGA arb has occurred and to try and disable resources |
| 155 | * if they can */ | 155 | * if they can */ |
| 156 | if (!vga_arbiter_used) { | 156 | if (!vga_arbiter_used) { |
| 157 | vga_arbiter_used = true; | 157 | vga_arbiter_used = true; |
| @@ -774,7 +774,7 @@ static ssize_t vga_arb_read(struct file *file, char __user * buf, | |||
| 774 | */ | 774 | */ |
| 775 | spin_lock_irqsave(&vga_lock, flags); | 775 | spin_lock_irqsave(&vga_lock, flags); |
| 776 | 776 | ||
| 777 | /* If we are targetting the default, use it */ | 777 | /* If we are targeting the default, use it */ |
| 778 | pdev = priv->target; | 778 | pdev = priv->target; |
| 779 | if (pdev == NULL || pdev == PCI_INVALID_CARD) { | 779 | if (pdev == NULL || pdev == PCI_INVALID_CARD) { |
| 780 | spin_unlock_irqrestore(&vga_lock, flags); | 780 | spin_unlock_irqrestore(&vga_lock, flags); |
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index b7ec4057841d..9de9e97149ec 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig | |||
| @@ -185,7 +185,7 @@ config HID_EZKEY | |||
| 185 | Support for Ezkey BTC 8193 keyboard. | 185 | Support for Ezkey BTC 8193 keyboard. |
| 186 | 186 | ||
| 187 | config HID_KEYTOUCH | 187 | config HID_KEYTOUCH |
| 188 | tristate "Keyoutch HID devices" | 188 | tristate "Keytouch HID devices" |
| 189 | depends on USB_HID | 189 | depends on USB_HID |
| 190 | ---help--- | 190 | ---help--- |
| 191 | Support for Keytouch HID devices not fully compliant with | 191 | Support for Keytouch HID devices not fully compliant with |
| @@ -340,10 +340,17 @@ config HID_NTRIG | |||
| 340 | Support for N-Trig touch screen. | 340 | Support for N-Trig touch screen. |
| 341 | 341 | ||
| 342 | config HID_ORTEK | 342 | config HID_ORTEK |
| 343 | tristate "Ortek PKB-1700/WKB-2000 wireless keyboard and mouse trackpad" | 343 | tristate "Ortek PKB-1700/WKB-2000/Skycable wireless keyboard and mouse trackpad" |
| 344 | depends on USB_HID | 344 | depends on USB_HID |
| 345 | ---help--- | 345 | ---help--- |
| 346 | Support for Ortek PKB-1700/WKB-2000 wireless keyboard + mouse trackpad. | 346 | There are certain devices which have LogicalMaximum wrong in the keyboard |
| 347 | usage page of their report descriptor. The most prevailing ones so far | ||
| 348 | are manufactured by Ortek, thus the name of the driver. Currently | ||
| 349 | supported devices by this driver are | ||
| 350 | |||
| 351 | - Ortek PKB-1700 | ||
| 352 | - Ortek WKB-2000 | ||
| 353 | - Skycable wireless presenter | ||
| 347 | 354 | ||
| 348 | config HID_PANTHERLORD | 355 | config HID_PANTHERLORD |
| 349 | tristate "Pantherlord/GreenAsia game controller" | 356 | tristate "Pantherlord/GreenAsia game controller" |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index e9687768a335..408c4bea4d8d 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
| @@ -306,7 +306,7 @@ static int hid_parser_global(struct hid_parser *parser, struct hid_item *item) | |||
| 306 | case HID_GLOBAL_ITEM_TAG_PUSH: | 306 | case HID_GLOBAL_ITEM_TAG_PUSH: |
| 307 | 307 | ||
| 308 | if (parser->global_stack_ptr == HID_GLOBAL_STACK_SIZE) { | 308 | if (parser->global_stack_ptr == HID_GLOBAL_STACK_SIZE) { |
| 309 | dbg_hid("global enviroment stack overflow\n"); | 309 | dbg_hid("global environment stack overflow\n"); |
| 310 | return -1; | 310 | return -1; |
| 311 | } | 311 | } |
| 312 | 312 | ||
| @@ -317,7 +317,7 @@ static int hid_parser_global(struct hid_parser *parser, struct hid_item *item) | |||
| 317 | case HID_GLOBAL_ITEM_TAG_POP: | 317 | case HID_GLOBAL_ITEM_TAG_POP: |
| 318 | 318 | ||
| 319 | if (!parser->global_stack_ptr) { | 319 | if (!parser->global_stack_ptr) { |
| 320 | dbg_hid("global enviroment stack underflow\n"); | 320 | dbg_hid("global environment stack underflow\n"); |
| 321 | return -1; | 321 | return -1; |
| 322 | } | 322 | } |
| 323 | 323 | ||
| @@ -1449,8 +1449,10 @@ static const struct hid_device_id hid_have_special_driver[] = { | |||
| 1449 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONEPLUS) }, | 1449 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONEPLUS) }, |
| 1450 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KOVAPLUS) }, | 1450 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KOVAPLUS) }, |
| 1451 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRED) }, | 1451 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRED) }, |
| 1452 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRELESS) }, | ||
| 1452 | { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) }, | 1453 | { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) }, |
| 1453 | { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) }, | 1454 | { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) }, |
| 1455 | { HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) }, | ||
| 1454 | { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) }, | 1456 | { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) }, |
| 1455 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) }, | 1457 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) }, |
| 1456 | { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE) }, | 1458 | { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE) }, |
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c index 555382fc7417..bae48745bb42 100644 --- a/drivers/hid/hid-debug.c +++ b/drivers/hid/hid-debug.c | |||
| @@ -341,7 +341,7 @@ static const struct hid_usage_entry hid_usage_table[] = { | |||
| 341 | { 0x85, 0x83, "DesignCapacity" }, | 341 | { 0x85, 0x83, "DesignCapacity" }, |
| 342 | { 0x85, 0x85, "ManufacturerDate" }, | 342 | { 0x85, 0x85, "ManufacturerDate" }, |
| 343 | { 0x85, 0x89, "iDeviceChemistry" }, | 343 | { 0x85, 0x89, "iDeviceChemistry" }, |
| 344 | { 0x85, 0x8b, "Rechargable" }, | 344 | { 0x85, 0x8b, "Rechargeable" }, |
| 345 | { 0x85, 0x8f, "iOEMInformation" }, | 345 | { 0x85, 0x8f, "iOEMInformation" }, |
| 346 | { 0x85, 0x8d, "CapacityGranularity1" }, | 346 | { 0x85, 0x8d, "CapacityGranularity1" }, |
| 347 | { 0x85, 0xd0, "ACPresent" }, | 347 | { 0x85, 0xd0, "ACPresent" }, |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 65ac53d7aecc..00a94b535d28 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h | |||
| @@ -150,6 +150,7 @@ | |||
| 150 | #define USB_DEVICE_ID_CANDO_MULTI_TOUCH_15_6 0x0f01 | 150 | #define USB_DEVICE_ID_CANDO_MULTI_TOUCH_15_6 0x0f01 |
| 151 | 151 | ||
| 152 | #define USB_VENDOR_ID_CH 0x068e | 152 | #define USB_VENDOR_ID_CH 0x068e |
| 153 | #define USB_DEVICE_ID_CH_PRO_THROTTLE 0x00f1 | ||
| 153 | #define USB_DEVICE_ID_CH_PRO_PEDALS 0x00f2 | 154 | #define USB_DEVICE_ID_CH_PRO_PEDALS 0x00f2 |
| 154 | #define USB_DEVICE_ID_CH_COMBATSTICK 0x00f4 | 155 | #define USB_DEVICE_ID_CH_COMBATSTICK 0x00f4 |
| 155 | #define USB_DEVICE_ID_CH_FLIGHT_SIM_ECLIPSE_YOKE 0x0051 | 156 | #define USB_DEVICE_ID_CH_FLIGHT_SIM_ECLIPSE_YOKE 0x0051 |
| @@ -524,6 +525,9 @@ | |||
| 524 | #define USB_DEVICE_ID_SAMSUNG_IR_REMOTE 0x0001 | 525 | #define USB_DEVICE_ID_SAMSUNG_IR_REMOTE 0x0001 |
| 525 | #define USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE 0x0600 | 526 | #define USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE 0x0600 |
| 526 | 527 | ||
| 528 | #define USB_VENDOR_ID_SKYCABLE 0x1223 | ||
| 529 | #define USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER 0x3F07 | ||
| 530 | |||
| 527 | #define USB_VENDOR_ID_SONY 0x054c | 531 | #define USB_VENDOR_ID_SONY 0x054c |
| 528 | #define USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE 0x024b | 532 | #define USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE 0x024b |
| 529 | #define USB_DEVICE_ID_SONY_PS3_CONTROLLER 0x0268 | 533 | #define USB_DEVICE_ID_SONY_PS3_CONTROLLER 0x0268 |
diff --git a/drivers/hid/hid-lgff.c b/drivers/hid/hid-lgff.c index 90d0ef2c92be..f099079ca6b9 100644 --- a/drivers/hid/hid-lgff.c +++ b/drivers/hid/hid-lgff.c | |||
| @@ -73,6 +73,8 @@ static const struct dev_type devices[] = { | |||
| 73 | { 0x046d, 0xc293, ff_joystick }, | 73 | { 0x046d, 0xc293, ff_joystick }, |
| 74 | { 0x046d, 0xc294, ff_wheel }, | 74 | { 0x046d, 0xc294, ff_wheel }, |
| 75 | { 0x046d, 0xc295, ff_joystick }, | 75 | { 0x046d, 0xc295, ff_joystick }, |
| 76 | { 0x046d, 0xc298, ff_wheel }, | ||
| 77 | { 0x046d, 0xc299, ff_wheel }, | ||
| 76 | { 0x046d, 0xca03, ff_wheel }, | 78 | { 0x046d, 0xca03, ff_wheel }, |
| 77 | }; | 79 | }; |
| 78 | 80 | ||
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c index 318cc40df92d..0ec91c18a421 100644 --- a/drivers/hid/hid-magicmouse.c +++ b/drivers/hid/hid-magicmouse.c | |||
| @@ -76,7 +76,7 @@ MODULE_PARM_DESC(report_undeciphered, "Report undeciphered multi-touch state fie | |||
| 76 | * This is true when single_touch_id is equal to NO_TOUCHES. If multiple touches | 76 | * This is true when single_touch_id is equal to NO_TOUCHES. If multiple touches |
| 77 | * are down and the touch providing for single touch emulation is lifted, | 77 | * are down and the touch providing for single touch emulation is lifted, |
| 78 | * single_touch_id is equal to SINGLE_TOUCH_UP. While single touch emulation is | 78 | * single_touch_id is equal to SINGLE_TOUCH_UP. While single touch emulation is |
| 79 | * occuring, single_touch_id corresponds with the tracking id of the touch used. | 79 | * occurring, single_touch_id corresponds with the tracking id of the touch used. |
| 80 | */ | 80 | */ |
| 81 | #define NO_TOUCHES -1 | 81 | #define NO_TOUCHES -1 |
| 82 | #define SINGLE_TOUCH_UP -2 | 82 | #define SINGLE_TOUCH_UP -2 |
| @@ -418,6 +418,8 @@ static void magicmouse_setup_input(struct input_dev *input, struct hid_device *h | |||
| 418 | input_set_abs_params(input, ABS_MT_POSITION_Y, -2456, | 418 | input_set_abs_params(input, ABS_MT_POSITION_Y, -2456, |
| 419 | 2565, 4, 0); | 419 | 2565, 4, 0); |
| 420 | } | 420 | } |
| 421 | |||
| 422 | input_set_events_per_packet(input, 60); | ||
| 421 | } | 423 | } |
| 422 | 424 | ||
| 423 | if (report_undeciphered) { | 425 | if (report_undeciphered) { |
diff --git a/drivers/hid/hid-ortek.c b/drivers/hid/hid-ortek.c index f9b7dd4f607f..0ffa1d2d64f0 100644 --- a/drivers/hid/hid-ortek.c +++ b/drivers/hid/hid-ortek.c | |||
| @@ -1,8 +1,14 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * HID driver for Ortek PKB-1700/WKB-2000 (wireless keyboard + mouse trackpad). | 2 | * HID driver for various devices which are apparently based on the same chipset |
| 3 | * Fixes LogicalMaximum error in HID report description. | 3 | * from certain vendor which produces chips that contain wrong LogicalMaximum |
| 4 | * value in their HID report descriptor. Currently supported devices are: | ||
| 5 | * | ||
| 6 | * Ortek PKB-1700 | ||
| 7 | * Ortek WKB-2000 | ||
| 8 | * Skycable wireless presenter | ||
| 4 | * | 9 | * |
| 5 | * Copyright (c) 2010 Johnathon Harris <jmharris@gmail.com> | 10 | * Copyright (c) 2010 Johnathon Harris <jmharris@gmail.com> |
| 11 | * Copyright (c) 2011 Jiri Kosina | ||
| 6 | */ | 12 | */ |
| 7 | 13 | ||
| 8 | /* | 14 | /* |
| @@ -22,8 +28,11 @@ static __u8 *ortek_report_fixup(struct hid_device *hdev, __u8 *rdesc, | |||
| 22 | unsigned int *rsize) | 28 | unsigned int *rsize) |
| 23 | { | 29 | { |
| 24 | if (*rsize >= 56 && rdesc[54] == 0x25 && rdesc[55] == 0x01) { | 30 | if (*rsize >= 56 && rdesc[54] == 0x25 && rdesc[55] == 0x01) { |
| 25 | hid_info(hdev, "Fixing up Ortek WKB-2000 report descriptor\n"); | 31 | hid_info(hdev, "Fixing up logical minimum in report descriptor (Ortek)\n"); |
| 26 | rdesc[55] = 0x92; | 32 | rdesc[55] = 0x92; |
| 33 | } else if (*rsize >= 54 && rdesc[52] == 0x25 && rdesc[53] == 0x01) { | ||
| 34 | hid_info(hdev, "Fixing up logical minimum in report descriptor (Skycable)\n"); | ||
| 35 | rdesc[53] = 0x65; | ||
| 27 | } | 36 | } |
| 28 | return rdesc; | 37 | return rdesc; |
| 29 | } | 38 | } |
| @@ -31,6 +40,7 @@ static __u8 *ortek_report_fixup(struct hid_device *hdev, __u8 *rdesc, | |||
| 31 | static const struct hid_device_id ortek_devices[] = { | 40 | static const struct hid_device_id ortek_devices[] = { |
| 32 | { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) }, | 41 | { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) }, |
| 33 | { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) }, | 42 | { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) }, |
| 43 | { HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) }, | ||
| 34 | { } | 44 | { } |
| 35 | }; | 45 | }; |
| 36 | MODULE_DEVICE_TABLE(hid, ortek_devices); | 46 | MODULE_DEVICE_TABLE(hid, ortek_devices); |
diff --git a/drivers/hid/hid-picolcd.c b/drivers/hid/hid-picolcd.c index 657da5a3d5c6..b2f56a13bcf5 100644 --- a/drivers/hid/hid-picolcd.c +++ b/drivers/hid/hid-picolcd.c | |||
| @@ -1806,13 +1806,13 @@ static ssize_t picolcd_debug_flash_write(struct file *f, const char __user *u, | |||
| 1806 | /* | 1806 | /* |
| 1807 | * Notes: | 1807 | * Notes: |
| 1808 | * - concurrent writing is prevented by mutex and all writes must be | 1808 | * - concurrent writing is prevented by mutex and all writes must be |
| 1809 | * n*64 bytes and 64-byte aligned, each write being preceeded by an | 1809 | * n*64 bytes and 64-byte aligned, each write being preceded by an |
| 1810 | * ERASE which erases a 64byte block. | 1810 | * ERASE which erases a 64byte block. |
| 1811 | * If less than requested was written or an error is returned for an | 1811 | * If less than requested was written or an error is returned for an |
| 1812 | * otherwise correct write request the next 64-byte block which should | 1812 | * otherwise correct write request the next 64-byte block which should |
| 1813 | * have been written is in undefined state (mostly: original, erased, | 1813 | * have been written is in undefined state (mostly: original, erased, |
| 1814 | * (half-)written with write error) | 1814 | * (half-)written with write error) |
| 1815 | * - reading can happend without special restriction | 1815 | * - reading can happen without special restriction |
| 1816 | */ | 1816 | */ |
| 1817 | static const struct file_operations picolcd_debug_flash_fops = { | 1817 | static const struct file_operations picolcd_debug_flash_fops = { |
| 1818 | .owner = THIS_MODULE, | 1818 | .owner = THIS_MODULE, |
diff --git a/drivers/hid/hid-roccat-kone.h b/drivers/hid/hid-roccat-kone.h index 64abb5b8a59a..4109a028e138 100644 --- a/drivers/hid/hid-roccat-kone.h +++ b/drivers/hid/hid-roccat-kone.h | |||
| @@ -166,7 +166,7 @@ enum kone_mouse_events { | |||
| 166 | /* osd events are thought to be display on screen */ | 166 | /* osd events are thought to be display on screen */ |
| 167 | kone_mouse_event_osd_dpi = 0xa0, | 167 | kone_mouse_event_osd_dpi = 0xa0, |
| 168 | kone_mouse_event_osd_profile = 0xb0, | 168 | kone_mouse_event_osd_profile = 0xb0, |
| 169 | /* TODO clarify meaning and occurence of kone_mouse_event_calibration */ | 169 | /* TODO clarify meaning and occurrence of kone_mouse_event_calibration */ |
| 170 | kone_mouse_event_calibration = 0xc0, | 170 | kone_mouse_event_calibration = 0xc0, |
| 171 | kone_mouse_event_call_overlong_macro = 0xe0, | 171 | kone_mouse_event_call_overlong_macro = 0xe0, |
| 172 | /* switch events notify if user changed values with mousebutton click */ | 172 | /* switch events notify if user changed values with mousebutton click */ |
diff --git a/drivers/hid/hid-roccat-pyra.c b/drivers/hid/hid-roccat-pyra.c index 160f481344f6..38280c055a19 100644 --- a/drivers/hid/hid-roccat-pyra.c +++ b/drivers/hid/hid-roccat-pyra.c | |||
| @@ -652,7 +652,8 @@ static int pyra_raw_event(struct hid_device *hdev, struct hid_report *report, | |||
| 652 | static const struct hid_device_id pyra_devices[] = { | 652 | static const struct hid_device_id pyra_devices[] = { |
| 653 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, | 653 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, |
| 654 | USB_DEVICE_ID_ROCCAT_PYRA_WIRED) }, | 654 | USB_DEVICE_ID_ROCCAT_PYRA_WIRED) }, |
| 655 | /* TODO add USB_DEVICE_ID_ROCCAT_PYRA_WIRELESS after testing */ | 655 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, |
| 656 | USB_DEVICE_ID_ROCCAT_PYRA_WIRELESS) }, | ||
| 656 | { } | 657 | { } |
| 657 | }; | 658 | }; |
| 658 | 659 | ||
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index 9a94b643ccde..a8426f15e9ab 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c | |||
| @@ -59,6 +59,7 @@ static const struct hid_blacklist { | |||
| 59 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_COMBATSTICK, HID_QUIRK_NOGET }, | 59 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_COMBATSTICK, HID_QUIRK_NOGET }, |
| 60 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_ECLIPSE_YOKE, HID_QUIRK_NOGET }, | 60 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_ECLIPSE_YOKE, HID_QUIRK_NOGET }, |
| 61 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE, HID_QUIRK_NOGET }, | 61 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE, HID_QUIRK_NOGET }, |
| 62 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_PRO_THROTTLE, HID_QUIRK_NOGET }, | ||
| 62 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_PRO_PEDALS, HID_QUIRK_NOGET }, | 63 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_PRO_PEDALS, HID_QUIRK_NOGET }, |
| 63 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_3AXIS_5BUTTON_STICK, HID_QUIRK_NOGET }, | 64 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_3AXIS_5BUTTON_STICK, HID_QUIRK_NOGET }, |
| 64 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_AXIS_295, HID_QUIRK_NOGET }, | 65 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_AXIS_295, HID_QUIRK_NOGET }, |
diff --git a/drivers/hwmon/abituguru.c b/drivers/hwmon/abituguru.c index 0e05aa179eaa..e7d4c4687f02 100644 --- a/drivers/hwmon/abituguru.c +++ b/drivers/hwmon/abituguru.c | |||
| @@ -1422,7 +1422,7 @@ static int __init abituguru_detect(void) | |||
| 1422 | at DATA and 0xAC, when this driver has already been loaded once | 1422 | at DATA and 0xAC, when this driver has already been loaded once |
| 1423 | DATA will hold 0x08. For most uGuru's CMD will hold 0xAC in either | 1423 | DATA will hold 0x08. For most uGuru's CMD will hold 0xAC in either |
| 1424 | scenario but some will hold 0x00. | 1424 | scenario but some will hold 0x00. |
| 1425 | Some uGuru's initally hold 0x09 at DATA and will only hold 0x08 | 1425 | Some uGuru's initially hold 0x09 at DATA and will only hold 0x08 |
| 1426 | after reading CMD first, so CMD must be read first! */ | 1426 | after reading CMD first, so CMD must be read first! */ |
| 1427 | u8 cmd_val = inb_p(ABIT_UGURU_BASE + ABIT_UGURU_CMD); | 1427 | u8 cmd_val = inb_p(ABIT_UGURU_BASE + ABIT_UGURU_CMD); |
| 1428 | u8 data_val = inb_p(ABIT_UGURU_BASE + ABIT_UGURU_DATA); | 1428 | u8 data_val = inb_p(ABIT_UGURU_BASE + ABIT_UGURU_DATA); |
diff --git a/drivers/hwmon/abituguru3.c b/drivers/hwmon/abituguru3.c index 034cebfcd273..e89d572e3320 100644 --- a/drivers/hwmon/abituguru3.c +++ b/drivers/hwmon/abituguru3.c | |||
| @@ -151,7 +151,7 @@ struct abituguru3_data { | |||
| 151 | /* Pointer to the sensors info for the detected motherboard */ | 151 | /* Pointer to the sensors info for the detected motherboard */ |
| 152 | const struct abituguru3_sensor_info *sensors; | 152 | const struct abituguru3_sensor_info *sensors; |
| 153 | 153 | ||
| 154 | /* The abituguru3 supports upto 48 sensors, and thus has registers | 154 | /* The abituguru3 supports up to 48 sensors, and thus has registers |
| 155 | sets for 48 sensors, for convienence reasons / simplicity of the | 155 | sets for 48 sensors, for convienence reasons / simplicity of the |
| 156 | code we always read and store all registers for all 48 sensors */ | 156 | code we always read and store all registers for all 48 sensors */ |
| 157 | 157 | ||
diff --git a/drivers/hwmon/adm1026.c b/drivers/hwmon/adm1026.c index be0fdd58aa29..0531867484f4 100644 --- a/drivers/hwmon/adm1026.c +++ b/drivers/hwmon/adm1026.c | |||
| @@ -175,7 +175,7 @@ static u16 ADM1026_REG_TEMP_OFFSET[] = { 0x1e, 0x6e, 0x6f }; | |||
| 175 | * these macros are called: arguments may be evaluated more than once. | 175 | * these macros are called: arguments may be evaluated more than once. |
| 176 | */ | 176 | */ |
| 177 | 177 | ||
| 178 | /* IN are scaled acording to built-in resistors. These are the | 178 | /* IN are scaled according to built-in resistors. These are the |
| 179 | * voltages corresponding to 3/4 of full scale (192 or 0xc0) | 179 | * voltages corresponding to 3/4 of full scale (192 or 0xc0) |
| 180 | * NOTE: The -12V input needs an additional factor to account | 180 | * NOTE: The -12V input needs an additional factor to account |
| 181 | * for the Vref pullup resistor. | 181 | * for the Vref pullup resistor. |
diff --git a/drivers/hwmon/lm85.c b/drivers/hwmon/lm85.c index cf47e6e476ed..250d099ca398 100644 --- a/drivers/hwmon/lm85.c +++ b/drivers/hwmon/lm85.c | |||
| @@ -130,7 +130,7 @@ enum chips { | |||
| 130 | these macros are called: arguments may be evaluated more than once. | 130 | these macros are called: arguments may be evaluated more than once. |
| 131 | */ | 131 | */ |
| 132 | 132 | ||
| 133 | /* IN are scaled acording to built-in resistors */ | 133 | /* IN are scaled according to built-in resistors */ |
| 134 | static const int lm85_scaling[] = { /* .001 Volts */ | 134 | static const int lm85_scaling[] = { /* .001 Volts */ |
| 135 | 2500, 2250, 3300, 5000, 12000, | 135 | 2500, 2250, 3300, 5000, 12000, |
| 136 | 3300, 1500, 1800 /*EMC6D100*/ | 136 | 3300, 1500, 1800 /*EMC6D100*/ |
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c index 812781c655a7..c43b4e9f96a9 100644 --- a/drivers/hwmon/lm90.c +++ b/drivers/hwmon/lm90.c | |||
| @@ -356,7 +356,7 @@ static int lm90_read16(struct i2c_client *client, u8 regh, u8 regl, u16 *value) | |||
| 356 | /* | 356 | /* |
| 357 | * There is a trick here. We have to read two registers to have the | 357 | * There is a trick here. We have to read two registers to have the |
| 358 | * sensor temperature, but we have to beware a conversion could occur | 358 | * sensor temperature, but we have to beware a conversion could occur |
| 359 | * inbetween the readings. The datasheet says we should either use | 359 | * between the readings. The datasheet says we should either use |
| 360 | * the one-shot conversion register, which we don't want to do | 360 | * the one-shot conversion register, which we don't want to do |
| 361 | * (disables hardware monitoring) or monitor the busy bit, which is | 361 | * (disables hardware monitoring) or monitor the busy bit, which is |
| 362 | * impossible (we can't read the values and monitor that bit at the | 362 | * impossible (we can't read the values and monitor that bit at the |
diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c index 1a9c32d6893a..f4e617adb220 100644 --- a/drivers/hwmon/sht15.c +++ b/drivers/hwmon/sht15.c | |||
| @@ -52,7 +52,7 @@ | |||
| 52 | #define SHT15_TSU 150 /* data setup time */ | 52 | #define SHT15_TSU 150 /* data setup time */ |
| 53 | 53 | ||
| 54 | /** | 54 | /** |
| 55 | * struct sht15_temppair - elements of voltage dependant temp calc | 55 | * struct sht15_temppair - elements of voltage dependent temp calc |
| 56 | * @vdd: supply voltage in microvolts | 56 | * @vdd: supply voltage in microvolts |
| 57 | * @d1: see data sheet | 57 | * @d1: see data sheet |
| 58 | */ | 58 | */ |
| @@ -251,7 +251,7 @@ static inline int sht15_update_single_val(struct sht15_data *data, | |||
| 251 | enable_irq(gpio_to_irq(data->pdata->gpio_data)); | 251 | enable_irq(gpio_to_irq(data->pdata->gpio_data)); |
| 252 | if (gpio_get_value(data->pdata->gpio_data) == 0) { | 252 | if (gpio_get_value(data->pdata->gpio_data) == 0) { |
| 253 | disable_irq_nosync(gpio_to_irq(data->pdata->gpio_data)); | 253 | disable_irq_nosync(gpio_to_irq(data->pdata->gpio_data)); |
| 254 | /* Only relevant if the interrupt hasn't occured. */ | 254 | /* Only relevant if the interrupt hasn't occurred. */ |
| 255 | if (!atomic_read(&data->interrupt_handled)) | 255 | if (!atomic_read(&data->interrupt_handled)) |
| 256 | schedule_work(&data->read_work); | 256 | schedule_work(&data->read_work); |
| 257 | } | 257 | } |
| @@ -452,7 +452,7 @@ static void sht15_bh_read_data(struct work_struct *work_s) | |||
| 452 | */ | 452 | */ |
| 453 | atomic_set(&data->interrupt_handled, 0); | 453 | atomic_set(&data->interrupt_handled, 0); |
| 454 | enable_irq(gpio_to_irq(data->pdata->gpio_data)); | 454 | enable_irq(gpio_to_irq(data->pdata->gpio_data)); |
| 455 | /* If still not occured or another handler has been scheduled */ | 455 | /* If still not occurred or another handler has been scheduled */ |
| 456 | if (gpio_get_value(data->pdata->gpio_data) | 456 | if (gpio_get_value(data->pdata->gpio_data) |
| 457 | || atomic_read(&data->interrupt_handled)) | 457 | || atomic_read(&data->interrupt_handled)) |
| 458 | return; | 458 | return; |
diff --git a/drivers/hwmon/tmp102.c b/drivers/hwmon/tmp102.c index 93187c3cb5e7..5bd194968801 100644 --- a/drivers/hwmon/tmp102.c +++ b/drivers/hwmon/tmp102.c | |||
| @@ -166,7 +166,7 @@ static int __devinit tmp102_probe(struct i2c_client *client, | |||
| 166 | 166 | ||
| 167 | if (!i2c_check_functionality(client->adapter, | 167 | if (!i2c_check_functionality(client->adapter, |
| 168 | I2C_FUNC_SMBUS_WORD_DATA)) { | 168 | I2C_FUNC_SMBUS_WORD_DATA)) { |
| 169 | dev_err(&client->dev, "adapter doesnt support SMBus word " | 169 | dev_err(&client->dev, "adapter doesn't support SMBus word " |
| 170 | "transactions\n"); | 170 | "transactions\n"); |
| 171 | return -ENODEV; | 171 | return -ENODEV; |
| 172 | } | 172 | } |
diff --git a/drivers/hwmon/twl4030-madc-hwmon.c b/drivers/hwmon/twl4030-madc-hwmon.c index 97e22bef85ab..de5819199e2e 100644 --- a/drivers/hwmon/twl4030-madc-hwmon.c +++ b/drivers/hwmon/twl4030-madc-hwmon.c | |||
| @@ -154,4 +154,4 @@ module_exit(twl4030_madc_hwmon_exit); | |||
| 154 | MODULE_DESCRIPTION("TWL4030 ADC Hwmon driver"); | 154 | MODULE_DESCRIPTION("TWL4030 ADC Hwmon driver"); |
| 155 | MODULE_LICENSE("GPL"); | 155 | MODULE_LICENSE("GPL"); |
| 156 | MODULE_AUTHOR("J Keerthy"); | 156 | MODULE_AUTHOR("J Keerthy"); |
| 157 | MODULE_ALIAS("twl4030_madc_hwmon"); | 157 | MODULE_ALIAS("platform:twl4030_madc_hwmon"); |
diff --git a/drivers/hwmon/w83791d.c b/drivers/hwmon/w83791d.c index 400a88bde278..17cf1ab95521 100644 --- a/drivers/hwmon/w83791d.c +++ b/drivers/hwmon/w83791d.c | |||
| @@ -556,7 +556,7 @@ static ssize_t show_fan_div(struct device *dev, struct device_attribute *attr, | |||
| 556 | 556 | ||
| 557 | /* Note: we save and restore the fan minimum here, because its value is | 557 | /* Note: we save and restore the fan minimum here, because its value is |
| 558 | determined in part by the fan divisor. This follows the principle of | 558 | determined in part by the fan divisor. This follows the principle of |
| 559 | least suprise; the user doesn't expect the fan minimum to change just | 559 | least surprise; the user doesn't expect the fan minimum to change just |
| 560 | because the divisor changed. */ | 560 | because the divisor changed. */ |
| 561 | static ssize_t store_fan_div(struct device *dev, struct device_attribute *attr, | 561 | static ssize_t store_fan_div(struct device *dev, struct device_attribute *attr, |
| 562 | const char *buf, size_t count) | 562 | const char *buf, size_t count) |
diff --git a/drivers/hwmon/w83792d.c b/drivers/hwmon/w83792d.c index 63841f8cec07..f3e7130c4cda 100644 --- a/drivers/hwmon/w83792d.c +++ b/drivers/hwmon/w83792d.c | |||
| @@ -244,7 +244,7 @@ FAN_TO_REG(long rpm, int div) | |||
| 244 | #define TEMP1_TO_REG(val) (SENSORS_LIMIT(((val) < 0 ? (val)+0x100*1000 \ | 244 | #define TEMP1_TO_REG(val) (SENSORS_LIMIT(((val) < 0 ? (val)+0x100*1000 \ |
| 245 | : (val)) / 1000, 0, 0xff)) | 245 | : (val)) / 1000, 0, 0xff)) |
| 246 | #define TEMP1_FROM_REG(val) (((val) & 0x80 ? (val)-0x100 : (val)) * 1000) | 246 | #define TEMP1_FROM_REG(val) (((val) & 0x80 ? (val)-0x100 : (val)) * 1000) |
| 247 | /* for temp2 and temp3, because they need addtional resolution */ | 247 | /* for temp2 and temp3, because they need additional resolution */ |
| 248 | #define TEMP_ADD_FROM_REG(val1, val2) \ | 248 | #define TEMP_ADD_FROM_REG(val1, val2) \ |
| 249 | ((((val1) & 0x80 ? (val1)-0x100 \ | 249 | ((((val1) & 0x80 ? (val1)-0x100 \ |
| 250 | : (val1)) * 1000) + ((val2 & 0x80) ? 500 : 0)) | 250 | : (val1)) * 1000) + ((val2 & 0x80) ? 500 : 0)) |
diff --git a/drivers/hwmon/w83793.c b/drivers/hwmon/w83793.c index e3bdedfb5347..854f9117f1aa 100644 --- a/drivers/hwmon/w83793.c +++ b/drivers/hwmon/w83793.c | |||
| @@ -1921,7 +1921,7 @@ static void w83793_update_nonvolatile(struct device *dev) | |||
| 1921 | struct w83793_data *data = i2c_get_clientdata(client); | 1921 | struct w83793_data *data = i2c_get_clientdata(client); |
| 1922 | int i, j; | 1922 | int i, j; |
| 1923 | /* | 1923 | /* |
| 1924 | They are somewhat "stable" registers, and to update them everytime | 1924 | They are somewhat "stable" registers, and to update them every time |
| 1925 | takes so much time, it's just not worthy. Update them in a long | 1925 | takes so much time, it's just not worthy. Update them in a long |
| 1926 | interval to avoid exception. | 1926 | interval to avoid exception. |
| 1927 | */ | 1927 | */ |
diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c index 38319a69bd0a..d6d58684712b 100644 --- a/drivers/i2c/algos/i2c-algo-bit.c +++ b/drivers/i2c/algos/i2c-algo-bit.c | |||
| @@ -232,9 +232,17 @@ static int i2c_inb(struct i2c_adapter *i2c_adap) | |||
| 232 | * Sanity check for the adapter hardware - check the reaction of | 232 | * Sanity check for the adapter hardware - check the reaction of |
| 233 | * the bus lines only if it seems to be idle. | 233 | * the bus lines only if it seems to be idle. |
| 234 | */ | 234 | */ |
| 235 | static int test_bus(struct i2c_algo_bit_data *adap, char *name) | 235 | static int test_bus(struct i2c_adapter *i2c_adap) |
| 236 | { | 236 | { |
| 237 | int scl, sda; | 237 | struct i2c_algo_bit_data *adap = i2c_adap->algo_data; |
| 238 | const char *name = i2c_adap->name; | ||
| 239 | int scl, sda, ret; | ||
| 240 | |||
| 241 | if (adap->pre_xfer) { | ||
| 242 | ret = adap->pre_xfer(i2c_adap); | ||
| 243 | if (ret < 0) | ||
| 244 | return -ENODEV; | ||
| 245 | } | ||
| 238 | 246 | ||
| 239 | if (adap->getscl == NULL) | 247 | if (adap->getscl == NULL) |
| 240 | pr_info("%s: Testing SDA only, SCL is not readable\n", name); | 248 | pr_info("%s: Testing SDA only, SCL is not readable\n", name); |
| @@ -297,11 +305,19 @@ static int test_bus(struct i2c_algo_bit_data *adap, char *name) | |||
| 297 | "while pulling SCL high!\n", name); | 305 | "while pulling SCL high!\n", name); |
| 298 | goto bailout; | 306 | goto bailout; |
| 299 | } | 307 | } |
| 308 | |||
| 309 | if (adap->post_xfer) | ||
| 310 | adap->post_xfer(i2c_adap); | ||
| 311 | |||
| 300 | pr_info("%s: Test OK\n", name); | 312 | pr_info("%s: Test OK\n", name); |
| 301 | return 0; | 313 | return 0; |
| 302 | bailout: | 314 | bailout: |
| 303 | sdahi(adap); | 315 | sdahi(adap); |
| 304 | sclhi(adap); | 316 | sclhi(adap); |
| 317 | |||
| 318 | if (adap->post_xfer) | ||
| 319 | adap->post_xfer(i2c_adap); | ||
| 320 | |||
| 305 | return -ENODEV; | 321 | return -ENODEV; |
| 306 | } | 322 | } |
| 307 | 323 | ||
| @@ -607,7 +623,7 @@ static int __i2c_bit_add_bus(struct i2c_adapter *adap, | |||
| 607 | int ret; | 623 | int ret; |
| 608 | 624 | ||
| 609 | if (bit_test) { | 625 | if (bit_test) { |
| 610 | ret = test_bus(bit_adap, adap->name); | 626 | ret = test_bus(adap); |
| 611 | if (ret < 0) | 627 | if (ret < 0) |
| 612 | return -ENODEV; | 628 | return -ENODEV; |
| 613 | } | 629 | } |
diff --git a/drivers/i2c/algos/i2c-algo-pca.c b/drivers/i2c/algos/i2c-algo-pca.c index 2b9a8f54bb2c..4ca9cf9cde73 100644 --- a/drivers/i2c/algos/i2c-algo-pca.c +++ b/drivers/i2c/algos/i2c-algo-pca.c | |||
| @@ -343,7 +343,7 @@ static int pca_xfer(struct i2c_adapter *i2c_adap, | |||
| 343 | 343 | ||
| 344 | ret = curmsg; | 344 | ret = curmsg; |
| 345 | out: | 345 | out: |
| 346 | DEB1("}}} transfered %d/%d messages. " | 346 | DEB1("}}} transferred %d/%d messages. " |
| 347 | "status is %#04x. control is %#04x\n", | 347 | "status is %#04x. control is %#04x\n", |
| 348 | curmsg, num, pca_status(adap), | 348 | curmsg, num, pca_status(adap), |
| 349 | pca_get_con(adap)); | 349 | pca_get_con(adap)); |
diff --git a/drivers/i2c/busses/i2c-ali1535.c b/drivers/i2c/busses/i2c-ali1535.c index 906a3ca50db6..dd364171f9c5 100644 --- a/drivers/i2c/busses/i2c-ali1535.c +++ b/drivers/i2c/busses/i2c-ali1535.c | |||
| @@ -295,7 +295,7 @@ static int ali1535_transaction(struct i2c_adapter *adap) | |||
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | /* Unfortunately the ALI SMB controller maps "no response" and "bus | 297 | /* Unfortunately the ALI SMB controller maps "no response" and "bus |
| 298 | * collision" into a single bit. No reponse is the usual case so don't | 298 | * collision" into a single bit. No response is the usual case so don't |
| 299 | * do a printk. This means that bus collisions go unreported. | 299 | * do a printk. This means that bus collisions go unreported. |
| 300 | */ | 300 | */ |
| 301 | if (temp & ALI1535_STS_BUSERR) { | 301 | if (temp & ALI1535_STS_BUSERR) { |
diff --git a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c index b14f6d68221d..83e8a60cdc86 100644 --- a/drivers/i2c/busses/i2c-ali15x3.c +++ b/drivers/i2c/busses/i2c-ali15x3.c | |||
| @@ -318,7 +318,7 @@ static int ali15x3_transaction(struct i2c_adapter *adap) | |||
| 318 | 318 | ||
| 319 | /* | 319 | /* |
| 320 | Unfortunately the ALI SMB controller maps "no response" and "bus | 320 | Unfortunately the ALI SMB controller maps "no response" and "bus |
| 321 | collision" into a single bit. No reponse is the usual case so don't | 321 | collision" into a single bit. No response is the usual case so don't |
| 322 | do a printk. | 322 | do a printk. |
| 323 | This means that bus collisions go unreported. | 323 | This means that bus collisions go unreported. |
| 324 | */ | 324 | */ |
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index 5795c8398c7c..a76d85fa3ad7 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c | |||
| @@ -355,7 +355,7 @@ i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop) | |||
| 355 | /* | 355 | /* |
| 356 | * Write mode register first as needed for correct behaviour | 356 | * Write mode register first as needed for correct behaviour |
| 357 | * on OMAP-L138, but don't set STT yet to avoid a race with XRDY | 357 | * on OMAP-L138, but don't set STT yet to avoid a race with XRDY |
| 358 | * occuring before we have loaded DXR | 358 | * occurring before we have loaded DXR |
| 359 | */ | 359 | */ |
| 360 | davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, flag); | 360 | davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, flag); |
| 361 | 361 | ||
diff --git a/drivers/i2c/busses/i2c-designware.c b/drivers/i2c/busses/i2c-designware.c index b664ed8bbdb3..b7a51c43b185 100644 --- a/drivers/i2c/busses/i2c-designware.c +++ b/drivers/i2c/busses/i2c-designware.c | |||
| @@ -178,7 +178,7 @@ static char *abort_sources[] = { | |||
| 178 | * @lock: protect this struct and IO registers | 178 | * @lock: protect this struct and IO registers |
| 179 | * @clk: input reference clock | 179 | * @clk: input reference clock |
| 180 | * @cmd_err: run time hadware error code | 180 | * @cmd_err: run time hadware error code |
| 181 | * @msgs: points to an array of messages currently being transfered | 181 | * @msgs: points to an array of messages currently being transferred |
| 182 | * @msgs_num: the number of elements in msgs | 182 | * @msgs_num: the number of elements in msgs |
| 183 | * @msg_write_idx: the element index of the current tx message in the msgs | 183 | * @msg_write_idx: the element index of the current tx message in the msgs |
| 184 | * array | 184 | * array |
diff --git a/drivers/i2c/busses/i2c-elektor.c b/drivers/i2c/busses/i2c-elektor.c index e5b1a3bf5b80..37e2e82a9c88 100644 --- a/drivers/i2c/busses/i2c-elektor.c +++ b/drivers/i2c/busses/i2c-elektor.c | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even | 22 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even |
| 23 | Frodo Looijaard <frodol@dds.nl> */ | 23 | Frodo Looijaard <frodol@dds.nl> */ |
| 24 | 24 | ||
| 25 | /* Partialy rewriten by Oleg I. Vdovikin for mmapped support of | 25 | /* Partially rewriten by Oleg I. Vdovikin for mmapped support of |
| 26 | for Alpha Processor Inc. UP-2000(+) boards */ | 26 | for Alpha Processor Inc. UP-2000(+) boards */ |
| 27 | 27 | ||
| 28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index ed2e0c5ea37c..72c0415f6f94 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c | |||
| @@ -96,7 +96,7 @@ | |||
| 96 | #define SMBHSTCFG_SMB_SMI_EN 2 | 96 | #define SMBHSTCFG_SMB_SMI_EN 2 |
| 97 | #define SMBHSTCFG_I2C_EN 4 | 97 | #define SMBHSTCFG_I2C_EN 4 |
| 98 | 98 | ||
| 99 | /* Auxillary control register bits, ICH4+ only */ | 99 | /* Auxiliary control register bits, ICH4+ only */ |
| 100 | #define SMBAUXCTL_CRC 1 | 100 | #define SMBAUXCTL_CRC 1 |
| 101 | #define SMBAUXCTL_E32B 2 | 101 | #define SMBAUXCTL_E32B 2 |
| 102 | 102 | ||
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c index e4f88dca99b5..3c110fbc409b 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c | |||
| @@ -494,7 +494,7 @@ static int iic_xfer_bytes(struct ibm_iic_private* dev, struct i2c_msg* pm, | |||
| 494 | if (unlikely(ret < 0)) | 494 | if (unlikely(ret < 0)) |
| 495 | break; | 495 | break; |
| 496 | else if (unlikely(ret != count)){ | 496 | else if (unlikely(ret != count)){ |
| 497 | DBG("%d: xfer_bytes, requested %d, transfered %d\n", | 497 | DBG("%d: xfer_bytes, requested %d, transferred %d\n", |
| 498 | dev->idx, count, ret); | 498 | dev->idx, count, ret); |
| 499 | 499 | ||
| 500 | /* If it's not a last part of xfer, abort it */ | 500 | /* If it's not a last part of xfer, abort it */ |
| @@ -593,7 +593,7 @@ static int iic_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) | |||
| 593 | if (unlikely((in_8(&iic->extsts) & EXTSTS_BCS_MASK) != EXTSTS_BCS_FREE)){ | 593 | if (unlikely((in_8(&iic->extsts) & EXTSTS_BCS_MASK) != EXTSTS_BCS_FREE)){ |
| 594 | DBG("%d: iic_xfer, bus is not free\n", dev->idx); | 594 | DBG("%d: iic_xfer, bus is not free\n", dev->idx); |
| 595 | 595 | ||
| 596 | /* Usually it means something serious has happend. | 596 | /* Usually it means something serious has happened. |
| 597 | * We *cannot* have unfinished previous transfer | 597 | * We *cannot* have unfinished previous transfer |
| 598 | * so it doesn't make any sense to try to stop it. | 598 | * so it doesn't make any sense to try to stop it. |
| 599 | * Probably we were not able to recover from the | 599 | * Probably we were not able to recover from the |
diff --git a/drivers/i2c/busses/i2c-intel-mid.c b/drivers/i2c/busses/i2c-intel-mid.c index c71492782bbd..e828ac85cfa7 100644 --- a/drivers/i2c/busses/i2c-intel-mid.c +++ b/drivers/i2c/busses/i2c-intel-mid.c | |||
| @@ -170,8 +170,8 @@ struct intel_mid_i2c_private { | |||
| 170 | /* Raw Interrupt Status Register */ | 170 | /* Raw Interrupt Status Register */ |
| 171 | #define IC_RAW_INTR_STAT 0x34 /* Read Only */ | 171 | #define IC_RAW_INTR_STAT 0x34 /* Read Only */ |
| 172 | #define GEN_CALL (1 << 11) /* General call */ | 172 | #define GEN_CALL (1 << 11) /* General call */ |
| 173 | #define START_DET (1 << 10) /* (RE)START occured */ | 173 | #define START_DET (1 << 10) /* (RE)START occurred */ |
| 174 | #define STOP_DET (1 << 9) /* STOP occured */ | 174 | #define STOP_DET (1 << 9) /* STOP occurred */ |
| 175 | #define ACTIVITY (1 << 8) /* Bus busy */ | 175 | #define ACTIVITY (1 << 8) /* Bus busy */ |
| 176 | #define RX_DONE (1 << 7) /* Not used in Master mode */ | 176 | #define RX_DONE (1 << 7) /* Not used in Master mode */ |
| 177 | #define TX_ABRT (1 << 6) /* Transmit Abort */ | 177 | #define TX_ABRT (1 << 6) /* Transmit Abort */ |
| @@ -375,7 +375,7 @@ static int intel_mid_i2c_disable(struct i2c_adapter *adap) | |||
| 375 | * I2C should be disabled prior to other register operation. If failed, an | 375 | * I2C should be disabled prior to other register operation. If failed, an |
| 376 | * errno is returned. Mask and Clear all interrpts, this should be done at | 376 | * errno is returned. Mask and Clear all interrpts, this should be done at |
| 377 | * first. Set common registers which will not be modified during normal | 377 | * first. Set common registers which will not be modified during normal |
| 378 | * transfers, including: controll register, FIFO threshold and clock freq. | 378 | * transfers, including: control register, FIFO threshold and clock freq. |
| 379 | * Check APB data width at last. | 379 | * Check APB data width at last. |
| 380 | */ | 380 | */ |
| 381 | static int intel_mid_i2c_hwinit(struct intel_mid_i2c_private *i2c) | 381 | static int intel_mid_i2c_hwinit(struct intel_mid_i2c_private *i2c) |
| @@ -455,7 +455,7 @@ static inline bool intel_mid_i2c_address_neq(const struct i2c_msg *p1, | |||
| 455 | * | 455 | * |
| 456 | * By reading register IC_TX_ABRT_SOURCE, various transfer errors can be | 456 | * By reading register IC_TX_ABRT_SOURCE, various transfer errors can be |
| 457 | * distingushed. At present, no circumstances have been found out that | 457 | * distingushed. At present, no circumstances have been found out that |
| 458 | * multiple errors would be occured simutaneously, so we simply use the | 458 | * multiple errors would be occurred simutaneously, so we simply use the |
| 459 | * register value directly. | 459 | * register value directly. |
| 460 | * | 460 | * |
| 461 | * At last the error bits are cleared. (Note clear ABRT_SBYTE_NORSTRT bit need | 461 | * At last the error bits are cleared. (Note clear ABRT_SBYTE_NORSTRT bit need |
| @@ -469,7 +469,7 @@ static void intel_mid_i2c_abort(struct intel_mid_i2c_private *i2c) | |||
| 469 | 469 | ||
| 470 | /* Single transfer error check: | 470 | /* Single transfer error check: |
| 471 | * According to databook, TX/RX FIFOs would be flushed when | 471 | * According to databook, TX/RX FIFOs would be flushed when |
| 472 | * the abort interrupt occured. | 472 | * the abort interrupt occurred. |
| 473 | */ | 473 | */ |
| 474 | if (abort & ABRT_MASTER_DIS) | 474 | if (abort & ABRT_MASTER_DIS) |
| 475 | dev_err(&adap->dev, | 475 | dev_err(&adap->dev, |
| @@ -569,7 +569,7 @@ static int xfer_read(struct i2c_adapter *adap, unsigned char *buf, int length) | |||
| 569 | * Return Values: | 569 | * Return Values: |
| 570 | * 0 if the read transfer succeeds | 570 | * 0 if the read transfer succeeds |
| 571 | * -ETIMEDOUT if we cannot read the "raw" interrupt register | 571 | * -ETIMEDOUT if we cannot read the "raw" interrupt register |
| 572 | * -EINVAL if a transfer abort occured | 572 | * -EINVAL if a transfer abort occurred |
| 573 | * | 573 | * |
| 574 | * For every byte, a "WRITE" command will be loaded into IC_DATA_CMD prior to | 574 | * For every byte, a "WRITE" command will be loaded into IC_DATA_CMD prior to |
| 575 | * data transfer. The actual "write" operation will be performed when the | 575 | * data transfer. The actual "write" operation will be performed when the |
| @@ -697,7 +697,7 @@ static int intel_mid_i2c_setup(struct i2c_adapter *adap, struct i2c_msg *pmsg) | |||
| 697 | * @num: number of i2c_msg | 697 | * @num: number of i2c_msg |
| 698 | * | 698 | * |
| 699 | * Return Values: | 699 | * Return Values: |
| 700 | * + number of messages transfered | 700 | * + number of messages transferred |
| 701 | * -ETIMEDOUT If cannot disable I2C controller or read IC_STATUS | 701 | * -ETIMEDOUT If cannot disable I2C controller or read IC_STATUS |
| 702 | * -EINVAL If the address in i2c_msg is invalid | 702 | * -EINVAL If the address in i2c_msg is invalid |
| 703 | * | 703 | * |
diff --git a/drivers/i2c/busses/i2c-isch.c b/drivers/i2c/busses/i2c-isch.c index ddc258edb34f..0682f8f277b0 100644 --- a/drivers/i2c/busses/i2c-isch.c +++ b/drivers/i2c/busses/i2c-isch.c | |||
| @@ -141,7 +141,7 @@ static int sch_transaction(void) | |||
| 141 | * This is the main access entry for i2c-sch access | 141 | * This is the main access entry for i2c-sch access |
| 142 | * adap is i2c_adapter pointer, addr is the i2c device bus address, read_write | 142 | * adap is i2c_adapter pointer, addr is the i2c device bus address, read_write |
| 143 | * (0 for read and 1 for write), size is i2c transaction type and data is the | 143 | * (0 for read and 1 for write), size is i2c transaction type and data is the |
| 144 | * union of transaction for data to be transfered or data read from bus. | 144 | * union of transaction for data to be transferred or data read from bus. |
| 145 | * return 0 for success and others for failure. | 145 | * return 0 for success and others for failure. |
| 146 | */ | 146 | */ |
| 147 | static s32 sch_access(struct i2c_adapter *adap, u16 addr, | 147 | static s32 sch_access(struct i2c_adapter *adap, u16 addr, |
diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c index caf96dc8ca1b..7e78f7c87857 100644 --- a/drivers/i2c/busses/i2c-mxs.c +++ b/drivers/i2c/busses/i2c-mxs.c | |||
| @@ -149,7 +149,7 @@ static void mxs_i2c_pioq_setup_write(struct mxs_i2c_dev *i2c, | |||
| 149 | * We have to copy the slave address (u8) and buffer (arbitrary number | 149 | * We have to copy the slave address (u8) and buffer (arbitrary number |
| 150 | * of u8) into the data register (u32). To achieve that, the u8 are put | 150 | * of u8) into the data register (u32). To achieve that, the u8 are put |
| 151 | * into the MSBs of 'data' which is then shifted for the next u8. When | 151 | * into the MSBs of 'data' which is then shifted for the next u8. When |
| 152 | * apropriate, 'data' is written to MXS_I2C_DATA. So, the first u32 | 152 | * appropriate, 'data' is written to MXS_I2C_DATA. So, the first u32 |
| 153 | * looks like this: | 153 | * looks like this: |
| 154 | * | 154 | * |
| 155 | * 3 2 1 0 | 155 | * 3 2 1 0 |
diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c index 594ed5059c4a..e10e5cf3751a 100644 --- a/drivers/i2c/busses/i2c-nomadik.c +++ b/drivers/i2c/busses/i2c-nomadik.c | |||
| @@ -126,9 +126,9 @@ enum i2c_operation { | |||
| 126 | /** | 126 | /** |
| 127 | * struct i2c_nmk_client - client specific data | 127 | * struct i2c_nmk_client - client specific data |
| 128 | * @slave_adr: 7-bit slave address | 128 | * @slave_adr: 7-bit slave address |
| 129 | * @count: no. bytes to be transfered | 129 | * @count: no. bytes to be transferred |
| 130 | * @buffer: client data buffer | 130 | * @buffer: client data buffer |
| 131 | * @xfer_bytes: bytes transfered till now | 131 | * @xfer_bytes: bytes transferred till now |
| 132 | * @operation: current I2C operation | 132 | * @operation: current I2C operation |
| 133 | */ | 133 | */ |
| 134 | struct i2c_nmk_client { | 134 | struct i2c_nmk_client { |
| @@ -330,7 +330,7 @@ static void setup_i2c_controller(struct nmk_i2c_dev *dev) | |||
| 330 | * slsu defines the data setup time after SCL clock | 330 | * slsu defines the data setup time after SCL clock |
| 331 | * stretching in terms of i2c clk cycles. The | 331 | * stretching in terms of i2c clk cycles. The |
| 332 | * needed setup time for the three modes are 250ns, | 332 | * needed setup time for the three modes are 250ns, |
| 333 | * 100ns, 10ns repectively thus leading to the values | 333 | * 100ns, 10ns respectively thus leading to the values |
| 334 | * of 14, 6, 2 for a 48 MHz i2c clk. | 334 | * of 14, 6, 2 for a 48 MHz i2c clk. |
| 335 | */ | 335 | */ |
| 336 | writel(dev->cfg.slsu << 16, dev->virtbase + I2C_SCR); | 336 | writel(dev->cfg.slsu << 16, dev->virtbase + I2C_SCR); |
| @@ -364,7 +364,7 @@ static void setup_i2c_controller(struct nmk_i2c_dev *dev) | |||
| 364 | /* | 364 | /* |
| 365 | * set the speed mode. Currently we support | 365 | * set the speed mode. Currently we support |
| 366 | * only standard and fast mode of operation | 366 | * only standard and fast mode of operation |
| 367 | * TODO - support for fast mode plus (upto 1Mb/s) | 367 | * TODO - support for fast mode plus (up to 1Mb/s) |
| 368 | * and high speed (up to 3.4 Mb/s) | 368 | * and high speed (up to 3.4 Mb/s) |
| 369 | */ | 369 | */ |
| 370 | if (dev->cfg.sm > I2C_FREQ_MODE_FAST) { | 370 | if (dev->cfg.sm > I2C_FREQ_MODE_FAST) { |
diff --git a/drivers/i2c/busses/i2c-s6000.c b/drivers/i2c/busses/i2c-s6000.c index cadc0216e02f..cb5d01e279c6 100644 --- a/drivers/i2c/busses/i2c-s6000.c +++ b/drivers/i2c/busses/i2c-s6000.c | |||
| @@ -318,7 +318,7 @@ static int __devinit s6i2c_probe(struct platform_device *dev) | |||
| 318 | rc = request_irq(iface->irq, s6i2c_interrupt_entry, | 318 | rc = request_irq(iface->irq, s6i2c_interrupt_entry, |
| 319 | IRQF_SHARED, dev->name, iface); | 319 | IRQF_SHARED, dev->name, iface); |
| 320 | if (rc) { | 320 | if (rc) { |
| 321 | dev_err(&p_adap->dev, "s6i2c: cant get IRQ %d\n", iface->irq); | 321 | dev_err(&p_adap->dev, "s6i2c: can't get IRQ %d\n", iface->irq); |
| 322 | goto err_clk_dis; | 322 | goto err_clk_dis; |
| 323 | } | 323 | } |
| 324 | 324 | ||
diff --git a/drivers/i2c/busses/i2c-stu300.c b/drivers/i2c/busses/i2c-stu300.c index 266135ddf7fa..99879617e686 100644 --- a/drivers/i2c/busses/i2c-stu300.c +++ b/drivers/i2c/busses/i2c-stu300.c | |||
| @@ -497,7 +497,7 @@ static int stu300_set_clk(struct stu300_dev *dev, unsigned long clkrate) | |||
| 497 | u32 val; | 497 | u32 val; |
| 498 | int i = 0; | 498 | int i = 0; |
| 499 | 499 | ||
| 500 | /* Locate the apropriate clock setting */ | 500 | /* Locate the appropriate clock setting */ |
| 501 | while (i < ARRAY_SIZE(stu300_clktable) - 1 && | 501 | while (i < ARRAY_SIZE(stu300_clktable) - 1 && |
| 502 | stu300_clktable[i].rate < clkrate) | 502 | stu300_clktable[i].rate < clkrate) |
| 503 | i++; | 503 | i++; |
| @@ -644,7 +644,7 @@ static int stu300_send_address(struct stu300_dev *dev, | |||
| 644 | ret = stu300_await_event(dev, STU300_EVENT_6); | 644 | ret = stu300_await_event(dev, STU300_EVENT_6); |
| 645 | 645 | ||
| 646 | /* | 646 | /* |
| 647 | * Clear any pending EVENT 6 no matter what happend during | 647 | * Clear any pending EVENT 6 no matter what happened during |
| 648 | * await_event. | 648 | * await_event. |
| 649 | */ | 649 | */ |
| 650 | val = stu300_r8(dev->virtbase + I2C_CR); | 650 | val = stu300_r8(dev->virtbase + I2C_CR); |
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index 3921f664c9c3..b4ab39b741eb 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c | |||
| @@ -386,7 +386,7 @@ static irqreturn_t tegra_i2c_isr(int irq, void *dev_id) | |||
| 386 | dvc_writel(i2c_dev, DVC_STATUS_I2C_DONE_INTR, DVC_STATUS); | 386 | dvc_writel(i2c_dev, DVC_STATUS_I2C_DONE_INTR, DVC_STATUS); |
| 387 | return IRQ_HANDLED; | 387 | return IRQ_HANDLED; |
| 388 | err: | 388 | err: |
| 389 | /* An error occured, mask all interrupts */ | 389 | /* An error occurred, mask all interrupts */ |
| 390 | tegra_i2c_mask_irq(i2c_dev, I2C_INT_NO_ACK | I2C_INT_ARBITRATION_LOST | | 390 | tegra_i2c_mask_irq(i2c_dev, I2C_INT_NO_ACK | I2C_INT_ARBITRATION_LOST | |
| 391 | I2C_INT_PACKET_XFER_COMPLETE | I2C_INT_TX_FIFO_DATA_REQ | | 391 | I2C_INT_PACKET_XFER_COMPLETE | I2C_INT_TX_FIFO_DATA_REQ | |
| 392 | I2C_INT_RX_FIFO_DATA_REQ); | 392 | I2C_INT_RX_FIFO_DATA_REQ); |
diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index 9fbd7e6fe32e..e9d5ff4d1496 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | * to the automotive development board Russellville. The copyright holder | 21 | * to the automotive development board Russellville. The copyright holder |
| 22 | * as seen in the header is Intel corporation. | 22 | * as seen in the header is Intel corporation. |
| 23 | * Mocean Laboratories forked off the GNU/Linux platform work into a | 23 | * Mocean Laboratories forked off the GNU/Linux platform work into a |
| 24 | * separate company called Pelagicore AB, which commited the code to the | 24 | * separate company called Pelagicore AB, which committed the code to the |
| 25 | * kernel. | 25 | * kernel. |
| 26 | */ | 26 | */ |
| 27 | 27 | ||
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index e5f76a0372fd..9a58994ff7ea 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
| @@ -348,7 +348,7 @@ EXPORT_SYMBOL(i2c_verify_client); | |||
| 348 | 348 | ||
| 349 | 349 | ||
| 350 | /* This is a permissive address validity check, I2C address map constraints | 350 | /* This is a permissive address validity check, I2C address map constraints |
| 351 | * are purposedly not enforced, except for the general call address. */ | 351 | * are purposely not enforced, except for the general call address. */ |
| 352 | static int i2c_check_client_addr_validity(const struct i2c_client *client) | 352 | static int i2c_check_client_addr_validity(const struct i2c_client *client) |
| 353 | { | 353 | { |
| 354 | if (client->flags & I2C_CLIENT_TEN) { | 354 | if (client->flags & I2C_CLIENT_TEN) { |
| @@ -797,7 +797,8 @@ static int i2c_do_add_adapter(struct i2c_driver *driver, | |||
| 797 | 797 | ||
| 798 | /* Let legacy drivers scan this bus for matching devices */ | 798 | /* Let legacy drivers scan this bus for matching devices */ |
| 799 | if (driver->attach_adapter) { | 799 | if (driver->attach_adapter) { |
| 800 | dev_warn(&adap->dev, "attach_adapter method is deprecated\n"); | 800 | dev_warn(&adap->dev, "%s: attach_adapter method is deprecated\n", |
| 801 | driver->driver.name); | ||
| 801 | dev_warn(&adap->dev, "Please use another way to instantiate " | 802 | dev_warn(&adap->dev, "Please use another way to instantiate " |
| 802 | "your i2c_client\n"); | 803 | "your i2c_client\n"); |
| 803 | /* We ignore the return code; if it fails, too bad */ | 804 | /* We ignore the return code; if it fails, too bad */ |
| @@ -984,7 +985,8 @@ static int i2c_do_del_adapter(struct i2c_driver *driver, | |||
| 984 | 985 | ||
| 985 | if (!driver->detach_adapter) | 986 | if (!driver->detach_adapter) |
| 986 | return 0; | 987 | return 0; |
| 987 | dev_warn(&adapter->dev, "detach_adapter method is deprecated\n"); | 988 | dev_warn(&adapter->dev, "%s: detach_adapter method is deprecated\n", |
| 989 | driver->driver.name); | ||
| 988 | res = driver->detach_adapter(adapter); | 990 | res = driver->detach_adapter(adapter); |
| 989 | if (res) | 991 | if (res) |
| 990 | dev_err(&adapter->dev, "detach_adapter failed (%d) " | 992 | dev_err(&adapter->dev, "detach_adapter failed (%d) " |
diff --git a/drivers/ide/cy82c693.c b/drivers/ide/cy82c693.c index 9383f67deae1..3be60da52123 100644 --- a/drivers/ide/cy82c693.c +++ b/drivers/ide/cy82c693.c | |||
| @@ -67,7 +67,7 @@ static void cy82c693_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) | |||
| 67 | 67 | ||
| 68 | /* | 68 | /* |
| 69 | * note: below we set the value for Bus Master IDE TimeOut Register | 69 | * note: below we set the value for Bus Master IDE TimeOut Register |
| 70 | * I'm not absolutly sure what this does, but it solved my problem | 70 | * I'm not absolutely sure what this does, but it solved my problem |
| 71 | * with IDE DMA and sound, so I now can play sound and work with | 71 | * with IDE DMA and sound, so I now can play sound and work with |
| 72 | * my IDE driver at the same time :-) | 72 | * my IDE driver at the same time :-) |
| 73 | * | 73 | * |
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 5406b6ea3ad1..5a702d02c848 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
| @@ -107,7 +107,7 @@ static int ide_floppy_callback(ide_drive_t *drive, int dsc) | |||
| 107 | static void ide_floppy_report_error(struct ide_disk_obj *floppy, | 107 | static void ide_floppy_report_error(struct ide_disk_obj *floppy, |
| 108 | struct ide_atapi_pc *pc) | 108 | struct ide_atapi_pc *pc) |
| 109 | { | 109 | { |
| 110 | /* supress error messages resulting from Medium not present */ | 110 | /* suppress error messages resulting from Medium not present */ |
| 111 | if (floppy->sense_key == 0x02 && | 111 | if (floppy->sense_key == 0x02 && |
| 112 | floppy->asc == 0x3a && | 112 | floppy->asc == 0x3a && |
| 113 | floppy->ascq == 0x00) | 113 | floppy->ascq == 0x00) |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 0e406d73b2c8..177db6d5b2f5 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
| @@ -430,6 +430,26 @@ static inline void ide_unlock_host(struct ide_host *host) | |||
| 430 | } | 430 | } |
| 431 | } | 431 | } |
| 432 | 432 | ||
| 433 | static void __ide_requeue_and_plug(struct request_queue *q, struct request *rq) | ||
| 434 | { | ||
| 435 | if (rq) | ||
| 436 | blk_requeue_request(q, rq); | ||
| 437 | if (rq || blk_peek_request(q)) { | ||
| 438 | /* Use 3ms as that was the old plug delay */ | ||
| 439 | blk_delay_queue(q, 3); | ||
| 440 | } | ||
| 441 | } | ||
| 442 | |||
| 443 | void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq) | ||
| 444 | { | ||
| 445 | struct request_queue *q = drive->queue; | ||
| 446 | unsigned long flags; | ||
| 447 | |||
| 448 | spin_lock_irqsave(q->queue_lock, flags); | ||
| 449 | __ide_requeue_and_plug(q, rq); | ||
| 450 | spin_unlock_irqrestore(q->queue_lock, flags); | ||
| 451 | } | ||
| 452 | |||
| 433 | /* | 453 | /* |
| 434 | * Issue a new request to a device. | 454 | * Issue a new request to a device. |
| 435 | */ | 455 | */ |
| @@ -550,28 +570,7 @@ plug_device: | |||
| 550 | ide_unlock_host(host); | 570 | ide_unlock_host(host); |
| 551 | plug_device_2: | 571 | plug_device_2: |
| 552 | spin_lock_irq(q->queue_lock); | 572 | spin_lock_irq(q->queue_lock); |
| 553 | 573 | __ide_requeue_and_plug(q, rq); | |
| 554 | if (rq) { | ||
| 555 | blk_requeue_request(q, rq); | ||
| 556 | blk_delay_queue(q, queue_run_ms); | ||
| 557 | } | ||
| 558 | } | ||
| 559 | |||
| 560 | void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq) | ||
| 561 | { | ||
| 562 | struct request_queue *q = drive->queue; | ||
| 563 | unsigned long flags; | ||
| 564 | |||
| 565 | spin_lock_irqsave(q->queue_lock, flags); | ||
| 566 | |||
| 567 | if (rq) | ||
| 568 | blk_requeue_request(q, rq); | ||
| 569 | |||
| 570 | spin_unlock_irqrestore(q->queue_lock, flags); | ||
| 571 | |||
| 572 | /* Use 3ms as that was the old plug delay */ | ||
| 573 | if (rq) | ||
| 574 | blk_delay_queue(q, 3); | ||
| 575 | } | 574 | } |
| 576 | 575 | ||
| 577 | static int drive_is_ready(ide_drive_t *drive) | 576 | static int drive_is_ready(ide_drive_t *drive) |
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 34b9872f35d1..600c89a3d137 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
| @@ -201,7 +201,7 @@ static u8 wait_drive_not_busy(ide_drive_t *drive) | |||
| 201 | u8 stat; | 201 | u8 stat; |
| 202 | 202 | ||
| 203 | /* | 203 | /* |
| 204 | * Last sector was transfered, wait until device is ready. This can | 204 | * Last sector was transferred, wait until device is ready. This can |
| 205 | * take up to 6 ms on some ATAPI devices, so we will wait max 10 ms. | 205 | * take up to 6 ms on some ATAPI devices, so we will wait max 10 ms. |
| 206 | */ | 206 | */ |
| 207 | for (retries = 0; retries < 1000; retries++) { | 207 | for (retries = 0; retries < 1000; retries++) { |
diff --git a/drivers/ide/piix.c b/drivers/ide/piix.c index 1bdca49e5a03..b59d04c72051 100644 --- a/drivers/ide/piix.c +++ b/drivers/ide/piix.c | |||
| @@ -8,8 +8,8 @@ | |||
| 8 | * | 8 | * |
| 9 | * Documentation: | 9 | * Documentation: |
| 10 | * | 10 | * |
| 11 | * Publically available from Intel web site. Errata documentation | 11 | * Publicly available from Intel web site. Errata documentation |
| 12 | * is also publically available. As an aide to anyone hacking on this | 12 | * is also publicly available. As an aide to anyone hacking on this |
| 13 | * driver the list of errata that are relevant is below.going back to | 13 | * driver the list of errata that are relevant is below.going back to |
| 14 | * PIIX4. Older device documentation is now a bit tricky to find. | 14 | * PIIX4. Older device documentation is now a bit tricky to find. |
| 15 | * | 15 | * |
diff --git a/drivers/ide/sis5513.c b/drivers/ide/sis5513.c index db7f4e761dbc..4a0022567758 100644 --- a/drivers/ide/sis5513.c +++ b/drivers/ide/sis5513.c | |||
| @@ -53,7 +53,7 @@ | |||
| 53 | 53 | ||
| 54 | #define DRV_NAME "sis5513" | 54 | #define DRV_NAME "sis5513" |
| 55 | 55 | ||
| 56 | /* registers layout and init values are chipset family dependant */ | 56 | /* registers layout and init values are chipset family dependent */ |
| 57 | 57 | ||
| 58 | #define ATA_16 0x01 | 58 | #define ATA_16 0x01 |
| 59 | #define ATA_33 0x02 | 59 | #define ATA_33 0x02 |
| @@ -406,7 +406,7 @@ static int __devinit sis_find_family(struct pci_dev *dev) | |||
| 406 | pci_name(dev)); | 406 | pci_name(dev)); |
| 407 | chipset_family = ATA_133; | 407 | chipset_family = ATA_133; |
| 408 | 408 | ||
| 409 | /* Check for 5513 compability mapping | 409 | /* Check for 5513 compatibility mapping |
| 410 | * We must use this, else the port enabled code will fail, | 410 | * We must use this, else the port enabled code will fail, |
| 411 | * as it expects the enablebits at 0x4a. | 411 | * as it expects the enablebits at 0x4a. |
| 412 | */ | 412 | */ |
diff --git a/drivers/ide/triflex.c b/drivers/ide/triflex.c index 7953447eae0f..e53a1b78378b 100644 --- a/drivers/ide/triflex.c +++ b/drivers/ide/triflex.c | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | * Loosely based on the piix & svwks drivers. | 22 | * Loosely based on the piix & svwks drivers. |
| 23 | * | 23 | * |
| 24 | * Documentation: | 24 | * Documentation: |
| 25 | * Not publically available. | 25 | * Not publicly available. |
| 26 | */ | 26 | */ |
| 27 | 27 | ||
| 28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
diff --git a/drivers/ide/via82cxxx.c b/drivers/ide/via82cxxx.c index d2a0997b78f8..f46f49cfcc28 100644 --- a/drivers/ide/via82cxxx.c +++ b/drivers/ide/via82cxxx.c | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | * Andre Hedrick | 14 | * Andre Hedrick |
| 15 | * | 15 | * |
| 16 | * Documentation: | 16 | * Documentation: |
| 17 | * Obsolete device documentation publically available from via.com.tw | 17 | * Obsolete device documentation publicly available from via.com.tw |
| 18 | * Current device documentation available under NDA only | 18 | * Current device documentation available under NDA only |
| 19 | */ | 19 | */ |
| 20 | 20 | ||
diff --git a/drivers/infiniband/hw/amso1100/c2_ae.c b/drivers/infiniband/hw/amso1100/c2_ae.c index 62af74295dbe..24f9e3a90e8e 100644 --- a/drivers/infiniband/hw/amso1100/c2_ae.c +++ b/drivers/infiniband/hw/amso1100/c2_ae.c | |||
| @@ -157,7 +157,7 @@ void c2_ae_event(struct c2_dev *c2dev, u32 mq_index) | |||
| 157 | int status; | 157 | int status; |
| 158 | 158 | ||
| 159 | /* | 159 | /* |
| 160 | * retreive the message | 160 | * retrieve the message |
| 161 | */ | 161 | */ |
| 162 | wr = c2_mq_consume(mq); | 162 | wr = c2_mq_consume(mq); |
| 163 | if (!wr) | 163 | if (!wr) |
diff --git a/drivers/infiniband/hw/amso1100/c2_qp.c b/drivers/infiniband/hw/amso1100/c2_qp.c index d8f4bb8bf42e..0d7b6f23caff 100644 --- a/drivers/infiniband/hw/amso1100/c2_qp.c +++ b/drivers/infiniband/hw/amso1100/c2_qp.c | |||
| @@ -612,7 +612,7 @@ void c2_free_qp(struct c2_dev *c2dev, struct c2_qp *qp) | |||
| 612 | c2_unlock_cqs(send_cq, recv_cq); | 612 | c2_unlock_cqs(send_cq, recv_cq); |
| 613 | 613 | ||
| 614 | /* | 614 | /* |
| 615 | * Destory qp in the rnic... | 615 | * Destroy qp in the rnic... |
| 616 | */ | 616 | */ |
| 617 | destroy_qp(c2dev, qp); | 617 | destroy_qp(c2dev, qp); |
| 618 | 618 | ||
diff --git a/drivers/infiniband/hw/amso1100/c2_wr.h b/drivers/infiniband/hw/amso1100/c2_wr.h index c65fbdd6e469..8d4b4ca463ca 100644 --- a/drivers/infiniband/hw/amso1100/c2_wr.h +++ b/drivers/infiniband/hw/amso1100/c2_wr.h | |||
| @@ -131,7 +131,7 @@ enum c2wr_ids { | |||
| 131 | * All the preceding IDs are fixed, and must not change. | 131 | * All the preceding IDs are fixed, and must not change. |
| 132 | * You can add new IDs, but must not remove or reorder | 132 | * You can add new IDs, but must not remove or reorder |
| 133 | * any IDs. If you do, YOU will ruin any hope of | 133 | * any IDs. If you do, YOU will ruin any hope of |
| 134 | * compatability between versions. | 134 | * compatibility between versions. |
| 135 | */ | 135 | */ |
| 136 | CCWR_LAST, | 136 | CCWR_LAST, |
| 137 | 137 | ||
| @@ -242,7 +242,7 @@ enum c2_acf { | |||
| 242 | /* | 242 | /* |
| 243 | * to fix bug 1815 we define the max size allowable of the | 243 | * to fix bug 1815 we define the max size allowable of the |
| 244 | * terminate message (per the IETF spec).Refer to the IETF | 244 | * terminate message (per the IETF spec).Refer to the IETF |
| 245 | * protocal specification, section 12.1.6, page 64) | 245 | * protocol specification, section 12.1.6, page 64) |
| 246 | * The message is prefixed by 20 types of DDP info. | 246 | * The message is prefixed by 20 types of DDP info. |
| 247 | * | 247 | * |
| 248 | * Then the message has 6 bytes for the terminate control | 248 | * Then the message has 6 bytes for the terminate control |
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c index 47db4bf34628..58c0e417bc30 100644 --- a/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/drivers/infiniband/hw/ipath/ipath_driver.c | |||
| @@ -2392,7 +2392,7 @@ void ipath_shutdown_device(struct ipath_devdata *dd) | |||
| 2392 | /* | 2392 | /* |
| 2393 | * clear SerdesEnable and turn the leds off; do this here because | 2393 | * clear SerdesEnable and turn the leds off; do this here because |
| 2394 | * we are unloading, so don't count on interrupts to move along | 2394 | * we are unloading, so don't count on interrupts to move along |
| 2395 | * Turn the LEDs off explictly for the same reason. | 2395 | * Turn the LEDs off explicitly for the same reason. |
| 2396 | */ | 2396 | */ |
| 2397 | dd->ipath_f_quiet_serdes(dd); | 2397 | dd->ipath_f_quiet_serdes(dd); |
| 2398 | 2398 | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c index 6d4b29c4cd89..ee79a2d97b14 100644 --- a/drivers/infiniband/hw/ipath/ipath_file_ops.c +++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c | |||
| @@ -1972,7 +1972,7 @@ static int ipath_do_user_init(struct file *fp, | |||
| 1972 | * 0 to 1. So for those chips, we turn it off and then back on. | 1972 | * 0 to 1. So for those chips, we turn it off and then back on. |
| 1973 | * This will (very briefly) affect any other open ports, but the | 1973 | * This will (very briefly) affect any other open ports, but the |
| 1974 | * duration is very short, and therefore isn't an issue. We | 1974 | * duration is very short, and therefore isn't an issue. We |
| 1975 | * explictly set the in-memory tail copy to 0 beforehand, so we | 1975 | * explicitly set the in-memory tail copy to 0 beforehand, so we |
| 1976 | * don't have to wait to be sure the DMA update has happened | 1976 | * don't have to wait to be sure the DMA update has happened |
| 1977 | * (chip resets head/tail to 0 on transition to enable). | 1977 | * (chip resets head/tail to 0 on transition to enable). |
| 1978 | */ | 1978 | */ |
diff --git a/drivers/infiniband/hw/ipath/ipath_init_chip.c b/drivers/infiniband/hw/ipath/ipath_init_chip.c index fef0f4201257..7c1eebe8c7c9 100644 --- a/drivers/infiniband/hw/ipath/ipath_init_chip.c +++ b/drivers/infiniband/hw/ipath/ipath_init_chip.c | |||
| @@ -335,7 +335,7 @@ done: | |||
| 335 | * @dd: the infinipath device | 335 | * @dd: the infinipath device |
| 336 | * | 336 | * |
| 337 | * sanity check at least some of the values after reset, and | 337 | * sanity check at least some of the values after reset, and |
| 338 | * ensure no receive or transmit (explictly, in case reset | 338 | * ensure no receive or transmit (explicitly, in case reset |
| 339 | * failed | 339 | * failed |
| 340 | */ | 340 | */ |
| 341 | static int init_chip_reset(struct ipath_devdata *dd) | 341 | static int init_chip_reset(struct ipath_devdata *dd) |
diff --git a/drivers/infiniband/hw/ipath/ipath_ud.c b/drivers/infiniband/hw/ipath/ipath_ud.c index 7420715256a9..e8a2a915251e 100644 --- a/drivers/infiniband/hw/ipath/ipath_ud.c +++ b/drivers/infiniband/hw/ipath/ipath_ud.c | |||
| @@ -86,7 +86,7 @@ static void ipath_ud_loopback(struct ipath_qp *sqp, struct ipath_swqe *swqe) | |||
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | /* | 88 | /* |
| 89 | * A GRH is expected to preceed the data even if not | 89 | * A GRH is expected to precede the data even if not |
| 90 | * present on the wire. | 90 | * present on the wire. |
| 91 | */ | 91 | */ |
| 92 | length = swqe->length; | 92 | length = swqe->length; |
| @@ -515,7 +515,7 @@ void ipath_ud_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
| 515 | } | 515 | } |
| 516 | 516 | ||
| 517 | /* | 517 | /* |
| 518 | * A GRH is expected to preceed the data even if not | 518 | * A GRH is expected to precede the data even if not |
| 519 | * present on the wire. | 519 | * present on the wire. |
| 520 | */ | 520 | */ |
| 521 | wc.byte_len = tlen + sizeof(struct ib_grh); | 521 | wc.byte_len = tlen + sizeof(struct ib_grh); |
diff --git a/drivers/infiniband/hw/ipath/ipath_user_sdma.c b/drivers/infiniband/hw/ipath/ipath_user_sdma.c index be78f6643c06..f5cb13b21445 100644 --- a/drivers/infiniband/hw/ipath/ipath_user_sdma.c +++ b/drivers/infiniband/hw/ipath/ipath_user_sdma.c | |||
| @@ -236,7 +236,7 @@ static int ipath_user_sdma_num_pages(const struct iovec *iov) | |||
| 236 | return 1 + ((epage - spage) >> PAGE_SHIFT); | 236 | return 1 + ((epage - spage) >> PAGE_SHIFT); |
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | /* truncate length to page boundry */ | 239 | /* truncate length to page boundary */ |
| 240 | static int ipath_user_sdma_page_length(unsigned long addr, unsigned long len) | 240 | static int ipath_user_sdma_page_length(unsigned long addr, unsigned long len) |
| 241 | { | 241 | { |
| 242 | const unsigned long offset = addr & ~PAGE_MASK; | 242 | const unsigned long offset = addr & ~PAGE_MASK; |
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index cfa3a2b22232..33c7eedaba6c 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c | |||
| @@ -1397,7 +1397,7 @@ static void handle_fin_pkt(struct nes_cm_node *cm_node) | |||
| 1397 | cleanup_retrans_entry(cm_node); | 1397 | cleanup_retrans_entry(cm_node); |
| 1398 | cm_node->state = NES_CM_STATE_CLOSING; | 1398 | cm_node->state = NES_CM_STATE_CLOSING; |
| 1399 | send_ack(cm_node, NULL); | 1399 | send_ack(cm_node, NULL); |
| 1400 | /* Wait for ACK as this is simultanous close.. | 1400 | /* Wait for ACK as this is simultaneous close.. |
| 1401 | * After we receive ACK, do not send anything.. | 1401 | * After we receive ACK, do not send anything.. |
| 1402 | * Just rm the node.. Done.. */ | 1402 | * Just rm the node.. Done.. */ |
| 1403 | break; | 1403 | break; |
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c index 08c194861af5..10d0a5ec9add 100644 --- a/drivers/infiniband/hw/nes/nes_hw.c +++ b/drivers/infiniband/hw/nes/nes_hw.c | |||
| @@ -80,7 +80,7 @@ static void nes_terminate_start_timer(struct nes_qp *nesqp); | |||
| 80 | 80 | ||
| 81 | #ifdef CONFIG_INFINIBAND_NES_DEBUG | 81 | #ifdef CONFIG_INFINIBAND_NES_DEBUG |
| 82 | static unsigned char *nes_iwarp_state_str[] = { | 82 | static unsigned char *nes_iwarp_state_str[] = { |
| 83 | "Non-Existant", | 83 | "Non-Existent", |
| 84 | "Idle", | 84 | "Idle", |
| 85 | "RTS", | 85 | "RTS", |
| 86 | "Closing", | 86 | "Closing", |
| @@ -91,7 +91,7 @@ static unsigned char *nes_iwarp_state_str[] = { | |||
| 91 | }; | 91 | }; |
| 92 | 92 | ||
| 93 | static unsigned char *nes_tcp_state_str[] = { | 93 | static unsigned char *nes_tcp_state_str[] = { |
| 94 | "Non-Existant", | 94 | "Non-Existent", |
| 95 | "Closed", | 95 | "Closed", |
| 96 | "Listen", | 96 | "Listen", |
| 97 | "SYN Sent", | 97 | "SYN Sent", |
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c index 2c9c1933bbe3..e96b8fb5d44c 100644 --- a/drivers/infiniband/hw/nes/nes_nic.c +++ b/drivers/infiniband/hw/nes/nes_nic.c | |||
| @@ -902,7 +902,7 @@ static void nes_netdev_set_multicast_list(struct net_device *netdev) | |||
| 902 | nes_write_indexed(nesdev, NES_IDX_NIC_UNICAST_ALL, nic_active); | 902 | nes_write_indexed(nesdev, NES_IDX_NIC_UNICAST_ALL, nic_active); |
| 903 | } | 903 | } |
| 904 | 904 | ||
| 905 | nes_debug(NES_DBG_NIC_RX, "Number of MC entries = %d, Promiscous = %d, All Multicast = %d.\n", | 905 | nes_debug(NES_DBG_NIC_RX, "Number of MC entries = %d, Promiscuous = %d, All Multicast = %d.\n", |
| 906 | mc_count, !!(netdev->flags & IFF_PROMISC), | 906 | mc_count, !!(netdev->flags & IFF_PROMISC), |
| 907 | !!(netdev->flags & IFF_ALLMULTI)); | 907 | !!(netdev->flags & IFF_ALLMULTI)); |
| 908 | if (!mc_all_on) { | 908 | if (!mc_all_on) { |
diff --git a/drivers/infiniband/hw/qib/qib.h b/drivers/infiniband/hw/qib/qib.h index 73225eee3cc6..769a1d9da4b7 100644 --- a/drivers/infiniband/hw/qib/qib.h +++ b/drivers/infiniband/hw/qib/qib.h | |||
| @@ -653,7 +653,7 @@ struct diag_observer_list_elt; | |||
| 653 | 653 | ||
| 654 | /* device data struct now contains only "general per-device" info. | 654 | /* device data struct now contains only "general per-device" info. |
| 655 | * fields related to a physical IB port are in a qib_pportdata struct, | 655 | * fields related to a physical IB port are in a qib_pportdata struct, |
| 656 | * described above) while fields only used by a particualr chip-type are in | 656 | * described above) while fields only used by a particular chip-type are in |
| 657 | * a qib_chipdata struct, whose contents are opaque to this file. | 657 | * a qib_chipdata struct, whose contents are opaque to this file. |
| 658 | */ | 658 | */ |
| 659 | struct qib_devdata { | 659 | struct qib_devdata { |
diff --git a/drivers/infiniband/hw/qib/qib_file_ops.c b/drivers/infiniband/hw/qib/qib_file_ops.c index 75bfad16c114..406fca50d036 100644 --- a/drivers/infiniband/hw/qib/qib_file_ops.c +++ b/drivers/infiniband/hw/qib/qib_file_ops.c | |||
| @@ -1539,7 +1539,7 @@ done_chk_sdma: | |||
| 1539 | 1539 | ||
| 1540 | /* | 1540 | /* |
| 1541 | * If process has NOT already set it's affinity, select and | 1541 | * If process has NOT already set it's affinity, select and |
| 1542 | * reserve a processor for it, as a rendevous for all | 1542 | * reserve a processor for it, as a rendezvous for all |
| 1543 | * users of the driver. If they don't actually later | 1543 | * users of the driver. If they don't actually later |
| 1544 | * set affinity to this cpu, or set it to some other cpu, | 1544 | * set affinity to this cpu, or set it to some other cpu, |
| 1545 | * it just means that sooner or later we don't recommend | 1545 | * it just means that sooner or later we don't recommend |
| @@ -1657,7 +1657,7 @@ static int qib_do_user_init(struct file *fp, | |||
| 1657 | * 0 to 1. So for those chips, we turn it off and then back on. | 1657 | * 0 to 1. So for those chips, we turn it off and then back on. |
| 1658 | * This will (very briefly) affect any other open ctxts, but the | 1658 | * This will (very briefly) affect any other open ctxts, but the |
| 1659 | * duration is very short, and therefore isn't an issue. We | 1659 | * duration is very short, and therefore isn't an issue. We |
| 1660 | * explictly set the in-memory tail copy to 0 beforehand, so we | 1660 | * explicitly set the in-memory tail copy to 0 beforehand, so we |
| 1661 | * don't have to wait to be sure the DMA update has happened | 1661 | * don't have to wait to be sure the DMA update has happened |
| 1662 | * (chip resets head/tail to 0 on transition to enable). | 1662 | * (chip resets head/tail to 0 on transition to enable). |
| 1663 | */ | 1663 | */ |
diff --git a/drivers/infiniband/hw/qib/qib_iba6120.c b/drivers/infiniband/hw/qib/qib_iba6120.c index 774dea897e9c..7de4b7ebffc5 100644 --- a/drivers/infiniband/hw/qib/qib_iba6120.c +++ b/drivers/infiniband/hw/qib/qib_iba6120.c | |||
| @@ -1799,7 +1799,7 @@ static int qib_6120_setup_reset(struct qib_devdata *dd) | |||
| 1799 | /* | 1799 | /* |
| 1800 | * Keep chip from being accessed until we are ready. Use | 1800 | * Keep chip from being accessed until we are ready. Use |
| 1801 | * writeq() directly, to allow the write even though QIB_PRESENT | 1801 | * writeq() directly, to allow the write even though QIB_PRESENT |
| 1802 | * isnt' set. | 1802 | * isn't' set. |
| 1803 | */ | 1803 | */ |
| 1804 | dd->flags &= ~(QIB_INITTED | QIB_PRESENT); | 1804 | dd->flags &= ~(QIB_INITTED | QIB_PRESENT); |
| 1805 | dd->int_counter = 0; /* so we check interrupts work again */ | 1805 | dd->int_counter = 0; /* so we check interrupts work again */ |
| @@ -2171,7 +2171,7 @@ static void rcvctrl_6120_mod(struct qib_pportdata *ppd, unsigned int op, | |||
| 2171 | * Init the context registers also; if we were | 2171 | * Init the context registers also; if we were |
| 2172 | * disabled, tail and head should both be zero | 2172 | * disabled, tail and head should both be zero |
| 2173 | * already from the enable, but since we don't | 2173 | * already from the enable, but since we don't |
| 2174 | * know, we have to do it explictly. | 2174 | * know, we have to do it explicitly. |
| 2175 | */ | 2175 | */ |
| 2176 | val = qib_read_ureg32(dd, ur_rcvegrindextail, ctxt); | 2176 | val = qib_read_ureg32(dd, ur_rcvegrindextail, ctxt); |
| 2177 | qib_write_ureg(dd, ur_rcvegrindexhead, val, ctxt); | 2177 | qib_write_ureg(dd, ur_rcvegrindexhead, val, ctxt); |
diff --git a/drivers/infiniband/hw/qib/qib_iba7220.c b/drivers/infiniband/hw/qib/qib_iba7220.c index de799f17cb9e..74fe0360bec7 100644 --- a/drivers/infiniband/hw/qib/qib_iba7220.c +++ b/drivers/infiniband/hw/qib/qib_iba7220.c | |||
| @@ -2111,7 +2111,7 @@ static int qib_setup_7220_reset(struct qib_devdata *dd) | |||
| 2111 | /* | 2111 | /* |
| 2112 | * Keep chip from being accessed until we are ready. Use | 2112 | * Keep chip from being accessed until we are ready. Use |
| 2113 | * writeq() directly, to allow the write even though QIB_PRESENT | 2113 | * writeq() directly, to allow the write even though QIB_PRESENT |
| 2114 | * isnt' set. | 2114 | * isn't' set. |
| 2115 | */ | 2115 | */ |
| 2116 | dd->flags &= ~(QIB_INITTED | QIB_PRESENT); | 2116 | dd->flags &= ~(QIB_INITTED | QIB_PRESENT); |
| 2117 | dd->int_counter = 0; /* so we check interrupts work again */ | 2117 | dd->int_counter = 0; /* so we check interrupts work again */ |
| @@ -2479,7 +2479,7 @@ static int qib_7220_set_ib_cfg(struct qib_pportdata *ppd, int which, u32 val) | |||
| 2479 | * we command the link down. As with width, only write the | 2479 | * we command the link down. As with width, only write the |
| 2480 | * actual register if the link is currently down, otherwise | 2480 | * actual register if the link is currently down, otherwise |
| 2481 | * takes effect on next link change. Since setting is being | 2481 | * takes effect on next link change. Since setting is being |
| 2482 | * explictly requested (via MAD or sysfs), clear autoneg | 2482 | * explicitly requested (via MAD or sysfs), clear autoneg |
| 2483 | * failure status if speed autoneg is enabled. | 2483 | * failure status if speed autoneg is enabled. |
| 2484 | */ | 2484 | */ |
| 2485 | ppd->link_speed_enabled = val; | 2485 | ppd->link_speed_enabled = val; |
| @@ -2778,7 +2778,7 @@ static void rcvctrl_7220_mod(struct qib_pportdata *ppd, unsigned int op, | |||
| 2778 | * Init the context registers also; if we were | 2778 | * Init the context registers also; if we were |
| 2779 | * disabled, tail and head should both be zero | 2779 | * disabled, tail and head should both be zero |
| 2780 | * already from the enable, but since we don't | 2780 | * already from the enable, but since we don't |
| 2781 | * know, we have to do it explictly. | 2781 | * know, we have to do it explicitly. |
| 2782 | */ | 2782 | */ |
| 2783 | val = qib_read_ureg32(dd, ur_rcvegrindextail, ctxt); | 2783 | val = qib_read_ureg32(dd, ur_rcvegrindextail, ctxt); |
| 2784 | qib_write_ureg(dd, ur_rcvegrindexhead, val, ctxt); | 2784 | qib_write_ureg(dd, ur_rcvegrindexhead, val, ctxt); |
diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c index 4a2d21e15a70..55de3cf3441c 100644 --- a/drivers/infiniband/hw/qib/qib_iba7322.c +++ b/drivers/infiniband/hw/qib/qib_iba7322.c | |||
| @@ -3299,7 +3299,7 @@ static int qib_do_7322_reset(struct qib_devdata *dd) | |||
| 3299 | /* | 3299 | /* |
| 3300 | * Keep chip from being accessed until we are ready. Use | 3300 | * Keep chip from being accessed until we are ready. Use |
| 3301 | * writeq() directly, to allow the write even though QIB_PRESENT | 3301 | * writeq() directly, to allow the write even though QIB_PRESENT |
| 3302 | * isnt' set. | 3302 | * isn't' set. |
| 3303 | */ | 3303 | */ |
| 3304 | dd->flags &= ~(QIB_INITTED | QIB_PRESENT | QIB_BADINTR); | 3304 | dd->flags &= ~(QIB_INITTED | QIB_PRESENT | QIB_BADINTR); |
| 3305 | dd->flags |= QIB_DOING_RESET; | 3305 | dd->flags |= QIB_DOING_RESET; |
| @@ -3727,7 +3727,7 @@ static int qib_7322_set_ib_cfg(struct qib_pportdata *ppd, int which, u32 val) | |||
| 3727 | /* | 3727 | /* |
| 3728 | * As with width, only write the actual register if the | 3728 | * As with width, only write the actual register if the |
| 3729 | * link is currently down, otherwise takes effect on next | 3729 | * link is currently down, otherwise takes effect on next |
| 3730 | * link change. Since setting is being explictly requested | 3730 | * link change. Since setting is being explicitly requested |
| 3731 | * (via MAD or sysfs), clear autoneg failure status if speed | 3731 | * (via MAD or sysfs), clear autoneg failure status if speed |
| 3732 | * autoneg is enabled. | 3732 | * autoneg is enabled. |
| 3733 | */ | 3733 | */ |
| @@ -4163,7 +4163,7 @@ static void rcvctrl_7322_mod(struct qib_pportdata *ppd, unsigned int op, | |||
| 4163 | * Init the context registers also; if we were | 4163 | * Init the context registers also; if we were |
| 4164 | * disabled, tail and head should both be zero | 4164 | * disabled, tail and head should both be zero |
| 4165 | * already from the enable, but since we don't | 4165 | * already from the enable, but since we don't |
| 4166 | * know, we have to do it explictly. | 4166 | * know, we have to do it explicitly. |
| 4167 | */ | 4167 | */ |
| 4168 | val = qib_read_ureg32(dd, ur_rcvegrindextail, ctxt); | 4168 | val = qib_read_ureg32(dd, ur_rcvegrindextail, ctxt); |
| 4169 | qib_write_ureg(dd, ur_rcvegrindexhead, val, ctxt); | 4169 | qib_write_ureg(dd, ur_rcvegrindexhead, val, ctxt); |
| @@ -7483,7 +7483,7 @@ static int serdes_7322_init_new(struct qib_pportdata *ppd) | |||
| 7483 | /* Baseline Wander Correction Gain [13:4-0] (leave as default) */ | 7483 | /* Baseline Wander Correction Gain [13:4-0] (leave as default) */ |
| 7484 | /* Baseline Wander Correction Gain [3:7-5] (leave as default) */ | 7484 | /* Baseline Wander Correction Gain [3:7-5] (leave as default) */ |
| 7485 | /* Data Rate Select [5:7-6] (leave as default) */ | 7485 | /* Data Rate Select [5:7-6] (leave as default) */ |
| 7486 | /* RX Parralel Word Width [3:10-8] (leave as default) */ | 7486 | /* RX Parallel Word Width [3:10-8] (leave as default) */ |
| 7487 | 7487 | ||
| 7488 | /* RX REST */ | 7488 | /* RX REST */ |
| 7489 | /* Single- or Multi-channel reset */ | 7489 | /* Single- or Multi-channel reset */ |
diff --git a/drivers/infiniband/hw/qib/qib_init.c b/drivers/infiniband/hw/qib/qib_init.c index ffefb78b8949..a01f3fce8eb3 100644 --- a/drivers/infiniband/hw/qib/qib_init.c +++ b/drivers/infiniband/hw/qib/qib_init.c | |||
| @@ -346,7 +346,7 @@ done: | |||
| 346 | * @dd: the qlogic_ib device | 346 | * @dd: the qlogic_ib device |
| 347 | * | 347 | * |
| 348 | * sanity check at least some of the values after reset, and | 348 | * sanity check at least some of the values after reset, and |
| 349 | * ensure no receive or transmit (explictly, in case reset | 349 | * ensure no receive or transmit (explicitly, in case reset |
| 350 | * failed | 350 | * failed |
| 351 | */ | 351 | */ |
| 352 | static int init_after_reset(struct qib_devdata *dd) | 352 | static int init_after_reset(struct qib_devdata *dd) |
diff --git a/drivers/infiniband/hw/qib/qib_mad.h b/drivers/infiniband/hw/qib/qib_mad.h index 147aff9117d7..7840ab593bcf 100644 --- a/drivers/infiniband/hw/qib/qib_mad.h +++ b/drivers/infiniband/hw/qib/qib_mad.h | |||
| @@ -73,7 +73,7 @@ struct ib_mad_notice_attr { | |||
| 73 | 73 | ||
| 74 | struct { | 74 | struct { |
| 75 | __be16 reserved; | 75 | __be16 reserved; |
| 76 | __be16 lid; /* LID where change occured */ | 76 | __be16 lid; /* LID where change occurred */ |
| 77 | u8 reserved2; | 77 | u8 reserved2; |
| 78 | u8 local_changes; /* low bit - local changes */ | 78 | u8 local_changes; /* low bit - local changes */ |
| 79 | __be32 new_cap_mask; /* new capability mask */ | 79 | __be32 new_cap_mask; /* new capability mask */ |
diff --git a/drivers/infiniband/hw/qib/qib_twsi.c b/drivers/infiniband/hw/qib/qib_twsi.c index 6f31ca5039db..ddde72e11edb 100644 --- a/drivers/infiniband/hw/qib/qib_twsi.c +++ b/drivers/infiniband/hw/qib/qib_twsi.c | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | * QLogic_IB "Two Wire Serial Interface" driver. | 41 | * QLogic_IB "Two Wire Serial Interface" driver. |
| 42 | * Originally written for a not-quite-i2c serial eeprom, which is | 42 | * Originally written for a not-quite-i2c serial eeprom, which is |
| 43 | * still used on some supported boards. Later boards have added a | 43 | * still used on some supported boards. Later boards have added a |
| 44 | * variety of other uses, most board-specific, so teh bit-boffing | 44 | * variety of other uses, most board-specific, so the bit-boffing |
| 45 | * part has been split off to this file, while the other parts | 45 | * part has been split off to this file, while the other parts |
| 46 | * have been moved to chip-specific files. | 46 | * have been moved to chip-specific files. |
| 47 | * | 47 | * |
diff --git a/drivers/infiniband/hw/qib/qib_ud.c b/drivers/infiniband/hw/qib/qib_ud.c index 4a51fd1e9cb7..828609fa4d28 100644 --- a/drivers/infiniband/hw/qib/qib_ud.c +++ b/drivers/infiniband/hw/qib/qib_ud.c | |||
| @@ -116,7 +116,7 @@ static void qib_ud_loopback(struct qib_qp *sqp, struct qib_swqe *swqe) | |||
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | /* | 118 | /* |
| 119 | * A GRH is expected to preceed the data even if not | 119 | * A GRH is expected to precede the data even if not |
| 120 | * present on the wire. | 120 | * present on the wire. |
| 121 | */ | 121 | */ |
| 122 | length = swqe->length; | 122 | length = swqe->length; |
| @@ -520,7 +520,7 @@ void qib_ud_rcv(struct qib_ibport *ibp, struct qib_ib_header *hdr, | |||
| 520 | goto drop; | 520 | goto drop; |
| 521 | 521 | ||
| 522 | /* | 522 | /* |
| 523 | * A GRH is expected to preceed the data even if not | 523 | * A GRH is expected to precede the data even if not |
| 524 | * present on the wire. | 524 | * present on the wire. |
| 525 | */ | 525 | */ |
| 526 | wc.byte_len = tlen + sizeof(struct ib_grh); | 526 | wc.byte_len = tlen + sizeof(struct ib_grh); |
diff --git a/drivers/infiniband/hw/qib/qib_user_sdma.c b/drivers/infiniband/hw/qib/qib_user_sdma.c index 66208bcd7c13..82442085cbe6 100644 --- a/drivers/infiniband/hw/qib/qib_user_sdma.c +++ b/drivers/infiniband/hw/qib/qib_user_sdma.c | |||
| @@ -239,7 +239,7 @@ static int qib_user_sdma_num_pages(const struct iovec *iov) | |||
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | /* | 241 | /* |
| 242 | * Truncate length to page boundry. | 242 | * Truncate length to page boundary. |
| 243 | */ | 243 | */ |
| 244 | static int qib_user_sdma_page_length(unsigned long addr, unsigned long len) | 244 | static int qib_user_sdma_page_length(unsigned long addr, unsigned long len) |
| 245 | { | 245 | { |
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h index f1df01567bb6..2f02ab0ccc1e 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.h +++ b/drivers/infiniband/ulp/iser/iscsi_iser.h | |||
| @@ -91,7 +91,7 @@ | |||
| 91 | #define SIZE_4K (1UL << SHIFT_4K) | 91 | #define SIZE_4K (1UL << SHIFT_4K) |
| 92 | #define MASK_4K (~(SIZE_4K-1)) | 92 | #define MASK_4K (~(SIZE_4K-1)) |
| 93 | 93 | ||
| 94 | /* support upto 512KB in one RDMA */ | 94 | /* support up to 512KB in one RDMA */ |
| 95 | #define ISCSI_ISER_SG_TABLESIZE (0x80000 >> SHIFT_4K) | 95 | #define ISCSI_ISER_SG_TABLESIZE (0x80000 >> SHIFT_4K) |
| 96 | #define ISER_DEF_CMD_PER_LUN 128 | 96 | #define ISER_DEF_CMD_PER_LUN 128 |
| 97 | 97 | ||
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 7f42d3a454d2..88d8e4cb419a 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
| @@ -39,13 +39,13 @@ struct evdev { | |||
| 39 | }; | 39 | }; |
| 40 | 40 | ||
| 41 | struct evdev_client { | 41 | struct evdev_client { |
| 42 | int head; | 42 | unsigned int head; |
| 43 | int tail; | 43 | unsigned int tail; |
| 44 | spinlock_t buffer_lock; /* protects access to buffer, head and tail */ | 44 | spinlock_t buffer_lock; /* protects access to buffer, head and tail */ |
| 45 | struct fasync_struct *fasync; | 45 | struct fasync_struct *fasync; |
| 46 | struct evdev *evdev; | 46 | struct evdev *evdev; |
| 47 | struct list_head node; | 47 | struct list_head node; |
| 48 | int bufsize; | 48 | unsigned int bufsize; |
| 49 | struct input_event buffer[]; | 49 | struct input_event buffer[]; |
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| @@ -55,16 +55,25 @@ static DEFINE_MUTEX(evdev_table_mutex); | |||
| 55 | static void evdev_pass_event(struct evdev_client *client, | 55 | static void evdev_pass_event(struct evdev_client *client, |
| 56 | struct input_event *event) | 56 | struct input_event *event) |
| 57 | { | 57 | { |
| 58 | /* | 58 | /* Interrupts are disabled, just acquire the lock. */ |
| 59 | * Interrupts are disabled, just acquire the lock. | ||
| 60 | * Make sure we don't leave with the client buffer | ||
| 61 | * "empty" by having client->head == client->tail. | ||
| 62 | */ | ||
| 63 | spin_lock(&client->buffer_lock); | 59 | spin_lock(&client->buffer_lock); |
| 64 | do { | 60 | |
| 65 | client->buffer[client->head++] = *event; | 61 | client->buffer[client->head++] = *event; |
| 66 | client->head &= client->bufsize - 1; | 62 | client->head &= client->bufsize - 1; |
| 67 | } while (client->head == client->tail); | 63 | |
| 64 | if (unlikely(client->head == client->tail)) { | ||
| 65 | /* | ||
| 66 | * This effectively "drops" all unconsumed events, leaving | ||
| 67 | * EV_SYN/SYN_DROPPED plus the newest event in the queue. | ||
| 68 | */ | ||
| 69 | client->tail = (client->head - 2) & (client->bufsize - 1); | ||
| 70 | |||
| 71 | client->buffer[client->tail].time = event->time; | ||
| 72 | client->buffer[client->tail].type = EV_SYN; | ||
| 73 | client->buffer[client->tail].code = SYN_DROPPED; | ||
| 74 | client->buffer[client->tail].value = 0; | ||
| 75 | } | ||
| 76 | |||
| 68 | spin_unlock(&client->buffer_lock); | 77 | spin_unlock(&client->buffer_lock); |
| 69 | 78 | ||
| 70 | if (event->type == EV_SYN) | 79 | if (event->type == EV_SYN) |
diff --git a/drivers/input/input.c b/drivers/input/input.c index d6e8bd8a851c..ebbceedc92f4 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
| @@ -1746,6 +1746,42 @@ void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int | |||
| 1746 | } | 1746 | } |
| 1747 | EXPORT_SYMBOL(input_set_capability); | 1747 | EXPORT_SYMBOL(input_set_capability); |
| 1748 | 1748 | ||
| 1749 | static unsigned int input_estimate_events_per_packet(struct input_dev *dev) | ||
| 1750 | { | ||
| 1751 | int mt_slots; | ||
| 1752 | int i; | ||
| 1753 | unsigned int events; | ||
| 1754 | |||
| 1755 | if (dev->mtsize) { | ||
| 1756 | mt_slots = dev->mtsize; | ||
| 1757 | } else if (test_bit(ABS_MT_TRACKING_ID, dev->absbit)) { | ||
| 1758 | mt_slots = dev->absinfo[ABS_MT_TRACKING_ID].maximum - | ||
| 1759 | dev->absinfo[ABS_MT_TRACKING_ID].minimum + 1, | ||
| 1760 | clamp(mt_slots, 2, 32); | ||
| 1761 | } else if (test_bit(ABS_MT_POSITION_X, dev->absbit)) { | ||
| 1762 | mt_slots = 2; | ||
| 1763 | } else { | ||
| 1764 | mt_slots = 0; | ||
| 1765 | } | ||
| 1766 | |||
| 1767 | events = mt_slots + 1; /* count SYN_MT_REPORT and SYN_REPORT */ | ||
| 1768 | |||
| 1769 | for (i = 0; i < ABS_CNT; i++) { | ||
| 1770 | if (test_bit(i, dev->absbit)) { | ||
| 1771 | if (input_is_mt_axis(i)) | ||
| 1772 | events += mt_slots; | ||
| 1773 | else | ||
| 1774 | events++; | ||
| 1775 | } | ||
| 1776 | } | ||
| 1777 | |||
| 1778 | for (i = 0; i < REL_CNT; i++) | ||
| 1779 | if (test_bit(i, dev->relbit)) | ||
| 1780 | events++; | ||
| 1781 | |||
| 1782 | return events; | ||
| 1783 | } | ||
| 1784 | |||
| 1749 | #define INPUT_CLEANSE_BITMASK(dev, type, bits) \ | 1785 | #define INPUT_CLEANSE_BITMASK(dev, type, bits) \ |
| 1750 | do { \ | 1786 | do { \ |
| 1751 | if (!test_bit(EV_##type, dev->evbit)) \ | 1787 | if (!test_bit(EV_##type, dev->evbit)) \ |
| @@ -1793,6 +1829,10 @@ int input_register_device(struct input_dev *dev) | |||
| 1793 | /* Make sure that bitmasks not mentioned in dev->evbit are clean. */ | 1829 | /* Make sure that bitmasks not mentioned in dev->evbit are clean. */ |
| 1794 | input_cleanse_bitmasks(dev); | 1830 | input_cleanse_bitmasks(dev); |
| 1795 | 1831 | ||
| 1832 | if (!dev->hint_events_per_packet) | ||
| 1833 | dev->hint_events_per_packet = | ||
| 1834 | input_estimate_events_per_packet(dev); | ||
| 1835 | |||
| 1796 | /* | 1836 | /* |
| 1797 | * If delay and period are pre-set by the driver, then autorepeating | 1837 | * If delay and period are pre-set by the driver, then autorepeating |
| 1798 | * is handled by the driver itself and we don't do it in input.c. | 1838 | * is handled by the driver itself and we don't do it in input.c. |
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index 3182c9cd1b0e..5688b5c88f24 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c | |||
| @@ -758,7 +758,7 @@ static void joydev_remove_chrdev(struct joydev *joydev) | |||
| 758 | } | 758 | } |
| 759 | 759 | ||
| 760 | /* | 760 | /* |
| 761 | * Mark device non-existant. This disables writes, ioctls and | 761 | * Mark device non-existent. This disables writes, ioctls and |
| 762 | * prevents new users from opening the device. Already posted | 762 | * prevents new users from opening the device. Already posted |
| 763 | * blocking reads will stay, however new ones will fail. | 763 | * blocking reads will stay, however new ones will fail. |
| 764 | */ | 764 | */ |
| @@ -777,7 +777,7 @@ static void joydev_cleanup(struct joydev *joydev) | |||
| 777 | joydev_hangup(joydev); | 777 | joydev_hangup(joydev); |
| 778 | joydev_remove_chrdev(joydev); | 778 | joydev_remove_chrdev(joydev); |
| 779 | 779 | ||
| 780 | /* joydev is marked dead so noone else accesses joydev->open */ | 780 | /* joydev is marked dead so no one else accesses joydev->open */ |
| 781 | if (joydev->open) | 781 | if (joydev->open) |
| 782 | input_close_device(handle); | 782 | input_close_device(handle); |
| 783 | } | 783 | } |
diff --git a/drivers/input/joystick/a3d.c b/drivers/input/joystick/a3d.c index d259b41354b8..1639ab2b94b7 100644 --- a/drivers/input/joystick/a3d.c +++ b/drivers/input/joystick/a3d.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | */ | 3 | */ |
| 4 | 4 | ||
| 5 | /* | 5 | /* |
| 6 | * FP-Gaming Assasin 3D joystick driver for Linux | 6 | * FP-Gaming Assassin 3D joystick driver for Linux |
| 7 | */ | 7 | */ |
| 8 | 8 | ||
| 9 | /* | 9 | /* |
| @@ -34,7 +34,7 @@ | |||
| 34 | #include <linux/input.h> | 34 | #include <linux/input.h> |
| 35 | #include <linux/jiffies.h> | 35 | #include <linux/jiffies.h> |
| 36 | 36 | ||
| 37 | #define DRIVER_DESC "FP-Gaming Assasin 3D joystick driver" | 37 | #define DRIVER_DESC "FP-Gaming Assassin 3D joystick driver" |
| 38 | 38 | ||
| 39 | MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>"); | 39 | MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>"); |
| 40 | MODULE_DESCRIPTION(DRIVER_DESC); | 40 | MODULE_DESCRIPTION(DRIVER_DESC); |
diff --git a/drivers/input/keyboard/davinci_keyscan.c b/drivers/input/keyboard/davinci_keyscan.c index a91ee941b5c1..cd89d17162a3 100644 --- a/drivers/input/keyboard/davinci_keyscan.c +++ b/drivers/input/keyboard/davinci_keyscan.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * | 5 | * |
| 6 | * Author: Miguel Aguilar <miguel.aguilar@ridgerun.com> | 6 | * Author: Miguel Aguilar <miguel.aguilar@ridgerun.com> |
| 7 | * | 7 | * |
| 8 | * Intial Code: Sandeep Paulraj <s-paulraj@ti.com> | 8 | * Initial Code: Sandeep Paulraj <s-paulraj@ti.com> |
| 9 | * | 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License as published by | 11 | * it under the terms of the GNU General Public License as published by |
diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c index bee03d64c453..d712dffd2157 100644 --- a/drivers/input/keyboard/spear-keyboard.c +++ b/drivers/input/keyboard/spear-keyboard.c | |||
| @@ -69,7 +69,7 @@ static irqreturn_t spear_kbd_interrupt(int irq, void *dev_id) | |||
| 69 | u8 sts, val; | 69 | u8 sts, val; |
| 70 | 70 | ||
| 71 | sts = readb(kbd->io_base + STATUS_REG); | 71 | sts = readb(kbd->io_base + STATUS_REG); |
| 72 | if (sts & DATA_AVAIL) | 72 | if (!(sts & DATA_AVAIL)) |
| 73 | return IRQ_NONE; | 73 | return IRQ_NONE; |
| 74 | 74 | ||
| 75 | if (kbd->last_key != KEY_RESERVED) { | 75 | if (kbd->last_key != KEY_RESERVED) { |
diff --git a/drivers/input/keyboard/twl4030_keypad.c b/drivers/input/keyboard/twl4030_keypad.c index 09bef79d9da1..a26922cf0e84 100644 --- a/drivers/input/keyboard/twl4030_keypad.c +++ b/drivers/input/keyboard/twl4030_keypad.c | |||
| @@ -332,18 +332,20 @@ static int __devinit twl4030_kp_program(struct twl4030_keypad *kp) | |||
| 332 | static int __devinit twl4030_kp_probe(struct platform_device *pdev) | 332 | static int __devinit twl4030_kp_probe(struct platform_device *pdev) |
| 333 | { | 333 | { |
| 334 | struct twl4030_keypad_data *pdata = pdev->dev.platform_data; | 334 | struct twl4030_keypad_data *pdata = pdev->dev.platform_data; |
| 335 | const struct matrix_keymap_data *keymap_data = pdata->keymap_data; | 335 | const struct matrix_keymap_data *keymap_data; |
| 336 | struct twl4030_keypad *kp; | 336 | struct twl4030_keypad *kp; |
| 337 | struct input_dev *input; | 337 | struct input_dev *input; |
| 338 | u8 reg; | 338 | u8 reg; |
| 339 | int error; | 339 | int error; |
| 340 | 340 | ||
| 341 | if (!pdata || !pdata->rows || !pdata->cols || | 341 | if (!pdata || !pdata->rows || !pdata->cols || !pdata->keymap_data || |
| 342 | pdata->rows > TWL4030_MAX_ROWS || pdata->cols > TWL4030_MAX_COLS) { | 342 | pdata->rows > TWL4030_MAX_ROWS || pdata->cols > TWL4030_MAX_COLS) { |
| 343 | dev_err(&pdev->dev, "Invalid platform_data\n"); | 343 | dev_err(&pdev->dev, "Invalid platform_data\n"); |
| 344 | return -EINVAL; | 344 | return -EINVAL; |
| 345 | } | 345 | } |
| 346 | 346 | ||
| 347 | keymap_data = pdata->keymap_data; | ||
| 348 | |||
| 347 | kp = kzalloc(sizeof(*kp), GFP_KERNEL); | 349 | kp = kzalloc(sizeof(*kp), GFP_KERNEL); |
| 348 | input = input_allocate_device(); | 350 | input = input_allocate_device(); |
| 349 | if (!kp || !input) { | 351 | if (!kp || !input) { |
diff --git a/drivers/input/misc/adxl34x.c b/drivers/input/misc/adxl34x.c index de5900d50788..144ddbdeb9b3 100644 --- a/drivers/input/misc/adxl34x.c +++ b/drivers/input/misc/adxl34x.c | |||
| @@ -716,7 +716,7 @@ struct adxl34x *adxl34x_probe(struct device *dev, int irq, | |||
| 716 | pdata = dev->platform_data; | 716 | pdata = dev->platform_data; |
| 717 | if (!pdata) { | 717 | if (!pdata) { |
| 718 | dev_dbg(dev, | 718 | dev_dbg(dev, |
| 719 | "No platfrom data: Using default initialization\n"); | 719 | "No platform data: Using default initialization\n"); |
| 720 | pdata = &adxl34x_default_init; | 720 | pdata = &adxl34x_default_init; |
| 721 | } | 721 | } |
| 722 | 722 | ||
diff --git a/drivers/input/misc/keyspan_remote.c b/drivers/input/misc/keyspan_remote.c index a93c525475c6..fc62256c963f 100644 --- a/drivers/input/misc/keyspan_remote.c +++ b/drivers/input/misc/keyspan_remote.c | |||
| @@ -312,7 +312,7 @@ static void keyspan_check_data(struct usb_keyspan *remote) | |||
| 312 | remote->data.tester = remote->data.tester >> 5; | 312 | remote->data.tester = remote->data.tester >> 5; |
| 313 | remote->data.bits_left -= 5; | 313 | remote->data.bits_left -= 5; |
| 314 | } else { | 314 | } else { |
| 315 | err("Bad message recieved, no stop bit found.\n"); | 315 | err("Bad message received, no stop bit found.\n"); |
| 316 | } | 316 | } |
| 317 | 317 | ||
| 318 | dev_dbg(&remote->udev->dev, | 318 | dev_dbg(&remote->udev->dev, |
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index 364bdf43a381..736056897e50 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c | |||
| @@ -302,10 +302,14 @@ static int uinput_validate_absbits(struct input_dev *dev) | |||
| 302 | int retval = 0; | 302 | int retval = 0; |
| 303 | 303 | ||
| 304 | for (cnt = 0; cnt < ABS_CNT; cnt++) { | 304 | for (cnt = 0; cnt < ABS_CNT; cnt++) { |
| 305 | int min, max; | ||
| 305 | if (!test_bit(cnt, dev->absbit)) | 306 | if (!test_bit(cnt, dev->absbit)) |
| 306 | continue; | 307 | continue; |
| 307 | 308 | ||
| 308 | if (input_abs_get_max(dev, cnt) <= input_abs_get_min(dev, cnt)) { | 309 | min = input_abs_get_min(dev, cnt); |
| 310 | max = input_abs_get_max(dev, cnt); | ||
| 311 | |||
| 312 | if ((min != 0 || max != 0) && max <= min) { | ||
| 309 | printk(KERN_DEBUG | 313 | printk(KERN_DEBUG |
| 310 | "%s: invalid abs[%02x] min:%d max:%d\n", | 314 | "%s: invalid abs[%02x] min:%d max:%d\n", |
| 311 | UINPUT_NAME, cnt, | 315 | UINPUT_NAME, cnt, |
diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c index 12501de0c5cd..52b419348983 100644 --- a/drivers/input/misc/wistron_btns.c +++ b/drivers/input/misc/wistron_btns.c | |||
| @@ -274,7 +274,7 @@ static struct key_entry keymap_fs_amilo_pro_v3505[] __initdata = { | |||
| 274 | { KE_BLUETOOTH, 0x30 }, /* Fn+F10 */ | 274 | { KE_BLUETOOTH, 0x30 }, /* Fn+F10 */ |
| 275 | { KE_KEY, 0x31, {KEY_MAIL} }, /* mail button */ | 275 | { KE_KEY, 0x31, {KEY_MAIL} }, /* mail button */ |
| 276 | { KE_KEY, 0x36, {KEY_WWW} }, /* www button */ | 276 | { KE_KEY, 0x36, {KEY_WWW} }, /* www button */ |
| 277 | { KE_WIFI, 0x78 }, /* satelite dish button */ | 277 | { KE_WIFI, 0x78 }, /* satellite dish button */ |
| 278 | { KE_END, 0 } | 278 | { KE_END, 0 } |
| 279 | }; | 279 | }; |
| 280 | 280 | ||
diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c index 7077f9bf5ead..62bae99424e6 100644 --- a/drivers/input/misc/xen-kbdfront.c +++ b/drivers/input/misc/xen-kbdfront.c | |||
| @@ -303,7 +303,7 @@ static void xenkbd_backend_changed(struct xenbus_device *dev, | |||
| 303 | enum xenbus_state backend_state) | 303 | enum xenbus_state backend_state) |
| 304 | { | 304 | { |
| 305 | struct xenkbd_info *info = dev_get_drvdata(&dev->dev); | 305 | struct xenkbd_info *info = dev_get_drvdata(&dev->dev); |
| 306 | int val; | 306 | int ret, val; |
| 307 | 307 | ||
| 308 | switch (backend_state) { | 308 | switch (backend_state) { |
| 309 | case XenbusStateInitialising: | 309 | case XenbusStateInitialising: |
| @@ -316,6 +316,17 @@ static void xenkbd_backend_changed(struct xenbus_device *dev, | |||
| 316 | 316 | ||
| 317 | case XenbusStateInitWait: | 317 | case XenbusStateInitWait: |
| 318 | InitWait: | 318 | InitWait: |
| 319 | ret = xenbus_scanf(XBT_NIL, info->xbdev->otherend, | ||
| 320 | "feature-abs-pointer", "%d", &val); | ||
| 321 | if (ret < 0) | ||
| 322 | val = 0; | ||
| 323 | if (val) { | ||
| 324 | ret = xenbus_printf(XBT_NIL, info->xbdev->nodename, | ||
| 325 | "request-abs-pointer", "1"); | ||
| 326 | if (ret) | ||
| 327 | pr_warning("xenkbd: can't request abs-pointer"); | ||
| 328 | } | ||
| 329 | |||
| 319 | xenbus_switch_state(dev, XenbusStateConnected); | 330 | xenbus_switch_state(dev, XenbusStateConnected); |
| 320 | break; | 331 | break; |
| 321 | 332 | ||
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c index 3aead91bacc8..3126983c004a 100644 --- a/drivers/input/mouse/bcm5974.c +++ b/drivers/input/mouse/bcm5974.c | |||
| @@ -639,7 +639,7 @@ exit: | |||
| 639 | * device, resulting in trackpad malfunction under certain | 639 | * device, resulting in trackpad malfunction under certain |
| 640 | * circumstances. To get around this problem, there is at least one | 640 | * circumstances. To get around this problem, there is at least one |
| 641 | * example that utilizes the USB_QUIRK_RESET_RESUME quirk in order to | 641 | * example that utilizes the USB_QUIRK_RESET_RESUME quirk in order to |
| 642 | * recieve a reset_resume request rather than the normal resume. | 642 | * receive a reset_resume request rather than the normal resume. |
| 643 | * Since the implementation of reset_resume is equal to mode switch | 643 | * Since the implementation of reset_resume is equal to mode switch |
| 644 | * plus start_traffic, it seems easier to always do the switch when | 644 | * plus start_traffic, it seems easier to always do the switch when |
| 645 | * starting traffic on the device. | 645 | * starting traffic on the device. |
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index aa186cf6c514..e06e045bf907 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
| @@ -836,8 +836,8 @@ static const struct dmi_system_id __initconst toshiba_dmi_table[] = { | |||
| 836 | }, | 836 | }, |
| 837 | 837 | ||
| 838 | }, | 838 | }, |
| 839 | { } | ||
| 840 | #endif | 839 | #endif |
| 840 | { } | ||
| 841 | }; | 841 | }; |
| 842 | 842 | ||
| 843 | static bool broken_olpc_ec; | 843 | static bool broken_olpc_ec; |
| @@ -851,8 +851,8 @@ static const struct dmi_system_id __initconst olpc_dmi_table[] = { | |||
| 851 | DMI_MATCH(DMI_PRODUCT_NAME, "XO"), | 851 | DMI_MATCH(DMI_PRODUCT_NAME, "XO"), |
| 852 | }, | 852 | }, |
| 853 | }, | 853 | }, |
| 854 | { } | ||
| 855 | #endif | 854 | #endif |
| 855 | { } | ||
| 856 | }; | 856 | }; |
| 857 | 857 | ||
| 858 | void __init synaptics_module_init(void) | 858 | void __init synaptics_module_init(void) |
diff --git a/drivers/input/mouse/synaptics_i2c.c b/drivers/input/mouse/synaptics_i2c.c index f6aa26d305ed..cba3c84d2f21 100644 --- a/drivers/input/mouse/synaptics_i2c.c +++ b/drivers/input/mouse/synaptics_i2c.c | |||
| @@ -462,7 +462,7 @@ static void synaptics_i2c_work_handler(struct work_struct *work) | |||
| 462 | * While interrupt driven, there is no real need to poll the device. | 462 | * While interrupt driven, there is no real need to poll the device. |
| 463 | * But touchpads are very sensitive, so there could be errors | 463 | * But touchpads are very sensitive, so there could be errors |
| 464 | * related to physical environment and the attention line isn't | 464 | * related to physical environment and the attention line isn't |
| 465 | * neccesarily asserted. In such case we can lose the touchpad. | 465 | * necessarily asserted. In such case we can lose the touchpad. |
| 466 | * We poll the device once in THREAD_IRQ_SLEEP_SECS and | 466 | * We poll the device once in THREAD_IRQ_SLEEP_SECS and |
| 467 | * if error is detected, we try to reset and reconfigure the touchpad. | 467 | * if error is detected, we try to reset and reconfigure the touchpad. |
| 468 | */ | 468 | */ |
diff --git a/drivers/input/mouse/vsxxxaa.c b/drivers/input/mouse/vsxxxaa.c index bf2c0c80d6cc..eb9a3cfbeefa 100644 --- a/drivers/input/mouse/vsxxxaa.c +++ b/drivers/input/mouse/vsxxxaa.c | |||
| @@ -334,7 +334,7 @@ static void vsxxxaa_handle_POR_packet(struct vsxxxaa *mouse) | |||
| 334 | * M: manufacturer location code | 334 | * M: manufacturer location code |
| 335 | * R: revision code | 335 | * R: revision code |
| 336 | * E: Error code. If it's in the range of 0x00..0x1f, only some | 336 | * E: Error code. If it's in the range of 0x00..0x1f, only some |
| 337 | * minor problem occured. Errors >= 0x20 are considered bad | 337 | * minor problem occurred. Errors >= 0x20 are considered bad |
| 338 | * and the device may not work properly... | 338 | * and the device may not work properly... |
| 339 | * D: <0010> == mouse, <0100> == tablet | 339 | * D: <0010> == mouse, <0100> == tablet |
| 340 | */ | 340 | */ |
diff --git a/drivers/input/serio/hp_sdc.c b/drivers/input/serio/hp_sdc.c index 8c0b51c31424..42206205e4f5 100644 --- a/drivers/input/serio/hp_sdc.c +++ b/drivers/input/serio/hp_sdc.c | |||
| @@ -955,7 +955,7 @@ static int __init hp_sdc_init_hppa(struct parisc_device *d) | |||
| 955 | INIT_DELAYED_WORK(&moduleloader_work, request_module_delayed); | 955 | INIT_DELAYED_WORK(&moduleloader_work, request_module_delayed); |
| 956 | 956 | ||
| 957 | ret = hp_sdc_init(); | 957 | ret = hp_sdc_init(); |
| 958 | /* after successfull initialization give SDC some time to settle | 958 | /* after successful initialization give SDC some time to settle |
| 959 | * and then load the hp_sdc_mlc upper layer driver */ | 959 | * and then load the hp_sdc_mlc upper layer driver */ |
| 960 | if (!ret) | 960 | if (!ret) |
| 961 | schedule_delayed_work(&moduleloader_work, | 961 | schedule_delayed_work(&moduleloader_work, |
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index ac4c93689ab9..d37a48e099d0 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
| @@ -869,15 +869,15 @@ static int i8042_controller_selftest(void) | |||
| 869 | do { | 869 | do { |
| 870 | 870 | ||
| 871 | if (i8042_command(¶m, I8042_CMD_CTL_TEST)) { | 871 | if (i8042_command(¶m, I8042_CMD_CTL_TEST)) { |
| 872 | pr_err("i8042 controller self test timeout\n"); | 872 | pr_err("i8042 controller selftest timeout\n"); |
| 873 | return -ENODEV; | 873 | return -ENODEV; |
| 874 | } | 874 | } |
| 875 | 875 | ||
| 876 | if (param == I8042_RET_CTL_TEST) | 876 | if (param == I8042_RET_CTL_TEST) |
| 877 | return 0; | 877 | return 0; |
| 878 | 878 | ||
| 879 | pr_err("i8042 controller selftest failed. (%#x != %#x)\n", | 879 | dbg("i8042 controller selftest: %#x != %#x\n", |
| 880 | param, I8042_RET_CTL_TEST); | 880 | param, I8042_RET_CTL_TEST); |
| 881 | msleep(50); | 881 | msleep(50); |
| 882 | } while (i++ < 5); | 882 | } while (i++ < 5); |
| 883 | 883 | ||
| @@ -891,6 +891,7 @@ static int i8042_controller_selftest(void) | |||
| 891 | pr_info("giving up on controller selftest, continuing anyway...\n"); | 891 | pr_info("giving up on controller selftest, continuing anyway...\n"); |
| 892 | return 0; | 892 | return 0; |
| 893 | #else | 893 | #else |
| 894 | pr_err("i8042 controller selftest failed\n"); | ||
| 894 | return -EIO; | 895 | return -EIO; |
| 895 | #endif | 896 | #endif |
| 896 | } | 897 | } |
diff --git a/drivers/input/serio/rpckbd.c b/drivers/input/serio/rpckbd.c index 9da6fbcaaa7e..7ec3c97dc1b9 100644 --- a/drivers/input/serio/rpckbd.c +++ b/drivers/input/serio/rpckbd.c | |||
| @@ -90,7 +90,7 @@ static int rpckbd_open(struct serio *port) | |||
| 90 | 90 | ||
| 91 | if (request_irq(IRQ_KEYBOARDTX, rpckbd_tx, 0, "rpckbd", port) != 0) { | 91 | if (request_irq(IRQ_KEYBOARDTX, rpckbd_tx, 0, "rpckbd", port) != 0) { |
| 92 | printk(KERN_ERR "rpckbd.c: Could not allocate keyboard transmit IRQ\n"); | 92 | printk(KERN_ERR "rpckbd.c: Could not allocate keyboard transmit IRQ\n"); |
| 93 | free_irq(IRQ_KEYBOARDRX, NULL); | 93 | free_irq(IRQ_KEYBOARDRX, port); |
| 94 | return -EBUSY; | 94 | return -EBUSY; |
| 95 | } | 95 | } |
| 96 | 96 | ||
diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c index 7540bafc95cf..80baa53da5b1 100644 --- a/drivers/input/serio/xilinx_ps2.c +++ b/drivers/input/serio/xilinx_ps2.c | |||
| @@ -225,7 +225,7 @@ static void sxps2_close(struct serio *pserio) | |||
| 225 | /** | 225 | /** |
| 226 | * xps2_of_probe - probe method for the PS/2 device. | 226 | * xps2_of_probe - probe method for the PS/2 device. |
| 227 | * @of_dev: pointer to OF device structure | 227 | * @of_dev: pointer to OF device structure |
| 228 | * @match: pointer to the stucture used for matching a device | 228 | * @match: pointer to the structure used for matching a device |
| 229 | * | 229 | * |
| 230 | * This function probes the PS/2 device in the device tree. | 230 | * This function probes the PS/2 device in the device tree. |
| 231 | * It initializes the driver data structure and the hardware. | 231 | * It initializes the driver data structure and the hardware. |
diff --git a/drivers/input/sparse-keymap.c b/drivers/input/sparse-keymap.c index 337bf51bc984..fdb6a3976f94 100644 --- a/drivers/input/sparse-keymap.c +++ b/drivers/input/sparse-keymap.c | |||
| @@ -208,6 +208,12 @@ int sparse_keymap_setup(struct input_dev *dev, | |||
| 208 | } | 208 | } |
| 209 | } | 209 | } |
| 210 | 210 | ||
| 211 | if (test_bit(EV_KEY, dev->evbit)) { | ||
| 212 | __set_bit(KEY_UNKNOWN, dev->keybit); | ||
| 213 | __set_bit(EV_MSC, dev->evbit); | ||
| 214 | __set_bit(MSC_SCAN, dev->mscbit); | ||
| 215 | } | ||
| 216 | |||
| 211 | dev->keycode = map; | 217 | dev->keycode = map; |
| 212 | dev->keycodemax = map_size; | 218 | dev->keycodemax = map_size; |
| 213 | dev->getkeycode = sparse_keymap_getkeycode; | 219 | dev->getkeycode = sparse_keymap_getkeycode; |
| @@ -268,6 +274,7 @@ void sparse_keymap_report_entry(struct input_dev *dev, const struct key_entry *k | |||
| 268 | { | 274 | { |
| 269 | switch (ke->type) { | 275 | switch (ke->type) { |
| 270 | case KE_KEY: | 276 | case KE_KEY: |
| 277 | input_event(dev, EV_MSC, MSC_SCAN, ke->code); | ||
| 271 | input_report_key(dev, ke->keycode, value); | 278 | input_report_key(dev, ke->keycode, value); |
| 272 | input_sync(dev); | 279 | input_sync(dev); |
| 273 | if (value && autorelease) { | 280 | if (value && autorelease) { |
| @@ -305,12 +312,19 @@ bool sparse_keymap_report_event(struct input_dev *dev, unsigned int code, | |||
| 305 | { | 312 | { |
| 306 | const struct key_entry *ke = | 313 | const struct key_entry *ke = |
| 307 | sparse_keymap_entry_from_scancode(dev, code); | 314 | sparse_keymap_entry_from_scancode(dev, code); |
| 315 | struct key_entry unknown_ke; | ||
| 308 | 316 | ||
| 309 | if (ke) { | 317 | if (ke) { |
| 310 | sparse_keymap_report_entry(dev, ke, value, autorelease); | 318 | sparse_keymap_report_entry(dev, ke, value, autorelease); |
| 311 | return true; | 319 | return true; |
| 312 | } | 320 | } |
| 313 | 321 | ||
| 322 | /* Report an unknown key event as a debugging aid */ | ||
| 323 | unknown_ke.type = KE_KEY; | ||
| 324 | unknown_ke.code = code; | ||
| 325 | unknown_ke.keycode = KEY_UNKNOWN; | ||
| 326 | sparse_keymap_report_entry(dev, &unknown_ke, value, true); | ||
| 327 | |||
| 314 | return false; | 328 | return false; |
| 315 | } | 329 | } |
| 316 | EXPORT_SYMBOL(sparse_keymap_report_event); | 330 | EXPORT_SYMBOL(sparse_keymap_report_event); |
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 5597637cfd41..08ba5ad9c9be 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
| @@ -16,6 +16,14 @@ | |||
| 16 | #include "wacom.h" | 16 | #include "wacom.h" |
| 17 | #include <linux/input/mt.h> | 17 | #include <linux/input/mt.h> |
| 18 | 18 | ||
| 19 | /* resolution for penabled devices */ | ||
| 20 | #define WACOM_PL_RES 20 | ||
| 21 | #define WACOM_PENPRTN_RES 40 | ||
| 22 | #define WACOM_VOLITO_RES 50 | ||
| 23 | #define WACOM_GRAPHIRE_RES 80 | ||
| 24 | #define WACOM_INTUOS_RES 100 | ||
| 25 | #define WACOM_INTUOS3_RES 200 | ||
| 26 | |||
| 19 | static int wacom_penpartner_irq(struct wacom_wac *wacom) | 27 | static int wacom_penpartner_irq(struct wacom_wac *wacom) |
| 20 | { | 28 | { |
| 21 | unsigned char *data = wacom->data; | 29 | unsigned char *data = wacom->data; |
| @@ -1055,6 +1063,19 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, | |||
| 1055 | input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max, | 1063 | input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max, |
| 1056 | features->pressure_fuzz, 0); | 1064 | features->pressure_fuzz, 0); |
| 1057 | 1065 | ||
| 1066 | if (features->device_type == BTN_TOOL_PEN) { | ||
| 1067 | /* penabled devices have fixed resolution for each model */ | ||
| 1068 | input_abs_set_res(input_dev, ABS_X, features->x_resolution); | ||
| 1069 | input_abs_set_res(input_dev, ABS_Y, features->y_resolution); | ||
| 1070 | } else { | ||
| 1071 | input_abs_set_res(input_dev, ABS_X, | ||
| 1072 | wacom_calculate_touch_res(features->x_max, | ||
| 1073 | features->x_phy)); | ||
| 1074 | input_abs_set_res(input_dev, ABS_Y, | ||
| 1075 | wacom_calculate_touch_res(features->y_max, | ||
| 1076 | features->y_phy)); | ||
| 1077 | } | ||
| 1078 | |||
| 1058 | __set_bit(ABS_MISC, input_dev->absbit); | 1079 | __set_bit(ABS_MISC, input_dev->absbit); |
| 1059 | 1080 | ||
| 1060 | switch (wacom_wac->features.type) { | 1081 | switch (wacom_wac->features.type) { |
| @@ -1171,15 +1192,9 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, | |||
| 1171 | case TABLETPC: | 1192 | case TABLETPC: |
| 1172 | __clear_bit(ABS_MISC, input_dev->absbit); | 1193 | __clear_bit(ABS_MISC, input_dev->absbit); |
| 1173 | 1194 | ||
| 1174 | if (features->device_type != BTN_TOOL_PEN) { | 1195 | if (features->device_type != BTN_TOOL_PEN) |
| 1175 | input_abs_set_res(input_dev, ABS_X, | ||
| 1176 | wacom_calculate_touch_res(features->x_max, | ||
| 1177 | features->x_phy)); | ||
| 1178 | input_abs_set_res(input_dev, ABS_Y, | ||
| 1179 | wacom_calculate_touch_res(features->y_max, | ||
| 1180 | features->y_phy)); | ||
| 1181 | break; /* no need to process stylus stuff */ | 1196 | break; /* no need to process stylus stuff */ |
| 1182 | } | 1197 | |
| 1183 | /* fall through */ | 1198 | /* fall through */ |
| 1184 | 1199 | ||
| 1185 | case PL: | 1200 | case PL: |
| @@ -1216,12 +1231,6 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, | |||
| 1216 | input_set_abs_params(input_dev, ABS_MT_PRESSURE, | 1231 | input_set_abs_params(input_dev, ABS_MT_PRESSURE, |
| 1217 | 0, features->pressure_max, | 1232 | 0, features->pressure_max, |
| 1218 | features->pressure_fuzz, 0); | 1233 | features->pressure_fuzz, 0); |
| 1219 | input_abs_set_res(input_dev, ABS_X, | ||
| 1220 | wacom_calculate_touch_res(features->x_max, | ||
| 1221 | features->x_phy)); | ||
| 1222 | input_abs_set_res(input_dev, ABS_Y, | ||
| 1223 | wacom_calculate_touch_res(features->y_max, | ||
| 1224 | features->y_phy)); | ||
| 1225 | } else if (features->device_type == BTN_TOOL_PEN) { | 1234 | } else if (features->device_type == BTN_TOOL_PEN) { |
| 1226 | __set_bit(BTN_TOOL_RUBBER, input_dev->keybit); | 1235 | __set_bit(BTN_TOOL_RUBBER, input_dev->keybit); |
| 1227 | __set_bit(BTN_TOOL_PEN, input_dev->keybit); | 1236 | __set_bit(BTN_TOOL_PEN, input_dev->keybit); |
| @@ -1233,161 +1242,242 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, | |||
| 1233 | } | 1242 | } |
| 1234 | 1243 | ||
| 1235 | static const struct wacom_features wacom_features_0x00 = | 1244 | static const struct wacom_features wacom_features_0x00 = |
| 1236 | { "Wacom Penpartner", WACOM_PKGLEN_PENPRTN, 5040, 3780, 255, 0, PENPARTNER }; | 1245 | { "Wacom Penpartner", WACOM_PKGLEN_PENPRTN, 5040, 3780, 255, |
| 1246 | 0, PENPARTNER, WACOM_PENPRTN_RES, WACOM_PENPRTN_RES }; | ||
| 1237 | static const struct wacom_features wacom_features_0x10 = | 1247 | static const struct wacom_features wacom_features_0x10 = |
| 1238 | { "Wacom Graphire", WACOM_PKGLEN_GRAPHIRE, 10206, 7422, 511, 63, GRAPHIRE }; | 1248 | { "Wacom Graphire", WACOM_PKGLEN_GRAPHIRE, 10206, 7422, 511, |
| 1249 | 63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES }; | ||
| 1239 | static const struct wacom_features wacom_features_0x11 = | 1250 | static const struct wacom_features wacom_features_0x11 = |
| 1240 | { "Wacom Graphire2 4x5", WACOM_PKGLEN_GRAPHIRE, 10206, 7422, 511, 63, GRAPHIRE }; | 1251 | { "Wacom Graphire2 4x5", WACOM_PKGLEN_GRAPHIRE, 10206, 7422, 511, |
| 1252 | 63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES }; | ||
| 1241 | static const struct wacom_features wacom_features_0x12 = | 1253 | static const struct wacom_features wacom_features_0x12 = |
| 1242 | { "Wacom Graphire2 5x7", WACOM_PKGLEN_GRAPHIRE, 13918, 10206, 511, 63, GRAPHIRE }; | 1254 | { "Wacom Graphire2 5x7", WACOM_PKGLEN_GRAPHIRE, 13918, 10206, 511, |
| 1255 | 63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES }; | ||
| 1243 | static const struct wacom_features wacom_features_0x13 = | 1256 | static const struct wacom_features wacom_features_0x13 = |
| 1244 | { "Wacom Graphire3", WACOM_PKGLEN_GRAPHIRE, 10208, 7424, 511, 63, GRAPHIRE }; | 1257 | { "Wacom Graphire3", WACOM_PKGLEN_GRAPHIRE, 10208, 7424, 511, |
| 1258 | 63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES }; | ||
| 1245 | static const struct wacom_features wacom_features_0x14 = | 1259 | static const struct wacom_features wacom_features_0x14 = |
| 1246 | { "Wacom Graphire3 6x8", WACOM_PKGLEN_GRAPHIRE, 16704, 12064, 511, 63, GRAPHIRE }; | 1260 | { "Wacom Graphire3 6x8", WACOM_PKGLEN_GRAPHIRE, 16704, 12064, 511, |
| 1261 | 63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES }; | ||
| 1247 | static const struct wacom_features wacom_features_0x15 = | 1262 | static const struct wacom_features wacom_features_0x15 = |
| 1248 | { "Wacom Graphire4 4x5", WACOM_PKGLEN_GRAPHIRE, 10208, 7424, 511, 63, WACOM_G4 }; | 1263 | { "Wacom Graphire4 4x5", WACOM_PKGLEN_GRAPHIRE, 10208, 7424, 511, |
| 1264 | 63, WACOM_G4, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES }; | ||
| 1249 | static const struct wacom_features wacom_features_0x16 = | 1265 | static const struct wacom_features wacom_features_0x16 = |
| 1250 | { "Wacom Graphire4 6x8", WACOM_PKGLEN_GRAPHIRE, 16704, 12064, 511, 63, WACOM_G4 }; | 1266 | { "Wacom Graphire4 6x8", WACOM_PKGLEN_GRAPHIRE, 16704, 12064, 511, |
| 1267 | 63, WACOM_G4, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES }; | ||
| 1251 | static const struct wacom_features wacom_features_0x17 = | 1268 | static const struct wacom_features wacom_features_0x17 = |
| 1252 | { "Wacom BambooFun 4x5", WACOM_PKGLEN_BBFUN, 14760, 9225, 511, 63, WACOM_MO }; | 1269 | { "Wacom BambooFun 4x5", WACOM_PKGLEN_BBFUN, 14760, 9225, 511, |
| 1270 | 63, WACOM_MO, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1253 | static const struct wacom_features wacom_features_0x18 = | 1271 | static const struct wacom_features wacom_features_0x18 = |
| 1254 | { "Wacom BambooFun 6x8", WACOM_PKGLEN_BBFUN, 21648, 13530, 511, 63, WACOM_MO }; | 1272 | { "Wacom BambooFun 6x8", WACOM_PKGLEN_BBFUN, 21648, 13530, 511, |
| 1273 | 63, WACOM_MO, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1255 | static const struct wacom_features wacom_features_0x19 = | 1274 | static const struct wacom_features wacom_features_0x19 = |
| 1256 | { "Wacom Bamboo1 Medium", WACOM_PKGLEN_GRAPHIRE, 16704, 12064, 511, 63, GRAPHIRE }; | 1275 | { "Wacom Bamboo1 Medium", WACOM_PKGLEN_GRAPHIRE, 16704, 12064, 511, |
| 1276 | 63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES }; | ||
| 1257 | static const struct wacom_features wacom_features_0x60 = | 1277 | static const struct wacom_features wacom_features_0x60 = |
| 1258 | { "Wacom Volito", WACOM_PKGLEN_GRAPHIRE, 5104, 3712, 511, 63, GRAPHIRE }; | 1278 | { "Wacom Volito", WACOM_PKGLEN_GRAPHIRE, 5104, 3712, 511, |
| 1279 | 63, GRAPHIRE, WACOM_VOLITO_RES, WACOM_VOLITO_RES }; | ||
| 1259 | static const struct wacom_features wacom_features_0x61 = | 1280 | static const struct wacom_features wacom_features_0x61 = |
| 1260 | { "Wacom PenStation2", WACOM_PKGLEN_GRAPHIRE, 3250, 2320, 255, 63, GRAPHIRE }; | 1281 | { "Wacom PenStation2", WACOM_PKGLEN_GRAPHIRE, 3250, 2320, 255, |
| 1282 | 63, GRAPHIRE, WACOM_VOLITO_RES, WACOM_VOLITO_RES }; | ||
| 1261 | static const struct wacom_features wacom_features_0x62 = | 1283 | static const struct wacom_features wacom_features_0x62 = |
| 1262 | { "Wacom Volito2 4x5", WACOM_PKGLEN_GRAPHIRE, 5104, 3712, 511, 63, GRAPHIRE }; | 1284 | { "Wacom Volito2 4x5", WACOM_PKGLEN_GRAPHIRE, 5104, 3712, 511, |
| 1285 | 63, GRAPHIRE, WACOM_VOLITO_RES, WACOM_VOLITO_RES }; | ||
| 1263 | static const struct wacom_features wacom_features_0x63 = | 1286 | static const struct wacom_features wacom_features_0x63 = |
| 1264 | { "Wacom Volito2 2x3", WACOM_PKGLEN_GRAPHIRE, 3248, 2320, 511, 63, GRAPHIRE }; | 1287 | { "Wacom Volito2 2x3", WACOM_PKGLEN_GRAPHIRE, 3248, 2320, 511, |
| 1288 | 63, GRAPHIRE, WACOM_VOLITO_RES, WACOM_VOLITO_RES }; | ||
| 1265 | static const struct wacom_features wacom_features_0x64 = | 1289 | static const struct wacom_features wacom_features_0x64 = |
| 1266 | { "Wacom PenPartner2", WACOM_PKGLEN_GRAPHIRE, 3250, 2320, 511, 63, GRAPHIRE }; | 1290 | { "Wacom PenPartner2", WACOM_PKGLEN_GRAPHIRE, 3250, 2320, 511, |
| 1291 | 63, GRAPHIRE, WACOM_VOLITO_RES, WACOM_VOLITO_RES }; | ||
| 1267 | static const struct wacom_features wacom_features_0x65 = | 1292 | static const struct wacom_features wacom_features_0x65 = |
| 1268 | { "Wacom Bamboo", WACOM_PKGLEN_BBFUN, 14760, 9225, 511, 63, WACOM_MO }; | 1293 | { "Wacom Bamboo", WACOM_PKGLEN_BBFUN, 14760, 9225, 511, |
| 1294 | 63, WACOM_MO, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1269 | static const struct wacom_features wacom_features_0x69 = | 1295 | static const struct wacom_features wacom_features_0x69 = |
| 1270 | { "Wacom Bamboo1", WACOM_PKGLEN_GRAPHIRE, 5104, 3712, 511, 63, GRAPHIRE }; | 1296 | { "Wacom Bamboo1", WACOM_PKGLEN_GRAPHIRE, 5104, 3712, 511, |
| 1297 | 63, GRAPHIRE, WACOM_PENPRTN_RES, WACOM_PENPRTN_RES }; | ||
| 1271 | static const struct wacom_features wacom_features_0x20 = | 1298 | static const struct wacom_features wacom_features_0x20 = |
| 1272 | { "Wacom Intuos 4x5", WACOM_PKGLEN_INTUOS, 12700, 10600, 1023, 31, INTUOS }; | 1299 | { "Wacom Intuos 4x5", WACOM_PKGLEN_INTUOS, 12700, 10600, 1023, |
| 1300 | 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1273 | static const struct wacom_features wacom_features_0x21 = | 1301 | static const struct wacom_features wacom_features_0x21 = |
| 1274 | { "Wacom Intuos 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023, 31, INTUOS }; | 1302 | { "Wacom Intuos 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023, |
| 1303 | 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1275 | static const struct wacom_features wacom_features_0x22 = | 1304 | static const struct wacom_features wacom_features_0x22 = |
| 1276 | { "Wacom Intuos 9x12", WACOM_PKGLEN_INTUOS, 30480, 24060, 1023, 31, INTUOS }; | 1305 | { "Wacom Intuos 9x12", WACOM_PKGLEN_INTUOS, 30480, 24060, 1023, |
| 1306 | 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1277 | static const struct wacom_features wacom_features_0x23 = | 1307 | static const struct wacom_features wacom_features_0x23 = |
| 1278 | { "Wacom Intuos 12x12", WACOM_PKGLEN_INTUOS, 30480, 31680, 1023, 31, INTUOS }; | 1308 | { "Wacom Intuos 12x12", WACOM_PKGLEN_INTUOS, 30480, 31680, 1023, |
| 1309 | 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1279 | static const struct wacom_features wacom_features_0x24 = | 1310 | static const struct wacom_features wacom_features_0x24 = |
| 1280 | { "Wacom Intuos 12x18", WACOM_PKGLEN_INTUOS, 45720, 31680, 1023, 31, INTUOS }; | 1311 | { "Wacom Intuos 12x18", WACOM_PKGLEN_INTUOS, 45720, 31680, 1023, |
| 1312 | 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1281 | static const struct wacom_features wacom_features_0x30 = | 1313 | static const struct wacom_features wacom_features_0x30 = |
| 1282 | { "Wacom PL400", WACOM_PKGLEN_GRAPHIRE, 5408, 4056, 255, 0, PL }; | 1314 | { "Wacom PL400", WACOM_PKGLEN_GRAPHIRE, 5408, 4056, 255, |
| 1315 | 0, PL, WACOM_PL_RES, WACOM_PL_RES }; | ||
| 1283 | static const struct wacom_features wacom_features_0x31 = | 1316 | static const struct wacom_features wacom_features_0x31 = |
| 1284 | { "Wacom PL500", WACOM_PKGLEN_GRAPHIRE, 6144, 4608, 255, 0, PL }; | 1317 | { "Wacom PL500", WACOM_PKGLEN_GRAPHIRE, 6144, 4608, 255, |
| 1318 | 0, PL, WACOM_PL_RES, WACOM_PL_RES }; | ||
| 1285 | static const struct wacom_features wacom_features_0x32 = | 1319 | static const struct wacom_features wacom_features_0x32 = |
| 1286 | { "Wacom PL600", WACOM_PKGLEN_GRAPHIRE, 6126, 4604, 255, 0, PL }; | 1320 | { "Wacom PL600", WACOM_PKGLEN_GRAPHIRE, 6126, 4604, 255, |
| 1321 | 0, PL, WACOM_PL_RES, WACOM_PL_RES }; | ||
| 1287 | static const struct wacom_features wacom_features_0x33 = | 1322 | static const struct wacom_features wacom_features_0x33 = |
| 1288 | { "Wacom PL600SX", WACOM_PKGLEN_GRAPHIRE, 6260, 5016, 255, 0, PL }; | 1323 | { "Wacom PL600SX", WACOM_PKGLEN_GRAPHIRE, 6260, 5016, 255, |
| 1324 | 0, PL, WACOM_PL_RES, WACOM_PL_RES }; | ||
| 1289 | static const struct wacom_features wacom_features_0x34 = | 1325 | static const struct wacom_features wacom_features_0x34 = |
| 1290 | { "Wacom PL550", WACOM_PKGLEN_GRAPHIRE, 6144, 4608, 511, 0, PL }; | 1326 | { "Wacom PL550", WACOM_PKGLEN_GRAPHIRE, 6144, 4608, 511, |
| 1327 | 0, PL, WACOM_PL_RES, WACOM_PL_RES }; | ||
| 1291 | static const struct wacom_features wacom_features_0x35 = | 1328 | static const struct wacom_features wacom_features_0x35 = |
| 1292 | { "Wacom PL800", WACOM_PKGLEN_GRAPHIRE, 7220, 5780, 511, 0, PL }; | 1329 | { "Wacom PL800", WACOM_PKGLEN_GRAPHIRE, 7220, 5780, 511, |
| 1330 | 0, PL, WACOM_PL_RES, WACOM_PL_RES }; | ||
| 1293 | static const struct wacom_features wacom_features_0x37 = | 1331 | static const struct wacom_features wacom_features_0x37 = |
| 1294 | { "Wacom PL700", WACOM_PKGLEN_GRAPHIRE, 6758, 5406, 511, 0, PL }; | 1332 | { "Wacom PL700", WACOM_PKGLEN_GRAPHIRE, 6758, 5406, 511, |
| 1333 | 0, PL, WACOM_PL_RES, WACOM_PL_RES }; | ||
| 1295 | static const struct wacom_features wacom_features_0x38 = | 1334 | static const struct wacom_features wacom_features_0x38 = |
| 1296 | { "Wacom PL510", WACOM_PKGLEN_GRAPHIRE, 6282, 4762, 511, 0, PL }; | 1335 | { "Wacom PL510", WACOM_PKGLEN_GRAPHIRE, 6282, 4762, 511, |
| 1336 | 0, PL, WACOM_PL_RES, WACOM_PL_RES }; | ||
| 1297 | static const struct wacom_features wacom_features_0x39 = | 1337 | static const struct wacom_features wacom_features_0x39 = |
| 1298 | { "Wacom DTU710", WACOM_PKGLEN_GRAPHIRE, 34080, 27660, 511, 0, PL }; | 1338 | { "Wacom DTU710", WACOM_PKGLEN_GRAPHIRE, 34080, 27660, 511, |
| 1339 | 0, PL, WACOM_PL_RES, WACOM_PL_RES }; | ||
| 1299 | static const struct wacom_features wacom_features_0xC4 = | 1340 | static const struct wacom_features wacom_features_0xC4 = |
| 1300 | { "Wacom DTF521", WACOM_PKGLEN_GRAPHIRE, 6282, 4762, 511, 0, PL }; | 1341 | { "Wacom DTF521", WACOM_PKGLEN_GRAPHIRE, 6282, 4762, 511, |
| 1342 | 0, PL, WACOM_PL_RES, WACOM_PL_RES }; | ||
| 1301 | static const struct wacom_features wacom_features_0xC0 = | 1343 | static const struct wacom_features wacom_features_0xC0 = |
| 1302 | { "Wacom DTF720", WACOM_PKGLEN_GRAPHIRE, 6858, 5506, 511, 0, PL }; | 1344 | { "Wacom DTF720", WACOM_PKGLEN_GRAPHIRE, 6858, 5506, 511, |
| 1345 | 0, PL, WACOM_PL_RES, WACOM_PL_RES }; | ||
| 1303 | static const struct wacom_features wacom_features_0xC2 = | 1346 | static const struct wacom_features wacom_features_0xC2 = |
| 1304 | { "Wacom DTF720a", WACOM_PKGLEN_GRAPHIRE, 6858, 5506, 511, 0, PL }; | 1347 | { "Wacom DTF720a", WACOM_PKGLEN_GRAPHIRE, 6858, 5506, 511, |
| 1348 | 0, PL, WACOM_PL_RES, WACOM_PL_RES }; | ||
| 1305 | static const struct wacom_features wacom_features_0x03 = | 1349 | static const struct wacom_features wacom_features_0x03 = |
| 1306 | { "Wacom Cintiq Partner", WACOM_PKGLEN_GRAPHIRE, 20480, 15360, 511, 0, PTU }; | 1350 | { "Wacom Cintiq Partner", WACOM_PKGLEN_GRAPHIRE, 20480, 15360, 511, |
| 1351 | 0, PTU, WACOM_PL_RES, WACOM_PL_RES }; | ||
| 1307 | static const struct wacom_features wacom_features_0x41 = | 1352 | static const struct wacom_features wacom_features_0x41 = |
| 1308 | { "Wacom Intuos2 4x5", WACOM_PKGLEN_INTUOS, 12700, 10600, 1023, 31, INTUOS }; | 1353 | { "Wacom Intuos2 4x5", WACOM_PKGLEN_INTUOS, 12700, 10600, 1023, |
| 1354 | 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1309 | static const struct wacom_features wacom_features_0x42 = | 1355 | static const struct wacom_features wacom_features_0x42 = |
| 1310 | { "Wacom Intuos2 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023, 31, INTUOS }; | 1356 | { "Wacom Intuos2 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023, |
| 1357 | 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1311 | static const struct wacom_features wacom_features_0x43 = | 1358 | static const struct wacom_features wacom_features_0x43 = |
| 1312 | { "Wacom Intuos2 9x12", WACOM_PKGLEN_INTUOS, 30480, 24060, 1023, 31, INTUOS }; | 1359 | { "Wacom Intuos2 9x12", WACOM_PKGLEN_INTUOS, 30480, 24060, 1023, |
| 1360 | 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1313 | static const struct wacom_features wacom_features_0x44 = | 1361 | static const struct wacom_features wacom_features_0x44 = |
| 1314 | { "Wacom Intuos2 12x12", WACOM_PKGLEN_INTUOS, 30480, 31680, 1023, 31, INTUOS }; | 1362 | { "Wacom Intuos2 12x12", WACOM_PKGLEN_INTUOS, 30480, 31680, 1023, |
| 1363 | 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1315 | static const struct wacom_features wacom_features_0x45 = | 1364 | static const struct wacom_features wacom_features_0x45 = |
| 1316 | { "Wacom Intuos2 12x18", WACOM_PKGLEN_INTUOS, 45720, 31680, 1023, 31, INTUOS }; | 1365 | { "Wacom Intuos2 12x18", WACOM_PKGLEN_INTUOS, 45720, 31680, 1023, |
| 1366 | 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1317 | static const struct wacom_features wacom_features_0xB0 = | 1367 | static const struct wacom_features wacom_features_0xB0 = |
| 1318 | { "Wacom Intuos3 4x5", WACOM_PKGLEN_INTUOS, 25400, 20320, 1023, 63, INTUOS3S }; | 1368 | { "Wacom Intuos3 4x5", WACOM_PKGLEN_INTUOS, 25400, 20320, 1023, |
| 1369 | 63, INTUOS3S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | ||
| 1319 | static const struct wacom_features wacom_features_0xB1 = | 1370 | static const struct wacom_features wacom_features_0xB1 = |
| 1320 | { "Wacom Intuos3 6x8", WACOM_PKGLEN_INTUOS, 40640, 30480, 1023, 63, INTUOS3 }; | 1371 | { "Wacom Intuos3 6x8", WACOM_PKGLEN_INTUOS, 40640, 30480, 1023, |
| 1372 | 63, INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | ||
| 1321 | static const struct wacom_features wacom_features_0xB2 = | 1373 | static const struct wacom_features wacom_features_0xB2 = |
| 1322 | { "Wacom Intuos3 9x12", WACOM_PKGLEN_INTUOS, 60960, 45720, 1023, 63, INTUOS3 }; | 1374 | { "Wacom Intuos3 9x12", WACOM_PKGLEN_INTUOS, 60960, 45720, 1023, |
| 1375 | 63, INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | ||
| 1323 | static const struct wacom_features wacom_features_0xB3 = | 1376 | static const struct wacom_features wacom_features_0xB3 = |
| 1324 | { "Wacom Intuos3 12x12", WACOM_PKGLEN_INTUOS, 60960, 60960, 1023, 63, INTUOS3L }; | 1377 | { "Wacom Intuos3 12x12", WACOM_PKGLEN_INTUOS, 60960, 60960, 1023, |
| 1378 | 63, INTUOS3L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | ||
| 1325 | static const struct wacom_features wacom_features_0xB4 = | 1379 | static const struct wacom_features wacom_features_0xB4 = |
| 1326 | { "Wacom Intuos3 12x19", WACOM_PKGLEN_INTUOS, 97536, 60960, 1023, 63, INTUOS3L }; | 1380 | { "Wacom Intuos3 12x19", WACOM_PKGLEN_INTUOS, 97536, 60960, 1023, |
| 1381 | 63, INTUOS3L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | ||
| 1327 | static const struct wacom_features wacom_features_0xB5 = | 1382 | static const struct wacom_features wacom_features_0xB5 = |
| 1328 | { "Wacom Intuos3 6x11", WACOM_PKGLEN_INTUOS, 54204, 31750, 1023, 63, INTUOS3 }; | 1383 | { "Wacom Intuos3 6x11", WACOM_PKGLEN_INTUOS, 54204, 31750, 1023, |
| 1384 | 63, INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | ||
| 1329 | static const struct wacom_features wacom_features_0xB7 = | 1385 | static const struct wacom_features wacom_features_0xB7 = |
| 1330 | { "Wacom Intuos3 4x6", WACOM_PKGLEN_INTUOS, 31496, 19685, 1023, 63, INTUOS3S }; | 1386 | { "Wacom Intuos3 4x6", WACOM_PKGLEN_INTUOS, 31496, 19685, 1023, |
| 1387 | 63, INTUOS3S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | ||
| 1331 | static const struct wacom_features wacom_features_0xB8 = | 1388 | static const struct wacom_features wacom_features_0xB8 = |
| 1332 | { "Wacom Intuos4 4x6", WACOM_PKGLEN_INTUOS, 31496, 19685, 2047, 63, INTUOS4S }; | 1389 | { "Wacom Intuos4 4x6", WACOM_PKGLEN_INTUOS, 31496, 19685, 2047, |
| 1390 | 63, INTUOS4S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | ||
| 1333 | static const struct wacom_features wacom_features_0xB9 = | 1391 | static const struct wacom_features wacom_features_0xB9 = |
| 1334 | { "Wacom Intuos4 6x9", WACOM_PKGLEN_INTUOS, 44704, 27940, 2047, 63, INTUOS4 }; | 1392 | { "Wacom Intuos4 6x9", WACOM_PKGLEN_INTUOS, 44704, 27940, 2047, |
| 1393 | 63, INTUOS4, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | ||
| 1335 | static const struct wacom_features wacom_features_0xBA = | 1394 | static const struct wacom_features wacom_features_0xBA = |
| 1336 | { "Wacom Intuos4 8x13", WACOM_PKGLEN_INTUOS, 65024, 40640, 2047, 63, INTUOS4L }; | 1395 | { "Wacom Intuos4 8x13", WACOM_PKGLEN_INTUOS, 65024, 40640, 2047, |
| 1396 | 63, INTUOS4L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | ||
| 1337 | static const struct wacom_features wacom_features_0xBB = | 1397 | static const struct wacom_features wacom_features_0xBB = |
| 1338 | { "Wacom Intuos4 12x19", WACOM_PKGLEN_INTUOS, 97536, 60960, 2047, 63, INTUOS4L }; | 1398 | { "Wacom Intuos4 12x19", WACOM_PKGLEN_INTUOS, 97536, 60960, 2047, |
| 1399 | 63, INTUOS4L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | ||
| 1339 | static const struct wacom_features wacom_features_0xBC = | 1400 | static const struct wacom_features wacom_features_0xBC = |
| 1340 | { "Wacom Intuos4 WL", WACOM_PKGLEN_INTUOS, 40840, 25400, 2047, 63, INTUOS4 }; | 1401 | { "Wacom Intuos4 WL", WACOM_PKGLEN_INTUOS, 40840, 25400, 2047, |
| 1402 | 63, INTUOS4, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | ||
| 1341 | static const struct wacom_features wacom_features_0x3F = | 1403 | static const struct wacom_features wacom_features_0x3F = |
| 1342 | { "Wacom Cintiq 21UX", WACOM_PKGLEN_INTUOS, 87200, 65600, 1023, 63, CINTIQ }; | 1404 | { "Wacom Cintiq 21UX", WACOM_PKGLEN_INTUOS, 87200, 65600, 1023, |
| 1405 | 63, CINTIQ, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | ||
| 1343 | static const struct wacom_features wacom_features_0xC5 = | 1406 | static const struct wacom_features wacom_features_0xC5 = |
| 1344 | { "Wacom Cintiq 20WSX", WACOM_PKGLEN_INTUOS, 86680, 54180, 1023, 63, WACOM_BEE }; | 1407 | { "Wacom Cintiq 20WSX", WACOM_PKGLEN_INTUOS, 86680, 54180, 1023, |
| 1408 | 63, WACOM_BEE, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | ||
| 1345 | static const struct wacom_features wacom_features_0xC6 = | 1409 | static const struct wacom_features wacom_features_0xC6 = |
| 1346 | { "Wacom Cintiq 12WX", WACOM_PKGLEN_INTUOS, 53020, 33440, 1023, 63, WACOM_BEE }; | 1410 | { "Wacom Cintiq 12WX", WACOM_PKGLEN_INTUOS, 53020, 33440, 1023, |
| 1411 | 63, WACOM_BEE, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | ||
| 1347 | static const struct wacom_features wacom_features_0xC7 = | 1412 | static const struct wacom_features wacom_features_0xC7 = |
| 1348 | { "Wacom DTU1931", WACOM_PKGLEN_GRAPHIRE, 37832, 30305, 511, 0, PL }; | 1413 | { "Wacom DTU1931", WACOM_PKGLEN_GRAPHIRE, 37832, 30305, 511, |
| 1414 | 0, PL, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1349 | static const struct wacom_features wacom_features_0xCE = | 1415 | static const struct wacom_features wacom_features_0xCE = |
| 1350 | { "Wacom DTU2231", WACOM_PKGLEN_GRAPHIRE, 47864, 27011, 511, 0, DTU }; | 1416 | { "Wacom DTU2231", WACOM_PKGLEN_GRAPHIRE, 47864, 27011, 511, |
| 1417 | 0, DTU, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1351 | static const struct wacom_features wacom_features_0xF0 = | 1418 | static const struct wacom_features wacom_features_0xF0 = |
| 1352 | { "Wacom DTU1631", WACOM_PKGLEN_GRAPHIRE, 34623, 19553, 511, 0, DTU }; | 1419 | { "Wacom DTU1631", WACOM_PKGLEN_GRAPHIRE, 34623, 19553, 511, |
| 1420 | 0, DTU, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1353 | static const struct wacom_features wacom_features_0xCC = | 1421 | static const struct wacom_features wacom_features_0xCC = |
| 1354 | { "Wacom Cintiq 21UX2", WACOM_PKGLEN_INTUOS, 87200, 65600, 2047, 63, WACOM_21UX2 }; | 1422 | { "Wacom Cintiq 21UX2", WACOM_PKGLEN_INTUOS, 87200, 65600, 2047, |
| 1423 | 63, WACOM_21UX2, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | ||
| 1355 | static const struct wacom_features wacom_features_0x90 = | 1424 | static const struct wacom_features wacom_features_0x90 = |
| 1356 | { "Wacom ISDv4 90", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, 0, TABLETPC }; | 1425 | { "Wacom ISDv4 90", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, |
| 1426 | 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1357 | static const struct wacom_features wacom_features_0x93 = | 1427 | static const struct wacom_features wacom_features_0x93 = |
| 1358 | { "Wacom ISDv4 93", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, 0, TABLETPC }; | 1428 | { "Wacom ISDv4 93", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, |
| 1429 | 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1359 | static const struct wacom_features wacom_features_0x9A = | 1430 | static const struct wacom_features wacom_features_0x9A = |
| 1360 | { "Wacom ISDv4 9A", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, 0, TABLETPC }; | 1431 | { "Wacom ISDv4 9A", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, |
| 1432 | 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1361 | static const struct wacom_features wacom_features_0x9F = | 1433 | static const struct wacom_features wacom_features_0x9F = |
| 1362 | { "Wacom ISDv4 9F", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, 0, TABLETPC }; | 1434 | { "Wacom ISDv4 9F", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, |
| 1435 | 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1363 | static const struct wacom_features wacom_features_0xE2 = | 1436 | static const struct wacom_features wacom_features_0xE2 = |
| 1364 | { "Wacom ISDv4 E2", WACOM_PKGLEN_TPC2FG, 26202, 16325, 255, 0, TABLETPC2FG }; | 1437 | { "Wacom ISDv4 E2", WACOM_PKGLEN_TPC2FG, 26202, 16325, 255, |
| 1438 | 0, TABLETPC2FG, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1365 | static const struct wacom_features wacom_features_0xE3 = | 1439 | static const struct wacom_features wacom_features_0xE3 = |
| 1366 | { "Wacom ISDv4 E3", WACOM_PKGLEN_TPC2FG, 26202, 16325, 255, 0, TABLETPC2FG }; | 1440 | { "Wacom ISDv4 E3", WACOM_PKGLEN_TPC2FG, 26202, 16325, 255, |
| 1441 | 0, TABLETPC2FG, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1442 | static const struct wacom_features wacom_features_0xE6 = | ||
| 1443 | { "Wacom ISDv4 E6", WACOM_PKGLEN_TPC2FG, 27760, 15694, 255, | ||
| 1444 | 0, TABLETPC2FG, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1367 | static const struct wacom_features wacom_features_0x47 = | 1445 | static const struct wacom_features wacom_features_0x47 = |
| 1368 | { "Wacom Intuos2 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023, 31, INTUOS }; | 1446 | { "Wacom Intuos2 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023, |
| 1369 | static struct wacom_features wacom_features_0xD0 = | 1447 | 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; |
| 1370 | { "Wacom Bamboo 2FG", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 63, BAMBOO_PT }; | 1448 | static const struct wacom_features wacom_features_0xD0 = |
| 1371 | static struct wacom_features wacom_features_0xD1 = | 1449 | { "Wacom Bamboo 2FG", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, |
| 1372 | { "Wacom Bamboo 2FG 4x5", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 63, BAMBOO_PT }; | 1450 | 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; |
| 1373 | static struct wacom_features wacom_features_0xD2 = | 1451 | static const struct wacom_features wacom_features_0xD1 = |
| 1374 | { "Wacom Bamboo Craft", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 63, BAMBOO_PT }; | 1452 | { "Wacom Bamboo 2FG 4x5", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, |
| 1375 | static struct wacom_features wacom_features_0xD3 = | 1453 | 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; |
| 1376 | { "Wacom Bamboo 2FG 6x8", WACOM_PKGLEN_BBFUN, 21648, 13530, 1023, 63, BAMBOO_PT }; | 1454 | static const struct wacom_features wacom_features_0xD2 = |
| 1455 | { "Wacom Bamboo Craft", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, | ||
| 1456 | 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1457 | static const struct wacom_features wacom_features_0xD3 = | ||
| 1458 | { "Wacom Bamboo 2FG 6x8", WACOM_PKGLEN_BBFUN, 21648, 13530, 1023, | ||
| 1459 | 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1377 | static const struct wacom_features wacom_features_0xD4 = | 1460 | static const struct wacom_features wacom_features_0xD4 = |
| 1378 | { "Wacom Bamboo Pen", WACOM_PKGLEN_BBFUN, 14720, 9200, 255, 63, BAMBOO_PT }; | 1461 | { "Wacom Bamboo Pen", WACOM_PKGLEN_BBFUN, 14720, 9200, 255, |
| 1379 | static struct wacom_features wacom_features_0xD6 = | 1462 | 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; |
| 1380 | { "Wacom BambooPT 2FG 4x5", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 63, BAMBOO_PT }; | 1463 | static const struct wacom_features wacom_features_0xD6 = |
| 1381 | static struct wacom_features wacom_features_0xD7 = | 1464 | { "Wacom BambooPT 2FG 4x5", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, |
| 1382 | { "Wacom BambooPT 2FG Small", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 63, BAMBOO_PT }; | 1465 | 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; |
| 1383 | static struct wacom_features wacom_features_0xD8 = | 1466 | static const struct wacom_features wacom_features_0xD7 = |
| 1384 | { "Wacom Bamboo Comic 2FG", WACOM_PKGLEN_BBFUN, 21648, 13530, 1023, 63, BAMBOO_PT }; | 1467 | { "Wacom BambooPT 2FG Small", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, |
| 1385 | static struct wacom_features wacom_features_0xDA = | 1468 | 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; |
| 1386 | { "Wacom Bamboo 2FG 4x5 SE", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 63, BAMBOO_PT }; | 1469 | static const struct wacom_features wacom_features_0xD8 = |
| 1470 | { "Wacom Bamboo Comic 2FG", WACOM_PKGLEN_BBFUN, 21648, 13530, 1023, | ||
| 1471 | 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1472 | static const struct wacom_features wacom_features_0xDA = | ||
| 1473 | { "Wacom Bamboo 2FG 4x5 SE", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, | ||
| 1474 | 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1387 | static struct wacom_features wacom_features_0xDB = | 1475 | static struct wacom_features wacom_features_0xDB = |
| 1388 | { "Wacom Bamboo 2FG 6x8 SE", WACOM_PKGLEN_BBFUN, 21648, 13530, 1023, 63, BAMBOO_PT }; | 1476 | { "Wacom Bamboo 2FG 6x8 SE", WACOM_PKGLEN_BBFUN, 21648, 13530, 1023, |
| 1477 | 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1389 | static const struct wacom_features wacom_features_0x6004 = | 1478 | static const struct wacom_features wacom_features_0x6004 = |
| 1390 | { "ISD-V4", WACOM_PKGLEN_GRAPHIRE, 12800, 8000, 255, 0, TABLETPC }; | 1479 | { "ISD-V4", WACOM_PKGLEN_GRAPHIRE, 12800, 8000, 255, |
| 1480 | 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 1391 | 1481 | ||
| 1392 | #define USB_DEVICE_WACOM(prod) \ | 1482 | #define USB_DEVICE_WACOM(prod) \ |
| 1393 | USB_DEVICE(USB_VENDOR_ID_WACOM, prod), \ | 1483 | USB_DEVICE(USB_VENDOR_ID_WACOM, prod), \ |
| @@ -1474,6 +1564,7 @@ const struct usb_device_id wacom_ids[] = { | |||
| 1474 | { USB_DEVICE_WACOM(0x9F) }, | 1564 | { USB_DEVICE_WACOM(0x9F) }, |
| 1475 | { USB_DEVICE_WACOM(0xE2) }, | 1565 | { USB_DEVICE_WACOM(0xE2) }, |
| 1476 | { USB_DEVICE_WACOM(0xE3) }, | 1566 | { USB_DEVICE_WACOM(0xE3) }, |
| 1567 | { USB_DEVICE_WACOM(0xE6) }, | ||
| 1477 | { USB_DEVICE_WACOM(0x47) }, | 1568 | { USB_DEVICE_WACOM(0x47) }, |
| 1478 | { USB_DEVICE_LENOVO(0x6004) }, | 1569 | { USB_DEVICE_LENOVO(0x6004) }, |
| 1479 | { } | 1570 | { } |
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h index 835f756b150c..53eb71b68330 100644 --- a/drivers/input/tablet/wacom_wac.h +++ b/drivers/input/tablet/wacom_wac.h | |||
| @@ -74,6 +74,8 @@ struct wacom_features { | |||
| 74 | int pressure_max; | 74 | int pressure_max; |
| 75 | int distance_max; | 75 | int distance_max; |
| 76 | int type; | 76 | int type; |
| 77 | int x_resolution; | ||
| 78 | int y_resolution; | ||
| 77 | int device_type; | 79 | int device_type; |
| 78 | int x_phy; | 80 | int x_phy; |
| 79 | int y_phy; | 81 | int y_phy; |
diff --git a/drivers/input/touchscreen/h3600_ts_input.c b/drivers/input/touchscreen/h3600_ts_input.c index b4d7f63deff1..45f93d0f5592 100644 --- a/drivers/input/touchscreen/h3600_ts_input.c +++ b/drivers/input/touchscreen/h3600_ts_input.c | |||
| @@ -62,7 +62,7 @@ MODULE_LICENSE("GPL"); | |||
| 62 | Programmer has no control over these numbers. | 62 | Programmer has no control over these numbers. |
| 63 | TODO there are holes - specifically 1,7,0x0a | 63 | TODO there are holes - specifically 1,7,0x0a |
| 64 | */ | 64 | */ |
| 65 | #define VERSION_ID 0 /* Get Version (request/respose) */ | 65 | #define VERSION_ID 0 /* Get Version (request/response) */ |
| 66 | #define KEYBD_ID 2 /* Keyboard (event) */ | 66 | #define KEYBD_ID 2 /* Keyboard (event) */ |
| 67 | #define TOUCHS_ID 3 /* Touch Screen (event)*/ | 67 | #define TOUCHS_ID 3 /* Touch Screen (event)*/ |
| 68 | #define EEPROM_READ_ID 4 /* (request/response) */ | 68 | #define EEPROM_READ_ID 4 /* (request/response) */ |
| @@ -399,31 +399,34 @@ static int h3600ts_connect(struct serio *serio, struct serio_driver *drv) | |||
| 399 | IRQF_SHARED | IRQF_DISABLED, "h3600_action", &ts->dev)) { | 399 | IRQF_SHARED | IRQF_DISABLED, "h3600_action", &ts->dev)) { |
| 400 | printk(KERN_ERR "h3600ts.c: Could not allocate Action Button IRQ!\n"); | 400 | printk(KERN_ERR "h3600ts.c: Could not allocate Action Button IRQ!\n"); |
| 401 | err = -EBUSY; | 401 | err = -EBUSY; |
| 402 | goto fail2; | 402 | goto fail1; |
| 403 | } | 403 | } |
| 404 | 404 | ||
| 405 | if (request_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, npower_button_handler, | 405 | if (request_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, npower_button_handler, |
| 406 | IRQF_SHARED | IRQF_DISABLED, "h3600_suspend", &ts->dev)) { | 406 | IRQF_SHARED | IRQF_DISABLED, "h3600_suspend", &ts->dev)) { |
| 407 | printk(KERN_ERR "h3600ts.c: Could not allocate Power Button IRQ!\n"); | 407 | printk(KERN_ERR "h3600ts.c: Could not allocate Power Button IRQ!\n"); |
| 408 | err = -EBUSY; | 408 | err = -EBUSY; |
| 409 | goto fail3; | 409 | goto fail2; |
| 410 | } | 410 | } |
| 411 | 411 | ||
| 412 | serio_set_drvdata(serio, ts); | 412 | serio_set_drvdata(serio, ts); |
| 413 | 413 | ||
| 414 | err = serio_open(serio, drv); | 414 | err = serio_open(serio, drv); |
| 415 | if (err) | 415 | if (err) |
| 416 | return err; | 416 | goto fail3; |
| 417 | 417 | ||
| 418 | //h3600_flite_control(1, 25); /* default brightness */ | 418 | //h3600_flite_control(1, 25); /* default brightness */ |
| 419 | input_register_device(ts->dev); | 419 | err = input_register_device(ts->dev); |
| 420 | if (err) | ||
| 421 | goto fail4; | ||
| 420 | 422 | ||
| 421 | return 0; | 423 | return 0; |
| 422 | 424 | ||
| 423 | fail3: free_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, ts->dev); | 425 | fail4: serio_close(serio); |
| 426 | fail3: serio_set_drvdata(serio, NULL); | ||
| 427 | free_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, ts->dev); | ||
| 424 | fail2: free_irq(IRQ_GPIO_BITSY_ACTION_BUTTON, ts->dev); | 428 | fail2: free_irq(IRQ_GPIO_BITSY_ACTION_BUTTON, ts->dev); |
| 425 | fail1: serio_set_drvdata(serio, NULL); | 429 | fail1: input_free_device(input_dev); |
| 426 | input_free_device(input_dev); | ||
| 427 | kfree(ts); | 430 | kfree(ts); |
| 428 | return err; | 431 | return err; |
| 429 | } | 432 | } |
diff --git a/drivers/input/touchscreen/intel-mid-touch.c b/drivers/input/touchscreen/intel-mid-touch.c index c0307b22d86f..66c96bfc5522 100644 --- a/drivers/input/touchscreen/intel-mid-touch.c +++ b/drivers/input/touchscreen/intel-mid-touch.c | |||
| @@ -542,7 +542,7 @@ static int __devinit mrstouch_adc_init(struct mrstouch_dev *tsdev) | |||
| 542 | * ADC power on, start, enable PENDET and set loop delay | 542 | * ADC power on, start, enable PENDET and set loop delay |
| 543 | * ADC loop delay is set to 4.5 ms approximately | 543 | * ADC loop delay is set to 4.5 ms approximately |
| 544 | * Loop delay more than this results in jitter in adc readings | 544 | * Loop delay more than this results in jitter in adc readings |
| 545 | * Setting loop delay to 0 (continous loop) in MAXIM stops PENDET | 545 | * Setting loop delay to 0 (continuous loop) in MAXIM stops PENDET |
| 546 | * interrupt generation sometimes. | 546 | * interrupt generation sometimes. |
| 547 | */ | 547 | */ |
| 548 | 548 | ||
diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c index 028a5363eea1..3b5b5df04dd6 100644 --- a/drivers/input/touchscreen/ucb1400_ts.c +++ b/drivers/input/touchscreen/ucb1400_ts.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Copyright: MontaVista Software, Inc. | 6 | * Copyright: MontaVista Software, Inc. |
| 7 | * | 7 | * |
| 8 | * Spliting done by: Marek Vasut <marek.vasut@gmail.com> | 8 | * Spliting done by: Marek Vasut <marek.vasut@gmail.com> |
| 9 | * If something doesnt work and it worked before spliting, e-mail me, | 9 | * If something doesn't work and it worked before spliting, e-mail me, |
| 10 | * dont bother Nicolas please ;-) | 10 | * dont bother Nicolas please ;-) |
| 11 | * | 11 | * |
| 12 | * This program is free software; you can redistribute it and/or modify | 12 | * This program is free software; you can redistribute it and/or modify |
diff --git a/drivers/input/touchscreen/wm9705.c b/drivers/input/touchscreen/wm9705.c index 6b5be742c27d..98e61175d3f5 100644 --- a/drivers/input/touchscreen/wm9705.c +++ b/drivers/input/touchscreen/wm9705.c | |||
| @@ -306,7 +306,7 @@ static int wm9705_acc_enable(struct wm97xx *wm, int enable) | |||
| 306 | dig2 = wm->dig[2]; | 306 | dig2 = wm->dig[2]; |
| 307 | 307 | ||
| 308 | if (enable) { | 308 | if (enable) { |
| 309 | /* continous mode */ | 309 | /* continuous mode */ |
| 310 | if (wm->mach_ops->acc_startup && | 310 | if (wm->mach_ops->acc_startup && |
| 311 | (ret = wm->mach_ops->acc_startup(wm)) < 0) | 311 | (ret = wm->mach_ops->acc_startup(wm)) < 0) |
| 312 | return ret; | 312 | return ret; |
diff --git a/drivers/input/touchscreen/wm9712.c b/drivers/input/touchscreen/wm9712.c index 7490b05c3566..2bc2fb801009 100644 --- a/drivers/input/touchscreen/wm9712.c +++ b/drivers/input/touchscreen/wm9712.c | |||
| @@ -419,7 +419,7 @@ static int wm9712_acc_enable(struct wm97xx *wm, int enable) | |||
| 419 | dig2 = wm->dig[2]; | 419 | dig2 = wm->dig[2]; |
| 420 | 420 | ||
| 421 | if (enable) { | 421 | if (enable) { |
| 422 | /* continous mode */ | 422 | /* continuous mode */ |
| 423 | if (wm->mach_ops->acc_startup) { | 423 | if (wm->mach_ops->acc_startup) { |
| 424 | ret = wm->mach_ops->acc_startup(wm); | 424 | ret = wm->mach_ops->acc_startup(wm); |
| 425 | if (ret < 0) | 425 | if (ret < 0) |
diff --git a/drivers/input/touchscreen/wm9713.c b/drivers/input/touchscreen/wm9713.c index 238b5132712e..73ec99568f12 100644 --- a/drivers/input/touchscreen/wm9713.c +++ b/drivers/input/touchscreen/wm9713.c | |||
| @@ -431,7 +431,7 @@ static int wm9713_acc_enable(struct wm97xx *wm, int enable) | |||
| 431 | dig3 = wm->dig[2]; | 431 | dig3 = wm->dig[2]; |
| 432 | 432 | ||
| 433 | if (enable) { | 433 | if (enable) { |
| 434 | /* continous mode */ | 434 | /* continuous mode */ |
| 435 | if (wm->mach_ops->acc_startup && | 435 | if (wm->mach_ops->acc_startup && |
| 436 | (ret = wm->mach_ops->acc_startup(wm)) < 0) | 436 | (ret = wm->mach_ops->acc_startup(wm)) < 0) |
| 437 | return ret; | 437 | return ret; |
diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c index 6b75c9f660ae..5dbe73af2f8f 100644 --- a/drivers/input/touchscreen/wm97xx-core.c +++ b/drivers/input/touchscreen/wm97xx-core.c | |||
| @@ -335,7 +335,7 @@ static void wm97xx_pen_irq_worker(struct work_struct *work) | |||
| 335 | */ | 335 | */ |
| 336 | if (!wm->mach_ops->acc_enabled || wm->mach_ops->acc_pen_down) { | 336 | if (!wm->mach_ops->acc_enabled || wm->mach_ops->acc_pen_down) { |
| 337 | if (wm->pen_is_down && !pen_was_down) { | 337 | if (wm->pen_is_down && !pen_was_down) { |
| 338 | /* Data is not availiable immediately on pen down */ | 338 | /* Data is not available immediately on pen down */ |
| 339 | queue_delayed_work(wm->ts_workq, &wm->ts_reader, 1); | 339 | queue_delayed_work(wm->ts_workq, &wm->ts_reader, 1); |
| 340 | } | 340 | } |
| 341 | 341 | ||
| @@ -354,7 +354,7 @@ static void wm97xx_pen_irq_worker(struct work_struct *work) | |||
| 354 | * Codec PENDOWN irq handler | 354 | * Codec PENDOWN irq handler |
| 355 | * | 355 | * |
| 356 | * We have to disable the codec interrupt in the handler because it | 356 | * We have to disable the codec interrupt in the handler because it |
| 357 | * can take upto 1ms to clear the interrupt source. We schedule a task | 357 | * can take up to 1ms to clear the interrupt source. We schedule a task |
| 358 | * in a work queue to do the actual interaction with the chip. The | 358 | * in a work queue to do the actual interaction with the chip. The |
| 359 | * interrupt is then enabled again in the slow handler when the source | 359 | * interrupt is then enabled again in the slow handler when the source |
| 360 | * has been cleared. | 360 | * has been cleared. |
diff --git a/drivers/isdn/hardware/eicon/divacapi.h b/drivers/isdn/hardware/eicon/divacapi.h index 9f5b68037a26..e330da0c5fc0 100644 --- a/drivers/isdn/hardware/eicon/divacapi.h +++ b/drivers/isdn/hardware/eicon/divacapi.h | |||
| @@ -673,7 +673,7 @@ struct async_s { | |||
| 673 | 673 | ||
| 674 | 674 | ||
| 675 | /*------------------------------------------------------------------*/ | 675 | /*------------------------------------------------------------------*/ |
| 676 | /* auxilliary states for supplementary services */ | 676 | /* auxiliary states for supplementary services */ |
| 677 | /*------------------------------------------------------------------*/ | 677 | /*------------------------------------------------------------------*/ |
| 678 | 678 | ||
| 679 | #define IDLE 0 | 679 | #define IDLE 0 |
diff --git a/drivers/isdn/hardware/eicon/io.h b/drivers/isdn/hardware/eicon/io.h index 0c6c650d76bb..a6f175596364 100644 --- a/drivers/isdn/hardware/eicon/io.h +++ b/drivers/isdn/hardware/eicon/io.h | |||
| @@ -60,7 +60,7 @@ typedef struct _diva_xdi_capi_cfg { | |||
| 60 | -------------------------------------------------------------------------- */ | 60 | -------------------------------------------------------------------------- */ |
| 61 | struct _ISDN_ADAPTER { | 61 | struct _ISDN_ADAPTER { |
| 62 | void (* DIRequest)(PISDN_ADAPTER, ENTITY *) ; | 62 | void (* DIRequest)(PISDN_ADAPTER, ENTITY *) ; |
| 63 | int State ; /* from NT4 1.srv, a good idea, but a poor achievment */ | 63 | int State ; /* from NT4 1.srv, a good idea, but a poor achievement */ |
| 64 | int Initialized ; | 64 | int Initialized ; |
| 65 | int RegisteredWithDidd ; | 65 | int RegisteredWithDidd ; |
| 66 | int Unavailable ; /* callback function possible? */ | 66 | int Unavailable ; /* callback function possible? */ |
diff --git a/drivers/isdn/hardware/eicon/message.c b/drivers/isdn/hardware/eicon/message.c index 341ef17c22ac..8c5c563c4f12 100644 --- a/drivers/isdn/hardware/eicon/message.c +++ b/drivers/isdn/hardware/eicon/message.c | |||
| @@ -2639,7 +2639,7 @@ static byte connect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a, | |||
| 2639 | } | 2639 | } |
| 2640 | else | 2640 | else |
| 2641 | { | 2641 | { |
| 2642 | /* local reply if assign unsuccessfull | 2642 | /* local reply if assign unsuccessful |
| 2643 | or B3 protocol allows only one layer 3 connection | 2643 | or B3 protocol allows only one layer 3 connection |
| 2644 | and already connected | 2644 | and already connected |
| 2645 | or B2 protocol not any LAPD | 2645 | or B2 protocol not any LAPD |
| @@ -8189,7 +8189,7 @@ static word add_b23(PLCI *plci, API_PARSE *bp) | |||
| 8189 | dlc[ 0] = 15; | 8189 | dlc[ 0] = 15; |
| 8190 | if(b2_config->length >= 8) { /* PIAFS control abilities */ | 8190 | if(b2_config->length >= 8) { /* PIAFS control abilities */ |
| 8191 | dlc[ 7] = 10; | 8191 | dlc[ 7] = 10; |
| 8192 | dlc[16] = 2; /* Length of PIAFS extention */ | 8192 | dlc[16] = 2; /* Length of PIAFS extension */ |
| 8193 | dlc[17] = PIAFS_UDATA_ABILITIES; /* control (UDATA) ability */ | 8193 | dlc[17] = PIAFS_UDATA_ABILITIES; /* control (UDATA) ability */ |
| 8194 | dlc[18] = b2_config_parms[4].info[0]; /* value */ | 8194 | dlc[18] = b2_config_parms[4].info[0]; /* value */ |
| 8195 | dlc[ 0] = 18; | 8195 | dlc[ 0] = 18; |
diff --git a/drivers/isdn/hardware/eicon/pc.h b/drivers/isdn/hardware/eicon/pc.h index 1c6945768a35..bf6b01812400 100644 --- a/drivers/isdn/hardware/eicon/pc.h +++ b/drivers/isdn/hardware/eicon/pc.h | |||
| @@ -701,7 +701,7 @@ Byte | 8 7 6 5 4 3 2 1 | |||
| 701 | #define PROTCAP_FREE12 0x1000 /* not used */ | 701 | #define PROTCAP_FREE12 0x1000 /* not used */ |
| 702 | #define PROTCAP_FREE13 0x2000 /* not used */ | 702 | #define PROTCAP_FREE13 0x2000 /* not used */ |
| 703 | #define PROTCAP_FREE14 0x4000 /* not used */ | 703 | #define PROTCAP_FREE14 0x4000 /* not used */ |
| 704 | #define PROTCAP_EXTENSION 0x8000 /* used for future extentions */ | 704 | #define PROTCAP_EXTENSION 0x8000 /* used for future extensions */ |
| 705 | /* -----------------------------------------------------------* */ | 705 | /* -----------------------------------------------------------* */ |
| 706 | /* Onhook data transmission ETS30065901 */ | 706 | /* Onhook data transmission ETS30065901 */ |
| 707 | /* Message Type */ | 707 | /* Message Type */ |
diff --git a/drivers/isdn/hardware/eicon/um_idi.c b/drivers/isdn/hardware/eicon/um_idi.c index 6563db998d06..ac0bdd1f23fa 100644 --- a/drivers/isdn/hardware/eicon/um_idi.c +++ b/drivers/isdn/hardware/eicon/um_idi.c | |||
| @@ -363,7 +363,7 @@ int diva_um_idi_read(void *entity, | |||
| 363 | 363 | ||
| 364 | if ((ret = (*cp_fn) (os_handle, dst, data, length)) >= 0) { | 364 | if ((ret = (*cp_fn) (os_handle, dst, data, length)) >= 0) { |
| 365 | /* | 365 | /* |
| 366 | Acknowledge only if read was successfull | 366 | Acknowledge only if read was successful |
| 367 | */ | 367 | */ |
| 368 | diva_data_q_ack_segment4read(q); | 368 | diva_data_q_ack_segment4read(q); |
| 369 | } | 369 | } |
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c index 4e3780d78ac7..f6f3c87cc7c2 100644 --- a/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c | |||
| @@ -118,7 +118,7 @@ | |||
| 118 | * -> See hfc_multi.h for HFC_IO_MODE_* values | 118 | * -> See hfc_multi.h for HFC_IO_MODE_* values |
| 119 | * By default, the IO mode is pci memory IO (MEMIO). | 119 | * By default, the IO mode is pci memory IO (MEMIO). |
| 120 | * Some cards require specific IO mode, so it cannot be changed. | 120 | * Some cards require specific IO mode, so it cannot be changed. |
| 121 | * It may be usefull to set IO mode to register io (REGIO) to solve | 121 | * It may be useful to set IO mode to register io (REGIO) to solve |
| 122 | * PCI bridge problems. | 122 | * PCI bridge problems. |
| 123 | * If unsure, don't give this parameter. | 123 | * If unsure, don't give this parameter. |
| 124 | * | 124 | * |
| @@ -903,7 +903,7 @@ vpm_echocan_off(struct hfc_multi *hc, int ch) | |||
| 903 | /* | 903 | /* |
| 904 | * Speech Design resync feature | 904 | * Speech Design resync feature |
| 905 | * NOTE: This is called sometimes outside interrupt handler. | 905 | * NOTE: This is called sometimes outside interrupt handler. |
| 906 | * We must lock irqsave, so no other interrupt (other card) will occurr! | 906 | * We must lock irqsave, so no other interrupt (other card) will occur! |
| 907 | * Also multiple interrupts may nest, so must lock each access (lists, card)! | 907 | * Also multiple interrupts may nest, so must lock each access (lists, card)! |
| 908 | */ | 908 | */ |
| 909 | static inline void | 909 | static inline void |
diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c index 15d323b8be60..4343abac0b13 100644 --- a/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/drivers/isdn/hardware/mISDN/hfcpci.c | |||
| @@ -272,7 +272,7 @@ reset_hfcpci(struct hfc_pci *hc) | |||
| 272 | * D- and monitor/CI channel are not enabled | 272 | * D- and monitor/CI channel are not enabled |
| 273 | * STIO1 is used as output for data, B1+B2 from ST->IOM+HFC | 273 | * STIO1 is used as output for data, B1+B2 from ST->IOM+HFC |
| 274 | * STIO2 is used as data input, B1+B2 from IOM->ST | 274 | * STIO2 is used as data input, B1+B2 from IOM->ST |
| 275 | * ST B-channel send disabled -> continous 1s | 275 | * ST B-channel send disabled -> continuous 1s |
| 276 | * The IOM slots are always enabled | 276 | * The IOM slots are always enabled |
| 277 | */ | 277 | */ |
| 278 | if (test_bit(HFC_CFG_PCM, &hc->cfg)) { | 278 | if (test_bit(HFC_CFG_PCM, &hc->cfg)) { |
diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c index 3147020d188b..0cb0546ead88 100644 --- a/drivers/isdn/hisax/hfc_pci.c +++ b/drivers/isdn/hisax/hfc_pci.c | |||
| @@ -146,7 +146,7 @@ reset_hfcpci(struct IsdnCardState *cs) | |||
| 146 | /* D- and monitor/CI channel are not enabled */ | 146 | /* D- and monitor/CI channel are not enabled */ |
| 147 | /* STIO1 is used as output for data, B1+B2 from ST->IOM+HFC */ | 147 | /* STIO1 is used as output for data, B1+B2 from ST->IOM+HFC */ |
| 148 | /* STIO2 is used as data input, B1+B2 from IOM->ST */ | 148 | /* STIO2 is used as data input, B1+B2 from IOM->ST */ |
| 149 | /* ST B-channel send disabled -> continous 1s */ | 149 | /* ST B-channel send disabled -> continuous 1s */ |
| 150 | /* The IOM slots are always enabled */ | 150 | /* The IOM slots are always enabled */ |
| 151 | cs->hw.hfcpci.conn = 0x36; /* set data flow directions */ | 151 | cs->hw.hfcpci.conn = 0x36; /* set data flow directions */ |
| 152 | Write_hfc(cs, HFCPCI_CONNECT, cs->hw.hfcpci.conn); | 152 | Write_hfc(cs, HFCPCI_CONNECT, cs->hw.hfcpci.conn); |
diff --git a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c index 1235b7131ae1..156d7c63d944 100644 --- a/drivers/isdn/hisax/hfc_sx.c +++ b/drivers/isdn/hisax/hfc_sx.c | |||
| @@ -399,7 +399,7 @@ reset_hfcsx(struct IsdnCardState *cs) | |||
| 399 | /* D- and monitor/CI channel are not enabled */ | 399 | /* D- and monitor/CI channel are not enabled */ |
| 400 | /* STIO1 is used as output for data, B1+B2 from ST->IOM+HFC */ | 400 | /* STIO1 is used as output for data, B1+B2 from ST->IOM+HFC */ |
| 401 | /* STIO2 is used as data input, B1+B2 from IOM->ST */ | 401 | /* STIO2 is used as data input, B1+B2 from IOM->ST */ |
| 402 | /* ST B-channel send disabled -> continous 1s */ | 402 | /* ST B-channel send disabled -> continuous 1s */ |
| 403 | /* The IOM slots are always enabled */ | 403 | /* The IOM slots are always enabled */ |
| 404 | cs->hw.hfcsx.conn = 0x36; /* set data flow directions */ | 404 | cs->hw.hfcsx.conn = 0x36; /* set data flow directions */ |
| 405 | Write_hfc(cs, HFCSX_CONNECT, cs->hw.hfcsx.conn); | 405 | Write_hfc(cs, HFCSX_CONNECT, cs->hw.hfcsx.conn); |
diff --git a/drivers/isdn/hisax/hfc_usb.h b/drivers/isdn/hisax/hfc_usb.h index e79f56568d30..2f581c0b4693 100644 --- a/drivers/isdn/hisax/hfc_usb.h +++ b/drivers/isdn/hisax/hfc_usb.h | |||
| @@ -126,7 +126,7 @@ static struct hfcusb_symbolic_list urb_errlist[] = { | |||
| 126 | 126 | ||
| 127 | 127 | ||
| 128 | /* | 128 | /* |
| 129 | * device dependant information to support different | 129 | * device dependent information to support different |
| 130 | * ISDN Ta's using the HFC-S USB chip | 130 | * ISDN Ta's using the HFC-S USB chip |
| 131 | */ | 131 | */ |
| 132 | 132 | ||
diff --git a/drivers/isdn/hisax/l3dss1.c b/drivers/isdn/hisax/l3dss1.c index cc6ee2d39880..8e2fd02ecce0 100644 --- a/drivers/isdn/hisax/l3dss1.c +++ b/drivers/isdn/hisax/l3dss1.c | |||
| @@ -1595,7 +1595,7 @@ l3dss1_setup(struct l3_process *pc, u_char pr, void *arg) | |||
| 1595 | * Bearer Capabilities | 1595 | * Bearer Capabilities |
| 1596 | */ | 1596 | */ |
| 1597 | p = skb->data; | 1597 | p = skb->data; |
| 1598 | /* only the first occurence 'll be detected ! */ | 1598 | /* only the first occurrence 'll be detected ! */ |
| 1599 | if ((p = findie(p, skb->len, 0x04, 0))) { | 1599 | if ((p = findie(p, skb->len, 0x04, 0))) { |
| 1600 | if ((p[1] < 2) || (p[1] > 11)) | 1600 | if ((p[1] < 2) || (p[1] > 11)) |
| 1601 | err = 1; | 1601 | err = 1; |
| @@ -2161,7 +2161,7 @@ static void l3dss1_redir_req_early(struct l3_process *pc, u_char pr, void *arg) | |||
| 2161 | 2161 | ||
| 2162 | /***********************************************/ | 2162 | /***********************************************/ |
| 2163 | /* handle special commands for this protocol. */ | 2163 | /* handle special commands for this protocol. */ |
| 2164 | /* Examples are call independant services like */ | 2164 | /* Examples are call independent services like */ |
| 2165 | /* remote operations with dummy callref. */ | 2165 | /* remote operations with dummy callref. */ |
| 2166 | /***********************************************/ | 2166 | /***********************************************/ |
| 2167 | static int l3dss1_cmd_global(struct PStack *st, isdn_ctrl *ic) | 2167 | static int l3dss1_cmd_global(struct PStack *st, isdn_ctrl *ic) |
diff --git a/drivers/isdn/hisax/l3ni1.c b/drivers/isdn/hisax/l3ni1.c index f9584491fe8e..7b229c0ce115 100644 --- a/drivers/isdn/hisax/l3ni1.c +++ b/drivers/isdn/hisax/l3ni1.c | |||
| @@ -1449,7 +1449,7 @@ l3ni1_setup(struct l3_process *pc, u_char pr, void *arg) | |||
| 1449 | * Bearer Capabilities | 1449 | * Bearer Capabilities |
| 1450 | */ | 1450 | */ |
| 1451 | p = skb->data; | 1451 | p = skb->data; |
| 1452 | /* only the first occurence 'll be detected ! */ | 1452 | /* only the first occurrence 'll be detected ! */ |
| 1453 | if ((p = findie(p, skb->len, 0x04, 0))) { | 1453 | if ((p = findie(p, skb->len, 0x04, 0))) { |
| 1454 | if ((p[1] < 2) || (p[1] > 11)) | 1454 | if ((p[1] < 2) || (p[1] > 11)) |
| 1455 | err = 1; | 1455 | err = 1; |
| @@ -2017,7 +2017,7 @@ static void l3ni1_redir_req_early(struct l3_process *pc, u_char pr, void *arg) | |||
| 2017 | 2017 | ||
| 2018 | /***********************************************/ | 2018 | /***********************************************/ |
| 2019 | /* handle special commands for this protocol. */ | 2019 | /* handle special commands for this protocol. */ |
| 2020 | /* Examples are call independant services like */ | 2020 | /* Examples are call independent services like */ |
| 2021 | /* remote operations with dummy callref. */ | 2021 | /* remote operations with dummy callref. */ |
| 2022 | /***********************************************/ | 2022 | /***********************************************/ |
| 2023 | static int l3ni1_cmd_global(struct PStack *st, isdn_ctrl *ic) | 2023 | static int l3ni1_cmd_global(struct PStack *st, isdn_ctrl *ic) |
diff --git a/drivers/isdn/hisax/nj_s.c b/drivers/isdn/hisax/nj_s.c index 2344e7b33448..a1b89524b505 100644 --- a/drivers/isdn/hisax/nj_s.c +++ b/drivers/isdn/hisax/nj_s.c | |||
| @@ -167,7 +167,7 @@ static int __devinit njs_pci_probe(struct pci_dev *dev_netjet, | |||
| 167 | return(0); | 167 | return(0); |
| 168 | } | 168 | } |
| 169 | /* the TJ300 and TJ320 must be detected, the IRQ handling is different | 169 | /* the TJ300 and TJ320 must be detected, the IRQ handling is different |
| 170 | * unfortunatly the chips use the same device ID, but the TJ320 has | 170 | * unfortunately the chips use the same device ID, but the TJ320 has |
| 171 | * the bit20 in status PCI cfg register set | 171 | * the bit20 in status PCI cfg register set |
| 172 | */ | 172 | */ |
| 173 | pci_read_config_dword(dev_netjet, 0x04, &cfg); | 173 | pci_read_config_dword(dev_netjet, 0x04, &cfg); |
diff --git a/drivers/isdn/hisax/st5481_b.c b/drivers/isdn/hisax/st5481_b.c index e56e5af889b6..ed4bc564dc63 100644 --- a/drivers/isdn/hisax/st5481_b.c +++ b/drivers/isdn/hisax/st5481_b.c | |||
| @@ -124,7 +124,7 @@ static void usb_b_out(struct st5481_bcs *bcs,int buf_nr) | |||
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | /* | 126 | /* |
| 127 | * Start transfering (flags or data) on the B channel, since | 127 | * Start transferring (flags or data) on the B channel, since |
| 128 | * FIFO counters has been set to a non-zero value. | 128 | * FIFO counters has been set to a non-zero value. |
| 129 | */ | 129 | */ |
| 130 | static void st5481B_start_xfer(void *context) | 130 | static void st5481B_start_xfer(void *context) |
diff --git a/drivers/isdn/hisax/st5481_usb.c b/drivers/isdn/hisax/st5481_usb.c index 10d41c5d73ed..159e8fa00fd6 100644 --- a/drivers/isdn/hisax/st5481_usb.c +++ b/drivers/isdn/hisax/st5481_usb.c | |||
| @@ -470,7 +470,7 @@ void st5481_release_isocpipes(struct urb* urb[2]) | |||
| 470 | 470 | ||
| 471 | /* | 471 | /* |
| 472 | * Decode frames received on the B/D channel. | 472 | * Decode frames received on the B/D channel. |
| 473 | * Note that this function will be called continously | 473 | * Note that this function will be called continuously |
| 474 | * with 64Kbit/s / 16Kbit/s of data and hence it will be | 474 | * with 64Kbit/s / 16Kbit/s of data and hence it will be |
| 475 | * called 50 times per second with 20 ISOC descriptors. | 475 | * called 50 times per second with 20 ISOC descriptors. |
| 476 | * Called at interrupt. | 476 | * Called at interrupt. |
diff --git a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c index 282a4467ef19..aa25e183bf79 100644 --- a/drivers/isdn/hisax/teles_cs.c +++ b/drivers/isdn/hisax/teles_cs.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | Also inspired by ELSA PCMCIA driver | 9 | Also inspired by ELSA PCMCIA driver |
| 10 | by Klaus Lichtenwalder <Lichtenwalder@ACM.org> | 10 | by Klaus Lichtenwalder <Lichtenwalder@ACM.org> |
| 11 | 11 | ||
| 12 | Extentions to new hisax_pcmcia by Karsten Keil | 12 | Extensions to new hisax_pcmcia by Karsten Keil |
| 13 | 13 | ||
| 14 | minor changes to be compatible with kernel 2.4.x | 14 | minor changes to be compatible with kernel 2.4.x |
| 15 | by Jan.Schubert@GMX.li | 15 | by Jan.Schubert@GMX.li |
diff --git a/drivers/isdn/hysdn/hysdn_sched.c b/drivers/isdn/hysdn/hysdn_sched.c index 81db4a190d41..3674d30d6a03 100644 --- a/drivers/isdn/hysdn/hysdn_sched.c +++ b/drivers/isdn/hysdn/hysdn_sched.c | |||
| @@ -143,7 +143,7 @@ hysdn_sched_tx(hysdn_card *card, unsigned char *buf, | |||
| 143 | /* send one config line to the card and return 0 if successful, otherwise a */ | 143 | /* send one config line to the card and return 0 if successful, otherwise a */ |
| 144 | /* negative error code. */ | 144 | /* negative error code. */ |
| 145 | /* The function works with timeouts perhaps not giving the greatest speed */ | 145 | /* The function works with timeouts perhaps not giving the greatest speed */ |
| 146 | /* sending the line, but this should be meaningless beacuse only some lines */ | 146 | /* sending the line, but this should be meaningless because only some lines */ |
| 147 | /* are to be sent and this happens very seldom. */ | 147 | /* are to be sent and this happens very seldom. */ |
| 148 | /*****************************************************************************/ | 148 | /*****************************************************************************/ |
| 149 | int | 149 | int |
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c index afeede7ee295..2a7d17c19489 100644 --- a/drivers/isdn/i4l/isdn_net.c +++ b/drivers/isdn/i4l/isdn_net.c | |||
| @@ -1530,7 +1530,7 @@ isdn_net_ciscohdlck_slarp_send_keepalive(unsigned long data) | |||
| 1530 | printk (KERN_WARNING | 1530 | printk (KERN_WARNING |
| 1531 | "UPDOWN: Line protocol on Interface %s," | 1531 | "UPDOWN: Line protocol on Interface %s," |
| 1532 | " changed state to down\n", lp->netdev->dev->name); | 1532 | " changed state to down\n", lp->netdev->dev->name); |
| 1533 | /* should stop routing higher-level data accross */ | 1533 | /* should stop routing higher-level data across */ |
| 1534 | } else if ((!lp->cisco_line_state) && | 1534 | } else if ((!lp->cisco_line_state) && |
| 1535 | (myseq_diff >= 0) && (myseq_diff <= 2)) { | 1535 | (myseq_diff >= 0) && (myseq_diff <= 2)) { |
| 1536 | /* line down -> up */ | 1536 | /* line down -> up */ |
| @@ -1538,7 +1538,7 @@ isdn_net_ciscohdlck_slarp_send_keepalive(unsigned long data) | |||
| 1538 | printk (KERN_WARNING | 1538 | printk (KERN_WARNING |
| 1539 | "UPDOWN: Line protocol on Interface %s," | 1539 | "UPDOWN: Line protocol on Interface %s," |
| 1540 | " changed state to up\n", lp->netdev->dev->name); | 1540 | " changed state to up\n", lp->netdev->dev->name); |
| 1541 | /* restart routing higher-level data accross */ | 1541 | /* restart routing higher-level data across */ |
| 1542 | } | 1542 | } |
| 1543 | 1543 | ||
| 1544 | if (lp->cisco_debserint) | 1544 | if (lp->cisco_debserint) |
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c index 9e8162c80bb0..1b002b0002a4 100644 --- a/drivers/isdn/i4l/isdn_ppp.c +++ b/drivers/isdn/i4l/isdn_ppp.c | |||
| @@ -1514,7 +1514,7 @@ int isdn_ppp_autodial_filter(struct sk_buff *skb, isdn_net_local *lp) | |||
| 1514 | #define MP_LONGSEQ_MAXBIT ((MP_LONGSEQ_MASK+1)>>1) | 1514 | #define MP_LONGSEQ_MAXBIT ((MP_LONGSEQ_MASK+1)>>1) |
| 1515 | #define MP_SHORTSEQ_MAXBIT ((MP_SHORTSEQ_MASK+1)>>1) | 1515 | #define MP_SHORTSEQ_MAXBIT ((MP_SHORTSEQ_MASK+1)>>1) |
| 1516 | 1516 | ||
| 1517 | /* sequence-wrap safe comparisions (for long sequence)*/ | 1517 | /* sequence-wrap safe comparisons (for long sequence)*/ |
| 1518 | #define MP_LT(a,b) ((a-b)&MP_LONGSEQ_MAXBIT) | 1518 | #define MP_LT(a,b) ((a-b)&MP_LONGSEQ_MAXBIT) |
| 1519 | #define MP_LE(a,b) !((b-a)&MP_LONGSEQ_MAXBIT) | 1519 | #define MP_LE(a,b) !((b-a)&MP_LONGSEQ_MAXBIT) |
| 1520 | #define MP_GT(a,b) ((b-a)&MP_LONGSEQ_MAXBIT) | 1520 | #define MP_GT(a,b) ((b-a)&MP_LONGSEQ_MAXBIT) |
| @@ -1746,7 +1746,7 @@ static void isdn_ppp_mp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, | |||
| 1746 | * then next fragment should be the start of new reassembly | 1746 | * then next fragment should be the start of new reassembly |
| 1747 | * if sequence is contiguous, but we haven't reassembled yet, | 1747 | * if sequence is contiguous, but we haven't reassembled yet, |
| 1748 | * keep going. | 1748 | * keep going. |
| 1749 | * if sequence is not contiguous, either clear everyting | 1749 | * if sequence is not contiguous, either clear everything |
| 1750 | * below low watermark and set start to the next frag or | 1750 | * below low watermark and set start to the next frag or |
| 1751 | * clear start ptr. | 1751 | * clear start ptr. |
| 1752 | */ | 1752 | */ |
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index 3d88f15aa218..607d846ae063 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c | |||
| @@ -792,7 +792,7 @@ isdn_tty_suspend(char *id, modem_info * info, atemu * m) | |||
| 792 | } | 792 | } |
| 793 | 793 | ||
| 794 | /* isdn_tty_resume() tries to resume a suspended call | 794 | /* isdn_tty_resume() tries to resume a suspended call |
| 795 | * setup of the lower levels before that. unfortunatly here is no | 795 | * setup of the lower levels before that. unfortunately here is no |
| 796 | * checking for compatibility of used protocols implemented by Q931 | 796 | * checking for compatibility of used protocols implemented by Q931 |
| 797 | * It does the same things like isdn_tty_dial, the last command | 797 | * It does the same things like isdn_tty_dial, the last command |
| 798 | * is different, may be we can merge it. | 798 | * is different, may be we can merge it. |
diff --git a/drivers/isdn/isdnloop/isdnloop.c b/drivers/isdn/isdnloop/isdnloop.c index b8a1098b66ed..d497db0a26d0 100644 --- a/drivers/isdn/isdnloop/isdnloop.c +++ b/drivers/isdn/isdnloop/isdnloop.c | |||
| @@ -954,7 +954,7 @@ isdnloop_parse_cmd(isdnloop_card * card) | |||
| 954 | /* | 954 | /* |
| 955 | * Put command-strings into the of the 'card'. In reality, execute them | 955 | * Put command-strings into the of the 'card'. In reality, execute them |
| 956 | * right in place by calling isdnloop_parse_cmd(). Also copy every | 956 | * right in place by calling isdnloop_parse_cmd(). Also copy every |
| 957 | * command to the read message ringbuffer, preceeding it with a '>'. | 957 | * command to the read message ringbuffer, preceding it with a '>'. |
| 958 | * These mesagges can be read at /dev/isdnctrl. | 958 | * These mesagges can be read at /dev/isdnctrl. |
| 959 | * | 959 | * |
| 960 | * Parameter: | 960 | * Parameter: |
diff --git a/drivers/isdn/mISDN/dsp.h b/drivers/isdn/mISDN/dsp.h index 18af86879c05..8549431430f0 100644 --- a/drivers/isdn/mISDN/dsp.h +++ b/drivers/isdn/mISDN/dsp.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | /* options may be: | 21 | /* options may be: |
| 22 | * | 22 | * |
| 23 | * bit 0 = use ulaw instead of alaw | 23 | * bit 0 = use ulaw instead of alaw |
| 24 | * bit 1 = enable hfc hardware accelleration for all channels | 24 | * bit 1 = enable hfc hardware acceleration for all channels |
| 25 | * | 25 | * |
| 26 | */ | 26 | */ |
| 27 | #define DSP_OPT_ULAW (1<<0) | 27 | #define DSP_OPT_ULAW (1<<0) |
diff --git a/drivers/isdn/mISDN/dsp_cmx.c b/drivers/isdn/mISDN/dsp_cmx.c index 309bacf1fadc..4d395dea32f3 100644 --- a/drivers/isdn/mISDN/dsp_cmx.c +++ b/drivers/isdn/mISDN/dsp_cmx.c | |||
| @@ -1513,7 +1513,7 @@ dsp_cmx_send_member(struct dsp *dsp, int len, s32 *c, int members) | |||
| 1513 | /* -> if echo is NOT enabled */ | 1513 | /* -> if echo is NOT enabled */ |
| 1514 | if (!dsp->echo.software) { | 1514 | if (!dsp->echo.software) { |
| 1515 | /* | 1515 | /* |
| 1516 | * -> substract rx-data from conf-data, | 1516 | * -> subtract rx-data from conf-data, |
| 1517 | * if tx-data is available, mix | 1517 | * if tx-data is available, mix |
| 1518 | */ | 1518 | */ |
| 1519 | while (r != rr && t != tt) { | 1519 | while (r != rr && t != tt) { |
| @@ -1572,7 +1572,7 @@ dsp_cmx_send_member(struct dsp *dsp, int len, s32 *c, int members) | |||
| 1572 | send_packet: | 1572 | send_packet: |
| 1573 | /* | 1573 | /* |
| 1574 | * send tx-data if enabled - don't filter, | 1574 | * send tx-data if enabled - don't filter, |
| 1575 | * becuase we want what we send, not what we filtered | 1575 | * because we want what we send, not what we filtered |
| 1576 | */ | 1576 | */ |
| 1577 | if (dsp->tx_data) { | 1577 | if (dsp->tx_data) { |
| 1578 | if (tx_data_only) { | 1578 | if (tx_data_only) { |
diff --git a/drivers/isdn/mISDN/dsp_core.c b/drivers/isdn/mISDN/dsp_core.c index 6f5b54864283..2877291a9ed8 100644 --- a/drivers/isdn/mISDN/dsp_core.c +++ b/drivers/isdn/mISDN/dsp_core.c | |||
| @@ -115,7 +115,7 @@ | |||
| 115 | * | 115 | * |
| 116 | * The CMX has special functions for conferences with one, two and more | 116 | * The CMX has special functions for conferences with one, two and more |
| 117 | * members. It will allow different types of data flow. Receive and transmit | 117 | * members. It will allow different types of data flow. Receive and transmit |
| 118 | * data to/form upper layer may be swithed on/off individually without loosing | 118 | * data to/form upper layer may be swithed on/off individually without losing |
| 119 | * features of CMX, Tones and DTMF. | 119 | * features of CMX, Tones and DTMF. |
| 120 | * | 120 | * |
| 121 | * Echo Cancellation: Sometimes we like to cancel echo from the interface. | 121 | * Echo Cancellation: Sometimes we like to cancel echo from the interface. |
| @@ -127,9 +127,9 @@ | |||
| 127 | * | 127 | * |
| 128 | * If all used features can be realized in hardware, and if transmit and/or | 128 | * If all used features can be realized in hardware, and if transmit and/or |
| 129 | * receive data ist disabled, the card may not send/receive any data at all. | 129 | * receive data ist disabled, the card may not send/receive any data at all. |
| 130 | * Not receiving is usefull if only announcements are played. Not sending is | 130 | * Not receiving is useful if only announcements are played. Not sending is |
| 131 | * usefull if an answering machine records audio. Not sending and receiving is | 131 | * useful if an answering machine records audio. Not sending and receiving is |
| 132 | * usefull during most states of the call. If supported by hardware, tones | 132 | * useful during most states of the call. If supported by hardware, tones |
| 133 | * will be played without cpu load. Small PBXs and NT-Mode applications will | 133 | * will be played without cpu load. Small PBXs and NT-Mode applications will |
| 134 | * not need expensive hardware when processing calls. | 134 | * not need expensive hardware when processing calls. |
| 135 | * | 135 | * |
diff --git a/drivers/isdn/mISDN/dsp_dtmf.c b/drivers/isdn/mISDN/dsp_dtmf.c index 9ae2d33b06f7..5b484c3f4af6 100644 --- a/drivers/isdn/mISDN/dsp_dtmf.c +++ b/drivers/isdn/mISDN/dsp_dtmf.c | |||
| @@ -106,7 +106,7 @@ void dsp_dtmf_hardware(struct dsp *dsp) | |||
| 106 | * tested it allot. it even works with very short tones (40ms). the only | 106 | * tested it allot. it even works with very short tones (40ms). the only |
| 107 | * disadvantage is, that it doesn't work good with different volumes of both | 107 | * disadvantage is, that it doesn't work good with different volumes of both |
| 108 | * tones. this will happen, if accoustically coupled dialers are used. | 108 | * tones. this will happen, if accoustically coupled dialers are used. |
| 109 | * it sometimes detects tones during speach, which is normal for decoders. | 109 | * it sometimes detects tones during speech, which is normal for decoders. |
| 110 | * use sequences to given commands during calls. | 110 | * use sequences to given commands during calls. |
| 111 | * | 111 | * |
| 112 | * dtmf - points to a structure of the current dtmf state | 112 | * dtmf - points to a structure of the current dtmf state |
| @@ -244,7 +244,7 @@ coefficients: | |||
| 244 | if (result[i] < tresh) { | 244 | if (result[i] < tresh) { |
| 245 | lowgroup = -1; | 245 | lowgroup = -1; |
| 246 | highgroup = -1; | 246 | highgroup = -1; |
| 247 | break; /* noise inbetween */ | 247 | break; /* noise in between */ |
| 248 | } | 248 | } |
| 249 | /* good level found. This is allowed only one time per group */ | 249 | /* good level found. This is allowed only one time per group */ |
| 250 | if (i < NCOEFF/2) { | 250 | if (i < NCOEFF/2) { |
diff --git a/drivers/isdn/mISDN/dsp_tones.c b/drivers/isdn/mISDN/dsp_tones.c index 7dbe54ed1deb..4e4440e8bae5 100644 --- a/drivers/isdn/mISDN/dsp_tones.c +++ b/drivers/isdn/mISDN/dsp_tones.c | |||
| @@ -394,7 +394,7 @@ void dsp_tone_copy(struct dsp *dsp, u8 *data, int len) | |||
| 394 | while (len) { | 394 | while (len) { |
| 395 | /* find sample to start with */ | 395 | /* find sample to start with */ |
| 396 | while (42) { | 396 | while (42) { |
| 397 | /* warp arround */ | 397 | /* wrap around */ |
| 398 | if (!pat->seq[index]) { | 398 | if (!pat->seq[index]) { |
| 399 | count = 0; | 399 | count = 0; |
| 400 | index = 0; | 400 | index = 0; |
diff --git a/drivers/isdn/mISDN/l1oip_core.c b/drivers/isdn/mISDN/l1oip_core.c index bd526f664a39..22f8ec8b9247 100644 --- a/drivers/isdn/mISDN/l1oip_core.c +++ b/drivers/isdn/mISDN/l1oip_core.c | |||
| @@ -179,7 +179,7 @@ NOTE: A value of 0 equals 256 bytes of data. | |||
| 179 | - Time Base = Timestamp of first sample in frame | 179 | - Time Base = Timestamp of first sample in frame |
| 180 | The "Time Base" is used to rearange packets and to detect packet loss. | 180 | The "Time Base" is used to rearange packets and to detect packet loss. |
| 181 | The 16 bits are sent in network order (MSB first) and count 1/8000 th of a | 181 | The 16 bits are sent in network order (MSB first) and count 1/8000 th of a |
| 182 | second. This causes a wrap arround each 8,192 seconds. There is no requirement | 182 | second. This causes a wrap around each 8,192 seconds. There is no requirement |
| 183 | for the initial "Time Base", but 0 should be used for the first packet. | 183 | for the initial "Time Base", but 0 should be used for the first packet. |
| 184 | In case of HDLC data, this timestamp counts the packet or byte number. | 184 | In case of HDLC data, this timestamp counts the packet or byte number. |
| 185 | 185 | ||
| @@ -205,7 +205,7 @@ On Demand: | |||
| 205 | 205 | ||
| 206 | If the ondemand parameter is given, the remote IP is set to 0 on timeout. | 206 | If the ondemand parameter is given, the remote IP is set to 0 on timeout. |
| 207 | This will stop keepalive traffic to remote. If the remote is online again, | 207 | This will stop keepalive traffic to remote. If the remote is online again, |
| 208 | traffic will continue to the remote address. This is usefull for road warriors. | 208 | traffic will continue to the remote address. This is useful for road warriors. |
| 209 | This feature only works with ID set, otherwhise it is highly unsecure. | 209 | This feature only works with ID set, otherwhise it is highly unsecure. |
| 210 | 210 | ||
| 211 | 211 | ||
| @@ -590,7 +590,7 @@ multiframe: | |||
| 590 | return; | 590 | return; |
| 591 | } | 591 | } |
| 592 | } else | 592 | } else |
| 593 | mlen = len-2; /* single frame, substract timebase */ | 593 | mlen = len-2; /* single frame, subtract timebase */ |
| 594 | 594 | ||
| 595 | if (len < 2) { | 595 | if (len < 2) { |
| 596 | printk(KERN_WARNING "%s: packet error - packet too short, time " | 596 | printk(KERN_WARNING "%s: packet error - packet too short, time " |
diff --git a/drivers/isdn/mISDN/layer2.c b/drivers/isdn/mISDN/layer2.c index 4ae75053c9d2..d0aeb44ee7c0 100644 --- a/drivers/isdn/mISDN/layer2.c +++ b/drivers/isdn/mISDN/layer2.c | |||
| @@ -1864,7 +1864,7 @@ ph_data_indication(struct layer2 *l2, struct mISDNhead *hh, struct sk_buff *skb) | |||
| 1864 | psapi >>= 2; | 1864 | psapi >>= 2; |
| 1865 | ptei >>= 1; | 1865 | ptei >>= 1; |
| 1866 | if (psapi != l2->sapi) { | 1866 | if (psapi != l2->sapi) { |
| 1867 | /* not our bussiness */ | 1867 | /* not our business */ |
| 1868 | if (*debug & DEBUG_L2) | 1868 | if (*debug & DEBUG_L2) |
| 1869 | printk(KERN_DEBUG "%s: sapi %d/%d mismatch\n", | 1869 | printk(KERN_DEBUG "%s: sapi %d/%d mismatch\n", |
| 1870 | __func__, psapi, l2->sapi); | 1870 | __func__, psapi, l2->sapi); |
| @@ -1872,7 +1872,7 @@ ph_data_indication(struct layer2 *l2, struct mISDNhead *hh, struct sk_buff *skb) | |||
| 1872 | return 0; | 1872 | return 0; |
| 1873 | } | 1873 | } |
| 1874 | if ((ptei != l2->tei) && (ptei != GROUP_TEI)) { | 1874 | if ((ptei != l2->tei) && (ptei != GROUP_TEI)) { |
| 1875 | /* not our bussiness */ | 1875 | /* not our business */ |
| 1876 | if (*debug & DEBUG_L2) | 1876 | if (*debug & DEBUG_L2) |
| 1877 | printk(KERN_DEBUG "%s: tei %d/%d mismatch\n", | 1877 | printk(KERN_DEBUG "%s: tei %d/%d mismatch\n", |
| 1878 | __func__, ptei, l2->tei); | 1878 | __func__, ptei, l2->tei); |
diff --git a/drivers/leds/leds-pca9532.c b/drivers/leds/leds-pca9532.c index afac338d5025..5bf63af09ddf 100644 --- a/drivers/leds/leds-pca9532.c +++ b/drivers/leds/leds-pca9532.c | |||
| @@ -58,7 +58,7 @@ static struct i2c_driver pca9532_driver = { | |||
| 58 | .id_table = pca9532_id, | 58 | .id_table = pca9532_id, |
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| 61 | /* We have two pwm/blinkers, but 16 possible leds to drive. Additionaly, | 61 | /* We have two pwm/blinkers, but 16 possible leds to drive. Additionally, |
| 62 | * the clever Thecus people are using one pwm to drive the beeper. So, | 62 | * the clever Thecus people are using one pwm to drive the beeper. So, |
| 63 | * as a compromise we average one pwm to the values requested by all | 63 | * as a compromise we average one pwm to the values requested by all |
| 64 | * leds that are not ON/OFF. | 64 | * leds that are not ON/OFF. |
diff --git a/drivers/leds/leds-regulator.c b/drivers/leds/leds-regulator.c index 3790816643be..8497f56f8e46 100644 --- a/drivers/leds/leds-regulator.c +++ b/drivers/leds/leds-regulator.c | |||
| @@ -178,6 +178,10 @@ static int __devinit regulator_led_probe(struct platform_device *pdev) | |||
| 178 | led->cdev.flags |= LED_CORE_SUSPENDRESUME; | 178 | led->cdev.flags |= LED_CORE_SUSPENDRESUME; |
| 179 | led->vcc = vcc; | 179 | led->vcc = vcc; |
| 180 | 180 | ||
| 181 | /* to handle correctly an already enabled regulator */ | ||
| 182 | if (regulator_is_enabled(led->vcc)) | ||
| 183 | led->enabled = 1; | ||
| 184 | |||
| 181 | mutex_init(&led->mutex); | 185 | mutex_init(&led->mutex); |
| 182 | INIT_WORK(&led->work, led_work); | 186 | INIT_WORK(&led->work, led_work); |
| 183 | 187 | ||
diff --git a/drivers/leds/leds-wm8350.c b/drivers/leds/leds-wm8350.c index a04523273282..f14edd82cb00 100644 --- a/drivers/leds/leds-wm8350.c +++ b/drivers/leds/leds-wm8350.c | |||
| @@ -215,13 +215,13 @@ static int wm8350_led_probe(struct platform_device *pdev) | |||
| 215 | 215 | ||
| 216 | isink = regulator_get(&pdev->dev, "led_isink"); | 216 | isink = regulator_get(&pdev->dev, "led_isink"); |
| 217 | if (IS_ERR(isink)) { | 217 | if (IS_ERR(isink)) { |
| 218 | printk(KERN_ERR "%s: cant get ISINK\n", __func__); | 218 | printk(KERN_ERR "%s: can't get ISINK\n", __func__); |
| 219 | return PTR_ERR(isink); | 219 | return PTR_ERR(isink); |
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | dcdc = regulator_get(&pdev->dev, "led_vcc"); | 222 | dcdc = regulator_get(&pdev->dev, "led_vcc"); |
| 223 | if (IS_ERR(dcdc)) { | 223 | if (IS_ERR(dcdc)) { |
| 224 | printk(KERN_ERR "%s: cant get DCDC\n", __func__); | 224 | printk(KERN_ERR "%s: can't get DCDC\n", __func__); |
| 225 | ret = PTR_ERR(dcdc); | 225 | ret = PTR_ERR(dcdc); |
| 226 | goto err_isink; | 226 | goto err_isink; |
| 227 | } | 227 | } |
diff --git a/drivers/lguest/lguest_user.c b/drivers/lguest/lguest_user.c index 3c781cdddda9..948c547b8e9e 100644 --- a/drivers/lguest/lguest_user.c +++ b/drivers/lguest/lguest_user.c | |||
| @@ -130,7 +130,7 @@ static int add_eventfd(struct lguest *lg, unsigned long addr, int fd) | |||
| 130 | rcu_assign_pointer(lg->eventfds, new); | 130 | rcu_assign_pointer(lg->eventfds, new); |
| 131 | 131 | ||
| 132 | /* | 132 | /* |
| 133 | * We're not in a big hurry. Wait until noone's looking at old | 133 | * We're not in a big hurry. Wait until no one's looking at old |
| 134 | * version, then free it. | 134 | * version, then free it. |
| 135 | */ | 135 | */ |
| 136 | synchronize_rcu(); | 136 | synchronize_rcu(); |
diff --git a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c index 5396c67ba0a4..09d72bb00d12 100644 --- a/drivers/macintosh/adbhid.c +++ b/drivers/macintosh/adbhid.c | |||
| @@ -328,7 +328,7 @@ adbhid_input_keycode(int id, int scancode, int repeat) | |||
| 328 | switch (keycode) { | 328 | switch (keycode) { |
| 329 | case ADB_KEY_CAPSLOCK: | 329 | case ADB_KEY_CAPSLOCK: |
| 330 | if (!restore_capslock_events) { | 330 | if (!restore_capslock_events) { |
| 331 | /* Generate down/up events for CapsLock everytime. */ | 331 | /* Generate down/up events for CapsLock every time. */ |
| 332 | input_report_key(ahid->input, KEY_CAPSLOCK, 1); | 332 | input_report_key(ahid->input, KEY_CAPSLOCK, 1); |
| 333 | input_sync(ahid->input); | 333 | input_sync(ahid->input); |
| 334 | input_report_key(ahid->input, KEY_CAPSLOCK, 0); | 334 | input_report_key(ahid->input, KEY_CAPSLOCK, 0); |
diff --git a/drivers/macintosh/macio-adb.c b/drivers/macintosh/macio-adb.c index bd6da7a9c55b..b6ef8f590764 100644 --- a/drivers/macintosh/macio-adb.c +++ b/drivers/macintosh/macio-adb.c | |||
| @@ -147,7 +147,7 @@ static int macio_adb_reset_bus(void) | |||
| 147 | 147 | ||
| 148 | /* Hrm... we may want to not lock interrupts for so | 148 | /* Hrm... we may want to not lock interrupts for so |
| 149 | * long ... oh well, who uses that chip anyway ? :) | 149 | * long ... oh well, who uses that chip anyway ? :) |
| 150 | * That function will be seldomly used during boot | 150 | * That function will be seldom used during boot |
| 151 | * on rare machines, so... | 151 | * on rare machines, so... |
| 152 | */ | 152 | */ |
| 153 | spin_lock_irqsave(&macio_lock, flags); | 153 | spin_lock_irqsave(&macio_lock, flags); |
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c index 9e3e2c566598..02367308ff2e 100644 --- a/drivers/macintosh/therm_adt746x.c +++ b/drivers/macintosh/therm_adt746x.c | |||
| @@ -662,7 +662,7 @@ static void thermostat_create_files(void) | |||
| 662 | err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_fan_speed); | 662 | err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_fan_speed); |
| 663 | if (err) | 663 | if (err) |
| 664 | printk(KERN_WARNING | 664 | printk(KERN_WARNING |
| 665 | "Failed to create tempertaure attribute file(s).\n"); | 665 | "Failed to create temperature attribute file(s).\n"); |
| 666 | } | 666 | } |
| 667 | 667 | ||
| 668 | static void thermostat_remove_files(void) | 668 | static void thermostat_remove_files(void) |
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index bca2af2e3760..bb8b722a9783 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c | |||
| @@ -91,7 +91,7 @@ | |||
| 91 | * | 91 | * |
| 92 | * Mar. 10, 2005 : 1.2 | 92 | * Mar. 10, 2005 : 1.2 |
| 93 | * - Add basic support for Xserve G5 | 93 | * - Add basic support for Xserve G5 |
| 94 | * - Retreive pumps min/max from EEPROM image in device-tree (broken) | 94 | * - Retrieve pumps min/max from EEPROM image in device-tree (broken) |
| 95 | * - Use min/max macros here or there | 95 | * - Use min/max macros here or there |
| 96 | * - Latest darwin updated U3H min fan speed to 20% PWM | 96 | * - Latest darwin updated U3H min fan speed to 20% PWM |
| 97 | * | 97 | * |
| @@ -153,7 +153,7 @@ static struct i2c_adapter * u3_0; | |||
| 153 | static struct i2c_adapter * u3_1; | 153 | static struct i2c_adapter * u3_1; |
| 154 | static struct i2c_adapter * k2; | 154 | static struct i2c_adapter * k2; |
| 155 | static struct i2c_client * fcu; | 155 | static struct i2c_client * fcu; |
| 156 | static struct cpu_pid_state cpu_state[2]; | 156 | static struct cpu_pid_state processor_state[2]; |
| 157 | static struct basckside_pid_params backside_params; | 157 | static struct basckside_pid_params backside_params; |
| 158 | static struct backside_pid_state backside_state; | 158 | static struct backside_pid_state backside_state; |
| 159 | static struct drives_pid_state drives_state; | 159 | static struct drives_pid_state drives_state; |
| @@ -375,7 +375,7 @@ static int read_smon_adc(struct cpu_pid_state *state, int chan) | |||
| 375 | rc = i2c_master_send(state->monitor, buf, 2); | 375 | rc = i2c_master_send(state->monitor, buf, 2); |
| 376 | if (rc <= 0) | 376 | if (rc <= 0) |
| 377 | goto error; | 377 | goto error; |
| 378 | /* Wait for convertion */ | 378 | /* Wait for conversion */ |
| 379 | msleep(1); | 379 | msleep(1); |
| 380 | /* Switch to data register */ | 380 | /* Switch to data register */ |
| 381 | buf[0] = 4; | 381 | buf[0] = 4; |
| @@ -664,8 +664,8 @@ static int read_eeprom(int cpu, struct mpu_data *out) | |||
| 664 | 664 | ||
| 665 | static void fetch_cpu_pumps_minmax(void) | 665 | static void fetch_cpu_pumps_minmax(void) |
| 666 | { | 666 | { |
| 667 | struct cpu_pid_state *state0 = &cpu_state[0]; | 667 | struct cpu_pid_state *state0 = &processor_state[0]; |
| 668 | struct cpu_pid_state *state1 = &cpu_state[1]; | 668 | struct cpu_pid_state *state1 = &processor_state[1]; |
| 669 | u16 pump_min = 0, pump_max = 0xffff; | 669 | u16 pump_min = 0, pump_max = 0xffff; |
| 670 | u16 tmp[4]; | 670 | u16 tmp[4]; |
| 671 | 671 | ||
| @@ -717,17 +717,17 @@ static ssize_t show_##name(struct device *dev, struct device_attribute *attr, ch | |||
| 717 | return sprintf(buf, "%d", data); \ | 717 | return sprintf(buf, "%d", data); \ |
| 718 | } | 718 | } |
| 719 | 719 | ||
| 720 | BUILD_SHOW_FUNC_FIX(cpu0_temperature, cpu_state[0].last_temp) | 720 | BUILD_SHOW_FUNC_FIX(cpu0_temperature, processor_state[0].last_temp) |
| 721 | BUILD_SHOW_FUNC_FIX(cpu0_voltage, cpu_state[0].voltage) | 721 | BUILD_SHOW_FUNC_FIX(cpu0_voltage, processor_state[0].voltage) |
| 722 | BUILD_SHOW_FUNC_FIX(cpu0_current, cpu_state[0].current_a) | 722 | BUILD_SHOW_FUNC_FIX(cpu0_current, processor_state[0].current_a) |
| 723 | BUILD_SHOW_FUNC_INT(cpu0_exhaust_fan_rpm, cpu_state[0].rpm) | 723 | BUILD_SHOW_FUNC_INT(cpu0_exhaust_fan_rpm, processor_state[0].rpm) |
| 724 | BUILD_SHOW_FUNC_INT(cpu0_intake_fan_rpm, cpu_state[0].intake_rpm) | 724 | BUILD_SHOW_FUNC_INT(cpu0_intake_fan_rpm, processor_state[0].intake_rpm) |
| 725 | 725 | ||
| 726 | BUILD_SHOW_FUNC_FIX(cpu1_temperature, cpu_state[1].last_temp) | 726 | BUILD_SHOW_FUNC_FIX(cpu1_temperature, processor_state[1].last_temp) |
| 727 | BUILD_SHOW_FUNC_FIX(cpu1_voltage, cpu_state[1].voltage) | 727 | BUILD_SHOW_FUNC_FIX(cpu1_voltage, processor_state[1].voltage) |
| 728 | BUILD_SHOW_FUNC_FIX(cpu1_current, cpu_state[1].current_a) | 728 | BUILD_SHOW_FUNC_FIX(cpu1_current, processor_state[1].current_a) |
| 729 | BUILD_SHOW_FUNC_INT(cpu1_exhaust_fan_rpm, cpu_state[1].rpm) | 729 | BUILD_SHOW_FUNC_INT(cpu1_exhaust_fan_rpm, processor_state[1].rpm) |
| 730 | BUILD_SHOW_FUNC_INT(cpu1_intake_fan_rpm, cpu_state[1].intake_rpm) | 730 | BUILD_SHOW_FUNC_INT(cpu1_intake_fan_rpm, processor_state[1].intake_rpm) |
| 731 | 731 | ||
| 732 | BUILD_SHOW_FUNC_FIX(backside_temperature, backside_state.last_temp) | 732 | BUILD_SHOW_FUNC_FIX(backside_temperature, backside_state.last_temp) |
| 733 | BUILD_SHOW_FUNC_INT(backside_fan_pwm, backside_state.pwm) | 733 | BUILD_SHOW_FUNC_INT(backside_fan_pwm, backside_state.pwm) |
| @@ -919,8 +919,8 @@ static void do_cpu_pid(struct cpu_pid_state *state, s32 temp, s32 power) | |||
| 919 | 919 | ||
| 920 | static void do_monitor_cpu_combined(void) | 920 | static void do_monitor_cpu_combined(void) |
| 921 | { | 921 | { |
| 922 | struct cpu_pid_state *state0 = &cpu_state[0]; | 922 | struct cpu_pid_state *state0 = &processor_state[0]; |
| 923 | struct cpu_pid_state *state1 = &cpu_state[1]; | 923 | struct cpu_pid_state *state1 = &processor_state[1]; |
| 924 | s32 temp0, power0, temp1, power1; | 924 | s32 temp0, power0, temp1, power1; |
| 925 | s32 temp_combi, power_combi; | 925 | s32 temp_combi, power_combi; |
| 926 | int rc, intake, pump; | 926 | int rc, intake, pump; |
| @@ -1150,7 +1150,7 @@ static void do_monitor_cpu_rack(struct cpu_pid_state *state) | |||
| 1150 | /* | 1150 | /* |
| 1151 | * Initialize the state structure for one CPU control loop | 1151 | * Initialize the state structure for one CPU control loop |
| 1152 | */ | 1152 | */ |
| 1153 | static int init_cpu_state(struct cpu_pid_state *state, int index) | 1153 | static int init_processor_state(struct cpu_pid_state *state, int index) |
| 1154 | { | 1154 | { |
| 1155 | int err; | 1155 | int err; |
| 1156 | 1156 | ||
| @@ -1192,7 +1192,7 @@ static int init_cpu_state(struct cpu_pid_state *state, int index) | |||
| 1192 | err |= device_create_file(&of_dev->dev, &dev_attr_cpu1_intake_fan_rpm); | 1192 | err |= device_create_file(&of_dev->dev, &dev_attr_cpu1_intake_fan_rpm); |
| 1193 | } | 1193 | } |
| 1194 | if (err) | 1194 | if (err) |
| 1195 | printk(KERN_WARNING "Failed to create some of the atribute" | 1195 | printk(KERN_WARNING "Failed to create some of the attribute" |
| 1196 | "files for CPU %d\n", index); | 1196 | "files for CPU %d\n", index); |
| 1197 | 1197 | ||
| 1198 | return 0; | 1198 | return 0; |
| @@ -1205,7 +1205,7 @@ static int init_cpu_state(struct cpu_pid_state *state, int index) | |||
| 1205 | /* | 1205 | /* |
| 1206 | * Dispose of the state data for one CPU control loop | 1206 | * Dispose of the state data for one CPU control loop |
| 1207 | */ | 1207 | */ |
| 1208 | static void dispose_cpu_state(struct cpu_pid_state *state) | 1208 | static void dispose_processor_state(struct cpu_pid_state *state) |
| 1209 | { | 1209 | { |
| 1210 | if (state->monitor == NULL) | 1210 | if (state->monitor == NULL) |
| 1211 | return; | 1211 | return; |
| @@ -1804,9 +1804,9 @@ static int main_control_loop(void *x) | |||
| 1804 | set_pwm_fan(SLOTS_FAN_PWM_INDEX, SLOTS_FAN_DEFAULT_PWM); | 1804 | set_pwm_fan(SLOTS_FAN_PWM_INDEX, SLOTS_FAN_DEFAULT_PWM); |
| 1805 | 1805 | ||
| 1806 | /* Initialize ADCs */ | 1806 | /* Initialize ADCs */ |
| 1807 | initialize_adc(&cpu_state[0]); | 1807 | initialize_adc(&processor_state[0]); |
| 1808 | if (cpu_state[1].monitor != NULL) | 1808 | if (processor_state[1].monitor != NULL) |
| 1809 | initialize_adc(&cpu_state[1]); | 1809 | initialize_adc(&processor_state[1]); |
| 1810 | 1810 | ||
| 1811 | fcu_tickle_ticks = FCU_TICKLE_TICKS; | 1811 | fcu_tickle_ticks = FCU_TICKLE_TICKS; |
| 1812 | 1812 | ||
| @@ -1833,14 +1833,14 @@ static int main_control_loop(void *x) | |||
| 1833 | if (cpu_pid_type == CPU_PID_TYPE_COMBINED) | 1833 | if (cpu_pid_type == CPU_PID_TYPE_COMBINED) |
| 1834 | do_monitor_cpu_combined(); | 1834 | do_monitor_cpu_combined(); |
| 1835 | else if (cpu_pid_type == CPU_PID_TYPE_RACKMAC) { | 1835 | else if (cpu_pid_type == CPU_PID_TYPE_RACKMAC) { |
| 1836 | do_monitor_cpu_rack(&cpu_state[0]); | 1836 | do_monitor_cpu_rack(&processor_state[0]); |
| 1837 | if (cpu_state[1].monitor != NULL) | 1837 | if (processor_state[1].monitor != NULL) |
| 1838 | do_monitor_cpu_rack(&cpu_state[1]); | 1838 | do_monitor_cpu_rack(&processor_state[1]); |
| 1839 | // better deal with UP | 1839 | // better deal with UP |
| 1840 | } else { | 1840 | } else { |
| 1841 | do_monitor_cpu_split(&cpu_state[0]); | 1841 | do_monitor_cpu_split(&processor_state[0]); |
| 1842 | if (cpu_state[1].monitor != NULL) | 1842 | if (processor_state[1].monitor != NULL) |
| 1843 | do_monitor_cpu_split(&cpu_state[1]); | 1843 | do_monitor_cpu_split(&processor_state[1]); |
| 1844 | // better deal with UP | 1844 | // better deal with UP |
| 1845 | } | 1845 | } |
| 1846 | /* Then, the rest */ | 1846 | /* Then, the rest */ |
| @@ -1885,8 +1885,8 @@ static int main_control_loop(void *x) | |||
| 1885 | */ | 1885 | */ |
| 1886 | static void dispose_control_loops(void) | 1886 | static void dispose_control_loops(void) |
| 1887 | { | 1887 | { |
| 1888 | dispose_cpu_state(&cpu_state[0]); | 1888 | dispose_processor_state(&processor_state[0]); |
| 1889 | dispose_cpu_state(&cpu_state[1]); | 1889 | dispose_processor_state(&processor_state[1]); |
| 1890 | dispose_backside_state(&backside_state); | 1890 | dispose_backside_state(&backside_state); |
| 1891 | dispose_drives_state(&drives_state); | 1891 | dispose_drives_state(&drives_state); |
| 1892 | dispose_slots_state(&slots_state); | 1892 | dispose_slots_state(&slots_state); |
| @@ -1928,12 +1928,12 @@ static int create_control_loops(void) | |||
| 1928 | /* Create control loops for everything. If any fail, everything | 1928 | /* Create control loops for everything. If any fail, everything |
| 1929 | * fails | 1929 | * fails |
| 1930 | */ | 1930 | */ |
| 1931 | if (init_cpu_state(&cpu_state[0], 0)) | 1931 | if (init_processor_state(&processor_state[0], 0)) |
| 1932 | goto fail; | 1932 | goto fail; |
| 1933 | if (cpu_pid_type == CPU_PID_TYPE_COMBINED) | 1933 | if (cpu_pid_type == CPU_PID_TYPE_COMBINED) |
| 1934 | fetch_cpu_pumps_minmax(); | 1934 | fetch_cpu_pumps_minmax(); |
| 1935 | 1935 | ||
| 1936 | if (cpu_count > 1 && init_cpu_state(&cpu_state[1], 1)) | 1936 | if (cpu_count > 1 && init_processor_state(&processor_state[1], 1)) |
| 1937 | goto fail; | 1937 | goto fail; |
| 1938 | if (init_backside_state(&backside_state)) | 1938 | if (init_backside_state(&backside_state)) |
| 1939 | goto fail; | 1939 | goto fail; |
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c index d37819fd5ad3..46c4e95f10d6 100644 --- a/drivers/macintosh/therm_windtunnel.c +++ b/drivers/macintosh/therm_windtunnel.c | |||
| @@ -45,7 +45,7 @@ | |||
| 45 | #include <asm/sections.h> | 45 | #include <asm/sections.h> |
| 46 | #include <asm/macio.h> | 46 | #include <asm/macio.h> |
| 47 | 47 | ||
| 48 | #define LOG_TEMP 0 /* continously log temperature */ | 48 | #define LOG_TEMP 0 /* continuously log temperature */ |
| 49 | 49 | ||
| 50 | static struct { | 50 | static struct { |
| 51 | volatile int running; | 51 | volatile int running; |
diff --git a/drivers/md/bitmap.h b/drivers/md/bitmap.h index 931a7a7c3796..d0aeaf46d932 100644 --- a/drivers/md/bitmap.h +++ b/drivers/md/bitmap.h | |||
| @@ -45,7 +45,7 @@ | |||
| 45 | * | 45 | * |
| 46 | * The counter counts pending write requests, plus the on-disk bit. | 46 | * The counter counts pending write requests, plus the on-disk bit. |
| 47 | * When the counter is '1' and the resync bits are clear, the on-disk | 47 | * When the counter is '1' and the resync bits are clear, the on-disk |
| 48 | * bit can be cleared aswell, thus setting the counter to 0. | 48 | * bit can be cleared as well, thus setting the counter to 0. |
| 49 | * When we set a bit, or in the counter (to start a write), if the fields is | 49 | * When we set a bit, or in the counter (to start a write), if the fields is |
| 50 | * 0, we first set the disk bit and set the counter to 1. | 50 | * 0, we first set the disk bit and set the counter to 1. |
| 51 | * | 51 | * |
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index 5ef136cdba91..e5d8904fc8f6 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c | |||
| @@ -390,13 +390,6 @@ static int raid_is_congested(struct dm_target_callbacks *cb, int bits) | |||
| 390 | return md_raid5_congested(&rs->md, bits); | 390 | return md_raid5_congested(&rs->md, bits); |
| 391 | } | 391 | } |
| 392 | 392 | ||
| 393 | static void raid_unplug(struct dm_target_callbacks *cb) | ||
| 394 | { | ||
| 395 | struct raid_set *rs = container_of(cb, struct raid_set, callbacks); | ||
| 396 | |||
| 397 | md_raid5_kick_device(rs->md.private); | ||
| 398 | } | ||
| 399 | |||
| 400 | /* | 393 | /* |
| 401 | * Construct a RAID4/5/6 mapping: | 394 | * Construct a RAID4/5/6 mapping: |
| 402 | * Args: | 395 | * Args: |
| @@ -487,7 +480,6 @@ static int raid_ctr(struct dm_target *ti, unsigned argc, char **argv) | |||
| 487 | } | 480 | } |
| 488 | 481 | ||
| 489 | rs->callbacks.congested_fn = raid_is_congested; | 482 | rs->callbacks.congested_fn = raid_is_congested; |
| 490 | rs->callbacks.unplug_fn = raid_unplug; | ||
| 491 | dm_table_add_target_callbacks(ti->table, &rs->callbacks); | 483 | dm_table_add_target_callbacks(ti->table, &rs->callbacks); |
| 492 | 484 | ||
| 493 | return 0; | 485 | return 0; |
diff --git a/drivers/md/dm-region-hash.c b/drivers/md/dm-region-hash.c index dad011aed0c9..7771ed212182 100644 --- a/drivers/md/dm-region-hash.c +++ b/drivers/md/dm-region-hash.c | |||
| @@ -419,7 +419,7 @@ void dm_rh_mark_nosync(struct dm_region_hash *rh, struct bio *bio) | |||
| 419 | /* | 419 | /* |
| 420 | * Possible cases: | 420 | * Possible cases: |
| 421 | * 1) DM_RH_DIRTY | 421 | * 1) DM_RH_DIRTY |
| 422 | * 2) DM_RH_NOSYNC: was dirty, other preceeding writes failed | 422 | * 2) DM_RH_NOSYNC: was dirty, other preceding writes failed |
| 423 | * 3) DM_RH_RECOVERING: flushing pending writes | 423 | * 3) DM_RH_RECOVERING: flushing pending writes |
| 424 | * Either case, the region should have not been connected to list. | 424 | * Either case, the region should have not been connected to list. |
| 425 | */ | 425 | */ |
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 416d4e258df6..cb8380c9767f 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c | |||
| @@ -927,20 +927,80 @@ static int dm_table_build_index(struct dm_table *t) | |||
| 927 | } | 927 | } |
| 928 | 928 | ||
| 929 | /* | 929 | /* |
| 930 | * Get a disk whose integrity profile reflects the table's profile. | ||
| 931 | * If %match_all is true, all devices' profiles must match. | ||
| 932 | * If %match_all is false, all devices must at least have an | ||
| 933 | * allocated integrity profile; but uninitialized is ok. | ||
| 934 | * Returns NULL if integrity support was inconsistent or unavailable. | ||
| 935 | */ | ||
| 936 | static struct gendisk * dm_table_get_integrity_disk(struct dm_table *t, | ||
| 937 | bool match_all) | ||
| 938 | { | ||
| 939 | struct list_head *devices = dm_table_get_devices(t); | ||
| 940 | struct dm_dev_internal *dd = NULL; | ||
| 941 | struct gendisk *prev_disk = NULL, *template_disk = NULL; | ||
| 942 | |||
| 943 | list_for_each_entry(dd, devices, list) { | ||
| 944 | template_disk = dd->dm_dev.bdev->bd_disk; | ||
| 945 | if (!blk_get_integrity(template_disk)) | ||
| 946 | goto no_integrity; | ||
| 947 | if (!match_all && !blk_integrity_is_initialized(template_disk)) | ||
| 948 | continue; /* skip uninitialized profiles */ | ||
| 949 | else if (prev_disk && | ||
| 950 | blk_integrity_compare(prev_disk, template_disk) < 0) | ||
| 951 | goto no_integrity; | ||
| 952 | prev_disk = template_disk; | ||
| 953 | } | ||
| 954 | |||
| 955 | return template_disk; | ||
| 956 | |||
| 957 | no_integrity: | ||
| 958 | if (prev_disk) | ||
| 959 | DMWARN("%s: integrity not set: %s and %s profile mismatch", | ||
| 960 | dm_device_name(t->md), | ||
| 961 | prev_disk->disk_name, | ||
| 962 | template_disk->disk_name); | ||
| 963 | return NULL; | ||
| 964 | } | ||
| 965 | |||
| 966 | /* | ||
| 930 | * Register the mapped device for blk_integrity support if | 967 | * Register the mapped device for blk_integrity support if |
| 931 | * the underlying devices support it. | 968 | * the underlying devices have an integrity profile. But all devices |
| 969 | * may not have matching profiles (checking all devices isn't reliable | ||
| 970 | * during table load because this table may use other DM device(s) which | ||
| 971 | * must be resumed before they will have an initialized integity profile). | ||
| 972 | * Stacked DM devices force a 2 stage integrity profile validation: | ||
| 973 | * 1 - during load, validate all initialized integrity profiles match | ||
| 974 | * 2 - during resume, validate all integrity profiles match | ||
| 932 | */ | 975 | */ |
| 933 | static int dm_table_prealloc_integrity(struct dm_table *t, struct mapped_device *md) | 976 | static int dm_table_prealloc_integrity(struct dm_table *t, struct mapped_device *md) |
| 934 | { | 977 | { |
| 935 | struct list_head *devices = dm_table_get_devices(t); | 978 | struct gendisk *template_disk = NULL; |
| 936 | struct dm_dev_internal *dd; | ||
| 937 | 979 | ||
| 938 | list_for_each_entry(dd, devices, list) | 980 | template_disk = dm_table_get_integrity_disk(t, false); |
| 939 | if (bdev_get_integrity(dd->dm_dev.bdev)) { | 981 | if (!template_disk) |
| 940 | t->integrity_supported = 1; | 982 | return 0; |
| 941 | return blk_integrity_register(dm_disk(md), NULL); | ||
| 942 | } | ||
| 943 | 983 | ||
| 984 | if (!blk_integrity_is_initialized(dm_disk(md))) { | ||
| 985 | t->integrity_supported = 1; | ||
| 986 | return blk_integrity_register(dm_disk(md), NULL); | ||
| 987 | } | ||
| 988 | |||
| 989 | /* | ||
| 990 | * If DM device already has an initalized integrity | ||
| 991 | * profile the new profile should not conflict. | ||
| 992 | */ | ||
| 993 | if (blk_integrity_is_initialized(template_disk) && | ||
| 994 | blk_integrity_compare(dm_disk(md), template_disk) < 0) { | ||
| 995 | DMWARN("%s: conflict with existing integrity profile: " | ||
| 996 | "%s profile mismatch", | ||
| 997 | dm_device_name(t->md), | ||
| 998 | template_disk->disk_name); | ||
| 999 | return 1; | ||
| 1000 | } | ||
| 1001 | |||
| 1002 | /* Preserve existing initialized integrity profile */ | ||
| 1003 | t->integrity_supported = 1; | ||
| 944 | return 0; | 1004 | return 0; |
| 945 | } | 1005 | } |
| 946 | 1006 | ||
| @@ -1094,41 +1154,27 @@ combine_limits: | |||
| 1094 | 1154 | ||
| 1095 | /* | 1155 | /* |
| 1096 | * Set the integrity profile for this device if all devices used have | 1156 | * Set the integrity profile for this device if all devices used have |
| 1097 | * matching profiles. | 1157 | * matching profiles. We're quite deep in the resume path but still |
| 1158 | * don't know if all devices (particularly DM devices this device | ||
| 1159 | * may be stacked on) have matching profiles. Even if the profiles | ||
| 1160 | * don't match we have no way to fail (to resume) at this point. | ||
| 1098 | */ | 1161 | */ |
| 1099 | static void dm_table_set_integrity(struct dm_table *t) | 1162 | static void dm_table_set_integrity(struct dm_table *t) |
| 1100 | { | 1163 | { |
| 1101 | struct list_head *devices = dm_table_get_devices(t); | 1164 | struct gendisk *template_disk = NULL; |
| 1102 | struct dm_dev_internal *prev = NULL, *dd = NULL; | ||
| 1103 | 1165 | ||
| 1104 | if (!blk_get_integrity(dm_disk(t->md))) | 1166 | if (!blk_get_integrity(dm_disk(t->md))) |
| 1105 | return; | 1167 | return; |
| 1106 | 1168 | ||
| 1107 | list_for_each_entry(dd, devices, list) { | 1169 | template_disk = dm_table_get_integrity_disk(t, true); |
| 1108 | if (prev && | 1170 | if (!template_disk && |
| 1109 | blk_integrity_compare(prev->dm_dev.bdev->bd_disk, | 1171 | blk_integrity_is_initialized(dm_disk(t->md))) { |
| 1110 | dd->dm_dev.bdev->bd_disk) < 0) { | 1172 | DMWARN("%s: device no longer has a valid integrity profile", |
| 1111 | DMWARN("%s: integrity not set: %s and %s mismatch", | 1173 | dm_device_name(t->md)); |
| 1112 | dm_device_name(t->md), | 1174 | return; |
| 1113 | prev->dm_dev.bdev->bd_disk->disk_name, | ||
| 1114 | dd->dm_dev.bdev->bd_disk->disk_name); | ||
| 1115 | goto no_integrity; | ||
| 1116 | } | ||
| 1117 | prev = dd; | ||
| 1118 | } | 1175 | } |
| 1119 | |||
| 1120 | if (!prev || !bdev_get_integrity(prev->dm_dev.bdev)) | ||
| 1121 | goto no_integrity; | ||
| 1122 | |||
| 1123 | blk_integrity_register(dm_disk(t->md), | 1176 | blk_integrity_register(dm_disk(t->md), |
| 1124 | bdev_get_integrity(prev->dm_dev.bdev)); | 1177 | blk_get_integrity(template_disk)); |
| 1125 | |||
| 1126 | return; | ||
| 1127 | |||
| 1128 | no_integrity: | ||
| 1129 | blk_integrity_register(dm_disk(t->md), NULL); | ||
| 1130 | |||
| 1131 | return; | ||
| 1132 | } | 1178 | } |
| 1133 | 1179 | ||
| 1134 | void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q, | 1180 | void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q, |
diff --git a/drivers/md/faulty.c b/drivers/md/faulty.c index 339fdc670751..23078dabb6df 100644 --- a/drivers/md/faulty.c +++ b/drivers/md/faulty.c | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | * | 30 | * |
| 31 | * Different modes can be active at a time, but only | 31 | * Different modes can be active at a time, but only |
| 32 | * one can be set at array creation. Others can be added later. | 32 | * one can be set at array creation. Others can be added later. |
| 33 | * A mode can be one-shot or recurrent with the recurrance being | 33 | * A mode can be one-shot or recurrent with the recurrence being |
| 34 | * once in every N requests. | 34 | * once in every N requests. |
| 35 | * The bottom 5 bits of the "layout" indicate the mode. The | 35 | * The bottom 5 bits of the "layout" indicate the mode. The |
| 36 | * remainder indicate a period, or 0 for one-shot. | 36 | * remainder indicate a period, or 0 for one-shot. |
diff --git a/drivers/md/md.c b/drivers/md/md.c index 8b66e04c2ea6..6e853c61d87e 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
| @@ -447,48 +447,59 @@ EXPORT_SYMBOL(md_flush_request); | |||
| 447 | 447 | ||
| 448 | /* Support for plugging. | 448 | /* Support for plugging. |
| 449 | * This mirrors the plugging support in request_queue, but does not | 449 | * This mirrors the plugging support in request_queue, but does not |
| 450 | * require having a whole queue | 450 | * require having a whole queue or request structures. |
| 451 | * We allocate an md_plug_cb for each md device and each thread it gets | ||
| 452 | * plugged on. This links tot the private plug_handle structure in the | ||
| 453 | * personality data where we keep a count of the number of outstanding | ||
| 454 | * plugs so other code can see if a plug is active. | ||
| 451 | */ | 455 | */ |
| 452 | static void plugger_work(struct work_struct *work) | 456 | struct md_plug_cb { |
| 453 | { | 457 | struct blk_plug_cb cb; |
| 454 | struct plug_handle *plug = | 458 | mddev_t *mddev; |
| 455 | container_of(work, struct plug_handle, unplug_work); | 459 | }; |
| 456 | plug->unplug_fn(plug); | ||
| 457 | } | ||
| 458 | static void plugger_timeout(unsigned long data) | ||
| 459 | { | ||
| 460 | struct plug_handle *plug = (void *)data; | ||
| 461 | kblockd_schedule_work(NULL, &plug->unplug_work); | ||
| 462 | } | ||
| 463 | void plugger_init(struct plug_handle *plug, | ||
| 464 | void (*unplug_fn)(struct plug_handle *)) | ||
| 465 | { | ||
| 466 | plug->unplug_flag = 0; | ||
| 467 | plug->unplug_fn = unplug_fn; | ||
| 468 | init_timer(&plug->unplug_timer); | ||
| 469 | plug->unplug_timer.function = plugger_timeout; | ||
| 470 | plug->unplug_timer.data = (unsigned long)plug; | ||
| 471 | INIT_WORK(&plug->unplug_work, plugger_work); | ||
| 472 | } | ||
| 473 | EXPORT_SYMBOL_GPL(plugger_init); | ||
| 474 | 460 | ||
| 475 | void plugger_set_plug(struct plug_handle *plug) | 461 | static void plugger_unplug(struct blk_plug_cb *cb) |
| 476 | { | 462 | { |
| 477 | if (!test_and_set_bit(PLUGGED_FLAG, &plug->unplug_flag)) | 463 | struct md_plug_cb *mdcb = container_of(cb, struct md_plug_cb, cb); |
| 478 | mod_timer(&plug->unplug_timer, jiffies + msecs_to_jiffies(3)+1); | 464 | if (atomic_dec_and_test(&mdcb->mddev->plug_cnt)) |
| 465 | md_wakeup_thread(mdcb->mddev->thread); | ||
| 466 | kfree(mdcb); | ||
| 479 | } | 467 | } |
| 480 | EXPORT_SYMBOL_GPL(plugger_set_plug); | ||
| 481 | 468 | ||
| 482 | int plugger_remove_plug(struct plug_handle *plug) | 469 | /* Check that an unplug wakeup will come shortly. |
| 470 | * If not, wakeup the md thread immediately | ||
| 471 | */ | ||
| 472 | int mddev_check_plugged(mddev_t *mddev) | ||
| 483 | { | 473 | { |
| 484 | if (test_and_clear_bit(PLUGGED_FLAG, &plug->unplug_flag)) { | 474 | struct blk_plug *plug = current->plug; |
| 485 | del_timer(&plug->unplug_timer); | 475 | struct md_plug_cb *mdcb; |
| 486 | return 1; | 476 | |
| 487 | } else | 477 | if (!plug) |
| 478 | return 0; | ||
| 479 | |||
| 480 | list_for_each_entry(mdcb, &plug->cb_list, cb.list) { | ||
| 481 | if (mdcb->cb.callback == plugger_unplug && | ||
| 482 | mdcb->mddev == mddev) { | ||
| 483 | /* Already on the list, move to top */ | ||
| 484 | if (mdcb != list_first_entry(&plug->cb_list, | ||
| 485 | struct md_plug_cb, | ||
| 486 | cb.list)) | ||
| 487 | list_move(&mdcb->cb.list, &plug->cb_list); | ||
| 488 | return 1; | ||
| 489 | } | ||
| 490 | } | ||
| 491 | /* Not currently on the callback list */ | ||
| 492 | mdcb = kmalloc(sizeof(*mdcb), GFP_ATOMIC); | ||
| 493 | if (!mdcb) | ||
| 488 | return 0; | 494 | return 0; |
| 489 | } | ||
| 490 | EXPORT_SYMBOL_GPL(plugger_remove_plug); | ||
| 491 | 495 | ||
| 496 | mdcb->mddev = mddev; | ||
| 497 | mdcb->cb.callback = plugger_unplug; | ||
| 498 | atomic_inc(&mddev->plug_cnt); | ||
| 499 | list_add(&mdcb->cb.list, &plug->cb_list); | ||
| 500 | return 1; | ||
| 501 | } | ||
| 502 | EXPORT_SYMBOL_GPL(mddev_check_plugged); | ||
| 492 | 503 | ||
| 493 | static inline mddev_t *mddev_get(mddev_t *mddev) | 504 | static inline mddev_t *mddev_get(mddev_t *mddev) |
| 494 | { | 505 | { |
| @@ -538,6 +549,7 @@ void mddev_init(mddev_t *mddev) | |||
| 538 | atomic_set(&mddev->active, 1); | 549 | atomic_set(&mddev->active, 1); |
| 539 | atomic_set(&mddev->openers, 0); | 550 | atomic_set(&mddev->openers, 0); |
| 540 | atomic_set(&mddev->active_io, 0); | 551 | atomic_set(&mddev->active_io, 0); |
| 552 | atomic_set(&mddev->plug_cnt, 0); | ||
| 541 | spin_lock_init(&mddev->write_lock); | 553 | spin_lock_init(&mddev->write_lock); |
| 542 | atomic_set(&mddev->flush_pending, 0); | 554 | atomic_set(&mddev->flush_pending, 0); |
| 543 | init_waitqueue_head(&mddev->sb_wait); | 555 | init_waitqueue_head(&mddev->sb_wait); |
| @@ -4723,7 +4735,6 @@ static void md_clean(mddev_t *mddev) | |||
| 4723 | mddev->bitmap_info.chunksize = 0; | 4735 | mddev->bitmap_info.chunksize = 0; |
| 4724 | mddev->bitmap_info.daemon_sleep = 0; | 4736 | mddev->bitmap_info.daemon_sleep = 0; |
| 4725 | mddev->bitmap_info.max_write_behind = 0; | 4737 | mddev->bitmap_info.max_write_behind = 0; |
| 4726 | mddev->plug = NULL; | ||
| 4727 | } | 4738 | } |
| 4728 | 4739 | ||
| 4729 | static void __md_stop_writes(mddev_t *mddev) | 4740 | static void __md_stop_writes(mddev_t *mddev) |
| @@ -6266,7 +6277,7 @@ static void status_resync(struct seq_file *seq, mddev_t * mddev) | |||
| 6266 | * rt is a sector_t, so could be 32bit or 64bit. | 6277 | * rt is a sector_t, so could be 32bit or 64bit. |
| 6267 | * So we divide before multiply in case it is 32bit and close | 6278 | * So we divide before multiply in case it is 32bit and close |
| 6268 | * to the limit. | 6279 | * to the limit. |
| 6269 | * We scale the divisor (db) by 32 to avoid loosing precision | 6280 | * We scale the divisor (db) by 32 to avoid losing precision |
| 6270 | * near the end of resync when the number of remaining sectors | 6281 | * near the end of resync when the number of remaining sectors |
| 6271 | * is close to 'db'. | 6282 | * is close to 'db'. |
| 6272 | * We then divide rt by 32 after multiplying by db to compensate. | 6283 | * We then divide rt by 32 after multiplying by db to compensate. |
| @@ -6688,12 +6699,6 @@ int md_allow_write(mddev_t *mddev) | |||
| 6688 | } | 6699 | } |
| 6689 | EXPORT_SYMBOL_GPL(md_allow_write); | 6700 | EXPORT_SYMBOL_GPL(md_allow_write); |
| 6690 | 6701 | ||
| 6691 | void md_unplug(mddev_t *mddev) | ||
| 6692 | { | ||
| 6693 | if (mddev->plug) | ||
| 6694 | mddev->plug->unplug_fn(mddev->plug); | ||
| 6695 | } | ||
| 6696 | |||
| 6697 | #define SYNC_MARKS 10 | 6702 | #define SYNC_MARKS 10 |
| 6698 | #define SYNC_MARK_STEP (3*HZ) | 6703 | #define SYNC_MARK_STEP (3*HZ) |
| 6699 | void md_do_sync(mddev_t *mddev) | 6704 | void md_do_sync(mddev_t *mddev) |
diff --git a/drivers/md/md.h b/drivers/md/md.h index 12215d437fcc..0b1fd3f1d85b 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h | |||
| @@ -29,26 +29,6 @@ | |||
| 29 | typedef struct mddev_s mddev_t; | 29 | typedef struct mddev_s mddev_t; |
| 30 | typedef struct mdk_rdev_s mdk_rdev_t; | 30 | typedef struct mdk_rdev_s mdk_rdev_t; |
| 31 | 31 | ||
| 32 | /* generic plugging support - like that provided with request_queue, | ||
| 33 | * but does not require a request_queue | ||
| 34 | */ | ||
| 35 | struct plug_handle { | ||
| 36 | void (*unplug_fn)(struct plug_handle *); | ||
| 37 | struct timer_list unplug_timer; | ||
| 38 | struct work_struct unplug_work; | ||
| 39 | unsigned long unplug_flag; | ||
| 40 | }; | ||
| 41 | #define PLUGGED_FLAG 1 | ||
| 42 | void plugger_init(struct plug_handle *plug, | ||
| 43 | void (*unplug_fn)(struct plug_handle *)); | ||
| 44 | void plugger_set_plug(struct plug_handle *plug); | ||
| 45 | int plugger_remove_plug(struct plug_handle *plug); | ||
| 46 | static inline void plugger_flush(struct plug_handle *plug) | ||
| 47 | { | ||
| 48 | del_timer_sync(&plug->unplug_timer); | ||
| 49 | cancel_work_sync(&plug->unplug_work); | ||
| 50 | } | ||
| 51 | |||
| 52 | /* | 32 | /* |
| 53 | * MD's 'extended' device | 33 | * MD's 'extended' device |
| 54 | */ | 34 | */ |
| @@ -94,7 +74,7 @@ struct mdk_rdev_s | |||
| 94 | #define In_sync 2 /* device is in_sync with rest of array */ | 74 | #define In_sync 2 /* device is in_sync with rest of array */ |
| 95 | #define WriteMostly 4 /* Avoid reading if at all possible */ | 75 | #define WriteMostly 4 /* Avoid reading if at all possible */ |
| 96 | #define AutoDetected 7 /* added by auto-detect */ | 76 | #define AutoDetected 7 /* added by auto-detect */ |
| 97 | #define Blocked 8 /* An error occured on an externally | 77 | #define Blocked 8 /* An error occurred on an externally |
| 98 | * managed array, don't allow writes | 78 | * managed array, don't allow writes |
| 99 | * until it is cleared */ | 79 | * until it is cleared */ |
| 100 | wait_queue_head_t blocked_wait; | 80 | wait_queue_head_t blocked_wait; |
| @@ -199,6 +179,9 @@ struct mddev_s | |||
| 199 | int delta_disks, new_level, new_layout; | 179 | int delta_disks, new_level, new_layout; |
| 200 | int new_chunk_sectors; | 180 | int new_chunk_sectors; |
| 201 | 181 | ||
| 182 | atomic_t plug_cnt; /* If device is expecting | ||
| 183 | * more bios soon. | ||
| 184 | */ | ||
| 202 | struct mdk_thread_s *thread; /* management thread */ | 185 | struct mdk_thread_s *thread; /* management thread */ |
| 203 | struct mdk_thread_s *sync_thread; /* doing resync or reconstruct */ | 186 | struct mdk_thread_s *sync_thread; /* doing resync or reconstruct */ |
| 204 | sector_t curr_resync; /* last block scheduled */ | 187 | sector_t curr_resync; /* last block scheduled */ |
| @@ -336,7 +319,6 @@ struct mddev_s | |||
| 336 | struct list_head all_mddevs; | 319 | struct list_head all_mddevs; |
| 337 | 320 | ||
| 338 | struct attribute_group *to_remove; | 321 | struct attribute_group *to_remove; |
| 339 | struct plug_handle *plug; /* if used by personality */ | ||
| 340 | 322 | ||
| 341 | struct bio_set *bio_set; | 323 | struct bio_set *bio_set; |
| 342 | 324 | ||
| @@ -516,7 +498,6 @@ extern int md_integrity_register(mddev_t *mddev); | |||
| 516 | extern void md_integrity_add_rdev(mdk_rdev_t *rdev, mddev_t *mddev); | 498 | extern void md_integrity_add_rdev(mdk_rdev_t *rdev, mddev_t *mddev); |
| 517 | extern int strict_strtoul_scaled(const char *cp, unsigned long *res, int scale); | 499 | extern int strict_strtoul_scaled(const char *cp, unsigned long *res, int scale); |
| 518 | extern void restore_bitmap_write_access(struct file *file); | 500 | extern void restore_bitmap_write_access(struct file *file); |
| 519 | extern void md_unplug(mddev_t *mddev); | ||
| 520 | 501 | ||
| 521 | extern void mddev_init(mddev_t *mddev); | 502 | extern void mddev_init(mddev_t *mddev); |
| 522 | extern int md_run(mddev_t *mddev); | 503 | extern int md_run(mddev_t *mddev); |
| @@ -530,4 +511,5 @@ extern struct bio *bio_clone_mddev(struct bio *bio, gfp_t gfp_mask, | |||
| 530 | mddev_t *mddev); | 511 | mddev_t *mddev); |
| 531 | extern struct bio *bio_alloc_mddev(gfp_t gfp_mask, int nr_iovecs, | 512 | extern struct bio *bio_alloc_mddev(gfp_t gfp_mask, int nr_iovecs, |
| 532 | mddev_t *mddev); | 513 | mddev_t *mddev); |
| 514 | extern int mddev_check_plugged(mddev_t *mddev); | ||
| 533 | #endif /* _MD_MD_H */ | 515 | #endif /* _MD_MD_H */ |
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index c2a21ae56d97..2b7a7ff401dc 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
| @@ -565,12 +565,6 @@ static void flush_pending_writes(conf_t *conf) | |||
| 565 | spin_unlock_irq(&conf->device_lock); | 565 | spin_unlock_irq(&conf->device_lock); |
| 566 | } | 566 | } |
| 567 | 567 | ||
| 568 | static void md_kick_device(mddev_t *mddev) | ||
| 569 | { | ||
| 570 | blk_flush_plug(current); | ||
| 571 | md_wakeup_thread(mddev->thread); | ||
| 572 | } | ||
| 573 | |||
| 574 | /* Barriers.... | 568 | /* Barriers.... |
| 575 | * Sometimes we need to suspend IO while we do something else, | 569 | * Sometimes we need to suspend IO while we do something else, |
| 576 | * either some resync/recovery, or reconfigure the array. | 570 | * either some resync/recovery, or reconfigure the array. |
| @@ -600,7 +594,7 @@ static void raise_barrier(conf_t *conf) | |||
| 600 | 594 | ||
| 601 | /* Wait until no block IO is waiting */ | 595 | /* Wait until no block IO is waiting */ |
| 602 | wait_event_lock_irq(conf->wait_barrier, !conf->nr_waiting, | 596 | wait_event_lock_irq(conf->wait_barrier, !conf->nr_waiting, |
| 603 | conf->resync_lock, md_kick_device(conf->mddev)); | 597 | conf->resync_lock, ); |
| 604 | 598 | ||
| 605 | /* block any new IO from starting */ | 599 | /* block any new IO from starting */ |
| 606 | conf->barrier++; | 600 | conf->barrier++; |
| @@ -608,7 +602,7 @@ static void raise_barrier(conf_t *conf) | |||
| 608 | /* Now wait for all pending IO to complete */ | 602 | /* Now wait for all pending IO to complete */ |
| 609 | wait_event_lock_irq(conf->wait_barrier, | 603 | wait_event_lock_irq(conf->wait_barrier, |
| 610 | !conf->nr_pending && conf->barrier < RESYNC_DEPTH, | 604 | !conf->nr_pending && conf->barrier < RESYNC_DEPTH, |
| 611 | conf->resync_lock, md_kick_device(conf->mddev)); | 605 | conf->resync_lock, ); |
| 612 | 606 | ||
| 613 | spin_unlock_irq(&conf->resync_lock); | 607 | spin_unlock_irq(&conf->resync_lock); |
| 614 | } | 608 | } |
| @@ -630,7 +624,7 @@ static void wait_barrier(conf_t *conf) | |||
| 630 | conf->nr_waiting++; | 624 | conf->nr_waiting++; |
| 631 | wait_event_lock_irq(conf->wait_barrier, !conf->barrier, | 625 | wait_event_lock_irq(conf->wait_barrier, !conf->barrier, |
| 632 | conf->resync_lock, | 626 | conf->resync_lock, |
| 633 | md_kick_device(conf->mddev)); | 627 | ); |
| 634 | conf->nr_waiting--; | 628 | conf->nr_waiting--; |
| 635 | } | 629 | } |
| 636 | conf->nr_pending++; | 630 | conf->nr_pending++; |
| @@ -666,8 +660,7 @@ static void freeze_array(conf_t *conf) | |||
| 666 | wait_event_lock_irq(conf->wait_barrier, | 660 | wait_event_lock_irq(conf->wait_barrier, |
| 667 | conf->nr_pending == conf->nr_queued+1, | 661 | conf->nr_pending == conf->nr_queued+1, |
| 668 | conf->resync_lock, | 662 | conf->resync_lock, |
| 669 | ({ flush_pending_writes(conf); | 663 | flush_pending_writes(conf)); |
| 670 | md_kick_device(conf->mddev); })); | ||
| 671 | spin_unlock_irq(&conf->resync_lock); | 664 | spin_unlock_irq(&conf->resync_lock); |
| 672 | } | 665 | } |
| 673 | static void unfreeze_array(conf_t *conf) | 666 | static void unfreeze_array(conf_t *conf) |
| @@ -729,6 +722,7 @@ static int make_request(mddev_t *mddev, struct bio * bio) | |||
| 729 | const unsigned long do_sync = (bio->bi_rw & REQ_SYNC); | 722 | const unsigned long do_sync = (bio->bi_rw & REQ_SYNC); |
| 730 | const unsigned long do_flush_fua = (bio->bi_rw & (REQ_FLUSH | REQ_FUA)); | 723 | const unsigned long do_flush_fua = (bio->bi_rw & (REQ_FLUSH | REQ_FUA)); |
| 731 | mdk_rdev_t *blocked_rdev; | 724 | mdk_rdev_t *blocked_rdev; |
| 725 | int plugged; | ||
| 732 | 726 | ||
| 733 | /* | 727 | /* |
| 734 | * Register the new request and wait if the reconstruction | 728 | * Register the new request and wait if the reconstruction |
| @@ -820,6 +814,8 @@ static int make_request(mddev_t *mddev, struct bio * bio) | |||
| 820 | * inc refcount on their rdev. Record them by setting | 814 | * inc refcount on their rdev. Record them by setting |
| 821 | * bios[x] to bio | 815 | * bios[x] to bio |
| 822 | */ | 816 | */ |
| 817 | plugged = mddev_check_plugged(mddev); | ||
| 818 | |||
| 823 | disks = conf->raid_disks; | 819 | disks = conf->raid_disks; |
| 824 | retry_write: | 820 | retry_write: |
| 825 | blocked_rdev = NULL; | 821 | blocked_rdev = NULL; |
| @@ -925,7 +921,7 @@ static int make_request(mddev_t *mddev, struct bio * bio) | |||
| 925 | /* In case raid1d snuck in to freeze_array */ | 921 | /* In case raid1d snuck in to freeze_array */ |
| 926 | wake_up(&conf->wait_barrier); | 922 | wake_up(&conf->wait_barrier); |
| 927 | 923 | ||
| 928 | if (do_sync || !bitmap) | 924 | if (do_sync || !bitmap || !plugged) |
| 929 | md_wakeup_thread(mddev->thread); | 925 | md_wakeup_thread(mddev->thread); |
| 930 | 926 | ||
| 931 | return 0; | 927 | return 0; |
| @@ -1516,13 +1512,16 @@ static void raid1d(mddev_t *mddev) | |||
| 1516 | conf_t *conf = mddev->private; | 1512 | conf_t *conf = mddev->private; |
| 1517 | struct list_head *head = &conf->retry_list; | 1513 | struct list_head *head = &conf->retry_list; |
| 1518 | mdk_rdev_t *rdev; | 1514 | mdk_rdev_t *rdev; |
| 1515 | struct blk_plug plug; | ||
| 1519 | 1516 | ||
| 1520 | md_check_recovery(mddev); | 1517 | md_check_recovery(mddev); |
| 1521 | 1518 | ||
| 1519 | blk_start_plug(&plug); | ||
| 1522 | for (;;) { | 1520 | for (;;) { |
| 1523 | char b[BDEVNAME_SIZE]; | 1521 | char b[BDEVNAME_SIZE]; |
| 1524 | 1522 | ||
| 1525 | flush_pending_writes(conf); | 1523 | if (atomic_read(&mddev->plug_cnt) == 0) |
| 1524 | flush_pending_writes(conf); | ||
| 1526 | 1525 | ||
| 1527 | spin_lock_irqsave(&conf->device_lock, flags); | 1526 | spin_lock_irqsave(&conf->device_lock, flags); |
| 1528 | if (list_empty(head)) { | 1527 | if (list_empty(head)) { |
| @@ -1593,6 +1592,7 @@ static void raid1d(mddev_t *mddev) | |||
| 1593 | } | 1592 | } |
| 1594 | cond_resched(); | 1593 | cond_resched(); |
| 1595 | } | 1594 | } |
| 1595 | blk_finish_plug(&plug); | ||
| 1596 | } | 1596 | } |
| 1597 | 1597 | ||
| 1598 | 1598 | ||
| @@ -2039,7 +2039,6 @@ static int stop(mddev_t *mddev) | |||
| 2039 | 2039 | ||
| 2040 | md_unregister_thread(mddev->thread); | 2040 | md_unregister_thread(mddev->thread); |
| 2041 | mddev->thread = NULL; | 2041 | mddev->thread = NULL; |
| 2042 | blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/ | ||
| 2043 | if (conf->r1bio_pool) | 2042 | if (conf->r1bio_pool) |
| 2044 | mempool_destroy(conf->r1bio_pool); | 2043 | mempool_destroy(conf->r1bio_pool); |
| 2045 | kfree(conf->mirrors); | 2044 | kfree(conf->mirrors); |
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index f7b62370b374..8e9462626ec5 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * | 5 | * |
| 6 | * RAID-10 support for md. | 6 | * RAID-10 support for md. |
| 7 | * | 7 | * |
| 8 | * Base on code in raid1.c. See raid1.c for futher copyright information. | 8 | * Base on code in raid1.c. See raid1.c for further copyright information. |
| 9 | * | 9 | * |
| 10 | * | 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
| @@ -340,14 +340,14 @@ static void raid10_end_write_request(struct bio *bio, int error) | |||
| 340 | 340 | ||
| 341 | /* | 341 | /* |
| 342 | * RAID10 layout manager | 342 | * RAID10 layout manager |
| 343 | * Aswell as the chunksize and raid_disks count, there are two | 343 | * As well as the chunksize and raid_disks count, there are two |
| 344 | * parameters: near_copies and far_copies. | 344 | * parameters: near_copies and far_copies. |
| 345 | * near_copies * far_copies must be <= raid_disks. | 345 | * near_copies * far_copies must be <= raid_disks. |
| 346 | * Normally one of these will be 1. | 346 | * Normally one of these will be 1. |
| 347 | * If both are 1, we get raid0. | 347 | * If both are 1, we get raid0. |
| 348 | * If near_copies == raid_disks, we get raid1. | 348 | * If near_copies == raid_disks, we get raid1. |
| 349 | * | 349 | * |
| 350 | * Chunks are layed out in raid0 style with near_copies copies of the | 350 | * Chunks are laid out in raid0 style with near_copies copies of the |
| 351 | * first chunk, followed by near_copies copies of the next chunk and | 351 | * first chunk, followed by near_copies copies of the next chunk and |
| 352 | * so on. | 352 | * so on. |
| 353 | * If far_copies > 1, then after 1/far_copies of the array has been assigned | 353 | * If far_copies > 1, then after 1/far_copies of the array has been assigned |
| @@ -634,12 +634,6 @@ static void flush_pending_writes(conf_t *conf) | |||
| 634 | spin_unlock_irq(&conf->device_lock); | 634 | spin_unlock_irq(&conf->device_lock); |
| 635 | } | 635 | } |
| 636 | 636 | ||
| 637 | static void md_kick_device(mddev_t *mddev) | ||
| 638 | { | ||
| 639 | blk_flush_plug(current); | ||
| 640 | md_wakeup_thread(mddev->thread); | ||
| 641 | } | ||
| 642 | |||
| 643 | /* Barriers.... | 637 | /* Barriers.... |
| 644 | * Sometimes we need to suspend IO while we do something else, | 638 | * Sometimes we need to suspend IO while we do something else, |
| 645 | * either some resync/recovery, or reconfigure the array. | 639 | * either some resync/recovery, or reconfigure the array. |
| @@ -669,15 +663,15 @@ static void raise_barrier(conf_t *conf, int force) | |||
| 669 | 663 | ||
| 670 | /* Wait until no block IO is waiting (unless 'force') */ | 664 | /* Wait until no block IO is waiting (unless 'force') */ |
| 671 | wait_event_lock_irq(conf->wait_barrier, force || !conf->nr_waiting, | 665 | wait_event_lock_irq(conf->wait_barrier, force || !conf->nr_waiting, |
| 672 | conf->resync_lock, md_kick_device(conf->mddev)); | 666 | conf->resync_lock, ); |
| 673 | 667 | ||
| 674 | /* block any new IO from starting */ | 668 | /* block any new IO from starting */ |
| 675 | conf->barrier++; | 669 | conf->barrier++; |
| 676 | 670 | ||
| 677 | /* No wait for all pending IO to complete */ | 671 | /* Now wait for all pending IO to complete */ |
| 678 | wait_event_lock_irq(conf->wait_barrier, | 672 | wait_event_lock_irq(conf->wait_barrier, |
| 679 | !conf->nr_pending && conf->barrier < RESYNC_DEPTH, | 673 | !conf->nr_pending && conf->barrier < RESYNC_DEPTH, |
| 680 | conf->resync_lock, md_kick_device(conf->mddev)); | 674 | conf->resync_lock, ); |
| 681 | 675 | ||
| 682 | spin_unlock_irq(&conf->resync_lock); | 676 | spin_unlock_irq(&conf->resync_lock); |
| 683 | } | 677 | } |
| @@ -698,7 +692,7 @@ static void wait_barrier(conf_t *conf) | |||
| 698 | conf->nr_waiting++; | 692 | conf->nr_waiting++; |
| 699 | wait_event_lock_irq(conf->wait_barrier, !conf->barrier, | 693 | wait_event_lock_irq(conf->wait_barrier, !conf->barrier, |
| 700 | conf->resync_lock, | 694 | conf->resync_lock, |
| 701 | md_kick_device(conf->mddev)); | 695 | ); |
| 702 | conf->nr_waiting--; | 696 | conf->nr_waiting--; |
| 703 | } | 697 | } |
| 704 | conf->nr_pending++; | 698 | conf->nr_pending++; |
| @@ -734,8 +728,8 @@ static void freeze_array(conf_t *conf) | |||
| 734 | wait_event_lock_irq(conf->wait_barrier, | 728 | wait_event_lock_irq(conf->wait_barrier, |
| 735 | conf->nr_pending == conf->nr_queued+1, | 729 | conf->nr_pending == conf->nr_queued+1, |
| 736 | conf->resync_lock, | 730 | conf->resync_lock, |
| 737 | ({ flush_pending_writes(conf); | 731 | flush_pending_writes(conf)); |
| 738 | md_kick_device(conf->mddev); })); | 732 | |
| 739 | spin_unlock_irq(&conf->resync_lock); | 733 | spin_unlock_irq(&conf->resync_lock); |
| 740 | } | 734 | } |
| 741 | 735 | ||
| @@ -762,6 +756,7 @@ static int make_request(mddev_t *mddev, struct bio * bio) | |||
| 762 | const unsigned long do_fua = (bio->bi_rw & REQ_FUA); | 756 | const unsigned long do_fua = (bio->bi_rw & REQ_FUA); |
| 763 | unsigned long flags; | 757 | unsigned long flags; |
| 764 | mdk_rdev_t *blocked_rdev; | 758 | mdk_rdev_t *blocked_rdev; |
| 759 | int plugged; | ||
| 765 | 760 | ||
| 766 | if (unlikely(bio->bi_rw & REQ_FLUSH)) { | 761 | if (unlikely(bio->bi_rw & REQ_FLUSH)) { |
| 767 | md_flush_request(mddev, bio); | 762 | md_flush_request(mddev, bio); |
| @@ -870,6 +865,8 @@ static int make_request(mddev_t *mddev, struct bio * bio) | |||
| 870 | * inc refcount on their rdev. Record them by setting | 865 | * inc refcount on their rdev. Record them by setting |
| 871 | * bios[x] to bio | 866 | * bios[x] to bio |
| 872 | */ | 867 | */ |
| 868 | plugged = mddev_check_plugged(mddev); | ||
| 869 | |||
| 873 | raid10_find_phys(conf, r10_bio); | 870 | raid10_find_phys(conf, r10_bio); |
| 874 | retry_write: | 871 | retry_write: |
| 875 | blocked_rdev = NULL; | 872 | blocked_rdev = NULL; |
| @@ -946,9 +943,8 @@ static int make_request(mddev_t *mddev, struct bio * bio) | |||
| 946 | /* In case raid10d snuck in to freeze_array */ | 943 | /* In case raid10d snuck in to freeze_array */ |
| 947 | wake_up(&conf->wait_barrier); | 944 | wake_up(&conf->wait_barrier); |
| 948 | 945 | ||
| 949 | if (do_sync || !mddev->bitmap) | 946 | if (do_sync || !mddev->bitmap || !plugged) |
| 950 | md_wakeup_thread(mddev->thread); | 947 | md_wakeup_thread(mddev->thread); |
| 951 | |||
| 952 | return 0; | 948 | return 0; |
| 953 | } | 949 | } |
| 954 | 950 | ||
| @@ -1640,9 +1636,11 @@ static void raid10d(mddev_t *mddev) | |||
| 1640 | conf_t *conf = mddev->private; | 1636 | conf_t *conf = mddev->private; |
| 1641 | struct list_head *head = &conf->retry_list; | 1637 | struct list_head *head = &conf->retry_list; |
| 1642 | mdk_rdev_t *rdev; | 1638 | mdk_rdev_t *rdev; |
| 1639 | struct blk_plug plug; | ||
| 1643 | 1640 | ||
| 1644 | md_check_recovery(mddev); | 1641 | md_check_recovery(mddev); |
| 1645 | 1642 | ||
| 1643 | blk_start_plug(&plug); | ||
| 1646 | for (;;) { | 1644 | for (;;) { |
| 1647 | char b[BDEVNAME_SIZE]; | 1645 | char b[BDEVNAME_SIZE]; |
| 1648 | 1646 | ||
| @@ -1716,6 +1714,7 @@ static void raid10d(mddev_t *mddev) | |||
| 1716 | } | 1714 | } |
| 1717 | cond_resched(); | 1715 | cond_resched(); |
| 1718 | } | 1716 | } |
| 1717 | blk_finish_plug(&plug); | ||
| 1719 | } | 1718 | } |
| 1720 | 1719 | ||
| 1721 | 1720 | ||
diff --git a/drivers/md/raid10.h b/drivers/md/raid10.h index 2316ac2e8e21..944b1104d3b4 100644 --- a/drivers/md/raid10.h +++ b/drivers/md/raid10.h | |||
| @@ -17,8 +17,8 @@ struct r10_private_data_s { | |||
| 17 | spinlock_t device_lock; | 17 | spinlock_t device_lock; |
| 18 | 18 | ||
| 19 | /* geometry */ | 19 | /* geometry */ |
| 20 | int near_copies; /* number of copies layed out raid0 style */ | 20 | int near_copies; /* number of copies laid out raid0 style */ |
| 21 | int far_copies; /* number of copies layed out | 21 | int far_copies; /* number of copies laid out |
| 22 | * at large strides across drives | 22 | * at large strides across drives |
| 23 | */ | 23 | */ |
| 24 | int far_offset; /* far_copies are offset by 1 stripe | 24 | int far_offset; /* far_copies are offset by 1 stripe |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index e867ee42b152..f301e6ae220c 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
| @@ -27,12 +27,12 @@ | |||
| 27 | * | 27 | * |
| 28 | * We group bitmap updates into batches. Each batch has a number. | 28 | * We group bitmap updates into batches. Each batch has a number. |
| 29 | * We may write out several batches at once, but that isn't very important. | 29 | * We may write out several batches at once, but that isn't very important. |
| 30 | * conf->bm_write is the number of the last batch successfully written. | 30 | * conf->seq_write is the number of the last batch successfully written. |
| 31 | * conf->bm_flush is the number of the last batch that was closed to | 31 | * conf->seq_flush is the number of the last batch that was closed to |
| 32 | * new additions. | 32 | * new additions. |
| 33 | * When we discover that we will need to write to any block in a stripe | 33 | * When we discover that we will need to write to any block in a stripe |
| 34 | * (in add_stripe_bio) we update the in-memory bitmap and record in sh->bm_seq | 34 | * (in add_stripe_bio) we update the in-memory bitmap and record in sh->bm_seq |
| 35 | * the number of the batch it will be in. This is bm_flush+1. | 35 | * the number of the batch it will be in. This is seq_flush+1. |
| 36 | * When we are ready to do a write, if that batch hasn't been written yet, | 36 | * When we are ready to do a write, if that batch hasn't been written yet, |
| 37 | * we plug the array and queue the stripe for later. | 37 | * we plug the array and queue the stripe for later. |
| 38 | * When an unplug happens, we increment bm_flush, thus closing the current | 38 | * When an unplug happens, we increment bm_flush, thus closing the current |
| @@ -199,14 +199,12 @@ static void __release_stripe(raid5_conf_t *conf, struct stripe_head *sh) | |||
| 199 | BUG_ON(!list_empty(&sh->lru)); | 199 | BUG_ON(!list_empty(&sh->lru)); |
| 200 | BUG_ON(atomic_read(&conf->active_stripes)==0); | 200 | BUG_ON(atomic_read(&conf->active_stripes)==0); |
| 201 | if (test_bit(STRIPE_HANDLE, &sh->state)) { | 201 | if (test_bit(STRIPE_HANDLE, &sh->state)) { |
| 202 | if (test_bit(STRIPE_DELAYED, &sh->state)) { | 202 | if (test_bit(STRIPE_DELAYED, &sh->state)) |
| 203 | list_add_tail(&sh->lru, &conf->delayed_list); | 203 | list_add_tail(&sh->lru, &conf->delayed_list); |
| 204 | plugger_set_plug(&conf->plug); | 204 | else if (test_bit(STRIPE_BIT_DELAY, &sh->state) && |
| 205 | } else if (test_bit(STRIPE_BIT_DELAY, &sh->state) && | 205 | sh->bm_seq - conf->seq_write > 0) |
| 206 | sh->bm_seq - conf->seq_write > 0) { | ||
| 207 | list_add_tail(&sh->lru, &conf->bitmap_list); | 206 | list_add_tail(&sh->lru, &conf->bitmap_list); |
| 208 | plugger_set_plug(&conf->plug); | 207 | else { |
| 209 | } else { | ||
| 210 | clear_bit(STRIPE_BIT_DELAY, &sh->state); | 208 | clear_bit(STRIPE_BIT_DELAY, &sh->state); |
| 211 | list_add_tail(&sh->lru, &conf->handle_list); | 209 | list_add_tail(&sh->lru, &conf->handle_list); |
| 212 | } | 210 | } |
| @@ -461,7 +459,7 @@ get_active_stripe(raid5_conf_t *conf, sector_t sector, | |||
| 461 | < (conf->max_nr_stripes *3/4) | 459 | < (conf->max_nr_stripes *3/4) |
| 462 | || !conf->inactive_blocked), | 460 | || !conf->inactive_blocked), |
| 463 | conf->device_lock, | 461 | conf->device_lock, |
| 464 | md_raid5_kick_device(conf)); | 462 | ); |
| 465 | conf->inactive_blocked = 0; | 463 | conf->inactive_blocked = 0; |
| 466 | } else | 464 | } else |
| 467 | init_stripe(sh, sector, previous); | 465 | init_stripe(sh, sector, previous); |
| @@ -1470,7 +1468,7 @@ static int resize_stripes(raid5_conf_t *conf, int newsize) | |||
| 1470 | wait_event_lock_irq(conf->wait_for_stripe, | 1468 | wait_event_lock_irq(conf->wait_for_stripe, |
| 1471 | !list_empty(&conf->inactive_list), | 1469 | !list_empty(&conf->inactive_list), |
| 1472 | conf->device_lock, | 1470 | conf->device_lock, |
| 1473 | blk_flush_plug(current)); | 1471 | ); |
| 1474 | osh = get_free_stripe(conf); | 1472 | osh = get_free_stripe(conf); |
| 1475 | spin_unlock_irq(&conf->device_lock); | 1473 | spin_unlock_irq(&conf->device_lock); |
| 1476 | atomic_set(&nsh->count, 1); | 1474 | atomic_set(&nsh->count, 1); |
| @@ -3623,8 +3621,7 @@ static void raid5_activate_delayed(raid5_conf_t *conf) | |||
| 3623 | atomic_inc(&conf->preread_active_stripes); | 3621 | atomic_inc(&conf->preread_active_stripes); |
| 3624 | list_add_tail(&sh->lru, &conf->hold_list); | 3622 | list_add_tail(&sh->lru, &conf->hold_list); |
| 3625 | } | 3623 | } |
| 3626 | } else | 3624 | } |
| 3627 | plugger_set_plug(&conf->plug); | ||
| 3628 | } | 3625 | } |
| 3629 | 3626 | ||
| 3630 | static void activate_bit_delay(raid5_conf_t *conf) | 3627 | static void activate_bit_delay(raid5_conf_t *conf) |
| @@ -3641,21 +3638,6 @@ static void activate_bit_delay(raid5_conf_t *conf) | |||
| 3641 | } | 3638 | } |
| 3642 | } | 3639 | } |
| 3643 | 3640 | ||
| 3644 | void md_raid5_kick_device(raid5_conf_t *conf) | ||
| 3645 | { | ||
| 3646 | blk_flush_plug(current); | ||
| 3647 | raid5_activate_delayed(conf); | ||
| 3648 | md_wakeup_thread(conf->mddev->thread); | ||
| 3649 | } | ||
| 3650 | EXPORT_SYMBOL_GPL(md_raid5_kick_device); | ||
| 3651 | |||
| 3652 | static void raid5_unplug(struct plug_handle *plug) | ||
| 3653 | { | ||
| 3654 | raid5_conf_t *conf = container_of(plug, raid5_conf_t, plug); | ||
| 3655 | |||
| 3656 | md_raid5_kick_device(conf); | ||
| 3657 | } | ||
| 3658 | |||
| 3659 | int md_raid5_congested(mddev_t *mddev, int bits) | 3641 | int md_raid5_congested(mddev_t *mddev, int bits) |
| 3660 | { | 3642 | { |
| 3661 | raid5_conf_t *conf = mddev->private; | 3643 | raid5_conf_t *conf = mddev->private; |
| @@ -3945,6 +3927,7 @@ static int make_request(mddev_t *mddev, struct bio * bi) | |||
| 3945 | struct stripe_head *sh; | 3927 | struct stripe_head *sh; |
| 3946 | const int rw = bio_data_dir(bi); | 3928 | const int rw = bio_data_dir(bi); |
| 3947 | int remaining; | 3929 | int remaining; |
| 3930 | int plugged; | ||
| 3948 | 3931 | ||
| 3949 | if (unlikely(bi->bi_rw & REQ_FLUSH)) { | 3932 | if (unlikely(bi->bi_rw & REQ_FLUSH)) { |
| 3950 | md_flush_request(mddev, bi); | 3933 | md_flush_request(mddev, bi); |
| @@ -3963,6 +3946,7 @@ static int make_request(mddev_t *mddev, struct bio * bi) | |||
| 3963 | bi->bi_next = NULL; | 3946 | bi->bi_next = NULL; |
| 3964 | bi->bi_phys_segments = 1; /* over-loaded to count active stripes */ | 3947 | bi->bi_phys_segments = 1; /* over-loaded to count active stripes */ |
| 3965 | 3948 | ||
| 3949 | plugged = mddev_check_plugged(mddev); | ||
| 3966 | for (;logical_sector < last_sector; logical_sector += STRIPE_SECTORS) { | 3950 | for (;logical_sector < last_sector; logical_sector += STRIPE_SECTORS) { |
| 3967 | DEFINE_WAIT(w); | 3951 | DEFINE_WAIT(w); |
| 3968 | int disks, data_disks; | 3952 | int disks, data_disks; |
| @@ -4057,7 +4041,7 @@ static int make_request(mddev_t *mddev, struct bio * bi) | |||
| 4057 | * add failed due to overlap. Flush everything | 4041 | * add failed due to overlap. Flush everything |
| 4058 | * and wait a while | 4042 | * and wait a while |
| 4059 | */ | 4043 | */ |
| 4060 | md_raid5_kick_device(conf); | 4044 | md_wakeup_thread(mddev->thread); |
| 4061 | release_stripe(sh); | 4045 | release_stripe(sh); |
| 4062 | schedule(); | 4046 | schedule(); |
| 4063 | goto retry; | 4047 | goto retry; |
| @@ -4077,6 +4061,9 @@ static int make_request(mddev_t *mddev, struct bio * bi) | |||
| 4077 | } | 4061 | } |
| 4078 | 4062 | ||
| 4079 | } | 4063 | } |
| 4064 | if (!plugged) | ||
| 4065 | md_wakeup_thread(mddev->thread); | ||
| 4066 | |||
| 4080 | spin_lock_irq(&conf->device_lock); | 4067 | spin_lock_irq(&conf->device_lock); |
| 4081 | remaining = raid5_dec_bi_phys_segments(bi); | 4068 | remaining = raid5_dec_bi_phys_segments(bi); |
| 4082 | spin_unlock_irq(&conf->device_lock); | 4069 | spin_unlock_irq(&conf->device_lock); |
| @@ -4478,24 +4465,30 @@ static void raid5d(mddev_t *mddev) | |||
| 4478 | struct stripe_head *sh; | 4465 | struct stripe_head *sh; |
| 4479 | raid5_conf_t *conf = mddev->private; | 4466 | raid5_conf_t *conf = mddev->private; |
| 4480 | int handled; | 4467 | int handled; |
| 4468 | struct blk_plug plug; | ||
| 4481 | 4469 | ||
| 4482 | pr_debug("+++ raid5d active\n"); | 4470 | pr_debug("+++ raid5d active\n"); |
| 4483 | 4471 | ||
| 4484 | md_check_recovery(mddev); | 4472 | md_check_recovery(mddev); |
| 4485 | 4473 | ||
| 4474 | blk_start_plug(&plug); | ||
| 4486 | handled = 0; | 4475 | handled = 0; |
| 4487 | spin_lock_irq(&conf->device_lock); | 4476 | spin_lock_irq(&conf->device_lock); |
| 4488 | while (1) { | 4477 | while (1) { |
| 4489 | struct bio *bio; | 4478 | struct bio *bio; |
| 4490 | 4479 | ||
| 4491 | if (conf->seq_flush != conf->seq_write) { | 4480 | if (atomic_read(&mddev->plug_cnt) == 0 && |
| 4492 | int seq = conf->seq_flush; | 4481 | !list_empty(&conf->bitmap_list)) { |
| 4482 | /* Now is a good time to flush some bitmap updates */ | ||
| 4483 | conf->seq_flush++; | ||
| 4493 | spin_unlock_irq(&conf->device_lock); | 4484 | spin_unlock_irq(&conf->device_lock); |
| 4494 | bitmap_unplug(mddev->bitmap); | 4485 | bitmap_unplug(mddev->bitmap); |
| 4495 | spin_lock_irq(&conf->device_lock); | 4486 | spin_lock_irq(&conf->device_lock); |
| 4496 | conf->seq_write = seq; | 4487 | conf->seq_write = conf->seq_flush; |
| 4497 | activate_bit_delay(conf); | 4488 | activate_bit_delay(conf); |
| 4498 | } | 4489 | } |
| 4490 | if (atomic_read(&mddev->plug_cnt) == 0) | ||
| 4491 | raid5_activate_delayed(conf); | ||
| 4499 | 4492 | ||
| 4500 | while ((bio = remove_bio_from_retry(conf))) { | 4493 | while ((bio = remove_bio_from_retry(conf))) { |
| 4501 | int ok; | 4494 | int ok; |
| @@ -4525,6 +4518,7 @@ static void raid5d(mddev_t *mddev) | |||
| 4525 | spin_unlock_irq(&conf->device_lock); | 4518 | spin_unlock_irq(&conf->device_lock); |
| 4526 | 4519 | ||
| 4527 | async_tx_issue_pending_all(); | 4520 | async_tx_issue_pending_all(); |
| 4521 | blk_finish_plug(&plug); | ||
| 4528 | 4522 | ||
| 4529 | pr_debug("--- raid5d inactive\n"); | 4523 | pr_debug("--- raid5d inactive\n"); |
| 4530 | } | 4524 | } |
| @@ -5141,8 +5135,6 @@ static int run(mddev_t *mddev) | |||
| 5141 | mdname(mddev)); | 5135 | mdname(mddev)); |
| 5142 | md_set_array_sectors(mddev, raid5_size(mddev, 0, 0)); | 5136 | md_set_array_sectors(mddev, raid5_size(mddev, 0, 0)); |
| 5143 | 5137 | ||
| 5144 | plugger_init(&conf->plug, raid5_unplug); | ||
| 5145 | mddev->plug = &conf->plug; | ||
| 5146 | if (mddev->queue) { | 5138 | if (mddev->queue) { |
| 5147 | int chunk_size; | 5139 | int chunk_size; |
| 5148 | /* read-ahead size must cover two whole stripes, which | 5140 | /* read-ahead size must cover two whole stripes, which |
| @@ -5192,7 +5184,6 @@ static int stop(mddev_t *mddev) | |||
| 5192 | mddev->thread = NULL; | 5184 | mddev->thread = NULL; |
| 5193 | if (mddev->queue) | 5185 | if (mddev->queue) |
| 5194 | mddev->queue->backing_dev_info.congested_fn = NULL; | 5186 | mddev->queue->backing_dev_info.congested_fn = NULL; |
| 5195 | plugger_flush(&conf->plug); /* the unplug fn references 'conf'*/ | ||
| 5196 | free_conf(conf); | 5187 | free_conf(conf); |
| 5197 | mddev->private = NULL; | 5188 | mddev->private = NULL; |
| 5198 | mddev->to_remove = &raid5_attrs_group; | 5189 | mddev->to_remove = &raid5_attrs_group; |
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h index 8d563a4f022a..3ca77a2613ba 100644 --- a/drivers/md/raid5.h +++ b/drivers/md/raid5.h | |||
| @@ -400,8 +400,6 @@ struct raid5_private_data { | |||
| 400 | * Cleared when a sync completes. | 400 | * Cleared when a sync completes. |
| 401 | */ | 401 | */ |
| 402 | 402 | ||
| 403 | struct plug_handle plug; | ||
| 404 | |||
| 405 | /* per cpu variables */ | 403 | /* per cpu variables */ |
| 406 | struct raid5_percpu { | 404 | struct raid5_percpu { |
| 407 | struct page *spare_page; /* Used when checking P/Q in raid6 */ | 405 | struct page *spare_page; /* Used when checking P/Q in raid6 */ |
diff --git a/drivers/media/common/saa7146_i2c.c b/drivers/media/common/saa7146_i2c.c index 74ee172b5bc9..b2ba9dc0dd6d 100644 --- a/drivers/media/common/saa7146_i2c.c +++ b/drivers/media/common/saa7146_i2c.c | |||
| @@ -161,7 +161,7 @@ static int saa7146_i2c_reset(struct saa7146_dev *dev) | |||
| 161 | msleep(SAA7146_I2C_DELAY); | 161 | msleep(SAA7146_I2C_DELAY); |
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | /* if any error is still present, a fatal error has occured ... */ | 164 | /* if any error is still present, a fatal error has occurred ... */ |
| 165 | status = saa7146_i2c_status(dev); | 165 | status = saa7146_i2c_status(dev); |
| 166 | if ( dev->i2c_bitrate != status ) { | 166 | if ( dev->i2c_bitrate != status ) { |
| 167 | DEB_I2C(("fatal error. status:0x%08x\n",status)); | 167 | DEB_I2C(("fatal error. status:0x%08x\n",status)); |
| @@ -326,9 +326,9 @@ static int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *m | |||
| 326 | if ( 0 != err) { | 326 | if ( 0 != err) { |
| 327 | /* this one is unsatisfying: some i2c slaves on some | 327 | /* this one is unsatisfying: some i2c slaves on some |
| 328 | dvb cards don't acknowledge correctly, so the saa7146 | 328 | dvb cards don't acknowledge correctly, so the saa7146 |
| 329 | thinks that an address error occured. in that case, the | 329 | thinks that an address error occurred. in that case, the |
| 330 | transaction should be retrying, even if an address error | 330 | transaction should be retrying, even if an address error |
| 331 | occured. analog saa7146 based cards extensively rely on | 331 | occurred. analog saa7146 based cards extensively rely on |
| 332 | i2c address probing, however, and address errors indicate that a | 332 | i2c address probing, however, and address errors indicate that a |
| 333 | device is really *not* there. retrying in that case | 333 | device is really *not* there. retrying in that case |
| 334 | increases the time the device needs to probe greatly, so | 334 | increases the time the device needs to probe greatly, so |
| @@ -365,7 +365,7 @@ static int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *m | |||
| 365 | DEB_I2C(("transmission successful. (msg:%d).\n",err)); | 365 | DEB_I2C(("transmission successful. (msg:%d).\n",err)); |
| 366 | out: | 366 | out: |
| 367 | /* another bug in revision 0: the i2c-registers get uploaded randomly by other | 367 | /* another bug in revision 0: the i2c-registers get uploaded randomly by other |
| 368 | uploads, so we better clear them out before continueing */ | 368 | uploads, so we better clear them out before continuing */ |
| 369 | if( 0 == dev->revision ) { | 369 | if( 0 == dev->revision ) { |
| 370 | __le32 zero = 0; | 370 | __le32 zero = 0; |
| 371 | saa7146_i2c_reset(dev); | 371 | saa7146_i2c_reset(dev); |
diff --git a/drivers/media/common/tuners/mxl5005s.c b/drivers/media/common/tuners/mxl5005s.c index 605e28b73263..0d6e09419044 100644 --- a/drivers/media/common/tuners/mxl5005s.c +++ b/drivers/media/common/tuners/mxl5005s.c | |||
| @@ -106,7 +106,7 @@ enum { | |||
| 106 | /* MXL5005 Tuner Register Struct */ | 106 | /* MXL5005 Tuner Register Struct */ |
| 107 | struct TunerReg { | 107 | struct TunerReg { |
| 108 | u16 Reg_Num; /* Tuner Register Address */ | 108 | u16 Reg_Num; /* Tuner Register Address */ |
| 109 | u16 Reg_Val; /* Current sw programmed value waiting to be writen */ | 109 | u16 Reg_Val; /* Current sw programmed value waiting to be written */ |
| 110 | }; | 110 | }; |
| 111 | 111 | ||
| 112 | enum { | 112 | enum { |
diff --git a/drivers/media/common/tuners/tda18271.h b/drivers/media/common/tuners/tda18271.h index 3abb221f3d07..50cfa8cebb93 100644 --- a/drivers/media/common/tuners/tda18271.h +++ b/drivers/media/common/tuners/tda18271.h | |||
| @@ -98,7 +98,7 @@ struct tda18271_config { | |||
| 98 | /* output options that can be disabled */ | 98 | /* output options that can be disabled */ |
| 99 | enum tda18271_output_options output_opt; | 99 | enum tda18271_output_options output_opt; |
| 100 | 100 | ||
| 101 | /* some i2c providers cant write all 39 registers at once */ | 101 | /* some i2c providers can't write all 39 registers at once */ |
| 102 | enum tda18271_small_i2c small_i2c; | 102 | enum tda18271_small_i2c small_i2c; |
| 103 | 103 | ||
| 104 | /* force rf tracking filter calibration on startup */ | 104 | /* force rf tracking filter calibration on startup */ |
diff --git a/drivers/media/dvb/b2c2/flexcop-pci.c b/drivers/media/dvb/b2c2/flexcop-pci.c index 227c0200b70a..955254090a0e 100644 --- a/drivers/media/dvb/b2c2/flexcop-pci.c +++ b/drivers/media/dvb/b2c2/flexcop-pci.c | |||
| @@ -58,7 +58,7 @@ struct flexcop_pci { | |||
| 58 | 58 | ||
| 59 | int active_dma1_addr; /* 0 = addr0 of dma1; 1 = addr1 of dma1 */ | 59 | int active_dma1_addr; /* 0 = addr0 of dma1; 1 = addr1 of dma1 */ |
| 60 | u32 last_dma1_cur_pos; | 60 | u32 last_dma1_cur_pos; |
| 61 | /* position of the pointer last time the timer/packet irq occured */ | 61 | /* position of the pointer last time the timer/packet irq occurred */ |
| 62 | int count; | 62 | int count; |
| 63 | int count_prev; | 63 | int count_prev; |
| 64 | int stream_problem; | 64 | int stream_problem; |
diff --git a/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/drivers/media/dvb/bt8xx/dvb-bt8xx.c index 78fc469f0f69..1e1106dcd063 100644 --- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c +++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c | |||
| @@ -427,10 +427,10 @@ static void or51211_reset(struct dvb_frontend * fe) | |||
| 427 | struct dvb_bt8xx_card *bt = fe->dvb->priv; | 427 | struct dvb_bt8xx_card *bt = fe->dvb->priv; |
| 428 | 428 | ||
| 429 | /* RESET DEVICE | 429 | /* RESET DEVICE |
| 430 | * reset is controled by GPIO-0 | 430 | * reset is controlled by GPIO-0 |
| 431 | * when set to 0 causes reset and when to 1 for normal op | 431 | * when set to 0 causes reset and when to 1 for normal op |
| 432 | * must remain reset for 128 clock cycles on a 50Mhz clock | 432 | * must remain reset for 128 clock cycles on a 50Mhz clock |
| 433 | * also PRM1 PRM2 & PRM4 are controled by GPIO-1,GPIO-2 & GPIO-4 | 433 | * also PRM1 PRM2 & PRM4 are controlled by GPIO-1,GPIO-2 & GPIO-4 |
| 434 | * We assume that the reset has be held low long enough or we | 434 | * We assume that the reset has be held low long enough or we |
| 435 | * have been reset by a power on. When the driver is unloaded | 435 | * have been reset by a power on. When the driver is unloaded |
| 436 | * reset set to 0 so if reloaded we have been reset. | 436 | * reset set to 0 so if reloaded we have been reset. |
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index cad6634610ea..31e2c0d45db3 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
| @@ -1638,7 +1638,7 @@ static int dvb_frontend_ioctl_legacy(struct file *file, | |||
| 1638 | case FE_READ_STATUS: { | 1638 | case FE_READ_STATUS: { |
| 1639 | fe_status_t* status = parg; | 1639 | fe_status_t* status = parg; |
| 1640 | 1640 | ||
| 1641 | /* if retune was requested but hasn't occured yet, prevent | 1641 | /* if retune was requested but hasn't occurred yet, prevent |
| 1642 | * that user get signal state from previous tuning */ | 1642 | * that user get signal state from previous tuning */ |
| 1643 | if (fepriv->state == FESTATE_RETUNE || | 1643 | if (fepriv->state == FESTATE_RETUNE || |
| 1644 | fepriv->state == FESTATE_ERROR) { | 1644 | fepriv->state == FESTATE_ERROR) { |
| @@ -1729,7 +1729,7 @@ static int dvb_frontend_ioctl_legacy(struct file *file, | |||
| 1729 | * Dish network legacy switches (as used by Dish500) | 1729 | * Dish network legacy switches (as used by Dish500) |
| 1730 | * are controlled by sending 9-bit command words | 1730 | * are controlled by sending 9-bit command words |
| 1731 | * spaced 8msec apart. | 1731 | * spaced 8msec apart. |
| 1732 | * the actual command word is switch/port dependant | 1732 | * the actual command word is switch/port dependent |
| 1733 | * so it is up to the userspace application to send | 1733 | * so it is up to the userspace application to send |
| 1734 | * the right command. | 1734 | * the right command. |
| 1735 | * The command must always start with a '0' after | 1735 | * The command must always start with a '0' after |
diff --git a/drivers/media/dvb/dvb-usb/af9005-fe.c b/drivers/media/dvb/dvb-usb/af9005-fe.c index 199ece0d4883..6ad94745bbdd 100644 --- a/drivers/media/dvb/dvb-usb/af9005-fe.c +++ b/drivers/media/dvb/dvb-usb/af9005-fe.c | |||
| @@ -580,7 +580,7 @@ static int af9005_fe_program_cfoe(struct dvb_usb_device *d, fe_bandwidth_t bw) | |||
| 580 | NS_coeff2_8k = 0x724925; | 580 | NS_coeff2_8k = 0x724925; |
| 581 | break; | 581 | break; |
| 582 | default: | 582 | default: |
| 583 | err("Invalid bandwith %d.", bw); | 583 | err("Invalid bandwidth %d.", bw); |
| 584 | return -EINVAL; | 584 | return -EINVAL; |
| 585 | } | 585 | } |
| 586 | 586 | ||
| @@ -789,7 +789,7 @@ static int af9005_fe_select_bw(struct dvb_usb_device *d, fe_bandwidth_t bw) | |||
| 789 | temp = 2; | 789 | temp = 2; |
| 790 | break; | 790 | break; |
| 791 | default: | 791 | default: |
| 792 | err("Invalid bandwith %d.", bw); | 792 | err("Invalid bandwidth %d.", bw); |
| 793 | return -EINVAL; | 793 | return -EINVAL; |
| 794 | } | 794 | } |
| 795 | return af9005_write_register_bits(d, xd_g_reg_bw, reg_bw_pos, | 795 | return af9005_write_register_bits(d, xd_g_reg_bw, reg_bw_pos, |
| @@ -930,7 +930,7 @@ static int af9005_fe_init(struct dvb_frontend *fe) | |||
| 930 | if (ret) | 930 | if (ret) |
| 931 | return ret; | 931 | return ret; |
| 932 | 932 | ||
| 933 | /* init other parameters: program cfoe and select bandwith */ | 933 | /* init other parameters: program cfoe and select bandwidth */ |
| 934 | deb_info("program cfoe\n"); | 934 | deb_info("program cfoe\n"); |
| 935 | if ((ret = af9005_fe_program_cfoe(state->d, BANDWIDTH_6_MHZ))) | 935 | if ((ret = af9005_fe_program_cfoe(state->d, BANDWIDTH_6_MHZ))) |
| 936 | return ret; | 936 | return ret; |
| @@ -1167,7 +1167,7 @@ static int af9005_fe_set_frontend(struct dvb_frontend *fe, | |||
| 1167 | if (ret) | 1167 | if (ret) |
| 1168 | return ret; | 1168 | return ret; |
| 1169 | 1169 | ||
| 1170 | /* select bandwith */ | 1170 | /* select bandwidth */ |
| 1171 | deb_info("select bandwidth"); | 1171 | deb_info("select bandwidth"); |
| 1172 | ret = af9005_fe_select_bw(state->d, fep->u.ofdm.bandwidth); | 1172 | ret = af9005_fe_select_bw(state->d, fep->u.ofdm.bandwidth); |
| 1173 | if (ret) | 1173 | if (ret) |
diff --git a/drivers/media/dvb/dvb-usb/friio.h b/drivers/media/dvb/dvb-usb/friio.h index af8d55e390fb..0f461ca10cb9 100644 --- a/drivers/media/dvb/dvb-usb/friio.h +++ b/drivers/media/dvb/dvb-usb/friio.h | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | * Frontend: comtech JDVBT-90502 | 20 | * Frontend: comtech JDVBT-90502 |
| 21 | * (tuner PLL: tua6034, I2C addr:(0xC0 >> 1)) | 21 | * (tuner PLL: tua6034, I2C addr:(0xC0 >> 1)) |
| 22 | * (OFDM demodulator: TC90502, I2C addr:(0x30 >> 1)) | 22 | * (OFDM demodulator: TC90502, I2C addr:(0x30 >> 1)) |
| 23 | * LED x3 (+LNB) controll: PIC 16F676 | 23 | * LED x3 (+LNB) control: PIC 16F676 |
| 24 | * EEPROM: 24C08 | 24 | * EEPROM: 24C08 |
| 25 | * | 25 | * |
| 26 | * (USB smart card reader: AU9522) | 26 | * (USB smart card reader: AU9522) |
diff --git a/drivers/media/dvb/dvb-usb/lmedm04.c b/drivers/media/dvb/dvb-usb/lmedm04.c index cd26e7c1536a..f2db01212ca1 100644 --- a/drivers/media/dvb/dvb-usb/lmedm04.c +++ b/drivers/media/dvb/dvb-usb/lmedm04.c | |||
| @@ -321,7 +321,7 @@ static int lme2510_int_read(struct dvb_usb_adapter *adap) | |||
| 321 | lme_int->lme_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; | 321 | lme_int->lme_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; |
| 322 | 322 | ||
| 323 | usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC); | 323 | usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC); |
| 324 | info("INT Interupt Service Started"); | 324 | info("INT Interrupt Service Started"); |
| 325 | 325 | ||
| 326 | return 0; | 326 | return 0; |
| 327 | } | 327 | } |
| @@ -482,7 +482,7 @@ static int lme2510_msg(struct dvb_usb_device *d, | |||
| 482 | break; | 482 | break; |
| 483 | } | 483 | } |
| 484 | 484 | ||
| 485 | deb_info(4, "I2C From Interupt Message out(%02x) in(%02x)", | 485 | deb_info(4, "I2C From Interrupt Message out(%02x) in(%02x)", |
| 486 | wbuf[3], rbuf[1]); | 486 | wbuf[3], rbuf[1]); |
| 487 | 487 | ||
| 488 | } | 488 | } |
| @@ -632,11 +632,11 @@ static int lme2510_int_service(struct dvb_usb_adapter *adap) | |||
| 632 | } | 632 | } |
| 633 | d->rc_dev = rc; | 633 | d->rc_dev = rc; |
| 634 | 634 | ||
| 635 | /* Start the Interupt */ | 635 | /* Start the Interrupt */ |
| 636 | ret = lme2510_int_read(adap); | 636 | ret = lme2510_int_read(adap); |
| 637 | if (ret < 0) { | 637 | if (ret < 0) { |
| 638 | rc_unregister_device(rc); | 638 | rc_unregister_device(rc); |
| 639 | info("INT Unable to start Interupt Service"); | 639 | info("INT Unable to start Interrupt Service"); |
| 640 | return -ENODEV; | 640 | return -ENODEV; |
| 641 | } | 641 | } |
| 642 | 642 | ||
| @@ -1003,7 +1003,7 @@ static int dm04_lme2510_tuner(struct dvb_usb_adapter *adap) | |||
| 1003 | return -ENODEV; | 1003 | return -ENODEV; |
| 1004 | } | 1004 | } |
| 1005 | 1005 | ||
| 1006 | /* Start the Interupt & Remote*/ | 1006 | /* Start the Interrupt & Remote*/ |
| 1007 | ret = lme2510_int_service(adap); | 1007 | ret = lme2510_int_service(adap); |
| 1008 | 1008 | ||
| 1009 | return ret; | 1009 | return ret; |
| @@ -1171,7 +1171,7 @@ void *lme2510_exit_int(struct dvb_usb_device *d) | |||
| 1171 | usb_kill_urb(st->lme_urb); | 1171 | usb_kill_urb(st->lme_urb); |
| 1172 | usb_free_coherent(d->udev, 5000, st->buffer, | 1172 | usb_free_coherent(d->udev, 5000, st->buffer, |
| 1173 | st->lme_urb->transfer_dma); | 1173 | st->lme_urb->transfer_dma); |
| 1174 | info("Interupt Service Stopped"); | 1174 | info("Interrupt Service Stopped"); |
| 1175 | rc_unregister_device(d->rc_dev); | 1175 | rc_unregister_device(d->rc_dev); |
| 1176 | info("Remote Stopped"); | 1176 | info("Remote Stopped"); |
| 1177 | } | 1177 | } |
diff --git a/drivers/media/dvb/frontends/atbm8830.h b/drivers/media/dvb/frontends/atbm8830.h index e8149f393300..024273374bd8 100644 --- a/drivers/media/dvb/frontends/atbm8830.h +++ b/drivers/media/dvb/frontends/atbm8830.h | |||
| @@ -39,7 +39,7 @@ struct atbm8830_config { | |||
| 39 | /* parallel or serial transport stream */ | 39 | /* parallel or serial transport stream */ |
| 40 | u8 serial_ts; | 40 | u8 serial_ts; |
| 41 | 41 | ||
| 42 | /* transport stream clock output only when receving valid stream */ | 42 | /* transport stream clock output only when receiving valid stream */ |
| 43 | u8 ts_clk_gated; | 43 | u8 ts_clk_gated; |
| 44 | 44 | ||
| 45 | /* Decoder sample TS data at rising edge of clock */ | 45 | /* Decoder sample TS data at rising edge of clock */ |
diff --git a/drivers/media/dvb/frontends/au8522_dig.c b/drivers/media/dvb/frontends/au8522_dig.c index 65f6a36dfb21..1d572940e243 100644 --- a/drivers/media/dvb/frontends/au8522_dig.c +++ b/drivers/media/dvb/frontends/au8522_dig.c | |||
| @@ -635,7 +635,7 @@ static int au8522_led_gpio_enable(struct au8522_state *state, int onoff) | |||
| 635 | struct au8522_led_config *led_config = state->config->led_cfg; | 635 | struct au8522_led_config *led_config = state->config->led_cfg; |
| 636 | u8 val; | 636 | u8 val; |
| 637 | 637 | ||
| 638 | /* bail out if we cant control an LED */ | 638 | /* bail out if we can't control an LED */ |
| 639 | if (!led_config || !led_config->gpio_output || | 639 | if (!led_config || !led_config->gpio_output || |
| 640 | !led_config->gpio_output_enable || !led_config->gpio_output_disable) | 640 | !led_config->gpio_output_enable || !led_config->gpio_output_disable) |
| 641 | return 0; | 641 | return 0; |
| @@ -665,7 +665,7 @@ static int au8522_led_ctrl(struct au8522_state *state, int led) | |||
| 665 | struct au8522_led_config *led_config = state->config->led_cfg; | 665 | struct au8522_led_config *led_config = state->config->led_cfg; |
| 666 | int i, ret = 0; | 666 | int i, ret = 0; |
| 667 | 667 | ||
| 668 | /* bail out if we cant control an LED */ | 668 | /* bail out if we can't control an LED */ |
| 669 | if (!led_config || !led_config->gpio_leds || | 669 | if (!led_config || !led_config->gpio_leds || |
| 670 | !led_config->num_led_states || !led_config->led_states) | 670 | !led_config->num_led_states || !led_config->led_states) |
| 671 | return 0; | 671 | return 0; |
| @@ -803,7 +803,7 @@ static int au8522_led_status(struct au8522_state *state, const u16 *snr) | |||
| 803 | int led; | 803 | int led; |
| 804 | u16 strong; | 804 | u16 strong; |
| 805 | 805 | ||
| 806 | /* bail out if we cant control an LED */ | 806 | /* bail out if we can't control an LED */ |
| 807 | if (!led_config) | 807 | if (!led_config) |
| 808 | return 0; | 808 | return 0; |
| 809 | 809 | ||
diff --git a/drivers/media/dvb/frontends/bcm3510.c b/drivers/media/dvb/frontends/bcm3510.c index cf5e576dfdcf..8aff5868a5e1 100644 --- a/drivers/media/dvb/frontends/bcm3510.c +++ b/drivers/media/dvb/frontends/bcm3510.c | |||
| @@ -155,7 +155,7 @@ static int bcm3510_hab_send_request(struct bcm3510_state *st, u8 *buf, int len) | |||
| 155 | unsigned long t; | 155 | unsigned long t; |
| 156 | 156 | ||
| 157 | /* Check if any previous HAB request still needs to be serviced by the | 157 | /* Check if any previous HAB request still needs to be serviced by the |
| 158 | * Aquisition Processor before sending new request */ | 158 | * Acquisition Processor before sending new request */ |
| 159 | if ((ret = bcm3510_readB(st,0xa8,&v)) < 0) | 159 | if ((ret = bcm3510_readB(st,0xa8,&v)) < 0) |
| 160 | return ret; | 160 | return ret; |
| 161 | if (v.HABSTAT_a8.HABR) { | 161 | if (v.HABSTAT_a8.HABR) { |
| @@ -361,7 +361,7 @@ static int bcm3510_tuner_cmd(struct bcm3510_state* st,u8 bc, u16 n, u8 a) | |||
| 361 | /* Set duration of the initial state of TUNCTL = 3.34 micro Sec */ | 361 | /* Set duration of the initial state of TUNCTL = 3.34 micro Sec */ |
| 362 | c.TUNCTL_state = 0x40; | 362 | c.TUNCTL_state = 0x40; |
| 363 | 363 | ||
| 364 | /* PRESCALER DEVIDE RATIO | BC1_2_3_4; (band switch), 1stosc REFERENCE COUNTER REF_S12 and REF_S11 */ | 364 | /* PRESCALER DIVIDE RATIO | BC1_2_3_4; (band switch), 1stosc REFERENCE COUNTER REF_S12 and REF_S11 */ |
| 365 | c.ctl_dat[0].ctrl.size = BITS_8; | 365 | c.ctl_dat[0].ctrl.size = BITS_8; |
| 366 | c.ctl_dat[0].data = 0x80 | bc; | 366 | c.ctl_dat[0].data = 0x80 | bc; |
| 367 | 367 | ||
| @@ -397,7 +397,7 @@ static int bcm3510_tuner_cmd(struct bcm3510_state* st,u8 bc, u16 n, u8 a) | |||
| 397 | c.ctl_dat[7].ctrl.cs0 = 1; | 397 | c.ctl_dat[7].ctrl.cs0 = 1; |
| 398 | c.ctl_dat[7].data = 0x40; | 398 | c.ctl_dat[7].data = 0x40; |
| 399 | 399 | ||
| 400 | /* PRESCALER DEVIDE RATIO, 2ndosc REFERENCE COUNTER REF_S12 and REF_S11 */ | 400 | /* PRESCALER DIVIDE RATIO, 2ndosc REFERENCE COUNTER REF_S12 and REF_S11 */ |
| 401 | c.ctl_dat[8].ctrl.size = BITS_8; | 401 | c.ctl_dat[8].ctrl.size = BITS_8; |
| 402 | c.ctl_dat[8].data = 0x80; | 402 | c.ctl_dat[8].data = 0x80; |
| 403 | 403 | ||
diff --git a/drivers/media/dvb/frontends/cx22700.c b/drivers/media/dvb/frontends/cx22700.c index 5fbc0fc37ecd..0142214b0133 100644 --- a/drivers/media/dvb/frontends/cx22700.c +++ b/drivers/media/dvb/frontends/cx22700.c | |||
| @@ -179,7 +179,7 @@ static int cx22700_set_tps (struct cx22700_state *state, struct dvb_ofdm_paramet | |||
| 179 | cx22700_writereg (state, 0x06, val); | 179 | cx22700_writereg (state, 0x06, val); |
| 180 | 180 | ||
| 181 | cx22700_writereg (state, 0x08, 0x04 | 0x02); /* use user tps parameters */ | 181 | cx22700_writereg (state, 0x08, 0x04 | 0x02); /* use user tps parameters */ |
| 182 | cx22700_writereg (state, 0x08, 0x04); /* restart aquisition */ | 182 | cx22700_writereg (state, 0x08, 0x04); /* restart acquisition */ |
| 183 | 183 | ||
| 184 | return 0; | 184 | return 0; |
| 185 | } | 185 | } |
diff --git a/drivers/media/dvb/frontends/cx22702.c b/drivers/media/dvb/frontends/cx22702.c index ff6c4983051c..3139558148ba 100644 --- a/drivers/media/dvb/frontends/cx22702.c +++ b/drivers/media/dvb/frontends/cx22702.c | |||
| @@ -55,7 +55,7 @@ MODULE_PARM_DESC(debug, "Enable verbose debug messages"); | |||
| 55 | 55 | ||
| 56 | /* Register values to initialise the demod */ | 56 | /* Register values to initialise the demod */ |
| 57 | static const u8 init_tab[] = { | 57 | static const u8 init_tab[] = { |
| 58 | 0x00, 0x00, /* Stop aquisition */ | 58 | 0x00, 0x00, /* Stop acquisition */ |
| 59 | 0x0B, 0x06, | 59 | 0x0B, 0x06, |
| 60 | 0x09, 0x01, | 60 | 0x09, 0x01, |
| 61 | 0x0D, 0x41, | 61 | 0x0D, 0x41, |
| @@ -310,7 +310,7 @@ static int cx22702_set_tps(struct dvb_frontend *fe, | |||
| 310 | & 0xfc); | 310 | & 0xfc); |
| 311 | cx22702_writereg(state, 0x0C, | 311 | cx22702_writereg(state, 0x0C, |
| 312 | (cx22702_readreg(state, 0x0C) & 0xBF) | 0x40); | 312 | (cx22702_readreg(state, 0x0C) & 0xBF) | 0x40); |
| 313 | cx22702_writereg(state, 0x00, 0x01); /* Begin aquisition */ | 313 | cx22702_writereg(state, 0x00, 0x01); /* Begin acquisition */ |
| 314 | dprintk("%s: Autodetecting\n", __func__); | 314 | dprintk("%s: Autodetecting\n", __func__); |
| 315 | return 0; | 315 | return 0; |
| 316 | } | 316 | } |
| @@ -424,7 +424,7 @@ static int cx22702_set_tps(struct dvb_frontend *fe, | |||
| 424 | cx22702_writereg(state, 0x0C, | 424 | cx22702_writereg(state, 0x0C, |
| 425 | (cx22702_readreg(state, 0x0C) & 0xBF) | 0x40); | 425 | (cx22702_readreg(state, 0x0C) & 0xBF) | 0x40); |
| 426 | 426 | ||
| 427 | /* Begin channel aquisition */ | 427 | /* Begin channel acquisition */ |
| 428 | cx22702_writereg(state, 0x00, 0x01); | 428 | cx22702_writereg(state, 0x00, 0x01); |
| 429 | 429 | ||
| 430 | return 0; | 430 | return 0; |
diff --git a/drivers/media/dvb/frontends/cx24110.c b/drivers/media/dvb/frontends/cx24110.c index 7a1a5bc337d8..bf9c999aa470 100644 --- a/drivers/media/dvb/frontends/cx24110.c +++ b/drivers/media/dvb/frontends/cx24110.c | |||
| @@ -544,7 +544,7 @@ static int cx24110_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par | |||
| 544 | cx24110_set_inversion (state, p->inversion); | 544 | cx24110_set_inversion (state, p->inversion); |
| 545 | cx24110_set_fec (state, p->u.qpsk.fec_inner); | 545 | cx24110_set_fec (state, p->u.qpsk.fec_inner); |
| 546 | cx24110_set_symbolrate (state, p->u.qpsk.symbol_rate); | 546 | cx24110_set_symbolrate (state, p->u.qpsk.symbol_rate); |
| 547 | cx24110_writereg(state,0x04,0x05); /* start aquisition */ | 547 | cx24110_writereg(state,0x04,0x05); /* start acquisition */ |
| 548 | 548 | ||
| 549 | return 0; | 549 | return 0; |
| 550 | } | 550 | } |
diff --git a/drivers/media/dvb/frontends/cx24113.h b/drivers/media/dvb/frontends/cx24113.h index 5de0f7ffd8d2..01eb7b9c28f4 100644 --- a/drivers/media/dvb/frontends/cx24113.h +++ b/drivers/media/dvb/frontends/cx24113.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Driver for Conexant CX24113/CX24128 Tuner (Satelite) | 2 | * Driver for Conexant CX24113/CX24128 Tuner (Satellite) |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007-8 Patrick Boettcher <pb@linuxtv.org> | 4 | * Copyright (C) 2007-8 Patrick Boettcher <pb@linuxtv.org> |
| 5 | * | 5 | * |
diff --git a/drivers/media/dvb/frontends/cx24123.c b/drivers/media/dvb/frontends/cx24123.c index fad6a990a39b..b1dd8acc607a 100644 --- a/drivers/media/dvb/frontends/cx24123.c +++ b/drivers/media/dvb/frontends/cx24123.c | |||
| @@ -949,7 +949,7 @@ static int cx24123_set_frontend(struct dvb_frontend *fe, | |||
| 949 | else | 949 | else |
| 950 | err("it seems I don't have a tuner..."); | 950 | err("it seems I don't have a tuner..."); |
| 951 | 951 | ||
| 952 | /* Enable automatic aquisition and reset cycle */ | 952 | /* Enable automatic acquisition and reset cycle */ |
| 953 | cx24123_writereg(state, 0x03, (cx24123_readreg(state, 0x03) | 0x07)); | 953 | cx24123_writereg(state, 0x03, (cx24123_readreg(state, 0x03) | 0x07)); |
| 954 | cx24123_writereg(state, 0x00, 0x10); | 954 | cx24123_writereg(state, 0x00, 0x10); |
| 955 | cx24123_writereg(state, 0x00, 0); | 955 | cx24123_writereg(state, 0x00, 0); |
diff --git a/drivers/media/dvb/frontends/drx397xD.c b/drivers/media/dvb/frontends/drx397xD.c index a05007c80985..536f02b17338 100644 --- a/drivers/media/dvb/frontends/drx397xD.c +++ b/drivers/media/dvb/frontends/drx397xD.c | |||
| @@ -1097,7 +1097,7 @@ static int drx397x_init(struct dvb_frontend *fe) | |||
| 1097 | s->config.ifagc.w0A = 0x3ff; | 1097 | s->config.ifagc.w0A = 0x3ff; |
| 1098 | s->config.ifagc.w0C = 0x388; | 1098 | s->config.ifagc.w0C = 0x388; |
| 1099 | 1099 | ||
| 1100 | /* for signal strenght calculations */ | 1100 | /* for signal strength calculations */ |
| 1101 | s->config.ss76 = 820; | 1101 | s->config.ss76 = 820; |
| 1102 | s->config.ss78 = 2200; | 1102 | s->config.ss78 = 2200; |
| 1103 | s->config.ss7A = 150; | 1103 | s->config.ss7A = 150; |
diff --git a/drivers/media/dvb/frontends/mb86a16.c b/drivers/media/dvb/frontends/mb86a16.c index 33b63235b86e..c283112051b1 100644 --- a/drivers/media/dvb/frontends/mb86a16.c +++ b/drivers/media/dvb/frontends/mb86a16.c | |||
| @@ -1630,7 +1630,7 @@ static enum dvbfe_search mb86a16_search(struct dvb_frontend *fe, | |||
| 1630 | state->srate = p->u.qpsk.symbol_rate / 1000; | 1630 | state->srate = p->u.qpsk.symbol_rate / 1000; |
| 1631 | 1631 | ||
| 1632 | if (!mb86a16_set_fe(state)) { | 1632 | if (!mb86a16_set_fe(state)) { |
| 1633 | dprintk(verbose, MB86A16_ERROR, 1, "Succesfully acquired LOCK"); | 1633 | dprintk(verbose, MB86A16_ERROR, 1, "Successfully acquired LOCK"); |
| 1634 | return DVBFE_ALGO_SEARCH_SUCCESS; | 1634 | return DVBFE_ALGO_SEARCH_SUCCESS; |
| 1635 | } | 1635 | } |
| 1636 | 1636 | ||
diff --git a/drivers/media/dvb/frontends/mb86a20s.c b/drivers/media/dvb/frontends/mb86a20s.c index cc4acd2f920d..0f867a5055fb 100644 --- a/drivers/media/dvb/frontends/mb86a20s.c +++ b/drivers/media/dvb/frontends/mb86a20s.c | |||
| @@ -406,7 +406,7 @@ err: | |||
| 406 | printk(KERN_INFO "mb86a20s: Init failed. Will try again later\n"); | 406 | printk(KERN_INFO "mb86a20s: Init failed. Will try again later\n"); |
| 407 | } else { | 407 | } else { |
| 408 | state->need_init = false; | 408 | state->need_init = false; |
| 409 | dprintk("Initialization succeded.\n"); | 409 | dprintk("Initialization succeeded.\n"); |
| 410 | } | 410 | } |
| 411 | return rc; | 411 | return rc; |
| 412 | } | 412 | } |
diff --git a/drivers/media/dvb/frontends/mt312.c b/drivers/media/dvb/frontends/mt312.c index 472907d43460..83e6f1a1b700 100644 --- a/drivers/media/dvb/frontends/mt312.c +++ b/drivers/media/dvb/frontends/mt312.c | |||
| @@ -670,7 +670,7 @@ static int mt312_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) | |||
| 670 | if (ret < 0) | 670 | if (ret < 0) |
| 671 | goto error; | 671 | goto error; |
| 672 | 672 | ||
| 673 | /* preserve this bit to not accidently shutdown ADC */ | 673 | /* preserve this bit to not accidentally shutdown ADC */ |
| 674 | val &= 0x80; | 674 | val &= 0x80; |
| 675 | break; | 675 | break; |
| 676 | } | 676 | } |
diff --git a/drivers/media/dvb/frontends/s5h1420.c b/drivers/media/dvb/frontends/s5h1420.c index e87b747ea99c..17f8cdf8afef 100644 --- a/drivers/media/dvb/frontends/s5h1420.c +++ b/drivers/media/dvb/frontends/s5h1420.c | |||
| @@ -225,7 +225,7 @@ static int s5h1420_recv_slave_reply (struct dvb_frontend* fe, | |||
| 225 | unsigned long timeout; | 225 | unsigned long timeout; |
| 226 | int result = 0; | 226 | int result = 0; |
| 227 | 227 | ||
| 228 | /* setup for DISEQC recieve */ | 228 | /* setup for DISEQC receive */ |
| 229 | val = s5h1420_readreg(state, 0x3b); | 229 | val = s5h1420_readreg(state, 0x3b); |
| 230 | s5h1420_writereg(state, 0x3b, 0x82); /* FIXME: guess - do we need to set DIS_RDY(0x08) in receive mode? */ | 230 | s5h1420_writereg(state, 0x3b, 0x82); /* FIXME: guess - do we need to set DIS_RDY(0x08) in receive mode? */ |
| 231 | msleep(15); | 231 | msleep(15); |
diff --git a/drivers/media/dvb/frontends/stb6100.c b/drivers/media/dvb/frontends/stb6100.c index 64673b8b64a2..bc1a8af4f6e1 100644 --- a/drivers/media/dvb/frontends/stb6100.c +++ b/drivers/media/dvb/frontends/stb6100.c | |||
| @@ -360,7 +360,7 @@ static int stb6100_set_frequency(struct dvb_frontend *fe, u32 frequency) | |||
| 360 | else | 360 | else |
| 361 | odiv = 0; | 361 | odiv = 0; |
| 362 | 362 | ||
| 363 | /* VCO enabled, seach clock off as per LL3.7, 3.4.1 */ | 363 | /* VCO enabled, search clock off as per LL3.7, 3.4.1 */ |
| 364 | regs[STB6100_VCO] = 0xe0 | (odiv << STB6100_VCO_ODIV_SHIFT); | 364 | regs[STB6100_VCO] = 0xe0 | (odiv << STB6100_VCO_ODIV_SHIFT); |
| 365 | 365 | ||
| 366 | /* OSM */ | 366 | /* OSM */ |
diff --git a/drivers/media/dvb/frontends/stv0297.c b/drivers/media/dvb/frontends/stv0297.c index 4fd7479bb62b..84d88f33275e 100644 --- a/drivers/media/dvb/frontends/stv0297.c +++ b/drivers/media/dvb/frontends/stv0297.c | |||
| @@ -435,7 +435,7 @@ static int stv0297_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par | |||
| 435 | return -EINVAL; | 435 | return -EINVAL; |
| 436 | } | 436 | } |
| 437 | 437 | ||
| 438 | // determine inversion dependant parameters | 438 | // determine inversion dependent parameters |
| 439 | inversion = p->inversion; | 439 | inversion = p->inversion; |
| 440 | if (state->config->invert) | 440 | if (state->config->invert) |
| 441 | inversion = (inversion == INVERSION_ON) ? INVERSION_OFF : INVERSION_ON; | 441 | inversion = (inversion == INVERSION_ON) ? INVERSION_OFF : INVERSION_ON; |
diff --git a/drivers/media/dvb/frontends/stv0367.c b/drivers/media/dvb/frontends/stv0367.c index 4e0e6a873b8c..e57ab53e2e27 100644 --- a/drivers/media/dvb/frontends/stv0367.c +++ b/drivers/media/dvb/frontends/stv0367.c | |||
| @@ -1328,7 +1328,7 @@ stv0367_ter_signal_type stv0367ter_lock_algo(struct stv0367_state *state) | |||
| 1328 | 1328 | ||
| 1329 | /*guard=stv0367_readbits(state,F367TER_SYR_GUARD); */ | 1329 | /*guard=stv0367_readbits(state,F367TER_SYR_GUARD); */ |
| 1330 | 1330 | ||
| 1331 | /*supress EPQ auto for SYR_GARD 1/16 or 1/32 | 1331 | /*suppress EPQ auto for SYR_GARD 1/16 or 1/32 |
| 1332 | and set channel predictor in automatic */ | 1332 | and set channel predictor in automatic */ |
| 1333 | #if 0 | 1333 | #if 0 |
| 1334 | switch (guard) { | 1334 | switch (guard) { |
diff --git a/drivers/media/dvb/frontends/stv0900_priv.h b/drivers/media/dvb/frontends/stv0900_priv.h index b62b0f0a4fef..e0ea74c8e093 100644 --- a/drivers/media/dvb/frontends/stv0900_priv.h +++ b/drivers/media/dvb/frontends/stv0900_priv.h | |||
| @@ -238,7 +238,7 @@ enum fe_stv0900_demod_mode { | |||
| 238 | }; | 238 | }; |
| 239 | 239 | ||
| 240 | struct stv0900_init_params{ | 240 | struct stv0900_init_params{ |
| 241 | u32 dmd_ref_clk;/* Refrence,Input clock for the demod in Hz */ | 241 | u32 dmd_ref_clk;/* Reference,Input clock for the demod in Hz */ |
| 242 | 242 | ||
| 243 | /* Demodulator Type (single demod or dual demod) */ | 243 | /* Demodulator Type (single demod or dual demod) */ |
| 244 | enum fe_stv0900_demod_mode demod_mode; | 244 | enum fe_stv0900_demod_mode demod_mode; |
diff --git a/drivers/media/dvb/frontends/stv090x.c b/drivers/media/dvb/frontends/stv090x.c index 41d0f0a6655d..52d8712411e5 100644 --- a/drivers/media/dvb/frontends/stv090x.c +++ b/drivers/media/dvb/frontends/stv090x.c | |||
| @@ -1424,7 +1424,7 @@ static int stv090x_start_search(struct stv090x_state *state) | |||
| 1424 | if (STV090x_WRITE_DEMOD(state, CFRLOW0, 0x00) < 0) | 1424 | if (STV090x_WRITE_DEMOD(state, CFRLOW0, 0x00) < 0) |
| 1425 | goto err; | 1425 | goto err; |
| 1426 | 1426 | ||
| 1427 | /*enlarge the timing bandwith for Low SR*/ | 1427 | /*enlarge the timing bandwidth for Low SR*/ |
| 1428 | if (STV090x_WRITE_DEMOD(state, RTCS2, 0x68) < 0) | 1428 | if (STV090x_WRITE_DEMOD(state, RTCS2, 0x68) < 0) |
| 1429 | goto err; | 1429 | goto err; |
| 1430 | } else { | 1430 | } else { |
| @@ -1432,17 +1432,17 @@ static int stv090x_start_search(struct stv090x_state *state) | |||
| 1432 | Set The carrier search up and low to auto mode */ | 1432 | Set The carrier search up and low to auto mode */ |
| 1433 | if (STV090x_WRITE_DEMOD(state, CARCFG, 0xc4) < 0) | 1433 | if (STV090x_WRITE_DEMOD(state, CARCFG, 0xc4) < 0) |
| 1434 | goto err; | 1434 | goto err; |
| 1435 | /*reduce the timing bandwith for high SR*/ | 1435 | /*reduce the timing bandwidth for high SR*/ |
| 1436 | if (STV090x_WRITE_DEMOD(state, RTCS2, 0x44) < 0) | 1436 | if (STV090x_WRITE_DEMOD(state, RTCS2, 0x44) < 0) |
| 1437 | goto err; | 1437 | goto err; |
| 1438 | } | 1438 | } |
| 1439 | } else { | 1439 | } else { |
| 1440 | /* >= Cut 3 */ | 1440 | /* >= Cut 3 */ |
| 1441 | if (state->srate <= 5000000) { | 1441 | if (state->srate <= 5000000) { |
| 1442 | /* enlarge the timing bandwith for Low SR */ | 1442 | /* enlarge the timing bandwidth for Low SR */ |
| 1443 | STV090x_WRITE_DEMOD(state, RTCS2, 0x68); | 1443 | STV090x_WRITE_DEMOD(state, RTCS2, 0x68); |
| 1444 | } else { | 1444 | } else { |
| 1445 | /* reduce timing bandwith for high SR */ | 1445 | /* reduce timing bandwidth for high SR */ |
| 1446 | STV090x_WRITE_DEMOD(state, RTCS2, 0x44); | 1446 | STV090x_WRITE_DEMOD(state, RTCS2, 0x44); |
| 1447 | } | 1447 | } |
| 1448 | 1448 | ||
| @@ -2482,7 +2482,7 @@ static int stv090x_sw_algo(struct stv090x_state *state) | |||
| 2482 | dvbs2_fly_wheel = STV090x_GETFIELD_Px(reg, FLYWHEEL_CPT_FIELD); | 2482 | dvbs2_fly_wheel = STV090x_GETFIELD_Px(reg, FLYWHEEL_CPT_FIELD); |
| 2483 | } | 2483 | } |
| 2484 | if (dvbs2_fly_wheel < 0xd) { | 2484 | if (dvbs2_fly_wheel < 0xd) { |
| 2485 | /*FALSE lock, The demod is loosing lock */ | 2485 | /*FALSE lock, The demod is losing lock */ |
| 2486 | lock = 0; | 2486 | lock = 0; |
| 2487 | if (trials < 2) { | 2487 | if (trials < 2) { |
| 2488 | if (state->internal->dev_ver >= 0x20) { | 2488 | if (state->internal->dev_ver >= 0x20) { |
| @@ -3202,7 +3202,7 @@ static enum stv090x_signal_state stv090x_algo(struct stv090x_state *state) | |||
| 3202 | goto err; | 3202 | goto err; |
| 3203 | if (STV090x_WRITE_DEMOD(state, CORRELMANT, 0x70) < 0) | 3203 | if (STV090x_WRITE_DEMOD(state, CORRELMANT, 0x70) < 0) |
| 3204 | goto err; | 3204 | goto err; |
| 3205 | if (stv090x_set_srate(state, 1000000) < 0) /* inital srate = 1Msps */ | 3205 | if (stv090x_set_srate(state, 1000000) < 0) /* initial srate = 1Msps */ |
| 3206 | goto err; | 3206 | goto err; |
| 3207 | } else { | 3207 | } else { |
| 3208 | /* known srate */ | 3208 | /* known srate */ |
diff --git a/drivers/media/dvb/mantis/mantis_uart.c b/drivers/media/dvb/mantis/mantis_uart.c index 97b889e8a341..f807c8ba26e4 100644 --- a/drivers/media/dvb/mantis/mantis_uart.c +++ b/drivers/media/dvb/mantis/mantis_uart.c | |||
| @@ -172,7 +172,7 @@ int mantis_uart_init(struct mantis_pci *mantis) | |||
| 172 | mmwrite(mmread(MANTIS_UART_CTL) | MANTIS_UART_RXINT, MANTIS_UART_CTL); | 172 | mmwrite(mmread(MANTIS_UART_CTL) | MANTIS_UART_RXINT, MANTIS_UART_CTL); |
| 173 | 173 | ||
| 174 | schedule_work(&mantis->uart_work); | 174 | schedule_work(&mantis->uart_work); |
| 175 | dprintk(MANTIS_DEBUG, 1, "UART succesfully initialized"); | 175 | dprintk(MANTIS_DEBUG, 1, "UART successfully initialized"); |
| 176 | 176 | ||
| 177 | return 0; | 177 | return 0; |
| 178 | } | 178 | } |
diff --git a/drivers/media/dvb/ngene/ngene-core.c b/drivers/media/dvb/ngene/ngene-core.c index 175a0f6c2a4c..ccc2d1af49d4 100644 --- a/drivers/media/dvb/ngene/ngene-core.c +++ b/drivers/media/dvb/ngene/ngene-core.c | |||
| @@ -122,7 +122,7 @@ static void demux_tasklet(unsigned long data) | |||
| 122 | Cur->ngeneBuffer.SR.Flags &= | 122 | Cur->ngeneBuffer.SR.Flags &= |
| 123 | ~0x40; | 123 | ~0x40; |
| 124 | break; | 124 | break; |
| 125 | /* Stop proccessing stream */ | 125 | /* Stop processing stream */ |
| 126 | } | 126 | } |
| 127 | } else { | 127 | } else { |
| 128 | /* We got a valid buffer, | 128 | /* We got a valid buffer, |
| @@ -133,7 +133,7 @@ static void demux_tasklet(unsigned long data) | |||
| 133 | printk(KERN_ERR DEVICE_NAME ": OOPS\n"); | 133 | printk(KERN_ERR DEVICE_NAME ": OOPS\n"); |
| 134 | if (chan->HWState == HWSTATE_RUN) { | 134 | if (chan->HWState == HWSTATE_RUN) { |
| 135 | Cur->ngeneBuffer.SR.Flags &= ~0x40; | 135 | Cur->ngeneBuffer.SR.Flags &= ~0x40; |
| 136 | break; /* Stop proccessing stream */ | 136 | break; /* Stop processing stream */ |
| 137 | } | 137 | } |
| 138 | } | 138 | } |
| 139 | if (chan->AudioDTOUpdated) { | 139 | if (chan->AudioDTOUpdated) { |
diff --git a/drivers/media/dvb/pluto2/pluto2.c b/drivers/media/dvb/pluto2/pluto2.c index 6ca6713d527a..7cb79ec685f0 100644 --- a/drivers/media/dvb/pluto2/pluto2.c +++ b/drivers/media/dvb/pluto2/pluto2.c | |||
| @@ -294,13 +294,13 @@ static void pluto_dma_end(struct pluto *pluto, unsigned int nbpackets) | |||
| 294 | 294 | ||
| 295 | /* Workaround for broken hardware: | 295 | /* Workaround for broken hardware: |
| 296 | * [1] On startup NBPACKETS seems to contain an uninitialized value, | 296 | * [1] On startup NBPACKETS seems to contain an uninitialized value, |
| 297 | * but no packets have been transfered. | 297 | * but no packets have been transferred. |
| 298 | * [2] Sometimes (actually very often) NBPACKETS stays at zero | 298 | * [2] Sometimes (actually very often) NBPACKETS stays at zero |
| 299 | * although one packet has been transfered. | 299 | * although one packet has been transferred. |
| 300 | * [3] Sometimes (actually rarely), the card gets into an erroneous | 300 | * [3] Sometimes (actually rarely), the card gets into an erroneous |
| 301 | * mode where it continuously generates interrupts, claiming it | 301 | * mode where it continuously generates interrupts, claiming it |
| 302 | * has recieved nbpackets>TS_DMA_PACKETS packets, but no packet | 302 | * has received nbpackets>TS_DMA_PACKETS packets, but no packet |
| 303 | * has been transfered. Only a reset seems to solve this | 303 | * has been transferred. Only a reset seems to solve this |
| 304 | */ | 304 | */ |
| 305 | if ((nbpackets == 0) || (nbpackets > TS_DMA_PACKETS)) { | 305 | if ((nbpackets == 0) || (nbpackets > TS_DMA_PACKETS)) { |
| 306 | unsigned int i = 0; | 306 | unsigned int i = 0; |
| @@ -332,7 +332,7 @@ static irqreturn_t pluto_irq(int irq, void *dev_id) | |||
| 332 | struct pluto *pluto = dev_id; | 332 | struct pluto *pluto = dev_id; |
| 333 | u32 tscr; | 333 | u32 tscr; |
| 334 | 334 | ||
| 335 | /* check whether an interrupt occured on this device */ | 335 | /* check whether an interrupt occurred on this device */ |
| 336 | tscr = pluto_readreg(pluto, REG_TSCR); | 336 | tscr = pluto_readreg(pluto, REG_TSCR); |
| 337 | if (!(tscr & (TSCR_DE | TSCR_OVR))) | 337 | if (!(tscr & (TSCR_DE | TSCR_OVR))) |
| 338 | return IRQ_NONE; | 338 | return IRQ_NONE; |
diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c index b80d09b035a1..37c594f82782 100644 --- a/drivers/media/dvb/siano/smsdvb.c +++ b/drivers/media/dvb/siano/smsdvb.c | |||
| @@ -650,7 +650,7 @@ static int smsdvb_dvbt_set_frontend(struct dvb_frontend *fe, | |||
| 650 | if (status & FE_HAS_LOCK) | 650 | if (status & FE_HAS_LOCK) |
| 651 | return ret; | 651 | return ret; |
| 652 | 652 | ||
| 653 | /* previous tune didnt lock - enable LNA and tune again */ | 653 | /* previous tune didn't lock - enable LNA and tune again */ |
| 654 | sms_board_lna_control(client->coredev, 1); | 654 | sms_board_lna_control(client->coredev, 1); |
| 655 | } | 655 | } |
| 656 | 656 | ||
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index fc0a60f8a1e1..3d20719fce1a 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c | |||
| @@ -2332,7 +2332,7 @@ static int frontend_init(struct av7110 *av7110) | |||
| 2332 | * increment. That's how the 7146 is programmed to do event | 2332 | * increment. That's how the 7146 is programmed to do event |
| 2333 | * counting in this budget-patch.c | 2333 | * counting in this budget-patch.c |
| 2334 | * I *think* HPS setting has something to do with the phase | 2334 | * I *think* HPS setting has something to do with the phase |
| 2335 | * of HS but I cant be 100% sure in that. | 2335 | * of HS but I can't be 100% sure in that. |
| 2336 | * | 2336 | * |
| 2337 | * hardware debug note: a working budget card (including budget patch) | 2337 | * hardware debug note: a working budget card (including budget patch) |
| 2338 | * with vpeirq() interrupt setup in mode "0x90" (every 64K) will | 2338 | * with vpeirq() interrupt setup in mode "0x90" (every 64K) will |
diff --git a/drivers/media/dvb/ttpci/budget-patch.c b/drivers/media/dvb/ttpci/budget-patch.c index 579835590690..3395d1a90516 100644 --- a/drivers/media/dvb/ttpci/budget-patch.c +++ b/drivers/media/dvb/ttpci/budget-patch.c | |||
| @@ -539,7 +539,7 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte | |||
| 539 | ** increment. That's how the 7146 is programmed to do event | 539 | ** increment. That's how the 7146 is programmed to do event |
| 540 | ** counting in this budget-patch.c | 540 | ** counting in this budget-patch.c |
| 541 | ** I *think* HPS setting has something to do with the phase | 541 | ** I *think* HPS setting has something to do with the phase |
| 542 | ** of HS but I cant be 100% sure in that. | 542 | ** of HS but I can't be 100% sure in that. |
| 543 | 543 | ||
| 544 | ** hardware debug note: a working budget card (including budget patch) | 544 | ** hardware debug note: a working budget card (including budget patch) |
| 545 | ** with vpeirq() interrupt setup in mode "0x90" (every 64K) will | 545 | ** with vpeirq() interrupt setup in mode "0x90" (every 64K) will |
diff --git a/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/drivers/media/dvb/ttusb-dec/ttusb_dec.c index fe1b8037b247..f893bffa08a3 100644 --- a/drivers/media/dvb/ttusb-dec/ttusb_dec.c +++ b/drivers/media/dvb/ttusb-dec/ttusb_dec.c | |||
| @@ -234,7 +234,7 @@ static void ttusb_dec_handle_irq( struct urb *urb) | |||
| 234 | * (with buffer[3] == 0x40) in an intervall of ~100ms. | 234 | * (with buffer[3] == 0x40) in an intervall of ~100ms. |
| 235 | * But to handle this correctly we had to imlemenent some | 235 | * But to handle this correctly we had to imlemenent some |
| 236 | * kind of timer which signals a 'key up' event if no | 236 | * kind of timer which signals a 'key up' event if no |
| 237 | * keyrepeat signal is recieved for lets say 200ms. | 237 | * keyrepeat signal is received for lets say 200ms. |
| 238 | * this should/could be added later ... | 238 | * this should/could be added later ... |
| 239 | * for now lets report each signal as a key down and up*/ | 239 | * for now lets report each signal as a key down and up*/ |
| 240 | dprintk("%s:rc signal:%d\n", __func__, buffer[4]); | 240 | dprintk("%s:rc signal:%d\n", __func__, buffer[4]); |
diff --git a/drivers/media/radio/radio-mr800.c b/drivers/media/radio/radio-mr800.c index e6b2d085a449..b3a635b95820 100644 --- a/drivers/media/radio/radio-mr800.c +++ b/drivers/media/radio/radio-mr800.c | |||
| @@ -99,7 +99,7 @@ devices, that would be 76 and 91. */ | |||
| 99 | 99 | ||
| 100 | /* | 100 | /* |
| 101 | * Commands that device should understand | 101 | * Commands that device should understand |
| 102 | * List isnt full and will be updated with implementation of new functions | 102 | * List isn't full and will be updated with implementation of new functions |
| 103 | */ | 103 | */ |
| 104 | #define AMRADIO_SET_FREQ 0xa4 | 104 | #define AMRADIO_SET_FREQ 0xa4 |
| 105 | #define AMRADIO_SET_MUTE 0xab | 105 | #define AMRADIO_SET_MUTE 0xab |
diff --git a/drivers/media/radio/si4713-i2c.c b/drivers/media/radio/si4713-i2c.c index 0fab6f8f7e24..deca2e06ff22 100644 --- a/drivers/media/radio/si4713-i2c.c +++ b/drivers/media/radio/si4713-i2c.c | |||
| @@ -481,7 +481,7 @@ unlock: | |||
| 481 | } | 481 | } |
| 482 | 482 | ||
| 483 | /* | 483 | /* |
| 484 | * si4713_wait_stc - Waits STC interrupt and clears status bits. Usefull | 484 | * si4713_wait_stc - Waits STC interrupt and clears status bits. Useful |
| 485 | * for TX_TUNE_POWER, TX_TUNE_FREQ and TX_TUNE_MEAS | 485 | * for TX_TUNE_POWER, TX_TUNE_FREQ and TX_TUNE_MEAS |
| 486 | * @sdev: si4713_device structure for the device we are communicating | 486 | * @sdev: si4713_device structure for the device we are communicating |
| 487 | * @usecs: timeout to wait for STC interrupt signal | 487 | * @usecs: timeout to wait for STC interrupt signal |
diff --git a/drivers/media/radio/wl128x/fmdrv_common.c b/drivers/media/radio/wl128x/fmdrv_common.c index 64454d39c0ca..5991ab60303d 100644 --- a/drivers/media/radio/wl128x/fmdrv_common.c +++ b/drivers/media/radio/wl128x/fmdrv_common.c | |||
| @@ -352,7 +352,7 @@ static void send_tasklet(unsigned long arg) | |||
| 352 | if (!atomic_read(&fmdev->tx_cnt)) | 352 | if (!atomic_read(&fmdev->tx_cnt)) |
| 353 | return; | 353 | return; |
| 354 | 354 | ||
| 355 | /* Check, is there any timeout happenned to last transmitted packet */ | 355 | /* Check, is there any timeout happened to last transmitted packet */ |
| 356 | if ((jiffies - fmdev->last_tx_jiffies) > FM_DRV_TX_TIMEOUT) { | 356 | if ((jiffies - fmdev->last_tx_jiffies) > FM_DRV_TX_TIMEOUT) { |
| 357 | fmerr("TX timeout occurred\n"); | 357 | fmerr("TX timeout occurred\n"); |
| 358 | atomic_set(&fmdev->tx_cnt, 1); | 358 | atomic_set(&fmdev->tx_cnt, 1); |
| @@ -478,7 +478,7 @@ u32 fmc_send_cmd(struct fmdev *fmdev, u8 fm_op, u16 type, void *payload, | |||
| 478 | return -ETIMEDOUT; | 478 | return -ETIMEDOUT; |
| 479 | } | 479 | } |
| 480 | if (!fmdev->resp_skb) { | 480 | if (!fmdev->resp_skb) { |
| 481 | fmerr("Reponse SKB is missing\n"); | 481 | fmerr("Response SKB is missing\n"); |
| 482 | return -EFAULT; | 482 | return -EFAULT; |
| 483 | } | 483 | } |
| 484 | spin_lock_irqsave(&fmdev->resp_skb_lock, flags); | 484 | spin_lock_irqsave(&fmdev->resp_skb_lock, flags); |
| @@ -1494,12 +1494,17 @@ u32 fmc_prepare(struct fmdev *fmdev) | |||
| 1494 | } | 1494 | } |
| 1495 | 1495 | ||
| 1496 | memset(&fm_st_proto, 0, sizeof(fm_st_proto)); | 1496 | memset(&fm_st_proto, 0, sizeof(fm_st_proto)); |
| 1497 | fm_st_proto.type = ST_FM; | ||
| 1498 | fm_st_proto.recv = fm_st_receive; | 1497 | fm_st_proto.recv = fm_st_receive; |
| 1499 | fm_st_proto.match_packet = NULL; | 1498 | fm_st_proto.match_packet = NULL; |
| 1500 | fm_st_proto.reg_complete_cb = fm_st_reg_comp_cb; | 1499 | fm_st_proto.reg_complete_cb = fm_st_reg_comp_cb; |
| 1501 | fm_st_proto.write = NULL; /* TI ST driver will fill write pointer */ | 1500 | fm_st_proto.write = NULL; /* TI ST driver will fill write pointer */ |
| 1502 | fm_st_proto.priv_data = fmdev; | 1501 | fm_st_proto.priv_data = fmdev; |
| 1502 | fm_st_proto.chnl_id = 0x08; | ||
| 1503 | fm_st_proto.max_frame_size = 0xff; | ||
| 1504 | fm_st_proto.hdr_len = 1; | ||
| 1505 | fm_st_proto.offset_len_in_hdr = 0; | ||
| 1506 | fm_st_proto.len_size = 1; | ||
| 1507 | fm_st_proto.reserve = 1; | ||
| 1503 | 1508 | ||
| 1504 | ret = st_register(&fm_st_proto); | 1509 | ret = st_register(&fm_st_proto); |
| 1505 | if (ret == -EINPROGRESS) { | 1510 | if (ret == -EINPROGRESS) { |
| @@ -1532,7 +1537,7 @@ u32 fmc_prepare(struct fmdev *fmdev) | |||
| 1532 | g_st_write = fm_st_proto.write; | 1537 | g_st_write = fm_st_proto.write; |
| 1533 | } else { | 1538 | } else { |
| 1534 | fmerr("Failed to get ST write func pointer\n"); | 1539 | fmerr("Failed to get ST write func pointer\n"); |
| 1535 | ret = st_unregister(ST_FM); | 1540 | ret = st_unregister(&fm_st_proto); |
| 1536 | if (ret < 0) | 1541 | if (ret < 0) |
| 1537 | fmerr("st_unregister failed %d\n", ret); | 1542 | fmerr("st_unregister failed %d\n", ret); |
| 1538 | return -EAGAIN; | 1543 | return -EAGAIN; |
| @@ -1586,13 +1591,14 @@ u32 fmc_prepare(struct fmdev *fmdev) | |||
| 1586 | */ | 1591 | */ |
| 1587 | u32 fmc_release(struct fmdev *fmdev) | 1592 | u32 fmc_release(struct fmdev *fmdev) |
| 1588 | { | 1593 | { |
| 1594 | static struct st_proto_s fm_st_proto; | ||
| 1589 | u32 ret; | 1595 | u32 ret; |
| 1590 | 1596 | ||
| 1591 | if (!test_bit(FM_CORE_READY, &fmdev->flag)) { | 1597 | if (!test_bit(FM_CORE_READY, &fmdev->flag)) { |
| 1592 | fmdbg("FM Core is already down\n"); | 1598 | fmdbg("FM Core is already down\n"); |
| 1593 | return 0; | 1599 | return 0; |
| 1594 | } | 1600 | } |
| 1595 | /* Sevice pending read */ | 1601 | /* Service pending read */ |
| 1596 | wake_up_interruptible(&fmdev->rx.rds.read_queue); | 1602 | wake_up_interruptible(&fmdev->rx.rds.read_queue); |
| 1597 | 1603 | ||
| 1598 | tasklet_kill(&fmdev->tx_task); | 1604 | tasklet_kill(&fmdev->tx_task); |
| @@ -1604,7 +1610,11 @@ u32 fmc_release(struct fmdev *fmdev) | |||
| 1604 | fmdev->resp_comp = NULL; | 1610 | fmdev->resp_comp = NULL; |
| 1605 | fmdev->rx.freq = 0; | 1611 | fmdev->rx.freq = 0; |
| 1606 | 1612 | ||
| 1607 | ret = st_unregister(ST_FM); | 1613 | memset(&fm_st_proto, 0, sizeof(fm_st_proto)); |
| 1614 | fm_st_proto.chnl_id = 0x08; | ||
| 1615 | |||
| 1616 | ret = st_unregister(&fm_st_proto); | ||
| 1617 | |||
| 1608 | if (ret < 0) | 1618 | if (ret < 0) |
| 1609 | fmerr("Failed to de-register FM from ST %d\n", ret); | 1619 | fmerr("Failed to de-register FM from ST %d\n", ret); |
| 1610 | else | 1620 | else |
diff --git a/drivers/media/radio/wl128x/fmdrv_common.h b/drivers/media/radio/wl128x/fmdrv_common.h index 427c4164cece..aee243bb6630 100644 --- a/drivers/media/radio/wl128x/fmdrv_common.h +++ b/drivers/media/radio/wl128x/fmdrv_common.h | |||
| @@ -362,7 +362,7 @@ struct fm_event_msg_hdr { | |||
| 362 | #define FM_TX_PREEMPH_50US 0 | 362 | #define FM_TX_PREEMPH_50US 0 |
| 363 | #define FM_TX_PREEMPH_75US 2 | 363 | #define FM_TX_PREEMPH_75US 2 |
| 364 | 364 | ||
| 365 | /* FM TX antenna impedence values */ | 365 | /* FM TX antenna impedance values */ |
| 366 | #define FM_TX_ANT_IMP_50 0 | 366 | #define FM_TX_ANT_IMP_50 0 |
| 367 | #define FM_TX_ANT_IMP_200 1 | 367 | #define FM_TX_ANT_IMP_200 1 |
| 368 | #define FM_TX_ANT_IMP_500 2 | 368 | #define FM_TX_ANT_IMP_500 2 |
diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c index 1ac49139158d..a43ed6c41bfc 100644 --- a/drivers/media/rc/ene_ir.c +++ b/drivers/media/rc/ene_ir.c | |||
| @@ -520,7 +520,7 @@ static void ene_rx_disable(struct ene_device *dev) | |||
| 520 | dev->rx_enabled = false; | 520 | dev->rx_enabled = false; |
| 521 | } | 521 | } |
| 522 | 522 | ||
| 523 | /* This resets the receiver. Usefull to stop stream of spaces at end of | 523 | /* This resets the receiver. Useful to stop stream of spaces at end of |
| 524 | * transmission | 524 | * transmission |
| 525 | */ | 525 | */ |
| 526 | static void ene_rx_reset(struct ene_device *dev) | 526 | static void ene_rx_reset(struct ene_device *dev) |
| @@ -1089,7 +1089,7 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id) | |||
| 1089 | if (error < 0) | 1089 | if (error < 0) |
| 1090 | goto error; | 1090 | goto error; |
| 1091 | 1091 | ||
| 1092 | ene_notice("driver has been succesfully loaded"); | 1092 | ene_notice("driver has been successfully loaded"); |
| 1093 | return 0; | 1093 | return 0; |
| 1094 | error: | 1094 | error: |
| 1095 | if (dev && dev->irq >= 0) | 1095 | if (dev && dev->irq >= 0) |
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c index f714e1a22c92..ebd68edf5b24 100644 --- a/drivers/media/rc/imon.c +++ b/drivers/media/rc/imon.c | |||
| @@ -1293,7 +1293,7 @@ static void imon_pad_to_keys(struct imon_context *ictx, unsigned char *buf) | |||
| 1293 | * contain a position coordinate (x,y), with each component ranging | 1293 | * contain a position coordinate (x,y), with each component ranging |
| 1294 | * from -14 to 14. We want to down-sample this to only 4 discrete values | 1294 | * from -14 to 14. We want to down-sample this to only 4 discrete values |
| 1295 | * for up/down/left/right arrow keys. Also, when you get too close to | 1295 | * for up/down/left/right arrow keys. Also, when you get too close to |
| 1296 | * diagonals, it has a tendancy to jump back and forth, so lets try to | 1296 | * diagonals, it has a tendency to jump back and forth, so lets try to |
| 1297 | * ignore when they get too close. | 1297 | * ignore when they get too close. |
| 1298 | */ | 1298 | */ |
| 1299 | if (ictx->product != 0xffdc) { | 1299 | if (ictx->product != 0xffdc) { |
diff --git a/drivers/media/rc/ir-raw.c b/drivers/media/rc/ir-raw.c index 01f258a2a57a..11c19d8d0ee0 100644 --- a/drivers/media/rc/ir-raw.c +++ b/drivers/media/rc/ir-raw.c | |||
| @@ -153,7 +153,7 @@ EXPORT_SYMBOL_GPL(ir_raw_event_store_edge); | |||
| 153 | * @type: the type of the event that has occurred | 153 | * @type: the type of the event that has occurred |
| 154 | * | 154 | * |
| 155 | * This routine (which may be called from an interrupt context) works | 155 | * This routine (which may be called from an interrupt context) works |
| 156 | * in similiar manner to ir_raw_event_store_edge. | 156 | * in similar manner to ir_raw_event_store_edge. |
| 157 | * This routine is intended for devices with limited internal buffer | 157 | * This routine is intended for devices with limited internal buffer |
| 158 | * It automerges samples of same type, and handles timeouts | 158 | * It automerges samples of same type, and handles timeouts |
| 159 | */ | 159 | */ |
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c index ac0e42b47b2a..accaf6c9789a 100644 --- a/drivers/media/rc/ite-cir.c +++ b/drivers/media/rc/ite-cir.c | |||
| @@ -41,6 +41,7 @@ | |||
| 41 | #include <linux/bitops.h> | 41 | #include <linux/bitops.h> |
| 42 | #include <media/rc-core.h> | 42 | #include <media/rc-core.h> |
| 43 | #include <linux/pci_ids.h> | 43 | #include <linux/pci_ids.h> |
| 44 | #include <linux/delay.h> | ||
| 44 | 45 | ||
| 45 | #include "ite-cir.h" | 46 | #include "ite-cir.h" |
| 46 | 47 | ||
diff --git a/drivers/media/rc/keymaps/rc-lme2510.c b/drivers/media/rc/keymaps/rc-lme2510.c index 3c1913926c1a..afae14fd152e 100644 --- a/drivers/media/rc/keymaps/rc-lme2510.c +++ b/drivers/media/rc/keymaps/rc-lme2510.c | |||
| @@ -55,7 +55,7 @@ static struct rc_map_table lme2510_rc[] = { | |||
| 55 | { 0xff40fb04, KEY_MEDIA_REPEAT}, /* Recall */ | 55 | { 0xff40fb04, KEY_MEDIA_REPEAT}, /* Recall */ |
| 56 | { 0xff40e51a, KEY_PAUSE }, /* Timeshift */ | 56 | { 0xff40e51a, KEY_PAUSE }, /* Timeshift */ |
| 57 | { 0xff40fd02, KEY_VOLUMEUP }, /* 2 x -/+ Keys not marked */ | 57 | { 0xff40fd02, KEY_VOLUMEUP }, /* 2 x -/+ Keys not marked */ |
| 58 | { 0xff40f906, KEY_VOLUMEDOWN }, /* Volumne defined as right hand*/ | 58 | { 0xff40f906, KEY_VOLUMEDOWN }, /* Volume defined as right hand*/ |
| 59 | { 0xff40fe01, KEY_CHANNELUP }, | 59 | { 0xff40fe01, KEY_CHANNELUP }, |
| 60 | { 0xff40fa05, KEY_CHANNELDOWN }, | 60 | { 0xff40fa05, KEY_CHANNELDOWN }, |
| 61 | { 0xff40eb14, KEY_ZOOM }, | 61 | { 0xff40eb14, KEY_ZOOM }, |
| @@ -76,7 +76,7 @@ static struct rc_map_table lme2510_rc[] = { | |||
| 76 | { 0xff00bb44, KEY_MEDIA_REPEAT}, /* Recall */ | 76 | { 0xff00bb44, KEY_MEDIA_REPEAT}, /* Recall */ |
| 77 | { 0xff00b54a, KEY_PAUSE }, /* Timeshift */ | 77 | { 0xff00b54a, KEY_PAUSE }, /* Timeshift */ |
| 78 | { 0xff00b847, KEY_VOLUMEUP }, /* 2 x -/+ Keys not marked */ | 78 | { 0xff00b847, KEY_VOLUMEUP }, /* 2 x -/+ Keys not marked */ |
| 79 | { 0xff00bc43, KEY_VOLUMEDOWN }, /* Volumne defined as right hand*/ | 79 | { 0xff00bc43, KEY_VOLUMEDOWN }, /* Volume defined as right hand*/ |
| 80 | { 0xff00b946, KEY_CHANNELUP }, | 80 | { 0xff00b946, KEY_CHANNELUP }, |
| 81 | { 0xff00bf40, KEY_CHANNELDOWN }, | 81 | { 0xff00bf40, KEY_CHANNELDOWN }, |
| 82 | { 0xff00f708, KEY_ZOOM }, | 82 | { 0xff00f708, KEY_ZOOM }, |
diff --git a/drivers/media/rc/keymaps/rc-msi-tvanywhere.c b/drivers/media/rc/keymaps/rc-msi-tvanywhere.c index 18b37facb0dd..fdd213ff1adf 100644 --- a/drivers/media/rc/keymaps/rc-msi-tvanywhere.c +++ b/drivers/media/rc/keymaps/rc-msi-tvanywhere.c | |||
| @@ -29,7 +29,7 @@ static struct rc_map_table msi_tvanywhere[] = { | |||
| 29 | 29 | ||
| 30 | { 0x0c, KEY_MUTE }, | 30 | { 0x0c, KEY_MUTE }, |
| 31 | { 0x0f, KEY_SCREEN }, /* Full Screen */ | 31 | { 0x0f, KEY_SCREEN }, /* Full Screen */ |
| 32 | { 0x10, KEY_FN }, /* Funtion */ | 32 | { 0x10, KEY_FN }, /* Function */ |
| 33 | { 0x11, KEY_TIME }, /* Time shift */ | 33 | { 0x11, KEY_TIME }, /* Time shift */ |
| 34 | { 0x12, KEY_POWER }, | 34 | { 0x12, KEY_POWER }, |
| 35 | { 0x13, KEY_MEDIA }, /* MTS */ | 35 | { 0x13, KEY_MEDIA }, /* MTS */ |
diff --git a/drivers/media/rc/keymaps/rc-norwood.c b/drivers/media/rc/keymaps/rc-norwood.c index f1c1281fbc17..f9f2fa2819b8 100644 --- a/drivers/media/rc/keymaps/rc-norwood.c +++ b/drivers/media/rc/keymaps/rc-norwood.c | |||
| @@ -49,7 +49,7 @@ static struct rc_map_table norwood[] = { | |||
| 49 | { 0x37, KEY_PLAY }, /* Play */ | 49 | { 0x37, KEY_PLAY }, /* Play */ |
| 50 | { 0x36, KEY_PAUSE }, /* Pause */ | 50 | { 0x36, KEY_PAUSE }, /* Pause */ |
| 51 | { 0x2b, KEY_STOP }, /* Stop */ | 51 | { 0x2b, KEY_STOP }, /* Stop */ |
| 52 | { 0x67, KEY_FASTFORWARD }, /* Foward */ | 52 | { 0x67, KEY_FASTFORWARD }, /* Forward */ |
| 53 | { 0x66, KEY_REWIND }, /* Rewind */ | 53 | { 0x66, KEY_REWIND }, /* Rewind */ |
| 54 | { 0x3e, KEY_SEARCH }, /* Auto Scan */ | 54 | { 0x3e, KEY_SEARCH }, /* Auto Scan */ |
| 55 | { 0x2e, KEY_CAMERA }, /* Capture Video */ | 55 | { 0x2e, KEY_CAMERA }, /* Capture Video */ |
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index 5ac1baf45c8e..f53f9c68d38d 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c | |||
| @@ -255,7 +255,7 @@ static unsigned int ir_update_mapping(struct rc_dev *dev, | |||
| 255 | * @rc_map: scancode table to be searched | 255 | * @rc_map: scancode table to be searched |
| 256 | * @scancode: the desired scancode | 256 | * @scancode: the desired scancode |
| 257 | * @resize: controls whether we allowed to resize the table to | 257 | * @resize: controls whether we allowed to resize the table to |
| 258 | * accomodate not yet present scancodes | 258 | * accommodate not yet present scancodes |
| 259 | * @return: index of the mapping containing scancode in question | 259 | * @return: index of the mapping containing scancode in question |
| 260 | * or -1U in case of failure. | 260 | * or -1U in case of failure. |
| 261 | * | 261 | * |
| @@ -1037,7 +1037,7 @@ int rc_register_device(struct rc_dev *dev) | |||
| 1037 | goto out_table; | 1037 | goto out_table; |
| 1038 | 1038 | ||
| 1039 | /* | 1039 | /* |
| 1040 | * Default delay of 250ms is too short for some protocols, expecially | 1040 | * Default delay of 250ms is too short for some protocols, especially |
| 1041 | * since the timeout is currently set to 250ms. Increase it to 500ms, | 1041 | * since the timeout is currently set to 250ms. Increase it to 500ms, |
| 1042 | * to avoid wrong repetition of the keycodes. Note that this must be | 1042 | * to avoid wrong repetition of the keycodes. Note that this must be |
| 1043 | * set after the call to input_register_device(). | 1043 | * set after the call to input_register_device(). |
diff --git a/drivers/media/video/au0828/au0828-video.c b/drivers/media/video/au0828/au0828-video.c index 6ad83a15d073..c03eb29a9ee6 100644 --- a/drivers/media/video/au0828/au0828-video.c +++ b/drivers/media/video/au0828/au0828-video.c | |||
| @@ -502,7 +502,7 @@ static inline void vbi_get_next_buf(struct au0828_dmaqueue *dma_q, | |||
| 502 | 502 | ||
| 503 | /* Get the next buffer */ | 503 | /* Get the next buffer */ |
| 504 | *buf = list_entry(dma_q->active.next, struct au0828_buffer, vb.queue); | 504 | *buf = list_entry(dma_q->active.next, struct au0828_buffer, vb.queue); |
| 505 | /* Cleans up buffer - Usefull for testing for frame/URB loss */ | 505 | /* Cleans up buffer - Useful for testing for frame/URB loss */ |
| 506 | outp = videobuf_to_vmalloc(&(*buf)->vb); | 506 | outp = videobuf_to_vmalloc(&(*buf)->vb); |
| 507 | memset(outp, 0x00, (*buf)->vb.size); | 507 | memset(outp, 0x00, (*buf)->vb.size); |
| 508 | 508 | ||
diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c index 242f0d512238..3c9e6c7e7b52 100644 --- a/drivers/media/video/bt8xx/bttv-cards.c +++ b/drivers/media/video/bt8xx/bttv-cards.c | |||
| @@ -2244,8 +2244,8 @@ struct tvcard bttv_tvcards[] = { | |||
| 2244 | }, | 2244 | }, |
| 2245 | [BTTV_BOARD_PICOLO_TETRA_CHIP] = { | 2245 | [BTTV_BOARD_PICOLO_TETRA_CHIP] = { |
| 2246 | /*Eric DEBIEF <debief@telemsa.com>*/ | 2246 | /*Eric DEBIEF <debief@telemsa.com>*/ |
| 2247 | /*EURESYS Picolo Tetra : 4 Conexant Fusion 878A, no audio, video input set with analog multiplexers GPIO controled*/ | 2247 | /*EURESYS Picolo Tetra : 4 Conexant Fusion 878A, no audio, video input set with analog multiplexers GPIO controlled*/ |
| 2248 | /* adds picolo_tetra_muxsel(), picolo_tetra_init(), the folowing declaration strucure, and #define BTTV_BOARD_PICOLO_TETRA_CHIP*/ | 2248 | /* adds picolo_tetra_muxsel(), picolo_tetra_init(), the following declaration strucure, and #define BTTV_BOARD_PICOLO_TETRA_CHIP*/ |
| 2249 | /*0x79 in bttv.h*/ | 2249 | /*0x79 in bttv.h*/ |
| 2250 | .name = "Euresys Picolo Tetra", | 2250 | .name = "Euresys Picolo Tetra", |
| 2251 | .video_inputs = 4, | 2251 | .video_inputs = 4, |
| @@ -4567,7 +4567,7 @@ static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input) | |||
| 4567 | * at one input while the monitor is looking at another. | 4567 | * at one input while the monitor is looking at another. |
| 4568 | * | 4568 | * |
| 4569 | * Since I've couldn't be bothered figuring out how to add an | 4569 | * Since I've couldn't be bothered figuring out how to add an |
| 4570 | * independant muxsel for the monitor bus, I've just set it to | 4570 | * independent muxsel for the monitor bus, I've just set it to |
| 4571 | * whatever the card is looking at. | 4571 | * whatever the card is looking at. |
| 4572 | * | 4572 | * |
| 4573 | * OUT0 of the TDA8540's is connected to MUX0 (0x03) | 4573 | * OUT0 of the TDA8540's is connected to MUX0 (0x03) |
diff --git a/drivers/media/video/bt8xx/bttv-gpio.c b/drivers/media/video/bt8xx/bttv-gpio.c index fd604d32bbb9..13ce72c04b33 100644 --- a/drivers/media/video/bt8xx/bttv-gpio.c +++ b/drivers/media/video/bt8xx/bttv-gpio.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | bttv-gpio.c -- gpio sub drivers | 3 | bttv-gpio.c -- gpio sub drivers |
| 4 | 4 | ||
| 5 | sysfs-based sub driver interface for bttv | 5 | sysfs-based sub driver interface for bttv |
| 6 | mainly intented for gpio access | 6 | mainly intended for gpio access |
| 7 | 7 | ||
| 8 | 8 | ||
| 9 | Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de) | 9 | Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de) |
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c index 55ffd60ffa7f..664703398493 100644 --- a/drivers/media/video/cafe_ccic.c +++ b/drivers/media/video/cafe_ccic.c | |||
| @@ -383,7 +383,7 @@ static int cafe_smbus_write_data(struct cafe_camera *cam, | |||
| 383 | * causes the device to die. | 383 | * causes the device to die. |
| 384 | * Use a busy-wait because we often send a large quantity of small | 384 | * Use a busy-wait because we often send a large quantity of small |
| 385 | * commands at-once; using msleep() would cause a lot of context | 385 | * commands at-once; using msleep() would cause a lot of context |
| 386 | * switches which take longer than 2ms, resulting in a noticable | 386 | * switches which take longer than 2ms, resulting in a noticeable |
| 387 | * boot-time and capture-start delays. | 387 | * boot-time and capture-start delays. |
| 388 | */ | 388 | */ |
| 389 | mdelay(2); | 389 | mdelay(2); |
diff --git a/drivers/media/video/cx18/cx18-av-core.h b/drivers/media/video/cx18/cx18-av-core.h index 188c9c3d2db1..e9c69d9c9e4a 100644 --- a/drivers/media/video/cx18/cx18-av-core.h +++ b/drivers/media/video/cx18/cx18-av-core.h | |||
| @@ -109,7 +109,7 @@ struct cx18_av_state { | |||
| 109 | int is_initialized; | 109 | int is_initialized; |
| 110 | 110 | ||
| 111 | /* | 111 | /* |
| 112 | * The VBI slicer starts operating and counting lines, begining at | 112 | * The VBI slicer starts operating and counting lines, beginning at |
| 113 | * slicer line count of 1, at D lines after the deassertion of VRESET. | 113 | * slicer line count of 1, at D lines after the deassertion of VRESET. |
| 114 | * This staring field line, S, is 6 (& 319) or 10 (& 273) for 625 or 525 | 114 | * This staring field line, S, is 6 (& 319) or 10 (& 273) for 625 or 525 |
| 115 | * line systems respectively. Sliced ancillary data captured on VBI | 115 | * line systems respectively. Sliced ancillary data captured on VBI |
diff --git a/drivers/media/video/cx18/cx18-ioctl.c b/drivers/media/video/cx18/cx18-ioctl.c index 86c30b9963e5..4f041c033c54 100644 --- a/drivers/media/video/cx18/cx18-ioctl.c +++ b/drivers/media/video/cx18/cx18-ioctl.c | |||
| @@ -312,7 +312,7 @@ static int cx18_s_fmt_vbi_cap(struct file *file, void *fh, | |||
| 312 | 312 | ||
| 313 | /* | 313 | /* |
| 314 | * Set the digitizer registers for raw active VBI. | 314 | * Set the digitizer registers for raw active VBI. |
| 315 | * Note cx18_av_vbi_wipes out alot of the passed in fmt under valid | 315 | * Note cx18_av_vbi_wipes out a lot of the passed in fmt under valid |
| 316 | * calling conditions | 316 | * calling conditions |
| 317 | */ | 317 | */ |
| 318 | ret = v4l2_subdev_call(cx->sd_av, vbi, s_raw_fmt, &fmt->fmt.vbi); | 318 | ret = v4l2_subdev_call(cx->sd_av, vbi, s_raw_fmt, &fmt->fmt.vbi); |
diff --git a/drivers/media/video/cx18/cx18-vbi.c b/drivers/media/video/cx18/cx18-vbi.c index 582227522cf0..6d3121ff45a2 100644 --- a/drivers/media/video/cx18/cx18-vbi.c +++ b/drivers/media/video/cx18/cx18-vbi.c | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | /* | 29 | /* |
| 30 | * Raster Reference/Protection (RP) bytes, used in Start/End Active | 30 | * Raster Reference/Protection (RP) bytes, used in Start/End Active |
| 31 | * Video codes emitted from the digitzer in VIP 1.x mode, that flag the start | 31 | * Video codes emitted from the digitzer in VIP 1.x mode, that flag the start |
| 32 | * of VBI sample or VBI ancilliary data regions in the digitial ratser line. | 32 | * of VBI sample or VBI ancillary data regions in the digitial ratser line. |
| 33 | * | 33 | * |
| 34 | * Task FieldEven VerticalBlank HorizontalBlank 0 0 0 0 | 34 | * Task FieldEven VerticalBlank HorizontalBlank 0 0 0 0 |
| 35 | */ | 35 | */ |
diff --git a/drivers/media/video/cx231xx/cx231xx-avcore.c b/drivers/media/video/cx231xx/cx231xx-avcore.c index 62843d39817c..280df43ca446 100644 --- a/drivers/media/video/cx231xx/cx231xx-avcore.c +++ b/drivers/media/video/cx231xx/cx231xx-avcore.c | |||
| @@ -2577,7 +2577,7 @@ int cx231xx_initialize_stream_xfer(struct cx231xx *dev, u32 media_type) | |||
| 2577 | break; | 2577 | break; |
| 2578 | 2578 | ||
| 2579 | case 6: /* ts1 parallel mode */ | 2579 | case 6: /* ts1 parallel mode */ |
| 2580 | cx231xx_info("%s: set ts1 parrallel mode registers\n", | 2580 | cx231xx_info("%s: set ts1 parallel mode registers\n", |
| 2581 | __func__); | 2581 | __func__); |
| 2582 | status = cx231xx_mode_register(dev, TS_MODE_REG, 0x100); | 2582 | status = cx231xx_mode_register(dev, TS_MODE_REG, 0x100); |
| 2583 | status = cx231xx_mode_register(dev, TS1_CFG_REG, 0x400); | 2583 | status = cx231xx_mode_register(dev, TS1_CFG_REG, 0x400); |
diff --git a/drivers/media/video/cx231xx/cx231xx-vbi.c b/drivers/media/video/cx231xx/cx231xx-vbi.c index 1d914488dbb3..1c7a4daafecf 100644 --- a/drivers/media/video/cx231xx/cx231xx-vbi.c +++ b/drivers/media/video/cx231xx/cx231xx-vbi.c | |||
| @@ -631,7 +631,7 @@ static inline void get_next_vbi_buf(struct cx231xx_dmaqueue *dma_q, | |||
| 631 | /* Get the next buffer */ | 631 | /* Get the next buffer */ |
| 632 | *buf = list_entry(dma_q->active.next, struct cx231xx_buffer, vb.queue); | 632 | *buf = list_entry(dma_q->active.next, struct cx231xx_buffer, vb.queue); |
| 633 | 633 | ||
| 634 | /* Cleans up buffer - Usefull for testing for frame/URB loss */ | 634 | /* Cleans up buffer - Useful for testing for frame/URB loss */ |
| 635 | outp = videobuf_to_vmalloc(&(*buf)->vb); | 635 | outp = videobuf_to_vmalloc(&(*buf)->vb); |
| 636 | memset(outp, 0, (*buf)->vb.size); | 636 | memset(outp, 0, (*buf)->vb.size); |
| 637 | 637 | ||
diff --git a/drivers/media/video/cx231xx/cx231xx-video.c b/drivers/media/video/cx231xx/cx231xx-video.c index ffd5af914c44..a69c24d8db06 100644 --- a/drivers/media/video/cx231xx/cx231xx-video.c +++ b/drivers/media/video/cx231xx/cx231xx-video.c | |||
| @@ -309,7 +309,7 @@ static inline void get_next_buf(struct cx231xx_dmaqueue *dma_q, | |||
| 309 | /* Get the next buffer */ | 309 | /* Get the next buffer */ |
| 310 | *buf = list_entry(dma_q->active.next, struct cx231xx_buffer, vb.queue); | 310 | *buf = list_entry(dma_q->active.next, struct cx231xx_buffer, vb.queue); |
| 311 | 311 | ||
| 312 | /* Cleans up buffer - Usefull for testing for frame/URB loss */ | 312 | /* Cleans up buffer - Useful for testing for frame/URB loss */ |
| 313 | outp = videobuf_to_vmalloc(&(*buf)->vb); | 313 | outp = videobuf_to_vmalloc(&(*buf)->vb); |
| 314 | memset(outp, 0, (*buf)->vb.size); | 314 | memset(outp, 0, (*buf)->vb.size); |
| 315 | 315 | ||
diff --git a/drivers/media/video/cx23885/cimax2.c b/drivers/media/video/cx23885/cimax2.c index 209b971bd267..c9f15d6dec40 100644 --- a/drivers/media/video/cx23885/cimax2.c +++ b/drivers/media/video/cx23885/cimax2.c | |||
| @@ -449,7 +449,7 @@ int netup_ci_init(struct cx23885_tsport *port) | |||
| 449 | 0x04, /* ack active low */ | 449 | 0x04, /* ack active low */ |
| 450 | 0x00, /* LOCK = 0 */ | 450 | 0x00, /* LOCK = 0 */ |
| 451 | 0x33, /* serial mode, rising in, rising out, MSB first*/ | 451 | 0x33, /* serial mode, rising in, rising out, MSB first*/ |
| 452 | 0x31, /* syncronization */ | 452 | 0x31, /* synchronization */ |
| 453 | }; | 453 | }; |
| 454 | int ret; | 454 | int ret; |
| 455 | 455 | ||
diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/video/cx23885/cx23885.h index 8db2797bc7c3..c186473fc570 100644 --- a/drivers/media/video/cx23885/cx23885.h +++ b/drivers/media/video/cx23885/cx23885.h | |||
| @@ -214,7 +214,7 @@ struct cx23885_board { | |||
| 214 | 214 | ||
| 215 | /* Vendors can and do run the PCIe bridge at different | 215 | /* Vendors can and do run the PCIe bridge at different |
| 216 | * clock rates, driven physically by crystals on the PCBs. | 216 | * clock rates, driven physically by crystals on the PCBs. |
| 217 | * The core has to accomodate this. This allows the user | 217 | * The core has to accommodate this. This allows the user |
| 218 | * to add new boards with new frequencys. The value is | 218 | * to add new boards with new frequencys. The value is |
| 219 | * expressed in Hz. | 219 | * expressed in Hz. |
| 220 | * | 220 | * |
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index 35796e035247..b7ee2ae70583 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * | 2 | * |
| 3 | * Copyright (C) 2004 Ulf Eklund | 3 | * Copyright (C) 2004 Ulf Eklund |
| 4 | * | 4 | * |
| 5 | * Based on the saa7115 driver and on the first verison of Chris Kennedy's | 5 | * Based on the saa7115 driver and on the first version of Chris Kennedy's |
| 6 | * cx25840 driver. | 6 | * cx25840 driver. |
| 7 | * | 7 | * |
| 8 | * Changes by Tyler Trafford <tatrafford@comcast.net> | 8 | * Changes by Tyler Trafford <tatrafford@comcast.net> |
| @@ -445,7 +445,7 @@ static void cx25840_initialize(struct i2c_client *client) | |||
| 445 | cx25840_write(client, 0x918, 0xa0); | 445 | cx25840_write(client, 0x918, 0xa0); |
| 446 | cx25840_write(client, 0x919, 0x01); | 446 | cx25840_write(client, 0x919, 0x01); |
| 447 | 447 | ||
| 448 | /* stereo prefered */ | 448 | /* stereo preferred */ |
| 449 | cx25840_write(client, 0x809, 0x04); | 449 | cx25840_write(client, 0x809, 0x04); |
| 450 | /* AC97 shift */ | 450 | /* AC97 shift */ |
| 451 | cx25840_write(client, 0x8cf, 0x0f); | 451 | cx25840_write(client, 0x8cf, 0x0f); |
| @@ -546,7 +546,7 @@ static void cx23885_initialize(struct i2c_client *client) | |||
| 546 | * Aux PLL | 546 | * Aux PLL |
| 547 | * Initial setup for audio sample clock: | 547 | * Initial setup for audio sample clock: |
| 548 | * 48 ksps, 16 bits/sample, x160 multiplier = 122.88 MHz | 548 | * 48 ksps, 16 bits/sample, x160 multiplier = 122.88 MHz |
| 549 | * Intial I2S output/master clock(?): | 549 | * Initial I2S output/master clock(?): |
| 550 | * 48 ksps, 16 bits/sample, x16 multiplier = 12.288 MHz | 550 | * 48 ksps, 16 bits/sample, x16 multiplier = 12.288 MHz |
| 551 | */ | 551 | */ |
| 552 | switch (state->id) { | 552 | switch (state->id) { |
| @@ -903,7 +903,7 @@ static void input_change(struct i2c_client *client) | |||
| 903 | } else if (std & V4L2_STD_PAL) { | 903 | } else if (std & V4L2_STD_PAL) { |
| 904 | /* Autodetect audio standard and audio system */ | 904 | /* Autodetect audio standard and audio system */ |
| 905 | cx25840_write(client, 0x808, 0xff); | 905 | cx25840_write(client, 0x808, 0xff); |
| 906 | /* Since system PAL-L is pretty much non-existant and | 906 | /* Since system PAL-L is pretty much non-existent and |
| 907 | not used by any public broadcast network, force | 907 | not used by any public broadcast network, force |
| 908 | 6.5 MHz carrier to be interpreted as System DK, | 908 | 6.5 MHz carrier to be interpreted as System DK, |
| 909 | this avoids DK audio detection instability */ | 909 | this avoids DK audio detection instability */ |
| @@ -1851,7 +1851,7 @@ static u32 get_cx2388x_ident(struct i2c_client *client) | |||
| 1851 | ret = V4L2_IDENT_CX23885_AV; | 1851 | ret = V4L2_IDENT_CX23885_AV; |
| 1852 | } else { | 1852 | } else { |
| 1853 | /* CX23887 has a broken DIF, but the registers | 1853 | /* CX23887 has a broken DIF, but the registers |
| 1854 | * appear valid (but unsed), good enough to detect. */ | 1854 | * appear valid (but unused), good enough to detect. */ |
| 1855 | ret = V4L2_IDENT_CX23887_AV; | 1855 | ret = V4L2_IDENT_CX23887_AV; |
| 1856 | } | 1856 | } |
| 1857 | } else if (cx25840_read4(client, 0x300) & 0x0fffffff) { | 1857 | } else if (cx25840_read4(client, 0x300) & 0x0fffffff) { |
diff --git a/drivers/media/video/davinci/dm644x_ccdc.c b/drivers/media/video/davinci/dm644x_ccdc.c index 490aafb34e2f..c8b32c1c7386 100644 --- a/drivers/media/video/davinci/dm644x_ccdc.c +++ b/drivers/media/video/davinci/dm644x_ccdc.c | |||
| @@ -258,7 +258,7 @@ static int ccdc_update_raw_params(struct ccdc_config_params_raw *raw_params) | |||
| 258 | /* | 258 | /* |
| 259 | * Allocate memory for FPC table if current | 259 | * Allocate memory for FPC table if current |
| 260 | * FPC table buffer is not big enough to | 260 | * FPC table buffer is not big enough to |
| 261 | * accomodate FPC Number requested | 261 | * accommodate FPC Number requested |
| 262 | */ | 262 | */ |
| 263 | if (raw_params->fault_pxl.fp_num != config_params->fault_pxl.fp_num) { | 263 | if (raw_params->fault_pxl.fp_num != config_params->fault_pxl.fp_num) { |
| 264 | if (fpc_physaddr != NULL) { | 264 | if (fpc_physaddr != NULL) { |
| @@ -436,7 +436,7 @@ void ccdc_config_ycbcr(void) | |||
| 436 | 436 | ||
| 437 | /* | 437 | /* |
| 438 | * configure the horizontal line offset. This should be a | 438 | * configure the horizontal line offset. This should be a |
| 439 | * on 32 byte bondary. So clear LSB 5 bits | 439 | * on 32 byte boundary. So clear LSB 5 bits |
| 440 | */ | 440 | */ |
| 441 | regw(((params->win.width * 2 + 31) & ~0x1f), CCDC_HSIZE_OFF); | 441 | regw(((params->win.width * 2 + 31) & ~0x1f), CCDC_HSIZE_OFF); |
| 442 | 442 | ||
diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c index 71e961e53a56..5b38fc93ff28 100644 --- a/drivers/media/video/davinci/vpfe_capture.c +++ b/drivers/media/video/davinci/vpfe_capture.c | |||
| @@ -1691,7 +1691,7 @@ static int vpfe_s_crop(struct file *file, void *priv, | |||
| 1691 | goto unlock_out; | 1691 | goto unlock_out; |
| 1692 | } | 1692 | } |
| 1693 | 1693 | ||
| 1694 | /* adjust the width to 16 pixel boundry */ | 1694 | /* adjust the width to 16 pixel boundary */ |
| 1695 | crop->c.width = ((crop->c.width + 15) & ~0xf); | 1695 | crop->c.width = ((crop->c.width + 15) & ~0xf); |
| 1696 | 1696 | ||
| 1697 | /* make sure parameters are valid */ | 1697 | /* make sure parameters are valid */ |
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index a83131bd00b2..7b6461d2d1ff 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c | |||
| @@ -377,7 +377,7 @@ static inline void get_next_buf(struct em28xx_dmaqueue *dma_q, | |||
| 377 | /* Get the next buffer */ | 377 | /* Get the next buffer */ |
| 378 | *buf = list_entry(dma_q->active.next, struct em28xx_buffer, vb.queue); | 378 | *buf = list_entry(dma_q->active.next, struct em28xx_buffer, vb.queue); |
| 379 | 379 | ||
| 380 | /* Cleans up buffer - Usefull for testing for frame/URB loss */ | 380 | /* Cleans up buffer - Useful for testing for frame/URB loss */ |
| 381 | outp = videobuf_to_vmalloc(&(*buf)->vb); | 381 | outp = videobuf_to_vmalloc(&(*buf)->vb); |
| 382 | memset(outp, 0, (*buf)->vb.size); | 382 | memset(outp, 0, (*buf)->vb.size); |
| 383 | 383 | ||
| @@ -404,7 +404,7 @@ static inline void vbi_get_next_buf(struct em28xx_dmaqueue *dma_q, | |||
| 404 | 404 | ||
| 405 | /* Get the next buffer */ | 405 | /* Get the next buffer */ |
| 406 | *buf = list_entry(dma_q->active.next, struct em28xx_buffer, vb.queue); | 406 | *buf = list_entry(dma_q->active.next, struct em28xx_buffer, vb.queue); |
| 407 | /* Cleans up buffer - Usefull for testing for frame/URB loss */ | 407 | /* Cleans up buffer - Useful for testing for frame/URB loss */ |
| 408 | outp = videobuf_to_vmalloc(&(*buf)->vb); | 408 | outp = videobuf_to_vmalloc(&(*buf)->vb); |
| 409 | memset(outp, 0x00, (*buf)->vb.size); | 409 | memset(outp, 0x00, (*buf)->vb.size); |
| 410 | 410 | ||
diff --git a/drivers/media/video/gspca/gl860/gl860-mi1320.c b/drivers/media/video/gspca/gl860/gl860-mi1320.c index c276a7debdec..b57160e04866 100644 --- a/drivers/media/video/gspca/gl860/gl860-mi1320.c +++ b/drivers/media/video/gspca/gl860/gl860-mi1320.c | |||
| @@ -201,7 +201,7 @@ void mi1320_init_settings(struct gspca_dev *gspca_dev) | |||
| 201 | sd->vmax.backlight = 2; | 201 | sd->vmax.backlight = 2; |
| 202 | sd->vmax.brightness = 8; | 202 | sd->vmax.brightness = 8; |
| 203 | sd->vmax.sharpness = 7; | 203 | sd->vmax.sharpness = 7; |
| 204 | sd->vmax.contrast = 0; /* 10 but not working with tihs driver */ | 204 | sd->vmax.contrast = 0; /* 10 but not working with this driver */ |
| 205 | sd->vmax.gamma = 40; | 205 | sd->vmax.gamma = 40; |
| 206 | sd->vmax.hue = 5 + 1; | 206 | sd->vmax.hue = 5 + 1; |
| 207 | sd->vmax.saturation = 8; | 207 | sd->vmax.saturation = 8; |
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 9c6a643caf01..e526aa3dedaf 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c | |||
| @@ -857,7 +857,7 @@ static int gspca_init_transfer(struct gspca_dev *gspca_dev) | |||
| 857 | } | 857 | } |
| 858 | 858 | ||
| 859 | /* the bandwidth is not wide enough | 859 | /* the bandwidth is not wide enough |
| 860 | * negociate or try a lower alternate setting */ | 860 | * negotiate or try a lower alternate setting */ |
| 861 | PDEBUG(D_ERR|D_STREAM, | 861 | PDEBUG(D_ERR|D_STREAM, |
| 862 | "bandwidth not wide enough - trying again"); | 862 | "bandwidth not wide enough - trying again"); |
| 863 | msleep(20); /* wait for kill complete */ | 863 | msleep(20); /* wait for kill complete */ |
| @@ -2346,7 +2346,7 @@ void gspca_disconnect(struct usb_interface *intf) | |||
| 2346 | usb_set_intfdata(intf, NULL); | 2346 | usb_set_intfdata(intf, NULL); |
| 2347 | 2347 | ||
| 2348 | /* release the device */ | 2348 | /* release the device */ |
| 2349 | /* (this will call gspca_release() immediatly or on last close) */ | 2349 | /* (this will call gspca_release() immediately or on last close) */ |
| 2350 | video_unregister_device(&gspca_dev->vdev); | 2350 | video_unregister_device(&gspca_dev->vdev); |
| 2351 | 2351 | ||
| 2352 | /* PDEBUG(D_PROBE, "disconnect complete"); */ | 2352 | /* PDEBUG(D_PROBE, "disconnect complete"); */ |
diff --git a/drivers/media/video/gspca/mars.c b/drivers/media/video/gspca/mars.c index cb4d0bf0d784..0196209a948a 100644 --- a/drivers/media/video/gspca/mars.c +++ b/drivers/media/video/gspca/mars.c | |||
| @@ -361,7 +361,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
| 361 | mi_w(gspca_dev, i + 1, mi_data[i]); | 361 | mi_w(gspca_dev, i + 1, mi_data[i]); |
| 362 | 362 | ||
| 363 | data[0] = 0x00; | 363 | data[0] = 0x00; |
| 364 | data[1] = 0x4d; /* ISOC transfering enable... */ | 364 | data[1] = 0x4d; /* ISOC transferring enable... */ |
| 365 | reg_w(gspca_dev, 2); | 365 | reg_w(gspca_dev, 2); |
| 366 | 366 | ||
| 367 | gspca_dev->ctrl_inac = 0; /* activate the illuminator controls */ | 367 | gspca_dev->ctrl_inac = 0; /* activate the illuminator controls */ |
diff --git a/drivers/media/video/gspca/mr97310a.c b/drivers/media/video/gspca/mr97310a.c index 3884c9d300c5..97e507967434 100644 --- a/drivers/media/video/gspca/mr97310a.c +++ b/drivers/media/video/gspca/mr97310a.c | |||
| @@ -469,7 +469,7 @@ static void lcd_stop(struct gspca_dev *gspca_dev) | |||
| 469 | static int isoc_enable(struct gspca_dev *gspca_dev) | 469 | static int isoc_enable(struct gspca_dev *gspca_dev) |
| 470 | { | 470 | { |
| 471 | gspca_dev->usb_buf[0] = 0x00; | 471 | gspca_dev->usb_buf[0] = 0x00; |
| 472 | gspca_dev->usb_buf[1] = 0x4d; /* ISOC transfering enable... */ | 472 | gspca_dev->usb_buf[1] = 0x4d; /* ISOC transferring enable... */ |
| 473 | return mr_write(gspca_dev, 2); | 473 | return mr_write(gspca_dev, 2); |
| 474 | } | 474 | } |
| 475 | 475 | ||
diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c index fd1b6082c96d..36a46fc78734 100644 --- a/drivers/media/video/gspca/ov519.c +++ b/drivers/media/video/gspca/ov519.c | |||
| @@ -381,7 +381,7 @@ static const struct v4l2_pix_format ov519_sif_mode[] = { | |||
| 381 | larger then necessary, however they need to be this big as the ov511 / | 381 | larger then necessary, however they need to be this big as the ov511 / |
| 382 | ov518 always fills the entire isoc frame, using 0 padding bytes when | 382 | ov518 always fills the entire isoc frame, using 0 padding bytes when |
| 383 | it doesn't have any data. So with low framerates the amount of data | 383 | it doesn't have any data. So with low framerates the amount of data |
| 384 | transfered can become quite large (libv4l will remove all the 0 padding | 384 | transferred can become quite large (libv4l will remove all the 0 padding |
| 385 | in userspace). */ | 385 | in userspace). */ |
| 386 | static const struct v4l2_pix_format ov518_vga_mode[] = { | 386 | static const struct v4l2_pix_format ov518_vga_mode[] = { |
| 387 | {320, 240, V4L2_PIX_FMT_OV518, V4L2_FIELD_NONE, | 387 | {320, 240, V4L2_PIX_FMT_OV518, V4L2_FIELD_NONE, |
| @@ -4368,7 +4368,7 @@ static void ov511_pkt_scan(struct gspca_dev *gspca_dev, | |||
| 4368 | gspca_dev->last_packet_type = DISCARD_PACKET; | 4368 | gspca_dev->last_packet_type = DISCARD_PACKET; |
| 4369 | return; | 4369 | return; |
| 4370 | } | 4370 | } |
| 4371 | /* Add 11 byte footer to frame, might be usefull */ | 4371 | /* Add 11 byte footer to frame, might be useful */ |
| 4372 | gspca_frame_add(gspca_dev, LAST_PACKET, in, 11); | 4372 | gspca_frame_add(gspca_dev, LAST_PACKET, in, 11); |
| 4373 | return; | 4373 | return; |
| 4374 | } else { | 4374 | } else { |
diff --git a/drivers/media/video/gspca/sonixb.c b/drivers/media/video/gspca/sonixb.c index 5a08738fba30..146b459b08d5 100644 --- a/drivers/media/video/gspca/sonixb.c +++ b/drivers/media/video/gspca/sonixb.c | |||
| @@ -827,7 +827,7 @@ static void setexposure(struct gspca_dev *gspca_dev) | |||
| 827 | possible to use less exposure then what the fps maximum | 827 | possible to use less exposure then what the fps maximum |
| 828 | allows by setting register 10. register 10 configures the | 828 | allows by setting register 10. register 10 configures the |
| 829 | actual exposure as quotient of the full exposure, with 0 | 829 | actual exposure as quotient of the full exposure, with 0 |
| 830 | being no exposure at all (not very usefull) and reg10_max | 830 | being no exposure at all (not very useful) and reg10_max |
| 831 | being max exposure possible at that framerate. | 831 | being max exposure possible at that framerate. |
| 832 | 832 | ||
| 833 | The code maps our 0 - 510 ms exposure ctrl to these 2 | 833 | The code maps our 0 - 510 ms exposure ctrl to these 2 |
diff --git a/drivers/media/video/gspca/spca500.c b/drivers/media/video/gspca/spca500.c index 45552c3ff8d9..3e76951e3c19 100644 --- a/drivers/media/video/gspca/spca500.c +++ b/drivers/media/video/gspca/spca500.c | |||
| @@ -607,7 +607,7 @@ static void spca500_reinit(struct gspca_dev *gspca_dev) | |||
| 607 | reg_w(gspca_dev, 0x00, 0x8880, 2); | 607 | reg_w(gspca_dev, 0x00, 0x8880, 2); |
| 608 | /* family cam Quicksmart stuff */ | 608 | /* family cam Quicksmart stuff */ |
| 609 | reg_w(gspca_dev, 0x00, 0x800a, 0x00); | 609 | reg_w(gspca_dev, 0x00, 0x800a, 0x00); |
| 610 | /* Set agc transfer: synced inbetween frames */ | 610 | /* Set agc transfer: synced between frames */ |
| 611 | reg_w(gspca_dev, 0x00, 0x820f, 0x01); | 611 | reg_w(gspca_dev, 0x00, 0x820f, 0x01); |
| 612 | /* Init SDRAM - needed for SDRAM access */ | 612 | /* Init SDRAM - needed for SDRAM access */ |
| 613 | reg_w(gspca_dev, 0x00, 0x870a, 0x04); | 613 | reg_w(gspca_dev, 0x00, 0x870a, 0x04); |
| @@ -831,7 +831,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
| 831 | 831 | ||
| 832 | /* familycam Quicksmart pocketDV stuff */ | 832 | /* familycam Quicksmart pocketDV stuff */ |
| 833 | reg_w(gspca_dev, 0x00, 0x800a, 0x00); | 833 | reg_w(gspca_dev, 0x00, 0x800a, 0x00); |
| 834 | /* Set agc transfer: synced inbetween frames */ | 834 | /* Set agc transfer: synced between frames */ |
| 835 | reg_w(gspca_dev, 0x00, 0x820f, 0x01); | 835 | reg_w(gspca_dev, 0x00, 0x820f, 0x01); |
| 836 | /* Init SDRAM - needed for SDRAM access */ | 836 | /* Init SDRAM - needed for SDRAM access */ |
| 837 | reg_w(gspca_dev, 0x00, 0x870a, 0x04); | 837 | reg_w(gspca_dev, 0x00, 0x870a, 0x04); |
diff --git a/drivers/media/video/gspca/spca508.c b/drivers/media/video/gspca/spca508.c index 348319371523..41dce49fb43d 100644 --- a/drivers/media/video/gspca/spca508.c +++ b/drivers/media/video/gspca/spca508.c | |||
| @@ -592,7 +592,7 @@ static const u16 spca508_sightcam_init_data[][2] = { | |||
| 592 | /* This line seems to setup the frame/canvas */ | 592 | /* This line seems to setup the frame/canvas */ |
| 593 | {0x000f, 0x8402}, | 593 | {0x000f, 0x8402}, |
| 594 | 594 | ||
| 595 | /* Theese 6 lines are needed to startup the webcam */ | 595 | /* These 6 lines are needed to startup the webcam */ |
| 596 | {0x0090, 0x8110}, | 596 | {0x0090, 0x8110}, |
| 597 | {0x0001, 0x8114}, | 597 | {0x0001, 0x8114}, |
| 598 | {0x0001, 0x8114}, | 598 | {0x0001, 0x8114}, |
diff --git a/drivers/media/video/gspca/sq905.c b/drivers/media/video/gspca/sq905.c index 2e9c06175192..5ba96aff2252 100644 --- a/drivers/media/video/gspca/sq905.c +++ b/drivers/media/video/gspca/sq905.c | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | * History and Acknowledgments | 22 | * History and Acknowledgments |
| 23 | * | 23 | * |
| 24 | * The original Linux driver for SQ905 based cameras was written by | 24 | * The original Linux driver for SQ905 based cameras was written by |
| 25 | * Marcell Lengyel and furter developed by many other contributers | 25 | * Marcell Lengyel and furter developed by many other contributors |
| 26 | * and is available from http://sourceforge.net/projects/sqcam/ | 26 | * and is available from http://sourceforge.net/projects/sqcam/ |
| 27 | * | 27 | * |
| 28 | * This driver takes advantage of the reverse engineering work done for | 28 | * This driver takes advantage of the reverse engineering work done for |
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c b/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c index 17531b41a073..b8156855f2b7 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c | |||
| @@ -569,7 +569,7 @@ static int hdcs_init(struct sd *sd) | |||
| 569 | if (err < 0) | 569 | if (err < 0) |
| 570 | return err; | 570 | return err; |
| 571 | 571 | ||
| 572 | /* Enable continous frame capture, bit 2: stop when frame complete */ | 572 | /* Enable continuous frame capture, bit 2: stop when frame complete */ |
| 573 | err = stv06xx_write_sensor(sd, HDCS_REG_CONFIG(sd), BIT(3)); | 573 | err = stv06xx_write_sensor(sd, HDCS_REG_CONFIG(sd), BIT(3)); |
| 574 | if (err < 0) | 574 | if (err < 0) |
| 575 | return err; | 575 | return err; |
diff --git a/drivers/media/video/hexium_gemini.c b/drivers/media/video/hexium_gemini.c index cdf8b191f710..cbc505a2fc29 100644 --- a/drivers/media/video/hexium_gemini.c +++ b/drivers/media/video/hexium_gemini.c | |||
| @@ -261,7 +261,7 @@ static int vidioc_s_input(struct file *file, void *fh, unsigned int input) | |||
| 261 | 261 | ||
| 262 | /* the saa7146 provides some controls (brightness, contrast, saturation) | 262 | /* the saa7146 provides some controls (brightness, contrast, saturation) |
| 263 | which gets registered *after* this function. because of this we have | 263 | which gets registered *after* this function. because of this we have |
| 264 | to return with a value != 0 even if the function succeded.. */ | 264 | to return with a value != 0 even if the function succeeded.. */ |
| 265 | static int vidioc_queryctrl(struct file *file, void *fh, struct v4l2_queryctrl *qc) | 265 | static int vidioc_queryctrl(struct file *file, void *fh, struct v4l2_queryctrl *qc) |
| 266 | { | 266 | { |
| 267 | struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev; | 267 | struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev; |
diff --git a/drivers/media/video/ivtv/ivtv-firmware.c b/drivers/media/video/ivtv/ivtv-firmware.c index 4df01947a7df..14a1cea1d70d 100644 --- a/drivers/media/video/ivtv/ivtv-firmware.c +++ b/drivers/media/video/ivtv/ivtv-firmware.c | |||
| @@ -179,7 +179,7 @@ static volatile struct ivtv_mailbox __iomem *ivtv_search_mailbox(const volatile | |||
| 179 | { | 179 | { |
| 180 | int i; | 180 | int i; |
| 181 | 181 | ||
| 182 | /* mailbox is preceeded by a 16 byte 'magic cookie' starting at a 256-byte | 182 | /* mailbox is preceded by a 16 byte 'magic cookie' starting at a 256-byte |
| 183 | address boundary */ | 183 | address boundary */ |
| 184 | for (i = 0; i < size; i += 0x100) { | 184 | for (i = 0; i < size; i += 0x100) { |
| 185 | if (readl(mem + i) == 0x12345678 && | 185 | if (readl(mem + i) == 0x12345678 && |
| @@ -377,7 +377,7 @@ int ivtv_firmware_check(struct ivtv *itv, char *where) | |||
| 377 | "Reloading\n", where); | 377 | "Reloading\n", where); |
| 378 | res = ivtv_firmware_restart(itv); | 378 | res = ivtv_firmware_restart(itv); |
| 379 | /* | 379 | /* |
| 380 | * Even if restarted ok, still signal a problem had occured. | 380 | * Even if restarted ok, still signal a problem had occurred. |
| 381 | * The caller can come through this function again to check | 381 | * The caller can come through this function again to check |
| 382 | * if things are really ok after the restart. | 382 | * if things are really ok after the restart. |
| 383 | */ | 383 | */ |
diff --git a/drivers/media/video/ivtv/ivtvfb.c b/drivers/media/video/ivtv/ivtvfb.c index f0316d02f09f..17247451c693 100644 --- a/drivers/media/video/ivtv/ivtvfb.c +++ b/drivers/media/video/ivtv/ivtvfb.c | |||
| @@ -1080,7 +1080,7 @@ static int ivtvfb_init_vidmode(struct ivtv *itv) | |||
| 1080 | kmalloc(sizeof(u32) * 16, GFP_KERNEL|__GFP_NOWARN); | 1080 | kmalloc(sizeof(u32) * 16, GFP_KERNEL|__GFP_NOWARN); |
| 1081 | 1081 | ||
| 1082 | if (!oi->ivtvfb_info.pseudo_palette) { | 1082 | if (!oi->ivtvfb_info.pseudo_palette) { |
| 1083 | IVTVFB_ERR("abort, unable to alloc pseudo pallete\n"); | 1083 | IVTVFB_ERR("abort, unable to alloc pseudo palette\n"); |
| 1084 | return -ENOMEM; | 1084 | return -ENOMEM; |
| 1085 | } | 1085 | } |
| 1086 | 1086 | ||
diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c index b1763ac93ab3..8126622fb4f5 100644 --- a/drivers/media/video/msp3400-driver.c +++ b/drivers/media/video/msp3400-driver.c | |||
| @@ -69,7 +69,7 @@ MODULE_LICENSE("GPL"); | |||
| 69 | /* module parameters */ | 69 | /* module parameters */ |
| 70 | static int opmode = OPMODE_AUTO; | 70 | static int opmode = OPMODE_AUTO; |
| 71 | int msp_debug; /* msp_debug output */ | 71 | int msp_debug; /* msp_debug output */ |
| 72 | int msp_once; /* no continous stereo monitoring */ | 72 | int msp_once; /* no continuous stereo monitoring */ |
| 73 | int msp_amsound; /* hard-wire AM sound at 6.5 Hz (france), | 73 | int msp_amsound; /* hard-wire AM sound at 6.5 Hz (france), |
| 74 | the autoscan seems work well only with FM... */ | 74 | the autoscan seems work well only with FM... */ |
| 75 | int msp_standard = 1; /* Override auto detect of audio msp_standard, | 75 | int msp_standard = 1; /* Override auto detect of audio msp_standard, |
| @@ -551,7 +551,7 @@ static int msp_log_status(struct v4l2_subdev *sd) | |||
| 551 | switch (state->mode) { | 551 | switch (state->mode) { |
| 552 | case MSP_MODE_AM_DETECT: p = "AM (for carrier detect)"; break; | 552 | case MSP_MODE_AM_DETECT: p = "AM (for carrier detect)"; break; |
| 553 | case MSP_MODE_FM_RADIO: p = "FM Radio"; break; | 553 | case MSP_MODE_FM_RADIO: p = "FM Radio"; break; |
| 554 | case MSP_MODE_FM_TERRA: p = "Terrestial FM-mono/stereo"; break; | 554 | case MSP_MODE_FM_TERRA: p = "Terrestrial FM-mono/stereo"; break; |
| 555 | case MSP_MODE_FM_SAT: p = "Satellite FM-mono"; break; | 555 | case MSP_MODE_FM_SAT: p = "Satellite FM-mono"; break; |
| 556 | case MSP_MODE_FM_NICAM1: p = "NICAM/FM (B/G, D/K)"; break; | 556 | case MSP_MODE_FM_NICAM1: p = "NICAM/FM (B/G, D/K)"; break; |
| 557 | case MSP_MODE_FM_NICAM2: p = "NICAM/FM (I)"; break; | 557 | case MSP_MODE_FM_NICAM2: p = "NICAM/FM (I)"; break; |
diff --git a/drivers/media/video/msp3400-kthreads.c b/drivers/media/video/msp3400-kthreads.c index b376fcdee652..80387e2c3eca 100644 --- a/drivers/media/video/msp3400-kthreads.c +++ b/drivers/media/video/msp3400-kthreads.c | |||
| @@ -87,7 +87,7 @@ static struct msp3400c_init_data_dem { | |||
| 87 | {-8, -8, 4, 6, 78, 107}, | 87 | {-8, -8, 4, 6, 78, 107}, |
| 88 | MSP_CARRIER(10.7), MSP_CARRIER(10.7), | 88 | MSP_CARRIER(10.7), MSP_CARRIER(10.7), |
| 89 | 0x00d0, 0x0480, 0x0020, 0x3000 | 89 | 0x00d0, 0x0480, 0x0020, 0x3000 |
| 90 | }, { /* Terrestial FM-mono + FM-stereo */ | 90 | }, { /* Terrestrial FM-mono + FM-stereo */ |
| 91 | {3, 18, 27, 48, 66, 72}, | 91 | {3, 18, 27, 48, 66, 72}, |
| 92 | {3, 18, 27, 48, 66, 72}, | 92 | {3, 18, 27, 48, 66, 72}, |
| 93 | MSP_CARRIER(5.5), MSP_CARRIER(5.5), | 93 | MSP_CARRIER(5.5), MSP_CARRIER(5.5), |
diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c index 029a4babfd61..d4fe7bc92a1d 100644 --- a/drivers/media/video/omap/omap_vout.c +++ b/drivers/media/video/omap/omap_vout.c | |||
| @@ -473,7 +473,7 @@ static int omap_vout_vrfb_buffer_setup(struct omap_vout_device *vout, | |||
| 473 | /* | 473 | /* |
| 474 | * Convert V4L2 rotation to DSS rotation | 474 | * Convert V4L2 rotation to DSS rotation |
| 475 | * V4L2 understand 0, 90, 180, 270. | 475 | * V4L2 understand 0, 90, 180, 270. |
| 476 | * Convert to 0, 1, 2 and 3 repsectively for DSS | 476 | * Convert to 0, 1, 2 and 3 respectively for DSS |
| 477 | */ | 477 | */ |
| 478 | static int v4l2_rot_to_dss_rot(int v4l2_rotation, | 478 | static int v4l2_rot_to_dss_rot(int v4l2_rotation, |
| 479 | enum dss_rotation *rotation, bool mirror) | 479 | enum dss_rotation *rotation, bool mirror) |
| @@ -1142,7 +1142,7 @@ static int omap_vout_buffer_prepare(struct videobuf_queue *q, | |||
| 1142 | } | 1142 | } |
| 1143 | 1143 | ||
| 1144 | /* | 1144 | /* |
| 1145 | * Buffer queue funtion will be called from the videobuf layer when _QBUF | 1145 | * Buffer queue function will be called from the videobuf layer when _QBUF |
| 1146 | * ioctl is called. It is used to enqueue buffer, which is ready to be | 1146 | * ioctl is called. It is used to enqueue buffer, which is ready to be |
| 1147 | * displayed. | 1147 | * displayed. |
| 1148 | */ | 1148 | */ |
diff --git a/drivers/media/video/omap/omap_voutlib.c b/drivers/media/video/omap/omap_voutlib.c index b941c761eef9..2aa6a76c5e59 100644 --- a/drivers/media/video/omap/omap_voutlib.c +++ b/drivers/media/video/omap/omap_voutlib.c | |||
| @@ -53,7 +53,7 @@ EXPORT_SYMBOL_GPL(omap_vout_default_crop); | |||
| 53 | /* Given a new render window in new_win, adjust the window to the | 53 | /* Given a new render window in new_win, adjust the window to the |
| 54 | * nearest supported configuration. The adjusted window parameters are | 54 | * nearest supported configuration. The adjusted window parameters are |
| 55 | * returned in new_win. | 55 | * returned in new_win. |
| 56 | * Returns zero if succesful, or -EINVAL if the requested window is | 56 | * Returns zero if successful, or -EINVAL if the requested window is |
| 57 | * impossible and cannot reasonably be adjusted. | 57 | * impossible and cannot reasonably be adjusted. |
| 58 | */ | 58 | */ |
| 59 | int omap_vout_try_window(struct v4l2_framebuffer *fbuf, | 59 | int omap_vout_try_window(struct v4l2_framebuffer *fbuf, |
| @@ -101,7 +101,7 @@ EXPORT_SYMBOL_GPL(omap_vout_try_window); | |||
| 101 | * will also be adjusted if necessary. Preference is given to keeping the | 101 | * will also be adjusted if necessary. Preference is given to keeping the |
| 102 | * the window as close to the requested configuration as possible. If | 102 | * the window as close to the requested configuration as possible. If |
| 103 | * successful, new_win, vout->win, and crop are updated. | 103 | * successful, new_win, vout->win, and crop are updated. |
| 104 | * Returns zero if succesful, or -EINVAL if the requested preview window is | 104 | * Returns zero if successful, or -EINVAL if the requested preview window is |
| 105 | * impossible and cannot reasonably be adjusted. | 105 | * impossible and cannot reasonably be adjusted. |
| 106 | */ | 106 | */ |
| 107 | int omap_vout_new_window(struct v4l2_rect *crop, | 107 | int omap_vout_new_window(struct v4l2_rect *crop, |
| @@ -155,7 +155,7 @@ EXPORT_SYMBOL_GPL(omap_vout_new_window); | |||
| 155 | * window would fall outside the display boundaries, the cropping rectangle | 155 | * window would fall outside the display boundaries, the cropping rectangle |
| 156 | * will also be adjusted to maintain the rescaling ratios. If successful, crop | 156 | * will also be adjusted to maintain the rescaling ratios. If successful, crop |
| 157 | * and win are updated. | 157 | * and win are updated. |
| 158 | * Returns zero if succesful, or -EINVAL if the requested cropping rectangle is | 158 | * Returns zero if successful, or -EINVAL if the requested cropping rectangle is |
| 159 | * impossible and cannot reasonably be adjusted. | 159 | * impossible and cannot reasonably be adjusted. |
| 160 | */ | 160 | */ |
| 161 | int omap_vout_new_crop(struct v4l2_pix_format *pix, | 161 | int omap_vout_new_crop(struct v4l2_pix_format *pix, |
diff --git a/drivers/media/video/omap1_camera.c b/drivers/media/video/omap1_camera.c index eab31cbd68eb..5954b9306630 100644 --- a/drivers/media/video/omap1_camera.c +++ b/drivers/media/video/omap1_camera.c | |||
| @@ -687,7 +687,7 @@ static void videobuf_done(struct omap1_cam_dev *pcdev, | |||
| 687 | * In CONTIG mode, the current buffer parameters had already | 687 | * In CONTIG mode, the current buffer parameters had already |
| 688 | * been entered into the DMA programming register set while the | 688 | * been entered into the DMA programming register set while the |
| 689 | * buffer was fetched with prepare_next_vb(), they may have also | 689 | * buffer was fetched with prepare_next_vb(), they may have also |
| 690 | * been transfered into the runtime set and already active if | 690 | * been transferred into the runtime set and already active if |
| 691 | * the DMA still running. | 691 | * the DMA still running. |
| 692 | */ | 692 | */ |
| 693 | } else { | 693 | } else { |
| @@ -835,7 +835,7 @@ static irqreturn_t cam_isr(int irq, void *data) | |||
| 835 | /* | 835 | /* |
| 836 | * If exactly 2 sgbufs from the next sglist have | 836 | * If exactly 2 sgbufs from the next sglist have |
| 837 | * been programmed into the DMA engine (the | 837 | * been programmed into the DMA engine (the |
| 838 | * frist one already transfered into the DMA | 838 | * first one already transferred into the DMA |
| 839 | * runtime register set, the second one still | 839 | * runtime register set, the second one still |
| 840 | * in the programming set), then we are in sync. | 840 | * in the programming set), then we are in sync. |
| 841 | */ | 841 | */ |
diff --git a/drivers/media/video/omap3isp/isp.c b/drivers/media/video/omap3isp/isp.c index 1a9963bd6d40..503bd7922bd6 100644 --- a/drivers/media/video/omap3isp/isp.c +++ b/drivers/media/video/omap3isp/isp.c | |||
| @@ -715,7 +715,7 @@ static int isp_pipeline_link_notify(struct media_pad *source, | |||
| 715 | * Walk the entities chain starting at the pipeline output video node and start | 715 | * Walk the entities chain starting at the pipeline output video node and start |
| 716 | * all modules in the chain in the given mode. | 716 | * all modules in the chain in the given mode. |
| 717 | * | 717 | * |
| 718 | * Return 0 if successfull, or the return value of the failed video::s_stream | 718 | * Return 0 if successful, or the return value of the failed video::s_stream |
| 719 | * operation otherwise. | 719 | * operation otherwise. |
| 720 | */ | 720 | */ |
| 721 | static int isp_pipeline_enable(struct isp_pipeline *pipe, | 721 | static int isp_pipeline_enable(struct isp_pipeline *pipe, |
| @@ -883,7 +883,7 @@ static int isp_pipeline_disable(struct isp_pipeline *pipe) | |||
| 883 | * Set the pipeline to the given stream state. Pipelines can be started in | 883 | * Set the pipeline to the given stream state. Pipelines can be started in |
| 884 | * single-shot or continuous mode. | 884 | * single-shot or continuous mode. |
| 885 | * | 885 | * |
| 886 | * Return 0 if successfull, or the return value of the failed video::s_stream | 886 | * Return 0 if successful, or the return value of the failed video::s_stream |
| 887 | * operation otherwise. | 887 | * operation otherwise. |
| 888 | */ | 888 | */ |
| 889 | int omap3isp_pipeline_set_stream(struct isp_pipeline *pipe, | 889 | int omap3isp_pipeline_set_stream(struct isp_pipeline *pipe, |
| @@ -1283,7 +1283,7 @@ static void __isp_subclk_update(struct isp_device *isp) | |||
| 1283 | clk |= ISPCTRL_RSZ_CLK_EN; | 1283 | clk |= ISPCTRL_RSZ_CLK_EN; |
| 1284 | 1284 | ||
| 1285 | /* NOTE: For CCDC & Preview submodules, we need to affect internal | 1285 | /* NOTE: For CCDC & Preview submodules, we need to affect internal |
| 1286 | * RAM aswell. | 1286 | * RAM as well. |
| 1287 | */ | 1287 | */ |
| 1288 | if (isp->subclk_resources & OMAP3_ISP_SUBCLK_CCDC) | 1288 | if (isp->subclk_resources & OMAP3_ISP_SUBCLK_CCDC) |
| 1289 | clk |= ISPCTRL_CCDC_CLK_EN | ISPCTRL_CCDC_RAM_EN; | 1289 | clk |= ISPCTRL_CCDC_CLK_EN | ISPCTRL_CCDC_RAM_EN; |
| @@ -1431,7 +1431,7 @@ static int isp_get_clocks(struct isp_device *isp) | |||
| 1431 | * Increment the reference count on the ISP. If the first reference is taken, | 1431 | * Increment the reference count on the ISP. If the first reference is taken, |
| 1432 | * enable clocks and power-up all submodules. | 1432 | * enable clocks and power-up all submodules. |
| 1433 | * | 1433 | * |
| 1434 | * Return a pointer to the ISP device structure, or NULL if an error occured. | 1434 | * Return a pointer to the ISP device structure, or NULL if an error occurred. |
| 1435 | */ | 1435 | */ |
| 1436 | struct isp_device *omap3isp_get(struct isp_device *isp) | 1436 | struct isp_device *omap3isp_get(struct isp_device *isp) |
| 1437 | { | 1437 | { |
diff --git a/drivers/media/video/omap3isp/ispccdc.h b/drivers/media/video/omap3isp/ispccdc.h index d403af5d31d2..483a19cac1ad 100644 --- a/drivers/media/video/omap3isp/ispccdc.h +++ b/drivers/media/video/omap3isp/ispccdc.h | |||
| @@ -150,7 +150,7 @@ struct ispccdc_lsc { | |||
| 150 | * @input: Active input | 150 | * @input: Active input |
| 151 | * @output: Active outputs | 151 | * @output: Active outputs |
| 152 | * @video_out: Output video node | 152 | * @video_out: Output video node |
| 153 | * @error: A hardware error occured during capture | 153 | * @error: A hardware error occurred during capture |
| 154 | * @alaw: A-law compression enabled (1) or disabled (0) | 154 | * @alaw: A-law compression enabled (1) or disabled (0) |
| 155 | * @lpf: Low pass filter enabled (1) or disabled (0) | 155 | * @lpf: Low pass filter enabled (1) or disabled (0) |
| 156 | * @obclamp: Optical-black clamp enabled (1) or disabled (0) | 156 | * @obclamp: Optical-black clamp enabled (1) or disabled (0) |
| @@ -163,7 +163,7 @@ struct ispccdc_lsc { | |||
| 163 | * @shadow_update: Controls update in progress by userspace | 163 | * @shadow_update: Controls update in progress by userspace |
| 164 | * @syncif: Interface synchronization configuration | 164 | * @syncif: Interface synchronization configuration |
| 165 | * @vpcfg: Video port configuration | 165 | * @vpcfg: Video port configuration |
| 166 | * @underrun: A buffer underrun occured and a new buffer has been queued | 166 | * @underrun: A buffer underrun occurred and a new buffer has been queued |
| 167 | * @state: Streaming state | 167 | * @state: Streaming state |
| 168 | * @lock: Serializes shadow_update with interrupt handler | 168 | * @lock: Serializes shadow_update with interrupt handler |
| 169 | * @wait: Wait queue used to stop the module | 169 | * @wait: Wait queue used to stop the module |
diff --git a/drivers/media/video/omap3isp/ispccp2.c b/drivers/media/video/omap3isp/ispccp2.c index 0efef2e78d93..0e16cab8e089 100644 --- a/drivers/media/video/omap3isp/ispccp2.c +++ b/drivers/media/video/omap3isp/ispccp2.c | |||
| @@ -772,7 +772,7 @@ static int ccp2_enum_frame_size(struct v4l2_subdev *sd, | |||
| 772 | * @sd : pointer to v4l2 subdev structure | 772 | * @sd : pointer to v4l2 subdev structure |
| 773 | * @fh : V4L2 subdev file handle | 773 | * @fh : V4L2 subdev file handle |
| 774 | * @fmt : pointer to v4l2 subdev format structure | 774 | * @fmt : pointer to v4l2 subdev format structure |
| 775 | * return -EINVAL or zero on sucess | 775 | * return -EINVAL or zero on success |
| 776 | */ | 776 | */ |
| 777 | static int ccp2_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, | 777 | static int ccp2_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, |
| 778 | struct v4l2_subdev_format *fmt) | 778 | struct v4l2_subdev_format *fmt) |
diff --git a/drivers/media/video/omap3isp/ispcsi2.c b/drivers/media/video/omap3isp/ispcsi2.c index fb503f3db3be..69161a682b3d 100644 --- a/drivers/media/video/omap3isp/ispcsi2.c +++ b/drivers/media/video/omap3isp/ispcsi2.c | |||
| @@ -969,7 +969,7 @@ static int csi2_enum_frame_size(struct v4l2_subdev *sd, | |||
| 969 | * @sd : pointer to v4l2 subdev structure | 969 | * @sd : pointer to v4l2 subdev structure |
| 970 | * @fh : V4L2 subdev file handle | 970 | * @fh : V4L2 subdev file handle |
| 971 | * @fmt: pointer to v4l2 subdev format structure | 971 | * @fmt: pointer to v4l2 subdev format structure |
| 972 | * return -EINVAL or zero on sucess | 972 | * return -EINVAL or zero on success |
| 973 | */ | 973 | */ |
| 974 | static int csi2_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, | 974 | static int csi2_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, |
| 975 | struct v4l2_subdev_format *fmt) | 975 | struct v4l2_subdev_format *fmt) |
diff --git a/drivers/media/video/omap3isp/isppreview.c b/drivers/media/video/omap3isp/isppreview.c index baf9374201dc..2b16988a501d 100644 --- a/drivers/media/video/omap3isp/isppreview.c +++ b/drivers/media/video/omap3isp/isppreview.c | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | #include "ispreg.h" | 34 | #include "ispreg.h" |
| 35 | #include "isppreview.h" | 35 | #include "isppreview.h" |
| 36 | 36 | ||
| 37 | /* Default values in Office Flourescent Light for RGBtoRGB Blending */ | 37 | /* Default values in Office Fluorescent Light for RGBtoRGB Blending */ |
| 38 | static struct omap3isp_prev_rgbtorgb flr_rgb2rgb = { | 38 | static struct omap3isp_prev_rgbtorgb flr_rgb2rgb = { |
| 39 | { /* RGB-RGB Matrix */ | 39 | { /* RGB-RGB Matrix */ |
| 40 | {0x01E2, 0x0F30, 0x0FEE}, | 40 | {0x01E2, 0x0F30, 0x0FEE}, |
| @@ -44,7 +44,7 @@ static struct omap3isp_prev_rgbtorgb flr_rgb2rgb = { | |||
| 44 | {0x0000, 0x0000, 0x0000} | 44 | {0x0000, 0x0000, 0x0000} |
| 45 | }; | 45 | }; |
| 46 | 46 | ||
| 47 | /* Default values in Office Flourescent Light for RGB to YUV Conversion*/ | 47 | /* Default values in Office Fluorescent Light for RGB to YUV Conversion*/ |
| 48 | static struct omap3isp_prev_csc flr_prev_csc = { | 48 | static struct omap3isp_prev_csc flr_prev_csc = { |
| 49 | { /* CSC Coef Matrix */ | 49 | { /* CSC Coef Matrix */ |
| 50 | {66, 129, 25}, | 50 | {66, 129, 25}, |
| @@ -54,22 +54,22 @@ static struct omap3isp_prev_csc flr_prev_csc = { | |||
| 54 | {0x0, 0x0, 0x0} | 54 | {0x0, 0x0, 0x0} |
| 55 | }; | 55 | }; |
| 56 | 56 | ||
| 57 | /* Default values in Office Flourescent Light for CFA Gradient*/ | 57 | /* Default values in Office Fluorescent Light for CFA Gradient*/ |
| 58 | #define FLR_CFA_GRADTHRS_HORZ 0x28 | 58 | #define FLR_CFA_GRADTHRS_HORZ 0x28 |
| 59 | #define FLR_CFA_GRADTHRS_VERT 0x28 | 59 | #define FLR_CFA_GRADTHRS_VERT 0x28 |
| 60 | 60 | ||
| 61 | /* Default values in Office Flourescent Light for Chroma Suppression*/ | 61 | /* Default values in Office Fluorescent Light for Chroma Suppression*/ |
| 62 | #define FLR_CSUP_GAIN 0x0D | 62 | #define FLR_CSUP_GAIN 0x0D |
| 63 | #define FLR_CSUP_THRES 0xEB | 63 | #define FLR_CSUP_THRES 0xEB |
| 64 | 64 | ||
| 65 | /* Default values in Office Flourescent Light for Noise Filter*/ | 65 | /* Default values in Office Fluorescent Light for Noise Filter*/ |
| 66 | #define FLR_NF_STRGTH 0x03 | 66 | #define FLR_NF_STRGTH 0x03 |
| 67 | 67 | ||
| 68 | /* Default values for White Balance */ | 68 | /* Default values for White Balance */ |
| 69 | #define FLR_WBAL_DGAIN 0x100 | 69 | #define FLR_WBAL_DGAIN 0x100 |
| 70 | #define FLR_WBAL_COEF 0x20 | 70 | #define FLR_WBAL_COEF 0x20 |
| 71 | 71 | ||
| 72 | /* Default values in Office Flourescent Light for Black Adjustment*/ | 72 | /* Default values in Office Fluorescent Light for Black Adjustment*/ |
| 73 | #define FLR_BLKADJ_BLUE 0x0 | 73 | #define FLR_BLKADJ_BLUE 0x0 |
| 74 | #define FLR_BLKADJ_GREEN 0x0 | 74 | #define FLR_BLKADJ_GREEN 0x0 |
| 75 | #define FLR_BLKADJ_RED 0x0 | 75 | #define FLR_BLKADJ_RED 0x0 |
| @@ -137,7 +137,7 @@ preview_enable_invalaw(struct isp_prev_device *prev, u8 enable) | |||
| 137 | * @enable: 1 - Enable, 0 - Disable | 137 | * @enable: 1 - Enable, 0 - Disable |
| 138 | * | 138 | * |
| 139 | * NOTE: PRV_WSDR_ADDR and PRV_WADD_OFFSET must be set also | 139 | * NOTE: PRV_WSDR_ADDR and PRV_WADD_OFFSET must be set also |
| 140 | * The proccess is applied for each captured frame. | 140 | * The process is applied for each captured frame. |
| 141 | */ | 141 | */ |
| 142 | static void | 142 | static void |
| 143 | preview_enable_drkframe_capture(struct isp_prev_device *prev, u8 enable) | 143 | preview_enable_drkframe_capture(struct isp_prev_device *prev, u8 enable) |
| @@ -157,7 +157,7 @@ preview_enable_drkframe_capture(struct isp_prev_device *prev, u8 enable) | |||
| 157 | * @enable: 1 - Acquires memory bandwidth since the pixels in each frame is | 157 | * @enable: 1 - Acquires memory bandwidth since the pixels in each frame is |
| 158 | * subtracted with the pixels in the current frame. | 158 | * subtracted with the pixels in the current frame. |
| 159 | * | 159 | * |
| 160 | * The proccess is applied for each captured frame. | 160 | * The process is applied for each captured frame. |
| 161 | */ | 161 | */ |
| 162 | static void | 162 | static void |
| 163 | preview_enable_drkframe(struct isp_prev_device *prev, u8 enable) | 163 | preview_enable_drkframe(struct isp_prev_device *prev, u8 enable) |
| @@ -1528,7 +1528,7 @@ static long preview_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) | |||
| 1528 | * preview_set_stream - Enable/Disable streaming on preview subdev | 1528 | * preview_set_stream - Enable/Disable streaming on preview subdev |
| 1529 | * @sd : pointer to v4l2 subdev structure | 1529 | * @sd : pointer to v4l2 subdev structure |
| 1530 | * @enable: 1 == Enable, 0 == Disable | 1530 | * @enable: 1 == Enable, 0 == Disable |
| 1531 | * return -EINVAL or zero on sucess | 1531 | * return -EINVAL or zero on success |
| 1532 | */ | 1532 | */ |
| 1533 | static int preview_set_stream(struct v4l2_subdev *sd, int enable) | 1533 | static int preview_set_stream(struct v4l2_subdev *sd, int enable) |
| 1534 | { | 1534 | { |
| @@ -1780,7 +1780,7 @@ static int preview_enum_frame_size(struct v4l2_subdev *sd, | |||
| 1780 | * @sd : pointer to v4l2 subdev structure | 1780 | * @sd : pointer to v4l2 subdev structure |
| 1781 | * @fh : V4L2 subdev file handle | 1781 | * @fh : V4L2 subdev file handle |
| 1782 | * @fmt: pointer to v4l2 subdev format structure | 1782 | * @fmt: pointer to v4l2 subdev format structure |
| 1783 | * return -EINVAL or zero on sucess | 1783 | * return -EINVAL or zero on success |
| 1784 | */ | 1784 | */ |
| 1785 | static int preview_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, | 1785 | static int preview_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, |
| 1786 | struct v4l2_subdev_format *fmt) | 1786 | struct v4l2_subdev_format *fmt) |
diff --git a/drivers/media/video/omap3isp/isppreview.h b/drivers/media/video/omap3isp/isppreview.h index f2d63ca4bd6f..fa943bd05c7f 100644 --- a/drivers/media/video/omap3isp/isppreview.h +++ b/drivers/media/video/omap3isp/isppreview.h | |||
| @@ -163,7 +163,7 @@ struct isptables_update { | |||
| 163 | * @output: Bitmask of the active output | 163 | * @output: Bitmask of the active output |
| 164 | * @video_in: Input video entity | 164 | * @video_in: Input video entity |
| 165 | * @video_out: Output video entity | 165 | * @video_out: Output video entity |
| 166 | * @error: A hardware error occured during capture | 166 | * @error: A hardware error occurred during capture |
| 167 | * @params: Module configuration data | 167 | * @params: Module configuration data |
| 168 | * @shadow_update: If set, update the hardware configured in the next interrupt | 168 | * @shadow_update: If set, update the hardware configured in the next interrupt |
| 169 | * @underrun: Whether the preview entity has queued buffers on the output | 169 | * @underrun: Whether the preview entity has queued buffers on the output |
diff --git a/drivers/media/video/omap3isp/ispqueue.h b/drivers/media/video/omap3isp/ispqueue.h index 251de3e1679d..92c5a12157d5 100644 --- a/drivers/media/video/omap3isp/ispqueue.h +++ b/drivers/media/video/omap3isp/ispqueue.h | |||
| @@ -46,9 +46,9 @@ struct scatterlist; | |||
| 46 | * device yet. | 46 | * device yet. |
| 47 | * @ISP_BUF_STATE_ACTIVE: The buffer is in use for an active video transfer. | 47 | * @ISP_BUF_STATE_ACTIVE: The buffer is in use for an active video transfer. |
| 48 | * @ISP_BUF_STATE_ERROR: The device is done with the buffer and an error | 48 | * @ISP_BUF_STATE_ERROR: The device is done with the buffer and an error |
| 49 | * occured. For capture device the buffer likely contains corrupted data or | 49 | * occurred. For capture device the buffer likely contains corrupted data or |
| 50 | * no data at all. | 50 | * no data at all. |
| 51 | * @ISP_BUF_STATE_DONE: The device is done with the buffer and no error occured. | 51 | * @ISP_BUF_STATE_DONE: The device is done with the buffer and no error occurred. |
| 52 | * For capture devices the buffer contains valid data. | 52 | * For capture devices the buffer contains valid data. |
| 53 | */ | 53 | */ |
| 54 | enum isp_video_buffer_state { | 54 | enum isp_video_buffer_state { |
diff --git a/drivers/media/video/omap3isp/ispresizer.c b/drivers/media/video/omap3isp/ispresizer.c index 75d39b115d42..653f88ba56db 100644 --- a/drivers/media/video/omap3isp/ispresizer.c +++ b/drivers/media/video/omap3isp/ispresizer.c | |||
| @@ -751,7 +751,7 @@ static void resizer_print_status(struct isp_res_device *res) | |||
| 751 | * ratio will thus result in a resizing factor slightly larger than the | 751 | * ratio will thus result in a resizing factor slightly larger than the |
| 752 | * requested value. | 752 | * requested value. |
| 753 | * | 753 | * |
| 754 | * To accomodate that, and make sure the TRM equations are satisfied exactly, we | 754 | * To accommodate that, and make sure the TRM equations are satisfied exactly, we |
| 755 | * compute the input crop rectangle as the last step. | 755 | * compute the input crop rectangle as the last step. |
| 756 | * | 756 | * |
| 757 | * As if the situation wasn't complex enough, the maximum output width depends | 757 | * As if the situation wasn't complex enough, the maximum output width depends |
| @@ -1386,7 +1386,7 @@ static int resizer_enum_frame_size(struct v4l2_subdev *sd, | |||
| 1386 | * @sd : pointer to v4l2 subdev structure | 1386 | * @sd : pointer to v4l2 subdev structure |
| 1387 | * @fh : V4L2 subdev file handle | 1387 | * @fh : V4L2 subdev file handle |
| 1388 | * @fmt : pointer to v4l2 subdev format structure | 1388 | * @fmt : pointer to v4l2 subdev format structure |
| 1389 | * return -EINVAL or zero on sucess | 1389 | * return -EINVAL or zero on success |
| 1390 | */ | 1390 | */ |
| 1391 | static int resizer_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, | 1391 | static int resizer_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, |
| 1392 | struct v4l2_subdev_format *fmt) | 1392 | struct v4l2_subdev_format *fmt) |
diff --git a/drivers/media/video/omap3isp/ispvideo.c b/drivers/media/video/omap3isp/ispvideo.c index a0bb5db9cb8a..208a7ec739d7 100644 --- a/drivers/media/video/omap3isp/ispvideo.c +++ b/drivers/media/video/omap3isp/ispvideo.c | |||
| @@ -494,12 +494,12 @@ static const struct isp_video_queue_operations isp_video_queue_ops = { | |||
| 494 | /* | 494 | /* |
| 495 | * omap3isp_video_buffer_next - Complete the current buffer and return the next | 495 | * omap3isp_video_buffer_next - Complete the current buffer and return the next |
| 496 | * @video: ISP video object | 496 | * @video: ISP video object |
| 497 | * @error: Whether an error occured during capture | 497 | * @error: Whether an error occurred during capture |
| 498 | * | 498 | * |
| 499 | * Remove the current video buffer from the DMA queue and fill its timestamp, | 499 | * Remove the current video buffer from the DMA queue and fill its timestamp, |
| 500 | * field count and state fields before waking up its completion handler. | 500 | * field count and state fields before waking up its completion handler. |
| 501 | * | 501 | * |
| 502 | * The buffer state is set to VIDEOBUF_DONE if no error occured (@error is 0) | 502 | * The buffer state is set to VIDEOBUF_DONE if no error occurred (@error is 0) |
| 503 | * or VIDEOBUF_ERROR otherwise (@error is non-zero). | 503 | * or VIDEOBUF_ERROR otherwise (@error is non-zero). |
| 504 | * | 504 | * |
| 505 | * The DMA queue is expected to contain at least one buffer. | 505 | * The DMA queue is expected to contain at least one buffer. |
| @@ -578,7 +578,7 @@ struct isp_buffer *omap3isp_video_buffer_next(struct isp_video *video, | |||
| 578 | /* | 578 | /* |
| 579 | * omap3isp_video_resume - Perform resume operation on the buffers | 579 | * omap3isp_video_resume - Perform resume operation on the buffers |
| 580 | * @video: ISP video object | 580 | * @video: ISP video object |
| 581 | * @continuous: Pipeline is in single shot mode if 0 or continous mode otherwise | 581 | * @continuous: Pipeline is in single shot mode if 0 or continuous mode otherwise |
| 582 | * | 582 | * |
| 583 | * This function is intended to be used on suspend/resume scenario. It | 583 | * This function is intended to be used on suspend/resume scenario. It |
| 584 | * requests video queue layer to discard buffers marked as DONE if it's in | 584 | * requests video queue layer to discard buffers marked as DONE if it's in |
diff --git a/drivers/media/video/ov6650.c b/drivers/media/video/ov6650.c index fe8e3ebd9ce4..456d9ad9ae5a 100644 --- a/drivers/media/video/ov6650.c +++ b/drivers/media/video/ov6650.c | |||
| @@ -1038,7 +1038,7 @@ static int ov6650_reset(struct i2c_client *client) | |||
| 1038 | ret = ov6650_reg_rmw(client, REG_COMA, COMA_RESET, 0); | 1038 | ret = ov6650_reg_rmw(client, REG_COMA, COMA_RESET, 0); |
| 1039 | if (ret) | 1039 | if (ret) |
| 1040 | dev_err(&client->dev, | 1040 | dev_err(&client->dev, |
| 1041 | "An error occured while entering soft reset!\n"); | 1041 | "An error occurred while entering soft reset!\n"); |
| 1042 | 1042 | ||
| 1043 | return ret; | 1043 | return ret; |
| 1044 | } | 1044 | } |
diff --git a/drivers/media/video/ov9640.c b/drivers/media/video/ov9640.c index 53d88a2ab920..5173ac449dd8 100644 --- a/drivers/media/video/ov9640.c +++ b/drivers/media/video/ov9640.c | |||
| @@ -273,7 +273,7 @@ static int ov9640_reset(struct i2c_client *client) | |||
| 273 | ret = ov9640_reg_write(client, OV9640_COM7, OV9640_COM7_SCCB_RESET); | 273 | ret = ov9640_reg_write(client, OV9640_COM7, OV9640_COM7_SCCB_RESET); |
| 274 | if (ret) | 274 | if (ret) |
| 275 | dev_err(&client->dev, | 275 | dev_err(&client->dev, |
| 276 | "An error occured while entering soft reset!\n"); | 276 | "An error occurred while entering soft reset!\n"); |
| 277 | 277 | ||
| 278 | return ret; | 278 | return ret; |
| 279 | } | 279 | } |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-eeprom.c b/drivers/media/video/pvrusb2/pvrusb2-eeprom.c index aeed1c2945fb..9515f3a68f8f 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-eeprom.c +++ b/drivers/media/video/pvrusb2/pvrusb2-eeprom.c | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | 32 | ||
| 33 | Read and analyze data in the eeprom. Use tveeprom to figure out | 33 | Read and analyze data in the eeprom. Use tveeprom to figure out |
| 34 | the packet structure, since this is another Hauppauge device and | 34 | the packet structure, since this is another Hauppauge device and |
| 35 | internally it has a family resemblence to ivtv-type devices | 35 | internally it has a family resemblance to ivtv-type devices |
| 36 | 36 | ||
| 37 | */ | 37 | */ |
| 38 | 38 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.h b/drivers/media/video/pvrusb2/pvrusb2-hdw.h index 51d3009ab57f..d7753ae9ff46 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.h +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.h | |||
| @@ -75,7 +75,7 @@ enum pvr2_v4l_type { | |||
| 75 | * (but it might still on the bus). In this state there's nothing we can | 75 | * (but it might still on the bus). In this state there's nothing we can |
| 76 | * do; it must be replugged in order to recover. | 76 | * do; it must be replugged in order to recover. |
| 77 | * | 77 | * |
| 78 | * COLD - Device is in an unusuable state, needs microcontroller firmware. | 78 | * COLD - Device is in an unusable state, needs microcontroller firmware. |
| 79 | * | 79 | * |
| 80 | * WARM - We can communicate with the device and the proper | 80 | * WARM - We can communicate with the device and the proper |
| 81 | * microcontroller firmware is running, but other device initialization is | 81 | * microcontroller firmware is running, but other device initialization is |
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index 02686771740d..c1ee09a043ba 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c | |||
| @@ -714,7 +714,7 @@ static void pxa_camera_wakeup(struct pxa_camera_dev *pcdev, | |||
| 714 | * | 714 | * |
| 715 | * The DMA chaining is done with DMA running. This means a tiny temporal window | 715 | * The DMA chaining is done with DMA running. This means a tiny temporal window |
| 716 | * remains, where a buffer is queued on the chain, while the chain is already | 716 | * remains, where a buffer is queued on the chain, while the chain is already |
| 717 | * stopped. This means the tailed buffer would never be transfered by DMA. | 717 | * stopped. This means the tailed buffer would never be transferred by DMA. |
| 718 | * This function restarts the capture for this corner case, where : | 718 | * This function restarts the capture for this corner case, where : |
| 719 | * - DADR() == DADDR_STOP | 719 | * - DADR() == DADDR_STOP |
| 720 | * - a videobuffer is queued on the pcdev->capture list | 720 | * - a videobuffer is queued on the pcdev->capture list |
diff --git a/drivers/media/video/s5p-fimc/fimc-reg.c b/drivers/media/video/s5p-fimc/fimc-reg.c index 4d929a394521..4893b2d91d84 100644 --- a/drivers/media/video/s5p-fimc/fimc-reg.c +++ b/drivers/media/video/s5p-fimc/fimc-reg.c | |||
| @@ -356,7 +356,7 @@ void fimc_hw_en_capture(struct fimc_ctx *ctx) | |||
| 356 | /* one shot mode */ | 356 | /* one shot mode */ |
| 357 | cfg |= S5P_CIIMGCPT_CPT_FREN_ENABLE | S5P_CIIMGCPT_IMGCPTEN; | 357 | cfg |= S5P_CIIMGCPT_CPT_FREN_ENABLE | S5P_CIIMGCPT_IMGCPTEN; |
| 358 | } else { | 358 | } else { |
| 359 | /* Continous frame capture mode (freerun). */ | 359 | /* Continuous frame capture mode (freerun). */ |
| 360 | cfg &= ~(S5P_CIIMGCPT_CPT_FREN_ENABLE | | 360 | cfg &= ~(S5P_CIIMGCPT_CPT_FREN_ENABLE | |
| 361 | S5P_CIIMGCPT_CPT_FRMOD_CNT); | 361 | S5P_CIIMGCPT_CPT_FRMOD_CNT); |
| 362 | cfg |= S5P_CIIMGCPT_IMGCPTEN; | 362 | cfg |= S5P_CIIMGCPT_IMGCPTEN; |
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 61c6007c8ea6..50f1be05ebd3 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
| @@ -7460,7 +7460,7 @@ int saa7134_board_init2(struct saa7134_dev *dev) | |||
| 7460 | dev->tuner_type = TUNER_PHILIPS_FM1216ME_MK3; | 7460 | dev->tuner_type = TUNER_PHILIPS_FM1216ME_MK3; |
| 7461 | break; | 7461 | break; |
| 7462 | default: | 7462 | default: |
| 7463 | printk(KERN_ERR "%s Cant determine tuner type %x from EEPROM\n", dev->name, tuner_t); | 7463 | printk(KERN_ERR "%s Can't determine tuner type %x from EEPROM\n", dev->name, tuner_t); |
| 7464 | } | 7464 | } |
| 7465 | } else if ((data[1] != 0) && (data[1] != 0xff)) { | 7465 | } else if ((data[1] != 0) && (data[1] != 0xff)) { |
| 7466 | /* new config structure */ | 7466 | /* new config structure */ |
| @@ -7480,7 +7480,7 @@ int saa7134_board_init2(struct saa7134_dev *dev) | |||
| 7480 | printk(KERN_INFO "%s Board has DVB-T\n", dev->name); | 7480 | printk(KERN_INFO "%s Board has DVB-T\n", dev->name); |
| 7481 | break; | 7481 | break; |
| 7482 | default: | 7482 | default: |
| 7483 | printk(KERN_ERR "%s Cant determine tuner type %x from EEPROM\n", dev->name, tuner_t); | 7483 | printk(KERN_ERR "%s Can't determine tuner type %x from EEPROM\n", dev->name, tuner_t); |
| 7484 | } | 7484 | } |
| 7485 | } else { | 7485 | } else { |
| 7486 | printk(KERN_ERR "%s unexpected config structure\n", dev->name); | 7486 | printk(KERN_ERR "%s unexpected config structure\n", dev->name); |
diff --git a/drivers/media/video/saa7164/saa7164-cmd.c b/drivers/media/video/saa7164/saa7164-cmd.c index 6a4c217ed3a7..62fac7f9d04e 100644 --- a/drivers/media/video/saa7164/saa7164-cmd.c +++ b/drivers/media/video/saa7164/saa7164-cmd.c | |||
| @@ -257,7 +257,7 @@ out: | |||
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | /* Wait for a signal event, without holding a mutex. Either return TIMEOUT if | 259 | /* Wait for a signal event, without holding a mutex. Either return TIMEOUT if |
| 260 | * the event never occured, or SAA_OK if it was signaled during the wait. | 260 | * the event never occurred, or SAA_OK if it was signaled during the wait. |
| 261 | */ | 261 | */ |
| 262 | int saa7164_cmd_wait(struct saa7164_dev *dev, u8 seqno) | 262 | int saa7164_cmd_wait(struct saa7164_dev *dev, u8 seqno) |
| 263 | { | 263 | { |
diff --git a/drivers/media/video/saa7164/saa7164-fw.c b/drivers/media/video/saa7164/saa7164-fw.c index b369300cce06..a266bf0169e6 100644 --- a/drivers/media/video/saa7164/saa7164-fw.c +++ b/drivers/media/video/saa7164/saa7164-fw.c | |||
| @@ -444,7 +444,7 @@ int saa7164_downloadfirmware(struct saa7164_dev *dev) | |||
| 444 | printk(KERN_INFO " .Reserved = 0x%x\n", hdr->reserved); | 444 | printk(KERN_INFO " .Reserved = 0x%x\n", hdr->reserved); |
| 445 | printk(KERN_INFO " .Version = 0x%x\n", hdr->version); | 445 | printk(KERN_INFO " .Version = 0x%x\n", hdr->version); |
| 446 | 446 | ||
| 447 | /* Retreive bootloader if reqd */ | 447 | /* Retrieve bootloader if reqd */ |
| 448 | if ((hdr->firmwaresize == 0) && (hdr->bslsize == 0)) | 448 | if ((hdr->firmwaresize == 0) && (hdr->bslsize == 0)) |
| 449 | /* Second bootloader in the firmware file */ | 449 | /* Second bootloader in the firmware file */ |
| 450 | filesize = hdr->reserved * 16; | 450 | filesize = hdr->reserved * 16; |
diff --git a/drivers/media/video/saa7164/saa7164-types.h b/drivers/media/video/saa7164/saa7164-types.h index df1d2997fa6c..1d2140a3eb38 100644 --- a/drivers/media/video/saa7164/saa7164-types.h +++ b/drivers/media/video/saa7164/saa7164-types.h | |||
| @@ -412,7 +412,7 @@ struct tmComResVBIFormatDescrHeader { | |||
| 412 | u8 StartLine; /* NTSC Start = 10 */ | 412 | u8 StartLine; /* NTSC Start = 10 */ |
| 413 | u8 EndLine; /* NTSC = 21 */ | 413 | u8 EndLine; /* NTSC = 21 */ |
| 414 | u8 FieldRate; /* 60 for NTSC */ | 414 | u8 FieldRate; /* 60 for NTSC */ |
| 415 | u8 bNumLines; /* Unsed - scheduled for removal */ | 415 | u8 bNumLines; /* Unused - scheduled for removal */ |
| 416 | } __attribute__((packed)); | 416 | } __attribute__((packed)); |
| 417 | 417 | ||
| 418 | struct tmComResProbeCommit { | 418 | struct tmComResProbeCommit { |
diff --git a/drivers/media/video/sn9c102/sn9c102_core.c b/drivers/media/video/sn9c102/sn9c102_core.c index ce56a1cdbf0a..0e07c493e6f0 100644 --- a/drivers/media/video/sn9c102/sn9c102_core.c +++ b/drivers/media/video/sn9c102/sn9c102_core.c | |||
| @@ -1810,7 +1810,7 @@ static int sn9c102_open(struct file *filp) | |||
| 1810 | /* | 1810 | /* |
| 1811 | We will not release the "open_mutex" lock, so that only one | 1811 | We will not release the "open_mutex" lock, so that only one |
| 1812 | process can be in the wait queue below. This way the process | 1812 | process can be in the wait queue below. This way the process |
| 1813 | will be sleeping while holding the lock, without loosing its | 1813 | will be sleeping while holding the lock, without losing its |
| 1814 | priority after any wake_up(). | 1814 | priority after any wake_up(). |
| 1815 | */ | 1815 | */ |
| 1816 | err = wait_event_interruptible_exclusive(cam->wait_open, | 1816 | err = wait_event_interruptible_exclusive(cam->wait_open, |
diff --git a/drivers/media/video/sn9c102/sn9c102_sensor.h b/drivers/media/video/sn9c102/sn9c102_sensor.h index 7f38549715b6..3679970dba2c 100644 --- a/drivers/media/video/sn9c102/sn9c102_sensor.h +++ b/drivers/media/video/sn9c102/sn9c102_sensor.h | |||
| @@ -180,7 +180,7 @@ struct sn9c102_sensor { | |||
| 180 | It should be used to initialize the sensor only, but may also | 180 | It should be used to initialize the sensor only, but may also |
| 181 | configure part of the SN9C1XX chip if necessary. You don't need to | 181 | configure part of the SN9C1XX chip if necessary. You don't need to |
| 182 | setup picture settings like brightness, contrast, etc.. here, if | 182 | setup picture settings like brightness, contrast, etc.. here, if |
| 183 | the corrisponding controls are implemented (see below), since | 183 | the corresponding controls are implemented (see below), since |
| 184 | they are adjusted in the core driver by calling the set_ctrl() | 184 | they are adjusted in the core driver by calling the set_ctrl() |
| 185 | method after init(), where the arguments are the default values | 185 | method after init(), where the arguments are the default values |
| 186 | specified in the v4l2_queryctrl list of supported controls; | 186 | specified in the v4l2_queryctrl list of supported controls; |
diff --git a/drivers/media/video/tcm825x.c b/drivers/media/video/tcm825x.c index 54681a535822..b6ee1bd342dc 100644 --- a/drivers/media/video/tcm825x.c +++ b/drivers/media/video/tcm825x.c | |||
| @@ -493,7 +493,7 @@ static int ioctl_g_ctrl(struct v4l2_int_device *s, | |||
| 493 | int val, r; | 493 | int val, r; |
| 494 | struct vcontrol *lvc; | 494 | struct vcontrol *lvc; |
| 495 | 495 | ||
| 496 | /* exposure time is special, spread accross 2 registers */ | 496 | /* exposure time is special, spread across 2 registers */ |
| 497 | if (vc->id == V4L2_CID_EXPOSURE) { | 497 | if (vc->id == V4L2_CID_EXPOSURE) { |
| 498 | int val_lower, val_upper; | 498 | int val_lower, val_upper; |
| 499 | 499 | ||
| @@ -538,7 +538,7 @@ static int ioctl_s_ctrl(struct v4l2_int_device *s, | |||
| 538 | struct vcontrol *lvc; | 538 | struct vcontrol *lvc; |
| 539 | int val = vc->value; | 539 | int val = vc->value; |
| 540 | 540 | ||
| 541 | /* exposure time is special, spread accross 2 registers */ | 541 | /* exposure time is special, spread across 2 registers */ |
| 542 | if (vc->id == V4L2_CID_EXPOSURE) { | 542 | if (vc->id == V4L2_CID_EXPOSURE) { |
| 543 | int val_lower, val_upper; | 543 | int val_lower, val_upper; |
| 544 | val_lower = val & TCM825X_MASK(TCM825X_ESRSPD_L); | 544 | val_lower = val & TCM825X_MASK(TCM825X_ESRSPD_L); |
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c index a25e2b5e1944..c46a3bb95852 100644 --- a/drivers/media/video/tvaudio.c +++ b/drivers/media/video/tvaudio.c | |||
| @@ -1058,11 +1058,11 @@ static int tda9874a_initialize(struct CHIPSTATE *chip) | |||
| 1058 | #define TDA9875_MVR 0x1b /* Main volume droite */ | 1058 | #define TDA9875_MVR 0x1b /* Main volume droite */ |
| 1059 | #define TDA9875_MBA 0x1d /* Main Basse */ | 1059 | #define TDA9875_MBA 0x1d /* Main Basse */ |
| 1060 | #define TDA9875_MTR 0x1e /* Main treble */ | 1060 | #define TDA9875_MTR 0x1e /* Main treble */ |
| 1061 | #define TDA9875_ACS 0x1f /* Auxilary channel select (FM) 0b0000000*/ | 1061 | #define TDA9875_ACS 0x1f /* Auxiliary channel select (FM) 0b0000000*/ |
| 1062 | #define TDA9875_AVL 0x20 /* Auxilary volume gauche */ | 1062 | #define TDA9875_AVL 0x20 /* Auxiliary volume gauche */ |
| 1063 | #define TDA9875_AVR 0x21 /* Auxilary volume droite */ | 1063 | #define TDA9875_AVR 0x21 /* Auxiliary volume droite */ |
| 1064 | #define TDA9875_ABA 0x22 /* Auxilary Basse */ | 1064 | #define TDA9875_ABA 0x22 /* Auxiliary Basse */ |
| 1065 | #define TDA9875_ATR 0x23 /* Auxilary treble */ | 1065 | #define TDA9875_ATR 0x23 /* Auxiliary treble */ |
| 1066 | 1066 | ||
| 1067 | #define TDA9875_MSR 0x02 /* Monitor select register */ | 1067 | #define TDA9875_MSR 0x02 /* Monitor select register */ |
| 1068 | #define TDA9875_C1MSB 0x03 /* Carrier 1 (FM) frequency register MSB */ | 1068 | #define TDA9875_C1MSB 0x03 /* Carrier 1 (FM) frequency register MSB */ |
diff --git a/drivers/media/video/uvc/uvc_video.c b/drivers/media/video/uvc/uvc_video.c index 545c0294813d..fc766b9f24c5 100644 --- a/drivers/media/video/uvc/uvc_video.c +++ b/drivers/media/video/uvc/uvc_video.c | |||
| @@ -394,11 +394,11 @@ int uvc_commit_video(struct uvc_streaming *stream, | |||
| 394 | * | 394 | * |
| 395 | * uvc_video_decode_end is called with header data at the end of a bulk or | 395 | * uvc_video_decode_end is called with header data at the end of a bulk or |
| 396 | * isochronous payload. It performs any additional header data processing and | 396 | * isochronous payload. It performs any additional header data processing and |
| 397 | * returns 0 or a negative error code if an error occured. As header data have | 397 | * returns 0 or a negative error code if an error occurred. As header data have |
| 398 | * already been processed by uvc_video_decode_start, this functions isn't | 398 | * already been processed by uvc_video_decode_start, this functions isn't |
| 399 | * required to perform sanity checks a second time. | 399 | * required to perform sanity checks a second time. |
| 400 | * | 400 | * |
| 401 | * For isochronous transfers where a payload is always transfered in a single | 401 | * For isochronous transfers where a payload is always transferred in a single |
| 402 | * URB, the three functions will be called in a row. | 402 | * URB, the three functions will be called in a row. |
| 403 | * | 403 | * |
| 404 | * To let the decoder process header data and update its internal state even | 404 | * To let the decoder process header data and update its internal state even |
| @@ -658,7 +658,7 @@ static void uvc_video_decode_bulk(struct urb *urb, struct uvc_streaming *stream, | |||
| 658 | buf); | 658 | buf); |
| 659 | } while (ret == -EAGAIN); | 659 | } while (ret == -EAGAIN); |
| 660 | 660 | ||
| 661 | /* If an error occured skip the rest of the payload. */ | 661 | /* If an error occurred skip the rest of the payload. */ |
| 662 | if (ret < 0 || buf == NULL) { | 662 | if (ret < 0 || buf == NULL) { |
| 663 | stream->bulk.skip_payload = 1; | 663 | stream->bulk.skip_payload = 1; |
| 664 | } else { | 664 | } else { |
| @@ -821,7 +821,7 @@ static int uvc_alloc_urb_buffers(struct uvc_streaming *stream, | |||
| 821 | return stream->urb_size / psize; | 821 | return stream->urb_size / psize; |
| 822 | 822 | ||
| 823 | /* Compute the number of packets. Bulk endpoints might transfer UVC | 823 | /* Compute the number of packets. Bulk endpoints might transfer UVC |
| 824 | * payloads accross multiple URBs. | 824 | * payloads across multiple URBs. |
| 825 | */ | 825 | */ |
| 826 | npackets = DIV_ROUND_UP(size, psize); | 826 | npackets = DIV_ROUND_UP(size, psize); |
| 827 | if (npackets > UVC_MAX_PACKETS) | 827 | if (npackets > UVC_MAX_PACKETS) |
diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c index a01ed39e6c16..506edcc2ddeb 100644 --- a/drivers/media/video/v4l2-ioctl.c +++ b/drivers/media/video/v4l2-ioctl.c | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | printk(KERN_CONT "%s: " fmt, vfd->name, ## arg);\ | 48 | printk(KERN_CONT "%s: " fmt, vfd->name, ## arg);\ |
| 49 | } while (0) | 49 | } while (0) |
| 50 | 50 | ||
| 51 | /* Zero out the end of the struct pointed to by p. Everthing after, but | 51 | /* Zero out the end of the struct pointed to by p. Everything after, but |
| 52 | * not including, the specified field is cleared. */ | 52 | * not including, the specified field is cleared. */ |
| 53 | #define CLEAR_AFTER_FIELD(p, field) \ | 53 | #define CLEAR_AFTER_FIELD(p, field) \ |
| 54 | memset((u8 *)(p) + offsetof(typeof(*(p)), field) + sizeof((p)->field), \ | 54 | memset((u8 *)(p) + offsetof(typeof(*(p)), field) + sizeof((p)->field), \ |
diff --git a/drivers/media/video/vpx3220.c b/drivers/media/video/vpx3220.c index 75301d10a838..ca372eb911d0 100644 --- a/drivers/media/video/vpx3220.c +++ b/drivers/media/video/vpx3220.c | |||
| @@ -354,7 +354,7 @@ static int vpx3220_s_std(struct v4l2_subdev *sd, v4l2_std_id std) | |||
| 354 | 354 | ||
| 355 | /* Here we back up the input selection because it gets | 355 | /* Here we back up the input selection because it gets |
| 356 | overwritten when we fill the registers with the | 356 | overwritten when we fill the registers with the |
| 357 | choosen video norm */ | 357 | chosen video norm */ |
| 358 | temp_input = vpx3220_fp_read(sd, 0xf2); | 358 | temp_input = vpx3220_fp_read(sd, 0xf2); |
| 359 | 359 | ||
| 360 | v4l2_dbg(1, debug, sd, "s_std %llx\n", (unsigned long long)std); | 360 | v4l2_dbg(1, debug, sd, "s_std %llx\n", (unsigned long long)std); |
diff --git a/drivers/media/video/zoran/videocodec.h b/drivers/media/video/zoran/videocodec.h index b654bfff8740..def55585ad23 100644 --- a/drivers/media/video/zoran/videocodec.h +++ b/drivers/media/video/zoran/videocodec.h | |||
| @@ -57,7 +57,7 @@ | |||
| 57 | therfor they may not be initialized. | 57 | therfor they may not be initialized. |
| 58 | 58 | ||
| 59 | The other functions are just for convenience, as they are for sure used by | 59 | The other functions are just for convenience, as they are for sure used by |
| 60 | most/all of the codecs. The last ones may be ommited, too. | 60 | most/all of the codecs. The last ones may be omitted, too. |
| 61 | 61 | ||
| 62 | See the structure declaration below for more information and which data has | 62 | See the structure declaration below for more information and which data has |
| 63 | to be set up for the master and the slave. | 63 | to be set up for the master and the slave. |
diff --git a/drivers/media/video/zoran/zoran.h b/drivers/media/video/zoran/zoran.h index 4bb368e6fd47..f3f640014928 100644 --- a/drivers/media/video/zoran/zoran.h +++ b/drivers/media/video/zoran/zoran.h | |||
| @@ -259,7 +259,7 @@ struct card_info { | |||
| 259 | struct vfe_polarity vfe_pol; | 259 | struct vfe_polarity vfe_pol; |
| 260 | u8 gpio_pol[ZR_GPIO_MAX]; | 260 | u8 gpio_pol[ZR_GPIO_MAX]; |
| 261 | 261 | ||
| 262 | /* is the /GWS line conected? */ | 262 | /* is the /GWS line connected? */ |
| 263 | u8 gws_not_connected; | 263 | u8 gws_not_connected; |
| 264 | 264 | ||
| 265 | /* avs6eyes mux setting */ | 265 | /* avs6eyes mux setting */ |
diff --git a/drivers/media/video/zoran/zoran_driver.c b/drivers/media/video/zoran/zoran_driver.c index 7c3921de9589..2771d818406e 100644 --- a/drivers/media/video/zoran/zoran_driver.c +++ b/drivers/media/video/zoran/zoran_driver.c | |||
| @@ -1254,7 +1254,7 @@ static int setup_overlay(struct zoran_fh *fh, int on) | |||
| 1254 | { | 1254 | { |
| 1255 | struct zoran *zr = fh->zr; | 1255 | struct zoran *zr = fh->zr; |
| 1256 | 1256 | ||
| 1257 | /* If there is nothing to do, return immediatly */ | 1257 | /* If there is nothing to do, return immediately */ |
| 1258 | if ((on && fh->overlay_active != ZORAN_FREE) || | 1258 | if ((on && fh->overlay_active != ZORAN_FREE) || |
| 1259 | (!on && fh->overlay_active == ZORAN_FREE)) | 1259 | (!on && fh->overlay_active == ZORAN_FREE)) |
| 1260 | return 0; | 1260 | return 0; |
diff --git a/drivers/memstick/core/mspro_block.c b/drivers/memstick/core/mspro_block.c index 57b42bfc7d23..4a1909a32b60 100644 --- a/drivers/memstick/core/mspro_block.c +++ b/drivers/memstick/core/mspro_block.c | |||
| @@ -973,7 +973,7 @@ try_again: | |||
| 973 | } | 973 | } |
| 974 | 974 | ||
| 975 | /* Memory allocated for attributes by this function should be freed by | 975 | /* Memory allocated for attributes by this function should be freed by |
| 976 | * mspro_block_data_clear, no matter if the initialization process succeded | 976 | * mspro_block_data_clear, no matter if the initialization process succeeded |
| 977 | * or failed. | 977 | * or failed. |
| 978 | */ | 978 | */ |
| 979 | static int mspro_block_read_attributes(struct memstick_dev *card) | 979 | static int mspro_block_read_attributes(struct memstick_dev *card) |
diff --git a/drivers/memstick/host/r592.c b/drivers/memstick/host/r592.c index 700d420a59ac..668f5c6a0399 100644 --- a/drivers/memstick/host/r592.c +++ b/drivers/memstick/host/r592.c | |||
| @@ -796,7 +796,7 @@ static int r592_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
| 796 | if (memstick_add_host(host)) | 796 | if (memstick_add_host(host)) |
| 797 | goto error7; | 797 | goto error7; |
| 798 | 798 | ||
| 799 | message("driver succesfully loaded"); | 799 | message("driver successfully loaded"); |
| 800 | return 0; | 800 | return 0; |
| 801 | error7: | 801 | error7: |
| 802 | free_irq(dev->irq, dev); | 802 | free_irq(dev->irq, dev); |
diff --git a/drivers/memstick/host/r592.h b/drivers/memstick/host/r592.h index eee264e6028f..c5726c1e8832 100644 --- a/drivers/memstick/host/r592.h +++ b/drivers/memstick/host/r592.h | |||
| @@ -43,12 +43,12 @@ | |||
| 43 | 43 | ||
| 44 | /* Error detection via CRC */ | 44 | /* Error detection via CRC */ |
| 45 | #define R592_STATUS_SEND_ERR (1 << 24) /* Send failed */ | 45 | #define R592_STATUS_SEND_ERR (1 << 24) /* Send failed */ |
| 46 | #define R592_STATUS_RECV_ERR (1 << 25) /* Recieve failed */ | 46 | #define R592_STATUS_RECV_ERR (1 << 25) /* Receive failed */ |
| 47 | 47 | ||
| 48 | /* Card state */ | 48 | /* Card state */ |
| 49 | #define R592_STATUS_RDY (1 << 28) /* RDY signal recieved */ | 49 | #define R592_STATUS_RDY (1 << 28) /* RDY signal received */ |
| 50 | #define R592_STATUS_CED (1 << 29) /* INT: Command done (serial mode)*/ | 50 | #define R592_STATUS_CED (1 << 29) /* INT: Command done (serial mode)*/ |
| 51 | #define R592_STATUS_SFIFO_INPUT (1 << 30) /* Small fifo recieved data*/ | 51 | #define R592_STATUS_SFIFO_INPUT (1 << 30) /* Small fifo received data*/ |
| 52 | 52 | ||
| 53 | #define R592_SFIFO_SIZE 32 /* total size of small fifo is 32 bytes */ | 53 | #define R592_SFIFO_SIZE 32 /* total size of small fifo is 32 bytes */ |
| 54 | #define R592_SFIFO_PACKET 8 /* packet size of small fifo */ | 54 | #define R592_SFIFO_PACKET 8 /* packet size of small fifo */ |
diff --git a/drivers/message/fusion/lsi/mpi_log_fc.h b/drivers/message/fusion/lsi/mpi_log_fc.h index face6e7acc72..03be8b217709 100644 --- a/drivers/message/fusion/lsi/mpi_log_fc.h +++ b/drivers/message/fusion/lsi/mpi_log_fc.h | |||
| @@ -38,8 +38,8 @@ typedef enum _MpiIocLogInfoFc | |||
| 38 | { | 38 | { |
| 39 | MPI_IOCLOGINFO_FC_INIT_BASE = 0x20000000, | 39 | MPI_IOCLOGINFO_FC_INIT_BASE = 0x20000000, |
| 40 | MPI_IOCLOGINFO_FC_INIT_ERROR_OUT_OF_ORDER_FRAME = 0x20000001, /* received an out of order frame - unsupported */ | 40 | MPI_IOCLOGINFO_FC_INIT_ERROR_OUT_OF_ORDER_FRAME = 0x20000001, /* received an out of order frame - unsupported */ |
| 41 | MPI_IOCLOGINFO_FC_INIT_ERROR_BAD_START_OF_FRAME = 0x20000002, /* Bad Rx Frame, bad start of frame primative */ | 41 | MPI_IOCLOGINFO_FC_INIT_ERROR_BAD_START_OF_FRAME = 0x20000002, /* Bad Rx Frame, bad start of frame primitive */ |
| 42 | MPI_IOCLOGINFO_FC_INIT_ERROR_BAD_END_OF_FRAME = 0x20000003, /* Bad Rx Frame, bad end of frame primative */ | 42 | MPI_IOCLOGINFO_FC_INIT_ERROR_BAD_END_OF_FRAME = 0x20000003, /* Bad Rx Frame, bad end of frame primitive */ |
| 43 | MPI_IOCLOGINFO_FC_INIT_ERROR_OVER_RUN = 0x20000004, /* Bad Rx Frame, overrun */ | 43 | MPI_IOCLOGINFO_FC_INIT_ERROR_OVER_RUN = 0x20000004, /* Bad Rx Frame, overrun */ |
| 44 | MPI_IOCLOGINFO_FC_INIT_ERROR_RX_OTHER = 0x20000005, /* Other errors caught by IOC which require retries */ | 44 | MPI_IOCLOGINFO_FC_INIT_ERROR_RX_OTHER = 0x20000005, /* Other errors caught by IOC which require retries */ |
| 45 | MPI_IOCLOGINFO_FC_INIT_ERROR_SUBPROC_DEAD = 0x20000006, /* Main processor could not initialize sub-processor */ | 45 | MPI_IOCLOGINFO_FC_INIT_ERROR_SUBPROC_DEAD = 0x20000006, /* Main processor could not initialize sub-processor */ |
diff --git a/drivers/message/fusion/lsi/mpi_log_sas.h b/drivers/message/fusion/lsi/mpi_log_sas.h index 8b04810df469..f62960b5d527 100644 --- a/drivers/message/fusion/lsi/mpi_log_sas.h +++ b/drivers/message/fusion/lsi/mpi_log_sas.h | |||
| @@ -56,9 +56,9 @@ | |||
| 56 | #define IOP_LOGINFO_CODE_FWUPLOAD_NO_FLASH_AVAILABLE (0x0003E000) /* Tried to upload from flash, but there is none */ | 56 | #define IOP_LOGINFO_CODE_FWUPLOAD_NO_FLASH_AVAILABLE (0x0003E000) /* Tried to upload from flash, but there is none */ |
| 57 | #define IOP_LOGINFO_CODE_FWUPLOAD_UNKNOWN_IMAGE_TYPE (0x0003E001) /* ImageType field contents were invalid */ | 57 | #define IOP_LOGINFO_CODE_FWUPLOAD_UNKNOWN_IMAGE_TYPE (0x0003E001) /* ImageType field contents were invalid */ |
| 58 | #define IOP_LOGINFO_CODE_FWUPLOAD_WRONG_IMAGE_SIZE (0x0003E002) /* ImageSize field in TCSGE was bad/offset in MfgPg 4 was wrong */ | 58 | #define IOP_LOGINFO_CODE_FWUPLOAD_WRONG_IMAGE_SIZE (0x0003E002) /* ImageSize field in TCSGE was bad/offset in MfgPg 4 was wrong */ |
| 59 | #define IOP_LOGINFO_CODE_FWUPLOAD_ENTIRE_FLASH_UPLOAD_FAILED (0x0003E003) /* Error occured while attempting to upload the entire flash */ | 59 | #define IOP_LOGINFO_CODE_FWUPLOAD_ENTIRE_FLASH_UPLOAD_FAILED (0x0003E003) /* Error occurred while attempting to upload the entire flash */ |
| 60 | #define IOP_LOGINFO_CODE_FWUPLOAD_REGION_UPLOAD_FAILED (0x0003E004) /* Error occured while attempting to upload single flash region */ | 60 | #define IOP_LOGINFO_CODE_FWUPLOAD_REGION_UPLOAD_FAILED (0x0003E004) /* Error occurred while attempting to upload single flash region */ |
| 61 | #define IOP_LOGINFO_CODE_FWUPLOAD_DMA_FAILURE (0x0003E005) /* Problem occured while DMAing FW to host memory */ | 61 | #define IOP_LOGINFO_CODE_FWUPLOAD_DMA_FAILURE (0x0003E005) /* Problem occurred while DMAing FW to host memory */ |
| 62 | 62 | ||
| 63 | #define IOP_LOGINFO_CODE_DIAG_MSG_ERROR (0x00040000) /* Error handling diag msg - or'd with diag status */ | 63 | #define IOP_LOGINFO_CODE_DIAG_MSG_ERROR (0x00040000) /* Error handling diag msg - or'd with diag status */ |
| 64 | 64 | ||
| @@ -187,8 +187,8 @@ | |||
| 187 | #define PL_LOGINFO_SUB_CODE_BREAK_ON_INCOMPLETE_BREAK_RCVD (0x00005000) | 187 | #define PL_LOGINFO_SUB_CODE_BREAK_ON_INCOMPLETE_BREAK_RCVD (0x00005000) |
| 188 | 188 | ||
| 189 | #define PL_LOGINFO_CODE_ENCL_MGMT_SMP_FRAME_FAILURE (0x00200000) /* Can't get SMP Frame */ | 189 | #define PL_LOGINFO_CODE_ENCL_MGMT_SMP_FRAME_FAILURE (0x00200000) /* Can't get SMP Frame */ |
| 190 | #define PL_LOGINFO_CODE_ENCL_MGMT_SMP_READ_ERROR (0x00200010) /* Error occured on SMP Read */ | 190 | #define PL_LOGINFO_CODE_ENCL_MGMT_SMP_READ_ERROR (0x00200010) /* Error occurred on SMP Read */ |
| 191 | #define PL_LOGINFO_CODE_ENCL_MGMT_SMP_WRITE_ERROR (0x00200020) /* Error occured on SMP Write */ | 191 | #define PL_LOGINFO_CODE_ENCL_MGMT_SMP_WRITE_ERROR (0x00200020) /* Error occurred on SMP Write */ |
| 192 | #define PL_LOGINFO_CODE_ENCL_MGMT_NOT_SUPPORTED_ON_ENCL (0x00200040) /* Encl Mgmt services not available for this WWID */ | 192 | #define PL_LOGINFO_CODE_ENCL_MGMT_NOT_SUPPORTED_ON_ENCL (0x00200040) /* Encl Mgmt services not available for this WWID */ |
| 193 | #define PL_LOGINFO_CODE_ENCL_MGMT_ADDR_MODE_NOT_SUPPORTED (0x00200050) /* Address Mode not suppored */ | 193 | #define PL_LOGINFO_CODE_ENCL_MGMT_ADDR_MODE_NOT_SUPPORTED (0x00200050) /* Address Mode not suppored */ |
| 194 | #define PL_LOGINFO_CODE_ENCL_MGMT_BAD_SLOT_NUM (0x00200060) /* Invalid Slot Number in SEP Msg */ | 194 | #define PL_LOGINFO_CODE_ENCL_MGMT_BAD_SLOT_NUM (0x00200060) /* Invalid Slot Number in SEP Msg */ |
| @@ -207,8 +207,8 @@ | |||
| 207 | #define PL_LOGINFO_DA_SEP_RECEIVED_NACK_FROM_SLAVE (0x00200103) /* SEP NACK'd, it is busy */ | 207 | #define PL_LOGINFO_DA_SEP_RECEIVED_NACK_FROM_SLAVE (0x00200103) /* SEP NACK'd, it is busy */ |
| 208 | #define PL_LOGINFO_DA_SEP_DID_NOT_RECEIVE_ACK (0x00200104) /* SEP didn't rcv. ACK (Last Rcvd Bit = 1) */ | 208 | #define PL_LOGINFO_DA_SEP_DID_NOT_RECEIVE_ACK (0x00200104) /* SEP didn't rcv. ACK (Last Rcvd Bit = 1) */ |
| 209 | #define PL_LOGINFO_DA_SEP_BAD_STATUS_HDR_CHKSUM (0x00200105) /* SEP stopped or sent bad chksum in Hdr */ | 209 | #define PL_LOGINFO_DA_SEP_BAD_STATUS_HDR_CHKSUM (0x00200105) /* SEP stopped or sent bad chksum in Hdr */ |
| 210 | #define PL_LOGINFO_DA_SEP_STOP_ON_DATA (0x00200106) /* SEP stopped while transfering data */ | 210 | #define PL_LOGINFO_DA_SEP_STOP_ON_DATA (0x00200106) /* SEP stopped while transferring data */ |
| 211 | #define PL_LOGINFO_DA_SEP_STOP_ON_SENSE_DATA (0x00200107) /* SEP stopped while transfering sense data */ | 211 | #define PL_LOGINFO_DA_SEP_STOP_ON_SENSE_DATA (0x00200107) /* SEP stopped while transferring sense data */ |
| 212 | #define PL_LOGINFO_DA_SEP_UNSUPPORTED_SCSI_STATUS_1 (0x00200108) /* SEP returned unknown scsi status */ | 212 | #define PL_LOGINFO_DA_SEP_UNSUPPORTED_SCSI_STATUS_1 (0x00200108) /* SEP returned unknown scsi status */ |
| 213 | #define PL_LOGINFO_DA_SEP_UNSUPPORTED_SCSI_STATUS_2 (0x00200109) /* SEP returned unknown scsi status */ | 213 | #define PL_LOGINFO_DA_SEP_UNSUPPORTED_SCSI_STATUS_2 (0x00200109) /* SEP returned unknown scsi status */ |
| 214 | #define PL_LOGINFO_DA_SEP_CHKSUM_ERROR_AFTER_STOP (0x0020010A) /* SEP returned bad chksum after STOP */ | 214 | #define PL_LOGINFO_DA_SEP_CHKSUM_ERROR_AFTER_STOP (0x0020010A) /* SEP returned bad chksum after STOP */ |
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index ec8080c98081..fa15e853d4e8 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c | |||
| @@ -3435,7 +3435,7 @@ SendPortEnable(MPT_ADAPTER *ioc, int portnum, int sleepFlag) | |||
| 3435 | * If memory has already been allocated, the same (cached) value | 3435 | * If memory has already been allocated, the same (cached) value |
| 3436 | * is returned. | 3436 | * is returned. |
| 3437 | * | 3437 | * |
| 3438 | * Return 0 if successfull, or non-zero for failure | 3438 | * Return 0 if successful, or non-zero for failure |
| 3439 | **/ | 3439 | **/ |
| 3440 | int | 3440 | int |
| 3441 | mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size) | 3441 | mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size) |
| @@ -6932,7 +6932,7 @@ EXPORT_SYMBOL(mpt_halt_firmware); | |||
| 6932 | * Message Unit Reset - instructs the IOC to reset the Reply Post and | 6932 | * Message Unit Reset - instructs the IOC to reset the Reply Post and |
| 6933 | * Free FIFO's. All the Message Frames on Reply Free FIFO are discarded. | 6933 | * Free FIFO's. All the Message Frames on Reply Free FIFO are discarded. |
| 6934 | * All posted buffers are freed, and event notification is turned off. | 6934 | * All posted buffers are freed, and event notification is turned off. |
| 6935 | * IOC doesnt reply to any outstanding request. This will transfer IOC | 6935 | * IOC doesn't reply to any outstanding request. This will transfer IOC |
| 6936 | * to READY state. | 6936 | * to READY state. |
| 6937 | **/ | 6937 | **/ |
| 6938 | int | 6938 | int |
| @@ -7905,7 +7905,7 @@ mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info) | |||
| 7905 | "Owner", /* 15h */ | 7905 | "Owner", /* 15h */ |
| 7906 | "Open Transmit DMA Abort", /* 16h */ | 7906 | "Open Transmit DMA Abort", /* 16h */ |
| 7907 | "IO Device Missing Delay Retry", /* 17h */ | 7907 | "IO Device Missing Delay Retry", /* 17h */ |
| 7908 | "IO Cancelled Due to Recieve Error", /* 18h */ | 7908 | "IO Cancelled Due to Receive Error", /* 18h */ |
| 7909 | NULL, /* 19h */ | 7909 | NULL, /* 19h */ |
| 7910 | NULL, /* 1Ah */ | 7910 | NULL, /* 1Ah */ |
| 7911 | NULL, /* 1Bh */ | 7911 | NULL, /* 1Bh */ |
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c index 878bda0cce70..6e6e16aab9da 100644 --- a/drivers/message/fusion/mptctl.c +++ b/drivers/message/fusion/mptctl.c | |||
| @@ -985,7 +985,7 @@ retry_wait: | |||
| 985 | ReplyMsg = (pFWDownloadReply_t)iocp->ioctl_cmds.reply; | 985 | ReplyMsg = (pFWDownloadReply_t)iocp->ioctl_cmds.reply; |
| 986 | iocstat = le16_to_cpu(ReplyMsg->IOCStatus) & MPI_IOCSTATUS_MASK; | 986 | iocstat = le16_to_cpu(ReplyMsg->IOCStatus) & MPI_IOCSTATUS_MASK; |
| 987 | if (iocstat == MPI_IOCSTATUS_SUCCESS) { | 987 | if (iocstat == MPI_IOCSTATUS_SUCCESS) { |
| 988 | printk(MYIOC_s_INFO_FMT "F/W update successfull!\n", iocp->name); | 988 | printk(MYIOC_s_INFO_FMT "F/W update successful!\n", iocp->name); |
| 989 | return 0; | 989 | return 0; |
| 990 | } else if (iocstat == MPI_IOCSTATUS_INVALID_FUNCTION) { | 990 | } else if (iocstat == MPI_IOCSTATUS_INVALID_FUNCTION) { |
| 991 | printk(MYIOC_s_WARN_FMT "Hmmm... F/W download not supported!?!\n", | 991 | printk(MYIOC_s_WARN_FMT "Hmmm... F/W download not supported!?!\n", |
| @@ -2407,7 +2407,7 @@ done_free_mem: | |||
| 2407 | } | 2407 | } |
| 2408 | 2408 | ||
| 2409 | /* mf is null if command issued successfully | 2409 | /* mf is null if command issued successfully |
| 2410 | * otherwise, failure occured after mf acquired. | 2410 | * otherwise, failure occurred after mf acquired. |
| 2411 | */ | 2411 | */ |
| 2412 | if (mf) | 2412 | if (mf) |
| 2413 | mpt_free_msg_frame(ioc, mf); | 2413 | mpt_free_msg_frame(ioc, mf); |
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index f5a14afad2cd..66f94125de4e 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c | |||
| @@ -307,7 +307,7 @@ mptsas_requeue_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event, | |||
| 307 | spin_unlock_irqrestore(&ioc->fw_event_lock, flags); | 307 | spin_unlock_irqrestore(&ioc->fw_event_lock, flags); |
| 308 | } | 308 | } |
| 309 | 309 | ||
| 310 | /* free memory assoicated to a sas firmware event */ | 310 | /* free memory associated to a sas firmware event */ |
| 311 | static void | 311 | static void |
| 312 | mptsas_free_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event) | 312 | mptsas_free_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event) |
| 313 | { | 313 | { |
| @@ -1094,7 +1094,7 @@ mptsas_block_io_starget(struct scsi_target *starget) | |||
| 1094 | /** | 1094 | /** |
| 1095 | * mptsas_target_reset_queue | 1095 | * mptsas_target_reset_queue |
| 1096 | * | 1096 | * |
| 1097 | * Receive request for TARGET_RESET after recieving an firmware | 1097 | * Receive request for TARGET_RESET after receiving an firmware |
| 1098 | * event NOT_RESPONDING_EVENT, then put command in link list | 1098 | * event NOT_RESPONDING_EVENT, then put command in link list |
| 1099 | * and queue if task_queue already in use. | 1099 | * and queue if task_queue already in use. |
| 1100 | * | 1100 | * |
| @@ -1403,7 +1403,7 @@ mptsas_sas_enclosure_pg0(MPT_ADAPTER *ioc, struct mptsas_enclosure *enclosure, | |||
| 1403 | /** | 1403 | /** |
| 1404 | * mptsas_add_end_device - report a new end device to sas transport layer | 1404 | * mptsas_add_end_device - report a new end device to sas transport layer |
| 1405 | * @ioc: Pointer to MPT_ADAPTER structure | 1405 | * @ioc: Pointer to MPT_ADAPTER structure |
| 1406 | * @phy_info: decribes attached device | 1406 | * @phy_info: describes attached device |
| 1407 | * | 1407 | * |
| 1408 | * return (0) success (1) failure | 1408 | * return (0) success (1) failure |
| 1409 | * | 1409 | * |
| @@ -1481,7 +1481,7 @@ mptsas_add_end_device(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info) | |||
| 1481 | /** | 1481 | /** |
| 1482 | * mptsas_del_end_device - report a deleted end device to sas transport layer | 1482 | * mptsas_del_end_device - report a deleted end device to sas transport layer |
| 1483 | * @ioc: Pointer to MPT_ADAPTER structure | 1483 | * @ioc: Pointer to MPT_ADAPTER structure |
| 1484 | * @phy_info: decribes attached device | 1484 | * @phy_info: describes attached device |
| 1485 | * | 1485 | * |
| 1486 | **/ | 1486 | **/ |
| 1487 | static void | 1487 | static void |
diff --git a/drivers/message/i2o/README b/drivers/message/i2o/README index 911fc3021e3b..f072a8eb3041 100644 --- a/drivers/message/i2o/README +++ b/drivers/message/i2o/README | |||
| @@ -53,7 +53,7 @@ Symbios Logic (Now LSI) | |||
| 53 | BoxHill Corporation | 53 | BoxHill Corporation |
| 54 | Loan of initial FibreChannel disk array used for development work. | 54 | Loan of initial FibreChannel disk array used for development work. |
| 55 | 55 | ||
| 56 | European Comission | 56 | European Commission |
| 57 | Funding the work done by the University of Helsinki | 57 | Funding the work done by the University of Helsinki |
| 58 | 58 | ||
| 59 | SysKonnect | 59 | SysKonnect |
diff --git a/drivers/message/i2o/device.c b/drivers/message/i2o/device.c index 0ee4264f5db7..4547db99f7da 100644 --- a/drivers/message/i2o/device.c +++ b/drivers/message/i2o/device.c | |||
| @@ -65,7 +65,7 @@ int i2o_device_claim(struct i2o_device *dev) | |||
| 65 | 65 | ||
| 66 | rc = i2o_device_issue_claim(dev, I2O_CMD_UTIL_CLAIM, I2O_CLAIM_PRIMARY); | 66 | rc = i2o_device_issue_claim(dev, I2O_CMD_UTIL_CLAIM, I2O_CLAIM_PRIMARY); |
| 67 | if (!rc) | 67 | if (!rc) |
| 68 | pr_debug("i2o: claim of device %d succeded\n", | 68 | pr_debug("i2o: claim of device %d succeeded\n", |
| 69 | dev->lct_data.tid); | 69 | dev->lct_data.tid); |
| 70 | else | 70 | else |
| 71 | pr_debug("i2o: claim of device %d failed %d\n", | 71 | pr_debug("i2o: claim of device %d failed %d\n", |
| @@ -110,7 +110,7 @@ int i2o_device_claim_release(struct i2o_device *dev) | |||
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | if (!rc) | 112 | if (!rc) |
| 113 | pr_debug("i2o: claim release of device %d succeded\n", | 113 | pr_debug("i2o: claim release of device %d succeeded\n", |
| 114 | dev->lct_data.tid); | 114 | dev->lct_data.tid); |
| 115 | else | 115 | else |
| 116 | pr_debug("i2o: claim release of device %d failed %d\n", | 116 | pr_debug("i2o: claim release of device %d failed %d\n", |
| @@ -248,7 +248,7 @@ static int i2o_device_add(struct i2o_controller *c, i2o_lct_entry *entry) | |||
| 248 | goto unreg_dev; | 248 | goto unreg_dev; |
| 249 | } | 249 | } |
| 250 | 250 | ||
| 251 | /* create user entries refering to this device */ | 251 | /* create user entries referring to this device */ |
| 252 | list_for_each_entry(tmp, &c->devices, list) | 252 | list_for_each_entry(tmp, &c->devices, list) |
| 253 | if ((tmp->lct_data.user_tid == i2o_dev->lct_data.tid) | 253 | if ((tmp->lct_data.user_tid == i2o_dev->lct_data.tid) |
| 254 | && (tmp != i2o_dev)) { | 254 | && (tmp != i2o_dev)) { |
| @@ -267,7 +267,7 @@ static int i2o_device_add(struct i2o_controller *c, i2o_lct_entry *entry) | |||
| 267 | goto rmlink1; | 267 | goto rmlink1; |
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | /* create parent entries refering to this device */ | 270 | /* create parent entries referring to this device */ |
| 271 | list_for_each_entry(tmp, &c->devices, list) | 271 | list_for_each_entry(tmp, &c->devices, list) |
| 272 | if ((tmp->lct_data.parent_tid == i2o_dev->lct_data.tid) | 272 | if ((tmp->lct_data.parent_tid == i2o_dev->lct_data.tid) |
| 273 | && (tmp != i2o_dev)) { | 273 | && (tmp != i2o_dev)) { |
diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c index 47ec5bc0ed21..643ad52e3ca2 100644 --- a/drivers/message/i2o/i2o_block.c +++ b/drivers/message/i2o/i2o_block.c | |||
| @@ -610,7 +610,7 @@ static int i2o_block_release(struct gendisk *disk, fmode_t mode) | |||
| 610 | 610 | ||
| 611 | /* | 611 | /* |
| 612 | * This is to deail with the case of an application | 612 | * This is to deail with the case of an application |
| 613 | * opening a device and then the device dissapears while | 613 | * opening a device and then the device disappears while |
| 614 | * it's in use, and then the application tries to release | 614 | * it's in use, and then the application tries to release |
| 615 | * it. ex: Unmounting a deleted RAID volume at reboot. | 615 | * it. ex: Unmounting a deleted RAID volume at reboot. |
| 616 | * If we send messages, it will just cause FAILs since | 616 | * If we send messages, it will just cause FAILs since |
| @@ -717,7 +717,7 @@ static unsigned int i2o_block_check_events(struct gendisk *disk, | |||
| 717 | 717 | ||
| 718 | /** | 718 | /** |
| 719 | * i2o_block_transfer - Transfer a request to/from the I2O controller | 719 | * i2o_block_transfer - Transfer a request to/from the I2O controller |
| 720 | * @req: the request which should be transfered | 720 | * @req: the request which should be transferred |
| 721 | * | 721 | * |
| 722 | * This function converts the request into a I2O message. The necessary | 722 | * This function converts the request into a I2O message. The necessary |
| 723 | * DMA buffers are allocated and after everything is setup post the message | 723 | * DMA buffers are allocated and after everything is setup post the message |
diff --git a/drivers/message/i2o/i2o_block.h b/drivers/message/i2o/i2o_block.h index 67f921b4419b..cf8873cbca3f 100644 --- a/drivers/message/i2o/i2o_block.h +++ b/drivers/message/i2o/i2o_block.h | |||
| @@ -73,7 +73,7 @@ struct i2o_block_device { | |||
| 73 | struct i2o_device *i2o_dev; /* pointer to I2O device */ | 73 | struct i2o_device *i2o_dev; /* pointer to I2O device */ |
| 74 | struct gendisk *gd; | 74 | struct gendisk *gd; |
| 75 | spinlock_t lock; /* queue lock */ | 75 | spinlock_t lock; /* queue lock */ |
| 76 | struct list_head open_queue; /* list of transfered, but unfinished | 76 | struct list_head open_queue; /* list of transferred, but unfinished |
| 77 | requests */ | 77 | requests */ |
| 78 | unsigned int open_queue_depth; /* number of requests in the queue */ | 78 | unsigned int open_queue_depth; /* number of requests in the queue */ |
| 79 | 79 | ||
diff --git a/drivers/message/i2o/i2o_scsi.c b/drivers/message/i2o/i2o_scsi.c index 97bdf82ec905..f003957e8e1c 100644 --- a/drivers/message/i2o/i2o_scsi.c +++ b/drivers/message/i2o/i2o_scsi.c | |||
| @@ -204,7 +204,7 @@ static int i2o_scsi_remove(struct device *dev) | |||
| 204 | * i2o_scsi_probe - verify if dev is a I2O SCSI device and install it | 204 | * i2o_scsi_probe - verify if dev is a I2O SCSI device and install it |
| 205 | * @dev: device to verify if it is a I2O SCSI device | 205 | * @dev: device to verify if it is a I2O SCSI device |
| 206 | * | 206 | * |
| 207 | * Retrieve channel, id and lun for I2O device. If everthing goes well | 207 | * Retrieve channel, id and lun for I2O device. If everything goes well |
| 208 | * register the I2O device as SCSI device on the I2O SCSI controller. | 208 | * register the I2O device as SCSI device on the I2O SCSI controller. |
| 209 | * | 209 | * |
| 210 | * Returns 0 on success or negative error code on failure. | 210 | * Returns 0 on success or negative error code on failure. |
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index e2fea580585a..3ed3ff06be5d 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig | |||
| @@ -201,7 +201,7 @@ config TWL4030_POWER | |||
| 201 | as clock request handshaking. | 201 | as clock request handshaking. |
| 202 | 202 | ||
| 203 | This driver uses board-specific data to initialize the resources | 203 | This driver uses board-specific data to initialize the resources |
| 204 | and load scripts controling which resources are switched off/on | 204 | and load scripts controlling which resources are switched off/on |
| 205 | or reset when a sleep, wakeup or warm reset event occurs. | 205 | or reset when a sleep, wakeup or warm reset event occurs. |
| 206 | 206 | ||
| 207 | config TWL4030_CODEC | 207 | config TWL4030_CODEC |
diff --git a/drivers/mfd/ab8500-gpadc.c b/drivers/mfd/ab8500-gpadc.c index bc93b2e8230c..6421ad1160de 100644 --- a/drivers/mfd/ab8500-gpadc.c +++ b/drivers/mfd/ab8500-gpadc.c | |||
| @@ -314,7 +314,7 @@ int ab8500_gpadc_convert(struct ab8500_gpadc *gpadc, u8 input) | |||
| 314 | /* wait for completion of conversion */ | 314 | /* wait for completion of conversion */ |
| 315 | if (!wait_for_completion_timeout(&gpadc->ab8500_gpadc_complete, 2*HZ)) { | 315 | if (!wait_for_completion_timeout(&gpadc->ab8500_gpadc_complete, 2*HZ)) { |
| 316 | dev_err(gpadc->dev, | 316 | dev_err(gpadc->dev, |
| 317 | "timeout: didnt recieve GPADC conversion interrupt\n"); | 317 | "timeout: didn't receive GPADC conversion interrupt\n"); |
| 318 | ret = -EINVAL; | 318 | ret = -EINVAL; |
| 319 | goto out; | 319 | goto out; |
| 320 | } | 320 | } |
diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c index f2f4029e21a0..43a76c41cfcc 100644 --- a/drivers/mfd/ezx-pcap.c +++ b/drivers/mfd/ezx-pcap.c | |||
| @@ -185,7 +185,7 @@ static void pcap_isr_work(struct work_struct *work) | |||
| 185 | ezx_pcap_read(pcap, PCAP_REG_MSR, &msr); | 185 | ezx_pcap_read(pcap, PCAP_REG_MSR, &msr); |
| 186 | ezx_pcap_read(pcap, PCAP_REG_ISR, &isr); | 186 | ezx_pcap_read(pcap, PCAP_REG_ISR, &isr); |
| 187 | 187 | ||
| 188 | /* We cant service/ack irqs that are assigned to port 2 */ | 188 | /* We can't service/ack irqs that are assigned to port 2 */ |
| 189 | if (!(pdata->config & PCAP_SECOND_PORT)) { | 189 | if (!(pdata->config & PCAP_SECOND_PORT)) { |
| 190 | ezx_pcap_read(pcap, PCAP_REG_INT_SEL, &int_sel); | 190 | ezx_pcap_read(pcap, PCAP_REG_INT_SEL, &int_sel); |
| 191 | isr &= ~int_sel; | 191 | isr &= ~int_sel; |
| @@ -457,7 +457,7 @@ static int __devinit ezx_pcap_probe(struct spi_device *spi) | |||
| 457 | pcap->workqueue = create_singlethread_workqueue("pcapd"); | 457 | pcap->workqueue = create_singlethread_workqueue("pcapd"); |
| 458 | if (!pcap->workqueue) { | 458 | if (!pcap->workqueue) { |
| 459 | ret = -ENOMEM; | 459 | ret = -ENOMEM; |
| 460 | dev_err(&spi->dev, "cant create pcap thread\n"); | 460 | dev_err(&spi->dev, "can't create pcap thread\n"); |
| 461 | goto free_pcap; | 461 | goto free_pcap; |
| 462 | } | 462 | } |
| 463 | 463 | ||
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c index d01574d98870..f4c8c844b913 100644 --- a/drivers/mfd/mfd-core.c +++ b/drivers/mfd/mfd-core.c | |||
| @@ -55,6 +55,19 @@ int mfd_cell_disable(struct platform_device *pdev) | |||
| 55 | } | 55 | } |
| 56 | EXPORT_SYMBOL(mfd_cell_disable); | 56 | EXPORT_SYMBOL(mfd_cell_disable); |
| 57 | 57 | ||
| 58 | static int mfd_platform_add_cell(struct platform_device *pdev, | ||
| 59 | const struct mfd_cell *cell) | ||
| 60 | { | ||
| 61 | if (!cell) | ||
| 62 | return 0; | ||
| 63 | |||
| 64 | pdev->mfd_cell = kmemdup(cell, sizeof(*cell), GFP_KERNEL); | ||
| 65 | if (!pdev->mfd_cell) | ||
| 66 | return -ENOMEM; | ||
| 67 | |||
| 68 | return 0; | ||
| 69 | } | ||
| 70 | |||
| 58 | static int mfd_add_device(struct device *parent, int id, | 71 | static int mfd_add_device(struct device *parent, int id, |
| 59 | const struct mfd_cell *cell, | 72 | const struct mfd_cell *cell, |
| 60 | struct resource *mem_base, | 73 | struct resource *mem_base, |
| @@ -75,7 +88,7 @@ static int mfd_add_device(struct device *parent, int id, | |||
| 75 | 88 | ||
| 76 | pdev->dev.parent = parent; | 89 | pdev->dev.parent = parent; |
| 77 | 90 | ||
| 78 | ret = platform_device_add_data(pdev, cell, sizeof(*cell)); | 91 | ret = mfd_platform_add_cell(pdev, cell); |
| 79 | if (ret) | 92 | if (ret) |
| 80 | goto fail_res; | 93 | goto fail_res; |
| 81 | 94 | ||
| @@ -123,7 +136,6 @@ static int mfd_add_device(struct device *parent, int id, | |||
| 123 | 136 | ||
| 124 | return 0; | 137 | return 0; |
| 125 | 138 | ||
| 126 | /* platform_device_del(pdev); */ | ||
| 127 | fail_res: | 139 | fail_res: |
| 128 | kfree(res); | 140 | kfree(res); |
| 129 | fail_device: | 141 | fail_device: |
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c index cb01209754e0..53450f433f10 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c | |||
| @@ -332,7 +332,7 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev) | |||
| 332 | int i; | 332 | int i; |
| 333 | 333 | ||
| 334 | if (!pdata) { | 334 | if (!pdata) { |
| 335 | dev_err(dev, "Missing platfrom data\n"); | 335 | dev_err(dev, "Missing platform data\n"); |
| 336 | ret = -ENOMEM; | 336 | ret = -ENOMEM; |
| 337 | goto end_probe; | 337 | goto end_probe; |
| 338 | } | 338 | } |
diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c index c7687f6a78a0..57868416c760 100644 --- a/drivers/mfd/pcf50633-core.c +++ b/drivers/mfd/pcf50633-core.c | |||
| @@ -51,7 +51,7 @@ static int __pcf50633_write(struct pcf50633 *pcf, u8 reg, int num, u8 *data) | |||
| 51 | 51 | ||
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | /* Read a block of upto 32 regs */ | 54 | /* Read a block of up to 32 regs */ |
| 55 | int pcf50633_read_block(struct pcf50633 *pcf, u8 reg, | 55 | int pcf50633_read_block(struct pcf50633 *pcf, u8 reg, |
| 56 | int nr_regs, u8 *data) | 56 | int nr_regs, u8 *data) |
| 57 | { | 57 | { |
| @@ -65,7 +65,7 @@ int pcf50633_read_block(struct pcf50633 *pcf, u8 reg, | |||
| 65 | } | 65 | } |
| 66 | EXPORT_SYMBOL_GPL(pcf50633_read_block); | 66 | EXPORT_SYMBOL_GPL(pcf50633_read_block); |
| 67 | 67 | ||
| 68 | /* Write a block of upto 32 regs */ | 68 | /* Write a block of up to 32 regs */ |
| 69 | int pcf50633_write_block(struct pcf50633 *pcf , u8 reg, | 69 | int pcf50633_write_block(struct pcf50633 *pcf , u8 reg, |
| 70 | int nr_regs, u8 *data) | 70 | int nr_regs, u8 *data) |
| 71 | { | 71 | { |
diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c index fa937052fbab..dfbae34e1804 100644 --- a/drivers/mfd/twl6030-irq.c +++ b/drivers/mfd/twl6030-irq.c | |||
| @@ -229,7 +229,7 @@ int twl6030_mmc_card_detect_config(void) | |||
| 229 | twl6030_interrupt_unmask(TWL6030_MMCDETECT_INT_MASK, | 229 | twl6030_interrupt_unmask(TWL6030_MMCDETECT_INT_MASK, |
| 230 | REG_INT_MSK_STS_B); | 230 | REG_INT_MSK_STS_B); |
| 231 | /* | 231 | /* |
| 232 | * Intially Configuring MMC_CTRL for receving interrupts & | 232 | * Initially Configuring MMC_CTRL for receiving interrupts & |
| 233 | * Card status on TWL6030 for MMC1 | 233 | * Card status on TWL6030 for MMC1 |
| 234 | */ | 234 | */ |
| 235 | ret = twl_i2c_read_u8(TWL6030_MODULE_ID0, ®_val, TWL6030_MMCCTRL); | 235 | ret = twl_i2c_read_u8(TWL6030_MODULE_ID0, ®_val, TWL6030_MMCCTRL); |
| @@ -275,7 +275,7 @@ int twl6030_mmc_card_detect(struct device *dev, int slot) | |||
| 275 | /* TWL6030 provide's Card detect support for | 275 | /* TWL6030 provide's Card detect support for |
| 276 | * only MMC1 controller. | 276 | * only MMC1 controller. |
| 277 | */ | 277 | */ |
| 278 | pr_err("Unkown MMC controller %d in %s\n", pdev->id, __func__); | 278 | pr_err("Unknown MMC controller %d in %s\n", pdev->id, __func__); |
| 279 | return ret; | 279 | return ret; |
| 280 | } | 280 | } |
| 281 | /* | 281 | /* |
diff --git a/drivers/mfd/ucb1400_core.c b/drivers/mfd/ucb1400_core.c index d73f84ba0f08..daf69527ed83 100644 --- a/drivers/mfd/ucb1400_core.c +++ b/drivers/mfd/ucb1400_core.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Copyright: MontaVista Software, Inc. | 8 | * Copyright: MontaVista Software, Inc. |
| 9 | * | 9 | * |
| 10 | * Spliting done by: Marek Vasut <marek.vasut@gmail.com> | 10 | * Spliting done by: Marek Vasut <marek.vasut@gmail.com> |
| 11 | * If something doesnt work and it worked before spliting, e-mail me, | 11 | * If something doesn't work and it worked before spliting, e-mail me, |
| 12 | * dont bother Nicolas please ;-) | 12 | * dont bother Nicolas please ;-) |
| 13 | * | 13 | * |
| 14 | * This program is free software; you can redistribute it and/or modify | 14 | * This program is free software; you can redistribute it and/or modify |
diff --git a/drivers/misc/bmp085.c b/drivers/misc/bmp085.c index ecd276ad6b19..5f898cb706a6 100644 --- a/drivers/misc/bmp085.c +++ b/drivers/misc/bmp085.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | This driver supports the bmp085 digital barometric pressure | 3 | This driver supports the bmp085 digital barometric pressure |
| 4 | and temperature sensor from Bosch Sensortec. The datasheet | 4 | and temperature sensor from Bosch Sensortec. The datasheet |
| 5 | is avaliable from their website: | 5 | is available from their website: |
| 6 | http://www.bosch-sensortec.com/content/language1/downloads/BST-BMP085-DS000-05.pdf | 6 | http://www.bosch-sensortec.com/content/language1/downloads/BST-BMP085-DS000-05.pdf |
| 7 | 7 | ||
| 8 | A pressure measurement is issued by reading from pressure0_input. | 8 | A pressure measurement is issued by reading from pressure0_input. |
| @@ -429,7 +429,7 @@ static int __devinit bmp085_probe(struct i2c_client *client, | |||
| 429 | if (err) | 429 | if (err) |
| 430 | goto exit_free; | 430 | goto exit_free; |
| 431 | 431 | ||
| 432 | dev_info(&data->client->dev, "Succesfully initialized bmp085!\n"); | 432 | dev_info(&data->client->dev, "Successfully initialized bmp085!\n"); |
| 433 | goto exit; | 433 | goto exit; |
| 434 | 434 | ||
| 435 | exit_free: | 435 | exit_free: |
diff --git a/drivers/misc/c2port/c2port-duramar2150.c b/drivers/misc/c2port/c2port-duramar2150.c index 338dcc121507..778fc3fdfb9b 100644 --- a/drivers/misc/c2port/c2port-duramar2150.c +++ b/drivers/misc/c2port/c2port-duramar2150.c | |||
| @@ -41,7 +41,7 @@ static void duramar2150_c2port_access(struct c2port_device *dev, int status) | |||
| 41 | outb(v | (C2D | C2CK), DIR_PORT); | 41 | outb(v | (C2D | C2CK), DIR_PORT); |
| 42 | else | 42 | else |
| 43 | /* When access is "off" is important that both lines are set | 43 | /* When access is "off" is important that both lines are set |
| 44 | * as inputs or hi-impedence */ | 44 | * as inputs or hi-impedance */ |
| 45 | outb(v & ~(C2D | C2CK), DIR_PORT); | 45 | outb(v & ~(C2D | C2CK), DIR_PORT); |
| 46 | 46 | ||
| 47 | mutex_unlock(&update_lock); | 47 | mutex_unlock(&update_lock); |
diff --git a/drivers/misc/ibmasm/remote.h b/drivers/misc/ibmasm/remote.h index 72acf5af7a2a..00dbf1d4373a 100644 --- a/drivers/misc/ibmasm/remote.h +++ b/drivers/misc/ibmasm/remote.h | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | * | 20 | * |
| 21 | * Author: Max Asböck <amax@us.ibm.com> | 21 | * Author: Max Asböck <amax@us.ibm.com> |
| 22 | * | 22 | * |
| 23 | * Orignally written by Pete Reynolds | 23 | * Originally written by Pete Reynolds |
| 24 | */ | 24 | */ |
| 25 | 25 | ||
| 26 | #ifndef _IBMASM_REMOTE_H_ | 26 | #ifndef _IBMASM_REMOTE_H_ |
diff --git a/drivers/misc/iwmc3200top/main.c b/drivers/misc/iwmc3200top/main.c index 727af07f1fbd..b1f4563be9ae 100644 --- a/drivers/misc/iwmc3200top/main.c +++ b/drivers/misc/iwmc3200top/main.c | |||
| @@ -268,7 +268,7 @@ static void iwmct_irq_read_worker(struct work_struct *ws) | |||
| 268 | LOG_INFO(priv, IRQ, "ACK barker arrived " | 268 | LOG_INFO(priv, IRQ, "ACK barker arrived " |
| 269 | "- starting FW download\n"); | 269 | "- starting FW download\n"); |
| 270 | } else { /* REBOOT barker */ | 270 | } else { /* REBOOT barker */ |
| 271 | LOG_INFO(priv, IRQ, "Recieved reboot barker: %x\n", barker); | 271 | LOG_INFO(priv, IRQ, "Received reboot barker: %x\n", barker); |
| 272 | priv->barker = barker; | 272 | priv->barker = barker; |
| 273 | 273 | ||
| 274 | if (barker & BARKER_DNLOAD_SYNC_MSK) { | 274 | if (barker & BARKER_DNLOAD_SYNC_MSK) { |
diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c index 27dc463097f3..74f16f167b8e 100644 --- a/drivers/misc/kgdbts.c +++ b/drivers/misc/kgdbts.c | |||
| @@ -645,7 +645,7 @@ static int validate_simple_test(char *put_str) | |||
| 645 | 645 | ||
| 646 | while (*chk_str != '\0' && *put_str != '\0') { | 646 | while (*chk_str != '\0' && *put_str != '\0') { |
| 647 | /* If someone does a * to match the rest of the string, allow | 647 | /* If someone does a * to match the rest of the string, allow |
| 648 | * it, or stop if the recieved string is complete. | 648 | * it, or stop if the received string is complete. |
| 649 | */ | 649 | */ |
| 650 | if (*put_str == '#' || *chk_str == '*') | 650 | if (*put_str == '#' || *chk_str == '*') |
| 651 | return 0; | 651 | return 0; |
diff --git a/drivers/misc/sgi-gru/grufile.c b/drivers/misc/sgi-gru/grufile.c index 20e4e9395b61..ecafa4ba238b 100644 --- a/drivers/misc/sgi-gru/grufile.c +++ b/drivers/misc/sgi-gru/grufile.c | |||
| @@ -348,15 +348,15 @@ static unsigned long gru_chiplet_cpu_to_mmr(int chiplet, int cpu, int *corep) | |||
| 348 | 348 | ||
| 349 | static int gru_irq_count[GRU_CHIPLETS_PER_BLADE]; | 349 | static int gru_irq_count[GRU_CHIPLETS_PER_BLADE]; |
| 350 | 350 | ||
| 351 | static void gru_noop(unsigned int irq) | 351 | static void gru_noop(struct irq_data *d) |
| 352 | { | 352 | { |
| 353 | } | 353 | } |
| 354 | 354 | ||
| 355 | static struct irq_chip gru_chip[GRU_CHIPLETS_PER_BLADE] = { | 355 | static struct irq_chip gru_chip[GRU_CHIPLETS_PER_BLADE] = { |
| 356 | [0 ... GRU_CHIPLETS_PER_BLADE - 1] { | 356 | [0 ... GRU_CHIPLETS_PER_BLADE - 1] { |
| 357 | .mask = gru_noop, | 357 | .irq_mask = gru_noop, |
| 358 | .unmask = gru_noop, | 358 | .irq_unmask = gru_noop, |
| 359 | .ack = gru_noop | 359 | .irq_ack = gru_noop |
| 360 | } | 360 | } |
| 361 | }; | 361 | }; |
| 362 | 362 | ||
diff --git a/drivers/misc/sgi-gru/grukservices.c b/drivers/misc/sgi-gru/grukservices.c index 34749ee88dfa..9e9bddaa95ae 100644 --- a/drivers/misc/sgi-gru/grukservices.c +++ b/drivers/misc/sgi-gru/grukservices.c | |||
| @@ -229,7 +229,7 @@ again: | |||
| 229 | bid = blade_id < 0 ? uv_numa_blade_id() : blade_id; | 229 | bid = blade_id < 0 ? uv_numa_blade_id() : blade_id; |
| 230 | bs = gru_base[bid]; | 230 | bs = gru_base[bid]; |
| 231 | 231 | ||
| 232 | /* Handle the case where migration occured while waiting for the sema */ | 232 | /* Handle the case where migration occurred while waiting for the sema */ |
| 233 | down_read(&bs->bs_kgts_sema); | 233 | down_read(&bs->bs_kgts_sema); |
| 234 | if (blade_id < 0 && bid != uv_numa_blade_id()) { | 234 | if (blade_id < 0 && bid != uv_numa_blade_id()) { |
| 235 | up_read(&bs->bs_kgts_sema); | 235 | up_read(&bs->bs_kgts_sema); |
diff --git a/drivers/misc/sgi-gru/grutables.h b/drivers/misc/sgi-gru/grutables.h index 7a8b9068ea03..5c3ce2459675 100644 --- a/drivers/misc/sgi-gru/grutables.h +++ b/drivers/misc/sgi-gru/grutables.h | |||
| @@ -379,7 +379,7 @@ struct gru_thread_state { | |||
| 379 | required for contest */ | 379 | required for contest */ |
| 380 | char ts_cch_req_slice;/* CCH packet slice */ | 380 | char ts_cch_req_slice;/* CCH packet slice */ |
| 381 | char ts_blade; /* If >= 0, migrate context if | 381 | char ts_blade; /* If >= 0, migrate context if |
| 382 | ref from diferent blade */ | 382 | ref from different blade */ |
| 383 | char ts_force_cch_reload; | 383 | char ts_force_cch_reload; |
| 384 | char ts_cbr_idx[GRU_CBR_AU];/* CBR numbers of each | 384 | char ts_cbr_idx[GRU_CBR_AU];/* CBR numbers of each |
| 385 | allocated CB */ | 385 | allocated CB */ |
diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c index 9ee4c788aa69..b4488c8f6b23 100644 --- a/drivers/misc/ti-st/st_kim.c +++ b/drivers/misc/ti-st/st_kim.c | |||
| @@ -649,7 +649,7 @@ static int kim_probe(struct platform_device *pdev) | |||
| 649 | /* multiple devices could exist */ | 649 | /* multiple devices could exist */ |
| 650 | st_kim_devices[pdev->id] = pdev; | 650 | st_kim_devices[pdev->id] = pdev; |
| 651 | } else { | 651 | } else { |
| 652 | /* platform's sure about existance of 1 device */ | 652 | /* platform's sure about existence of 1 device */ |
| 653 | st_kim_devices[0] = pdev; | 653 | st_kim_devices[0] = pdev; |
| 654 | } | 654 | } |
| 655 | 655 | ||
diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index f5cedeccad42..abc1a63bcc5e 100644 --- a/drivers/mmc/card/mmc_test.c +++ b/drivers/mmc/card/mmc_test.c | |||
| @@ -292,7 +292,7 @@ static void mmc_test_free_mem(struct mmc_test_mem *mem) | |||
| 292 | } | 292 | } |
| 293 | 293 | ||
| 294 | /* | 294 | /* |
| 295 | * Allocate a lot of memory, preferrably max_sz but at least min_sz. In case | 295 | * Allocate a lot of memory, preferably max_sz but at least min_sz. In case |
| 296 | * there isn't much memory do not exceed 1/16th total lowmem pages. Also do | 296 | * there isn't much memory do not exceed 1/16th total lowmem pages. Also do |
| 297 | * not exceed a maximum number of segments and try not to make segments much | 297 | * not exceed a maximum number of segments and try not to make segments much |
| 298 | * bigger than maximum segment size. | 298 | * bigger than maximum segment size. |
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 14e95f39a7bf..772d0d0a541b 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c | |||
| @@ -538,7 +538,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, | |||
| 538 | 538 | ||
| 539 | /* | 539 | /* |
| 540 | * If enhanced_area_en is TRUE, host needs to enable ERASE_GRP_DEF | 540 | * If enhanced_area_en is TRUE, host needs to enable ERASE_GRP_DEF |
| 541 | * bit. This bit will be lost everytime after a reset or power off. | 541 | * bit. This bit will be lost every time after a reset or power off. |
| 542 | */ | 542 | */ |
| 543 | if (card->ext_csd.enhanced_area_en) { | 543 | if (card->ext_csd.enhanced_area_en) { |
| 544 | err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, | 544 | err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, |
diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c index 60842f878ded..f3b22bf89cc9 100644 --- a/drivers/mmc/core/mmc_ops.c +++ b/drivers/mmc/core/mmc_ops.c | |||
| @@ -105,7 +105,7 @@ int mmc_go_idle(struct mmc_host *host) | |||
| 105 | * that in case of hardware that won't pull up DAT3/nCS otherwise. | 105 | * that in case of hardware that won't pull up DAT3/nCS otherwise. |
| 106 | * | 106 | * |
| 107 | * SPI hosts ignore ios.chip_select; it's managed according to | 107 | * SPI hosts ignore ios.chip_select; it's managed according to |
| 108 | * rules that must accomodate non-MMC slaves which this layer | 108 | * rules that must accommodate non-MMC slaves which this layer |
| 109 | * won't even know about. | 109 | * won't even know about. |
| 110 | */ | 110 | */ |
| 111 | if (!mmc_host_is_spi(host)) { | 111 | if (!mmc_host_is_spi(host)) { |
diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c index bb192f90e8e9..b3001617e67d 100644 --- a/drivers/mmc/core/sdio_irq.c +++ b/drivers/mmc/core/sdio_irq.c | |||
| @@ -45,7 +45,7 @@ static int process_sdio_pending_irqs(struct mmc_card *card) | |||
| 45 | struct sdio_func *func = card->sdio_func[i - 1]; | 45 | struct sdio_func *func = card->sdio_func[i - 1]; |
| 46 | if (!func) { | 46 | if (!func) { |
| 47 | printk(KERN_WARNING "%s: pending IRQ for " | 47 | printk(KERN_WARNING "%s: pending IRQ for " |
| 48 | "non-existant function\n", | 48 | "non-existent function\n", |
| 49 | mmc_card_id(card)); | 49 | mmc_card_id(card)); |
| 50 | ret = -EINVAL; | 50 | ret = -EINVAL; |
| 51 | } else if (func->irq_handler) { | 51 | } else if (func->irq_handler) { |
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 80bc9a5c25cc..ea3888b65d5d 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c | |||
| @@ -127,7 +127,7 @@ struct atmel_mci_dma { | |||
| 127 | * EVENT_DATA_COMPLETE is set in @pending_events, all data-related | 127 | * EVENT_DATA_COMPLETE is set in @pending_events, all data-related |
| 128 | * interrupts must be disabled and @data_status updated with a | 128 | * interrupts must be disabled and @data_status updated with a |
| 129 | * snapshot of SR. Similarly, before EVENT_CMD_COMPLETE is set, the | 129 | * snapshot of SR. Similarly, before EVENT_CMD_COMPLETE is set, the |
| 130 | * CMDRDY interupt must be disabled and @cmd_status updated with a | 130 | * CMDRDY interrupt must be disabled and @cmd_status updated with a |
| 131 | * snapshot of SR, and before EVENT_XFER_COMPLETE can be set, the | 131 | * snapshot of SR, and before EVENT_XFER_COMPLETE can be set, the |
| 132 | * bytes_xfered field of @data must be written. This is ensured by | 132 | * bytes_xfered field of @data must be written. This is ensured by |
| 133 | * using barriers. | 133 | * using barriers. |
| @@ -1082,7 +1082,7 @@ static void atmci_request_end(struct atmel_mci *host, struct mmc_request *mrq) | |||
| 1082 | /* | 1082 | /* |
| 1083 | * Update the MMC clock rate if necessary. This may be | 1083 | * Update the MMC clock rate if necessary. This may be |
| 1084 | * necessary if set_ios() is called when a different slot is | 1084 | * necessary if set_ios() is called when a different slot is |
| 1085 | * busy transfering data. | 1085 | * busy transferring data. |
| 1086 | */ | 1086 | */ |
| 1087 | if (host->need_clock_update) { | 1087 | if (host->need_clock_update) { |
| 1088 | mci_writel(host, MR, host->mode_reg); | 1088 | mci_writel(host, MR, host->mode_reg); |
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c index 2f7fc0c5146f..7c1e16aaf17f 100644 --- a/drivers/mmc/host/mmc_spi.c +++ b/drivers/mmc/host/mmc_spi.c | |||
| @@ -99,7 +99,7 @@ | |||
| 99 | #define r1b_timeout (HZ * 3) | 99 | #define r1b_timeout (HZ * 3) |
| 100 | 100 | ||
| 101 | /* One of the critical speed parameters is the amount of data which may | 101 | /* One of the critical speed parameters is the amount of data which may |
| 102 | * be transfered in one command. If this value is too low, the SD card | 102 | * be transferred in one command. If this value is too low, the SD card |
| 103 | * controller has to do multiple partial block writes (argggh!). With | 103 | * controller has to do multiple partial block writes (argggh!). With |
| 104 | * today (2008) SD cards there is little speed gain if we transfer more | 104 | * today (2008) SD cards there is little speed gain if we transfer more |
| 105 | * than 64 KBytes at a time. So use this value until there is any indication | 105 | * than 64 KBytes at a time. So use this value until there is any indication |
diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index 1ccd4b256cee..a04f87d7ee3d 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c | |||
| @@ -874,7 +874,7 @@ static void finalize_request(struct s3cmci_host *host) | |||
| 874 | if (!mrq->data) | 874 | if (!mrq->data) |
| 875 | goto request_done; | 875 | goto request_done; |
| 876 | 876 | ||
| 877 | /* Calulate the amout of bytes transfer if there was no error */ | 877 | /* Calculate the amout of bytes transfer if there was no error */ |
| 878 | if (mrq->data->error == 0) { | 878 | if (mrq->data->error == 0) { |
| 879 | mrq->data->bytes_xfered = | 879 | mrq->data->bytes_xfered = |
| 880 | (mrq->data->blocks * mrq->data->blksz); | 880 | (mrq->data->blocks * mrq->data->blksz); |
| @@ -882,7 +882,7 @@ static void finalize_request(struct s3cmci_host *host) | |||
| 882 | mrq->data->bytes_xfered = 0; | 882 | mrq->data->bytes_xfered = 0; |
| 883 | } | 883 | } |
| 884 | 884 | ||
| 885 | /* If we had an error while transfering data we flush the | 885 | /* If we had an error while transferring data we flush the |
| 886 | * DMA channel and the fifo to clear out any garbage. */ | 886 | * DMA channel and the fifo to clear out any garbage. */ |
| 887 | if (mrq->data->error != 0) { | 887 | if (mrq->data->error != 0) { |
| 888 | if (s3cmci_host_usedma(host)) | 888 | if (s3cmci_host_usedma(host)) |
| @@ -980,7 +980,7 @@ static int s3cmci_setup_data(struct s3cmci_host *host, struct mmc_data *data) | |||
| 980 | 980 | ||
| 981 | if ((data->blksz & 3) != 0) { | 981 | if ((data->blksz & 3) != 0) { |
| 982 | /* We cannot deal with unaligned blocks with more than | 982 | /* We cannot deal with unaligned blocks with more than |
| 983 | * one block being transfered. */ | 983 | * one block being transferred. */ |
| 984 | 984 | ||
| 985 | if (data->blocks > 1) { | 985 | if (data->blocks > 1) { |
| 986 | pr_warning("%s: can't do non-word sized block transfers (blksz %d)\n", __func__, data->blksz); | 986 | pr_warning("%s: can't do non-word sized block transfers (blksz %d)\n", __func__, data->blksz); |
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index 6ae8d2f00ec7..62d37de6de76 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c | |||
| @@ -355,7 +355,7 @@ static int tmio_mmc_start_command(struct tmio_mmc_host *host, struct mmc_command | |||
| 355 | /* | 355 | /* |
| 356 | * This chip always returns (at least?) as much data as you ask for. | 356 | * This chip always returns (at least?) as much data as you ask for. |
| 357 | * I'm unsure what happens if you ask for less than a block. This should be | 357 | * I'm unsure what happens if you ask for less than a block. This should be |
| 358 | * looked into to ensure that a funny length read doesnt hose the controller. | 358 | * looked into to ensure that a funny length read doesn't hose the controller. |
| 359 | */ | 359 | */ |
| 360 | static void tmio_mmc_pio_irq(struct tmio_mmc_host *host) | 360 | static void tmio_mmc_pio_irq(struct tmio_mmc_host *host) |
| 361 | { | 361 | { |
diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c index 7fca0a386ba0..62e5a4d171e1 100644 --- a/drivers/mmc/host/wbsd.c +++ b/drivers/mmc/host/wbsd.c | |||
| @@ -484,7 +484,7 @@ static void wbsd_fill_fifo(struct wbsd_host *host) | |||
| 484 | 484 | ||
| 485 | /* | 485 | /* |
| 486 | * Check that we aren't being called after the | 486 | * Check that we aren't being called after the |
| 487 | * entire buffer has been transfered. | 487 | * entire buffer has been transferred. |
| 488 | */ | 488 | */ |
| 489 | if (host->num_sg == 0) | 489 | if (host->num_sg == 0) |
| 490 | return; | 490 | return; |
| @@ -828,7 +828,7 @@ static void wbsd_request(struct mmc_host *mmc, struct mmc_request *mrq) | |||
| 828 | /* | 828 | /* |
| 829 | * If this is a data transfer the request | 829 | * If this is a data transfer the request |
| 830 | * will be finished after the data has | 830 | * will be finished after the data has |
| 831 | * transfered. | 831 | * transferred. |
| 832 | */ | 832 | */ |
| 833 | if (cmd->data && !cmd->error) { | 833 | if (cmd->data && !cmd->error) { |
| 834 | /* | 834 | /* |
| @@ -904,7 +904,7 @@ static void wbsd_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
| 904 | setup &= ~WBSD_DAT3_H; | 904 | setup &= ~WBSD_DAT3_H; |
| 905 | 905 | ||
| 906 | /* | 906 | /* |
| 907 | * We cannot resume card detection immediatly | 907 | * We cannot resume card detection immediately |
| 908 | * because of capacitance and delays in the chip. | 908 | * because of capacitance and delays in the chip. |
| 909 | */ | 909 | */ |
| 910 | mod_timer(&host->ignore_timer, jiffies + HZ / 100); | 910 | mod_timer(&host->ignore_timer, jiffies + HZ / 100); |
diff --git a/drivers/mtd/chips/Kconfig b/drivers/mtd/chips/Kconfig index 35c6a23b183b..b1e3c26edd6d 100644 --- a/drivers/mtd/chips/Kconfig +++ b/drivers/mtd/chips/Kconfig | |||
| @@ -19,7 +19,7 @@ config MTD_JEDECPROBE | |||
| 19 | help | 19 | help |
| 20 | This option enables JEDEC-style probing of flash chips which are not | 20 | This option enables JEDEC-style probing of flash chips which are not |
| 21 | compatible with the Common Flash Interface, but will use the common | 21 | compatible with the Common Flash Interface, but will use the common |
| 22 | CFI-targetted flash drivers for any chips which are identified which | 22 | CFI-targeted flash drivers for any chips which are identified which |
| 23 | are in fact compatible in all but the probe method. This actually | 23 | are in fact compatible in all but the probe method. This actually |
| 24 | covers most AMD/Fujitsu-compatible chips and also non-CFI | 24 | covers most AMD/Fujitsu-compatible chips and also non-CFI |
| 25 | Intel chips. | 25 | Intel chips. |
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index 092aef11120c..09cb7c8d93b4 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c | |||
| @@ -1247,12 +1247,12 @@ static int inval_cache_and_wait_for_operation( | |||
| 1247 | break; | 1247 | break; |
| 1248 | 1248 | ||
| 1249 | if (chip->erase_suspended && chip_state == FL_ERASING) { | 1249 | if (chip->erase_suspended && chip_state == FL_ERASING) { |
| 1250 | /* Erase suspend occured while sleep: reset timeout */ | 1250 | /* Erase suspend occurred while sleep: reset timeout */ |
| 1251 | timeo = reset_timeo; | 1251 | timeo = reset_timeo; |
| 1252 | chip->erase_suspended = 0; | 1252 | chip->erase_suspended = 0; |
| 1253 | } | 1253 | } |
| 1254 | if (chip->write_suspended && chip_state == FL_WRITING) { | 1254 | if (chip->write_suspended && chip_state == FL_WRITING) { |
| 1255 | /* Write suspend occured while sleep: reset timeout */ | 1255 | /* Write suspend occurred while sleep: reset timeout */ |
| 1256 | timeo = reset_timeo; | 1256 | timeo = reset_timeo; |
| 1257 | chip->write_suspended = 0; | 1257 | chip->write_suspended = 0; |
| 1258 | } | 1258 | } |
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index f9a5331e9445..0b49266840b9 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c | |||
| @@ -263,7 +263,7 @@ static void fixup_old_sst_eraseregion(struct mtd_info *mtd) | |||
| 263 | struct cfi_private *cfi = map->fldrv_priv; | 263 | struct cfi_private *cfi = map->fldrv_priv; |
| 264 | 264 | ||
| 265 | /* | 265 | /* |
| 266 | * These flashes report two seperate eraseblock regions based on the | 266 | * These flashes report two separate eraseblock regions based on the |
| 267 | * sector_erase-size and block_erase-size, although they both operate on the | 267 | * sector_erase-size and block_erase-size, although they both operate on the |
| 268 | * same memory. This is not allowed according to CFI, so we just pick the | 268 | * same memory. This is not allowed according to CFI, so we just pick the |
| 269 | * sector_erase-size. | 269 | * sector_erase-size. |
| @@ -611,8 +611,8 @@ static struct mtd_info *cfi_amdstd_setup(struct mtd_info *mtd) | |||
| 611 | * | 611 | * |
| 612 | * Note that anything more complicated than checking if no bits are toggling | 612 | * Note that anything more complicated than checking if no bits are toggling |
| 613 | * (including checking DQ5 for an error status) is tricky to get working | 613 | * (including checking DQ5 for an error status) is tricky to get working |
| 614 | * correctly and is therefore not done (particulary with interleaved chips | 614 | * correctly and is therefore not done (particularly with interleaved chips |
| 615 | * as each chip must be checked independantly of the others). | 615 | * as each chip must be checked independently of the others). |
| 616 | */ | 616 | */ |
| 617 | static int __xipram chip_ready(struct map_info *map, unsigned long addr) | 617 | static int __xipram chip_ready(struct map_info *map, unsigned long addr) |
| 618 | { | 618 | { |
| @@ -635,8 +635,8 @@ static int __xipram chip_ready(struct map_info *map, unsigned long addr) | |||
| 635 | * | 635 | * |
| 636 | * Note that anything more complicated than checking if no bits are toggling | 636 | * Note that anything more complicated than checking if no bits are toggling |
| 637 | * (including checking DQ5 for an error status) is tricky to get working | 637 | * (including checking DQ5 for an error status) is tricky to get working |
| 638 | * correctly and is therefore not done (particulary with interleaved chips | 638 | * correctly and is therefore not done (particularly with interleaved chips |
| 639 | * as each chip must be checked independantly of the others). | 639 | * as each chip must be checked independently of the others). |
| 640 | * | 640 | * |
| 641 | */ | 641 | */ |
| 642 | static int __xipram chip_good(struct map_info *map, unsigned long addr, map_word expected) | 642 | static int __xipram chip_good(struct map_info *map, unsigned long addr, map_word expected) |
diff --git a/drivers/mtd/chips/cfi_util.c b/drivers/mtd/chips/cfi_util.c index 6ae3d111e1e7..8e464054a631 100644 --- a/drivers/mtd/chips/cfi_util.c +++ b/drivers/mtd/chips/cfi_util.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Common Flash Interface support: | 2 | * Common Flash Interface support: |
| 3 | * Generic utility functions not dependant on command set | 3 | * Generic utility functions not dependent on command set |
| 4 | * | 4 | * |
| 5 | * Copyright (C) 2002 Red Hat | 5 | * Copyright (C) 2002 Red Hat |
| 6 | * Copyright (C) 2003 STMicroelectronics Limited | 6 | * Copyright (C) 2003 STMicroelectronics Limited |
diff --git a/drivers/mtd/chips/jedec_probe.c b/drivers/mtd/chips/jedec_probe.c index 4e1be51cc122..ea832ea0e4aa 100644 --- a/drivers/mtd/chips/jedec_probe.c +++ b/drivers/mtd/chips/jedec_probe.c | |||
| @@ -2075,7 +2075,7 @@ static inline int jedec_match( uint32_t base, | |||
| 2075 | } | 2075 | } |
| 2076 | 2076 | ||
| 2077 | /* | 2077 | /* |
| 2078 | * Make sure the ID's dissappear when the device is taken out of | 2078 | * Make sure the ID's disappear when the device is taken out of |
| 2079 | * ID mode. The only time this should fail when it should succeed | 2079 | * ID mode. The only time this should fail when it should succeed |
| 2080 | * is when the ID's are written as data to the same | 2080 | * is when the ID's are written as data to the same |
| 2081 | * addresses. For this rare and unfortunate case the chip | 2081 | * addresses. For this rare and unfortunate case the chip |
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c index f29a6f9df6e7..97183c8c9e33 100644 --- a/drivers/mtd/devices/block2mtd.c +++ b/drivers/mtd/devices/block2mtd.c | |||
| @@ -295,7 +295,7 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size) | |||
| 295 | dev->mtd.owner = THIS_MODULE; | 295 | dev->mtd.owner = THIS_MODULE; |
| 296 | 296 | ||
| 297 | if (add_mtd_device(&dev->mtd)) { | 297 | if (add_mtd_device(&dev->mtd)) { |
| 298 | /* Device didnt get added, so free the entry */ | 298 | /* Device didn't get added, so free the entry */ |
| 299 | goto devinit_err; | 299 | goto devinit_err; |
| 300 | } | 300 | } |
| 301 | list_add(&dev->list, &blkmtd_device_list); | 301 | list_add(&dev->list, &blkmtd_device_list); |
diff --git a/drivers/mtd/devices/doc2001plus.c b/drivers/mtd/devices/doc2001plus.c index 719b2915dc3a..8b36fa77a195 100644 --- a/drivers/mtd/devices/doc2001plus.c +++ b/drivers/mtd/devices/doc2001plus.c | |||
| @@ -90,7 +90,7 @@ static inline int DoC_WaitReady(void __iomem * docptr) | |||
| 90 | return ret; | 90 | return ret; |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | /* For some reason the Millennium Plus seems to occassionally put itself | 93 | /* For some reason the Millennium Plus seems to occasionally put itself |
| 94 | * into reset mode. For me this happens randomly, with no pattern that I | 94 | * into reset mode. For me this happens randomly, with no pattern that I |
| 95 | * can detect. M-systems suggest always check this on any block level | 95 | * can detect. M-systems suggest always check this on any block level |
| 96 | * operation and setting to normal mode if in reset mode. | 96 | * operation and setting to normal mode if in reset mode. |
diff --git a/drivers/mtd/devices/docecc.c b/drivers/mtd/devices/docecc.c index a99838bb2dc0..37ef29a73ee4 100644 --- a/drivers/mtd/devices/docecc.c +++ b/drivers/mtd/devices/docecc.c | |||
| @@ -109,7 +109,7 @@ for(ci=(n)-1;ci >=0;ci--)\ | |||
| 109 | of the integer "alpha_to[i]" with a(0) being the LSB and a(m-1) the MSB. Thus for | 109 | of the integer "alpha_to[i]" with a(0) being the LSB and a(m-1) the MSB. Thus for |
| 110 | example the polynomial representation of @^5 would be given by the binary | 110 | example the polynomial representation of @^5 would be given by the binary |
| 111 | representation of the integer "alpha_to[5]". | 111 | representation of the integer "alpha_to[5]". |
| 112 | Similarily, index_of[] can be used as follows: | 112 | Similarly, index_of[] can be used as follows: |
| 113 | As above, let @ represent the primitive element of GF(2^m) that is | 113 | As above, let @ represent the primitive element of GF(2^m) that is |
| 114 | the root of the primitive polynomial p(x). In order to find the power | 114 | the root of the primitive polynomial p(x). In order to find the power |
| 115 | of @ (alpha) that has the polynomial representation | 115 | of @ (alpha) that has the polynomial representation |
| @@ -121,7 +121,7 @@ for(ci=(n)-1;ci >=0;ci--)\ | |||
| 121 | NOTE: | 121 | NOTE: |
| 122 | The element alpha_to[2^m-1] = 0 always signifying that the | 122 | The element alpha_to[2^m-1] = 0 always signifying that the |
| 123 | representation of "@^infinity" = 0 is (0,0,0,...,0). | 123 | representation of "@^infinity" = 0 is (0,0,0,...,0). |
| 124 | Similarily, the element index_of[0] = A0 always signifying | 124 | Similarly, the element index_of[0] = A0 always signifying |
| 125 | that the power of alpha which has the polynomial representation | 125 | that the power of alpha which has the polynomial representation |
| 126 | (0,0,...,0) is "infinity". | 126 | (0,0,...,0) is "infinity". |
| 127 | 127 | ||
diff --git a/drivers/mtd/devices/lart.c b/drivers/mtd/devices/lart.c index caf604167f03..4b829f97d56c 100644 --- a/drivers/mtd/devices/lart.c +++ b/drivers/mtd/devices/lart.c | |||
| @@ -353,7 +353,7 @@ static inline int erase_block (__u32 offset) | |||
| 353 | /* put the flash back into command mode */ | 353 | /* put the flash back into command mode */ |
| 354 | write32 (DATA_TO_FLASH (READ_ARRAY),offset); | 354 | write32 (DATA_TO_FLASH (READ_ARRAY),offset); |
| 355 | 355 | ||
| 356 | /* was the erase successfull? */ | 356 | /* was the erase successful? */ |
| 357 | if ((status & STATUS_ERASE_ERR)) | 357 | if ((status & STATUS_ERASE_ERR)) |
| 358 | { | 358 | { |
| 359 | printk (KERN_WARNING "%s: erase error at address 0x%.8x.\n",module_name,offset); | 359 | printk (KERN_WARNING "%s: erase error at address 0x%.8x.\n",module_name,offset); |
| @@ -508,7 +508,7 @@ static inline int write_dword (__u32 offset,__u32 x) | |||
| 508 | /* put the flash back into command mode */ | 508 | /* put the flash back into command mode */ |
| 509 | write32 (DATA_TO_FLASH (READ_ARRAY),offset); | 509 | write32 (DATA_TO_FLASH (READ_ARRAY),offset); |
| 510 | 510 | ||
| 511 | /* was the write successfull? */ | 511 | /* was the write successful? */ |
| 512 | if ((status & STATUS_PGM_ERR) || read32 (offset) != x) | 512 | if ((status & STATUS_PGM_ERR) || read32 (offset) != x) |
| 513 | { | 513 | { |
| 514 | printk (KERN_WARNING "%s: write error at address 0x%.8x.\n",module_name,offset); | 514 | printk (KERN_WARNING "%s: write error at address 0x%.8x.\n",module_name,offset); |
diff --git a/drivers/mtd/devices/pmc551.c b/drivers/mtd/devices/pmc551.c index ef0aba0ce58f..41b8cdcc64cb 100644 --- a/drivers/mtd/devices/pmc551.c +++ b/drivers/mtd/devices/pmc551.c | |||
| @@ -351,7 +351,7 @@ static int pmc551_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
| 351 | * Fixup routines for the V370PDC | 351 | * Fixup routines for the V370PDC |
| 352 | * PCI device ID 0x020011b0 | 352 | * PCI device ID 0x020011b0 |
| 353 | * | 353 | * |
| 354 | * This function basicly kick starts the DRAM oboard the card and gets it | 354 | * This function basically kick starts the DRAM oboard the card and gets it |
| 355 | * ready to be used. Before this is done the device reads VERY erratic, so | 355 | * ready to be used. Before this is done the device reads VERY erratic, so |
| 356 | * much that it can crash the Linux 2.2.x series kernels when a user cat's | 356 | * much that it can crash the Linux 2.2.x series kernels when a user cat's |
| 357 | * /proc/pci .. though that is mainly a kernel bug in handling the PCI DEVSEL | 357 | * /proc/pci .. though that is mainly a kernel bug in handling the PCI DEVSEL |
| @@ -540,7 +540,7 @@ static u32 fixup_pmc551(struct pci_dev *dev) | |||
| 540 | 540 | ||
| 541 | /* | 541 | /* |
| 542 | * Check to make certain the DEVSEL is set correctly, this device | 542 | * Check to make certain the DEVSEL is set correctly, this device |
| 543 | * has a tendancy to assert DEVSEL and TRDY when a write is performed | 543 | * has a tendency to assert DEVSEL and TRDY when a write is performed |
| 544 | * to the memory when memory is read-only | 544 | * to the memory when memory is read-only |
| 545 | */ | 545 | */ |
| 546 | if ((cmd & PCI_STATUS_DEVSEL_MASK) != 0x0) { | 546 | if ((cmd & PCI_STATUS_DEVSEL_MASK) != 0x0) { |
diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c index 04fdfcca93f7..12679925b420 100644 --- a/drivers/mtd/lpddr/lpddr_cmds.c +++ b/drivers/mtd/lpddr/lpddr_cmds.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * erase, lock/unlock support for LPDDR flash memories | 3 | * erase, lock/unlock support for LPDDR flash memories |
| 4 | * (C) 2008 Korolev Alexey <akorolev@infradead.org> | 4 | * (C) 2008 Korolev Alexey <akorolev@infradead.org> |
| 5 | * (C) 2008 Vasiliy Leonenko <vasiliy.leonenko@gmail.com> | 5 | * (C) 2008 Vasiliy Leonenko <vasiliy.leonenko@gmail.com> |
| 6 | * Many thanks to Roman Borisov for intial enabling | 6 | * Many thanks to Roman Borisov for initial enabling |
| 7 | * | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or | 8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public License | 9 | * modify it under the terms of the GNU General Public License |
| @@ -171,7 +171,7 @@ static int wait_for_ready(struct map_info *map, struct flchip *chip, | |||
| 171 | mutex_lock(&chip->mutex); | 171 | mutex_lock(&chip->mutex); |
| 172 | } | 172 | } |
| 173 | if (chip->erase_suspended || chip->write_suspended) { | 173 | if (chip->erase_suspended || chip->write_suspended) { |
| 174 | /* Suspend has occured while sleep: reset timeout */ | 174 | /* Suspend has occurred while sleep: reset timeout */ |
| 175 | timeo = reset_timeo; | 175 | timeo = reset_timeo; |
| 176 | chip->erase_suspended = chip->write_suspended = 0; | 176 | chip->erase_suspended = chip->write_suspended = 0; |
| 177 | } | 177 | } |
diff --git a/drivers/mtd/maps/ceiva.c b/drivers/mtd/maps/ceiva.c index e5f645b775ad..23f551dc8ca8 100644 --- a/drivers/mtd/maps/ceiva.c +++ b/drivers/mtd/maps/ceiva.c | |||
| @@ -42,7 +42,7 @@ | |||
| 42 | * | 42 | * |
| 43 | * Please note: | 43 | * Please note: |
| 44 | * 1. The flash size given should be the largest flash size that can | 44 | * 1. The flash size given should be the largest flash size that can |
| 45 | * be accomodated. | 45 | * be accommodated. |
| 46 | * | 46 | * |
| 47 | * 2. The bus width must defined in clps_setup_flash. | 47 | * 2. The bus width must defined in clps_setup_flash. |
| 48 | * | 48 | * |
| @@ -58,7 +58,7 @@ | |||
| 58 | #define BOOT_PARTITION_SIZE_KiB (16) | 58 | #define BOOT_PARTITION_SIZE_KiB (16) |
| 59 | #define PARAMS_PARTITION_SIZE_KiB (8) | 59 | #define PARAMS_PARTITION_SIZE_KiB (8) |
| 60 | #define KERNEL_PARTITION_SIZE_KiB (4*128) | 60 | #define KERNEL_PARTITION_SIZE_KiB (4*128) |
| 61 | /* Use both remaing portion of first flash, and all of second flash */ | 61 | /* Use both remaining portion of first flash, and all of second flash */ |
| 62 | #define ROOT_PARTITION_SIZE_KiB (3*128) + (8*128) | 62 | #define ROOT_PARTITION_SIZE_KiB (3*128) + (8*128) |
| 63 | 63 | ||
| 64 | static struct mtd_partition ceiva_partitions[] = { | 64 | static struct mtd_partition ceiva_partitions[] = { |
diff --git a/drivers/mtd/maps/cfi_flagadm.c b/drivers/mtd/maps/cfi_flagadm.c index b4ed81611918..f71343cd77cc 100644 --- a/drivers/mtd/maps/cfi_flagadm.c +++ b/drivers/mtd/maps/cfi_flagadm.c | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | 33 | ||
| 34 | 34 | ||
| 35 | /* We split the flash chip up into four parts. | 35 | /* We split the flash chip up into four parts. |
| 36 | * 1: bootloader firts 128k (0x00000000 - 0x0001FFFF) size 0x020000 | 36 | * 1: bootloader first 128k (0x00000000 - 0x0001FFFF) size 0x020000 |
| 37 | * 2: kernel 640k (0x00020000 - 0x000BFFFF) size 0x0A0000 | 37 | * 2: kernel 640k (0x00020000 - 0x000BFFFF) size 0x0A0000 |
| 38 | * 3: compressed 1536k root ramdisk (0x000C0000 - 0x0023FFFF) size 0x180000 | 38 | * 3: compressed 1536k root ramdisk (0x000C0000 - 0x0023FFFF) size 0x180000 |
| 39 | * 4: writeable diskpartition (jffs)(0x00240000 - 0x003FFFFF) size 0x1C0000 | 39 | * 4: writeable diskpartition (jffs)(0x00240000 - 0x003FFFFF) size 0x1C0000 |
diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c index 917022948399..6799e75d74e0 100644 --- a/drivers/mtd/maps/pcmciamtd.c +++ b/drivers/mtd/maps/pcmciamtd.c | |||
| @@ -497,7 +497,7 @@ static int pcmciamtd_config(struct pcmcia_device *link) | |||
| 497 | dev->pcmcia_map.set_vpp = pcmciamtd_set_vpp; | 497 | dev->pcmcia_map.set_vpp = pcmciamtd_set_vpp; |
| 498 | 498 | ||
| 499 | /* Request a memory window for PCMCIA. Some architeures can map windows | 499 | /* Request a memory window for PCMCIA. Some architeures can map windows |
| 500 | * upto the maximum that PCMCIA can support (64MiB) - this is ideal and | 500 | * up to the maximum that PCMCIA can support (64MiB) - this is ideal and |
| 501 | * we aim for a window the size of the whole card - otherwise we try | 501 | * we aim for a window the size of the whole card - otherwise we try |
| 502 | * smaller windows until we succeed | 502 | * smaller windows until we succeed |
| 503 | */ | 503 | */ |
diff --git a/drivers/mtd/maps/pmcmsp-flash.c b/drivers/mtd/maps/pmcmsp-flash.c index acb13fa5001c..64aea6acd48e 100644 --- a/drivers/mtd/maps/pmcmsp-flash.c +++ b/drivers/mtd/maps/pmcmsp-flash.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * Config with both CFI and JEDEC device support. | 3 | * Config with both CFI and JEDEC device support. |
| 4 | * | 4 | * |
| 5 | * Basically physmap.c with the addition of partitions and | 5 | * Basically physmap.c with the addition of partitions and |
| 6 | * an array of mapping info to accomodate more than one flash type per board. | 6 | * an array of mapping info to accommodate more than one flash type per board. |
| 7 | * | 7 | * |
| 8 | * Copyright 2005-2007 PMC-Sierra, Inc. | 8 | * Copyright 2005-2007 PMC-Sierra, Inc. |
| 9 | * | 9 | * |
diff --git a/drivers/mtd/maps/sc520cdp.c b/drivers/mtd/maps/sc520cdp.c index 85c1e56309ec..4d8aaaf4bb76 100644 --- a/drivers/mtd/maps/sc520cdp.c +++ b/drivers/mtd/maps/sc520cdp.c | |||
| @@ -197,7 +197,7 @@ static void sc520cdp_setup_par(void) | |||
| 197 | } | 197 | } |
| 198 | 198 | ||
| 199 | /* | 199 | /* |
| 200 | ** Find the PARxx registers that are reponsible for activating | 200 | ** Find the PARxx registers that are responsible for activating |
| 201 | ** ROMCS0, ROMCS1 and BOOTCS. Reprogram each of these with a | 201 | ** ROMCS0, ROMCS1 and BOOTCS. Reprogram each of these with a |
| 202 | ** new value from the table. | 202 | ** new value from the table. |
| 203 | */ | 203 | */ |
diff --git a/drivers/mtd/maps/tqm8xxl.c b/drivers/mtd/maps/tqm8xxl.c index c08e140d40ed..0718dfb3ee64 100644 --- a/drivers/mtd/maps/tqm8xxl.c +++ b/drivers/mtd/maps/tqm8xxl.c | |||
| @@ -63,7 +63,7 @@ static void __iomem *start_scan_addr; | |||
| 63 | */ | 63 | */ |
| 64 | 64 | ||
| 65 | #ifdef CONFIG_MTD_PARTITIONS | 65 | #ifdef CONFIG_MTD_PARTITIONS |
| 66 | /* Currently, TQM8xxL has upto 8MiB flash */ | 66 | /* Currently, TQM8xxL has up to 8MiB flash */ |
| 67 | static unsigned long tqm8xxl_max_flash_size = 0x00800000; | 67 | static unsigned long tqm8xxl_max_flash_size = 0x00800000; |
| 68 | 68 | ||
| 69 | /* partition definition for first flash bank | 69 | /* partition definition for first flash bank |
diff --git a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c index 1e74ad961040..3326615ad66b 100644 --- a/drivers/mtd/mtdblock.c +++ b/drivers/mtd/mtdblock.c | |||
| @@ -129,7 +129,7 @@ static int write_cached_data (struct mtdblk_dev *mtdblk) | |||
| 129 | return ret; | 129 | return ret; |
| 130 | 130 | ||
| 131 | /* | 131 | /* |
| 132 | * Here we could argubly set the cache state to STATE_CLEAN. | 132 | * Here we could arguably set the cache state to STATE_CLEAN. |
| 133 | * However this could lead to inconsistency since we will not | 133 | * However this could lead to inconsistency since we will not |
| 134 | * be notified if this content is altered on the flash by other | 134 | * be notified if this content is altered on the flash by other |
| 135 | * means. Let's declare it empty and leave buffering tasks to | 135 | * means. Let's declare it empty and leave buffering tasks to |
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index 145b3d0dc0db..4c36ef66a46b 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c | |||
| @@ -234,7 +234,7 @@ static ssize_t mtd_read(struct file *file, char __user *buf, size_t count,loff_t | |||
| 234 | * the data. For our userspace tools it is important | 234 | * the data. For our userspace tools it is important |
| 235 | * to dump areas with ecc errors ! | 235 | * to dump areas with ecc errors ! |
| 236 | * For kernel internal usage it also might return -EUCLEAN | 236 | * For kernel internal usage it also might return -EUCLEAN |
| 237 | * to signal the caller that a bitflip has occured and has | 237 | * to signal the caller that a bitflip has occurred and has |
| 238 | * been corrected by the ECC algorithm. | 238 | * been corrected by the ECC algorithm. |
| 239 | * Userspace software which accesses NAND this way | 239 | * Userspace software which accesses NAND this way |
| 240 | * must be aware of the fact that it deals with NAND | 240 | * must be aware of the fact that it deals with NAND |
diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c index 237913c5c92c..fed215c4cfa1 100644 --- a/drivers/mtd/mtdswap.c +++ b/drivers/mtd/mtdswap.c | |||
| @@ -1452,7 +1452,7 @@ static void mtdswap_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) | |||
| 1452 | oinfo = mtd->ecclayout; | 1452 | oinfo = mtd->ecclayout; |
| 1453 | if (!mtd->oobsize || !oinfo || oinfo->oobavail < MTDSWAP_OOBSIZE) { | 1453 | if (!mtd->oobsize || !oinfo || oinfo->oobavail < MTDSWAP_OOBSIZE) { |
| 1454 | printk(KERN_ERR "%s: Not enough free bytes in OOB, " | 1454 | printk(KERN_ERR "%s: Not enough free bytes in OOB, " |
| 1455 | "%d available, %lu needed.\n", | 1455 | "%d available, %zu needed.\n", |
| 1456 | MTDSWAP_PREFIX, oinfo->oobavail, MTDSWAP_OOBSIZE); | 1456 | MTDSWAP_PREFIX, oinfo->oobavail, MTDSWAP_OOBSIZE); |
| 1457 | return; | 1457 | return; |
| 1458 | } | 1458 | } |
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index a92054e945e1..edec457d361d 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig | |||
| @@ -239,7 +239,7 @@ config MTD_NAND_BCM_UMI | |||
| 239 | help | 239 | help |
| 240 | This enables the NAND flash controller on the BCM UMI block. | 240 | This enables the NAND flash controller on the BCM UMI block. |
| 241 | 241 | ||
| 242 | No board specfic support is done by this driver, each board | 242 | No board specific support is done by this driver, each board |
| 243 | must advertise a platform_device for the driver to attach. | 243 | must advertise a platform_device for the driver to attach. |
| 244 | 244 | ||
| 245 | config MTD_NAND_BCM_UMI_HWCS | 245 | config MTD_NAND_BCM_UMI_HWCS |
diff --git a/drivers/mtd/nand/ams-delta.c b/drivers/mtd/nand/ams-delta.c index a067d090cb31..bc65bf71e1a2 100644 --- a/drivers/mtd/nand/ams-delta.c +++ b/drivers/mtd/nand/ams-delta.c | |||
| @@ -228,7 +228,7 @@ static int __devinit ams_delta_init(struct platform_device *pdev) | |||
| 228 | AMS_DELTA_LATCH2_NAND_NCE | | 228 | AMS_DELTA_LATCH2_NAND_NCE | |
| 229 | AMS_DELTA_LATCH2_NAND_NWP); | 229 | AMS_DELTA_LATCH2_NAND_NWP); |
| 230 | 230 | ||
| 231 | /* Scan to find existance of the device */ | 231 | /* Scan to find existence of the device */ |
| 232 | if (nand_scan(ams_delta_mtd, 1)) { | 232 | if (nand_scan(ams_delta_mtd, 1)) { |
| 233 | err = -ENXIO; | 233 | err = -ENXIO; |
| 234 | goto out_mtd; | 234 | goto out_mtd; |
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index 6fae04b3fc6d..950646aa4c4b 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c | |||
| @@ -209,22 +209,8 @@ static int atmel_nand_dma_op(struct mtd_info *mtd, void *buf, int len, | |||
| 209 | int err = -EIO; | 209 | int err = -EIO; |
| 210 | enum dma_data_direction dir = is_read ? DMA_FROM_DEVICE : DMA_TO_DEVICE; | 210 | enum dma_data_direction dir = is_read ? DMA_FROM_DEVICE : DMA_TO_DEVICE; |
| 211 | 211 | ||
| 212 | if (buf >= high_memory) { | 212 | if (buf >= high_memory) |
| 213 | struct page *pg; | 213 | goto err_buf; |
| 214 | |||
| 215 | if (((size_t)buf & PAGE_MASK) != | ||
| 216 | ((size_t)(buf + len - 1) & PAGE_MASK)) { | ||
| 217 | dev_warn(host->dev, "Buffer not fit in one page\n"); | ||
| 218 | goto err_buf; | ||
| 219 | } | ||
| 220 | |||
| 221 | pg = vmalloc_to_page(buf); | ||
| 222 | if (pg == 0) { | ||
| 223 | dev_err(host->dev, "Failed to vmalloc_to_page\n"); | ||
| 224 | goto err_buf; | ||
| 225 | } | ||
| 226 | p = page_address(pg) + ((size_t)buf & ~PAGE_MASK); | ||
| 227 | } | ||
| 228 | 214 | ||
| 229 | dma_dev = host->dma_chan->device; | 215 | dma_dev = host->dma_chan->device; |
| 230 | 216 | ||
| @@ -280,7 +266,8 @@ static void atmel_read_buf(struct mtd_info *mtd, u8 *buf, int len) | |||
| 280 | struct nand_chip *chip = mtd->priv; | 266 | struct nand_chip *chip = mtd->priv; |
| 281 | struct atmel_nand_host *host = chip->priv; | 267 | struct atmel_nand_host *host = chip->priv; |
| 282 | 268 | ||
| 283 | if (use_dma && len >= mtd->oobsize) | 269 | if (use_dma && len > mtd->oobsize) |
| 270 | /* only use DMA for bigger than oob size: better performances */ | ||
| 284 | if (atmel_nand_dma_op(mtd, buf, len, 1) == 0) | 271 | if (atmel_nand_dma_op(mtd, buf, len, 1) == 0) |
| 285 | return; | 272 | return; |
| 286 | 273 | ||
| @@ -295,7 +282,8 @@ static void atmel_write_buf(struct mtd_info *mtd, const u8 *buf, int len) | |||
| 295 | struct nand_chip *chip = mtd->priv; | 282 | struct nand_chip *chip = mtd->priv; |
| 296 | struct atmel_nand_host *host = chip->priv; | 283 | struct atmel_nand_host *host = chip->priv; |
| 297 | 284 | ||
| 298 | if (use_dma && len >= mtd->oobsize) | 285 | if (use_dma && len > mtd->oobsize) |
| 286 | /* only use DMA for bigger than oob size: better performances */ | ||
| 299 | if (atmel_nand_dma_op(mtd, (void *)buf, len, 0) == 0) | 287 | if (atmel_nand_dma_op(mtd, (void *)buf, len, 0) == 0) |
| 300 | return; | 288 | return; |
| 301 | 289 | ||
| @@ -599,7 +587,10 @@ static int __init atmel_nand_probe(struct platform_device *pdev) | |||
| 599 | nand_chip->options |= NAND_USE_FLASH_BBT; | 587 | nand_chip->options |= NAND_USE_FLASH_BBT; |
| 600 | } | 588 | } |
| 601 | 589 | ||
| 602 | if (cpu_has_dma() && use_dma) { | 590 | if (!cpu_has_dma()) |
| 591 | use_dma = 0; | ||
| 592 | |||
| 593 | if (use_dma) { | ||
| 603 | dma_cap_mask_t mask; | 594 | dma_cap_mask_t mask; |
| 604 | 595 | ||
| 605 | dma_cap_zero(mask); | 596 | dma_cap_zero(mask); |
| @@ -611,7 +602,8 @@ static int __init atmel_nand_probe(struct platform_device *pdev) | |||
| 611 | } | 602 | } |
| 612 | } | 603 | } |
| 613 | if (use_dma) | 604 | if (use_dma) |
| 614 | dev_info(host->dev, "Using DMA for NAND access.\n"); | 605 | dev_info(host->dev, "Using %s for DMA transfers.\n", |
| 606 | dma_chan_name(host->dma_chan)); | ||
| 615 | else | 607 | else |
| 616 | dev_info(host->dev, "No DMA support for NAND access.\n"); | 608 | dev_info(host->dev, "No DMA support for NAND access.\n"); |
| 617 | 609 | ||
diff --git a/drivers/mtd/nand/autcpu12.c b/drivers/mtd/nand/autcpu12.c index 7c95da1f612c..0911cf03db80 100644 --- a/drivers/mtd/nand/autcpu12.c +++ b/drivers/mtd/nand/autcpu12.c | |||
| @@ -176,7 +176,7 @@ static int __init autcpu12_init(void) | |||
| 176 | */ | 176 | */ |
| 177 | this->options = NAND_USE_FLASH_BBT; | 177 | this->options = NAND_USE_FLASH_BBT; |
| 178 | 178 | ||
| 179 | /* Scan to find existance of the device */ | 179 | /* Scan to find existence of the device */ |
| 180 | if (nand_scan(autcpu12_mtd, 1)) { | 180 | if (nand_scan(autcpu12_mtd, 1)) { |
| 181 | err = -ENXIO; | 181 | err = -ENXIO; |
| 182 | goto out_ior; | 182 | goto out_ior; |
diff --git a/drivers/mtd/nand/cs553x_nand.c b/drivers/mtd/nand/cs553x_nand.c index 9f1b451005ca..71c35a0b9826 100644 --- a/drivers/mtd/nand/cs553x_nand.c +++ b/drivers/mtd/nand/cs553x_nand.c | |||
| @@ -241,7 +241,7 @@ static int __init cs553x_init_one(int cs, int mmio, unsigned long adr) | |||
| 241 | /* Enable the following for a flash based bad block table */ | 241 | /* Enable the following for a flash based bad block table */ |
| 242 | this->options = NAND_USE_FLASH_BBT | NAND_NO_AUTOINCR; | 242 | this->options = NAND_USE_FLASH_BBT | NAND_NO_AUTOINCR; |
| 243 | 243 | ||
| 244 | /* Scan to find existance of the device */ | 244 | /* Scan to find existence of the device */ |
| 245 | if (nand_scan(new_mtd, 1)) { | 245 | if (nand_scan(new_mtd, 1)) { |
| 246 | err = -ENXIO; | 246 | err = -ENXIO; |
| 247 | goto out_ior; | 247 | goto out_ior; |
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index 8c8d3c86c0e8..4633f094c510 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c | |||
| @@ -724,7 +724,7 @@ static uint32_t wait_for_irq(struct denali_nand_info *denali, uint32_t irq_mask) | |||
| 724 | } | 724 | } |
| 725 | 725 | ||
| 726 | /* This helper function setups the registers for ECC and whether or not | 726 | /* This helper function setups the registers for ECC and whether or not |
| 727 | * the spare area will be transfered. */ | 727 | * the spare area will be transferred. */ |
| 728 | static void setup_ecc_for_xfer(struct denali_nand_info *denali, bool ecc_en, | 728 | static void setup_ecc_for_xfer(struct denali_nand_info *denali, bool ecc_en, |
| 729 | bool transfer_spare) | 729 | bool transfer_spare) |
| 730 | { | 730 | { |
| @@ -965,7 +965,7 @@ static bool handle_ecc(struct denali_nand_info *denali, uint8_t *buf, | |||
| 965 | 965 | ||
| 966 | if (ECC_ERROR_CORRECTABLE(err_correction_info)) { | 966 | if (ECC_ERROR_CORRECTABLE(err_correction_info)) { |
| 967 | /* If err_byte is larger than ECC_SECTOR_SIZE, | 967 | /* If err_byte is larger than ECC_SECTOR_SIZE, |
| 968 | * means error happend in OOB, so we ignore | 968 | * means error happened in OOB, so we ignore |
| 969 | * it. It's no need for us to correct it | 969 | * it. It's no need for us to correct it |
| 970 | * err_device is represented the NAND error | 970 | * err_device is represented the NAND error |
| 971 | * bits are happened in if there are more | 971 | * bits are happened in if there are more |
| @@ -1109,7 +1109,7 @@ static void denali_write_page(struct mtd_info *mtd, struct nand_chip *chip, | |||
| 1109 | } | 1109 | } |
| 1110 | 1110 | ||
| 1111 | /* This is the callback that the NAND core calls to write a page without ECC. | 1111 | /* This is the callback that the NAND core calls to write a page without ECC. |
| 1112 | * raw access is similiar to ECC page writes, so all the work is done in the | 1112 | * raw access is similar to ECC page writes, so all the work is done in the |
| 1113 | * write_page() function above. | 1113 | * write_page() function above. |
| 1114 | */ | 1114 | */ |
| 1115 | static void denali_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip, | 1115 | static void denali_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip, |
diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c index b7f8de7b2780..96c0b34ba8db 100644 --- a/drivers/mtd/nand/diskonchip.c +++ b/drivers/mtd/nand/diskonchip.c | |||
| @@ -137,7 +137,7 @@ static struct rs_control *rs_decoder; | |||
| 137 | * | 137 | * |
| 138 | * Fabrice Bellard figured this out in the old docecc code. I added | 138 | * Fabrice Bellard figured this out in the old docecc code. I added |
| 139 | * some comments, improved a minor bit and converted it to make use | 139 | * some comments, improved a minor bit and converted it to make use |
| 140 | * of the generic Reed-Solomon libary. tglx | 140 | * of the generic Reed-Solomon library. tglx |
| 141 | */ | 141 | */ |
| 142 | static int doc_ecc_decode(struct rs_control *rs, uint8_t *data, uint8_t *ecc) | 142 | static int doc_ecc_decode(struct rs_control *rs, uint8_t *data, uint8_t *ecc) |
| 143 | { | 143 | { |
| @@ -400,7 +400,7 @@ static uint16_t __init doc200x_ident_chip(struct mtd_info *mtd, int nr) | |||
| 400 | doc200x_hwcontrol(mtd, 0, NAND_CTRL_ALE | NAND_CTRL_CHANGE); | 400 | doc200x_hwcontrol(mtd, 0, NAND_CTRL_ALE | NAND_CTRL_CHANGE); |
| 401 | doc200x_hwcontrol(mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE); | 401 | doc200x_hwcontrol(mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE); |
| 402 | 402 | ||
| 403 | /* We cant' use dev_ready here, but at least we wait for the | 403 | /* We can't' use dev_ready here, but at least we wait for the |
| 404 | * command to complete | 404 | * command to complete |
| 405 | */ | 405 | */ |
| 406 | udelay(50); | 406 | udelay(50); |
| @@ -986,7 +986,7 @@ static int doc200x_correct_data(struct mtd_info *mtd, u_char *dat, | |||
| 986 | dummy = ReadDOC(docptr, ECCConf); | 986 | dummy = ReadDOC(docptr, ECCConf); |
| 987 | } | 987 | } |
| 988 | 988 | ||
| 989 | /* Error occured ? */ | 989 | /* Error occurred ? */ |
| 990 | if (dummy & 0x80) { | 990 | if (dummy & 0x80) { |
| 991 | for (i = 0; i < 6; i++) { | 991 | for (i = 0; i < 6; i++) { |
| 992 | if (DoC_is_MillenniumPlus(doc)) | 992 | if (DoC_is_MillenniumPlus(doc)) |
| @@ -1160,7 +1160,7 @@ static inline int __init nftl_partscan(struct mtd_info *mtd, struct mtd_partitio | |||
| 1160 | /* NOTE: The lines below modify internal variables of the NAND and MTD | 1160 | /* NOTE: The lines below modify internal variables of the NAND and MTD |
| 1161 | layers; variables with have already been configured by nand_scan. | 1161 | layers; variables with have already been configured by nand_scan. |
| 1162 | Unfortunately, we didn't know before this point what these values | 1162 | Unfortunately, we didn't know before this point what these values |
| 1163 | should be. Thus, this code is somewhat dependant on the exact | 1163 | should be. Thus, this code is somewhat dependent on the exact |
| 1164 | implementation of the NAND layer. */ | 1164 | implementation of the NAND layer. */ |
| 1165 | if (mh->UnitSizeFactor != 0xff) { | 1165 | if (mh->UnitSizeFactor != 0xff) { |
| 1166 | this->bbt_erase_shift += (0xff - mh->UnitSizeFactor); | 1166 | this->bbt_erase_shift += (0xff - mh->UnitSizeFactor); |
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index 7a13d42cbabd..537e380b8dcb 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c | |||
| @@ -59,7 +59,7 @@ struct fsl_elbc_mtd { | |||
| 59 | unsigned int fmr; /* FCM Flash Mode Register value */ | 59 | unsigned int fmr; /* FCM Flash Mode Register value */ |
| 60 | }; | 60 | }; |
| 61 | 61 | ||
| 62 | /* Freescale eLBC FCM controller infomation */ | 62 | /* Freescale eLBC FCM controller information */ |
| 63 | 63 | ||
| 64 | struct fsl_elbc_fcm_ctrl { | 64 | struct fsl_elbc_fcm_ctrl { |
| 65 | struct nand_hw_control controller; | 65 | struct nand_hw_control controller; |
diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c index 205b10b9f9b9..0d45ef3883e8 100644 --- a/drivers/mtd/nand/fsmc_nand.c +++ b/drivers/mtd/nand/fsmc_nand.c | |||
| @@ -335,7 +335,7 @@ static void fsmc_enable_hwecc(struct mtd_info *mtd, int mode) | |||
| 335 | 335 | ||
| 336 | /* | 336 | /* |
| 337 | * fsmc_read_hwecc_ecc4 - Hardware ECC calculator for ecc4 option supported by | 337 | * fsmc_read_hwecc_ecc4 - Hardware ECC calculator for ecc4 option supported by |
| 338 | * FSMC. ECC is 13 bytes for 512 bytes of data (supports error correction upto | 338 | * FSMC. ECC is 13 bytes for 512 bytes of data (supports error correction up to |
| 339 | * max of 8-bits) | 339 | * max of 8-bits) |
| 340 | */ | 340 | */ |
| 341 | static int fsmc_read_hwecc_ecc4(struct mtd_info *mtd, const uint8_t *data, | 341 | static int fsmc_read_hwecc_ecc4(struct mtd_info *mtd, const uint8_t *data, |
| @@ -381,7 +381,7 @@ static int fsmc_read_hwecc_ecc4(struct mtd_info *mtd, const uint8_t *data, | |||
| 381 | 381 | ||
| 382 | /* | 382 | /* |
| 383 | * fsmc_read_hwecc_ecc1 - Hardware ECC calculator for ecc1 option supported by | 383 | * fsmc_read_hwecc_ecc1 - Hardware ECC calculator for ecc1 option supported by |
| 384 | * FSMC. ECC is 3 bytes for 512 bytes of data (supports error correction upto | 384 | * FSMC. ECC is 3 bytes for 512 bytes of data (supports error correction up to |
| 385 | * max of 1-bit) | 385 | * max of 1-bit) |
| 386 | */ | 386 | */ |
| 387 | static int fsmc_read_hwecc_ecc1(struct mtd_info *mtd, const uint8_t *data, | 387 | static int fsmc_read_hwecc_ecc1(struct mtd_info *mtd, const uint8_t *data, |
| @@ -408,10 +408,10 @@ static int fsmc_read_hwecc_ecc1(struct mtd_info *mtd, const uint8_t *data, | |||
| 408 | * @buf: buffer to store read data | 408 | * @buf: buffer to store read data |
| 409 | * @page: page number to read | 409 | * @page: page number to read |
| 410 | * | 410 | * |
| 411 | * This routine is needed for fsmc verison 8 as reading from NAND chip has to be | 411 | * This routine is needed for fsmc version 8 as reading from NAND chip has to be |
| 412 | * performed in a strict sequence as follows: | 412 | * performed in a strict sequence as follows: |
| 413 | * data(512 byte) -> ecc(13 byte) | 413 | * data(512 byte) -> ecc(13 byte) |
| 414 | * After this read, fsmc hardware generates and reports error data bits(upto a | 414 | * After this read, fsmc hardware generates and reports error data bits(up to a |
| 415 | * max of 8 bits) | 415 | * max of 8 bits) |
| 416 | */ | 416 | */ |
| 417 | static int fsmc_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip, | 417 | static int fsmc_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip, |
| @@ -686,7 +686,7 @@ static int __init fsmc_nand_probe(struct platform_device *pdev) | |||
| 686 | } | 686 | } |
| 687 | 687 | ||
| 688 | /* | 688 | /* |
| 689 | * Scan to find existance of the device | 689 | * Scan to find existence of the device |
| 690 | */ | 690 | */ |
| 691 | if (nand_scan_ident(&host->mtd, 1, NULL)) { | 691 | if (nand_scan_ident(&host->mtd, 1, NULL)) { |
| 692 | ret = -ENXIO; | 692 | ret = -ENXIO; |
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 85cfc061d41c..c54a4cbac6bc 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
| @@ -1582,7 +1582,7 @@ static int nand_do_read_ops(struct mtd_info *mtd, loff_t from, | |||
| 1582 | } | 1582 | } |
| 1583 | 1583 | ||
| 1584 | /** | 1584 | /** |
| 1585 | * nand_read - [MTD Interface] MTD compability function for nand_do_read_ecc | 1585 | * nand_read - [MTD Interface] MTD compatibility function for nand_do_read_ecc |
| 1586 | * @mtd: MTD device structure | 1586 | * @mtd: MTD device structure |
| 1587 | * @from: offset to read from | 1587 | * @from: offset to read from |
| 1588 | * @len: number of bytes to read | 1588 | * @len: number of bytes to read |
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index a1e8b30078d9..af46428286fe 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c | |||
| @@ -945,7 +945,7 @@ static int check_create(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_desc | |||
| 945 | rd2 = NULL; | 945 | rd2 = NULL; |
| 946 | /* Per chip or per device ? */ | 946 | /* Per chip or per device ? */ |
| 947 | chipsel = (td->options & NAND_BBT_PERCHIP) ? i : -1; | 947 | chipsel = (td->options & NAND_BBT_PERCHIP) ? i : -1; |
| 948 | /* Mirrored table avilable ? */ | 948 | /* Mirrored table available ? */ |
| 949 | if (md) { | 949 | if (md) { |
| 950 | if (td->pages[i] == -1 && md->pages[i] == -1) { | 950 | if (td->pages[i] == -1 && md->pages[i] == -1) { |
| 951 | writeops = 0x03; | 951 | writeops = 0x03; |
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index 213181be0d9a..893d95bfea48 100644 --- a/drivers/mtd/nand/nandsim.c +++ b/drivers/mtd/nand/nandsim.c | |||
| @@ -162,7 +162,7 @@ MODULE_PARM_DESC(bitflips, "Maximum number of random bit flips per page (z | |||
| 162 | MODULE_PARM_DESC(gravepages, "Pages that lose data [: maximum reads (defaults to 3)]" | 162 | MODULE_PARM_DESC(gravepages, "Pages that lose data [: maximum reads (defaults to 3)]" |
| 163 | " separated by commas e.g. 1401:2 means page 1401" | 163 | " separated by commas e.g. 1401:2 means page 1401" |
| 164 | " can be read only twice before failing"); | 164 | " can be read only twice before failing"); |
| 165 | MODULE_PARM_DESC(rptwear, "Number of erases inbetween reporting wear, if not zero"); | 165 | MODULE_PARM_DESC(rptwear, "Number of erases between reporting wear, if not zero"); |
| 166 | MODULE_PARM_DESC(overridesize, "Specifies the NAND Flash size overriding the ID bytes. " | 166 | MODULE_PARM_DESC(overridesize, "Specifies the NAND Flash size overriding the ID bytes. " |
| 167 | "The size is specified in erase blocks and as the exponent of a power of two" | 167 | "The size is specified in erase blocks and as the exponent of a power of two" |
| 168 | " e.g. 5 means a size of 32 erase blocks"); | 168 | " e.g. 5 means a size of 32 erase blocks"); |
diff --git a/drivers/mtd/nand/nomadik_nand.c b/drivers/mtd/nand/nomadik_nand.c index 8c0b69375224..a045a4a581b6 100644 --- a/drivers/mtd/nand/nomadik_nand.c +++ b/drivers/mtd/nand/nomadik_nand.c | |||
| @@ -151,7 +151,7 @@ static int nomadik_nand_probe(struct platform_device *pdev) | |||
| 151 | nand->options = pdata->options; | 151 | nand->options = pdata->options; |
| 152 | 152 | ||
| 153 | /* | 153 | /* |
| 154 | * Scan to find existance of the device | 154 | * Scan to find existence of the device |
| 155 | */ | 155 | */ |
| 156 | if (nand_scan(&host->mtd, 1)) { | 156 | if (nand_scan(&host->mtd, 1)) { |
| 157 | ret = -ENXIO; | 157 | ret = -ENXIO; |
diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/pasemi_nand.c index 59efa829ef24..20bfe5f15afd 100644 --- a/drivers/mtd/nand/pasemi_nand.c +++ b/drivers/mtd/nand/pasemi_nand.c | |||
| @@ -157,7 +157,7 @@ static int __devinit pasemi_nand_probe(struct platform_device *ofdev) | |||
| 157 | /* Enable the following for a flash based bad block table */ | 157 | /* Enable the following for a flash based bad block table */ |
| 158 | chip->options = NAND_USE_FLASH_BBT | NAND_NO_AUTOINCR; | 158 | chip->options = NAND_USE_FLASH_BBT | NAND_NO_AUTOINCR; |
| 159 | 159 | ||
| 160 | /* Scan to find existance of the device */ | 160 | /* Scan to find existence of the device */ |
| 161 | if (nand_scan(pasemi_nand_mtd, 1)) { | 161 | if (nand_scan(pasemi_nand_mtd, 1)) { |
| 162 | err = -ENXIO; | 162 | err = -ENXIO; |
| 163 | goto out_lpc; | 163 | goto out_lpc; |
diff --git a/drivers/mtd/nand/plat_nand.c b/drivers/mtd/nand/plat_nand.c index 317aff428e42..caf5a736340a 100644 --- a/drivers/mtd/nand/plat_nand.c +++ b/drivers/mtd/nand/plat_nand.c | |||
| @@ -95,7 +95,7 @@ static int __devinit plat_nand_probe(struct platform_device *pdev) | |||
| 95 | goto out; | 95 | goto out; |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | /* Scan to find existance of the device */ | 98 | /* Scan to find existence of the device */ |
| 99 | if (nand_scan(&data->mtd, pdata->chip.nr_chips)) { | 99 | if (nand_scan(&data->mtd, pdata->chip.nr_chips)) { |
| 100 | err = -ENXIO; | 100 | err = -ENXIO; |
| 101 | goto out; | 101 | goto out; |
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index ab7f4c33ced6..ff0701276d65 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c | |||
| @@ -184,7 +184,7 @@ struct pxa3xx_nand_info { | |||
| 184 | 184 | ||
| 185 | static int use_dma = 1; | 185 | static int use_dma = 1; |
| 186 | module_param(use_dma, bool, 0444); | 186 | module_param(use_dma, bool, 0444); |
| 187 | MODULE_PARM_DESC(use_dma, "enable DMA for data transfering to/from NAND HW"); | 187 | MODULE_PARM_DESC(use_dma, "enable DMA for data transferring to/from NAND HW"); |
| 188 | 188 | ||
| 189 | /* | 189 | /* |
| 190 | * Default NAND flash controller configuration setup by the | 190 | * Default NAND flash controller configuration setup by the |
diff --git a/drivers/mtd/nand/r852.c b/drivers/mtd/nand/r852.c index 6322d1fb5d62..cae2e013c986 100644 --- a/drivers/mtd/nand/r852.c +++ b/drivers/mtd/nand/r852.c | |||
| @@ -185,7 +185,7 @@ static void r852_do_dma(struct r852_device *dev, uint8_t *buf, int do_read) | |||
| 185 | 185 | ||
| 186 | dbg_verbose("doing dma %s ", do_read ? "read" : "write"); | 186 | dbg_verbose("doing dma %s ", do_read ? "read" : "write"); |
| 187 | 187 | ||
| 188 | /* Set intial dma state: for reading first fill on board buffer, | 188 | /* Set initial dma state: for reading first fill on board buffer, |
| 189 | from device, for writes first fill the buffer from memory*/ | 189 | from device, for writes first fill the buffer from memory*/ |
| 190 | dev->dma_state = do_read ? DMA_INTERNAL : DMA_MEMORY; | 190 | dev->dma_state = do_read ? DMA_INTERNAL : DMA_MEMORY; |
| 191 | 191 | ||
| @@ -766,7 +766,7 @@ static irqreturn_t r852_irq(int irq, void *data) | |||
| 766 | ret = IRQ_HANDLED; | 766 | ret = IRQ_HANDLED; |
| 767 | dev->card_detected = !!(card_status & R852_CARD_IRQ_INSERT); | 767 | dev->card_detected = !!(card_status & R852_CARD_IRQ_INSERT); |
| 768 | 768 | ||
| 769 | /* we shouldn't recieve any interrupts if we wait for card | 769 | /* we shouldn't receive any interrupts if we wait for card |
| 770 | to settle */ | 770 | to settle */ |
| 771 | WARN_ON(dev->card_unstable); | 771 | WARN_ON(dev->card_unstable); |
| 772 | 772 | ||
| @@ -794,13 +794,13 @@ static irqreturn_t r852_irq(int irq, void *data) | |||
| 794 | ret = IRQ_HANDLED; | 794 | ret = IRQ_HANDLED; |
| 795 | 795 | ||
| 796 | if (dma_status & R852_DMA_IRQ_ERROR) { | 796 | if (dma_status & R852_DMA_IRQ_ERROR) { |
| 797 | dbg("recieved dma error IRQ"); | 797 | dbg("received dma error IRQ"); |
| 798 | r852_dma_done(dev, -EIO); | 798 | r852_dma_done(dev, -EIO); |
| 799 | complete(&dev->dma_done); | 799 | complete(&dev->dma_done); |
| 800 | goto out; | 800 | goto out; |
| 801 | } | 801 | } |
| 802 | 802 | ||
| 803 | /* recieved DMA interrupt out of nowhere? */ | 803 | /* received DMA interrupt out of nowhere? */ |
| 804 | WARN_ON_ONCE(dev->dma_stage == 0); | 804 | WARN_ON_ONCE(dev->dma_stage == 0); |
| 805 | 805 | ||
| 806 | if (dev->dma_stage == 0) | 806 | if (dev->dma_stage == 0) |
| @@ -960,7 +960,7 @@ int r852_probe(struct pci_dev *pci_dev, const struct pci_device_id *id) | |||
| 960 | &dev->card_detect_work, 0); | 960 | &dev->card_detect_work, 0); |
| 961 | 961 | ||
| 962 | 962 | ||
| 963 | printk(KERN_NOTICE DRV_NAME ": driver loaded succesfully\n"); | 963 | printk(KERN_NOTICE DRV_NAME ": driver loaded successfully\n"); |
| 964 | return 0; | 964 | return 0; |
| 965 | 965 | ||
| 966 | error10: | 966 | error10: |
diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c index 546c2f0eb2e8..81bbb5ee148d 100644 --- a/drivers/mtd/nand/sh_flctl.c +++ b/drivers/mtd/nand/sh_flctl.c | |||
| @@ -78,7 +78,7 @@ static void start_translation(struct sh_flctl *flctl) | |||
| 78 | 78 | ||
| 79 | static void timeout_error(struct sh_flctl *flctl, const char *str) | 79 | static void timeout_error(struct sh_flctl *flctl, const char *str) |
| 80 | { | 80 | { |
| 81 | dev_err(&flctl->pdev->dev, "Timeout occured in %s\n", str); | 81 | dev_err(&flctl->pdev->dev, "Timeout occurred in %s\n", str); |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | static void wait_completion(struct sh_flctl *flctl) | 84 | static void wait_completion(struct sh_flctl *flctl) |
diff --git a/drivers/mtd/nand/sm_common.c b/drivers/mtd/nand/sm_common.c index 4a8f367c295c..57cc80cd01a3 100644 --- a/drivers/mtd/nand/sm_common.c +++ b/drivers/mtd/nand/sm_common.c | |||
| @@ -121,7 +121,7 @@ int sm_register_device(struct mtd_info *mtd, int smartmedia) | |||
| 121 | if (ret) | 121 | if (ret) |
| 122 | return ret; | 122 | return ret; |
| 123 | 123 | ||
| 124 | /* Bad block marker postion */ | 124 | /* Bad block marker position */ |
| 125 | chip->badblockpos = 0x05; | 125 | chip->badblockpos = 0x05; |
| 126 | chip->badblockbits = 7; | 126 | chip->badblockbits = 7; |
| 127 | chip->block_markbad = sm_block_markbad; | 127 | chip->block_markbad = sm_block_markbad; |
diff --git a/drivers/mtd/nand/tmio_nand.c b/drivers/mtd/nand/tmio_nand.c index 38fb16771f85..14c578707824 100644 --- a/drivers/mtd/nand/tmio_nand.c +++ b/drivers/mtd/nand/tmio_nand.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Slightly murky pre-git history of the driver: | 4 | * Slightly murky pre-git history of the driver: |
| 5 | * | 5 | * |
| 6 | * Copyright (c) Ian Molton 2004, 2005, 2008 | 6 | * Copyright (c) Ian Molton 2004, 2005, 2008 |
| 7 | * Original work, independant of sharps code. Included hardware ECC support. | 7 | * Original work, independent of sharps code. Included hardware ECC support. |
| 8 | * Hard ECC did not work for writes in the early revisions. | 8 | * Hard ECC did not work for writes in the early revisions. |
| 9 | * Copyright (c) Dirk Opfer 2005. | 9 | * Copyright (c) Dirk Opfer 2005. |
| 10 | * Modifications developed from sharps code but | 10 | * Modifications developed from sharps code but |
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c index f591f615d3f6..1fcb41adab07 100644 --- a/drivers/mtd/onenand/omap2.c +++ b/drivers/mtd/onenand/omap2.c | |||
| @@ -608,7 +608,7 @@ static int omap2_onenand_enable(struct mtd_info *mtd) | |||
| 608 | 608 | ||
| 609 | ret = regulator_enable(c->regulator); | 609 | ret = regulator_enable(c->regulator); |
| 610 | if (ret != 0) | 610 | if (ret != 0) |
| 611 | dev_err(&c->pdev->dev, "cant enable regulator\n"); | 611 | dev_err(&c->pdev->dev, "can't enable regulator\n"); |
| 612 | 612 | ||
| 613 | return ret; | 613 | return ret; |
| 614 | } | 614 | } |
| @@ -620,7 +620,7 @@ static int omap2_onenand_disable(struct mtd_info *mtd) | |||
| 620 | 620 | ||
| 621 | ret = regulator_disable(c->regulator); | 621 | ret = regulator_disable(c->regulator); |
| 622 | if (ret != 0) | 622 | if (ret != 0) |
| 623 | dev_err(&c->pdev->dev, "cant disable regulator\n"); | 623 | dev_err(&c->pdev->dev, "can't disable regulator\n"); |
| 624 | 624 | ||
| 625 | return ret; | 625 | return ret; |
| 626 | } | 626 | } |
diff --git a/drivers/mtd/onenand/onenand_sim.c b/drivers/mtd/onenand/onenand_sim.c index 8b246061d511..5ef3bd547772 100644 --- a/drivers/mtd/onenand/onenand_sim.c +++ b/drivers/mtd/onenand/onenand_sim.c | |||
| @@ -321,7 +321,7 @@ static void onenand_data_handle(struct onenand_chip *this, int cmd, | |||
| 321 | continue; | 321 | continue; |
| 322 | if (memcmp(dest + off, ffchars, this->subpagesize) && | 322 | if (memcmp(dest + off, ffchars, this->subpagesize) && |
| 323 | onenand_check_overwrite(dest + off, src + off, this->subpagesize)) | 323 | onenand_check_overwrite(dest + off, src + off, this->subpagesize)) |
| 324 | printk(KERN_ERR "over-write happend at 0x%08x\n", offset); | 324 | printk(KERN_ERR "over-write happened at 0x%08x\n", offset); |
| 325 | memcpy(dest + off, src + off, this->subpagesize); | 325 | memcpy(dest + off, src + off, this->subpagesize); |
| 326 | } | 326 | } |
| 327 | /* Fall through */ | 327 | /* Fall through */ |
| @@ -335,7 +335,7 @@ static void onenand_data_handle(struct onenand_chip *this, int cmd, | |||
| 335 | dest = ONENAND_CORE_SPARE(flash, this, offset); | 335 | dest = ONENAND_CORE_SPARE(flash, this, offset); |
| 336 | if (memcmp(dest, ffchars, mtd->oobsize) && | 336 | if (memcmp(dest, ffchars, mtd->oobsize) && |
| 337 | onenand_check_overwrite(dest, src, mtd->oobsize)) | 337 | onenand_check_overwrite(dest, src, mtd->oobsize)) |
| 338 | printk(KERN_ERR "OOB: over-write happend at 0x%08x\n", | 338 | printk(KERN_ERR "OOB: over-write happened at 0x%08x\n", |
| 339 | offset); | 339 | offset); |
| 340 | memcpy(dest, src, mtd->oobsize); | 340 | memcpy(dest, src, mtd->oobsize); |
| 341 | break; | 341 | break; |
diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c index 2b0daae4018d..ed3d6cd2c6dc 100644 --- a/drivers/mtd/sm_ftl.c +++ b/drivers/mtd/sm_ftl.c | |||
| @@ -540,7 +540,7 @@ static int sm_check_block(struct sm_ftl *ftl, int zone, int block) | |||
| 540 | return -EIO; | 540 | return -EIO; |
| 541 | } | 541 | } |
| 542 | 542 | ||
| 543 | /* If the block is sliced (partialy erased usually) erase it */ | 543 | /* If the block is sliced (partially erased usually) erase it */ |
| 544 | if (i == 2) { | 544 | if (i == 2) { |
| 545 | sm_erase_block(ftl, zone, block, 1); | 545 | sm_erase_block(ftl, zone, block, 1); |
| 546 | return 1; | 546 | return 1; |
| @@ -878,7 +878,7 @@ static int sm_init_zone(struct sm_ftl *ftl, int zone_num) | |||
| 878 | return 0; | 878 | return 0; |
| 879 | } | 879 | } |
| 880 | 880 | ||
| 881 | /* Get and automaticly initialize an FTL mapping for one zone */ | 881 | /* Get and automatically initialize an FTL mapping for one zone */ |
| 882 | struct ftl_zone *sm_get_zone(struct sm_ftl *ftl, int zone_num) | 882 | struct ftl_zone *sm_get_zone(struct sm_ftl *ftl, int zone_num) |
| 883 | { | 883 | { |
| 884 | struct ftl_zone *zone; | 884 | struct ftl_zone *zone; |
diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig index 6abeb4f13403..4dcc752a0c0b 100644 --- a/drivers/mtd/ubi/Kconfig +++ b/drivers/mtd/ubi/Kconfig | |||
| @@ -56,7 +56,7 @@ config MTD_UBI_DEBUG | |||
| 56 | bool "UBI debugging" | 56 | bool "UBI debugging" |
| 57 | depends on SYSFS | 57 | depends on SYSFS |
| 58 | select DEBUG_FS | 58 | select DEBUG_FS |
| 59 | select KALLSYMS_ALL if KALLSYMS && DEBUG_KERNEL | 59 | select KALLSYMS |
| 60 | help | 60 | help |
| 61 | This option enables UBI debugging. | 61 | This option enables UBI debugging. |
| 62 | 62 | ||
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index eededf94f5a6..e347cc4388ed 100644 --- a/drivers/mtd/ubi/io.c +++ b/drivers/mtd/ubi/io.c | |||
| @@ -344,6 +344,12 @@ static int do_sync_erase(struct ubi_device *ubi, int pnum) | |||
| 344 | wait_queue_head_t wq; | 344 | wait_queue_head_t wq; |
| 345 | 345 | ||
| 346 | dbg_io("erase PEB %d", pnum); | 346 | dbg_io("erase PEB %d", pnum); |
| 347 | ubi_assert(pnum >= 0 && pnum < ubi->peb_count); | ||
| 348 | |||
| 349 | if (ubi->ro_mode) { | ||
| 350 | ubi_err("read-only mode"); | ||
| 351 | return -EROFS; | ||
| 352 | } | ||
| 347 | 353 | ||
| 348 | retry: | 354 | retry: |
| 349 | init_waitqueue_head(&wq); | 355 | init_waitqueue_head(&wq); |
| @@ -390,7 +396,7 @@ retry: | |||
| 390 | if (err) | 396 | if (err) |
| 391 | return err; | 397 | return err; |
| 392 | 398 | ||
| 393 | if (ubi_dbg_is_erase_failure() && !err) { | 399 | if (ubi_dbg_is_erase_failure()) { |
| 394 | dbg_err("cannot erase PEB %d (emulated)", pnum); | 400 | dbg_err("cannot erase PEB %d (emulated)", pnum); |
| 395 | return -EIO; | 401 | return -EIO; |
| 396 | } | 402 | } |
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c index 11eb8ef12485..d2d12ab7def4 100644 --- a/drivers/mtd/ubi/scan.c +++ b/drivers/mtd/ubi/scan.c | |||
| @@ -968,7 +968,7 @@ static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si, | |||
| 968 | * contains garbage because of a power cut during erase | 968 | * contains garbage because of a power cut during erase |
| 969 | * operation. So we just schedule this PEB for erasure. | 969 | * operation. So we just schedule this PEB for erasure. |
| 970 | * | 970 | * |
| 971 | * Besides, in case of NOR flash, we deliberatly | 971 | * Besides, in case of NOR flash, we deliberately |
| 972 | * corrupt both headers because NOR flash erasure is | 972 | * corrupt both headers because NOR flash erasure is |
| 973 | * slow and can start from the end. | 973 | * slow and can start from the end. |
| 974 | */ | 974 | */ |
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c index b79e0dea3632..366eb70219a6 100644 --- a/drivers/mtd/ubi/vmt.c +++ b/drivers/mtd/ubi/vmt.c | |||
| @@ -790,11 +790,6 @@ static int paranoid_check_volume(struct ubi_device *ubi, int vol_id) | |||
| 790 | goto fail; | 790 | goto fail; |
| 791 | } | 791 | } |
| 792 | 792 | ||
| 793 | if (!vol->name) { | ||
| 794 | ubi_err("NULL volume name"); | ||
| 795 | goto fail; | ||
| 796 | } | ||
| 797 | |||
| 798 | n = strnlen(vol->name, vol->name_len + 1); | 793 | n = strnlen(vol->name, vol->name_len + 1); |
| 799 | if (n != vol->name_len) { | 794 | if (n != vol->name_len) { |
| 800 | ubi_err("bad name_len %lld", n); | 795 | ubi_err("bad name_len %lld", n); |
diff --git a/drivers/net/3c501.c b/drivers/net/3c501.c index 9e1c03eb97ae..5420f6de27df 100644 --- a/drivers/net/3c501.c +++ b/drivers/net/3c501.c | |||
| @@ -399,7 +399,7 @@ static void el_timeout(struct net_device *dev) | |||
| 399 | * as we may still be attempting to retrieve the last RX packet buffer. | 399 | * as we may still be attempting to retrieve the last RX packet buffer. |
| 400 | * | 400 | * |
| 401 | * When a transmit times out we dump the card into control mode and just | 401 | * When a transmit times out we dump the card into control mode and just |
| 402 | * start again. It happens enough that it isnt worth logging. | 402 | * start again. It happens enough that it isn't worth logging. |
| 403 | * | 403 | * |
| 404 | * We avoid holding the spin locks when doing the packet load to the board. | 404 | * We avoid holding the spin locks when doing the packet load to the board. |
| 405 | * The device is very slow, and its DMA mode is even slower. If we held the | 405 | * The device is very slow, and its DMA mode is even slower. If we held the |
| @@ -499,7 +499,7 @@ static netdev_tx_t el_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 499 | * | 499 | * |
| 500 | * Handle the ether interface interrupts. The 3c501 needs a lot more | 500 | * Handle the ether interface interrupts. The 3c501 needs a lot more |
| 501 | * hand holding than most cards. In particular we get a transmit interrupt | 501 | * hand holding than most cards. In particular we get a transmit interrupt |
| 502 | * with a collision error because the board firmware isnt capable of rewinding | 502 | * with a collision error because the board firmware isn't capable of rewinding |
| 503 | * its own transmit buffer pointers. It can however count to 16 for us. | 503 | * its own transmit buffer pointers. It can however count to 16 for us. |
| 504 | * | 504 | * |
| 505 | * On the receive side the card is also very dumb. It has no buffering to | 505 | * On the receive side the card is also very dumb. It has no buffering to |
| @@ -732,7 +732,7 @@ static void el_receive(struct net_device *dev) | |||
| 732 | * el_reset: Reset a 3c501 card | 732 | * el_reset: Reset a 3c501 card |
| 733 | * @dev: The 3c501 card about to get zapped | 733 | * @dev: The 3c501 card about to get zapped |
| 734 | * | 734 | * |
| 735 | * Even resetting a 3c501 isnt simple. When you activate reset it loses all | 735 | * Even resetting a 3c501 isn't simple. When you activate reset it loses all |
| 736 | * its configuration. You must hold the lock when doing this. The function | 736 | * its configuration. You must hold the lock when doing this. The function |
| 737 | * cannot take the lock itself as it is callable from the irq handler. | 737 | * cannot take the lock itself as it is callable from the irq handler. |
| 738 | */ | 738 | */ |
diff --git a/drivers/net/3c523.c b/drivers/net/3c523.c index de579d043169..bc0d1a1c2e28 100644 --- a/drivers/net/3c523.c +++ b/drivers/net/3c523.c | |||
| @@ -44,7 +44,7 @@ | |||
| 44 | this for the 64K version would require a lot of heinous bank | 44 | this for the 64K version would require a lot of heinous bank |
| 45 | switching, which I'm sure not interested in doing. If you try to | 45 | switching, which I'm sure not interested in doing. If you try to |
| 46 | implement a bank switching version, you'll basically have to remember | 46 | implement a bank switching version, you'll basically have to remember |
| 47 | what bank is enabled and do a switch everytime you access a memory | 47 | what bank is enabled and do a switch every time you access a memory |
| 48 | location that's not current. You'll also have to remap pointers on | 48 | location that's not current. You'll also have to remap pointers on |
| 49 | the driver side, because it only knows about 16K of the memory. | 49 | the driver side, because it only knows about 16K of the memory. |
| 50 | Anyone desperate or masochistic enough to try? | 50 | Anyone desperate or masochistic enough to try? |
diff --git a/drivers/net/3c527.c b/drivers/net/3c527.c index 8c094bae8bf3..d9d056d207f3 100644 --- a/drivers/net/3c527.c +++ b/drivers/net/3c527.c | |||
| @@ -51,7 +51,7 @@ DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " Richard Procter <rnp@paradise.net. | |||
| 51 | * circular buffer queues. | 51 | * circular buffer queues. |
| 52 | * | 52 | * |
| 53 | * The mailboxes can be used for controlling how the card traverses | 53 | * The mailboxes can be used for controlling how the card traverses |
| 54 | * its buffer rings, but are used only for inital setup in this | 54 | * its buffer rings, but are used only for initial setup in this |
| 55 | * implementation. The exec mailbox allows a variety of commands to | 55 | * implementation. The exec mailbox allows a variety of commands to |
| 56 | * be executed. Each command must complete before the next is | 56 | * be executed. Each command must complete before the next is |
| 57 | * executed. Primarily we use the exec mailbox for controlling the | 57 | * executed. Primarily we use the exec mailbox for controlling the |
| @@ -813,7 +813,7 @@ static void mc32_flush_rx_ring(struct net_device *dev) | |||
| 813 | * | 813 | * |
| 814 | * This sets up the host transmit data-structures. | 814 | * This sets up the host transmit data-structures. |
| 815 | * | 815 | * |
| 816 | * First, we obtain from the card it's current postion in the tx | 816 | * First, we obtain from the card it's current position in the tx |
| 817 | * ring, so that we will know where to begin transmitting | 817 | * ring, so that we will know where to begin transmitting |
| 818 | * packets. | 818 | * packets. |
| 819 | * | 819 | * |
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 0a92436f0538..8cc22568ebd3 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c | |||
| @@ -984,7 +984,7 @@ static int __init vortex_eisa_init(void) | |||
| 984 | * any device have been found when we exit from | 984 | * any device have been found when we exit from |
| 985 | * eisa_driver_register (the bus root driver may not be | 985 | * eisa_driver_register (the bus root driver may not be |
| 986 | * initialized yet). So we blindly assume something was | 986 | * initialized yet). So we blindly assume something was |
| 987 | * found, and let the sysfs magic happend... | 987 | * found, and let the sysfs magic happened... |
| 988 | */ | 988 | */ |
| 989 | eisa_found = 1; | 989 | eisa_found = 1; |
| 990 | } | 990 | } |
diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c index 41d9911202d0..ee648fe5d96f 100644 --- a/drivers/net/acenic.c +++ b/drivers/net/acenic.c | |||
| @@ -1584,7 +1584,7 @@ static void ace_watchdog(struct net_device *data) | |||
| 1584 | /* | 1584 | /* |
| 1585 | * We haven't received a stats update event for more than 2.5 | 1585 | * We haven't received a stats update event for more than 2.5 |
| 1586 | * seconds and there is data in the transmit queue, thus we | 1586 | * seconds and there is data in the transmit queue, thus we |
| 1587 | * asume the card is stuck. | 1587 | * assume the card is stuck. |
| 1588 | */ | 1588 | */ |
| 1589 | if (*ap->tx_csm != ap->tx_ret_csm) { | 1589 | if (*ap->tx_csm != ap->tx_ret_csm) { |
| 1590 | printk(KERN_WARNING "%s: Transmitter is stuck, %08x\n", | 1590 | printk(KERN_WARNING "%s: Transmitter is stuck, %08x\n", |
| @@ -2564,7 +2564,7 @@ restart: | |||
| 2564 | 2564 | ||
| 2565 | /* | 2565 | /* |
| 2566 | * A TX-descriptor producer (an IRQ) might have gotten | 2566 | * A TX-descriptor producer (an IRQ) might have gotten |
| 2567 | * inbetween, making the ring free again. Since xmit is | 2567 | * between, making the ring free again. Since xmit is |
| 2568 | * serialized, this is the only situation we have to | 2568 | * serialized, this is the only situation we have to |
| 2569 | * re-test. | 2569 | * re-test. |
| 2570 | */ | 2570 | */ |
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c index 2ca880b4c0db..88495c48a81d 100644 --- a/drivers/net/amd8111e.c +++ b/drivers/net/amd8111e.c | |||
| @@ -1398,7 +1398,7 @@ static void amd8111e_set_multicast_list(struct net_device *dev) | |||
| 1398 | mc_filter[1] = mc_filter[0] = 0; | 1398 | mc_filter[1] = mc_filter[0] = 0; |
| 1399 | lp->options &= ~OPTION_MULTICAST_ENABLE; | 1399 | lp->options &= ~OPTION_MULTICAST_ENABLE; |
| 1400 | amd8111e_writeq(*(u64*)mc_filter,lp->mmio + LADRF); | 1400 | amd8111e_writeq(*(u64*)mc_filter,lp->mmio + LADRF); |
| 1401 | /* disable promiscous mode */ | 1401 | /* disable promiscuous mode */ |
| 1402 | writel(PROM, lp->mmio + CMD2); | 1402 | writel(PROM, lp->mmio + CMD2); |
| 1403 | return; | 1403 | return; |
| 1404 | } | 1404 | } |
diff --git a/drivers/net/at1700.c b/drivers/net/at1700.c index f4744fc89768..65a78f965dd2 100644 --- a/drivers/net/at1700.c +++ b/drivers/net/at1700.c | |||
| @@ -133,7 +133,7 @@ struct net_local { | |||
| 133 | /* Run-time register bank 2 definitions. */ | 133 | /* Run-time register bank 2 definitions. */ |
| 134 | #define DATAPORT 8 /* Word-wide DMA or programmed-I/O dataport. */ | 134 | #define DATAPORT 8 /* Word-wide DMA or programmed-I/O dataport. */ |
| 135 | #define TX_START 10 | 135 | #define TX_START 10 |
| 136 | #define COL16CNTL 11 /* Controll Reg for 16 collisions */ | 136 | #define COL16CNTL 11 /* Control Reg for 16 collisions */ |
| 137 | #define MODE13 13 | 137 | #define MODE13 13 |
| 138 | #define RX_CTRL 14 | 138 | #define RX_CTRL 14 |
| 139 | /* Configuration registers only on the '865A/B chips. */ | 139 | /* Configuration registers only on the '865A/B chips. */ |
diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c index 1ff001a8270c..b0a71e2f28a9 100644 --- a/drivers/net/atl1e/atl1e_main.c +++ b/drivers/net/atl1e/atl1e_main.c | |||
| @@ -2509,7 +2509,7 @@ static struct pci_driver atl1e_driver = { | |||
| 2509 | .id_table = atl1e_pci_tbl, | 2509 | .id_table = atl1e_pci_tbl, |
| 2510 | .probe = atl1e_probe, | 2510 | .probe = atl1e_probe, |
| 2511 | .remove = __devexit_p(atl1e_remove), | 2511 | .remove = __devexit_p(atl1e_remove), |
| 2512 | /* Power Managment Hooks */ | 2512 | /* Power Management Hooks */ |
| 2513 | #ifdef CONFIG_PM | 2513 | #ifdef CONFIG_PM |
| 2514 | .suspend = atl1e_suspend, | 2514 | .suspend = atl1e_suspend, |
| 2515 | .resume = atl1e_resume, | 2515 | .resume = atl1e_resume, |
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c index e637e9f28fd4..e3cbf45dc612 100644 --- a/drivers/net/atlx/atl2.c +++ b/drivers/net/atlx/atl2.c | |||
| @@ -1701,7 +1701,7 @@ static struct pci_driver atl2_driver = { | |||
| 1701 | .id_table = atl2_pci_tbl, | 1701 | .id_table = atl2_pci_tbl, |
| 1702 | .probe = atl2_probe, | 1702 | .probe = atl2_probe, |
| 1703 | .remove = __devexit_p(atl2_remove), | 1703 | .remove = __devexit_p(atl2_remove), |
| 1704 | /* Power Managment Hooks */ | 1704 | /* Power Management Hooks */ |
| 1705 | .suspend = atl2_suspend, | 1705 | .suspend = atl2_suspend, |
| 1706 | #ifdef CONFIG_PM | 1706 | #ifdef CONFIG_PM |
| 1707 | .resume = atl2_resume, | 1707 | .resume = atl2_resume, |
| @@ -1996,13 +1996,15 @@ static int atl2_set_eeprom(struct net_device *netdev, | |||
| 1996 | if (!eeprom_buff) | 1996 | if (!eeprom_buff) |
| 1997 | return -ENOMEM; | 1997 | return -ENOMEM; |
| 1998 | 1998 | ||
| 1999 | ptr = (u32 *)eeprom_buff; | 1999 | ptr = eeprom_buff; |
| 2000 | 2000 | ||
| 2001 | if (eeprom->offset & 3) { | 2001 | if (eeprom->offset & 3) { |
| 2002 | /* need read/modify/write of first changed EEPROM word */ | 2002 | /* need read/modify/write of first changed EEPROM word */ |
| 2003 | /* only the second byte of the word is being modified */ | 2003 | /* only the second byte of the word is being modified */ |
| 2004 | if (!atl2_read_eeprom(hw, first_dword*4, &(eeprom_buff[0]))) | 2004 | if (!atl2_read_eeprom(hw, first_dword*4, &(eeprom_buff[0]))) { |
| 2005 | return -EIO; | 2005 | ret_val = -EIO; |
| 2006 | goto out; | ||
| 2007 | } | ||
| 2006 | ptr++; | 2008 | ptr++; |
| 2007 | } | 2009 | } |
| 2008 | if (((eeprom->offset + eeprom->len) & 3)) { | 2010 | if (((eeprom->offset + eeprom->len) & 3)) { |
| @@ -2011,18 +2013,22 @@ static int atl2_set_eeprom(struct net_device *netdev, | |||
| 2011 | * only the first byte of the word is being modified | 2013 | * only the first byte of the word is being modified |
| 2012 | */ | 2014 | */ |
| 2013 | if (!atl2_read_eeprom(hw, last_dword * 4, | 2015 | if (!atl2_read_eeprom(hw, last_dword * 4, |
| 2014 | &(eeprom_buff[last_dword - first_dword]))) | 2016 | &(eeprom_buff[last_dword - first_dword]))) { |
| 2015 | return -EIO; | 2017 | ret_val = -EIO; |
| 2018 | goto out; | ||
| 2019 | } | ||
| 2016 | } | 2020 | } |
| 2017 | 2021 | ||
| 2018 | /* Device's eeprom is always little-endian, word addressable */ | 2022 | /* Device's eeprom is always little-endian, word addressable */ |
| 2019 | memcpy(ptr, bytes, eeprom->len); | 2023 | memcpy(ptr, bytes, eeprom->len); |
| 2020 | 2024 | ||
| 2021 | for (i = 0; i < last_dword - first_dword + 1; i++) { | 2025 | for (i = 0; i < last_dword - first_dword + 1; i++) { |
| 2022 | if (!atl2_write_eeprom(hw, ((first_dword+i)*4), eeprom_buff[i])) | 2026 | if (!atl2_write_eeprom(hw, ((first_dword+i)*4), eeprom_buff[i])) { |
| 2023 | return -EIO; | 2027 | ret_val = -EIO; |
| 2028 | goto out; | ||
| 2029 | } | ||
| 2024 | } | 2030 | } |
| 2025 | 2031 | out: | |
| 2026 | kfree(eeprom_buff); | 2032 | kfree(eeprom_buff); |
| 2027 | return ret_val; | 2033 | return ret_val; |
| 2028 | } | 2034 | } |
diff --git a/drivers/net/bcm63xx_enet.c b/drivers/net/bcm63xx_enet.c index e94a966af418..c48104b08861 100644 --- a/drivers/net/bcm63xx_enet.c +++ b/drivers/net/bcm63xx_enet.c | |||
| @@ -597,7 +597,7 @@ static int bcm_enet_set_mac_address(struct net_device *dev, void *p) | |||
| 597 | } | 597 | } |
| 598 | 598 | ||
| 599 | /* | 599 | /* |
| 600 | * Change rx mode (promiscous/allmulti) and update multicast list | 600 | * Change rx mode (promiscuous/allmulti) and update multicast list |
| 601 | */ | 601 | */ |
| 602 | static void bcm_enet_set_multicast_list(struct net_device *dev) | 602 | static void bcm_enet_set_multicast_list(struct net_device *dev) |
| 603 | { | 603 | { |
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h index f803c58b941d..66823eded7a3 100644 --- a/drivers/net/benet/be.h +++ b/drivers/net/benet/be.h | |||
| @@ -154,7 +154,7 @@ struct be_eq_obj { | |||
| 154 | u16 min_eqd; /* in usecs */ | 154 | u16 min_eqd; /* in usecs */ |
| 155 | u16 max_eqd; /* in usecs */ | 155 | u16 max_eqd; /* in usecs */ |
| 156 | u16 cur_eqd; /* in usecs */ | 156 | u16 cur_eqd; /* in usecs */ |
| 157 | u8 msix_vec_idx; | 157 | u8 eq_idx; |
| 158 | 158 | ||
| 159 | struct napi_struct napi; | 159 | struct napi_struct napi; |
| 160 | }; | 160 | }; |
| @@ -291,7 +291,7 @@ struct be_adapter { | |||
| 291 | u32 num_rx_qs; | 291 | u32 num_rx_qs; |
| 292 | u32 big_page_size; /* Compounded page size shared by rx wrbs */ | 292 | u32 big_page_size; /* Compounded page size shared by rx wrbs */ |
| 293 | 293 | ||
| 294 | u8 msix_vec_next_idx; | 294 | u8 eq_next_idx; |
| 295 | struct be_drv_stats drv_stats; | 295 | struct be_drv_stats drv_stats; |
| 296 | 296 | ||
| 297 | struct vlan_group *vlan_grp; | 297 | struct vlan_group *vlan_grp; |
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index 5a4a87e7c5ea..1e2d825bb94a 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c | |||
| @@ -1331,7 +1331,7 @@ err: | |||
| 1331 | 1331 | ||
| 1332 | /* | 1332 | /* |
| 1333 | * Uses MCC for this command as it may be called in BH context | 1333 | * Uses MCC for this command as it may be called in BH context |
| 1334 | * (mc == NULL) => multicast promiscous | 1334 | * (mc == NULL) => multicast promiscuous |
| 1335 | */ | 1335 | */ |
| 1336 | int be_cmd_multicast_set(struct be_adapter *adapter, u32 if_id, | 1336 | int be_cmd_multicast_set(struct be_adapter *adapter, u32 if_id, |
| 1337 | struct net_device *netdev, struct be_dma_mem *mem) | 1337 | struct net_device *netdev, struct be_dma_mem *mem) |
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index a71163f1e34b..7cb5a114c733 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
| @@ -708,7 +708,7 @@ static void be_set_multicast_list(struct net_device *netdev) | |||
| 708 | goto done; | 708 | goto done; |
| 709 | } | 709 | } |
| 710 | 710 | ||
| 711 | /* BE was previously in promiscous mode; disable it */ | 711 | /* BE was previously in promiscuous mode; disable it */ |
| 712 | if (adapter->promiscuous) { | 712 | if (adapter->promiscuous) { |
| 713 | adapter->promiscuous = false; | 713 | adapter->promiscuous = false; |
| 714 | be_cmd_promiscuous_config(adapter, adapter->port_num, 0); | 714 | be_cmd_promiscuous_config(adapter, adapter->port_num, 0); |
| @@ -1497,7 +1497,7 @@ static int be_tx_queues_create(struct be_adapter *adapter) | |||
| 1497 | if (be_cmd_eq_create(adapter, eq, adapter->tx_eq.cur_eqd)) | 1497 | if (be_cmd_eq_create(adapter, eq, adapter->tx_eq.cur_eqd)) |
| 1498 | goto tx_eq_free; | 1498 | goto tx_eq_free; |
| 1499 | 1499 | ||
| 1500 | adapter->tx_eq.msix_vec_idx = adapter->msix_vec_next_idx++; | 1500 | adapter->tx_eq.eq_idx = adapter->eq_next_idx++; |
| 1501 | 1501 | ||
| 1502 | 1502 | ||
| 1503 | /* Alloc TX eth compl queue */ | 1503 | /* Alloc TX eth compl queue */ |
| @@ -1590,7 +1590,7 @@ static int be_rx_queues_create(struct be_adapter *adapter) | |||
| 1590 | if (rc) | 1590 | if (rc) |
| 1591 | goto err; | 1591 | goto err; |
| 1592 | 1592 | ||
| 1593 | rxo->rx_eq.msix_vec_idx = adapter->msix_vec_next_idx++; | 1593 | rxo->rx_eq.eq_idx = adapter->eq_next_idx++; |
| 1594 | 1594 | ||
| 1595 | /* CQ */ | 1595 | /* CQ */ |
| 1596 | cq = &rxo->cq; | 1596 | cq = &rxo->cq; |
| @@ -1666,11 +1666,11 @@ static irqreturn_t be_intx(int irq, void *dev) | |||
| 1666 | if (!isr) | 1666 | if (!isr) |
| 1667 | return IRQ_NONE; | 1667 | return IRQ_NONE; |
| 1668 | 1668 | ||
| 1669 | if ((1 << adapter->tx_eq.msix_vec_idx & isr)) | 1669 | if ((1 << adapter->tx_eq.eq_idx & isr)) |
| 1670 | event_handle(adapter, &adapter->tx_eq); | 1670 | event_handle(adapter, &adapter->tx_eq); |
| 1671 | 1671 | ||
| 1672 | for_all_rx_queues(adapter, rxo, i) { | 1672 | for_all_rx_queues(adapter, rxo, i) { |
| 1673 | if ((1 << rxo->rx_eq.msix_vec_idx & isr)) | 1673 | if ((1 << rxo->rx_eq.eq_idx & isr)) |
| 1674 | event_handle(adapter, &rxo->rx_eq); | 1674 | event_handle(adapter, &rxo->rx_eq); |
| 1675 | } | 1675 | } |
| 1676 | } | 1676 | } |
| @@ -1951,7 +1951,7 @@ static void be_sriov_disable(struct be_adapter *adapter) | |||
| 1951 | static inline int be_msix_vec_get(struct be_adapter *adapter, | 1951 | static inline int be_msix_vec_get(struct be_adapter *adapter, |
| 1952 | struct be_eq_obj *eq_obj) | 1952 | struct be_eq_obj *eq_obj) |
| 1953 | { | 1953 | { |
| 1954 | return adapter->msix_entries[eq_obj->msix_vec_idx].vector; | 1954 | return adapter->msix_entries[eq_obj->eq_idx].vector; |
| 1955 | } | 1955 | } |
| 1956 | 1956 | ||
| 1957 | static int be_request_irq(struct be_adapter *adapter, | 1957 | static int be_request_irq(struct be_adapter *adapter, |
| @@ -2345,6 +2345,7 @@ static int be_clear(struct be_adapter *adapter) | |||
| 2345 | be_mcc_queues_destroy(adapter); | 2345 | be_mcc_queues_destroy(adapter); |
| 2346 | be_rx_queues_destroy(adapter); | 2346 | be_rx_queues_destroy(adapter); |
| 2347 | be_tx_queues_destroy(adapter); | 2347 | be_tx_queues_destroy(adapter); |
| 2348 | adapter->eq_next_idx = 0; | ||
| 2348 | 2349 | ||
| 2349 | if (be_physfn(adapter) && adapter->sriov_enabled) | 2350 | if (be_physfn(adapter) && adapter->sriov_enabled) |
| 2350 | for (vf = 0; vf < num_vfs; vf++) | 2351 | for (vf = 0; vf < num_vfs; vf++) |
| @@ -3141,12 +3142,14 @@ static int be_resume(struct pci_dev *pdev) | |||
| 3141 | static void be_shutdown(struct pci_dev *pdev) | 3142 | static void be_shutdown(struct pci_dev *pdev) |
| 3142 | { | 3143 | { |
| 3143 | struct be_adapter *adapter = pci_get_drvdata(pdev); | 3144 | struct be_adapter *adapter = pci_get_drvdata(pdev); |
| 3144 | struct net_device *netdev = adapter->netdev; | ||
| 3145 | 3145 | ||
| 3146 | if (netif_running(netdev)) | 3146 | if (!adapter) |
| 3147 | return; | ||
| 3148 | |||
| 3149 | if (netif_running(adapter->netdev)) | ||
| 3147 | cancel_delayed_work_sync(&adapter->work); | 3150 | cancel_delayed_work_sync(&adapter->work); |
| 3148 | 3151 | ||
| 3149 | netif_device_detach(netdev); | 3152 | netif_device_detach(adapter->netdev); |
| 3150 | 3153 | ||
| 3151 | be_cmd_reset_function(adapter); | 3154 | be_cmd_reset_function(adapter); |
| 3152 | 3155 | ||
diff --git a/drivers/net/bna/bfa_ioc.c b/drivers/net/bna/bfa_ioc.c index 34933cb9569f..e3de0b8625cd 100644 --- a/drivers/net/bna/bfa_ioc.c +++ b/drivers/net/bna/bfa_ioc.c | |||
| @@ -2219,13 +2219,9 @@ bfa_nw_ioc_get_mac(struct bfa_ioc *ioc) | |||
| 2219 | static void | 2219 | static void |
| 2220 | bfa_ioc_recover(struct bfa_ioc *ioc) | 2220 | bfa_ioc_recover(struct bfa_ioc *ioc) |
| 2221 | { | 2221 | { |
| 2222 | u16 bdf; | 2222 | pr_crit("Heart Beat of IOC has failed\n"); |
| 2223 | 2223 | bfa_ioc_stats(ioc, ioc_hbfails); | |
| 2224 | bdf = (ioc->pcidev.pci_slot << 8 | ioc->pcidev.pci_func << 3 | | 2224 | bfa_fsm_send_event(ioc, IOC_E_HBFAIL); |
| 2225 | ioc->pcidev.device_id); | ||
| 2226 | |||
| 2227 | pr_crit("Firmware heartbeat failure at %d", bdf); | ||
| 2228 | BUG_ON(1); | ||
| 2229 | } | 2225 | } |
| 2230 | 2226 | ||
| 2231 | static void | 2227 | static void |
diff --git a/drivers/net/bna/bna_hw.h b/drivers/net/bna/bna_hw.h index 806b224a4c63..6cb89692f5c1 100644 --- a/drivers/net/bna/bna_hw.h +++ b/drivers/net/bna/bna_hw.h | |||
| @@ -897,7 +897,7 @@ static struct bna_ritseg_pool_cfg name[BFI_RIT_SEG_TOTAL_POOLS] = \ | |||
| 897 | * Catapult RSS Table Base Offset Address | 897 | * Catapult RSS Table Base Offset Address |
| 898 | * | 898 | * |
| 899 | * Exists in RAD memory space. | 899 | * Exists in RAD memory space. |
| 900 | * Each entry is 352 bits, but alligned on | 900 | * Each entry is 352 bits, but aligned on |
| 901 | * 64 byte (512 bit) boundary. Accessed | 901 | * 64 byte (512 bit) boundary. Accessed |
| 902 | * 4 byte words, the whole entry can be | 902 | * 4 byte words, the whole entry can be |
| 903 | * broken into 11 word accesses. | 903 | * broken into 11 word accesses. |
diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h index b7ff87b35fbb..e0fca701d2f3 100644 --- a/drivers/net/bnx2x/bnx2x.h +++ b/drivers/net/bnx2x/bnx2x.h | |||
| @@ -1220,7 +1220,7 @@ struct bnx2x { | |||
| 1220 | struct bnx2x_dcbx_port_params dcbx_port_params; | 1220 | struct bnx2x_dcbx_port_params dcbx_port_params; |
| 1221 | int dcb_version; | 1221 | int dcb_version; |
| 1222 | 1222 | ||
| 1223 | /* DCBX Negotation results */ | 1223 | /* DCBX Negotiation results */ |
| 1224 | struct dcbx_features dcbx_local_feat; | 1224 | struct dcbx_features dcbx_local_feat; |
| 1225 | u32 dcbx_error; | 1225 | u32 dcbx_error; |
| 1226 | u32 pending_max; | 1226 | u32 pending_max; |
diff --git a/drivers/net/bnx2x/bnx2x_hsi.h b/drivers/net/bnx2x/bnx2x_hsi.h index be503cc0a50b..dac1bf9cbbfa 100644 --- a/drivers/net/bnx2x/bnx2x_hsi.h +++ b/drivers/net/bnx2x/bnx2x_hsi.h | |||
| @@ -3019,7 +3019,7 @@ struct tstorm_eth_mac_filter_config { | |||
| 3019 | 3019 | ||
| 3020 | 3020 | ||
| 3021 | /* | 3021 | /* |
| 3022 | * common flag to indicate existance of TPA. | 3022 | * common flag to indicate existence of TPA. |
| 3023 | */ | 3023 | */ |
| 3024 | struct tstorm_eth_tpa_exist { | 3024 | struct tstorm_eth_tpa_exist { |
| 3025 | #if defined(__BIG_ENDIAN) | 3025 | #if defined(__BIG_ENDIAN) |
diff --git a/drivers/net/bnx2x/bnx2x_link.c b/drivers/net/bnx2x/bnx2x_link.c index f2f367d4e74d..974ef2be36a5 100644 --- a/drivers/net/bnx2x/bnx2x_link.c +++ b/drivers/net/bnx2x/bnx2x_link.c | |||
| @@ -2823,7 +2823,7 @@ static u16 bnx2x_wait_reset_complete(struct bnx2x *bp, | |||
| 2823 | struct link_params *params) | 2823 | struct link_params *params) |
| 2824 | { | 2824 | { |
| 2825 | u16 cnt, ctrl; | 2825 | u16 cnt, ctrl; |
| 2826 | /* Wait for soft reset to get cleared upto 1 sec */ | 2826 | /* Wait for soft reset to get cleared up to 1 sec */ |
| 2827 | for (cnt = 0; cnt < 1000; cnt++) { | 2827 | for (cnt = 0; cnt < 1000; cnt++) { |
| 2828 | bnx2x_cl45_read(bp, phy, | 2828 | bnx2x_cl45_read(bp, phy, |
| 2829 | MDIO_PMA_DEVAD, MDIO_PMA_REG_CTRL, &ctrl); | 2829 | MDIO_PMA_DEVAD, MDIO_PMA_REG_CTRL, &ctrl); |
| @@ -4141,7 +4141,7 @@ static u8 bnx2x_8073_config_init(struct bnx2x_phy *phy, | |||
| 4141 | val = (1<<5); | 4141 | val = (1<<5); |
| 4142 | /* | 4142 | /* |
| 4143 | * Note that 2.5G works only when used with 1G | 4143 | * Note that 2.5G works only when used with 1G |
| 4144 | * advertisment | 4144 | * advertisement |
| 4145 | */ | 4145 | */ |
| 4146 | } else | 4146 | } else |
| 4147 | val = (1<<5); | 4147 | val = (1<<5); |
| @@ -4151,7 +4151,7 @@ static u8 bnx2x_8073_config_init(struct bnx2x_phy *phy, | |||
| 4151 | PORT_HW_CFG_SPEED_CAPABILITY_D0_10G) | 4151 | PORT_HW_CFG_SPEED_CAPABILITY_D0_10G) |
| 4152 | val |= (1<<7); | 4152 | val |= (1<<7); |
| 4153 | 4153 | ||
| 4154 | /* Note that 2.5G works only when used with 1G advertisment */ | 4154 | /* Note that 2.5G works only when used with 1G advertisement */ |
| 4155 | if (phy->speed_cap_mask & | 4155 | if (phy->speed_cap_mask & |
| 4156 | (PORT_HW_CFG_SPEED_CAPABILITY_D0_1G | | 4156 | (PORT_HW_CFG_SPEED_CAPABILITY_D0_1G | |
| 4157 | PORT_HW_CFG_SPEED_CAPABILITY_D0_2_5G)) | 4157 | PORT_HW_CFG_SPEED_CAPABILITY_D0_2_5G)) |
| @@ -5232,14 +5232,14 @@ static u8 bnx2x_8706_config_init(struct bnx2x_phy *phy, | |||
| 5232 | bnx2x_cl45_write(bp, phy, | 5232 | bnx2x_cl45_write(bp, phy, |
| 5233 | MDIO_PMA_DEVAD, MDIO_PMA_REG_LASI_CTRL, 1); | 5233 | MDIO_PMA_DEVAD, MDIO_PMA_REG_LASI_CTRL, 1); |
| 5234 | } else { | 5234 | } else { |
| 5235 | /* Force 1Gbps using autoneg with 1G advertisment */ | 5235 | /* Force 1Gbps using autoneg with 1G advertisement */ |
| 5236 | 5236 | ||
| 5237 | /* Allow CL37 through CL73 */ | 5237 | /* Allow CL37 through CL73 */ |
| 5238 | DP(NETIF_MSG_LINK, "XGXS 8706 AutoNeg\n"); | 5238 | DP(NETIF_MSG_LINK, "XGXS 8706 AutoNeg\n"); |
| 5239 | bnx2x_cl45_write(bp, phy, | 5239 | bnx2x_cl45_write(bp, phy, |
| 5240 | MDIO_AN_DEVAD, MDIO_AN_REG_CL37_CL73, 0x040c); | 5240 | MDIO_AN_DEVAD, MDIO_AN_REG_CL37_CL73, 0x040c); |
| 5241 | 5241 | ||
| 5242 | /* Enable Full-Duplex advertisment on CL37 */ | 5242 | /* Enable Full-Duplex advertisement on CL37 */ |
| 5243 | bnx2x_cl45_write(bp, phy, | 5243 | bnx2x_cl45_write(bp, phy, |
| 5244 | MDIO_AN_DEVAD, MDIO_AN_REG_CL37_FC_LP, 0x0020); | 5244 | MDIO_AN_DEVAD, MDIO_AN_REG_CL37_FC_LP, 0x0020); |
| 5245 | /* Enable CL37 AN */ | 5245 | /* Enable CL37 AN */ |
| @@ -6269,7 +6269,7 @@ static u8 bnx2x_848x3_config_init(struct bnx2x_phy *phy, | |||
| 6269 | 6269 | ||
| 6270 | switch (actual_phy_selection) { | 6270 | switch (actual_phy_selection) { |
| 6271 | case PORT_HW_CFG_PHY_SELECTION_HARDWARE_DEFAULT: | 6271 | case PORT_HW_CFG_PHY_SELECTION_HARDWARE_DEFAULT: |
| 6272 | /* Do nothing. Essentialy this is like the priority copper */ | 6272 | /* Do nothing. Essentially this is like the priority copper */ |
| 6273 | break; | 6273 | break; |
| 6274 | case PORT_HW_CFG_PHY_SELECTION_FIRST_PHY_PRIORITY: | 6274 | case PORT_HW_CFG_PHY_SELECTION_FIRST_PHY_PRIORITY: |
| 6275 | val |= MDIO_CTL_REG_84823_MEDIA_PRIORITY_COPPER; | 6275 | val |= MDIO_CTL_REG_84823_MEDIA_PRIORITY_COPPER; |
| @@ -7765,7 +7765,7 @@ u8 bnx2x_link_reset(struct link_params *params, struct link_vars *vars, | |||
| 7765 | REG_WR(bp, NIG_REG_NIG_EMAC0_EN + port*4, 0); | 7765 | REG_WR(bp, NIG_REG_NIG_EMAC0_EN + port*4, 0); |
| 7766 | 7766 | ||
| 7767 | msleep(10); | 7767 | msleep(10); |
| 7768 | /* The PHY reset is controled by GPIO 1 | 7768 | /* The PHY reset is controlled by GPIO 1 |
| 7769 | * Hold it as vars low | 7769 | * Hold it as vars low |
| 7770 | */ | 7770 | */ |
| 7771 | /* clear link led */ | 7771 | /* clear link led */ |
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c index 32e64cc85d2c..a97a4a1c344f 100644 --- a/drivers/net/bnx2x/bnx2x_main.c +++ b/drivers/net/bnx2x/bnx2x_main.c | |||
| @@ -3702,7 +3702,7 @@ static void bnx2x_eq_int(struct bnx2x *bp) | |||
| 3702 | if ((hw_cons & EQ_DESC_MAX_PAGE) == EQ_DESC_MAX_PAGE) | 3702 | if ((hw_cons & EQ_DESC_MAX_PAGE) == EQ_DESC_MAX_PAGE) |
| 3703 | hw_cons++; | 3703 | hw_cons++; |
| 3704 | 3704 | ||
| 3705 | /* This function may never run in parralel with itself for a | 3705 | /* This function may never run in parallel with itself for a |
| 3706 | * specific bp, thus there is no need in "paired" read memory | 3706 | * specific bp, thus there is no need in "paired" read memory |
| 3707 | * barrier here. | 3707 | * barrier here. |
| 3708 | */ | 3708 | */ |
| @@ -5089,7 +5089,7 @@ static int bnx2x_init_hw_common(struct bnx2x *bp, u32 load_code) | |||
| 5089 | /* Step 1: set zeroes to all ilt page entries with valid bit on | 5089 | /* Step 1: set zeroes to all ilt page entries with valid bit on |
| 5090 | * Step 2: set the timers first/last ilt entry to point | 5090 | * Step 2: set the timers first/last ilt entry to point |
| 5091 | * to the entire range to prevent ILT range error for 3rd/4th | 5091 | * to the entire range to prevent ILT range error for 3rd/4th |
| 5092 | * vnic (this code assumes existance of the vnic) | 5092 | * vnic (this code assumes existence of the vnic) |
| 5093 | * | 5093 | * |
| 5094 | * both steps performed by call to bnx2x_ilt_client_init_op() | 5094 | * both steps performed by call to bnx2x_ilt_client_init_op() |
| 5095 | * with dummy TM client | 5095 | * with dummy TM client |
| @@ -8685,7 +8685,7 @@ static int __devinit bnx2x_get_hwinfo(struct bnx2x *bp) | |||
| 8685 | E1H_FUNC_MAX * sizeof(struct drv_func_mb); | 8685 | E1H_FUNC_MAX * sizeof(struct drv_func_mb); |
| 8686 | /* | 8686 | /* |
| 8687 | * get mf configuration: | 8687 | * get mf configuration: |
| 8688 | * 1. existance of MF configuration | 8688 | * 1. existence of MF configuration |
| 8689 | * 2. MAC address must be legal (check only upper bytes) | 8689 | * 2. MAC address must be legal (check only upper bytes) |
| 8690 | * for Switch-Independent mode; | 8690 | * for Switch-Independent mode; |
| 8691 | * OVLAN must be legal for Switch-Dependent mode | 8691 | * OVLAN must be legal for Switch-Dependent mode |
| @@ -8727,7 +8727,7 @@ static int __devinit bnx2x_get_hwinfo(struct bnx2x *bp) | |||
| 8727 | default: | 8727 | default: |
| 8728 | /* Unknown configuration: reset mf_config */ | 8728 | /* Unknown configuration: reset mf_config */ |
| 8729 | bp->mf_config[vn] = 0; | 8729 | bp->mf_config[vn] = 0; |
| 8730 | DP(NETIF_MSG_PROBE, "Unkown MF mode 0x%x\n", | 8730 | DP(NETIF_MSG_PROBE, "Unknown MF mode 0x%x\n", |
| 8731 | val); | 8731 | val); |
| 8732 | } | 8732 | } |
| 8733 | } | 8733 | } |
| @@ -9777,7 +9777,7 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev, | |||
| 9777 | 9777 | ||
| 9778 | #endif | 9778 | #endif |
| 9779 | 9779 | ||
| 9780 | /* Configure interupt mode: try to enable MSI-X/MSI if | 9780 | /* Configure interrupt mode: try to enable MSI-X/MSI if |
| 9781 | * needed, set bp->num_queues appropriately. | 9781 | * needed, set bp->num_queues appropriately. |
| 9782 | */ | 9782 | */ |
| 9783 | bnx2x_set_int_mode(bp); | 9783 | bnx2x_set_int_mode(bp); |
diff --git a/drivers/net/bnx2x/bnx2x_reg.h b/drivers/net/bnx2x/bnx2x_reg.h index 1c89f19a4425..1509a2318af9 100644 --- a/drivers/net/bnx2x/bnx2x_reg.h +++ b/drivers/net/bnx2x/bnx2x_reg.h | |||
| @@ -175,9 +175,9 @@ | |||
| 175 | the initial credit value; read returns the current value of the credit | 175 | the initial credit value; read returns the current value of the credit |
| 176 | counter. Must be initialized to 1 at start-up. */ | 176 | counter. Must be initialized to 1 at start-up. */ |
| 177 | #define CCM_REG_CFC_INIT_CRD 0xd0204 | 177 | #define CCM_REG_CFC_INIT_CRD 0xd0204 |
| 178 | /* [RW 2] Auxillary counter flag Q number 1. */ | 178 | /* [RW 2] Auxiliary counter flag Q number 1. */ |
| 179 | #define CCM_REG_CNT_AUX1_Q 0xd00c8 | 179 | #define CCM_REG_CNT_AUX1_Q 0xd00c8 |
| 180 | /* [RW 2] Auxillary counter flag Q number 2. */ | 180 | /* [RW 2] Auxiliary counter flag Q number 2. */ |
| 181 | #define CCM_REG_CNT_AUX2_Q 0xd00cc | 181 | #define CCM_REG_CNT_AUX2_Q 0xd00cc |
| 182 | /* [RW 28] The CM header value for QM request (primary). */ | 182 | /* [RW 28] The CM header value for QM request (primary). */ |
| 183 | #define CCM_REG_CQM_CCM_HDR_P 0xd008c | 183 | #define CCM_REG_CQM_CCM_HDR_P 0xd008c |
| @@ -457,13 +457,13 @@ | |||
| 457 | #define CSDM_REG_AGG_INT_MODE_9 0xc21dc | 457 | #define CSDM_REG_AGG_INT_MODE_9 0xc21dc |
| 458 | /* [RW 13] The start address in the internal RAM for the cfc_rsp lcid */ | 458 | /* [RW 13] The start address in the internal RAM for the cfc_rsp lcid */ |
| 459 | #define CSDM_REG_CFC_RSP_START_ADDR 0xc2008 | 459 | #define CSDM_REG_CFC_RSP_START_ADDR 0xc2008 |
| 460 | /* [RW 16] The maximum value of the competion counter #0 */ | 460 | /* [RW 16] The maximum value of the completion counter #0 */ |
| 461 | #define CSDM_REG_CMP_COUNTER_MAX0 0xc201c | 461 | #define CSDM_REG_CMP_COUNTER_MAX0 0xc201c |
| 462 | /* [RW 16] The maximum value of the competion counter #1 */ | 462 | /* [RW 16] The maximum value of the completion counter #1 */ |
| 463 | #define CSDM_REG_CMP_COUNTER_MAX1 0xc2020 | 463 | #define CSDM_REG_CMP_COUNTER_MAX1 0xc2020 |
| 464 | /* [RW 16] The maximum value of the competion counter #2 */ | 464 | /* [RW 16] The maximum value of the completion counter #2 */ |
| 465 | #define CSDM_REG_CMP_COUNTER_MAX2 0xc2024 | 465 | #define CSDM_REG_CMP_COUNTER_MAX2 0xc2024 |
| 466 | /* [RW 16] The maximum value of the competion counter #3 */ | 466 | /* [RW 16] The maximum value of the completion counter #3 */ |
| 467 | #define CSDM_REG_CMP_COUNTER_MAX3 0xc2028 | 467 | #define CSDM_REG_CMP_COUNTER_MAX3 0xc2028 |
| 468 | /* [RW 13] The start address in the internal RAM for the completion | 468 | /* [RW 13] The start address in the internal RAM for the completion |
| 469 | counters. */ | 469 | counters. */ |
| @@ -851,7 +851,7 @@ | |||
| 851 | #define IGU_REG_ATTN_MSG_ADDR_L 0x130120 | 851 | #define IGU_REG_ATTN_MSG_ADDR_L 0x130120 |
| 852 | /* [R 4] Debug: [3] - attention write done message is pending (0-no pending; | 852 | /* [R 4] Debug: [3] - attention write done message is pending (0-no pending; |
| 853 | * 1-pending). [2:0] = PFID. Pending means attention message was sent; but | 853 | * 1-pending). [2:0] = PFID. Pending means attention message was sent; but |
| 854 | * write done didnt receive. */ | 854 | * write done didn't receive. */ |
| 855 | #define IGU_REG_ATTN_WRITE_DONE_PENDING 0x130030 | 855 | #define IGU_REG_ATTN_WRITE_DONE_PENDING 0x130030 |
| 856 | #define IGU_REG_BLOCK_CONFIGURATION 0x130000 | 856 | #define IGU_REG_BLOCK_CONFIGURATION 0x130000 |
| 857 | #define IGU_REG_COMMAND_REG_32LSB_DATA 0x130124 | 857 | #define IGU_REG_COMMAND_REG_32LSB_DATA 0x130124 |
| @@ -862,7 +862,7 @@ | |||
| 862 | #define IGU_REG_CSTORM_TYPE_0_SB_CLEANUP 0x130200 | 862 | #define IGU_REG_CSTORM_TYPE_0_SB_CLEANUP 0x130200 |
| 863 | /* [R 5] Debug: ctrl_fsm */ | 863 | /* [R 5] Debug: ctrl_fsm */ |
| 864 | #define IGU_REG_CTRL_FSM 0x130064 | 864 | #define IGU_REG_CTRL_FSM 0x130064 |
| 865 | /* [R 1] data availble for error memory. If this bit is clear do not red | 865 | /* [R 1] data available for error memory. If this bit is clear do not red |
| 866 | * from error_handling_memory. */ | 866 | * from error_handling_memory. */ |
| 867 | #define IGU_REG_ERROR_HANDLING_DATA_VALID 0x130130 | 867 | #define IGU_REG_ERROR_HANDLING_DATA_VALID 0x130130 |
| 868 | /* [RW 11] Parity mask register #0 read/write */ | 868 | /* [RW 11] Parity mask register #0 read/write */ |
| @@ -3015,7 +3015,7 @@ | |||
| 3015 | block. Should be used for close the gates. */ | 3015 | block. Should be used for close the gates. */ |
| 3016 | #define PXP_REG_HST_DISCARD_DOORBELLS 0x1030a4 | 3016 | #define PXP_REG_HST_DISCARD_DOORBELLS 0x1030a4 |
| 3017 | /* [R 1] debug only: '1' means this PSWHST is discarding doorbells. This bit | 3017 | /* [R 1] debug only: '1' means this PSWHST is discarding doorbells. This bit |
| 3018 | should update accoring to 'hst_discard_doorbells' register when the state | 3018 | should update according to 'hst_discard_doorbells' register when the state |
| 3019 | machine is idle */ | 3019 | machine is idle */ |
| 3020 | #define PXP_REG_HST_DISCARD_DOORBELLS_STATUS 0x1030a0 | 3020 | #define PXP_REG_HST_DISCARD_DOORBELLS_STATUS 0x1030a0 |
| 3021 | /* [RW 1] When 1; new internal writes arriving to the block are discarded. | 3021 | /* [RW 1] When 1; new internal writes arriving to the block are discarded. |
| @@ -3023,7 +3023,7 @@ | |||
| 3023 | #define PXP_REG_HST_DISCARD_INTERNAL_WRITES 0x1030a8 | 3023 | #define PXP_REG_HST_DISCARD_INTERNAL_WRITES 0x1030a8 |
| 3024 | /* [R 6] debug only: A bit mask for all PSWHST internal write clients. '1' | 3024 | /* [R 6] debug only: A bit mask for all PSWHST internal write clients. '1' |
| 3025 | means this PSWHST is discarding inputs from this client. Each bit should | 3025 | means this PSWHST is discarding inputs from this client. Each bit should |
| 3026 | update accoring to 'hst_discard_internal_writes' register when the state | 3026 | update according to 'hst_discard_internal_writes' register when the state |
| 3027 | machine is idle. */ | 3027 | machine is idle. */ |
| 3028 | #define PXP_REG_HST_DISCARD_INTERNAL_WRITES_STATUS 0x10309c | 3028 | #define PXP_REG_HST_DISCARD_INTERNAL_WRITES_STATUS 0x10309c |
| 3029 | /* [WB 160] Used for initialization of the inbound interrupts memory */ | 3029 | /* [WB 160] Used for initialization of the inbound interrupts memory */ |
| @@ -3822,13 +3822,13 @@ | |||
| 3822 | #define TSDM_REG_AGG_INT_T_1 0x420bc | 3822 | #define TSDM_REG_AGG_INT_T_1 0x420bc |
| 3823 | /* [RW 13] The start address in the internal RAM for the cfc_rsp lcid */ | 3823 | /* [RW 13] The start address in the internal RAM for the cfc_rsp lcid */ |
| 3824 | #define TSDM_REG_CFC_RSP_START_ADDR 0x42008 | 3824 | #define TSDM_REG_CFC_RSP_START_ADDR 0x42008 |
| 3825 | /* [RW 16] The maximum value of the competion counter #0 */ | 3825 | /* [RW 16] The maximum value of the completion counter #0 */ |
| 3826 | #define TSDM_REG_CMP_COUNTER_MAX0 0x4201c | 3826 | #define TSDM_REG_CMP_COUNTER_MAX0 0x4201c |
| 3827 | /* [RW 16] The maximum value of the competion counter #1 */ | 3827 | /* [RW 16] The maximum value of the completion counter #1 */ |
| 3828 | #define TSDM_REG_CMP_COUNTER_MAX1 0x42020 | 3828 | #define TSDM_REG_CMP_COUNTER_MAX1 0x42020 |
| 3829 | /* [RW 16] The maximum value of the competion counter #2 */ | 3829 | /* [RW 16] The maximum value of the completion counter #2 */ |
| 3830 | #define TSDM_REG_CMP_COUNTER_MAX2 0x42024 | 3830 | #define TSDM_REG_CMP_COUNTER_MAX2 0x42024 |
| 3831 | /* [RW 16] The maximum value of the competion counter #3 */ | 3831 | /* [RW 16] The maximum value of the completion counter #3 */ |
| 3832 | #define TSDM_REG_CMP_COUNTER_MAX3 0x42028 | 3832 | #define TSDM_REG_CMP_COUNTER_MAX3 0x42028 |
| 3833 | /* [RW 13] The start address in the internal RAM for the completion | 3833 | /* [RW 13] The start address in the internal RAM for the completion |
| 3834 | counters. */ | 3834 | counters. */ |
| @@ -4284,13 +4284,13 @@ | |||
| 4284 | #define USDM_REG_AGG_INT_T_6 0xc40d0 | 4284 | #define USDM_REG_AGG_INT_T_6 0xc40d0 |
| 4285 | /* [RW 13] The start address in the internal RAM for the cfc_rsp lcid */ | 4285 | /* [RW 13] The start address in the internal RAM for the cfc_rsp lcid */ |
| 4286 | #define USDM_REG_CFC_RSP_START_ADDR 0xc4008 | 4286 | #define USDM_REG_CFC_RSP_START_ADDR 0xc4008 |
| 4287 | /* [RW 16] The maximum value of the competion counter #0 */ | 4287 | /* [RW 16] The maximum value of the completion counter #0 */ |
| 4288 | #define USDM_REG_CMP_COUNTER_MAX0 0xc401c | 4288 | #define USDM_REG_CMP_COUNTER_MAX0 0xc401c |
| 4289 | /* [RW 16] The maximum value of the competion counter #1 */ | 4289 | /* [RW 16] The maximum value of the completion counter #1 */ |
| 4290 | #define USDM_REG_CMP_COUNTER_MAX1 0xc4020 | 4290 | #define USDM_REG_CMP_COUNTER_MAX1 0xc4020 |
| 4291 | /* [RW 16] The maximum value of the competion counter #2 */ | 4291 | /* [RW 16] The maximum value of the completion counter #2 */ |
| 4292 | #define USDM_REG_CMP_COUNTER_MAX2 0xc4024 | 4292 | #define USDM_REG_CMP_COUNTER_MAX2 0xc4024 |
| 4293 | /* [RW 16] The maximum value of the competion counter #3 */ | 4293 | /* [RW 16] The maximum value of the completion counter #3 */ |
| 4294 | #define USDM_REG_CMP_COUNTER_MAX3 0xc4028 | 4294 | #define USDM_REG_CMP_COUNTER_MAX3 0xc4028 |
| 4295 | /* [RW 13] The start address in the internal RAM for the completion | 4295 | /* [RW 13] The start address in the internal RAM for the completion |
| 4296 | counters. */ | 4296 | counters. */ |
| @@ -4798,13 +4798,13 @@ | |||
| 4798 | #define XSDM_REG_AGG_INT_MODE_1 0x1661bc | 4798 | #define XSDM_REG_AGG_INT_MODE_1 0x1661bc |
| 4799 | /* [RW 13] The start address in the internal RAM for the cfc_rsp lcid */ | 4799 | /* [RW 13] The start address in the internal RAM for the cfc_rsp lcid */ |
| 4800 | #define XSDM_REG_CFC_RSP_START_ADDR 0x166008 | 4800 | #define XSDM_REG_CFC_RSP_START_ADDR 0x166008 |
| 4801 | /* [RW 16] The maximum value of the competion counter #0 */ | 4801 | /* [RW 16] The maximum value of the completion counter #0 */ |
| 4802 | #define XSDM_REG_CMP_COUNTER_MAX0 0x16601c | 4802 | #define XSDM_REG_CMP_COUNTER_MAX0 0x16601c |
| 4803 | /* [RW 16] The maximum value of the competion counter #1 */ | 4803 | /* [RW 16] The maximum value of the completion counter #1 */ |
| 4804 | #define XSDM_REG_CMP_COUNTER_MAX1 0x166020 | 4804 | #define XSDM_REG_CMP_COUNTER_MAX1 0x166020 |
| 4805 | /* [RW 16] The maximum value of the competion counter #2 */ | 4805 | /* [RW 16] The maximum value of the completion counter #2 */ |
| 4806 | #define XSDM_REG_CMP_COUNTER_MAX2 0x166024 | 4806 | #define XSDM_REG_CMP_COUNTER_MAX2 0x166024 |
| 4807 | /* [RW 16] The maximum value of the competion counter #3 */ | 4807 | /* [RW 16] The maximum value of the completion counter #3 */ |
| 4808 | #define XSDM_REG_CMP_COUNTER_MAX3 0x166028 | 4808 | #define XSDM_REG_CMP_COUNTER_MAX3 0x166028 |
| 4809 | /* [RW 13] The start address in the internal RAM for the completion | 4809 | /* [RW 13] The start address in the internal RAM for the completion |
| 4810 | counters. */ | 4810 | counters. */ |
diff --git a/drivers/net/bonding/bond_alb.h b/drivers/net/bonding/bond_alb.h index 118c28aa471e..86861f08b24d 100644 --- a/drivers/net/bonding/bond_alb.h +++ b/drivers/net/bonding/bond_alb.h | |||
| @@ -74,9 +74,9 @@ struct tlb_client_info { | |||
| 74 | * packets to a Client that the Hash function | 74 | * packets to a Client that the Hash function |
| 75 | * gave this entry index. | 75 | * gave this entry index. |
| 76 | */ | 76 | */ |
| 77 | u32 tx_bytes; /* Each Client acumulates the BytesTx that | 77 | u32 tx_bytes; /* Each Client accumulates the BytesTx that |
| 78 | * were tranmitted to it, and after each | 78 | * were tranmitted to it, and after each |
| 79 | * CallBack the LoadHistory is devided | 79 | * CallBack the LoadHistory is divided |
| 80 | * by the balance interval | 80 | * by the balance interval |
| 81 | */ | 81 | */ |
| 82 | u32 load_history; /* This field contains the amount of Bytes | 82 | u32 load_history; /* This field contains the amount of Bytes |
diff --git a/drivers/net/caif/caif_shmcore.c b/drivers/net/caif/caif_shmcore.c index 80511167f35b..731aa1193770 100644 --- a/drivers/net/caif/caif_shmcore.c +++ b/drivers/net/caif/caif_shmcore.c | |||
| @@ -591,7 +591,7 @@ int caif_shmcore_probe(struct shmdev_layer *pshm_dev) | |||
| 591 | (NR_TX_BUF * TX_BUF_SZ + NR_RX_BUF * RX_BUF_SZ)) { | 591 | (NR_TX_BUF * TX_BUF_SZ + NR_RX_BUF * RX_BUF_SZ)) { |
| 592 | 592 | ||
| 593 | pr_warn("ERROR, Amount of available" | 593 | pr_warn("ERROR, Amount of available" |
| 594 | " Phys. SHM cannot accomodate current SHM " | 594 | " Phys. SHM cannot accommodate current SHM " |
| 595 | "driver configuration, Bailing out ...\n"); | 595 | "driver configuration, Bailing out ...\n"); |
| 596 | free_netdev(pshm_dev->pshm_netdev); | 596 | free_netdev(pshm_dev->pshm_netdev); |
| 597 | return -ENOMEM; | 597 | return -ENOMEM; |
diff --git a/drivers/net/caif/caif_spi.c b/drivers/net/caif/caif_spi.c index 20da1996d354..57e639373815 100644 --- a/drivers/net/caif/caif_spi.c +++ b/drivers/net/caif/caif_spi.c | |||
| @@ -397,7 +397,7 @@ int cfspi_xmitlen(struct cfspi *cfspi) | |||
| 397 | int pkts = 0; | 397 | int pkts = 0; |
| 398 | 398 | ||
| 399 | /* | 399 | /* |
| 400 | * Decommit previously commited frames. | 400 | * Decommit previously committed frames. |
| 401 | * skb_queue_splice_tail(&cfspi->chead,&cfspi->qhead) | 401 | * skb_queue_splice_tail(&cfspi->chead,&cfspi->qhead) |
| 402 | */ | 402 | */ |
| 403 | while (skb_peek(&cfspi->chead)) { | 403 | while (skb_peek(&cfspi->chead)) { |
diff --git a/drivers/net/caif/caif_spi_slave.c b/drivers/net/caif/caif_spi_slave.c index 1b9943a4edab..b009e03cda9e 100644 --- a/drivers/net/caif/caif_spi_slave.c +++ b/drivers/net/caif/caif_spi_slave.c | |||
| @@ -98,7 +98,7 @@ void cfspi_xfer(struct work_struct *work) | |||
| 98 | 98 | ||
| 99 | cfspi_dbg_state(cfspi, CFSPI_STATE_FETCH_PKT); | 99 | cfspi_dbg_state(cfspi, CFSPI_STATE_FETCH_PKT); |
| 100 | 100 | ||
| 101 | /* Copy commited SPI frames after the SPI indication. */ | 101 | /* Copy committed SPI frames after the SPI indication. */ |
| 102 | ptr = (u8 *) cfspi->xfer.va_tx; | 102 | ptr = (u8 *) cfspi->xfer.va_tx; |
| 103 | ptr += SPI_IND_SZ; | 103 | ptr += SPI_IND_SZ; |
| 104 | len = cfspi_xmitfrm(cfspi, ptr, cfspi->tx_cpck_len); | 104 | len = cfspi_xmitfrm(cfspi, ptr, cfspi->tx_cpck_len); |
| @@ -158,7 +158,7 @@ void cfspi_xfer(struct work_struct *work) | |||
| 158 | 158 | ||
| 159 | cfspi_dbg_state(cfspi, CFSPI_STATE_SIG_ACTIVE); | 159 | cfspi_dbg_state(cfspi, CFSPI_STATE_SIG_ACTIVE); |
| 160 | 160 | ||
| 161 | /* Signal that we are ready to recieve data. */ | 161 | /* Signal that we are ready to receive data. */ |
| 162 | cfspi->dev->sig_xfer(true, cfspi->dev); | 162 | cfspi->dev->sig_xfer(true, cfspi->dev); |
| 163 | 163 | ||
| 164 | cfspi_dbg_state(cfspi, CFSPI_STATE_WAIT_XFER_DONE); | 164 | cfspi_dbg_state(cfspi, CFSPI_STATE_WAIT_XFER_DONE); |
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c index 57d2ffbbb433..74efb5a2ad41 100644 --- a/drivers/net/can/at91_can.c +++ b/drivers/net/can/at91_can.c | |||
| @@ -416,7 +416,7 @@ static netdev_tx_t at91_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 416 | 416 | ||
| 417 | stats->tx_bytes += cf->can_dlc; | 417 | stats->tx_bytes += cf->can_dlc; |
| 418 | 418 | ||
| 419 | /* _NOTE_: substract AT91_MB_TX_FIRST offset from mb! */ | 419 | /* _NOTE_: subtract AT91_MB_TX_FIRST offset from mb! */ |
| 420 | can_put_echo_skb(skb, dev, mb - AT91_MB_TX_FIRST); | 420 | can_put_echo_skb(skb, dev, mb - AT91_MB_TX_FIRST); |
| 421 | 421 | ||
| 422 | /* | 422 | /* |
| @@ -782,7 +782,7 @@ static void at91_irq_tx(struct net_device *dev, u32 reg_sr) | |||
| 782 | reg_msr = at91_read(priv, AT91_MSR(mb)); | 782 | reg_msr = at91_read(priv, AT91_MSR(mb)); |
| 783 | if (likely(reg_msr & AT91_MSR_MRDY && | 783 | if (likely(reg_msr & AT91_MSR_MRDY && |
| 784 | ~reg_msr & AT91_MSR_MABT)) { | 784 | ~reg_msr & AT91_MSR_MABT)) { |
| 785 | /* _NOTE_: substract AT91_MB_TX_FIRST offset from mb! */ | 785 | /* _NOTE_: subtract AT91_MB_TX_FIRST offset from mb! */ |
| 786 | can_get_echo_skb(dev, mb - AT91_MB_TX_FIRST); | 786 | can_get_echo_skb(dev, mb - AT91_MB_TX_FIRST); |
| 787 | dev->stats.tx_packets++; | 787 | dev->stats.tx_packets++; |
| 788 | } | 788 | } |
diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c index 31552959aed7..7e5cc0bd913d 100644 --- a/drivers/net/can/c_can/c_can.c +++ b/drivers/net/can/c_can/c_can.c | |||
| @@ -813,7 +813,7 @@ static int c_can_handle_state_change(struct net_device *dev, | |||
| 813 | struct sk_buff *skb; | 813 | struct sk_buff *skb; |
| 814 | struct can_berr_counter bec; | 814 | struct can_berr_counter bec; |
| 815 | 815 | ||
| 816 | /* propogate the error condition to the CAN stack */ | 816 | /* propagate the error condition to the CAN stack */ |
| 817 | skb = alloc_can_err_skb(dev, &cf); | 817 | skb = alloc_can_err_skb(dev, &cf); |
| 818 | if (unlikely(!skb)) | 818 | if (unlikely(!skb)) |
| 819 | return 0; | 819 | return 0; |
| @@ -887,7 +887,7 @@ static int c_can_handle_bus_err(struct net_device *dev, | |||
| 887 | if (lec_type == LEC_UNUSED || lec_type == LEC_NO_ERROR) | 887 | if (lec_type == LEC_UNUSED || lec_type == LEC_NO_ERROR) |
| 888 | return 0; | 888 | return 0; |
| 889 | 889 | ||
| 890 | /* propogate the error condition to the CAN stack */ | 890 | /* propagate the error condition to the CAN stack */ |
| 891 | skb = alloc_can_err_skb(dev, &cf); | 891 | skb = alloc_can_err_skb(dev, &cf); |
| 892 | if (unlikely(!skb)) | 892 | if (unlikely(!skb)) |
| 893 | return 0; | 893 | return 0; |
diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c index 102b16c6cc97..587fba48cdd9 100644 --- a/drivers/net/can/janz-ican3.c +++ b/drivers/net/can/janz-ican3.c | |||
| @@ -274,7 +274,7 @@ static inline void ican3_set_page(struct ican3_dev *mod, unsigned int page) | |||
| 274 | */ | 274 | */ |
| 275 | 275 | ||
| 276 | /* | 276 | /* |
| 277 | * Recieve a message from the ICAN3 "old-style" firmware interface | 277 | * Receive a message from the ICAN3 "old-style" firmware interface |
| 278 | * | 278 | * |
| 279 | * LOCKING: must hold mod->lock | 279 | * LOCKING: must hold mod->lock |
| 280 | * | 280 | * |
| @@ -1050,7 +1050,7 @@ static void ican3_handle_inquiry(struct ican3_dev *mod, struct ican3_msg *msg) | |||
| 1050 | complete(&mod->termination_comp); | 1050 | complete(&mod->termination_comp); |
| 1051 | break; | 1051 | break; |
| 1052 | default: | 1052 | default: |
| 1053 | dev_err(mod->dev, "recieved an unknown inquiry response\n"); | 1053 | dev_err(mod->dev, "received an unknown inquiry response\n"); |
| 1054 | break; | 1054 | break; |
| 1055 | } | 1055 | } |
| 1056 | } | 1056 | } |
| @@ -1058,7 +1058,7 @@ static void ican3_handle_inquiry(struct ican3_dev *mod, struct ican3_msg *msg) | |||
| 1058 | static void ican3_handle_unknown_message(struct ican3_dev *mod, | 1058 | static void ican3_handle_unknown_message(struct ican3_dev *mod, |
| 1059 | struct ican3_msg *msg) | 1059 | struct ican3_msg *msg) |
| 1060 | { | 1060 | { |
| 1061 | dev_warn(mod->dev, "recieved unknown message: spec 0x%.2x length %d\n", | 1061 | dev_warn(mod->dev, "received unknown message: spec 0x%.2x length %d\n", |
| 1062 | msg->spec, le16_to_cpu(msg->len)); | 1062 | msg->spec, le16_to_cpu(msg->len)); |
| 1063 | } | 1063 | } |
| 1064 | 1064 | ||
| @@ -1113,7 +1113,7 @@ static bool ican3_txok(struct ican3_dev *mod) | |||
| 1113 | } | 1113 | } |
| 1114 | 1114 | ||
| 1115 | /* | 1115 | /* |
| 1116 | * Recieve one CAN frame from the hardware | 1116 | * Receive one CAN frame from the hardware |
| 1117 | * | 1117 | * |
| 1118 | * CONTEXT: must be called from user context | 1118 | * CONTEXT: must be called from user context |
| 1119 | */ | 1119 | */ |
diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c index 7513c4523ac4..330140ee266d 100644 --- a/drivers/net/can/mcp251x.c +++ b/drivers/net/can/mcp251x.c | |||
| @@ -931,7 +931,8 @@ static int mcp251x_open(struct net_device *net) | |||
| 931 | priv->tx_len = 0; | 931 | priv->tx_len = 0; |
| 932 | 932 | ||
| 933 | ret = request_threaded_irq(spi->irq, NULL, mcp251x_can_ist, | 933 | ret = request_threaded_irq(spi->irq, NULL, mcp251x_can_ist, |
| 934 | IRQF_TRIGGER_FALLING, DEVICE_NAME, priv); | 934 | pdata->irq_flags ? pdata->irq_flags : IRQF_TRIGGER_FALLING, |
| 935 | DEVICE_NAME, priv); | ||
| 935 | if (ret) { | 936 | if (ret) { |
| 936 | dev_err(&spi->dev, "failed to acquire irq %d\n", spi->irq); | 937 | dev_err(&spi->dev, "failed to acquire irq %d\n", spi->irq); |
| 937 | if (pdata->transceiver_enable) | 938 | if (pdata->transceiver_enable) |
diff --git a/drivers/net/can/mscan/mscan.c b/drivers/net/can/mscan/mscan.c index 74cd880c7e06..92feac68b66e 100644 --- a/drivers/net/can/mscan/mscan.c +++ b/drivers/net/can/mscan/mscan.c | |||
| @@ -246,7 +246,7 @@ static netdev_tx_t mscan_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 246 | out_be16(®s->tx.idr3_2, can_id); | 246 | out_be16(®s->tx.idr3_2, can_id); |
| 247 | 247 | ||
| 248 | can_id >>= 16; | 248 | can_id >>= 16; |
| 249 | /* EFF_FLAGS are inbetween the IDs :( */ | 249 | /* EFF_FLAGS are between the IDs :( */ |
| 250 | can_id = (can_id & 0x7) | ((can_id << 2) & 0xffe0) | 250 | can_id = (can_id & 0x7) | ((can_id << 2) & 0xffe0) |
| 251 | | MSCAN_EFF_FLAGS; | 251 | | MSCAN_EFF_FLAGS; |
| 252 | } else { | 252 | } else { |
diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c index 0a8de01d52f7..a358ea9445a2 100644 --- a/drivers/net/can/sja1000/sja1000.c +++ b/drivers/net/can/sja1000/sja1000.c | |||
| @@ -425,7 +425,7 @@ static int sja1000_err(struct net_device *dev, uint8_t isrc, uint8_t status) | |||
| 425 | cf->data[3] = ecc & ECC_SEG; | 425 | cf->data[3] = ecc & ECC_SEG; |
| 426 | break; | 426 | break; |
| 427 | } | 427 | } |
| 428 | /* Error occured during transmission? */ | 428 | /* Error occurred during transmission? */ |
| 429 | if ((ecc & ECC_DIR) == 0) | 429 | if ((ecc & ECC_DIR) == 0) |
| 430 | cf->data[2] |= CAN_ERR_PROT_TX; | 430 | cf->data[2] |= CAN_ERR_PROT_TX; |
| 431 | } | 431 | } |
diff --git a/drivers/net/can/softing/softing.h b/drivers/net/can/softing/softing.h index 7ec9f4db3d52..afd7d85b6915 100644 --- a/drivers/net/can/softing/softing.h +++ b/drivers/net/can/softing/softing.h | |||
| @@ -22,7 +22,7 @@ struct softing_priv { | |||
| 22 | struct softing *card; | 22 | struct softing *card; |
| 23 | struct { | 23 | struct { |
| 24 | int pending; | 24 | int pending; |
| 25 | /* variables wich hold the circular buffer */ | 25 | /* variables which hold the circular buffer */ |
| 26 | int echo_put; | 26 | int echo_put; |
| 27 | int echo_get; | 27 | int echo_get; |
| 28 | } tx; | 28 | } tx; |
diff --git a/drivers/net/can/softing/softing_main.c b/drivers/net/can/softing/softing_main.c index aeea9f9ff6e8..7a70709d5608 100644 --- a/drivers/net/can/softing/softing_main.c +++ b/drivers/net/can/softing/softing_main.c | |||
| @@ -218,7 +218,7 @@ static int softing_handle_1(struct softing *card) | |||
| 218 | ptr = buf; | 218 | ptr = buf; |
| 219 | cmd = *ptr++; | 219 | cmd = *ptr++; |
| 220 | if (cmd == 0xff) | 220 | if (cmd == 0xff) |
| 221 | /* not quite usefull, probably the card has got out */ | 221 | /* not quite useful, probably the card has got out */ |
| 222 | return 0; | 222 | return 0; |
| 223 | netdev = card->net[0]; | 223 | netdev = card->net[0]; |
| 224 | if (cmd & CMD_BUS2) | 224 | if (cmd & CMD_BUS2) |
diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c index 4d07f1ee7168..f7bbde9eb2cb 100644 --- a/drivers/net/can/ti_hecc.c +++ b/drivers/net/can/ti_hecc.c | |||
| @@ -663,7 +663,7 @@ static int ti_hecc_error(struct net_device *ndev, int int_status, | |||
| 663 | struct can_frame *cf; | 663 | struct can_frame *cf; |
| 664 | struct sk_buff *skb; | 664 | struct sk_buff *skb; |
| 665 | 665 | ||
| 666 | /* propogate the error condition to the can stack */ | 666 | /* propagate the error condition to the can stack */ |
| 667 | skb = alloc_can_err_skb(ndev, &cf); | 667 | skb = alloc_can_err_skb(ndev, &cf); |
| 668 | if (!skb) { | 668 | if (!skb) { |
| 669 | if (printk_ratelimit()) | 669 | if (printk_ratelimit()) |
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c index e75f1a876972..a72c7bfb4090 100644 --- a/drivers/net/can/usb/ems_usb.c +++ b/drivers/net/can/usb/ems_usb.c | |||
| @@ -386,7 +386,7 @@ static void ems_usb_rx_err(struct ems_usb *dev, struct ems_cpc_msg *msg) | |||
| 386 | break; | 386 | break; |
| 387 | } | 387 | } |
| 388 | 388 | ||
| 389 | /* Error occured during transmission? */ | 389 | /* Error occurred during transmission? */ |
| 390 | if ((ecc & SJA1000_ECC_DIR) == 0) | 390 | if ((ecc & SJA1000_ECC_DIR) == 0) |
| 391 | cf->data[2] |= CAN_ERR_PROT_TX; | 391 | cf->data[2] |= CAN_ERR_PROT_TX; |
| 392 | 392 | ||
diff --git a/drivers/net/can/usb/esd_usb2.c b/drivers/net/can/usb/esd_usb2.c index dc53c831ea95..eb8b0e600282 100644 --- a/drivers/net/can/usb/esd_usb2.c +++ b/drivers/net/can/usb/esd_usb2.c | |||
| @@ -284,7 +284,7 @@ static void esd_usb2_rx_event(struct esd_usb2_net_priv *priv, | |||
| 284 | break; | 284 | break; |
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | /* Error occured during transmission? */ | 287 | /* Error occurred during transmission? */ |
| 288 | if (!(ecc & SJA1000_ECC_DIR)) | 288 | if (!(ecc & SJA1000_ECC_DIR)) |
| 289 | cf->data[2] |= CAN_ERR_PROT_TX; | 289 | cf->data[2] |= CAN_ERR_PROT_TX; |
| 290 | 290 | ||
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index 3437613f0454..143a28c666af 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | * TX has 4 queues. currently these queues are used in a round-robin | 51 | * TX has 4 queues. currently these queues are used in a round-robin |
| 52 | * fashion for load balancing. They can also be used for QoS. for that | 52 | * fashion for load balancing. They can also be used for QoS. for that |
| 53 | * to work, however, QoS information needs to be exposed down to the driver | 53 | * to work, however, QoS information needs to be exposed down to the driver |
| 54 | * level so that subqueues get targetted to particular transmit rings. | 54 | * level so that subqueues get targeted to particular transmit rings. |
| 55 | * alternatively, the queues can be configured via use of the all-purpose | 55 | * alternatively, the queues can be configured via use of the all-purpose |
| 56 | * ioctl. | 56 | * ioctl. |
| 57 | * | 57 | * |
| @@ -5165,7 +5165,7 @@ err_out_free_res: | |||
| 5165 | pci_release_regions(pdev); | 5165 | pci_release_regions(pdev); |
| 5166 | 5166 | ||
| 5167 | err_write_cacheline: | 5167 | err_write_cacheline: |
| 5168 | /* Try to restore it in case the error occured after we | 5168 | /* Try to restore it in case the error occurred after we |
| 5169 | * set it. | 5169 | * set it. |
| 5170 | */ | 5170 | */ |
| 5171 | pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, orig_cacheline_size); | 5171 | pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, orig_cacheline_size); |
diff --git a/drivers/net/cassini.h b/drivers/net/cassini.h index faf4746a0f3e..b361424d5f57 100644 --- a/drivers/net/cassini.h +++ b/drivers/net/cassini.h | |||
| @@ -772,7 +772,7 @@ | |||
| 772 | #define RX_DEBUG_INTR_WRITE_PTR_MASK 0xC0000000 /* interrupt write pointer | 772 | #define RX_DEBUG_INTR_WRITE_PTR_MASK 0xC0000000 /* interrupt write pointer |
| 773 | of the interrupt queue */ | 773 | of the interrupt queue */ |
| 774 | 774 | ||
| 775 | /* flow control frames are emmitted using two PAUSE thresholds: | 775 | /* flow control frames are emitted using two PAUSE thresholds: |
| 776 | * XOFF PAUSE uses pause time value pre-programmed in the Send PAUSE MAC reg | 776 | * XOFF PAUSE uses pause time value pre-programmed in the Send PAUSE MAC reg |
| 777 | * XON PAUSE uses a pause time of 0. granularity of threshold is 64bytes. | 777 | * XON PAUSE uses a pause time of 0. granularity of threshold is 64bytes. |
| 778 | * PAUSE thresholds defined in terms of FIFO occupancy and may be translated | 778 | * PAUSE thresholds defined in terms of FIFO occupancy and may be translated |
diff --git a/drivers/net/chelsio/mv88e1xxx.c b/drivers/net/chelsio/mv88e1xxx.c index 809047a99e96..71018a4fdf15 100644 --- a/drivers/net/chelsio/mv88e1xxx.c +++ b/drivers/net/chelsio/mv88e1xxx.c | |||
| @@ -41,7 +41,7 @@ static void mdio_clear_bit(struct cphy *cphy, int reg, u32 bitval) | |||
| 41 | * | 41 | * |
| 42 | * PARAMS: cphy - Pointer to PHY instance data. | 42 | * PARAMS: cphy - Pointer to PHY instance data. |
| 43 | * | 43 | * |
| 44 | * RETURN: 0 - Successfull reset. | 44 | * RETURN: 0 - Successful reset. |
| 45 | * -1 - Timeout. | 45 | * -1 - Timeout. |
| 46 | */ | 46 | */ |
| 47 | static int mv88e1xxx_reset(struct cphy *cphy, int wait) | 47 | static int mv88e1xxx_reset(struct cphy *cphy, int wait) |
diff --git a/drivers/net/chelsio/pm3393.c b/drivers/net/chelsio/pm3393.c index 7dbb16d36fff..40c7b93ababc 100644 --- a/drivers/net/chelsio/pm3393.c +++ b/drivers/net/chelsio/pm3393.c | |||
| @@ -293,7 +293,7 @@ static int pm3393_enable_port(struct cmac *cmac, int which) | |||
| 293 | pm3393_enable(cmac, which); | 293 | pm3393_enable(cmac, which); |
| 294 | 294 | ||
| 295 | /* | 295 | /* |
| 296 | * XXX This should be done by the PHY and preferrably not at all. | 296 | * XXX This should be done by the PHY and preferably not at all. |
| 297 | * The PHY doesn't give us link status indication on its own so have | 297 | * The PHY doesn't give us link status indication on its own so have |
| 298 | * the link management code query it instead. | 298 | * the link management code query it instead. |
| 299 | */ | 299 | */ |
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c index f778b15ad3fd..8754d4473042 100644 --- a/drivers/net/chelsio/sge.c +++ b/drivers/net/chelsio/sge.c | |||
| @@ -1662,7 +1662,7 @@ irqreturn_t t1_interrupt(int irq, void *data) | |||
| 1662 | * The code figures out how many entries the sk_buff will require in the | 1662 | * The code figures out how many entries the sk_buff will require in the |
| 1663 | * cmdQ and updates the cmdQ data structure with the state once the enqueue | 1663 | * cmdQ and updates the cmdQ data structure with the state once the enqueue |
| 1664 | * has complete. Then, it doesn't access the global structure anymore, but | 1664 | * has complete. Then, it doesn't access the global structure anymore, but |
| 1665 | * uses the corresponding fields on the stack. In conjuction with a spinlock | 1665 | * uses the corresponding fields on the stack. In conjunction with a spinlock |
| 1666 | * around that code, we can make the function reentrant without holding the | 1666 | * around that code, we can make the function reentrant without holding the |
| 1667 | * lock when we actually enqueue (which might be expensive, especially on | 1667 | * lock when we actually enqueue (which might be expensive, especially on |
| 1668 | * architectures with IO MMUs). | 1668 | * architectures with IO MMUs). |
diff --git a/drivers/net/chelsio/vsc7326.c b/drivers/net/chelsio/vsc7326.c index 106a590f0d9a..b0cb388f5e12 100644 --- a/drivers/net/chelsio/vsc7326.c +++ b/drivers/net/chelsio/vsc7326.c | |||
| @@ -566,7 +566,7 @@ static int mac_disable(struct cmac *mac, int which) | |||
| 566 | for (i = 0; i <= 0x3a; ++i) | 566 | for (i = 0; i <= 0x3a; ++i) |
| 567 | vsc_write(mac->adapter, CRA(4, port, i), 0); | 567 | vsc_write(mac->adapter, CRA(4, port, i), 0); |
| 568 | 568 | ||
| 569 | /* Clear sofware counters */ | 569 | /* Clear software counters */ |
| 570 | memset(&mac->stats, 0, sizeof(struct cmac_statistics)); | 570 | memset(&mac->stats, 0, sizeof(struct cmac_statistics)); |
| 571 | 571 | ||
| 572 | return 0; | 572 | return 0; |
diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c index 80c2feeefec5..9d267d3a6892 100644 --- a/drivers/net/cris/eth_v10.c +++ b/drivers/net/cris/eth_v10.c | |||
| @@ -1383,7 +1383,7 @@ e100_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
| 1383 | spin_lock(&np->lock); /* Preempt protection */ | 1383 | spin_lock(&np->lock); /* Preempt protection */ |
| 1384 | switch (cmd) { | 1384 | switch (cmd) { |
| 1385 | /* The ioctls below should be considered obsolete but are */ | 1385 | /* The ioctls below should be considered obsolete but are */ |
| 1386 | /* still present for compatability with old scripts/apps */ | 1386 | /* still present for compatibility with old scripts/apps */ |
| 1387 | case SET_ETH_SPEED_10: /* 10 Mbps */ | 1387 | case SET_ETH_SPEED_10: /* 10 Mbps */ |
| 1388 | e100_set_speed(dev, 10); | 1388 | e100_set_speed(dev, 10); |
| 1389 | break; | 1389 | break; |
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c index f9f6645b2e61..bfa2d56af1ee 100644 --- a/drivers/net/cxgb3/sge.c +++ b/drivers/net/cxgb3/sge.c | |||
| @@ -199,7 +199,7 @@ static inline void refill_rspq(struct adapter *adapter, | |||
| 199 | * need_skb_unmap - does the platform need unmapping of sk_buffs? | 199 | * need_skb_unmap - does the platform need unmapping of sk_buffs? |
| 200 | * | 200 | * |
| 201 | * Returns true if the platform needs sk_buff unmapping. The compiler | 201 | * Returns true if the platform needs sk_buff unmapping. The compiler |
| 202 | * optimizes away unecessary code if this returns true. | 202 | * optimizes away unnecessary code if this returns true. |
| 203 | */ | 203 | */ |
| 204 | static inline int need_skb_unmap(void) | 204 | static inline int need_skb_unmap(void) |
| 205 | { | 205 | { |
diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c index d55db6b38e7b..c688421da9c7 100644 --- a/drivers/net/cxgb3/t3_hw.c +++ b/drivers/net/cxgb3/t3_hw.c | |||
| @@ -1386,11 +1386,11 @@ struct intr_info { | |||
| 1386 | * @reg: the interrupt status register to process | 1386 | * @reg: the interrupt status register to process |
| 1387 | * @mask: a mask to apply to the interrupt status | 1387 | * @mask: a mask to apply to the interrupt status |
| 1388 | * @acts: table of interrupt actions | 1388 | * @acts: table of interrupt actions |
| 1389 | * @stats: statistics counters tracking interrupt occurences | 1389 | * @stats: statistics counters tracking interrupt occurrences |
| 1390 | * | 1390 | * |
| 1391 | * A table driven interrupt handler that applies a set of masks to an | 1391 | * A table driven interrupt handler that applies a set of masks to an |
| 1392 | * interrupt status word and performs the corresponding actions if the | 1392 | * interrupt status word and performs the corresponding actions if the |
| 1393 | * interrupts described by the mask have occured. The actions include | 1393 | * interrupts described by the mask have occurred. The actions include |
| 1394 | * optionally printing a warning or alert message, and optionally | 1394 | * optionally printing a warning or alert message, and optionally |
| 1395 | * incrementing a stat counter. The table is terminated by an entry | 1395 | * incrementing a stat counter. The table is terminated by an entry |
| 1396 | * specifying mask 0. Returns the number of fatal interrupt conditions. | 1396 | * specifying mask 0. Returns the number of fatal interrupt conditions. |
| @@ -2783,7 +2783,7 @@ static void init_mtus(unsigned short mtus[]) | |||
| 2783 | { | 2783 | { |
| 2784 | /* | 2784 | /* |
| 2785 | * See draft-mathis-plpmtud-00.txt for the values. The min is 88 so | 2785 | * See draft-mathis-plpmtud-00.txt for the values. The min is 88 so |
| 2786 | * it can accomodate max size TCP/IP headers when SACK and timestamps | 2786 | * it can accommodate max size TCP/IP headers when SACK and timestamps |
| 2787 | * are enabled and still have at least 8 bytes of payload. | 2787 | * are enabled and still have at least 8 bytes of payload. |
| 2788 | */ | 2788 | */ |
| 2789 | mtus[0] = 88; | 2789 | mtus[0] = 88; |
diff --git a/drivers/net/cxgb4/t4_hw.c b/drivers/net/cxgb4/t4_hw.c index b9fd8a6f2cc4..d1ec111aebd8 100644 --- a/drivers/net/cxgb4/t4_hw.c +++ b/drivers/net/cxgb4/t4_hw.c | |||
| @@ -883,7 +883,7 @@ struct intr_info { | |||
| 883 | * | 883 | * |
| 884 | * A table driven interrupt handler that applies a set of masks to an | 884 | * A table driven interrupt handler that applies a set of masks to an |
| 885 | * interrupt status word and performs the corresponding actions if the | 885 | * interrupt status word and performs the corresponding actions if the |
| 886 | * interrupts described by the mask have occured. The actions include | 886 | * interrupts described by the mask have occurred. The actions include |
| 887 | * optionally emitting a warning or alert message. The table is terminated | 887 | * optionally emitting a warning or alert message. The table is terminated |
| 888 | * by an entry specifying mask 0. Returns the number of fatal interrupt | 888 | * by an entry specifying mask 0. Returns the number of fatal interrupt |
| 889 | * conditions. | 889 | * conditions. |
diff --git a/drivers/net/cxgb4vf/cxgb4vf_main.c b/drivers/net/cxgb4vf/cxgb4vf_main.c index 6aad64df4dcb..4661cbbd9bd9 100644 --- a/drivers/net/cxgb4vf/cxgb4vf_main.c +++ b/drivers/net/cxgb4vf/cxgb4vf_main.c | |||
| @@ -2738,7 +2738,7 @@ static int __devinit cxgb4vf_pci_probe(struct pci_dev *pdev, | |||
| 2738 | cfg_queues(adapter); | 2738 | cfg_queues(adapter); |
| 2739 | 2739 | ||
| 2740 | /* | 2740 | /* |
| 2741 | * Print a short notice on the existance and configuration of the new | 2741 | * Print a short notice on the existence and configuration of the new |
| 2742 | * VF network device ... | 2742 | * VF network device ... |
| 2743 | */ | 2743 | */ |
| 2744 | for_each_port(adapter, pidx) { | 2744 | for_each_port(adapter, pidx) { |
diff --git a/drivers/net/cxgb4vf/sge.c b/drivers/net/cxgb4vf/sge.c index e0b3d1bc2fdf..bb65121f581c 100644 --- a/drivers/net/cxgb4vf/sge.c +++ b/drivers/net/cxgb4vf/sge.c | |||
| @@ -224,8 +224,8 @@ static inline bool is_buf_mapped(const struct rx_sw_desc *sdesc) | |||
| 224 | /** | 224 | /** |
| 225 | * need_skb_unmap - does the platform need unmapping of sk_buffs? | 225 | * need_skb_unmap - does the platform need unmapping of sk_buffs? |
| 226 | * | 226 | * |
| 227 | * Returns true if the platfrom needs sk_buff unmapping. The compiler | 227 | * Returns true if the platform needs sk_buff unmapping. The compiler |
| 228 | * optimizes away unecessary code if this returns true. | 228 | * optimizes away unnecessary code if this returns true. |
| 229 | */ | 229 | */ |
| 230 | static inline int need_skb_unmap(void) | 230 | static inline int need_skb_unmap(void) |
| 231 | { | 231 | { |
| @@ -267,7 +267,7 @@ static inline unsigned int fl_cap(const struct sge_fl *fl) | |||
| 267 | * | 267 | * |
| 268 | * Tests specified Free List to see whether the number of buffers | 268 | * Tests specified Free List to see whether the number of buffers |
| 269 | * available to the hardware has falled below our "starvation" | 269 | * available to the hardware has falled below our "starvation" |
| 270 | * threshhold. | 270 | * threshold. |
| 271 | */ | 271 | */ |
| 272 | static inline bool fl_starving(const struct sge_fl *fl) | 272 | static inline bool fl_starving(const struct sge_fl *fl) |
| 273 | { | 273 | { |
| @@ -1149,7 +1149,7 @@ int t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 1149 | if (unlikely(credits < ETHTXQ_STOP_THRES)) { | 1149 | if (unlikely(credits < ETHTXQ_STOP_THRES)) { |
| 1150 | /* | 1150 | /* |
| 1151 | * After we're done injecting the Work Request for this | 1151 | * After we're done injecting the Work Request for this |
| 1152 | * packet, we'll be below our "stop threshhold" so stop the TX | 1152 | * packet, we'll be below our "stop threshold" so stop the TX |
| 1153 | * Queue now and schedule a request for an SGE Egress Queue | 1153 | * Queue now and schedule a request for an SGE Egress Queue |
| 1154 | * Update message. The queue will get started later on when | 1154 | * Update message. The queue will get started later on when |
| 1155 | * the firmware processes this Work Request and sends us an | 1155 | * the firmware processes this Work Request and sends us an |
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index baca6bfcb089..807b6bb200eb 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c | |||
| @@ -94,14 +94,14 @@ MODULE_VERSION(EMAC_MODULE_VERSION); | |||
| 94 | static const char emac_version_string[] = "TI DaVinci EMAC Linux v6.1"; | 94 | static const char emac_version_string[] = "TI DaVinci EMAC Linux v6.1"; |
| 95 | 95 | ||
| 96 | /* Configuration items */ | 96 | /* Configuration items */ |
| 97 | #define EMAC_DEF_PASS_CRC (0) /* Do not pass CRC upto frames */ | 97 | #define EMAC_DEF_PASS_CRC (0) /* Do not pass CRC up to frames */ |
| 98 | #define EMAC_DEF_QOS_EN (0) /* EMAC proprietary QoS disabled */ | 98 | #define EMAC_DEF_QOS_EN (0) /* EMAC proprietary QoS disabled */ |
| 99 | #define EMAC_DEF_NO_BUFF_CHAIN (0) /* No buffer chain */ | 99 | #define EMAC_DEF_NO_BUFF_CHAIN (0) /* No buffer chain */ |
| 100 | #define EMAC_DEF_MACCTRL_FRAME_EN (0) /* Discard Maccontrol frames */ | 100 | #define EMAC_DEF_MACCTRL_FRAME_EN (0) /* Discard Maccontrol frames */ |
| 101 | #define EMAC_DEF_SHORT_FRAME_EN (0) /* Discard short frames */ | 101 | #define EMAC_DEF_SHORT_FRAME_EN (0) /* Discard short frames */ |
| 102 | #define EMAC_DEF_ERROR_FRAME_EN (0) /* Discard error frames */ | 102 | #define EMAC_DEF_ERROR_FRAME_EN (0) /* Discard error frames */ |
| 103 | #define EMAC_DEF_PROM_EN (0) /* Promiscous disabled */ | 103 | #define EMAC_DEF_PROM_EN (0) /* Promiscuous disabled */ |
| 104 | #define EMAC_DEF_PROM_CH (0) /* Promiscous channel is 0 */ | 104 | #define EMAC_DEF_PROM_CH (0) /* Promiscuous channel is 0 */ |
| 105 | #define EMAC_DEF_BCAST_EN (1) /* Broadcast enabled */ | 105 | #define EMAC_DEF_BCAST_EN (1) /* Broadcast enabled */ |
| 106 | #define EMAC_DEF_BCAST_CH (0) /* Broadcast channel is 0 */ | 106 | #define EMAC_DEF_BCAST_CH (0) /* Broadcast channel is 0 */ |
| 107 | #define EMAC_DEF_MCAST_EN (1) /* Multicast enabled */ | 107 | #define EMAC_DEF_MCAST_EN (1) /* Multicast enabled */ |
| @@ -1013,7 +1013,7 @@ static void emac_rx_handler(void *token, int len, int status) | |||
| 1013 | return; | 1013 | return; |
| 1014 | } | 1014 | } |
| 1015 | 1015 | ||
| 1016 | /* recycle on recieve error */ | 1016 | /* recycle on receive error */ |
| 1017 | if (status < 0) { | 1017 | if (status < 0) { |
| 1018 | ndev->stats.rx_errors++; | 1018 | ndev->stats.rx_errors++; |
| 1019 | goto recycle; | 1019 | goto recycle; |
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index f4d0922ec65b..dd70738eb2f4 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c | |||
| @@ -160,7 +160,7 @@ static int e1000_get_settings(struct net_device *netdev, | |||
| 160 | &adapter->link_duplex); | 160 | &adapter->link_duplex); |
| 161 | ecmd->speed = adapter->link_speed; | 161 | ecmd->speed = adapter->link_speed; |
| 162 | 162 | ||
| 163 | /* unfortunatly FULL_DUPLEX != DUPLEX_FULL | 163 | /* unfortunately FULL_DUPLEX != DUPLEX_FULL |
| 164 | * and HALF_DUPLEX != DUPLEX_HALF */ | 164 | * and HALF_DUPLEX != DUPLEX_HALF */ |
| 165 | 165 | ||
| 166 | if (adapter->link_duplex == FULL_DUPLEX) | 166 | if (adapter->link_duplex == FULL_DUPLEX) |
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h index c70b23d52284..5c9a8403668b 100644 --- a/drivers/net/e1000/e1000_hw.h +++ b/drivers/net/e1000/e1000_hw.h | |||
| @@ -1026,7 +1026,7 @@ extern void __iomem *ce4100_gbe_mdio_base_virt; | |||
| 1026 | 1026 | ||
| 1027 | #define E1000_KUMCTRLSTA 0x00034 /* MAC-PHY interface - RW */ | 1027 | #define E1000_KUMCTRLSTA 0x00034 /* MAC-PHY interface - RW */ |
| 1028 | #define E1000_MDPHYA 0x0003C /* PHY address - RW */ | 1028 | #define E1000_MDPHYA 0x0003C /* PHY address - RW */ |
| 1029 | #define E1000_MANC2H 0x05860 /* Managment Control To Host - RW */ | 1029 | #define E1000_MANC2H 0x05860 /* Management Control To Host - RW */ |
| 1030 | #define E1000_SW_FW_SYNC 0x05B5C /* Software-Firmware Synchronization - RW */ | 1030 | #define E1000_SW_FW_SYNC 0x05B5C /* Software-Firmware Synchronization - RW */ |
| 1031 | 1031 | ||
| 1032 | #define E1000_GCR 0x05B00 /* PCI-Ex Control */ | 1032 | #define E1000_GCR 0x05B00 /* PCI-Ex Control */ |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index bfab14092d2c..477e066a1cf0 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
| @@ -205,7 +205,7 @@ static struct pci_driver e1000_driver = { | |||
| 205 | .probe = e1000_probe, | 205 | .probe = e1000_probe, |
| 206 | .remove = __devexit_p(e1000_remove), | 206 | .remove = __devexit_p(e1000_remove), |
| 207 | #ifdef CONFIG_PM | 207 | #ifdef CONFIG_PM |
| 208 | /* Power Managment Hooks */ | 208 | /* Power Management Hooks */ |
| 209 | .suspend = e1000_suspend, | 209 | .suspend = e1000_suspend, |
| 210 | .resume = e1000_resume, | 210 | .resume = e1000_resume, |
| 211 | #endif | 211 | #endif |
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index a39d4a4d871c..506a0a0043b3 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
| @@ -4886,7 +4886,7 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb, | |||
| 4886 | if (skb->protocol == htons(ETH_P_IP)) | 4886 | if (skb->protocol == htons(ETH_P_IP)) |
| 4887 | tx_flags |= E1000_TX_FLAGS_IPV4; | 4887 | tx_flags |= E1000_TX_FLAGS_IPV4; |
| 4888 | 4888 | ||
| 4889 | /* if count is 0 then mapping error has occured */ | 4889 | /* if count is 0 then mapping error has occurred */ |
| 4890 | count = e1000_tx_map(adapter, skb, first, max_per_txd, nr_frags, mss); | 4890 | count = e1000_tx_map(adapter, skb, first, max_per_txd, nr_frags, mss); |
| 4891 | if (count) { | 4891 | if (count) { |
| 4892 | e1000_tx_queue(adapter, tx_flags, count); | 4892 | e1000_tx_queue(adapter, tx_flags, count); |
diff --git a/drivers/net/enc28j60_hw.h b/drivers/net/enc28j60_hw.h index 1a0b20969f80..25b41de49f0e 100644 --- a/drivers/net/enc28j60_hw.h +++ b/drivers/net/enc28j60_hw.h | |||
| @@ -303,7 +303,7 @@ | |||
| 303 | /* maximum ethernet frame length */ | 303 | /* maximum ethernet frame length */ |
| 304 | #define MAX_FRAMELEN 1518 | 304 | #define MAX_FRAMELEN 1518 |
| 305 | 305 | ||
| 306 | /* Prefered half duplex: LEDA: Link status LEDB: Rx/Tx activity */ | 306 | /* Preferred half duplex: LEDA: Link status LEDB: Rx/Tx activity */ |
| 307 | #define ENC28J60_LAMPS_MODE 0x3476 | 307 | #define ENC28J60_LAMPS_MODE 0x3476 |
| 308 | 308 | ||
| 309 | #endif | 309 | #endif |
diff --git a/drivers/net/eth16i.c b/drivers/net/eth16i.c index fb717be511f6..12d28e9d0cb7 100644 --- a/drivers/net/eth16i.c +++ b/drivers/net/eth16i.c | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | This driver supports following cards : | 13 | This driver supports following cards : |
| 14 | - ICL EtherTeam 16i | 14 | - ICL EtherTeam 16i |
| 15 | - ICL EtherTeam 32 EISA | 15 | - ICL EtherTeam 32 EISA |
| 16 | (Uses true 32 bit transfers rather than 16i compability mode) | 16 | (Uses true 32 bit transfers rather than 16i compatibility mode) |
| 17 | 17 | ||
| 18 | Example Module usage: | 18 | Example Module usage: |
| 19 | insmod eth16i.o io=0x2a0 mediatype=bnc | 19 | insmod eth16i.o io=0x2a0 mediatype=bnc |
diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c index db0290f05bdf..a83dd312c3ac 100644 --- a/drivers/net/ethoc.c +++ b/drivers/net/ethoc.c | |||
| @@ -542,7 +542,7 @@ static irqreturn_t ethoc_interrupt(int irq, void *dev_id) | |||
| 542 | 542 | ||
| 543 | /* Figure out what triggered the interrupt... | 543 | /* Figure out what triggered the interrupt... |
| 544 | * The tricky bit here is that the interrupt source bits get | 544 | * The tricky bit here is that the interrupt source bits get |
| 545 | * set in INT_SOURCE for an event irregardless of whether that | 545 | * set in INT_SOURCE for an event regardless of whether that |
| 546 | * event is masked or not. Thus, in order to figure out what | 546 | * event is masked or not. Thus, in order to figure out what |
| 547 | * triggered the interrupt, we need to remove the sources | 547 | * triggered the interrupt, we need to remove the sources |
| 548 | * for all events that are currently masked. This behaviour | 548 | * for all events that are currently masked. This behaviour |
diff --git a/drivers/net/fec.h b/drivers/net/fec.h index ace318df4c8d..8b2c6d797e6d 100644 --- a/drivers/net/fec.h +++ b/drivers/net/fec.h | |||
| @@ -97,11 +97,11 @@ struct bufdesc { | |||
| 97 | * The following definitions courtesy of commproc.h, which where | 97 | * The following definitions courtesy of commproc.h, which where |
| 98 | * Copyright (c) 1997 Dan Malek (dmalek@jlc.net). | 98 | * Copyright (c) 1997 Dan Malek (dmalek@jlc.net). |
| 99 | */ | 99 | */ |
| 100 | #define BD_SC_EMPTY ((ushort)0x8000) /* Recieve is empty */ | 100 | #define BD_SC_EMPTY ((ushort)0x8000) /* Receive is empty */ |
| 101 | #define BD_SC_READY ((ushort)0x8000) /* Transmit is ready */ | 101 | #define BD_SC_READY ((ushort)0x8000) /* Transmit is ready */ |
| 102 | #define BD_SC_WRAP ((ushort)0x2000) /* Last buffer descriptor */ | 102 | #define BD_SC_WRAP ((ushort)0x2000) /* Last buffer descriptor */ |
| 103 | #define BD_SC_INTRPT ((ushort)0x1000) /* Interrupt on change */ | 103 | #define BD_SC_INTRPT ((ushort)0x1000) /* Interrupt on change */ |
| 104 | #define BD_SC_CM ((ushort)0x0200) /* Continous mode */ | 104 | #define BD_SC_CM ((ushort)0x0200) /* Continuous mode */ |
| 105 | #define BD_SC_ID ((ushort)0x0100) /* Rec'd too many idles */ | 105 | #define BD_SC_ID ((ushort)0x0100) /* Rec'd too many idles */ |
| 106 | #define BD_SC_P ((ushort)0x0100) /* xmt preamble */ | 106 | #define BD_SC_P ((ushort)0x0100) /* xmt preamble */ |
| 107 | #define BD_SC_BR ((ushort)0x0020) /* Break received */ | 107 | #define BD_SC_BR ((ushort)0x0020) /* Break received */ |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 7b92897ca66b..d5ab4dad5051 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
| @@ -440,7 +440,7 @@ union ring_type { | |||
| 440 | #define NV_RX3_VLAN_TAG_PRESENT (1<<16) | 440 | #define NV_RX3_VLAN_TAG_PRESENT (1<<16) |
| 441 | #define NV_RX3_VLAN_TAG_MASK (0x0000FFFF) | 441 | #define NV_RX3_VLAN_TAG_MASK (0x0000FFFF) |
| 442 | 442 | ||
| 443 | /* Miscelaneous hardware related defines: */ | 443 | /* Miscellaneous hardware related defines: */ |
| 444 | #define NV_PCI_REGSZ_VER1 0x270 | 444 | #define NV_PCI_REGSZ_VER1 0x270 |
| 445 | #define NV_PCI_REGSZ_VER2 0x2d4 | 445 | #define NV_PCI_REGSZ_VER2 0x2d4 |
| 446 | #define NV_PCI_REGSZ_VER3 0x604 | 446 | #define NV_PCI_REGSZ_VER3 0x604 |
| @@ -1488,7 +1488,7 @@ static int phy_init(struct net_device *dev) | |||
| 1488 | } | 1488 | } |
| 1489 | } | 1489 | } |
| 1490 | 1490 | ||
| 1491 | /* some phys clear out pause advertisment on reset, set it back */ | 1491 | /* some phys clear out pause advertisement on reset, set it back */ |
| 1492 | mii_rw(dev, np->phyaddr, MII_ADVERTISE, reg); | 1492 | mii_rw(dev, np->phyaddr, MII_ADVERTISE, reg); |
| 1493 | 1493 | ||
| 1494 | /* restart auto negotiation, power down phy */ | 1494 | /* restart auto negotiation, power down phy */ |
| @@ -2535,7 +2535,7 @@ static void nv_tx_timeout(struct net_device *dev) | |||
| 2535 | else | 2535 | else |
| 2536 | nv_tx_done_optimized(dev, np->tx_ring_size); | 2536 | nv_tx_done_optimized(dev, np->tx_ring_size); |
| 2537 | 2537 | ||
| 2538 | /* save current HW postion */ | 2538 | /* save current HW position */ |
| 2539 | if (np->tx_change_owner) | 2539 | if (np->tx_change_owner) |
| 2540 | put_tx.ex = np->tx_change_owner->first_tx_desc; | 2540 | put_tx.ex = np->tx_change_owner->first_tx_desc; |
| 2541 | else | 2541 | else |
| @@ -4053,7 +4053,7 @@ static int nv_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) | |||
| 4053 | 4053 | ||
| 4054 | } else if (ecmd->autoneg == AUTONEG_DISABLE) { | 4054 | } else if (ecmd->autoneg == AUTONEG_DISABLE) { |
| 4055 | /* Note: autonegotiation disable, speed 1000 intentionally | 4055 | /* Note: autonegotiation disable, speed 1000 intentionally |
| 4056 | * forbidden - noone should need that. */ | 4056 | * forbidden - no one should need that. */ |
| 4057 | 4057 | ||
| 4058 | if (ecmd->speed != SPEED_10 && ecmd->speed != SPEED_100) | 4058 | if (ecmd->speed != SPEED_10 && ecmd->speed != SPEED_100) |
| 4059 | return -EINVAL; | 4059 | return -EINVAL; |
| @@ -4103,7 +4103,7 @@ static int nv_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) | |||
| 4103 | adv |= ADVERTISE_100HALF; | 4103 | adv |= ADVERTISE_100HALF; |
| 4104 | if (ecmd->advertising & ADVERTISED_100baseT_Full) | 4104 | if (ecmd->advertising & ADVERTISED_100baseT_Full) |
| 4105 | adv |= ADVERTISE_100FULL; | 4105 | adv |= ADVERTISE_100FULL; |
| 4106 | if (np->pause_flags & NV_PAUSEFRAME_RX_REQ) /* for rx we set both advertisments but disable tx pause */ | 4106 | if (np->pause_flags & NV_PAUSEFRAME_RX_REQ) /* for rx we set both advertisements but disable tx pause */ |
| 4107 | adv |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM; | 4107 | adv |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM; |
| 4108 | if (np->pause_flags & NV_PAUSEFRAME_TX_REQ) | 4108 | if (np->pause_flags & NV_PAUSEFRAME_TX_REQ) |
| 4109 | adv |= ADVERTISE_PAUSE_ASYM; | 4109 | adv |= ADVERTISE_PAUSE_ASYM; |
| @@ -4148,7 +4148,7 @@ static int nv_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) | |||
| 4148 | if (ecmd->speed == SPEED_100 && ecmd->duplex == DUPLEX_FULL) | 4148 | if (ecmd->speed == SPEED_100 && ecmd->duplex == DUPLEX_FULL) |
| 4149 | adv |= ADVERTISE_100FULL; | 4149 | adv |= ADVERTISE_100FULL; |
| 4150 | np->pause_flags &= ~(NV_PAUSEFRAME_AUTONEG|NV_PAUSEFRAME_RX_ENABLE|NV_PAUSEFRAME_TX_ENABLE); | 4150 | np->pause_flags &= ~(NV_PAUSEFRAME_AUTONEG|NV_PAUSEFRAME_RX_ENABLE|NV_PAUSEFRAME_TX_ENABLE); |
| 4151 | if (np->pause_flags & NV_PAUSEFRAME_RX_REQ) {/* for rx we set both advertisments but disable tx pause */ | 4151 | if (np->pause_flags & NV_PAUSEFRAME_RX_REQ) {/* for rx we set both advertisements but disable tx pause */ |
| 4152 | adv |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM; | 4152 | adv |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM; |
| 4153 | np->pause_flags |= NV_PAUSEFRAME_RX_ENABLE; | 4153 | np->pause_flags |= NV_PAUSEFRAME_RX_ENABLE; |
| 4154 | } | 4154 | } |
| @@ -4449,7 +4449,7 @@ static int nv_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam* | |||
| 4449 | 4449 | ||
| 4450 | adv = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ); | 4450 | adv = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ); |
| 4451 | adv &= ~(ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM); | 4451 | adv &= ~(ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM); |
| 4452 | if (np->pause_flags & NV_PAUSEFRAME_RX_REQ) /* for rx we set both advertisments but disable tx pause */ | 4452 | if (np->pause_flags & NV_PAUSEFRAME_RX_REQ) /* for rx we set both advertisements but disable tx pause */ |
| 4453 | adv |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM; | 4453 | adv |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM; |
| 4454 | if (np->pause_flags & NV_PAUSEFRAME_TX_REQ) | 4454 | if (np->pause_flags & NV_PAUSEFRAME_TX_REQ) |
| 4455 | adv |= ADVERTISE_PAUSE_ASYM; | 4455 | adv |= ADVERTISE_PAUSE_ASYM; |
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h index ec5d595ce2e2..b2fe7edefad9 100644 --- a/drivers/net/gianfar.h +++ b/drivers/net/gianfar.h | |||
| @@ -1043,7 +1043,7 @@ enum gfar_errata { | |||
| 1043 | }; | 1043 | }; |
| 1044 | 1044 | ||
| 1045 | /* Struct stolen almost completely (and shamelessly) from the FCC enet source | 1045 | /* Struct stolen almost completely (and shamelessly) from the FCC enet source |
| 1046 | * (Ok, that's not so true anymore, but there is a family resemblence) | 1046 | * (Ok, that's not so true anymore, but there is a family resemblance) |
| 1047 | * The GFAR buffer descriptors track the ring buffers. The rx_bd_base | 1047 | * The GFAR buffer descriptors track the ring buffers. The rx_bd_base |
| 1048 | * and tx_bd_base always point to the currently available buffer. | 1048 | * and tx_bd_base always point to the currently available buffer. |
| 1049 | * The dirty_tx tracks the current buffer that is being sent by the | 1049 | * The dirty_tx tracks the current buffer that is being sent by the |
diff --git a/drivers/net/hamradio/Makefile b/drivers/net/hamradio/Makefile index 9def86704a91..104096070026 100644 --- a/drivers/net/hamradio/Makefile +++ b/drivers/net/hamradio/Makefile | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | # | 3 | # |
| 4 | # | 4 | # |
| 5 | # 19971130 Moved the amateur radio related network drivers from | 5 | # 19971130 Moved the amateur radio related network drivers from |
| 6 | # drivers/net/ to drivers/hamradio for easier maintainance. | 6 | # drivers/net/ to drivers/hamradio for easier maintenance. |
| 7 | # Joerg Reuter DL1BKE <jreuter@yaina.de> | 7 | # Joerg Reuter DL1BKE <jreuter@yaina.de> |
| 8 | # | 8 | # |
| 9 | # 20000806 Rewritten to use lists instead of if-statements. | 9 | # 20000806 Rewritten to use lists instead of if-statements. |
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c index 7d9ced0738c5..96a98d2ff151 100644 --- a/drivers/net/hamradio/yam.c +++ b/drivers/net/hamradio/yam.c | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | * 0.1 F1OAT 07.06.98 Add timer polling routine for channel arbitration | 30 | * 0.1 F1OAT 07.06.98 Add timer polling routine for channel arbitration |
| 31 | * 0.2 F6FBB 08.06.98 Added delay after FPGA programming | 31 | * 0.2 F6FBB 08.06.98 Added delay after FPGA programming |
| 32 | * 0.3 F6FBB 29.07.98 Delayed PTT implementation for dupmode=2 | 32 | * 0.3 F6FBB 29.07.98 Delayed PTT implementation for dupmode=2 |
| 33 | * 0.4 F6FBB 30.07.98 Added TxTail, Slottime and Persistance | 33 | * 0.4 F6FBB 30.07.98 Added TxTail, Slottime and Persistence |
| 34 | * 0.5 F6FBB 01.08.98 Shared IRQs, /proc/net and network statistics | 34 | * 0.5 F6FBB 01.08.98 Shared IRQs, /proc/net and network statistics |
| 35 | * 0.6 F6FBB 25.08.98 Added 1200Bds format | 35 | * 0.6 F6FBB 25.08.98 Added 1200Bds format |
| 36 | * 0.7 F6FBB 12.09.98 Added to the kernel configuration | 36 | * 0.7 F6FBB 12.09.98 Added to the kernel configuration |
diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c index 8e2c4601b5f5..8e10d2f6a5ad 100644 --- a/drivers/net/hp100.c +++ b/drivers/net/hp100.c | |||
| @@ -180,8 +180,8 @@ struct hp100_private { | |||
| 180 | 180 | ||
| 181 | u_int *page_vaddr_algn; /* Aligned virtual address of allocated page */ | 181 | u_int *page_vaddr_algn; /* Aligned virtual address of allocated page */ |
| 182 | u_long whatever_offset; /* Offset to bus/phys/dma address */ | 182 | u_long whatever_offset; /* Offset to bus/phys/dma address */ |
| 183 | int rxrcommit; /* # Rx PDLs commited to adapter */ | 183 | int rxrcommit; /* # Rx PDLs committed to adapter */ |
| 184 | int txrcommit; /* # Tx PDLs commited to adapter */ | 184 | int txrcommit; /* # Tx PDLs committed to adapter */ |
| 185 | }; | 185 | }; |
| 186 | 186 | ||
| 187 | /* | 187 | /* |
| @@ -716,7 +716,7 @@ static int __devinit hp100_probe1(struct net_device *dev, int ioaddr, | |||
| 716 | * implemented/tested only with the lassen chip anyway... */ | 716 | * implemented/tested only with the lassen chip anyway... */ |
| 717 | if (lp->mode == 1) { /* busmaster */ | 717 | if (lp->mode == 1) { /* busmaster */ |
| 718 | dma_addr_t page_baddr; | 718 | dma_addr_t page_baddr; |
| 719 | /* Get physically continous memory for TX & RX PDLs */ | 719 | /* Get physically continuous memory for TX & RX PDLs */ |
| 720 | /* Conversion to new PCI API : | 720 | /* Conversion to new PCI API : |
| 721 | * Pages are always aligned and zeroed, no need to it ourself. | 721 | * Pages are always aligned and zeroed, no need to it ourself. |
| 722 | * Doc says should be OK for EISA bus as well - Jean II */ | 722 | * Doc says should be OK for EISA bus as well - Jean II */ |
| @@ -1596,7 +1596,7 @@ drop: | |||
| 1596 | 1596 | ||
| 1597 | /* clean_txring checks if packets have been sent by the card by reading | 1597 | /* clean_txring checks if packets have been sent by the card by reading |
| 1598 | * the TX_PDL register from the performance page and comparing it to the | 1598 | * the TX_PDL register from the performance page and comparing it to the |
| 1599 | * number of commited packets. It then frees the skb's of the packets that | 1599 | * number of committed packets. It then frees the skb's of the packets that |
| 1600 | * obviously have been sent to the network. | 1600 | * obviously have been sent to the network. |
| 1601 | * | 1601 | * |
| 1602 | * Needs the PERFORMANCE page selected. | 1602 | * Needs the PERFORMANCE page selected. |
| @@ -1617,7 +1617,7 @@ static void hp100_clean_txring(struct net_device *dev) | |||
| 1617 | 1617 | ||
| 1618 | #ifdef HP100_DEBUG | 1618 | #ifdef HP100_DEBUG |
| 1619 | if (donecount > MAX_TX_PDL) | 1619 | if (donecount > MAX_TX_PDL) |
| 1620 | printk("hp100: %s: Warning: More PDLs transmitted than commited to card???\n", dev->name); | 1620 | printk("hp100: %s: Warning: More PDLs transmitted than committed to card???\n", dev->name); |
| 1621 | #endif | 1621 | #endif |
| 1622 | 1622 | ||
| 1623 | for (; 0 != donecount; donecount--) { | 1623 | for (; 0 != donecount; donecount--) { |
| @@ -1765,7 +1765,7 @@ drop: | |||
| 1765 | * Receive Function (Non-Busmaster mode) | 1765 | * Receive Function (Non-Busmaster mode) |
| 1766 | * Called when an "Receive Packet" interrupt occurs, i.e. the receive | 1766 | * Called when an "Receive Packet" interrupt occurs, i.e. the receive |
| 1767 | * packet counter is non-zero. | 1767 | * packet counter is non-zero. |
| 1768 | * For non-busmaster, this function does the whole work of transfering | 1768 | * For non-busmaster, this function does the whole work of transferring |
| 1769 | * the packet to the host memory and then up to higher layers via skb | 1769 | * the packet to the host memory and then up to higher layers via skb |
| 1770 | * and netif_rx. | 1770 | * and netif_rx. |
| 1771 | */ | 1771 | */ |
| @@ -1892,7 +1892,7 @@ static void hp100_rx_bm(struct net_device *dev) | |||
| 1892 | /* RX_PKT_CNT states how many PDLs are currently formatted and available to | 1892 | /* RX_PKT_CNT states how many PDLs are currently formatted and available to |
| 1893 | * the cards BM engine */ | 1893 | * the cards BM engine */ |
| 1894 | if ((hp100_inw(RX_PKT_CNT) & 0x00ff) >= lp->rxrcommit) { | 1894 | if ((hp100_inw(RX_PKT_CNT) & 0x00ff) >= lp->rxrcommit) { |
| 1895 | printk("hp100: %s: More packets received than commited? RX_PKT_CNT=0x%x, commit=0x%x\n", | 1895 | printk("hp100: %s: More packets received than committed? RX_PKT_CNT=0x%x, commit=0x%x\n", |
| 1896 | dev->name, hp100_inw(RX_PKT_CNT) & 0x00ff, | 1896 | dev->name, hp100_inw(RX_PKT_CNT) & 0x00ff, |
| 1897 | lp->rxrcommit); | 1897 | lp->rxrcommit); |
| 1898 | return; | 1898 | return; |
| @@ -2256,7 +2256,7 @@ static irqreturn_t hp100_interrupt(int irq, void *dev_id) | |||
| 2256 | if (lp->mode != 1) /* non busmaster */ | 2256 | if (lp->mode != 1) /* non busmaster */ |
| 2257 | hp100_rx(dev); | 2257 | hp100_rx(dev); |
| 2258 | else if (!(val & HP100_RX_PDL_FILL_COMPL)) { | 2258 | else if (!(val & HP100_RX_PDL_FILL_COMPL)) { |
| 2259 | /* Shouldnt happen - maybe we missed a RX_PDL_FILL Interrupt? */ | 2259 | /* Shouldn't happen - maybe we missed a RX_PDL_FILL Interrupt? */ |
| 2260 | hp100_rx_bm(dev); | 2260 | hp100_rx_bm(dev); |
| 2261 | } | 2261 | } |
| 2262 | } | 2262 | } |
diff --git a/drivers/net/hp100.h b/drivers/net/hp100.h index e6ca128a5564..b60e96fe38b4 100644 --- a/drivers/net/hp100.h +++ b/drivers/net/hp100.h | |||
| @@ -109,7 +109,7 @@ | |||
| 109 | #define HP100_REG_MAC_CFG_2 0x0d /* RW: (8) Misc MAC functions */ | 109 | #define HP100_REG_MAC_CFG_2 0x0d /* RW: (8) Misc MAC functions */ |
| 110 | #define HP100_REG_MAC_CFG_3 0x0e /* RW: (8) Misc MAC functions */ | 110 | #define HP100_REG_MAC_CFG_3 0x0e /* RW: (8) Misc MAC functions */ |
| 111 | #define HP100_REG_MAC_CFG_4 0x0f /* R: (8) Misc MAC states */ | 111 | #define HP100_REG_MAC_CFG_4 0x0f /* R: (8) Misc MAC states */ |
| 112 | #define HP100_REG_DROPPED 0x10 /* R: (16),11:0 Pkts cant fit in mem */ | 112 | #define HP100_REG_DROPPED 0x10 /* R: (16),11:0 Pkts can't fit in mem */ |
| 113 | #define HP100_REG_CRC 0x12 /* R: (8) Pkts with CRC */ | 113 | #define HP100_REG_CRC 0x12 /* R: (8) Pkts with CRC */ |
| 114 | #define HP100_REG_ABORT 0x13 /* R: (8) Aborted Tx pkts */ | 114 | #define HP100_REG_ABORT 0x13 /* R: (8) Aborted Tx pkts */ |
| 115 | #define HP100_REG_TRAIN_REQUEST 0x14 /* RW: (16) Endnode MAC register. */ | 115 | #define HP100_REG_TRAIN_REQUEST 0x14 /* RW: (16) Endnode MAC register. */ |
diff --git a/drivers/net/ibm_newemac/tah.c b/drivers/net/ibm_newemac/tah.c index 8ead6a96abaa..5f51bf7c9dc5 100644 --- a/drivers/net/ibm_newemac/tah.c +++ b/drivers/net/ibm_newemac/tah.c | |||
| @@ -60,7 +60,7 @@ void tah_reset(struct platform_device *ofdev) | |||
| 60 | printk(KERN_ERR "%s: reset timeout\n", | 60 | printk(KERN_ERR "%s: reset timeout\n", |
| 61 | ofdev->dev.of_node->full_name); | 61 | ofdev->dev.of_node->full_name); |
| 62 | 62 | ||
| 63 | /* 10KB TAH TX FIFO accomodates the max MTU of 9000 */ | 63 | /* 10KB TAH TX FIFO accommodates the max MTU of 9000 */ |
| 64 | out_be32(&p->mr, | 64 | out_be32(&p->mr, |
| 65 | TAH_MR_CVR | TAH_MR_ST_768 | TAH_MR_TFS_10KB | TAH_MR_DTFP | | 65 | TAH_MR_CVR | TAH_MR_ST_768 | TAH_MR_TFS_10KB | TAH_MR_DTFP | |
| 66 | TAH_MR_DIG); | 66 | TAH_MR_DIG); |
diff --git a/drivers/net/ibmlana.c b/drivers/net/ibmlana.c index 94d9969ec0bb..8ff68ae6b520 100644 --- a/drivers/net/ibmlana.c +++ b/drivers/net/ibmlana.c | |||
| @@ -53,7 +53,7 @@ History: | |||
| 53 | still work with 2.0.x.... | 53 | still work with 2.0.x.... |
| 54 | Jan 28th, 2000 | 54 | Jan 28th, 2000 |
| 55 | in Linux 2.2.13, the version.h file mysteriously didn't get | 55 | in Linux 2.2.13, the version.h file mysteriously didn't get |
| 56 | included. Added a workaround for this. Futhermore, it now | 56 | included. Added a workaround for this. Furthermore, it now |
| 57 | not only compiles as a modules ;-) | 57 | not only compiles as a modules ;-) |
| 58 | Jan 30th, 2000 | 58 | Jan 30th, 2000 |
| 59 | newer kernels automatically probe more than one board, so the | 59 | newer kernels automatically probe more than one board, so the |
| @@ -481,7 +481,7 @@ static void InitBoard(struct net_device *dev) | |||
| 481 | if ((dev->flags & IFF_ALLMULTI) || netdev_mc_count(dev) > camcnt) | 481 | if ((dev->flags & IFF_ALLMULTI) || netdev_mc_count(dev) > camcnt) |
| 482 | rcrval |= RCREG_AMC; | 482 | rcrval |= RCREG_AMC; |
| 483 | 483 | ||
| 484 | /* promiscous mode ? */ | 484 | /* promiscuous mode ? */ |
| 485 | 485 | ||
| 486 | if (dev->flags & IFF_PROMISC) | 486 | if (dev->flags & IFF_PROMISC) |
| 487 | rcrval |= RCREG_PRO; | 487 | rcrval |= RCREG_PRO; |
diff --git a/drivers/net/ibmlana.h b/drivers/net/ibmlana.h index aa3ddbdee4bb..accd5efc9c8a 100644 --- a/drivers/net/ibmlana.h +++ b/drivers/net/ibmlana.h | |||
| @@ -90,7 +90,7 @@ typedef struct { | |||
| 90 | #define RCREG_ERR 0x8000 /* accept damaged and collided pkts */ | 90 | #define RCREG_ERR 0x8000 /* accept damaged and collided pkts */ |
| 91 | #define RCREG_RNT 0x4000 /* accept packets that are < 64 */ | 91 | #define RCREG_RNT 0x4000 /* accept packets that are < 64 */ |
| 92 | #define RCREG_BRD 0x2000 /* accept broadcasts */ | 92 | #define RCREG_BRD 0x2000 /* accept broadcasts */ |
| 93 | #define RCREG_PRO 0x1000 /* promiscous mode */ | 93 | #define RCREG_PRO 0x1000 /* promiscuous mode */ |
| 94 | #define RCREG_AMC 0x0800 /* accept all multicasts */ | 94 | #define RCREG_AMC 0x0800 /* accept all multicasts */ |
| 95 | #define RCREG_LB_NONE 0x0000 /* no loopback */ | 95 | #define RCREG_LB_NONE 0x0000 /* no loopback */ |
| 96 | #define RCREG_LB_MAC 0x0200 /* MAC loopback */ | 96 | #define RCREG_LB_MAC 0x0200 /* MAC loopback */ |
diff --git a/drivers/net/igb/e1000_mac.c b/drivers/net/igb/e1000_mac.c index 90c5e01e9235..ce8255fc3c52 100644 --- a/drivers/net/igb/e1000_mac.c +++ b/drivers/net/igb/e1000_mac.c | |||
| @@ -181,7 +181,7 @@ s32 igb_vfta_set(struct e1000_hw *hw, u32 vid, bool add) | |||
| 181 | * address and must override the actual permanent MAC address. If an | 181 | * address and must override the actual permanent MAC address. If an |
| 182 | * alternate MAC address is fopund it is saved in the hw struct and | 182 | * alternate MAC address is fopund it is saved in the hw struct and |
| 183 | * prgrammed into RAR0 and the cuntion returns success, otherwise the | 183 | * prgrammed into RAR0 and the cuntion returns success, otherwise the |
| 184 | * fucntion returns an error. | 184 | * function returns an error. |
| 185 | **/ | 185 | **/ |
| 186 | s32 igb_check_alt_mac_addr(struct e1000_hw *hw) | 186 | s32 igb_check_alt_mac_addr(struct e1000_hw *hw) |
| 187 | { | 187 | { |
| @@ -982,7 +982,7 @@ out: | |||
| 982 | } | 982 | } |
| 983 | 983 | ||
| 984 | /** | 984 | /** |
| 985 | * igb_get_speed_and_duplex_copper - Retreive current speed/duplex | 985 | * igb_get_speed_and_duplex_copper - Retrieve current speed/duplex |
| 986 | * @hw: pointer to the HW structure | 986 | * @hw: pointer to the HW structure |
| 987 | * @speed: stores the current speed | 987 | * @speed: stores the current speed |
| 988 | * @duplex: stores the current duplex | 988 | * @duplex: stores the current duplex |
diff --git a/drivers/net/igb/e1000_phy.c b/drivers/net/igb/e1000_phy.c index 6694bf3e5ad9..d639706eb3f6 100644 --- a/drivers/net/igb/e1000_phy.c +++ b/drivers/net/igb/e1000_phy.c | |||
| @@ -1421,7 +1421,7 @@ out: | |||
| 1421 | } | 1421 | } |
| 1422 | 1422 | ||
| 1423 | /** | 1423 | /** |
| 1424 | * igb_check_downshift - Checks whether a downshift in speed occured | 1424 | * igb_check_downshift - Checks whether a downshift in speed occurred |
| 1425 | * @hw: pointer to the HW structure | 1425 | * @hw: pointer to the HW structure |
| 1426 | * | 1426 | * |
| 1427 | * Success returns 0, Failure returns 1 | 1427 | * Success returns 0, Failure returns 1 |
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 3d850af0cdda..0dfd1b93829e 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
| @@ -200,7 +200,7 @@ static struct pci_driver igb_driver = { | |||
| 200 | .probe = igb_probe, | 200 | .probe = igb_probe, |
| 201 | .remove = __devexit_p(igb_remove), | 201 | .remove = __devexit_p(igb_remove), |
| 202 | #ifdef CONFIG_PM | 202 | #ifdef CONFIG_PM |
| 203 | /* Power Managment Hooks */ | 203 | /* Power Management Hooks */ |
| 204 | .suspend = igb_suspend, | 204 | .suspend = igb_suspend, |
| 205 | .resume = igb_resume, | 205 | .resume = igb_resume, |
| 206 | #endif | 206 | #endif |
| @@ -2292,7 +2292,7 @@ static void igb_init_hw_timer(struct igb_adapter *adapter) | |||
| 2292 | /** | 2292 | /** |
| 2293 | * Scale the NIC clock cycle by a large factor so that | 2293 | * Scale the NIC clock cycle by a large factor so that |
| 2294 | * relatively small clock corrections can be added or | 2294 | * relatively small clock corrections can be added or |
| 2295 | * substracted at each clock tick. The drawbacks of a large | 2295 | * subtracted at each clock tick. The drawbacks of a large |
| 2296 | * factor are a) that the clock register overflows more quickly | 2296 | * factor are a) that the clock register overflows more quickly |
| 2297 | * (not such a big deal) and b) that the increment per tick has | 2297 | * (not such a big deal) and b) that the increment per tick has |
| 2298 | * to fit into 24 bits. As a result we need to use a shift of | 2298 | * to fit into 24 bits. As a result we need to use a shift of |
| @@ -3409,7 +3409,7 @@ static void igb_set_rx_mode(struct net_device *netdev) | |||
| 3409 | } else { | 3409 | } else { |
| 3410 | /* | 3410 | /* |
| 3411 | * Write addresses to the MTA, if the attempt fails | 3411 | * Write addresses to the MTA, if the attempt fails |
| 3412 | * then we should just turn on promiscous mode so | 3412 | * then we should just turn on promiscuous mode so |
| 3413 | * that we can at least receive multicast traffic | 3413 | * that we can at least receive multicast traffic |
| 3414 | */ | 3414 | */ |
| 3415 | count = igb_write_mc_addr_list(netdev); | 3415 | count = igb_write_mc_addr_list(netdev); |
| @@ -3423,7 +3423,7 @@ static void igb_set_rx_mode(struct net_device *netdev) | |||
| 3423 | /* | 3423 | /* |
| 3424 | * Write addresses to available RAR registers, if there is not | 3424 | * Write addresses to available RAR registers, if there is not |
| 3425 | * sufficient space to store all the addresses then enable | 3425 | * sufficient space to store all the addresses then enable |
| 3426 | * unicast promiscous mode | 3426 | * unicast promiscuous mode |
| 3427 | */ | 3427 | */ |
| 3428 | count = igb_write_uc_addr_list(netdev); | 3428 | count = igb_write_uc_addr_list(netdev); |
| 3429 | if (count < 0) { | 3429 | if (count < 0) { |
| @@ -4317,7 +4317,7 @@ netdev_tx_t igb_xmit_frame_ring_adv(struct sk_buff *skb, | |||
| 4317 | 4317 | ||
| 4318 | /* | 4318 | /* |
| 4319 | * count reflects descriptors mapped, if 0 or less then mapping error | 4319 | * count reflects descriptors mapped, if 0 or less then mapping error |
| 4320 | * has occured and we need to rewind the descriptor queue | 4320 | * has occurred and we need to rewind the descriptor queue |
| 4321 | */ | 4321 | */ |
| 4322 | count = igb_tx_map_adv(tx_ring, skb, first); | 4322 | count = igb_tx_map_adv(tx_ring, skb, first); |
| 4323 | if (!count) { | 4323 | if (!count) { |
| @@ -5352,8 +5352,8 @@ static void igb_msg_task(struct igb_adapter *adapter) | |||
| 5352 | * The unicast table address is a register array of 32-bit registers. | 5352 | * The unicast table address is a register array of 32-bit registers. |
| 5353 | * The table is meant to be used in a way similar to how the MTA is used | 5353 | * The table is meant to be used in a way similar to how the MTA is used |
| 5354 | * however due to certain limitations in the hardware it is necessary to | 5354 | * however due to certain limitations in the hardware it is necessary to |
| 5355 | * set all the hash bits to 1 and use the VMOLR ROPE bit as a promiscous | 5355 | * set all the hash bits to 1 and use the VMOLR ROPE bit as a promiscuous |
| 5356 | * enable bit to allow vlan tag stripping when promiscous mode is enabled | 5356 | * enable bit to allow vlan tag stripping when promiscuous mode is enabled |
| 5357 | **/ | 5357 | **/ |
| 5358 | static void igb_set_uta(struct igb_adapter *adapter) | 5358 | static void igb_set_uta(struct igb_adapter *adapter) |
| 5359 | { | 5359 | { |
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c index 6ccc32fd7338..1d04ca6fdaea 100644 --- a/drivers/net/igbvf/netdev.c +++ b/drivers/net/igbvf/netdev.c | |||
| @@ -2227,7 +2227,7 @@ static netdev_tx_t igbvf_xmit_frame_ring_adv(struct sk_buff *skb, | |||
| 2227 | 2227 | ||
| 2228 | /* | 2228 | /* |
| 2229 | * count reflects descriptors mapped, if 0 then mapping error | 2229 | * count reflects descriptors mapped, if 0 then mapping error |
| 2230 | * has occured and we need to rewind the descriptor queue | 2230 | * has occurred and we need to rewind the descriptor queue |
| 2231 | */ | 2231 | */ |
| 2232 | count = igbvf_tx_map_adv(adapter, tx_ring, skb, first); | 2232 | count = igbvf_tx_map_adv(adapter, tx_ring, skb, first); |
| 2233 | 2233 | ||
diff --git a/drivers/net/ipg.c b/drivers/net/ipg.c index a5b0f0e194bb..58cd3202b48c 100644 --- a/drivers/net/ipg.c +++ b/drivers/net/ipg.c | |||
| @@ -486,14 +486,14 @@ static int ipg_config_autoneg(struct net_device *dev) | |||
| 486 | phyctrl = ipg_r8(PHY_CTRL); | 486 | phyctrl = ipg_r8(PHY_CTRL); |
| 487 | mac_ctrl_val = ipg_r32(MAC_CTRL); | 487 | mac_ctrl_val = ipg_r32(MAC_CTRL); |
| 488 | 488 | ||
| 489 | /* Set flags for use in resolving auto-negotation, assuming | 489 | /* Set flags for use in resolving auto-negotiation, assuming |
| 490 | * non-1000Mbps, half duplex, no flow control. | 490 | * non-1000Mbps, half duplex, no flow control. |
| 491 | */ | 491 | */ |
| 492 | fullduplex = 0; | 492 | fullduplex = 0; |
| 493 | txflowcontrol = 0; | 493 | txflowcontrol = 0; |
| 494 | rxflowcontrol = 0; | 494 | rxflowcontrol = 0; |
| 495 | 495 | ||
| 496 | /* To accomodate a problem in 10Mbps operation, | 496 | /* To accommodate a problem in 10Mbps operation, |
| 497 | * set a global flag if PHY running in 10Mbps mode. | 497 | * set a global flag if PHY running in 10Mbps mode. |
| 498 | */ | 498 | */ |
| 499 | sp->tenmbpsmode = 0; | 499 | sp->tenmbpsmode = 0; |
| @@ -846,7 +846,7 @@ static void init_tfdlist(struct net_device *dev) | |||
| 846 | } | 846 | } |
| 847 | 847 | ||
| 848 | /* | 848 | /* |
| 849 | * Free all transmit buffers which have already been transfered | 849 | * Free all transmit buffers which have already been transferred |
| 850 | * via DMA to the IPG. | 850 | * via DMA to the IPG. |
| 851 | */ | 851 | */ |
| 852 | static void ipg_nic_txfree(struct net_device *dev) | 852 | static void ipg_nic_txfree(struct net_device *dev) |
| @@ -920,7 +920,7 @@ static void ipg_tx_timeout(struct net_device *dev) | |||
| 920 | 920 | ||
| 921 | /* | 921 | /* |
| 922 | * For TxComplete interrupts, free all transmit | 922 | * For TxComplete interrupts, free all transmit |
| 923 | * buffers which have already been transfered via DMA | 923 | * buffers which have already been transferred via DMA |
| 924 | * to the IPG. | 924 | * to the IPG. |
| 925 | */ | 925 | */ |
| 926 | static void ipg_nic_txcleanup(struct net_device *dev) | 926 | static void ipg_nic_txcleanup(struct net_device *dev) |
| @@ -1141,13 +1141,13 @@ static int ipg_nic_rx_check_error(struct net_device *dev) | |||
| 1141 | 1141 | ||
| 1142 | /* Increment detailed receive error statistics. */ | 1142 | /* Increment detailed receive error statistics. */ |
| 1143 | if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXFIFOOVERRUN) { | 1143 | if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXFIFOOVERRUN) { |
| 1144 | IPG_DEBUG_MSG("RX FIFO overrun occured.\n"); | 1144 | IPG_DEBUG_MSG("RX FIFO overrun occurred.\n"); |
| 1145 | 1145 | ||
| 1146 | sp->stats.rx_fifo_errors++; | 1146 | sp->stats.rx_fifo_errors++; |
| 1147 | } | 1147 | } |
| 1148 | 1148 | ||
| 1149 | if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXRUNTFRAME) { | 1149 | if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXRUNTFRAME) { |
| 1150 | IPG_DEBUG_MSG("RX runt occured.\n"); | 1150 | IPG_DEBUG_MSG("RX runt occurred.\n"); |
| 1151 | sp->stats.rx_length_errors++; | 1151 | sp->stats.rx_length_errors++; |
| 1152 | } | 1152 | } |
| 1153 | 1153 | ||
| @@ -1156,7 +1156,7 @@ static int ipg_nic_rx_check_error(struct net_device *dev) | |||
| 1156 | */ | 1156 | */ |
| 1157 | 1157 | ||
| 1158 | if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXALIGNMENTERROR) { | 1158 | if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXALIGNMENTERROR) { |
| 1159 | IPG_DEBUG_MSG("RX alignment error occured.\n"); | 1159 | IPG_DEBUG_MSG("RX alignment error occurred.\n"); |
| 1160 | sp->stats.rx_frame_errors++; | 1160 | sp->stats.rx_frame_errors++; |
| 1161 | } | 1161 | } |
| 1162 | 1162 | ||
| @@ -1421,12 +1421,12 @@ static int ipg_nic_rx(struct net_device *dev) | |||
| 1421 | 1421 | ||
| 1422 | /* Increment detailed receive error statistics. */ | 1422 | /* Increment detailed receive error statistics. */ |
| 1423 | if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXFIFOOVERRUN) { | 1423 | if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXFIFOOVERRUN) { |
| 1424 | IPG_DEBUG_MSG("RX FIFO overrun occured.\n"); | 1424 | IPG_DEBUG_MSG("RX FIFO overrun occurred.\n"); |
| 1425 | sp->stats.rx_fifo_errors++; | 1425 | sp->stats.rx_fifo_errors++; |
| 1426 | } | 1426 | } |
| 1427 | 1427 | ||
| 1428 | if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXRUNTFRAME) { | 1428 | if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXRUNTFRAME) { |
| 1429 | IPG_DEBUG_MSG("RX runt occured.\n"); | 1429 | IPG_DEBUG_MSG("RX runt occurred.\n"); |
| 1430 | sp->stats.rx_length_errors++; | 1430 | sp->stats.rx_length_errors++; |
| 1431 | } | 1431 | } |
| 1432 | 1432 | ||
| @@ -1436,7 +1436,7 @@ static int ipg_nic_rx(struct net_device *dev) | |||
| 1436 | */ | 1436 | */ |
| 1437 | 1437 | ||
| 1438 | if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXALIGNMENTERROR) { | 1438 | if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXALIGNMENTERROR) { |
| 1439 | IPG_DEBUG_MSG("RX alignment error occured.\n"); | 1439 | IPG_DEBUG_MSG("RX alignment error occurred.\n"); |
| 1440 | sp->stats.rx_frame_errors++; | 1440 | sp->stats.rx_frame_errors++; |
| 1441 | } | 1441 | } |
| 1442 | 1442 | ||
| @@ -1460,7 +1460,7 @@ static int ipg_nic_rx(struct net_device *dev) | |||
| 1460 | } | 1460 | } |
| 1461 | } else { | 1461 | } else { |
| 1462 | 1462 | ||
| 1463 | /* Adjust the new buffer length to accomodate the size | 1463 | /* Adjust the new buffer length to accommodate the size |
| 1464 | * of the received frame. | 1464 | * of the received frame. |
| 1465 | */ | 1465 | */ |
| 1466 | skb_put(skb, framelen); | 1466 | skb_put(skb, framelen); |
| @@ -1488,7 +1488,7 @@ static int ipg_nic_rx(struct net_device *dev) | |||
| 1488 | } | 1488 | } |
| 1489 | 1489 | ||
| 1490 | /* | 1490 | /* |
| 1491 | * If there are more RFDs to proces and the allocated amount of RFD | 1491 | * If there are more RFDs to process and the allocated amount of RFD |
| 1492 | * processing time has expired, assert Interrupt Requested to make | 1492 | * processing time has expired, assert Interrupt Requested to make |
| 1493 | * sure we come back to process the remaining RFDs. | 1493 | * sure we come back to process the remaining RFDs. |
| 1494 | */ | 1494 | */ |
| @@ -1886,7 +1886,7 @@ static netdev_tx_t ipg_nic_hard_start_xmit(struct sk_buff *skb, | |||
| 1886 | /* Request TxComplete interrupts at an interval defined | 1886 | /* Request TxComplete interrupts at an interval defined |
| 1887 | * by the constant IPG_FRAMESBETWEENTXCOMPLETES. | 1887 | * by the constant IPG_FRAMESBETWEENTXCOMPLETES. |
| 1888 | * Request TxComplete interrupt for every frame | 1888 | * Request TxComplete interrupt for every frame |
| 1889 | * if in 10Mbps mode to accomodate problem with 10Mbps | 1889 | * if in 10Mbps mode to accommodate problem with 10Mbps |
| 1890 | * processing. | 1890 | * processing. |
| 1891 | */ | 1891 | */ |
| 1892 | if (sp->tenmbpsmode) | 1892 | if (sp->tenmbpsmode) |
| @@ -2098,7 +2098,7 @@ static int ipg_nic_change_mtu(struct net_device *dev, int new_mtu) | |||
| 2098 | struct ipg_nic_private *sp = netdev_priv(dev); | 2098 | struct ipg_nic_private *sp = netdev_priv(dev); |
| 2099 | int err; | 2099 | int err; |
| 2100 | 2100 | ||
| 2101 | /* Function to accomodate changes to Maximum Transfer Unit | 2101 | /* Function to accommodate changes to Maximum Transfer Unit |
| 2102 | * (or MTU) of IPG NIC. Cannot use default function since | 2102 | * (or MTU) of IPG NIC. Cannot use default function since |
| 2103 | * the default will not allow for MTU > 1500 bytes. | 2103 | * the default will not allow for MTU > 1500 bytes. |
| 2104 | */ | 2104 | */ |
diff --git a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c index 92631eb6f6a3..872183f29ec4 100644 --- a/drivers/net/irda/ali-ircc.c +++ b/drivers/net/irda/ali-ircc.c | |||
| @@ -76,7 +76,7 @@ static int ali_ircc_probe_53(ali_chip_t *chip, chipio_t *info); | |||
| 76 | static int ali_ircc_init_43(ali_chip_t *chip, chipio_t *info); | 76 | static int ali_ircc_init_43(ali_chip_t *chip, chipio_t *info); |
| 77 | static int ali_ircc_init_53(ali_chip_t *chip, chipio_t *info); | 77 | static int ali_ircc_init_53(ali_chip_t *chip, chipio_t *info); |
| 78 | 78 | ||
| 79 | /* These are the currently known ALi sourth-bridge chipsets, the only one difference | 79 | /* These are the currently known ALi south-bridge chipsets, the only one difference |
| 80 | * is that M1543C doesn't support HP HDSL-3600 | 80 | * is that M1543C doesn't support HP HDSL-3600 |
| 81 | */ | 81 | */ |
| 82 | static ali_chip_t chips[] = | 82 | static ali_chip_t chips[] = |
| @@ -1108,7 +1108,7 @@ static void ali_ircc_sir_change_speed(struct ali_ircc_cb *priv, __u32 speed) | |||
| 1108 | outb(lcr, iobase+UART_LCR); /* Set 8N1 */ | 1108 | outb(lcr, iobase+UART_LCR); /* Set 8N1 */ |
| 1109 | outb(fcr, iobase+UART_FCR); /* Enable FIFO's */ | 1109 | outb(fcr, iobase+UART_FCR); /* Enable FIFO's */ |
| 1110 | 1110 | ||
| 1111 | /* without this, the conection will be broken after come back from FIR speed, | 1111 | /* without this, the connection will be broken after come back from FIR speed, |
| 1112 | but with this, the SIR connection is harder to established */ | 1112 | but with this, the SIR connection is harder to established */ |
| 1113 | outb((UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2), iobase+UART_MCR); | 1113 | outb((UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2), iobase+UART_MCR); |
| 1114 | 1114 | ||
diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c index f81d944fc360..174cafad2c1a 100644 --- a/drivers/net/irda/donauboe.c +++ b/drivers/net/irda/donauboe.c | |||
| @@ -56,7 +56,7 @@ | |||
| 56 | /* do_probe module parameter Enable this code */ | 56 | /* do_probe module parameter Enable this code */ |
| 57 | /* Probe code is very useful for understanding how the hardware works */ | 57 | /* Probe code is very useful for understanding how the hardware works */ |
| 58 | /* Use it with various combinations of TT_LEN, RX_LEN */ | 58 | /* Use it with various combinations of TT_LEN, RX_LEN */ |
| 59 | /* Strongly recomended, disable if the probe fails on your machine */ | 59 | /* Strongly recommended, disable if the probe fails on your machine */ |
| 60 | /* and send me <james@fishsoup.dhs.org> the output of dmesg */ | 60 | /* and send me <james@fishsoup.dhs.org> the output of dmesg */ |
| 61 | #define USE_PROBE 1 | 61 | #define USE_PROBE 1 |
| 62 | #undef USE_PROBE | 62 | #undef USE_PROBE |
diff --git a/drivers/net/irda/donauboe.h b/drivers/net/irda/donauboe.h index 77fcf4459161..d92d54e839b9 100644 --- a/drivers/net/irda/donauboe.h +++ b/drivers/net/irda/donauboe.h | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | 51 | ||
| 52 | /* The documentation for this chip is allegedly released */ | 52 | /* The documentation for this chip is allegedly released */ |
| 53 | /* However I have not seen it, not have I managed to contact */ | 53 | /* However I have not seen it, not have I managed to contact */ |
| 54 | /* anyone who has. HOWEVER the chip bears a striking resemblence */ | 54 | /* anyone who has. HOWEVER the chip bears a striking resemblance */ |
| 55 | /* to the IrDA controller in the Toshiba RISC TMPR3922 chip */ | 55 | /* to the IrDA controller in the Toshiba RISC TMPR3922 chip */ |
| 56 | /* the documentation for this is freely available at */ | 56 | /* the documentation for this is freely available at */ |
| 57 | /* http://www.madingley.org/james/resources/toshoboe/TMPR3922.pdf */ | 57 | /* http://www.madingley.org/james/resources/toshoboe/TMPR3922.pdf */ |
diff --git a/drivers/net/irda/girbil-sir.c b/drivers/net/irda/girbil-sir.c index a31b8fa8aaa9..96cdecff349d 100644 --- a/drivers/net/irda/girbil-sir.c +++ b/drivers/net/irda/girbil-sir.c | |||
| @@ -38,7 +38,7 @@ static int girbil_change_speed(struct sir_dev *dev, unsigned speed); | |||
| 38 | /* Control register 1 */ | 38 | /* Control register 1 */ |
| 39 | #define GIRBIL_TXEN 0x01 /* Enable transmitter */ | 39 | #define GIRBIL_TXEN 0x01 /* Enable transmitter */ |
| 40 | #define GIRBIL_RXEN 0x02 /* Enable receiver */ | 40 | #define GIRBIL_RXEN 0x02 /* Enable receiver */ |
| 41 | #define GIRBIL_ECAN 0x04 /* Cancel self emmited data */ | 41 | #define GIRBIL_ECAN 0x04 /* Cancel self emitted data */ |
| 42 | #define GIRBIL_ECHO 0x08 /* Echo control characters */ | 42 | #define GIRBIL_ECHO 0x08 /* Echo control characters */ |
| 43 | 43 | ||
| 44 | /* LED Current Register (0x2) */ | 44 | /* LED Current Register (0x2) */ |
diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c index e4ea61944c22..d9267cb98a23 100644 --- a/drivers/net/irda/irda-usb.c +++ b/drivers/net/irda/irda-usb.c | |||
| @@ -370,7 +370,7 @@ static void speed_bulk_callback(struct urb *urb) | |||
| 370 | /* urb is now available */ | 370 | /* urb is now available */ |
| 371 | //urb->status = 0; -> tested above | 371 | //urb->status = 0; -> tested above |
| 372 | 372 | ||
| 373 | /* New speed and xbof is now commited in hardware */ | 373 | /* New speed and xbof is now committed in hardware */ |
| 374 | self->new_speed = -1; | 374 | self->new_speed = -1; |
| 375 | self->new_xbofs = -1; | 375 | self->new_xbofs = -1; |
| 376 | 376 | ||
| @@ -602,7 +602,7 @@ static void write_bulk_callback(struct urb *urb) | |||
| 602 | IRDA_DEBUG(1, "%s(), Changing speed now...\n", __func__); | 602 | IRDA_DEBUG(1, "%s(), Changing speed now...\n", __func__); |
| 603 | irda_usb_change_speed_xbofs(self); | 603 | irda_usb_change_speed_xbofs(self); |
| 604 | } else { | 604 | } else { |
| 605 | /* New speed and xbof is now commited in hardware */ | 605 | /* New speed and xbof is now committed in hardware */ |
| 606 | self->new_speed = -1; | 606 | self->new_speed = -1; |
| 607 | self->new_xbofs = -1; | 607 | self->new_xbofs = -1; |
| 608 | /* Done, waiting for next packet */ | 608 | /* Done, waiting for next packet */ |
diff --git a/drivers/net/irda/mcs7780.c b/drivers/net/irda/mcs7780.c index cc821de2c966..be52bfed66a9 100644 --- a/drivers/net/irda/mcs7780.c +++ b/drivers/net/irda/mcs7780.c | |||
| @@ -588,7 +588,7 @@ static int mcs_speed_change(struct mcs_cb *mcs) | |||
| 588 | 588 | ||
| 589 | mcs_get_reg(mcs, MCS_MODE_REG, &rval); | 589 | mcs_get_reg(mcs, MCS_MODE_REG, &rval); |
| 590 | 590 | ||
| 591 | /* MINRXPW values recomended by MosChip */ | 591 | /* MINRXPW values recommended by MosChip */ |
| 592 | if (mcs->new_speed <= 115200) { | 592 | if (mcs->new_speed <= 115200) { |
| 593 | rval &= ~MCS_FIR; | 593 | rval &= ~MCS_FIR; |
| 594 | 594 | ||
| @@ -799,7 +799,7 @@ static void mcs_receive_irq(struct urb *urb) | |||
| 799 | ret = usb_submit_urb(urb, GFP_ATOMIC); | 799 | ret = usb_submit_urb(urb, GFP_ATOMIC); |
| 800 | } | 800 | } |
| 801 | 801 | ||
| 802 | /* Transmit callback funtion. */ | 802 | /* Transmit callback function. */ |
| 803 | static void mcs_send_irq(struct urb *urb) | 803 | static void mcs_send_irq(struct urb *urb) |
| 804 | { | 804 | { |
| 805 | struct mcs_cb *mcs = urb->context; | 805 | struct mcs_cb *mcs = urb->context; |
| @@ -811,7 +811,7 @@ static void mcs_send_irq(struct urb *urb) | |||
| 811 | netif_wake_queue(ndev); | 811 | netif_wake_queue(ndev); |
| 812 | } | 812 | } |
| 813 | 813 | ||
| 814 | /* Transmit callback funtion. */ | 814 | /* Transmit callback function. */ |
| 815 | static netdev_tx_t mcs_hard_xmit(struct sk_buff *skb, | 815 | static netdev_tx_t mcs_hard_xmit(struct sk_buff *skb, |
| 816 | struct net_device *ndev) | 816 | struct net_device *ndev) |
| 817 | { | 817 | { |
diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c index 559fe854d76d..7a963d4e6d06 100644 --- a/drivers/net/irda/nsc-ircc.c +++ b/drivers/net/irda/nsc-ircc.c | |||
| @@ -716,7 +716,7 @@ static int nsc_ircc_probe_338(nsc_chip_t *chip, chipio_t *info) | |||
| 716 | int reg, com = 0; | 716 | int reg, com = 0; |
| 717 | int pnp; | 717 | int pnp; |
| 718 | 718 | ||
| 719 | /* Read funtion enable register (FER) */ | 719 | /* Read function enable register (FER) */ |
| 720 | outb(CFG_338_FER, cfg_base); | 720 | outb(CFG_338_FER, cfg_base); |
| 721 | reg = inb(cfg_base+1); | 721 | reg = inb(cfg_base+1); |
| 722 | 722 | ||
diff --git a/drivers/net/irda/nsc-ircc.h b/drivers/net/irda/nsc-ircc.h index 7ba7738759b9..32fa58211fad 100644 --- a/drivers/net/irda/nsc-ircc.h +++ b/drivers/net/irda/nsc-ircc.h | |||
| @@ -135,7 +135,7 @@ | |||
| 135 | #define LSR_TXRDY 0x20 /* Transmitter ready */ | 135 | #define LSR_TXRDY 0x20 /* Transmitter ready */ |
| 136 | #define LSR_TXEMP 0x40 /* Transmitter empty */ | 136 | #define LSR_TXEMP 0x40 /* Transmitter empty */ |
| 137 | 137 | ||
| 138 | #define ASCR 0x07 /* Auxillary Status and Control Register */ | 138 | #define ASCR 0x07 /* Auxiliary Status and Control Register */ |
| 139 | #define ASCR_RXF_TOUT 0x01 /* Rx FIFO timeout */ | 139 | #define ASCR_RXF_TOUT 0x01 /* Rx FIFO timeout */ |
| 140 | #define ASCR_FEND_INF 0x02 /* Frame end bytes in rx FIFO */ | 140 | #define ASCR_FEND_INF 0x02 /* Frame end bytes in rx FIFO */ |
| 141 | #define ASCR_S_EOT 0x04 /* Set end of transmission */ | 141 | #define ASCR_S_EOT 0x04 /* Set end of transmission */ |
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c index c192c31e4c5c..001ed0a255f6 100644 --- a/drivers/net/irda/pxaficp_ir.c +++ b/drivers/net/irda/pxaficp_ir.c | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | 40 | ||
| 41 | #define ICCR0_AME (1 << 7) /* Address match enable */ | 41 | #define ICCR0_AME (1 << 7) /* Address match enable */ |
| 42 | #define ICCR0_TIE (1 << 6) /* Transmit FIFO interrupt enable */ | 42 | #define ICCR0_TIE (1 << 6) /* Transmit FIFO interrupt enable */ |
| 43 | #define ICCR0_RIE (1 << 5) /* Recieve FIFO interrupt enable */ | 43 | #define ICCR0_RIE (1 << 5) /* Receive FIFO interrupt enable */ |
| 44 | #define ICCR0_RXE (1 << 4) /* Receive enable */ | 44 | #define ICCR0_RXE (1 << 4) /* Receive enable */ |
| 45 | #define ICCR0_TXE (1 << 3) /* Transmit enable */ | 45 | #define ICCR0_TXE (1 << 3) /* Transmit enable */ |
| 46 | #define ICCR0_TUS (1 << 2) /* Transmit FIFO underrun select */ | 46 | #define ICCR0_TUS (1 << 2) /* Transmit FIFO underrun select */ |
| @@ -483,7 +483,7 @@ static irqreturn_t pxa_irda_fir_irq(int irq, void *dev_id) | |||
| 483 | } | 483 | } |
| 484 | 484 | ||
| 485 | if (icsr0 & ICSR0_EIF) { | 485 | if (icsr0 & ICSR0_EIF) { |
| 486 | /* An error in FIFO occured, or there is a end of frame */ | 486 | /* An error in FIFO occurred, or there is a end of frame */ |
| 487 | pxa_irda_fir_irq_eif(si, dev, icsr0); | 487 | pxa_irda_fir_irq_eif(si, dev, icsr0); |
| 488 | } | 488 | } |
| 489 | 489 | ||
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c index 1c1677cfea29..8800e1fe4129 100644 --- a/drivers/net/irda/smsc-ircc2.c +++ b/drivers/net/irda/smsc-ircc2.c | |||
| @@ -1582,7 +1582,7 @@ static irqreturn_t smsc_ircc_interrupt_sir(struct net_device *dev) | |||
| 1582 | int iobase; | 1582 | int iobase; |
| 1583 | int iir, lsr; | 1583 | int iir, lsr; |
| 1584 | 1584 | ||
| 1585 | /* Already locked comming here in smsc_ircc_interrupt() */ | 1585 | /* Already locked coming here in smsc_ircc_interrupt() */ |
| 1586 | /*spin_lock(&self->lock);*/ | 1586 | /*spin_lock(&self->lock);*/ |
| 1587 | 1587 | ||
| 1588 | iobase = self->io.sir_base; | 1588 | iobase = self->io.sir_base; |
diff --git a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c index 67c0ad42d818..f504b262ba36 100644 --- a/drivers/net/irda/via-ircc.c +++ b/drivers/net/irda/via-ircc.c | |||
| @@ -29,7 +29,7 @@ F02 Oct/28/02: Add SB device ID for 3147 and 3177. | |||
| 29 | 29 | ||
| 30 | 2004-02-16: <sda@bdit.de> | 30 | 2004-02-16: <sda@bdit.de> |
| 31 | - Removed unneeded 'legacy' pci stuff. | 31 | - Removed unneeded 'legacy' pci stuff. |
| 32 | - Make sure SIR mode is set (hw_init()) before calling mode-dependant stuff. | 32 | - Make sure SIR mode is set (hw_init()) before calling mode-dependent stuff. |
| 33 | - On speed change from core, don't send SIR frame with new speed. | 33 | - On speed change from core, don't send SIR frame with new speed. |
| 34 | Use current speed and change speeds later. | 34 | Use current speed and change speeds later. |
| 35 | - Make module-param dongle_id actually work. | 35 | - Make module-param dongle_id actually work. |
| @@ -75,15 +75,9 @@ static int dongle_id = 0; /* default: probe */ | |||
| 75 | /* We can't guess the type of connected dongle, user *must* supply it. */ | 75 | /* We can't guess the type of connected dongle, user *must* supply it. */ |
| 76 | module_param(dongle_id, int, 0); | 76 | module_param(dongle_id, int, 0); |
| 77 | 77 | ||
| 78 | /* FIXME : we should not need this, because instances should be automatically | ||
| 79 | * managed by the PCI layer. Especially that we seem to only be using the | ||
| 80 | * first entry. Jean II */ | ||
| 81 | /* Max 4 instances for now */ | ||
| 82 | static struct via_ircc_cb *dev_self[] = { NULL, NULL, NULL, NULL }; | ||
| 83 | |||
| 84 | /* Some prototypes */ | 78 | /* Some prototypes */ |
| 85 | static int via_ircc_open(int i, chipio_t * info, unsigned int id); | 79 | static int via_ircc_open(struct pci_dev *pdev, chipio_t * info, |
| 86 | static int via_ircc_close(struct via_ircc_cb *self); | 80 | unsigned int id); |
| 87 | static int via_ircc_dma_receive(struct via_ircc_cb *self); | 81 | static int via_ircc_dma_receive(struct via_ircc_cb *self); |
| 88 | static int via_ircc_dma_receive_complete(struct via_ircc_cb *self, | 82 | static int via_ircc_dma_receive_complete(struct via_ircc_cb *self, |
| 89 | int iobase); | 83 | int iobase); |
| @@ -215,7 +209,7 @@ static int __devinit via_init_one (struct pci_dev *pcidev, const struct pci_devi | |||
| 215 | pci_write_config_byte(pcidev,0x42,(bTmp | 0xf0)); | 209 | pci_write_config_byte(pcidev,0x42,(bTmp | 0xf0)); |
| 216 | pci_write_config_byte(pcidev,0x5a,0xc0); | 210 | pci_write_config_byte(pcidev,0x5a,0xc0); |
| 217 | WriteLPCReg(0x28, 0x70 ); | 211 | WriteLPCReg(0x28, 0x70 ); |
| 218 | if (via_ircc_open(0, &info,0x3076) == 0) | 212 | if (via_ircc_open(pcidev, &info, 0x3076) == 0) |
| 219 | rc=0; | 213 | rc=0; |
| 220 | } else | 214 | } else |
| 221 | rc = -ENODEV; //IR not turn on | 215 | rc = -ENODEV; //IR not turn on |
| @@ -254,7 +248,7 @@ static int __devinit via_init_one (struct pci_dev *pcidev, const struct pci_devi | |||
| 254 | info.irq=FirIRQ; | 248 | info.irq=FirIRQ; |
| 255 | info.dma=FirDRQ1; | 249 | info.dma=FirDRQ1; |
| 256 | info.dma2=FirDRQ0; | 250 | info.dma2=FirDRQ0; |
| 257 | if (via_ircc_open(0, &info,0x3096) == 0) | 251 | if (via_ircc_open(pcidev, &info, 0x3096) == 0) |
| 258 | rc=0; | 252 | rc=0; |
| 259 | } else | 253 | } else |
| 260 | rc = -ENODEV; //IR not turn on !!!!! | 254 | rc = -ENODEV; //IR not turn on !!!!! |
| @@ -264,48 +258,10 @@ static int __devinit via_init_one (struct pci_dev *pcidev, const struct pci_devi | |||
| 264 | return rc; | 258 | return rc; |
| 265 | } | 259 | } |
| 266 | 260 | ||
| 267 | /* | ||
| 268 | * Function via_ircc_clean () | ||
| 269 | * | ||
| 270 | * Close all configured chips | ||
| 271 | * | ||
| 272 | */ | ||
| 273 | static void via_ircc_clean(void) | ||
| 274 | { | ||
| 275 | int i; | ||
| 276 | |||
| 277 | IRDA_DEBUG(3, "%s()\n", __func__); | ||
| 278 | |||
| 279 | for (i=0; i < ARRAY_SIZE(dev_self); i++) { | ||
| 280 | if (dev_self[i]) | ||
| 281 | via_ircc_close(dev_self[i]); | ||
| 282 | } | ||
| 283 | } | ||
| 284 | |||
| 285 | static void __devexit via_remove_one (struct pci_dev *pdev) | ||
| 286 | { | ||
| 287 | IRDA_DEBUG(3, "%s()\n", __func__); | ||
| 288 | |||
| 289 | /* FIXME : This is ugly. We should use pci_get_drvdata(pdev); | ||
| 290 | * to get our driver instance and call directly via_ircc_close(). | ||
| 291 | * See vlsi_ir for details... | ||
| 292 | * Jean II */ | ||
| 293 | via_ircc_clean(); | ||
| 294 | |||
| 295 | /* FIXME : This should be in via_ircc_close(), because here we may | ||
| 296 | * theoritically disable still configured devices :-( - Jean II */ | ||
| 297 | pci_disable_device(pdev); | ||
| 298 | } | ||
| 299 | |||
| 300 | static void __exit via_ircc_cleanup(void) | 261 | static void __exit via_ircc_cleanup(void) |
| 301 | { | 262 | { |
| 302 | IRDA_DEBUG(3, "%s()\n", __func__); | 263 | IRDA_DEBUG(3, "%s()\n", __func__); |
| 303 | 264 | ||
| 304 | /* FIXME : This should be redundant, as pci_unregister_driver() | ||
| 305 | * should call via_remove_one() on each device. | ||
| 306 | * Jean II */ | ||
| 307 | via_ircc_clean(); | ||
| 308 | |||
| 309 | /* Cleanup all instances of the driver */ | 265 | /* Cleanup all instances of the driver */ |
| 310 | pci_unregister_driver (&via_driver); | 266 | pci_unregister_driver (&via_driver); |
| 311 | } | 267 | } |
| @@ -324,12 +280,13 @@ static const struct net_device_ops via_ircc_fir_ops = { | |||
| 324 | }; | 280 | }; |
| 325 | 281 | ||
| 326 | /* | 282 | /* |
| 327 | * Function via_ircc_open (iobase, irq) | 283 | * Function via_ircc_open(pdev, iobase, irq) |
| 328 | * | 284 | * |
| 329 | * Open driver instance | 285 | * Open driver instance |
| 330 | * | 286 | * |
| 331 | */ | 287 | */ |
| 332 | static __devinit int via_ircc_open(int i, chipio_t * info, unsigned int id) | 288 | static __devinit int via_ircc_open(struct pci_dev *pdev, chipio_t * info, |
| 289 | unsigned int id) | ||
| 333 | { | 290 | { |
| 334 | struct net_device *dev; | 291 | struct net_device *dev; |
| 335 | struct via_ircc_cb *self; | 292 | struct via_ircc_cb *self; |
| @@ -337,9 +294,6 @@ static __devinit int via_ircc_open(int i, chipio_t * info, unsigned int id) | |||
| 337 | 294 | ||
| 338 | IRDA_DEBUG(3, "%s()\n", __func__); | 295 | IRDA_DEBUG(3, "%s()\n", __func__); |
| 339 | 296 | ||
| 340 | if (i >= ARRAY_SIZE(dev_self)) | ||
| 341 | return -ENOMEM; | ||
| 342 | |||
| 343 | /* Allocate new instance of the driver */ | 297 | /* Allocate new instance of the driver */ |
| 344 | dev = alloc_irdadev(sizeof(struct via_ircc_cb)); | 298 | dev = alloc_irdadev(sizeof(struct via_ircc_cb)); |
| 345 | if (dev == NULL) | 299 | if (dev == NULL) |
| @@ -349,13 +303,8 @@ static __devinit int via_ircc_open(int i, chipio_t * info, unsigned int id) | |||
| 349 | self->netdev = dev; | 303 | self->netdev = dev; |
| 350 | spin_lock_init(&self->lock); | 304 | spin_lock_init(&self->lock); |
| 351 | 305 | ||
| 352 | /* FIXME : We should store our driver instance in the PCI layer, | 306 | pci_set_drvdata(pdev, self); |
| 353 | * using pci_set_drvdata(), not in this array. | 307 | |
| 354 | * See vlsi_ir for details... - Jean II */ | ||
| 355 | /* FIXME : 'i' is always 0 (see via_init_one()) :-( - Jean II */ | ||
| 356 | /* Need to store self somewhere */ | ||
| 357 | dev_self[i] = self; | ||
| 358 | self->index = i; | ||
| 359 | /* Initialize Resource */ | 308 | /* Initialize Resource */ |
| 360 | self->io.cfg_base = info->cfg_base; | 309 | self->io.cfg_base = info->cfg_base; |
| 361 | self->io.fir_base = info->fir_base; | 310 | self->io.fir_base = info->fir_base; |
| @@ -385,7 +334,7 @@ static __devinit int via_ircc_open(int i, chipio_t * info, unsigned int id) | |||
| 385 | self->io.dongle_id = dongle_id; | 334 | self->io.dongle_id = dongle_id; |
| 386 | 335 | ||
| 387 | /* The only value we must override it the baudrate */ | 336 | /* The only value we must override it the baudrate */ |
| 388 | /* Maximum speeds and capabilities are dongle-dependant. */ | 337 | /* Maximum speeds and capabilities are dongle-dependent. */ |
| 389 | switch( self->io.dongle_id ){ | 338 | switch( self->io.dongle_id ){ |
| 390 | case 0x0d: | 339 | case 0x0d: |
| 391 | self->qos.baud_rate.bits = | 340 | self->qos.baud_rate.bits = |
| @@ -414,7 +363,7 @@ static __devinit int via_ircc_open(int i, chipio_t * info, unsigned int id) | |||
| 414 | 363 | ||
| 415 | /* Allocate memory if needed */ | 364 | /* Allocate memory if needed */ |
| 416 | self->rx_buff.head = | 365 | self->rx_buff.head = |
| 417 | dma_alloc_coherent(NULL, self->rx_buff.truesize, | 366 | dma_alloc_coherent(&pdev->dev, self->rx_buff.truesize, |
| 418 | &self->rx_buff_dma, GFP_KERNEL); | 367 | &self->rx_buff_dma, GFP_KERNEL); |
| 419 | if (self->rx_buff.head == NULL) { | 368 | if (self->rx_buff.head == NULL) { |
| 420 | err = -ENOMEM; | 369 | err = -ENOMEM; |
| @@ -423,7 +372,7 @@ static __devinit int via_ircc_open(int i, chipio_t * info, unsigned int id) | |||
| 423 | memset(self->rx_buff.head, 0, self->rx_buff.truesize); | 372 | memset(self->rx_buff.head, 0, self->rx_buff.truesize); |
| 424 | 373 | ||
| 425 | self->tx_buff.head = | 374 | self->tx_buff.head = |
| 426 | dma_alloc_coherent(NULL, self->tx_buff.truesize, | 375 | dma_alloc_coherent(&pdev->dev, self->tx_buff.truesize, |
| 427 | &self->tx_buff_dma, GFP_KERNEL); | 376 | &self->tx_buff_dma, GFP_KERNEL); |
| 428 | if (self->tx_buff.head == NULL) { | 377 | if (self->tx_buff.head == NULL) { |
| 429 | err = -ENOMEM; | 378 | err = -ENOMEM; |
| @@ -455,33 +404,32 @@ static __devinit int via_ircc_open(int i, chipio_t * info, unsigned int id) | |||
| 455 | via_hw_init(self); | 404 | via_hw_init(self); |
| 456 | return 0; | 405 | return 0; |
| 457 | err_out4: | 406 | err_out4: |
| 458 | dma_free_coherent(NULL, self->tx_buff.truesize, | 407 | dma_free_coherent(&pdev->dev, self->tx_buff.truesize, |
| 459 | self->tx_buff.head, self->tx_buff_dma); | 408 | self->tx_buff.head, self->tx_buff_dma); |
| 460 | err_out3: | 409 | err_out3: |
| 461 | dma_free_coherent(NULL, self->rx_buff.truesize, | 410 | dma_free_coherent(&pdev->dev, self->rx_buff.truesize, |
| 462 | self->rx_buff.head, self->rx_buff_dma); | 411 | self->rx_buff.head, self->rx_buff_dma); |
| 463 | err_out2: | 412 | err_out2: |
| 464 | release_region(self->io.fir_base, self->io.fir_ext); | 413 | release_region(self->io.fir_base, self->io.fir_ext); |
| 465 | err_out1: | 414 | err_out1: |
| 415 | pci_set_drvdata(pdev, NULL); | ||
| 466 | free_netdev(dev); | 416 | free_netdev(dev); |
| 467 | dev_self[i] = NULL; | ||
| 468 | return err; | 417 | return err; |
| 469 | } | 418 | } |
| 470 | 419 | ||
| 471 | /* | 420 | /* |
| 472 | * Function via_ircc_close (self) | 421 | * Function via_remove_one(pdev) |
| 473 | * | 422 | * |
| 474 | * Close driver instance | 423 | * Close driver instance |
| 475 | * | 424 | * |
| 476 | */ | 425 | */ |
| 477 | static int via_ircc_close(struct via_ircc_cb *self) | 426 | static void __devexit via_remove_one(struct pci_dev *pdev) |
| 478 | { | 427 | { |
| 428 | struct via_ircc_cb *self = pci_get_drvdata(pdev); | ||
| 479 | int iobase; | 429 | int iobase; |
| 480 | 430 | ||
| 481 | IRDA_DEBUG(3, "%s()\n", __func__); | 431 | IRDA_DEBUG(3, "%s()\n", __func__); |
| 482 | 432 | ||
| 483 | IRDA_ASSERT(self != NULL, return -1;); | ||
| 484 | |||
| 485 | iobase = self->io.fir_base; | 433 | iobase = self->io.fir_base; |
| 486 | 434 | ||
| 487 | ResetChip(iobase, 5); //hardware reset. | 435 | ResetChip(iobase, 5); //hardware reset. |
| @@ -493,16 +441,16 @@ static int via_ircc_close(struct via_ircc_cb *self) | |||
| 493 | __func__, self->io.fir_base); | 441 | __func__, self->io.fir_base); |
| 494 | release_region(self->io.fir_base, self->io.fir_ext); | 442 | release_region(self->io.fir_base, self->io.fir_ext); |
| 495 | if (self->tx_buff.head) | 443 | if (self->tx_buff.head) |
| 496 | dma_free_coherent(NULL, self->tx_buff.truesize, | 444 | dma_free_coherent(&pdev->dev, self->tx_buff.truesize, |
| 497 | self->tx_buff.head, self->tx_buff_dma); | 445 | self->tx_buff.head, self->tx_buff_dma); |
| 498 | if (self->rx_buff.head) | 446 | if (self->rx_buff.head) |
| 499 | dma_free_coherent(NULL, self->rx_buff.truesize, | 447 | dma_free_coherent(&pdev->dev, self->rx_buff.truesize, |
| 500 | self->rx_buff.head, self->rx_buff_dma); | 448 | self->rx_buff.head, self->rx_buff_dma); |
| 501 | dev_self[self->index] = NULL; | 449 | pci_set_drvdata(pdev, NULL); |
| 502 | 450 | ||
| 503 | free_netdev(self->netdev); | 451 | free_netdev(self->netdev); |
| 504 | 452 | ||
| 505 | return 0; | 453 | pci_disable_device(pdev); |
| 506 | } | 454 | } |
| 507 | 455 | ||
| 508 | /* | 456 | /* |
diff --git a/drivers/net/irda/vlsi_ir.h b/drivers/net/irda/vlsi_ir.h index d66fab854bf1..a076eb125349 100644 --- a/drivers/net/irda/vlsi_ir.h +++ b/drivers/net/irda/vlsi_ir.h | |||
| @@ -209,7 +209,7 @@ enum vlsi_pio_irintr { | |||
| 209 | IRINTR_ACTEN = 0x80, /* activity interrupt enable */ | 209 | IRINTR_ACTEN = 0x80, /* activity interrupt enable */ |
| 210 | IRINTR_ACTIVITY = 0x40, /* activity monitor (traffic detected) */ | 210 | IRINTR_ACTIVITY = 0x40, /* activity monitor (traffic detected) */ |
| 211 | IRINTR_RPKTEN = 0x20, /* receive packet interrupt enable*/ | 211 | IRINTR_RPKTEN = 0x20, /* receive packet interrupt enable*/ |
| 212 | IRINTR_RPKTINT = 0x10, /* rx-packet transfered from fifo to memory finished */ | 212 | IRINTR_RPKTINT = 0x10, /* rx-packet transferred from fifo to memory finished */ |
| 213 | IRINTR_TPKTEN = 0x08, /* transmit packet interrupt enable */ | 213 | IRINTR_TPKTEN = 0x08, /* transmit packet interrupt enable */ |
| 214 | IRINTR_TPKTINT = 0x04, /* last bit of tx-packet+crc shifted to ir-pulser */ | 214 | IRINTR_TPKTINT = 0x04, /* last bit of tx-packet+crc shifted to ir-pulser */ |
| 215 | IRINTR_OE_EN = 0x02, /* UART rx fifo overrun error interrupt enable */ | 215 | IRINTR_OE_EN = 0x02, /* UART rx fifo overrun error interrupt enable */ |
| @@ -739,7 +739,7 @@ typedef struct vlsi_irda_dev { | |||
| 739 | /* the remapped error flags we use for returning from frame | 739 | /* the remapped error flags we use for returning from frame |
| 740 | * post-processing in vlsi_process_tx/rx() after it was completed | 740 | * post-processing in vlsi_process_tx/rx() after it was completed |
| 741 | * by the hardware. These functions either return the >=0 number | 741 | * by the hardware. These functions either return the >=0 number |
| 742 | * of transfered bytes in case of success or the negative (-) | 742 | * of transferred bytes in case of success or the negative (-) |
| 743 | * of the or'ed error flags. | 743 | * of the or'ed error flags. |
| 744 | */ | 744 | */ |
| 745 | 745 | ||
diff --git a/drivers/net/ixgbe/ixgbe_dcb.c b/drivers/net/ixgbe/ixgbe_dcb.c index 41c529fac0ab..686a17aadef3 100644 --- a/drivers/net/ixgbe/ixgbe_dcb.c +++ b/drivers/net/ixgbe/ixgbe_dcb.c | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | /** | 36 | /** |
| 37 | * ixgbe_ieee_credits - This calculates the ieee traffic class | 37 | * ixgbe_ieee_credits - This calculates the ieee traffic class |
| 38 | * credits from the configured bandwidth percentages. Credits | 38 | * credits from the configured bandwidth percentages. Credits |
| 39 | * are the smallest unit programable into the underlying | 39 | * are the smallest unit programmable into the underlying |
| 40 | * hardware. The IEEE 802.1Qaz specification do not use bandwidth | 40 | * hardware. The IEEE 802.1Qaz specification do not use bandwidth |
| 41 | * groups so this is much simplified from the CEE case. | 41 | * groups so this is much simplified from the CEE case. |
| 42 | */ | 42 | */ |
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c index fec4c724c37a..327c8614198c 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c | |||
| @@ -360,7 +360,7 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev) | |||
| 360 | return DCB_NO_HW_CHG; | 360 | return DCB_NO_HW_CHG; |
| 361 | 361 | ||
| 362 | /* | 362 | /* |
| 363 | * Only take down the adapter if an app change occured. FCoE | 363 | * Only take down the adapter if an app change occurred. FCoE |
| 364 | * may shuffle tx rings in this case and this can not be done | 364 | * may shuffle tx rings in this case and this can not be done |
| 365 | * without a reset currently. | 365 | * without a reset currently. |
| 366 | */ | 366 | */ |
| @@ -599,7 +599,7 @@ static u8 ixgbe_dcbnl_setapp(struct net_device *netdev, | |||
| 599 | break; | 599 | break; |
| 600 | 600 | ||
| 601 | /* The FCoE application priority may be changed multiple | 601 | /* The FCoE application priority may be changed multiple |
| 602 | * times in quick sucession with switches that build up | 602 | * times in quick succession with switches that build up |
| 603 | * TLVs. To avoid creating uneeded device resets this | 603 | * TLVs. To avoid creating uneeded device resets this |
| 604 | * checks the actual HW configuration and clears | 604 | * checks the actual HW configuration and clears |
| 605 | * BIT_APP_UPCHG if a HW configuration change is not | 605 | * BIT_APP_UPCHG if a HW configuration change is not |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index f17e4a7ee731..6f8adc7f5d7c 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
| @@ -644,7 +644,7 @@ void ixgbe_unmap_and_free_tx_resource(struct ixgbe_ring *tx_ring, | |||
| 644 | * @adapter: driver private struct | 644 | * @adapter: driver private struct |
| 645 | * @index: reg idx of queue to query (0-127) | 645 | * @index: reg idx of queue to query (0-127) |
| 646 | * | 646 | * |
| 647 | * Helper function to determine the traffic index for a paticular | 647 | * Helper function to determine the traffic index for a particular |
| 648 | * register index. | 648 | * register index. |
| 649 | * | 649 | * |
| 650 | * Returns : a tc index for use in range 0-7, or 0-3 | 650 | * Returns : a tc index for use in range 0-7, or 0-3 |
| @@ -3556,7 +3556,7 @@ void ixgbe_set_rx_mode(struct net_device *netdev) | |||
| 3556 | } else { | 3556 | } else { |
| 3557 | /* | 3557 | /* |
| 3558 | * Write addresses to the MTA, if the attempt fails | 3558 | * Write addresses to the MTA, if the attempt fails |
| 3559 | * then we should just turn on promiscous mode so | 3559 | * then we should just turn on promiscuous mode so |
| 3560 | * that we can at least receive multicast traffic | 3560 | * that we can at least receive multicast traffic |
| 3561 | */ | 3561 | */ |
| 3562 | hw->mac.ops.update_mc_addr_list(hw, netdev); | 3562 | hw->mac.ops.update_mc_addr_list(hw, netdev); |
| @@ -3567,7 +3567,7 @@ void ixgbe_set_rx_mode(struct net_device *netdev) | |||
| 3567 | /* | 3567 | /* |
| 3568 | * Write addresses to available RAR registers, if there is not | 3568 | * Write addresses to available RAR registers, if there is not |
| 3569 | * sufficient space to store all the addresses then enable | 3569 | * sufficient space to store all the addresses then enable |
| 3570 | * unicast promiscous mode | 3570 | * unicast promiscuous mode |
| 3571 | */ | 3571 | */ |
| 3572 | count = ixgbe_write_uc_addr_list(netdev); | 3572 | count = ixgbe_write_uc_addr_list(netdev); |
| 3573 | if (count < 0) { | 3573 | if (count < 0) { |
| @@ -4443,7 +4443,7 @@ static inline bool ixgbe_set_sriov_queues(struct ixgbe_adapter *adapter) | |||
| 4443 | } | 4443 | } |
| 4444 | 4444 | ||
| 4445 | /* | 4445 | /* |
| 4446 | * ixgbe_set_num_queues: Allocate queues for device, feature dependant | 4446 | * ixgbe_set_num_queues: Allocate queues for device, feature dependent |
| 4447 | * @adapter: board private structure to initialize | 4447 | * @adapter: board private structure to initialize |
| 4448 | * | 4448 | * |
| 4449 | * This is the top level queue allocation routine. The order here is very | 4449 | * This is the top level queue allocation routine. The order here is very |
diff --git a/drivers/net/ixgbe/ixgbe_phy.c b/drivers/net/ixgbe/ixgbe_phy.c index f72f705f6183..df5b8aa4795d 100644 --- a/drivers/net/ixgbe/ixgbe_phy.c +++ b/drivers/net/ixgbe/ixgbe_phy.c | |||
| @@ -1694,7 +1694,7 @@ static void ixgbe_i2c_bus_clear(struct ixgbe_hw *hw) | |||
| 1694 | } | 1694 | } |
| 1695 | 1695 | ||
| 1696 | /** | 1696 | /** |
| 1697 | * ixgbe_tn_check_overtemp - Checks if an overtemp occured. | 1697 | * ixgbe_tn_check_overtemp - Checks if an overtemp occurred. |
| 1698 | * @hw: pointer to hardware structure | 1698 | * @hw: pointer to hardware structure |
| 1699 | * | 1699 | * |
| 1700 | * Checks if the LASI temp alarm status was triggered due to overtemp | 1700 | * Checks if the LASI temp alarm status was triggered due to overtemp |
diff --git a/drivers/net/ixgbe/ixgbe_x540.c b/drivers/net/ixgbe/ixgbe_x540.c index f47e93fe32be..d9323c08f5c7 100644 --- a/drivers/net/ixgbe/ixgbe_x540.c +++ b/drivers/net/ixgbe/ixgbe_x540.c | |||
| @@ -573,7 +573,7 @@ static s32 ixgbe_acquire_swfw_sync_X540(struct ixgbe_hw *hw, u16 mask) | |||
| 573 | * @hw: pointer to hardware structure | 573 | * @hw: pointer to hardware structure |
| 574 | * @mask: Mask to specify which semaphore to release | 574 | * @mask: Mask to specify which semaphore to release |
| 575 | * | 575 | * |
| 576 | * Releases the SWFW semaphore throught the SW_FW_SYNC register | 576 | * Releases the SWFW semaphore through the SW_FW_SYNC register |
| 577 | * for the specified function (CSR, PHY0, PHY1, EVM, Flash) | 577 | * for the specified function (CSR, PHY0, PHY1, EVM, Flash) |
| 578 | **/ | 578 | **/ |
| 579 | static void ixgbe_release_swfw_sync_X540(struct ixgbe_hw *hw, u16 mask) | 579 | static void ixgbe_release_swfw_sync_X540(struct ixgbe_hw *hw, u16 mask) |
diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c index 054ab05b7c6a..05fa7c85deed 100644 --- a/drivers/net/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ixgbevf/ixgbevf_main.c | |||
| @@ -1925,7 +1925,7 @@ static void ixgbevf_acquire_msix_vectors(struct ixgbevf_adapter *adapter, | |||
| 1925 | } | 1925 | } |
| 1926 | 1926 | ||
| 1927 | /* | 1927 | /* |
| 1928 | * ixgbevf_set_num_queues: Allocate queues for device, feature dependant | 1928 | * ixgbevf_set_num_queues: Allocate queues for device, feature dependent |
| 1929 | * @adapter: board private structure to initialize | 1929 | * @adapter: board private structure to initialize |
| 1930 | * | 1930 | * |
| 1931 | * This is the top level queue allocation routine. The order here is very | 1931 | * This is the top level queue allocation routine. The order here is very |
diff --git a/drivers/net/ks8842.c b/drivers/net/ks8842.c index efd44afeae83..f0d8346d0fa5 100644 --- a/drivers/net/ks8842.c +++ b/drivers/net/ks8842.c | |||
| @@ -321,7 +321,7 @@ static void ks8842_reset_hw(struct ks8842_adapter *adapter) | |||
| 321 | /* RX 2 kb high watermark */ | 321 | /* RX 2 kb high watermark */ |
| 322 | ks8842_write16(adapter, 0, 0x1000, REG_QRFCR); | 322 | ks8842_write16(adapter, 0, 0x1000, REG_QRFCR); |
| 323 | 323 | ||
| 324 | /* aggresive back off in half duplex */ | 324 | /* aggressive back off in half duplex */ |
| 325 | ks8842_enable_bits(adapter, 32, 1 << 8, REG_SGCR1); | 325 | ks8842_enable_bits(adapter, 32, 1 << 8, REG_SGCR1); |
| 326 | 326 | ||
| 327 | /* enable no excessive collison drop */ | 327 | /* enable no excessive collison drop */ |
diff --git a/drivers/net/ks8851.c b/drivers/net/ks8851.c index 0fa4a9887ba2..bcd9ba68c9f2 100644 --- a/drivers/net/ks8851.c +++ b/drivers/net/ks8851.c | |||
| @@ -141,7 +141,7 @@ static int msg_enable; | |||
| 141 | * | 141 | * |
| 142 | * All these calls issue SPI transactions to access the chip's registers. They | 142 | * All these calls issue SPI transactions to access the chip's registers. They |
| 143 | * all require that the necessary lock is held to prevent accesses when the | 143 | * all require that the necessary lock is held to prevent accesses when the |
| 144 | * chip is busy transfering packet data (RX/TX FIFO accesses). | 144 | * chip is busy transferring packet data (RX/TX FIFO accesses). |
| 145 | */ | 145 | */ |
| 146 | 146 | ||
| 147 | /** | 147 | /** |
| @@ -483,7 +483,7 @@ static void ks8851_rx_pkts(struct ks8851_net *ks) | |||
| 483 | * | 483 | * |
| 484 | * This form of operation would require us to hold the SPI bus' | 484 | * This form of operation would require us to hold the SPI bus' |
| 485 | * chipselect low during the entie transaction to avoid any | 485 | * chipselect low during the entie transaction to avoid any |
| 486 | * reset to the data stream comming from the chip. | 486 | * reset to the data stream coming from the chip. |
| 487 | */ | 487 | */ |
| 488 | 488 | ||
| 489 | for (; rxfc != 0; rxfc--) { | 489 | for (; rxfc != 0; rxfc--) { |
| @@ -634,7 +634,7 @@ static void ks8851_irq_work(struct work_struct *work) | |||
| 634 | 634 | ||
| 635 | /** | 635 | /** |
| 636 | * calc_txlen - calculate size of message to send packet | 636 | * calc_txlen - calculate size of message to send packet |
| 637 | * @len: Lenght of data | 637 | * @len: Length of data |
| 638 | * | 638 | * |
| 639 | * Returns the size of the TXFIFO message needed to send | 639 | * Returns the size of the TXFIFO message needed to send |
| 640 | * this packet. | 640 | * this packet. |
| @@ -1472,7 +1472,7 @@ static int ks8851_phy_reg(int reg) | |||
| 1472 | * @reg: The register to read. | 1472 | * @reg: The register to read. |
| 1473 | * | 1473 | * |
| 1474 | * This call reads data from the PHY register specified in @reg. Since the | 1474 | * This call reads data from the PHY register specified in @reg. Since the |
| 1475 | * device does not support all the MII registers, the non-existant values | 1475 | * device does not support all the MII registers, the non-existent values |
| 1476 | * are always returned as zero. | 1476 | * are always returned as zero. |
| 1477 | * | 1477 | * |
| 1478 | * We return zero for unsupported registers as the MII code does not check | 1478 | * We return zero for unsupported registers as the MII code does not check |
diff --git a/drivers/net/ks8851_mll.c b/drivers/net/ks8851_mll.c index 2e2c69b24062..61631cace913 100644 --- a/drivers/net/ks8851_mll.c +++ b/drivers/net/ks8851_mll.c | |||
| @@ -470,7 +470,7 @@ static int msg_enable; | |||
| 470 | * | 470 | * |
| 471 | * All these calls issue transactions to access the chip's registers. They | 471 | * All these calls issue transactions to access the chip's registers. They |
| 472 | * all require that the necessary lock is held to prevent accesses when the | 472 | * all require that the necessary lock is held to prevent accesses when the |
| 473 | * chip is busy transfering packet data (RX/TX FIFO accesses). | 473 | * chip is busy transferring packet data (RX/TX FIFO accesses). |
| 474 | */ | 474 | */ |
| 475 | 475 | ||
| 476 | /** | 476 | /** |
| @@ -1364,7 +1364,7 @@ static int ks_phy_reg(int reg) | |||
| 1364 | * @reg: The register to read. | 1364 | * @reg: The register to read. |
| 1365 | * | 1365 | * |
| 1366 | * This call reads data from the PHY register specified in @reg. Since the | 1366 | * This call reads data from the PHY register specified in @reg. Since the |
| 1367 | * device does not support all the MII registers, the non-existant values | 1367 | * device does not support all the MII registers, the non-existent values |
| 1368 | * are always returned as zero. | 1368 | * are always returned as zero. |
| 1369 | * | 1369 | * |
| 1370 | * We return zero for unsupported registers as the MII code does not check | 1370 | * We return zero for unsupported registers as the MII code does not check |
diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c index da74db4a03d4..17b75e5f1b0a 100644 --- a/drivers/net/lib8390.c +++ b/drivers/net/lib8390.c | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | Alexey Kuznetsov : use the 8390's six bit hash multicast filter. | 35 | Alexey Kuznetsov : use the 8390's six bit hash multicast filter. |
| 36 | Paul Gortmaker : tweak ANK's above multicast changes a bit. | 36 | Paul Gortmaker : tweak ANK's above multicast changes a bit. |
| 37 | Paul Gortmaker : update packet statistics for v2.1.x | 37 | Paul Gortmaker : update packet statistics for v2.1.x |
| 38 | Alan Cox : support arbitary stupid port mappings on the | 38 | Alan Cox : support arbitrary stupid port mappings on the |
| 39 | 68K Macintosh. Support >16bit I/O spaces | 39 | 68K Macintosh. Support >16bit I/O spaces |
| 40 | Paul Gortmaker : add kmod support for auto-loading of the 8390 | 40 | Paul Gortmaker : add kmod support for auto-loading of the 8390 |
| 41 | module by all drivers that require it. | 41 | module by all drivers that require it. |
| @@ -121,7 +121,7 @@ static void __NS8390_init(struct net_device *dev, int startp); | |||
| 121 | /* | 121 | /* |
| 122 | * SMP and the 8390 setup. | 122 | * SMP and the 8390 setup. |
| 123 | * | 123 | * |
| 124 | * The 8390 isnt exactly designed to be multithreaded on RX/TX. There is | 124 | * The 8390 isn't exactly designed to be multithreaded on RX/TX. There is |
| 125 | * a page register that controls bank and packet buffer access. We guard | 125 | * a page register that controls bank and packet buffer access. We guard |
| 126 | * this with ei_local->page_lock. Nobody should assume or set the page other | 126 | * this with ei_local->page_lock. Nobody should assume or set the page other |
| 127 | * than zero when the lock is not held. Lock holders must restore page 0 | 127 | * than zero when the lock is not held. Lock holders must restore page 0 |
diff --git a/drivers/net/lp486e.c b/drivers/net/lp486e.c index 3698824744cb..385a95311cd2 100644 --- a/drivers/net/lp486e.c +++ b/drivers/net/lp486e.c | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | 27 | ||
| 28 | Credits: | 28 | Credits: |
| 29 | Thanks to Murphy Software BV for letting me write this in their time. | 29 | Thanks to Murphy Software BV for letting me write this in their time. |
| 30 | Well, actually, I get payed doing this... | 30 | Well, actually, I get paid doing this... |
| 31 | (Also: see http://www.murphy.nl for murphy, and my homepage ~ard for | 31 | (Also: see http://www.murphy.nl for murphy, and my homepage ~ard for |
| 32 | more information on the Professional Workstation) | 32 | more information on the Professional Workstation) |
| 33 | 33 | ||
diff --git a/drivers/net/meth.h b/drivers/net/meth.h index a78dc1ca8c29..5b145c6bad60 100644 --- a/drivers/net/meth.h +++ b/drivers/net/meth.h | |||
| @@ -144,7 +144,7 @@ typedef struct rx_packet { | |||
| 144 | /* Bits 22 through 28 are used to determine IPGR2 */ | 144 | /* Bits 22 through 28 are used to determine IPGR2 */ |
| 145 | 145 | ||
| 146 | #define METH_REV_SHIFT 29 /* Bits 29 through 31 are used to determine the revision */ | 146 | #define METH_REV_SHIFT 29 /* Bits 29 through 31 are used to determine the revision */ |
| 147 | /* 000: Inital revision */ | 147 | /* 000: Initial revision */ |
| 148 | /* 001: First revision, Improved TX concatenation */ | 148 | /* 001: First revision, Improved TX concatenation */ |
| 149 | 149 | ||
| 150 | 150 | ||
| @@ -193,7 +193,7 @@ typedef struct rx_packet { | |||
| 193 | /* 1: A TX message had the INT request bit set, the packet has been sent. */ | 193 | /* 1: A TX message had the INT request bit set, the packet has been sent. */ |
| 194 | #define METH_INT_TX_LINK_FAIL BIT(2) /* 0: No interrupt pending, 1: PHY has reported a link failure */ | 194 | #define METH_INT_TX_LINK_FAIL BIT(2) /* 0: No interrupt pending, 1: PHY has reported a link failure */ |
| 195 | #define METH_INT_MEM_ERROR BIT(3) /* 0: No interrupt pending */ | 195 | #define METH_INT_MEM_ERROR BIT(3) /* 0: No interrupt pending */ |
| 196 | /* 1: A memory error occurred durring DMA, DMA stopped, Fatal */ | 196 | /* 1: A memory error occurred during DMA, DMA stopped, Fatal */ |
| 197 | #define METH_INT_TX_ABORT BIT(4) /* 0: No interrupt pending, 1: The TX aborted operation, DMA stopped, FATAL */ | 197 | #define METH_INT_TX_ABORT BIT(4) /* 0: No interrupt pending, 1: The TX aborted operation, DMA stopped, FATAL */ |
| 198 | #define METH_INT_RX_THRESHOLD BIT(5) /* 0: No interrupt pending, 1: Selected receive threshold condition Valid */ | 198 | #define METH_INT_RX_THRESHOLD BIT(5) /* 0: No interrupt pending, 1: Selected receive threshold condition Valid */ |
| 199 | #define METH_INT_RX_UNDERFLOW BIT(6) /* 0: No interrupt pending, 1: FIFO was empty, packet could not be queued */ | 199 | #define METH_INT_RX_UNDERFLOW BIT(6) /* 0: No interrupt pending, 1: FIFO was empty, packet could not be queued */ |
diff --git a/drivers/net/mlx4/en_main.c b/drivers/net/mlx4/en_main.c index 9317b61a75b8..9276b1b25586 100644 --- a/drivers/net/mlx4/en_main.c +++ b/drivers/net/mlx4/en_main.c | |||
| @@ -236,7 +236,7 @@ static void *mlx4_en_add(struct mlx4_dev *dev) | |||
| 236 | goto err_mr; | 236 | goto err_mr; |
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | /* Configure wich ports to start according to module parameters */ | 239 | /* Configure which ports to start according to module parameters */ |
| 240 | mdev->port_cnt = 0; | 240 | mdev->port_cnt = 0; |
| 241 | mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_ETH) | 241 | mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_ETH) |
| 242 | mdev->port_cnt++; | 242 | mdev->port_cnt++; |
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c index 4f158baa0246..77063f91c564 100644 --- a/drivers/net/mlx4/en_netdev.c +++ b/drivers/net/mlx4/en_netdev.c | |||
| @@ -247,7 +247,7 @@ static void mlx4_en_do_set_multicast(struct work_struct *work) | |||
| 247 | priv->port); | 247 | priv->port); |
| 248 | if (err) | 248 | if (err) |
| 249 | en_err(priv, "Failed enabling " | 249 | en_err(priv, "Failed enabling " |
| 250 | "promiscous mode\n"); | 250 | "promiscuous mode\n"); |
| 251 | 251 | ||
| 252 | /* Disable port multicast filter (unconditionally) */ | 252 | /* Disable port multicast filter (unconditionally) */ |
| 253 | err = mlx4_SET_MCAST_FLTR(mdev->dev, priv->port, 0, | 253 | err = mlx4_SET_MCAST_FLTR(mdev->dev, priv->port, 0, |
| @@ -276,7 +276,7 @@ static void mlx4_en_do_set_multicast(struct work_struct *work) | |||
| 276 | } | 276 | } |
| 277 | 277 | ||
| 278 | /* | 278 | /* |
| 279 | * Not in promiscous mode | 279 | * Not in promiscuous mode |
| 280 | */ | 280 | */ |
| 281 | 281 | ||
| 282 | if (priv->flags & MLX4_EN_FLAG_PROMISC) { | 282 | if (priv->flags & MLX4_EN_FLAG_PROMISC) { |
| @@ -292,14 +292,14 @@ static void mlx4_en_do_set_multicast(struct work_struct *work) | |||
| 292 | err = mlx4_unicast_promisc_remove(mdev->dev, priv->base_qpn, | 292 | err = mlx4_unicast_promisc_remove(mdev->dev, priv->base_qpn, |
| 293 | priv->port); | 293 | priv->port); |
| 294 | if (err) | 294 | if (err) |
| 295 | en_err(priv, "Failed disabling promiscous mode\n"); | 295 | en_err(priv, "Failed disabling promiscuous mode\n"); |
| 296 | 296 | ||
| 297 | /* Disable Multicast promisc */ | 297 | /* Disable Multicast promisc */ |
| 298 | if (priv->flags & MLX4_EN_FLAG_MC_PROMISC) { | 298 | if (priv->flags & MLX4_EN_FLAG_MC_PROMISC) { |
| 299 | err = mlx4_multicast_promisc_remove(mdev->dev, priv->base_qpn, | 299 | err = mlx4_multicast_promisc_remove(mdev->dev, priv->base_qpn, |
| 300 | priv->port); | 300 | priv->port); |
| 301 | if (err) | 301 | if (err) |
| 302 | en_err(priv, "Failed disabling multicast promiscous mode\n"); | 302 | en_err(priv, "Failed disabling multicast promiscuous mode\n"); |
| 303 | priv->flags &= ~MLX4_EN_FLAG_MC_PROMISC; | 303 | priv->flags &= ~MLX4_EN_FLAG_MC_PROMISC; |
| 304 | } | 304 | } |
| 305 | 305 | ||
| @@ -331,7 +331,7 @@ static void mlx4_en_do_set_multicast(struct work_struct *work) | |||
| 331 | err = mlx4_multicast_promisc_remove(mdev->dev, priv->base_qpn, | 331 | err = mlx4_multicast_promisc_remove(mdev->dev, priv->base_qpn, |
| 332 | priv->port); | 332 | priv->port); |
| 333 | if (err) | 333 | if (err) |
| 334 | en_err(priv, "Failed disabling multicast promiscous mode\n"); | 334 | en_err(priv, "Failed disabling multicast promiscuous mode\n"); |
| 335 | priv->flags &= ~MLX4_EN_FLAG_MC_PROMISC; | 335 | priv->flags &= ~MLX4_EN_FLAG_MC_PROMISC; |
| 336 | } | 336 | } |
| 337 | 337 | ||
diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c index 05998ee297c9..62dd21b06df4 100644 --- a/drivers/net/mlx4/en_rx.c +++ b/drivers/net/mlx4/en_rx.c | |||
| @@ -345,6 +345,8 @@ int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv) | |||
| 345 | err = mlx4_en_init_allocator(priv, ring); | 345 | err = mlx4_en_init_allocator(priv, ring); |
| 346 | if (err) { | 346 | if (err) { |
| 347 | en_err(priv, "Failed initializing ring allocator\n"); | 347 | en_err(priv, "Failed initializing ring allocator\n"); |
| 348 | if (ring->stride <= TXBB_SIZE) | ||
| 349 | ring->buf -= TXBB_SIZE; | ||
| 348 | ring_ind--; | 350 | ring_ind--; |
| 349 | goto err_allocator; | 351 | goto err_allocator; |
| 350 | } | 352 | } |
| @@ -369,6 +371,8 @@ err_buffers: | |||
| 369 | ring_ind = priv->rx_ring_num - 1; | 371 | ring_ind = priv->rx_ring_num - 1; |
| 370 | err_allocator: | 372 | err_allocator: |
| 371 | while (ring_ind >= 0) { | 373 | while (ring_ind >= 0) { |
| 374 | if (priv->rx_ring[ring_ind].stride <= TXBB_SIZE) | ||
| 375 | priv->rx_ring[ring_ind].buf -= TXBB_SIZE; | ||
| 372 | mlx4_en_destroy_allocator(priv, &priv->rx_ring[ring_ind]); | 376 | mlx4_en_destroy_allocator(priv, &priv->rx_ring[ring_ind]); |
| 373 | ring_ind--; | 377 | ring_ind--; |
| 374 | } | 378 | } |
| @@ -706,7 +710,7 @@ int mlx4_en_poll_rx_cq(struct napi_struct *napi, int budget) | |||
| 706 | } | 710 | } |
| 707 | 711 | ||
| 708 | 712 | ||
| 709 | /* Calculate the last offset position that accomodates a full fragment | 713 | /* Calculate the last offset position that accommodates a full fragment |
| 710 | * (assuming fagment size = stride-align) */ | 714 | * (assuming fagment size = stride-align) */ |
| 711 | static int mlx4_en_last_alloc_offset(struct mlx4_en_priv *priv, u16 stride, u16 align) | 715 | static int mlx4_en_last_alloc_offset(struct mlx4_en_priv *priv, u16 stride, u16 align) |
| 712 | { | 716 | { |
diff --git a/drivers/net/mlx4/en_selftest.c b/drivers/net/mlx4/en_selftest.c index 9c91a92da705..191a8dcd8a93 100644 --- a/drivers/net/mlx4/en_selftest.c +++ b/drivers/net/mlx4/en_selftest.c | |||
| @@ -149,7 +149,7 @@ void mlx4_en_ex_selftest(struct net_device *dev, u32 *flags, u64 *buf) | |||
| 149 | 149 | ||
| 150 | netif_carrier_off(dev); | 150 | netif_carrier_off(dev); |
| 151 | retry_tx: | 151 | retry_tx: |
| 152 | /* Wait untill all tx queues are empty. | 152 | /* Wait until all tx queues are empty. |
| 153 | * there should not be any additional incoming traffic | 153 | * there should not be any additional incoming traffic |
| 154 | * since we turned the carrier off */ | 154 | * since we turned the carrier off */ |
| 155 | msleep(200); | 155 | msleep(200); |
diff --git a/drivers/net/mlx4/en_tx.c b/drivers/net/mlx4/en_tx.c index 01feb8fd42ad..b229acf1855f 100644 --- a/drivers/net/mlx4/en_tx.c +++ b/drivers/net/mlx4/en_tx.c | |||
| @@ -636,7 +636,7 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 636 | if (unlikely(!real_size)) | 636 | if (unlikely(!real_size)) |
| 637 | goto tx_drop; | 637 | goto tx_drop; |
| 638 | 638 | ||
| 639 | /* Allign descriptor to TXBB size */ | 639 | /* Align descriptor to TXBB size */ |
| 640 | desc_size = ALIGN(real_size, TXBB_SIZE); | 640 | desc_size = ALIGN(real_size, TXBB_SIZE); |
| 641 | nr_txbb = desc_size / TXBB_SIZE; | 641 | nr_txbb = desc_size / TXBB_SIZE; |
| 642 | if (unlikely(nr_txbb > MAX_DESC_TXBBS)) { | 642 | if (unlikely(nr_txbb > MAX_DESC_TXBBS)) { |
diff --git a/drivers/net/mlx4/eq.c b/drivers/net/mlx4/eq.c index 506cfd0372ec..1ad1f6029af8 100644 --- a/drivers/net/mlx4/eq.c +++ b/drivers/net/mlx4/eq.c | |||
| @@ -603,7 +603,9 @@ int mlx4_init_eq_table(struct mlx4_dev *dev) | |||
| 603 | } | 603 | } |
| 604 | 604 | ||
| 605 | for (i = 0; i < dev->caps.num_comp_vectors; ++i) { | 605 | for (i = 0; i < dev->caps.num_comp_vectors; ++i) { |
| 606 | err = mlx4_create_eq(dev, dev->caps.num_cqs + MLX4_NUM_SPARE_EQE, | 606 | err = mlx4_create_eq(dev, dev->caps.num_cqs - |
| 607 | dev->caps.reserved_cqs + | ||
| 608 | MLX4_NUM_SPARE_EQE, | ||
| 607 | (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, | 609 | (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, |
| 608 | &priv->eq_table.eq[i]); | 610 | &priv->eq_table.eq[i]); |
| 609 | if (err) { | 611 | if (err) { |
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c index 62fa7eec5f0c..3814fc9b1145 100644 --- a/drivers/net/mlx4/main.c +++ b/drivers/net/mlx4/main.c | |||
| @@ -944,6 +944,10 @@ static int mlx4_setup_hca(struct mlx4_dev *dev) | |||
| 944 | } | 944 | } |
| 945 | 945 | ||
| 946 | for (port = 1; port <= dev->caps.num_ports; port++) { | 946 | for (port = 1; port <= dev->caps.num_ports; port++) { |
| 947 | enum mlx4_port_type port_type = 0; | ||
| 948 | mlx4_SENSE_PORT(dev, port, &port_type); | ||
| 949 | if (port_type) | ||
| 950 | dev->caps.port_type[port] = port_type; | ||
| 947 | ib_port_default_caps = 0; | 951 | ib_port_default_caps = 0; |
| 948 | err = mlx4_get_port_ib_caps(dev, port, &ib_port_default_caps); | 952 | err = mlx4_get_port_ib_caps(dev, port, &ib_port_default_caps); |
| 949 | if (err) | 953 | if (err) |
| @@ -958,6 +962,7 @@ static int mlx4_setup_hca(struct mlx4_dev *dev) | |||
| 958 | goto err_mcg_table_free; | 962 | goto err_mcg_table_free; |
| 959 | } | 963 | } |
| 960 | } | 964 | } |
| 965 | mlx4_set_port_mask(dev); | ||
| 961 | 966 | ||
| 962 | return 0; | 967 | return 0; |
| 963 | 968 | ||
diff --git a/drivers/net/mlx4/mcg.c b/drivers/net/mlx4/mcg.c index e71372aa9cc4..e63c37d6a115 100644 --- a/drivers/net/mlx4/mcg.c +++ b/drivers/net/mlx4/mcg.c | |||
| @@ -111,7 +111,7 @@ static int new_steering_entry(struct mlx4_dev *dev, u8 vep_num, u8 port, | |||
| 111 | u32 members_count; | 111 | u32 members_count; |
| 112 | struct mlx4_steer_index *new_entry; | 112 | struct mlx4_steer_index *new_entry; |
| 113 | struct mlx4_promisc_qp *pqp; | 113 | struct mlx4_promisc_qp *pqp; |
| 114 | struct mlx4_promisc_qp *dqp; | 114 | struct mlx4_promisc_qp *dqp = NULL; |
| 115 | u32 prot; | 115 | u32 prot; |
| 116 | int err; | 116 | int err; |
| 117 | u8 pf_num; | 117 | u8 pf_num; |
| @@ -184,7 +184,7 @@ out_mailbox: | |||
| 184 | out_alloc: | 184 | out_alloc: |
| 185 | if (dqp) { | 185 | if (dqp) { |
| 186 | list_del(&dqp->list); | 186 | list_del(&dqp->list); |
| 187 | kfree(&dqp); | 187 | kfree(dqp); |
| 188 | } | 188 | } |
| 189 | list_del(&new_entry->list); | 189 | list_del(&new_entry->list); |
| 190 | kfree(new_entry); | 190 | kfree(new_entry); |
| @@ -222,7 +222,7 @@ static int existing_steering_entry(struct mlx4_dev *dev, u8 vep_num, u8 port, | |||
| 222 | 222 | ||
| 223 | /* the given qpn is listed as a promisc qpn | 223 | /* the given qpn is listed as a promisc qpn |
| 224 | * we need to add it as a duplicate to this entry | 224 | * we need to add it as a duplicate to this entry |
| 225 | * for future refernce */ | 225 | * for future references */ |
| 226 | list_for_each_entry(dqp, &entry->duplicates, list) { | 226 | list_for_each_entry(dqp, &entry->duplicates, list) { |
| 227 | if (qpn == dqp->qpn) | 227 | if (qpn == dqp->qpn) |
| 228 | return 0; /* qp is already duplicated */ | 228 | return 0; /* qp is already duplicated */ |
| @@ -469,7 +469,6 @@ static int remove_promisc_qp(struct mlx4_dev *dev, u8 vep_num, u8 port, | |||
| 469 | 469 | ||
| 470 | /*remove from list of promisc qps */ | 470 | /*remove from list of promisc qps */ |
| 471 | list_del(&pqp->list); | 471 | list_del(&pqp->list); |
| 472 | kfree(pqp); | ||
| 473 | 472 | ||
| 474 | /* set the default entry not to include the removed one */ | 473 | /* set the default entry not to include the removed one */ |
| 475 | mailbox = mlx4_alloc_cmd_mailbox(dev); | 474 | mailbox = mlx4_alloc_cmd_mailbox(dev); |
| @@ -528,6 +527,8 @@ out_mailbox: | |||
| 528 | out_list: | 527 | out_list: |
| 529 | if (back_to_list) | 528 | if (back_to_list) |
| 530 | list_add_tail(&pqp->list, &s_steer->promisc_qps[steer]); | 529 | list_add_tail(&pqp->list, &s_steer->promisc_qps[steer]); |
| 530 | else | ||
| 531 | kfree(pqp); | ||
| 531 | out_mutex: | 532 | out_mutex: |
| 532 | mutex_unlock(&priv->mcg_table.mutex); | 533 | mutex_unlock(&priv->mcg_table.mutex); |
| 533 | return err; | 534 | return err; |
diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h index c1e0e5f1bcdb..dd7d745fbab4 100644 --- a/drivers/net/mlx4/mlx4.h +++ b/drivers/net/mlx4/mlx4.h | |||
| @@ -431,6 +431,8 @@ void mlx4_srq_event(struct mlx4_dev *dev, u32 srqn, int event_type); | |||
| 431 | 431 | ||
| 432 | void mlx4_handle_catas_err(struct mlx4_dev *dev); | 432 | void mlx4_handle_catas_err(struct mlx4_dev *dev); |
| 433 | 433 | ||
| 434 | int mlx4_SENSE_PORT(struct mlx4_dev *dev, int port, | ||
| 435 | enum mlx4_port_type *type); | ||
| 434 | void mlx4_do_sense_ports(struct mlx4_dev *dev, | 436 | void mlx4_do_sense_ports(struct mlx4_dev *dev, |
| 435 | enum mlx4_port_type *stype, | 437 | enum mlx4_port_type *stype, |
| 436 | enum mlx4_port_type *defaults); | 438 | enum mlx4_port_type *defaults); |
diff --git a/drivers/net/mlx4/port.c b/drivers/net/mlx4/port.c index eca7d8596f87..8856659fb43c 100644 --- a/drivers/net/mlx4/port.c +++ b/drivers/net/mlx4/port.c | |||
| @@ -172,7 +172,7 @@ int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *qpn, u8 wrap) | |||
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | if (mac == (MLX4_MAC_MASK & be64_to_cpu(table->entries[i]))) { | 174 | if (mac == (MLX4_MAC_MASK & be64_to_cpu(table->entries[i]))) { |
| 175 | /* MAC already registered, increase refernce count */ | 175 | /* MAC already registered, increase references count */ |
| 176 | ++table->refs[i]; | 176 | ++table->refs[i]; |
| 177 | goto out; | 177 | goto out; |
| 178 | } | 178 | } |
| @@ -360,7 +360,7 @@ int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index) | |||
| 360 | if (table->refs[i] && | 360 | if (table->refs[i] && |
| 361 | (vlan == (MLX4_VLAN_MASK & | 361 | (vlan == (MLX4_VLAN_MASK & |
| 362 | be32_to_cpu(table->entries[i])))) { | 362 | be32_to_cpu(table->entries[i])))) { |
| 363 | /* Vlan already registered, increase refernce count */ | 363 | /* Vlan already registered, increase references count */ |
| 364 | *index = i; | 364 | *index = i; |
| 365 | ++table->refs[i]; | 365 | ++table->refs[i]; |
| 366 | goto out; | 366 | goto out; |
diff --git a/drivers/net/mlx4/sense.c b/drivers/net/mlx4/sense.c index 015fbe785c13..e2337a7411d9 100644 --- a/drivers/net/mlx4/sense.c +++ b/drivers/net/mlx4/sense.c | |||
| @@ -38,8 +38,8 @@ | |||
| 38 | 38 | ||
| 39 | #include "mlx4.h" | 39 | #include "mlx4.h" |
| 40 | 40 | ||
| 41 | static int mlx4_SENSE_PORT(struct mlx4_dev *dev, int port, | 41 | int mlx4_SENSE_PORT(struct mlx4_dev *dev, int port, |
| 42 | enum mlx4_port_type *type) | 42 | enum mlx4_port_type *type) |
| 43 | { | 43 | { |
| 44 | u64 out_param; | 44 | u64 out_param; |
| 45 | int err = 0; | 45 | int err = 0; |
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index 673dc600c891..1446de59ae53 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
| @@ -3702,7 +3702,7 @@ abort: | |||
| 3702 | 3702 | ||
| 3703 | /* | 3703 | /* |
| 3704 | * This function determines the number of slices supported. | 3704 | * This function determines the number of slices supported. |
| 3705 | * The number slices is the minumum of the number of CPUS, | 3705 | * The number slices is the minimum of the number of CPUS, |
| 3706 | * the number of MSI-X irqs supported, the number of slices | 3706 | * the number of MSI-X irqs supported, the number of slices |
| 3707 | * supported by the firmware | 3707 | * supported by the firmware |
| 3708 | */ | 3708 | */ |
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c index a761076b69c3..53aeea4b536e 100644 --- a/drivers/net/myri_sbus.c +++ b/drivers/net/myri_sbus.c | |||
| @@ -1009,7 +1009,7 @@ static int __devinit myri_sbus_probe(struct platform_device *op) | |||
| 1009 | 1009 | ||
| 1010 | /* Map in the MyriCOM register/localram set. */ | 1010 | /* Map in the MyriCOM register/localram set. */ |
| 1011 | if (mp->eeprom.cpuvers < CPUVERS_4_0) { | 1011 | if (mp->eeprom.cpuvers < CPUVERS_4_0) { |
| 1012 | /* XXX Makes no sense, if control reg is non-existant this | 1012 | /* XXX Makes no sense, if control reg is non-existent this |
| 1013 | * XXX driver cannot function at all... maybe pre-4.0 is | 1013 | * XXX driver cannot function at all... maybe pre-4.0 is |
| 1014 | * XXX only a valid version for PCI cards? Ask feldy... | 1014 | * XXX only a valid version for PCI cards? Ask feldy... |
| 1015 | */ | 1015 | */ |
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c index 2fd39630b1e5..aa2813e06d00 100644 --- a/drivers/net/natsemi.c +++ b/drivers/net/natsemi.c | |||
| @@ -203,7 +203,7 @@ skbuff at an offset of "+2", 16-byte aligning the IP header. | |||
| 203 | IIId. Synchronization | 203 | IIId. Synchronization |
| 204 | 204 | ||
| 205 | Most operations are synchronized on the np->lock irq spinlock, except the | 205 | Most operations are synchronized on the np->lock irq spinlock, except the |
| 206 | recieve and transmit paths which are synchronised using a combination of | 206 | receive and transmit paths which are synchronised using a combination of |
| 207 | hardware descriptor ownership, disabling interrupts and NAPI poll scheduling. | 207 | hardware descriptor ownership, disabling interrupts and NAPI poll scheduling. |
| 208 | 208 | ||
| 209 | IVb. References | 209 | IVb. References |
| @@ -726,7 +726,7 @@ static void move_int_phy(struct net_device *dev, int addr) | |||
| 726 | * There are two addresses we must avoid: | 726 | * There are two addresses we must avoid: |
| 727 | * - the address on the external phy that is used for transmission. | 727 | * - the address on the external phy that is used for transmission. |
| 728 | * - the address that we want to access. User space can access phys | 728 | * - the address that we want to access. User space can access phys |
| 729 | * on the mii bus with SIOCGMIIREG/SIOCSMIIREG, independant from the | 729 | * on the mii bus with SIOCGMIIREG/SIOCSMIIREG, independent from the |
| 730 | * phy that is used for transmission. | 730 | * phy that is used for transmission. |
| 731 | */ | 731 | */ |
| 732 | 732 | ||
| @@ -1982,7 +1982,7 @@ static void init_ring(struct net_device *dev) | |||
| 1982 | 1982 | ||
| 1983 | np->rx_head_desc = &np->rx_ring[0]; | 1983 | np->rx_head_desc = &np->rx_ring[0]; |
| 1984 | 1984 | ||
| 1985 | /* Please be carefull before changing this loop - at least gcc-2.95.1 | 1985 | /* Please be careful before changing this loop - at least gcc-2.95.1 |
| 1986 | * miscompiles it otherwise. | 1986 | * miscompiles it otherwise. |
| 1987 | */ | 1987 | */ |
| 1988 | /* Initialize all Rx descriptors. */ | 1988 | /* Initialize all Rx descriptors. */ |
diff --git a/drivers/net/netxen/netxen_nic_hdr.h b/drivers/net/netxen/netxen_nic_hdr.h index d8bd73d7e296..dc1967c1f312 100644 --- a/drivers/net/netxen/netxen_nic_hdr.h +++ b/drivers/net/netxen/netxen_nic_hdr.h | |||
| @@ -780,7 +780,7 @@ enum { | |||
| 780 | 780 | ||
| 781 | /* | 781 | /* |
| 782 | * capabilities register, can be used to selectively enable/disable features | 782 | * capabilities register, can be used to selectively enable/disable features |
| 783 | * for backward compability | 783 | * for backward compatibility |
| 784 | */ | 784 | */ |
| 785 | #define CRB_NIC_CAPABILITIES_HOST NETXEN_NIC_REG(0x1a8) | 785 | #define CRB_NIC_CAPABILITIES_HOST NETXEN_NIC_REG(0x1a8) |
| 786 | #define CRB_NIC_MSI_MODE_HOST NETXEN_NIC_REG(0x270) | 786 | #define CRB_NIC_MSI_MODE_HOST NETXEN_NIC_REG(0x270) |
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c index a41b2cf4d917..6667e0667a88 100644 --- a/drivers/net/ns83820.c +++ b/drivers/net/ns83820.c | |||
| @@ -512,7 +512,7 @@ static void ns83820_vlan_rx_register(struct net_device *ndev, struct vlan_group | |||
| 512 | /* Packet Receiver | 512 | /* Packet Receiver |
| 513 | * | 513 | * |
| 514 | * The hardware supports linked lists of receive descriptors for | 514 | * The hardware supports linked lists of receive descriptors for |
| 515 | * which ownership is transfered back and forth by means of an | 515 | * which ownership is transferred back and forth by means of an |
| 516 | * ownership bit. While the hardware does support the use of a | 516 | * ownership bit. While the hardware does support the use of a |
| 517 | * ring for receive descriptors, we only make use of a chain in | 517 | * ring for receive descriptors, we only make use of a chain in |
| 518 | * an attempt to reduce bus traffic under heavy load scenarios. | 518 | * an attempt to reduce bus traffic under heavy load scenarios. |
| @@ -1147,7 +1147,7 @@ again: | |||
| 1147 | #ifdef NS83820_VLAN_ACCEL_SUPPORT | 1147 | #ifdef NS83820_VLAN_ACCEL_SUPPORT |
| 1148 | if(vlan_tx_tag_present(skb)) { | 1148 | if(vlan_tx_tag_present(skb)) { |
| 1149 | /* fetch the vlan tag info out of the | 1149 | /* fetch the vlan tag info out of the |
| 1150 | * ancilliary data if the vlan code | 1150 | * ancillary data if the vlan code |
| 1151 | * is using hw vlan acceleration | 1151 | * is using hw vlan acceleration |
| 1152 | */ | 1152 | */ |
| 1153 | short tag = vlan_tx_tag_get(skb); | 1153 | short tag = vlan_tx_tag_get(skb); |
diff --git a/drivers/net/pch_gbe/pch_gbe.h b/drivers/net/pch_gbe/pch_gbe.h index e1e33c80fb25..bf126e76fabf 100644 --- a/drivers/net/pch_gbe/pch_gbe.h +++ b/drivers/net/pch_gbe/pch_gbe.h | |||
| @@ -351,7 +351,7 @@ struct pch_gbe_functions { | |||
| 351 | }; | 351 | }; |
| 352 | 352 | ||
| 353 | /** | 353 | /** |
| 354 | * struct pch_gbe_mac_info - MAC infomation | 354 | * struct pch_gbe_mac_info - MAC information |
| 355 | * @addr[6]: Store the MAC address | 355 | * @addr[6]: Store the MAC address |
| 356 | * @fc: Mode of flow control | 356 | * @fc: Mode of flow control |
| 357 | * @fc_autoneg: Auto negotiation enable for flow control setting | 357 | * @fc_autoneg: Auto negotiation enable for flow control setting |
| @@ -375,7 +375,7 @@ struct pch_gbe_mac_info { | |||
| 375 | }; | 375 | }; |
| 376 | 376 | ||
| 377 | /** | 377 | /** |
| 378 | * struct pch_gbe_phy_info - PHY infomation | 378 | * struct pch_gbe_phy_info - PHY information |
| 379 | * @addr: PHY address | 379 | * @addr: PHY address |
| 380 | * @id: PHY's identifier | 380 | * @id: PHY's identifier |
| 381 | * @revision: PHY's revision | 381 | * @revision: PHY's revision |
| @@ -393,7 +393,7 @@ struct pch_gbe_phy_info { | |||
| 393 | /*! | 393 | /*! |
| 394 | * @ingroup Gigabit Ether driver Layer | 394 | * @ingroup Gigabit Ether driver Layer |
| 395 | * @struct pch_gbe_bus_info | 395 | * @struct pch_gbe_bus_info |
| 396 | * @brief Bus infomation | 396 | * @brief Bus information |
| 397 | */ | 397 | */ |
| 398 | struct pch_gbe_bus_info { | 398 | struct pch_gbe_bus_info { |
| 399 | u8 type; | 399 | u8 type; |
| @@ -404,7 +404,7 @@ struct pch_gbe_bus_info { | |||
| 404 | /*! | 404 | /*! |
| 405 | * @ingroup Gigabit Ether driver Layer | 405 | * @ingroup Gigabit Ether driver Layer |
| 406 | * @struct pch_gbe_hw | 406 | * @struct pch_gbe_hw |
| 407 | * @brief Hardware infomation | 407 | * @brief Hardware information |
| 408 | */ | 408 | */ |
| 409 | struct pch_gbe_hw { | 409 | struct pch_gbe_hw { |
| 410 | void *back; | 410 | void *back; |
| @@ -462,7 +462,7 @@ struct pch_gbe_tx_desc { | |||
| 462 | 462 | ||
| 463 | 463 | ||
| 464 | /** | 464 | /** |
| 465 | * struct pch_gbe_buffer - Buffer infomation | 465 | * struct pch_gbe_buffer - Buffer information |
| 466 | * @skb: pointer to a socket buffer | 466 | * @skb: pointer to a socket buffer |
| 467 | * @dma: DMA address | 467 | * @dma: DMA address |
| 468 | * @time_stamp: time stamp | 468 | * @time_stamp: time stamp |
| @@ -477,7 +477,7 @@ struct pch_gbe_buffer { | |||
| 477 | }; | 477 | }; |
| 478 | 478 | ||
| 479 | /** | 479 | /** |
| 480 | * struct pch_gbe_tx_ring - tx ring infomation | 480 | * struct pch_gbe_tx_ring - tx ring information |
| 481 | * @tx_lock: spinlock structs | 481 | * @tx_lock: spinlock structs |
| 482 | * @desc: pointer to the descriptor ring memory | 482 | * @desc: pointer to the descriptor ring memory |
| 483 | * @dma: physical address of the descriptor ring | 483 | * @dma: physical address of the descriptor ring |
| @@ -499,7 +499,7 @@ struct pch_gbe_tx_ring { | |||
| 499 | }; | 499 | }; |
| 500 | 500 | ||
| 501 | /** | 501 | /** |
| 502 | * struct pch_gbe_rx_ring - rx ring infomation | 502 | * struct pch_gbe_rx_ring - rx ring information |
| 503 | * @desc: pointer to the descriptor ring memory | 503 | * @desc: pointer to the descriptor ring memory |
| 504 | * @dma: physical address of the descriptor ring | 504 | * @dma: physical address of the descriptor ring |
| 505 | * @size: length of descriptor ring in bytes | 505 | * @size: length of descriptor ring in bytes |
diff --git a/drivers/net/pch_gbe/pch_gbe_ethtool.c b/drivers/net/pch_gbe/pch_gbe_ethtool.c index c8c873b31a89..d2174a40d708 100644 --- a/drivers/net/pch_gbe/pch_gbe_ethtool.c +++ b/drivers/net/pch_gbe/pch_gbe_ethtool.c | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #include "pch_gbe_api.h" | 21 | #include "pch_gbe_api.h" |
| 22 | 22 | ||
| 23 | /** | 23 | /** |
| 24 | * pch_gbe_stats - Stats item infomation | 24 | * pch_gbe_stats - Stats item information |
| 25 | */ | 25 | */ |
| 26 | struct pch_gbe_stats { | 26 | struct pch_gbe_stats { |
| 27 | char string[ETH_GSTRING_LEN]; | 27 | char string[ETH_GSTRING_LEN]; |
diff --git a/drivers/net/pch_gbe/pch_gbe_main.c b/drivers/net/pch_gbe/pch_gbe_main.c index 50986840c99c..2ef2f9cdefa6 100644 --- a/drivers/net/pch_gbe/pch_gbe_main.c +++ b/drivers/net/pch_gbe/pch_gbe_main.c | |||
| @@ -1011,7 +1011,7 @@ static void pch_gbe_tx_queue(struct pch_gbe_adapter *adapter, | |||
| 1011 | tmp_skb->len = skb->len; | 1011 | tmp_skb->len = skb->len; |
| 1012 | memcpy(&tmp_skb->data[ETH_HLEN + 2], &skb->data[ETH_HLEN], | 1012 | memcpy(&tmp_skb->data[ETH_HLEN + 2], &skb->data[ETH_HLEN], |
| 1013 | (skb->len - ETH_HLEN)); | 1013 | (skb->len - ETH_HLEN)); |
| 1014 | /*-- Set Buffer infomation --*/ | 1014 | /*-- Set Buffer information --*/ |
| 1015 | buffer_info->length = tmp_skb->len; | 1015 | buffer_info->length = tmp_skb->len; |
| 1016 | buffer_info->dma = dma_map_single(&adapter->pdev->dev, tmp_skb->data, | 1016 | buffer_info->dma = dma_map_single(&adapter->pdev->dev, tmp_skb->data, |
| 1017 | buffer_info->length, | 1017 | buffer_info->length, |
| @@ -1540,7 +1540,7 @@ int pch_gbe_setup_tx_resources(struct pch_gbe_adapter *adapter, | |||
| 1540 | size = (int)sizeof(struct pch_gbe_buffer) * tx_ring->count; | 1540 | size = (int)sizeof(struct pch_gbe_buffer) * tx_ring->count; |
| 1541 | tx_ring->buffer_info = vzalloc(size); | 1541 | tx_ring->buffer_info = vzalloc(size); |
| 1542 | if (!tx_ring->buffer_info) { | 1542 | if (!tx_ring->buffer_info) { |
| 1543 | pr_err("Unable to allocate memory for the buffer infomation\n"); | 1543 | pr_err("Unable to allocate memory for the buffer information\n"); |
| 1544 | return -ENOMEM; | 1544 | return -ENOMEM; |
| 1545 | } | 1545 | } |
| 1546 | 1546 | ||
diff --git a/drivers/net/pci-skeleton.c b/drivers/net/pci-skeleton.c index 1766dc4f07e1..c0f23376a462 100644 --- a/drivers/net/pci-skeleton.c +++ b/drivers/net/pci-skeleton.c | |||
| @@ -214,7 +214,7 @@ static struct { | |||
| 214 | { "SMC1211TX EZCard 10/100 (RealTek RTL8139)" }, | 214 | { "SMC1211TX EZCard 10/100 (RealTek RTL8139)" }, |
| 215 | /* { MPX5030, "Accton MPX5030 (RealTek RTL8139)" },*/ | 215 | /* { MPX5030, "Accton MPX5030 (RealTek RTL8139)" },*/ |
| 216 | { "Delta Electronics 8139 10/100BaseTX" }, | 216 | { "Delta Electronics 8139 10/100BaseTX" }, |
| 217 | { "Addtron Technolgy 8139 10/100BaseTX" }, | 217 | { "Addtron Technology 8139 10/100BaseTX" }, |
| 218 | }; | 218 | }; |
| 219 | 219 | ||
| 220 | 220 | ||
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c index 321b12f82645..81ac330f931d 100644 --- a/drivers/net/pcmcia/3c574_cs.c +++ b/drivers/net/pcmcia/3c574_cs.c | |||
| @@ -950,7 +950,7 @@ static struct net_device_stats *el3_get_stats(struct net_device *dev) | |||
| 950 | } | 950 | } |
| 951 | 951 | ||
| 952 | /* Update statistics. | 952 | /* Update statistics. |
| 953 | Suprisingly this need not be run single-threaded, but it effectively is. | 953 | Surprisingly this need not be run single-threaded, but it effectively is. |
| 954 | The counters clear when read, so the adds must merely be atomic. | 954 | The counters clear when read, so the adds must merely be atomic. |
| 955 | */ | 955 | */ |
| 956 | static void update_stats(struct net_device *dev) | 956 | static void update_stats(struct net_device *dev) |
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index d3cb77205863..3077d72e8222 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
| @@ -780,7 +780,7 @@ module_exit(exit_axnet_cs); | |||
| 780 | Alexey Kuznetsov : use the 8390's six bit hash multicast filter. | 780 | Alexey Kuznetsov : use the 8390's six bit hash multicast filter. |
| 781 | Paul Gortmaker : tweak ANK's above multicast changes a bit. | 781 | Paul Gortmaker : tweak ANK's above multicast changes a bit. |
| 782 | Paul Gortmaker : update packet statistics for v2.1.x | 782 | Paul Gortmaker : update packet statistics for v2.1.x |
| 783 | Alan Cox : support arbitary stupid port mappings on the | 783 | Alan Cox : support arbitrary stupid port mappings on the |
| 784 | 68K Macintosh. Support >16bit I/O spaces | 784 | 68K Macintosh. Support >16bit I/O spaces |
| 785 | Paul Gortmaker : add kmod support for auto-loading of the 8390 | 785 | Paul Gortmaker : add kmod support for auto-loading of the 8390 |
| 786 | module by all drivers that require it. | 786 | module by all drivers that require it. |
| @@ -842,7 +842,7 @@ static void do_set_multicast_list(struct net_device *dev); | |||
| 842 | /* | 842 | /* |
| 843 | * SMP and the 8390 setup. | 843 | * SMP and the 8390 setup. |
| 844 | * | 844 | * |
| 845 | * The 8390 isnt exactly designed to be multithreaded on RX/TX. There is | 845 | * The 8390 isn't exactly designed to be multithreaded on RX/TX. There is |
| 846 | * a page register that controls bank and packet buffer access. We guard | 846 | * a page register that controls bank and packet buffer access. We guard |
| 847 | * this with ei_local->page_lock. Nobody should assume or set the page other | 847 | * this with ei_local->page_lock. Nobody should assume or set the page other |
| 848 | * than zero when the lock is not held. Lock holders must restore page 0 | 848 | * than zero when the lock is not held. Lock holders must restore page 0 |
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index 8a9ff5318923..108591756440 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
| @@ -1264,7 +1264,7 @@ static netdev_tx_t smc_start_xmit(struct sk_buff *skb, | |||
| 1264 | 1264 | ||
| 1265 | /*====================================================================== | 1265 | /*====================================================================== |
| 1266 | 1266 | ||
| 1267 | Handle a Tx anomolous event. Entered while in Window 2. | 1267 | Handle a Tx anomalous event. Entered while in Window 2. |
| 1268 | 1268 | ||
| 1269 | ======================================================================*/ | 1269 | ======================================================================*/ |
| 1270 | 1270 | ||
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index aee3bb0358bf..768037602dff 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c | |||
| @@ -1651,7 +1651,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev) | |||
| 1651 | /* | 1651 | /* |
| 1652 | * On selected chips turn on the BCR18:NOUFLO bit. This stops transmit | 1652 | * On selected chips turn on the BCR18:NOUFLO bit. This stops transmit |
| 1653 | * starting until the packet is loaded. Strike one for reliability, lose | 1653 | * starting until the packet is loaded. Strike one for reliability, lose |
| 1654 | * one for latency - although on PCI this isnt a big loss. Older chips | 1654 | * one for latency - although on PCI this isn't a big loss. Older chips |
| 1655 | * have FIFO's smaller than a packet, so you can't do this. | 1655 | * have FIFO's smaller than a packet, so you can't do this. |
| 1656 | * Turn on BCR18:BurstRdEn and BCR18:BurstWrEn. | 1656 | * Turn on BCR18:BurstRdEn and BCR18:BurstWrEn. |
| 1657 | */ | 1657 | */ |
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 993c52c82aeb..ff109fe5af6b 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
| @@ -442,11 +442,11 @@ static int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, | |||
| 442 | u32 flags, phy_interface_t interface) | 442 | u32 flags, phy_interface_t interface) |
| 443 | { | 443 | { |
| 444 | struct device *d = &phydev->dev; | 444 | struct device *d = &phydev->dev; |
| 445 | int err; | ||
| 445 | 446 | ||
| 446 | /* Assume that if there is no driver, that it doesn't | 447 | /* Assume that if there is no driver, that it doesn't |
| 447 | * exist, and we should use the genphy driver. */ | 448 | * exist, and we should use the genphy driver. */ |
| 448 | if (NULL == d->driver) { | 449 | if (NULL == d->driver) { |
| 449 | int err; | ||
| 450 | d->driver = &genphy_driver.driver; | 450 | d->driver = &genphy_driver.driver; |
| 451 | 451 | ||
| 452 | err = d->driver->probe(d); | 452 | err = d->driver->probe(d); |
| @@ -474,7 +474,11 @@ static int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, | |||
| 474 | /* Do initial configuration here, now that | 474 | /* Do initial configuration here, now that |
| 475 | * we have certain key parameters | 475 | * we have certain key parameters |
| 476 | * (dev_flags and interface) */ | 476 | * (dev_flags and interface) */ |
| 477 | return phy_init_hw(phydev); | 477 | err = phy_init_hw(phydev); |
| 478 | if (err) | ||
| 479 | phy_detach(phydev); | ||
| 480 | |||
| 481 | return err; | ||
| 478 | } | 482 | } |
| 479 | 483 | ||
| 480 | /** | 484 | /** |
| @@ -534,7 +538,7 @@ EXPORT_SYMBOL(phy_detach); | |||
| 534 | /* Generic PHY support and helper functions */ | 538 | /* Generic PHY support and helper functions */ |
| 535 | 539 | ||
| 536 | /** | 540 | /** |
| 537 | * genphy_config_advert - sanitize and advertise auto-negotation parameters | 541 | * genphy_config_advert - sanitize and advertise auto-negotiation parameters |
| 538 | * @phydev: target phy_device struct | 542 | * @phydev: target phy_device struct |
| 539 | * | 543 | * |
| 540 | * Description: Writes MII_ADVERTISE with the appropriate values, | 544 | * Description: Writes MII_ADVERTISE with the appropriate values, |
| @@ -683,7 +687,7 @@ int genphy_config_aneg(struct phy_device *phydev) | |||
| 683 | return result; | 687 | return result; |
| 684 | 688 | ||
| 685 | if (result == 0) { | 689 | if (result == 0) { |
| 686 | /* Advertisment hasn't changed, but maybe aneg was never on to | 690 | /* Advertisement hasn't changed, but maybe aneg was never on to |
| 687 | * begin with? Or maybe phy was isolated? */ | 691 | * begin with? Or maybe phy was isolated? */ |
| 688 | int ctl = phy_read(phydev, MII_BMCR); | 692 | int ctl = phy_read(phydev, MII_BMCR); |
| 689 | 693 | ||
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index 9f6d670748d1..4609bc0e2f56 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
| @@ -1448,7 +1448,7 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb) | |||
| 1448 | 1448 | ||
| 1449 | /* | 1449 | /* |
| 1450 | *check if we are on the last channel or | 1450 | *check if we are on the last channel or |
| 1451 | *we exceded the lenght of the data to | 1451 | *we exceded the length of the data to |
| 1452 | *fragment | 1452 | *fragment |
| 1453 | */ | 1453 | */ |
| 1454 | if ((nfree <= 0) || (flen > len)) | 1454 | if ((nfree <= 0) || (flen > len)) |
diff --git a/drivers/net/ppp_synctty.c b/drivers/net/ppp_synctty.c index 4e6b72f57de8..2573f525f11c 100644 --- a/drivers/net/ppp_synctty.c +++ b/drivers/net/ppp_synctty.c | |||
| @@ -178,7 +178,7 @@ ppp_print_buffer (const char *name, const __u8 *buf, int count) | |||
| 178 | * way to fix this is to use a rwlock in the tty struct, but for now | 178 | * way to fix this is to use a rwlock in the tty struct, but for now |
| 179 | * we use a single global rwlock for all ttys in ppp line discipline. | 179 | * we use a single global rwlock for all ttys in ppp line discipline. |
| 180 | * | 180 | * |
| 181 | * FIXME: Fixed in tty_io nowdays. | 181 | * FIXME: Fixed in tty_io nowadays. |
| 182 | */ | 182 | */ |
| 183 | static DEFINE_RWLOCK(disc_data_lock); | 183 | static DEFINE_RWLOCK(disc_data_lock); |
| 184 | 184 | ||
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index 78c0e3c9b2b5..718879b35b7d 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c | |||
| @@ -115,7 +115,7 @@ struct pppoe_net { | |||
| 115 | * 2) Session stage (MAC and SID are known) | 115 | * 2) Session stage (MAC and SID are known) |
| 116 | * | 116 | * |
| 117 | * Ethernet frames have a special tag for this but | 117 | * Ethernet frames have a special tag for this but |
| 118 | * we use simplier approach based on session id | 118 | * we use simpler approach based on session id |
| 119 | */ | 119 | */ |
| 120 | static inline bool stage_session(__be16 sid) | 120 | static inline bool stage_session(__be16 sid) |
| 121 | { | 121 | { |
| @@ -317,7 +317,7 @@ static void pppoe_flush_dev(struct net_device *dev) | |||
| 317 | lock_sock(sk); | 317 | lock_sock(sk); |
| 318 | 318 | ||
| 319 | if (po->pppoe_dev == dev && | 319 | if (po->pppoe_dev == dev && |
| 320 | sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND)) { | 320 | sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND | PPPOX_ZOMBIE)) { |
| 321 | pppox_unbind_sock(sk); | 321 | pppox_unbind_sock(sk); |
| 322 | sk->sk_state = PPPOX_ZOMBIE; | 322 | sk->sk_state = PPPOX_ZOMBIE; |
| 323 | sk->sk_state_change(sk); | 323 | sk->sk_state_change(sk); |
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c index 5ecfa4b1e758..ffdf7349ef7a 100644 --- a/drivers/net/ps3_gelic_net.c +++ b/drivers/net/ps3_gelic_net.c | |||
| @@ -632,7 +632,7 @@ static inline void gelic_card_enable_rxdmac(struct gelic_card *card) | |||
| 632 | * @card: card structure | 632 | * @card: card structure |
| 633 | * | 633 | * |
| 634 | * gelic_card_disable_rxdmac terminates processing on the DMA controller by | 634 | * gelic_card_disable_rxdmac terminates processing on the DMA controller by |
| 635 | * turing off DMA and issueing a force end | 635 | * turing off DMA and issuing a force end |
| 636 | */ | 636 | */ |
| 637 | static inline void gelic_card_disable_rxdmac(struct gelic_card *card) | 637 | static inline void gelic_card_disable_rxdmac(struct gelic_card *card) |
| 638 | { | 638 | { |
| @@ -650,7 +650,7 @@ static inline void gelic_card_disable_rxdmac(struct gelic_card *card) | |||
| 650 | * @card: card structure | 650 | * @card: card structure |
| 651 | * | 651 | * |
| 652 | * gelic_card_disable_txdmac terminates processing on the DMA controller by | 652 | * gelic_card_disable_txdmac terminates processing on the DMA controller by |
| 653 | * turing off DMA and issueing a force end | 653 | * turing off DMA and issuing a force end |
| 654 | */ | 654 | */ |
| 655 | static inline void gelic_card_disable_txdmac(struct gelic_card *card) | 655 | static inline void gelic_card_disable_txdmac(struct gelic_card *card) |
| 656 | { | 656 | { |
diff --git a/drivers/net/ps3_gelic_net.h b/drivers/net/ps3_gelic_net.h index 32521ae5e824..fadadf9097a3 100644 --- a/drivers/net/ps3_gelic_net.h +++ b/drivers/net/ps3_gelic_net.h | |||
| @@ -117,7 +117,7 @@ enum gelic_descr_rx_error { | |||
| 117 | GELIC_DESCR_RXDATAERR = 0x00020000, /* IP packet format error */ | 117 | GELIC_DESCR_RXDATAERR = 0x00020000, /* IP packet format error */ |
| 118 | GELIC_DESCR_RXCALERR = 0x00010000, /* cariier extension length | 118 | GELIC_DESCR_RXCALERR = 0x00010000, /* cariier extension length |
| 119 | * error */ | 119 | * error */ |
| 120 | GELIC_DESCR_RXCREXERR = 0x00008000, /* carrier extention error */ | 120 | GELIC_DESCR_RXCREXERR = 0x00008000, /* carrier extension error */ |
| 121 | GELIC_DESCR_RXMLTCST = 0x00004000, /* multicast address frame */ | 121 | GELIC_DESCR_RXMLTCST = 0x00004000, /* multicast address frame */ |
| 122 | /* bit 13..0 reserved */ | 122 | /* bit 13..0 reserved */ |
| 123 | }; | 123 | }; |
diff --git a/drivers/net/ps3_gelic_wireless.c b/drivers/net/ps3_gelic_wireless.c index 4a624a29393f..b5ae29d20f2e 100644 --- a/drivers/net/ps3_gelic_wireless.c +++ b/drivers/net/ps3_gelic_wireless.c | |||
| @@ -814,7 +814,7 @@ static int gelic_wl_set_auth(struct net_device *netdev, | |||
| 814 | * you will not decide suitable cipher from | 814 | * you will not decide suitable cipher from |
| 815 | * its beacon. | 815 | * its beacon. |
| 816 | * You should have knowledge about the AP's | 816 | * You should have knowledge about the AP's |
| 817 | * cipher infomation in other method prior to | 817 | * cipher information in other method prior to |
| 818 | * the association. | 818 | * the association. |
| 819 | */ | 819 | */ |
| 820 | if (!precise_ie()) | 820 | if (!precise_ie()) |
diff --git a/drivers/net/pxa168_eth.c b/drivers/net/pxa168_eth.c index 1b63c8aef121..89f7540d90f9 100644 --- a/drivers/net/pxa168_eth.c +++ b/drivers/net/pxa168_eth.c | |||
| @@ -462,7 +462,7 @@ static u32 hash_function(unsigned char *mac_addr_orig) | |||
| 462 | * pep - ETHERNET . | 462 | * pep - ETHERNET . |
| 463 | * mac_addr - MAC address. | 463 | * mac_addr - MAC address. |
| 464 | * skip - if 1, skip this address.Used in case of deleting an entry which is a | 464 | * skip - if 1, skip this address.Used in case of deleting an entry which is a |
| 465 | * part of chain in the hash table.We cant just delete the entry since | 465 | * part of chain in the hash table.We can't just delete the entry since |
| 466 | * that will break the chain.We need to defragment the tables time to | 466 | * that will break the chain.We need to defragment the tables time to |
| 467 | * time. | 467 | * time. |
| 468 | * rd - 0 Discard packet upon match. | 468 | * rd - 0 Discard packet upon match. |
diff --git a/drivers/net/qla3xxx.h b/drivers/net/qla3xxx.h index 3362a661248c..73e234366a82 100644 --- a/drivers/net/qla3xxx.h +++ b/drivers/net/qla3xxx.h | |||
| @@ -770,7 +770,7 @@ enum { | |||
| 770 | FM93C56A_WDS = 0x0, | 770 | FM93C56A_WDS = 0x0, |
| 771 | FM93C56A_ERASE = 0x3, | 771 | FM93C56A_ERASE = 0x3, |
| 772 | FM93C56A_ERASE_ALL = 0x0, | 772 | FM93C56A_ERASE_ALL = 0x0, |
| 773 | /* Command Extentions */ | 773 | /* Command Extensions */ |
| 774 | FM93C56A_WEN_EXT = 0x3, | 774 | FM93C56A_WEN_EXT = 0x3, |
| 775 | FM93C56A_WRITE_ALL_EXT = 0x1, | 775 | FM93C56A_WRITE_ALL_EXT = 0x1, |
| 776 | FM93C56A_WDS_EXT = 0x0, | 776 | FM93C56A_WDS_EXT = 0x0, |
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 49bfa5813068..5bb311945436 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c | |||
| @@ -660,7 +660,7 @@ static void ql_disable_interrupts(struct ql_adapter *qdev) | |||
| 660 | /* If we're running with multiple MSI-X vectors then we enable on the fly. | 660 | /* If we're running with multiple MSI-X vectors then we enable on the fly. |
| 661 | * Otherwise, we may have multiple outstanding workers and don't want to | 661 | * Otherwise, we may have multiple outstanding workers and don't want to |
| 662 | * enable until the last one finishes. In this case, the irq_cnt gets | 662 | * enable until the last one finishes. In this case, the irq_cnt gets |
| 663 | * incremented everytime we queue a worker and decremented everytime | 663 | * incremented every time we queue a worker and decremented every time |
| 664 | * a worker finishes. Once it hits zero we enable the interrupt. | 664 | * a worker finishes. Once it hits zero we enable the interrupt. |
| 665 | */ | 665 | */ |
| 666 | u32 ql_enable_completion_interrupt(struct ql_adapter *qdev, u32 intr) | 666 | u32 ql_enable_completion_interrupt(struct ql_adapter *qdev, u32 intr) |
| @@ -3299,7 +3299,7 @@ msi: | |||
| 3299 | * will service it. An example would be if there are | 3299 | * will service it. An example would be if there are |
| 3300 | * 2 vectors (so 2 RSS rings) and 8 TX completion rings. | 3300 | * 2 vectors (so 2 RSS rings) and 8 TX completion rings. |
| 3301 | * This would mean that vector 0 would service RSS ring 0 | 3301 | * This would mean that vector 0 would service RSS ring 0 |
| 3302 | * and TX competion rings 0,1,2 and 3. Vector 1 would | 3302 | * and TX completion rings 0,1,2 and 3. Vector 1 would |
| 3303 | * service RSS ring 1 and TX completion rings 4,5,6 and 7. | 3303 | * service RSS ring 1 and TX completion rings 4,5,6 and 7. |
| 3304 | */ | 3304 | */ |
| 3305 | static void ql_set_tx_vect(struct ql_adapter *qdev) | 3305 | static void ql_set_tx_vect(struct ql_adapter *qdev) |
| @@ -4152,7 +4152,7 @@ static int ql_change_rx_buffers(struct ql_adapter *qdev) | |||
| 4152 | int i, status; | 4152 | int i, status; |
| 4153 | u32 lbq_buf_len; | 4153 | u32 lbq_buf_len; |
| 4154 | 4154 | ||
| 4155 | /* Wait for an oustanding reset to complete. */ | 4155 | /* Wait for an outstanding reset to complete. */ |
| 4156 | if (!test_bit(QL_ADAPTER_UP, &qdev->flags)) { | 4156 | if (!test_bit(QL_ADAPTER_UP, &qdev->flags)) { |
| 4157 | int i = 3; | 4157 | int i = 3; |
| 4158 | while (i-- && !test_bit(QL_ADAPTER_UP, &qdev->flags)) { | 4158 | while (i-- && !test_bit(QL_ADAPTER_UP, &qdev->flags)) { |
| @@ -4281,7 +4281,7 @@ static void qlge_set_multicast_list(struct net_device *ndev) | |||
| 4281 | if (ql_set_routing_reg | 4281 | if (ql_set_routing_reg |
| 4282 | (qdev, RT_IDX_PROMISCUOUS_SLOT, RT_IDX_VALID, 1)) { | 4282 | (qdev, RT_IDX_PROMISCUOUS_SLOT, RT_IDX_VALID, 1)) { |
| 4283 | netif_err(qdev, hw, qdev->ndev, | 4283 | netif_err(qdev, hw, qdev->ndev, |
| 4284 | "Failed to set promiscous mode.\n"); | 4284 | "Failed to set promiscuous mode.\n"); |
| 4285 | } else { | 4285 | } else { |
| 4286 | set_bit(QL_PROMISCUOUS, &qdev->flags); | 4286 | set_bit(QL_PROMISCUOUS, &qdev->flags); |
| 4287 | } | 4287 | } |
| @@ -4291,7 +4291,7 @@ static void qlge_set_multicast_list(struct net_device *ndev) | |||
| 4291 | if (ql_set_routing_reg | 4291 | if (ql_set_routing_reg |
| 4292 | (qdev, RT_IDX_PROMISCUOUS_SLOT, RT_IDX_VALID, 0)) { | 4292 | (qdev, RT_IDX_PROMISCUOUS_SLOT, RT_IDX_VALID, 0)) { |
| 4293 | netif_err(qdev, hw, qdev->ndev, | 4293 | netif_err(qdev, hw, qdev->ndev, |
| 4294 | "Failed to clear promiscous mode.\n"); | 4294 | "Failed to clear promiscuous mode.\n"); |
| 4295 | } else { | 4295 | } else { |
| 4296 | clear_bit(QL_PROMISCUOUS, &qdev->flags); | 4296 | clear_bit(QL_PROMISCUOUS, &qdev->flags); |
| 4297 | } | 4297 | } |
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c index e3ebd90ae651..200a363c3bf5 100644 --- a/drivers/net/r6040.c +++ b/drivers/net/r6040.c | |||
| @@ -535,7 +535,7 @@ static int r6040_rx(struct net_device *dev, int limit) | |||
| 535 | /* RX dribble */ | 535 | /* RX dribble */ |
| 536 | if (err & DSC_RX_ERR_DRI) | 536 | if (err & DSC_RX_ERR_DRI) |
| 537 | dev->stats.rx_frame_errors++; | 537 | dev->stats.rx_frame_errors++; |
| 538 | /* Buffer lenght exceeded */ | 538 | /* Buffer length exceeded */ |
| 539 | if (err & DSC_RX_ERR_BUF) | 539 | if (err & DSC_RX_ERR_BUF) |
| 540 | dev->stats.rx_length_errors++; | 540 | dev->stats.rx_length_errors++; |
| 541 | /* Packet too long */ | 541 | /* Packet too long */ |
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 356e74d20b80..337bdcd5abc9 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
| @@ -2353,7 +2353,7 @@ static int start_nic(struct s2io_nic *nic) | |||
| 2353 | 2353 | ||
| 2354 | if (s2io_link_fault_indication(nic) == MAC_RMAC_ERR_TIMER) { | 2354 | if (s2io_link_fault_indication(nic) == MAC_RMAC_ERR_TIMER) { |
| 2355 | /* | 2355 | /* |
| 2356 | * Dont see link state interrupts initally on some switches, | 2356 | * Dont see link state interrupts initially on some switches, |
| 2357 | * so directly scheduling the link state task here. | 2357 | * so directly scheduling the link state task here. |
| 2358 | */ | 2358 | */ |
| 2359 | schedule_work(&nic->set_link_task); | 2359 | schedule_work(&nic->set_link_task); |
| @@ -3563,7 +3563,7 @@ static void s2io_reset(struct s2io_nic *sp) | |||
| 3563 | } | 3563 | } |
| 3564 | 3564 | ||
| 3565 | /* | 3565 | /* |
| 3566 | * Clear spurious ECC interrupts that would have occured on | 3566 | * Clear spurious ECC interrupts that would have occurred on |
| 3567 | * XFRAME II cards after reset. | 3567 | * XFRAME II cards after reset. |
| 3568 | */ | 3568 | */ |
| 3569 | if (sp->device_type == XFRAME_II_DEVICE) { | 3569 | if (sp->device_type == XFRAME_II_DEVICE) { |
| @@ -4065,7 +4065,7 @@ static int s2io_close(struct net_device *dev) | |||
| 4065 | * Description : | 4065 | * Description : |
| 4066 | * This function is the Tx entry point of the driver. S2IO NIC supports | 4066 | * This function is the Tx entry point of the driver. S2IO NIC supports |
| 4067 | * certain protocol assist features on Tx side, namely CSO, S/G, LSO. | 4067 | * certain protocol assist features on Tx side, namely CSO, S/G, LSO. |
| 4068 | * NOTE: when device cant queue the pkt,just the trans_start variable will | 4068 | * NOTE: when device can't queue the pkt,just the trans_start variable will |
| 4069 | * not be upadted. | 4069 | * not be upadted. |
| 4070 | * Return value: | 4070 | * Return value: |
| 4071 | * 0 on success & 1 on failure. | 4071 | * 0 on success & 1 on failure. |
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h index 7d160306b651..2d144979f6f8 100644 --- a/drivers/net/s2io.h +++ b/drivers/net/s2io.h | |||
| @@ -376,7 +376,7 @@ static const u16 fifo_selector[MAX_TX_FIFOS] = {0, 1, 3, 3, 7, 7, 7, 7}; | |||
| 376 | /* Maintains Per FIFO related information. */ | 376 | /* Maintains Per FIFO related information. */ |
| 377 | struct tx_fifo_config { | 377 | struct tx_fifo_config { |
| 378 | #define MAX_AVAILABLE_TXDS 8192 | 378 | #define MAX_AVAILABLE_TXDS 8192 |
| 379 | u32 fifo_len; /* specifies len of FIFO upto 8192, ie no of TxDLs */ | 379 | u32 fifo_len; /* specifies len of FIFO up to 8192, ie no of TxDLs */ |
| 380 | /* Priority definition */ | 380 | /* Priority definition */ |
| 381 | #define TX_FIFO_PRI_0 0 /*Highest */ | 381 | #define TX_FIFO_PRI_0 0 /*Highest */ |
| 382 | #define TX_FIFO_PRI_1 1 | 382 | #define TX_FIFO_PRI_1 1 |
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index 734fcfb52e85..d96b23769bd1 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c | |||
| @@ -692,7 +692,7 @@ static int falcon_gmii_wait(struct efx_nic *efx) | |||
| 692 | efx_oword_t md_stat; | 692 | efx_oword_t md_stat; |
| 693 | int count; | 693 | int count; |
| 694 | 694 | ||
| 695 | /* wait upto 50ms - taken max from datasheet */ | 695 | /* wait up to 50ms - taken max from datasheet */ |
| 696 | for (count = 0; count < 5000; count++) { | 696 | for (count = 0; count < 5000; count++) { |
| 697 | efx_reado(efx, &md_stat, FR_AB_MD_STAT); | 697 | efx_reado(efx, &md_stat, FR_AB_MD_STAT); |
| 698 | if (EFX_OWORD_FIELD(md_stat, FRF_AB_MD_BSY) == 0) { | 698 | if (EFX_OWORD_FIELD(md_stat, FRF_AB_MD_BSY) == 0) { |
| @@ -1221,7 +1221,7 @@ static int falcon_reset_sram(struct efx_nic *efx) | |||
| 1221 | 1221 | ||
| 1222 | return 0; | 1222 | return 0; |
| 1223 | } | 1223 | } |
| 1224 | } while (++count < 20); /* wait upto 0.4 sec */ | 1224 | } while (++count < 20); /* wait up to 0.4 sec */ |
| 1225 | 1225 | ||
| 1226 | netif_err(efx, hw, efx->net_dev, "timed out waiting for SRAM reset\n"); | 1226 | netif_err(efx, hw, efx->net_dev, "timed out waiting for SRAM reset\n"); |
| 1227 | return -ETIMEDOUT; | 1227 | return -ETIMEDOUT; |
diff --git a/drivers/net/sfc/mcdi.c b/drivers/net/sfc/mcdi.c index 5e118f0d2479..d98479030ef2 100644 --- a/drivers/net/sfc/mcdi.c +++ b/drivers/net/sfc/mcdi.c | |||
| @@ -453,7 +453,7 @@ static void efx_mcdi_ev_death(struct efx_nic *efx, int rc) | |||
| 453 | * | 453 | * |
| 454 | * There's a race here with efx_mcdi_rpc(), because we might receive | 454 | * There's a race here with efx_mcdi_rpc(), because we might receive |
| 455 | * a REBOOT event *before* the request has been copied out. In polled | 455 | * a REBOOT event *before* the request has been copied out. In polled |
| 456 | * mode (during startup) this is irrelevent, because efx_mcdi_complete() | 456 | * mode (during startup) this is irrelevant, because efx_mcdi_complete() |
| 457 | * is ignored. In event mode, this condition is just an edge-case of | 457 | * is ignored. In event mode, this condition is just an edge-case of |
| 458 | * receiving a REBOOT event after posting the MCDI request. Did the mc | 458 | * receiving a REBOOT event after posting the MCDI request. Did the mc |
| 459 | * reboot before or after the copyout? The best we can do always is | 459 | * reboot before or after the copyout? The best we can do always is |
diff --git a/drivers/net/sfc/mcdi_pcol.h b/drivers/net/sfc/mcdi_pcol.h index b86a15f221ad..41fe06fa0600 100644 --- a/drivers/net/sfc/mcdi_pcol.h +++ b/drivers/net/sfc/mcdi_pcol.h | |||
| @@ -103,7 +103,7 @@ | |||
| 103 | * | 103 | * |
| 104 | * If Code==CMDDONE, then the fields are further interpreted as: | 104 | * If Code==CMDDONE, then the fields are further interpreted as: |
| 105 | * | 105 | * |
| 106 | * - LEVEL==INFO Command succeded | 106 | * - LEVEL==INFO Command succeeded |
| 107 | * - LEVEL==ERR Command failed | 107 | * - LEVEL==ERR Command failed |
| 108 | * | 108 | * |
| 109 | * 0 8 16 24 32 | 109 | * 0 8 16 24 32 |
| @@ -572,7 +572,7 @@ | |||
| 572 | (4*(_numwords)) | 572 | (4*(_numwords)) |
| 573 | 573 | ||
| 574 | /* MC_CMD_SET_RAND_SEED: | 574 | /* MC_CMD_SET_RAND_SEED: |
| 575 | * Set the 16byte seed for the MC psuedo-random generator | 575 | * Set the 16byte seed for the MC pseudo-random generator |
| 576 | */ | 576 | */ |
| 577 | #define MC_CMD_SET_RAND_SEED 0x1a | 577 | #define MC_CMD_SET_RAND_SEED 0x1a |
| 578 | #define MC_CMD_SET_RAND_SEED_IN_LEN 16 | 578 | #define MC_CMD_SET_RAND_SEED_IN_LEN 16 |
| @@ -1162,7 +1162,7 @@ | |||
| 1162 | #define MC_CMD_MAC_STATS_CMD_CLEAR_WIDTH 1 | 1162 | #define MC_CMD_MAC_STATS_CMD_CLEAR_WIDTH 1 |
| 1163 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_CHANGE_LBN 2 | 1163 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_CHANGE_LBN 2 |
| 1164 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_CHANGE_WIDTH 1 | 1164 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_CHANGE_WIDTH 1 |
| 1165 | /* Remaining PERIOD* fields only relevent when PERIODIC_CHANGE is set */ | 1165 | /* Remaining PERIOD* fields only relevant when PERIODIC_CHANGE is set */ |
| 1166 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_ENABLE_LBN 3 | 1166 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_ENABLE_LBN 3 |
| 1167 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_ENABLE_WIDTH 1 | 1167 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_ENABLE_WIDTH 1 |
| 1168 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_CLEAR_LBN 4 | 1168 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_CLEAR_LBN 4 |
diff --git a/drivers/net/sfc/mcdi_phy.c b/drivers/net/sfc/mcdi_phy.c index ec3f740f5465..7e3c65b0c99f 100644 --- a/drivers/net/sfc/mcdi_phy.c +++ b/drivers/net/sfc/mcdi_phy.c | |||
| @@ -449,7 +449,7 @@ void efx_mcdi_phy_check_fcntl(struct efx_nic *efx, u32 lpa) | |||
| 449 | struct efx_mcdi_phy_data *phy_cfg = efx->phy_data; | 449 | struct efx_mcdi_phy_data *phy_cfg = efx->phy_data; |
| 450 | u32 rmtadv; | 450 | u32 rmtadv; |
| 451 | 451 | ||
| 452 | /* The link partner capabilities are only relevent if the | 452 | /* The link partner capabilities are only relevant if the |
| 453 | * link supports flow control autonegotiation */ | 453 | * link supports flow control autonegotiation */ |
| 454 | if (~phy_cfg->supported_cap & (1 << MC_CMD_PHY_CAP_AN_LBN)) | 454 | if (~phy_cfg->supported_cap & (1 << MC_CMD_PHY_CAP_AN_LBN)) |
| 455 | return; | 455 | return; |
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h index 215d5c51bfa0..9ffa9a6b55a0 100644 --- a/drivers/net/sfc/net_driver.h +++ b/drivers/net/sfc/net_driver.h | |||
| @@ -670,7 +670,7 @@ struct efx_filter_state; | |||
| 670 | * @irq_zero_count: Number of legacy IRQs seen with queue flags == 0 | 670 | * @irq_zero_count: Number of legacy IRQs seen with queue flags == 0 |
| 671 | * @fatal_irq_level: IRQ level (bit number) used for serious errors | 671 | * @fatal_irq_level: IRQ level (bit number) used for serious errors |
| 672 | * @mtd_list: List of MTDs attached to the NIC | 672 | * @mtd_list: List of MTDs attached to the NIC |
| 673 | * @nic_data: Hardware dependant state | 673 | * @nic_data: Hardware dependent state |
| 674 | * @mac_lock: MAC access lock. Protects @port_enabled, @phy_mode, | 674 | * @mac_lock: MAC access lock. Protects @port_enabled, @phy_mode, |
| 675 | * @port_inhibited, efx_monitor() and efx_reconfigure_port() | 675 | * @port_inhibited, efx_monitor() and efx_reconfigure_port() |
| 676 | * @port_enabled: Port enabled indicator. | 676 | * @port_enabled: Port enabled indicator. |
diff --git a/drivers/net/sgiseeq.c b/drivers/net/sgiseeq.c index 3a0cc63428ee..dd03bf619988 100644 --- a/drivers/net/sgiseeq.c +++ b/drivers/net/sgiseeq.c | |||
| @@ -33,7 +33,7 @@ static char *sgiseeqstr = "SGI Seeq8003"; | |||
| 33 | * with that in mind, I've decided to make this driver look completely like a | 33 | * with that in mind, I've decided to make this driver look completely like a |
| 34 | * stupid Lance from a driver architecture perspective. Only difference is that | 34 | * stupid Lance from a driver architecture perspective. Only difference is that |
| 35 | * here our "ring buffer" looks and acts like a real Lance one does but is | 35 | * here our "ring buffer" looks and acts like a real Lance one does but is |
| 36 | * layed out like how the HPC DMA and the Seeq want it to. You'd be surprised | 36 | * laid out like how the HPC DMA and the Seeq want it to. You'd be surprised |
| 37 | * how a stupid idea like this can pay off in performance, not to mention | 37 | * how a stupid idea like this can pay off in performance, not to mention |
| 38 | * making this driver 2,000 times easier to write. ;-) | 38 | * making this driver 2,000 times easier to write. ;-) |
| 39 | */ | 39 | */ |
| @@ -77,7 +77,7 @@ struct sgiseeq_tx_desc { | |||
| 77 | }; | 77 | }; |
| 78 | 78 | ||
| 79 | /* | 79 | /* |
| 80 | * Warning: This structure is layed out in a certain way because HPC dma | 80 | * Warning: This structure is laid out in a certain way because HPC dma |
| 81 | * descriptors must be 8-byte aligned. So don't touch this without | 81 | * descriptors must be 8-byte aligned. So don't touch this without |
| 82 | * some care. | 82 | * some care. |
| 83 | */ | 83 | */ |
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index e9e7a530552c..8a72a979ee71 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c | |||
| @@ -1875,7 +1875,7 @@ static int sh_eth_drv_probe(struct platform_device *pdev) | |||
| 1875 | if (ret) | 1875 | if (ret) |
| 1876 | goto out_unregister; | 1876 | goto out_unregister; |
| 1877 | 1877 | ||
| 1878 | /* print device infomation */ | 1878 | /* print device information */ |
| 1879 | pr_info("Base address at 0x%x, %pM, IRQ %d.\n", | 1879 | pr_info("Base address at 0x%x, %pM, IRQ %d.\n", |
| 1880 | (u32)ndev->base_addr, ndev->dev_addr, ndev->irq); | 1880 | (u32)ndev->base_addr, ndev->dev_addr, ndev->irq); |
| 1881 | 1881 | ||
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index 3406ed870917..b436e007eea0 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c | |||
| @@ -93,7 +93,7 @@ enum sis190_registers { | |||
| 93 | IntrStatus = 0x20, | 93 | IntrStatus = 0x20, |
| 94 | IntrMask = 0x24, | 94 | IntrMask = 0x24, |
| 95 | IntrControl = 0x28, | 95 | IntrControl = 0x28, |
| 96 | IntrTimer = 0x2c, // unused (Interupt Timer) | 96 | IntrTimer = 0x2c, // unused (Interrupt Timer) |
| 97 | PMControl = 0x30, // unused (Power Mgmt Control/Status) | 97 | PMControl = 0x30, // unused (Power Mgmt Control/Status) |
| 98 | rsv2 = 0x34, // reserved | 98 | rsv2 = 0x34, // reserved |
| 99 | ROMControl = 0x38, | 99 | ROMControl = 0x38, |
| @@ -234,7 +234,7 @@ enum _DescStatusBit { | |||
| 234 | RxSizeMask = 0x0000ffff | 234 | RxSizeMask = 0x0000ffff |
| 235 | /* | 235 | /* |
| 236 | * The asic could apparently do vlan, TSO, jumbo (sis191 only) and | 236 | * The asic could apparently do vlan, TSO, jumbo (sis191 only) and |
| 237 | * provide two (unused with Linux) Tx queues. No publically | 237 | * provide two (unused with Linux) Tx queues. No publicly |
| 238 | * available documentation alas. | 238 | * available documentation alas. |
| 239 | */ | 239 | */ |
| 240 | }; | 240 | }; |
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c index 84d4167eee9a..cb317cd069ff 100644 --- a/drivers/net/sis900.c +++ b/drivers/net/sis900.c | |||
| @@ -1180,7 +1180,7 @@ sis900_init_rx_ring(struct net_device *net_dev) | |||
| 1180 | * | 1180 | * |
| 1181 | * 630E equalizer workaround rule(Cyrus Huang 08/15) | 1181 | * 630E equalizer workaround rule(Cyrus Huang 08/15) |
| 1182 | * PHY register 14h(Test) | 1182 | * PHY register 14h(Test) |
| 1183 | * Bit 14: 0 -- Automatically dectect (default) | 1183 | * Bit 14: 0 -- Automatically detect (default) |
| 1184 | * 1 -- Manually set Equalizer filter | 1184 | * 1 -- Manually set Equalizer filter |
| 1185 | * Bit 13: 0 -- (Default) | 1185 | * Bit 13: 0 -- (Default) |
| 1186 | * 1 -- Speed up convergence of equalizer setting | 1186 | * 1 -- Speed up convergence of equalizer setting |
| @@ -1192,7 +1192,7 @@ sis900_init_rx_ring(struct net_device *net_dev) | |||
| 1192 | * Then set equalizer value, and set Bit 14 to 1, Bit 9 to 0 | 1192 | * Then set equalizer value, and set Bit 14 to 1, Bit 9 to 0 |
| 1193 | * Link Off:Set Bit 13 to 1, Bit 14 to 0 | 1193 | * Link Off:Set Bit 13 to 1, Bit 14 to 0 |
| 1194 | * Calculate Equalizer value: | 1194 | * Calculate Equalizer value: |
| 1195 | * When Link is ON and Bit 14 is 0, SIS900PHY will auto-dectect proper equalizer value. | 1195 | * When Link is ON and Bit 14 is 0, SIS900PHY will auto-detect proper equalizer value. |
| 1196 | * When the equalizer is stable, this value is not a fixed value. It will be within | 1196 | * When the equalizer is stable, this value is not a fixed value. It will be within |
| 1197 | * a small range(eg. 7~9). Then we get a minimum and a maximum value(eg. min=7, max=9) | 1197 | * a small range(eg. 7~9). Then we get a minimum and a maximum value(eg. min=7, max=9) |
| 1198 | * 0 <= max <= 4 --> set equalizer to max | 1198 | * 0 <= max <= 4 --> set equalizer to max |
| @@ -1723,7 +1723,7 @@ static int sis900_rx(struct net_device *net_dev) | |||
| 1723 | rx_size = data_size - CRC_SIZE; | 1723 | rx_size = data_size - CRC_SIZE; |
| 1724 | 1724 | ||
| 1725 | #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) | 1725 | #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) |
| 1726 | /* ``TOOLONG'' flag means jumbo packet recived. */ | 1726 | /* ``TOOLONG'' flag means jumbo packet received. */ |
| 1727 | if ((rx_status & TOOLONG) && data_size <= MAX_FRAME_SIZE) | 1727 | if ((rx_status & TOOLONG) && data_size <= MAX_FRAME_SIZE) |
| 1728 | rx_status &= (~ ((unsigned int)TOOLONG)); | 1728 | rx_status &= (~ ((unsigned int)TOOLONG)); |
| 1729 | #endif | 1729 | #endif |
diff --git a/drivers/net/skfp/ess.c b/drivers/net/skfp/ess.c index 8639a0884f5c..2fc5987b41dc 100644 --- a/drivers/net/skfp/ess.c +++ b/drivers/net/skfp/ess.c | |||
| @@ -241,7 +241,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
| 241 | != SMT_RDF_SUCCESS) || | 241 | != SMT_RDF_SUCCESS) || |
| 242 | (sm->smt_tid != smc->ess.alloc_trans_id)) { | 242 | (sm->smt_tid != smc->ess.alloc_trans_id)) { |
| 243 | 243 | ||
| 244 | DB_ESS("ESS: Allocation Responce not accepted\n",0,0) ; | 244 | DB_ESS("ESS: Allocation Response not accepted\n",0,0) ; |
| 245 | return fs; | 245 | return fs; |
| 246 | } | 246 | } |
| 247 | 247 | ||
| @@ -393,7 +393,7 @@ static int process_bw_alloc(struct s_smc *smc, long int payload, long int overhe | |||
| 393 | * | T-NEG | | 393 | * | T-NEG | |
| 394 | * - - | 394 | * - - |
| 395 | * | 395 | * |
| 396 | * T-NEG is discribed by the equation: | 396 | * T-NEG is described by the equation: |
| 397 | * | 397 | * |
| 398 | * (-) fddiMACT-NEG | 398 | * (-) fddiMACT-NEG |
| 399 | * T-NEG = ------------------- | 399 | * T-NEG = ------------------- |
| @@ -479,7 +479,7 @@ static void ess_send_response(struct s_smc *smc, struct smt_header *sm, | |||
| 479 | void *p ; | 479 | void *p ; |
| 480 | 480 | ||
| 481 | /* | 481 | /* |
| 482 | * get and initialize the responce frame | 482 | * get and initialize the response frame |
| 483 | */ | 483 | */ |
| 484 | if (sba_cmd == CHANGE_ALLOCATION) { | 484 | if (sba_cmd == CHANGE_ALLOCATION) { |
| 485 | if (!(mb=smt_build_frame(smc,SMT_RAF,SMT_REPLY, | 485 | if (!(mb=smt_build_frame(smc,SMT_RAF,SMT_REPLY, |
| @@ -578,7 +578,7 @@ static void ess_send_alc_req(struct s_smc *smc) | |||
| 578 | } | 578 | } |
| 579 | 579 | ||
| 580 | /* | 580 | /* |
| 581 | * get and initialize the responce frame | 581 | * get and initialize the response frame |
| 582 | */ | 582 | */ |
| 583 | if (!(mb=smt_build_frame(smc,SMT_RAF,SMT_REQUEST, | 583 | if (!(mb=smt_build_frame(smc,SMT_RAF,SMT_REQUEST, |
| 584 | sizeof(struct smt_sba_alc_req)))) | 584 | sizeof(struct smt_sba_alc_req)))) |
diff --git a/drivers/net/skfp/fplustm.c b/drivers/net/skfp/fplustm.c index ca4e7bb6a5a8..a20ed1a98099 100644 --- a/drivers/net/skfp/fplustm.c +++ b/drivers/net/skfp/fplustm.c | |||
| @@ -340,7 +340,7 @@ static void mac_counter_init(struct s_smc *smc) | |||
| 340 | outpw(FM_A(FM_LCNTR),0) ; | 340 | outpw(FM_A(FM_LCNTR),0) ; |
| 341 | outpw(FM_A(FM_ECNTR),0) ; | 341 | outpw(FM_A(FM_ECNTR),0) ; |
| 342 | /* | 342 | /* |
| 343 | * clear internal error counter stucture | 343 | * clear internal error counter structure |
| 344 | */ | 344 | */ |
| 345 | ec = (u_long *)&smc->hw.fp.err_stats ; | 345 | ec = (u_long *)&smc->hw.fp.err_stats ; |
| 346 | for (i = (sizeof(struct err_st)/sizeof(long)) ; i ; i--) | 346 | for (i = (sizeof(struct err_st)/sizeof(long)) ; i ; i--) |
| @@ -1262,8 +1262,8 @@ Function DOWNCALL/INTERN (SMT, fplustm.c) | |||
| 1262 | 1262 | ||
| 1263 | Para mode = 1 RX_ENABLE_ALLMULTI enable all multicasts | 1263 | Para mode = 1 RX_ENABLE_ALLMULTI enable all multicasts |
| 1264 | 2 RX_DISABLE_ALLMULTI disable "enable all multicasts" | 1264 | 2 RX_DISABLE_ALLMULTI disable "enable all multicasts" |
| 1265 | 3 RX_ENABLE_PROMISC enable promiscous | 1265 | 3 RX_ENABLE_PROMISC enable promiscuous |
| 1266 | 4 RX_DISABLE_PROMISC disable promiscous | 1266 | 4 RX_DISABLE_PROMISC disable promiscuous |
| 1267 | 5 RX_ENABLE_NSA enable reception of NSA frames | 1267 | 5 RX_ENABLE_NSA enable reception of NSA frames |
| 1268 | 6 RX_DISABLE_NSA disable reception of NSA frames | 1268 | 6 RX_DISABLE_NSA disable reception of NSA frames |
| 1269 | 1269 | ||
diff --git a/drivers/net/skfp/h/cmtdef.h b/drivers/net/skfp/h/cmtdef.h index f2f771d8be76..5a6c6122ccb0 100644 --- a/drivers/net/skfp/h/cmtdef.h +++ b/drivers/net/skfp/h/cmtdef.h | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | 19 | ||
| 20 | /* | 20 | /* |
| 21 | * implementation specific constants | 21 | * implementation specific constants |
| 22 | * MODIIFY THE FOLLWOING THREE DEFINES | 22 | * MODIIFY THE FOLLOWING THREE DEFINES |
| 23 | */ | 23 | */ |
| 24 | #define AMDPLC /* if Amd PLC chip used */ | 24 | #define AMDPLC /* if Amd PLC chip used */ |
| 25 | #ifdef CONC | 25 | #ifdef CONC |
| @@ -456,7 +456,7 @@ struct s_plc { | |||
| 456 | u_long soft_err ; /* error counter */ | 456 | u_long soft_err ; /* error counter */ |
| 457 | u_long parity_err ; /* error counter */ | 457 | u_long parity_err ; /* error counter */ |
| 458 | u_long ebuf_err ; /* error counter */ | 458 | u_long ebuf_err ; /* error counter */ |
| 459 | u_long ebuf_cont ; /* continous error counter */ | 459 | u_long ebuf_cont ; /* continuous error counter */ |
| 460 | u_long phyinv ; /* error counter */ | 460 | u_long phyinv ; /* error counter */ |
| 461 | u_long vsym_ctr ; /* error counter */ | 461 | u_long vsym_ctr ; /* error counter */ |
| 462 | u_long mini_ctr ; /* error counter */ | 462 | u_long mini_ctr ; /* error counter */ |
diff --git a/drivers/net/skfp/h/fplustm.h b/drivers/net/skfp/h/fplustm.h index 6d738e1e2393..d43191ed938b 100644 --- a/drivers/net/skfp/h/fplustm.h +++ b/drivers/net/skfp/h/fplustm.h | |||
| @@ -237,8 +237,8 @@ struct s_smt_fp { | |||
| 237 | */ | 237 | */ |
| 238 | #define RX_ENABLE_ALLMULTI 1 /* enable all multicasts */ | 238 | #define RX_ENABLE_ALLMULTI 1 /* enable all multicasts */ |
| 239 | #define RX_DISABLE_ALLMULTI 2 /* disable "enable all multicasts" */ | 239 | #define RX_DISABLE_ALLMULTI 2 /* disable "enable all multicasts" */ |
| 240 | #define RX_ENABLE_PROMISC 3 /* enable promiscous */ | 240 | #define RX_ENABLE_PROMISC 3 /* enable promiscuous */ |
| 241 | #define RX_DISABLE_PROMISC 4 /* disable promiscous */ | 241 | #define RX_DISABLE_PROMISC 4 /* disable promiscuous */ |
| 242 | #define RX_ENABLE_NSA 5 /* enable reception of NSA frames */ | 242 | #define RX_ENABLE_NSA 5 /* enable reception of NSA frames */ |
| 243 | #define RX_DISABLE_NSA 6 /* disable reception of NSA frames */ | 243 | #define RX_DISABLE_NSA 6 /* disable reception of NSA frames */ |
| 244 | 244 | ||
diff --git a/drivers/net/skfp/h/smc.h b/drivers/net/skfp/h/smc.h index 026a83b9f743..c774a95902f5 100644 --- a/drivers/net/skfp/h/smc.h +++ b/drivers/net/skfp/h/smc.h | |||
| @@ -388,7 +388,7 @@ struct smt_config { | |||
| 388 | u_long rmt_t_poll ; /* RMT : claim/beacon poller */ | 388 | u_long rmt_t_poll ; /* RMT : claim/beacon poller */ |
| 389 | u_long rmt_dup_mac_behavior ; /* Flag for the beavior of SMT if | 389 | u_long rmt_dup_mac_behavior ; /* Flag for the beavior of SMT if |
| 390 | * a Duplicate MAC Address was detected. | 390 | * a Duplicate MAC Address was detected. |
| 391 | * FALSE: SMT will leave finaly the ring | 391 | * FALSE: SMT will leave finally the ring |
| 392 | * TRUE: SMT will reinstert into the ring | 392 | * TRUE: SMT will reinstert into the ring |
| 393 | */ | 393 | */ |
| 394 | u_long mac_d_max ; /* MAC : D_Max timer value */ | 394 | u_long mac_d_max ; /* MAC : D_Max timer value */ |
diff --git a/drivers/net/skfp/h/smt.h b/drivers/net/skfp/h/smt.h index 2976757a36fb..2030f9cbb24b 100644 --- a/drivers/net/skfp/h/smt.h +++ b/drivers/net/skfp/h/smt.h | |||
| @@ -793,7 +793,7 @@ struct smt_rdf { | |||
| 793 | } ; | 793 | } ; |
| 794 | 794 | ||
| 795 | /* | 795 | /* |
| 796 | * SBA Request Allocation Responce Frame | 796 | * SBA Request Allocation Response Frame |
| 797 | */ | 797 | */ |
| 798 | struct smt_sba_alc_res { | 798 | struct smt_sba_alc_res { |
| 799 | struct smt_header smt ; /* generic header */ | 799 | struct smt_header smt ; /* generic header */ |
diff --git a/drivers/net/skfp/h/supern_2.h b/drivers/net/skfp/h/supern_2.h index 5ba0b8306753..0b73690280f6 100644 --- a/drivers/net/skfp/h/supern_2.h +++ b/drivers/net/skfp/h/supern_2.h | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | 14 | ||
| 15 | /* | 15 | /* |
| 16 | defines for AMD Supernet II chip set | 16 | defines for AMD Supernet II chip set |
| 17 | the chips are refered to as | 17 | the chips are referred to as |
| 18 | FPLUS Formac Plus | 18 | FPLUS Formac Plus |
| 19 | PLC Physical Layer | 19 | PLC Physical Layer |
| 20 | 20 | ||
| @@ -386,7 +386,7 @@ struct tx_queue { | |||
| 386 | #define FM_MDISRCV (4<<8) /* disable receive function */ | 386 | #define FM_MDISRCV (4<<8) /* disable receive function */ |
| 387 | #define FM_MRES0 (5<<8) /* reserve */ | 387 | #define FM_MRES0 (5<<8) /* reserve */ |
| 388 | #define FM_MLIMPROM (6<<8) /* limited-promiscuous mode */ | 388 | #define FM_MLIMPROM (6<<8) /* limited-promiscuous mode */ |
| 389 | #define FM_MPROMISCOUS (7<<8) /* address detection : promiscous */ | 389 | #define FM_MPROMISCOUS (7<<8) /* address detection : promiscuous */ |
| 390 | 390 | ||
| 391 | #define FM_SELSA 0x0800 /* select-short-address bit */ | 391 | #define FM_SELSA 0x0800 /* select-short-address bit */ |
| 392 | 392 | ||
diff --git a/drivers/net/skfp/hwmtm.c b/drivers/net/skfp/hwmtm.c index af5a755e269d..e26398b5a7dc 100644 --- a/drivers/net/skfp/hwmtm.c +++ b/drivers/net/skfp/hwmtm.c | |||
| @@ -691,7 +691,7 @@ static u_long repair_rxd_ring(struct s_smc *smc, struct s_smt_rx_queue *queue) | |||
| 691 | * interrupt service routine, handles the interrupt requests | 691 | * interrupt service routine, handles the interrupt requests |
| 692 | * generated by the FDDI adapter. | 692 | * generated by the FDDI adapter. |
| 693 | * | 693 | * |
| 694 | * NOTE: The operating system dependent module must garantee that the | 694 | * NOTE: The operating system dependent module must guarantee that the |
| 695 | * interrupts of the adapter are disabled when it calls fddi_isr. | 695 | * interrupts of the adapter are disabled when it calls fddi_isr. |
| 696 | * | 696 | * |
| 697 | * About the USE_BREAK_ISR mechanismn: | 697 | * About the USE_BREAK_ISR mechanismn: |
diff --git a/drivers/net/skfp/pcmplc.c b/drivers/net/skfp/pcmplc.c index 112d35b1bf0e..88d02d0a42c4 100644 --- a/drivers/net/skfp/pcmplc.c +++ b/drivers/net/skfp/pcmplc.c | |||
| @@ -1680,7 +1680,7 @@ void plc_irq(struct s_smc *smc, int np, unsigned int cmd) | |||
| 1680 | * Prevent counter from being wrapped after | 1680 | * Prevent counter from being wrapped after |
| 1681 | * hanging years in that interrupt. | 1681 | * hanging years in that interrupt. |
| 1682 | */ | 1682 | */ |
| 1683 | plc->ebuf_cont++ ; /* Ebuf continous error */ | 1683 | plc->ebuf_cont++ ; /* Ebuf continuous error */ |
| 1684 | } | 1684 | } |
| 1685 | 1685 | ||
| 1686 | #ifdef SUPERNET_3 | 1686 | #ifdef SUPERNET_3 |
| @@ -1717,8 +1717,8 @@ void plc_irq(struct s_smc *smc, int np, unsigned int cmd) | |||
| 1717 | } | 1717 | } |
| 1718 | #endif /* SUPERNET_3 */ | 1718 | #endif /* SUPERNET_3 */ |
| 1719 | } else { | 1719 | } else { |
| 1720 | /* Reset the continous error variable */ | 1720 | /* Reset the continuous error variable */ |
| 1721 | plc->ebuf_cont = 0 ; /* reset Ebuf continous error */ | 1721 | plc->ebuf_cont = 0 ; /* reset Ebuf continuous error */ |
| 1722 | } | 1722 | } |
| 1723 | if (cmd & PL_PHYINV) { /* physical layer invalid signal */ | 1723 | if (cmd & PL_PHYINV) { /* physical layer invalid signal */ |
| 1724 | plc->phyinv++ ; | 1724 | plc->phyinv++ ; |
diff --git a/drivers/net/skfp/smt.c b/drivers/net/skfp/smt.c index 1e1bd0c201c8..08d94329c12f 100644 --- a/drivers/net/skfp/smt.c +++ b/drivers/net/skfp/smt.c | |||
| @@ -219,7 +219,7 @@ void smt_emulate_token_ct(struct s_smc *smc, int mac_index) | |||
| 219 | 219 | ||
| 220 | /* | 220 | /* |
| 221 | * Only when ring is up we will have a token count. The | 221 | * Only when ring is up we will have a token count. The |
| 222 | * flag is unfortunatly a single instance value. This | 222 | * flag is unfortunately a single instance value. This |
| 223 | * doesn't matter now, because we currently have only | 223 | * doesn't matter now, because we currently have only |
| 224 | * one MAC instance. | 224 | * one MAC instance. |
| 225 | */ | 225 | */ |
diff --git a/drivers/net/skge.h b/drivers/net/skge.h index 507addcaffa3..51c0214ac25c 100644 --- a/drivers/net/skge.h +++ b/drivers/net/skge.h | |||
| @@ -1038,7 +1038,7 @@ enum { | |||
| 1038 | 1038 | ||
| 1039 | PHY_ST_PRE_SUP = 1<<6, /* Bit 6: Preamble Suppression */ | 1039 | PHY_ST_PRE_SUP = 1<<6, /* Bit 6: Preamble Suppression */ |
| 1040 | PHY_ST_AN_OVER = 1<<5, /* Bit 5: Auto-Negotiation Over */ | 1040 | PHY_ST_AN_OVER = 1<<5, /* Bit 5: Auto-Negotiation Over */ |
| 1041 | PHY_ST_REM_FLT = 1<<4, /* Bit 4: Remote Fault Condition Occured */ | 1041 | PHY_ST_REM_FLT = 1<<4, /* Bit 4: Remote Fault Condition Occurred */ |
| 1042 | PHY_ST_AN_CAP = 1<<3, /* Bit 3: Auto-Negotiation Capability */ | 1042 | PHY_ST_AN_CAP = 1<<3, /* Bit 3: Auto-Negotiation Capability */ |
| 1043 | PHY_ST_LSYNC = 1<<2, /* Bit 2: Link Synchronized */ | 1043 | PHY_ST_LSYNC = 1<<2, /* Bit 2: Link Synchronized */ |
| 1044 | PHY_ST_JAB_DET = 1<<1, /* Bit 1: Jabber Detected */ | 1044 | PHY_ST_JAB_DET = 1<<1, /* Bit 1: Jabber Detected */ |
| @@ -1721,8 +1721,8 @@ enum { | |||
| 1721 | GM_GPSR_LINK_UP = 1<<12, /* Bit 12: Link Up Status */ | 1721 | GM_GPSR_LINK_UP = 1<<12, /* Bit 12: Link Up Status */ |
| 1722 | GM_GPSR_PAUSE = 1<<11, /* Bit 11: Pause State */ | 1722 | GM_GPSR_PAUSE = 1<<11, /* Bit 11: Pause State */ |
| 1723 | GM_GPSR_TX_ACTIVE = 1<<10, /* Bit 10: Tx in Progress */ | 1723 | GM_GPSR_TX_ACTIVE = 1<<10, /* Bit 10: Tx in Progress */ |
| 1724 | GM_GPSR_EXC_COL = 1<<9, /* Bit 9: Excessive Collisions Occured */ | 1724 | GM_GPSR_EXC_COL = 1<<9, /* Bit 9: Excessive Collisions Occurred */ |
| 1725 | GM_GPSR_LAT_COL = 1<<8, /* Bit 8: Late Collisions Occured */ | 1725 | GM_GPSR_LAT_COL = 1<<8, /* Bit 8: Late Collisions Occurred */ |
| 1726 | 1726 | ||
| 1727 | GM_GPSR_PHY_ST_CH = 1<<5, /* Bit 5: PHY Status Change */ | 1727 | GM_GPSR_PHY_ST_CH = 1<<5, /* Bit 5: PHY Status Change */ |
| 1728 | GM_GPSR_GIG_SPEED = 1<<4, /* Bit 4: Gigabit Speed (1 = 1000 Mbps) */ | 1728 | GM_GPSR_GIG_SPEED = 1<<4, /* Bit 4: Gigabit Speed (1 = 1000 Mbps) */ |
| @@ -2227,7 +2227,7 @@ enum { | |||
| 2227 | XM_ST_BC = 1<<7, /* Bit 7: Broadcast packet */ | 2227 | XM_ST_BC = 1<<7, /* Bit 7: Broadcast packet */ |
| 2228 | XM_ST_MC = 1<<6, /* Bit 6: Multicast packet */ | 2228 | XM_ST_MC = 1<<6, /* Bit 6: Multicast packet */ |
| 2229 | XM_ST_UC = 1<<5, /* Bit 5: Unicast packet */ | 2229 | XM_ST_UC = 1<<5, /* Bit 5: Unicast packet */ |
| 2230 | XM_ST_TX_UR = 1<<4, /* Bit 4: FIFO Underrun occured */ | 2230 | XM_ST_TX_UR = 1<<4, /* Bit 4: FIFO Underrun occurred */ |
| 2231 | XM_ST_CS_ERR = 1<<3, /* Bit 3: Carrier Sense Error */ | 2231 | XM_ST_CS_ERR = 1<<3, /* Bit 3: Carrier Sense Error */ |
| 2232 | XM_ST_LAT_COL = 1<<2, /* Bit 2: Late Collision Error */ | 2232 | XM_ST_LAT_COL = 1<<2, /* Bit 2: Late Collision Error */ |
| 2233 | XM_ST_MUL_COL = 1<<1, /* Bit 1: Multiple Collisions */ | 2233 | XM_ST_MUL_COL = 1<<1, /* Bit 1: Multiple Collisions */ |
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 2a91868788f7..ff8d262dc276 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
| @@ -932,7 +932,7 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port) | |||
| 932 | sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_CLR); | 932 | sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_CLR); |
| 933 | sky2_write16(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_OPER_ON); | 933 | sky2_write16(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_OPER_ON); |
| 934 | 934 | ||
| 935 | /* On chips without ram buffer, pause is controled by MAC level */ | 935 | /* On chips without ram buffer, pause is controlled by MAC level */ |
| 936 | if (!(hw->flags & SKY2_HW_RAM_BUFFER)) { | 936 | if (!(hw->flags & SKY2_HW_RAM_BUFFER)) { |
| 937 | /* Pause threshold is scaled by 8 in bytes */ | 937 | /* Pause threshold is scaled by 8 in bytes */ |
| 938 | if (hw->chip_id == CHIP_ID_YUKON_FE_P && | 938 | if (hw->chip_id == CHIP_ID_YUKON_FE_P && |
| @@ -3255,7 +3255,7 @@ static void sky2_reset(struct sky2_hw *hw) | |||
| 3255 | 3255 | ||
| 3256 | /* Take device down (offline). | 3256 | /* Take device down (offline). |
| 3257 | * Equivalent to doing dev_stop() but this does not | 3257 | * Equivalent to doing dev_stop() but this does not |
| 3258 | * inform upper layers of the transistion. | 3258 | * inform upper layers of the transition. |
| 3259 | */ | 3259 | */ |
| 3260 | static void sky2_detach(struct net_device *dev) | 3260 | static void sky2_detach(struct net_device *dev) |
| 3261 | { | 3261 | { |
diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h index 6861b0e8db9a..0c6d10c5f053 100644 --- a/drivers/net/sky2.h +++ b/drivers/net/sky2.h | |||
| @@ -1194,7 +1194,7 @@ enum { | |||
| 1194 | 1194 | ||
| 1195 | PHY_ST_PRE_SUP = 1<<6, /* Bit 6: Preamble Suppression */ | 1195 | PHY_ST_PRE_SUP = 1<<6, /* Bit 6: Preamble Suppression */ |
| 1196 | PHY_ST_AN_OVER = 1<<5, /* Bit 5: Auto-Negotiation Over */ | 1196 | PHY_ST_AN_OVER = 1<<5, /* Bit 5: Auto-Negotiation Over */ |
| 1197 | PHY_ST_REM_FLT = 1<<4, /* Bit 4: Remote Fault Condition Occured */ | 1197 | PHY_ST_REM_FLT = 1<<4, /* Bit 4: Remote Fault Condition Occurred */ |
| 1198 | PHY_ST_AN_CAP = 1<<3, /* Bit 3: Auto-Negotiation Capability */ | 1198 | PHY_ST_AN_CAP = 1<<3, /* Bit 3: Auto-Negotiation Capability */ |
| 1199 | PHY_ST_LSYNC = 1<<2, /* Bit 2: Link Synchronized */ | 1199 | PHY_ST_LSYNC = 1<<2, /* Bit 2: Link Synchronized */ |
| 1200 | PHY_ST_JAB_DET = 1<<1, /* Bit 1: Jabber Detected */ | 1200 | PHY_ST_JAB_DET = 1<<1, /* Bit 1: Jabber Detected */ |
| @@ -1725,8 +1725,8 @@ enum { | |||
| 1725 | GM_GPSR_LINK_UP = 1<<12, /* Bit 12: Link Up Status */ | 1725 | GM_GPSR_LINK_UP = 1<<12, /* Bit 12: Link Up Status */ |
| 1726 | GM_GPSR_PAUSE = 1<<11, /* Bit 11: Pause State */ | 1726 | GM_GPSR_PAUSE = 1<<11, /* Bit 11: Pause State */ |
| 1727 | GM_GPSR_TX_ACTIVE = 1<<10, /* Bit 10: Tx in Progress */ | 1727 | GM_GPSR_TX_ACTIVE = 1<<10, /* Bit 10: Tx in Progress */ |
| 1728 | GM_GPSR_EXC_COL = 1<<9, /* Bit 9: Excessive Collisions Occured */ | 1728 | GM_GPSR_EXC_COL = 1<<9, /* Bit 9: Excessive Collisions Occurred */ |
| 1729 | GM_GPSR_LAT_COL = 1<<8, /* Bit 8: Late Collisions Occured */ | 1729 | GM_GPSR_LAT_COL = 1<<8, /* Bit 8: Late Collisions Occurred */ |
| 1730 | 1730 | ||
| 1731 | GM_GPSR_PHY_ST_CH = 1<<5, /* Bit 5: PHY Status Change */ | 1731 | GM_GPSR_PHY_ST_CH = 1<<5, /* Bit 5: PHY Status Change */ |
| 1732 | GM_GPSR_GIG_SPEED = 1<<4, /* Bit 4: Gigabit Speed (1 = 1000 Mbps) */ | 1732 | GM_GPSR_GIG_SPEED = 1<<4, /* Bit 4: Gigabit Speed (1 = 1000 Mbps) */ |
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index 68d48ab6eacf..5f53fbbf67be 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h | |||
| @@ -921,7 +921,7 @@ static const char * chip_ids[ 16 ] = { | |||
| 921 | * Hack Alert: Some setups just can't write 8 or 16 bits reliably when not | 921 | * Hack Alert: Some setups just can't write 8 or 16 bits reliably when not |
| 922 | * aligned to a 32 bit boundary. I tell you that does exist! | 922 | * aligned to a 32 bit boundary. I tell you that does exist! |
| 923 | * Fortunately the affected register accesses can be easily worked around | 923 | * Fortunately the affected register accesses can be easily worked around |
| 924 | * since we can write zeroes to the preceeding 16 bits without adverse | 924 | * since we can write zeroes to the preceding 16 bits without adverse |
| 925 | * effects and use a 32-bit access. | 925 | * effects and use a 32-bit access. |
| 926 | * | 926 | * |
| 927 | * Enforce it on any 32-bit capable setup for now. | 927 | * Enforce it on any 32-bit capable setup for now. |
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index 1566259c1f27..4b42ecc63dcf 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c | |||
| @@ -1669,7 +1669,7 @@ static int smsc911x_eeprom_send_cmd(struct smsc911x_data *pdata, u32 op) | |||
| 1669 | } | 1669 | } |
| 1670 | 1670 | ||
| 1671 | if (e2cmd & E2P_CMD_EPC_TIMEOUT_) { | 1671 | if (e2cmd & E2P_CMD_EPC_TIMEOUT_) { |
| 1672 | SMSC_TRACE(DRV, "Error occured during eeprom operation"); | 1672 | SMSC_TRACE(DRV, "Error occurred during eeprom operation"); |
| 1673 | return -EINVAL; | 1673 | return -EINVAL; |
| 1674 | } | 1674 | } |
| 1675 | 1675 | ||
| @@ -1818,6 +1818,7 @@ static int __devinit smsc911x_init(struct net_device *dev) | |||
| 1818 | SMSC_TRACE(PROBE, "PHY will be autodetected."); | 1818 | SMSC_TRACE(PROBE, "PHY will be autodetected."); |
| 1819 | 1819 | ||
| 1820 | spin_lock_init(&pdata->dev_lock); | 1820 | spin_lock_init(&pdata->dev_lock); |
| 1821 | spin_lock_init(&pdata->mac_lock); | ||
| 1821 | 1822 | ||
| 1822 | if (pdata->ioaddr == 0) { | 1823 | if (pdata->ioaddr == 0) { |
| 1823 | SMSC_WARNING(PROBE, "pdata->ioaddr: 0x00000000"); | 1824 | SMSC_WARNING(PROBE, "pdata->ioaddr: 0x00000000"); |
| @@ -1895,8 +1896,11 @@ static int __devinit smsc911x_init(struct net_device *dev) | |||
| 1895 | /* workaround for platforms without an eeprom, where the mac address | 1896 | /* workaround for platforms without an eeprom, where the mac address |
| 1896 | * is stored elsewhere and set by the bootloader. This saves the | 1897 | * is stored elsewhere and set by the bootloader. This saves the |
| 1897 | * mac address before resetting the device */ | 1898 | * mac address before resetting the device */ |
| 1898 | if (pdata->config.flags & SMSC911X_SAVE_MAC_ADDRESS) | 1899 | if (pdata->config.flags & SMSC911X_SAVE_MAC_ADDRESS) { |
| 1900 | spin_lock_irq(&pdata->mac_lock); | ||
| 1899 | smsc911x_read_mac_address(dev); | 1901 | smsc911x_read_mac_address(dev); |
| 1902 | spin_unlock_irq(&pdata->mac_lock); | ||
| 1903 | } | ||
| 1900 | 1904 | ||
| 1901 | /* Reset the LAN911x */ | 1905 | /* Reset the LAN911x */ |
| 1902 | if (smsc911x_soft_reset(pdata)) | 1906 | if (smsc911x_soft_reset(pdata)) |
| @@ -2059,8 +2063,6 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev) | |||
| 2059 | SMSC_TRACE(PROBE, "Network interface: \"%s\"", dev->name); | 2063 | SMSC_TRACE(PROBE, "Network interface: \"%s\"", dev->name); |
| 2060 | } | 2064 | } |
| 2061 | 2065 | ||
| 2062 | spin_lock_init(&pdata->mac_lock); | ||
| 2063 | |||
| 2064 | retval = smsc911x_mii_init(pdev, dev); | 2066 | retval = smsc911x_mii_init(pdev, dev); |
| 2065 | if (retval) { | 2067 | if (retval) { |
| 2066 | SMSC_WARNING(PROBE, | 2068 | SMSC_WARNING(PROBE, |
diff --git a/drivers/net/smsc9420.c b/drivers/net/smsc9420.c index b09ee1c319e8..4c92ad8be765 100644 --- a/drivers/net/smsc9420.c +++ b/drivers/net/smsc9420.c | |||
| @@ -364,7 +364,7 @@ static int smsc9420_eeprom_send_cmd(struct smsc9420_pdata *pd, u32 op) | |||
| 364 | } | 364 | } |
| 365 | 365 | ||
| 366 | if (e2cmd & E2P_CMD_EPC_TIMEOUT_) { | 366 | if (e2cmd & E2P_CMD_EPC_TIMEOUT_) { |
| 367 | smsc_info(HW, "Error occured during eeprom operation"); | 367 | smsc_info(HW, "Error occurred during eeprom operation"); |
| 368 | return -EINVAL; | 368 | return -EINVAL; |
| 369 | } | 369 | } |
| 370 | 370 | ||
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c index a4f2bd52e546..36045f3b0327 100644 --- a/drivers/net/starfire.c +++ b/drivers/net/starfire.c | |||
| @@ -144,11 +144,7 @@ static int full_duplex[MAX_UNITS] = {0, }; | |||
| 144 | /* Time in jiffies before concluding the transmitter is hung. */ | 144 | /* Time in jiffies before concluding the transmitter is hung. */ |
| 145 | #define TX_TIMEOUT (2 * HZ) | 145 | #define TX_TIMEOUT (2 * HZ) |
| 146 | 146 | ||
| 147 | /* | 147 | #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT |
| 148 | * This SUCKS. | ||
| 149 | * We need a much better method to determine if dma_addr_t is 64-bit. | ||
| 150 | */ | ||
| 151 | #if (defined(__i386__) && defined(CONFIG_HIGHMEM64G)) || defined(__x86_64__) || defined (__ia64__) || defined(__alpha__) || (defined(CONFIG_MIPS) && ((defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) || defined(CONFIG_64BIT))) || (defined(__powerpc64__) || defined(CONFIG_PHYS_64BIT)) | ||
| 152 | /* 64-bit dma_addr_t */ | 148 | /* 64-bit dma_addr_t */ |
| 153 | #define ADDR_64BITS /* This chip uses 64 bit addresses. */ | 149 | #define ADDR_64BITS /* This chip uses 64 bit addresses. */ |
| 154 | #define netdrv_addr_t __le64 | 150 | #define netdrv_addr_t __le64 |
diff --git a/drivers/net/stmmac/norm_desc.c b/drivers/net/stmmac/norm_desc.c index cd0cc76f7a1c..029c2a2cf524 100644 --- a/drivers/net/stmmac/norm_desc.c +++ b/drivers/net/stmmac/norm_desc.c | |||
| @@ -67,7 +67,7 @@ static int ndesc_get_tx_len(struct dma_desc *p) | |||
| 67 | 67 | ||
| 68 | /* This function verifies if each incoming frame has some errors | 68 | /* This function verifies if each incoming frame has some errors |
| 69 | * and, if required, updates the multicast statistics. | 69 | * and, if required, updates the multicast statistics. |
| 70 | * In case of success, it returns csum_none becasue the device | 70 | * In case of success, it returns csum_none because the device |
| 71 | * is not able to compute the csum in HW. */ | 71 | * is not able to compute the csum in HW. */ |
| 72 | static int ndesc_get_rx_status(void *data, struct stmmac_extra_stats *x, | 72 | static int ndesc_get_rx_status(void *data, struct stmmac_extra_stats *x, |
| 73 | struct dma_desc *p) | 73 | struct dma_desc *p) |
diff --git a/drivers/net/sunbmac.h b/drivers/net/sunbmac.h index 8db88945b889..4943e975a731 100644 --- a/drivers/net/sunbmac.h +++ b/drivers/net/sunbmac.h | |||
| @@ -185,7 +185,7 @@ | |||
| 185 | #define BIGMAC_RXCFG_ENABLE 0x00000001 /* Enable the receiver */ | 185 | #define BIGMAC_RXCFG_ENABLE 0x00000001 /* Enable the receiver */ |
| 186 | #define BIGMAC_RXCFG_FIFO 0x0000000e /* Default rx fthresh... */ | 186 | #define BIGMAC_RXCFG_FIFO 0x0000000e /* Default rx fthresh... */ |
| 187 | #define BIGMAC_RXCFG_PSTRIP 0x00000020 /* Pad byte strip enable */ | 187 | #define BIGMAC_RXCFG_PSTRIP 0x00000020 /* Pad byte strip enable */ |
| 188 | #define BIGMAC_RXCFG_PMISC 0x00000040 /* Enable promiscous mode */ | 188 | #define BIGMAC_RXCFG_PMISC 0x00000040 /* Enable promiscuous mode */ |
| 189 | #define BIGMAC_RXCFG_DERR 0x00000080 /* Disable error checking */ | 189 | #define BIGMAC_RXCFG_DERR 0x00000080 /* Disable error checking */ |
| 190 | #define BIGMAC_RXCFG_DCRCS 0x00000100 /* Disable CRC stripping */ | 190 | #define BIGMAC_RXCFG_DCRCS 0x00000100 /* Disable CRC stripping */ |
| 191 | #define BIGMAC_RXCFG_ME 0x00000200 /* Receive packets addressed to me */ | 191 | #define BIGMAC_RXCFG_ME 0x00000200 /* Receive packets addressed to me */ |
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index c1a344829b54..d3be735c4719 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
| @@ -1150,7 +1150,7 @@ static void gem_pcs_reinit_adv(struct gem *gp) | |||
| 1150 | val &= ~(PCS_CFG_ENABLE | PCS_CFG_TO); | 1150 | val &= ~(PCS_CFG_ENABLE | PCS_CFG_TO); |
| 1151 | writel(val, gp->regs + PCS_CFG); | 1151 | writel(val, gp->regs + PCS_CFG); |
| 1152 | 1152 | ||
| 1153 | /* Advertise all capabilities except assymetric | 1153 | /* Advertise all capabilities except asymmetric |
| 1154 | * pause. | 1154 | * pause. |
| 1155 | */ | 1155 | */ |
| 1156 | val = readl(gp->regs + PCS_MIIADV); | 1156 | val = readl(gp->regs + PCS_MIIADV); |
diff --git a/drivers/net/sunhme.h b/drivers/net/sunhme.h index 756b5bf3aa89..64f278360d89 100644 --- a/drivers/net/sunhme.h +++ b/drivers/net/sunhme.h | |||
| @@ -223,7 +223,7 @@ | |||
| 223 | /* BigMac receive config register. */ | 223 | /* BigMac receive config register. */ |
| 224 | #define BIGMAC_RXCFG_ENABLE 0x00000001 /* Enable the receiver */ | 224 | #define BIGMAC_RXCFG_ENABLE 0x00000001 /* Enable the receiver */ |
| 225 | #define BIGMAC_RXCFG_PSTRIP 0x00000020 /* Pad byte strip enable */ | 225 | #define BIGMAC_RXCFG_PSTRIP 0x00000020 /* Pad byte strip enable */ |
| 226 | #define BIGMAC_RXCFG_PMISC 0x00000040 /* Enable promiscous mode */ | 226 | #define BIGMAC_RXCFG_PMISC 0x00000040 /* Enable promiscuous mode */ |
| 227 | #define BIGMAC_RXCFG_DERR 0x00000080 /* Disable error checking */ | 227 | #define BIGMAC_RXCFG_DERR 0x00000080 /* Disable error checking */ |
| 228 | #define BIGMAC_RXCFG_DCRCS 0x00000100 /* Disable CRC stripping */ | 228 | #define BIGMAC_RXCFG_DCRCS 0x00000100 /* Disable CRC stripping */ |
| 229 | #define BIGMAC_RXCFG_REJME 0x00000200 /* Reject packets addressed to me */ | 229 | #define BIGMAC_RXCFG_REJME 0x00000200 /* Reject packets addressed to me */ |
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c index b6eec8cea209..7ca51cebcddd 100644 --- a/drivers/net/tc35815.c +++ b/drivers/net/tc35815.c | |||
| @@ -119,13 +119,13 @@ struct tc35815_regs { | |||
| 119 | /* | 119 | /* |
| 120 | * Bit assignments | 120 | * Bit assignments |
| 121 | */ | 121 | */ |
| 122 | /* DMA_Ctl bit asign ------------------------------------------------------- */ | 122 | /* DMA_Ctl bit assign ------------------------------------------------------- */ |
| 123 | #define DMA_RxAlign 0x00c00000 /* 1:Reception Alignment */ | 123 | #define DMA_RxAlign 0x00c00000 /* 1:Reception Alignment */ |
| 124 | #define DMA_RxAlign_1 0x00400000 | 124 | #define DMA_RxAlign_1 0x00400000 |
| 125 | #define DMA_RxAlign_2 0x00800000 | 125 | #define DMA_RxAlign_2 0x00800000 |
| 126 | #define DMA_RxAlign_3 0x00c00000 | 126 | #define DMA_RxAlign_3 0x00c00000 |
| 127 | #define DMA_M66EnStat 0x00080000 /* 1:66MHz Enable State */ | 127 | #define DMA_M66EnStat 0x00080000 /* 1:66MHz Enable State */ |
| 128 | #define DMA_IntMask 0x00040000 /* 1:Interupt mask */ | 128 | #define DMA_IntMask 0x00040000 /* 1:Interrupt mask */ |
| 129 | #define DMA_SWIntReq 0x00020000 /* 1:Software Interrupt request */ | 129 | #define DMA_SWIntReq 0x00020000 /* 1:Software Interrupt request */ |
| 130 | #define DMA_TxWakeUp 0x00010000 /* 1:Transmit Wake Up */ | 130 | #define DMA_TxWakeUp 0x00010000 /* 1:Transmit Wake Up */ |
| 131 | #define DMA_RxBigE 0x00008000 /* 1:Receive Big Endian */ | 131 | #define DMA_RxBigE 0x00008000 /* 1:Receive Big Endian */ |
| @@ -134,11 +134,11 @@ struct tc35815_regs { | |||
| 134 | #define DMA_PowrMgmnt 0x00001000 /* 1:Power Management */ | 134 | #define DMA_PowrMgmnt 0x00001000 /* 1:Power Management */ |
| 135 | #define DMA_DmBurst_Mask 0x000001fc /* DMA Burst size */ | 135 | #define DMA_DmBurst_Mask 0x000001fc /* DMA Burst size */ |
| 136 | 136 | ||
| 137 | /* RxFragSize bit asign ---------------------------------------------------- */ | 137 | /* RxFragSize bit assign ---------------------------------------------------- */ |
| 138 | #define RxFrag_EnPack 0x00008000 /* 1:Enable Packing */ | 138 | #define RxFrag_EnPack 0x00008000 /* 1:Enable Packing */ |
| 139 | #define RxFrag_MinFragMask 0x00000ffc /* Minimum Fragment */ | 139 | #define RxFrag_MinFragMask 0x00000ffc /* Minimum Fragment */ |
| 140 | 140 | ||
| 141 | /* MAC_Ctl bit asign ------------------------------------------------------- */ | 141 | /* MAC_Ctl bit assign ------------------------------------------------------- */ |
| 142 | #define MAC_Link10 0x00008000 /* 1:Link Status 10Mbits */ | 142 | #define MAC_Link10 0x00008000 /* 1:Link Status 10Mbits */ |
| 143 | #define MAC_EnMissRoll 0x00002000 /* 1:Enable Missed Roll */ | 143 | #define MAC_EnMissRoll 0x00002000 /* 1:Enable Missed Roll */ |
| 144 | #define MAC_MissRoll 0x00000400 /* 1:Missed Roll */ | 144 | #define MAC_MissRoll 0x00000400 /* 1:Missed Roll */ |
| @@ -152,7 +152,7 @@ struct tc35815_regs { | |||
| 152 | #define MAC_HaltImm 0x00000002 /* 1:Halt Immediate */ | 152 | #define MAC_HaltImm 0x00000002 /* 1:Halt Immediate */ |
| 153 | #define MAC_HaltReq 0x00000001 /* 1:Halt request */ | 153 | #define MAC_HaltReq 0x00000001 /* 1:Halt request */ |
| 154 | 154 | ||
| 155 | /* PROM_Ctl bit asign ------------------------------------------------------ */ | 155 | /* PROM_Ctl bit assign ------------------------------------------------------ */ |
| 156 | #define PROM_Busy 0x00008000 /* 1:Busy (Start Operation) */ | 156 | #define PROM_Busy 0x00008000 /* 1:Busy (Start Operation) */ |
| 157 | #define PROM_Read 0x00004000 /*10:Read operation */ | 157 | #define PROM_Read 0x00004000 /*10:Read operation */ |
| 158 | #define PROM_Write 0x00002000 /*01:Write operation */ | 158 | #define PROM_Write 0x00002000 /*01:Write operation */ |
| @@ -162,7 +162,7 @@ struct tc35815_regs { | |||
| 162 | #define PROM_Addr_Ena 0x00000030 /*11xxxx:PROM Write enable */ | 162 | #define PROM_Addr_Ena 0x00000030 /*11xxxx:PROM Write enable */ |
| 163 | /*00xxxx: disable */ | 163 | /*00xxxx: disable */ |
| 164 | 164 | ||
| 165 | /* CAM_Ctl bit asign ------------------------------------------------------- */ | 165 | /* CAM_Ctl bit assign ------------------------------------------------------- */ |
| 166 | #define CAM_CompEn 0x00000010 /* 1:CAM Compare Enable */ | 166 | #define CAM_CompEn 0x00000010 /* 1:CAM Compare Enable */ |
| 167 | #define CAM_NegCAM 0x00000008 /* 1:Reject packets CAM recognizes,*/ | 167 | #define CAM_NegCAM 0x00000008 /* 1:Reject packets CAM recognizes,*/ |
| 168 | /* accept other */ | 168 | /* accept other */ |
| @@ -170,7 +170,7 @@ struct tc35815_regs { | |||
| 170 | #define CAM_GroupAcc 0x00000002 /* 1:Multicast assept */ | 170 | #define CAM_GroupAcc 0x00000002 /* 1:Multicast assept */ |
| 171 | #define CAM_StationAcc 0x00000001 /* 1:unicast accept */ | 171 | #define CAM_StationAcc 0x00000001 /* 1:unicast accept */ |
| 172 | 172 | ||
| 173 | /* CAM_Ena bit asign ------------------------------------------------------- */ | 173 | /* CAM_Ena bit assign ------------------------------------------------------- */ |
| 174 | #define CAM_ENTRY_MAX 21 /* CAM Data entry max count */ | 174 | #define CAM_ENTRY_MAX 21 /* CAM Data entry max count */ |
| 175 | #define CAM_Ena_Mask ((1<<CAM_ENTRY_MAX)-1) /* CAM Enable bits (Max 21bits) */ | 175 | #define CAM_Ena_Mask ((1<<CAM_ENTRY_MAX)-1) /* CAM Enable bits (Max 21bits) */ |
| 176 | #define CAM_Ena_Bit(index) (1 << (index)) | 176 | #define CAM_Ena_Bit(index) (1 << (index)) |
| @@ -178,7 +178,7 @@ struct tc35815_regs { | |||
| 178 | #define CAM_ENTRY_SOURCE 1 | 178 | #define CAM_ENTRY_SOURCE 1 |
| 179 | #define CAM_ENTRY_MACCTL 20 | 179 | #define CAM_ENTRY_MACCTL 20 |
| 180 | 180 | ||
| 181 | /* Tx_Ctl bit asign -------------------------------------------------------- */ | 181 | /* Tx_Ctl bit assign -------------------------------------------------------- */ |
| 182 | #define Tx_En 0x00000001 /* 1:Transmit enable */ | 182 | #define Tx_En 0x00000001 /* 1:Transmit enable */ |
| 183 | #define Tx_TxHalt 0x00000002 /* 1:Transmit Halt Request */ | 183 | #define Tx_TxHalt 0x00000002 /* 1:Transmit Halt Request */ |
| 184 | #define Tx_NoPad 0x00000004 /* 1:Suppress Padding */ | 184 | #define Tx_NoPad 0x00000004 /* 1:Suppress Padding */ |
| @@ -192,7 +192,7 @@ struct tc35815_regs { | |||
| 192 | #define Tx_EnTxPar 0x00002000 /* 1:Enable Transmit Parity */ | 192 | #define Tx_EnTxPar 0x00002000 /* 1:Enable Transmit Parity */ |
| 193 | #define Tx_EnComp 0x00004000 /* 1:Enable Completion */ | 193 | #define Tx_EnComp 0x00004000 /* 1:Enable Completion */ |
| 194 | 194 | ||
| 195 | /* Tx_Stat bit asign ------------------------------------------------------- */ | 195 | /* Tx_Stat bit assign ------------------------------------------------------- */ |
| 196 | #define Tx_TxColl_MASK 0x0000000F /* Tx Collision Count */ | 196 | #define Tx_TxColl_MASK 0x0000000F /* Tx Collision Count */ |
| 197 | #define Tx_ExColl 0x00000010 /* Excessive Collision */ | 197 | #define Tx_ExColl 0x00000010 /* Excessive Collision */ |
| 198 | #define Tx_TXDefer 0x00000020 /* Transmit Defered */ | 198 | #define Tx_TXDefer 0x00000020 /* Transmit Defered */ |
| @@ -208,7 +208,7 @@ struct tc35815_regs { | |||
| 208 | #define Tx_Halted 0x00008000 /* Tx Halted */ | 208 | #define Tx_Halted 0x00008000 /* Tx Halted */ |
| 209 | #define Tx_SQErr 0x00010000 /* Signal Quality Error(SQE) */ | 209 | #define Tx_SQErr 0x00010000 /* Signal Quality Error(SQE) */ |
| 210 | 210 | ||
| 211 | /* Rx_Ctl bit asign -------------------------------------------------------- */ | 211 | /* Rx_Ctl bit assign -------------------------------------------------------- */ |
| 212 | #define Rx_EnGood 0x00004000 /* 1:Enable Good */ | 212 | #define Rx_EnGood 0x00004000 /* 1:Enable Good */ |
| 213 | #define Rx_EnRxPar 0x00002000 /* 1:Enable Receive Parity */ | 213 | #define Rx_EnRxPar 0x00002000 /* 1:Enable Receive Parity */ |
| 214 | #define Rx_EnLongErr 0x00000800 /* 1:Enable Long Error */ | 214 | #define Rx_EnLongErr 0x00000800 /* 1:Enable Long Error */ |
| @@ -222,7 +222,7 @@ struct tc35815_regs { | |||
| 222 | #define Rx_RxHalt 0x00000002 /* 1:Receive Halt Request */ | 222 | #define Rx_RxHalt 0x00000002 /* 1:Receive Halt Request */ |
| 223 | #define Rx_RxEn 0x00000001 /* 1:Receive Intrrupt Enable */ | 223 | #define Rx_RxEn 0x00000001 /* 1:Receive Intrrupt Enable */ |
| 224 | 224 | ||
| 225 | /* Rx_Stat bit asign ------------------------------------------------------- */ | 225 | /* Rx_Stat bit assign ------------------------------------------------------- */ |
| 226 | #define Rx_Halted 0x00008000 /* Rx Halted */ | 226 | #define Rx_Halted 0x00008000 /* Rx Halted */ |
| 227 | #define Rx_Good 0x00004000 /* Rx Good */ | 227 | #define Rx_Good 0x00004000 /* Rx Good */ |
| 228 | #define Rx_RxPar 0x00002000 /* Rx Parity Error */ | 228 | #define Rx_RxPar 0x00002000 /* Rx Parity Error */ |
| @@ -238,7 +238,7 @@ struct tc35815_regs { | |||
| 238 | 238 | ||
| 239 | #define Rx_Stat_Mask 0x0000FFF0 /* Rx All Status Mask */ | 239 | #define Rx_Stat_Mask 0x0000FFF0 /* Rx All Status Mask */ |
| 240 | 240 | ||
| 241 | /* Int_En bit asign -------------------------------------------------------- */ | 241 | /* Int_En bit assign -------------------------------------------------------- */ |
| 242 | #define Int_NRAbtEn 0x00000800 /* 1:Non-recoverable Abort Enable */ | 242 | #define Int_NRAbtEn 0x00000800 /* 1:Non-recoverable Abort Enable */ |
| 243 | #define Int_TxCtlCmpEn 0x00000400 /* 1:Transmit Ctl Complete Enable */ | 243 | #define Int_TxCtlCmpEn 0x00000400 /* 1:Transmit Ctl Complete Enable */ |
| 244 | #define Int_DmParErrEn 0x00000200 /* 1:DMA Parity Error Enable */ | 244 | #define Int_DmParErrEn 0x00000200 /* 1:DMA Parity Error Enable */ |
| @@ -253,7 +253,7 @@ struct tc35815_regs { | |||
| 253 | #define Int_FDAExEn 0x00000001 /* 1:Free Descriptor Area */ | 253 | #define Int_FDAExEn 0x00000001 /* 1:Free Descriptor Area */ |
| 254 | /* Exhausted Enable */ | 254 | /* Exhausted Enable */ |
| 255 | 255 | ||
| 256 | /* Int_Src bit asign ------------------------------------------------------- */ | 256 | /* Int_Src bit assign ------------------------------------------------------- */ |
| 257 | #define Int_NRabt 0x00004000 /* 1:Non Recoverable error */ | 257 | #define Int_NRabt 0x00004000 /* 1:Non Recoverable error */ |
| 258 | #define Int_DmParErrStat 0x00002000 /* 1:DMA Parity Error & Clear */ | 258 | #define Int_DmParErrStat 0x00002000 /* 1:DMA Parity Error & Clear */ |
| 259 | #define Int_BLEx 0x00001000 /* 1:Buffer List Empty & Clear */ | 259 | #define Int_BLEx 0x00001000 /* 1:Buffer List Empty & Clear */ |
| @@ -270,8 +270,8 @@ struct tc35815_regs { | |||
| 270 | #define Int_IntMacRx 0x00000002 /* 1:Rx controller & Clear */ | 270 | #define Int_IntMacRx 0x00000002 /* 1:Rx controller & Clear */ |
| 271 | #define Int_IntMacTx 0x00000001 /* 1:Tx controller & Clear */ | 271 | #define Int_IntMacTx 0x00000001 /* 1:Tx controller & Clear */ |
| 272 | 272 | ||
| 273 | /* MD_CA bit asign --------------------------------------------------------- */ | 273 | /* MD_CA bit assign --------------------------------------------------------- */ |
| 274 | #define MD_CA_PreSup 0x00001000 /* 1:Preamble Supress */ | 274 | #define MD_CA_PreSup 0x00001000 /* 1:Preamble Suppress */ |
| 275 | #define MD_CA_Busy 0x00000800 /* 1:Busy (Start Operation) */ | 275 | #define MD_CA_Busy 0x00000800 /* 1:Busy (Start Operation) */ |
| 276 | #define MD_CA_Wr 0x00000400 /* 1:Write 0:Read */ | 276 | #define MD_CA_Wr 0x00000400 /* 1:Write 0:Read */ |
| 277 | 277 | ||
| @@ -296,7 +296,7 @@ struct BDesc { | |||
| 296 | 296 | ||
| 297 | #define FD_ALIGN 16 | 297 | #define FD_ALIGN 16 |
| 298 | 298 | ||
| 299 | /* Frame Descripter bit asign ---------------------------------------------- */ | 299 | /* Frame Descripter bit assign ---------------------------------------------- */ |
| 300 | #define FD_FDLength_MASK 0x0000FFFF /* Length MASK */ | 300 | #define FD_FDLength_MASK 0x0000FFFF /* Length MASK */ |
| 301 | #define FD_BDCnt_MASK 0x001F0000 /* BD count MASK in FD */ | 301 | #define FD_BDCnt_MASK 0x001F0000 /* BD count MASK in FD */ |
| 302 | #define FD_FrmOpt_MASK 0x7C000000 /* Frame option MASK */ | 302 | #define FD_FrmOpt_MASK 0x7C000000 /* Frame option MASK */ |
| @@ -309,8 +309,8 @@ struct BDesc { | |||
| 309 | #define FD_Next_EOL 0x00000001 /* FD EOL indicator */ | 309 | #define FD_Next_EOL 0x00000001 /* FD EOL indicator */ |
| 310 | #define FD_BDCnt_SHIFT 16 | 310 | #define FD_BDCnt_SHIFT 16 |
| 311 | 311 | ||
| 312 | /* Buffer Descripter bit asign --------------------------------------------- */ | 312 | /* Buffer Descripter bit assign --------------------------------------------- */ |
| 313 | #define BD_BuffLength_MASK 0x0000FFFF /* Recieve Data Size */ | 313 | #define BD_BuffLength_MASK 0x0000FFFF /* Receive Data Size */ |
| 314 | #define BD_RxBDID_MASK 0x00FF0000 /* BD ID Number MASK */ | 314 | #define BD_RxBDID_MASK 0x00FF0000 /* BD ID Number MASK */ |
| 315 | #define BD_RxBDSeqN_MASK 0x7F000000 /* Rx BD Sequence Number */ | 315 | #define BD_RxBDSeqN_MASK 0x7F000000 /* Rx BD Sequence Number */ |
| 316 | #define BD_CownsBD 0x80000000 /* BD Controller owner bit */ | 316 | #define BD_CownsBD 0x80000000 /* BD Controller owner bit */ |
| @@ -339,7 +339,7 @@ struct BDesc { | |||
| 339 | #define TX_THRESHOLD 1024 | 339 | #define TX_THRESHOLD 1024 |
| 340 | /* used threshold with packet max byte for low pci transfer ability.*/ | 340 | /* used threshold with packet max byte for low pci transfer ability.*/ |
| 341 | #define TX_THRESHOLD_MAX 1536 | 341 | #define TX_THRESHOLD_MAX 1536 |
| 342 | /* setting threshold max value when overrun error occured this count. */ | 342 | /* setting threshold max value when overrun error occurred this count. */ |
| 343 | #define TX_THRESHOLD_KEEP_LIMIT 10 | 343 | #define TX_THRESHOLD_KEEP_LIMIT 10 |
| 344 | 344 | ||
| 345 | /* 16 + RX_BUF_NUM * 8 + RX_FD_NUM * 16 + TX_FD_NUM * 32 <= PAGE_SIZE*FD_PAGE_NUM */ | 345 | /* 16 + RX_BUF_NUM * 8 + RX_FD_NUM * 16 + TX_FD_NUM * 32 <= PAGE_SIZE*FD_PAGE_NUM */ |
diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c index 3397618d4d96..8564ec5cfb7f 100644 --- a/drivers/net/tehuti.c +++ b/drivers/net/tehuti.c | |||
| @@ -645,7 +645,7 @@ static int bdx_ioctl_priv(struct net_device *ndev, struct ifreq *ifr, int cmd) | |||
| 645 | if (cmd != SIOCDEVPRIVATE) { | 645 | if (cmd != SIOCDEVPRIVATE) { |
| 646 | error = copy_from_user(data, ifr->ifr_data, sizeof(data)); | 646 | error = copy_from_user(data, ifr->ifr_data, sizeof(data)); |
| 647 | if (error) { | 647 | if (error) { |
| 648 | pr_err("cant copy from user\n"); | 648 | pr_err("can't copy from user\n"); |
| 649 | RET(-EFAULT); | 649 | RET(-EFAULT); |
| 650 | } | 650 | } |
| 651 | DBG("%d 0x%x 0x%x\n", data[0], data[1], data[2]); | 651 | DBG("%d 0x%x 0x%x\n", data[0], data[1], data[2]); |
| @@ -999,7 +999,7 @@ static inline void bdx_rxdb_free_elem(struct rxdb *db, int n) | |||
| 999 | * | 999 | * |
| 1000 | * RxD fifo is smaller than RxF fifo by design. Upon high load, RxD will be | 1000 | * RxD fifo is smaller than RxF fifo by design. Upon high load, RxD will be |
| 1001 | * filled and packets will be dropped by nic without getting into host or | 1001 | * filled and packets will be dropped by nic without getting into host or |
| 1002 | * cousing interrupt. Anyway, in that condition, host has no chance to proccess | 1002 | * cousing interrupt. Anyway, in that condition, host has no chance to process |
| 1003 | * all packets, but dropping in nic is cheaper, since it takes 0 cpu cycles | 1003 | * all packets, but dropping in nic is cheaper, since it takes 0 cpu cycles |
| 1004 | */ | 1004 | */ |
| 1005 | 1005 | ||
| @@ -1200,8 +1200,8 @@ static void bdx_recycle_skb(struct bdx_priv *priv, struct rxd_desc *rxdd) | |||
| 1200 | RET(); | 1200 | RET(); |
| 1201 | } | 1201 | } |
| 1202 | 1202 | ||
| 1203 | /* bdx_rx_receive - recieves full packets from RXD fifo and pass them to OS | 1203 | /* bdx_rx_receive - receives full packets from RXD fifo and pass them to OS |
| 1204 | * NOTE: a special treatment is given to non-continous descriptors | 1204 | * NOTE: a special treatment is given to non-continuous descriptors |
| 1205 | * that start near the end, wraps around and continue at the beginning. a second | 1205 | * that start near the end, wraps around and continue at the beginning. a second |
| 1206 | * part is copied right after the first, and then descriptor is interpreted as | 1206 | * part is copied right after the first, and then descriptor is interpreted as |
| 1207 | * normal. fifo has an extra space to allow such operations | 1207 | * normal. fifo has an extra space to allow such operations |
| @@ -1584,9 +1584,9 @@ err_mem: | |||
| 1584 | } | 1584 | } |
| 1585 | 1585 | ||
| 1586 | /* | 1586 | /* |
| 1587 | * bdx_tx_space - calculates avalable space in TX fifo | 1587 | * bdx_tx_space - calculates available space in TX fifo |
| 1588 | * @priv - NIC private structure | 1588 | * @priv - NIC private structure |
| 1589 | * Returns avaliable space in TX fifo in bytes | 1589 | * Returns available space in TX fifo in bytes |
| 1590 | */ | 1590 | */ |
| 1591 | static inline int bdx_tx_space(struct bdx_priv *priv) | 1591 | static inline int bdx_tx_space(struct bdx_priv *priv) |
| 1592 | { | 1592 | { |
diff --git a/drivers/net/tehuti.h b/drivers/net/tehuti.h index b6ba8601e2b5..c5642fefc9e7 100644 --- a/drivers/net/tehuti.h +++ b/drivers/net/tehuti.h | |||
| @@ -502,7 +502,7 @@ struct txd_desc { | |||
| 502 | #define GMAC_RX_FILTER_ACRC 0x0010 /* accept crc error */ | 502 | #define GMAC_RX_FILTER_ACRC 0x0010 /* accept crc error */ |
| 503 | #define GMAC_RX_FILTER_AM 0x0008 /* accept multicast */ | 503 | #define GMAC_RX_FILTER_AM 0x0008 /* accept multicast */ |
| 504 | #define GMAC_RX_FILTER_AB 0x0004 /* accept broadcast */ | 504 | #define GMAC_RX_FILTER_AB 0x0004 /* accept broadcast */ |
| 505 | #define GMAC_RX_FILTER_PRM 0x0001 /* [0:1] promiscous mode */ | 505 | #define GMAC_RX_FILTER_PRM 0x0001 /* [0:1] promiscuous mode */ |
| 506 | 506 | ||
| 507 | #define MAX_FRAME_AB_VAL 0x3fff /* 13:0 */ | 507 | #define MAX_FRAME_AB_VAL 0x3fff /* 13:0 */ |
| 508 | 508 | ||
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 73c942d85f07..b8c5f35577e4 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
| @@ -9712,7 +9712,7 @@ static int tg3_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, | |||
| 9712 | eeprom->len += b_count; | 9712 | eeprom->len += b_count; |
| 9713 | } | 9713 | } |
| 9714 | 9714 | ||
| 9715 | /* read bytes upto the last 4 byte boundary */ | 9715 | /* read bytes up to the last 4 byte boundary */ |
| 9716 | pd = &data[eeprom->len]; | 9716 | pd = &data[eeprom->len]; |
| 9717 | for (i = 0; i < (len - (len & 3)); i += 4) { | 9717 | for (i = 0; i < (len - (len & 3)); i += 4) { |
| 9718 | ret = tg3_nvram_read_be32(tp, offset + i, &val); | 9718 | ret = tg3_nvram_read_be32(tp, offset + i, &val); |
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index 73884b69b749..5e96706ad108 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
| @@ -2130,7 +2130,7 @@ | |||
| 2130 | #define MII_TG3_DSP_EXP96 0x0f96 | 2130 | #define MII_TG3_DSP_EXP96 0x0f96 |
| 2131 | #define MII_TG3_DSP_EXP97 0x0f97 | 2131 | #define MII_TG3_DSP_EXP97 0x0f97 |
| 2132 | 2132 | ||
| 2133 | #define MII_TG3_AUX_CTRL 0x18 /* auxilliary control register */ | 2133 | #define MII_TG3_AUX_CTRL 0x18 /* auxiliary control register */ |
| 2134 | 2134 | ||
| 2135 | #define MII_TG3_AUXCTL_PCTL_100TX_LPWR 0x0010 | 2135 | #define MII_TG3_AUXCTL_PCTL_100TX_LPWR 0x0010 |
| 2136 | #define MII_TG3_AUXCTL_PCTL_SPR_ISOLATE 0x0020 | 2136 | #define MII_TG3_AUXCTL_PCTL_SPR_ISOLATE 0x0020 |
| @@ -2146,7 +2146,7 @@ | |||
| 2146 | #define MII_TG3_AUXCTL_ACTL_TX_6DB 0x0400 | 2146 | #define MII_TG3_AUXCTL_ACTL_TX_6DB 0x0400 |
| 2147 | #define MII_TG3_AUXCTL_SHDWSEL_AUXCTL 0x0000 | 2147 | #define MII_TG3_AUXCTL_SHDWSEL_AUXCTL 0x0000 |
| 2148 | 2148 | ||
| 2149 | #define MII_TG3_AUX_STAT 0x19 /* auxilliary status register */ | 2149 | #define MII_TG3_AUX_STAT 0x19 /* auxiliary status register */ |
| 2150 | #define MII_TG3_AUX_STAT_LPASS 0x0004 | 2150 | #define MII_TG3_AUX_STAT_LPASS 0x0004 |
| 2151 | #define MII_TG3_AUX_STAT_SPDMASK 0x0700 | 2151 | #define MII_TG3_AUX_STAT_SPDMASK 0x0700 |
| 2152 | #define MII_TG3_AUX_STAT_10HALF 0x0100 | 2152 | #define MII_TG3_AUX_STAT_10HALF 0x0100 |
diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c index 10800f16a231..8a3b191b195b 100644 --- a/drivers/net/tokenring/3c359.c +++ b/drivers/net/tokenring/3c359.c | |||
| @@ -208,7 +208,7 @@ static void print_rx_state(struct net_device *dev) | |||
| 208 | * passing/getting the next value from the nic. As with all requests | 208 | * passing/getting the next value from the nic. As with all requests |
| 209 | * on this nic it has to be done in two stages, a) tell the nic which | 209 | * on this nic it has to be done in two stages, a) tell the nic which |
| 210 | * memory address you want to access and b) pass/get the value from the nic. | 210 | * memory address you want to access and b) pass/get the value from the nic. |
| 211 | * With the EEProm, you have to wait before and inbetween access a) and b). | 211 | * With the EEProm, you have to wait before and between access a) and b). |
| 212 | * As this is only read at initialization time and the wait period is very | 212 | * As this is only read at initialization time and the wait period is very |
| 213 | * small we shouldn't have to worry about scheduling issues. | 213 | * small we shouldn't have to worry about scheduling issues. |
| 214 | */ | 214 | */ |
diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c index 785ad1a2157b..2bedc0ace812 100644 --- a/drivers/net/tokenring/madgemc.c +++ b/drivers/net/tokenring/madgemc.c | |||
| @@ -73,7 +73,7 @@ static void madgemc_setint(struct net_device *dev, int val); | |||
| 73 | static irqreturn_t madgemc_interrupt(int irq, void *dev_id); | 73 | static irqreturn_t madgemc_interrupt(int irq, void *dev_id); |
| 74 | 74 | ||
| 75 | /* | 75 | /* |
| 76 | * These work around paging, however they don't guarentee you're on the | 76 | * These work around paging, however they don't guarantee you're on the |
| 77 | * right page. | 77 | * right page. |
| 78 | */ | 78 | */ |
| 79 | #define SIFREADB(reg) (inb(dev->base_addr + ((reg<0x8)?reg:reg-0x8))) | 79 | #define SIFREADB(reg) (inb(dev->base_addr + ((reg<0x8)?reg:reg-0x8))) |
| @@ -387,7 +387,7 @@ getout: | |||
| 387 | * both with their own disadvantages... | 387 | * both with their own disadvantages... |
| 388 | * | 388 | * |
| 389 | * 1) Read in the SIFSTS register from the TMS controller. This | 389 | * 1) Read in the SIFSTS register from the TMS controller. This |
| 390 | * is guarenteed to be accurate, however, there's a fairly | 390 | * is guaranteed to be accurate, however, there's a fairly |
| 391 | * large performance penalty for doing so: the Madge chips | 391 | * large performance penalty for doing so: the Madge chips |
| 392 | * must request the register from the Eagle, the Eagle must | 392 | * must request the register from the Eagle, the Eagle must |
| 393 | * read them from its internal bus, and then take the route | 393 | * read them from its internal bus, and then take the route |
| @@ -454,7 +454,7 @@ static irqreturn_t madgemc_interrupt(int irq, void *dev_id) | |||
| 454 | } | 454 | } |
| 455 | 455 | ||
| 456 | /* | 456 | /* |
| 457 | * Set the card to the prefered ring speed. | 457 | * Set the card to the preferred ring speed. |
| 458 | * | 458 | * |
| 459 | * Unlike newer cards, the MC16/32 have their speed selection | 459 | * Unlike newer cards, the MC16/32 have their speed selection |
| 460 | * circuit connected to the Madge ASICs and not to the TMS380 | 460 | * circuit connected to the Madge ASICs and not to the TMS380 |
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c index 63db5a6762ae..d9044aba7afa 100644 --- a/drivers/net/tokenring/smctr.c +++ b/drivers/net/tokenring/smctr.c | |||
| @@ -393,7 +393,7 @@ static int smctr_alloc_shared_memory(struct net_device *dev) | |||
| 393 | tp->rx_bdb_end[NON_MAC_QUEUE] = (BDBlock *)smctr_malloc(dev, 0); | 393 | tp->rx_bdb_end[NON_MAC_QUEUE] = (BDBlock *)smctr_malloc(dev, 0); |
| 394 | 394 | ||
| 395 | /* Allocate MAC transmit buffers. | 395 | /* Allocate MAC transmit buffers. |
| 396 | * MAC Tx Buffers doen't have to be on an ODD Boundry. | 396 | * MAC Tx Buffers doen't have to be on an ODD Boundary. |
| 397 | */ | 397 | */ |
| 398 | tp->tx_buff_head[MAC_QUEUE] | 398 | tp->tx_buff_head[MAC_QUEUE] |
| 399 | = (__u16 *)smctr_malloc(dev, tp->tx_buff_size[MAC_QUEUE]); | 399 | = (__u16 *)smctr_malloc(dev, tp->tx_buff_size[MAC_QUEUE]); |
| @@ -415,7 +415,7 @@ static int smctr_alloc_shared_memory(struct net_device *dev) | |||
| 415 | 415 | ||
| 416 | /* Allocate Non-MAC transmit buffers. | 416 | /* Allocate Non-MAC transmit buffers. |
| 417 | * ?? For maximum Netware performance, put Tx Buffers on | 417 | * ?? For maximum Netware performance, put Tx Buffers on |
| 418 | * ODD Boundry and then restore malloc to Even Boundrys. | 418 | * ODD Boundary and then restore malloc to Even Boundrys. |
| 419 | */ | 419 | */ |
| 420 | smctr_malloc(dev, 1L); | 420 | smctr_malloc(dev, 1L); |
| 421 | tp->tx_buff_head[NON_MAC_QUEUE] | 421 | tp->tx_buff_head[NON_MAC_QUEUE] |
| @@ -1311,7 +1311,7 @@ static unsigned int smctr_get_num_rx_bdbs(struct net_device *dev) | |||
| 1311 | mem_used += sizeof(BDBlock) * tp->num_rx_bdbs[MAC_QUEUE]; | 1311 | mem_used += sizeof(BDBlock) * tp->num_rx_bdbs[MAC_QUEUE]; |
| 1312 | 1312 | ||
| 1313 | /* Allocate MAC transmit buffers. | 1313 | /* Allocate MAC transmit buffers. |
| 1314 | * MAC transmit buffers don't have to be on an ODD Boundry. | 1314 | * MAC transmit buffers don't have to be on an ODD Boundary. |
| 1315 | */ | 1315 | */ |
| 1316 | mem_used += tp->tx_buff_size[MAC_QUEUE]; | 1316 | mem_used += tp->tx_buff_size[MAC_QUEUE]; |
| 1317 | 1317 | ||
| @@ -1325,7 +1325,7 @@ static unsigned int smctr_get_num_rx_bdbs(struct net_device *dev) | |||
| 1325 | 1325 | ||
| 1326 | /* Allocate Non-MAC transmit buffers. | 1326 | /* Allocate Non-MAC transmit buffers. |
| 1327 | * For maximum Netware performance, put Tx Buffers on | 1327 | * For maximum Netware performance, put Tx Buffers on |
| 1328 | * ODD Boundry,and then restore malloc to Even Boundrys. | 1328 | * ODD Boundary,and then restore malloc to Even Boundrys. |
| 1329 | */ | 1329 | */ |
| 1330 | mem_used += 1L; | 1330 | mem_used += 1L; |
| 1331 | mem_used += tp->tx_buff_size[NON_MAC_QUEUE]; | 1331 | mem_used += tp->tx_buff_size[NON_MAC_QUEUE]; |
| @@ -3069,8 +3069,8 @@ static int smctr_load_node_addr(struct net_device *dev) | |||
| 3069 | * disabled.!? | 3069 | * disabled.!? |
| 3070 | * | 3070 | * |
| 3071 | * NOTE 2: If the monitor_state is MS_BEACON_TEST_STATE and the receive_mask | 3071 | * NOTE 2: If the monitor_state is MS_BEACON_TEST_STATE and the receive_mask |
| 3072 | * has any multi-cast or promiscous bits set, the receive_mask needs to | 3072 | * has any multi-cast or promiscuous bits set, the receive_mask needs to |
| 3073 | * be changed to clear the multi-cast or promiscous mode bits, the lobe_test | 3073 | * be changed to clear the multi-cast or promiscuous mode bits, the lobe_test |
| 3074 | * run, and then the receive mask set back to its original value if the test | 3074 | * run, and then the receive mask set back to its original value if the test |
| 3075 | * is successful. | 3075 | * is successful. |
| 3076 | */ | 3076 | */ |
diff --git a/drivers/net/tokenring/tms380tr.h b/drivers/net/tokenring/tms380tr.h index 60b30ee38dcb..e5a617c586c2 100644 --- a/drivers/net/tokenring/tms380tr.h +++ b/drivers/net/tokenring/tms380tr.h | |||
| @@ -442,7 +442,7 @@ typedef struct { | |||
| 442 | #define PASS_FIRST_BUF_ONLY 0x0100 /* Passes only first internal buffer | 442 | #define PASS_FIRST_BUF_ONLY 0x0100 /* Passes only first internal buffer |
| 443 | * of each received frame; FrameSize | 443 | * of each received frame; FrameSize |
| 444 | * of RPLs must contain internal | 444 | * of RPLs must contain internal |
| 445 | * BUFFER_SIZE bits for promiscous mode. | 445 | * BUFFER_SIZE bits for promiscuous mode. |
| 446 | */ | 446 | */ |
| 447 | #define ENABLE_FULL_DUPLEX_SELECTION 0x2000 | 447 | #define ENABLE_FULL_DUPLEX_SELECTION 0x2000 |
| 448 | /* Enable the use of full-duplex | 448 | /* Enable the use of full-duplex |
diff --git a/drivers/net/tsi108_eth.h b/drivers/net/tsi108_eth.h index 5a77ae6c5f36..5fee7d78dc6d 100644 --- a/drivers/net/tsi108_eth.h +++ b/drivers/net/tsi108_eth.h | |||
| @@ -305,9 +305,9 @@ | |||
| 305 | #define TSI108_TX_CRC (1 << 5) /* Generate CRC for this packet */ | 305 | #define TSI108_TX_CRC (1 << 5) /* Generate CRC for this packet */ |
| 306 | #define TSI108_TX_INT (1 << 14) /* Generate an IRQ after frag. processed */ | 306 | #define TSI108_TX_INT (1 << 14) /* Generate an IRQ after frag. processed */ |
| 307 | #define TSI108_TX_RETRY (0xf << 16) /* 4 bit field indicating num. of retries */ | 307 | #define TSI108_TX_RETRY (0xf << 16) /* 4 bit field indicating num. of retries */ |
| 308 | #define TSI108_TX_COL (1 << 20) /* Set if a collision occured */ | 308 | #define TSI108_TX_COL (1 << 20) /* Set if a collision occurred */ |
| 309 | #define TSI108_TX_LCOL (1 << 24) /* Set if a late collision occured */ | 309 | #define TSI108_TX_LCOL (1 << 24) /* Set if a late collision occurred */ |
| 310 | #define TSI108_TX_UNDER (1 << 25) /* Set if a FIFO underrun occured */ | 310 | #define TSI108_TX_UNDER (1 << 25) /* Set if a FIFO underrun occurred */ |
| 311 | #define TSI108_TX_RLIM (1 << 26) /* Set if the retry limit was reached */ | 311 | #define TSI108_TX_RLIM (1 << 26) /* Set if the retry limit was reached */ |
| 312 | #define TSI108_TX_OK (1 << 30) /* Set if the frame TX was successful */ | 312 | #define TSI108_TX_OK (1 << 30) /* Set if the frame TX was successful */ |
| 313 | #define TSI108_TX_OWN (1 << 31) /* Set if the device owns the descriptor */ | 313 | #define TSI108_TX_OWN (1 << 31) /* Set if the device owns the descriptor */ |
| @@ -332,7 +332,7 @@ typedef struct { | |||
| 332 | #define TSI108_RX_RUNT (1 << 4)/* Packet is less than minimum size */ | 332 | #define TSI108_RX_RUNT (1 << 4)/* Packet is less than minimum size */ |
| 333 | #define TSI108_RX_HASH (1 << 7)/* Hash table match */ | 333 | #define TSI108_RX_HASH (1 << 7)/* Hash table match */ |
| 334 | #define TSI108_RX_BAD (1 << 8) /* Bad frame */ | 334 | #define TSI108_RX_BAD (1 << 8) /* Bad frame */ |
| 335 | #define TSI108_RX_OVER (1 << 9) /* FIFO overrun occured */ | 335 | #define TSI108_RX_OVER (1 << 9) /* FIFO overrun occurred */ |
| 336 | #define TSI108_RX_TRUNC (1 << 11) /* Packet truncated due to excess length */ | 336 | #define TSI108_RX_TRUNC (1 << 11) /* Packet truncated due to excess length */ |
| 337 | #define TSI108_RX_CRC (1 << 12) /* Packet had a CRC error */ | 337 | #define TSI108_RX_CRC (1 << 12) /* Packet had a CRC error */ |
| 338 | #define TSI108_RX_INT (1 << 13) /* Generate an IRQ after frag. processed */ | 338 | #define TSI108_RX_INT (1 << 13) /* Generate an IRQ after frag. processed */ |
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c index 4dbd493b996b..efaa1d69b720 100644 --- a/drivers/net/tulip/de4x5.c +++ b/drivers/net/tulip/de4x5.c | |||
| @@ -79,7 +79,7 @@ | |||
| 79 | every usable DECchip board, I pinched Donald's 'next_module' field to | 79 | every usable DECchip board, I pinched Donald's 'next_module' field to |
| 80 | link my modules together. | 80 | link my modules together. |
| 81 | 81 | ||
| 82 | Upto 15 EISA cards can be supported under this driver, limited primarily | 82 | Up to 15 EISA cards can be supported under this driver, limited primarily |
| 83 | by the available IRQ lines. I have checked different configurations of | 83 | by the available IRQ lines. I have checked different configurations of |
| 84 | multiple depca, EtherWORKS 3 cards and de4x5 cards and have not found a | 84 | multiple depca, EtherWORKS 3 cards and de4x5 cards and have not found a |
| 85 | problem yet (provided you have at least depca.c v0.38) ... | 85 | problem yet (provided you have at least depca.c v0.38) ... |
| @@ -517,7 +517,7 @@ struct mii_phy { | |||
| 517 | u_int mci; /* 21142 MII Connector Interrupt info */ | 517 | u_int mci; /* 21142 MII Connector Interrupt info */ |
| 518 | }; | 518 | }; |
| 519 | 519 | ||
| 520 | #define DE4X5_MAX_PHY 8 /* Allow upto 8 attached PHY devices per board */ | 520 | #define DE4X5_MAX_PHY 8 /* Allow up to 8 attached PHY devices per board */ |
| 521 | 521 | ||
| 522 | struct sia_phy { | 522 | struct sia_phy { |
| 523 | u_char mc; /* Media Code */ | 523 | u_char mc; /* Media Code */ |
| @@ -1436,7 +1436,7 @@ de4x5_sw_reset(struct net_device *dev) | |||
| 1436 | 1436 | ||
| 1437 | /* Poll for setup frame completion (adapter interrupts are disabled now) */ | 1437 | /* Poll for setup frame completion (adapter interrupts are disabled now) */ |
| 1438 | 1438 | ||
| 1439 | for (j=0, i=0;(i<500) && (j==0);i++) { /* Upto 500ms delay */ | 1439 | for (j=0, i=0;(i<500) && (j==0);i++) { /* Up to 500ms delay */ |
| 1440 | mdelay(1); | 1440 | mdelay(1); |
| 1441 | if ((s32)le32_to_cpu(lp->tx_ring[lp->tx_new].status) >= 0) j=1; | 1441 | if ((s32)le32_to_cpu(lp->tx_ring[lp->tx_new].status) >= 0) j=1; |
| 1442 | } | 1442 | } |
diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c index 7064e035757a..fb07f48910ae 100644 --- a/drivers/net/tulip/dmfe.c +++ b/drivers/net/tulip/dmfe.c | |||
| @@ -1224,7 +1224,7 @@ static void dmfe_timer(unsigned long data) | |||
| 1224 | 1224 | ||
| 1225 | 1225 | ||
| 1226 | /* If chip reports that link is failed it could be because external | 1226 | /* If chip reports that link is failed it could be because external |
| 1227 | PHY link status pin is not conected correctly to chip | 1227 | PHY link status pin is not connected correctly to chip |
| 1228 | To be sure ask PHY too. | 1228 | To be sure ask PHY too. |
| 1229 | */ | 1229 | */ |
| 1230 | 1230 | ||
diff --git a/drivers/net/tulip/eeprom.c b/drivers/net/tulip/eeprom.c index 3031ed9c4a1a..296486bf0956 100644 --- a/drivers/net/tulip/eeprom.c +++ b/drivers/net/tulip/eeprom.c | |||
| @@ -115,7 +115,7 @@ static void __devinit tulip_build_fake_mediatable(struct tulip_private *tp) | |||
| 115 | 0x02, /* phy reset sequence length */ | 115 | 0x02, /* phy reset sequence length */ |
| 116 | 0x01, 0x00, /* phy reset sequence */ | 116 | 0x01, 0x00, /* phy reset sequence */ |
| 117 | 0x00, 0x78, /* media capabilities */ | 117 | 0x00, 0x78, /* media capabilities */ |
| 118 | 0x00, 0xe0, /* nway advertisment */ | 118 | 0x00, 0xe0, /* nway advertisement */ |
| 119 | 0x00, 0x05, /* fdx bit map */ | 119 | 0x00, 0x05, /* fdx bit map */ |
| 120 | 0x00, 0x06 /* ttm bit map */ | 120 | 0x00, 0x06 /* ttm bit map */ |
| 121 | }; | 121 | }; |
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c index 7fa5ec2de942..82653cb07857 100644 --- a/drivers/net/typhoon.c +++ b/drivers/net/typhoon.c | |||
| @@ -846,7 +846,7 @@ typhoon_start_tx(struct sk_buff *skb, struct net_device *dev) | |||
| 846 | if(typhoon_num_free_tx(txRing) < (numDesc + 2)) { | 846 | if(typhoon_num_free_tx(txRing) < (numDesc + 2)) { |
| 847 | netif_stop_queue(dev); | 847 | netif_stop_queue(dev); |
| 848 | 848 | ||
| 849 | /* A Tx complete IRQ could have gotten inbetween, making | 849 | /* A Tx complete IRQ could have gotten between, making |
| 850 | * the ring free again. Only need to recheck here, since | 850 | * the ring free again. Only need to recheck here, since |
| 851 | * Tx is serialized. | 851 | * Tx is serialized. |
| 852 | */ | 852 | */ |
diff --git a/drivers/net/ucc_geth.h b/drivers/net/ucc_geth.h index 055b87ab4f07..d12fcad145e9 100644 --- a/drivers/net/ucc_geth.h +++ b/drivers/net/ucc_geth.h | |||
| @@ -80,7 +80,7 @@ struct ucc_geth { | |||
| 80 | frames) received that were between 128 | 80 | frames) received that were between 128 |
| 81 | (Including FCS length==4) and 255 octets */ | 81 | (Including FCS length==4) and 255 octets */ |
| 82 | u32 txok; /* Total number of octets residing in frames | 82 | u32 txok; /* Total number of octets residing in frames |
| 83 | that where involved in successfull | 83 | that where involved in successful |
| 84 | transmission */ | 84 | transmission */ |
| 85 | u16 txcf; /* Total number of PAUSE control frames | 85 | u16 txcf; /* Total number of PAUSE control frames |
| 86 | transmitted by this MAC */ | 86 | transmitted by this MAC */ |
| @@ -759,7 +759,7 @@ struct ucc_geth_hardware_statistics { | |||
| 759 | frames) received that were between 128 | 759 | frames) received that were between 128 |
| 760 | (Including FCS length==4) and 255 octets */ | 760 | (Including FCS length==4) and 255 octets */ |
| 761 | u32 txok; /* Total number of octets residing in frames | 761 | u32 txok; /* Total number of octets residing in frames |
| 762 | that where involved in successfull | 762 | that where involved in successful |
| 763 | transmission */ | 763 | transmission */ |
| 764 | u16 txcf; /* Total number of PAUSE control frames | 764 | u16 txcf; /* Total number of PAUSE control frames |
| 765 | transmitted by this MAC */ | 765 | transmitted by this MAC */ |
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig index 6f600cced6e1..3ec22c307797 100644 --- a/drivers/net/usb/Kconfig +++ b/drivers/net/usb/Kconfig | |||
| @@ -433,4 +433,19 @@ config USB_SIERRA_NET | |||
| 433 | To compile this driver as a module, choose M here: the | 433 | To compile this driver as a module, choose M here: the |
| 434 | module will be called sierra_net. | 434 | module will be called sierra_net. |
| 435 | 435 | ||
| 436 | config USB_VL600 | ||
| 437 | tristate "LG VL600 modem dongle" | ||
| 438 | depends on USB_NET_CDCETHER | ||
| 439 | select USB_ACM | ||
| 440 | help | ||
| 441 | Select this if you want to use an LG Electronics 4G/LTE usb modem | ||
| 442 | called VL600. This driver only handles the ethernet | ||
| 443 | interface exposed by the modem firmware. To establish a connection | ||
| 444 | you will first need a userspace program that sends the right | ||
| 445 | command to the modem through its CDC ACM port, and most | ||
| 446 | likely also a DHCP client. See this thread about using the | ||
| 447 | 4G modem from Verizon: | ||
| 448 | |||
| 449 | http://ubuntuforums.org/showpost.php?p=10589647&postcount=17 | ||
| 450 | |||
| 436 | endmenu | 451 | endmenu |
diff --git a/drivers/net/usb/Makefile b/drivers/net/usb/Makefile index cac170301187..c7ec8a5f0a90 100644 --- a/drivers/net/usb/Makefile +++ b/drivers/net/usb/Makefile | |||
| @@ -27,4 +27,5 @@ obj-$(CONFIG_USB_IPHETH) += ipheth.o | |||
| 27 | obj-$(CONFIG_USB_SIERRA_NET) += sierra_net.o | 27 | obj-$(CONFIG_USB_SIERRA_NET) += sierra_net.o |
| 28 | obj-$(CONFIG_USB_NET_CX82310_ETH) += cx82310_eth.o | 28 | obj-$(CONFIG_USB_NET_CX82310_ETH) += cx82310_eth.o |
| 29 | obj-$(CONFIG_USB_NET_CDC_NCM) += cdc_ncm.o | 29 | obj-$(CONFIG_USB_NET_CDC_NCM) += cdc_ncm.o |
| 30 | obj-$(CONFIG_USB_VL600) += lg-vl600.o | ||
| 30 | 31 | ||
diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c index 5f3b97668e63..882f53f708df 100644 --- a/drivers/net/usb/cdc_eem.c +++ b/drivers/net/usb/cdc_eem.c | |||
| @@ -190,7 +190,7 @@ static int eem_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
| 190 | 190 | ||
| 191 | /* | 191 | /* |
| 192 | * EEM packet header format: | 192 | * EEM packet header format: |
| 193 | * b0..14: EEM type dependant (Data or Command) | 193 | * b0..14: EEM type dependent (Data or Command) |
| 194 | * b15: bmType | 194 | * b15: bmType |
| 195 | */ | 195 | */ |
| 196 | header = get_unaligned_le16(skb->data); | 196 | header = get_unaligned_le16(skb->data); |
| @@ -340,7 +340,7 @@ next: | |||
| 340 | 340 | ||
| 341 | static const struct driver_info eem_info = { | 341 | static const struct driver_info eem_info = { |
| 342 | .description = "CDC EEM Device", | 342 | .description = "CDC EEM Device", |
| 343 | .flags = FLAG_ETHER, | 343 | .flags = FLAG_ETHER | FLAG_POINTTOPOINT, |
| 344 | .bind = eem_bind, | 344 | .bind = eem_bind, |
| 345 | .rx_fixup = eem_rx_fixup, | 345 | .rx_fixup = eem_rx_fixup, |
| 346 | .tx_fixup = eem_tx_fixup, | 346 | .tx_fixup = eem_tx_fixup, |
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index 9a60e415d76b..341f7056a800 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c | |||
| @@ -378,7 +378,7 @@ static void dumpspeed(struct usbnet *dev, __le32 *speeds) | |||
| 378 | __le32_to_cpu(speeds[1]) / 1000); | 378 | __le32_to_cpu(speeds[1]) / 1000); |
| 379 | } | 379 | } |
| 380 | 380 | ||
| 381 | static void cdc_status(struct usbnet *dev, struct urb *urb) | 381 | void usbnet_cdc_status(struct usbnet *dev, struct urb *urb) |
| 382 | { | 382 | { |
| 383 | struct usb_cdc_notification *event; | 383 | struct usb_cdc_notification *event; |
| 384 | 384 | ||
| @@ -418,8 +418,9 @@ static void cdc_status(struct usbnet *dev, struct urb *urb) | |||
| 418 | break; | 418 | break; |
| 419 | } | 419 | } |
| 420 | } | 420 | } |
| 421 | EXPORT_SYMBOL_GPL(usbnet_cdc_status); | ||
| 421 | 422 | ||
| 422 | static int cdc_bind(struct usbnet *dev, struct usb_interface *intf) | 423 | int usbnet_cdc_bind(struct usbnet *dev, struct usb_interface *intf) |
| 423 | { | 424 | { |
| 424 | int status; | 425 | int status; |
| 425 | struct cdc_state *info = (void *) &dev->data; | 426 | struct cdc_state *info = (void *) &dev->data; |
| @@ -441,6 +442,7 @@ static int cdc_bind(struct usbnet *dev, struct usb_interface *intf) | |||
| 441 | */ | 442 | */ |
| 442 | return 0; | 443 | return 0; |
| 443 | } | 444 | } |
| 445 | EXPORT_SYMBOL_GPL(usbnet_cdc_bind); | ||
| 444 | 446 | ||
| 445 | static int cdc_manage_power(struct usbnet *dev, int on) | 447 | static int cdc_manage_power(struct usbnet *dev, int on) |
| 446 | { | 448 | { |
| @@ -450,20 +452,20 @@ static int cdc_manage_power(struct usbnet *dev, int on) | |||
| 450 | 452 | ||
| 451 | static const struct driver_info cdc_info = { | 453 | static const struct driver_info cdc_info = { |
| 452 | .description = "CDC Ethernet Device", | 454 | .description = "CDC Ethernet Device", |
| 453 | .flags = FLAG_ETHER, | 455 | .flags = FLAG_ETHER | FLAG_POINTTOPOINT, |
| 454 | // .check_connect = cdc_check_connect, | 456 | // .check_connect = cdc_check_connect, |
| 455 | .bind = cdc_bind, | 457 | .bind = usbnet_cdc_bind, |
| 456 | .unbind = usbnet_cdc_unbind, | 458 | .unbind = usbnet_cdc_unbind, |
| 457 | .status = cdc_status, | 459 | .status = usbnet_cdc_status, |
| 458 | .manage_power = cdc_manage_power, | 460 | .manage_power = cdc_manage_power, |
| 459 | }; | 461 | }; |
| 460 | 462 | ||
| 461 | static const struct driver_info mbm_info = { | 463 | static const struct driver_info mbm_info = { |
| 462 | .description = "Mobile Broadband Network Device", | 464 | .description = "Mobile Broadband Network Device", |
| 463 | .flags = FLAG_WWAN, | 465 | .flags = FLAG_WWAN, |
| 464 | .bind = cdc_bind, | 466 | .bind = usbnet_cdc_bind, |
| 465 | .unbind = usbnet_cdc_unbind, | 467 | .unbind = usbnet_cdc_unbind, |
| 466 | .status = cdc_status, | 468 | .status = usbnet_cdc_status, |
| 467 | .manage_power = cdc_manage_power, | 469 | .manage_power = cdc_manage_power, |
| 468 | }; | 470 | }; |
| 469 | 471 | ||
| @@ -560,6 +562,13 @@ static const struct usb_device_id products [] = { | |||
| 560 | .driver_info = 0, | 562 | .driver_info = 0, |
| 561 | }, | 563 | }, |
| 562 | 564 | ||
| 565 | /* LG Electronics VL600 wants additional headers on every frame */ | ||
| 566 | { | ||
| 567 | USB_DEVICE_AND_INTERFACE_INFO(0x1004, 0x61aa, USB_CLASS_COMM, | ||
| 568 | USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), | ||
| 569 | .driver_info = 0, | ||
| 570 | }, | ||
| 571 | |||
| 563 | /* | 572 | /* |
| 564 | * WHITELIST!!! | 573 | * WHITELIST!!! |
| 565 | * | 574 | * |
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index 7113168473cf..967371f04454 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c | |||
| @@ -1237,7 +1237,7 @@ static int cdc_ncm_manage_power(struct usbnet *dev, int status) | |||
| 1237 | 1237 | ||
| 1238 | static const struct driver_info cdc_ncm_info = { | 1238 | static const struct driver_info cdc_ncm_info = { |
| 1239 | .description = "CDC NCM", | 1239 | .description = "CDC NCM", |
| 1240 | .flags = FLAG_NO_SETINT | FLAG_MULTI_PACKET, | 1240 | .flags = FLAG_POINTTOPOINT | FLAG_NO_SETINT | FLAG_MULTI_PACKET, |
| 1241 | .bind = cdc_ncm_bind, | 1241 | .bind = cdc_ncm_bind, |
| 1242 | .unbind = cdc_ncm_unbind, | 1242 | .unbind = cdc_ncm_unbind, |
| 1243 | .check_connect = cdc_ncm_check_connect, | 1243 | .check_connect = cdc_ncm_check_connect, |
diff --git a/drivers/net/usb/cdc_subset.c b/drivers/net/usb/cdc_subset.c index ca39ace0b0eb..fc5f13d47ad9 100644 --- a/drivers/net/usb/cdc_subset.c +++ b/drivers/net/usb/cdc_subset.c | |||
| @@ -89,6 +89,7 @@ static int always_connected (struct usbnet *dev) | |||
| 89 | 89 | ||
| 90 | static const struct driver_info ali_m5632_info = { | 90 | static const struct driver_info ali_m5632_info = { |
| 91 | .description = "ALi M5632", | 91 | .description = "ALi M5632", |
| 92 | .flags = FLAG_POINTTOPOINT, | ||
| 92 | }; | 93 | }; |
| 93 | 94 | ||
| 94 | #endif | 95 | #endif |
| @@ -110,6 +111,7 @@ static const struct driver_info ali_m5632_info = { | |||
| 110 | 111 | ||
| 111 | static const struct driver_info an2720_info = { | 112 | static const struct driver_info an2720_info = { |
| 112 | .description = "AnchorChips/Cypress 2720", | 113 | .description = "AnchorChips/Cypress 2720", |
| 114 | .flags = FLAG_POINTTOPOINT, | ||
| 113 | // no reset available! | 115 | // no reset available! |
| 114 | // no check_connect available! | 116 | // no check_connect available! |
| 115 | 117 | ||
| @@ -132,6 +134,7 @@ static const struct driver_info an2720_info = { | |||
| 132 | 134 | ||
| 133 | static const struct driver_info belkin_info = { | 135 | static const struct driver_info belkin_info = { |
| 134 | .description = "Belkin, eTEK, or compatible", | 136 | .description = "Belkin, eTEK, or compatible", |
| 137 | .flags = FLAG_POINTTOPOINT, | ||
| 135 | }; | 138 | }; |
| 136 | 139 | ||
| 137 | #endif /* CONFIG_USB_BELKIN */ | 140 | #endif /* CONFIG_USB_BELKIN */ |
| @@ -157,6 +160,7 @@ static const struct driver_info belkin_info = { | |||
| 157 | static const struct driver_info epson2888_info = { | 160 | static const struct driver_info epson2888_info = { |
| 158 | .description = "Epson USB Device", | 161 | .description = "Epson USB Device", |
| 159 | .check_connect = always_connected, | 162 | .check_connect = always_connected, |
| 163 | .flags = FLAG_POINTTOPOINT, | ||
| 160 | 164 | ||
| 161 | .in = 4, .out = 3, | 165 | .in = 4, .out = 3, |
| 162 | }; | 166 | }; |
| @@ -173,6 +177,7 @@ static const struct driver_info epson2888_info = { | |||
| 173 | #define HAVE_HARDWARE | 177 | #define HAVE_HARDWARE |
| 174 | static const struct driver_info kc2190_info = { | 178 | static const struct driver_info kc2190_info = { |
| 175 | .description = "KC Technology KC-190", | 179 | .description = "KC Technology KC-190", |
| 180 | .flags = FLAG_POINTTOPOINT, | ||
| 176 | }; | 181 | }; |
| 177 | #endif /* CONFIG_USB_KC2190 */ | 182 | #endif /* CONFIG_USB_KC2190 */ |
| 178 | 183 | ||
| @@ -200,16 +205,19 @@ static const struct driver_info kc2190_info = { | |||
| 200 | static const struct driver_info linuxdev_info = { | 205 | static const struct driver_info linuxdev_info = { |
| 201 | .description = "Linux Device", | 206 | .description = "Linux Device", |
| 202 | .check_connect = always_connected, | 207 | .check_connect = always_connected, |
| 208 | .flags = FLAG_POINTTOPOINT, | ||
| 203 | }; | 209 | }; |
| 204 | 210 | ||
| 205 | static const struct driver_info yopy_info = { | 211 | static const struct driver_info yopy_info = { |
| 206 | .description = "Yopy", | 212 | .description = "Yopy", |
| 207 | .check_connect = always_connected, | 213 | .check_connect = always_connected, |
| 214 | .flags = FLAG_POINTTOPOINT, | ||
| 208 | }; | 215 | }; |
| 209 | 216 | ||
| 210 | static const struct driver_info blob_info = { | 217 | static const struct driver_info blob_info = { |
| 211 | .description = "Boot Loader OBject", | 218 | .description = "Boot Loader OBject", |
| 212 | .check_connect = always_connected, | 219 | .check_connect = always_connected, |
| 220 | .flags = FLAG_POINTTOPOINT, | ||
| 213 | }; | 221 | }; |
| 214 | 222 | ||
| 215 | #endif /* CONFIG_USB_ARMLINUX */ | 223 | #endif /* CONFIG_USB_ARMLINUX */ |
diff --git a/drivers/net/usb/gl620a.c b/drivers/net/usb/gl620a.c index dcd57c37ef73..c4cfd1dea881 100644 --- a/drivers/net/usb/gl620a.c +++ b/drivers/net/usb/gl620a.c | |||
| @@ -193,7 +193,7 @@ static int genelink_bind(struct usbnet *dev, struct usb_interface *intf) | |||
| 193 | 193 | ||
| 194 | static const struct driver_info genelink_info = { | 194 | static const struct driver_info genelink_info = { |
| 195 | .description = "Genesys GeneLink", | 195 | .description = "Genesys GeneLink", |
| 196 | .flags = FLAG_FRAMING_GL | FLAG_NO_SETINT, | 196 | .flags = FLAG_POINTTOPOINT | FLAG_FRAMING_GL | FLAG_NO_SETINT, |
| 197 | .bind = genelink_bind, | 197 | .bind = genelink_bind, |
| 198 | .rx_fixup = genelink_rx_fixup, | 198 | .rx_fixup = genelink_rx_fixup, |
| 199 | .tx_fixup = genelink_tx_fixup, | 199 | .tx_fixup = genelink_tx_fixup, |
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c index 7dc84971f26f..ad0298f9b5f9 100644 --- a/drivers/net/usb/kaweth.c +++ b/drivers/net/usb/kaweth.c | |||
| @@ -1221,7 +1221,7 @@ static void kaweth_disconnect(struct usb_interface *intf) | |||
| 1221 | 1221 | ||
| 1222 | usb_set_intfdata(intf, NULL); | 1222 | usb_set_intfdata(intf, NULL); |
| 1223 | if (!kaweth) { | 1223 | if (!kaweth) { |
| 1224 | dev_warn(&intf->dev, "unregistering non-existant device\n"); | 1224 | dev_warn(&intf->dev, "unregistering non-existent device\n"); |
| 1225 | return; | 1225 | return; |
| 1226 | } | 1226 | } |
| 1227 | netdev = kaweth->net; | 1227 | netdev = kaweth->net; |
diff --git a/drivers/net/usb/lg-vl600.c b/drivers/net/usb/lg-vl600.c new file mode 100644 index 000000000000..1d83ccfd7277 --- /dev/null +++ b/drivers/net/usb/lg-vl600.c | |||
| @@ -0,0 +1,346 @@ | |||
| 1 | /* | ||
| 2 | * Ethernet interface part of the LG VL600 LTE modem (4G dongle) | ||
| 3 | * | ||
| 4 | * Copyright (C) 2011 Intel Corporation | ||
| 5 | * Author: Andrzej Zaborowski <balrogg@gmail.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 20 | */ | ||
| 21 | #include <linux/etherdevice.h> | ||
| 22 | #include <linux/ethtool.h> | ||
| 23 | #include <linux/mii.h> | ||
| 24 | #include <linux/usb.h> | ||
| 25 | #include <linux/usb/cdc.h> | ||
| 26 | #include <linux/usb/usbnet.h> | ||
| 27 | #include <linux/if_ether.h> | ||
| 28 | #include <linux/if_arp.h> | ||
| 29 | #include <linux/inetdevice.h> | ||
| 30 | |||
| 31 | /* | ||
| 32 | * The device has a CDC ACM port for modem control (it claims to be | ||
| 33 | * CDC ACM anyway) and a CDC Ethernet port for actual network data. | ||
| 34 | * It will however ignore data on both ports that is not encapsulated | ||
| 35 | * in a specific way, any data returned is also encapsulated the same | ||
| 36 | * way. The headers don't seem to follow any popular standard. | ||
| 37 | * | ||
| 38 | * This driver adds and strips these headers from the ethernet frames | ||
| 39 | * sent/received from the CDC Ethernet port. The proprietary header | ||
| 40 | * replaces the standard ethernet header in a packet so only actual | ||
| 41 | * ethernet frames are allowed. The headers allow some form of | ||
| 42 | * multiplexing by using non standard values of the .h_proto field. | ||
| 43 | * Windows/Mac drivers do send a couple of such frames to the device | ||
| 44 | * during initialisation, with protocol set to 0x0906 or 0x0b06 and (what | ||
| 45 | * seems to be) a flag in the .dummy_flags. This doesn't seem necessary | ||
| 46 | * for modem operation but can possibly be used for GPS or other funcitons. | ||
| 47 | */ | ||
| 48 | |||
| 49 | struct vl600_frame_hdr { | ||
| 50 | __le32 len; | ||
| 51 | __le32 serial; | ||
| 52 | __le32 pkt_cnt; | ||
| 53 | __le32 dummy_flags; | ||
| 54 | __le32 dummy; | ||
| 55 | __le32 magic; | ||
| 56 | } __attribute__((packed)); | ||
| 57 | |||
| 58 | struct vl600_pkt_hdr { | ||
| 59 | __le32 dummy[2]; | ||
| 60 | __le32 len; | ||
| 61 | __be16 h_proto; | ||
| 62 | } __attribute__((packed)); | ||
| 63 | |||
| 64 | struct vl600_state { | ||
| 65 | struct sk_buff *current_rx_buf; | ||
| 66 | }; | ||
| 67 | |||
| 68 | static int vl600_bind(struct usbnet *dev, struct usb_interface *intf) | ||
| 69 | { | ||
| 70 | int ret; | ||
| 71 | struct vl600_state *s = kzalloc(sizeof(struct vl600_state), GFP_KERNEL); | ||
| 72 | |||
| 73 | if (!s) | ||
| 74 | return -ENOMEM; | ||
| 75 | |||
| 76 | ret = usbnet_cdc_bind(dev, intf); | ||
| 77 | if (ret) { | ||
| 78 | kfree(s); | ||
| 79 | return ret; | ||
| 80 | } | ||
| 81 | |||
| 82 | dev->driver_priv = s; | ||
| 83 | |||
| 84 | /* ARP packets don't go through, but they're also of no use. The | ||
| 85 | * subnet has only two hosts anyway: us and the gateway / DHCP | ||
| 86 | * server (probably simulated by modem firmware or network operator) | ||
| 87 | * whose address changes everytime we connect to the intarwebz and | ||
| 88 | * who doesn't bother answering ARP requests either. So hardware | ||
| 89 | * addresses have no meaning, the destination and the source of every | ||
| 90 | * packet depend only on whether it is on the IN or OUT endpoint. */ | ||
| 91 | dev->net->flags |= IFF_NOARP; | ||
| 92 | |||
| 93 | return ret; | ||
| 94 | } | ||
| 95 | |||
| 96 | static void vl600_unbind(struct usbnet *dev, struct usb_interface *intf) | ||
| 97 | { | ||
| 98 | struct vl600_state *s = dev->driver_priv; | ||
| 99 | |||
| 100 | if (s->current_rx_buf) | ||
| 101 | dev_kfree_skb(s->current_rx_buf); | ||
| 102 | |||
| 103 | kfree(s); | ||
| 104 | |||
| 105 | return usbnet_cdc_unbind(dev, intf); | ||
| 106 | } | ||
| 107 | |||
| 108 | static int vl600_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | ||
| 109 | { | ||
| 110 | struct vl600_frame_hdr *frame; | ||
| 111 | struct vl600_pkt_hdr *packet; | ||
| 112 | struct ethhdr *ethhdr; | ||
| 113 | int packet_len, count; | ||
| 114 | struct sk_buff *buf = skb; | ||
| 115 | struct sk_buff *clone; | ||
| 116 | struct vl600_state *s = dev->driver_priv; | ||
| 117 | |||
| 118 | /* Frame lengths are generally 4B multiplies but every couple of | ||
| 119 | * hours there's an odd number of bytes sized yet correct frame, | ||
| 120 | * so don't require this. */ | ||
| 121 | |||
| 122 | /* Allow a packet (or multiple packets batched together) to be | ||
| 123 | * split across many frames. We don't allow a new batch to | ||
| 124 | * begin in the same frame another one is ending however, and no | ||
| 125 | * leading or trailing pad bytes. */ | ||
| 126 | if (s->current_rx_buf) { | ||
| 127 | frame = (struct vl600_frame_hdr *) s->current_rx_buf->data; | ||
| 128 | if (skb->len + s->current_rx_buf->len > | ||
| 129 | le32_to_cpup(&frame->len)) { | ||
| 130 | netif_err(dev, ifup, dev->net, "Fragment too long\n"); | ||
| 131 | dev->net->stats.rx_length_errors++; | ||
| 132 | goto error; | ||
| 133 | } | ||
| 134 | |||
| 135 | buf = s->current_rx_buf; | ||
| 136 | memcpy(skb_put(buf, skb->len), skb->data, skb->len); | ||
| 137 | } else if (skb->len < 4) { | ||
| 138 | netif_err(dev, ifup, dev->net, "Frame too short\n"); | ||
| 139 | dev->net->stats.rx_length_errors++; | ||
| 140 | goto error; | ||
| 141 | } | ||
| 142 | |||
| 143 | frame = (struct vl600_frame_hdr *) buf->data; | ||
| 144 | /* NOTE: Should check that frame->magic == 0x53544448? | ||
| 145 | * Otherwise if we receive garbage at the beginning of the frame | ||
| 146 | * we may end up allocating a huge buffer and saving all the | ||
| 147 | * future incoming data into it. */ | ||
| 148 | |||
| 149 | if (buf->len < sizeof(*frame) || | ||
| 150 | buf->len != le32_to_cpup(&frame->len)) { | ||
| 151 | /* Save this fragment for later assembly */ | ||
| 152 | if (s->current_rx_buf) | ||
| 153 | return 0; | ||
| 154 | |||
| 155 | s->current_rx_buf = skb_copy_expand(skb, 0, | ||
| 156 | le32_to_cpup(&frame->len), GFP_ATOMIC); | ||
| 157 | if (!s->current_rx_buf) { | ||
| 158 | netif_err(dev, ifup, dev->net, "Reserving %i bytes " | ||
| 159 | "for packet assembly failed.\n", | ||
| 160 | le32_to_cpup(&frame->len)); | ||
| 161 | dev->net->stats.rx_errors++; | ||
| 162 | } | ||
| 163 | |||
| 164 | return 0; | ||
| 165 | } | ||
| 166 | |||
| 167 | count = le32_to_cpup(&frame->pkt_cnt); | ||
| 168 | |||
| 169 | skb_pull(buf, sizeof(*frame)); | ||
| 170 | |||
| 171 | while (count--) { | ||
| 172 | if (buf->len < sizeof(*packet)) { | ||
| 173 | netif_err(dev, ifup, dev->net, "Packet too short\n"); | ||
| 174 | goto error; | ||
| 175 | } | ||
| 176 | |||
| 177 | packet = (struct vl600_pkt_hdr *) buf->data; | ||
| 178 | packet_len = sizeof(*packet) + le32_to_cpup(&packet->len); | ||
| 179 | if (packet_len > buf->len) { | ||
| 180 | netif_err(dev, ifup, dev->net, | ||
| 181 | "Bad packet length stored in header\n"); | ||
| 182 | goto error; | ||
| 183 | } | ||
| 184 | |||
| 185 | /* Packet header is same size as the ethernet header | ||
| 186 | * (sizeof(*packet) == sizeof(*ethhdr)), additionally | ||
| 187 | * the h_proto field is in the same place so we just leave it | ||
| 188 | * alone and fill in the remaining fields. | ||
| 189 | */ | ||
| 190 | ethhdr = (struct ethhdr *) skb->data; | ||
| 191 | if (be16_to_cpup(ðhdr->h_proto) == ETH_P_ARP && | ||
| 192 | buf->len > 0x26) { | ||
| 193 | /* Copy the addresses from packet contents */ | ||
| 194 | memcpy(ethhdr->h_source, | ||
| 195 | &buf->data[sizeof(*ethhdr) + 0x8], | ||
| 196 | ETH_ALEN); | ||
| 197 | memcpy(ethhdr->h_dest, | ||
| 198 | &buf->data[sizeof(*ethhdr) + 0x12], | ||
| 199 | ETH_ALEN); | ||
| 200 | } else { | ||
| 201 | memset(ethhdr->h_source, 0, ETH_ALEN); | ||
| 202 | memcpy(ethhdr->h_dest, dev->net->dev_addr, ETH_ALEN); | ||
| 203 | } | ||
| 204 | |||
| 205 | if (count) { | ||
| 206 | /* Not the last packet in this batch */ | ||
| 207 | clone = skb_clone(buf, GFP_ATOMIC); | ||
| 208 | if (!clone) | ||
| 209 | goto error; | ||
| 210 | |||
| 211 | skb_trim(clone, packet_len); | ||
| 212 | usbnet_skb_return(dev, clone); | ||
| 213 | |||
| 214 | skb_pull(buf, (packet_len + 3) & ~3); | ||
| 215 | } else { | ||
| 216 | skb_trim(buf, packet_len); | ||
| 217 | |||
| 218 | if (s->current_rx_buf) { | ||
| 219 | usbnet_skb_return(dev, buf); | ||
| 220 | s->current_rx_buf = NULL; | ||
| 221 | return 0; | ||
| 222 | } | ||
| 223 | |||
| 224 | return 1; | ||
| 225 | } | ||
| 226 | } | ||
| 227 | |||
| 228 | error: | ||
| 229 | if (s->current_rx_buf) { | ||
| 230 | dev_kfree_skb_any(s->current_rx_buf); | ||
| 231 | s->current_rx_buf = NULL; | ||
| 232 | } | ||
| 233 | dev->net->stats.rx_errors++; | ||
| 234 | return 0; | ||
| 235 | } | ||
| 236 | |||
| 237 | static struct sk_buff *vl600_tx_fixup(struct usbnet *dev, | ||
| 238 | struct sk_buff *skb, gfp_t flags) | ||
| 239 | { | ||
| 240 | struct sk_buff *ret; | ||
| 241 | struct vl600_frame_hdr *frame; | ||
| 242 | struct vl600_pkt_hdr *packet; | ||
| 243 | static uint32_t serial = 1; | ||
| 244 | int orig_len = skb->len - sizeof(struct ethhdr); | ||
| 245 | int full_len = (skb->len + sizeof(struct vl600_frame_hdr) + 3) & ~3; | ||
| 246 | |||
| 247 | frame = (struct vl600_frame_hdr *) skb->data; | ||
| 248 | if (skb->len > sizeof(*frame) && skb->len == le32_to_cpup(&frame->len)) | ||
| 249 | return skb; /* Already encapsulated? */ | ||
| 250 | |||
| 251 | if (skb->len < sizeof(struct ethhdr)) | ||
| 252 | /* Drop, device can only deal with ethernet packets */ | ||
| 253 | return NULL; | ||
| 254 | |||
| 255 | if (!skb_cloned(skb)) { | ||
| 256 | int headroom = skb_headroom(skb); | ||
| 257 | int tailroom = skb_tailroom(skb); | ||
| 258 | |||
| 259 | if (tailroom >= full_len - skb->len - sizeof(*frame) && | ||
| 260 | headroom >= sizeof(*frame)) | ||
| 261 | /* There's enough head and tail room */ | ||
| 262 | goto encapsulate; | ||
| 263 | |||
| 264 | if (headroom + tailroom + skb->len >= full_len) { | ||
| 265 | /* There's enough total room, just readjust */ | ||
| 266 | skb->data = memmove(skb->head + sizeof(*frame), | ||
| 267 | skb->data, skb->len); | ||
| 268 | skb_set_tail_pointer(skb, skb->len); | ||
| 269 | goto encapsulate; | ||
| 270 | } | ||
| 271 | } | ||
| 272 | |||
| 273 | /* Alloc a new skb with the required size */ | ||
| 274 | ret = skb_copy_expand(skb, sizeof(struct vl600_frame_hdr), full_len - | ||
| 275 | skb->len - sizeof(struct vl600_frame_hdr), flags); | ||
| 276 | dev_kfree_skb_any(skb); | ||
| 277 | if (!ret) | ||
| 278 | return ret; | ||
| 279 | skb = ret; | ||
| 280 | |||
| 281 | encapsulate: | ||
| 282 | /* Packet header is same size as ethernet packet header | ||
| 283 | * (sizeof(*packet) == sizeof(struct ethhdr)), additionally the | ||
| 284 | * h_proto field is in the same place so we just leave it alone and | ||
| 285 | * overwrite the remaining fields. | ||
| 286 | */ | ||
| 287 | packet = (struct vl600_pkt_hdr *) skb->data; | ||
| 288 | memset(&packet->dummy, 0, sizeof(packet->dummy)); | ||
| 289 | packet->len = cpu_to_le32(orig_len); | ||
| 290 | |||
| 291 | frame = (struct vl600_frame_hdr *) skb_push(skb, sizeof(*frame)); | ||
| 292 | memset(frame, 0, sizeof(*frame)); | ||
| 293 | frame->len = cpu_to_le32(full_len); | ||
| 294 | frame->serial = cpu_to_le32(serial++); | ||
| 295 | frame->pkt_cnt = cpu_to_le32(1); | ||
| 296 | |||
| 297 | if (skb->len < full_len) /* Pad */ | ||
| 298 | skb_put(skb, full_len - skb->len); | ||
| 299 | |||
| 300 | return skb; | ||
| 301 | } | ||
| 302 | |||
| 303 | static const struct driver_info vl600_info = { | ||
| 304 | .description = "LG VL600 modem", | ||
| 305 | .flags = FLAG_ETHER | FLAG_RX_ASSEMBLE, | ||
| 306 | .bind = vl600_bind, | ||
| 307 | .unbind = vl600_unbind, | ||
| 308 | .status = usbnet_cdc_status, | ||
| 309 | .rx_fixup = vl600_rx_fixup, | ||
| 310 | .tx_fixup = vl600_tx_fixup, | ||
| 311 | }; | ||
| 312 | |||
| 313 | static const struct usb_device_id products[] = { | ||
| 314 | { | ||
| 315 | USB_DEVICE_AND_INTERFACE_INFO(0x1004, 0x61aa, USB_CLASS_COMM, | ||
| 316 | USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), | ||
| 317 | .driver_info = (unsigned long) &vl600_info, | ||
| 318 | }, | ||
| 319 | {}, /* End */ | ||
| 320 | }; | ||
| 321 | MODULE_DEVICE_TABLE(usb, products); | ||
| 322 | |||
| 323 | static struct usb_driver lg_vl600_driver = { | ||
| 324 | .name = "lg-vl600", | ||
| 325 | .id_table = products, | ||
| 326 | .probe = usbnet_probe, | ||
| 327 | .disconnect = usbnet_disconnect, | ||
| 328 | .suspend = usbnet_suspend, | ||
| 329 | .resume = usbnet_resume, | ||
| 330 | }; | ||
| 331 | |||
| 332 | static int __init vl600_init(void) | ||
| 333 | { | ||
| 334 | return usb_register(&lg_vl600_driver); | ||
| 335 | } | ||
| 336 | module_init(vl600_init); | ||
| 337 | |||
| 338 | static void __exit vl600_exit(void) | ||
| 339 | { | ||
| 340 | usb_deregister(&lg_vl600_driver); | ||
| 341 | } | ||
| 342 | module_exit(vl600_exit); | ||
| 343 | |||
| 344 | MODULE_AUTHOR("Anrzej Zaborowski"); | ||
| 345 | MODULE_DESCRIPTION("LG-VL600 modem's ethernet link"); | ||
| 346 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/net/usb/net1080.c b/drivers/net/usb/net1080.c index ba72a7281cb0..01db4602a39e 100644 --- a/drivers/net/usb/net1080.c +++ b/drivers/net/usb/net1080.c | |||
| @@ -560,7 +560,7 @@ static int net1080_bind(struct usbnet *dev, struct usb_interface *intf) | |||
| 560 | 560 | ||
| 561 | static const struct driver_info net1080_info = { | 561 | static const struct driver_info net1080_info = { |
| 562 | .description = "NetChip TurboCONNECT", | 562 | .description = "NetChip TurboCONNECT", |
| 563 | .flags = FLAG_FRAMING_NC, | 563 | .flags = FLAG_POINTTOPOINT | FLAG_FRAMING_NC, |
| 564 | .bind = net1080_bind, | 564 | .bind = net1080_bind, |
| 565 | .reset = net1080_reset, | 565 | .reset = net1080_reset, |
| 566 | .check_connect = net1080_check_connect, | 566 | .check_connect = net1080_check_connect, |
diff --git a/drivers/net/usb/plusb.c b/drivers/net/usb/plusb.c index 08ad269f6b4e..823c53751307 100644 --- a/drivers/net/usb/plusb.c +++ b/drivers/net/usb/plusb.c | |||
| @@ -96,7 +96,7 @@ static int pl_reset(struct usbnet *dev) | |||
| 96 | 96 | ||
| 97 | static const struct driver_info prolific_info = { | 97 | static const struct driver_info prolific_info = { |
| 98 | .description = "Prolific PL-2301/PL-2302", | 98 | .description = "Prolific PL-2301/PL-2302", |
| 99 | .flags = FLAG_NO_SETINT, | 99 | .flags = FLAG_POINTTOPOINT | FLAG_NO_SETINT, |
| 100 | /* some PL-2302 versions seem to fail usb_set_interface() */ | 100 | /* some PL-2302 versions seem to fail usb_set_interface() */ |
| 101 | .reset = pl_reset, | 101 | .reset = pl_reset, |
| 102 | }; | 102 | }; |
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c index dd8a4adf48ca..5994a25c56ac 100644 --- a/drivers/net/usb/rndis_host.c +++ b/drivers/net/usb/rndis_host.c | |||
| @@ -573,7 +573,7 @@ EXPORT_SYMBOL_GPL(rndis_tx_fixup); | |||
| 573 | 573 | ||
| 574 | static const struct driver_info rndis_info = { | 574 | static const struct driver_info rndis_info = { |
| 575 | .description = "RNDIS device", | 575 | .description = "RNDIS device", |
| 576 | .flags = FLAG_ETHER | FLAG_FRAMING_RN | FLAG_NO_SETINT, | 576 | .flags = FLAG_ETHER | FLAG_POINTTOPOINT | FLAG_FRAMING_RN | FLAG_NO_SETINT, |
| 577 | .bind = rndis_bind, | 577 | .bind = rndis_bind, |
| 578 | .unbind = rndis_unbind, | 578 | .unbind = rndis_unbind, |
| 579 | .status = rndis_status, | 579 | .status = rndis_status, |
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 727874d9deb6..47a6c870b51f 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c | |||
| @@ -1313,6 +1313,21 @@ static const struct usb_device_id products[] = { | |||
| 1313 | USB_DEVICE(0x0424, 0x9909), | 1313 | USB_DEVICE(0x0424, 0x9909), |
| 1314 | .driver_info = (unsigned long) &smsc95xx_info, | 1314 | .driver_info = (unsigned long) &smsc95xx_info, |
| 1315 | }, | 1315 | }, |
| 1316 | { | ||
| 1317 | /* SMSC LAN9530 USB Ethernet Device */ | ||
| 1318 | USB_DEVICE(0x0424, 0x9530), | ||
| 1319 | .driver_info = (unsigned long) &smsc95xx_info, | ||
| 1320 | }, | ||
| 1321 | { | ||
| 1322 | /* SMSC LAN9730 USB Ethernet Device */ | ||
| 1323 | USB_DEVICE(0x0424, 0x9730), | ||
| 1324 | .driver_info = (unsigned long) &smsc95xx_info, | ||
| 1325 | }, | ||
| 1326 | { | ||
| 1327 | /* SMSC LAN89530 USB Ethernet Device */ | ||
| 1328 | USB_DEVICE(0x0424, 0x9E08), | ||
| 1329 | .driver_info = (unsigned long) &smsc95xx_info, | ||
| 1330 | }, | ||
| 1316 | { }, /* END */ | 1331 | { }, /* END */ |
| 1317 | }; | 1332 | }; |
| 1318 | MODULE_DEVICE_TABLE(usb, products); | 1333 | MODULE_DEVICE_TABLE(usb, products); |
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 95c41d56631c..069c1cf0fdf7 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
| @@ -387,8 +387,12 @@ static int rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags) | |||
| 387 | static inline void rx_process (struct usbnet *dev, struct sk_buff *skb) | 387 | static inline void rx_process (struct usbnet *dev, struct sk_buff *skb) |
| 388 | { | 388 | { |
| 389 | if (dev->driver_info->rx_fixup && | 389 | if (dev->driver_info->rx_fixup && |
| 390 | !dev->driver_info->rx_fixup (dev, skb)) | 390 | !dev->driver_info->rx_fixup (dev, skb)) { |
| 391 | goto error; | 391 | /* With RX_ASSEMBLE, rx_fixup() must update counters */ |
| 392 | if (!(dev->driver_info->flags & FLAG_RX_ASSEMBLE)) | ||
| 393 | dev->net->stats.rx_errors++; | ||
| 394 | goto done; | ||
| 395 | } | ||
| 392 | // else network stack removes extra byte if we forced a short packet | 396 | // else network stack removes extra byte if we forced a short packet |
| 393 | 397 | ||
| 394 | if (skb->len) { | 398 | if (skb->len) { |
| @@ -401,8 +405,8 @@ static inline void rx_process (struct usbnet *dev, struct sk_buff *skb) | |||
| 401 | } | 405 | } |
| 402 | 406 | ||
| 403 | netif_dbg(dev, rx_err, dev->net, "drop\n"); | 407 | netif_dbg(dev, rx_err, dev->net, "drop\n"); |
| 404 | error: | ||
| 405 | dev->net->stats.rx_errors++; | 408 | dev->net->stats.rx_errors++; |
| 409 | done: | ||
| 406 | skb_queue_tail(&dev->done, skb); | 410 | skb_queue_tail(&dev->done, skb); |
| 407 | } | 411 | } |
| 408 | 412 | ||
| @@ -1376,7 +1380,8 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) | |||
| 1376 | // else "eth%d" when there's reasonable doubt. userspace | 1380 | // else "eth%d" when there's reasonable doubt. userspace |
| 1377 | // can rename the link if it knows better. | 1381 | // can rename the link if it knows better. |
| 1378 | if ((dev->driver_info->flags & FLAG_ETHER) != 0 && | 1382 | if ((dev->driver_info->flags & FLAG_ETHER) != 0 && |
| 1379 | (net->dev_addr [0] & 0x02) == 0) | 1383 | ((dev->driver_info->flags & FLAG_POINTTOPOINT) == 0 || |
| 1384 | (net->dev_addr [0] & 0x02) == 0)) | ||
| 1380 | strcpy (net->name, "eth%d"); | 1385 | strcpy (net->name, "eth%d"); |
| 1381 | /* WLAN devices should always be named "wlan%d" */ | 1386 | /* WLAN devices should always be named "wlan%d" */ |
| 1382 | if ((dev->driver_info->flags & FLAG_WLAN) != 0) | 1387 | if ((dev->driver_info->flags & FLAG_WLAN) != 0) |
diff --git a/drivers/net/usb/zaurus.c b/drivers/net/usb/zaurus.c index 3eb0b167b5b4..241756e0e86f 100644 --- a/drivers/net/usb/zaurus.c +++ b/drivers/net/usb/zaurus.c | |||
| @@ -102,7 +102,7 @@ static int always_connected (struct usbnet *dev) | |||
| 102 | 102 | ||
| 103 | static const struct driver_info zaurus_sl5x00_info = { | 103 | static const struct driver_info zaurus_sl5x00_info = { |
| 104 | .description = "Sharp Zaurus SL-5x00", | 104 | .description = "Sharp Zaurus SL-5x00", |
| 105 | .flags = FLAG_FRAMING_Z, | 105 | .flags = FLAG_POINTTOPOINT | FLAG_FRAMING_Z, |
| 106 | .check_connect = always_connected, | 106 | .check_connect = always_connected, |
| 107 | .bind = zaurus_bind, | 107 | .bind = zaurus_bind, |
| 108 | .unbind = usbnet_cdc_unbind, | 108 | .unbind = usbnet_cdc_unbind, |
| @@ -112,7 +112,7 @@ static const struct driver_info zaurus_sl5x00_info = { | |||
| 112 | 112 | ||
| 113 | static const struct driver_info zaurus_pxa_info = { | 113 | static const struct driver_info zaurus_pxa_info = { |
| 114 | .description = "Sharp Zaurus, PXA-2xx based", | 114 | .description = "Sharp Zaurus, PXA-2xx based", |
| 115 | .flags = FLAG_FRAMING_Z, | 115 | .flags = FLAG_POINTTOPOINT | FLAG_FRAMING_Z, |
| 116 | .check_connect = always_connected, | 116 | .check_connect = always_connected, |
| 117 | .bind = zaurus_bind, | 117 | .bind = zaurus_bind, |
| 118 | .unbind = usbnet_cdc_unbind, | 118 | .unbind = usbnet_cdc_unbind, |
| @@ -122,7 +122,7 @@ static const struct driver_info zaurus_pxa_info = { | |||
| 122 | 122 | ||
| 123 | static const struct driver_info olympus_mxl_info = { | 123 | static const struct driver_info olympus_mxl_info = { |
| 124 | .description = "Olympus R1000", | 124 | .description = "Olympus R1000", |
| 125 | .flags = FLAG_FRAMING_Z, | 125 | .flags = FLAG_POINTTOPOINT | FLAG_FRAMING_Z, |
| 126 | .check_connect = always_connected, | 126 | .check_connect = always_connected, |
| 127 | .bind = zaurus_bind, | 127 | .bind = zaurus_bind, |
| 128 | .unbind = usbnet_cdc_unbind, | 128 | .unbind = usbnet_cdc_unbind, |
| @@ -258,7 +258,7 @@ bad_desc: | |||
| 258 | 258 | ||
| 259 | static const struct driver_info bogus_mdlm_info = { | 259 | static const struct driver_info bogus_mdlm_info = { |
| 260 | .description = "pseudo-MDLM (BLAN) device", | 260 | .description = "pseudo-MDLM (BLAN) device", |
| 261 | .flags = FLAG_FRAMING_Z, | 261 | .flags = FLAG_POINTTOPOINT | FLAG_FRAMING_Z, |
| 262 | .check_connect = always_connected, | 262 | .check_connect = always_connected, |
| 263 | .tx_fixup = zaurus_tx_fixup, | 263 | .tx_fixup = zaurus_tx_fixup, |
| 264 | .bind = blan_mdlm_bind, | 264 | .bind = blan_mdlm_bind, |
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c index 5e7f069eab53..eb5d75df5d5d 100644 --- a/drivers/net/via-rhine.c +++ b/drivers/net/via-rhine.c | |||
| @@ -1861,7 +1861,7 @@ static void rhine_restart_tx(struct net_device *dev) { | |||
| 1861 | u32 intr_status; | 1861 | u32 intr_status; |
| 1862 | 1862 | ||
| 1863 | /* | 1863 | /* |
| 1864 | * If new errors occured, we need to sort them out before doing Tx. | 1864 | * If new errors occurred, we need to sort them out before doing Tx. |
| 1865 | * In that case the ISR will be back here RSN anyway. | 1865 | * In that case the ISR will be back here RSN anyway. |
| 1866 | */ | 1866 | */ |
| 1867 | intr_status = get_intr_status(dev); | 1867 | intr_status = get_intr_status(dev); |
| @@ -1887,7 +1887,7 @@ static void rhine_restart_tx(struct net_device *dev) { | |||
| 1887 | /* This should never happen */ | 1887 | /* This should never happen */ |
| 1888 | if (debug > 1) | 1888 | if (debug > 1) |
| 1889 | printk(KERN_WARNING "%s: rhine_restart_tx() " | 1889 | printk(KERN_WARNING "%s: rhine_restart_tx() " |
| 1890 | "Another error occured %8.8x.\n", | 1890 | "Another error occurred %8.8x.\n", |
| 1891 | dev->name, intr_status); | 1891 | dev->name, intr_status); |
| 1892 | } | 1892 | } |
| 1893 | 1893 | ||
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index 0d6fec6b7d93..4fe051753842 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c | |||
| @@ -292,7 +292,7 @@ VELOCITY_PARAM(DMA_length, "DMA length"); | |||
| 292 | /* IP_byte_align[] is used for IP header DWORD byte aligned | 292 | /* IP_byte_align[] is used for IP header DWORD byte aligned |
| 293 | 0: indicate the IP header won't be DWORD byte aligned.(Default) . | 293 | 0: indicate the IP header won't be DWORD byte aligned.(Default) . |
| 294 | 1: indicate the IP header will be DWORD byte aligned. | 294 | 1: indicate the IP header will be DWORD byte aligned. |
| 295 | In some enviroment, the IP header should be DWORD byte aligned, | 295 | In some environment, the IP header should be DWORD byte aligned, |
| 296 | or the packet will be droped when we receive it. (eg: IPVS) | 296 | or the packet will be droped when we receive it. (eg: IPVS) |
| 297 | */ | 297 | */ |
| 298 | VELOCITY_PARAM(IP_byte_align, "Enable IP header dword aligned"); | 298 | VELOCITY_PARAM(IP_byte_align, "Enable IP header dword aligned"); |
| @@ -1994,7 +1994,7 @@ static inline void velocity_rx_csum(struct rx_desc *rd, struct sk_buff *skb) | |||
| 1994 | * @dev: network device | 1994 | * @dev: network device |
| 1995 | * | 1995 | * |
| 1996 | * Replace the current skb that is scheduled for Rx processing by a | 1996 | * Replace the current skb that is scheduled for Rx processing by a |
| 1997 | * shorter, immediatly allocated skb, if the received packet is small | 1997 | * shorter, immediately allocated skb, if the received packet is small |
| 1998 | * enough. This function returns a negative value if the received | 1998 | * enough. This function returns a negative value if the received |
| 1999 | * packet is too big or if memory is exhausted. | 1999 | * packet is too big or if memory is exhausted. |
| 2000 | */ | 2000 | */ |
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index cc14b4a75048..0d47c3a05307 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
| @@ -892,7 +892,7 @@ vmxnet3_prepare_tso(struct sk_buff *skb, | |||
| 892 | * Transmits a pkt thru a given tq | 892 | * Transmits a pkt thru a given tq |
| 893 | * Returns: | 893 | * Returns: |
| 894 | * NETDEV_TX_OK: descriptors are setup successfully | 894 | * NETDEV_TX_OK: descriptors are setup successfully |
| 895 | * NETDEV_TX_OK: error occured, the pkt is dropped | 895 | * NETDEV_TX_OK: error occurred, the pkt is dropped |
| 896 | * NETDEV_TX_BUSY: tx ring is full, queue is stopped | 896 | * NETDEV_TX_BUSY: tx ring is full, queue is stopped |
| 897 | * | 897 | * |
| 898 | * Side-effects: | 898 | * Side-effects: |
| @@ -2685,7 +2685,7 @@ vmxnet3_read_mac_addr(struct vmxnet3_adapter *adapter, u8 *mac) | |||
| 2685 | * Enable MSIx vectors. | 2685 | * Enable MSIx vectors. |
| 2686 | * Returns : | 2686 | * Returns : |
| 2687 | * 0 on successful enabling of required vectors, | 2687 | * 0 on successful enabling of required vectors, |
| 2688 | * VMXNET3_LINUX_MIN_MSIX_VECT when only minumum number of vectors required | 2688 | * VMXNET3_LINUX_MIN_MSIX_VECT when only minimum number of vectors required |
| 2689 | * could be enabled. | 2689 | * could be enabled. |
| 2690 | * number of vectors which can be enabled otherwise (this number is smaller | 2690 | * number of vectors which can be enabled otherwise (this number is smaller |
| 2691 | * than VMXNET3_LINUX_MIN_MSIX_VECT) | 2691 | * than VMXNET3_LINUX_MIN_MSIX_VECT) |
diff --git a/drivers/net/vxge/vxge-config.c b/drivers/net/vxge/vxge-config.c index e74e4b42592d..401bebf59502 100644 --- a/drivers/net/vxge/vxge-config.c +++ b/drivers/net/vxge/vxge-config.c | |||
| @@ -187,7 +187,7 @@ vxge_hw_vpath_fw_api(struct __vxge_hw_virtualpath *vpath, u32 action, | |||
| 187 | VXGE_HW_DEF_DEVICE_POLL_MILLIS); | 187 | VXGE_HW_DEF_DEVICE_POLL_MILLIS); |
| 188 | 188 | ||
| 189 | /* The __vxge_hw_device_register_poll can udelay for a significant | 189 | /* The __vxge_hw_device_register_poll can udelay for a significant |
| 190 | * amount of time, blocking other proccess from the CPU. If it delays | 190 | * amount of time, blocking other process from the CPU. If it delays |
| 191 | * for ~5secs, a NMI error can occur. A way around this is to give up | 191 | * for ~5secs, a NMI error can occur. A way around this is to give up |
| 192 | * the processor via msleep, but this is not allowed is under lock. | 192 | * the processor via msleep, but this is not allowed is under lock. |
| 193 | * So, only allow it to sleep for ~4secs if open. Otherwise, delay for | 193 | * So, only allow it to sleep for ~4secs if open. Otherwise, delay for |
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c index 395423aeec00..aff68c1118d4 100644 --- a/drivers/net/vxge/vxge-main.c +++ b/drivers/net/vxge/vxge-main.c | |||
| @@ -2282,7 +2282,7 @@ vxge_alarm_msix_handle(int irq, void *dev_id) | |||
| 2282 | VXGE_HW_VPATH_MSIX_ACTIVE) + VXGE_ALARM_MSIX_ID; | 2282 | VXGE_HW_VPATH_MSIX_ACTIVE) + VXGE_ALARM_MSIX_ID; |
| 2283 | 2283 | ||
| 2284 | for (i = 0; i < vdev->no_of_vpath; i++) { | 2284 | for (i = 0; i < vdev->no_of_vpath; i++) { |
| 2285 | /* Reduce the chance of loosing alarm interrupts by masking | 2285 | /* Reduce the chance of losing alarm interrupts by masking |
| 2286 | * the vector. A pending bit will be set if an alarm is | 2286 | * the vector. A pending bit will be set if an alarm is |
| 2287 | * generated and on unmask the interrupt will be fired. | 2287 | * generated and on unmask the interrupt will be fired. |
| 2288 | */ | 2288 | */ |
| @@ -2788,7 +2788,7 @@ static int vxge_open(struct net_device *dev) | |||
| 2788 | } | 2788 | } |
| 2789 | 2789 | ||
| 2790 | /* Enable vpath to sniff all unicast/multicast traffic that not | 2790 | /* Enable vpath to sniff all unicast/multicast traffic that not |
| 2791 | * addressed to them. We allow promiscous mode for PF only | 2791 | * addressed to them. We allow promiscuous mode for PF only |
| 2792 | */ | 2792 | */ |
| 2793 | 2793 | ||
| 2794 | val64 = 0; | 2794 | val64 = 0; |
| @@ -2890,7 +2890,7 @@ out0: | |||
| 2890 | return ret; | 2890 | return ret; |
| 2891 | } | 2891 | } |
| 2892 | 2892 | ||
| 2893 | /* Loop throught the mac address list and delete all the entries */ | 2893 | /* Loop through the mac address list and delete all the entries */ |
| 2894 | static void vxge_free_mac_add_list(struct vxge_vpath *vpath) | 2894 | static void vxge_free_mac_add_list(struct vxge_vpath *vpath) |
| 2895 | { | 2895 | { |
| 2896 | 2896 | ||
| @@ -2957,7 +2957,7 @@ static int do_vxge_close(struct net_device *dev, int do_io) | |||
| 2957 | val64); | 2957 | val64); |
| 2958 | } | 2958 | } |
| 2959 | 2959 | ||
| 2960 | /* Remove the function 0 from promiscous mode */ | 2960 | /* Remove the function 0 from promiscuous mode */ |
| 2961 | vxge_hw_mgmt_reg_write(vdev->devh, | 2961 | vxge_hw_mgmt_reg_write(vdev->devh, |
| 2962 | vxge_hw_mgmt_reg_type_mrpcim, | 2962 | vxge_hw_mgmt_reg_type_mrpcim, |
| 2963 | 0, | 2963 | 0, |
diff --git a/drivers/net/vxge/vxge-traffic.c b/drivers/net/vxge/vxge-traffic.c index 8674f331311c..2638b8d97b8f 100644 --- a/drivers/net/vxge/vxge-traffic.c +++ b/drivers/net/vxge/vxge-traffic.c | |||
| @@ -1111,7 +1111,7 @@ void vxge_hw_channel_dtr_free(struct __vxge_hw_channel *channel, void *dtrh) | |||
| 1111 | * vxge_hw_channel_dtr_count | 1111 | * vxge_hw_channel_dtr_count |
| 1112 | * @channel: Channel handle. Obtained via vxge_hw_channel_open(). | 1112 | * @channel: Channel handle. Obtained via vxge_hw_channel_open(). |
| 1113 | * | 1113 | * |
| 1114 | * Retreive number of DTRs available. This function can not be called | 1114 | * Retrieve number of DTRs available. This function can not be called |
| 1115 | * from data path. ring_initial_replenishi() is the only user. | 1115 | * from data path. ring_initial_replenishi() is the only user. |
| 1116 | */ | 1116 | */ |
| 1117 | int vxge_hw_channel_dtr_count(struct __vxge_hw_channel *channel) | 1117 | int vxge_hw_channel_dtr_count(struct __vxge_hw_channel *channel) |
| @@ -2060,7 +2060,7 @@ enum vxge_hw_status vxge_hw_vpath_promisc_enable( | |||
| 2060 | 2060 | ||
| 2061 | vpath = vp->vpath; | 2061 | vpath = vp->vpath; |
| 2062 | 2062 | ||
| 2063 | /* Enable promiscous mode for function 0 only */ | 2063 | /* Enable promiscuous mode for function 0 only */ |
| 2064 | if (!(vpath->hldev->access_rights & | 2064 | if (!(vpath->hldev->access_rights & |
| 2065 | VXGE_HW_DEVICE_ACCESS_RIGHT_MRPCIM)) | 2065 | VXGE_HW_DEVICE_ACCESS_RIGHT_MRPCIM)) |
| 2066 | return VXGE_HW_OK; | 2066 | return VXGE_HW_OK; |
diff --git a/drivers/net/vxge/vxge-traffic.h b/drivers/net/vxge/vxge-traffic.h index 9d9dfda4c7ab..6c2fc0b72af5 100644 --- a/drivers/net/vxge/vxge-traffic.h +++ b/drivers/net/vxge/vxge-traffic.h | |||
| @@ -681,7 +681,7 @@ struct vxge_hw_xmac_aggr_stats { | |||
| 681 | * @rx_red_discard: Count of received frames that are discarded because of RED | 681 | * @rx_red_discard: Count of received frames that are discarded because of RED |
| 682 | * (Random Early Discard). | 682 | * (Random Early Discard). |
| 683 | * @rx_xgmii_ctrl_err_cnt: Maintains a count of unexpected or misplaced control | 683 | * @rx_xgmii_ctrl_err_cnt: Maintains a count of unexpected or misplaced control |
| 684 | * characters occuring between times of normal data transmission | 684 | * characters occurring between times of normal data transmission |
| 685 | * (i.e. not included in RX_XGMII_DATA_ERR_CNT). This counter is | 685 | * (i.e. not included in RX_XGMII_DATA_ERR_CNT). This counter is |
| 686 | * incremented when either - | 686 | * incremented when either - |
| 687 | * 1) The Reconciliation Sublayer (RS) is expecting one control | 687 | * 1) The Reconciliation Sublayer (RS) is expecting one control |
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c index 10bafd59f9c3..6fb6f8e667d0 100644 --- a/drivers/net/wan/cosa.c +++ b/drivers/net/wan/cosa.c | |||
| @@ -329,7 +329,7 @@ static int startmicrocode(struct cosa_data *cosa, int address); | |||
| 329 | static int readmem(struct cosa_data *cosa, char __user *data, int addr, int len); | 329 | static int readmem(struct cosa_data *cosa, char __user *data, int addr, int len); |
| 330 | static int cosa_reset_and_read_id(struct cosa_data *cosa, char *id); | 330 | static int cosa_reset_and_read_id(struct cosa_data *cosa, char *id); |
| 331 | 331 | ||
| 332 | /* Auxilliary functions */ | 332 | /* Auxiliary functions */ |
| 333 | static int get_wait_data(struct cosa_data *cosa); | 333 | static int get_wait_data(struct cosa_data *cosa); |
| 334 | static int put_wait_data(struct cosa_data *cosa, int data); | 334 | static int put_wait_data(struct cosa_data *cosa, int data); |
| 335 | static int puthexnumber(struct cosa_data *cosa, int number); | 335 | static int puthexnumber(struct cosa_data *cosa, int number); |
diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c index 4578e5b4b411..acb9ea830628 100644 --- a/drivers/net/wan/dscc4.c +++ b/drivers/net/wan/dscc4.c | |||
| @@ -56,7 +56,7 @@ | |||
| 56 | * IV. Notes | 56 | * IV. Notes |
| 57 | * The current error (XDU, RFO) recovery code is untested. | 57 | * The current error (XDU, RFO) recovery code is untested. |
| 58 | * So far, RDO takes his RX channel down and the right sequence to enable it | 58 | * So far, RDO takes his RX channel down and the right sequence to enable it |
| 59 | * again is still a mistery. If RDO happens, plan a reboot. More details | 59 | * again is still a mystery. If RDO happens, plan a reboot. More details |
| 60 | * in the code (NB: as this happens, TX still works). | 60 | * in the code (NB: as this happens, TX still works). |
| 61 | * Don't mess the cables during operation, especially on DTE ports. I don't | 61 | * Don't mess the cables during operation, especially on DTE ports. I don't |
| 62 | * suggest it for DCE either but at least one can get some messages instead | 62 | * suggest it for DCE either but at least one can get some messages instead |
| @@ -1065,7 +1065,7 @@ static int dscc4_open(struct net_device *dev) | |||
| 1065 | 1065 | ||
| 1066 | /* | 1066 | /* |
| 1067 | * Due to various bugs, there is no way to reliably reset a | 1067 | * Due to various bugs, there is no way to reliably reset a |
| 1068 | * specific port (manufacturer's dependant special PCI #RST wiring | 1068 | * specific port (manufacturer's dependent special PCI #RST wiring |
| 1069 | * apart: it affects all ports). Thus the device goes in the best | 1069 | * apart: it affects all ports). Thus the device goes in the best |
| 1070 | * silent mode possible at dscc4_close() time and simply claims to | 1070 | * silent mode possible at dscc4_close() time and simply claims to |
| 1071 | * be up if it's opened again. It still isn't possible to change | 1071 | * be up if it's opened again. It still isn't possible to change |
| @@ -1230,9 +1230,9 @@ static inline int dscc4_check_clock_ability(int port) | |||
| 1230 | * scaling. Of course some rounding may take place. | 1230 | * scaling. Of course some rounding may take place. |
| 1231 | * - no high speed mode (40Mb/s). May be trivial to do but I don't have an | 1231 | * - no high speed mode (40Mb/s). May be trivial to do but I don't have an |
| 1232 | * appropriate external clocking device for testing. | 1232 | * appropriate external clocking device for testing. |
| 1233 | * - no time-slot/clock mode 5: shameless lazyness. | 1233 | * - no time-slot/clock mode 5: shameless laziness. |
| 1234 | * | 1234 | * |
| 1235 | * The clock signals wiring can be (is ?) manufacturer dependant. Good luck. | 1235 | * The clock signals wiring can be (is ?) manufacturer dependent. Good luck. |
| 1236 | * | 1236 | * |
| 1237 | * BIG FAT WARNING: if the device isn't provided enough clocking signal, it | 1237 | * BIG FAT WARNING: if the device isn't provided enough clocking signal, it |
| 1238 | * won't pass the init sequence. For example, straight back-to-back DTE without | 1238 | * won't pass the init sequence. For example, straight back-to-back DTE without |
diff --git a/drivers/net/wan/hostess_sv11.c b/drivers/net/wan/hostess_sv11.c index 48edc5f4dac8..e817583e6ec5 100644 --- a/drivers/net/wan/hostess_sv11.c +++ b/drivers/net/wan/hostess_sv11.c | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | * The hardware does the bus handling to avoid the need for delays between | 15 | * The hardware does the bus handling to avoid the need for delays between |
| 16 | * touching control registers. | 16 | * touching control registers. |
| 17 | * | 17 | * |
| 18 | * Port B isnt wired (why - beats me) | 18 | * Port B isn't wired (why - beats me) |
| 19 | * | 19 | * |
| 20 | * Generic HDLC port Copyright (C) 2008 Krzysztof Halasa <khc@pm.waw.pl> | 20 | * Generic HDLC port Copyright (C) 2008 Krzysztof Halasa <khc@pm.waw.pl> |
| 21 | */ | 21 | */ |
diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c index 6c571e198835..f1e1643dc3eb 100644 --- a/drivers/net/wan/ixp4xx_hss.c +++ b/drivers/net/wan/ixp4xx_hss.c | |||
| @@ -178,7 +178,7 @@ | |||
| 178 | * | 178 | * |
| 179 | * The resulting average clock frequency (assuming 33.333 MHz oscillator) is: | 179 | * The resulting average clock frequency (assuming 33.333 MHz oscillator) is: |
| 180 | * freq = 66.666 MHz / (A + (B + 1) / (C + 1)) | 180 | * freq = 66.666 MHz / (A + (B + 1) / (C + 1)) |
| 181 | * minumum freq = 66.666 MHz / (A + 1) | 181 | * minimum freq = 66.666 MHz / (A + 1) |
| 182 | * maximum freq = 66.666 MHz / A | 182 | * maximum freq = 66.666 MHz / A |
| 183 | * | 183 | * |
| 184 | * Example: A = 2, B = 2, C = 7, CLOCK_CR register = 2 << 22 | 2 << 12 | 7 | 184 | * Example: A = 2, B = 2, C = 7, CLOCK_CR register = 2 << 22 | 2 << 12 | 7 |
| @@ -230,7 +230,7 @@ | |||
| 230 | #define PKT_PIPE_MODE_WRITE 0x57 | 230 | #define PKT_PIPE_MODE_WRITE 0x57 |
| 231 | 231 | ||
| 232 | /* HDLC packet status values - desc->status */ | 232 | /* HDLC packet status values - desc->status */ |
| 233 | #define ERR_SHUTDOWN 1 /* stop or shutdown occurrance */ | 233 | #define ERR_SHUTDOWN 1 /* stop or shutdown occurrence */ |
| 234 | #define ERR_HDLC_ALIGN 2 /* HDLC alignment error */ | 234 | #define ERR_HDLC_ALIGN 2 /* HDLC alignment error */ |
| 235 | #define ERR_HDLC_FCS 3 /* HDLC Frame Check Sum error */ | 235 | #define ERR_HDLC_FCS 3 /* HDLC Frame Check Sum error */ |
| 236 | #define ERR_RXFREE_Q_EMPTY 4 /* RX-free queue became empty while receiving | 236 | #define ERR_RXFREE_Q_EMPTY 4 /* RX-free queue became empty while receiving |
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c index 70feb84df670..b7f2358d23be 100644 --- a/drivers/net/wan/lmc/lmc_main.c +++ b/drivers/net/wan/lmc/lmc_main.c | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | * | 24 | * |
| 25 | * Linux driver notes: | 25 | * Linux driver notes: |
| 26 | * Linux uses the device struct lmc_private to pass private information | 26 | * Linux uses the device struct lmc_private to pass private information |
| 27 | * arround. | 27 | * around. |
| 28 | * | 28 | * |
| 29 | * The initialization portion of this driver (the lmc_reset() and the | 29 | * The initialization portion of this driver (the lmc_reset() and the |
| 30 | * lmc_dec_reset() functions, as well as the led controls and the | 30 | * lmc_dec_reset() functions, as well as the led controls and the |
diff --git a/drivers/net/wan/lmc/lmc_var.h b/drivers/net/wan/lmc/lmc_var.h index 65d01978e784..01ad45218d19 100644 --- a/drivers/net/wan/lmc/lmc_var.h +++ b/drivers/net/wan/lmc/lmc_var.h | |||
| @@ -180,7 +180,7 @@ struct lmc___ctl { | |||
| 180 | 180 | ||
| 181 | 181 | ||
| 182 | /* | 182 | /* |
| 183 | * Carefull, look at the data sheet, there's more to this | 183 | * Careful, look at the data sheet, there's more to this |
| 184 | * structure than meets the eye. It should probably be: | 184 | * structure than meets the eye. It should probably be: |
| 185 | * | 185 | * |
| 186 | * struct tulip_desc_t { | 186 | * struct tulip_desc_t { |
| @@ -380,7 +380,7 @@ struct lmc___softc { | |||
| 380 | /* CSR6 settings */ | 380 | /* CSR6 settings */ |
| 381 | #define OPERATION_MODE 0x00000200 /* Full Duplex */ | 381 | #define OPERATION_MODE 0x00000200 /* Full Duplex */ |
| 382 | #define PROMISC_MODE 0x00000040 /* Promiscuous Mode */ | 382 | #define PROMISC_MODE 0x00000040 /* Promiscuous Mode */ |
| 383 | #define RECIEVE_ALL 0x40000000 /* Recieve All */ | 383 | #define RECIEVE_ALL 0x40000000 /* Receive All */ |
| 384 | #define PASS_BAD_FRAMES 0x00000008 /* Pass Bad Frames */ | 384 | #define PASS_BAD_FRAMES 0x00000008 /* Pass Bad Frames */ |
| 385 | 385 | ||
| 386 | /* Dec control registers CSR6 as well */ | 386 | /* Dec control registers CSR6 as well */ |
| @@ -398,7 +398,7 @@ struct lmc___softc { | |||
| 398 | #define TULIP_CMD_RECEIVEALL 0x40000000L /* (RW) Receivel all frames? */ | 398 | #define TULIP_CMD_RECEIVEALL 0x40000000L /* (RW) Receivel all frames? */ |
| 399 | #define TULIP_CMD_MUSTBEONE 0x02000000L /* (RW) Must Be One (21140) */ | 399 | #define TULIP_CMD_MUSTBEONE 0x02000000L /* (RW) Must Be One (21140) */ |
| 400 | #define TULIP_CMD_TXTHRSHLDCTL 0x00400000L /* (RW) Transmit Threshold Mode (21140) */ | 400 | #define TULIP_CMD_TXTHRSHLDCTL 0x00400000L /* (RW) Transmit Threshold Mode (21140) */ |
| 401 | #define TULIP_CMD_STOREFWD 0x00200000L /* (RW) Store and Foward (21140) */ | 401 | #define TULIP_CMD_STOREFWD 0x00200000L /* (RW) Store and Forward (21140) */ |
| 402 | #define TULIP_CMD_NOHEARTBEAT 0x00080000L /* (RW) No Heartbeat (21140) */ | 402 | #define TULIP_CMD_NOHEARTBEAT 0x00080000L /* (RW) No Heartbeat (21140) */ |
| 403 | #define TULIP_CMD_PORTSELECT 0x00040000L /* (RW) Post Select (100Mb) (21140) */ | 403 | #define TULIP_CMD_PORTSELECT 0x00040000L /* (RW) Post Select (100Mb) (21140) */ |
| 404 | #define TULIP_CMD_FULLDUPLEX 0x00000200L /* (RW) Full Duplex Mode */ | 404 | #define TULIP_CMD_FULLDUPLEX 0x00000200L /* (RW) Full Duplex Mode */ |
diff --git a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c index 93956861ea21..0806232e0f8f 100644 --- a/drivers/net/wan/z85230.c +++ b/drivers/net/wan/z85230.c | |||
| @@ -542,7 +542,7 @@ static void z8530_dma_tx(struct z8530_channel *chan) | |||
| 542 | z8530_tx(chan); | 542 | z8530_tx(chan); |
| 543 | return; | 543 | return; |
| 544 | } | 544 | } |
| 545 | /* This shouldnt occur in DMA mode */ | 545 | /* This shouldn't occur in DMA mode */ |
| 546 | printk(KERN_ERR "DMA tx - bogus event!\n"); | 546 | printk(KERN_ERR "DMA tx - bogus event!\n"); |
| 547 | z8530_tx(chan); | 547 | z8530_tx(chan); |
| 548 | } | 548 | } |
| @@ -1219,7 +1219,7 @@ static const char *z8530_type_name[]={ | |||
| 1219 | * @io: the port value in question | 1219 | * @io: the port value in question |
| 1220 | * | 1220 | * |
| 1221 | * Describe a Z8530 in a standard format. We must pass the I/O as | 1221 | * Describe a Z8530 in a standard format. We must pass the I/O as |
| 1222 | * the port offset isnt predictable. The main reason for this function | 1222 | * the port offset isn't predictable. The main reason for this function |
| 1223 | * is to try and get a common format of report. | 1223 | * is to try and get a common format of report. |
| 1224 | */ | 1224 | */ |
| 1225 | 1225 | ||
| @@ -1588,7 +1588,7 @@ static void z8530_rx_done(struct z8530_channel *c) | |||
| 1588 | unsigned long flags; | 1588 | unsigned long flags; |
| 1589 | 1589 | ||
| 1590 | /* | 1590 | /* |
| 1591 | * Complete this DMA. Neccessary to find the length | 1591 | * Complete this DMA. Necessary to find the length |
| 1592 | */ | 1592 | */ |
| 1593 | 1593 | ||
| 1594 | flags=claim_dma_lock(); | 1594 | flags=claim_dma_lock(); |
| @@ -1657,7 +1657,7 @@ static void z8530_rx_done(struct z8530_channel *c) | |||
| 1657 | * fifo length for this. Thus we want to flip to the new | 1657 | * fifo length for this. Thus we want to flip to the new |
| 1658 | * buffer and then mess around copying and allocating | 1658 | * buffer and then mess around copying and allocating |
| 1659 | * things. For the current case it doesn't matter but | 1659 | * things. For the current case it doesn't matter but |
| 1660 | * if you build a system where the sync irq isnt blocked | 1660 | * if you build a system where the sync irq isn't blocked |
| 1661 | * by the kernel IRQ disable then you need only block the | 1661 | * by the kernel IRQ disable then you need only block the |
| 1662 | * sync IRQ for the RT_LOCK area. | 1662 | * sync IRQ for the RT_LOCK area. |
| 1663 | * | 1663 | * |
diff --git a/drivers/net/wimax/i2400m/control.c b/drivers/net/wimax/i2400m/control.c index 12b84ed0e38a..727d728649b7 100644 --- a/drivers/net/wimax/i2400m/control.c +++ b/drivers/net/wimax/i2400m/control.c | |||
| @@ -378,7 +378,7 @@ void i2400m_report_tlv_system_state(struct i2400m *i2400m, | |||
| 378 | * the device's state as sometimes we need to do a link-renew (the BS | 378 | * the device's state as sometimes we need to do a link-renew (the BS |
| 379 | * wants us to renew a DHCP lease, for example). | 379 | * wants us to renew a DHCP lease, for example). |
| 380 | * | 380 | * |
| 381 | * In fact, doc says that everytime we get a link-up, we should do a | 381 | * In fact, doc says that every time we get a link-up, we should do a |
| 382 | * DHCP negotiation... | 382 | * DHCP negotiation... |
| 383 | */ | 383 | */ |
| 384 | static | 384 | static |
| @@ -675,7 +675,7 @@ void i2400m_msg_to_dev_cancel_wait(struct i2400m *i2400m, int code) | |||
| 675 | * - the ack message wasn't formatted correctly | 675 | * - the ack message wasn't formatted correctly |
| 676 | * | 676 | * |
| 677 | * The returned skb has been allocated with wimax_msg_to_user_alloc(), | 677 | * The returned skb has been allocated with wimax_msg_to_user_alloc(), |
| 678 | * it contains the reponse in a netlink attribute and is ready to be | 678 | * it contains the response in a netlink attribute and is ready to be |
| 679 | * passed up to user space with wimax_msg_to_user_send(). To access | 679 | * passed up to user space with wimax_msg_to_user_send(). To access |
| 680 | * the payload and its length, use wimax_msg_{data,len}() on the skb. | 680 | * the payload and its length, use wimax_msg_{data,len}() on the skb. |
| 681 | * | 681 | * |
diff --git a/drivers/net/wimax/i2400m/driver.c b/drivers/net/wimax/i2400m/driver.c index 65bc334ed57b..47cae7150bc1 100644 --- a/drivers/net/wimax/i2400m/driver.c +++ b/drivers/net/wimax/i2400m/driver.c | |||
| @@ -654,7 +654,7 @@ void __i2400m_dev_reset_handle(struct work_struct *ws) | |||
| 654 | if (result == -EUCLEAN) { | 654 | if (result == -EUCLEAN) { |
| 655 | /* | 655 | /* |
| 656 | * We come here because the reset during operational mode | 656 | * We come here because the reset during operational mode |
| 657 | * wasn't successully done and need to proceed to a bus | 657 | * wasn't successfully done and need to proceed to a bus |
| 658 | * reset. For the dev_reset_handle() to be able to handle | 658 | * reset. For the dev_reset_handle() to be able to handle |
| 659 | * the reset event later properly, we restore boot_mode back | 659 | * the reset event later properly, we restore boot_mode back |
| 660 | * to the state before previous reset. ie: just like we are | 660 | * to the state before previous reset. ie: just like we are |
| @@ -755,7 +755,7 @@ EXPORT_SYMBOL_GPL(i2400m_error_recovery); | |||
| 755 | * Alloc the command and ack buffers for boot mode | 755 | * Alloc the command and ack buffers for boot mode |
| 756 | * | 756 | * |
| 757 | * Get the buffers needed to deal with boot mode messages. These | 757 | * Get the buffers needed to deal with boot mode messages. These |
| 758 | * buffers need to be allocated before the sdio recieve irq is setup. | 758 | * buffers need to be allocated before the sdio receive irq is setup. |
| 759 | */ | 759 | */ |
| 760 | static | 760 | static |
| 761 | int i2400m_bm_buf_alloc(struct i2400m *i2400m) | 761 | int i2400m_bm_buf_alloc(struct i2400m *i2400m) |
diff --git a/drivers/net/wimax/i2400m/fw.c b/drivers/net/wimax/i2400m/fw.c index 8b55a5b14152..85dadd5bf4be 100644 --- a/drivers/net/wimax/i2400m/fw.c +++ b/drivers/net/wimax/i2400m/fw.c | |||
| @@ -54,7 +54,7 @@ | |||
| 54 | * endpoint and read from it in the notification endpoint. In SDIO we | 54 | * endpoint and read from it in the notification endpoint. In SDIO we |
| 55 | * talk to it via the write address and read from the read address. | 55 | * talk to it via the write address and read from the read address. |
| 56 | * | 56 | * |
| 57 | * Upon entrance to boot mode, the device sends (preceeded with a few | 57 | * Upon entrance to boot mode, the device sends (preceded with a few |
| 58 | * zero length packets (ZLPs) on the notification endpoint in USB) a | 58 | * zero length packets (ZLPs) on the notification endpoint in USB) a |
| 59 | * reboot barker (4 le32 words with the same value). We ack it by | 59 | * reboot barker (4 le32 words with the same value). We ack it by |
| 60 | * sending the same barker to the device. The device acks with a | 60 | * sending the same barker to the device. The device acks with a |
| @@ -1589,7 +1589,7 @@ int i2400m_dev_bootstrap(struct i2400m *i2400m, enum i2400m_bri flags) | |||
| 1589 | i2400m->fw_name = fw_name; | 1589 | i2400m->fw_name = fw_name; |
| 1590 | ret = i2400m_fw_bootstrap(i2400m, fw, flags); | 1590 | ret = i2400m_fw_bootstrap(i2400m, fw, flags); |
| 1591 | release_firmware(fw); | 1591 | release_firmware(fw); |
| 1592 | if (ret >= 0) /* firmware loaded succesfully */ | 1592 | if (ret >= 0) /* firmware loaded successfully */ |
| 1593 | break; | 1593 | break; |
| 1594 | i2400m->fw_name = NULL; | 1594 | i2400m->fw_name = NULL; |
| 1595 | } | 1595 | } |
diff --git a/drivers/net/wimax/i2400m/i2400m-usb.h b/drivers/net/wimax/i2400m/i2400m-usb.h index eb80243e22df..6650fde99e1d 100644 --- a/drivers/net/wimax/i2400m/i2400m-usb.h +++ b/drivers/net/wimax/i2400m/i2400m-usb.h | |||
| @@ -105,14 +105,14 @@ static inline void edc_init(struct edc *edc) | |||
| 105 | * | 105 | * |
| 106 | * @edc: pointer to error density counter. | 106 | * @edc: pointer to error density counter. |
| 107 | * @max_err: maximum number of errors we can accept over the timeframe | 107 | * @max_err: maximum number of errors we can accept over the timeframe |
| 108 | * @timeframe: lenght of the timeframe (in jiffies). | 108 | * @timeframe: length of the timeframe (in jiffies). |
| 109 | * | 109 | * |
| 110 | * Returns: !0 1 if maximum acceptable errors per timeframe has been | 110 | * Returns: !0 1 if maximum acceptable errors per timeframe has been |
| 111 | * exceeded. 0 otherwise. | 111 | * exceeded. 0 otherwise. |
| 112 | * | 112 | * |
| 113 | * This is way to determine if the number of acceptable errors per time | 113 | * This is way to determine if the number of acceptable errors per time |
| 114 | * period has been exceeded. It is not accurate as there are cases in which | 114 | * period has been exceeded. It is not accurate as there are cases in which |
| 115 | * this scheme will not work, for example if there are periodic occurences | 115 | * this scheme will not work, for example if there are periodic occurrences |
| 116 | * of errors that straddle updates to the start time. This scheme is | 116 | * of errors that straddle updates to the start time. This scheme is |
| 117 | * sufficient for our usage. | 117 | * sufficient for our usage. |
| 118 | * | 118 | * |
| @@ -204,7 +204,7 @@ enum { | |||
| 204 | * usb_autopm_get/put_interface() barriers when executing | 204 | * usb_autopm_get/put_interface() barriers when executing |
| 205 | * commands. See doc in i2400mu_suspend() for more information. | 205 | * commands. See doc in i2400mu_suspend() for more information. |
| 206 | * | 206 | * |
| 207 | * @rx_size_auto_shrink: if true, the rx_size is shrinked | 207 | * @rx_size_auto_shrink: if true, the rx_size is shrunk |
| 208 | * automatically based on the average size of the received | 208 | * automatically based on the average size of the received |
| 209 | * transactions. This allows the receive code to allocate smaller | 209 | * transactions. This allows the receive code to allocate smaller |
| 210 | * chunks of memory and thus reduce pressure on the memory | 210 | * chunks of memory and thus reduce pressure on the memory |
diff --git a/drivers/net/wimax/i2400m/i2400m.h b/drivers/net/wimax/i2400m/i2400m.h index 030cbfd31704..5eacc653a94d 100644 --- a/drivers/net/wimax/i2400m/i2400m.h +++ b/drivers/net/wimax/i2400m/i2400m.h | |||
| @@ -526,7 +526,7 @@ struct i2400m_barker_db; | |||
| 526 | * | 526 | * |
| 527 | * @barker: barker type that the device uses; this is initialized by | 527 | * @barker: barker type that the device uses; this is initialized by |
| 528 | * i2400m_is_boot_barker() the first time it is called. Then it | 528 | * i2400m_is_boot_barker() the first time it is called. Then it |
| 529 | * won't change during the life cycle of the device and everytime | 529 | * won't change during the life cycle of the device and every time |
| 530 | * a boot barker is received, it is just verified for it being the | 530 | * a boot barker is received, it is just verified for it being the |
| 531 | * same. | 531 | * same. |
| 532 | * | 532 | * |
| @@ -928,7 +928,7 @@ extern void i2400m_report_tlv_rf_switches_status( | |||
| 928 | struct i2400m *, const struct i2400m_tlv_rf_switches_status *); | 928 | struct i2400m *, const struct i2400m_tlv_rf_switches_status *); |
| 929 | 929 | ||
| 930 | /* | 930 | /* |
| 931 | * Helpers for firmware backwards compability | 931 | * Helpers for firmware backwards compatibility |
| 932 | * | 932 | * |
| 933 | * As we aim to support at least the firmware version that was | 933 | * As we aim to support at least the firmware version that was |
| 934 | * released with the previous kernel/driver release, some code will be | 934 | * released with the previous kernel/driver release, some code will be |
diff --git a/drivers/net/wimax/i2400m/netdev.c b/drivers/net/wimax/i2400m/netdev.c index 94742e1eafe0..2edd8fe1c1f3 100644 --- a/drivers/net/wimax/i2400m/netdev.c +++ b/drivers/net/wimax/i2400m/netdev.c | |||
| @@ -166,7 +166,7 @@ void i2400m_wake_tx_work(struct work_struct *ws) | |||
| 166 | d_fnstart(3, dev, "(ws %p i2400m %p skb %p)\n", ws, i2400m, skb); | 166 | d_fnstart(3, dev, "(ws %p i2400m %p skb %p)\n", ws, i2400m, skb); |
| 167 | result = -EINVAL; | 167 | result = -EINVAL; |
| 168 | if (skb == NULL) { | 168 | if (skb == NULL) { |
| 169 | dev_err(dev, "WAKE&TX: skb dissapeared!\n"); | 169 | dev_err(dev, "WAKE&TX: skb disappeared!\n"); |
| 170 | goto out_put; | 170 | goto out_put; |
| 171 | } | 171 | } |
| 172 | /* If we have, somehow, lost the connection after this was | 172 | /* If we have, somehow, lost the connection after this was |
diff --git a/drivers/net/wimax/i2400m/op-rfkill.c b/drivers/net/wimax/i2400m/op-rfkill.c index 9e02b90b0080..b0dba35a8ad2 100644 --- a/drivers/net/wimax/i2400m/op-rfkill.c +++ b/drivers/net/wimax/i2400m/op-rfkill.c | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | * - report changes in the HW RF Kill switch [with | 27 | * - report changes in the HW RF Kill switch [with |
| 28 | * wimax_rfkill_{sw,hw}_report(), which happens when we detect those | 28 | * wimax_rfkill_{sw,hw}_report(), which happens when we detect those |
| 29 | * indications coming through hardware reports]. We also do it on | 29 | * indications coming through hardware reports]. We also do it on |
| 30 | * initialization to let the stack know the intial HW state. | 30 | * initialization to let the stack know the initial HW state. |
| 31 | * | 31 | * |
| 32 | * - implement indications from the stack to change the SW RF Kill | 32 | * - implement indications from the stack to change the SW RF Kill |
| 33 | * switch (coming from sysfs, the wimax stack or user space). | 33 | * switch (coming from sysfs, the wimax stack or user space). |
| @@ -73,7 +73,7 @@ int i2400m_radio_is(struct i2400m *i2400m, enum wimax_rf_state state) | |||
| 73 | * Generic Netlink will call this function when a message is sent from | 73 | * Generic Netlink will call this function when a message is sent from |
| 74 | * userspace to change the software RF-Kill switch status. | 74 | * userspace to change the software RF-Kill switch status. |
| 75 | * | 75 | * |
| 76 | * This function will set the device's sofware RF-Kill switch state to | 76 | * This function will set the device's software RF-Kill switch state to |
| 77 | * match what is requested. | 77 | * match what is requested. |
| 78 | * | 78 | * |
| 79 | * NOTE: the i2400m has a strict state machine; we can only set the | 79 | * NOTE: the i2400m has a strict state machine; we can only set the |
diff --git a/drivers/net/wimax/i2400m/rx.c b/drivers/net/wimax/i2400m/rx.c index 844133b44af0..2f94a872101f 100644 --- a/drivers/net/wimax/i2400m/rx.c +++ b/drivers/net/wimax/i2400m/rx.c | |||
| @@ -349,7 +349,7 @@ error_no_waiter: | |||
| 349 | * | 349 | * |
| 350 | * For reports: We can't clone the original skb where the data is | 350 | * For reports: We can't clone the original skb where the data is |
| 351 | * because we need to send this up via netlink; netlink has to add | 351 | * because we need to send this up via netlink; netlink has to add |
| 352 | * headers and we can't overwrite what's preceeding the payload...as | 352 | * headers and we can't overwrite what's preceding the payload...as |
| 353 | * it is another message. So we just dup them. | 353 | * it is another message. So we just dup them. |
| 354 | */ | 354 | */ |
| 355 | static | 355 | static |
| @@ -425,7 +425,7 @@ error_check: | |||
| 425 | * | 425 | * |
| 426 | * As in i2400m_rx_ctl(), we can't clone the original skb where the | 426 | * As in i2400m_rx_ctl(), we can't clone the original skb where the |
| 427 | * data is because we need to send this up via netlink; netlink has to | 427 | * data is because we need to send this up via netlink; netlink has to |
| 428 | * add headers and we can't overwrite what's preceeding the | 428 | * add headers and we can't overwrite what's preceding the |
| 429 | * payload...as it is another message. So we just dup them. | 429 | * payload...as it is another message. So we just dup them. |
| 430 | */ | 430 | */ |
| 431 | static | 431 | static |
diff --git a/drivers/net/wimax/i2400m/tx.c b/drivers/net/wimax/i2400m/tx.c index 3f819efc06b5..4b30ed11d785 100644 --- a/drivers/net/wimax/i2400m/tx.c +++ b/drivers/net/wimax/i2400m/tx.c | |||
| @@ -149,7 +149,7 @@ | |||
| 149 | * (with a moved message header to make sure it is size-aligned to | 149 | * (with a moved message header to make sure it is size-aligned to |
| 150 | * 16), TAIL room that was unusable (and thus is marked with a message | 150 | * 16), TAIL room that was unusable (and thus is marked with a message |
| 151 | * header that says 'skip this') and at the head of the buffer, an | 151 | * header that says 'skip this') and at the head of the buffer, an |
| 152 | * imcomplete message with a couple of payloads. | 152 | * incomplete message with a couple of payloads. |
| 153 | * | 153 | * |
| 154 | * N ___________________________________________________ | 154 | * N ___________________________________________________ |
| 155 | * | | | 155 | * | | |
| @@ -819,7 +819,7 @@ EXPORT_SYMBOL_GPL(i2400m_tx); | |||
| 819 | * the FIF that is ready for transmission. | 819 | * the FIF that is ready for transmission. |
| 820 | * | 820 | * |
| 821 | * It sets the state in @i2400m to indicate the bus-specific driver is | 821 | * It sets the state in @i2400m to indicate the bus-specific driver is |
| 822 | * transfering that message (i2400m->tx_msg_size). | 822 | * transferring that message (i2400m->tx_msg_size). |
| 823 | * | 823 | * |
| 824 | * Once the transfer is completed, call i2400m_tx_msg_sent(). | 824 | * Once the transfer is completed, call i2400m_tx_msg_sent(). |
| 825 | * | 825 | * |
diff --git a/drivers/net/wimax/i2400m/usb-fw.c b/drivers/net/wimax/i2400m/usb-fw.c index b58ec56b86f8..1fda46c55eb3 100644 --- a/drivers/net/wimax/i2400m/usb-fw.c +++ b/drivers/net/wimax/i2400m/usb-fw.c | |||
| @@ -169,7 +169,7 @@ retry: | |||
| 169 | * | 169 | * |
| 170 | * Command can be a raw command, which requires no preparation (and | 170 | * Command can be a raw command, which requires no preparation (and |
| 171 | * which might not even be following the command format). Checks that | 171 | * which might not even be following the command format). Checks that |
| 172 | * the right amount of data was transfered. | 172 | * the right amount of data was transferred. |
| 173 | * | 173 | * |
| 174 | * To satisfy USB requirements (no onstack, vmalloc or in data segment | 174 | * To satisfy USB requirements (no onstack, vmalloc or in data segment |
| 175 | * buffers), we copy the command to i2400m->bm_cmd_buf and send it from | 175 | * buffers), we copy the command to i2400m->bm_cmd_buf and send it from |
diff --git a/drivers/net/wimax/i2400m/usb-rx.c b/drivers/net/wimax/i2400m/usb-rx.c index a26483a812a5..e3257681e360 100644 --- a/drivers/net/wimax/i2400m/usb-rx.c +++ b/drivers/net/wimax/i2400m/usb-rx.c | |||
| @@ -58,7 +58,7 @@ | |||
| 58 | * a zillion reads; by serializing, we are throttling. | 58 | * a zillion reads; by serializing, we are throttling. |
| 59 | * | 59 | * |
| 60 | * - RX data processing can get heavy enough so that it is not | 60 | * - RX data processing can get heavy enough so that it is not |
| 61 | * appropiate for doing it in the USB callback; thus we run it in a | 61 | * appropriate for doing it in the USB callback; thus we run it in a |
| 62 | * process context. | 62 | * process context. |
| 63 | * | 63 | * |
| 64 | * We provide a read buffer of an arbitrary size (short of a page); if | 64 | * We provide a read buffer of an arbitrary size (short of a page); if |
diff --git a/drivers/net/wimax/i2400m/usb-tx.c b/drivers/net/wimax/i2400m/usb-tx.c index c65b9979f87e..ac357acfb3e9 100644 --- a/drivers/net/wimax/i2400m/usb-tx.c +++ b/drivers/net/wimax/i2400m/usb-tx.c | |||
| @@ -168,7 +168,7 @@ retry: | |||
| 168 | /* | 168 | /* |
| 169 | * Get the next TX message in the TX FIFO and send it to the device | 169 | * Get the next TX message in the TX FIFO and send it to the device |
| 170 | * | 170 | * |
| 171 | * Note we exit the loop if i2400mu_tx() fails; that funtion only | 171 | * Note we exit the loop if i2400mu_tx() fails; that function only |
| 172 | * fails on hard error (failing to tx a buffer not being one of them, | 172 | * fails on hard error (failing to tx a buffer not being one of them, |
| 173 | * see its doc). | 173 | * see its doc). |
| 174 | * | 174 | * |
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 57a79b0475f6..4e5c7a11f04a 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
| @@ -1884,7 +1884,7 @@ static int airo_open(struct net_device *dev) { | |||
| 1884 | /* Make sure the card is configured. | 1884 | /* Make sure the card is configured. |
| 1885 | * Wireless Extensions may postpone config changes until the card | 1885 | * Wireless Extensions may postpone config changes until the card |
| 1886 | * is open (to pipeline changes and speed-up card setup). If | 1886 | * is open (to pipeline changes and speed-up card setup). If |
| 1887 | * those changes are not yet commited, do it now - Jean II */ | 1887 | * those changes are not yet committed, do it now - Jean II */ |
| 1888 | if (test_bit(FLAG_COMMIT, &ai->flags)) { | 1888 | if (test_bit(FLAG_COMMIT, &ai->flags)) { |
| 1889 | disable_MAC(ai, 1); | 1889 | disable_MAC(ai, 1); |
| 1890 | writeConfigRid(ai, 1); | 1890 | writeConfigRid(ai, 1); |
| @@ -1992,7 +1992,7 @@ static int mpi_send_packet (struct net_device *dev) | |||
| 1992 | /* | 1992 | /* |
| 1993 | * Magic, the cards firmware needs a length count (2 bytes) in the host buffer | 1993 | * Magic, the cards firmware needs a length count (2 bytes) in the host buffer |
| 1994 | * right after TXFID_HDR.The TXFID_HDR contains the status short so payloadlen | 1994 | * right after TXFID_HDR.The TXFID_HDR contains the status short so payloadlen |
| 1995 | * is immediatly after it. ------------------------------------------------ | 1995 | * is immediately after it. ------------------------------------------------ |
| 1996 | * |TXFIDHDR+STATUS|PAYLOADLEN|802.3HDR|PACKETDATA| | 1996 | * |TXFIDHDR+STATUS|PAYLOADLEN|802.3HDR|PACKETDATA| |
| 1997 | * ------------------------------------------------ | 1997 | * ------------------------------------------------ |
| 1998 | */ | 1998 | */ |
| @@ -2006,7 +2006,7 @@ static int mpi_send_packet (struct net_device *dev) | |||
| 2006 | sizeof(wifictlhdr8023) + 2 ; | 2006 | sizeof(wifictlhdr8023) + 2 ; |
| 2007 | 2007 | ||
| 2008 | /* | 2008 | /* |
| 2009 | * Firmware automaticly puts 802 header on so | 2009 | * Firmware automatically puts 802 header on so |
| 2010 | * we don't need to account for it in the length | 2010 | * we don't need to account for it in the length |
| 2011 | */ | 2011 | */ |
| 2012 | if (test_bit(FLAG_MIC_CAPABLE, &ai->flags) && ai->micstats.enabled && | 2012 | if (test_bit(FLAG_MIC_CAPABLE, &ai->flags) && ai->micstats.enabled && |
| @@ -2531,7 +2531,7 @@ static int mpi_init_descriptors (struct airo_info *ai) | |||
| 2531 | /* | 2531 | /* |
| 2532 | * We are setting up three things here: | 2532 | * We are setting up three things here: |
| 2533 | * 1) Map AUX memory for descriptors: Rid, TxFid, or RxFid. | 2533 | * 1) Map AUX memory for descriptors: Rid, TxFid, or RxFid. |
| 2534 | * 2) Map PCI memory for issueing commands. | 2534 | * 2) Map PCI memory for issuing commands. |
| 2535 | * 3) Allocate memory (shared) to send and receive ethernet frames. | 2535 | * 3) Allocate memory (shared) to send and receive ethernet frames. |
| 2536 | */ | 2536 | */ |
| 2537 | static int mpi_map_card(struct airo_info *ai, struct pci_dev *pci) | 2537 | static int mpi_map_card(struct airo_info *ai, struct pci_dev *pci) |
| @@ -3947,7 +3947,7 @@ static u16 issuecommand(struct airo_info *ai, Cmd *pCmd, Resp *pRsp) { | |||
| 3947 | 3947 | ||
| 3948 | if ( max_tries == -1 ) { | 3948 | if ( max_tries == -1 ) { |
| 3949 | airo_print_err(ai->dev->name, | 3949 | airo_print_err(ai->dev->name, |
| 3950 | "Max tries exceeded when issueing command"); | 3950 | "Max tries exceeded when issuing command"); |
| 3951 | if (IN4500(ai, COMMAND) & COMMAND_BUSY) | 3951 | if (IN4500(ai, COMMAND) & COMMAND_BUSY) |
| 3952 | OUT4500(ai, EVACK, EV_CLEARCOMMANDBUSY); | 3952 | OUT4500(ai, EVACK, EV_CLEARCOMMANDBUSY); |
| 3953 | return ERROR; | 3953 | return ERROR; |
| @@ -4173,7 +4173,7 @@ done: | |||
| 4173 | } | 4173 | } |
| 4174 | 4174 | ||
| 4175 | /* Note, that we are using BAP1 which is also used by transmit, so | 4175 | /* Note, that we are using BAP1 which is also used by transmit, so |
| 4176 | * make sure this isnt called when a transmit is happening */ | 4176 | * make sure this isn't called when a transmit is happening */ |
| 4177 | static int PC4500_writerid(struct airo_info *ai, u16 rid, | 4177 | static int PC4500_writerid(struct airo_info *ai, u16 rid, |
| 4178 | const void *pBuf, int len, int lock) | 4178 | const void *pBuf, int len, int lock) |
| 4179 | { | 4179 | { |
| @@ -4776,7 +4776,7 @@ static int proc_stats_rid_open( struct inode *inode, | |||
| 4776 | if (!statsLabels[i]) continue; | 4776 | if (!statsLabels[i]) continue; |
| 4777 | if (j+strlen(statsLabels[i])+16>4096) { | 4777 | if (j+strlen(statsLabels[i])+16>4096) { |
| 4778 | airo_print_warn(apriv->dev->name, | 4778 | airo_print_warn(apriv->dev->name, |
| 4779 | "Potentially disasterous buffer overflow averted!"); | 4779 | "Potentially disastrous buffer overflow averted!"); |
| 4780 | break; | 4780 | break; |
| 4781 | } | 4781 | } |
| 4782 | j+=sprintf(data->rbuffer+j, "%s: %u\n", statsLabels[i], | 4782 | j+=sprintf(data->rbuffer+j, "%s: %u\n", statsLabels[i], |
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c index b761fec0d721..ccc2edaaeda0 100644 --- a/drivers/net/wireless/ath/ar9170/main.c +++ b/drivers/net/wireless/ath/ar9170/main.c | |||
| @@ -974,7 +974,7 @@ void ar9170_rx(struct ar9170 *ar, struct sk_buff *skb) | |||
| 974 | if (ar->rx_failover_missing <= 0) { | 974 | if (ar->rx_failover_missing <= 0) { |
| 975 | /* | 975 | /* |
| 976 | * nested ar9170_rx call! | 976 | * nested ar9170_rx call! |
| 977 | * termination is guranteed, even when the | 977 | * termination is guaranteed, even when the |
| 978 | * combined frame also have a element with | 978 | * combined frame also have a element with |
| 979 | * a bad tag. | 979 | * a bad tag. |
| 980 | */ | 980 | */ |
diff --git a/drivers/net/wireless/ath/ar9170/phy.c b/drivers/net/wireless/ath/ar9170/phy.c index 0dbfcf79ac96..aa8d06ba1ee4 100644 --- a/drivers/net/wireless/ath/ar9170/phy.c +++ b/drivers/net/wireless/ath/ar9170/phy.c | |||
| @@ -424,7 +424,7 @@ static u32 ar9170_get_default_phy_reg_val(u32 reg, bool is_2ghz, bool is_40mhz) | |||
| 424 | 424 | ||
| 425 | /* | 425 | /* |
| 426 | * initialize some phy regs from eeprom values in modal_header[] | 426 | * initialize some phy regs from eeprom values in modal_header[] |
| 427 | * acc. to band and bandwith | 427 | * acc. to band and bandwidth |
| 428 | */ | 428 | */ |
| 429 | static int ar9170_init_phy_from_eeprom(struct ar9170 *ar, | 429 | static int ar9170_init_phy_from_eeprom(struct ar9170 *ar, |
| 430 | bool is_2ghz, bool is_40mhz) | 430 | bool is_2ghz, bool is_40mhz) |
diff --git a/drivers/net/wireless/ath/ath5k/ani.h b/drivers/net/wireless/ath/ath5k/ani.h index d0a664039c87..034015397093 100644 --- a/drivers/net/wireless/ath/ath5k/ani.h +++ b/drivers/net/wireless/ath/ath5k/ani.h | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | #define ATH5K_ANI_RSSI_THR_HIGH 40 | 27 | #define ATH5K_ANI_RSSI_THR_HIGH 40 |
| 28 | #define ATH5K_ANI_RSSI_THR_LOW 7 | 28 | #define ATH5K_ANI_RSSI_THR_LOW 7 |
| 29 | 29 | ||
| 30 | /* maximum availabe levels */ | 30 | /* maximum available levels */ |
| 31 | #define ATH5K_ANI_MAX_FIRSTEP_LVL 2 | 31 | #define ATH5K_ANI_MAX_FIRSTEP_LVL 2 |
| 32 | #define ATH5K_ANI_MAX_NOISE_IMM_LVL 1 | 32 | #define ATH5K_ANI_MAX_NOISE_IMM_LVL 1 |
| 33 | 33 | ||
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 4d7f21ee111c..349a5963931b 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
| @@ -1953,7 +1953,7 @@ ath5k_beacon_update_timers(struct ath5k_softc *sc, u64 bc_tsf) | |||
| 1953 | 1953 | ||
| 1954 | #define FUDGE AR5K_TUNE_SW_BEACON_RESP + 3 | 1954 | #define FUDGE AR5K_TUNE_SW_BEACON_RESP + 3 |
| 1955 | /* We use FUDGE to make sure the next TBTT is ahead of the current TU. | 1955 | /* We use FUDGE to make sure the next TBTT is ahead of the current TU. |
| 1956 | * Since we later substract AR5K_TUNE_SW_BEACON_RESP (10) in the timer | 1956 | * Since we later subtract AR5K_TUNE_SW_BEACON_RESP (10) in the timer |
| 1957 | * configuration we need to make sure it is bigger than that. */ | 1957 | * configuration we need to make sure it is bigger than that. */ |
| 1958 | 1958 | ||
| 1959 | if (bc_tsf == -1) { | 1959 | if (bc_tsf == -1) { |
| @@ -1971,7 +1971,7 @@ ath5k_beacon_update_timers(struct ath5k_softc *sc, u64 bc_tsf) | |||
| 1971 | intval |= AR5K_BEACON_RESET_TSF; | 1971 | intval |= AR5K_BEACON_RESET_TSF; |
| 1972 | } else if (bc_tsf > hw_tsf) { | 1972 | } else if (bc_tsf > hw_tsf) { |
| 1973 | /* | 1973 | /* |
| 1974 | * beacon received, SW merge happend but HW TSF not yet updated. | 1974 | * beacon received, SW merge happened but HW TSF not yet updated. |
| 1975 | * not possible to reconfigure timers yet, but next time we | 1975 | * not possible to reconfigure timers yet, but next time we |
| 1976 | * receive a beacon with the same BSSID, the hardware will | 1976 | * receive a beacon with the same BSSID, the hardware will |
| 1977 | * automatically update the TSF and then we need to reconfigure | 1977 | * automatically update the TSF and then we need to reconfigure |
| @@ -2651,7 +2651,7 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan, | |||
| 2651 | synchronize_irq(sc->irq); | 2651 | synchronize_irq(sc->irq); |
| 2652 | stop_tasklets(sc); | 2652 | stop_tasklets(sc); |
| 2653 | 2653 | ||
| 2654 | /* Save ani mode and disable ANI durring | 2654 | /* Save ani mode and disable ANI during |
| 2655 | * reset. If we don't we might get false | 2655 | * reset. If we don't we might get false |
| 2656 | * PHY error interrupts. */ | 2656 | * PHY error interrupts. */ |
| 2657 | ani_mode = ah->ah_sc->ani_state.ani_mode; | 2657 | ani_mode = ah->ah_sc->ani_state.ani_mode; |
diff --git a/drivers/net/wireless/ath/ath5k/desc.c b/drivers/net/wireless/ath/ath5k/desc.c index 16b44ff7dd3e..a8fcc94269f7 100644 --- a/drivers/net/wireless/ath/ath5k/desc.c +++ b/drivers/net/wireless/ath/ath5k/desc.c | |||
| @@ -51,7 +51,7 @@ ath5k_hw_setup_2word_tx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc, | |||
| 51 | /* | 51 | /* |
| 52 | * Validate input | 52 | * Validate input |
| 53 | * - Zero retries don't make sense. | 53 | * - Zero retries don't make sense. |
| 54 | * - A zero rate will put the HW into a mode where it continously sends | 54 | * - A zero rate will put the HW into a mode where it continuously sends |
| 55 | * noise on the channel, so it is important to avoid this. | 55 | * noise on the channel, so it is important to avoid this. |
| 56 | */ | 56 | */ |
| 57 | if (unlikely(tx_tries0 == 0)) { | 57 | if (unlikely(tx_tries0 == 0)) { |
| @@ -190,7 +190,7 @@ static int ath5k_hw_setup_4word_tx_desc(struct ath5k_hw *ah, | |||
| 190 | /* | 190 | /* |
| 191 | * Validate input | 191 | * Validate input |
| 192 | * - Zero retries don't make sense. | 192 | * - Zero retries don't make sense. |
| 193 | * - A zero rate will put the HW into a mode where it continously sends | 193 | * - A zero rate will put the HW into a mode where it continuously sends |
| 194 | * noise on the channel, so it is important to avoid this. | 194 | * noise on the channel, so it is important to avoid this. |
| 195 | */ | 195 | */ |
| 196 | if (unlikely(tx_tries0 == 0)) { | 196 | if (unlikely(tx_tries0 == 0)) { |
| @@ -300,7 +300,7 @@ ath5k_hw_setup_mrr_tx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc, | |||
| 300 | /* | 300 | /* |
| 301 | * Rates can be 0 as long as the retry count is 0 too. | 301 | * Rates can be 0 as long as the retry count is 0 too. |
| 302 | * A zero rate and nonzero retry count will put the HW into a mode where | 302 | * A zero rate and nonzero retry count will put the HW into a mode where |
| 303 | * it continously sends noise on the channel, so it is important to | 303 | * it continuously sends noise on the channel, so it is important to |
| 304 | * avoid this. | 304 | * avoid this. |
| 305 | */ | 305 | */ |
| 306 | if (unlikely((tx_rate1 == 0 && tx_tries1 != 0) || | 306 | if (unlikely((tx_rate1 == 0 && tx_tries1 != 0) || |
| @@ -342,7 +342,7 @@ ath5k_hw_setup_mrr_tx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc, | |||
| 342 | \***********************/ | 342 | \***********************/ |
| 343 | 343 | ||
| 344 | /* | 344 | /* |
| 345 | * Proccess the tx status descriptor on 5210/5211 | 345 | * Process the tx status descriptor on 5210/5211 |
| 346 | */ | 346 | */ |
| 347 | static int ath5k_hw_proc_2word_tx_status(struct ath5k_hw *ah, | 347 | static int ath5k_hw_proc_2word_tx_status(struct ath5k_hw *ah, |
| 348 | struct ath5k_desc *desc, struct ath5k_tx_status *ts) | 348 | struct ath5k_desc *desc, struct ath5k_tx_status *ts) |
| @@ -394,7 +394,7 @@ static int ath5k_hw_proc_2word_tx_status(struct ath5k_hw *ah, | |||
| 394 | } | 394 | } |
| 395 | 395 | ||
| 396 | /* | 396 | /* |
| 397 | * Proccess a tx status descriptor on 5212 | 397 | * Process a tx status descriptor on 5212 |
| 398 | */ | 398 | */ |
| 399 | static int ath5k_hw_proc_4word_tx_status(struct ath5k_hw *ah, | 399 | static int ath5k_hw_proc_4word_tx_status(struct ath5k_hw *ah, |
| 400 | struct ath5k_desc *desc, struct ath5k_tx_status *ts) | 400 | struct ath5k_desc *desc, struct ath5k_tx_status *ts) |
| @@ -519,7 +519,7 @@ int ath5k_hw_setup_rx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc, | |||
| 519 | } | 519 | } |
| 520 | 520 | ||
| 521 | /* | 521 | /* |
| 522 | * Proccess the rx status descriptor on 5210/5211 | 522 | * Process the rx status descriptor on 5210/5211 |
| 523 | */ | 523 | */ |
| 524 | static int ath5k_hw_proc_5210_rx_status(struct ath5k_hw *ah, | 524 | static int ath5k_hw_proc_5210_rx_status(struct ath5k_hw *ah, |
| 525 | struct ath5k_desc *desc, struct ath5k_rx_status *rs) | 525 | struct ath5k_desc *desc, struct ath5k_rx_status *rs) |
| @@ -602,7 +602,7 @@ static int ath5k_hw_proc_5210_rx_status(struct ath5k_hw *ah, | |||
| 602 | } | 602 | } |
| 603 | 603 | ||
| 604 | /* | 604 | /* |
| 605 | * Proccess the rx status descriptor on 5212 | 605 | * Process the rx status descriptor on 5212 |
| 606 | */ | 606 | */ |
| 607 | static int ath5k_hw_proc_5212_rx_status(struct ath5k_hw *ah, | 607 | static int ath5k_hw_proc_5212_rx_status(struct ath5k_hw *ah, |
| 608 | struct ath5k_desc *desc, | 608 | struct ath5k_desc *desc, |
diff --git a/drivers/net/wireless/ath/ath5k/eeprom.c b/drivers/net/wireless/ath/ath5k/eeprom.c index b6561f785c6e..efb672cb31e4 100644 --- a/drivers/net/wireless/ath/ath5k/eeprom.c +++ b/drivers/net/wireless/ath/ath5k/eeprom.c | |||
| @@ -1080,7 +1080,7 @@ ath5k_eeprom_read_pcal_info_5112(struct ath5k_hw *ah, int mode) | |||
| 1080 | * | 1080 | * |
| 1081 | * To recreate the curves we read here the points and interpolate | 1081 | * To recreate the curves we read here the points and interpolate |
| 1082 | * later. Note that in most cases only 2 (higher and lower) curves are | 1082 | * later. Note that in most cases only 2 (higher and lower) curves are |
| 1083 | * used (like RF5112) but vendors have the oportunity to include all | 1083 | * used (like RF5112) but vendors have the opportunity to include all |
| 1084 | * 4 curves on eeprom. The final curve (higher power) has an extra | 1084 | * 4 curves on eeprom. The final curve (higher power) has an extra |
| 1085 | * point for better accuracy like RF5112. | 1085 | * point for better accuracy like RF5112. |
| 1086 | */ | 1086 | */ |
| @@ -1302,7 +1302,7 @@ ath5k_eeprom_read_pcal_info_2413(struct ath5k_hw *ah, int mode) | |||
| 1302 | /* | 1302 | /* |
| 1303 | * Pd gain 0 is not the last pd gain | 1303 | * Pd gain 0 is not the last pd gain |
| 1304 | * so it only has 2 pd points. | 1304 | * so it only has 2 pd points. |
| 1305 | * Continue wih pd gain 1. | 1305 | * Continue with pd gain 1. |
| 1306 | */ | 1306 | */ |
| 1307 | pcinfo->pwr_i[1] = (val >> 10) & 0x1f; | 1307 | pcinfo->pwr_i[1] = (val >> 10) & 0x1f; |
| 1308 | 1308 | ||
diff --git a/drivers/net/wireless/ath/ath5k/pci.c b/drivers/net/wireless/ath/ath5k/pci.c index 66598a0d1df0..3c44689a700b 100644 --- a/drivers/net/wireless/ath/ath5k/pci.c +++ b/drivers/net/wireless/ath/ath5k/pci.c | |||
| @@ -57,7 +57,7 @@ static void ath5k_pci_read_cachesize(struct ath_common *common, int *csz) | |||
| 57 | *csz = (int)u8tmp; | 57 | *csz = (int)u8tmp; |
| 58 | 58 | ||
| 59 | /* | 59 | /* |
| 60 | * This check was put in to avoid "unplesant" consequences if | 60 | * This check was put in to avoid "unpleasant" consequences if |
| 61 | * the bootrom has not fully initialized all PCI devices. | 61 | * the bootrom has not fully initialized all PCI devices. |
| 62 | * Sometimes the cache line size register is not set | 62 | * Sometimes the cache line size register is not set |
| 63 | */ | 63 | */ |
diff --git a/drivers/net/wireless/ath/ath5k/pcu.c b/drivers/net/wireless/ath/ath5k/pcu.c index a702817daf72..d9b3f828455a 100644 --- a/drivers/net/wireless/ath/ath5k/pcu.c +++ b/drivers/net/wireless/ath/ath5k/pcu.c | |||
| @@ -472,7 +472,7 @@ void ath5k_hw_set_rx_filter(struct ath5k_hw *ah, u32 filter) | |||
| 472 | } | 472 | } |
| 473 | 473 | ||
| 474 | /* | 474 | /* |
| 475 | * The AR5210 uses promiscous mode to detect radar activity | 475 | * The AR5210 uses promiscuous mode to detect radar activity |
| 476 | */ | 476 | */ |
| 477 | if (ah->ah_version == AR5K_AR5210 && | 477 | if (ah->ah_version == AR5K_AR5210 && |
| 478 | (filter & AR5K_RX_FILTER_RADARERR)) { | 478 | (filter & AR5K_RX_FILTER_RADARERR)) { |
| @@ -706,8 +706,8 @@ ath5k_check_timer_win(int a, int b, int window, int intval) | |||
| 706 | * The need for this function arises from the fact that we have 4 separate | 706 | * The need for this function arises from the fact that we have 4 separate |
| 707 | * HW timer registers (TIMER0 - TIMER3), which are closely related to the | 707 | * HW timer registers (TIMER0 - TIMER3), which are closely related to the |
| 708 | * next beacon target time (NBTT), and that the HW updates these timers | 708 | * next beacon target time (NBTT), and that the HW updates these timers |
| 709 | * seperately based on the current TSF value. The hardware increments each | 709 | * separately based on the current TSF value. The hardware increments each |
| 710 | * timer by the beacon interval, when the local TSF coverted to TU is equal | 710 | * timer by the beacon interval, when the local TSF converted to TU is equal |
| 711 | * to the value stored in the timer. | 711 | * to the value stored in the timer. |
| 712 | * | 712 | * |
| 713 | * The reception of a beacon with the same BSSID can update the local HW TSF | 713 | * The reception of a beacon with the same BSSID can update the local HW TSF |
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c index 62ce2f4e8605..55441913344d 100644 --- a/drivers/net/wireless/ath/ath5k/phy.c +++ b/drivers/net/wireless/ath/ath5k/phy.c | |||
| @@ -335,11 +335,11 @@ static void ath5k_hw_wait_for_synth(struct ath5k_hw *ah, | |||
| 335 | * http://madwifi-project.org/ticket/1659 | 335 | * http://madwifi-project.org/ticket/1659 |
| 336 | * with various measurements and diagrams | 336 | * with various measurements and diagrams |
| 337 | * | 337 | * |
| 338 | * TODO: Deal with power drops due to probes by setting an apropriate | 338 | * TODO: Deal with power drops due to probes by setting an appropriate |
| 339 | * tx power on the probe packets ! Make this part of the calibration process. | 339 | * tx power on the probe packets ! Make this part of the calibration process. |
| 340 | */ | 340 | */ |
| 341 | 341 | ||
| 342 | /* Initialize ah_gain durring attach */ | 342 | /* Initialize ah_gain during attach */ |
| 343 | int ath5k_hw_rfgain_opt_init(struct ath5k_hw *ah) | 343 | int ath5k_hw_rfgain_opt_init(struct ath5k_hw *ah) |
| 344 | { | 344 | { |
| 345 | /* Initialize the gain optimization values */ | 345 | /* Initialize the gain optimization values */ |
| @@ -1049,7 +1049,7 @@ static int ath5k_hw_rfregs_init(struct ath5k_hw *ah, | |||
| 1049 | \**************************/ | 1049 | \**************************/ |
| 1050 | 1050 | ||
| 1051 | /* | 1051 | /* |
| 1052 | * Convertion needed for RF5110 | 1052 | * Conversion needed for RF5110 |
| 1053 | */ | 1053 | */ |
| 1054 | static u32 ath5k_hw_rf5110_chan2athchan(struct ieee80211_channel *channel) | 1054 | static u32 ath5k_hw_rf5110_chan2athchan(struct ieee80211_channel *channel) |
| 1055 | { | 1055 | { |
| @@ -1088,7 +1088,7 @@ static int ath5k_hw_rf5110_channel(struct ath5k_hw *ah, | |||
| 1088 | } | 1088 | } |
| 1089 | 1089 | ||
| 1090 | /* | 1090 | /* |
| 1091 | * Convertion needed for 5111 | 1091 | * Conversion needed for 5111 |
| 1092 | */ | 1092 | */ |
| 1093 | static int ath5k_hw_rf5111_chan2athchan(unsigned int ieee, | 1093 | static int ath5k_hw_rf5111_chan2athchan(unsigned int ieee, |
| 1094 | struct ath5k_athchan_2ghz *athchan) | 1094 | struct ath5k_athchan_2ghz *athchan) |
| @@ -2201,7 +2201,7 @@ ath5k_create_power_curve(s16 pmin, s16 pmax, | |||
| 2201 | /* | 2201 | /* |
| 2202 | * Get the surrounding per-channel power calibration piers | 2202 | * Get the surrounding per-channel power calibration piers |
| 2203 | * for a given frequency so that we can interpolate between | 2203 | * for a given frequency so that we can interpolate between |
| 2204 | * them and come up with an apropriate dataset for our current | 2204 | * them and come up with an appropriate dataset for our current |
| 2205 | * channel. | 2205 | * channel. |
| 2206 | */ | 2206 | */ |
| 2207 | static void | 2207 | static void |
| @@ -2618,7 +2618,7 @@ ath5k_write_pcdac_table(struct ath5k_hw *ah) | |||
| 2618 | /* | 2618 | /* |
| 2619 | * Set the gain boundaries and create final Power to PDADC table | 2619 | * Set the gain boundaries and create final Power to PDADC table |
| 2620 | * | 2620 | * |
| 2621 | * We can have up to 4 pd curves, we need to do a simmilar process | 2621 | * We can have up to 4 pd curves, we need to do a similar process |
| 2622 | * as we do for RF5112. This time we don't have an edge_flag but we | 2622 | * as we do for RF5112. This time we don't have an edge_flag but we |
| 2623 | * set the gain boundaries on a separate register. | 2623 | * set the gain boundaries on a separate register. |
| 2624 | */ | 2624 | */ |
| @@ -2826,13 +2826,13 @@ ath5k_setup_channel_powertable(struct ath5k_hw *ah, | |||
| 2826 | u32 target = channel->center_freq; | 2826 | u32 target = channel->center_freq; |
| 2827 | int pdg, i; | 2827 | int pdg, i; |
| 2828 | 2828 | ||
| 2829 | /* Get surounding freq piers for this channel */ | 2829 | /* Get surrounding freq piers for this channel */ |
| 2830 | ath5k_get_chan_pcal_surrounding_piers(ah, channel, | 2830 | ath5k_get_chan_pcal_surrounding_piers(ah, channel, |
| 2831 | &pcinfo_L, | 2831 | &pcinfo_L, |
| 2832 | &pcinfo_R); | 2832 | &pcinfo_R); |
| 2833 | 2833 | ||
| 2834 | /* Loop over pd gain curves on | 2834 | /* Loop over pd gain curves on |
| 2835 | * surounding freq piers by index */ | 2835 | * surrounding freq piers by index */ |
| 2836 | for (pdg = 0; pdg < ee->ee_pd_gains[ee_mode]; pdg++) { | 2836 | for (pdg = 0; pdg < ee->ee_pd_gains[ee_mode]; pdg++) { |
| 2837 | 2837 | ||
| 2838 | /* Fill curves in reverse order | 2838 | /* Fill curves in reverse order |
| @@ -2923,7 +2923,7 @@ ath5k_setup_channel_powertable(struct ath5k_hw *ah, | |||
| 2923 | } | 2923 | } |
| 2924 | 2924 | ||
| 2925 | /* Interpolate between curves | 2925 | /* Interpolate between curves |
| 2926 | * of surounding freq piers to | 2926 | * of surrounding freq piers to |
| 2927 | * get the final curve for this | 2927 | * get the final curve for this |
| 2928 | * pd gain. Re-use tmpL for interpolation | 2928 | * pd gain. Re-use tmpL for interpolation |
| 2929 | * output */ | 2929 | * output */ |
| @@ -2947,7 +2947,7 @@ ath5k_setup_channel_powertable(struct ath5k_hw *ah, | |||
| 2947 | 2947 | ||
| 2948 | /* Fill min and max power levels for this | 2948 | /* Fill min and max power levels for this |
| 2949 | * channel by interpolating the values on | 2949 | * channel by interpolating the values on |
| 2950 | * surounding channels to complete the dataset */ | 2950 | * surrounding channels to complete the dataset */ |
| 2951 | ah->ah_txpower.txp_min_pwr = ath5k_get_interpolated_value(target, | 2951 | ah->ah_txpower.txp_min_pwr = ath5k_get_interpolated_value(target, |
| 2952 | (s16) pcinfo_L->freq, | 2952 | (s16) pcinfo_L->freq, |
| 2953 | (s16) pcinfo_R->freq, | 2953 | (s16) pcinfo_R->freq, |
| @@ -3179,7 +3179,7 @@ ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel, | |||
| 3179 | 3179 | ||
| 3180 | /* FIXME: TPC scale reduction */ | 3180 | /* FIXME: TPC scale reduction */ |
| 3181 | 3181 | ||
| 3182 | /* Get surounding channels for per-rate power table | 3182 | /* Get surrounding channels for per-rate power table |
| 3183 | * calibration */ | 3183 | * calibration */ |
| 3184 | ath5k_get_rate_pcal_data(ah, channel, &rate_info); | 3184 | ath5k_get_rate_pcal_data(ah, channel, &rate_info); |
| 3185 | 3185 | ||
diff --git a/drivers/net/wireless/ath/ath5k/reg.h b/drivers/net/wireless/ath/ath5k/reg.h index e1c9abd8c879..d12b827033c1 100644 --- a/drivers/net/wireless/ath/ath5k/reg.h +++ b/drivers/net/wireless/ath/ath5k/reg.h | |||
| @@ -132,8 +132,8 @@ | |||
| 132 | * As i can see in ar5k_ar5210_tx_start Reyk uses some of the values of BCR | 132 | * As i can see in ar5k_ar5210_tx_start Reyk uses some of the values of BCR |
| 133 | * for this register, so i guess TQ1V,TQ1FV and BDMAE have the same meaning | 133 | * for this register, so i guess TQ1V,TQ1FV and BDMAE have the same meaning |
| 134 | * here and SNP/SNAP means "snapshot" (so this register gets synced with BCR). | 134 | * here and SNP/SNAP means "snapshot" (so this register gets synced with BCR). |
| 135 | * So SNAPPEDBCRVALID sould also stand for "snapped BCR -values- valid", so i | 135 | * So SNAPPEDBCRVALID should also stand for "snapped BCR -values- valid", so i |
| 136 | * renamed it to SNAPSHOTSVALID to make more sense. I realy have no idea what | 136 | * renamed it to SNAPSHOTSVALID to make more sense. I really have no idea what |
| 137 | * else can it be. I also renamed SNPBCMD to SNPADHOC to match BCR. | 137 | * else can it be. I also renamed SNPBCMD to SNPADHOC to match BCR. |
| 138 | */ | 138 | */ |
| 139 | #define AR5K_BSR 0x002c /* Register Address */ | 139 | #define AR5K_BSR 0x002c /* Register Address */ |
| @@ -283,7 +283,7 @@ | |||
| 283 | */ | 283 | */ |
| 284 | #define AR5K_ISR 0x001c /* Register Address [5210] */ | 284 | #define AR5K_ISR 0x001c /* Register Address [5210] */ |
| 285 | #define AR5K_PISR 0x0080 /* Register Address [5211+] */ | 285 | #define AR5K_PISR 0x0080 /* Register Address [5211+] */ |
| 286 | #define AR5K_ISR_RXOK 0x00000001 /* Frame successfuly recieved */ | 286 | #define AR5K_ISR_RXOK 0x00000001 /* Frame successfuly received */ |
| 287 | #define AR5K_ISR_RXDESC 0x00000002 /* RX descriptor request */ | 287 | #define AR5K_ISR_RXDESC 0x00000002 /* RX descriptor request */ |
| 288 | #define AR5K_ISR_RXERR 0x00000004 /* Receive error */ | 288 | #define AR5K_ISR_RXERR 0x00000004 /* Receive error */ |
| 289 | #define AR5K_ISR_RXNOFRM 0x00000008 /* No frame received (receive timeout) */ | 289 | #define AR5K_ISR_RXNOFRM 0x00000008 /* No frame received (receive timeout) */ |
| @@ -372,12 +372,12 @@ | |||
| 372 | /* | 372 | /* |
| 373 | * Interrupt Mask Registers | 373 | * Interrupt Mask Registers |
| 374 | * | 374 | * |
| 375 | * As whith ISRs 5210 has one IMR (AR5K_IMR) and 5211/5212 has one primary | 375 | * As with ISRs 5210 has one IMR (AR5K_IMR) and 5211/5212 has one primary |
| 376 | * (AR5K_PIMR) and 4 secondary IMRs (AR5K_SIMRx). Note that ISR/IMR flags match. | 376 | * (AR5K_PIMR) and 4 secondary IMRs (AR5K_SIMRx). Note that ISR/IMR flags match. |
| 377 | */ | 377 | */ |
| 378 | #define AR5K_IMR 0x0020 /* Register Address [5210] */ | 378 | #define AR5K_IMR 0x0020 /* Register Address [5210] */ |
| 379 | #define AR5K_PIMR 0x00a0 /* Register Address [5211+] */ | 379 | #define AR5K_PIMR 0x00a0 /* Register Address [5211+] */ |
| 380 | #define AR5K_IMR_RXOK 0x00000001 /* Frame successfuly recieved*/ | 380 | #define AR5K_IMR_RXOK 0x00000001 /* Frame successfuly received*/ |
| 381 | #define AR5K_IMR_RXDESC 0x00000002 /* RX descriptor request*/ | 381 | #define AR5K_IMR_RXDESC 0x00000002 /* RX descriptor request*/ |
| 382 | #define AR5K_IMR_RXERR 0x00000004 /* Receive error*/ | 382 | #define AR5K_IMR_RXERR 0x00000004 /* Receive error*/ |
| 383 | #define AR5K_IMR_RXNOFRM 0x00000008 /* No frame received (receive timeout)*/ | 383 | #define AR5K_IMR_RXNOFRM 0x00000008 /* No frame received (receive timeout)*/ |
| @@ -895,7 +895,7 @@ | |||
| 895 | #define AR5K_PCICFG_SL_INTEN 0x00000800 /* Enable interrupts when asleep */ | 895 | #define AR5K_PCICFG_SL_INTEN 0x00000800 /* Enable interrupts when asleep */ |
| 896 | #define AR5K_PCICFG_LED_BCTL 0x00001000 /* Led blink (?) [5210] */ | 896 | #define AR5K_PCICFG_LED_BCTL 0x00001000 /* Led blink (?) [5210] */ |
| 897 | #define AR5K_PCICFG_RETRY_FIX 0x00001000 /* Enable pci core retry fix */ | 897 | #define AR5K_PCICFG_RETRY_FIX 0x00001000 /* Enable pci core retry fix */ |
| 898 | #define AR5K_PCICFG_SL_INPEN 0x00002000 /* Sleep even whith pending interrupts*/ | 898 | #define AR5K_PCICFG_SL_INPEN 0x00002000 /* Sleep even with pending interrupts*/ |
| 899 | #define AR5K_PCICFG_SPWR_DN 0x00010000 /* Mask for power status */ | 899 | #define AR5K_PCICFG_SPWR_DN 0x00010000 /* Mask for power status */ |
| 900 | #define AR5K_PCICFG_LEDMODE 0x000e0000 /* Ledmode [5211+] */ | 900 | #define AR5K_PCICFG_LEDMODE 0x000e0000 /* Ledmode [5211+] */ |
| 901 | #define AR5K_PCICFG_LEDMODE_PROP 0x00000000 /* Blink on standard traffic [5211+] */ | 901 | #define AR5K_PCICFG_LEDMODE_PROP 0x00000000 /* Blink on standard traffic [5211+] */ |
diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c index ffcf44a4058b..106c0b06cf55 100644 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c | |||
| @@ -142,7 +142,7 @@ static void ar5008_hw_force_bias(struct ath_hw *ah, u16 synth_freq) | |||
| 142 | 142 | ||
| 143 | /** | 143 | /** |
| 144 | * ar5008_hw_set_channel - tune to a channel on the external AR2133/AR5133 radios | 144 | * ar5008_hw_set_channel - tune to a channel on the external AR2133/AR5133 radios |
| 145 | * @ah: atheros hardware stucture | 145 | * @ah: atheros hardware structure |
| 146 | * @chan: | 146 | * @chan: |
| 147 | * | 147 | * |
| 148 | * For the external AR2133/AR5133 radios, takes the MHz channel value and set | 148 | * For the external AR2133/AR5133 radios, takes the MHz channel value and set |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index 4a9271802991..6eadf975ae48 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | |||
| @@ -3240,7 +3240,7 @@ static int ar9300_compress_decision(struct ath_hw *ah, | |||
| 3240 | eep = ar9003_eeprom_struct_find_by_id(reference); | 3240 | eep = ar9003_eeprom_struct_find_by_id(reference); |
| 3241 | if (eep == NULL) { | 3241 | if (eep == NULL) { |
| 3242 | ath_dbg(common, ATH_DBG_EEPROM, | 3242 | ath_dbg(common, ATH_DBG_EEPROM, |
| 3243 | "cant find reference eeprom struct %d\n", | 3243 | "can't find reference eeprom struct %d\n", |
| 3244 | reference); | 3244 | reference); |
| 3245 | return -1; | 3245 | return -1; |
| 3246 | } | 3246 | } |
diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c index c41ab8c30161..62e139a30a74 100644 --- a/drivers/net/wireless/ath/ath9k/htc_hst.c +++ b/drivers/net/wireless/ath/ath9k/htc_hst.c | |||
| @@ -360,7 +360,7 @@ ret: | |||
| 360 | * HTC Messages are handled directly here and the obtained SKB | 360 | * HTC Messages are handled directly here and the obtained SKB |
| 361 | * is freed. | 361 | * is freed. |
| 362 | * | 362 | * |
| 363 | * Sevice messages (Data, WMI) passed to the corresponding | 363 | * Service messages (Data, WMI) passed to the corresponding |
| 364 | * endpoint RX handlers, which have to free the SKB. | 364 | * endpoint RX handlers, which have to free the SKB. |
| 365 | */ | 365 | */ |
| 366 | void ath9k_htc_rx_msg(struct htc_target *htc_handle, | 366 | void ath9k_htc_rx_msg(struct htc_target *htc_handle, |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 338b07502f1a..1ec9bcd6b281 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
| @@ -2546,6 +2546,7 @@ static struct { | |||
| 2546 | { AR_SREV_VERSION_9287, "9287" }, | 2546 | { AR_SREV_VERSION_9287, "9287" }, |
| 2547 | { AR_SREV_VERSION_9271, "9271" }, | 2547 | { AR_SREV_VERSION_9271, "9271" }, |
| 2548 | { AR_SREV_VERSION_9300, "9300" }, | 2548 | { AR_SREV_VERSION_9300, "9300" }, |
| 2549 | { AR_SREV_VERSION_9485, "9485" }, | ||
| 2549 | }; | 2550 | }; |
| 2550 | 2551 | ||
| 2551 | /* For devices with external radios */ | 2552 | /* For devices with external radios */ |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 524825720a09..dddb85de622d 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
| @@ -1048,6 +1048,8 @@ static int ath9k_start(struct ieee80211_hw *hw) | |||
| 1048 | "Starting driver with initial channel: %d MHz\n", | 1048 | "Starting driver with initial channel: %d MHz\n", |
| 1049 | curchan->center_freq); | 1049 | curchan->center_freq); |
| 1050 | 1050 | ||
| 1051 | ath9k_ps_wakeup(sc); | ||
| 1052 | |||
| 1051 | mutex_lock(&sc->mutex); | 1053 | mutex_lock(&sc->mutex); |
| 1052 | 1054 | ||
| 1053 | /* setup initial channel */ | 1055 | /* setup initial channel */ |
| @@ -1143,6 +1145,8 @@ static int ath9k_start(struct ieee80211_hw *hw) | |||
| 1143 | mutex_unlock: | 1145 | mutex_unlock: |
| 1144 | mutex_unlock(&sc->mutex); | 1146 | mutex_unlock(&sc->mutex); |
| 1145 | 1147 | ||
| 1148 | ath9k_ps_restore(sc); | ||
| 1149 | |||
| 1146 | return r; | 1150 | return r; |
| 1147 | } | 1151 | } |
| 1148 | 1152 | ||
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index e83128c50f7b..9c65459be100 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c | |||
| @@ -44,7 +44,7 @@ static void ath_pci_read_cachesize(struct ath_common *common, int *csz) | |||
| 44 | *csz = (int)u8tmp; | 44 | *csz = (int)u8tmp; |
| 45 | 45 | ||
| 46 | /* | 46 | /* |
| 47 | * This check was put in to avoid "unplesant" consequences if | 47 | * This check was put in to avoid "unpleasant" consequences if |
| 48 | * the bootrom has not fully initialized all PCI devices. | 48 | * the bootrom has not fully initialized all PCI devices. |
| 49 | * Sometimes the cache line size register is not set | 49 | * Sometimes the cache line size register is not set |
| 50 | */ | 50 | */ |
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index a3241cd089b1..4c0d36a6980f 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c | |||
| @@ -792,7 +792,7 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta, | |||
| 792 | 792 | ||
| 793 | tx_info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE; | 793 | tx_info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE; |
| 794 | } else { | 794 | } else { |
| 795 | /* Set the choosen rate. No RTS for first series entry. */ | 795 | /* Set the chosen rate. No RTS for first series entry. */ |
| 796 | ath_rc_rate_set_series(rate_table, &rates[i++], txrc, | 796 | ath_rc_rate_set_series(rate_table, &rates[i++], txrc, |
| 797 | try_per_rate, rix, 0); | 797 | try_per_rate, rix, 0); |
| 798 | } | 798 | } |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 26734e53b37f..88fa7fdffd05 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
| @@ -628,8 +628,8 @@ static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf, | |||
| 628 | (u32)ATH_AMPDU_LIMIT_MAX); | 628 | (u32)ATH_AMPDU_LIMIT_MAX); |
| 629 | 629 | ||
| 630 | /* | 630 | /* |
| 631 | * h/w can accept aggregates upto 16 bit lengths (65535). | 631 | * h/w can accept aggregates up to 16 bit lengths (65535). |
| 632 | * The IE, however can hold upto 65536, which shows up here | 632 | * The IE, however can hold up to 65536, which shows up here |
| 633 | * as zero. Ignore 65536 since we are constrained by hw. | 633 | * as zero. Ignore 65536 since we are constrained by hw. |
| 634 | */ | 634 | */ |
| 635 | if (tid->an->maxampdu) | 635 | if (tid->an->maxampdu) |
diff --git a/drivers/net/wireless/ath/carl9170/carl9170.h b/drivers/net/wireless/ath/carl9170/carl9170.h index c6a5fae634a0..3d4ed5863732 100644 --- a/drivers/net/wireless/ath/carl9170/carl9170.h +++ b/drivers/net/wireless/ath/carl9170/carl9170.h | |||
| @@ -161,7 +161,7 @@ struct carl9170_sta_tid { | |||
| 161 | * Naturally: The higher the limit, the faster the device CAN send. | 161 | * Naturally: The higher the limit, the faster the device CAN send. |
| 162 | * However, even a slight over-commitment at the wrong time and the | 162 | * However, even a slight over-commitment at the wrong time and the |
| 163 | * hardware is doomed to send all already-queued frames at suboptimal | 163 | * hardware is doomed to send all already-queued frames at suboptimal |
| 164 | * rates. This in turn leads to an enourmous amount of unsuccessful | 164 | * rates. This in turn leads to an enormous amount of unsuccessful |
| 165 | * retries => Latency goes up, whereas the throughput goes down. CRASH! | 165 | * retries => Latency goes up, whereas the throughput goes down. CRASH! |
| 166 | */ | 166 | */ |
| 167 | #define CARL9170_NUM_TX_LIMIT_HARD ((AR9170_TXQ_DEPTH * 3) / 2) | 167 | #define CARL9170_NUM_TX_LIMIT_HARD ((AR9170_TXQ_DEPTH * 3) / 2) |
| @@ -443,6 +443,7 @@ struct carl9170_ba_stats { | |||
| 443 | u8 ampdu_len; | 443 | u8 ampdu_len; |
| 444 | u8 ampdu_ack_len; | 444 | u8 ampdu_ack_len; |
| 445 | bool clear; | 445 | bool clear; |
| 446 | bool req; | ||
| 446 | }; | 447 | }; |
| 447 | 448 | ||
| 448 | struct carl9170_sta_info { | 449 | struct carl9170_sta_info { |
diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c index ede3d7e5a048..89fe60accf85 100644 --- a/drivers/net/wireless/ath/carl9170/main.c +++ b/drivers/net/wireless/ath/carl9170/main.c | |||
| @@ -1355,6 +1355,7 @@ static int carl9170_op_ampdu_action(struct ieee80211_hw *hw, | |||
| 1355 | tid_info = rcu_dereference(sta_info->agg[tid]); | 1355 | tid_info = rcu_dereference(sta_info->agg[tid]); |
| 1356 | 1356 | ||
| 1357 | sta_info->stats[tid].clear = true; | 1357 | sta_info->stats[tid].clear = true; |
| 1358 | sta_info->stats[tid].req = false; | ||
| 1358 | 1359 | ||
| 1359 | if (tid_info) { | 1360 | if (tid_info) { |
| 1360 | bitmap_zero(tid_info->bitmap, CARL9170_BAW_SIZE); | 1361 | bitmap_zero(tid_info->bitmap, CARL9170_BAW_SIZE); |
diff --git a/drivers/net/wireless/ath/carl9170/phy.c b/drivers/net/wireless/ath/carl9170/phy.c index b6b0de600506..b6ae0e179c8d 100644 --- a/drivers/net/wireless/ath/carl9170/phy.c +++ b/drivers/net/wireless/ath/carl9170/phy.c | |||
| @@ -427,7 +427,7 @@ static u32 carl9170_def_val(u32 reg, bool is_2ghz, bool is_40mhz) | |||
| 427 | 427 | ||
| 428 | /* | 428 | /* |
| 429 | * initialize some phy regs from eeprom values in modal_header[] | 429 | * initialize some phy regs from eeprom values in modal_header[] |
| 430 | * acc. to band and bandwith | 430 | * acc. to band and bandwidth |
| 431 | */ | 431 | */ |
| 432 | static int carl9170_init_phy_from_eeprom(struct ar9170 *ar, | 432 | static int carl9170_init_phy_from_eeprom(struct ar9170 *ar, |
| 433 | bool is_2ghz, bool is_40mhz) | 433 | bool is_2ghz, bool is_40mhz) |
diff --git a/drivers/net/wireless/ath/carl9170/rx.c b/drivers/net/wireless/ath/carl9170/rx.c index 84866a4b8350..ec21ea9fd8d5 100644 --- a/drivers/net/wireless/ath/carl9170/rx.c +++ b/drivers/net/wireless/ath/carl9170/rx.c | |||
| @@ -849,7 +849,7 @@ static void carl9170_rx_stream(struct ar9170 *ar, void *buf, unsigned int len) | |||
| 849 | /* | 849 | /* |
| 850 | * nested carl9170_rx_stream call! | 850 | * nested carl9170_rx_stream call! |
| 851 | * | 851 | * |
| 852 | * termination is guranteed, even when the | 852 | * termination is guaranteed, even when the |
| 853 | * combined frame also have an element with | 853 | * combined frame also have an element with |
| 854 | * a bad tag. | 854 | * a bad tag. |
| 855 | */ | 855 | */ |
diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c index 0ef70b6fc512..cb70ed7ec5cc 100644 --- a/drivers/net/wireless/ath/carl9170/tx.c +++ b/drivers/net/wireless/ath/carl9170/tx.c | |||
| @@ -383,6 +383,7 @@ static void carl9170_tx_status_process_ampdu(struct ar9170 *ar, | |||
| 383 | 383 | ||
| 384 | if (sta_info->stats[tid].clear) { | 384 | if (sta_info->stats[tid].clear) { |
| 385 | sta_info->stats[tid].clear = false; | 385 | sta_info->stats[tid].clear = false; |
| 386 | sta_info->stats[tid].req = false; | ||
| 386 | sta_info->stats[tid].ampdu_len = 0; | 387 | sta_info->stats[tid].ampdu_len = 0; |
| 387 | sta_info->stats[tid].ampdu_ack_len = 0; | 388 | sta_info->stats[tid].ampdu_ack_len = 0; |
| 388 | } | 389 | } |
| @@ -391,10 +392,16 @@ static void carl9170_tx_status_process_ampdu(struct ar9170 *ar, | |||
| 391 | if (txinfo->status.rates[0].count == 1) | 392 | if (txinfo->status.rates[0].count == 1) |
| 392 | sta_info->stats[tid].ampdu_ack_len++; | 393 | sta_info->stats[tid].ampdu_ack_len++; |
| 393 | 394 | ||
| 395 | if (!(txinfo->flags & IEEE80211_TX_STAT_ACK)) | ||
| 396 | sta_info->stats[tid].req = true; | ||
| 397 | |||
| 394 | if (super->f.mac_control & cpu_to_le16(AR9170_TX_MAC_IMM_BA)) { | 398 | if (super->f.mac_control & cpu_to_le16(AR9170_TX_MAC_IMM_BA)) { |
| 395 | super->s.rix = sta_info->stats[tid].ampdu_len; | 399 | super->s.rix = sta_info->stats[tid].ampdu_len; |
| 396 | super->s.cnt = sta_info->stats[tid].ampdu_ack_len; | 400 | super->s.cnt = sta_info->stats[tid].ampdu_ack_len; |
| 397 | txinfo->flags |= IEEE80211_TX_STAT_AMPDU; | 401 | txinfo->flags |= IEEE80211_TX_STAT_AMPDU; |
| 402 | if (sta_info->stats[tid].req) | ||
| 403 | txinfo->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK; | ||
| 404 | |||
| 398 | sta_info->stats[tid].clear = true; | 405 | sta_info->stats[tid].clear = true; |
| 399 | } | 406 | } |
| 400 | spin_unlock_bh(&tid_info->lock); | 407 | spin_unlock_bh(&tid_info->lock); |
diff --git a/drivers/net/wireless/ath/carl9170/usb.c b/drivers/net/wireless/ath/carl9170/usb.c index f82c400be288..2fb53d067512 100644 --- a/drivers/net/wireless/ath/carl9170/usb.c +++ b/drivers/net/wireless/ath/carl9170/usb.c | |||
| @@ -430,7 +430,7 @@ static void carl9170_usb_rx_complete(struct urb *urb) | |||
| 430 | * The system is too slow to cope with | 430 | * The system is too slow to cope with |
| 431 | * the enormous workload. We have simply | 431 | * the enormous workload. We have simply |
| 432 | * run out of active rx urbs and this | 432 | * run out of active rx urbs and this |
| 433 | * unfortunatly leads to an unpredictable | 433 | * unfortunately leads to an unpredictable |
| 434 | * device. | 434 | * device. |
| 435 | */ | 435 | */ |
| 436 | 436 | ||
diff --git a/drivers/net/wireless/ath/hw.c b/drivers/net/wireless/ath/hw.c index 183c28281385..cc11d66f15bc 100644 --- a/drivers/net/wireless/ath/hw.c +++ b/drivers/net/wireless/ath/hw.c | |||
| @@ -86,7 +86,7 @@ | |||
| 86 | * IFRAME-01: 0110 | 86 | * IFRAME-01: 0110 |
| 87 | * | 87 | * |
| 88 | * An easy eye-inspeciton of this already should tell you that this frame | 88 | * An easy eye-inspeciton of this already should tell you that this frame |
| 89 | * will not pass our check. This is beacuse the bssid_mask tells the | 89 | * will not pass our check. This is because the bssid_mask tells the |
| 90 | * hardware to only look at the second least significant bit and the | 90 | * hardware to only look at the second least significant bit and the |
| 91 | * common bit amongst the MAC and BSSIDs is 0, this frame has the 2nd LSB | 91 | * common bit amongst the MAC and BSSIDs is 0, this frame has the 2nd LSB |
| 92 | * as 1, which does not match 0. | 92 | * as 1, which does not match 0. |
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c index f828f294ba89..0e1b8793c864 100644 --- a/drivers/net/wireless/ath/regd.c +++ b/drivers/net/wireless/ath/regd.c | |||
| @@ -268,7 +268,7 @@ ath_reg_apply_active_scan_flags(struct wiphy *wiphy, | |||
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | /* | 270 | /* |
| 271 | * If a country IE has been recieved check its rule for this | 271 | * If a country IE has been received check its rule for this |
| 272 | * channel first before enabling active scan. The passive scan | 272 | * channel first before enabling active scan. The passive scan |
| 273 | * would have been enforced by the initial processing of our | 273 | * would have been enforced by the initial processing of our |
| 274 | * custom regulatory domain. | 274 | * custom regulatory domain. |
| @@ -476,7 +476,7 @@ ath_regd_init_wiphy(struct ath_regulatory *reg, | |||
| 476 | wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY; | 476 | wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY; |
| 477 | } else { | 477 | } else { |
| 478 | /* | 478 | /* |
| 479 | * This gets applied in the case of the absense of CRDA, | 479 | * This gets applied in the case of the absence of CRDA, |
| 480 | * it's our own custom world regulatory domain, similar to | 480 | * it's our own custom world regulatory domain, similar to |
| 481 | * cfg80211's but we enable passive scanning. | 481 | * cfg80211's but we enable passive scanning. |
| 482 | */ | 482 | */ |
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 46e382ed46aa..39a11e8af4fa 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c | |||
| @@ -439,7 +439,7 @@ static u8 mac_reader[] = { | |||
| 439 | }; | 439 | }; |
| 440 | 440 | ||
| 441 | struct atmel_private { | 441 | struct atmel_private { |
| 442 | void *card; /* Bus dependent stucture varies for PCcard */ | 442 | void *card; /* Bus dependent structure varies for PCcard */ |
| 443 | int (*present_callback)(void *); /* And callback which uses it */ | 443 | int (*present_callback)(void *); /* And callback which uses it */ |
| 444 | char firmware_id[32]; | 444 | char firmware_id[32]; |
| 445 | AtmelFWType firmware_type; | 445 | AtmelFWType firmware_type; |
| @@ -3895,7 +3895,7 @@ static int reset_atmel_card(struct net_device *dev) | |||
| 3895 | 3895 | ||
| 3896 | This routine is also responsible for initialising some | 3896 | This routine is also responsible for initialising some |
| 3897 | hardware-specific fields in the atmel_private structure, | 3897 | hardware-specific fields in the atmel_private structure, |
| 3898 | including a copy of the firmware's hostinfo stucture | 3898 | including a copy of the firmware's hostinfo structure |
| 3899 | which is the route into the rest of the firmware datastructures. */ | 3899 | which is the route into the rest of the firmware datastructures. */ |
| 3900 | 3900 | ||
| 3901 | struct atmel_private *priv = netdev_priv(dev); | 3901 | struct atmel_private *priv = netdev_priv(dev); |
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c index c96e19da2949..05263516c113 100644 --- a/drivers/net/wireless/atmel_cs.c +++ b/drivers/net/wireless/atmel_cs.c | |||
| @@ -99,7 +99,7 @@ static void atmel_detach(struct pcmcia_device *link) | |||
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | /* Call-back function to interrogate PCMCIA-specific information | 101 | /* Call-back function to interrogate PCMCIA-specific information |
| 102 | about the current existance of the card */ | 102 | about the current existence of the card */ |
| 103 | static int card_present(void *arg) | 103 | static int card_present(void *arg) |
| 104 | { | 104 | { |
| 105 | struct pcmcia_device *link = (struct pcmcia_device *)arg; | 105 | struct pcmcia_device *link = (struct pcmcia_device *)arg; |
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index bd4cb75b6ca3..229f4388f790 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h | |||
| @@ -648,7 +648,7 @@ struct b43_request_fw_context { | |||
| 648 | char errors[B43_NR_FWTYPES][128]; | 648 | char errors[B43_NR_FWTYPES][128]; |
| 649 | /* Temporary buffer for storing the firmware name. */ | 649 | /* Temporary buffer for storing the firmware name. */ |
| 650 | char fwname[64]; | 650 | char fwname[64]; |
| 651 | /* A fatal error occured while requesting. Firmware reqest | 651 | /* A fatal error occurred while requesting. Firmware reqest |
| 652 | * can not continue, as any other reqest will also fail. */ | 652 | * can not continue, as any other reqest will also fail. */ |
| 653 | int fatal_failure; | 653 | int fatal_failure; |
| 654 | }; | 654 | }; |
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c index 3d5566e7af0a..ff0f5ba14b2c 100644 --- a/drivers/net/wireless/b43/dma.c +++ b/drivers/net/wireless/b43/dma.c | |||
| @@ -1536,7 +1536,7 @@ static void dma_rx(struct b43_dmaring *ring, int *slot) | |||
| 1536 | dmaaddr = meta->dmaaddr; | 1536 | dmaaddr = meta->dmaaddr; |
| 1537 | goto drop_recycle_buffer; | 1537 | goto drop_recycle_buffer; |
| 1538 | } | 1538 | } |
| 1539 | if (unlikely(len > ring->rx_buffersize)) { | 1539 | if (unlikely(len + ring->frameoffset > ring->rx_buffersize)) { |
| 1540 | /* The data did not fit into one descriptor buffer | 1540 | /* The data did not fit into one descriptor buffer |
| 1541 | * and is split over multiple buffers. | 1541 | * and is split over multiple buffers. |
| 1542 | * This should never happen, as we try to allocate buffers | 1542 | * This should never happen, as we try to allocate buffers |
diff --git a/drivers/net/wireless/b43/dma.h b/drivers/net/wireless/b43/dma.h index a01c2100f166..e8a80a1251bf 100644 --- a/drivers/net/wireless/b43/dma.h +++ b/drivers/net/wireless/b43/dma.h | |||
| @@ -163,7 +163,7 @@ struct b43_dmadesc_generic { | |||
| 163 | /* DMA engine tuning knobs */ | 163 | /* DMA engine tuning knobs */ |
| 164 | #define B43_TXRING_SLOTS 256 | 164 | #define B43_TXRING_SLOTS 256 |
| 165 | #define B43_RXRING_SLOTS 64 | 165 | #define B43_RXRING_SLOTS 64 |
| 166 | #define B43_DMA0_RX_BUFFERSIZE IEEE80211_MAX_FRAME_LEN | 166 | #define B43_DMA0_RX_BUFFERSIZE (B43_DMA0_RX_FRAMEOFFSET + IEEE80211_MAX_FRAME_LEN) |
| 167 | 167 | ||
| 168 | /* Pointer poison */ | 168 | /* Pointer poison */ |
| 169 | #define B43_DMA_PTR_POISON ((void *)ERR_PTR(-ENOMEM)) | 169 | #define B43_DMA_PTR_POISON ((void *)ERR_PTR(-ENOMEM)) |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 57eb5b649730..d59b0168c14a 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
| @@ -4010,7 +4010,7 @@ static int b43_wireless_core_start(struct b43_wldev *dev) | |||
| 4010 | b43_mac_enable(dev); | 4010 | b43_mac_enable(dev); |
| 4011 | b43_write32(dev, B43_MMIO_GEN_IRQ_MASK, dev->irq_mask); | 4011 | b43_write32(dev, B43_MMIO_GEN_IRQ_MASK, dev->irq_mask); |
| 4012 | 4012 | ||
| 4013 | /* Start maintainance work */ | 4013 | /* Start maintenance work */ |
| 4014 | b43_periodic_tasks_setup(dev); | 4014 | b43_periodic_tasks_setup(dev); |
| 4015 | 4015 | ||
| 4016 | b43_leds_init(dev); | 4016 | b43_leds_init(dev); |
diff --git a/drivers/net/wireless/b43/phy_g.h b/drivers/net/wireless/b43/phy_g.h index 8569fdd4c6be..5413c906a3e7 100644 --- a/drivers/net/wireless/b43/phy_g.h +++ b/drivers/net/wireless/b43/phy_g.h | |||
| @@ -164,7 +164,7 @@ struct b43_phy_g { | |||
| 164 | /* Current Interference Mitigation mode */ | 164 | /* Current Interference Mitigation mode */ |
| 165 | int interfmode; | 165 | int interfmode; |
| 166 | /* Stack of saved values from the Interference Mitigation code. | 166 | /* Stack of saved values from the Interference Mitigation code. |
| 167 | * Each value in the stack is layed out as follows: | 167 | * Each value in the stack is laid out as follows: |
| 168 | * bit 0-11: offset | 168 | * bit 0-11: offset |
| 169 | * bit 12-15: register ID | 169 | * bit 12-15: register ID |
| 170 | * bit 16-32: value | 170 | * bit 16-32: value |
diff --git a/drivers/net/wireless/b43/phy_n.h b/drivers/net/wireless/b43/phy_n.h index 001e841f118c..e789a89f1047 100644 --- a/drivers/net/wireless/b43/phy_n.h +++ b/drivers/net/wireless/b43/phy_n.h | |||
| @@ -703,7 +703,7 @@ | |||
| 703 | #define B43_NPHY_CHAN_ESTHANG B43_PHY_N(0x21D) /* Channel estimate hang */ | 703 | #define B43_NPHY_CHAN_ESTHANG B43_PHY_N(0x21D) /* Channel estimate hang */ |
| 704 | #define B43_NPHY_FINERX2_CGC B43_PHY_N(0x221) /* Fine RX 2 clock gate control */ | 704 | #define B43_NPHY_FINERX2_CGC B43_PHY_N(0x221) /* Fine RX 2 clock gate control */ |
| 705 | #define B43_NPHY_FINERX2_CGC_DECGC 0x0008 /* Decode gated clocks */ | 705 | #define B43_NPHY_FINERX2_CGC_DECGC 0x0008 /* Decode gated clocks */ |
| 706 | #define B43_NPHY_TXPCTL_INIT B43_PHY_N(0x222) /* TX power controll init */ | 706 | #define B43_NPHY_TXPCTL_INIT B43_PHY_N(0x222) /* TX power control init */ |
| 707 | #define B43_NPHY_TXPCTL_INIT_PIDXI1 0x00FF /* Power index init 1 */ | 707 | #define B43_NPHY_TXPCTL_INIT_PIDXI1 0x00FF /* Power index init 1 */ |
| 708 | #define B43_NPHY_TXPCTL_INIT_PIDXI1_SHIFT 0 | 708 | #define B43_NPHY_TXPCTL_INIT_PIDXI1_SHIFT 0 |
| 709 | #define B43_NPHY_PAPD_EN0 B43_PHY_N(0x297) /* PAPD Enable0 TBD */ | 709 | #define B43_NPHY_PAPD_EN0 B43_PHY_N(0x297) /* PAPD Enable0 TBD */ |
diff --git a/drivers/net/wireless/b43legacy/b43legacy.h b/drivers/net/wireless/b43legacy/b43legacy.h index c81b2f53b0c5..23583be1ee0b 100644 --- a/drivers/net/wireless/b43legacy/b43legacy.h +++ b/drivers/net/wireless/b43legacy/b43legacy.h | |||
| @@ -488,7 +488,7 @@ struct b43legacy_phy { | |||
| 488 | /* Current Interference Mitigation mode */ | 488 | /* Current Interference Mitigation mode */ |
| 489 | int interfmode; | 489 | int interfmode; |
| 490 | /* Stack of saved values from the Interference Mitigation code. | 490 | /* Stack of saved values from the Interference Mitigation code. |
| 491 | * Each value in the stack is layed out as follows: | 491 | * Each value in the stack is laid out as follows: |
| 492 | * bit 0-11: offset | 492 | * bit 0-11: offset |
| 493 | * bit 12-15: register ID | 493 | * bit 12-15: register ID |
| 494 | * bit 16-32: value | 494 | * bit 16-32: value |
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c index 18d63f57777d..3d05dc15c6b8 100644 --- a/drivers/net/wireless/hostap/hostap_ap.c +++ b/drivers/net/wireless/hostap/hostap_ap.c | |||
| @@ -2359,7 +2359,7 @@ int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[], | |||
| 2359 | } | 2359 | } |
| 2360 | 2360 | ||
| 2361 | 2361 | ||
| 2362 | /* Translate our list of Access Points & Stations to a card independant | 2362 | /* Translate our list of Access Points & Stations to a card independent |
| 2363 | * format that the Wireless Tools will understand - Jean II */ | 2363 | * format that the Wireless Tools will understand - Jean II */ |
| 2364 | int prism2_ap_translate_scan(struct net_device *dev, | 2364 | int prism2_ap_translate_scan(struct net_device *dev, |
| 2365 | struct iw_request_info *info, char *buffer) | 2365 | struct iw_request_info *info, char *buffer) |
diff --git a/drivers/net/wireless/hostap/hostap_ap.h b/drivers/net/wireless/hostap/hostap_ap.h index 655ceeba9612..334e2d0b8e11 100644 --- a/drivers/net/wireless/hostap/hostap_ap.h +++ b/drivers/net/wireless/hostap/hostap_ap.h | |||
| @@ -114,7 +114,7 @@ struct sta_info { | |||
| 114 | * has passed since last received frame from the station, a nullfunc data | 114 | * has passed since last received frame from the station, a nullfunc data |
| 115 | * frame is sent to the station. If this frame is not acknowledged and no other | 115 | * frame is sent to the station. If this frame is not acknowledged and no other |
| 116 | * frames have been received, the station will be disassociated after | 116 | * frames have been received, the station will be disassociated after |
| 117 | * AP_DISASSOC_DELAY. Similarily, a the station will be deauthenticated after | 117 | * AP_DISASSOC_DELAY. Similarly, a the station will be deauthenticated after |
| 118 | * AP_DEAUTH_DELAY. AP_TIMEOUT_RESOLUTION is the resolution that is used with | 118 | * AP_DEAUTH_DELAY. AP_TIMEOUT_RESOLUTION is the resolution that is used with |
| 119 | * max inactivity timer. */ | 119 | * max inactivity timer. */ |
| 120 | #define AP_MAX_INACTIVITY_SEC (5 * 60) | 120 | #define AP_MAX_INACTIVITY_SEC (5 * 60) |
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c index 6038633ef361..12de46407c71 100644 --- a/drivers/net/wireless/hostap/hostap_ioctl.c +++ b/drivers/net/wireless/hostap/hostap_ioctl.c | |||
| @@ -1945,7 +1945,7 @@ static char * __prism2_translate_scan(local_info_t *local, | |||
| 1945 | } | 1945 | } |
| 1946 | 1946 | ||
| 1947 | 1947 | ||
| 1948 | /* Translate scan data returned from the card to a card independant | 1948 | /* Translate scan data returned from the card to a card independent |
| 1949 | * format that the Wireless Tools will understand - Jean II */ | 1949 | * format that the Wireless Tools will understand - Jean II */ |
| 1950 | static inline int prism2_translate_scan(local_info_t *local, | 1950 | static inline int prism2_translate_scan(local_info_t *local, |
| 1951 | struct iw_request_info *info, | 1951 | struct iw_request_info *info, |
| @@ -2043,7 +2043,7 @@ static inline int prism2_ioctl_giwscan_sta(struct net_device *dev, | |||
| 2043 | * until results are ready for various reasons. | 2043 | * until results are ready for various reasons. |
| 2044 | * First, managing wait queues is complex and racy | 2044 | * First, managing wait queues is complex and racy |
| 2045 | * (there may be multiple simultaneous callers). | 2045 | * (there may be multiple simultaneous callers). |
| 2046 | * Second, we grab some rtnetlink lock before comming | 2046 | * Second, we grab some rtnetlink lock before coming |
| 2047 | * here (in dev_ioctl()). | 2047 | * here (in dev_ioctl()). |
| 2048 | * Third, the caller can wait on the Wireless Event | 2048 | * Third, the caller can wait on the Wireless Event |
| 2049 | * - Jean II */ | 2049 | * - Jean II */ |
diff --git a/drivers/net/wireless/hostap/hostap_wlan.h b/drivers/net/wireless/hostap/hostap_wlan.h index 1c66b3c1030d..88dc6a52bdf1 100644 --- a/drivers/net/wireless/hostap/hostap_wlan.h +++ b/drivers/net/wireless/hostap/hostap_wlan.h | |||
| @@ -853,7 +853,7 @@ struct local_info { | |||
| 853 | struct work_struct comms_qual_update; | 853 | struct work_struct comms_qual_update; |
| 854 | 854 | ||
| 855 | /* RSSI to dBm adjustment (for RX descriptor fields) */ | 855 | /* RSSI to dBm adjustment (for RX descriptor fields) */ |
| 856 | int rssi_to_dBm; /* substract from RSSI to get approximate dBm value */ | 856 | int rssi_to_dBm; /* subtract from RSSI to get approximate dBm value */ |
| 857 | 857 | ||
| 858 | /* BSS list / protected by local->lock */ | 858 | /* BSS list / protected by local->lock */ |
| 859 | struct list_head bss_list; | 859 | struct list_head bss_list; |
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c index 4b97f918daff..44307753587d 100644 --- a/drivers/net/wireless/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/ipw2x00/ipw2100.c | |||
| @@ -63,7 +63,7 @@ When data is sent to the firmware, the first TBD is used to indicate to the | |||
| 63 | firmware if a Command or Data is being sent. If it is Command, all of the | 63 | firmware if a Command or Data is being sent. If it is Command, all of the |
| 64 | command information is contained within the physical address referred to by the | 64 | command information is contained within the physical address referred to by the |
| 65 | TBD. If it is Data, the first TBD indicates the type of data packet, number | 65 | TBD. If it is Data, the first TBD indicates the type of data packet, number |
| 66 | of fragments, etc. The next TBD then referrs to the actual packet location. | 66 | of fragments, etc. The next TBD then refers to the actual packet location. |
| 67 | 67 | ||
| 68 | The Tx flow cycle is as follows: | 68 | The Tx flow cycle is as follows: |
| 69 | 69 | ||
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index 160881f234cc..42c3fe37af64 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/ipw2x00/ipw2200.c | |||
| @@ -1181,7 +1181,7 @@ static void ipw_led_shutdown(struct ipw_priv *priv) | |||
| 1181 | /* | 1181 | /* |
| 1182 | * The following adds a new attribute to the sysfs representation | 1182 | * The following adds a new attribute to the sysfs representation |
| 1183 | * of this device driver (i.e. a new file in /sys/bus/pci/drivers/ipw/) | 1183 | * of this device driver (i.e. a new file in /sys/bus/pci/drivers/ipw/) |
| 1184 | * used for controling the debug level. | 1184 | * used for controlling the debug level. |
| 1185 | * | 1185 | * |
| 1186 | * See the level definitions in ipw for details. | 1186 | * See the level definitions in ipw for details. |
| 1187 | */ | 1187 | */ |
| @@ -3763,7 +3763,7 @@ static int ipw_queue_tx_init(struct ipw_priv *priv, | |||
| 3763 | 3763 | ||
| 3764 | q->txb = kmalloc(sizeof(q->txb[0]) * count, GFP_KERNEL); | 3764 | q->txb = kmalloc(sizeof(q->txb[0]) * count, GFP_KERNEL); |
| 3765 | if (!q->txb) { | 3765 | if (!q->txb) { |
| 3766 | IPW_ERROR("vmalloc for auxilary BD structures failed\n"); | 3766 | IPW_ERROR("vmalloc for auxiliary BD structures failed\n"); |
| 3767 | return -ENOMEM; | 3767 | return -ENOMEM; |
| 3768 | } | 3768 | } |
| 3769 | 3769 | ||
| @@ -5581,7 +5581,7 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv, | |||
| 5581 | return 0; | 5581 | return 0; |
| 5582 | } | 5582 | } |
| 5583 | 5583 | ||
| 5584 | /* Verify privacy compatability */ | 5584 | /* Verify privacy compatibility */ |
| 5585 | if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) != | 5585 | if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) != |
| 5586 | ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { | 5586 | ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { |
| 5587 | IPW_DEBUG_MERGE("Network '%s (%pM)' excluded " | 5587 | IPW_DEBUG_MERGE("Network '%s (%pM)' excluded " |
| @@ -5808,7 +5808,7 @@ static int ipw_best_network(struct ipw_priv *priv, | |||
| 5808 | return 0; | 5808 | return 0; |
| 5809 | } | 5809 | } |
| 5810 | 5810 | ||
| 5811 | /* Verify privacy compatability */ | 5811 | /* Verify privacy compatibility */ |
| 5812 | if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) != | 5812 | if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) != |
| 5813 | ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { | 5813 | ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { |
| 5814 | IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded " | 5814 | IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded " |
| @@ -8184,7 +8184,7 @@ static void ipw_handle_promiscuous_rx(struct ipw_priv *priv, | |||
| 8184 | static int is_network_packet(struct ipw_priv *priv, | 8184 | static int is_network_packet(struct ipw_priv *priv, |
| 8185 | struct libipw_hdr_4addr *header) | 8185 | struct libipw_hdr_4addr *header) |
| 8186 | { | 8186 | { |
| 8187 | /* Filter incoming packets to determine if they are targetted toward | 8187 | /* Filter incoming packets to determine if they are targeted toward |
| 8188 | * this network, discarding packets coming from ourselves */ | 8188 | * this network, discarding packets coming from ourselves */ |
| 8189 | switch (priv->ieee->iw_mode) { | 8189 | switch (priv->ieee->iw_mode) { |
| 8190 | case IW_MODE_ADHOC: /* Header: Dest. | Source | BSSID */ | 8190 | case IW_MODE_ADHOC: /* Header: Dest. | Source | BSSID */ |
| @@ -8340,9 +8340,9 @@ static void ipw_handle_mgmt_packet(struct ipw_priv *priv, | |||
| 8340 | } | 8340 | } |
| 8341 | 8341 | ||
| 8342 | /* | 8342 | /* |
| 8343 | * Main entry function for recieving a packet with 80211 headers. This | 8343 | * Main entry function for receiving a packet with 80211 headers. This |
| 8344 | * should be called when ever the FW has notified us that there is a new | 8344 | * should be called when ever the FW has notified us that there is a new |
| 8345 | * skb in the recieve queue. | 8345 | * skb in the receive queue. |
| 8346 | */ | 8346 | */ |
| 8347 | static void ipw_rx(struct ipw_priv *priv) | 8347 | static void ipw_rx(struct ipw_priv *priv) |
| 8348 | { | 8348 | { |
| @@ -8683,7 +8683,7 @@ static int ipw_sw_reset(struct ipw_priv *priv, int option) | |||
| 8683 | * functions defined in ipw_main to provide the HW interaction. | 8683 | * functions defined in ipw_main to provide the HW interaction. |
| 8684 | * | 8684 | * |
| 8685 | * The exception to this is the use of the ipw_get_ordinal() | 8685 | * The exception to this is the use of the ipw_get_ordinal() |
| 8686 | * function used to poll the hardware vs. making unecessary calls. | 8686 | * function used to poll the hardware vs. making unnecessary calls. |
| 8687 | * | 8687 | * |
| 8688 | */ | 8688 | */ |
| 8689 | 8689 | ||
| @@ -10419,7 +10419,7 @@ static void ipw_handle_promiscuous_tx(struct ipw_priv *priv, | |||
| 10419 | 10419 | ||
| 10420 | memset(&dummystats, 0, sizeof(dummystats)); | 10420 | memset(&dummystats, 0, sizeof(dummystats)); |
| 10421 | 10421 | ||
| 10422 | /* Filtering of fragment chains is done agains the first fragment */ | 10422 | /* Filtering of fragment chains is done against the first fragment */ |
| 10423 | hdr = (void *)txb->fragments[0]->data; | 10423 | hdr = (void *)txb->fragments[0]->data; |
| 10424 | if (libipw_is_management(le16_to_cpu(hdr->frame_control))) { | 10424 | if (libipw_is_management(le16_to_cpu(hdr->frame_control))) { |
| 10425 | if (filter & IPW_PROM_NO_MGMT) | 10425 | if (filter & IPW_PROM_NO_MGMT) |
diff --git a/drivers/net/wireless/ipw2x00/libipw_rx.c b/drivers/net/wireless/ipw2x00/libipw_rx.c index 0de1b1893220..e5ad76cd77da 100644 --- a/drivers/net/wireless/ipw2x00/libipw_rx.c +++ b/drivers/net/wireless/ipw2x00/libipw_rx.c | |||
| @@ -925,7 +925,7 @@ drop_free: | |||
| 925 | static u8 qos_oui[QOS_OUI_LEN] = { 0x00, 0x50, 0xF2 }; | 925 | static u8 qos_oui[QOS_OUI_LEN] = { 0x00, 0x50, 0xF2 }; |
| 926 | 926 | ||
| 927 | /* | 927 | /* |
| 928 | * Make ther structure we read from the beacon packet has | 928 | * Make the structure we read from the beacon packet to have |
| 929 | * the right values | 929 | * the right values |
| 930 | */ | 930 | */ |
| 931 | static int libipw_verify_qos_info(struct libipw_qos_information_element | 931 | static int libipw_verify_qos_info(struct libipw_qos_information_element |
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c b/drivers/net/wireless/iwlegacy/iwl-core.c index d418b647be80..7007d61bb6b5 100644 --- a/drivers/net/wireless/iwlegacy/iwl-core.c +++ b/drivers/net/wireless/iwlegacy/iwl-core.c | |||
| @@ -1030,7 +1030,7 @@ int iwl_legacy_apm_init(struct iwl_priv *priv) | |||
| 1030 | /* | 1030 | /* |
| 1031 | * Enable HAP INTA (interrupt from management bus) to | 1031 | * Enable HAP INTA (interrupt from management bus) to |
| 1032 | * wake device's PCI Express link L1a -> L0s | 1032 | * wake device's PCI Express link L1a -> L0s |
| 1033 | * NOTE: This is no-op for 3945 (non-existant bit) | 1033 | * NOTE: This is no-op for 3945 (non-existent bit) |
| 1034 | */ | 1034 | */ |
| 1035 | iwl_legacy_set_bit(priv, CSR_HW_IF_CONFIG_REG, | 1035 | iwl_legacy_set_bit(priv, CSR_HW_IF_CONFIG_REG, |
| 1036 | CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A); | 1036 | CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A); |
| @@ -1805,6 +1805,15 @@ iwl_legacy_mac_change_interface(struct ieee80211_hw *hw, | |||
| 1805 | 1805 | ||
| 1806 | mutex_lock(&priv->mutex); | 1806 | mutex_lock(&priv->mutex); |
| 1807 | 1807 | ||
| 1808 | if (!ctx->vif || !iwl_legacy_is_ready_rf(priv)) { | ||
| 1809 | /* | ||
| 1810 | * Huh? But wait ... this can maybe happen when | ||
| 1811 | * we're in the middle of a firmware restart! | ||
| 1812 | */ | ||
| 1813 | err = -EBUSY; | ||
| 1814 | goto out; | ||
| 1815 | } | ||
| 1816 | |||
| 1808 | interface_modes = ctx->interface_modes | ctx->exclusive_interface_modes; | 1817 | interface_modes = ctx->interface_modes | ctx->exclusive_interface_modes; |
| 1809 | 1818 | ||
| 1810 | if (!(interface_modes & BIT(newtype))) { | 1819 | if (!(interface_modes & BIT(newtype))) { |
| @@ -1832,6 +1841,7 @@ iwl_legacy_mac_change_interface(struct ieee80211_hw *hw, | |||
| 1832 | /* success */ | 1841 | /* success */ |
| 1833 | iwl_legacy_teardown_interface(priv, vif, true); | 1842 | iwl_legacy_teardown_interface(priv, vif, true); |
| 1834 | vif->type = newtype; | 1843 | vif->type = newtype; |
| 1844 | vif->p2p = newp2p; | ||
| 1835 | err = iwl_legacy_setup_interface(priv, ctx); | 1845 | err = iwl_legacy_setup_interface(priv, ctx); |
| 1836 | WARN_ON(err); | 1846 | WARN_ON(err); |
| 1837 | /* | 1847 | /* |
diff --git a/drivers/net/wireless/iwlegacy/iwl-fh.h b/drivers/net/wireless/iwlegacy/iwl-fh.h index 4e20c7e5c883..6e6091816e36 100644 --- a/drivers/net/wireless/iwlegacy/iwl-fh.h +++ b/drivers/net/wireless/iwlegacy/iwl-fh.h | |||
| @@ -436,7 +436,7 @@ | |||
| 436 | * @finished_rb_num [0:11] - Indicates the index of the current RB | 436 | * @finished_rb_num [0:11] - Indicates the index of the current RB |
| 437 | * in which the last frame was written to | 437 | * in which the last frame was written to |
| 438 | * @finished_fr_num [0:11] - Indicates the index of the RX Frame | 438 | * @finished_fr_num [0:11] - Indicates the index of the RX Frame |
| 439 | * which was transfered | 439 | * which was transferred |
| 440 | */ | 440 | */ |
| 441 | struct iwl_rb_status { | 441 | struct iwl_rb_status { |
| 442 | __le16 closed_rb_num; | 442 | __le16 closed_rb_num; |
diff --git a/drivers/net/wireless/iwlegacy/iwl-scan.c b/drivers/net/wireless/iwlegacy/iwl-scan.c index 60f597f796ca..353234a02c6d 100644 --- a/drivers/net/wireless/iwlegacy/iwl-scan.c +++ b/drivers/net/wireless/iwlegacy/iwl-scan.c | |||
| @@ -143,7 +143,7 @@ static void iwl_legacy_do_scan_abort(struct iwl_priv *priv) | |||
| 143 | IWL_DEBUG_SCAN(priv, "Send scan abort failed %d\n", ret); | 143 | IWL_DEBUG_SCAN(priv, "Send scan abort failed %d\n", ret); |
| 144 | iwl_legacy_force_scan_end(priv); | 144 | iwl_legacy_force_scan_end(priv); |
| 145 | } else | 145 | } else |
| 146 | IWL_DEBUG_SCAN(priv, "Sucessfully send scan abort\n"); | 146 | IWL_DEBUG_SCAN(priv, "Successfully send scan abort\n"); |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | /** | 149 | /** |
diff --git a/drivers/net/wireless/iwlegacy/iwl-sta.c b/drivers/net/wireless/iwlegacy/iwl-sta.c index 47c9da3834ea..66f0fb2bbe00 100644 --- a/drivers/net/wireless/iwlegacy/iwl-sta.c +++ b/drivers/net/wireless/iwlegacy/iwl-sta.c | |||
| @@ -110,7 +110,7 @@ static int iwl_legacy_process_add_sta_resp(struct iwl_priv *priv, | |||
| 110 | /* | 110 | /* |
| 111 | * XXX: The MAC address in the command buffer is often changed from | 111 | * XXX: The MAC address in the command buffer is often changed from |
| 112 | * the original sent to the device. That is, the MAC address | 112 | * the original sent to the device. That is, the MAC address |
| 113 | * written to the command buffer often is not the same MAC adress | 113 | * written to the command buffer often is not the same MAC address |
| 114 | * read from the command buffer when the command returns. This | 114 | * read from the command buffer when the command returns. This |
| 115 | * issue has not yet been resolved and this debugging is left to | 115 | * issue has not yet been resolved and this debugging is left to |
| 116 | * observe the problem. | 116 | * observe the problem. |
diff --git a/drivers/net/wireless/iwlegacy/iwl3945-base.c b/drivers/net/wireless/iwlegacy/iwl3945-base.c index ab87e1b73529..28eb3d885ba1 100644 --- a/drivers/net/wireless/iwlegacy/iwl3945-base.c +++ b/drivers/net/wireless/iwlegacy/iwl3945-base.c | |||
| @@ -93,6 +93,7 @@ MODULE_LICENSE("GPL"); | |||
| 93 | struct iwl_mod_params iwl3945_mod_params = { | 93 | struct iwl_mod_params iwl3945_mod_params = { |
| 94 | .sw_crypto = 1, | 94 | .sw_crypto = 1, |
| 95 | .restart_fw = 1, | 95 | .restart_fw = 1, |
| 96 | .disable_hw_scan = 1, | ||
| 96 | /* the rest are 0 by default */ | 97 | /* the rest are 0 by default */ |
| 97 | }; | 98 | }; |
| 98 | 99 | ||
| @@ -3960,8 +3961,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
| 3960 | * "the hard way", rather than using device's scan. | 3961 | * "the hard way", rather than using device's scan. |
| 3961 | */ | 3962 | */ |
| 3962 | if (iwl3945_mod_params.disable_hw_scan) { | 3963 | if (iwl3945_mod_params.disable_hw_scan) { |
| 3963 | dev_printk(KERN_DEBUG, &(pdev->dev), | 3964 | IWL_DEBUG_INFO(priv, "Disabling hw_scan\n"); |
| 3964 | "sw scan support is deprecated\n"); | ||
| 3965 | iwl3945_hw_ops.hw_scan = NULL; | 3965 | iwl3945_hw_ops.hw_scan = NULL; |
| 3966 | } | 3966 | } |
| 3967 | 3967 | ||
| @@ -4280,8 +4280,7 @@ MODULE_PARM_DESC(swcrypto, | |||
| 4280 | "using software crypto (default 1 [software])"); | 4280 | "using software crypto (default 1 [software])"); |
| 4281 | module_param_named(disable_hw_scan, iwl3945_mod_params.disable_hw_scan, | 4281 | module_param_named(disable_hw_scan, iwl3945_mod_params.disable_hw_scan, |
| 4282 | int, S_IRUGO); | 4282 | int, S_IRUGO); |
| 4283 | MODULE_PARM_DESC(disable_hw_scan, | 4283 | MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 1)"); |
| 4284 | "disable hardware scanning (default 0) (deprecated)"); | ||
| 4285 | #ifdef CONFIG_IWLWIFI_LEGACY_DEBUG | 4284 | #ifdef CONFIG_IWLWIFI_LEGACY_DEBUG |
| 4286 | module_param_named(debug, iwlegacy_debug_level, uint, S_IRUGO | S_IWUSR); | 4285 | module_param_named(debug, iwlegacy_debug_level, uint, S_IRUGO | S_IWUSR); |
| 4287 | MODULE_PARM_DESC(debug, "debug output mask"); | 4286 | MODULE_PARM_DESC(debug, "debug output mask"); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-ict.c b/drivers/net/wireless/iwlwifi/iwl-agn-ict.c index b5cb3be0eb4b..ed0148d714de 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-ict.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-ict.c | |||
| @@ -69,7 +69,7 @@ int iwl_alloc_isr_ict(struct iwl_priv *priv) | |||
| 69 | if (!priv->_agn.ict_tbl_vir) | 69 | if (!priv->_agn.ict_tbl_vir) |
| 70 | return -ENOMEM; | 70 | return -ENOMEM; |
| 71 | 71 | ||
| 72 | /* align table to PAGE_SIZE boundry */ | 72 | /* align table to PAGE_SIZE boundary */ |
| 73 | priv->_agn.aligned_ict_tbl_dma = ALIGN(priv->_agn.ict_tbl_dma, PAGE_SIZE); | 73 | priv->_agn.aligned_ict_tbl_dma = ALIGN(priv->_agn.ict_tbl_dma, PAGE_SIZE); |
| 74 | 74 | ||
| 75 | IWL_DEBUG_ISR(priv, "ict dma addr %Lx dma aligned %Lx diff %d\n", | 75 | IWL_DEBUG_ISR(priv, "ict dma addr %Lx dma aligned %Lx diff %d\n", |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 6c30fa652e27..bafbe57c9602 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
| @@ -1040,7 +1040,7 @@ int iwl_apm_init(struct iwl_priv *priv) | |||
| 1040 | /* | 1040 | /* |
| 1041 | * Enable HAP INTA (interrupt from management bus) to | 1041 | * Enable HAP INTA (interrupt from management bus) to |
| 1042 | * wake device's PCI Express link L1a -> L0s | 1042 | * wake device's PCI Express link L1a -> L0s |
| 1043 | * NOTE: This is no-op for 3945 (non-existant bit) | 1043 | * NOTE: This is no-op for 3945 (non-existent bit) |
| 1044 | */ | 1044 | */ |
| 1045 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, | 1045 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, |
| 1046 | CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A); | 1046 | CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.h b/drivers/net/wireless/iwlwifi/iwl-eeprom.h index 98aa8af01192..20b66469d68f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.h +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.h | |||
| @@ -241,7 +241,7 @@ struct iwl_eeprom_enhanced_txpwr { | |||
| 241 | 241 | ||
| 242 | /* 6x00 Specific */ | 242 | /* 6x00 Specific */ |
| 243 | #define EEPROM_6000_TX_POWER_VERSION (4) | 243 | #define EEPROM_6000_TX_POWER_VERSION (4) |
| 244 | #define EEPROM_6000_EEPROM_VERSION (0x434) | 244 | #define EEPROM_6000_EEPROM_VERSION (0x423) |
| 245 | 245 | ||
| 246 | /* 6x50 Specific */ | 246 | /* 6x50 Specific */ |
| 247 | #define EEPROM_6050_TX_POWER_VERSION (4) | 247 | #define EEPROM_6050_TX_POWER_VERSION (4) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-fh.h b/drivers/net/wireless/iwlwifi/iwl-fh.h index 55b8370bc6d4..474009a244d4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-fh.h +++ b/drivers/net/wireless/iwlwifi/iwl-fh.h | |||
| @@ -436,7 +436,7 @@ | |||
| 436 | * @finished_rb_num [0:11] - Indicates the index of the current RB | 436 | * @finished_rb_num [0:11] - Indicates the index of the current RB |
| 437 | * in which the last frame was written to | 437 | * in which the last frame was written to |
| 438 | * @finished_fr_num [0:11] - Indicates the index of the RX Frame | 438 | * @finished_fr_num [0:11] - Indicates the index of the RX Frame |
| 439 | * which was transfered | 439 | * which was transferred |
| 440 | */ | 440 | */ |
| 441 | struct iwl_rb_status { | 441 | struct iwl_rb_status { |
| 442 | __le16 closed_rb_num; | 442 | __le16 closed_rb_num; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index 3a4d9e6b0421..914c77e44588 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
| @@ -143,7 +143,7 @@ static void iwl_do_scan_abort(struct iwl_priv *priv) | |||
| 143 | IWL_DEBUG_SCAN(priv, "Send scan abort failed %d\n", ret); | 143 | IWL_DEBUG_SCAN(priv, "Send scan abort failed %d\n", ret); |
| 144 | iwl_force_scan_end(priv); | 144 | iwl_force_scan_end(priv); |
| 145 | } else | 145 | } else |
| 146 | IWL_DEBUG_SCAN(priv, "Sucessfully send scan abort\n"); | 146 | IWL_DEBUG_SCAN(priv, "Successfully send scan abort\n"); |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | /** | 149 | /** |
diff --git a/drivers/net/wireless/iwmc3200wifi/hal.c b/drivers/net/wireless/iwmc3200wifi/hal.c index 907ac890997c..1cabcb39643f 100644 --- a/drivers/net/wireless/iwmc3200wifi/hal.c +++ b/drivers/net/wireless/iwmc3200wifi/hal.c | |||
| @@ -57,7 +57,7 @@ | |||
| 57 | * This is due to the fact the host talks exclusively | 57 | * This is due to the fact the host talks exclusively |
| 58 | * to the UMAC and so there needs to be a special UMAC | 58 | * to the UMAC and so there needs to be a special UMAC |
| 59 | * command for talking to the LMAC. | 59 | * command for talking to the LMAC. |
| 60 | * This is how a wifi command is layed out: | 60 | * This is how a wifi command is laid out: |
| 61 | * ------------------------ | 61 | * ------------------------ |
| 62 | * | iwm_udma_out_wifi_hdr | | 62 | * | iwm_udma_out_wifi_hdr | |
| 63 | * ------------------------ | 63 | * ------------------------ |
| @@ -72,7 +72,7 @@ | |||
| 72 | * Those commands are handled by the device's bootrom, | 72 | * Those commands are handled by the device's bootrom, |
| 73 | * and are typically sent when the UMAC and the LMAC | 73 | * and are typically sent when the UMAC and the LMAC |
| 74 | * are not yet available. | 74 | * are not yet available. |
| 75 | * * This is how a non-wifi command is layed out: | 75 | * * This is how a non-wifi command is laid out: |
| 76 | * --------------------------- | 76 | * --------------------------- |
| 77 | * | iwm_udma_out_nonwifi_hdr | | 77 | * | iwm_udma_out_nonwifi_hdr | |
| 78 | * --------------------------- | 78 | * --------------------------- |
diff --git a/drivers/net/wireless/iwmc3200wifi/tx.c b/drivers/net/wireless/iwmc3200wifi/tx.c index 3216621fc55a..be98074c0608 100644 --- a/drivers/net/wireless/iwmc3200wifi/tx.c +++ b/drivers/net/wireless/iwmc3200wifi/tx.c | |||
| @@ -197,7 +197,7 @@ int iwm_tx_credit_alloc(struct iwm_priv *iwm, int id, int nb) | |||
| 197 | spin_lock(&iwm->tx_credit.lock); | 197 | spin_lock(&iwm->tx_credit.lock); |
| 198 | 198 | ||
| 199 | if (!iwm_tx_credit_ok(iwm, id, nb)) { | 199 | if (!iwm_tx_credit_ok(iwm, id, nb)) { |
| 200 | IWM_DBG_TX(iwm, DBG, "No credit avaliable for pool[%d]\n", id); | 200 | IWM_DBG_TX(iwm, DBG, "No credit available for pool[%d]\n", id); |
| 201 | ret = -ENOSPC; | 201 | ret = -ENOSPC; |
| 202 | goto out; | 202 | goto out; |
| 203 | } | 203 | } |
diff --git a/drivers/net/wireless/libertas/README b/drivers/net/wireless/libertas/README index 60fd1afe89ac..1453eec82a99 100644 --- a/drivers/net/wireless/libertas/README +++ b/drivers/net/wireless/libertas/README | |||
| @@ -70,7 +70,7 @@ rdrf | |||
| 70 | These commands are used to read the MAC, BBP and RF registers from the | 70 | These commands are used to read the MAC, BBP and RF registers from the |
| 71 | card. These commands take one parameter that specifies the offset | 71 | card. These commands take one parameter that specifies the offset |
| 72 | location that is to be read. This parameter must be specified in | 72 | location that is to be read. This parameter must be specified in |
| 73 | hexadecimal (its possible to preceed preceding the number with a "0x"). | 73 | hexadecimal (its possible to precede preceding the number with a "0x"). |
| 74 | 74 | ||
| 75 | Path: /sys/kernel/debug/libertas_wireless/ethX/registers/ | 75 | Path: /sys/kernel/debug/libertas_wireless/ethX/registers/ |
| 76 | 76 | ||
| @@ -84,7 +84,7 @@ wrrf | |||
| 84 | These commands are used to write the MAC, BBP and RF registers in the | 84 | These commands are used to write the MAC, BBP and RF registers in the |
| 85 | card. These commands take two parameters that specify the offset | 85 | card. These commands take two parameters that specify the offset |
| 86 | location and the value that is to be written. This parameters must | 86 | location and the value that is to be written. This parameters must |
| 87 | be specified in hexadecimal (its possible to preceed the number | 87 | be specified in hexadecimal (its possible to precede the number |
| 88 | with a "0x"). | 88 | with a "0x"). |
| 89 | 89 | ||
| 90 | Usage: | 90 | Usage: |
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c index 30ef0351bfc4..5caa2ac14d61 100644 --- a/drivers/net/wireless/libertas/cfg.c +++ b/drivers/net/wireless/libertas/cfg.c | |||
| @@ -1350,7 +1350,7 @@ static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev, | |||
| 1350 | * we remove all keys like in the WPA/WPA2 setup, | 1350 | * we remove all keys like in the WPA/WPA2 setup, |
| 1351 | * we just don't set RSN. | 1351 | * we just don't set RSN. |
| 1352 | * | 1352 | * |
| 1353 | * Therefore: fall-throught | 1353 | * Therefore: fall-through |
| 1354 | */ | 1354 | */ |
| 1355 | case WLAN_CIPHER_SUITE_TKIP: | 1355 | case WLAN_CIPHER_SUITE_TKIP: |
| 1356 | case WLAN_CIPHER_SUITE_CCMP: | 1356 | case WLAN_CIPHER_SUITE_CCMP: |
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c index fc8121190d38..8712cb213f2f 100644 --- a/drivers/net/wireless/libertas/if_cs.c +++ b/drivers/net/wireless/libertas/if_cs.c | |||
| @@ -913,7 +913,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev) | |||
| 913 | goto out3; | 913 | goto out3; |
| 914 | } | 914 | } |
| 915 | 915 | ||
| 916 | /* Clear any interrupt cause that happend while sending | 916 | /* Clear any interrupt cause that happened while sending |
| 917 | * firmware/initializing card */ | 917 | * firmware/initializing card */ |
| 918 | if_cs_write16(card, IF_CS_CARD_INT_CAUSE, IF_CS_BIT_MASK); | 918 | if_cs_write16(card, IF_CS_CARD_INT_CAUSE, IF_CS_BIT_MASK); |
| 919 | if_cs_enable_ints(card); | 919 | if_cs_enable_ints(card); |
diff --git a/drivers/net/wireless/libertas/if_spi.h b/drivers/net/wireless/libertas/if_spi.h index 8b1417d3b71b..d2ac1dcd7e2e 100644 --- a/drivers/net/wireless/libertas/if_spi.h +++ b/drivers/net/wireless/libertas/if_spi.h | |||
| @@ -66,7 +66,7 @@ | |||
| 66 | #define IF_SPI_HOST_INT_CTRL_REG 0x40 /* Host interrupt controller reg */ | 66 | #define IF_SPI_HOST_INT_CTRL_REG 0x40 /* Host interrupt controller reg */ |
| 67 | 67 | ||
| 68 | #define IF_SPI_CARD_INT_CAUSE_REG 0x44 /* Card interrupt cause reg */ | 68 | #define IF_SPI_CARD_INT_CAUSE_REG 0x44 /* Card interrupt cause reg */ |
| 69 | #define IF_SPI_CARD_INT_STATUS_REG 0x48 /* Card interupt status reg */ | 69 | #define IF_SPI_CARD_INT_STATUS_REG 0x48 /* Card interrupt status reg */ |
| 70 | #define IF_SPI_CARD_INT_EVENT_MASK_REG 0x4C /* Card interrupt event mask */ | 70 | #define IF_SPI_CARD_INT_EVENT_MASK_REG 0x4C /* Card interrupt event mask */ |
| 71 | #define IF_SPI_CARD_INT_STATUS_MASK_REG 0x50 /* Card interrupt status mask */ | 71 | #define IF_SPI_CARD_INT_STATUS_MASK_REG 0x50 /* Card interrupt status mask */ |
| 72 | 72 | ||
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 56f439d58013..f4f4257a9d67 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
| @@ -62,7 +62,7 @@ MODULE_PARM_DESC(fake_hw_scan, "Install fake (no-op) hw-scan handler"); | |||
| 62 | * an intersection to occur but each device will still use their | 62 | * an intersection to occur but each device will still use their |
| 63 | * respective regulatory requested domains. Subsequent radios will | 63 | * respective regulatory requested domains. Subsequent radios will |
| 64 | * use the resulting intersection. | 64 | * use the resulting intersection. |
| 65 | * @HWSIM_REGTEST_WORLD_ROAM: Used for testing the world roaming. We acomplish | 65 | * @HWSIM_REGTEST_WORLD_ROAM: Used for testing the world roaming. We accomplish |
| 66 | * this by using a custom beacon-capable regulatory domain for the first | 66 | * this by using a custom beacon-capable regulatory domain for the first |
| 67 | * radio. All other device world roam. | 67 | * radio. All other device world roam. |
| 68 | * @HWSIM_REGTEST_CUSTOM_WORLD: Used for testing the custom world regulatory | 68 | * @HWSIM_REGTEST_CUSTOM_WORLD: Used for testing the custom world regulatory |
diff --git a/drivers/net/wireless/orinoco/hw.c b/drivers/net/wireless/orinoco/hw.c index b4772c1c6135..3c7877a7c31c 100644 --- a/drivers/net/wireless/orinoco/hw.c +++ b/drivers/net/wireless/orinoco/hw.c | |||
| @@ -1031,7 +1031,7 @@ int __orinoco_hw_set_tkip_key(struct orinoco_private *priv, int key_idx, | |||
| 1031 | else | 1031 | else |
| 1032 | buf.tsc[4] = 0x10; | 1032 | buf.tsc[4] = 0x10; |
| 1033 | 1033 | ||
| 1034 | /* Wait upto 100ms for tx queue to empty */ | 1034 | /* Wait up to 100ms for tx queue to empty */ |
| 1035 | for (k = 100; k > 0; k--) { | 1035 | for (k = 100; k > 0; k--) { |
| 1036 | udelay(1000); | 1036 | udelay(1000); |
| 1037 | ret = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_TXQUEUEEMPTY, | 1037 | ret = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_TXQUEUEEMPTY, |
diff --git a/drivers/net/wireless/p54/main.c b/drivers/net/wireless/p54/main.c index 356e6bb443a6..a946991989c6 100644 --- a/drivers/net/wireless/p54/main.c +++ b/drivers/net/wireless/p54/main.c | |||
| @@ -465,7 +465,7 @@ static int p54_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd, | |||
| 465 | 465 | ||
| 466 | if (slot < 0) { | 466 | if (slot < 0) { |
| 467 | /* | 467 | /* |
| 468 | * The device supports the choosen algorithm, but the | 468 | * The device supports the chosen algorithm, but the |
| 469 | * firmware does not provide enough key slots to store | 469 | * firmware does not provide enough key slots to store |
| 470 | * all of them. | 470 | * all of them. |
| 471 | * But encryption offload for outgoing frames is always | 471 | * But encryption offload for outgoing frames is always |
diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c index 7ecc0bda57b3..6d9204fef90b 100644 --- a/drivers/net/wireless/p54/p54spi.c +++ b/drivers/net/wireless/p54/p54spi.c | |||
| @@ -287,7 +287,7 @@ static void p54spi_power_on(struct p54s_priv *priv) | |||
| 287 | enable_irq(gpio_to_irq(p54spi_gpio_irq)); | 287 | enable_irq(gpio_to_irq(p54spi_gpio_irq)); |
| 288 | 288 | ||
| 289 | /* | 289 | /* |
| 290 | * need to wait a while before device can be accessed, the lenght | 290 | * need to wait a while before device can be accessed, the length |
| 291 | * is just a guess | 291 | * is just a guess |
| 292 | */ | 292 | */ |
| 293 | msleep(10); | 293 | msleep(10); |
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c index 9b344a921e74..e18358725b69 100644 --- a/drivers/net/wireless/p54/p54usb.c +++ b/drivers/net/wireless/p54/p54usb.c | |||
| @@ -56,6 +56,7 @@ static struct usb_device_id p54u_table[] __devinitdata = { | |||
| 56 | {USB_DEVICE(0x0846, 0x4210)}, /* Netgear WG121 the second ? */ | 56 | {USB_DEVICE(0x0846, 0x4210)}, /* Netgear WG121 the second ? */ |
| 57 | {USB_DEVICE(0x0846, 0x4220)}, /* Netgear WG111 */ | 57 | {USB_DEVICE(0x0846, 0x4220)}, /* Netgear WG111 */ |
| 58 | {USB_DEVICE(0x09aa, 0x1000)}, /* Spinnaker Proto board */ | 58 | {USB_DEVICE(0x09aa, 0x1000)}, /* Spinnaker Proto board */ |
| 59 | {USB_DEVICE(0x0bf8, 0x1007)}, /* Fujitsu E-5400 USB */ | ||
| 59 | {USB_DEVICE(0x0cde, 0x0006)}, /* Medion 40900, Roper Europe */ | 60 | {USB_DEVICE(0x0cde, 0x0006)}, /* Medion 40900, Roper Europe */ |
| 60 | {USB_DEVICE(0x0db0, 0x6826)}, /* MSI UB54G (MS-6826) */ | 61 | {USB_DEVICE(0x0db0, 0x6826)}, /* MSI UB54G (MS-6826) */ |
| 61 | {USB_DEVICE(0x107b, 0x55f2)}, /* Gateway WGU-210 (Gemtek) */ | 62 | {USB_DEVICE(0x107b, 0x55f2)}, /* Gateway WGU-210 (Gemtek) */ |
| @@ -68,6 +69,7 @@ static struct usb_device_id p54u_table[] __devinitdata = { | |||
| 68 | {USB_DEVICE(0x1915, 0x2235)}, /* Linksys WUSB54G Portable OEM */ | 69 | {USB_DEVICE(0x1915, 0x2235)}, /* Linksys WUSB54G Portable OEM */ |
| 69 | {USB_DEVICE(0x2001, 0x3701)}, /* DLink DWL-G120 Spinnaker */ | 70 | {USB_DEVICE(0x2001, 0x3701)}, /* DLink DWL-G120 Spinnaker */ |
| 70 | {USB_DEVICE(0x2001, 0x3703)}, /* DLink DWL-G122 */ | 71 | {USB_DEVICE(0x2001, 0x3703)}, /* DLink DWL-G122 */ |
| 72 | {USB_DEVICE(0x2001, 0x3762)}, /* Conceptronic C54U */ | ||
| 71 | {USB_DEVICE(0x5041, 0x2234)}, /* Linksys WUSB54G */ | 73 | {USB_DEVICE(0x5041, 0x2234)}, /* Linksys WUSB54G */ |
| 72 | {USB_DEVICE(0x5041, 0x2235)}, /* Linksys WUSB54G Portable */ | 74 | {USB_DEVICE(0x5041, 0x2235)}, /* Linksys WUSB54G Portable */ |
| 73 | 75 | ||
diff --git a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c index d44f8e20cce0..266d45bf86f5 100644 --- a/drivers/net/wireless/prism54/islpci_eth.c +++ b/drivers/net/wireless/prism54/islpci_eth.c | |||
| @@ -113,7 +113,7 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev) | |||
| 113 | * be aligned on a 4-byte boundary. If WDS is enabled add another 6 bytes | 113 | * be aligned on a 4-byte boundary. If WDS is enabled add another 6 bytes |
| 114 | * and add WDS address information */ | 114 | * and add WDS address information */ |
| 115 | if (likely(((long) skb->data & 0x03) | init_wds)) { | 115 | if (likely(((long) skb->data & 0x03) | init_wds)) { |
| 116 | /* get the number of bytes to add and re-allign */ | 116 | /* get the number of bytes to add and re-align */ |
| 117 | offset = (4 - (long) skb->data) & 0x03; | 117 | offset = (4 - (long) skb->data) & 0x03; |
| 118 | offset += init_wds ? 6 : 0; | 118 | offset += init_wds ? 6 : 0; |
| 119 | 119 | ||
| @@ -342,7 +342,7 @@ islpci_eth_receive(islpci_private *priv) | |||
| 342 | priv->pci_map_rx_address[index], | 342 | priv->pci_map_rx_address[index], |
| 343 | MAX_FRAGMENT_SIZE_RX + 2, PCI_DMA_FROMDEVICE); | 343 | MAX_FRAGMENT_SIZE_RX + 2, PCI_DMA_FROMDEVICE); |
| 344 | 344 | ||
| 345 | /* update the skb structure and allign the buffer */ | 345 | /* update the skb structure and align the buffer */ |
| 346 | skb_put(skb, size); | 346 | skb_put(skb, size); |
| 347 | if (offset) { | 347 | if (offset) { |
| 348 | /* shift the buffer allocation offset bytes to get the right frame */ | 348 | /* shift the buffer allocation offset bytes to get the right frame */ |
diff --git a/drivers/net/wireless/rayctl.h b/drivers/net/wireless/rayctl.h index 49d9b267bc0f..d7646f299bd3 100644 --- a/drivers/net/wireless/rayctl.h +++ b/drivers/net/wireless/rayctl.h | |||
| @@ -578,7 +578,7 @@ struct tx_msg { | |||
| 578 | UCHAR var[1]; | 578 | UCHAR var[1]; |
| 579 | }; | 579 | }; |
| 580 | 580 | ||
| 581 | /****** ECF Receive Control Stucture (RCS) Area at Shared RAM offset 0x0800 */ | 581 | /****** ECF Receive Control Structure (RCS) Area at Shared RAM offset 0x0800 */ |
| 582 | /* Structures for command specific parameters (rcs.var) */ | 582 | /* Structures for command specific parameters (rcs.var) */ |
| 583 | struct rx_packet_cmd { | 583 | struct rx_packet_cmd { |
| 584 | UCHAR rx_data_ptr[2]; | 584 | UCHAR rx_data_ptr[2]; |
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h index 70b9abbdeb9e..8fbc5fa965e0 100644 --- a/drivers/net/wireless/rt2x00/rt2800.h +++ b/drivers/net/wireless/rt2x00/rt2800.h | |||
| @@ -616,7 +616,7 @@ | |||
| 616 | * READ_CONTROL: 0 write BBP, 1 read BBP | 616 | * READ_CONTROL: 0 write BBP, 1 read BBP |
| 617 | * BUSY: ASIC is busy executing BBP commands | 617 | * BUSY: ASIC is busy executing BBP commands |
| 618 | * BBP_PAR_DUR: 0 4 MAC clocks, 1 8 MAC clocks | 618 | * BBP_PAR_DUR: 0 4 MAC clocks, 1 8 MAC clocks |
| 619 | * BBP_RW_MODE: 0 serial, 1 paralell | 619 | * BBP_RW_MODE: 0 serial, 1 parallel |
| 620 | */ | 620 | */ |
| 621 | #define BBP_CSR_CFG 0x101c | 621 | #define BBP_CSR_CFG 0x101c |
| 622 | #define BBP_CSR_CFG_VALUE FIELD32(0x000000ff) | 622 | #define BBP_CSR_CFG_VALUE FIELD32(0x000000ff) |
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 2ee6cebb9b25..dbf74d07d947 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | |||
| @@ -1518,7 +1518,7 @@ static void rt2800_config_channel_rf2xxx(struct rt2x00_dev *rt2x00dev, | |||
| 1518 | if (rf->channel > 14) { | 1518 | if (rf->channel > 14) { |
| 1519 | /* | 1519 | /* |
| 1520 | * When TX power is below 0, we should increase it by 7 to | 1520 | * When TX power is below 0, we should increase it by 7 to |
| 1521 | * make it a positive value (Minumum value is -7). | 1521 | * make it a positive value (Minimum value is -7). |
| 1522 | * However this means that values between 0 and 7 have | 1522 | * However this means that values between 0 and 7 have |
| 1523 | * double meaning, and we should set a 7DBm boost flag. | 1523 | * double meaning, and we should set a 7DBm boost flag. |
| 1524 | */ | 1524 | */ |
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 4e368657a83c..37509d019910 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
| @@ -730,8 +730,12 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
| 730 | { USB_DEVICE(0x050d, 0x8053), USB_DEVICE_DATA(&rt2800usb_ops) }, | 730 | { USB_DEVICE(0x050d, 0x8053), USB_DEVICE_DATA(&rt2800usb_ops) }, |
| 731 | { USB_DEVICE(0x050d, 0x805c), USB_DEVICE_DATA(&rt2800usb_ops) }, | 731 | { USB_DEVICE(0x050d, 0x805c), USB_DEVICE_DATA(&rt2800usb_ops) }, |
| 732 | { USB_DEVICE(0x050d, 0x815c), USB_DEVICE_DATA(&rt2800usb_ops) }, | 732 | { USB_DEVICE(0x050d, 0x815c), USB_DEVICE_DATA(&rt2800usb_ops) }, |
| 733 | { USB_DEVICE(0x050d, 0x825b), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
| 734 | { USB_DEVICE(0x050d, 0x935a), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
| 735 | { USB_DEVICE(0x050d, 0x935b), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
| 733 | /* Buffalo */ | 736 | /* Buffalo */ |
| 734 | { USB_DEVICE(0x0411, 0x00e8), USB_DEVICE_DATA(&rt2800usb_ops) }, | 737 | { USB_DEVICE(0x0411, 0x00e8), USB_DEVICE_DATA(&rt2800usb_ops) }, |
| 738 | { USB_DEVICE(0x0411, 0x016f), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
| 735 | /* Conceptronic */ | 739 | /* Conceptronic */ |
| 736 | { USB_DEVICE(0x14b2, 0x3c06), USB_DEVICE_DATA(&rt2800usb_ops) }, | 740 | { USB_DEVICE(0x14b2, 0x3c06), USB_DEVICE_DATA(&rt2800usb_ops) }, |
| 737 | { USB_DEVICE(0x14b2, 0x3c07), USB_DEVICE_DATA(&rt2800usb_ops) }, | 741 | { USB_DEVICE(0x14b2, 0x3c07), USB_DEVICE_DATA(&rt2800usb_ops) }, |
| @@ -818,6 +822,7 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
| 818 | /* Pegatron */ | 822 | /* Pegatron */ |
| 819 | { USB_DEVICE(0x1d4d, 0x000c), USB_DEVICE_DATA(&rt2800usb_ops) }, | 823 | { USB_DEVICE(0x1d4d, 0x000c), USB_DEVICE_DATA(&rt2800usb_ops) }, |
| 820 | { USB_DEVICE(0x1d4d, 0x000e), USB_DEVICE_DATA(&rt2800usb_ops) }, | 824 | { USB_DEVICE(0x1d4d, 0x000e), USB_DEVICE_DATA(&rt2800usb_ops) }, |
| 825 | { USB_DEVICE(0x1d4d, 0x0011), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
| 821 | /* Philips */ | 826 | /* Philips */ |
| 822 | { USB_DEVICE(0x0471, 0x200f), USB_DEVICE_DATA(&rt2800usb_ops) }, | 827 | { USB_DEVICE(0x0471, 0x200f), USB_DEVICE_DATA(&rt2800usb_ops) }, |
| 823 | /* Planex */ | 828 | /* Planex */ |
| @@ -899,6 +904,8 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
| 899 | { USB_DEVICE(0x148f, 0x3572), USB_DEVICE_DATA(&rt2800usb_ops) }, | 904 | { USB_DEVICE(0x148f, 0x3572), USB_DEVICE_DATA(&rt2800usb_ops) }, |
| 900 | /* Sitecom */ | 905 | /* Sitecom */ |
| 901 | { USB_DEVICE(0x0df6, 0x0041), USB_DEVICE_DATA(&rt2800usb_ops) }, | 906 | { USB_DEVICE(0x0df6, 0x0041), USB_DEVICE_DATA(&rt2800usb_ops) }, |
| 907 | /* Toshiba */ | ||
| 908 | { USB_DEVICE(0x0930, 0x0a07), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
| 902 | /* Zinwell */ | 909 | /* Zinwell */ |
| 903 | { USB_DEVICE(0x5a57, 0x0284), USB_DEVICE_DATA(&rt2800usb_ops) }, | 910 | { USB_DEVICE(0x5a57, 0x0284), USB_DEVICE_DATA(&rt2800usb_ops) }, |
| 904 | #endif | 911 | #endif |
| @@ -961,7 +968,6 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
| 961 | { USB_DEVICE(0x05a6, 0x0101), USB_DEVICE_DATA(&rt2800usb_ops) }, | 968 | { USB_DEVICE(0x05a6, 0x0101), USB_DEVICE_DATA(&rt2800usb_ops) }, |
| 962 | { USB_DEVICE(0x1d4d, 0x0002), USB_DEVICE_DATA(&rt2800usb_ops) }, | 969 | { USB_DEVICE(0x1d4d, 0x0002), USB_DEVICE_DATA(&rt2800usb_ops) }, |
| 963 | { USB_DEVICE(0x1d4d, 0x0010), USB_DEVICE_DATA(&rt2800usb_ops) }, | 970 | { USB_DEVICE(0x1d4d, 0x0010), USB_DEVICE_DATA(&rt2800usb_ops) }, |
| 964 | { USB_DEVICE(0x1d4d, 0x0011), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
| 965 | /* Planex */ | 971 | /* Planex */ |
| 966 | { USB_DEVICE(0x2019, 0x5201), USB_DEVICE_DATA(&rt2800usb_ops) }, | 972 | { USB_DEVICE(0x2019, 0x5201), USB_DEVICE_DATA(&rt2800usb_ops) }, |
| 967 | { USB_DEVICE(0x2019, 0xab24), USB_DEVICE_DATA(&rt2800usb_ops) }, | 973 | { USB_DEVICE(0x2019, 0xab24), USB_DEVICE_DATA(&rt2800usb_ops) }, |
| @@ -975,8 +981,6 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
| 975 | /* Sweex */ | 981 | /* Sweex */ |
| 976 | { USB_DEVICE(0x177f, 0x0153), USB_DEVICE_DATA(&rt2800usb_ops) }, | 982 | { USB_DEVICE(0x177f, 0x0153), USB_DEVICE_DATA(&rt2800usb_ops) }, |
| 977 | { USB_DEVICE(0x177f, 0x0313), USB_DEVICE_DATA(&rt2800usb_ops) }, | 983 | { USB_DEVICE(0x177f, 0x0313), USB_DEVICE_DATA(&rt2800usb_ops) }, |
| 978 | /* Toshiba */ | ||
| 979 | { USB_DEVICE(0x0930, 0x0a07), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
| 980 | /* Zyxel */ | 984 | /* Zyxel */ |
| 981 | { USB_DEVICE(0x0586, 0x341a), USB_DEVICE_DATA(&rt2800usb_ops) }, | 985 | { USB_DEVICE(0x0586, 0x341a), USB_DEVICE_DATA(&rt2800usb_ops) }, |
| 982 | #endif | 986 | #endif |
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index a3940d7300a4..7f10239f56a8 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
| @@ -484,13 +484,13 @@ struct rt2x00intf_conf { | |||
| 484 | enum nl80211_iftype type; | 484 | enum nl80211_iftype type; |
| 485 | 485 | ||
| 486 | /* | 486 | /* |
| 487 | * TSF sync value, this is dependant on the operation type. | 487 | * TSF sync value, this is dependent on the operation type. |
| 488 | */ | 488 | */ |
| 489 | enum tsf_sync sync; | 489 | enum tsf_sync sync; |
| 490 | 490 | ||
| 491 | /* | 491 | /* |
| 492 | * The MAC and BSSID addressess are simple array of bytes, | 492 | * The MAC and BSSID addresses are simple array of bytes, |
| 493 | * these arrays are little endian, so when sending the addressess | 493 | * these arrays are little endian, so when sending the addresses |
| 494 | * to the drivers, copy the it into a endian-signed variable. | 494 | * to the drivers, copy the it into a endian-signed variable. |
| 495 | * | 495 | * |
| 496 | * Note that all devices (except rt2500usb) have 32 bits | 496 | * Note that all devices (except rt2500usb) have 32 bits |
| @@ -1131,7 +1131,7 @@ void rt2x00queue_stop_queue(struct data_queue *queue); | |||
| 1131 | * @drop: True to drop all pending frames. | 1131 | * @drop: True to drop all pending frames. |
| 1132 | * | 1132 | * |
| 1133 | * This function will flush the queue. After this call | 1133 | * This function will flush the queue. After this call |
| 1134 | * the queue is guarenteed to be empty. | 1134 | * the queue is guaranteed to be empty. |
| 1135 | */ | 1135 | */ |
| 1136 | void rt2x00queue_flush_queue(struct data_queue *queue, bool drop); | 1136 | void rt2x00queue_flush_queue(struct data_queue *queue, bool drop); |
| 1137 | 1137 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c index e7f67d5eda52..9416e36de29e 100644 --- a/drivers/net/wireless/rt2x00/rt2x00config.c +++ b/drivers/net/wireless/rt2x00/rt2x00config.c | |||
| @@ -60,7 +60,7 @@ void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev, | |||
| 60 | * Note that when NULL is passed as address we will send | 60 | * Note that when NULL is passed as address we will send |
| 61 | * 00:00:00:00:00 to the device to clear the address. | 61 | * 00:00:00:00:00 to the device to clear the address. |
| 62 | * This will prevent the device being confused when it wants | 62 | * This will prevent the device being confused when it wants |
| 63 | * to ACK frames or consideres itself associated. | 63 | * to ACK frames or considers itself associated. |
| 64 | */ | 64 | */ |
| 65 | memset(conf.mac, 0, sizeof(conf.mac)); | 65 | memset(conf.mac, 0, sizeof(conf.mac)); |
| 66 | if (mac) | 66 | if (mac) |
diff --git a/drivers/net/wireless/rt2x00/rt2x00crypto.c b/drivers/net/wireless/rt2x00/rt2x00crypto.c index 5e9074bf2b8e..3f5688fbf3f7 100644 --- a/drivers/net/wireless/rt2x00/rt2x00crypto.c +++ b/drivers/net/wireless/rt2x00/rt2x00crypto.c | |||
| @@ -237,7 +237,7 @@ void rt2x00crypto_rx_insert_iv(struct sk_buff *skb, | |||
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | /* | 239 | /* |
| 240 | * NOTE: Always count the payload as transfered, | 240 | * NOTE: Always count the payload as transferred, |
| 241 | * even when alignment was set to zero. This is required | 241 | * even when alignment was set to zero. This is required |
| 242 | * for determining the correct offset for the ICV data. | 242 | * for determining the correct offset for the ICV data. |
| 243 | */ | 243 | */ |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 9de9dbe94399..84eb6ad36377 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
| @@ -1062,8 +1062,10 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev) | |||
| 1062 | * Stop all work. | 1062 | * Stop all work. |
| 1063 | */ | 1063 | */ |
| 1064 | cancel_work_sync(&rt2x00dev->intf_work); | 1064 | cancel_work_sync(&rt2x00dev->intf_work); |
| 1065 | cancel_work_sync(&rt2x00dev->rxdone_work); | 1065 | if (rt2x00_is_usb(rt2x00dev)) { |
| 1066 | cancel_work_sync(&rt2x00dev->txdone_work); | 1066 | cancel_work_sync(&rt2x00dev->rxdone_work); |
| 1067 | cancel_work_sync(&rt2x00dev->txdone_work); | ||
| 1068 | } | ||
| 1067 | destroy_workqueue(rt2x00dev->workqueue); | 1069 | destroy_workqueue(rt2x00dev->workqueue); |
| 1068 | 1070 | ||
| 1069 | /* | 1071 | /* |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dump.h b/drivers/net/wireless/rt2x00/rt2x00dump.h index 5d6e0b83151f..063ebcce97f8 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dump.h +++ b/drivers/net/wireless/rt2x00/rt2x00dump.h | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | * [rt2x00dump header][hardware descriptor][ieee802.11 frame] | 51 | * [rt2x00dump header][hardware descriptor][ieee802.11 frame] |
| 52 | * | 52 | * |
| 53 | * rt2x00dump header: The description of the dumped frame, as well as | 53 | * rt2x00dump header: The description of the dumped frame, as well as |
| 54 | * additional information usefull for debugging. See &rt2x00dump_hdr. | 54 | * additional information useful for debugging. See &rt2x00dump_hdr. |
| 55 | * hardware descriptor: Descriptor that was used to receive or transmit | 55 | * hardware descriptor: Descriptor that was used to receive or transmit |
| 56 | * the frame. | 56 | * the frame. |
| 57 | * ieee802.11 frame: The actual frame that was received or transmitted. | 57 | * ieee802.11 frame: The actual frame that was received or transmitted. |
diff --git a/drivers/net/wireless/rt2x00/rt2x00link.c b/drivers/net/wireless/rt2x00/rt2x00link.c index c975b0a12e95..29abfdeb0b65 100644 --- a/drivers/net/wireless/rt2x00/rt2x00link.c +++ b/drivers/net/wireless/rt2x00/rt2x00link.c | |||
| @@ -283,7 +283,7 @@ void rt2x00link_start_tuner(struct rt2x00_dev *rt2x00dev) | |||
| 283 | /** | 283 | /** |
| 284 | * While scanning, link tuning is disabled. By default | 284 | * While scanning, link tuning is disabled. By default |
| 285 | * the most sensitive settings will be used to make sure | 285 | * the most sensitive settings will be used to make sure |
| 286 | * that all beacons and probe responses will be recieved | 286 | * that all beacons and probe responses will be received |
| 287 | * during the scan. | 287 | * during the scan. |
| 288 | */ | 288 | */ |
| 289 | if (test_bit(DEVICE_STATE_SCANNING, &rt2x00dev->flags)) | 289 | if (test_bit(DEVICE_STATE_SCANNING, &rt2x00dev->flags)) |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index 4b3c70eeef1f..4358051bfe1a 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
| @@ -546,7 +546,7 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb, | |||
| 546 | } | 546 | } |
| 547 | 547 | ||
| 548 | /* | 548 | /* |
| 549 | * When DMA allocation is required we should guarentee to the | 549 | * When DMA allocation is required we should guarantee to the |
| 550 | * driver that the DMA is aligned to a 4-byte boundary. | 550 | * driver that the DMA is aligned to a 4-byte boundary. |
| 551 | * However some drivers require L2 padding to pad the payload | 551 | * However some drivers require L2 padding to pad the payload |
| 552 | * rather then the header. This could be a requirement for | 552 | * rather then the header. This could be a requirement for |
| @@ -689,7 +689,7 @@ void rt2x00queue_for_each_entry(struct data_queue *queue, | |||
| 689 | spin_unlock_irqrestore(&queue->index_lock, irqflags); | 689 | spin_unlock_irqrestore(&queue->index_lock, irqflags); |
| 690 | 690 | ||
| 691 | /* | 691 | /* |
| 692 | * Start from the TX done pointer, this guarentees that we will | 692 | * Start from the TX done pointer, this guarantees that we will |
| 693 | * send out all frames in the correct order. | 693 | * send out all frames in the correct order. |
| 694 | */ | 694 | */ |
| 695 | if (index_start < index_end) { | 695 | if (index_start < index_end) { |
| @@ -883,7 +883,7 @@ void rt2x00queue_flush_queue(struct data_queue *queue, bool drop) | |||
| 883 | } | 883 | } |
| 884 | 884 | ||
| 885 | /* | 885 | /* |
| 886 | * Check if driver supports flushing, we can only guarentee | 886 | * Check if driver supports flushing, we can only guarantee |
| 887 | * full support for flushing if the driver is able | 887 | * full support for flushing if the driver is able |
| 888 | * to cancel all pending frames (drop = true). | 888 | * to cancel all pending frames (drop = true). |
| 889 | */ | 889 | */ |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h index 0c8b0c699679..217861f8d95f 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.h +++ b/drivers/net/wireless/rt2x00/rt2x00queue.h | |||
| @@ -344,8 +344,8 @@ struct txentry_desc { | |||
| 344 | * only be touched after the device has signaled it is done with it. | 344 | * only be touched after the device has signaled it is done with it. |
| 345 | * @ENTRY_DATA_PENDING: This entry contains a valid frame and is waiting | 345 | * @ENTRY_DATA_PENDING: This entry contains a valid frame and is waiting |
| 346 | * for the signal to start sending. | 346 | * for the signal to start sending. |
| 347 | * @ENTRY_DATA_IO_FAILED: Hardware indicated that an IO error occured | 347 | * @ENTRY_DATA_IO_FAILED: Hardware indicated that an IO error occurred |
| 348 | * while transfering the data to the hardware. No TX status report will | 348 | * while transferring the data to the hardware. No TX status report will |
| 349 | * be expected from the hardware. | 349 | * be expected from the hardware. |
| 350 | * @ENTRY_DATA_STATUS_PENDING: The entry has been send to the device and | 350 | * @ENTRY_DATA_STATUS_PENDING: The entry has been send to the device and |
| 351 | * returned. It is now waiting for the status reporting before the | 351 | * returned. It is now waiting for the status reporting before the |
| @@ -365,7 +365,7 @@ enum queue_entry_flags { | |||
| 365 | * @flags: Entry flags, see &enum queue_entry_flags. | 365 | * @flags: Entry flags, see &enum queue_entry_flags. |
| 366 | * @queue: The data queue (&struct data_queue) to which this entry belongs. | 366 | * @queue: The data queue (&struct data_queue) to which this entry belongs. |
| 367 | * @skb: The buffer which is currently being transmitted (for TX queue), | 367 | * @skb: The buffer which is currently being transmitted (for TX queue), |
| 368 | * or used to directly recieve data in (for RX queue). | 368 | * or used to directly receive data in (for RX queue). |
| 369 | * @entry_idx: The entry index number. | 369 | * @entry_idx: The entry index number. |
| 370 | * @priv_data: Private data belonging to this queue entry. The pointer | 370 | * @priv_data: Private data belonging to this queue entry. The pointer |
| 371 | * points to data specific to a particular driver and queue type. | 371 | * points to data specific to a particular driver and queue type. |
| @@ -388,7 +388,7 @@ struct queue_entry { | |||
| 388 | * @Q_INDEX: Index pointer to the current entry in the queue, if this entry is | 388 | * @Q_INDEX: Index pointer to the current entry in the queue, if this entry is |
| 389 | * owned by the hardware then the queue is considered to be full. | 389 | * owned by the hardware then the queue is considered to be full. |
| 390 | * @Q_INDEX_DMA_DONE: Index pointer for the next entry which will have been | 390 | * @Q_INDEX_DMA_DONE: Index pointer for the next entry which will have been |
| 391 | * transfered to the hardware. | 391 | * transferred to the hardware. |
| 392 | * @Q_INDEX_DONE: Index pointer to the next entry which will be completed by | 392 | * @Q_INDEX_DONE: Index pointer to the next entry which will be completed by |
| 393 | * the hardware and for which we need to run the txdone handler. If this | 393 | * the hardware and for which we need to run the txdone handler. If this |
| 394 | * entry is not owned by the hardware the queue is considered to be empty. | 394 | * entry is not owned by the hardware the queue is considered to be empty. |
| @@ -627,7 +627,7 @@ static inline int rt2x00queue_threshold(struct data_queue *queue) | |||
| 627 | } | 627 | } |
| 628 | 628 | ||
| 629 | /** | 629 | /** |
| 630 | * rt2x00queue_status_timeout - Check if a timeout occured for STATUS reports | 630 | * rt2x00queue_status_timeout - Check if a timeout occurred for STATUS reports |
| 631 | * @queue: Queue to check. | 631 | * @queue: Queue to check. |
| 632 | */ | 632 | */ |
| 633 | static inline int rt2x00queue_status_timeout(struct data_queue *queue) | 633 | static inline int rt2x00queue_status_timeout(struct data_queue *queue) |
| @@ -637,7 +637,7 @@ static inline int rt2x00queue_status_timeout(struct data_queue *queue) | |||
| 637 | } | 637 | } |
| 638 | 638 | ||
| 639 | /** | 639 | /** |
| 640 | * rt2x00queue_timeout - Check if a timeout occured for DMA transfers | 640 | * rt2x00queue_timeout - Check if a timeout occurred for DMA transfers |
| 641 | * @queue: Queue to check. | 641 | * @queue: Queue to check. |
| 642 | */ | 642 | */ |
| 643 | static inline int rt2x00queue_dma_timeout(struct data_queue *queue) | 643 | static inline int rt2x00queue_dma_timeout(struct data_queue *queue) |
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index fbe735f5b352..36f388f97d65 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c | |||
| @@ -173,7 +173,7 @@ static void rt2x00usb_work_txdone_entry(struct queue_entry *entry) | |||
| 173 | /* | 173 | /* |
| 174 | * If the transfer to hardware succeeded, it does not mean the | 174 | * If the transfer to hardware succeeded, it does not mean the |
| 175 | * frame was send out correctly. It only means the frame | 175 | * frame was send out correctly. It only means the frame |
| 176 | * was succesfully pushed to the hardware, we have no | 176 | * was successfully pushed to the hardware, we have no |
| 177 | * way to determine the transmission status right now. | 177 | * way to determine the transmission status right now. |
| 178 | * (Only indirectly by looking at the failed TX counters | 178 | * (Only indirectly by looking at the failed TX counters |
| 179 | * in the register). | 179 | * in the register). |
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.h b/drivers/net/wireless/rt2x00/rt2x00usb.h index 6aaf51fc7ad8..e11c759ac9ed 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.h +++ b/drivers/net/wireless/rt2x00/rt2x00usb.h | |||
| @@ -400,7 +400,7 @@ void rt2x00usb_flush_queue(struct data_queue *queue); | |||
| 400 | * @rt2x00dev: Pointer to &struct rt2x00_dev | 400 | * @rt2x00dev: Pointer to &struct rt2x00_dev |
| 401 | * | 401 | * |
| 402 | * Check the health of the USB communication and determine | 402 | * Check the health of the USB communication and determine |
| 403 | * if timeouts have occured. If this is the case, this function | 403 | * if timeouts have occurred. If this is the case, this function |
| 404 | * will reset all communication to restore functionality again. | 404 | * will reset all communication to restore functionality again. |
| 405 | */ | 405 | */ |
| 406 | void rt2x00usb_watchdog(struct rt2x00_dev *rt2x00dev); | 406 | void rt2x00usb_watchdog(struct rt2x00_dev *rt2x00dev); |
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c index bb0c781f4a1b..0d7d93e1d398 100644 --- a/drivers/net/wireless/rtlwifi/base.c +++ b/drivers/net/wireless/rtlwifi/base.c | |||
| @@ -520,7 +520,7 @@ void rtl_get_tcb_desc(struct ieee80211_hw *hw, | |||
| 520 | *because hw will nerver use hw_rate | 520 | *because hw will nerver use hw_rate |
| 521 | *when tcb_desc->use_driver_rate = false | 521 | *when tcb_desc->use_driver_rate = false |
| 522 | *so we never set highest N rate here, | 522 | *so we never set highest N rate here, |
| 523 | *and N rate will all be controled by FW | 523 | *and N rate will all be controlled by FW |
| 524 | *when tcb_desc->use_driver_rate = false | 524 | *when tcb_desc->use_driver_rate = false |
| 525 | */ | 525 | */ |
| 526 | if (rtlmac->ht_enable) { | 526 | if (rtlmac->ht_enable) { |
diff --git a/drivers/net/wireless/rtlwifi/efuse.c b/drivers/net/wireless/rtlwifi/efuse.c index f74a8701c67d..590f14f45a89 100644 --- a/drivers/net/wireless/rtlwifi/efuse.c +++ b/drivers/net/wireless/rtlwifi/efuse.c | |||
| @@ -685,7 +685,7 @@ static int efuse_pg_packet_read(struct ieee80211_hw *hw, u8 offset, u8 *data) | |||
| 685 | 685 | ||
| 686 | u8 efuse_data, word_cnts = 0; | 686 | u8 efuse_data, word_cnts = 0; |
| 687 | u16 efuse_addr = 0; | 687 | u16 efuse_addr = 0; |
| 688 | u8 hworden; | 688 | u8 hworden = 0; |
| 689 | u8 tmpdata[8]; | 689 | u8 tmpdata[8]; |
| 690 | 690 | ||
| 691 | if (data == NULL) | 691 | if (data == NULL) |
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 9cd7703c2a30..5938f6ee21e4 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
| @@ -395,7 +395,7 @@ static void rtl_pci_init_aspm(struct ieee80211_hw *hw) | |||
| 395 | * 0 - Disable ASPM, | 395 | * 0 - Disable ASPM, |
| 396 | * 1 - Enable ASPM without Clock Req, | 396 | * 1 - Enable ASPM without Clock Req, |
| 397 | * 2 - Enable ASPM with Clock Req, | 397 | * 2 - Enable ASPM with Clock Req, |
| 398 | * 3 - Alwyas Enable ASPM with Clock Req, | 398 | * 3 - Always Enable ASPM with Clock Req, |
| 399 | * 4 - Always Enable ASPM without Clock Req. | 399 | * 4 - Always Enable ASPM without Clock Req. |
| 400 | * set defult to RTL8192CE:3 RTL8192E:2 | 400 | * set defult to RTL8192CE:3 RTL8192E:2 |
| 401 | * */ | 401 | * */ |
diff --git a/drivers/net/wireless/rtlwifi/regd.c b/drivers/net/wireless/rtlwifi/regd.c index 3336ca999dfd..d26f957981ad 100644 --- a/drivers/net/wireless/rtlwifi/regd.c +++ b/drivers/net/wireless/rtlwifi/regd.c | |||
| @@ -179,7 +179,7 @@ static void _rtl_reg_apply_active_scan_flags(struct wiphy *wiphy, | |||
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | /* | 181 | /* |
| 182 | *If a country IE has been recieved check its rule for this | 182 | *If a country IE has been received check its rule for this |
| 183 | *channel first before enabling active scan. The passive scan | 183 | *channel first before enabling active scan. The passive scan |
| 184 | *would have been enforced by the initial processing of our | 184 | *would have been enforced by the initial processing of our |
| 185 | *custom regulatory domain. | 185 | *custom regulatory domain. |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c index 5ef91374b230..28a6ce3bc239 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c +++ b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c | |||
| @@ -303,7 +303,7 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw, | |||
| 303 | u16 box_reg, box_extreg; | 303 | u16 box_reg, box_extreg; |
| 304 | u8 u1b_tmp; | 304 | u8 u1b_tmp; |
| 305 | bool isfw_read = false; | 305 | bool isfw_read = false; |
| 306 | u8 buf_index; | 306 | u8 buf_index = 0; |
| 307 | bool bwrite_sucess = false; | 307 | bool bwrite_sucess = false; |
| 308 | u8 wait_h2c_limmit = 100; | 308 | u8 wait_h2c_limmit = 100; |
| 309 | u8 wait_writeh2c_limmit = 100; | 309 | u8 wait_writeh2c_limmit = 100; |
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c index a4b2613d6a8c..f5d85735d642 100644 --- a/drivers/net/wireless/rtlwifi/usb.c +++ b/drivers/net/wireless/rtlwifi/usb.c | |||
| @@ -246,7 +246,7 @@ static void _rtl_usb_io_handler_init(struct device *dev, | |||
| 246 | 246 | ||
| 247 | static void _rtl_usb_io_handler_release(struct ieee80211_hw *hw) | 247 | static void _rtl_usb_io_handler_release(struct ieee80211_hw *hw) |
| 248 | { | 248 | { |
| 249 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 249 | struct rtl_priv __maybe_unused *rtlpriv = rtl_priv(hw); |
| 250 | 250 | ||
| 251 | mutex_destroy(&rtlpriv->io.bb_mutex); | 251 | mutex_destroy(&rtlpriv->io.bb_mutex); |
| 252 | } | 252 | } |
diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h index 01226f8e70f9..07db95ff9bc5 100644 --- a/drivers/net/wireless/rtlwifi/wifi.h +++ b/drivers/net/wireless/rtlwifi/wifi.h | |||
| @@ -1555,7 +1555,7 @@ struct rtl_priv { | |||
| 1555 | 1555 | ||
| 1556 | 1556 | ||
| 1557 | /*************************************** | 1557 | /*************************************** |
| 1558 | Bluetooth Co-existance Related | 1558 | Bluetooth Co-existence Related |
| 1559 | ****************************************/ | 1559 | ****************************************/ |
| 1560 | 1560 | ||
| 1561 | enum bt_ant_num { | 1561 | enum bt_ant_num { |
diff --git a/drivers/net/wireless/wl1251/cmd.c b/drivers/net/wireless/wl1251/cmd.c index 0ade4bd617c0..81f164bc4888 100644 --- a/drivers/net/wireless/wl1251/cmd.c +++ b/drivers/net/wireless/wl1251/cmd.c | |||
| @@ -104,7 +104,7 @@ int wl1251_cmd_test(struct wl1251 *wl, void *buf, size_t buf_len, u8 answer) | |||
| 104 | * @wl: wl struct | 104 | * @wl: wl struct |
| 105 | * @id: acx id | 105 | * @id: acx id |
| 106 | * @buf: buffer for the response, including all headers, must work with dma | 106 | * @buf: buffer for the response, including all headers, must work with dma |
| 107 | * @len: lenght of buf | 107 | * @len: length of buf |
| 108 | */ | 108 | */ |
| 109 | int wl1251_cmd_interrogate(struct wl1251 *wl, u16 id, void *buf, size_t len) | 109 | int wl1251_cmd_interrogate(struct wl1251 *wl, u16 id, void *buf, size_t len) |
| 110 | { | 110 | { |
diff --git a/drivers/net/wireless/wl1251/rx.c b/drivers/net/wireless/wl1251/rx.c index c1b3b3f03da2..6af35265c900 100644 --- a/drivers/net/wireless/wl1251/rx.c +++ b/drivers/net/wireless/wl1251/rx.c | |||
| @@ -179,7 +179,7 @@ static void wl1251_rx_body(struct wl1251 *wl, | |||
| 179 | rx_buffer = skb_put(skb, length); | 179 | rx_buffer = skb_put(skb, length); |
| 180 | wl1251_mem_read(wl, rx_packet_ring_addr, rx_buffer, length); | 180 | wl1251_mem_read(wl, rx_packet_ring_addr, rx_buffer, length); |
| 181 | 181 | ||
| 182 | /* The actual lenght doesn't include the target's alignment */ | 182 | /* The actual length doesn't include the target's alignment */ |
| 183 | skb->len = desc->length - PLCP_HEADER_LENGTH; | 183 | skb->len = desc->length - PLCP_HEADER_LENGTH; |
| 184 | 184 | ||
| 185 | fc = (u16 *)skb->data; | 185 | fc = (u16 *)skb->data; |
diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c index f0aa7ab97bf7..96324336f936 100644 --- a/drivers/net/wireless/wl12xx/cmd.c +++ b/drivers/net/wireless/wl12xx/cmd.c | |||
| @@ -359,7 +359,7 @@ int wl1271_cmd_test(struct wl1271 *wl, void *buf, size_t buf_len, u8 answer) | |||
| 359 | * @wl: wl struct | 359 | * @wl: wl struct |
| 360 | * @id: acx id | 360 | * @id: acx id |
| 361 | * @buf: buffer for the response, including all headers, must work with dma | 361 | * @buf: buffer for the response, including all headers, must work with dma |
| 362 | * @len: lenght of buf | 362 | * @len: length of buf |
| 363 | */ | 363 | */ |
| 364 | int wl1271_cmd_interrogate(struct wl1271 *wl, u16 id, void *buf, size_t len) | 364 | int wl1271_cmd_interrogate(struct wl1271 *wl, u16 id, void *buf, size_t len) |
| 365 | { | 365 | { |
diff --git a/drivers/net/wireless/wl12xx/conf.h b/drivers/net/wireless/wl12xx/conf.h index 856a8a2fff4f..8a8323896eec 100644 --- a/drivers/net/wireless/wl12xx/conf.h +++ b/drivers/net/wireless/wl12xx/conf.h | |||
| @@ -497,7 +497,7 @@ struct conf_rx_settings { | |||
| 497 | #define CONF_TX_RATE_RETRY_LIMIT 10 | 497 | #define CONF_TX_RATE_RETRY_LIMIT 10 |
| 498 | 498 | ||
| 499 | /* | 499 | /* |
| 500 | * Rates supported for data packets when operating as AP. Note the absense | 500 | * Rates supported for data packets when operating as AP. Note the absence |
| 501 | * of the 22Mbps rate. There is a FW limitation on 12 rates so we must drop | 501 | * of the 22Mbps rate. There is a FW limitation on 12 rates so we must drop |
| 502 | * one. The rate dropped is not mandatory under any operating mode. | 502 | * one. The rate dropped is not mandatory under any operating mode. |
| 503 | */ | 503 | */ |
| @@ -572,7 +572,7 @@ enum conf_tx_ac { | |||
| 572 | CONF_TX_AC_BK = 1, /* background */ | 572 | CONF_TX_AC_BK = 1, /* background */ |
| 573 | CONF_TX_AC_VI = 2, /* video */ | 573 | CONF_TX_AC_VI = 2, /* video */ |
| 574 | CONF_TX_AC_VO = 3, /* voice */ | 574 | CONF_TX_AC_VO = 3, /* voice */ |
| 575 | CONF_TX_AC_CTS2SELF = 4, /* fictious AC, follows AC_VO */ | 575 | CONF_TX_AC_CTS2SELF = 4, /* fictitious AC, follows AC_VO */ |
| 576 | CONF_TX_AC_ANY_TID = 0x1f | 576 | CONF_TX_AC_ANY_TID = 0x1f |
| 577 | }; | 577 | }; |
| 578 | 578 | ||
| @@ -1169,7 +1169,7 @@ struct conf_memory_settings { | |||
| 1169 | 1169 | ||
| 1170 | /* | 1170 | /* |
| 1171 | * Minimum required free tx memory blocks in order to assure optimum | 1171 | * Minimum required free tx memory blocks in order to assure optimum |
| 1172 | * performence | 1172 | * performance |
| 1173 | * | 1173 | * |
| 1174 | * Range: 0-120 | 1174 | * Range: 0-120 |
| 1175 | */ | 1175 | */ |
| @@ -1177,7 +1177,7 @@ struct conf_memory_settings { | |||
| 1177 | 1177 | ||
| 1178 | /* | 1178 | /* |
| 1179 | * Minimum required free rx memory blocks in order to assure optimum | 1179 | * Minimum required free rx memory blocks in order to assure optimum |
| 1180 | * performence | 1180 | * performance |
| 1181 | * | 1181 | * |
| 1182 | * Range: 0-120 | 1182 | * Range: 0-120 |
| 1183 | */ | 1183 | */ |
diff --git a/drivers/net/wireless/wl12xx/io.h b/drivers/net/wireless/wl12xx/io.h index c1aac8292089..00c771ea70bf 100644 --- a/drivers/net/wireless/wl12xx/io.h +++ b/drivers/net/wireless/wl12xx/io.h | |||
| @@ -94,7 +94,7 @@ static inline int wl1271_translate_addr(struct wl1271 *wl, int addr) | |||
| 94 | * translated region. | 94 | * translated region. |
| 95 | * | 95 | * |
| 96 | * The translated regions occur next to each other in physical device | 96 | * The translated regions occur next to each other in physical device |
| 97 | * memory, so just add the sizes of the preceeding address regions to | 97 | * memory, so just add the sizes of the preceding address regions to |
| 98 | * get the offset to the new region. | 98 | * get the offset to the new region. |
| 99 | * | 99 | * |
| 100 | * Currently, only the two first regions are addressed, and the | 100 | * Currently, only the two first regions are addressed, and the |
diff --git a/drivers/net/wireless/wl12xx/sdio.c b/drivers/net/wireless/wl12xx/sdio.c index 5b9dbeafec06..b1c7d031c391 100644 --- a/drivers/net/wireless/wl12xx/sdio.c +++ b/drivers/net/wireless/wl12xx/sdio.c | |||
| @@ -340,7 +340,7 @@ module_init(wl1271_init); | |||
| 340 | module_exit(wl1271_exit); | 340 | module_exit(wl1271_exit); |
| 341 | 341 | ||
| 342 | MODULE_LICENSE("GPL"); | 342 | MODULE_LICENSE("GPL"); |
| 343 | MODULE_AUTHOR("Luciano Coelho <luciano.coelho@nokia.com>"); | 343 | MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>"); |
| 344 | MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>"); | 344 | MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>"); |
| 345 | MODULE_FIRMWARE(WL1271_FW_NAME); | 345 | MODULE_FIRMWARE(WL1271_FW_NAME); |
| 346 | MODULE_FIRMWARE(WL1271_AP_FW_NAME); | 346 | MODULE_FIRMWARE(WL1271_AP_FW_NAME); |
diff --git a/drivers/net/wireless/wl12xx/spi.c b/drivers/net/wireless/wl12xx/spi.c index 18cf01719ae0..ffc745b17f4d 100644 --- a/drivers/net/wireless/wl12xx/spi.c +++ b/drivers/net/wireless/wl12xx/spi.c | |||
| @@ -487,7 +487,7 @@ module_init(wl1271_init); | |||
| 487 | module_exit(wl1271_exit); | 487 | module_exit(wl1271_exit); |
| 488 | 488 | ||
| 489 | MODULE_LICENSE("GPL"); | 489 | MODULE_LICENSE("GPL"); |
| 490 | MODULE_AUTHOR("Luciano Coelho <luciano.coelho@nokia.com>"); | 490 | MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>"); |
| 491 | MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>"); | 491 | MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>"); |
| 492 | MODULE_FIRMWARE(WL1271_FW_NAME); | 492 | MODULE_FIRMWARE(WL1271_FW_NAME); |
| 493 | MODULE_FIRMWARE(WL1271_AP_FW_NAME); | 493 | MODULE_FIRMWARE(WL1271_AP_FW_NAME); |
diff --git a/drivers/net/wireless/wl12xx/testmode.c b/drivers/net/wireless/wl12xx/testmode.c index e64403b6896d..6ec06a4a4c6d 100644 --- a/drivers/net/wireless/wl12xx/testmode.c +++ b/drivers/net/wireless/wl12xx/testmode.c | |||
| @@ -204,7 +204,10 @@ static int wl1271_tm_cmd_nvs_push(struct wl1271 *wl, struct nlattr *tb[]) | |||
| 204 | 204 | ||
| 205 | kfree(wl->nvs); | 205 | kfree(wl->nvs); |
| 206 | 206 | ||
| 207 | wl->nvs = kzalloc(sizeof(struct wl1271_nvs_file), GFP_KERNEL); | 207 | if (len != sizeof(struct wl1271_nvs_file)) |
| 208 | return -EINVAL; | ||
| 209 | |||
| 210 | wl->nvs = kzalloc(len, GFP_KERNEL); | ||
| 208 | if (!wl->nvs) { | 211 | if (!wl->nvs) { |
| 209 | wl1271_error("could not allocate memory for the nvs file"); | 212 | wl1271_error("could not allocate memory for the nvs file"); |
| 210 | ret = -ENOMEM; | 213 | ret = -ENOMEM; |
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index 3e5befe4d03b..fc08f36fe1f5 100644 --- a/drivers/net/wireless/wl3501_cs.c +++ b/drivers/net/wireless/wl3501_cs.c | |||
| @@ -290,7 +290,7 @@ static void wl3501_get_from_wla(struct wl3501_card *this, u16 src, void *dest, | |||
| 290 | * \ \- IEEE 802.11 -/ \-------------- len --------------/ | 290 | * \ \- IEEE 802.11 -/ \-------------- len --------------/ |
| 291 | * \-struct wl3501_80211_tx_hdr--/ \-------- Ethernet Frame -------/ | 291 | * \-struct wl3501_80211_tx_hdr--/ \-------- Ethernet Frame -------/ |
| 292 | * | 292 | * |
| 293 | * Return = Postion in Card | 293 | * Return = Position in Card |
| 294 | */ | 294 | */ |
| 295 | static u16 wl3501_get_tx_buffer(struct wl3501_card *this, u16 len) | 295 | static u16 wl3501_get_tx_buffer(struct wl3501_card *this, u16 len) |
| 296 | { | 296 | { |
| @@ -1932,7 +1932,7 @@ static int wl3501_config(struct pcmcia_device *link) | |||
| 1932 | this->base_addr = dev->base_addr; | 1932 | this->base_addr = dev->base_addr; |
| 1933 | 1933 | ||
| 1934 | if (!wl3501_get_flash_mac_addr(this)) { | 1934 | if (!wl3501_get_flash_mac_addr(this)) { |
| 1935 | printk(KERN_WARNING "%s: Cant read MAC addr in flash ROM?\n", | 1935 | printk(KERN_WARNING "%s: Can't read MAC addr in flash ROM?\n", |
| 1936 | dev->name); | 1936 | dev->name); |
| 1937 | unregister_netdev(dev); | 1937 | unregister_netdev(dev); |
| 1938 | goto failed; | 1938 | goto failed; |
diff --git a/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c b/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c index 0597d862fbd2..e36117486c91 100644 --- a/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c +++ b/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c | |||
| @@ -169,7 +169,7 @@ static int rf2959_init_hw(struct zd_rf *rf) | |||
| 169 | { CR85, 0x00 }, { CR86, 0x10 }, { CR87, 0x2A }, | 169 | { CR85, 0x00 }, { CR86, 0x10 }, { CR87, 0x2A }, |
| 170 | { CR88, 0x10 }, { CR89, 0x24 }, { CR90, 0x18 }, | 170 | { CR88, 0x10 }, { CR89, 0x24 }, { CR90, 0x18 }, |
| 171 | /* { CR91, 0x18 }, */ | 171 | /* { CR91, 0x18 }, */ |
| 172 | /* should solve continous CTS frame problems */ | 172 | /* should solve continuous CTS frame problems */ |
| 173 | { CR91, 0x00 }, | 173 | { CR91, 0x00 }, |
| 174 | { CR92, 0x0a }, { CR93, 0x00 }, { CR94, 0x01 }, | 174 | { CR92, 0x0a }, { CR93, 0x00 }, { CR94, 0x01 }, |
| 175 | { CR95, 0x00 }, { CR96, 0x40 }, { CR97, 0x37 }, | 175 | { CR95, 0x00 }, { CR96, 0x40 }, { CR97, 0x37 }, |
diff --git a/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c b/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c index 9e74eb1b67d5..ba0a0ccb1fa0 100644 --- a/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c +++ b/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c | |||
| @@ -353,7 +353,7 @@ static int uw2453_init_hw(struct zd_rf *rf) | |||
| 353 | }; | 353 | }; |
| 354 | 354 | ||
| 355 | static const u32 rv[] = { | 355 | static const u32 rv[] = { |
| 356 | UW2453_REGWRITE(4, 0x2b), /* configure reciever gain */ | 356 | UW2453_REGWRITE(4, 0x2b), /* configure receiver gain */ |
| 357 | UW2453_REGWRITE(5, 0x19e4f), /* configure transmitter gain */ | 357 | UW2453_REGWRITE(5, 0x19e4f), /* configure transmitter gain */ |
| 358 | UW2453_REGWRITE(6, 0xf81ad), /* enable RX/TX filter tuning */ | 358 | UW2453_REGWRITE(6, 0xf81ad), /* enable RX/TX filter tuning */ |
| 359 | UW2453_REGWRITE(7, 0x3fffe), /* disable TX gain in test mode */ | 359 | UW2453_REGWRITE(7, 0x3fffe), /* disable TX gain in test mode */ |
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index 58236e6d0921..ab607bbd6291 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c | |||
| @@ -643,7 +643,7 @@ static void rx_urb_complete(struct urb *urb) | |||
| 643 | usb = urb->context; | 643 | usb = urb->context; |
| 644 | rx = &usb->rx; | 644 | rx = &usb->rx; |
| 645 | 645 | ||
| 646 | zd_usb_reset_rx_idle_timer(usb); | 646 | tasklet_schedule(&rx->reset_timer_tasklet); |
| 647 | 647 | ||
| 648 | if (length%rx->usb_packet_size > rx->usb_packet_size-4) { | 648 | if (length%rx->usb_packet_size > rx->usb_packet_size-4) { |
| 649 | /* If there is an old first fragment, we don't care. */ | 649 | /* If there is an old first fragment, we don't care. */ |
| @@ -812,6 +812,7 @@ void zd_usb_disable_rx(struct zd_usb *usb) | |||
| 812 | __zd_usb_disable_rx(usb); | 812 | __zd_usb_disable_rx(usb); |
| 813 | mutex_unlock(&rx->setup_mutex); | 813 | mutex_unlock(&rx->setup_mutex); |
| 814 | 814 | ||
| 815 | tasklet_kill(&rx->reset_timer_tasklet); | ||
| 815 | cancel_delayed_work_sync(&rx->idle_work); | 816 | cancel_delayed_work_sync(&rx->idle_work); |
| 816 | } | 817 | } |
| 817 | 818 | ||
| @@ -1106,6 +1107,13 @@ static void zd_rx_idle_timer_handler(struct work_struct *work) | |||
| 1106 | zd_usb_reset_rx(usb); | 1107 | zd_usb_reset_rx(usb); |
| 1107 | } | 1108 | } |
| 1108 | 1109 | ||
| 1110 | static void zd_usb_reset_rx_idle_timer_tasklet(unsigned long param) | ||
| 1111 | { | ||
| 1112 | struct zd_usb *usb = (struct zd_usb *)param; | ||
| 1113 | |||
| 1114 | zd_usb_reset_rx_idle_timer(usb); | ||
| 1115 | } | ||
| 1116 | |||
| 1109 | void zd_usb_reset_rx_idle_timer(struct zd_usb *usb) | 1117 | void zd_usb_reset_rx_idle_timer(struct zd_usb *usb) |
| 1110 | { | 1118 | { |
| 1111 | struct zd_usb_rx *rx = &usb->rx; | 1119 | struct zd_usb_rx *rx = &usb->rx; |
| @@ -1127,6 +1135,7 @@ static inline void init_usb_interrupt(struct zd_usb *usb) | |||
| 1127 | static inline void init_usb_rx(struct zd_usb *usb) | 1135 | static inline void init_usb_rx(struct zd_usb *usb) |
| 1128 | { | 1136 | { |
| 1129 | struct zd_usb_rx *rx = &usb->rx; | 1137 | struct zd_usb_rx *rx = &usb->rx; |
| 1138 | |||
| 1130 | spin_lock_init(&rx->lock); | 1139 | spin_lock_init(&rx->lock); |
| 1131 | mutex_init(&rx->setup_mutex); | 1140 | mutex_init(&rx->setup_mutex); |
| 1132 | if (interface_to_usbdev(usb->intf)->speed == USB_SPEED_HIGH) { | 1141 | if (interface_to_usbdev(usb->intf)->speed == USB_SPEED_HIGH) { |
| @@ -1136,11 +1145,14 @@ static inline void init_usb_rx(struct zd_usb *usb) | |||
| 1136 | } | 1145 | } |
| 1137 | ZD_ASSERT(rx->fragment_length == 0); | 1146 | ZD_ASSERT(rx->fragment_length == 0); |
| 1138 | INIT_DELAYED_WORK(&rx->idle_work, zd_rx_idle_timer_handler); | 1147 | INIT_DELAYED_WORK(&rx->idle_work, zd_rx_idle_timer_handler); |
| 1148 | rx->reset_timer_tasklet.func = zd_usb_reset_rx_idle_timer_tasklet; | ||
| 1149 | rx->reset_timer_tasklet.data = (unsigned long)usb; | ||
| 1139 | } | 1150 | } |
| 1140 | 1151 | ||
| 1141 | static inline void init_usb_tx(struct zd_usb *usb) | 1152 | static inline void init_usb_tx(struct zd_usb *usb) |
| 1142 | { | 1153 | { |
| 1143 | struct zd_usb_tx *tx = &usb->tx; | 1154 | struct zd_usb_tx *tx = &usb->tx; |
| 1155 | |||
| 1144 | spin_lock_init(&tx->lock); | 1156 | spin_lock_init(&tx->lock); |
| 1145 | atomic_set(&tx->enabled, 0); | 1157 | atomic_set(&tx->enabled, 0); |
| 1146 | tx->stopped = 0; | 1158 | tx->stopped = 0; |
| @@ -1671,6 +1683,10 @@ static void iowrite16v_urb_complete(struct urb *urb) | |||
| 1671 | 1683 | ||
| 1672 | if (urb->status && !usb->cmd_error) | 1684 | if (urb->status && !usb->cmd_error) |
| 1673 | usb->cmd_error = urb->status; | 1685 | usb->cmd_error = urb->status; |
| 1686 | |||
| 1687 | if (!usb->cmd_error && | ||
| 1688 | urb->actual_length != urb->transfer_buffer_length) | ||
| 1689 | usb->cmd_error = -EIO; | ||
| 1674 | } | 1690 | } |
| 1675 | 1691 | ||
| 1676 | static int zd_submit_waiting_urb(struct zd_usb *usb, bool last) | 1692 | static int zd_submit_waiting_urb(struct zd_usb *usb, bool last) |
| @@ -1805,7 +1821,7 @@ int zd_usb_iowrite16v_async(struct zd_usb *usb, const struct zd_ioreq16 *ioreqs, | |||
| 1805 | usb_fill_int_urb(urb, udev, usb_sndintpipe(udev, EP_REGS_OUT), | 1821 | usb_fill_int_urb(urb, udev, usb_sndintpipe(udev, EP_REGS_OUT), |
| 1806 | req, req_len, iowrite16v_urb_complete, usb, | 1822 | req, req_len, iowrite16v_urb_complete, usb, |
| 1807 | ep->desc.bInterval); | 1823 | ep->desc.bInterval); |
| 1808 | urb->transfer_flags |= URB_FREE_BUFFER | URB_SHORT_NOT_OK; | 1824 | urb->transfer_flags |= URB_FREE_BUFFER; |
| 1809 | 1825 | ||
| 1810 | /* Submit previous URB */ | 1826 | /* Submit previous URB */ |
| 1811 | r = zd_submit_waiting_urb(usb, false); | 1827 | r = zd_submit_waiting_urb(usb, false); |
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.h b/drivers/net/wireless/zd1211rw/zd_usb.h index b3df2c8116cc..325d0f989257 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.h +++ b/drivers/net/wireless/zd1211rw/zd_usb.h | |||
| @@ -183,6 +183,7 @@ struct zd_usb_rx { | |||
| 183 | spinlock_t lock; | 183 | spinlock_t lock; |
| 184 | struct mutex setup_mutex; | 184 | struct mutex setup_mutex; |
| 185 | struct delayed_work idle_work; | 185 | struct delayed_work idle_work; |
| 186 | struct tasklet_struct reset_timer_tasklet; | ||
| 186 | u8 fragment[2 * USB_MAX_RX_SIZE]; | 187 | u8 fragment[2 * USB_MAX_RX_SIZE]; |
| 187 | unsigned int fragment_length; | 188 | unsigned int fragment_length; |
| 188 | unsigned int usb_packet_size; | 189 | unsigned int usb_packet_size; |
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index 2642af4ee491..372572c0adc6 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c | |||
| @@ -786,7 +786,7 @@ static int xemaclite_mdio_read(struct mii_bus *bus, int phy_id, int reg) | |||
| 786 | * @reg: register number to write to | 786 | * @reg: register number to write to |
| 787 | * @val: value to write to the register number specified by reg | 787 | * @val: value to write to the register number specified by reg |
| 788 | * | 788 | * |
| 789 | * This fucntion waits till the device is ready to accept a new MDIO | 789 | * This function waits till the device is ready to accept a new MDIO |
| 790 | * request and then writes the val to the MDIO Write Data register. | 790 | * request and then writes the val to the MDIO Write Data register. |
| 791 | */ | 791 | */ |
| 792 | static int xemaclite_mdio_write(struct mii_bus *bus, int phy_id, int reg, | 792 | static int xemaclite_mdio_write(struct mii_bus *bus, int phy_id, int reg, |
diff --git a/drivers/net/znet.c b/drivers/net/znet.c index ae07b3dfbcc1..ec2800ff8d42 100644 --- a/drivers/net/znet.c +++ b/drivers/net/znet.c | |||
| @@ -652,7 +652,7 @@ static irqreturn_t znet_interrupt(int irq, void *dev_id) | |||
| 652 | dev->stats.tx_errors++; | 652 | dev->stats.tx_errors++; |
| 653 | 653 | ||
| 654 | /* Transceiver may be stuck if cable | 654 | /* Transceiver may be stuck if cable |
| 655 | * was removed while emiting a | 655 | * was removed while emitting a |
| 656 | * packet. Flip it off, then on to | 656 | * packet. Flip it off, then on to |
| 657 | * reset it. This is very empirical, | 657 | * reset it. This is very empirical, |
| 658 | * but it seems to work. */ | 658 | * but it seems to work. */ |
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index c9db49c10f45..8b63a691a9ed 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c | |||
| @@ -676,7 +676,7 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, | |||
| 676 | 676 | ||
| 677 | early_init_dt_check_for_initrd(node); | 677 | early_init_dt_check_for_initrd(node); |
| 678 | 678 | ||
| 679 | /* Retreive command line */ | 679 | /* Retrieve command line */ |
| 680 | p = of_get_flat_dt_prop(node, "bootargs", &l); | 680 | p = of_get_flat_dt_prop(node, "bootargs", &l); |
| 681 | if (p != NULL && l > 0) | 681 | if (p != NULL && l > 0) |
| 682 | strlcpy(cmd_line, p, min((int)l, COMMAND_LINE_SIZE)); | 682 | strlcpy(cmd_line, p, min((int)l, COMMAND_LINE_SIZE)); |
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index dcd7857784f2..d35e300b0ad1 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c | |||
| @@ -136,7 +136,7 @@ EXPORT_SYMBOL(of_phy_find_device); | |||
| 136 | * @hndlr: Link state callback for the network device | 136 | * @hndlr: Link state callback for the network device |
| 137 | * @iface: PHY data interface type | 137 | * @iface: PHY data interface type |
| 138 | * | 138 | * |
| 139 | * Returns a pointer to the phy_device if successfull. NULL otherwise | 139 | * Returns a pointer to the phy_device if successful. NULL otherwise |
| 140 | */ | 140 | */ |
| 141 | struct phy_device *of_phy_connect(struct net_device *dev, | 141 | struct phy_device *of_phy_connect(struct net_device *dev, |
| 142 | struct device_node *phy_np, | 142 | struct device_node *phy_np, |
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c index 1062b8ffe244..246a92f677e4 100644 --- a/drivers/parisc/pdc_stable.c +++ b/drivers/parisc/pdc_stable.c | |||
| @@ -141,7 +141,7 @@ struct pdcspath_attribute paths_attr_##_name = { \ | |||
| 141 | * @entry: A pointer to an allocated pdcspath_entry. | 141 | * @entry: A pointer to an allocated pdcspath_entry. |
| 142 | * | 142 | * |
| 143 | * The general idea is that you don't read from the Stable Storage every time | 143 | * The general idea is that you don't read from the Stable Storage every time |
| 144 | * you access the files provided by the facilites. We store a copy of the | 144 | * you access the files provided by the facilities. We store a copy of the |
| 145 | * content of the stable storage WRT various paths in these structs. We read | 145 | * content of the stable storage WRT various paths in these structs. We read |
| 146 | * these structs when reading the files, and we will write to these structs when | 146 | * these structs when reading the files, and we will write to these structs when |
| 147 | * writing to the files, and only then write them back to the Stable Storage. | 147 | * writing to the files, and only then write them back to the Stable Storage. |
| @@ -213,7 +213,7 @@ pdcspath_store(struct pdcspath_entry *entry) | |||
| 213 | 213 | ||
| 214 | /* addr, devpath and count must be word aligned */ | 214 | /* addr, devpath and count must be word aligned */ |
| 215 | if (pdc_stable_write(entry->addr, devpath, sizeof(*devpath)) != PDC_OK) { | 215 | if (pdc_stable_write(entry->addr, devpath, sizeof(*devpath)) != PDC_OK) { |
| 216 | printk(KERN_ERR "%s: an error occured when writing to PDC.\n" | 216 | printk(KERN_ERR "%s: an error occurred when writing to PDC.\n" |
| 217 | "It is likely that the Stable Storage data has been corrupted.\n" | 217 | "It is likely that the Stable Storage data has been corrupted.\n" |
| 218 | "Please check it carefully upon next reboot.\n", __func__); | 218 | "Please check it carefully upon next reboot.\n", __func__); |
| 219 | WARN_ON(1); | 219 | WARN_ON(1); |
diff --git a/drivers/parport/Kconfig b/drivers/parport/Kconfig index 855f389eea40..d92185a5523b 100644 --- a/drivers/parport/Kconfig +++ b/drivers/parport/Kconfig | |||
| @@ -142,7 +142,7 @@ config PARPORT_AX88796 | |||
| 142 | the AX88796 network controller chip. This code is also available | 142 | the AX88796 network controller chip. This code is also available |
| 143 | as a module (say M), called parport_ax88796. | 143 | as a module (say M), called parport_ax88796. |
| 144 | 144 | ||
| 145 | The driver is not dependant on the AX88796 network driver, and | 145 | The driver is not dependent on the AX88796 network driver, and |
| 146 | should not interfere with the networking functions of the chip. | 146 | should not interfere with the networking functions of the chip. |
| 147 | 147 | ||
| 148 | config PARPORT_1284 | 148 | config PARPORT_1284 |
diff --git a/drivers/parport/ieee1284.c b/drivers/parport/ieee1284.c index 8901ecf6e037..f9fd4b33a546 100644 --- a/drivers/parport/ieee1284.c +++ b/drivers/parport/ieee1284.c | |||
| @@ -355,7 +355,7 @@ int parport_negotiate (struct parport *port, int mode) | |||
| 355 | return 0; | 355 | return 0; |
| 356 | } | 356 | } |
| 357 | 357 | ||
| 358 | /* Go to compability forward idle mode */ | 358 | /* Go to compatibility forward idle mode */ |
| 359 | if (port->ieee1284.mode != IEEE1284_MODE_COMPAT) | 359 | if (port->ieee1284.mode != IEEE1284_MODE_COMPAT) |
| 360 | parport_ieee1284_terminate (port); | 360 | parport_ieee1284_terminate (port); |
| 361 | 361 | ||
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index 8d62fb76cd41..a3755ffc03d4 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c | |||
| @@ -1488,7 +1488,7 @@ static void __devinit winbond_check(int io, int key) | |||
| 1488 | 1488 | ||
| 1489 | outb(key, io); | 1489 | outb(key, io); |
| 1490 | outb(key, io); /* Write Magic Sequence to EFER, extended | 1490 | outb(key, io); /* Write Magic Sequence to EFER, extended |
| 1491 | funtion enable register */ | 1491 | function enable register */ |
| 1492 | outb(0x20, io); /* Write EFIR, extended function index register */ | 1492 | outb(0x20, io); /* Write EFIR, extended function index register */ |
| 1493 | devid = inb(io + 1); /* Read EFDR, extended function data register */ | 1493 | devid = inb(io + 1); /* Read EFDR, extended function data register */ |
| 1494 | outb(0x21, io); | 1494 | outb(0x21, io); |
| @@ -1527,7 +1527,7 @@ static void __devinit winbond_check2(int io, int key) | |||
| 1527 | x_oldid = inb(io + 2); | 1527 | x_oldid = inb(io + 2); |
| 1528 | 1528 | ||
| 1529 | outb(key, io); /* Write Magic Byte to EFER, extended | 1529 | outb(key, io); /* Write Magic Byte to EFER, extended |
| 1530 | funtion enable register */ | 1530 | function enable register */ |
| 1531 | outb(0x20, io + 2); /* Write EFIR, extended function index register */ | 1531 | outb(0x20, io + 2); /* Write EFIR, extended function index register */ |
| 1532 | devid = inb(io + 2); /* Read EFDR, extended function data register */ | 1532 | devid = inb(io + 2); /* Read EFDR, extended function data register */ |
| 1533 | outb(0x21, io + 1); | 1533 | outb(0x21, io + 1); |
| @@ -1569,7 +1569,7 @@ static void __devinit smsc_check(int io, int key) | |||
| 1569 | 1569 | ||
| 1570 | outb(key, io); | 1570 | outb(key, io); |
| 1571 | outb(key, io); /* Write Magic Sequence to EFER, extended | 1571 | outb(key, io); /* Write Magic Sequence to EFER, extended |
| 1572 | funtion enable register */ | 1572 | function enable register */ |
| 1573 | outb(0x0d, io); /* Write EFIR, extended function index register */ | 1573 | outb(0x0d, io); /* Write EFIR, extended function index register */ |
| 1574 | oldid = inb(io + 1); /* Read EFDR, extended function data register */ | 1574 | oldid = inb(io + 1); /* Read EFDR, extended function data register */ |
| 1575 | outb(0x0e, io); | 1575 | outb(0x0e, io); |
diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c index 3bc72d18b121..8f3faf343f75 100644 --- a/drivers/pci/hotplug/acpi_pcihp.c +++ b/drivers/pci/hotplug/acpi_pcihp.c | |||
| @@ -351,7 +351,7 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev, u32 flags) | |||
| 351 | * To handle different BIOS behavior, we look for _OSC on a root | 351 | * To handle different BIOS behavior, we look for _OSC on a root |
| 352 | * bridge preferentially (according to PCI fw spec). Later for | 352 | * bridge preferentially (according to PCI fw spec). Later for |
| 353 | * OSHP within the scope of the hotplug controller and its parents, | 353 | * OSHP within the scope of the hotplug controller and its parents, |
| 354 | * upto the host bridge under which this controller exists. | 354 | * up to the host bridge under which this controller exists. |
| 355 | */ | 355 | */ |
| 356 | handle = acpi_find_root_bridge_handle(pdev); | 356 | handle = acpi_find_root_bridge_handle(pdev); |
| 357 | if (handle) { | 357 | if (handle) { |
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index e610cfe4f07b..2f67e9bc2f96 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
| @@ -585,7 +585,7 @@ static void remove_bridge(acpi_handle handle) | |||
| 585 | 585 | ||
| 586 | /* | 586 | /* |
| 587 | * On root bridges with hotplug slots directly underneath (ie, | 587 | * On root bridges with hotplug slots directly underneath (ie, |
| 588 | * no p2p bridge inbetween), we call cleanup_bridge(). | 588 | * no p2p bridge between), we call cleanup_bridge(). |
| 589 | * | 589 | * |
| 590 | * The else clause cleans up root bridges that either had no | 590 | * The else clause cleans up root bridges that either had no |
| 591 | * hotplug slots at all, or had a p2p bridge underneath. | 591 | * hotplug slots at all, or had a p2p bridge underneath. |
diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c index ef7411c660b9..758adb5f47fd 100644 --- a/drivers/pci/hotplug/rpaphp_core.c +++ b/drivers/pci/hotplug/rpaphp_core.c | |||
| @@ -290,7 +290,7 @@ static int is_php_dn(struct device_node *dn, const int **indexes, | |||
| 290 | * @dn: device node of slot | 290 | * @dn: device node of slot |
| 291 | * | 291 | * |
| 292 | * This subroutine will register a hotplugable slot with the | 292 | * This subroutine will register a hotplugable slot with the |
| 293 | * PCI hotplug infrastructure. This routine is typicaly called | 293 | * PCI hotplug infrastructure. This routine is typically called |
| 294 | * during boot time, if the hotplug slots are present at boot time, | 294 | * during boot time, if the hotplug slots are present at boot time, |
| 295 | * or is called later, by the dlpar add code, if the slot is | 295 | * or is called later, by the dlpar add code, if the slot is |
| 296 | * being dynamically added during runtime. | 296 | * being dynamically added during runtime. |
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 7da3bef60d87..505c1c7075f0 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
| @@ -2265,7 +2265,7 @@ int __init init_dmars(void) | |||
| 2265 | /* | 2265 | /* |
| 2266 | * TBD: | 2266 | * TBD: |
| 2267 | * we could share the same root & context tables | 2267 | * we could share the same root & context tables |
| 2268 | * amoung all IOMMU's. Need to Split it later. | 2268 | * among all IOMMU's. Need to Split it later. |
| 2269 | */ | 2269 | */ |
| 2270 | ret = iommu_alloc_root_entry(iommu); | 2270 | ret = iommu_alloc_root_entry(iommu); |
| 2271 | if (ret) { | 2271 | if (ret) { |
diff --git a/drivers/pci/intr_remapping.c b/drivers/pci/intr_remapping.c index a22557b20283..3607faf28a4d 100644 --- a/drivers/pci/intr_remapping.c +++ b/drivers/pci/intr_remapping.c | |||
| @@ -289,7 +289,7 @@ int free_irte(int irq) | |||
| 289 | * source validation type | 289 | * source validation type |
| 290 | */ | 290 | */ |
| 291 | #define SVT_NO_VERIFY 0x0 /* no verification is required */ | 291 | #define SVT_NO_VERIFY 0x0 /* no verification is required */ |
| 292 | #define SVT_VERIFY_SID_SQ 0x1 /* verify using SID and SQ fiels */ | 292 | #define SVT_VERIFY_SID_SQ 0x1 /* verify using SID and SQ fields */ |
| 293 | #define SVT_VERIFY_BUS 0x2 /* verify bus of request-id */ | 293 | #define SVT_VERIFY_BUS 0x2 /* verify bus of request-id */ |
| 294 | 294 | ||
| 295 | /* | 295 | /* |
diff --git a/drivers/pci/iova.c b/drivers/pci/iova.c index 7914951ef29a..9606e599a475 100644 --- a/drivers/pci/iova.c +++ b/drivers/pci/iova.c | |||
| @@ -391,7 +391,7 @@ reserve_iova(struct iova_domain *iovad, | |||
| 391 | break; | 391 | break; |
| 392 | } | 392 | } |
| 393 | 393 | ||
| 394 | /* We are here either becasue this is the first reserver node | 394 | /* We are here either because this is the first reserver node |
| 395 | * or need to insert remaining non overlap addr range | 395 | * or need to insert remaining non overlap addr range |
| 396 | */ | 396 | */ |
| 397 | iova = __insert_new_range(iovad, pfn_lo, pfn_hi); | 397 | iova = __insert_new_range(iovad, pfn_lo, pfn_hi); |
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index d86ea8b01137..135df164a4c1 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
| @@ -781,7 +781,7 @@ static int pci_pm_resume(struct device *dev) | |||
| 781 | 781 | ||
| 782 | #endif /* !CONFIG_SUSPEND */ | 782 | #endif /* !CONFIG_SUSPEND */ |
| 783 | 783 | ||
| 784 | #ifdef CONFIG_HIBERNATION | 784 | #ifdef CONFIG_HIBERNATE_CALLBACKS |
| 785 | 785 | ||
| 786 | static int pci_pm_freeze(struct device *dev) | 786 | static int pci_pm_freeze(struct device *dev) |
| 787 | { | 787 | { |
| @@ -970,7 +970,7 @@ static int pci_pm_restore(struct device *dev) | |||
| 970 | return error; | 970 | return error; |
| 971 | } | 971 | } |
| 972 | 972 | ||
| 973 | #else /* !CONFIG_HIBERNATION */ | 973 | #else /* !CONFIG_HIBERNATE_CALLBACKS */ |
| 974 | 974 | ||
| 975 | #define pci_pm_freeze NULL | 975 | #define pci_pm_freeze NULL |
| 976 | #define pci_pm_freeze_noirq NULL | 976 | #define pci_pm_freeze_noirq NULL |
| @@ -981,7 +981,7 @@ static int pci_pm_restore(struct device *dev) | |||
| 981 | #define pci_pm_restore NULL | 981 | #define pci_pm_restore NULL |
| 982 | #define pci_pm_restore_noirq NULL | 982 | #define pci_pm_restore_noirq NULL |
| 983 | 983 | ||
| 984 | #endif /* !CONFIG_HIBERNATION */ | 984 | #endif /* !CONFIG_HIBERNATE_CALLBACKS */ |
| 985 | 985 | ||
| 986 | #ifdef CONFIG_PM_RUNTIME | 986 | #ifdef CONFIG_PM_RUNTIME |
| 987 | 987 | ||
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index a8a277a2e0d0..f8deb3e380a2 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
| @@ -645,7 +645,7 @@ pci_adjust_legacy_attr(struct pci_bus *b, enum pci_mmap_state mmap_type) | |||
| 645 | * a per-bus basis. This routine creates the files and ties them into | 645 | * a per-bus basis. This routine creates the files and ties them into |
| 646 | * their associated read, write and mmap files from pci-sysfs.c | 646 | * their associated read, write and mmap files from pci-sysfs.c |
| 647 | * | 647 | * |
| 648 | * On error unwind, but don't propogate the error to the caller | 648 | * On error unwind, but don't propagate the error to the caller |
| 649 | * as it is ok to set up the PCI bus without these files. | 649 | * as it is ok to set up the PCI bus without these files. |
| 650 | */ | 650 | */ |
| 651 | void pci_create_legacy_files(struct pci_bus *b) | 651 | void pci_create_legacy_files(struct pci_bus *b) |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index bd80f6378463..5129ed6d8fa7 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
| @@ -263,7 +263,7 @@ static void quirk_vialatency(struct pci_dev *dev) | |||
| 263 | * This happens to include the IDE controllers.... | 263 | * This happens to include the IDE controllers.... |
| 264 | * | 264 | * |
| 265 | * VIA only apply this fix when an SB Live! is present but under | 265 | * VIA only apply this fix when an SB Live! is present but under |
| 266 | * both Linux and Windows this isnt enough, and we have seen | 266 | * both Linux and Windows this isn't enough, and we have seen |
| 267 | * corruption without SB Live! but with things like 3 UDMA IDE | 267 | * corruption without SB Live! but with things like 3 UDMA IDE |
| 268 | * controllers. So we ignore that bit of the VIA recommendation.. | 268 | * controllers. So we ignore that bit of the VIA recommendation.. |
| 269 | */ | 269 | */ |
| @@ -2680,7 +2680,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_HINT, 0x0020, quirk_hotplug_bridge); | |||
| 2680 | * This is a quirk for the Ricoh MMC controller found as a part of | 2680 | * This is a quirk for the Ricoh MMC controller found as a part of |
| 2681 | * some mulifunction chips. | 2681 | * some mulifunction chips. |
| 2682 | 2682 | ||
| 2683 | * This is very similiar and based on the ricoh_mmc driver written by | 2683 | * This is very similar and based on the ricoh_mmc driver written by |
| 2684 | * Philip Langdale. Thank you for these magic sequences. | 2684 | * Philip Langdale. Thank you for these magic sequences. |
| 2685 | * | 2685 | * |
| 2686 | * These chips implement the four main memory card controllers (SD, MMC, MS, xD) | 2686 | * These chips implement the four main memory card controllers (SD, MMC, MS, xD) |
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 89d0a6a88df7..ebf51ad1b714 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
| @@ -676,10 +676,10 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask, | |||
| 676 | min_align = align1 >> 1; | 676 | min_align = align1 >> 1; |
| 677 | align += aligns[order]; | 677 | align += aligns[order]; |
| 678 | } | 678 | } |
| 679 | size0 = calculate_memsize(size, min_size, 0, resource_size(b_res), align); | 679 | size0 = calculate_memsize(size, min_size, 0, resource_size(b_res), min_align); |
| 680 | size1 = !add_size ? size : | 680 | size1 = !add_size ? size : |
| 681 | calculate_memsize(size, min_size+add_size, 0, | 681 | calculate_memsize(size, min_size+add_size, 0, |
| 682 | resource_size(b_res), align); | 682 | resource_size(b_res), min_align); |
| 683 | if (!size0 && !size1) { | 683 | if (!size0 && !size1) { |
| 684 | if (b_res->start || b_res->end) | 684 | if (b_res->start || b_res->end) |
| 685 | dev_info(&bus->self->dev, "disabling bridge window " | 685 | dev_info(&bus->self->dev, "disabling bridge window " |
diff --git a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c index fc7906eaf228..3e447d0387b7 100644 --- a/drivers/pcmcia/i82092.c +++ b/drivers/pcmcia/i82092.c | |||
| @@ -54,7 +54,7 @@ static struct pccard_operations i82092aa_operations = { | |||
| 54 | .set_mem_map = i82092aa_set_mem_map, | 54 | .set_mem_map = i82092aa_set_mem_map, |
| 55 | }; | 55 | }; |
| 56 | 56 | ||
| 57 | /* The card can do upto 4 sockets, allocate a structure for each of them */ | 57 | /* The card can do up to 4 sockets, allocate a structure for each of them */ |
| 58 | 58 | ||
| 59 | struct socket_info { | 59 | struct socket_info { |
| 60 | int number; | 60 | int number; |
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 42fbf1a75576..fe77e8223841 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
| @@ -173,7 +173,7 @@ static int pcmcia_access_config(struct pcmcia_device *p_dev, | |||
| 173 | c = p_dev->function_config; | 173 | c = p_dev->function_config; |
| 174 | 174 | ||
| 175 | if (!(c->state & CONFIG_LOCKED)) { | 175 | if (!(c->state & CONFIG_LOCKED)) { |
| 176 | dev_dbg(&p_dev->dev, "Configuration isnt't locked\n"); | 176 | dev_dbg(&p_dev->dev, "Configuration isn't't locked\n"); |
| 177 | mutex_unlock(&s->ops_mutex); | 177 | mutex_unlock(&s->ops_mutex); |
| 178 | return -EACCES; | 178 | return -EACCES; |
| 179 | } | 179 | } |
diff --git a/drivers/pcmcia/pxa2xx_balloon3.c b/drivers/pcmcia/pxa2xx_balloon3.c index 453c54c97612..4c3e94c0ae85 100644 --- a/drivers/pcmcia/pxa2xx_balloon3.c +++ b/drivers/pcmcia/pxa2xx_balloon3.c | |||
| @@ -25,6 +25,8 @@ | |||
| 25 | 25 | ||
| 26 | #include <mach/balloon3.h> | 26 | #include <mach/balloon3.h> |
| 27 | 27 | ||
| 28 | #include <asm/mach-types.h> | ||
| 29 | |||
| 28 | #include "soc_common.h" | 30 | #include "soc_common.h" |
| 29 | 31 | ||
| 30 | /* | 32 | /* |
| @@ -127,6 +129,9 @@ static int __init balloon3_pcmcia_init(void) | |||
| 127 | { | 129 | { |
| 128 | int ret; | 130 | int ret; |
| 129 | 131 | ||
| 132 | if (!machine_is_balloon3()) | ||
| 133 | return -ENODEV; | ||
| 134 | |||
| 130 | balloon3_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1); | 135 | balloon3_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1); |
| 131 | if (!balloon3_pcmcia_device) | 136 | if (!balloon3_pcmcia_device) |
| 132 | return -ENOMEM; | 137 | return -ENOMEM; |
diff --git a/drivers/pcmcia/pxa2xx_colibri.c b/drivers/pcmcia/pxa2xx_colibri.c index a52039564e74..443cb7fc872d 100644 --- a/drivers/pcmcia/pxa2xx_colibri.c +++ b/drivers/pcmcia/pxa2xx_colibri.c | |||
| @@ -34,14 +34,24 @@ | |||
| 34 | #define COLIBRI320_DETECT_GPIO 81 | 34 | #define COLIBRI320_DETECT_GPIO 81 |
| 35 | #define COLIBRI320_READY_GPIO 29 | 35 | #define COLIBRI320_READY_GPIO 29 |
| 36 | 36 | ||
| 37 | static struct { | 37 | enum { |
| 38 | int reset_gpio; | 38 | DETECT = 0, |
| 39 | int ppen_gpio; | 39 | READY = 1, |
| 40 | int bvd1_gpio; | 40 | BVD1 = 2, |
| 41 | int bvd2_gpio; | 41 | BVD2 = 3, |
| 42 | int detect_gpio; | 42 | PPEN = 4, |
| 43 | int ready_gpio; | 43 | RESET = 5, |
| 44 | } colibri_pcmcia_gpio; | 44 | }; |
| 45 | |||
| 46 | /* Contents of this array are configured on-the-fly in init function */ | ||
| 47 | static struct gpio colibri_pcmcia_gpios[] = { | ||
| 48 | { 0, GPIOF_IN, "PCMCIA Detect" }, | ||
| 49 | { 0, GPIOF_IN, "PCMCIA Ready" }, | ||
| 50 | { 0, GPIOF_IN, "PCMCIA BVD1" }, | ||
| 51 | { 0, GPIOF_IN, "PCMCIA BVD2" }, | ||
| 52 | { 0, GPIOF_INIT_LOW, "PCMCIA PPEN" }, | ||
| 53 | { 0, GPIOF_INIT_HIGH,"PCMCIA Reset" }, | ||
| 54 | }; | ||
| 45 | 55 | ||
| 46 | static struct pcmcia_irqs colibri_irqs[] = { | 56 | static struct pcmcia_irqs colibri_irqs[] = { |
| 47 | { | 57 | { |
| @@ -54,88 +64,42 @@ static int colibri_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | |||
| 54 | { | 64 | { |
| 55 | int ret; | 65 | int ret; |
| 56 | 66 | ||
| 57 | ret = gpio_request(colibri_pcmcia_gpio.detect_gpio, "DETECT"); | 67 | ret = gpio_request_array(colibri_pcmcia_gpios, |
| 68 | ARRAY_SIZE(colibri_pcmcia_gpios)); | ||
| 58 | if (ret) | 69 | if (ret) |
| 59 | goto err1; | 70 | goto err1; |
| 60 | ret = gpio_direction_input(colibri_pcmcia_gpio.detect_gpio); | ||
| 61 | if (ret) | ||
| 62 | goto err2; | ||
| 63 | |||
| 64 | ret = gpio_request(colibri_pcmcia_gpio.ready_gpio, "READY"); | ||
| 65 | if (ret) | ||
| 66 | goto err2; | ||
| 67 | ret = gpio_direction_input(colibri_pcmcia_gpio.ready_gpio); | ||
| 68 | if (ret) | ||
| 69 | goto err3; | ||
| 70 | 71 | ||
| 71 | ret = gpio_request(colibri_pcmcia_gpio.bvd1_gpio, "BVD1"); | 72 | colibri_irqs[0].irq = gpio_to_irq(colibri_pcmcia_gpios[DETECT].gpio); |
| 72 | if (ret) | 73 | skt->socket.pci_irq = gpio_to_irq(colibri_pcmcia_gpios[READY].gpio); |
| 73 | goto err3; | ||
| 74 | ret = gpio_direction_input(colibri_pcmcia_gpio.bvd1_gpio); | ||
| 75 | if (ret) | ||
| 76 | goto err4; | ||
| 77 | 74 | ||
| 78 | ret = gpio_request(colibri_pcmcia_gpio.bvd2_gpio, "BVD2"); | 75 | ret = soc_pcmcia_request_irqs(skt, colibri_irqs, |
| 79 | if (ret) | 76 | ARRAY_SIZE(colibri_irqs)); |
| 80 | goto err4; | ||
| 81 | ret = gpio_direction_input(colibri_pcmcia_gpio.bvd2_gpio); | ||
| 82 | if (ret) | ||
| 83 | goto err5; | ||
| 84 | |||
| 85 | ret = gpio_request(colibri_pcmcia_gpio.ppen_gpio, "PPEN"); | ||
| 86 | if (ret) | ||
| 87 | goto err5; | ||
| 88 | ret = gpio_direction_output(colibri_pcmcia_gpio.ppen_gpio, 0); | ||
| 89 | if (ret) | ||
| 90 | goto err6; | ||
| 91 | |||
| 92 | ret = gpio_request(colibri_pcmcia_gpio.reset_gpio, "RESET"); | ||
| 93 | if (ret) | ||
| 94 | goto err6; | ||
| 95 | ret = gpio_direction_output(colibri_pcmcia_gpio.reset_gpio, 1); | ||
| 96 | if (ret) | 77 | if (ret) |
| 97 | goto err7; | 78 | goto err2; |
| 98 | |||
| 99 | colibri_irqs[0].irq = gpio_to_irq(colibri_pcmcia_gpio.detect_gpio); | ||
| 100 | skt->socket.pci_irq = gpio_to_irq(colibri_pcmcia_gpio.ready_gpio); | ||
| 101 | 79 | ||
| 102 | return soc_pcmcia_request_irqs(skt, colibri_irqs, | 80 | return ret; |
| 103 | ARRAY_SIZE(colibri_irqs)); | ||
| 104 | 81 | ||
| 105 | err7: | ||
| 106 | gpio_free(colibri_pcmcia_gpio.detect_gpio); | ||
| 107 | err6: | ||
| 108 | gpio_free(colibri_pcmcia_gpio.ready_gpio); | ||
| 109 | err5: | ||
| 110 | gpio_free(colibri_pcmcia_gpio.bvd1_gpio); | ||
| 111 | err4: | ||
| 112 | gpio_free(colibri_pcmcia_gpio.bvd2_gpio); | ||
| 113 | err3: | ||
| 114 | gpio_free(colibri_pcmcia_gpio.reset_gpio); | ||
| 115 | err2: | 82 | err2: |
| 116 | gpio_free(colibri_pcmcia_gpio.ppen_gpio); | 83 | gpio_free_array(colibri_pcmcia_gpios, |
| 84 | ARRAY_SIZE(colibri_pcmcia_gpios)); | ||
| 117 | err1: | 85 | err1: |
| 118 | return ret; | 86 | return ret; |
| 119 | } | 87 | } |
| 120 | 88 | ||
| 121 | static void colibri_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt) | 89 | static void colibri_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt) |
| 122 | { | 90 | { |
| 123 | gpio_free(colibri_pcmcia_gpio.detect_gpio); | 91 | gpio_free_array(colibri_pcmcia_gpios, |
| 124 | gpio_free(colibri_pcmcia_gpio.ready_gpio); | 92 | ARRAY_SIZE(colibri_pcmcia_gpios)); |
| 125 | gpio_free(colibri_pcmcia_gpio.bvd1_gpio); | ||
| 126 | gpio_free(colibri_pcmcia_gpio.bvd2_gpio); | ||
| 127 | gpio_free(colibri_pcmcia_gpio.reset_gpio); | ||
| 128 | gpio_free(colibri_pcmcia_gpio.ppen_gpio); | ||
| 129 | } | 93 | } |
| 130 | 94 | ||
| 131 | static void colibri_pcmcia_socket_state(struct soc_pcmcia_socket *skt, | 95 | static void colibri_pcmcia_socket_state(struct soc_pcmcia_socket *skt, |
| 132 | struct pcmcia_state *state) | 96 | struct pcmcia_state *state) |
| 133 | { | 97 | { |
| 134 | 98 | ||
| 135 | state->detect = !!gpio_get_value(colibri_pcmcia_gpio.detect_gpio); | 99 | state->detect = !!gpio_get_value(colibri_pcmcia_gpios[DETECT].gpio); |
| 136 | state->ready = !!gpio_get_value(colibri_pcmcia_gpio.ready_gpio); | 100 | state->ready = !!gpio_get_value(colibri_pcmcia_gpios[READY].gpio); |
| 137 | state->bvd1 = !!gpio_get_value(colibri_pcmcia_gpio.bvd1_gpio); | 101 | state->bvd1 = !!gpio_get_value(colibri_pcmcia_gpios[BVD1].gpio); |
| 138 | state->bvd2 = !!gpio_get_value(colibri_pcmcia_gpio.bvd2_gpio); | 102 | state->bvd2 = !!gpio_get_value(colibri_pcmcia_gpios[BVD2].gpio); |
| 139 | state->wrprot = 0; | 103 | state->wrprot = 0; |
| 140 | state->vs_3v = 1; | 104 | state->vs_3v = 1; |
| 141 | state->vs_Xv = 0; | 105 | state->vs_Xv = 0; |
| @@ -145,9 +109,10 @@ static int | |||
| 145 | colibri_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, | 109 | colibri_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, |
| 146 | const socket_state_t *state) | 110 | const socket_state_t *state) |
| 147 | { | 111 | { |
| 148 | gpio_set_value(colibri_pcmcia_gpio.ppen_gpio, | 112 | gpio_set_value(colibri_pcmcia_gpios[PPEN].gpio, |
| 149 | !(state->Vcc == 33 && state->Vpp < 50)); | 113 | !(state->Vcc == 33 && state->Vpp < 50)); |
| 150 | gpio_set_value(colibri_pcmcia_gpio.reset_gpio, state->flags & SS_RESET); | 114 | gpio_set_value(colibri_pcmcia_gpios[RESET].gpio, |
| 115 | state->flags & SS_RESET); | ||
| 151 | return 0; | 116 | return 0; |
| 152 | } | 117 | } |
| 153 | 118 | ||
| @@ -190,20 +155,20 @@ static int __init colibri_pcmcia_init(void) | |||
| 190 | 155 | ||
| 191 | /* Colibri PXA270 */ | 156 | /* Colibri PXA270 */ |
| 192 | if (machine_is_colibri()) { | 157 | if (machine_is_colibri()) { |
| 193 | colibri_pcmcia_gpio.reset_gpio = COLIBRI270_RESET_GPIO; | 158 | colibri_pcmcia_gpios[RESET].gpio = COLIBRI270_RESET_GPIO; |
| 194 | colibri_pcmcia_gpio.ppen_gpio = COLIBRI270_PPEN_GPIO; | 159 | colibri_pcmcia_gpios[PPEN].gpio = COLIBRI270_PPEN_GPIO; |
| 195 | colibri_pcmcia_gpio.bvd1_gpio = COLIBRI270_BVD1_GPIO; | 160 | colibri_pcmcia_gpios[BVD1].gpio = COLIBRI270_BVD1_GPIO; |
| 196 | colibri_pcmcia_gpio.bvd2_gpio = COLIBRI270_BVD2_GPIO; | 161 | colibri_pcmcia_gpios[BVD2].gpio = COLIBRI270_BVD2_GPIO; |
| 197 | colibri_pcmcia_gpio.detect_gpio = COLIBRI270_DETECT_GPIO; | 162 | colibri_pcmcia_gpios[DETECT].gpio = COLIBRI270_DETECT_GPIO; |
| 198 | colibri_pcmcia_gpio.ready_gpio = COLIBRI270_READY_GPIO; | 163 | colibri_pcmcia_gpios[READY].gpio = COLIBRI270_READY_GPIO; |
| 199 | /* Colibri PXA320 */ | 164 | /* Colibri PXA320 */ |
| 200 | } else if (machine_is_colibri320()) { | 165 | } else if (machine_is_colibri320()) { |
| 201 | colibri_pcmcia_gpio.reset_gpio = COLIBRI320_RESET_GPIO; | 166 | colibri_pcmcia_gpios[RESET].gpio = COLIBRI320_RESET_GPIO; |
| 202 | colibri_pcmcia_gpio.ppen_gpio = COLIBRI320_PPEN_GPIO; | 167 | colibri_pcmcia_gpios[PPEN].gpio = COLIBRI320_PPEN_GPIO; |
| 203 | colibri_pcmcia_gpio.bvd1_gpio = COLIBRI320_BVD1_GPIO; | 168 | colibri_pcmcia_gpios[BVD1].gpio = COLIBRI320_BVD1_GPIO; |
| 204 | colibri_pcmcia_gpio.bvd2_gpio = COLIBRI320_BVD2_GPIO; | 169 | colibri_pcmcia_gpios[BVD2].gpio = COLIBRI320_BVD2_GPIO; |
| 205 | colibri_pcmcia_gpio.detect_gpio = COLIBRI320_DETECT_GPIO; | 170 | colibri_pcmcia_gpios[DETECT].gpio = COLIBRI320_DETECT_GPIO; |
| 206 | colibri_pcmcia_gpio.ready_gpio = COLIBRI320_READY_GPIO; | 171 | colibri_pcmcia_gpios[READY].gpio = COLIBRI320_READY_GPIO; |
| 207 | } | 172 | } |
| 208 | 173 | ||
| 209 | ret = platform_device_add_data(colibri_pcmcia_device, | 174 | ret = platform_device_add_data(colibri_pcmcia_device, |
diff --git a/drivers/pcmcia/pxa2xx_lubbock.c b/drivers/pcmcia/pxa2xx_lubbock.c index 25afe637c657..c21888eebb58 100644 --- a/drivers/pcmcia/pxa2xx_lubbock.c +++ b/drivers/pcmcia/pxa2xx_lubbock.c | |||
| @@ -187,7 +187,7 @@ lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, | |||
| 187 | * We need to hack around the const qualifier as | 187 | * We need to hack around the const qualifier as |
| 188 | * well to keep this ugly workaround localized and | 188 | * well to keep this ugly workaround localized and |
| 189 | * not force it to the rest of the code. Barf bags | 189 | * not force it to the rest of the code. Barf bags |
| 190 | * avaliable in the seat pocket in front of you! | 190 | * available in the seat pocket in front of you! |
| 191 | */ | 191 | */ |
| 192 | ((socket_state_t *)state)->Vcc = 50; | 192 | ((socket_state_t *)state)->Vcc = 50; |
| 193 | ((socket_state_t *)state)->Vpp = 50; | 193 | ((socket_state_t *)state)->Vpp = 50; |
diff --git a/drivers/pcmcia/pxa2xx_palmld.c b/drivers/pcmcia/pxa2xx_palmld.c index 6fb6f7f0672e..69f73670949a 100644 --- a/drivers/pcmcia/pxa2xx_palmld.c +++ b/drivers/pcmcia/pxa2xx_palmld.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Driver for Palm LifeDrive PCMCIA | 4 | * Driver for Palm LifeDrive PCMCIA |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2006 Alex Osborne <ato@meshy.org> | 6 | * Copyright (C) 2006 Alex Osborne <ato@meshy.org> |
| 7 | * Copyright (C) 2007-2008 Marek Vasut <marek.vasut@gmail.com> | 7 | * Copyright (C) 2007-2011 Marek Vasut <marek.vasut@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
| @@ -20,49 +20,27 @@ | |||
| 20 | #include <mach/palmld.h> | 20 | #include <mach/palmld.h> |
| 21 | #include "soc_common.h" | 21 | #include "soc_common.h" |
| 22 | 22 | ||
| 23 | static struct gpio palmld_pcmcia_gpios[] = { | ||
| 24 | { GPIO_NR_PALMLD_PCMCIA_POWER, GPIOF_INIT_LOW, "PCMCIA Power" }, | ||
| 25 | { GPIO_NR_PALMLD_PCMCIA_RESET, GPIOF_INIT_HIGH,"PCMCIA Reset" }, | ||
| 26 | { GPIO_NR_PALMLD_PCMCIA_READY, GPIOF_IN, "PCMCIA Ready" }, | ||
| 27 | }; | ||
| 28 | |||
| 23 | static int palmld_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | 29 | static int palmld_pcmcia_hw_init(struct soc_pcmcia_socket *skt) |
| 24 | { | 30 | { |
| 25 | int ret; | 31 | int ret; |
| 26 | 32 | ||
| 27 | ret = gpio_request(GPIO_NR_PALMLD_PCMCIA_POWER, "PCMCIA PWR"); | 33 | ret = gpio_request_array(palmld_pcmcia_gpios, |
| 28 | if (ret) | 34 | ARRAY_SIZE(palmld_pcmcia_gpios)); |
| 29 | goto err1; | ||
| 30 | ret = gpio_direction_output(GPIO_NR_PALMLD_PCMCIA_POWER, 0); | ||
| 31 | if (ret) | ||
| 32 | goto err2; | ||
| 33 | |||
| 34 | ret = gpio_request(GPIO_NR_PALMLD_PCMCIA_RESET, "PCMCIA RST"); | ||
| 35 | if (ret) | ||
| 36 | goto err2; | ||
| 37 | ret = gpio_direction_output(GPIO_NR_PALMLD_PCMCIA_RESET, 1); | ||
| 38 | if (ret) | ||
| 39 | goto err3; | ||
| 40 | |||
| 41 | ret = gpio_request(GPIO_NR_PALMLD_PCMCIA_READY, "PCMCIA RDY"); | ||
| 42 | if (ret) | ||
| 43 | goto err3; | ||
| 44 | ret = gpio_direction_input(GPIO_NR_PALMLD_PCMCIA_READY); | ||
| 45 | if (ret) | ||
| 46 | goto err4; | ||
| 47 | 35 | ||
| 48 | skt->socket.pci_irq = IRQ_GPIO(GPIO_NR_PALMLD_PCMCIA_READY); | 36 | skt->socket.pci_irq = IRQ_GPIO(GPIO_NR_PALMLD_PCMCIA_READY); |
| 49 | return 0; | ||
| 50 | 37 | ||
| 51 | err4: | ||
| 52 | gpio_free(GPIO_NR_PALMLD_PCMCIA_READY); | ||
| 53 | err3: | ||
| 54 | gpio_free(GPIO_NR_PALMLD_PCMCIA_RESET); | ||
| 55 | err2: | ||
| 56 | gpio_free(GPIO_NR_PALMLD_PCMCIA_POWER); | ||
| 57 | err1: | ||
| 58 | return ret; | 38 | return ret; |
| 59 | } | 39 | } |
| 60 | 40 | ||
| 61 | static void palmld_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt) | 41 | static void palmld_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt) |
| 62 | { | 42 | { |
| 63 | gpio_free(GPIO_NR_PALMLD_PCMCIA_READY); | 43 | gpio_free_array(palmld_pcmcia_gpios, ARRAY_SIZE(palmld_pcmcia_gpios)); |
| 64 | gpio_free(GPIO_NR_PALMLD_PCMCIA_RESET); | ||
| 65 | gpio_free(GPIO_NR_PALMLD_PCMCIA_POWER); | ||
| 66 | } | 44 | } |
| 67 | 45 | ||
| 68 | static void palmld_pcmcia_socket_state(struct soc_pcmcia_socket *skt, | 46 | static void palmld_pcmcia_socket_state(struct soc_pcmcia_socket *skt, |
diff --git a/drivers/pcmcia/pxa2xx_palmtc.c b/drivers/pcmcia/pxa2xx_palmtc.c index 459a232d66be..d0ad6a76bbde 100644 --- a/drivers/pcmcia/pxa2xx_palmtc.c +++ b/drivers/pcmcia/pxa2xx_palmtc.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Driver for Palm Tungsten|C PCMCIA | 4 | * Driver for Palm Tungsten|C PCMCIA |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2008 Alex Osborne <ato@meshy.org> | 6 | * Copyright (C) 2008 Alex Osborne <ato@meshy.org> |
| 7 | * Copyright (C) 2009 Marek Vasut <marek.vasut@gmail.com> | 7 | * Copyright (C) 2009-2011 Marek Vasut <marek.vasut@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
| @@ -21,79 +21,30 @@ | |||
| 21 | #include <mach/palmtc.h> | 21 | #include <mach/palmtc.h> |
| 22 | #include "soc_common.h" | 22 | #include "soc_common.h" |
| 23 | 23 | ||
| 24 | static struct gpio palmtc_pcmcia_gpios[] = { | ||
| 25 | { GPIO_NR_PALMTC_PCMCIA_POWER1, GPIOF_INIT_LOW, "PCMCIA Power 1" }, | ||
| 26 | { GPIO_NR_PALMTC_PCMCIA_POWER2, GPIOF_INIT_LOW, "PCMCIA Power 2" }, | ||
| 27 | { GPIO_NR_PALMTC_PCMCIA_POWER3, GPIOF_INIT_LOW, "PCMCIA Power 3" }, | ||
| 28 | { GPIO_NR_PALMTC_PCMCIA_RESET, GPIOF_INIT_HIGH,"PCMCIA Reset" }, | ||
| 29 | { GPIO_NR_PALMTC_PCMCIA_READY, GPIOF_IN, "PCMCIA Ready" }, | ||
| 30 | { GPIO_NR_PALMTC_PCMCIA_PWRREADY, GPIOF_IN, "PCMCIA Power Ready" }, | ||
| 31 | }; | ||
| 32 | |||
| 24 | static int palmtc_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | 33 | static int palmtc_pcmcia_hw_init(struct soc_pcmcia_socket *skt) |
| 25 | { | 34 | { |
| 26 | int ret; | 35 | int ret; |
| 27 | 36 | ||
| 28 | ret = gpio_request(GPIO_NR_PALMTC_PCMCIA_POWER1, "PCMCIA PWR1"); | 37 | ret = gpio_request_array(palmtc_pcmcia_gpios, |
| 29 | if (ret) | 38 | ARRAY_SIZE(palmtc_pcmcia_gpios)); |
| 30 | goto err1; | ||
| 31 | ret = gpio_direction_output(GPIO_NR_PALMTC_PCMCIA_POWER1, 0); | ||
| 32 | if (ret) | ||
| 33 | goto err2; | ||
| 34 | |||
| 35 | ret = gpio_request(GPIO_NR_PALMTC_PCMCIA_POWER2, "PCMCIA PWR2"); | ||
| 36 | if (ret) | ||
| 37 | goto err2; | ||
| 38 | ret = gpio_direction_output(GPIO_NR_PALMTC_PCMCIA_POWER2, 0); | ||
| 39 | if (ret) | ||
| 40 | goto err3; | ||
| 41 | |||
| 42 | ret = gpio_request(GPIO_NR_PALMTC_PCMCIA_POWER3, "PCMCIA PWR3"); | ||
| 43 | if (ret) | ||
| 44 | goto err3; | ||
| 45 | ret = gpio_direction_output(GPIO_NR_PALMTC_PCMCIA_POWER3, 0); | ||
| 46 | if (ret) | ||
| 47 | goto err4; | ||
| 48 | |||
| 49 | ret = gpio_request(GPIO_NR_PALMTC_PCMCIA_RESET, "PCMCIA RST"); | ||
| 50 | if (ret) | ||
| 51 | goto err4; | ||
| 52 | ret = gpio_direction_output(GPIO_NR_PALMTC_PCMCIA_RESET, 1); | ||
| 53 | if (ret) | ||
| 54 | goto err5; | ||
| 55 | |||
| 56 | ret = gpio_request(GPIO_NR_PALMTC_PCMCIA_READY, "PCMCIA RDY"); | ||
| 57 | if (ret) | ||
| 58 | goto err5; | ||
| 59 | ret = gpio_direction_input(GPIO_NR_PALMTC_PCMCIA_READY); | ||
| 60 | if (ret) | ||
| 61 | goto err6; | ||
| 62 | |||
| 63 | ret = gpio_request(GPIO_NR_PALMTC_PCMCIA_PWRREADY, "PCMCIA PWRRDY"); | ||
| 64 | if (ret) | ||
| 65 | goto err6; | ||
| 66 | ret = gpio_direction_input(GPIO_NR_PALMTC_PCMCIA_PWRREADY); | ||
| 67 | if (ret) | ||
| 68 | goto err7; | ||
| 69 | 39 | ||
| 70 | skt->socket.pci_irq = IRQ_GPIO(GPIO_NR_PALMTC_PCMCIA_READY); | 40 | skt->socket.pci_irq = IRQ_GPIO(GPIO_NR_PALMTC_PCMCIA_READY); |
| 71 | return 0; | ||
| 72 | 41 | ||
| 73 | err7: | ||
| 74 | gpio_free(GPIO_NR_PALMTC_PCMCIA_PWRREADY); | ||
| 75 | err6: | ||
| 76 | gpio_free(GPIO_NR_PALMTC_PCMCIA_READY); | ||
| 77 | err5: | ||
| 78 | gpio_free(GPIO_NR_PALMTC_PCMCIA_RESET); | ||
| 79 | err4: | ||
| 80 | gpio_free(GPIO_NR_PALMTC_PCMCIA_POWER3); | ||
| 81 | err3: | ||
| 82 | gpio_free(GPIO_NR_PALMTC_PCMCIA_POWER2); | ||
| 83 | err2: | ||
| 84 | gpio_free(GPIO_NR_PALMTC_PCMCIA_POWER1); | ||
| 85 | err1: | ||
| 86 | return ret; | 42 | return ret; |
| 87 | } | 43 | } |
| 88 | 44 | ||
| 89 | static void palmtc_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt) | 45 | static void palmtc_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt) |
| 90 | { | 46 | { |
| 91 | gpio_free(GPIO_NR_PALMTC_PCMCIA_PWRREADY); | 47 | gpio_free_array(palmtc_pcmcia_gpios, ARRAY_SIZE(palmtc_pcmcia_gpios)); |
| 92 | gpio_free(GPIO_NR_PALMTC_PCMCIA_READY); | ||
| 93 | gpio_free(GPIO_NR_PALMTC_PCMCIA_RESET); | ||
| 94 | gpio_free(GPIO_NR_PALMTC_PCMCIA_POWER3); | ||
| 95 | gpio_free(GPIO_NR_PALMTC_PCMCIA_POWER2); | ||
| 96 | gpio_free(GPIO_NR_PALMTC_PCMCIA_POWER1); | ||
| 97 | } | 48 | } |
| 98 | 49 | ||
| 99 | static void palmtc_pcmcia_socket_state(struct soc_pcmcia_socket *skt, | 50 | static void palmtc_pcmcia_socket_state(struct soc_pcmcia_socket *skt, |
diff --git a/drivers/pcmcia/pxa2xx_palmtx.c b/drivers/pcmcia/pxa2xx_palmtx.c index b07b247a399f..1a2580450402 100644 --- a/drivers/pcmcia/pxa2xx_palmtx.c +++ b/drivers/pcmcia/pxa2xx_palmtx.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * | 3 | * |
| 4 | * Driver for Palm T|X PCMCIA | 4 | * Driver for Palm T|X PCMCIA |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2007-2008 Marek Vasut <marek.vasut@gmail.com> | 6 | * Copyright (C) 2007-2011 Marek Vasut <marek.vasut@gmail.com> |
| 7 | * | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| @@ -13,67 +13,34 @@ | |||
| 13 | 13 | ||
| 14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
| 15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
| 16 | #include <linux/gpio.h> | ||
| 16 | 17 | ||
| 17 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
| 18 | |||
| 19 | #include <mach/gpio.h> | ||
| 20 | #include <mach/palmtx.h> | 19 | #include <mach/palmtx.h> |
| 21 | |||
| 22 | #include "soc_common.h" | 20 | #include "soc_common.h" |
| 23 | 21 | ||
| 22 | static struct gpio palmtx_pcmcia_gpios[] = { | ||
| 23 | { GPIO_NR_PALMTX_PCMCIA_POWER1, GPIOF_INIT_LOW, "PCMCIA Power 1" }, | ||
| 24 | { GPIO_NR_PALMTX_PCMCIA_POWER2, GPIOF_INIT_LOW, "PCMCIA Power 2" }, | ||
| 25 | { GPIO_NR_PALMTX_PCMCIA_RESET, GPIOF_INIT_HIGH,"PCMCIA Reset" }, | ||
| 26 | { GPIO_NR_PALMTX_PCMCIA_READY, GPIOF_IN, "PCMCIA Ready" }, | ||
| 27 | }; | ||
| 28 | |||
| 24 | static int palmtx_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | 29 | static int palmtx_pcmcia_hw_init(struct soc_pcmcia_socket *skt) |
| 25 | { | 30 | { |
| 26 | int ret; | 31 | int ret; |
| 27 | 32 | ||
| 28 | ret = gpio_request(GPIO_NR_PALMTX_PCMCIA_POWER1, "PCMCIA PWR1"); | 33 | ret = gpio_request_array(palmtx_pcmcia_gpios, |
| 29 | if (ret) | 34 | ARRAY_SIZE(palmtx_pcmcia_gpios)); |
| 30 | goto err1; | ||
| 31 | ret = gpio_direction_output(GPIO_NR_PALMTX_PCMCIA_POWER1, 0); | ||
| 32 | if (ret) | ||
| 33 | goto err2; | ||
| 34 | |||
| 35 | ret = gpio_request(GPIO_NR_PALMTX_PCMCIA_POWER2, "PCMCIA PWR2"); | ||
| 36 | if (ret) | ||
| 37 | goto err2; | ||
| 38 | ret = gpio_direction_output(GPIO_NR_PALMTX_PCMCIA_POWER2, 0); | ||
| 39 | if (ret) | ||
| 40 | goto err3; | ||
| 41 | |||
| 42 | ret = gpio_request(GPIO_NR_PALMTX_PCMCIA_RESET, "PCMCIA RST"); | ||
| 43 | if (ret) | ||
| 44 | goto err3; | ||
| 45 | ret = gpio_direction_output(GPIO_NR_PALMTX_PCMCIA_RESET, 1); | ||
| 46 | if (ret) | ||
| 47 | goto err4; | ||
| 48 | |||
| 49 | ret = gpio_request(GPIO_NR_PALMTX_PCMCIA_READY, "PCMCIA RDY"); | ||
| 50 | if (ret) | ||
| 51 | goto err4; | ||
| 52 | ret = gpio_direction_input(GPIO_NR_PALMTX_PCMCIA_READY); | ||
| 53 | if (ret) | ||
| 54 | goto err5; | ||
| 55 | 35 | ||
| 56 | skt->socket.pci_irq = gpio_to_irq(GPIO_NR_PALMTX_PCMCIA_READY); | 36 | skt->socket.pci_irq = gpio_to_irq(GPIO_NR_PALMTX_PCMCIA_READY); |
| 57 | return 0; | ||
| 58 | 37 | ||
| 59 | err5: | ||
| 60 | gpio_free(GPIO_NR_PALMTX_PCMCIA_READY); | ||
| 61 | err4: | ||
| 62 | gpio_free(GPIO_NR_PALMTX_PCMCIA_RESET); | ||
| 63 | err3: | ||
| 64 | gpio_free(GPIO_NR_PALMTX_PCMCIA_POWER2); | ||
| 65 | err2: | ||
| 66 | gpio_free(GPIO_NR_PALMTX_PCMCIA_POWER1); | ||
| 67 | err1: | ||
| 68 | return ret; | 38 | return ret; |
| 69 | } | 39 | } |
| 70 | 40 | ||
| 71 | static void palmtx_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt) | 41 | static void palmtx_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt) |
| 72 | { | 42 | { |
| 73 | gpio_free(GPIO_NR_PALMTX_PCMCIA_READY); | 43 | gpio_free_array(palmtx_pcmcia_gpios, ARRAY_SIZE(palmtx_pcmcia_gpios)); |
| 74 | gpio_free(GPIO_NR_PALMTX_PCMCIA_RESET); | ||
| 75 | gpio_free(GPIO_NR_PALMTX_PCMCIA_POWER2); | ||
| 76 | gpio_free(GPIO_NR_PALMTX_PCMCIA_POWER1); | ||
| 77 | } | 44 | } |
| 78 | 45 | ||
| 79 | static void palmtx_pcmcia_socket_state(struct soc_pcmcia_socket *skt, | 46 | static void palmtx_pcmcia_socket_state(struct soc_pcmcia_socket *skt, |
diff --git a/drivers/pcmcia/pxa2xx_trizeps4.c b/drivers/pcmcia/pxa2xx_trizeps4.c index b7e596620db1..b829e655457b 100644 --- a/drivers/pcmcia/pxa2xx_trizeps4.c +++ b/drivers/pcmcia/pxa2xx_trizeps4.c | |||
| @@ -69,15 +69,15 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | |||
| 69 | for (i = 0; i < ARRAY_SIZE(irqs); i++) { | 69 | for (i = 0; i < ARRAY_SIZE(irqs); i++) { |
| 70 | if (irqs[i].sock != skt->nr) | 70 | if (irqs[i].sock != skt->nr) |
| 71 | continue; | 71 | continue; |
| 72 | if (gpio_request(IRQ_TO_GPIO(irqs[i].irq), irqs[i].str) < 0) { | 72 | if (gpio_request(irq_to_gpio(irqs[i].irq), irqs[i].str) < 0) { |
| 73 | pr_err("%s: sock %d unable to request gpio %d\n", | 73 | pr_err("%s: sock %d unable to request gpio %d\n", |
| 74 | __func__, skt->nr, IRQ_TO_GPIO(irqs[i].irq)); | 74 | __func__, skt->nr, irq_to_gpio(irqs[i].irq)); |
| 75 | ret = -EBUSY; | 75 | ret = -EBUSY; |
| 76 | goto error; | 76 | goto error; |
| 77 | } | 77 | } |
| 78 | if (gpio_direction_input(IRQ_TO_GPIO(irqs[i].irq)) < 0) { | 78 | if (gpio_direction_input(irq_to_gpio(irqs[i].irq)) < 0) { |
| 79 | pr_err("%s: sock %d unable to set input gpio %d\n", | 79 | pr_err("%s: sock %d unable to set input gpio %d\n", |
| 80 | __func__, skt->nr, IRQ_TO_GPIO(irqs[i].irq)); | 80 | __func__, skt->nr, irq_to_gpio(irqs[i].irq)); |
| 81 | ret = -EINVAL; | 81 | ret = -EINVAL; |
| 82 | goto error; | 82 | goto error; |
| 83 | } | 83 | } |
| @@ -86,7 +86,7 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | |||
| 86 | 86 | ||
| 87 | error: | 87 | error: |
| 88 | for (; i >= 0; i--) { | 88 | for (; i >= 0; i--) { |
| 89 | gpio_free(IRQ_TO_GPIO(irqs[i].irq)); | 89 | gpio_free(irq_to_gpio(irqs[i].irq)); |
| 90 | } | 90 | } |
| 91 | return (ret); | 91 | return (ret); |
| 92 | } | 92 | } |
| @@ -97,7 +97,7 @@ static void trizeps_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt) | |||
| 97 | /* free allocated gpio's */ | 97 | /* free allocated gpio's */ |
| 98 | gpio_free(GPIO_PRDY); | 98 | gpio_free(GPIO_PRDY); |
| 99 | for (i = 0; i < ARRAY_SIZE(irqs); i++) | 99 | for (i = 0; i < ARRAY_SIZE(irqs); i++) |
| 100 | gpio_free(IRQ_TO_GPIO(irqs[i].irq)); | 100 | gpio_free(irq_to_gpio(irqs[i].irq)); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | static unsigned long trizeps_pcmcia_status[2]; | 103 | static unsigned long trizeps_pcmcia_status[2]; |
| @@ -226,6 +226,9 @@ static int __init trizeps_pcmcia_init(void) | |||
| 226 | { | 226 | { |
| 227 | int ret; | 227 | int ret; |
| 228 | 228 | ||
| 229 | if (!machine_is_trizeps4() && !machine_is_trizeps4wl()) | ||
| 230 | return -ENODEV; | ||
| 231 | |||
| 229 | trizeps_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1); | 232 | trizeps_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1); |
| 230 | if (!trizeps_pcmcia_device) | 233 | if (!trizeps_pcmcia_device) |
| 231 | return -ENOMEM; | 234 | return -ENOMEM; |
diff --git a/drivers/pcmcia/pxa2xx_vpac270.c b/drivers/pcmcia/pxa2xx_vpac270.c index 55627eccee8e..435002dfc3ca 100644 --- a/drivers/pcmcia/pxa2xx_vpac270.c +++ b/drivers/pcmcia/pxa2xx_vpac270.c | |||
| @@ -3,8 +3,7 @@ | |||
| 3 | * | 3 | * |
| 4 | * Driver for Voipac PXA270 PCMCIA and CF sockets | 4 | * Driver for Voipac PXA270 PCMCIA and CF sockets |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2010 | 6 | * Copyright (C) 2010-2011 Marek Vasut <marek.vasut@gmail.com> |
| 7 | * Marek Vasut <marek.vasut@gmail.com> | ||
| 8 | * | 7 | * |
| 9 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| @@ -22,6 +21,19 @@ | |||
| 22 | 21 | ||
| 23 | #include "soc_common.h" | 22 | #include "soc_common.h" |
| 24 | 23 | ||
| 24 | static struct gpio vpac270_pcmcia_gpios[] = { | ||
| 25 | { GPIO84_VPAC270_PCMCIA_CD, GPIOF_IN, "PCMCIA Card Detect" }, | ||
| 26 | { GPIO35_VPAC270_PCMCIA_RDY, GPIOF_IN, "PCMCIA Ready" }, | ||
| 27 | { GPIO107_VPAC270_PCMCIA_PPEN, GPIOF_INIT_LOW, "PCMCIA PPEN" }, | ||
| 28 | { GPIO11_VPAC270_PCMCIA_RESET, GPIOF_INIT_LOW, "PCMCIA Reset" }, | ||
| 29 | }; | ||
| 30 | |||
| 31 | static struct gpio vpac270_cf_gpios[] = { | ||
| 32 | { GPIO17_VPAC270_CF_CD, GPIOF_IN, "CF Card Detect" }, | ||
| 33 | { GPIO12_VPAC270_CF_RDY, GPIOF_IN, "CF Ready" }, | ||
| 34 | { GPIO16_VPAC270_CF_RESET, GPIOF_INIT_LOW, "CF Reset" }, | ||
| 35 | }; | ||
| 36 | |||
| 25 | static struct pcmcia_irqs cd_irqs[] = { | 37 | static struct pcmcia_irqs cd_irqs[] = { |
| 26 | { | 38 | { |
| 27 | .sock = 0, | 39 | .sock = 0, |
| @@ -40,96 +52,34 @@ static int vpac270_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | |||
| 40 | int ret; | 52 | int ret; |
| 41 | 53 | ||
| 42 | if (skt->nr == 0) { | 54 | if (skt->nr == 0) { |
| 43 | ret = gpio_request(GPIO84_VPAC270_PCMCIA_CD, "PCMCIA CD"); | 55 | ret = gpio_request_array(vpac270_pcmcia_gpios, |
| 44 | if (ret) | 56 | ARRAY_SIZE(vpac270_pcmcia_gpios)); |
| 45 | goto err1; | ||
| 46 | ret = gpio_direction_input(GPIO84_VPAC270_PCMCIA_CD); | ||
| 47 | if (ret) | ||
| 48 | goto err2; | ||
| 49 | |||
| 50 | ret = gpio_request(GPIO35_VPAC270_PCMCIA_RDY, "PCMCIA RDY"); | ||
| 51 | if (ret) | ||
| 52 | goto err2; | ||
| 53 | ret = gpio_direction_input(GPIO35_VPAC270_PCMCIA_RDY); | ||
| 54 | if (ret) | ||
| 55 | goto err3; | ||
| 56 | |||
| 57 | ret = gpio_request(GPIO107_VPAC270_PCMCIA_PPEN, "PCMCIA PPEN"); | ||
| 58 | if (ret) | ||
| 59 | goto err3; | ||
| 60 | ret = gpio_direction_output(GPIO107_VPAC270_PCMCIA_PPEN, 0); | ||
| 61 | if (ret) | ||
| 62 | goto err4; | ||
| 63 | |||
| 64 | ret = gpio_request(GPIO11_VPAC270_PCMCIA_RESET, "PCMCIA RESET"); | ||
| 65 | if (ret) | ||
| 66 | goto err4; | ||
| 67 | ret = gpio_direction_output(GPIO11_VPAC270_PCMCIA_RESET, 0); | ||
| 68 | if (ret) | ||
| 69 | goto err5; | ||
| 70 | 57 | ||
| 71 | skt->socket.pci_irq = gpio_to_irq(GPIO35_VPAC270_PCMCIA_RDY); | 58 | skt->socket.pci_irq = gpio_to_irq(GPIO35_VPAC270_PCMCIA_RDY); |
| 72 | 59 | ||
| 73 | return soc_pcmcia_request_irqs(skt, &cd_irqs[0], 1); | 60 | if (!ret) |
| 74 | 61 | ret = soc_pcmcia_request_irqs(skt, &cd_irqs[0], 1); | |
| 75 | err5: | ||
| 76 | gpio_free(GPIO11_VPAC270_PCMCIA_RESET); | ||
| 77 | err4: | ||
| 78 | gpio_free(GPIO107_VPAC270_PCMCIA_PPEN); | ||
| 79 | err3: | ||
| 80 | gpio_free(GPIO35_VPAC270_PCMCIA_RDY); | ||
| 81 | err2: | ||
| 82 | gpio_free(GPIO84_VPAC270_PCMCIA_CD); | ||
| 83 | err1: | ||
| 84 | return ret; | ||
| 85 | |||
| 86 | } else { | 62 | } else { |
| 87 | ret = gpio_request(GPIO17_VPAC270_CF_CD, "CF CD"); | 63 | ret = gpio_request_array(vpac270_cf_gpios, |
| 88 | if (ret) | 64 | ARRAY_SIZE(vpac270_cf_gpios)); |
| 89 | goto err6; | ||
| 90 | ret = gpio_direction_input(GPIO17_VPAC270_CF_CD); | ||
| 91 | if (ret) | ||
| 92 | goto err7; | ||
| 93 | |||
| 94 | ret = gpio_request(GPIO12_VPAC270_CF_RDY, "CF RDY"); | ||
| 95 | if (ret) | ||
| 96 | goto err7; | ||
| 97 | ret = gpio_direction_input(GPIO12_VPAC270_CF_RDY); | ||
| 98 | if (ret) | ||
| 99 | goto err8; | ||
| 100 | |||
| 101 | ret = gpio_request(GPIO16_VPAC270_CF_RESET, "CF RESET"); | ||
| 102 | if (ret) | ||
| 103 | goto err8; | ||
| 104 | ret = gpio_direction_output(GPIO16_VPAC270_CF_RESET, 0); | ||
| 105 | if (ret) | ||
| 106 | goto err9; | ||
| 107 | 65 | ||
| 108 | skt->socket.pci_irq = gpio_to_irq(GPIO12_VPAC270_CF_RDY); | 66 | skt->socket.pci_irq = gpio_to_irq(GPIO12_VPAC270_CF_RDY); |
| 109 | 67 | ||
| 110 | return soc_pcmcia_request_irqs(skt, &cd_irqs[1], 1); | 68 | if (!ret) |
| 111 | 69 | ret = soc_pcmcia_request_irqs(skt, &cd_irqs[1], 1); | |
| 112 | err9: | ||
| 113 | gpio_free(GPIO16_VPAC270_CF_RESET); | ||
| 114 | err8: | ||
| 115 | gpio_free(GPIO12_VPAC270_CF_RDY); | ||
| 116 | err7: | ||
| 117 | gpio_free(GPIO17_VPAC270_CF_CD); | ||
| 118 | err6: | ||
| 119 | return ret; | ||
| 120 | |||
| 121 | } | 70 | } |
| 71 | |||
| 72 | return ret; | ||
| 122 | } | 73 | } |
| 123 | 74 | ||
| 124 | static void vpac270_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt) | 75 | static void vpac270_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt) |
| 125 | { | 76 | { |
| 126 | gpio_free(GPIO11_VPAC270_PCMCIA_RESET); | 77 | if (skt->nr == 0) |
| 127 | gpio_free(GPIO107_VPAC270_PCMCIA_PPEN); | 78 | gpio_request_array(vpac270_pcmcia_gpios, |
| 128 | gpio_free(GPIO35_VPAC270_PCMCIA_RDY); | 79 | ARRAY_SIZE(vpac270_pcmcia_gpios)); |
| 129 | gpio_free(GPIO84_VPAC270_PCMCIA_CD); | 80 | else |
| 130 | gpio_free(GPIO16_VPAC270_CF_RESET); | 81 | gpio_request_array(vpac270_cf_gpios, |
| 131 | gpio_free(GPIO12_VPAC270_CF_RDY); | 82 | ARRAY_SIZE(vpac270_cf_gpios)); |
| 132 | gpio_free(GPIO17_VPAC270_CF_CD); | ||
| 133 | } | 83 | } |
| 134 | 84 | ||
| 135 | static void vpac270_pcmcia_socket_state(struct soc_pcmcia_socket *skt, | 85 | static void vpac270_pcmcia_socket_state(struct soc_pcmcia_socket *skt, |
diff --git a/drivers/pcmcia/ti113x.h b/drivers/pcmcia/ti113x.h index 9ffa97d0b16c..a71789486cdf 100644 --- a/drivers/pcmcia/ti113x.h +++ b/drivers/pcmcia/ti113x.h | |||
| @@ -691,7 +691,7 @@ static int ti12xx_2nd_slot_empty(struct yenta_socket *socket) | |||
| 691 | /* | 691 | /* |
| 692 | * those are either single or dual slot CB with additional functions | 692 | * those are either single or dual slot CB with additional functions |
| 693 | * like 1394, smartcard reader, etc. check the TIEALL flag for them | 693 | * like 1394, smartcard reader, etc. check the TIEALL flag for them |
| 694 | * the TIEALL flag binds the IRQ of all functions toghether. | 694 | * the TIEALL flag binds the IRQ of all functions together. |
| 695 | * we catch the single slot variants later. | 695 | * we catch the single slot variants later. |
| 696 | */ | 696 | */ |
| 697 | sysctl = config_readl(socket, TI113X_SYSTEM_CONTROL); | 697 | sysctl = config_readl(socket, TI113X_SYSTEM_CONTROL); |
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index 2ee442c2a5db..0485e394712a 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig | |||
| @@ -187,7 +187,8 @@ config MSI_LAPTOP | |||
| 187 | depends on ACPI | 187 | depends on ACPI |
| 188 | depends on BACKLIGHT_CLASS_DEVICE | 188 | depends on BACKLIGHT_CLASS_DEVICE |
| 189 | depends on RFKILL | 189 | depends on RFKILL |
| 190 | depends on SERIO_I8042 | 190 | depends on INPUT && SERIO_I8042 |
| 191 | select INPUT_SPARSEKMAP | ||
| 191 | ---help--- | 192 | ---help--- |
| 192 | This is a driver for laptops built by MSI (MICRO-STAR | 193 | This is a driver for laptops built by MSI (MICRO-STAR |
| 193 | INTERNATIONAL): | 194 | INTERNATIONAL): |
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 5ea6c3477d17..ac4e7f83ce6c 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c | |||
| @@ -89,7 +89,7 @@ MODULE_LICENSE("GPL"); | |||
| 89 | #define ACERWMID_EVENT_GUID "676AA15E-6A47-4D9F-A2CC-1E6D18D14026" | 89 | #define ACERWMID_EVENT_GUID "676AA15E-6A47-4D9F-A2CC-1E6D18D14026" |
| 90 | 90 | ||
| 91 | MODULE_ALIAS("wmi:67C3371D-95A3-4C37-BB61-DD47B491DAAB"); | 91 | MODULE_ALIAS("wmi:67C3371D-95A3-4C37-BB61-DD47B491DAAB"); |
| 92 | MODULE_ALIAS("wmi:6AF4F258-B401-42Fd-BE91-3D4AC2D7C0D3"); | 92 | MODULE_ALIAS("wmi:6AF4F258-B401-42FD-BE91-3D4AC2D7C0D3"); |
| 93 | MODULE_ALIAS("wmi:676AA15E-6A47-4D9F-A2CC-1E6D18D14026"); | 93 | MODULE_ALIAS("wmi:676AA15E-6A47-4D9F-A2CC-1E6D18D14026"); |
| 94 | 94 | ||
| 95 | enum acer_wmi_event_ids { | 95 | enum acer_wmi_event_ids { |
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index efc776cb0c66..832a3fd7c1c8 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c | |||
| @@ -201,8 +201,8 @@ static int asus_wmi_input_init(struct asus_wmi *asus) | |||
| 201 | if (!asus->inputdev) | 201 | if (!asus->inputdev) |
| 202 | return -ENOMEM; | 202 | return -ENOMEM; |
| 203 | 203 | ||
| 204 | asus->inputdev->name = asus->driver->input_phys; | 204 | asus->inputdev->name = asus->driver->input_name; |
| 205 | asus->inputdev->phys = asus->driver->input_name; | 205 | asus->inputdev->phys = asus->driver->input_phys; |
| 206 | asus->inputdev->id.bustype = BUS_HOST; | 206 | asus->inputdev->id.bustype = BUS_HOST; |
| 207 | asus->inputdev->dev.parent = &asus->platform_device->dev; | 207 | asus->inputdev->dev.parent = &asus->platform_device->dev; |
| 208 | 208 | ||
diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c index 0ddc434fb93b..649dcadd8ea3 100644 --- a/drivers/platform/x86/eeepc-wmi.c +++ b/drivers/platform/x86/eeepc-wmi.c | |||
| @@ -67,9 +67,11 @@ static const struct key_entry eeepc_wmi_keymap[] = { | |||
| 67 | { KE_KEY, 0x82, { KEY_CAMERA } }, | 67 | { KE_KEY, 0x82, { KEY_CAMERA } }, |
| 68 | { KE_KEY, 0x83, { KEY_CAMERA_ZOOMIN } }, | 68 | { KE_KEY, 0x83, { KEY_CAMERA_ZOOMIN } }, |
| 69 | { KE_KEY, 0x88, { KEY_WLAN } }, | 69 | { KE_KEY, 0x88, { KEY_WLAN } }, |
| 70 | { KE_KEY, 0xbd, { KEY_CAMERA } }, | ||
| 70 | { KE_KEY, 0xcc, { KEY_SWITCHVIDEOMODE } }, | 71 | { KE_KEY, 0xcc, { KEY_SWITCHVIDEOMODE } }, |
| 71 | { KE_KEY, 0xe0, { KEY_PROG1 } }, /* Task Manager */ | 72 | { KE_KEY, 0xe0, { KEY_PROG1 } }, /* Task Manager */ |
| 72 | { KE_KEY, 0xe1, { KEY_F14 } }, /* Change Resolution */ | 73 | { KE_KEY, 0xe1, { KEY_F14 } }, /* Change Resolution */ |
| 74 | { KE_KEY, 0xe8, { KEY_SCREENLOCK } }, | ||
| 73 | { KE_KEY, 0xe9, { KEY_BRIGHTNESS_ZERO } }, | 75 | { KE_KEY, 0xe9, { KEY_BRIGHTNESS_ZERO } }, |
| 74 | { KE_KEY, 0xeb, { KEY_CAMERA_ZOOMOUT } }, | 76 | { KE_KEY, 0xeb, { KEY_CAMERA_ZOOMOUT } }, |
| 75 | { KE_KEY, 0xec, { KEY_CAMERA_UP } }, | 77 | { KE_KEY, 0xec, { KEY_CAMERA_UP } }, |
diff --git a/drivers/platform/x86/intel_mid_thermal.c b/drivers/platform/x86/intel_mid_thermal.c index 6c12db503161..c2f4bd8013b5 100644 --- a/drivers/platform/x86/intel_mid_thermal.c +++ b/drivers/platform/x86/intel_mid_thermal.c | |||
| @@ -202,7 +202,7 @@ static int mid_read_temp(struct thermal_zone_device *tzd, unsigned long *temp) | |||
| 202 | if (ret) | 202 | if (ret) |
| 203 | return ret; | 203 | return ret; |
| 204 | 204 | ||
| 205 | /* Shift bits to accomodate the lower two data bits */ | 205 | /* Shift bits to accommodate the lower two data bits */ |
| 206 | adc_val = (data << 2); | 206 | adc_val = (data << 2); |
| 207 | addr++; | 207 | addr++; |
| 208 | 208 | ||
diff --git a/drivers/platform/x86/intel_pmic_gpio.c b/drivers/platform/x86/intel_pmic_gpio.c index d653104b59cb..464bb3fc4d88 100644 --- a/drivers/platform/x86/intel_pmic_gpio.c +++ b/drivers/platform/x86/intel_pmic_gpio.c | |||
| @@ -74,6 +74,19 @@ struct pmic_gpio { | |||
| 74 | u32 trigger_type; | 74 | u32 trigger_type; |
| 75 | }; | 75 | }; |
| 76 | 76 | ||
| 77 | static void pmic_program_irqtype(int gpio, int type) | ||
| 78 | { | ||
| 79 | if (type & IRQ_TYPE_EDGE_RISING) | ||
| 80 | intel_scu_ipc_update_register(GPIO0 + gpio, 0x20, 0x20); | ||
| 81 | else | ||
| 82 | intel_scu_ipc_update_register(GPIO0 + gpio, 0x00, 0x20); | ||
| 83 | |||
| 84 | if (type & IRQ_TYPE_EDGE_FALLING) | ||
| 85 | intel_scu_ipc_update_register(GPIO0 + gpio, 0x10, 0x10); | ||
| 86 | else | ||
| 87 | intel_scu_ipc_update_register(GPIO0 + gpio, 0x00, 0x10); | ||
| 88 | }; | ||
| 89 | |||
| 77 | static int pmic_gpio_direction_input(struct gpio_chip *chip, unsigned offset) | 90 | static int pmic_gpio_direction_input(struct gpio_chip *chip, unsigned offset) |
| 78 | { | 91 | { |
| 79 | if (offset > 8) { | 92 | if (offset > 8) { |
| @@ -166,16 +179,38 @@ static int pmic_gpio_to_irq(struct gpio_chip *chip, unsigned offset) | |||
| 166 | return pg->irq_base + offset; | 179 | return pg->irq_base + offset; |
| 167 | } | 180 | } |
| 168 | 181 | ||
| 182 | static void pmic_bus_lock(struct irq_data *data) | ||
| 183 | { | ||
| 184 | struct pmic_gpio *pg = irq_data_get_irq_chip_data(data); | ||
| 185 | |||
| 186 | mutex_lock(&pg->buslock); | ||
| 187 | } | ||
| 188 | |||
| 189 | static void pmic_bus_sync_unlock(struct irq_data *data) | ||
| 190 | { | ||
| 191 | struct pmic_gpio *pg = irq_data_get_irq_chip_data(data); | ||
| 192 | |||
| 193 | if (pg->update_type) { | ||
| 194 | unsigned int gpio = pg->update_type & ~GPIO_UPDATE_TYPE; | ||
| 195 | |||
| 196 | pmic_program_irqtype(gpio, pg->trigger_type); | ||
| 197 | pg->update_type = 0; | ||
| 198 | } | ||
| 199 | mutex_unlock(&pg->buslock); | ||
| 200 | } | ||
| 201 | |||
| 169 | /* the gpiointr register is read-clear, so just do nothing. */ | 202 | /* the gpiointr register is read-clear, so just do nothing. */ |
| 170 | static void pmic_irq_unmask(struct irq_data *data) { } | 203 | static void pmic_irq_unmask(struct irq_data *data) { } |
| 171 | 204 | ||
| 172 | static void pmic_irq_mask(struct irq_data *data) { } | 205 | static void pmic_irq_mask(struct irq_data *data) { } |
| 173 | 206 | ||
| 174 | static struct irq_chip pmic_irqchip = { | 207 | static struct irq_chip pmic_irqchip = { |
| 175 | .name = "PMIC-GPIO", | 208 | .name = "PMIC-GPIO", |
| 176 | .irq_mask = pmic_irq_mask, | 209 | .irq_mask = pmic_irq_mask, |
| 177 | .irq_unmask = pmic_irq_unmask, | 210 | .irq_unmask = pmic_irq_unmask, |
| 178 | .irq_set_type = pmic_irq_type, | 211 | .irq_set_type = pmic_irq_type, |
| 212 | .irq_bus_lock = pmic_bus_lock, | ||
| 213 | .irq_bus_sync_unlock = pmic_bus_sync_unlock, | ||
| 179 | }; | 214 | }; |
| 180 | 215 | ||
| 181 | static irqreturn_t pmic_irq_handler(int irq, void *data) | 216 | static irqreturn_t pmic_irq_handler(int irq, void *data) |
diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c index de434c6dc2d6..d347116d150e 100644 --- a/drivers/platform/x86/samsung-laptop.c +++ b/drivers/platform/x86/samsung-laptop.c | |||
| @@ -571,6 +571,16 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = { | |||
| 571 | .callback = dmi_check_cb, | 571 | .callback = dmi_check_cb, |
| 572 | }, | 572 | }, |
| 573 | { | 573 | { |
| 574 | .ident = "R410 Plus", | ||
| 575 | .matches = { | ||
| 576 | DMI_MATCH(DMI_SYS_VENDOR, | ||
| 577 | "SAMSUNG ELECTRONICS CO., LTD."), | ||
| 578 | DMI_MATCH(DMI_PRODUCT_NAME, "R410P"), | ||
| 579 | DMI_MATCH(DMI_BOARD_NAME, "R460"), | ||
| 580 | }, | ||
| 581 | .callback = dmi_check_cb, | ||
| 582 | }, | ||
| 583 | { | ||
| 574 | .ident = "R518", | 584 | .ident = "R518", |
| 575 | .matches = { | 585 | .matches = { |
| 576 | DMI_MATCH(DMI_SYS_VENDOR, | 586 | DMI_MATCH(DMI_SYS_VENDOR, |
| @@ -591,12 +601,12 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = { | |||
| 591 | .callback = dmi_check_cb, | 601 | .callback = dmi_check_cb, |
| 592 | }, | 602 | }, |
| 593 | { | 603 | { |
| 594 | .ident = "N150/N210/N220", | 604 | .ident = "N150/N210/N220/N230", |
| 595 | .matches = { | 605 | .matches = { |
| 596 | DMI_MATCH(DMI_SYS_VENDOR, | 606 | DMI_MATCH(DMI_SYS_VENDOR, |
| 597 | "SAMSUNG ELECTRONICS CO., LTD."), | 607 | "SAMSUNG ELECTRONICS CO., LTD."), |
| 598 | DMI_MATCH(DMI_PRODUCT_NAME, "N150/N210/N220"), | 608 | DMI_MATCH(DMI_PRODUCT_NAME, "N150/N210/N220/N230"), |
| 599 | DMI_MATCH(DMI_BOARD_NAME, "N150/N210/N220"), | 609 | DMI_MATCH(DMI_BOARD_NAME, "N150/N210/N220/N230"), |
| 600 | }, | 610 | }, |
| 601 | .callback = dmi_check_cb, | 611 | .callback = dmi_check_cb, |
| 602 | }, | 612 | }, |
| @@ -771,6 +781,7 @@ static int __init samsung_init(void) | |||
| 771 | 781 | ||
| 772 | /* create a backlight device to talk to this one */ | 782 | /* create a backlight device to talk to this one */ |
| 773 | memset(&props, 0, sizeof(struct backlight_properties)); | 783 | memset(&props, 0, sizeof(struct backlight_properties)); |
| 784 | props.type = BACKLIGHT_PLATFORM; | ||
| 774 | props.max_brightness = sabi_config->max_brightness; | 785 | props.max_brightness = sabi_config->max_brightness; |
| 775 | backlight_device = backlight_device_register("samsung", &sdev->dev, | 786 | backlight_device = backlight_device_register("samsung", &sdev->dev, |
| 776 | NULL, &backlight_ops, | 787 | NULL, &backlight_ops, |
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index e642f5f29504..8f709aec4da0 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c | |||
| @@ -138,6 +138,8 @@ MODULE_PARM_DESC(kbd_backlight_timeout, | |||
| 138 | "1 for 30 seconds, 2 for 60 seconds and 3 to disable timeout " | 138 | "1 for 30 seconds, 2 for 60 seconds and 3 to disable timeout " |
| 139 | "(default: 0)"); | 139 | "(default: 0)"); |
| 140 | 140 | ||
| 141 | static void sony_nc_kbd_backlight_resume(void); | ||
| 142 | |||
| 141 | enum sony_nc_rfkill { | 143 | enum sony_nc_rfkill { |
| 142 | SONY_WIFI, | 144 | SONY_WIFI, |
| 143 | SONY_BLUETOOTH, | 145 | SONY_BLUETOOTH, |
| @@ -771,11 +773,6 @@ static int sony_nc_handles_setup(struct platform_device *pd) | |||
| 771 | if (!handles) | 773 | if (!handles) |
| 772 | return -ENOMEM; | 774 | return -ENOMEM; |
| 773 | 775 | ||
| 774 | sysfs_attr_init(&handles->devattr.attr); | ||
| 775 | handles->devattr.attr.name = "handles"; | ||
| 776 | handles->devattr.attr.mode = S_IRUGO; | ||
| 777 | handles->devattr.show = sony_nc_handles_show; | ||
| 778 | |||
| 779 | for (i = 0; i < ARRAY_SIZE(handles->cap); i++) { | 776 | for (i = 0; i < ARRAY_SIZE(handles->cap); i++) { |
| 780 | if (!acpi_callsetfunc(sony_nc_acpi_handle, | 777 | if (!acpi_callsetfunc(sony_nc_acpi_handle, |
| 781 | "SN00", i + 0x20, &result)) { | 778 | "SN00", i + 0x20, &result)) { |
| @@ -785,11 +782,18 @@ static int sony_nc_handles_setup(struct platform_device *pd) | |||
| 785 | } | 782 | } |
| 786 | } | 783 | } |
| 787 | 784 | ||
| 788 | /* allow reading capabilities via sysfs */ | 785 | if (debug) { |
| 789 | if (device_create_file(&pd->dev, &handles->devattr)) { | 786 | sysfs_attr_init(&handles->devattr.attr); |
| 790 | kfree(handles); | 787 | handles->devattr.attr.name = "handles"; |
| 791 | handles = NULL; | 788 | handles->devattr.attr.mode = S_IRUGO; |
| 792 | return -1; | 789 | handles->devattr.show = sony_nc_handles_show; |
| 790 | |||
| 791 | /* allow reading capabilities via sysfs */ | ||
| 792 | if (device_create_file(&pd->dev, &handles->devattr)) { | ||
| 793 | kfree(handles); | ||
| 794 | handles = NULL; | ||
| 795 | return -1; | ||
| 796 | } | ||
| 793 | } | 797 | } |
| 794 | 798 | ||
| 795 | return 0; | 799 | return 0; |
| @@ -798,7 +802,8 @@ static int sony_nc_handles_setup(struct platform_device *pd) | |||
| 798 | static int sony_nc_handles_cleanup(struct platform_device *pd) | 802 | static int sony_nc_handles_cleanup(struct platform_device *pd) |
| 799 | { | 803 | { |
| 800 | if (handles) { | 804 | if (handles) { |
| 801 | device_remove_file(&pd->dev, &handles->devattr); | 805 | if (debug) |
| 806 | device_remove_file(&pd->dev, &handles->devattr); | ||
| 802 | kfree(handles); | 807 | kfree(handles); |
| 803 | handles = NULL; | 808 | handles = NULL; |
| 804 | } | 809 | } |
| @@ -808,6 +813,11 @@ static int sony_nc_handles_cleanup(struct platform_device *pd) | |||
| 808 | static int sony_find_snc_handle(int handle) | 813 | static int sony_find_snc_handle(int handle) |
| 809 | { | 814 | { |
| 810 | int i; | 815 | int i; |
| 816 | |||
| 817 | /* not initialized yet, return early */ | ||
| 818 | if (!handles) | ||
| 819 | return -1; | ||
| 820 | |||
| 811 | for (i = 0; i < 0x10; i++) { | 821 | for (i = 0; i < 0x10; i++) { |
| 812 | if (handles->cap[i] == handle) { | 822 | if (handles->cap[i] == handle) { |
| 813 | dprintk("found handle 0x%.4x (offset: 0x%.2x)\n", | 823 | dprintk("found handle 0x%.4x (offset: 0x%.2x)\n", |
| @@ -1168,6 +1178,9 @@ static int sony_nc_resume(struct acpi_device *device) | |||
| 1168 | /* re-read rfkill state */ | 1178 | /* re-read rfkill state */ |
| 1169 | sony_nc_rfkill_update(); | 1179 | sony_nc_rfkill_update(); |
| 1170 | 1180 | ||
| 1181 | /* restore kbd backlight states */ | ||
| 1182 | sony_nc_kbd_backlight_resume(); | ||
| 1183 | |||
| 1171 | return 0; | 1184 | return 0; |
| 1172 | } | 1185 | } |
| 1173 | 1186 | ||
| @@ -1355,6 +1368,7 @@ out_no_enum: | |||
| 1355 | #define KBDBL_HANDLER 0x137 | 1368 | #define KBDBL_HANDLER 0x137 |
| 1356 | #define KBDBL_PRESENT 0xB00 | 1369 | #define KBDBL_PRESENT 0xB00 |
| 1357 | #define SET_MODE 0xC00 | 1370 | #define SET_MODE 0xC00 |
| 1371 | #define SET_STATE 0xD00 | ||
| 1358 | #define SET_TIMEOUT 0xE00 | 1372 | #define SET_TIMEOUT 0xE00 |
| 1359 | 1373 | ||
| 1360 | struct kbd_backlight { | 1374 | struct kbd_backlight { |
| @@ -1377,6 +1391,10 @@ static ssize_t __sony_nc_kbd_backlight_mode_set(u8 value) | |||
| 1377 | (value << 0x10) | SET_MODE, &result)) | 1391 | (value << 0x10) | SET_MODE, &result)) |
| 1378 | return -EIO; | 1392 | return -EIO; |
| 1379 | 1393 | ||
| 1394 | /* Try to turn the light on/off immediately */ | ||
| 1395 | sony_call_snc_handle(KBDBL_HANDLER, (value << 0x10) | SET_STATE, | ||
| 1396 | &result); | ||
| 1397 | |||
| 1380 | kbdbl_handle->mode = value; | 1398 | kbdbl_handle->mode = value; |
| 1381 | 1399 | ||
| 1382 | return 0; | 1400 | return 0; |
| @@ -1458,7 +1476,7 @@ static int sony_nc_kbd_backlight_setup(struct platform_device *pd) | |||
| 1458 | { | 1476 | { |
| 1459 | int result; | 1477 | int result; |
| 1460 | 1478 | ||
| 1461 | if (sony_call_snc_handle(0x137, KBDBL_PRESENT, &result)) | 1479 | if (sony_call_snc_handle(KBDBL_HANDLER, KBDBL_PRESENT, &result)) |
| 1462 | return 0; | 1480 | return 0; |
| 1463 | if (!(result & 0x02)) | 1481 | if (!(result & 0x02)) |
| 1464 | return 0; | 1482 | return 0; |
| @@ -1501,13 +1519,36 @@ outkzalloc: | |||
| 1501 | static int sony_nc_kbd_backlight_cleanup(struct platform_device *pd) | 1519 | static int sony_nc_kbd_backlight_cleanup(struct platform_device *pd) |
| 1502 | { | 1520 | { |
| 1503 | if (kbdbl_handle) { | 1521 | if (kbdbl_handle) { |
| 1522 | int result; | ||
| 1523 | |||
| 1504 | device_remove_file(&pd->dev, &kbdbl_handle->mode_attr); | 1524 | device_remove_file(&pd->dev, &kbdbl_handle->mode_attr); |
| 1505 | device_remove_file(&pd->dev, &kbdbl_handle->timeout_attr); | 1525 | device_remove_file(&pd->dev, &kbdbl_handle->timeout_attr); |
| 1526 | |||
| 1527 | /* restore the default hw behaviour */ | ||
| 1528 | sony_call_snc_handle(KBDBL_HANDLER, 0x1000 | SET_MODE, &result); | ||
| 1529 | sony_call_snc_handle(KBDBL_HANDLER, SET_TIMEOUT, &result); | ||
| 1530 | |||
| 1506 | kfree(kbdbl_handle); | 1531 | kfree(kbdbl_handle); |
| 1507 | } | 1532 | } |
| 1508 | return 0; | 1533 | return 0; |
| 1509 | } | 1534 | } |
| 1510 | 1535 | ||
| 1536 | static void sony_nc_kbd_backlight_resume(void) | ||
| 1537 | { | ||
| 1538 | int ignore = 0; | ||
| 1539 | |||
| 1540 | if (!kbdbl_handle) | ||
| 1541 | return; | ||
| 1542 | |||
| 1543 | if (kbdbl_handle->mode == 0) | ||
| 1544 | sony_call_snc_handle(KBDBL_HANDLER, SET_MODE, &ignore); | ||
| 1545 | |||
| 1546 | if (kbdbl_handle->timeout != 0) | ||
| 1547 | sony_call_snc_handle(KBDBL_HANDLER, | ||
| 1548 | (kbdbl_handle->timeout << 0x10) | SET_TIMEOUT, | ||
| 1549 | &ignore); | ||
| 1550 | } | ||
| 1551 | |||
| 1511 | static void sony_nc_backlight_setup(void) | 1552 | static void sony_nc_backlight_setup(void) |
| 1512 | { | 1553 | { |
| 1513 | acpi_handle unused; | 1554 | acpi_handle unused; |
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index a08561f5349e..efb3b6b9bcdb 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c | |||
| @@ -8618,8 +8618,7 @@ static bool __pure __init tpacpi_is_valid_fw_id(const char* const s, | |||
| 8618 | tpacpi_is_fw_digit(s[1]) && | 8618 | tpacpi_is_fw_digit(s[1]) && |
| 8619 | s[2] == t && s[3] == 'T' && | 8619 | s[2] == t && s[3] == 'T' && |
| 8620 | tpacpi_is_fw_digit(s[4]) && | 8620 | tpacpi_is_fw_digit(s[4]) && |
| 8621 | tpacpi_is_fw_digit(s[5]) && | 8621 | tpacpi_is_fw_digit(s[5]); |
| 8622 | s[6] == 'W' && s[7] == 'W'; | ||
| 8623 | } | 8622 | } |
| 8624 | 8623 | ||
| 8625 | /* returns 0 - probe ok, or < 0 - probe error. | 8624 | /* returns 0 - probe ok, or < 0 - probe error. |
diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c index 4a651f69e17c..bc00693d0c79 100644 --- a/drivers/pnp/card.c +++ b/drivers/pnp/card.c | |||
| @@ -320,7 +320,7 @@ void pnp_remove_card_device(struct pnp_dev *dev) | |||
| 320 | * pnp_request_card_device - Searches for a PnP device under the specified card | 320 | * pnp_request_card_device - Searches for a PnP device under the specified card |
| 321 | * @clink: pointer to the card link, cannot be NULL | 321 | * @clink: pointer to the card link, cannot be NULL |
| 322 | * @id: pointer to a PnP ID structure that explains the rules for finding the device | 322 | * @id: pointer to a PnP ID structure that explains the rules for finding the device |
| 323 | * @from: Starting place to search from. If NULL it will start from the begining. | 323 | * @from: Starting place to search from. If NULL it will start from the beginning. |
| 324 | */ | 324 | */ |
| 325 | struct pnp_dev *pnp_request_card_device(struct pnp_card_link *clink, | 325 | struct pnp_dev *pnp_request_card_device(struct pnp_card_link *clink, |
| 326 | const char *id, struct pnp_dev *from) | 326 | const char *id, struct pnp_dev *from) |
| @@ -369,7 +369,7 @@ err_out: | |||
| 369 | 369 | ||
| 370 | /** | 370 | /** |
| 371 | * pnp_release_card_device - call this when the driver no longer needs the device | 371 | * pnp_release_card_device - call this when the driver no longer needs the device |
| 372 | * @dev: pointer to the PnP device stucture | 372 | * @dev: pointer to the PnP device structure |
| 373 | */ | 373 | */ |
| 374 | void pnp_release_card_device(struct pnp_dev *dev) | 374 | void pnp_release_card_device(struct pnp_dev *dev) |
| 375 | { | 375 | { |
diff --git a/drivers/pnp/pnpbios/bioscalls.c b/drivers/pnp/pnpbios/bioscalls.c index 8591f6ab1b35..b859d16cf78c 100644 --- a/drivers/pnp/pnpbios/bioscalls.c +++ b/drivers/pnp/pnpbios/bioscalls.c | |||
| @@ -219,7 +219,7 @@ void pnpbios_print_status(const char *module, u16 status) | |||
| 219 | module); | 219 | module); |
| 220 | break; | 220 | break; |
| 221 | case PNP_HARDWARE_ERROR: | 221 | case PNP_HARDWARE_ERROR: |
| 222 | printk(KERN_ERR "PnPBIOS: %s: a hardware failure has occured\n", | 222 | printk(KERN_ERR "PnPBIOS: %s: a hardware failure has occurred\n", |
| 223 | module); | 223 | module); |
| 224 | break; | 224 | break; |
| 225 | default: | 225 | default: |
diff --git a/drivers/pps/Kconfig b/drivers/pps/Kconfig index f0d3376b58ba..258ca596e1bc 100644 --- a/drivers/pps/Kconfig +++ b/drivers/pps/Kconfig | |||
| @@ -35,7 +35,7 @@ config NTP_PPS | |||
| 35 | depends on PPS && !NO_HZ | 35 | depends on PPS && !NO_HZ |
| 36 | help | 36 | help |
| 37 | This option adds support for direct in-kernel time | 37 | This option adds support for direct in-kernel time |
| 38 | syncronization using an external PPS signal. | 38 | synchronization using an external PPS signal. |
| 39 | 39 | ||
| 40 | It doesn't work on tickless systems at the moment. | 40 | It doesn't work on tickless systems at the moment. |
| 41 | 41 | ||
diff --git a/drivers/ps3/ps3-lpm.c b/drivers/ps3/ps3-lpm.c index 8000985d0e8c..643697f71390 100644 --- a/drivers/ps3/ps3-lpm.c +++ b/drivers/ps3/ps3-lpm.c | |||
| @@ -919,7 +919,7 @@ EXPORT_SYMBOL_GPL(ps3_disable_pm); | |||
| 919 | * @offset: Offset in bytes from the start of the trace buffer. | 919 | * @offset: Offset in bytes from the start of the trace buffer. |
| 920 | * @buf: Copy destination. | 920 | * @buf: Copy destination. |
| 921 | * @count: Maximum count of bytes to copy. | 921 | * @count: Maximum count of bytes to copy. |
| 922 | * @bytes_copied: Pointer to a variable that will recieve the number of | 922 | * @bytes_copied: Pointer to a variable that will receive the number of |
| 923 | * bytes copied to @buf. | 923 | * bytes copied to @buf. |
| 924 | * | 924 | * |
| 925 | * On error @buf will contain any successfully copied trace buffer data | 925 | * On error @buf will contain any successfully copied trace buffer data |
| @@ -974,7 +974,7 @@ EXPORT_SYMBOL_GPL(ps3_lpm_copy_tb); | |||
| 974 | * @offset: Offset in bytes from the start of the trace buffer. | 974 | * @offset: Offset in bytes from the start of the trace buffer. |
| 975 | * @buf: A __user copy destination. | 975 | * @buf: A __user copy destination. |
| 976 | * @count: Maximum count of bytes to copy. | 976 | * @count: Maximum count of bytes to copy. |
| 977 | * @bytes_copied: Pointer to a variable that will recieve the number of | 977 | * @bytes_copied: Pointer to a variable that will receive the number of |
| 978 | * bytes copied to @buf. | 978 | * bytes copied to @buf. |
| 979 | * | 979 | * |
| 980 | * On error @buf will contain any successfully copied trace buffer data | 980 | * On error @buf will contain any successfully copied trace buffer data |
| @@ -1074,7 +1074,7 @@ EXPORT_SYMBOL_GPL(ps3_disable_pm_interrupts); | |||
| 1074 | 1074 | ||
| 1075 | /** | 1075 | /** |
| 1076 | * ps3_lpm_open - Open the logical performance monitor device. | 1076 | * ps3_lpm_open - Open the logical performance monitor device. |
| 1077 | * @tb_type: Specifies the type of trace buffer lv1 sould use for this lpm | 1077 | * @tb_type: Specifies the type of trace buffer lv1 should use for this lpm |
| 1078 | * instance, specified by one of enum ps3_lpm_tb_type. | 1078 | * instance, specified by one of enum ps3_lpm_tb_type. |
| 1079 | * @tb_cache: Optional user supplied buffer to use as the trace buffer cache. | 1079 | * @tb_cache: Optional user supplied buffer to use as the trace buffer cache. |
| 1080 | * If NULL, the driver will allocate and manage an internal buffer. | 1080 | * If NULL, the driver will allocate and manage an internal buffer. |
diff --git a/drivers/ps3/ps3-sys-manager.c b/drivers/ps3/ps3-sys-manager.c index d37c445f0eda..1b98367110c4 100644 --- a/drivers/ps3/ps3-sys-manager.c +++ b/drivers/ps3/ps3-sys-manager.c | |||
| @@ -80,7 +80,7 @@ static void __maybe_unused _dump_sm_header( | |||
| 80 | * | 80 | * |
| 81 | * Currently all messages received from the system manager are either | 81 | * Currently all messages received from the system manager are either |
| 82 | * (16 bytes header + 8 bytes payload = 24 bytes) or (16 bytes header | 82 | * (16 bytes header + 8 bytes payload = 24 bytes) or (16 bytes header |
| 83 | * + 16 bytes payload = 32 bytes). This knowlege is used to simplify | 83 | * + 16 bytes payload = 32 bytes). This knowledge is used to simplify |
| 84 | * the logic. | 84 | * the logic. |
| 85 | */ | 85 | */ |
| 86 | 86 | ||
diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c index 3a59d5f018d3..ee893581d4b7 100644 --- a/drivers/rapidio/rio-scan.c +++ b/drivers/rapidio/rio-scan.c | |||
| @@ -295,7 +295,7 @@ static int __devinit rio_add_device(struct rio_dev *rdev) | |||
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | /** | 297 | /** |
| 298 | * rio_enable_rx_tx_port - enable input reciever and output transmitter of | 298 | * rio_enable_rx_tx_port - enable input receiver and output transmitter of |
| 299 | * given port | 299 | * given port |
| 300 | * @port: Master port associated with the RIO network | 300 | * @port: Master port associated with the RIO network |
| 301 | * @local: local=1 select local port otherwise a far device is reached | 301 | * @local: local=1 select local port otherwise a far device is reached |
diff --git a/drivers/rapidio/rio.c b/drivers/rapidio/rio.c index c29719cacbca..86c9a091a2ff 100644 --- a/drivers/rapidio/rio.c +++ b/drivers/rapidio/rio.c | |||
| @@ -1171,16 +1171,17 @@ static int rio_hdid_setup(char *str) | |||
| 1171 | 1171 | ||
| 1172 | __setup("riohdid=", rio_hdid_setup); | 1172 | __setup("riohdid=", rio_hdid_setup); |
| 1173 | 1173 | ||
| 1174 | void rio_register_mport(struct rio_mport *port) | 1174 | int rio_register_mport(struct rio_mport *port) |
| 1175 | { | 1175 | { |
| 1176 | if (next_portid >= RIO_MAX_MPORTS) { | 1176 | if (next_portid >= RIO_MAX_MPORTS) { |
| 1177 | pr_err("RIO: reached specified max number of mports\n"); | 1177 | pr_err("RIO: reached specified max number of mports\n"); |
| 1178 | return; | 1178 | return 1; |
| 1179 | } | 1179 | } |
| 1180 | 1180 | ||
| 1181 | port->id = next_portid++; | 1181 | port->id = next_portid++; |
| 1182 | port->host_deviceid = rio_get_hdid(port->id); | 1182 | port->host_deviceid = rio_get_hdid(port->id); |
| 1183 | list_add_tail(&port->node, &rio_mports); | 1183 | list_add_tail(&port->node, &rio_mports); |
| 1184 | return 0; | ||
| 1184 | } | 1185 | } |
| 1185 | 1186 | ||
| 1186 | EXPORT_SYMBOL_GPL(rio_local_get_device_id); | 1187 | EXPORT_SYMBOL_GPL(rio_local_get_device_id); |
diff --git a/drivers/rapidio/switches/idt_gen2.c b/drivers/rapidio/switches/idt_gen2.c index 095016a9dec1..ac2701b22e71 100644 --- a/drivers/rapidio/switches/idt_gen2.c +++ b/drivers/rapidio/switches/idt_gen2.c | |||
| @@ -418,3 +418,4 @@ DECLARE_RIO_SWITCH_INIT(RIO_VID_IDT, RIO_DID_IDTCPS1848, idtg2_switch_init); | |||
| 418 | DECLARE_RIO_SWITCH_INIT(RIO_VID_IDT, RIO_DID_IDTCPS1616, idtg2_switch_init); | 418 | DECLARE_RIO_SWITCH_INIT(RIO_VID_IDT, RIO_DID_IDTCPS1616, idtg2_switch_init); |
| 419 | DECLARE_RIO_SWITCH_INIT(RIO_VID_IDT, RIO_DID_IDTVPS1616, idtg2_switch_init); | 419 | DECLARE_RIO_SWITCH_INIT(RIO_VID_IDT, RIO_DID_IDTVPS1616, idtg2_switch_init); |
| 420 | DECLARE_RIO_SWITCH_INIT(RIO_VID_IDT, RIO_DID_IDTSPS1616, idtg2_switch_init); | 420 | DECLARE_RIO_SWITCH_INIT(RIO_VID_IDT, RIO_DID_IDTSPS1616, idtg2_switch_init); |
| 421 | DECLARE_RIO_SWITCH_INIT(RIO_VID_IDT, RIO_DID_IDTCPS1432, idtg2_switch_init); | ||
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 3ffc6979d164..0fae51c4845a 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
| @@ -1313,7 +1313,7 @@ static int _regulator_enable(struct regulator_dev *rdev) | |||
| 1313 | return -EINVAL; | 1313 | return -EINVAL; |
| 1314 | 1314 | ||
| 1315 | /* Query before enabling in case configuration | 1315 | /* Query before enabling in case configuration |
| 1316 | * dependant. */ | 1316 | * dependent. */ |
| 1317 | ret = _regulator_get_enable_time(rdev); | 1317 | ret = _regulator_get_enable_time(rdev); |
| 1318 | if (ret >= 0) { | 1318 | if (ret >= 0) { |
| 1319 | delay = ret; | 1319 | delay = ret; |
diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c index a8f4ecfb0843..daff7fd0e95c 100644 --- a/drivers/regulator/max8952.c +++ b/drivers/regulator/max8952.c | |||
| @@ -262,7 +262,7 @@ static int __devinit max8952_pmic_probe(struct i2c_client *client, | |||
| 262 | 262 | ||
| 263 | if (err) { | 263 | if (err) { |
| 264 | dev_warn(max8952->dev, "VID0/1 gpio invalid: " | 264 | dev_warn(max8952->dev, "VID0/1 gpio invalid: " |
| 265 | "DVS not avilable.\n"); | 265 | "DVS not available.\n"); |
| 266 | max8952->vid0 = 0; | 266 | max8952->vid0 = 0; |
| 267 | max8952->vid1 = 0; | 267 | max8952->vid1 = 0; |
| 268 | /* Mark invalid */ | 268 | /* Mark invalid */ |
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index 09b4437b3e61..39013867cbd6 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c | |||
| @@ -171,7 +171,7 @@ struct rtc_device *rtc_device_register(const char *name, struct device *dev, | |||
| 171 | err = __rtc_read_alarm(rtc, &alrm); | 171 | err = __rtc_read_alarm(rtc, &alrm); |
| 172 | 172 | ||
| 173 | if (!err && !rtc_valid_tm(&alrm.time)) | 173 | if (!err && !rtc_valid_tm(&alrm.time)) |
| 174 | rtc_set_alarm(rtc, &alrm); | 174 | rtc_initialize_alarm(rtc, &alrm); |
| 175 | 175 | ||
| 176 | strlcpy(rtc->name, name, RTC_DEVICE_NAME_SIZE); | 176 | strlcpy(rtc->name, name, RTC_DEVICE_NAME_SIZE); |
| 177 | dev_set_name(&rtc->dev, "rtc%d", id); | 177 | dev_set_name(&rtc->dev, "rtc%d", id); |
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index 8ec6b069a7f5..ef6316acec43 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c | |||
| @@ -375,6 +375,32 @@ int rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) | |||
| 375 | } | 375 | } |
| 376 | EXPORT_SYMBOL_GPL(rtc_set_alarm); | 376 | EXPORT_SYMBOL_GPL(rtc_set_alarm); |
| 377 | 377 | ||
| 378 | /* Called once per device from rtc_device_register */ | ||
| 379 | int rtc_initialize_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) | ||
| 380 | { | ||
| 381 | int err; | ||
| 382 | |||
| 383 | err = rtc_valid_tm(&alarm->time); | ||
| 384 | if (err != 0) | ||
| 385 | return err; | ||
| 386 | |||
| 387 | err = mutex_lock_interruptible(&rtc->ops_lock); | ||
| 388 | if (err) | ||
| 389 | return err; | ||
| 390 | |||
| 391 | rtc->aie_timer.node.expires = rtc_tm_to_ktime(alarm->time); | ||
| 392 | rtc->aie_timer.period = ktime_set(0, 0); | ||
| 393 | if (alarm->enabled) { | ||
| 394 | rtc->aie_timer.enabled = 1; | ||
| 395 | timerqueue_add(&rtc->timerqueue, &rtc->aie_timer.node); | ||
| 396 | } | ||
| 397 | mutex_unlock(&rtc->ops_lock); | ||
| 398 | return err; | ||
| 399 | } | ||
| 400 | EXPORT_SYMBOL_GPL(rtc_initialize_alarm); | ||
| 401 | |||
| 402 | |||
| 403 | |||
| 378 | int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled) | 404 | int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled) |
| 379 | { | 405 | { |
| 380 | int err = mutex_lock_interruptible(&rtc->ops_lock); | 406 | int err = mutex_lock_interruptible(&rtc->ops_lock); |
| @@ -454,7 +480,7 @@ EXPORT_SYMBOL_GPL(rtc_update_irq_enable); | |||
| 454 | * @rtc: pointer to the rtc device | 480 | * @rtc: pointer to the rtc device |
| 455 | * | 481 | * |
| 456 | * This function is called when an AIE, UIE or PIE mode interrupt | 482 | * This function is called when an AIE, UIE or PIE mode interrupt |
| 457 | * has occured (or been emulated). | 483 | * has occurred (or been emulated). |
| 458 | * | 484 | * |
| 459 | * Triggers the registered irq_task function callback. | 485 | * Triggers the registered irq_task function callback. |
| 460 | */ | 486 | */ |
diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c index 518a76ec71ca..e39b77a4609a 100644 --- a/drivers/rtc/rtc-at91rm9200.c +++ b/drivers/rtc/rtc-at91rm9200.c | |||
| @@ -60,7 +60,7 @@ static void at91_rtc_decodetime(unsigned int timereg, unsigned int calreg, | |||
| 60 | /* | 60 | /* |
| 61 | * The Calendar Alarm register does not have a field for | 61 | * The Calendar Alarm register does not have a field for |
| 62 | * the year - so these will return an invalid value. When an | 62 | * the year - so these will return an invalid value. When an |
| 63 | * alarm is set, at91_alarm_year wille store the current year. | 63 | * alarm is set, at91_alarm_year will store the current year. |
| 64 | */ | 64 | */ |
| 65 | tm->tm_year = bcd2bin(date & AT91_RTC_CENT) * 100; /* century */ | 65 | tm->tm_year = bcd2bin(date & AT91_RTC_CENT) * 100; /* century */ |
| 66 | tm->tm_year += bcd2bin((date & AT91_RTC_YEAR) >> 8); /* year */ | 66 | tm->tm_year += bcd2bin((date & AT91_RTC_YEAR) >> 8); /* year */ |
diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c index ca9cff85ab8a..90d866272c8e 100644 --- a/drivers/rtc/rtc-bfin.c +++ b/drivers/rtc/rtc-bfin.c | |||
| @@ -20,9 +20,9 @@ | |||
| 20 | * write would be discarded and things quickly fall apart. | 20 | * write would be discarded and things quickly fall apart. |
| 21 | * | 21 | * |
| 22 | * To keep this delay from significantly degrading performance (we, in theory, | 22 | * To keep this delay from significantly degrading performance (we, in theory, |
| 23 | * would have to sleep for up to 1 second everytime we wanted to write a | 23 | * would have to sleep for up to 1 second every time we wanted to write a |
| 24 | * register), we only check the write pending status before we start to issue | 24 | * register), we only check the write pending status before we start to issue |
| 25 | * a new write. We bank on the idea that it doesnt matter when the sync | 25 | * a new write. We bank on the idea that it doesn't matter when the sync |
| 26 | * happens so long as we don't attempt another write before it does. The only | 26 | * happens so long as we don't attempt another write before it does. The only |
| 27 | * time userspace would take this penalty is when they try and do multiple | 27 | * time userspace would take this penalty is when they try and do multiple |
| 28 | * operations right after another ... but in this case, they need to take the | 28 | * operations right after another ... but in this case, they need to take the |
| @@ -250,6 +250,8 @@ static int bfin_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled) | |||
| 250 | bfin_rtc_int_set_alarm(rtc); | 250 | bfin_rtc_int_set_alarm(rtc); |
| 251 | else | 251 | else |
| 252 | bfin_rtc_int_clear(~(RTC_ISTAT_ALARM | RTC_ISTAT_ALARM_DAY)); | 252 | bfin_rtc_int_clear(~(RTC_ISTAT_ALARM | RTC_ISTAT_ALARM_DAY)); |
| 253 | |||
| 254 | return 0; | ||
| 253 | } | 255 | } |
| 254 | 256 | ||
| 255 | static int bfin_rtc_read_time(struct device *dev, struct rtc_time *tm) | 257 | static int bfin_rtc_read_time(struct device *dev, struct rtc_time *tm) |
diff --git a/drivers/rtc/rtc-lpc32xx.c b/drivers/rtc/rtc-lpc32xx.c index ec8701ce99f9..ae16250c762f 100644 --- a/drivers/rtc/rtc-lpc32xx.c +++ b/drivers/rtc/rtc-lpc32xx.c | |||
| @@ -240,7 +240,7 @@ static int __devinit lpc32xx_rtc_probe(struct platform_device *pdev) | |||
| 240 | spin_lock_init(&rtc->lock); | 240 | spin_lock_init(&rtc->lock); |
| 241 | 241 | ||
| 242 | /* | 242 | /* |
| 243 | * The RTC is on a seperate power domain and can keep it's state | 243 | * The RTC is on a separate power domain and can keep it's state |
| 244 | * across a chip power cycle. If the RTC has never been previously | 244 | * across a chip power cycle. If the RTC has never been previously |
| 245 | * setup, then set it up now for the first time. | 245 | * setup, then set it up now for the first time. |
| 246 | */ | 246 | */ |
diff --git a/drivers/rtc/rtc-mc13xxx.c b/drivers/rtc/rtc-mc13xxx.c index c42006469559..c5ac03793e79 100644 --- a/drivers/rtc/rtc-mc13xxx.c +++ b/drivers/rtc/rtc-mc13xxx.c | |||
| @@ -401,6 +401,7 @@ const struct platform_device_id mc13xxx_rtc_idtable[] = { | |||
| 401 | }, { | 401 | }, { |
| 402 | .name = "mc13892-rtc", | 402 | .name = "mc13892-rtc", |
| 403 | }, | 403 | }, |
| 404 | { } | ||
| 404 | }; | 405 | }; |
| 405 | 406 | ||
| 406 | static struct platform_driver mc13xxx_rtc_driver = { | 407 | static struct platform_driver mc13xxx_rtc_driver = { |
diff --git a/drivers/rtc/rtc-mrst.c b/drivers/rtc/rtc-mrst.c index b86bc328463b..b2f096871a97 100644 --- a/drivers/rtc/rtc-mrst.c +++ b/drivers/rtc/rtc-mrst.c | |||
| @@ -319,7 +319,7 @@ static irqreturn_t mrst_rtc_irq(int irq, void *p) | |||
| 319 | return IRQ_NONE; | 319 | return IRQ_NONE; |
| 320 | } | 320 | } |
| 321 | 321 | ||
| 322 | static int __init | 322 | static int __devinit |
| 323 | vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq) | 323 | vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq) |
| 324 | { | 324 | { |
| 325 | int retval = 0; | 325 | int retval = 0; |
| @@ -342,6 +342,8 @@ vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq) | |||
| 342 | 342 | ||
| 343 | mrst_rtc.irq = rtc_irq; | 343 | mrst_rtc.irq = rtc_irq; |
| 344 | mrst_rtc.iomem = iomem; | 344 | mrst_rtc.iomem = iomem; |
| 345 | mrst_rtc.dev = dev; | ||
| 346 | dev_set_drvdata(dev, &mrst_rtc); | ||
| 345 | 347 | ||
| 346 | mrst_rtc.rtc = rtc_device_register(driver_name, dev, | 348 | mrst_rtc.rtc = rtc_device_register(driver_name, dev, |
| 347 | &mrst_rtc_ops, THIS_MODULE); | 349 | &mrst_rtc_ops, THIS_MODULE); |
| @@ -350,8 +352,6 @@ vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq) | |||
| 350 | goto cleanup0; | 352 | goto cleanup0; |
| 351 | } | 353 | } |
| 352 | 354 | ||
| 353 | mrst_rtc.dev = dev; | ||
| 354 | dev_set_drvdata(dev, &mrst_rtc); | ||
| 355 | rename_region(iomem, dev_name(&mrst_rtc.rtc->dev)); | 355 | rename_region(iomem, dev_name(&mrst_rtc.rtc->dev)); |
| 356 | 356 | ||
| 357 | spin_lock_irq(&rtc_lock); | 357 | spin_lock_irq(&rtc_lock); |
| @@ -376,9 +376,10 @@ vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq) | |||
| 376 | return 0; | 376 | return 0; |
| 377 | 377 | ||
| 378 | cleanup1: | 378 | cleanup1: |
| 379 | mrst_rtc.dev = NULL; | ||
| 380 | rtc_device_unregister(mrst_rtc.rtc); | 379 | rtc_device_unregister(mrst_rtc.rtc); |
| 381 | cleanup0: | 380 | cleanup0: |
| 381 | dev_set_drvdata(dev, NULL); | ||
| 382 | mrst_rtc.dev = NULL; | ||
| 382 | release_region(iomem->start, iomem->end + 1 - iomem->start); | 383 | release_region(iomem->start, iomem->end + 1 - iomem->start); |
| 383 | dev_err(dev, "rtc-mrst: unable to initialise\n"); | 384 | dev_err(dev, "rtc-mrst: unable to initialise\n"); |
| 384 | return retval; | 385 | return retval; |
| @@ -391,7 +392,7 @@ static void rtc_mrst_do_shutdown(void) | |||
| 391 | spin_unlock_irq(&rtc_lock); | 392 | spin_unlock_irq(&rtc_lock); |
| 392 | } | 393 | } |
| 393 | 394 | ||
| 394 | static void __exit rtc_mrst_do_remove(struct device *dev) | 395 | static void __devexit rtc_mrst_do_remove(struct device *dev) |
| 395 | { | 396 | { |
| 396 | struct mrst_rtc *mrst = dev_get_drvdata(dev); | 397 | struct mrst_rtc *mrst = dev_get_drvdata(dev); |
| 397 | struct resource *iomem; | 398 | struct resource *iomem; |
| @@ -500,14 +501,14 @@ static inline int mrst_poweroff(struct device *dev) | |||
| 500 | 501 | ||
| 501 | #endif | 502 | #endif |
| 502 | 503 | ||
| 503 | static int __init vrtc_mrst_platform_probe(struct platform_device *pdev) | 504 | static int __devinit vrtc_mrst_platform_probe(struct platform_device *pdev) |
| 504 | { | 505 | { |
| 505 | return vrtc_mrst_do_probe(&pdev->dev, | 506 | return vrtc_mrst_do_probe(&pdev->dev, |
| 506 | platform_get_resource(pdev, IORESOURCE_MEM, 0), | 507 | platform_get_resource(pdev, IORESOURCE_MEM, 0), |
| 507 | platform_get_irq(pdev, 0)); | 508 | platform_get_irq(pdev, 0)); |
| 508 | } | 509 | } |
| 509 | 510 | ||
| 510 | static int __exit vrtc_mrst_platform_remove(struct platform_device *pdev) | 511 | static int __devexit vrtc_mrst_platform_remove(struct platform_device *pdev) |
| 511 | { | 512 | { |
| 512 | rtc_mrst_do_remove(&pdev->dev); | 513 | rtc_mrst_do_remove(&pdev->dev); |
| 513 | return 0; | 514 | return 0; |
| @@ -525,7 +526,7 @@ MODULE_ALIAS("platform:vrtc_mrst"); | |||
| 525 | 526 | ||
| 526 | static struct platform_driver vrtc_mrst_platform_driver = { | 527 | static struct platform_driver vrtc_mrst_platform_driver = { |
| 527 | .probe = vrtc_mrst_platform_probe, | 528 | .probe = vrtc_mrst_platform_probe, |
| 528 | .remove = __exit_p(vrtc_mrst_platform_remove), | 529 | .remove = __devexit_p(vrtc_mrst_platform_remove), |
| 529 | .shutdown = vrtc_mrst_platform_shutdown, | 530 | .shutdown = vrtc_mrst_platform_shutdown, |
| 530 | .driver = { | 531 | .driver = { |
| 531 | .name = (char *) driver_name, | 532 | .name = (char *) driver_name, |
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index 714964913e5e..b3466c491cd3 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c | |||
| @@ -336,7 +336,6 @@ static void s3c_rtc_release(struct device *dev) | |||
| 336 | 336 | ||
| 337 | /* do not clear AIE here, it may be needed for wake */ | 337 | /* do not clear AIE here, it may be needed for wake */ |
| 338 | 338 | ||
| 339 | s3c_rtc_setpie(dev, 0); | ||
| 340 | free_irq(s3c_rtc_alarmno, rtc_dev); | 339 | free_irq(s3c_rtc_alarmno, rtc_dev); |
| 341 | free_irq(s3c_rtc_tickno, rtc_dev); | 340 | free_irq(s3c_rtc_tickno, rtc_dev); |
| 342 | } | 341 | } |
| @@ -408,7 +407,6 @@ static int __devexit s3c_rtc_remove(struct platform_device *dev) | |||
| 408 | platform_set_drvdata(dev, NULL); | 407 | platform_set_drvdata(dev, NULL); |
| 409 | rtc_device_unregister(rtc); | 408 | rtc_device_unregister(rtc); |
| 410 | 409 | ||
| 411 | s3c_rtc_setpie(&dev->dev, 0); | ||
| 412 | s3c_rtc_setaie(&dev->dev, 0); | 410 | s3c_rtc_setaie(&dev->dev, 0); |
| 413 | 411 | ||
| 414 | clk_disable(rtc_clk); | 412 | clk_disable(rtc_clk); |
diff --git a/drivers/rtc/rtc-x1205.c b/drivers/rtc/rtc-x1205.c index 9aae49139a0a..b00aad2620d4 100644 --- a/drivers/rtc/rtc-x1205.c +++ b/drivers/rtc/rtc-x1205.c | |||
| @@ -573,7 +573,7 @@ static int x1205_probe(struct i2c_client *client, | |||
| 573 | 573 | ||
| 574 | i2c_set_clientdata(client, rtc); | 574 | i2c_set_clientdata(client, rtc); |
| 575 | 575 | ||
| 576 | /* Check for power failures and eventualy enable the osc */ | 576 | /* Check for power failures and eventually enable the osc */ |
| 577 | if ((err = x1205_get_status(client, &sr)) == 0) { | 577 | if ((err = x1205_get_status(client, &sr)) == 0) { |
| 578 | if (sr & X1205_SR_RTCF) { | 578 | if (sr & X1205_SR_RTCF) { |
| 579 | dev_err(&client->dev, | 579 | dev_err(&client->dev, |
diff --git a/drivers/s390/block/dasd_3990_erp.c b/drivers/s390/block/dasd_3990_erp.c index 1654a24817be..87a0cf160fe5 100644 --- a/drivers/s390/block/dasd_3990_erp.c +++ b/drivers/s390/block/dasd_3990_erp.c | |||
| @@ -2207,7 +2207,7 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense) | |||
| 2207 | * DASD_3990_ERP_CONTROL_CHECK | 2207 | * DASD_3990_ERP_CONTROL_CHECK |
| 2208 | * | 2208 | * |
| 2209 | * DESCRIPTION | 2209 | * DESCRIPTION |
| 2210 | * Does a generic inspection if a control check occured and sets up | 2210 | * Does a generic inspection if a control check occurred and sets up |
| 2211 | * the related error recovery procedure | 2211 | * the related error recovery procedure |
| 2212 | * | 2212 | * |
| 2213 | * PARAMETER | 2213 | * PARAMETER |
| @@ -2250,7 +2250,7 @@ dasd_3990_erp_inspect(struct dasd_ccw_req *erp) | |||
| 2250 | struct dasd_ccw_req *erp_new = NULL; | 2250 | struct dasd_ccw_req *erp_new = NULL; |
| 2251 | char *sense; | 2251 | char *sense; |
| 2252 | 2252 | ||
| 2253 | /* if this problem occured on an alias retry on base */ | 2253 | /* if this problem occurred on an alias retry on base */ |
| 2254 | erp_new = dasd_3990_erp_inspect_alias(erp); | 2254 | erp_new = dasd_3990_erp_inspect_alias(erp); |
| 2255 | if (erp_new) | 2255 | if (erp_new) |
| 2256 | return erp_new; | 2256 | return erp_new; |
| @@ -2282,7 +2282,7 @@ dasd_3990_erp_inspect(struct dasd_ccw_req *erp) | |||
| 2282 | * DASD_3990_ERP_ADD_ERP | 2282 | * DASD_3990_ERP_ADD_ERP |
| 2283 | * | 2283 | * |
| 2284 | * DESCRIPTION | 2284 | * DESCRIPTION |
| 2285 | * This funtion adds an additional request block (ERP) to the head of | 2285 | * This function adds an additional request block (ERP) to the head of |
| 2286 | * the given cqr (or erp). | 2286 | * the given cqr (or erp). |
| 2287 | * For a command mode cqr the erp is initialized as an default erp | 2287 | * For a command mode cqr the erp is initialized as an default erp |
| 2288 | * (retry TIC). | 2288 | * (retry TIC). |
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index cb6a67bc89ff..42e1bf35f689 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c | |||
| @@ -302,7 +302,7 @@ dasd_parse_keyword( char *parsestring ) { | |||
| 302 | /* | 302 | /* |
| 303 | * Try to interprete the first element on the comma separated parse string | 303 | * Try to interprete the first element on the comma separated parse string |
| 304 | * as a device number or a range of devices. If the interpretation is | 304 | * as a device number or a range of devices. If the interpretation is |
| 305 | * successfull, create the matching dasd_devmap entries and return a pointer | 305 | * successful, create the matching dasd_devmap entries and return a pointer |
| 306 | * to the residual string. | 306 | * to the residual string. |
| 307 | * If interpretation fails or in case of an error, return an error code. | 307 | * If interpretation fails or in case of an error, return an error code. |
| 308 | */ | 308 | */ |
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 459f2cbe80fc..db8005d9f2fd 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
| @@ -2858,7 +2858,7 @@ static struct dasd_ccw_req *dasd_raw_build_cp(struct dasd_device *startdev, | |||
| 2858 | /* | 2858 | /* |
| 2859 | * struct PFX_eckd_data has up to 2 byte as extended parameter | 2859 | * struct PFX_eckd_data has up to 2 byte as extended parameter |
| 2860 | * this is needed for write full track and has to be mentioned | 2860 | * this is needed for write full track and has to be mentioned |
| 2861 | * seperately | 2861 | * separately |
| 2862 | * add 8 instead of 2 to keep 8 byte boundary | 2862 | * add 8 instead of 2 to keep 8 byte boundary |
| 2863 | */ | 2863 | */ |
| 2864 | pfx_datasize = sizeof(struct PFX_eckd_data) + 8; | 2864 | pfx_datasize = sizeof(struct PFX_eckd_data) + 8; |
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c index 4c023761946f..e21a5c39ef20 100644 --- a/drivers/s390/char/raw3270.c +++ b/drivers/s390/char/raw3270.c | |||
| @@ -604,7 +604,7 @@ __raw3270_size_device(struct raw3270 *rp) | |||
| 604 | /* | 604 | /* |
| 605 | * To determine the size of the 3270 device we need to do: | 605 | * To determine the size of the 3270 device we need to do: |
| 606 | * 1) send a 'read partition' data stream to the device | 606 | * 1) send a 'read partition' data stream to the device |
| 607 | * 2) wait for the attn interrupt that preceeds the query reply | 607 | * 2) wait for the attn interrupt that precedes the query reply |
| 608 | * 3) do a read modified to get the query reply | 608 | * 3) do a read modified to get the query reply |
| 609 | * To make things worse we have to cope with intervention | 609 | * To make things worse we have to cope with intervention |
| 610 | * required (3270 device switched to 'stand-by') and command | 610 | * required (3270 device switched to 'stand-by') and command |
diff --git a/drivers/s390/char/tape_char.c b/drivers/s390/char/tape_char.c index e090a307fdee..87cd0ab242de 100644 --- a/drivers/s390/char/tape_char.c +++ b/drivers/s390/char/tape_char.c | |||
| @@ -139,7 +139,7 @@ tapechar_read(struct file *filp, char __user *data, size_t count, loff_t *ppos) | |||
| 139 | /* | 139 | /* |
| 140 | * If the tape isn't terminated yet, do it now. And since we then | 140 | * If the tape isn't terminated yet, do it now. And since we then |
| 141 | * are at the end of the tape there wouldn't be anything to read | 141 | * are at the end of the tape there wouldn't be anything to read |
| 142 | * anyways. So we return immediatly. | 142 | * anyways. So we return immediately. |
| 143 | */ | 143 | */ |
| 144 | if(device->required_tapemarks) { | 144 | if(device->required_tapemarks) { |
| 145 | return tape_std_terminate_write(device); | 145 | return tape_std_terminate_write(device); |
diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c index d33554df2b06..2db1482b406e 100644 --- a/drivers/s390/char/tty3270.c +++ b/drivers/s390/char/tty3270.c | |||
| @@ -328,7 +328,7 @@ tty3270_write_callback(struct raw3270_request *rq, void *data) | |||
| 328 | 328 | ||
| 329 | tp = (struct tty3270 *) rq->view; | 329 | tp = (struct tty3270 *) rq->view; |
| 330 | if (rq->rc != 0) { | 330 | if (rq->rc != 0) { |
| 331 | /* Write wasn't successfull. Refresh all. */ | 331 | /* Write wasn't successful. Refresh all. */ |
| 332 | tp->update_flags = TTY_UPDATE_ALL; | 332 | tp->update_flags = TTY_UPDATE_ALL; |
| 333 | tty3270_set_timer(tp, 1); | 333 | tty3270_set_timer(tp, 1); |
| 334 | } | 334 | } |
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index df14c51f6532..8e04c00cf0ad 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
| @@ -541,15 +541,24 @@ static ssize_t online_store (struct device *dev, struct device_attribute *attr, | |||
| 541 | int force, ret; | 541 | int force, ret; |
| 542 | unsigned long i; | 542 | unsigned long i; |
| 543 | 543 | ||
| 544 | if (!dev_fsm_final_state(cdev) && | 544 | /* Prevent conflict between multiple on-/offline processing requests. */ |
| 545 | cdev->private->state != DEV_STATE_DISCONNECTED) | ||
| 546 | return -EAGAIN; | ||
| 547 | if (atomic_cmpxchg(&cdev->private->onoff, 0, 1) != 0) | 545 | if (atomic_cmpxchg(&cdev->private->onoff, 0, 1) != 0) |
| 548 | return -EAGAIN; | 546 | return -EAGAIN; |
| 547 | /* Prevent conflict between internal I/Os and on-/offline processing. */ | ||
| 548 | if (!dev_fsm_final_state(cdev) && | ||
| 549 | cdev->private->state != DEV_STATE_DISCONNECTED) { | ||
| 550 | ret = -EAGAIN; | ||
| 551 | goto out_onoff; | ||
| 552 | } | ||
| 553 | /* Prevent conflict between pending work and on-/offline processing.*/ | ||
| 554 | if (work_pending(&cdev->private->todo_work)) { | ||
| 555 | ret = -EAGAIN; | ||
| 556 | goto out_onoff; | ||
| 557 | } | ||
| 549 | 558 | ||
| 550 | if (cdev->drv && !try_module_get(cdev->drv->driver.owner)) { | 559 | if (cdev->drv && !try_module_get(cdev->drv->driver.owner)) { |
| 551 | atomic_set(&cdev->private->onoff, 0); | 560 | ret = -EINVAL; |
| 552 | return -EINVAL; | 561 | goto out_onoff; |
| 553 | } | 562 | } |
| 554 | if (!strncmp(buf, "force\n", count)) { | 563 | if (!strncmp(buf, "force\n", count)) { |
| 555 | force = 1; | 564 | force = 1; |
| @@ -574,6 +583,7 @@ static ssize_t online_store (struct device *dev, struct device_attribute *attr, | |||
| 574 | out: | 583 | out: |
| 575 | if (cdev->drv) | 584 | if (cdev->drv) |
| 576 | module_put(cdev->drv->driver.owner); | 585 | module_put(cdev->drv->driver.owner); |
| 586 | out_onoff: | ||
| 577 | atomic_set(&cdev->private->onoff, 0); | 587 | atomic_set(&cdev->private->onoff, 0); |
| 578 | return (ret < 0) ? ret : count; | 588 | return (ret < 0) ? ret : count; |
| 579 | } | 589 | } |
| @@ -1311,10 +1321,12 @@ static int purge_fn(struct device *dev, void *data) | |||
| 1311 | 1321 | ||
| 1312 | spin_lock_irq(cdev->ccwlock); | 1322 | spin_lock_irq(cdev->ccwlock); |
| 1313 | if (is_blacklisted(id->ssid, id->devno) && | 1323 | if (is_blacklisted(id->ssid, id->devno) && |
| 1314 | (cdev->private->state == DEV_STATE_OFFLINE)) { | 1324 | (cdev->private->state == DEV_STATE_OFFLINE) && |
| 1325 | (atomic_cmpxchg(&cdev->private->onoff, 0, 1) == 0)) { | ||
| 1315 | CIO_MSG_EVENT(3, "ccw: purging 0.%x.%04x\n", id->ssid, | 1326 | CIO_MSG_EVENT(3, "ccw: purging 0.%x.%04x\n", id->ssid, |
| 1316 | id->devno); | 1327 | id->devno); |
| 1317 | ccw_device_sched_todo(cdev, CDEV_TODO_UNREG); | 1328 | ccw_device_sched_todo(cdev, CDEV_TODO_UNREG); |
| 1329 | atomic_set(&cdev->private->onoff, 0); | ||
| 1318 | } | 1330 | } |
| 1319 | spin_unlock_irq(cdev->ccwlock); | 1331 | spin_unlock_irq(cdev->ccwlock); |
| 1320 | /* Abort loop in case of pending signal. */ | 1332 | /* Abort loop in case of pending signal. */ |
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index a845695ac314..6084103672b5 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c | |||
| @@ -318,7 +318,7 @@ ccw_device_sense_id_done(struct ccw_device *cdev, int err) | |||
| 318 | 318 | ||
| 319 | /** | 319 | /** |
| 320 | * ccw_device_notify() - inform the device's driver about an event | 320 | * ccw_device_notify() - inform the device's driver about an event |
| 321 | * @cdev: device for which an event occured | 321 | * @cdev: device for which an event occurred |
| 322 | * @event: event that occurred | 322 | * @event: event that occurred |
| 323 | * | 323 | * |
| 324 | * Returns: | 324 | * Returns: |
| @@ -688,7 +688,7 @@ ccw_device_online_verify(struct ccw_device *cdev, enum dev_event dev_event) | |||
| 688 | (scsw_stctl(&cdev->private->irb.scsw) & SCSW_STCTL_STATUS_PEND)) { | 688 | (scsw_stctl(&cdev->private->irb.scsw) & SCSW_STCTL_STATUS_PEND)) { |
| 689 | /* | 689 | /* |
| 690 | * No final status yet or final status not yet delivered | 690 | * No final status yet or final status not yet delivered |
| 691 | * to the device driver. Can't do path verfication now, | 691 | * to the device driver. Can't do path verification now, |
| 692 | * delay until final status was delivered. | 692 | * delay until final status was delivered. |
| 693 | */ | 693 | */ |
| 694 | cdev->private->flags.doverify = 1; | 694 | cdev->private->flags.doverify = 1; |
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index 479c665e9e7c..c532ba929ccd 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c | |||
| @@ -1649,26 +1649,26 @@ static int __init init_QDIO(void) | |||
| 1649 | { | 1649 | { |
| 1650 | int rc; | 1650 | int rc; |
| 1651 | 1651 | ||
| 1652 | rc = qdio_setup_init(); | 1652 | rc = qdio_debug_init(); |
| 1653 | if (rc) | 1653 | if (rc) |
| 1654 | return rc; | 1654 | return rc; |
| 1655 | rc = qdio_setup_init(); | ||
| 1656 | if (rc) | ||
| 1657 | goto out_debug; | ||
| 1655 | rc = tiqdio_allocate_memory(); | 1658 | rc = tiqdio_allocate_memory(); |
| 1656 | if (rc) | 1659 | if (rc) |
| 1657 | goto out_cache; | 1660 | goto out_cache; |
| 1658 | rc = qdio_debug_init(); | ||
| 1659 | if (rc) | ||
| 1660 | goto out_ti; | ||
| 1661 | rc = tiqdio_register_thinints(); | 1661 | rc = tiqdio_register_thinints(); |
| 1662 | if (rc) | 1662 | if (rc) |
| 1663 | goto out_debug; | 1663 | goto out_ti; |
| 1664 | return 0; | 1664 | return 0; |
| 1665 | 1665 | ||
| 1666 | out_debug: | ||
| 1667 | qdio_debug_exit(); | ||
| 1668 | out_ti: | 1666 | out_ti: |
| 1669 | tiqdio_free_memory(); | 1667 | tiqdio_free_memory(); |
| 1670 | out_cache: | 1668 | out_cache: |
| 1671 | qdio_setup_exit(); | 1669 | qdio_setup_exit(); |
| 1670 | out_debug: | ||
| 1671 | qdio_debug_exit(); | ||
| 1672 | return rc; | 1672 | return rc; |
| 1673 | } | 1673 | } |
| 1674 | 1674 | ||
| @@ -1676,8 +1676,8 @@ static void __exit exit_QDIO(void) | |||
| 1676 | { | 1676 | { |
| 1677 | tiqdio_unregister_thinints(); | 1677 | tiqdio_unregister_thinints(); |
| 1678 | tiqdio_free_memory(); | 1678 | tiqdio_free_memory(); |
| 1679 | qdio_debug_exit(); | ||
| 1680 | qdio_setup_exit(); | 1679 | qdio_setup_exit(); |
| 1680 | qdio_debug_exit(); | ||
| 1681 | } | 1681 | } |
| 1682 | 1682 | ||
| 1683 | module_init(init_QDIO); | 1683 | module_init(init_QDIO); |
diff --git a/drivers/s390/crypto/zcrypt_api.h b/drivers/s390/crypto/zcrypt_api.h index 88ebd114735b..9688f3985b07 100644 --- a/drivers/s390/crypto/zcrypt_api.h +++ b/drivers/s390/crypto/zcrypt_api.h | |||
| @@ -76,7 +76,7 @@ struct ica_z90_status { | |||
| 76 | 76 | ||
| 77 | /** | 77 | /** |
| 78 | * Large random numbers are pulled in 4096 byte chunks from the crypto cards | 78 | * Large random numbers are pulled in 4096 byte chunks from the crypto cards |
| 79 | * and stored in a page. Be carefull when increasing this buffer due to size | 79 | * and stored in a page. Be careful when increasing this buffer due to size |
| 80 | * limitations for AP requests. | 80 | * limitations for AP requests. |
| 81 | */ | 81 | */ |
| 82 | #define ZCRYPT_RNG_BUFFER_SIZE 4096 | 82 | #define ZCRYPT_RNG_BUFFER_SIZE 4096 |
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c index 9feb62febb3d..da8aa75bb20b 100644 --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c | |||
| @@ -779,7 +779,7 @@ claw_irq_handler(struct ccw_device *cdev, | |||
| 779 | case CLAW_START_WRITE: | 779 | case CLAW_START_WRITE: |
| 780 | if (p_ch->irb->scsw.cmd.dstat & DEV_STAT_UNIT_CHECK) { | 780 | if (p_ch->irb->scsw.cmd.dstat & DEV_STAT_UNIT_CHECK) { |
| 781 | dev_info(&cdev->dev, | 781 | dev_info(&cdev->dev, |
| 782 | "%s: Unit Check Occured in " | 782 | "%s: Unit Check Occurred in " |
| 783 | "write channel\n", dev->name); | 783 | "write channel\n", dev->name); |
| 784 | clear_bit(0, (void *)&p_ch->IO_active); | 784 | clear_bit(0, (void *)&p_ch->IO_active); |
| 785 | if (p_ch->irb->ecw[0] & 0x80) { | 785 | if (p_ch->irb->ecw[0] & 0x80) { |
diff --git a/drivers/s390/net/ctcm_fsms.c b/drivers/s390/net/ctcm_fsms.c index 8c921fc3511a..2d602207541b 100644 --- a/drivers/s390/net/ctcm_fsms.c +++ b/drivers/s390/net/ctcm_fsms.c | |||
| @@ -184,7 +184,7 @@ static void ctcmpc_chx_resend(fsm_instance *, int, void *); | |||
| 184 | static void ctcmpc_chx_send_sweep(fsm_instance *fsm, int event, void *arg); | 184 | static void ctcmpc_chx_send_sweep(fsm_instance *fsm, int event, void *arg); |
| 185 | 185 | ||
| 186 | /** | 186 | /** |
| 187 | * Check return code of a preceeding ccw_device call, halt_IO etc... | 187 | * Check return code of a preceding ccw_device call, halt_IO etc... |
| 188 | * | 188 | * |
| 189 | * ch : The channel, the error belongs to. | 189 | * ch : The channel, the error belongs to. |
| 190 | * Returns the error code (!= 0) to inspect. | 190 | * Returns the error code (!= 0) to inspect. |
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c index 7fbc4adbb6d5..49d1cfc3217e 100644 --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c | |||
| @@ -1123,7 +1123,7 @@ list_modified: | |||
| 1123 | list_for_each_entry_safe(ipm, tmp, &card->ipm_list, list){ | 1123 | list_for_each_entry_safe(ipm, tmp, &card->ipm_list, list){ |
| 1124 | switch (ipm->ipm_state) { | 1124 | switch (ipm->ipm_state) { |
| 1125 | case LCS_IPM_STATE_SET_REQUIRED: | 1125 | case LCS_IPM_STATE_SET_REQUIRED: |
| 1126 | /* del from ipm_list so noone else can tamper with | 1126 | /* del from ipm_list so no one else can tamper with |
| 1127 | * this entry */ | 1127 | * this entry */ |
| 1128 | list_del_init(&ipm->list); | 1128 | list_del_init(&ipm->list); |
| 1129 | spin_unlock_irqrestore(&card->ipm_lock, flags); | 1129 | spin_unlock_irqrestore(&card->ipm_lock, flags); |
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 10a3a3b4dd3e..85cc53117ea6 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
| @@ -1107,7 +1107,7 @@ static int qeth_setup_card(struct qeth_card *card) | |||
| 1107 | INIT_LIST_HEAD(card->ip_tbd_list); | 1107 | INIT_LIST_HEAD(card->ip_tbd_list); |
| 1108 | INIT_LIST_HEAD(&card->cmd_waiter_list); | 1108 | INIT_LIST_HEAD(&card->cmd_waiter_list); |
| 1109 | init_waitqueue_head(&card->wait_q); | 1109 | init_waitqueue_head(&card->wait_q); |
| 1110 | /* intial options */ | 1110 | /* initial options */ |
| 1111 | qeth_set_intial_options(card); | 1111 | qeth_set_intial_options(card); |
| 1112 | /* IP address takeover */ | 1112 | /* IP address takeover */ |
| 1113 | INIT_LIST_HEAD(&card->ipato.entries); | 1113 | INIT_LIST_HEAD(&card->ipato.entries); |
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index a0e05ef65924..8512b5c0ef82 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
| @@ -1083,7 +1083,7 @@ static void zfcp_fsf_send_els_handler(struct zfcp_fsf_req *req) | |||
| 1083 | } | 1083 | } |
| 1084 | break; | 1084 | break; |
| 1085 | case FSF_SBAL_MISMATCH: | 1085 | case FSF_SBAL_MISMATCH: |
| 1086 | /* should never occure, avoided in zfcp_fsf_send_els */ | 1086 | /* should never occur, avoided in zfcp_fsf_send_els */ |
| 1087 | /* fall through */ | 1087 | /* fall through */ |
| 1088 | default: | 1088 | default: |
| 1089 | req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1089 | req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
diff --git a/drivers/s390/scsi/zfcp_qdio.c b/drivers/s390/scsi/zfcp_qdio.c index 8da5ed644c2b..98e97d90835b 100644 --- a/drivers/s390/scsi/zfcp_qdio.c +++ b/drivers/s390/scsi/zfcp_qdio.c | |||
| @@ -391,7 +391,7 @@ int zfcp_qdio_open(struct zfcp_qdio *qdio) | |||
| 391 | if (do_QDIO(cdev, QDIO_FLAG_SYNC_INPUT, 0, 0, QDIO_MAX_BUFFERS_PER_Q)) | 391 | if (do_QDIO(cdev, QDIO_FLAG_SYNC_INPUT, 0, 0, QDIO_MAX_BUFFERS_PER_Q)) |
| 392 | goto failed_qdio; | 392 | goto failed_qdio; |
| 393 | 393 | ||
| 394 | /* set index of first avalable SBALS / number of available SBALS */ | 394 | /* set index of first available SBALS / number of available SBALS */ |
| 395 | qdio->req_q_idx = 0; | 395 | qdio->req_q_idx = 0; |
| 396 | atomic_set(&qdio->req_q_free, QDIO_MAX_BUFFERS_PER_Q); | 396 | atomic_set(&qdio->req_q_free, QDIO_MAX_BUFFERS_PER_Q); |
| 397 | atomic_set_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &qdio->adapter->status); | 397 | atomic_set_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &qdio->adapter->status); |
diff --git a/drivers/sbus/char/jsflash.c b/drivers/sbus/char/jsflash.c index e8566224fe4b..6b4678a7900a 100644 --- a/drivers/sbus/char/jsflash.c +++ b/drivers/sbus/char/jsflash.c | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | * TODO: Erase/program both banks of a 8MB SIMM. | 13 | * TODO: Erase/program both banks of a 8MB SIMM. |
| 14 | * | 14 | * |
| 15 | * It is anticipated that programming an OS Flash will be a routine | 15 | * It is anticipated that programming an OS Flash will be a routine |
| 16 | * procedure. In the same time it is exeedingly dangerous because | 16 | * procedure. In the same time it is exceedingly dangerous because |
| 17 | * a user can program its OBP flash with OS image and effectively | 17 | * a user can program its OBP flash with OS image and effectively |
| 18 | * kill the machine. | 18 | * kill the machine. |
| 19 | * | 19 | * |
diff --git a/drivers/sbus/char/max1617.h b/drivers/sbus/char/max1617.h index 0bb09c286cb4..cd30819a0a30 100644 --- a/drivers/sbus/char/max1617.h +++ b/drivers/sbus/char/max1617.h | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | #define MAX1617_CPU_TEMP 0x01 /* Processor die temp in C */ | 6 | #define MAX1617_CPU_TEMP 0x01 /* Processor die temp in C */ |
| 7 | #define MAX1617_STATUS 0x02 /* Chip status bits */ | 7 | #define MAX1617_STATUS 0x02 /* Chip status bits */ |
| 8 | 8 | ||
| 9 | /* Read-only versions of changable registers. */ | 9 | /* Read-only versions of changeable registers. */ |
| 10 | #define MAX1617_RD_CFG_BYTE 0x03 /* Config register */ | 10 | #define MAX1617_RD_CFG_BYTE 0x03 /* Config register */ |
| 11 | #define MAX1617_RD_CVRATE_BYTE 0x04 /* Temp conversion rate */ | 11 | #define MAX1617_RD_CVRATE_BYTE 0x04 /* Temp conversion rate */ |
| 12 | #define MAX1617_RD_AMB_HIGHLIM 0x05 /* Ambient high limit */ | 12 | #define MAX1617_RD_AMB_HIGHLIM 0x05 /* Ambient high limit */ |
diff --git a/drivers/scsi/3w-9xxx.h b/drivers/scsi/3w-9xxx.h index 3343824855d0..040f7214e5b7 100644 --- a/drivers/scsi/3w-9xxx.h +++ b/drivers/scsi/3w-9xxx.h | |||
| @@ -61,7 +61,7 @@ static twa_message_type twa_aen_table[] = { | |||
| 61 | {0x0000, "AEN queue empty"}, | 61 | {0x0000, "AEN queue empty"}, |
| 62 | {0x0001, "Controller reset occurred"}, | 62 | {0x0001, "Controller reset occurred"}, |
| 63 | {0x0002, "Degraded unit detected"}, | 63 | {0x0002, "Degraded unit detected"}, |
| 64 | {0x0003, "Controller error occured"}, | 64 | {0x0003, "Controller error occurred"}, |
| 65 | {0x0004, "Background rebuild failed"}, | 65 | {0x0004, "Background rebuild failed"}, |
| 66 | {0x0005, "Background rebuild done"}, | 66 | {0x0005, "Background rebuild done"}, |
| 67 | {0x0006, "Incomplete unit detected"}, | 67 | {0x0006, "Incomplete unit detected"}, |
diff --git a/drivers/scsi/3w-xxxx.h b/drivers/scsi/3w-xxxx.h index 8b9f9d17e7fe..49dcf03c631a 100644 --- a/drivers/scsi/3w-xxxx.h +++ b/drivers/scsi/3w-xxxx.h | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | 8 | ||
| 9 | Copyright (C) 1999-2010 3ware Inc. | 9 | Copyright (C) 1999-2010 3ware Inc. |
| 10 | 10 | ||
| 11 | Kernel compatiblity By: Andre Hedrick <andre@suse.com> | 11 | Kernel compatibility By: Andre Hedrick <andre@suse.com> |
| 12 | Non-Copyright (C) 2000 Andre Hedrick <andre@suse.com> | 12 | Non-Copyright (C) 2000 Andre Hedrick <andre@suse.com> |
| 13 | 13 | ||
| 14 | This program is free software; you can redistribute it and/or modify | 14 | This program is free software; you can redistribute it and/or modify |
diff --git a/drivers/scsi/53c700.scr b/drivers/scsi/53c700.scr index a064a092c604..ec822e3b7a27 100644 --- a/drivers/scsi/53c700.scr +++ b/drivers/scsi/53c700.scr | |||
| @@ -31,7 +31,7 @@ ABSOLUTE StatusAddress = 0 ; Addr to receive status return | |||
| 31 | ABSOLUTE ReceiveMsgAddress = 0 ; Addr to receive msg | 31 | ABSOLUTE ReceiveMsgAddress = 0 ; Addr to receive msg |
| 32 | ; | 32 | ; |
| 33 | ; This is the magic component for handling scatter-gather. Each of the | 33 | ; This is the magic component for handling scatter-gather. Each of the |
| 34 | ; SG components is preceeded by a script fragment which moves the | 34 | ; SG components is preceded by a script fragment which moves the |
| 35 | ; necessary amount of data and jumps to the next SG segment. The final | 35 | ; necessary amount of data and jumps to the next SG segment. The final |
| 36 | ; SG segment jumps back to . However, this address is the first SG script | 36 | ; SG segment jumps back to . However, this address is the first SG script |
| 37 | ; segment. | 37 | ; segment. |
diff --git a/drivers/scsi/53c700_d.h_shipped b/drivers/scsi/53c700_d.h_shipped index 0b42a51257f2..aa623da333c8 100644 --- a/drivers/scsi/53c700_d.h_shipped +++ b/drivers/scsi/53c700_d.h_shipped | |||
| @@ -34,7 +34,7 @@ ABSOLUTE StatusAddress = 0 ; Addr to receive status return | |||
| 34 | ABSOLUTE ReceiveMsgAddress = 0 ; Addr to receive msg | 34 | ABSOLUTE ReceiveMsgAddress = 0 ; Addr to receive msg |
| 35 | ; | 35 | ; |
| 36 | ; This is the magic component for handling scatter-gather. Each of the | 36 | ; This is the magic component for handling scatter-gather. Each of the |
| 37 | ; SG components is preceeded by a script fragment which moves the | 37 | ; SG components is preceded by a script fragment which moves the |
| 38 | ; necessary amount of data and jumps to the next SG segment. The final | 38 | ; necessary amount of data and jumps to the next SG segment. The final |
| 39 | ; SG segment jumps back to . However, this address is the first SG script | 39 | ; SG segment jumps back to . However, this address is the first SG script |
| 40 | ; segment. | 40 | ; segment. |
diff --git a/drivers/scsi/FlashPoint.c b/drivers/scsi/FlashPoint.c index e40cdfb7541f..dcd716d68600 100644 --- a/drivers/scsi/FlashPoint.c +++ b/drivers/scsi/FlashPoint.c | |||
| @@ -2509,7 +2509,7 @@ static void FPT_ssel(unsigned long port, unsigned char p_card) | |||
| 2509 | WR_HARPOON(port + hp_autostart_3, | 2509 | WR_HARPOON(port + hp_autostart_3, |
| 2510 | (SELECT + SELCHK_STRT)); | 2510 | (SELECT + SELCHK_STRT)); |
| 2511 | 2511 | ||
| 2512 | /* Setup our STATE so we know what happend when | 2512 | /* Setup our STATE so we know what happened when |
| 2513 | the wheels fall off. */ | 2513 | the wheels fall off. */ |
| 2514 | currSCCB->Sccb_scsistat = SELECT_ST; | 2514 | currSCCB->Sccb_scsistat = SELECT_ST; |
| 2515 | 2515 | ||
| @@ -2900,7 +2900,7 @@ static void FPT_SendMsg(unsigned long port, unsigned char message) | |||
| 2900 | * | 2900 | * |
| 2901 | * Function: FPT_sdecm | 2901 | * Function: FPT_sdecm |
| 2902 | * | 2902 | * |
| 2903 | * Description: Determine the proper responce to the message from the | 2903 | * Description: Determine the proper response to the message from the |
| 2904 | * target device. | 2904 | * target device. |
| 2905 | * | 2905 | * |
| 2906 | *---------------------------------------------------------------------*/ | 2906 | *---------------------------------------------------------------------*/ |
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index e7cd2fcbe036..165e4dd865d9 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c | |||
| @@ -1198,12 +1198,12 @@ static irqreturn_t NCR5380_intr(int dummy, void *dev_id) | |||
| 1198 | */ | 1198 | */ |
| 1199 | 1199 | ||
| 1200 | if ((NCR5380_read(MODE_REG) & MR_DMA) && ((basr & BASR_END_DMA_TRANSFER) || !(basr & BASR_PHASE_MATCH))) { | 1200 | if ((NCR5380_read(MODE_REG) & MR_DMA) && ((basr & BASR_END_DMA_TRANSFER) || !(basr & BASR_PHASE_MATCH))) { |
| 1201 | int transfered; | 1201 | int transferred; |
| 1202 | 1202 | ||
| 1203 | if (!hostdata->connected) | 1203 | if (!hostdata->connected) |
| 1204 | panic("scsi%d : received end of DMA interrupt with no connected cmd\n", instance->hostno); | 1204 | panic("scsi%d : received end of DMA interrupt with no connected cmd\n", instance->hostno); |
| 1205 | 1205 | ||
| 1206 | transfered = (hostdata->dmalen - NCR5380_dma_residual(instance)); | 1206 | transferred = (hostdata->dmalen - NCR5380_dma_residual(instance)); |
| 1207 | hostdata->connected->SCp.this_residual -= transferred; | 1207 | hostdata->connected->SCp.this_residual -= transferred; |
| 1208 | hostdata->connected->SCp.ptr += transferred; | 1208 | hostdata->connected->SCp.ptr += transferred; |
| 1209 | hostdata->dmalen = 0; | 1209 | hostdata->dmalen = 0; |
| @@ -1563,7 +1563,7 @@ failed: | |||
| 1563 | * bytes to transfer, **data - pointer to data pointer. | 1563 | * bytes to transfer, **data - pointer to data pointer. |
| 1564 | * | 1564 | * |
| 1565 | * Returns : -1 when different phase is entered without transferring | 1565 | * Returns : -1 when different phase is entered without transferring |
| 1566 | * maximum number of bytes, 0 if all bytes or transfered or exit | 1566 | * maximum number of bytes, 0 if all bytes or transferred or exit |
| 1567 | * is in same phase. | 1567 | * is in same phase. |
| 1568 | * | 1568 | * |
| 1569 | * Also, *phase, *count, *data are modified in place. | 1569 | * Also, *phase, *count, *data are modified in place. |
| @@ -1800,7 +1800,7 @@ static int do_abort(struct Scsi_Host *host) { | |||
| 1800 | * bytes to transfer, **data - pointer to data pointer. | 1800 | * bytes to transfer, **data - pointer to data pointer. |
| 1801 | * | 1801 | * |
| 1802 | * Returns : -1 when different phase is entered without transferring | 1802 | * Returns : -1 when different phase is entered without transferring |
| 1803 | * maximum number of bytes, 0 if all bytes or transfered or exit | 1803 | * maximum number of bytes, 0 if all bytes or transferred or exit |
| 1804 | * is in same phase. | 1804 | * is in same phase. |
| 1805 | * | 1805 | * |
| 1806 | * Also, *phase, *count, *data are modified in place. | 1806 | * Also, *phase, *count, *data are modified in place. |
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 118ce83a737c..061995741444 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c | |||
| @@ -747,8 +747,8 @@ char * get_container_type(unsigned tindex) | |||
| 747 | * Arguments: [1] pointer to void [1] int | 747 | * Arguments: [1] pointer to void [1] int |
| 748 | * | 748 | * |
| 749 | * Purpose: Sets SCSI inquiry data strings for vendor, product | 749 | * Purpose: Sets SCSI inquiry data strings for vendor, product |
| 750 | * and revision level. Allows strings to be set in platform dependant | 750 | * and revision level. Allows strings to be set in platform dependent |
| 751 | * files instead of in OS dependant driver source. | 751 | * files instead of in OS dependent driver source. |
| 752 | */ | 752 | */ |
| 753 | 753 | ||
| 754 | static void setinqstr(struct aac_dev *dev, void *data, int tindex) | 754 | static void setinqstr(struct aac_dev *dev, void *data, int tindex) |
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 29ab00016b78..ffb587817efc 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h | |||
| @@ -1259,7 +1259,7 @@ struct aac_dev | |||
| 1259 | #define CACHE_UNSTABLE 2 | 1259 | #define CACHE_UNSTABLE 2 |
| 1260 | 1260 | ||
| 1261 | /* | 1261 | /* |
| 1262 | * Lets the client know at which level the data was commited on | 1262 | * Lets the client know at which level the data was committed on |
| 1263 | * a write request | 1263 | * a write request |
| 1264 | */ | 1264 | */ |
| 1265 | 1265 | ||
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index dd7ad3ba2dad..e7d0d47b9185 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c | |||
| @@ -421,7 +421,7 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size, | |||
| 421 | if (!(hw_fib->header.XferState & cpu_to_le32(HostOwned))) | 421 | if (!(hw_fib->header.XferState & cpu_to_le32(HostOwned))) |
| 422 | return -EBUSY; | 422 | return -EBUSY; |
| 423 | /* | 423 | /* |
| 424 | * There are 5 cases with the wait and reponse requested flags. | 424 | * There are 5 cases with the wait and response requested flags. |
| 425 | * The only invalid cases are if the caller requests to wait and | 425 | * The only invalid cases are if the caller requests to wait and |
| 426 | * does not request a response and if the caller does not want a | 426 | * does not request a response and if the caller does not want a |
| 427 | * response and the Fib is not allocated from pool. If a response | 427 | * response and the Fib is not allocated from pool. If a response |
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 081c6de92bc5..bfd618a69499 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c | |||
| @@ -4544,7 +4544,7 @@ AscMemWordCopyPtrToLram(PortAddr iop_base, ushort s_addr, | |||
| 4544 | * Copy 4 bytes to LRAM. | 4544 | * Copy 4 bytes to LRAM. |
| 4545 | * | 4545 | * |
| 4546 | * The source data is assumed to be in little-endian order in memory | 4546 | * The source data is assumed to be in little-endian order in memory |
| 4547 | * and is maintained in little-endian order when writen to LRAM. | 4547 | * and is maintained in little-endian order when written to LRAM. |
| 4548 | */ | 4548 | */ |
| 4549 | static void | 4549 | static void |
| 4550 | AscMemDWordCopyPtrToLram(PortAddr iop_base, | 4550 | AscMemDWordCopyPtrToLram(PortAddr iop_base, |
diff --git a/drivers/scsi/aha1740.c b/drivers/scsi/aha1740.c index d058f1ab82b5..1c10b796c1a2 100644 --- a/drivers/scsi/aha1740.c +++ b/drivers/scsi/aha1740.c | |||
| @@ -461,7 +461,7 @@ static int aha1740_queuecommand_lck(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *) | |||
| 461 | /* The Adaptec Spec says the card is so fast that the loops | 461 | /* The Adaptec Spec says the card is so fast that the loops |
| 462 | will only be executed once in the code below. Even if this | 462 | will only be executed once in the code below. Even if this |
| 463 | was true with the fastest processors when the spec was | 463 | was true with the fastest processors when the spec was |
| 464 | written, it doesn't seem to be true with todays fast | 464 | written, it doesn't seem to be true with today's fast |
| 465 | processors. We print a warning if the code is executed more | 465 | processors. We print a warning if the code is executed more |
| 466 | often than LOOPCNT_WARN. If this happens, it should be | 466 | often than LOOPCNT_WARN. If this happens, it should be |
| 467 | investigated. If the count reaches LOOPCNT_MAX, we assume | 467 | investigated. If the count reaches LOOPCNT_MAX, we assume |
diff --git a/drivers/scsi/aic7xxx/aic79xx.h b/drivers/scsi/aic7xxx/aic79xx.h index 95ee50385188..9b059422aacb 100644 --- a/drivers/scsi/aic7xxx/aic79xx.h +++ b/drivers/scsi/aic7xxx/aic79xx.h | |||
| @@ -473,7 +473,7 @@ struct hardware_scb { | |||
| 473 | * o A residual has occurred if SG_FULL_RESID is set in sgptr, | 473 | * o A residual has occurred if SG_FULL_RESID is set in sgptr, |
| 474 | * or residual_sgptr does not have SG_LIST_NULL set. | 474 | * or residual_sgptr does not have SG_LIST_NULL set. |
| 475 | * | 475 | * |
| 476 | * o We are transfering the last segment if residual_datacnt has | 476 | * o We are transferring the last segment if residual_datacnt has |
| 477 | * the SG_LAST_SEG flag set. | 477 | * the SG_LAST_SEG flag set. |
| 478 | * | 478 | * |
| 479 | * Host: | 479 | * Host: |
| @@ -516,7 +516,7 @@ struct hardware_scb { | |||
| 516 | */ | 516 | */ |
| 517 | 517 | ||
| 518 | /* | 518 | /* |
| 519 | * Definition of a scatter/gather element as transfered to the controller. | 519 | * Definition of a scatter/gather element as transferred to the controller. |
| 520 | * The aic7xxx chips only support a 24bit length. We use the top byte of | 520 | * The aic7xxx chips only support a 24bit length. We use the top byte of |
| 521 | * the length to store additional address bits and a flag to indicate | 521 | * the length to store additional address bits and a flag to indicate |
| 522 | * that a given segment terminates the transfer. This gives us an | 522 | * that a given segment terminates the transfer. This gives us an |
diff --git a/drivers/scsi/aic7xxx/aic79xx.reg b/drivers/scsi/aic7xxx/aic79xx.reg index 0666c22ab55b..7e12c31ccfda 100644 --- a/drivers/scsi/aic7xxx/aic79xx.reg +++ b/drivers/scsi/aic7xxx/aic79xx.reg | |||
| @@ -305,7 +305,7 @@ register HS_MAILBOX { | |||
| 305 | } | 305 | } |
| 306 | 306 | ||
| 307 | /* | 307 | /* |
| 308 | * Sequencer Interupt Status | 308 | * Sequencer Interrupt Status |
| 309 | */ | 309 | */ |
| 310 | register SEQINTSTAT { | 310 | register SEQINTSTAT { |
| 311 | address 0x00C | 311 | address 0x00C |
| @@ -685,7 +685,7 @@ register DCHRXMSG0 { | |||
| 685 | } | 685 | } |
| 686 | 686 | ||
| 687 | /* | 687 | /* |
| 688 | * CMC Recieve Message 0 | 688 | * CMC Receive Message 0 |
| 689 | */ | 689 | */ |
| 690 | register CMCRXMSG0 { | 690 | register CMCRXMSG0 { |
| 691 | address 0x090 | 691 | address 0x090 |
| @@ -696,7 +696,7 @@ register CMCRXMSG0 { | |||
| 696 | } | 696 | } |
| 697 | 697 | ||
| 698 | /* | 698 | /* |
| 699 | * Overlay Recieve Message 0 | 699 | * Overlay Receive Message 0 |
| 700 | */ | 700 | */ |
| 701 | register OVLYRXMSG0 { | 701 | register OVLYRXMSG0 { |
| 702 | address 0x090 | 702 | address 0x090 |
| @@ -732,7 +732,7 @@ register DCHRXMSG1 { | |||
| 732 | } | 732 | } |
| 733 | 733 | ||
| 734 | /* | 734 | /* |
| 735 | * CMC Recieve Message 1 | 735 | * CMC Receive Message 1 |
| 736 | */ | 736 | */ |
| 737 | register CMCRXMSG1 { | 737 | register CMCRXMSG1 { |
| 738 | address 0x091 | 738 | address 0x091 |
| @@ -742,7 +742,7 @@ register CMCRXMSG1 { | |||
| 742 | } | 742 | } |
| 743 | 743 | ||
| 744 | /* | 744 | /* |
| 745 | * Overlay Recieve Message 1 | 745 | * Overlay Receive Message 1 |
| 746 | */ | 746 | */ |
| 747 | register OVLYRXMSG1 { | 747 | register OVLYRXMSG1 { |
| 748 | address 0x091 | 748 | address 0x091 |
| @@ -777,7 +777,7 @@ register DCHRXMSG2 { | |||
| 777 | } | 777 | } |
| 778 | 778 | ||
| 779 | /* | 779 | /* |
| 780 | * CMC Recieve Message 2 | 780 | * CMC Receive Message 2 |
| 781 | */ | 781 | */ |
| 782 | register CMCRXMSG2 { | 782 | register CMCRXMSG2 { |
| 783 | address 0x092 | 783 | address 0x092 |
| @@ -787,7 +787,7 @@ register CMCRXMSG2 { | |||
| 787 | } | 787 | } |
| 788 | 788 | ||
| 789 | /* | 789 | /* |
| 790 | * Overlay Recieve Message 2 | 790 | * Overlay Receive Message 2 |
| 791 | */ | 791 | */ |
| 792 | register OVLYRXMSG2 { | 792 | register OVLYRXMSG2 { |
| 793 | address 0x092 | 793 | address 0x092 |
| @@ -816,7 +816,7 @@ register DCHRXMSG3 { | |||
| 816 | } | 816 | } |
| 817 | 817 | ||
| 818 | /* | 818 | /* |
| 819 | * CMC Recieve Message 3 | 819 | * CMC Receive Message 3 |
| 820 | */ | 820 | */ |
| 821 | register CMCRXMSG3 { | 821 | register CMCRXMSG3 { |
| 822 | address 0x093 | 822 | address 0x093 |
| @@ -826,7 +826,7 @@ register CMCRXMSG3 { | |||
| 826 | } | 826 | } |
| 827 | 827 | ||
| 828 | /* | 828 | /* |
| 829 | * Overlay Recieve Message 3 | 829 | * Overlay Receive Message 3 |
| 830 | */ | 830 | */ |
| 831 | register OVLYRXMSG3 { | 831 | register OVLYRXMSG3 { |
| 832 | address 0x093 | 832 | address 0x093 |
| @@ -1249,7 +1249,7 @@ register TARGPCISTAT { | |||
| 1249 | 1249 | ||
| 1250 | /* | 1250 | /* |
| 1251 | * LQ Packet In | 1251 | * LQ Packet In |
| 1252 | * The last LQ Packet recieved | 1252 | * The last LQ Packet received |
| 1253 | */ | 1253 | */ |
| 1254 | register LQIN { | 1254 | register LQIN { |
| 1255 | address 0x020 | 1255 | address 0x020 |
| @@ -2573,7 +2573,7 @@ register IOPDNCTL { | |||
| 2573 | } | 2573 | } |
| 2574 | 2574 | ||
| 2575 | /* | 2575 | /* |
| 2576 | * Shaddow Host Address. | 2576 | * Shadow Host Address. |
| 2577 | */ | 2577 | */ |
| 2578 | register SHADDR { | 2578 | register SHADDR { |
| 2579 | address 0x060 | 2579 | address 0x060 |
| @@ -3983,7 +3983,7 @@ scratch_ram { | |||
| 3983 | 3983 | ||
| 3984 | /* | 3984 | /* |
| 3985 | * The maximum amount of time to wait, when interrupt coalescing | 3985 | * The maximum amount of time to wait, when interrupt coalescing |
| 3986 | * is enabled, before issueing a CMDCMPLT interrupt for a completed | 3986 | * is enabled, before issuing a CMDCMPLT interrupt for a completed |
| 3987 | * command. | 3987 | * command. |
| 3988 | */ | 3988 | */ |
| 3989 | INT_COALESCING_TIMER { | 3989 | INT_COALESCING_TIMER { |
diff --git a/drivers/scsi/aic7xxx/aic79xx.seq b/drivers/scsi/aic7xxx/aic79xx.seq index 2fb78e35a9e5..3a36d9362a10 100644 --- a/drivers/scsi/aic7xxx/aic79xx.seq +++ b/drivers/scsi/aic7xxx/aic79xx.seq | |||
| @@ -567,7 +567,7 @@ BEGIN_CRITICAL; | |||
| 567 | shr SELOID, 4, SCB_SCSIID; | 567 | shr SELOID, 4, SCB_SCSIID; |
| 568 | /* | 568 | /* |
| 569 | * If we want to send a message to the device, ensure | 569 | * If we want to send a message to the device, ensure |
| 570 | * we are selecting with atn irregardless of our packetized | 570 | * we are selecting with atn regardless of our packetized |
| 571 | * agreement. Since SPI4 only allows target reset or PPR | 571 | * agreement. Since SPI4 only allows target reset or PPR |
| 572 | * messages if this is a packetized connection, the change | 572 | * messages if this is a packetized connection, the change |
| 573 | * to our negotiation table entry for this selection will | 573 | * to our negotiation table entry for this selection will |
| @@ -960,7 +960,7 @@ p_status_okay: | |||
| 960 | * This is done to allow the host to send messages outside of an identify | 960 | * This is done to allow the host to send messages outside of an identify |
| 961 | * sequence while protecting the seqencer from testing the MK_MESSAGE bit | 961 | * sequence while protecting the seqencer from testing the MK_MESSAGE bit |
| 962 | * on an SCB that might not be for the current nexus. (For example, a | 962 | * on an SCB that might not be for the current nexus. (For example, a |
| 963 | * BDR message in responce to a bad reselection would leave us pointed to | 963 | * BDR message in response to a bad reselection would leave us pointed to |
| 964 | * an SCB that doesn't have anything to do with the current target). | 964 | * an SCB that doesn't have anything to do with the current target). |
| 965 | * | 965 | * |
| 966 | * Otherwise, treat MSG_OUT as a 1 byte message to send (abort, abort tag, | 966 | * Otherwise, treat MSG_OUT as a 1 byte message to send (abort, abort tag, |
| @@ -1507,7 +1507,7 @@ service_fifo: | |||
| 1507 | * If the other FIFO needs loading, then it | 1507 | * If the other FIFO needs loading, then it |
| 1508 | * must not have claimed the S/G cache yet | 1508 | * must not have claimed the S/G cache yet |
| 1509 | * (SG_CACHE_AVAIL would have been cleared in | 1509 | * (SG_CACHE_AVAIL would have been cleared in |
| 1510 | * the orginal FIFO mode and we test this above). | 1510 | * the original FIFO mode and we test this above). |
| 1511 | * Return to the idle loop so we can process the | 1511 | * Return to the idle loop so we can process the |
| 1512 | * FIFO not currently on the bus first. | 1512 | * FIFO not currently on the bus first. |
| 1513 | */ | 1513 | */ |
| @@ -1521,7 +1521,7 @@ idle_sgfetch_okay: | |||
| 1521 | idle_sgfetch_start: | 1521 | idle_sgfetch_start: |
| 1522 | /* | 1522 | /* |
| 1523 | * We fetch a "cacheline aligned" and sized amount of data | 1523 | * We fetch a "cacheline aligned" and sized amount of data |
| 1524 | * so we don't end up referencing a non-existant page. | 1524 | * so we don't end up referencing a non-existent page. |
| 1525 | * Cacheline aligned is in quotes because the kernel will | 1525 | * Cacheline aligned is in quotes because the kernel will |
| 1526 | * set the prefetch amount to a reasonable level if the | 1526 | * set the prefetch amount to a reasonable level if the |
| 1527 | * cacheline size is unknown. | 1527 | * cacheline size is unknown. |
| @@ -1551,7 +1551,7 @@ idle_sg_avail: | |||
| 1551 | test DFSTATUS, PRELOAD_AVAIL jz return; | 1551 | test DFSTATUS, PRELOAD_AVAIL jz return; |
| 1552 | /* | 1552 | /* |
| 1553 | * On the A, preloading a segment before HDMAENACK | 1553 | * On the A, preloading a segment before HDMAENACK |
| 1554 | * comes true can clobber the shaddow address of the | 1554 | * comes true can clobber the shadow address of the |
| 1555 | * first segment in the S/G FIFO. Wait until it is | 1555 | * first segment in the S/G FIFO. Wait until it is |
| 1556 | * safe to proceed. | 1556 | * safe to proceed. |
| 1557 | */ | 1557 | */ |
| @@ -2004,10 +2004,10 @@ pkt_handle_xfer: | |||
| 2004 | * Defer handling of this NONPACKREQ until we | 2004 | * Defer handling of this NONPACKREQ until we |
| 2005 | * can be sure it pertains to this FIFO. SAVEPTRS | 2005 | * can be sure it pertains to this FIFO. SAVEPTRS |
| 2006 | * will not be asserted if the NONPACKREQ is for us, | 2006 | * will not be asserted if the NONPACKREQ is for us, |
| 2007 | * so we must simulate it if shaddow is valid. If | 2007 | * so we must simulate it if shadow is valid. If |
| 2008 | * shaddow is not valid, keep running this FIFO until we | 2008 | * shadow is not valid, keep running this FIFO until we |
| 2009 | * have satisfied the transfer by loading segments and | 2009 | * have satisfied the transfer by loading segments and |
| 2010 | * waiting for either shaddow valid or last_seg_done. | 2010 | * waiting for either shadow valid or last_seg_done. |
| 2011 | */ | 2011 | */ |
| 2012 | test MDFFSTAT, SHVALID jnz pkt_saveptrs; | 2012 | test MDFFSTAT, SHVALID jnz pkt_saveptrs; |
| 2013 | pkt_service_fifo: | 2013 | pkt_service_fifo: |
| @@ -2171,7 +2171,7 @@ pkt_status_check_nonpackreq: | |||
| 2171 | /* | 2171 | /* |
| 2172 | * The unexpected nonpkt phase handler assumes that any | 2172 | * The unexpected nonpkt phase handler assumes that any |
| 2173 | * data channel use will have a FIFO reference count. It | 2173 | * data channel use will have a FIFO reference count. It |
| 2174 | * turns out that the status handler doesn't need a refernce | 2174 | * turns out that the status handler doesn't need a references |
| 2175 | * count since the status received flag, and thus completion | 2175 | * count since the status received flag, and thus completion |
| 2176 | * processing, cannot be set until the handler is finished. | 2176 | * processing, cannot be set until the handler is finished. |
| 2177 | * We increment the count here to make the nonpkt handler | 2177 | * We increment the count here to make the nonpkt handler |
diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c index 3233bf564435..5f8617dd43bb 100644 --- a/drivers/scsi/aic7xxx/aic79xx_core.c +++ b/drivers/scsi/aic7xxx/aic79xx_core.c | |||
| @@ -562,7 +562,7 @@ ahd_targetcmd_offset(struct ahd_softc *ahd, u_int index) | |||
| 562 | } | 562 | } |
| 563 | #endif | 563 | #endif |
| 564 | 564 | ||
| 565 | /*********************** Miscelaneous Support Functions ***********************/ | 565 | /*********************** Miscellaneous Support Functions ***********************/ |
| 566 | /* | 566 | /* |
| 567 | * Return pointers to the transfer negotiation information | 567 | * Return pointers to the transfer negotiation information |
| 568 | * for the specified our_id/remote_id pair. | 568 | * for the specified our_id/remote_id pair. |
| @@ -599,7 +599,7 @@ void | |||
| 599 | ahd_outw(struct ahd_softc *ahd, u_int port, u_int value) | 599 | ahd_outw(struct ahd_softc *ahd, u_int port, u_int value) |
| 600 | { | 600 | { |
| 601 | /* | 601 | /* |
| 602 | * Write low byte first to accomodate registers | 602 | * Write low byte first to accommodate registers |
| 603 | * such as PRGMCNT where the order maters. | 603 | * such as PRGMCNT where the order maters. |
| 604 | */ | 604 | */ |
| 605 | ahd_outb(ahd, port, value & 0xFF); | 605 | ahd_outb(ahd, port, value & 0xFF); |
| @@ -2067,7 +2067,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) | |||
| 2067 | * that requires host assistance for completion. | 2067 | * that requires host assistance for completion. |
| 2068 | * While handling the message phase(s), we will be | 2068 | * While handling the message phase(s), we will be |
| 2069 | * notified by the sequencer after each byte is | 2069 | * notified by the sequencer after each byte is |
| 2070 | * transfered so we can track bus phase changes. | 2070 | * transferred so we can track bus phase changes. |
| 2071 | * | 2071 | * |
| 2072 | * If this is the first time we've seen a HOST_MSG_LOOP | 2072 | * If this is the first time we've seen a HOST_MSG_LOOP |
| 2073 | * interrupt, initialize the state of the host message | 2073 | * interrupt, initialize the state of the host message |
| @@ -2487,7 +2487,7 @@ ahd_handle_scsiint(struct ahd_softc *ahd, u_int intstat) | |||
| 2487 | /* | 2487 | /* |
| 2488 | * Although the driver does not care about the | 2488 | * Although the driver does not care about the |
| 2489 | * 'Selection in Progress' status bit, the busy | 2489 | * 'Selection in Progress' status bit, the busy |
| 2490 | * LED does. SELINGO is only cleared by a successfull | 2490 | * LED does. SELINGO is only cleared by a successful |
| 2491 | * selection, so we must manually clear it to insure | 2491 | * selection, so we must manually clear it to insure |
| 2492 | * the LED turns off just incase no future successful | 2492 | * the LED turns off just incase no future successful |
| 2493 | * selections occur (e.g. no devices on the bus). | 2493 | * selections occur (e.g. no devices on the bus). |
| @@ -3548,7 +3548,7 @@ ahd_clear_critical_section(struct ahd_softc *ahd) | |||
| 3548 | ahd_outb(ahd, SEQCTL0, ahd_inb(ahd, SEQCTL0) & ~STEP); | 3548 | ahd_outb(ahd, SEQCTL0, ahd_inb(ahd, SEQCTL0) & ~STEP); |
| 3549 | ahd_outb(ahd, SIMODE1, simode1); | 3549 | ahd_outb(ahd, SIMODE1, simode1); |
| 3550 | /* | 3550 | /* |
| 3551 | * SCSIINT seems to glitch occassionally when | 3551 | * SCSIINT seems to glitch occasionally when |
| 3552 | * the interrupt masks are restored. Clear SCSIINT | 3552 | * the interrupt masks are restored. Clear SCSIINT |
| 3553 | * one more time so that only persistent errors | 3553 | * one more time so that only persistent errors |
| 3554 | * are seen as a real interrupt. | 3554 | * are seen as a real interrupt. |
| @@ -3838,7 +3838,7 @@ ahd_validate_width(struct ahd_softc *ahd, struct ahd_initiator_tinfo *tinfo, | |||
| 3838 | 3838 | ||
| 3839 | /* | 3839 | /* |
| 3840 | * Update the bitmask of targets for which the controller should | 3840 | * Update the bitmask of targets for which the controller should |
| 3841 | * negotiate with at the next convenient oportunity. This currently | 3841 | * negotiate with at the next convenient opportunity. This currently |
| 3842 | * means the next time we send the initial identify messages for | 3842 | * means the next time we send the initial identify messages for |
| 3843 | * a new transaction. | 3843 | * a new transaction. |
| 3844 | */ | 3844 | */ |
| @@ -4200,7 +4200,7 @@ ahd_update_neg_table(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, | |||
| 4200 | 4200 | ||
| 4201 | /* | 4201 | /* |
| 4202 | * During packetized transfers, the target will | 4202 | * During packetized transfers, the target will |
| 4203 | * give us the oportunity to send command packets | 4203 | * give us the opportunity to send command packets |
| 4204 | * without us asserting attention. | 4204 | * without us asserting attention. |
| 4205 | */ | 4205 | */ |
| 4206 | if ((tinfo->ppr_options & MSG_EXT_PPR_IU_REQ) == 0) | 4206 | if ((tinfo->ppr_options & MSG_EXT_PPR_IU_REQ) == 0) |
| @@ -5651,7 +5651,7 @@ ahd_handle_msg_reject(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) | |||
| 5651 | 5651 | ||
| 5652 | /* | 5652 | /* |
| 5653 | * Requeue all tagged commands for this target | 5653 | * Requeue all tagged commands for this target |
| 5654 | * currently in our posession so they can be | 5654 | * currently in our possession so they can be |
| 5655 | * converted to untagged commands. | 5655 | * converted to untagged commands. |
| 5656 | */ | 5656 | */ |
| 5657 | ahd_search_qinfifo(ahd, SCB_GET_TARGET(ahd, scb), | 5657 | ahd_search_qinfifo(ahd, SCB_GET_TARGET(ahd, scb), |
| @@ -6245,7 +6245,7 @@ ahd_shutdown(void *arg) | |||
| 6245 | /* | 6245 | /* |
| 6246 | * Reset the controller and record some information about it | 6246 | * Reset the controller and record some information about it |
| 6247 | * that is only available just after a reset. If "reinit" is | 6247 | * that is only available just after a reset. If "reinit" is |
| 6248 | * non-zero, this reset occured after initial configuration | 6248 | * non-zero, this reset occurred after initial configuration |
| 6249 | * and the caller requests that the chip be fully reinitialized | 6249 | * and the caller requests that the chip be fully reinitialized |
| 6250 | * to a runable state. Chip interrupts are *not* enabled after | 6250 | * to a runable state. Chip interrupts are *not* enabled after |
| 6251 | * a reinitialization. The caller must enable interrupts via | 6251 | * a reinitialization. The caller must enable interrupts via |
| @@ -6495,7 +6495,7 @@ ahd_init_scbdata(struct ahd_softc *ahd) | |||
| 6495 | } | 6495 | } |
| 6496 | 6496 | ||
| 6497 | /* | 6497 | /* |
| 6498 | * Note that we were successfull | 6498 | * Note that we were successful |
| 6499 | */ | 6499 | */ |
| 6500 | return (0); | 6500 | return (0); |
| 6501 | 6501 | ||
| @@ -7079,7 +7079,7 @@ ahd_init(struct ahd_softc *ahd) | |||
| 7079 | return (ENOMEM); | 7079 | return (ENOMEM); |
| 7080 | 7080 | ||
| 7081 | /* | 7081 | /* |
| 7082 | * Verify that the compiler hasn't over-agressively | 7082 | * Verify that the compiler hasn't over-aggressively |
| 7083 | * padded important structures. | 7083 | * padded important structures. |
| 7084 | */ | 7084 | */ |
| 7085 | if (sizeof(struct hardware_scb) != 64) | 7085 | if (sizeof(struct hardware_scb) != 64) |
| @@ -10087,7 +10087,7 @@ ahd_write_seeprom(struct ahd_softc *ahd, uint16_t *buf, | |||
| 10087 | return (error); | 10087 | return (error); |
| 10088 | 10088 | ||
| 10089 | /* | 10089 | /* |
| 10090 | * Write the data. If we don't get throught the loop at | 10090 | * Write the data. If we don't get through the loop at |
| 10091 | * least once, the arguments were invalid. | 10091 | * least once, the arguments were invalid. |
| 10092 | */ | 10092 | */ |
| 10093 | retval = EINVAL; | 10093 | retval = EINVAL; |
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c index 25d066624476..7d48700257a7 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c | |||
| @@ -1441,7 +1441,7 @@ ahd_platform_set_tags(struct ahd_softc *ahd, struct scsi_device *sdev, | |||
| 1441 | usertags = ahd_linux_user_tagdepth(ahd, devinfo); | 1441 | usertags = ahd_linux_user_tagdepth(ahd, devinfo); |
| 1442 | if (!was_queuing) { | 1442 | if (!was_queuing) { |
| 1443 | /* | 1443 | /* |
| 1444 | * Start out agressively and allow our | 1444 | * Start out aggressively and allow our |
| 1445 | * dynamic queue depth algorithm to take | 1445 | * dynamic queue depth algorithm to take |
| 1446 | * care of the rest. | 1446 | * care of the rest. |
| 1447 | */ | 1447 | */ |
diff --git a/drivers/scsi/aic7xxx/aic7xxx.h b/drivers/scsi/aic7xxx/aic7xxx.h index 17444bc18bca..f695774645c1 100644 --- a/drivers/scsi/aic7xxx/aic7xxx.h +++ b/drivers/scsi/aic7xxx/aic7xxx.h | |||
| @@ -440,7 +440,7 @@ struct hardware_scb { | |||
| 440 | * o A residual has occurred if SG_FULL_RESID is set in sgptr, | 440 | * o A residual has occurred if SG_FULL_RESID is set in sgptr, |
| 441 | * or residual_sgptr does not have SG_LIST_NULL set. | 441 | * or residual_sgptr does not have SG_LIST_NULL set. |
| 442 | * | 442 | * |
| 443 | * o We are transfering the last segment if residual_datacnt has | 443 | * o We are transferring the last segment if residual_datacnt has |
| 444 | * the SG_LAST_SEG flag set. | 444 | * the SG_LAST_SEG flag set. |
| 445 | * | 445 | * |
| 446 | * Host: | 446 | * Host: |
| @@ -494,7 +494,7 @@ struct hardware_scb { | |||
| 494 | */ | 494 | */ |
| 495 | 495 | ||
| 496 | /* | 496 | /* |
| 497 | * Definition of a scatter/gather element as transfered to the controller. | 497 | * Definition of a scatter/gather element as transferred to the controller. |
| 498 | * The aic7xxx chips only support a 24bit length. We use the top byte of | 498 | * The aic7xxx chips only support a 24bit length. We use the top byte of |
| 499 | * the length to store additional address bits and a flag to indicate | 499 | * the length to store additional address bits and a flag to indicate |
| 500 | * that a given segment terminates the transfer. This gives us an | 500 | * that a given segment terminates the transfer. This gives us an |
diff --git a/drivers/scsi/aic7xxx/aic7xxx.reg b/drivers/scsi/aic7xxx/aic7xxx.reg index 9a96e55da39a..ba0b411d03e2 100644 --- a/drivers/scsi/aic7xxx/aic7xxx.reg +++ b/drivers/scsi/aic7xxx/aic7xxx.reg | |||
| @@ -351,7 +351,7 @@ register SSTAT2 { | |||
| 351 | address 0x00d | 351 | address 0x00d |
| 352 | access_mode RO | 352 | access_mode RO |
| 353 | field OVERRUN 0x80 | 353 | field OVERRUN 0x80 |
| 354 | field SHVALID 0x40 /* Shaddow Layer non-zero */ | 354 | field SHVALID 0x40 /* Shadow Layer non-zero */ |
| 355 | field EXP_ACTIVE 0x10 /* SCSI Expander Active */ | 355 | field EXP_ACTIVE 0x10 /* SCSI Expander Active */ |
| 356 | field CRCVALERR 0x08 /* CRC doesn't match (U3 only) */ | 356 | field CRCVALERR 0x08 /* CRC doesn't match (U3 only) */ |
| 357 | field CRCENDERR 0x04 /* No terminal CRC packet (U3 only) */ | 357 | field CRCENDERR 0x04 /* No terminal CRC packet (U3 only) */ |
diff --git a/drivers/scsi/aic7xxx/aic7xxx.seq b/drivers/scsi/aic7xxx/aic7xxx.seq index 5a4cfc954a9f..e60041e8f2d1 100644 --- a/drivers/scsi/aic7xxx/aic7xxx.seq +++ b/drivers/scsi/aic7xxx/aic7xxx.seq | |||
| @@ -57,10 +57,10 @@ PREFIX = "ahc_" | |||
| 57 | * a later time. This problem cannot be resolved by holding a single entry | 57 | * a later time. This problem cannot be resolved by holding a single entry |
| 58 | * in scratch ram since a reconnecting target can request sense and this will | 58 | * in scratch ram since a reconnecting target can request sense and this will |
| 59 | * create yet another SCB waiting for selection. The solution used here is to | 59 | * create yet another SCB waiting for selection. The solution used here is to |
| 60 | * use byte 27 of the SCB as a psuedo-next pointer and to thread a list | 60 | * use byte 27 of the SCB as a pseudo-next pointer and to thread a list |
| 61 | * of SCBs that are awaiting selection. Since 0-0xfe are valid SCB indexes, | 61 | * of SCBs that are awaiting selection. Since 0-0xfe are valid SCB indexes, |
| 62 | * SCB_LIST_NULL is 0xff which is out of range. An entry is also added to | 62 | * SCB_LIST_NULL is 0xff which is out of range. An entry is also added to |
| 63 | * this list everytime a request sense occurs or after completing a non-tagged | 63 | * this list every time a request sense occurs or after completing a non-tagged |
| 64 | * command for which a second SCB has been queued. The sequencer will | 64 | * command for which a second SCB has been queued. The sequencer will |
| 65 | * automatically consume the entries. | 65 | * automatically consume the entries. |
| 66 | */ | 66 | */ |
| @@ -752,7 +752,7 @@ idle_loop: | |||
| 752 | 752 | ||
| 753 | /* | 753 | /* |
| 754 | * We fetch a "cacheline aligned" and sized amount of data | 754 | * We fetch a "cacheline aligned" and sized amount of data |
| 755 | * so we don't end up referencing a non-existant page. | 755 | * so we don't end up referencing a non-existent page. |
| 756 | * Cacheline aligned is in quotes because the kernel will | 756 | * Cacheline aligned is in quotes because the kernel will |
| 757 | * set the prefetch amount to a reasonable level if the | 757 | * set the prefetch amount to a reasonable level if the |
| 758 | * cacheline size is unknown. | 758 | * cacheline size is unknown. |
| @@ -1485,7 +1485,7 @@ p_status_okay: | |||
| 1485 | * This is done to allow the host to send messages outside of an identify | 1485 | * This is done to allow the host to send messages outside of an identify |
| 1486 | * sequence while protecting the seqencer from testing the MK_MESSAGE bit | 1486 | * sequence while protecting the seqencer from testing the MK_MESSAGE bit |
| 1487 | * on an SCB that might not be for the current nexus. (For example, a | 1487 | * on an SCB that might not be for the current nexus. (For example, a |
| 1488 | * BDR message in responce to a bad reselection would leave us pointed to | 1488 | * BDR message in response to a bad reselection would leave us pointed to |
| 1489 | * an SCB that doesn't have anything to do with the current target). | 1489 | * an SCB that doesn't have anything to do with the current target). |
| 1490 | * | 1490 | * |
| 1491 | * Otherwise, treat MSG_OUT as a 1 byte message to send (abort, abort tag, | 1491 | * Otherwise, treat MSG_OUT as a 1 byte message to send (abort, abort tag, |
| @@ -1999,7 +1999,7 @@ if ((ahc->flags & AHC_TARGETROLE) != 0) { | |||
| 1999 | * from out to in, wait an additional data release delay before continuing. | 1999 | * from out to in, wait an additional data release delay before continuing. |
| 2000 | */ | 2000 | */ |
| 2001 | change_phase: | 2001 | change_phase: |
| 2002 | /* Wait for preceeding I/O session to complete. */ | 2002 | /* Wait for preceding I/O session to complete. */ |
| 2003 | test SCSISIGI, ACKI jnz .; | 2003 | test SCSISIGI, ACKI jnz .; |
| 2004 | 2004 | ||
| 2005 | /* Change the phase */ | 2005 | /* Change the phase */ |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c index e021b4812d58..dc28b0a91b22 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_core.c +++ b/drivers/scsi/aic7xxx/aic7xxx_core.c | |||
| @@ -427,7 +427,7 @@ ahc_targetcmd_offset(struct ahc_softc *ahc, u_int index) | |||
| 427 | } | 427 | } |
| 428 | #endif | 428 | #endif |
| 429 | 429 | ||
| 430 | /*********************** Miscelaneous Support Functions ***********************/ | 430 | /*********************** Miscellaneous Support Functions ***********************/ |
| 431 | /* | 431 | /* |
| 432 | * Determine whether the sequencer reported a residual | 432 | * Determine whether the sequencer reported a residual |
| 433 | * for this SCB/transaction. | 433 | * for this SCB/transaction. |
| @@ -1243,7 +1243,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) | |||
| 1243 | * that requires host assistance for completion. | 1243 | * that requires host assistance for completion. |
| 1244 | * While handling the message phase(s), we will be | 1244 | * While handling the message phase(s), we will be |
| 1245 | * notified by the sequencer after each byte is | 1245 | * notified by the sequencer after each byte is |
| 1246 | * transfered so we can track bus phase changes. | 1246 | * transferred so we can track bus phase changes. |
| 1247 | * | 1247 | * |
| 1248 | * If this is the first time we've seen a HOST_MSG_LOOP | 1248 | * If this is the first time we've seen a HOST_MSG_LOOP |
| 1249 | * interrupt, initialize the state of the host message | 1249 | * interrupt, initialize the state of the host message |
| @@ -1487,7 +1487,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) | |||
| 1487 | scbptr, ahc_inb(ahc, ARG_1), | 1487 | scbptr, ahc_inb(ahc, ARG_1), |
| 1488 | ahc->scb_data->hscbs[scbptr].tag); | 1488 | ahc->scb_data->hscbs[scbptr].tag); |
| 1489 | ahc_dump_card_state(ahc); | 1489 | ahc_dump_card_state(ahc); |
| 1490 | panic("for saftey"); | 1490 | panic("for safety"); |
| 1491 | break; | 1491 | break; |
| 1492 | } | 1492 | } |
| 1493 | case OUT_OF_RANGE: | 1493 | case OUT_OF_RANGE: |
| @@ -1733,7 +1733,7 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat) | |||
| 1733 | /* | 1733 | /* |
| 1734 | * Although the driver does not care about the | 1734 | * Although the driver does not care about the |
| 1735 | * 'Selection in Progress' status bit, the busy | 1735 | * 'Selection in Progress' status bit, the busy |
| 1736 | * LED does. SELINGO is only cleared by a successfull | 1736 | * LED does. SELINGO is only cleared by a successful |
| 1737 | * selection, so we must manually clear it to insure | 1737 | * selection, so we must manually clear it to insure |
| 1738 | * the LED turns off just incase no future successful | 1738 | * the LED turns off just incase no future successful |
| 1739 | * selections occur (e.g. no devices on the bus). | 1739 | * selections occur (e.g. no devices on the bus). |
| @@ -1943,7 +1943,7 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat) | |||
| 1943 | if (lastphase != P_BUSFREE) { | 1943 | if (lastphase != P_BUSFREE) { |
| 1944 | /* | 1944 | /* |
| 1945 | * Renegotiate with this device at the | 1945 | * Renegotiate with this device at the |
| 1946 | * next oportunity just in case this busfree | 1946 | * next opportunity just in case this busfree |
| 1947 | * is due to a negotiation mismatch with the | 1947 | * is due to a negotiation mismatch with the |
| 1948 | * device. | 1948 | * device. |
| 1949 | */ | 1949 | */ |
| @@ -2442,7 +2442,7 @@ ahc_validate_width(struct ahc_softc *ahc, struct ahc_initiator_tinfo *tinfo, | |||
| 2442 | 2442 | ||
| 2443 | /* | 2443 | /* |
| 2444 | * Update the bitmask of targets for which the controller should | 2444 | * Update the bitmask of targets for which the controller should |
| 2445 | * negotiate with at the next convenient oportunity. This currently | 2445 | * negotiate with at the next convenient opportunity. This currently |
| 2446 | * means the next time we send the initial identify messages for | 2446 | * means the next time we send the initial identify messages for |
| 2447 | * a new transaction. | 2447 | * a new transaction. |
| 2448 | */ | 2448 | */ |
| @@ -4131,7 +4131,7 @@ ahc_handle_msg_reject(struct ahc_softc *ahc, struct ahc_devinfo *devinfo) | |||
| 4131 | 4131 | ||
| 4132 | /* | 4132 | /* |
| 4133 | * Requeue all tagged commands for this target | 4133 | * Requeue all tagged commands for this target |
| 4134 | * currently in our posession so they can be | 4134 | * currently in our possession so they can be |
| 4135 | * converted to untagged commands. | 4135 | * converted to untagged commands. |
| 4136 | */ | 4136 | */ |
| 4137 | ahc_search_qinfifo(ahc, SCB_GET_TARGET(ahc, scb), | 4137 | ahc_search_qinfifo(ahc, SCB_GET_TARGET(ahc, scb), |
| @@ -4581,7 +4581,7 @@ ahc_shutdown(void *arg) | |||
| 4581 | /* | 4581 | /* |
| 4582 | * Reset the controller and record some information about it | 4582 | * Reset the controller and record some information about it |
| 4583 | * that is only available just after a reset. If "reinit" is | 4583 | * that is only available just after a reset. If "reinit" is |
| 4584 | * non-zero, this reset occured after initial configuration | 4584 | * non-zero, this reset occurred after initial configuration |
| 4585 | * and the caller requests that the chip be fully reinitialized | 4585 | * and the caller requests that the chip be fully reinitialized |
| 4586 | * to a runable state. Chip interrupts are *not* enabled after | 4586 | * to a runable state. Chip interrupts are *not* enabled after |
| 4587 | * a reinitialization. The caller must enable interrupts via | 4587 | * a reinitialization. The caller must enable interrupts via |
| @@ -4899,7 +4899,7 @@ ahc_init_scbdata(struct ahc_softc *ahc) | |||
| 4899 | ahc->next_queued_scb = ahc_get_scb(ahc); | 4899 | ahc->next_queued_scb = ahc_get_scb(ahc); |
| 4900 | 4900 | ||
| 4901 | /* | 4901 | /* |
| 4902 | * Note that we were successfull | 4902 | * Note that we were successful |
| 4903 | */ | 4903 | */ |
| 4904 | return (0); | 4904 | return (0); |
| 4905 | 4905 | ||
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index 4a359bb307c6..c6251bb4f438 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c | |||
| @@ -294,7 +294,7 @@ static uint32_t aic7xxx_extended; | |||
| 294 | * dubious at best. To my knowledge, this option has never actually | 294 | * dubious at best. To my knowledge, this option has never actually |
| 295 | * solved a PCI parity problem, but on certain machines with broken PCI | 295 | * solved a PCI parity problem, but on certain machines with broken PCI |
| 296 | * chipset configurations where stray PCI transactions with bad parity are | 296 | * chipset configurations where stray PCI transactions with bad parity are |
| 297 | * the norm rather than the exception, the error messages can be overwelming. | 297 | * the norm rather than the exception, the error messages can be overwhelming. |
| 298 | * It's included in the driver for completeness. | 298 | * It's included in the driver for completeness. |
| 299 | * 0 = Shut off PCI parity check | 299 | * 0 = Shut off PCI parity check |
| 300 | * non-0 = reverse polarity pci parity checking | 300 | * non-0 = reverse polarity pci parity checking |
| @@ -1318,7 +1318,7 @@ ahc_platform_set_tags(struct ahc_softc *ahc, struct scsi_device *sdev, | |||
| 1318 | usertags = ahc_linux_user_tagdepth(ahc, devinfo); | 1318 | usertags = ahc_linux_user_tagdepth(ahc, devinfo); |
| 1319 | if (!was_queuing) { | 1319 | if (!was_queuing) { |
| 1320 | /* | 1320 | /* |
| 1321 | * Start out agressively and allow our | 1321 | * Start out aggressively and allow our |
| 1322 | * dynamic queue depth algorithm to take | 1322 | * dynamic queue depth algorithm to take |
| 1323 | * care of the rest. | 1323 | * care of the rest. |
| 1324 | */ | 1324 | */ |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_pci.c b/drivers/scsi/aic7xxx/aic7xxx_pci.c index 2b11a4272364..6917b4f5ac9e 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_pci.c +++ b/drivers/scsi/aic7xxx/aic7xxx_pci.c | |||
| @@ -789,7 +789,7 @@ ahc_pci_config(struct ahc_softc *ahc, const struct ahc_pci_identity *entry) | |||
| 789 | ahc->bus_intr = ahc_pci_intr; | 789 | ahc->bus_intr = ahc_pci_intr; |
| 790 | ahc->bus_chip_init = ahc_pci_chip_init; | 790 | ahc->bus_chip_init = ahc_pci_chip_init; |
| 791 | 791 | ||
| 792 | /* Remeber how the card was setup in case there is no SEEPROM */ | 792 | /* Remember how the card was setup in case there is no SEEPROM */ |
| 793 | if ((ahc_inb(ahc, HCNTRL) & POWRDN) == 0) { | 793 | if ((ahc_inb(ahc, HCNTRL) & POWRDN) == 0) { |
| 794 | ahc_pause(ahc); | 794 | ahc_pause(ahc); |
| 795 | if ((ahc->features & AHC_ULTRA2) != 0) | 795 | if ((ahc->features & AHC_ULTRA2) != 0) |
| @@ -860,7 +860,7 @@ ahc_pci_config(struct ahc_softc *ahc, const struct ahc_pci_identity *entry) | |||
| 860 | } | 860 | } |
| 861 | 861 | ||
| 862 | /* | 862 | /* |
| 863 | * We cannot perform ULTRA speeds without the presense | 863 | * We cannot perform ULTRA speeds without the presence |
| 864 | * of the external precision resistor. | 864 | * of the external precision resistor. |
| 865 | */ | 865 | */ |
| 866 | if ((ahc->features & AHC_ULTRA) != 0) { | 866 | if ((ahc->features & AHC_ULTRA) != 0) { |
| @@ -969,7 +969,7 @@ ahc_pci_config(struct ahc_softc *ahc, const struct ahc_pci_identity *entry) | |||
| 969 | } | 969 | } |
| 970 | 970 | ||
| 971 | /* | 971 | /* |
| 972 | * Test for the presense of external sram in an | 972 | * Test for the presence of external sram in an |
| 973 | * "unshared" configuration. | 973 | * "unshared" configuration. |
| 974 | */ | 974 | */ |
| 975 | static int | 975 | static int |
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y index e4064433842e..f1586a437906 100644 --- a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y +++ b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y | |||
| @@ -803,7 +803,7 @@ macro_arglist: | |||
| 803 | | macro_arglist ',' T_ARG | 803 | | macro_arglist ',' T_ARG |
| 804 | { | 804 | { |
| 805 | if ($1 == 0) { | 805 | if ($1 == 0) { |
| 806 | stop("Comma without preceeding argument in arg list", | 806 | stop("Comma without preceding argument in arg list", |
| 807 | EX_DATAERR); | 807 | EX_DATAERR); |
| 808 | /* NOTREACHED */ | 808 | /* NOTREACHED */ |
| 809 | } | 809 | } |
| @@ -1319,8 +1319,8 @@ code: | |||
| 1319 | ; | 1319 | ; |
| 1320 | 1320 | ||
| 1321 | /* | 1321 | /* |
| 1322 | * This grammer differs from the one in the aic7xxx | 1322 | * This grammar differs from the one in the aic7xxx |
| 1323 | * reference manual since the grammer listed there is | 1323 | * reference manual since the grammar listed there is |
| 1324 | * ambiguous and causes a shift/reduce conflict. | 1324 | * ambiguous and causes a shift/reduce conflict. |
| 1325 | * It also seems more logical as the "immediate" | 1325 | * It also seems more logical as the "immediate" |
| 1326 | * argument is listed as the second arg like the | 1326 | * argument is listed as the second arg like the |
| @@ -1799,7 +1799,7 @@ format_3_instr(int opcode, symbol_ref_t *src, | |||
| 1799 | instr = seq_alloc(); | 1799 | instr = seq_alloc(); |
| 1800 | f3_instr = &instr->format.format3; | 1800 | f3_instr = &instr->format.format3; |
| 1801 | if (address->symbol == NULL) { | 1801 | if (address->symbol == NULL) { |
| 1802 | /* 'dot' referrence. Use the current instruction pointer */ | 1802 | /* 'dot' reference. Use the current instruction pointer */ |
| 1803 | addr = instruction_ptr + address->offset; | 1803 | addr = instruction_ptr + address->offset; |
| 1804 | } else if (address->symbol->type == UNINITIALIZED) { | 1804 | } else if (address->symbol->type == UNINITIALIZED) { |
| 1805 | /* forward reference */ | 1805 | /* forward reference */ |
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y b/drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y index ff46aa6801bf..708326df0766 100644 --- a/drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y +++ b/drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y | |||
| @@ -115,7 +115,7 @@ macro_arglist: | |||
| 115 | | macro_arglist ',' T_ARG | 115 | | macro_arglist ',' T_ARG |
| 116 | { | 116 | { |
| 117 | if ($1 == 0) { | 117 | if ($1 == 0) { |
| 118 | stop("Comma without preceeding argument in arg list", | 118 | stop("Comma without preceding argument in arg list", |
| 119 | EX_DATAERR); | 119 | EX_DATAERR); |
| 120 | /* NOTREACHED */ | 120 | /* NOTREACHED */ |
| 121 | } | 121 | } |
diff --git a/drivers/scsi/aic7xxx_old.c b/drivers/scsi/aic7xxx_old.c index 4ff60a08df0f..5b212f0df898 100644 --- a/drivers/scsi/aic7xxx_old.c +++ b/drivers/scsi/aic7xxx_old.c | |||
| @@ -905,7 +905,7 @@ struct aic_dev_data { | |||
| 905 | * problems with architectures I can't test on (because I don't have one, | 905 | * problems with architectures I can't test on (because I don't have one, |
| 906 | * such as the Alpha based systems) which happen to give faults for | 906 | * such as the Alpha based systems) which happen to give faults for |
| 907 | * non-aligned memory accesses, care was taken to align this structure | 907 | * non-aligned memory accesses, care was taken to align this structure |
| 908 | * in a way that gauranteed all accesses larger than 8 bits were aligned | 908 | * in a way that guaranteed all accesses larger than 8 bits were aligned |
| 909 | * on the appropriate boundary. It's also organized to try and be more | 909 | * on the appropriate boundary. It's also organized to try and be more |
| 910 | * cache line efficient. Be careful when changing this lest you might hurt | 910 | * cache line efficient. Be careful when changing this lest you might hurt |
| 911 | * overall performance and bring down the wrath of the masses. | 911 | * overall performance and bring down the wrath of the masses. |
| @@ -1180,7 +1180,7 @@ static int aic7xxx_pci_parity = 0; | |||
| 1180 | * the card's registers in a hex dump format tailored to each model of | 1180 | * the card's registers in a hex dump format tailored to each model of |
| 1181 | * controller. | 1181 | * controller. |
| 1182 | * | 1182 | * |
| 1183 | * NOTE: THE CONTROLLER IS LEFT IN AN UNUSEABLE STATE BY THIS OPTION. | 1183 | * NOTE: THE CONTROLLER IS LEFT IN AN UNUSABLE STATE BY THIS OPTION. |
| 1184 | * YOU CANNOT BOOT UP WITH THIS OPTION, IT IS FOR DEBUGGING PURPOSES | 1184 | * YOU CANNOT BOOT UP WITH THIS OPTION, IT IS FOR DEBUGGING PURPOSES |
| 1185 | * ONLY | 1185 | * ONLY |
| 1186 | */ | 1186 | */ |
| @@ -3467,7 +3467,7 @@ aic7xxx_reset_current_bus(struct aic7xxx_host *p) | |||
| 3467 | /* Turn off the bus' current operations, after all, we shouldn't have any | 3467 | /* Turn off the bus' current operations, after all, we shouldn't have any |
| 3468 | * valid commands left to cause a RSELI and SELO once we've tossed the | 3468 | * valid commands left to cause a RSELI and SELO once we've tossed the |
| 3469 | * bus away with this reset, so we might as well shut down the sequencer | 3469 | * bus away with this reset, so we might as well shut down the sequencer |
| 3470 | * until the bus is restarted as oppossed to saving the current settings | 3470 | * until the bus is restarted as opposed to saving the current settings |
| 3471 | * and restoring them (which makes no sense to me). */ | 3471 | * and restoring them (which makes no sense to me). */ |
| 3472 | 3472 | ||
| 3473 | /* Turn on the bus reset. */ | 3473 | /* Turn on the bus reset. */ |
| @@ -4070,7 +4070,7 @@ aic7xxx_handle_seqint(struct aic7xxx_host *p, unsigned char intstat) | |||
| 4070 | aic_dev->max_q_depth = aic_dev->temp_q_depth = 1; | 4070 | aic_dev->max_q_depth = aic_dev->temp_q_depth = 1; |
| 4071 | /* | 4071 | /* |
| 4072 | * We set this command up as a bus device reset. However, we have | 4072 | * We set this command up as a bus device reset. However, we have |
| 4073 | * to clear the tag type as it's causing us problems. We shouldnt | 4073 | * to clear the tag type as it's causing us problems. We shouldn't |
| 4074 | * have to worry about any other commands being active, since if | 4074 | * have to worry about any other commands being active, since if |
| 4075 | * the device is refusing tagged commands, this should be the | 4075 | * the device is refusing tagged commands, this should be the |
| 4076 | * first tagged command sent to the device, however, we do have | 4076 | * first tagged command sent to the device, however, we do have |
| @@ -9748,7 +9748,7 @@ skip_pci_controller: | |||
| 9748 | } | 9748 | } |
| 9749 | 9749 | ||
| 9750 | /* | 9750 | /* |
| 9751 | * We are commited now, everything has been checked and this card | 9751 | * We are committed now, everything has been checked and this card |
| 9752 | * has been found, now we just set it up | 9752 | * has been found, now we just set it up |
| 9753 | */ | 9753 | */ |
| 9754 | 9754 | ||
| @@ -9906,7 +9906,7 @@ skip_pci_controller: | |||
| 9906 | * 2: All PCI controllers with BIOS_ENABLED next, according to BIOS | 9906 | * 2: All PCI controllers with BIOS_ENABLED next, according to BIOS |
| 9907 | * address, going from lowest to highest. | 9907 | * address, going from lowest to highest. |
| 9908 | * 3: Remaining VLB/EISA controllers going in slot order. | 9908 | * 3: Remaining VLB/EISA controllers going in slot order. |
| 9909 | * 4: Remaining PCI controllers, going in PCI device order (reversable) | 9909 | * 4: Remaining PCI controllers, going in PCI device order (reversible) |
| 9910 | */ | 9910 | */ |
| 9911 | 9911 | ||
| 9912 | { | 9912 | { |
diff --git a/drivers/scsi/aic7xxx_old/aic7xxx.seq b/drivers/scsi/aic7xxx_old/aic7xxx.seq index 1565be9ebd49..823ff2873229 100644 --- a/drivers/scsi/aic7xxx_old/aic7xxx.seq +++ b/drivers/scsi/aic7xxx_old/aic7xxx.seq | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | * use byte 27 of the SCB as a pseudo-next pointer and to thread a list | 51 | * use byte 27 of the SCB as a pseudo-next pointer and to thread a list |
| 52 | * of SCBs that are awaiting selection. Since 0-0xfe are valid SCB indexes, | 52 | * of SCBs that are awaiting selection. Since 0-0xfe are valid SCB indexes, |
| 53 | * SCB_LIST_NULL is 0xff which is out of range. An entry is also added to | 53 | * SCB_LIST_NULL is 0xff which is out of range. An entry is also added to |
| 54 | * this list everytime a request sense occurs or after completing a non-tagged | 54 | * this list every time a request sense occurs or after completing a non-tagged |
| 55 | * command for which a second SCB has been queued. The sequencer will | 55 | * command for which a second SCB has been queued. The sequencer will |
| 56 | * automatically consume the entries. | 56 | * automatically consume the entries. |
| 57 | */ | 57 | */ |
| @@ -696,7 +696,7 @@ p_status: | |||
| 696 | * This is done to allow the hsot to send messages outside of an identify | 696 | * This is done to allow the hsot to send messages outside of an identify |
| 697 | * sequence while protecting the seqencer from testing the MK_MESSAGE bit | 697 | * sequence while protecting the seqencer from testing the MK_MESSAGE bit |
| 698 | * on an SCB that might not be for the current nexus. (For example, a | 698 | * on an SCB that might not be for the current nexus. (For example, a |
| 699 | * BDR message in responce to a bad reselection would leave us pointed to | 699 | * BDR message in response to a bad reselection would leave us pointed to |
| 700 | * an SCB that doesn't have anything to do with the current target). | 700 | * an SCB that doesn't have anything to do with the current target). |
| 701 | * Otherwise, treat MSG_OUT as a 1 byte message to send (abort, abort tag, | 701 | * Otherwise, treat MSG_OUT as a 1 byte message to send (abort, abort tag, |
| 702 | * bus device reset). | 702 | * bus device reset). |
| @@ -716,8 +716,8 @@ p_mesgout_identify: | |||
| 716 | } else { | 716 | } else { |
| 717 | and SINDEX,0x7,SCB_TCL; /* lun */ | 717 | and SINDEX,0x7,SCB_TCL; /* lun */ |
| 718 | } | 718 | } |
| 719 | and A,DISCENB,SCB_CONTROL; /* mask off disconnect privledge */ | 719 | and A,DISCENB,SCB_CONTROL; /* mask off disconnect privilege */ |
| 720 | or SINDEX,A; /* or in disconnect privledge */ | 720 | or SINDEX,A; /* or in disconnect privilege */ |
| 721 | or SINDEX,MSG_IDENTIFYFLAG; | 721 | or SINDEX,MSG_IDENTIFYFLAG; |
| 722 | p_mesgout_mk_message: | 722 | p_mesgout_mk_message: |
| 723 | test SCB_CONTROL,MK_MESSAGE jz p_mesgout_tag; | 723 | test SCB_CONTROL,MK_MESSAGE jz p_mesgout_tag; |
diff --git a/drivers/scsi/aic94xx/aic94xx_reg_def.h b/drivers/scsi/aic94xx/aic94xx_reg_def.h index 40273a747d29..dd6cc8008b16 100644 --- a/drivers/scsi/aic94xx/aic94xx_reg_def.h +++ b/drivers/scsi/aic94xx/aic94xx_reg_def.h | |||
| @@ -2134,7 +2134,7 @@ | |||
| 2134 | * The host accesses this scratch in a different manner from the | 2134 | * The host accesses this scratch in a different manner from the |
| 2135 | * link sequencer. The sequencer has to use LSEQ registers | 2135 | * link sequencer. The sequencer has to use LSEQ registers |
| 2136 | * LmSCRPAGE and LmMnSCRPAGE to access the scratch memory. A flat | 2136 | * LmSCRPAGE and LmMnSCRPAGE to access the scratch memory. A flat |
| 2137 | * mapping of the scratch memory is avaliable for software | 2137 | * mapping of the scratch memory is available for software |
| 2138 | * convenience and to prevent corruption while the sequencer is | 2138 | * convenience and to prevent corruption while the sequencer is |
| 2139 | * running. This memory is mapped onto addresses 800h - 9FFh. | 2139 | * running. This memory is mapped onto addresses 800h - 9FFh. |
| 2140 | * | 2140 | * |
diff --git a/drivers/scsi/arm/acornscsi.c b/drivers/scsi/arm/acornscsi.c index ec166726b314..c454e44cf51c 100644 --- a/drivers/scsi/arm/acornscsi.c +++ b/drivers/scsi/arm/acornscsi.c | |||
| @@ -100,7 +100,7 @@ | |||
| 100 | */ | 100 | */ |
| 101 | #define TIMEOUT_TIME 10 | 101 | #define TIMEOUT_TIME 10 |
| 102 | /* | 102 | /* |
| 103 | * Define this if you want to have verbose explaination of SCSI | 103 | * Define this if you want to have verbose explanation of SCSI |
| 104 | * status/messages. | 104 | * status/messages. |
| 105 | */ | 105 | */ |
| 106 | #undef CONFIG_ACORNSCSI_CONSTANTS | 106 | #undef CONFIG_ACORNSCSI_CONSTANTS |
| @@ -1561,7 +1561,7 @@ void acornscsi_message(AS_Host *host) | |||
| 1561 | /* | 1561 | /* |
| 1562 | * If we were negociating sync transfer, we don't yet know if | 1562 | * If we were negociating sync transfer, we don't yet know if |
| 1563 | * this REJECT is for the sync transfer or for the tagged queue/wide | 1563 | * this REJECT is for the sync transfer or for the tagged queue/wide |
| 1564 | * transfer. Re-initiate sync transfer negociation now, and if | 1564 | * transfer. Re-initiate sync transfer negotiation now, and if |
| 1565 | * we got a REJECT in response to SDTR, then it'll be set to DONE. | 1565 | * we got a REJECT in response to SDTR, then it'll be set to DONE. |
| 1566 | */ | 1566 | */ |
| 1567 | if (host->device[host->SCpnt->device->id].sync_state == SYNC_SENT_REQUEST) | 1567 | if (host->device[host->SCpnt->device->id].sync_state == SYNC_SENT_REQUEST) |
diff --git a/drivers/scsi/arm/acornscsi.h b/drivers/scsi/arm/acornscsi.h index 8d2172a0b351..01bc715a3aec 100644 --- a/drivers/scsi/arm/acornscsi.h +++ b/drivers/scsi/arm/acornscsi.h | |||
| @@ -223,8 +223,8 @@ typedef enum { | |||
| 223 | * Synchronous transfer state | 223 | * Synchronous transfer state |
| 224 | */ | 224 | */ |
| 225 | typedef enum { /* Synchronous transfer state */ | 225 | typedef enum { /* Synchronous transfer state */ |
| 226 | SYNC_ASYNCHRONOUS, /* don't negociate synchronous transfers*/ | 226 | SYNC_ASYNCHRONOUS, /* don't negotiate synchronous transfers*/ |
| 227 | SYNC_NEGOCIATE, /* start negociation */ | 227 | SYNC_NEGOCIATE, /* start negotiation */ |
| 228 | SYNC_SENT_REQUEST, /* sent SDTR message */ | 228 | SYNC_SENT_REQUEST, /* sent SDTR message */ |
| 229 | SYNC_COMPLETED, /* received SDTR reply */ | 229 | SYNC_COMPLETED, /* received SDTR reply */ |
| 230 | } syncxfer_t; | 230 | } syncxfer_t; |
| @@ -322,7 +322,7 @@ typedef struct acornscsi_hostdata { | |||
| 322 | /* per-device info */ | 322 | /* per-device info */ |
| 323 | struct { | 323 | struct { |
| 324 | unsigned char sync_xfer; /* synchronous transfer (SBIC value) */ | 324 | unsigned char sync_xfer; /* synchronous transfer (SBIC value) */ |
| 325 | syncxfer_t sync_state; /* sync xfer negociation state */ | 325 | syncxfer_t sync_state; /* sync xfer negotiation state */ |
| 326 | unsigned char disconnect_ok:1; /* device can disconnect */ | 326 | unsigned char disconnect_ok:1; /* device can disconnect */ |
| 327 | } device[8]; | 327 | } device[8]; |
| 328 | unsigned long busyluns[64 / sizeof(unsigned long)];/* array of bits indicating LUNs busy */ | 328 | unsigned long busyluns[64 / sizeof(unsigned long)];/* array of bits indicating LUNs busy */ |
diff --git a/drivers/scsi/arm/arxescsi.c b/drivers/scsi/arm/arxescsi.c index 2836fe248df9..a750aa72b8ef 100644 --- a/drivers/scsi/arm/arxescsi.c +++ b/drivers/scsi/arm/arxescsi.c | |||
| @@ -228,7 +228,7 @@ static const char *arxescsi_info(struct Scsi_Host *host) | |||
| 228 | * Params : buffer - a buffer to write information to | 228 | * Params : buffer - a buffer to write information to |
| 229 | * start - a pointer into this buffer set by this routine to the start | 229 | * start - a pointer into this buffer set by this routine to the start |
| 230 | * of the required information. | 230 | * of the required information. |
| 231 | * offset - offset into information that we have read upto. | 231 | * offset - offset into information that we have read up to. |
| 232 | * length - length of buffer | 232 | * length - length of buffer |
| 233 | * host_no - host number to return information for | 233 | * host_no - host number to return information for |
| 234 | * inout - 0 for reading, 1 for writing. | 234 | * inout - 0 for reading, 1 for writing. |
diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c index c9902b5c1f2b..547987b86384 100644 --- a/drivers/scsi/arm/cumana_2.c +++ b/drivers/scsi/arm/cumana_2.c | |||
| @@ -344,7 +344,7 @@ cumanascsi_2_set_proc_info(struct Scsi_Host *host, char *buffer, int length) | |||
| 344 | * Params : buffer - a buffer to write information to | 344 | * Params : buffer - a buffer to write information to |
| 345 | * start - a pointer into this buffer set by this routine to the start | 345 | * start - a pointer into this buffer set by this routine to the start |
| 346 | * of the required information. | 346 | * of the required information. |
| 347 | * offset - offset into information that we have read upto. | 347 | * offset - offset into information that we have read up to. |
| 348 | * length - length of buffer | 348 | * length - length of buffer |
| 349 | * host_no - host number to return information for | 349 | * host_no - host number to return information for |
| 350 | * inout - 0 for reading, 1 for writing. | 350 | * inout - 0 for reading, 1 for writing. |
diff --git a/drivers/scsi/arm/eesox.c b/drivers/scsi/arm/eesox.c index d8435132f461..edfd12b48c28 100644 --- a/drivers/scsi/arm/eesox.c +++ b/drivers/scsi/arm/eesox.c | |||
| @@ -429,7 +429,7 @@ eesoxscsi_set_proc_info(struct Scsi_Host *host, char *buffer, int length) | |||
| 429 | * Params : buffer - a buffer to write information to | 429 | * Params : buffer - a buffer to write information to |
| 430 | * start - a pointer into this buffer set by this routine to the start | 430 | * start - a pointer into this buffer set by this routine to the start |
| 431 | * of the required information. | 431 | * of the required information. |
| 432 | * offset - offset into information that we have read upto. | 432 | * offset - offset into information that we have read up to. |
| 433 | * length - length of buffer | 433 | * length - length of buffer |
| 434 | * host_no - host number to return information for | 434 | * host_no - host number to return information for |
| 435 | * inout - 0 for reading, 1 for writing. | 435 | * inout - 0 for reading, 1 for writing. |
diff --git a/drivers/scsi/arm/fas216.c b/drivers/scsi/arm/fas216.c index 2b2ce21e227e..e85c40b6e19b 100644 --- a/drivers/scsi/arm/fas216.c +++ b/drivers/scsi/arm/fas216.c | |||
| @@ -2119,7 +2119,7 @@ request_sense: | |||
| 2119 | * executed, unless a target connects to us. | 2119 | * executed, unless a target connects to us. |
| 2120 | */ | 2120 | */ |
| 2121 | if (info->reqSCpnt) | 2121 | if (info->reqSCpnt) |
| 2122 | printk(KERN_WARNING "scsi%d.%c: loosing request command\n", | 2122 | printk(KERN_WARNING "scsi%d.%c: losing request command\n", |
| 2123 | info->host->host_no, '0' + SCpnt->device->id); | 2123 | info->host->host_no, '0' + SCpnt->device->id); |
| 2124 | info->reqSCpnt = SCpnt; | 2124 | info->reqSCpnt = SCpnt; |
| 2125 | } | 2125 | } |
| @@ -2294,7 +2294,7 @@ static int fas216_noqueue_command_lck(struct scsi_cmnd *SCpnt, | |||
| 2294 | * If we don't have an IRQ, then we must poll the card for | 2294 | * If we don't have an IRQ, then we must poll the card for |
| 2295 | * it's interrupt, and use that to call this driver's | 2295 | * it's interrupt, and use that to call this driver's |
| 2296 | * interrupt routine. That way, we keep the command | 2296 | * interrupt routine. That way, we keep the command |
| 2297 | * progressing. Maybe we can add some inteligence here | 2297 | * progressing. Maybe we can add some intelligence here |
| 2298 | * and go to sleep if we know that the device is going | 2298 | * and go to sleep if we know that the device is going |
| 2299 | * to be some time (eg, disconnected). | 2299 | * to be some time (eg, disconnected). |
| 2300 | */ | 2300 | */ |
diff --git a/drivers/scsi/arm/fas216.h b/drivers/scsi/arm/fas216.h index f30f8d659dc4..84b7127c0121 100644 --- a/drivers/scsi/arm/fas216.h +++ b/drivers/scsi/arm/fas216.h | |||
| @@ -203,11 +203,11 @@ typedef enum { | |||
| 203 | } fasdmatype_t; | 203 | } fasdmatype_t; |
| 204 | 204 | ||
| 205 | typedef enum { | 205 | typedef enum { |
| 206 | neg_wait, /* Negociate with device */ | 206 | neg_wait, /* Negotiate with device */ |
| 207 | neg_inprogress, /* Negociation sent */ | 207 | neg_inprogress, /* Negotiation sent */ |
| 208 | neg_complete, /* Negociation complete */ | 208 | neg_complete, /* Negotiation complete */ |
| 209 | neg_targcomplete, /* Target completed negociation */ | 209 | neg_targcomplete, /* Target completed negotiation */ |
| 210 | neg_invalid /* Negociation not supported */ | 210 | neg_invalid /* Negotiation not supported */ |
| 211 | } neg_t; | 211 | } neg_t; |
| 212 | 212 | ||
| 213 | #define MAGIC 0x441296bdUL | 213 | #define MAGIC 0x441296bdUL |
diff --git a/drivers/scsi/arm/powertec.c b/drivers/scsi/arm/powertec.c index e2297b4c1b9e..9274c0677b9c 100644 --- a/drivers/scsi/arm/powertec.c +++ b/drivers/scsi/arm/powertec.c | |||
| @@ -232,7 +232,7 @@ powertecscsi_set_proc_info(struct Scsi_Host *host, char *buffer, int length) | |||
| 232 | * Params : buffer - a buffer to write information to | 232 | * Params : buffer - a buffer to write information to |
| 233 | * start - a pointer into this buffer set by this routine to the start | 233 | * start - a pointer into this buffer set by this routine to the start |
| 234 | * of the required information. | 234 | * of the required information. |
| 235 | * offset - offset into information that we have read upto. | 235 | * offset - offset into information that we have read up to. |
| 236 | * length - length of buffer | 236 | * length - length of buffer |
| 237 | * inout - 0 for reading, 1 for writing. | 237 | * inout - 0 for reading, 1 for writing. |
| 238 | * Returns : length of data written to buffer. | 238 | * Returns : length of data written to buffer. |
diff --git a/drivers/scsi/atari_NCR5380.c b/drivers/scsi/atari_NCR5380.c index 88b2928b4d3b..ea439f93ed81 100644 --- a/drivers/scsi/atari_NCR5380.c +++ b/drivers/scsi/atari_NCR5380.c | |||
| @@ -464,7 +464,7 @@ static void free_all_tags(void) | |||
| 464 | * | 464 | * |
| 465 | * Parameters: Scsi_Cmnd *cmd | 465 | * Parameters: Scsi_Cmnd *cmd |
| 466 | * The command to work on. The first scatter buffer's data are | 466 | * The command to work on. The first scatter buffer's data are |
| 467 | * assumed to be already transfered into ptr/this_residual. | 467 | * assumed to be already transferred into ptr/this_residual. |
| 468 | */ | 468 | */ |
| 469 | 469 | ||
| 470 | static void merge_contiguous_buffers(Scsi_Cmnd *cmd) | 470 | static void merge_contiguous_buffers(Scsi_Cmnd *cmd) |
| @@ -1720,7 +1720,7 @@ static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd *cmd, int tag) | |||
| 1720 | * bytes to transfer, **data - pointer to data pointer. | 1720 | * bytes to transfer, **data - pointer to data pointer. |
| 1721 | * | 1721 | * |
| 1722 | * Returns : -1 when different phase is entered without transferring | 1722 | * Returns : -1 when different phase is entered without transferring |
| 1723 | * maximum number of bytes, 0 if all bytes are transfered or exit | 1723 | * maximum number of bytes, 0 if all bytes are transferred or exit |
| 1724 | * is in same phase. | 1724 | * is in same phase. |
| 1725 | * | 1725 | * |
| 1726 | * Also, *phase, *count, *data are modified in place. | 1726 | * Also, *phase, *count, *data are modified in place. |
| @@ -1911,7 +1911,7 @@ static int do_abort(struct Scsi_Host *host) | |||
| 1911 | * bytes to transfer, **data - pointer to data pointer. | 1911 | * bytes to transfer, **data - pointer to data pointer. |
| 1912 | * | 1912 | * |
| 1913 | * Returns : -1 when different phase is entered without transferring | 1913 | * Returns : -1 when different phase is entered without transferring |
| 1914 | * maximum number of bytes, 0 if all bytes or transfered or exit | 1914 | * maximum number of bytes, 0 if all bytes or transferred or exit |
| 1915 | * is in same phase. | 1915 | * is in same phase. |
| 1916 | * | 1916 | * |
| 1917 | * Also, *phase, *count, *data are modified in place. | 1917 | * Also, *phase, *count, *data are modified in place. |
diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c index 76029d570beb..7e6eca4a125e 100644 --- a/drivers/scsi/atp870u.c +++ b/drivers/scsi/atp870u.c | |||
| @@ -1228,7 +1228,7 @@ TCM_5: /* isolation complete.. */ | |||
| 1228 | printk(" \n%x %x %x %s\n ",assignid_map,mbuf[0],mbuf[1],&mbuf[2]); */ | 1228 | printk(" \n%x %x %x %s\n ",assignid_map,mbuf[0],mbuf[1],&mbuf[2]); */ |
| 1229 | i = 15; | 1229 | i = 15; |
| 1230 | j = mbuf[0]; | 1230 | j = mbuf[0]; |
| 1231 | if ((j & 0x20) != 0) { /* bit5=1:ID upto 7 */ | 1231 | if ((j & 0x20) != 0) { /* bit5=1:ID up to 7 */ |
| 1232 | i = 7; | 1232 | i = 7; |
| 1233 | } | 1233 | } |
| 1234 | if ((j & 0x06) == 0) { /* IDvalid? */ | 1234 | if ((j & 0x06) == 0) { /* IDvalid? */ |
diff --git a/drivers/scsi/be2iscsi/be_cmds.h b/drivers/scsi/be2iscsi/be_cmds.h index 5218de4ab35a..fbd1dc2c15f7 100644 --- a/drivers/scsi/be2iscsi/be_cmds.h +++ b/drivers/scsi/be2iscsi/be_cmds.h | |||
| @@ -877,7 +877,7 @@ struct be_all_if_id { | |||
| 877 | */ | 877 | */ |
| 878 | #define CXN_KILLED_PDU_SIZE_EXCEEDS_DSL 3 /* Connection got invalidated | 878 | #define CXN_KILLED_PDU_SIZE_EXCEEDS_DSL 3 /* Connection got invalidated |
| 879 | * internally | 879 | * internally |
| 880 | * due to a recieved PDU | 880 | * due to a received PDU |
| 881 | * size > DSL | 881 | * size > DSL |
| 882 | */ | 882 | */ |
| 883 | #define CXN_KILLED_BURST_LEN_MISMATCH 4 /* Connection got invalidated | 883 | #define CXN_KILLED_BURST_LEN_MISMATCH 4 /* Connection got invalidated |
| @@ -886,7 +886,7 @@ struct be_all_if_id { | |||
| 886 | * FBL/MBL. | 886 | * FBL/MBL. |
| 887 | */ | 887 | */ |
| 888 | #define CXN_KILLED_AHS_RCVD 5 /* Connection got invalidated | 888 | #define CXN_KILLED_AHS_RCVD 5 /* Connection got invalidated |
| 889 | * internally due to a recieved | 889 | * internally due to a received |
| 890 | * PDU Hdr that has | 890 | * PDU Hdr that has |
| 891 | * AHS */ | 891 | * AHS */ |
| 892 | #define CXN_KILLED_HDR_DIGEST_ERR 6 /* Connection got invalidated | 892 | #define CXN_KILLED_HDR_DIGEST_ERR 6 /* Connection got invalidated |
| @@ -899,12 +899,12 @@ struct be_all_if_id { | |||
| 899 | * pdu hdr | 899 | * pdu hdr |
| 900 | */ | 900 | */ |
| 901 | #define CXN_KILLED_STALE_ITT_TTT_RCVD 8 /* Connection got invalidated | 901 | #define CXN_KILLED_STALE_ITT_TTT_RCVD 8 /* Connection got invalidated |
| 902 | * internally due to a recieved | 902 | * internally due to a received |
| 903 | * ITT/TTT that does not belong | 903 | * ITT/TTT that does not belong |
| 904 | * to this Connection | 904 | * to this Connection |
| 905 | */ | 905 | */ |
| 906 | #define CXN_KILLED_INVALID_ITT_TTT_RCVD 9 /* Connection got invalidated | 906 | #define CXN_KILLED_INVALID_ITT_TTT_RCVD 9 /* Connection got invalidated |
| 907 | * internally due to recieved | 907 | * internally due to received |
| 908 | * ITT/TTT value > Max | 908 | * ITT/TTT value > Max |
| 909 | * Supported ITTs/TTTs | 909 | * Supported ITTs/TTTs |
| 910 | */ | 910 | */ |
| @@ -936,21 +936,21 @@ struct be_all_if_id { | |||
| 936 | * index. | 936 | * index. |
| 937 | */ | 937 | */ |
| 938 | #define CXN_KILLED_OVER_RUN_RESIDUAL 16 /* Command got invalidated | 938 | #define CXN_KILLED_OVER_RUN_RESIDUAL 16 /* Command got invalidated |
| 939 | * internally due to recived | 939 | * internally due to received |
| 940 | * command has residual | 940 | * command has residual |
| 941 | * over run bytes. | 941 | * over run bytes. |
| 942 | */ | 942 | */ |
| 943 | #define CXN_KILLED_UNDER_RUN_RESIDUAL 17 /* Command got invalidated | 943 | #define CXN_KILLED_UNDER_RUN_RESIDUAL 17 /* Command got invalidated |
| 944 | * internally due to recived | 944 | * internally due to received |
| 945 | * command has residual under | 945 | * command has residual under |
| 946 | * run bytes. | 946 | * run bytes. |
| 947 | */ | 947 | */ |
| 948 | #define CMD_KILLED_INVALID_STATSN_RCVD 18 /* Command got invalidated | 948 | #define CMD_KILLED_INVALID_STATSN_RCVD 18 /* Command got invalidated |
| 949 | * internally due to a recieved | 949 | * internally due to a received |
| 950 | * PDU has an invalid StatusSN | 950 | * PDU has an invalid StatusSN |
| 951 | */ | 951 | */ |
| 952 | #define CMD_KILLED_INVALID_R2T_RCVD 19 /* Command got invalidated | 952 | #define CMD_KILLED_INVALID_R2T_RCVD 19 /* Command got invalidated |
| 953 | * internally due to a recieved | 953 | * internally due to a received |
| 954 | * an R2T with some invalid | 954 | * an R2T with some invalid |
| 955 | * fields in it | 955 | * fields in it |
| 956 | */ | 956 | */ |
| @@ -973,7 +973,7 @@ struct be_all_if_id { | |||
| 973 | */ | 973 | */ |
| 974 | #define CMD_CXN_KILLED_INVALID_DATASN_RCVD 24 /* Command got invalidated | 974 | #define CMD_CXN_KILLED_INVALID_DATASN_RCVD 24 /* Command got invalidated |
| 975 | * internally due to a | 975 | * internally due to a |
| 976 | * recieved PDU has an invalid | 976 | * received PDU has an invalid |
| 977 | * DataSN | 977 | * DataSN |
| 978 | */ | 978 | */ |
| 979 | #define CXN_INVALIDATE_NOTIFY 25 /* Connection invalidation | 979 | #define CXN_INVALIDATE_NOTIFY 25 /* Connection invalidation |
diff --git a/drivers/scsi/bfa/bfa_core.c b/drivers/scsi/bfa/bfa_core.c index 1cd5c8b0618d..91838c51fb76 100644 --- a/drivers/scsi/bfa/bfa_core.c +++ b/drivers/scsi/bfa/bfa_core.c | |||
| @@ -355,7 +355,7 @@ bfa_msix_lpu_err(struct bfa_s *bfa, int vec) | |||
| 355 | /* | 355 | /* |
| 356 | * ERR_PSS bit needs to be cleared as well in case | 356 | * ERR_PSS bit needs to be cleared as well in case |
| 357 | * interrups are shared so driver's interrupt handler is | 357 | * interrups are shared so driver's interrupt handler is |
| 358 | * still called eventhough it is already masked out. | 358 | * still called even though it is already masked out. |
| 359 | */ | 359 | */ |
| 360 | curr_value = readl( | 360 | curr_value = readl( |
| 361 | bfa->ioc.ioc_regs.pss_err_status_reg); | 361 | bfa->ioc.ioc_regs.pss_err_status_reg); |
diff --git a/drivers/scsi/bfa/bfa_defs_svc.h b/drivers/scsi/bfa/bfa_defs_svc.h index 648c84176722..207f598877c7 100644 --- a/drivers/scsi/bfa/bfa_defs_svc.h +++ b/drivers/scsi/bfa/bfa_defs_svc.h | |||
| @@ -145,7 +145,7 @@ struct bfa_fw_io_stats_s { | |||
| 145 | u32 ioh_data_oor_event; /* Data out of range */ | 145 | u32 ioh_data_oor_event; /* Data out of range */ |
| 146 | u32 ioh_ro_ooo_event; /* Relative offset out of range */ | 146 | u32 ioh_ro_ooo_event; /* Relative offset out of range */ |
| 147 | u32 ioh_cpu_owned_event; /* IOH hit -iost owned by f/w */ | 147 | u32 ioh_cpu_owned_event; /* IOH hit -iost owned by f/w */ |
| 148 | u32 ioh_unexp_frame_event; /* unexpected frame recieved | 148 | u32 ioh_unexp_frame_event; /* unexpected frame received |
| 149 | * count */ | 149 | * count */ |
| 150 | u32 ioh_err_int; /* IOH error int during data-phase | 150 | u32 ioh_err_int; /* IOH error int during data-phase |
| 151 | * for scsi write | 151 | * for scsi write |
| @@ -566,8 +566,8 @@ struct bfa_itnim_iostats_s { | |||
| 566 | u32 input_reqs; /* Data in-bound requests */ | 566 | u32 input_reqs; /* Data in-bound requests */ |
| 567 | u32 output_reqs; /* Data out-bound requests */ | 567 | u32 output_reqs; /* Data out-bound requests */ |
| 568 | u32 io_comps; /* Total IO Completions */ | 568 | u32 io_comps; /* Total IO Completions */ |
| 569 | u32 wr_throughput; /* Write data transfered in bytes */ | 569 | u32 wr_throughput; /* Write data transferred in bytes */ |
| 570 | u32 rd_throughput; /* Read data transfered in bytes */ | 570 | u32 rd_throughput; /* Read data transferred in bytes */ |
| 571 | 571 | ||
| 572 | u32 iocomp_ok; /* Slowpath IO completions */ | 572 | u32 iocomp_ok; /* Slowpath IO completions */ |
| 573 | u32 iocomp_underrun; /* IO underrun */ | 573 | u32 iocomp_underrun; /* IO underrun */ |
diff --git a/drivers/scsi/bfa/bfa_fc.h b/drivers/scsi/bfa/bfa_fc.h index 8e764fae8dc9..bf0067e0fd0d 100644 --- a/drivers/scsi/bfa/bfa_fc.h +++ b/drivers/scsi/bfa/bfa_fc.h | |||
| @@ -315,7 +315,7 @@ struct fc_plogi_csp_s { | |||
| 315 | query_dbc:1, | 315 | query_dbc:1, |
| 316 | hg_supp:1; | 316 | hg_supp:1; |
| 317 | #endif | 317 | #endif |
| 318 | __be16 rxsz; /* recieve data_field size */ | 318 | __be16 rxsz; /* receive data_field size */ |
| 319 | __be16 conseq; | 319 | __be16 conseq; |
| 320 | __be16 ro_bitmap; | 320 | __be16 ro_bitmap; |
| 321 | __be32 e_d_tov; | 321 | __be32 e_d_tov; |
diff --git a/drivers/scsi/bfa/bfa_fcs.c b/drivers/scsi/bfa/bfa_fcs.c index f674f9318629..9b43ca4b6778 100644 --- a/drivers/scsi/bfa/bfa_fcs.c +++ b/drivers/scsi/bfa/bfa_fcs.c | |||
| @@ -1033,7 +1033,7 @@ bfa_fcs_fabric_delvport(struct bfa_fcs_fabric_s *fabric, | |||
| 1033 | 1033 | ||
| 1034 | 1034 | ||
| 1035 | /* | 1035 | /* |
| 1036 | * Lookup for a vport withing a fabric given its pwwn | 1036 | * Lookup for a vport within a fabric given its pwwn |
| 1037 | */ | 1037 | */ |
| 1038 | struct bfa_fcs_vport_s * | 1038 | struct bfa_fcs_vport_s * |
| 1039 | bfa_fcs_fabric_vport_lookup(struct bfa_fcs_fabric_s *fabric, wwn_t pwwn) | 1039 | bfa_fcs_fabric_vport_lookup(struct bfa_fcs_fabric_s *fabric, wwn_t pwwn) |
diff --git a/drivers/scsi/bfa/bfa_fcs.h b/drivers/scsi/bfa/bfa_fcs.h index 0fd63168573f..61cdce4bd913 100644 --- a/drivers/scsi/bfa/bfa_fcs.h +++ b/drivers/scsi/bfa/bfa_fcs.h | |||
| @@ -705,7 +705,7 @@ enum rport_event { | |||
| 705 | RPSM_EVENT_ADDRESS_CHANGE = 15, /* Rport's PID has changed */ | 705 | RPSM_EVENT_ADDRESS_CHANGE = 15, /* Rport's PID has changed */ |
| 706 | RPSM_EVENT_ADDRESS_DISC = 16, /* Need to Discover rport's PID */ | 706 | RPSM_EVENT_ADDRESS_DISC = 16, /* Need to Discover rport's PID */ |
| 707 | RPSM_EVENT_PRLO_RCVD = 17, /* PRLO from remote device */ | 707 | RPSM_EVENT_PRLO_RCVD = 17, /* PRLO from remote device */ |
| 708 | RPSM_EVENT_PLOGI_RETRY = 18, /* Retry PLOGI continously */ | 708 | RPSM_EVENT_PLOGI_RETRY = 18, /* Retry PLOGI continuously */ |
| 709 | }; | 709 | }; |
| 710 | 710 | ||
| 711 | /* | 711 | /* |
diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c index 43fa986bb586..1d6be8c14473 100644 --- a/drivers/scsi/bfa/bfa_fcs_lport.c +++ b/drivers/scsi/bfa/bfa_fcs_lport.c | |||
| @@ -1149,7 +1149,7 @@ bfa_fcs_lport_fdmi_sm_offline(struct bfa_fcs_lport_fdmi_s *fdmi, | |||
| 1149 | } else { | 1149 | } else { |
| 1150 | /* | 1150 | /* |
| 1151 | * For a base port, we should first register the HBA | 1151 | * For a base port, we should first register the HBA |
| 1152 | * atribute. The HBA attribute also contains the base | 1152 | * attribute. The HBA attribute also contains the base |
| 1153 | * port registration. | 1153 | * port registration. |
| 1154 | */ | 1154 | */ |
| 1155 | bfa_sm_set_state(fdmi, | 1155 | bfa_sm_set_state(fdmi, |
diff --git a/drivers/scsi/bfa/bfa_svc.c b/drivers/scsi/bfa/bfa_svc.c index 1d34921f88bf..16d9a5f61c18 100644 --- a/drivers/scsi/bfa/bfa_svc.c +++ b/drivers/scsi/bfa/bfa_svc.c | |||
| @@ -1035,7 +1035,7 @@ bfa_fcxp_free(struct bfa_fcxp_s *fcxp) | |||
| 1035 | * @param[in] rport BFA rport pointer. Could be left NULL for WKA rports | 1035 | * @param[in] rport BFA rport pointer. Could be left NULL for WKA rports |
| 1036 | * @param[in] vf_id virtual Fabric ID | 1036 | * @param[in] vf_id virtual Fabric ID |
| 1037 | * @param[in] lp_tag lport tag | 1037 | * @param[in] lp_tag lport tag |
| 1038 | * @param[in] cts use Continous sequence | 1038 | * @param[in] cts use Continuous sequence |
| 1039 | * @param[in] cos fc Class of Service | 1039 | * @param[in] cos fc Class of Service |
| 1040 | * @param[in] reqlen request length, does not include FCHS length | 1040 | * @param[in] reqlen request length, does not include FCHS length |
| 1041 | * @param[in] fchs fc Header Pointer. The header content will be copied | 1041 | * @param[in] fchs fc Header Pointer. The header content will be copied |
| @@ -5022,7 +5022,7 @@ bfa_uf_start(struct bfa_s *bfa) | |||
| 5022 | } | 5022 | } |
| 5023 | 5023 | ||
| 5024 | /* | 5024 | /* |
| 5025 | * Register handler for all unsolicted recieve frames. | 5025 | * Register handler for all unsolicted receive frames. |
| 5026 | * | 5026 | * |
| 5027 | * @param[in] bfa BFA instance | 5027 | * @param[in] bfa BFA instance |
| 5028 | * @param[in] ufrecv receive handler function | 5028 | * @param[in] ufrecv receive handler function |
diff --git a/drivers/scsi/bfa/bfa_svc.h b/drivers/scsi/bfa/bfa_svc.h index 331ad992a581..5902a45c080f 100644 --- a/drivers/scsi/bfa/bfa_svc.h +++ b/drivers/scsi/bfa/bfa_svc.h | |||
| @@ -127,7 +127,7 @@ struct bfa_fcxp_req_info_s { | |||
| 127 | * rport nexus is established | 127 | * rport nexus is established |
| 128 | */ | 128 | */ |
| 129 | struct fchs_s fchs; /* request FC header structure */ | 129 | struct fchs_s fchs; /* request FC header structure */ |
| 130 | u8 cts; /* continous sequence */ | 130 | u8 cts; /* continuous sequence */ |
| 131 | u8 class; /* FC class for the request/response */ | 131 | u8 class; /* FC class for the request/response */ |
| 132 | u16 max_frmsz; /* max send frame size */ | 132 | u16 max_frmsz; /* max send frame size */ |
| 133 | u16 vf_id; /* vsan tag if applicable */ | 133 | u16 vf_id; /* vsan tag if applicable */ |
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c index 44524cf55d33..0fd510a01561 100644 --- a/drivers/scsi/bfa/bfad.c +++ b/drivers/scsi/bfa/bfad.c | |||
| @@ -1278,7 +1278,7 @@ bfad_setup_intr(struct bfad_s *bfad) | |||
| 1278 | * interrupts into one vector, so even if we | 1278 | * interrupts into one vector, so even if we |
| 1279 | * can try to request less vectors, we don't | 1279 | * can try to request less vectors, we don't |
| 1280 | * know how to associate interrupt events to | 1280 | * know how to associate interrupt events to |
| 1281 | * vectors. Linux doesn't dupicate vectors | 1281 | * vectors. Linux doesn't duplicate vectors |
| 1282 | * in the MSIX table for this case. | 1282 | * in the MSIX table for this case. |
| 1283 | */ | 1283 | */ |
| 1284 | 1284 | ||
diff --git a/drivers/scsi/bnx2fc/57xx_hsi_bnx2fc.h b/drivers/scsi/bnx2fc/57xx_hsi_bnx2fc.h index 69d031d98469..97a61b4d81b7 100644 --- a/drivers/scsi/bnx2fc/57xx_hsi_bnx2fc.h +++ b/drivers/scsi/bnx2fc/57xx_hsi_bnx2fc.h | |||
| @@ -898,7 +898,7 @@ struct fcoe_confqe { | |||
| 898 | 898 | ||
| 899 | 899 | ||
| 900 | /* | 900 | /* |
| 901 | * FCoE conection data base | 901 | * FCoE connection data base |
| 902 | */ | 902 | */ |
| 903 | struct fcoe_conn_db { | 903 | struct fcoe_conn_db { |
| 904 | #if defined(__BIG_ENDIAN) | 904 | #if defined(__BIG_ENDIAN) |
diff --git a/drivers/scsi/bnx2fc/bnx2fc_els.c b/drivers/scsi/bnx2fc/bnx2fc_els.c index 7a11a255157f..52c358427ce2 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_els.c +++ b/drivers/scsi/bnx2fc/bnx2fc_els.c | |||
| @@ -397,7 +397,7 @@ void bnx2fc_process_els_compl(struct bnx2fc_cmd *els_req, | |||
| 397 | &els_req->req_flags)) { | 397 | &els_req->req_flags)) { |
| 398 | BNX2FC_ELS_DBG("Timer context finished processing this " | 398 | BNX2FC_ELS_DBG("Timer context finished processing this " |
| 399 | "els - 0x%x\n", els_req->xid); | 399 | "els - 0x%x\n", els_req->xid); |
| 400 | /* This IO doesnt receive cleanup completion */ | 400 | /* This IO doesn't receive cleanup completion */ |
| 401 | kref_put(&els_req->refcount, bnx2fc_cmd_release); | 401 | kref_put(&els_req->refcount, bnx2fc_cmd_release); |
| 402 | return; | 402 | return; |
| 403 | } | 403 | } |
diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c index d3fc302c241a..1decefbf32e3 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_io.c +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c | |||
| @@ -1273,7 +1273,7 @@ static void bnx2fc_lun_reset_cmpl(struct bnx2fc_cmd *io_req) | |||
| 1273 | bnx2fc_cmd_release); | 1273 | bnx2fc_cmd_release); |
| 1274 | /* timer hold */ | 1274 | /* timer hold */ |
| 1275 | rc = bnx2fc_initiate_abts(cmd); | 1275 | rc = bnx2fc_initiate_abts(cmd); |
| 1276 | /* abts shouldnt fail in this context */ | 1276 | /* abts shouldn't fail in this context */ |
| 1277 | WARN_ON(rc != SUCCESS); | 1277 | WARN_ON(rc != SUCCESS); |
| 1278 | } else | 1278 | } else |
| 1279 | printk(KERN_ERR PFX "lun_rst: abts already in" | 1279 | printk(KERN_ERR PFX "lun_rst: abts already in" |
| @@ -1308,7 +1308,7 @@ static void bnx2fc_tgt_reset_cmpl(struct bnx2fc_cmd *io_req) | |||
| 1308 | kref_put(&io_req->refcount, | 1308 | kref_put(&io_req->refcount, |
| 1309 | bnx2fc_cmd_release); /* timer hold */ | 1309 | bnx2fc_cmd_release); /* timer hold */ |
| 1310 | rc = bnx2fc_initiate_abts(cmd); | 1310 | rc = bnx2fc_initiate_abts(cmd); |
| 1311 | /* abts shouldnt fail in this context */ | 1311 | /* abts shouldn't fail in this context */ |
| 1312 | WARN_ON(rc != SUCCESS); | 1312 | WARN_ON(rc != SUCCESS); |
| 1313 | 1313 | ||
| 1314 | } else | 1314 | } else |
diff --git a/drivers/scsi/bnx2fc/bnx2fc_tgt.c b/drivers/scsi/bnx2fc/bnx2fc_tgt.c index 7cc05e4e82d5..a2e3830bd268 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_tgt.c +++ b/drivers/scsi/bnx2fc/bnx2fc_tgt.c | |||
| @@ -395,7 +395,7 @@ void bnx2fc_rport_event_handler(struct fc_lport *lport, | |||
| 395 | rp = rport->dd_data; | 395 | rp = rport->dd_data; |
| 396 | if (rport->port_id == FC_FID_DIR_SERV) { | 396 | if (rport->port_id == FC_FID_DIR_SERV) { |
| 397 | /* | 397 | /* |
| 398 | * bnx2fc_rport structure doesnt exist for | 398 | * bnx2fc_rport structure doesn't exist for |
| 399 | * directory server. | 399 | * directory server. |
| 400 | * We should not come here, as lport will | 400 | * We should not come here, as lport will |
| 401 | * take care of fabric login | 401 | * take care of fabric login |
diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c index 1da34c019b8a..f0b89513faed 100644 --- a/drivers/scsi/bnx2i/bnx2i_hwi.c +++ b/drivers/scsi/bnx2i/bnx2i_hwi.c | |||
| @@ -173,7 +173,7 @@ void bnx2i_arm_cq_event_coalescing(struct bnx2i_endpoint *ep, u8 action) | |||
| 173 | 173 | ||
| 174 | /** | 174 | /** |
| 175 | * bnx2i_get_rq_buf - copy RQ buffer contents to driver buffer | 175 | * bnx2i_get_rq_buf - copy RQ buffer contents to driver buffer |
| 176 | * @conn: iscsi connection on which RQ event occured | 176 | * @conn: iscsi connection on which RQ event occurred |
| 177 | * @ptr: driver buffer to which RQ buffer contents is to | 177 | * @ptr: driver buffer to which RQ buffer contents is to |
| 178 | * be copied | 178 | * be copied |
| 179 | * @len: length of valid data inside RQ buf | 179 | * @len: length of valid data inside RQ buf |
diff --git a/drivers/scsi/cxgbi/libcxgbi.h b/drivers/scsi/cxgbi/libcxgbi.h index 0a20fd5f7102..9267844519c9 100644 --- a/drivers/scsi/cxgbi/libcxgbi.h +++ b/drivers/scsi/cxgbi/libcxgbi.h | |||
| @@ -262,9 +262,9 @@ struct cxgbi_skb_tx_cb { | |||
| 262 | enum cxgbi_skcb_flags { | 262 | enum cxgbi_skcb_flags { |
| 263 | SKCBF_TX_NEED_HDR, /* packet needs a header */ | 263 | SKCBF_TX_NEED_HDR, /* packet needs a header */ |
| 264 | SKCBF_RX_COALESCED, /* received whole pdu */ | 264 | SKCBF_RX_COALESCED, /* received whole pdu */ |
| 265 | SKCBF_RX_HDR, /* recieved pdu header */ | 265 | SKCBF_RX_HDR, /* received pdu header */ |
| 266 | SKCBF_RX_DATA, /* recieved pdu payload */ | 266 | SKCBF_RX_DATA, /* received pdu payload */ |
| 267 | SKCBF_RX_STATUS, /* recieved ddp status */ | 267 | SKCBF_RX_STATUS, /* received ddp status */ |
| 268 | SKCBF_RX_DATA_DDPD, /* pdu payload ddp'd */ | 268 | SKCBF_RX_DATA_DDPD, /* pdu payload ddp'd */ |
| 269 | SKCBF_RX_HCRC_ERR, /* header digest error */ | 269 | SKCBF_RX_HCRC_ERR, /* header digest error */ |
| 270 | SKCBF_RX_DCRC_ERR, /* data digest error */ | 270 | SKCBF_RX_DCRC_ERR, /* data digest error */ |
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index b0f8523e665f..b10b3841535c 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c | |||
| @@ -235,7 +235,7 @@ struct ScsiReqBlk { | |||
| 235 | 235 | ||
| 236 | u8 sg_count; /* No of HW sg entries for this request */ | 236 | u8 sg_count; /* No of HW sg entries for this request */ |
| 237 | u8 sg_index; /* Index of HW sg entry for this request */ | 237 | u8 sg_index; /* Index of HW sg entry for this request */ |
| 238 | size_t total_xfer_length; /* Total number of bytes remaining to be transfered */ | 238 | size_t total_xfer_length; /* Total number of bytes remaining to be transferred */ |
| 239 | size_t request_length; /* Total number of bytes in this request */ | 239 | size_t request_length; /* Total number of bytes in this request */ |
| 240 | /* | 240 | /* |
| 241 | * The sense buffer handling function, request_sense, uses | 241 | * The sense buffer handling function, request_sense, uses |
| @@ -1774,7 +1774,7 @@ static void dc395x_handle_interrupt(struct AdapterCtlBlk *acb, | |||
| 1774 | dc395x_statev(acb, srb, &scsi_status); | 1774 | dc395x_statev(acb, srb, &scsi_status); |
| 1775 | 1775 | ||
| 1776 | /* | 1776 | /* |
| 1777 | * if there were any exception occured scsi_status | 1777 | * if there were any exception occurred scsi_status |
| 1778 | * will be modify to bus free phase new scsi_status | 1778 | * will be modify to bus free phase new scsi_status |
| 1779 | * transfer out from ... previous dc395x_statev | 1779 | * transfer out from ... previous dc395x_statev |
| 1780 | */ | 1780 | */ |
| @@ -1954,11 +1954,11 @@ static void sg_verify_length(struct ScsiReqBlk *srb) | |||
| 1954 | static void sg_update_list(struct ScsiReqBlk *srb, u32 left) | 1954 | static void sg_update_list(struct ScsiReqBlk *srb, u32 left) |
| 1955 | { | 1955 | { |
| 1956 | u8 idx; | 1956 | u8 idx; |
| 1957 | u32 xferred = srb->total_xfer_length - left; /* bytes transfered */ | 1957 | u32 xferred = srb->total_xfer_length - left; /* bytes transferred */ |
| 1958 | struct SGentry *psge = srb->segment_x + srb->sg_index; | 1958 | struct SGentry *psge = srb->segment_x + srb->sg_index; |
| 1959 | 1959 | ||
| 1960 | dprintkdbg(DBG_0, | 1960 | dprintkdbg(DBG_0, |
| 1961 | "sg_update_list: Transfered %i of %i bytes, %i remain\n", | 1961 | "sg_update_list: Transferred %i of %i bytes, %i remain\n", |
| 1962 | xferred, srb->total_xfer_length, left); | 1962 | xferred, srb->total_xfer_length, left); |
| 1963 | if (xferred == 0) { | 1963 | if (xferred == 0) { |
| 1964 | /* nothing to update since we did not transfer any data */ | 1964 | /* nothing to update since we did not transfer any data */ |
| @@ -1990,7 +1990,7 @@ static void sg_update_list(struct ScsiReqBlk *srb, u32 left) | |||
| 1990 | 1990 | ||
| 1991 | 1991 | ||
| 1992 | /* | 1992 | /* |
| 1993 | * We have transfered a single byte (PIO mode?) and need to update | 1993 | * We have transferred a single byte (PIO mode?) and need to update |
| 1994 | * the count of bytes remaining (total_xfer_length) and update the sg | 1994 | * the count of bytes remaining (total_xfer_length) and update the sg |
| 1995 | * entry to either point to next byte in the current sg entry, or of | 1995 | * entry to either point to next byte in the current sg entry, or of |
| 1996 | * already at the end to point to the start of the next sg entry | 1996 | * already at the end to point to the start of the next sg entry |
| @@ -2029,7 +2029,7 @@ static void cleanup_after_transfer(struct AdapterCtlBlk *acb, | |||
| 2029 | 2029 | ||
| 2030 | 2030 | ||
| 2031 | /* | 2031 | /* |
| 2032 | * Those no of bytes will be transfered w/ PIO through the SCSI FIFO | 2032 | * Those no of bytes will be transferred w/ PIO through the SCSI FIFO |
| 2033 | * Seems to be needed for unknown reasons; could be a hardware bug :-( | 2033 | * Seems to be needed for unknown reasons; could be a hardware bug :-( |
| 2034 | */ | 2034 | */ |
| 2035 | #define DC395x_LASTPIO 4 | 2035 | #define DC395x_LASTPIO 4 |
| @@ -2256,7 +2256,7 @@ static void data_in_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, | |||
| 2256 | DC395x_read32(acb, TRM_S1040_DMA_CXCNT), | 2256 | DC395x_read32(acb, TRM_S1040_DMA_CXCNT), |
| 2257 | srb->total_xfer_length, d_left_counter); | 2257 | srb->total_xfer_length, d_left_counter); |
| 2258 | #if DC395x_LASTPIO | 2258 | #if DC395x_LASTPIO |
| 2259 | /* KG: Less than or equal to 4 bytes can not be transfered via DMA, it seems. */ | 2259 | /* KG: Less than or equal to 4 bytes can not be transferred via DMA, it seems. */ |
| 2260 | if (d_left_counter | 2260 | if (d_left_counter |
| 2261 | && srb->total_xfer_length <= DC395x_LASTPIO) { | 2261 | && srb->total_xfer_length <= DC395x_LASTPIO) { |
| 2262 | size_t left_io = srb->total_xfer_length; | 2262 | size_t left_io = srb->total_xfer_length; |
diff --git a/drivers/scsi/dc395x.h b/drivers/scsi/dc395x.h index b38360e5fe4f..fbf35e37701e 100644 --- a/drivers/scsi/dc395x.h +++ b/drivers/scsi/dc395x.h | |||
| @@ -617,7 +617,7 @@ struct ScsiInqData | |||
| 617 | #define NTC_DO_SEND_START 0x08 /* Send start command SPINUP */ | 617 | #define NTC_DO_SEND_START 0x08 /* Send start command SPINUP */ |
| 618 | #define NTC_DO_DISCONNECT 0x04 /* Enable SCSI disconnect */ | 618 | #define NTC_DO_DISCONNECT 0x04 /* Enable SCSI disconnect */ |
| 619 | #define NTC_DO_SYNC_NEGO 0x02 /* Sync negotiation */ | 619 | #define NTC_DO_SYNC_NEGO 0x02 /* Sync negotiation */ |
| 620 | #define NTC_DO_PARITY_CHK 0x01 /* (it sould define at NAC) */ | 620 | #define NTC_DO_PARITY_CHK 0x01 /* (it should define at NAC) */ |
| 621 | /* Parity check enable */ | 621 | /* Parity check enable */ |
| 622 | 622 | ||
| 623 | /************************************************************************/ | 623 | /************************************************************************/ |
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index 7cae0bc85390..42fe52902add 100644 --- a/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/drivers/scsi/device_handler/scsi_dh_alua.c | |||
| @@ -541,7 +541,7 @@ static int alua_check_sense(struct scsi_device *sdev, | |||
| 541 | * | 541 | * |
| 542 | * Evaluate the Target Port Group State. | 542 | * Evaluate the Target Port Group State. |
| 543 | * Returns SCSI_DH_DEV_OFFLINED if the path is | 543 | * Returns SCSI_DH_DEV_OFFLINED if the path is |
| 544 | * found to be unuseable. | 544 | * found to be unusable. |
| 545 | */ | 545 | */ |
| 546 | static int alua_rtpg(struct scsi_device *sdev, struct alua_dh_data *h) | 546 | static int alua_rtpg(struct scsi_device *sdev, struct alua_dh_data *h) |
| 547 | { | 547 | { |
| @@ -620,7 +620,7 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_dh_data *h) | |||
| 620 | break; | 620 | break; |
| 621 | case TPGS_STATE_OFFLINE: | 621 | case TPGS_STATE_OFFLINE: |
| 622 | case TPGS_STATE_UNAVAILABLE: | 622 | case TPGS_STATE_UNAVAILABLE: |
| 623 | /* Path unuseable for unavailable/offline */ | 623 | /* Path unusable for unavailable/offline */ |
| 624 | err = SCSI_DH_DEV_OFFLINED; | 624 | err = SCSI_DH_DEV_OFFLINED; |
| 625 | break; | 625 | break; |
| 626 | default: | 626 | default: |
diff --git a/drivers/scsi/dpt/sys_info.h b/drivers/scsi/dpt/sys_info.h index a90c4cb8ea8b..a4aa1c31ff72 100644 --- a/drivers/scsi/dpt/sys_info.h +++ b/drivers/scsi/dpt/sys_info.h | |||
| @@ -79,9 +79,9 @@ | |||
| 79 | typedef struct { | 79 | typedef struct { |
| 80 | #endif | 80 | #endif |
| 81 | 81 | ||
| 82 | uSHORT cylinders; /* Upto 1024 */ | 82 | uSHORT cylinders; /* Up to 1024 */ |
| 83 | uCHAR heads; /* Upto 255 */ | 83 | uCHAR heads; /* Up to 255 */ |
| 84 | uCHAR sectors; /* Upto 63 */ | 84 | uCHAR sectors; /* Up to 63 */ |
| 85 | 85 | ||
| 86 | #ifdef __cplusplus | 86 | #ifdef __cplusplus |
| 87 | 87 | ||
diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index 53925ac178fd..0eb4fe6a4c8a 100644 --- a/drivers/scsi/eata.c +++ b/drivers/scsi/eata.c | |||
| @@ -63,7 +63,7 @@ | |||
| 63 | * ep:[y|n] eisa_probe=[1|0] CONFIG_EISA defined | 63 | * ep:[y|n] eisa_probe=[1|0] CONFIG_EISA defined |
| 64 | * pp:[y|n] pci_probe=[1|0] CONFIG_PCI defined | 64 | * pp:[y|n] pci_probe=[1|0] CONFIG_PCI defined |
| 65 | * | 65 | * |
| 66 | * The default action is to perform probing if the corrisponding | 66 | * The default action is to perform probing if the corresponding |
| 67 | * bus is configured and to skip probing otherwise. | 67 | * bus is configured and to skip probing otherwise. |
| 68 | * | 68 | * |
| 69 | * + If pci_probe is in effect and a list of I/O ports is specified | 69 | * + If pci_probe is in effect and a list of I/O ports is specified |
diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c index c93f007e702f..9d38be2a41f9 100644 --- a/drivers/scsi/fcoe/fcoe_ctlr.c +++ b/drivers/scsi/fcoe/fcoe_ctlr.c | |||
| @@ -656,7 +656,7 @@ int fcoe_ctlr_els_send(struct fcoe_ctlr *fip, struct fc_lport *lport, | |||
| 656 | * If non-FIP, we may have gotten an SID by accepting an FLOGI | 656 | * If non-FIP, we may have gotten an SID by accepting an FLOGI |
| 657 | * from a point-to-point connection. Switch to using | 657 | * from a point-to-point connection. Switch to using |
| 658 | * the source mac based on the SID. The destination | 658 | * the source mac based on the SID. The destination |
| 659 | * MAC in this case would have been set by receving the | 659 | * MAC in this case would have been set by receiving the |
| 660 | * FLOGI. | 660 | * FLOGI. |
| 661 | */ | 661 | */ |
| 662 | if (fip->state == FIP_ST_NON_FIP) { | 662 | if (fip->state == FIP_ST_NON_FIP) { |
| @@ -1876,7 +1876,7 @@ static void fcoe_ctlr_vn_send(struct fcoe_ctlr *fip, | |||
| 1876 | * fcoe_ctlr_vn_rport_callback - Event handler for rport events. | 1876 | * fcoe_ctlr_vn_rport_callback - Event handler for rport events. |
| 1877 | * @lport: The lport which is receiving the event | 1877 | * @lport: The lport which is receiving the event |
| 1878 | * @rdata: remote port private data | 1878 | * @rdata: remote port private data |
| 1879 | * @event: The event that occured | 1879 | * @event: The event that occurred |
| 1880 | * | 1880 | * |
| 1881 | * Locking Note: The rport lock must not be held when calling this function. | 1881 | * Locking Note: The rport lock must not be held when calling this function. |
| 1882 | */ | 1882 | */ |
diff --git a/drivers/scsi/fdomain.c b/drivers/scsi/fdomain.c index 69b7aa54f43f..643f6d500fe7 100644 --- a/drivers/scsi/fdomain.c +++ b/drivers/scsi/fdomain.c | |||
| @@ -174,7 +174,7 @@ | |||
| 174 | Future Domain sold DOS BIOS source for $250 and the UN*X driver source was | 174 | Future Domain sold DOS BIOS source for $250 and the UN*X driver source was |
| 175 | $750, but these required a non-disclosure agreement, so even if I could | 175 | $750, but these required a non-disclosure agreement, so even if I could |
| 176 | have afforded them, they would *not* have been useful for writing this | 176 | have afforded them, they would *not* have been useful for writing this |
| 177 | publically distributable driver. Future Domain technical support has | 177 | publicly distributable driver. Future Domain technical support has |
| 178 | provided some information on the phone and have sent a few useful FAXs. | 178 | provided some information on the phone and have sent a few useful FAXs. |
| 179 | They have been much more helpful since they started to recognize that the | 179 | They have been much more helpful since they started to recognize that the |
| 180 | word "Linux" refers to an operating system :-). | 180 | word "Linux" refers to an operating system :-). |
diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c index 2b48d79bad94..3c53c3478ee7 100644 --- a/drivers/scsi/fnic/fnic_fcs.c +++ b/drivers/scsi/fnic/fnic_fcs.c | |||
| @@ -411,7 +411,7 @@ int fnic_rq_cmpl_handler(struct fnic *fnic, int rq_work_to_do) | |||
| 411 | err = vnic_rq_fill(&fnic->rq[i], fnic_alloc_rq_frame); | 411 | err = vnic_rq_fill(&fnic->rq[i], fnic_alloc_rq_frame); |
| 412 | if (err) | 412 | if (err) |
| 413 | shost_printk(KERN_ERR, fnic->lport->host, | 413 | shost_printk(KERN_ERR, fnic->lport->host, |
| 414 | "fnic_alloc_rq_frame cant alloc" | 414 | "fnic_alloc_rq_frame can't alloc" |
| 415 | " frame\n"); | 415 | " frame\n"); |
| 416 | } | 416 | } |
| 417 | tot_rq_work_done += cur_work_done; | 417 | tot_rq_work_done += cur_work_done; |
diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c index 22d02404d15f..538b31c2cf58 100644 --- a/drivers/scsi/fnic/fnic_scsi.c +++ b/drivers/scsi/fnic/fnic_scsi.c | |||
| @@ -1123,7 +1123,7 @@ void fnic_rport_exch_reset(struct fnic *fnic, u32 port_id) | |||
| 1123 | fc_lun.scsi_lun, io_req)) { | 1123 | fc_lun.scsi_lun, io_req)) { |
| 1124 | /* | 1124 | /* |
| 1125 | * Revert the cmd state back to old state, if | 1125 | * Revert the cmd state back to old state, if |
| 1126 | * it hasnt changed in between. This cmd will get | 1126 | * it hasn't changed in between. This cmd will get |
| 1127 | * aborted later by scsi_eh, or cleaned up during | 1127 | * aborted later by scsi_eh, or cleaned up during |
| 1128 | * lun reset | 1128 | * lun reset |
| 1129 | */ | 1129 | */ |
| @@ -1208,7 +1208,7 @@ void fnic_terminate_rport_io(struct fc_rport *rport) | |||
| 1208 | fc_lun.scsi_lun, io_req)) { | 1208 | fc_lun.scsi_lun, io_req)) { |
| 1209 | /* | 1209 | /* |
| 1210 | * Revert the cmd state back to old state, if | 1210 | * Revert the cmd state back to old state, if |
| 1211 | * it hasnt changed in between. This cmd will get | 1211 | * it hasn't changed in between. This cmd will get |
| 1212 | * aborted later by scsi_eh, or cleaned up during | 1212 | * aborted later by scsi_eh, or cleaned up during |
| 1213 | * lun reset | 1213 | * lun reset |
| 1214 | */ | 1214 | */ |
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c index 427a56d3117e..81182badfeb1 100644 --- a/drivers/scsi/g_NCR5380.c +++ b/drivers/scsi/g_NCR5380.c | |||
| @@ -566,7 +566,7 @@ generic_NCR5380_biosparam(struct scsi_device *sdev, struct block_device *bdev, | |||
| 566 | * @dst: buffer to read into | 566 | * @dst: buffer to read into |
| 567 | * @len: buffer length | 567 | * @len: buffer length |
| 568 | * | 568 | * |
| 569 | * Perform a psuedo DMA mode read from an NCR53C400 or equivalent | 569 | * Perform a pseudo DMA mode read from an NCR53C400 or equivalent |
| 570 | * controller | 570 | * controller |
| 571 | */ | 571 | */ |
| 572 | 572 | ||
| @@ -650,7 +650,7 @@ static inline int NCR5380_pread(struct Scsi_Host *instance, unsigned char *dst, | |||
| 650 | * @dst: buffer to read into | 650 | * @dst: buffer to read into |
| 651 | * @len: buffer length | 651 | * @len: buffer length |
| 652 | * | 652 | * |
| 653 | * Perform a psuedo DMA mode read from an NCR53C400 or equivalent | 653 | * Perform a pseudo DMA mode read from an NCR53C400 or equivalent |
| 654 | * controller | 654 | * controller |
| 655 | */ | 655 | */ |
| 656 | 656 | ||
diff --git a/drivers/scsi/gdth.h b/drivers/scsi/gdth.h index 120a0625a7b5..d969855ac64a 100644 --- a/drivers/scsi/gdth.h +++ b/drivers/scsi/gdth.h | |||
| @@ -895,7 +895,7 @@ typedef struct { | |||
| 895 | u8 ldr_no; /* log. drive no. */ | 895 | u8 ldr_no; /* log. drive no. */ |
| 896 | u8 rw_attribs; /* r/w attributes */ | 896 | u8 rw_attribs; /* r/w attributes */ |
| 897 | u8 cluster_type; /* cluster properties */ | 897 | u8 cluster_type; /* cluster properties */ |
| 898 | u8 media_changed; /* Flag:MOUNT/UNMOUNT occured */ | 898 | u8 media_changed; /* Flag:MOUNT/UNMOUNT occurred */ |
| 899 | u32 start_sec; /* start sector */ | 899 | u32 start_sec; /* start sector */ |
| 900 | } hdr[MAX_LDRIVES]; /* host drives */ | 900 | } hdr[MAX_LDRIVES]; /* host drives */ |
| 901 | struct { | 901 | struct { |
diff --git a/drivers/scsi/gvp11.c b/drivers/scsi/gvp11.c index 2ce26eb7a1ec..50bb54150a78 100644 --- a/drivers/scsi/gvp11.c +++ b/drivers/scsi/gvp11.c | |||
| @@ -300,7 +300,7 @@ static int __devinit gvp11_probe(struct zorro_dev *z, | |||
| 300 | /* | 300 | /* |
| 301 | * Rumors state that some GVP ram boards use the same product | 301 | * Rumors state that some GVP ram boards use the same product |
| 302 | * code as the SCSI controllers. Therefore if the board-size | 302 | * code as the SCSI controllers. Therefore if the board-size |
| 303 | * is not 64KB we asume it is a ram board and bail out. | 303 | * is not 64KB we assume it is a ram board and bail out. |
| 304 | */ | 304 | */ |
| 305 | if (zorro_resource_len(z) != 0x10000) | 305 | if (zorro_resource_len(z) != 0x10000) |
| 306 | return -ENODEV; | 306 | return -ENODEV; |
diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c index 99aa0e5699bc..26cd9d1d7571 100644 --- a/drivers/scsi/imm.c +++ b/drivers/scsi/imm.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * | 3 | * |
| 4 | * (The IMM is the embedded controller in the ZIP Plus drive.) | 4 | * (The IMM is the embedded controller in the ZIP Plus drive.) |
| 5 | * | 5 | * |
| 6 | * My unoffical company acronym list is 21 pages long: | 6 | * My unofficial company acronym list is 21 pages long: |
| 7 | * FLA: Four letter acronym with built in facility for | 7 | * FLA: Four letter acronym with built in facility for |
| 8 | * future expansion to five letters. | 8 | * future expansion to five letters. |
| 9 | */ | 9 | */ |
diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c index 9627d062e16b..dd741bcd6ccd 100644 --- a/drivers/scsi/initio.c +++ b/drivers/scsi/initio.c | |||
| @@ -242,7 +242,7 @@ static u8 i91udftNvRam[64] = | |||
| 242 | 242 | ||
| 243 | static u8 initio_rate_tbl[8] = /* fast 20 */ | 243 | static u8 initio_rate_tbl[8] = /* fast 20 */ |
| 244 | { | 244 | { |
| 245 | /* nanosecond devide by 4 */ | 245 | /* nanosecond divide by 4 */ |
| 246 | 12, /* 50ns, 20M */ | 246 | 12, /* 50ns, 20M */ |
| 247 | 18, /* 75ns, 13.3M */ | 247 | 18, /* 75ns, 13.3M */ |
| 248 | 25, /* 100ns, 10M */ | 248 | 25, /* 100ns, 10M */ |
| @@ -1917,7 +1917,7 @@ static int int_initio_scsi_rst(struct initio_host * host) | |||
| 1917 | } | 1917 | } |
| 1918 | 1918 | ||
| 1919 | /** | 1919 | /** |
| 1920 | * int_initio_scsi_resel - Reselection occured | 1920 | * int_initio_scsi_resel - Reselection occurred |
| 1921 | * @host: InitIO host adapter | 1921 | * @host: InitIO host adapter |
| 1922 | * | 1922 | * |
| 1923 | * A SCSI reselection event has been signalled and the interrupt | 1923 | * A SCSI reselection event has been signalled and the interrupt |
diff --git a/drivers/scsi/initio.h b/drivers/scsi/initio.h index e58af9e95506..219b901bdc25 100644 --- a/drivers/scsi/initio.h +++ b/drivers/scsi/initio.h | |||
| @@ -116,7 +116,7 @@ typedef struct { | |||
| 116 | #define TUL_SBusId 0x89 /* 09 R SCSI BUS ID */ | 116 | #define TUL_SBusId 0x89 /* 09 R SCSI BUS ID */ |
| 117 | #define TUL_STimeOut 0x8A /* 0A W Sel/Resel Time Out Register */ | 117 | #define TUL_STimeOut 0x8A /* 0A W Sel/Resel Time Out Register */ |
| 118 | #define TUL_SIdent 0x8A /* 0A R Identify Message Register */ | 118 | #define TUL_SIdent 0x8A /* 0A R Identify Message Register */ |
| 119 | #define TUL_SAvail 0x8A /* 0A R Availiable Counter Register */ | 119 | #define TUL_SAvail 0x8A /* 0A R Available Counter Register */ |
| 120 | #define TUL_SData 0x8B /* 0B R/W SCSI data in/out */ | 120 | #define TUL_SData 0x8B /* 0B R/W SCSI data in/out */ |
| 121 | #define TUL_SFifo 0x8C /* 0C R/W FIFO */ | 121 | #define TUL_SFifo 0x8C /* 0C R/W FIFO */ |
| 122 | #define TUL_SSignal 0x90 /* 10 R/W SCSI signal in/out */ | 122 | #define TUL_SSignal 0x90 /* 10 R/W SCSI signal in/out */ |
| @@ -389,7 +389,7 @@ struct scsi_ctrl_blk { | |||
| 389 | /* Bit Definition for status */ | 389 | /* Bit Definition for status */ |
| 390 | #define SCB_RENT 0x01 | 390 | #define SCB_RENT 0x01 |
| 391 | #define SCB_PEND 0x02 | 391 | #define SCB_PEND 0x02 |
| 392 | #define SCB_CONTIG 0x04 /* Contigent Allegiance */ | 392 | #define SCB_CONTIG 0x04 /* Contingent Allegiance */ |
| 393 | #define SCB_SELECT 0x08 | 393 | #define SCB_SELECT 0x08 |
| 394 | #define SCB_BUSY 0x10 | 394 | #define SCB_BUSY 0x10 |
| 395 | #define SCB_DONE 0x20 | 395 | #define SCB_DONE 0x20 |
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index b2511acd39bd..218f71a8726e 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c | |||
| @@ -137,7 +137,7 @@ | |||
| 137 | /* - Fix path/name for scsi_hosts.h include for 2.6 kernels */ | 137 | /* - Fix path/name for scsi_hosts.h include for 2.6 kernels */ |
| 138 | /* - Fix sort order of 7k */ | 138 | /* - Fix sort order of 7k */ |
| 139 | /* - Remove 3 unused "inline" functions */ | 139 | /* - Remove 3 unused "inline" functions */ |
| 140 | /* 7.12.xx - Use STATIC functions whereever possible */ | 140 | /* 7.12.xx - Use STATIC functions wherever possible */ |
| 141 | /* - Clean up deprecated MODULE_PARM calls */ | 141 | /* - Clean up deprecated MODULE_PARM calls */ |
| 142 | /* 7.12.05 - Remove Version Matching per IBM request */ | 142 | /* 7.12.05 - Remove Version Matching per IBM request */ |
| 143 | /*****************************************************************************/ | 143 | /*****************************************************************************/ |
| @@ -1665,7 +1665,7 @@ ips_flash_copperhead(ips_ha_t * ha, ips_passthru_t * pt, ips_scb_t * scb) | |||
| 1665 | int datasize; | 1665 | int datasize; |
| 1666 | 1666 | ||
| 1667 | /* Trombone is the only copperhead that can do packet flash, but only | 1667 | /* Trombone is the only copperhead that can do packet flash, but only |
| 1668 | * for firmware. No one said it had to make sence. */ | 1668 | * for firmware. No one said it had to make sense. */ |
| 1669 | if (IPS_IS_TROMBONE(ha) && pt->CoppCP.cmd.flashfw.type == IPS_FW_IMAGE) { | 1669 | if (IPS_IS_TROMBONE(ha) && pt->CoppCP.cmd.flashfw.type == IPS_FW_IMAGE) { |
| 1670 | if (ips_usrcmd(ha, pt, scb)) | 1670 | if (ips_usrcmd(ha, pt, scb)) |
| 1671 | return IPS_SUCCESS; | 1671 | return IPS_SUCCESS; |
diff --git a/drivers/scsi/ips.h b/drivers/scsi/ips.h index 4e49fbcfe8af..f2df0593332b 100644 --- a/drivers/scsi/ips.h +++ b/drivers/scsi/ips.h | |||
| @@ -1193,7 +1193,7 @@ typedef struct { | |||
| 1193 | #define IPS_VER_SEBRING "7.12.02" | 1193 | #define IPS_VER_SEBRING "7.12.02" |
| 1194 | #define IPS_VER_KEYWEST "7.12.02" | 1194 | #define IPS_VER_KEYWEST "7.12.02" |
| 1195 | 1195 | ||
| 1196 | /* Compatability IDs for various adapters */ | 1196 | /* Compatibility IDs for various adapters */ |
| 1197 | #define IPS_COMPAT_UNKNOWN "" | 1197 | #define IPS_COMPAT_UNKNOWN "" |
| 1198 | #define IPS_COMPAT_CURRENT "KW710" | 1198 | #define IPS_COMPAT_CURRENT "KW710" |
| 1199 | #define IPS_COMPAT_SERVERAID1 "2.25.01" | 1199 | #define IPS_COMPAT_SERVERAID1 "2.25.01" |
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index a860452a8f71..3df985305f69 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c | |||
| @@ -295,7 +295,7 @@ static int iscsi_sw_tcp_xmit(struct iscsi_conn *conn) | |||
| 295 | rc = iscsi_sw_tcp_xmit_segment(tcp_conn, segment); | 295 | rc = iscsi_sw_tcp_xmit_segment(tcp_conn, segment); |
| 296 | /* | 296 | /* |
| 297 | * We may not have been able to send data because the conn | 297 | * We may not have been able to send data because the conn |
| 298 | * is getting stopped. libiscsi will know so propogate err | 298 | * is getting stopped. libiscsi will know so propagate err |
| 299 | * for it to do the right thing. | 299 | * for it to do the right thing. |
| 300 | */ | 300 | */ |
| 301 | if (rc == -EAGAIN) | 301 | if (rc == -EAGAIN) |
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index 28231badd9e6..77035a746f60 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c | |||
| @@ -1042,7 +1042,7 @@ static void fc_exch_set_addr(struct fc_exch *ep, | |||
| 1042 | } | 1042 | } |
| 1043 | 1043 | ||
| 1044 | /** | 1044 | /** |
| 1045 | * fc_seq_els_rsp_send() - Send an ELS response using infomation from | 1045 | * fc_seq_els_rsp_send() - Send an ELS response using information from |
| 1046 | * the existing sequence/exchange. | 1046 | * the existing sequence/exchange. |
| 1047 | * @fp: The received frame | 1047 | * @fp: The received frame |
| 1048 | * @els_cmd: The ELS command to be sent | 1048 | * @els_cmd: The ELS command to be sent |
| @@ -1153,7 +1153,7 @@ static void fc_seq_send_ack(struct fc_seq *sp, const struct fc_frame *rx_fp) | |||
| 1153 | * fc_exch_send_ba_rjt() - Send BLS Reject | 1153 | * fc_exch_send_ba_rjt() - Send BLS Reject |
| 1154 | * @rx_fp: The frame being rejected | 1154 | * @rx_fp: The frame being rejected |
| 1155 | * @reason: The reason the frame is being rejected | 1155 | * @reason: The reason the frame is being rejected |
| 1156 | * @explan: The explaination for the rejection | 1156 | * @explan: The explanation for the rejection |
| 1157 | * | 1157 | * |
| 1158 | * This is for rejecting BA_ABTS only. | 1158 | * This is for rejecting BA_ABTS only. |
| 1159 | */ | 1159 | */ |
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index b1b03af158bf..5b799a37ad09 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c | |||
| @@ -870,7 +870,7 @@ static void fc_fcp_resp(struct fc_fcp_pkt *fsp, struct fc_frame *fp) | |||
| 870 | fsp->scsi_resid = ntohl(rp_ex->fr_resid); | 870 | fsp->scsi_resid = ntohl(rp_ex->fr_resid); |
| 871 | /* | 871 | /* |
| 872 | * The cmnd->underflow is the minimum number of | 872 | * The cmnd->underflow is the minimum number of |
| 873 | * bytes that must be transfered for this | 873 | * bytes that must be transferred for this |
| 874 | * command. Provided a sense condition is not | 874 | * command. Provided a sense condition is not |
| 875 | * present, make sure the actual amount | 875 | * present, make sure the actual amount |
| 876 | * transferred is at least the underflow value | 876 | * transferred is at least the underflow value |
| @@ -1306,7 +1306,7 @@ static int fc_lun_reset(struct fc_lport *lport, struct fc_fcp_pkt *fsp, | |||
| 1306 | } | 1306 | } |
| 1307 | 1307 | ||
| 1308 | /** | 1308 | /** |
| 1309 | * fc_tm_done() - Task Managment response handler | 1309 | * fc_tm_done() - Task Management response handler |
| 1310 | * @seq: The sequence that the response is on | 1310 | * @seq: The sequence that the response is on |
| 1311 | * @fp: The response frame | 1311 | * @fp: The response frame |
| 1312 | * @arg: The FCP packet the response is for | 1312 | * @arg: The FCP packet the response is for |
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index 8c08b210001d..906bbcad0e2d 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c | |||
| @@ -52,7 +52,7 @@ | |||
| 52 | * while making the callback. To ensure that the rport is not free'd while | 52 | * while making the callback. To ensure that the rport is not free'd while |
| 53 | * processing the callback the rport callbacks are serialized through a | 53 | * processing the callback the rport callbacks are serialized through a |
| 54 | * single-threaded workqueue. An rport would never be free'd while in a | 54 | * single-threaded workqueue. An rport would never be free'd while in a |
| 55 | * callback handler becuase no other rport work in this queue can be executed | 55 | * callback handler because no other rport work in this queue can be executed |
| 56 | * at the same time. | 56 | * at the same time. |
| 57 | * | 57 | * |
| 58 | * When discovery succeeds or fails a callback is made to the lport as | 58 | * When discovery succeeds or fails a callback is made to the lport as |
| @@ -163,7 +163,7 @@ static int fc_frame_drop(struct fc_lport *lport, struct fc_frame *fp) | |||
| 163 | * fc_lport_rport_callback() - Event handler for rport events | 163 | * fc_lport_rport_callback() - Event handler for rport events |
| 164 | * @lport: The lport which is receiving the event | 164 | * @lport: The lport which is receiving the event |
| 165 | * @rdata: private remote port data | 165 | * @rdata: private remote port data |
| 166 | * @event: The event that occured | 166 | * @event: The event that occurred |
| 167 | * | 167 | * |
| 168 | * Locking Note: The rport lock should not be held when calling | 168 | * Locking Note: The rport lock should not be held when calling |
| 169 | * this function. | 169 | * this function. |
| @@ -379,7 +379,7 @@ static void fc_lport_add_fc4_type(struct fc_lport *lport, enum fc_fh_type type) | |||
| 379 | 379 | ||
| 380 | /** | 380 | /** |
| 381 | * fc_lport_recv_rlir_req() - Handle received Registered Link Incident Report. | 381 | * fc_lport_recv_rlir_req() - Handle received Registered Link Incident Report. |
| 382 | * @lport: Fibre Channel local port recieving the RLIR | 382 | * @lport: Fibre Channel local port receiving the RLIR |
| 383 | * @fp: The RLIR request frame | 383 | * @fp: The RLIR request frame |
| 384 | * | 384 | * |
| 385 | * Locking Note: The lport lock is expected to be held before calling | 385 | * Locking Note: The lport lock is expected to be held before calling |
| @@ -396,7 +396,7 @@ static void fc_lport_recv_rlir_req(struct fc_lport *lport, struct fc_frame *fp) | |||
| 396 | 396 | ||
| 397 | /** | 397 | /** |
| 398 | * fc_lport_recv_echo_req() - Handle received ECHO request | 398 | * fc_lport_recv_echo_req() - Handle received ECHO request |
| 399 | * @lport: The local port recieving the ECHO | 399 | * @lport: The local port receiving the ECHO |
| 400 | * @fp: ECHO request frame | 400 | * @fp: ECHO request frame |
| 401 | * | 401 | * |
| 402 | * Locking Note: The lport lock is expected to be held before calling | 402 | * Locking Note: The lport lock is expected to be held before calling |
| @@ -432,7 +432,7 @@ static void fc_lport_recv_echo_req(struct fc_lport *lport, | |||
| 432 | 432 | ||
| 433 | /** | 433 | /** |
| 434 | * fc_lport_recv_rnid_req() - Handle received Request Node ID data request | 434 | * fc_lport_recv_rnid_req() - Handle received Request Node ID data request |
| 435 | * @lport: The local port recieving the RNID | 435 | * @lport: The local port receiving the RNID |
| 436 | * @fp: The RNID request frame | 436 | * @fp: The RNID request frame |
| 437 | * | 437 | * |
| 438 | * Locking Note: The lport lock is expected to be held before calling | 438 | * Locking Note: The lport lock is expected to be held before calling |
| @@ -491,7 +491,7 @@ static void fc_lport_recv_rnid_req(struct fc_lport *lport, | |||
| 491 | 491 | ||
| 492 | /** | 492 | /** |
| 493 | * fc_lport_recv_logo_req() - Handle received fabric LOGO request | 493 | * fc_lport_recv_logo_req() - Handle received fabric LOGO request |
| 494 | * @lport: The local port recieving the LOGO | 494 | * @lport: The local port receiving the LOGO |
| 495 | * @fp: The LOGO request frame | 495 | * @fp: The LOGO request frame |
| 496 | * | 496 | * |
| 497 | * Locking Note: The lport lock is exected to be held before calling | 497 | * Locking Note: The lport lock is exected to be held before calling |
| @@ -771,7 +771,7 @@ EXPORT_SYMBOL(fc_lport_set_local_id); | |||
| 771 | 771 | ||
| 772 | /** | 772 | /** |
| 773 | * fc_lport_recv_flogi_req() - Receive a FLOGI request | 773 | * fc_lport_recv_flogi_req() - Receive a FLOGI request |
| 774 | * @lport: The local port that recieved the request | 774 | * @lport: The local port that received the request |
| 775 | * @rx_fp: The FLOGI frame | 775 | * @rx_fp: The FLOGI frame |
| 776 | * | 776 | * |
| 777 | * A received FLOGI request indicates a point-to-point connection. | 777 | * A received FLOGI request indicates a point-to-point connection. |
| @@ -858,7 +858,7 @@ out: | |||
| 858 | * if an rport should handle the request. | 858 | * if an rport should handle the request. |
| 859 | * | 859 | * |
| 860 | * Locking Note: This function should not be called with the lport | 860 | * Locking Note: This function should not be called with the lport |
| 861 | * lock held becuase it will grab the lock. | 861 | * lock held because it will grab the lock. |
| 862 | */ | 862 | */ |
| 863 | static void fc_lport_recv_els_req(struct fc_lport *lport, | 863 | static void fc_lport_recv_els_req(struct fc_lport *lport, |
| 864 | struct fc_frame *fp) | 864 | struct fc_frame *fp) |
| @@ -925,7 +925,7 @@ struct fc4_prov fc_lport_els_prov = { | |||
| 925 | * @fp: The frame the request is in | 925 | * @fp: The frame the request is in |
| 926 | * | 926 | * |
| 927 | * Locking Note: This function should not be called with the lport | 927 | * Locking Note: This function should not be called with the lport |
| 928 | * lock held becuase it may grab the lock. | 928 | * lock held because it may grab the lock. |
| 929 | */ | 929 | */ |
| 930 | static void fc_lport_recv_req(struct fc_lport *lport, | 930 | static void fc_lport_recv_req(struct fc_lport *lport, |
| 931 | struct fc_frame *fp) | 931 | struct fc_frame *fp) |
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index f3f693b772ac..874e29d9533f 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c | |||
| @@ -240,7 +240,7 @@ static int sas_ex_phy_discover_helper(struct domain_device *dev, u8 *disc_req, | |||
| 240 | disc_resp, DISCOVER_RESP_SIZE); | 240 | disc_resp, DISCOVER_RESP_SIZE); |
| 241 | if (res) | 241 | if (res) |
| 242 | return res; | 242 | return res; |
| 243 | /* This is detecting a failure to transmit inital | 243 | /* This is detecting a failure to transmit initial |
| 244 | * dev to host FIS as described in section G.5 of | 244 | * dev to host FIS as described in section G.5 of |
| 245 | * sas-2 r 04b */ | 245 | * sas-2 r 04b */ |
| 246 | dr = &((struct smp_resp *)disc_resp)->disc; | 246 | dr = &((struct smp_resp *)disc_resp)->disc; |
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 4e0faa00b96f..17d789325f40 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c | |||
| @@ -4515,7 +4515,7 @@ static FC_RPORT_ATTR(field, S_IRUGO, lpfc_show_rport_##field, NULL) | |||
| 4515 | * Description: | 4515 | * Description: |
| 4516 | * This function is called by the transport after the @fc_vport's symbolic name | 4516 | * This function is called by the transport after the @fc_vport's symbolic name |
| 4517 | * has been changed. This function re-registers the symbolic name with the | 4517 | * has been changed. This function re-registers the symbolic name with the |
| 4518 | * switch to propogate the change into the fabric if the vport is active. | 4518 | * switch to propagate the change into the fabric if the vport is active. |
| 4519 | **/ | 4519 | **/ |
| 4520 | static void | 4520 | static void |
| 4521 | lpfc_set_vport_symbolic_name(struct fc_vport *fc_vport) | 4521 | lpfc_set_vport_symbolic_name(struct fc_vport *fc_vport) |
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index 793b9f1131fb..77b2871d96b7 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc/lpfc_bsg.c | |||
| @@ -1939,7 +1939,7 @@ out: | |||
| 1939 | * @rxxri: Receive exchange id | 1939 | * @rxxri: Receive exchange id |
| 1940 | * @len: Number of data bytes | 1940 | * @len: Number of data bytes |
| 1941 | * | 1941 | * |
| 1942 | * This function allocates and posts a data buffer of sufficient size to recieve | 1942 | * This function allocates and posts a data buffer of sufficient size to receive |
| 1943 | * an unsolicted CT command. | 1943 | * an unsolicted CT command. |
| 1944 | **/ | 1944 | **/ |
| 1945 | static int lpfcdiag_loop_post_rxbufs(struct lpfc_hba *phba, uint16_t rxxri, | 1945 | static int lpfcdiag_loop_post_rxbufs(struct lpfc_hba *phba, uint16_t rxxri, |
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c index a753581509d6..3d967741c708 100644 --- a/drivers/scsi/lpfc/lpfc_debugfs.c +++ b/drivers/scsi/lpfc/lpfc_debugfs.c | |||
| @@ -908,7 +908,7 @@ lpfc_debugfs_dumpData_open(struct inode *inode, struct file *file) | |||
| 908 | if (!debug) | 908 | if (!debug) |
| 909 | goto out; | 909 | goto out; |
| 910 | 910 | ||
| 911 | /* Round to page boundry */ | 911 | /* Round to page boundary */ |
| 912 | printk(KERN_ERR "9059 BLKGRD: %s: _dump_buf_data=0x%p\n", | 912 | printk(KERN_ERR "9059 BLKGRD: %s: _dump_buf_data=0x%p\n", |
| 913 | __func__, _dump_buf_data); | 913 | __func__, _dump_buf_data); |
| 914 | debug->buffer = _dump_buf_data; | 914 | debug->buffer = _dump_buf_data; |
| @@ -938,7 +938,7 @@ lpfc_debugfs_dumpDif_open(struct inode *inode, struct file *file) | |||
| 938 | if (!debug) | 938 | if (!debug) |
| 939 | goto out; | 939 | goto out; |
| 940 | 940 | ||
| 941 | /* Round to page boundry */ | 941 | /* Round to page boundary */ |
| 942 | printk(KERN_ERR "9060 BLKGRD: %s: _dump_buf_dif=0x%p file=%s\n", | 942 | printk(KERN_ERR "9060 BLKGRD: %s: _dump_buf_dif=0x%p file=%s\n", |
| 943 | __func__, _dump_buf_dif, file->f_dentry->d_name.name); | 943 | __func__, _dump_buf_dif, file->f_dentry->d_name.name); |
| 944 | debug->buffer = _dump_buf_dif; | 944 | debug->buffer = _dump_buf_dif; |
| @@ -2158,7 +2158,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) | |||
| 2158 | debugfs_create_dir(name, phba->hba_debugfs_root); | 2158 | debugfs_create_dir(name, phba->hba_debugfs_root); |
| 2159 | if (!vport->vport_debugfs_root) { | 2159 | if (!vport->vport_debugfs_root) { |
| 2160 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, | 2160 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, |
| 2161 | "0417 Cant create debugfs\n"); | 2161 | "0417 Can't create debugfs\n"); |
| 2162 | goto debug_failed; | 2162 | goto debug_failed; |
| 2163 | } | 2163 | } |
| 2164 | atomic_inc(&phba->debugfs_vport_count); | 2164 | atomic_inc(&phba->debugfs_vport_count); |
| @@ -2211,7 +2211,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) | |||
| 2211 | vport, &lpfc_debugfs_op_nodelist); | 2211 | vport, &lpfc_debugfs_op_nodelist); |
| 2212 | if (!vport->debug_nodelist) { | 2212 | if (!vport->debug_nodelist) { |
| 2213 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, | 2213 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, |
| 2214 | "0409 Cant create debugfs nodelist\n"); | 2214 | "0409 Can't create debugfs nodelist\n"); |
| 2215 | goto debug_failed; | 2215 | goto debug_failed; |
| 2216 | } | 2216 | } |
| 2217 | 2217 | ||
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 735028fedda5..d34b69f9cdb1 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c | |||
| @@ -102,7 +102,7 @@ lpfc_els_chk_latt(struct lpfc_vport *vport) | |||
| 102 | phba->pport->port_state); | 102 | phba->pport->port_state); |
| 103 | 103 | ||
| 104 | /* CLEAR_LA should re-enable link attention events and | 104 | /* CLEAR_LA should re-enable link attention events and |
| 105 | * we should then imediately take a LATT event. The | 105 | * we should then immediately take a LATT event. The |
| 106 | * LATT processing should call lpfc_linkdown() which | 106 | * LATT processing should call lpfc_linkdown() which |
| 107 | * will cleanup any left over in-progress discovery | 107 | * will cleanup any left over in-progress discovery |
| 108 | * events. | 108 | * events. |
| @@ -1599,7 +1599,7 @@ out: | |||
| 1599 | * This routine is the completion callback function for issuing the Port | 1599 | * This routine is the completion callback function for issuing the Port |
| 1600 | * Login (PLOGI) command. For PLOGI completion, there must be an active | 1600 | * Login (PLOGI) command. For PLOGI completion, there must be an active |
| 1601 | * ndlp on the vport node list that matches the remote node ID from the | 1601 | * ndlp on the vport node list that matches the remote node ID from the |
| 1602 | * PLOGI reponse IOCB. If such ndlp does not exist, the PLOGI is simply | 1602 | * PLOGI response IOCB. If such ndlp does not exist, the PLOGI is simply |
| 1603 | * ignored and command IOCB released. The PLOGI response IOCB status is | 1603 | * ignored and command IOCB released. The PLOGI response IOCB status is |
| 1604 | * checked for error conditons. If there is error status reported, PLOGI | 1604 | * checked for error conditons. If there is error status reported, PLOGI |
| 1605 | * retry shall be attempted by invoking the lpfc_els_retry() routine. | 1605 | * retry shall be attempted by invoking the lpfc_els_retry() routine. |
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 154c715fb3af..301498301a8f 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c | |||
| @@ -739,7 +739,7 @@ lpfc_do_work(void *p) | |||
| 739 | 739 | ||
| 740 | /* | 740 | /* |
| 741 | * This is only called to handle FC worker events. Since this a rare | 741 | * This is only called to handle FC worker events. Since this a rare |
| 742 | * occurance, we allocate a struct lpfc_work_evt structure here instead of | 742 | * occurrence, we allocate a struct lpfc_work_evt structure here instead of |
| 743 | * embedding it in the IOCB. | 743 | * embedding it in the IOCB. |
| 744 | */ | 744 | */ |
| 745 | int | 745 | int |
| @@ -1348,7 +1348,7 @@ lpfc_register_fcf(struct lpfc_hba *phba) | |||
| 1348 | int rc; | 1348 | int rc; |
| 1349 | 1349 | ||
| 1350 | spin_lock_irq(&phba->hbalock); | 1350 | spin_lock_irq(&phba->hbalock); |
| 1351 | /* If the FCF is not availabe do nothing. */ | 1351 | /* If the FCF is not available do nothing. */ |
| 1352 | if (!(phba->fcf.fcf_flag & FCF_AVAILABLE)) { | 1352 | if (!(phba->fcf.fcf_flag & FCF_AVAILABLE)) { |
| 1353 | phba->hba_flag &= ~(FCF_TS_INPROG | FCF_RR_INPROG); | 1353 | phba->hba_flag &= ~(FCF_TS_INPROG | FCF_RR_INPROG); |
| 1354 | spin_unlock_irq(&phba->hbalock); | 1354 | spin_unlock_irq(&phba->hbalock); |
| @@ -1538,7 +1538,7 @@ lpfc_match_fcf_conn_list(struct lpfc_hba *phba, | |||
| 1538 | 1538 | ||
| 1539 | /* | 1539 | /* |
| 1540 | * If user did not specify any addressing mode, or if the | 1540 | * If user did not specify any addressing mode, or if the |
| 1541 | * prefered addressing mode specified by user is not supported | 1541 | * preferred addressing mode specified by user is not supported |
| 1542 | * by FCF, allow fabric to pick the addressing mode. | 1542 | * by FCF, allow fabric to pick the addressing mode. |
| 1543 | */ | 1543 | */ |
| 1544 | *addr_mode = bf_get(lpfc_fcf_record_mac_addr_prov, | 1544 | *addr_mode = bf_get(lpfc_fcf_record_mac_addr_prov, |
| @@ -1553,7 +1553,7 @@ lpfc_match_fcf_conn_list(struct lpfc_hba *phba, | |||
| 1553 | FCFCNCT_AM_SPMA) ? | 1553 | FCFCNCT_AM_SPMA) ? |
| 1554 | LPFC_FCF_SPMA : LPFC_FCF_FPMA; | 1554 | LPFC_FCF_SPMA : LPFC_FCF_FPMA; |
| 1555 | /* | 1555 | /* |
| 1556 | * If the user specified a prefered address mode, use the | 1556 | * If the user specified a preferred address mode, use the |
| 1557 | * addr mode only if FCF support the addr_mode. | 1557 | * addr mode only if FCF support the addr_mode. |
| 1558 | */ | 1558 | */ |
| 1559 | else if ((conn_entry->conn_rec.flags & FCFCNCT_AM_VALID) && | 1559 | else if ((conn_entry->conn_rec.flags & FCFCNCT_AM_VALID) && |
| @@ -3117,7 +3117,7 @@ lpfc_mbx_cmpl_reg_login(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
| 3117 | * back at reg login state so this | 3117 | * back at reg login state so this |
| 3118 | * mbox needs to be ignored becase | 3118 | * mbox needs to be ignored becase |
| 3119 | * there is another reg login in | 3119 | * there is another reg login in |
| 3120 | * proccess. | 3120 | * process. |
| 3121 | */ | 3121 | */ |
| 3122 | spin_lock_irq(shost->host_lock); | 3122 | spin_lock_irq(shost->host_lock); |
| 3123 | ndlp->nlp_flag &= ~NLP_IGNR_REG_CMPL; | 3123 | ndlp->nlp_flag &= ~NLP_IGNR_REG_CMPL; |
| @@ -4477,7 +4477,7 @@ lpfc_setup_disc_node(struct lpfc_vport *vport, uint32_t did) | |||
| 4477 | if ((vport->fc_flag & FC_RSCN_MODE) && | 4477 | if ((vport->fc_flag & FC_RSCN_MODE) && |
| 4478 | !(vport->fc_flag & FC_NDISC_ACTIVE)) { | 4478 | !(vport->fc_flag & FC_NDISC_ACTIVE)) { |
| 4479 | if (lpfc_rscn_payload_check(vport, did)) { | 4479 | if (lpfc_rscn_payload_check(vport, did)) { |
| 4480 | /* If we've already recieved a PLOGI from this NPort | 4480 | /* If we've already received a PLOGI from this NPort |
| 4481 | * we don't need to try to discover it again. | 4481 | * we don't need to try to discover it again. |
| 4482 | */ | 4482 | */ |
| 4483 | if (ndlp->nlp_flag & NLP_RCV_PLOGI) | 4483 | if (ndlp->nlp_flag & NLP_RCV_PLOGI) |
| @@ -4493,7 +4493,7 @@ lpfc_setup_disc_node(struct lpfc_vport *vport, uint32_t did) | |||
| 4493 | } else | 4493 | } else |
| 4494 | ndlp = NULL; | 4494 | ndlp = NULL; |
| 4495 | } else { | 4495 | } else { |
| 4496 | /* If we've already recieved a PLOGI from this NPort, | 4496 | /* If we've already received a PLOGI from this NPort, |
| 4497 | * or we are already in the process of discovery on it, | 4497 | * or we are already in the process of discovery on it, |
| 4498 | * we don't need to try to discover it again. | 4498 | * we don't need to try to discover it again. |
| 4499 | */ | 4499 | */ |
| @@ -5756,7 +5756,7 @@ lpfc_read_fcoe_param(struct lpfc_hba *phba, | |||
| 5756 | * @size: Size of the data buffer. | 5756 | * @size: Size of the data buffer. |
| 5757 | * @rec_type: Record type to be searched. | 5757 | * @rec_type: Record type to be searched. |
| 5758 | * | 5758 | * |
| 5759 | * This function searches config region data to find the begining | 5759 | * This function searches config region data to find the beginning |
| 5760 | * of the record specified by record_type. If record found, this | 5760 | * of the record specified by record_type. If record found, this |
| 5761 | * function return pointer to the record else return NULL. | 5761 | * function return pointer to the record else return NULL. |
| 5762 | */ | 5762 | */ |
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index e6ebe516cfbb..505f88443b5c 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
| @@ -4466,7 +4466,7 @@ lpfc_sli4_driver_resource_unset(struct lpfc_hba *phba) | |||
| 4466 | } | 4466 | } |
| 4467 | 4467 | ||
| 4468 | /** | 4468 | /** |
| 4469 | * lpfc_init_api_table_setup - Set up init api fucntion jump table | 4469 | * lpfc_init_api_table_setup - Set up init api function jump table |
| 4470 | * @phba: The hba struct for which this call is being executed. | 4470 | * @phba: The hba struct for which this call is being executed. |
| 4471 | * @dev_grp: The HBA PCI-Device group number. | 4471 | * @dev_grp: The HBA PCI-Device group number. |
| 4472 | * | 4472 | * |
| @@ -4850,7 +4850,7 @@ out_free_mem: | |||
| 4850 | * | 4850 | * |
| 4851 | * Return codes | 4851 | * Return codes |
| 4852 | * 0 - successful | 4852 | * 0 - successful |
| 4853 | * -ENOMEM - No availble memory | 4853 | * -ENOMEM - No available memory |
| 4854 | * -EIO - The mailbox failed to complete successfully. | 4854 | * -EIO - The mailbox failed to complete successfully. |
| 4855 | **/ | 4855 | **/ |
| 4856 | int | 4856 | int |
| @@ -5730,7 +5730,7 @@ lpfc_destroy_bootstrap_mbox(struct lpfc_hba *phba) | |||
| 5730 | * | 5730 | * |
| 5731 | * Return codes | 5731 | * Return codes |
| 5732 | * 0 - successful | 5732 | * 0 - successful |
| 5733 | * -ENOMEM - No availble memory | 5733 | * -ENOMEM - No available memory |
| 5734 | * -EIO - The mailbox failed to complete successfully. | 5734 | * -EIO - The mailbox failed to complete successfully. |
| 5735 | **/ | 5735 | **/ |
| 5736 | static int | 5736 | static int |
| @@ -5835,7 +5835,7 @@ lpfc_sli4_read_config(struct lpfc_hba *phba) | |||
| 5835 | * | 5835 | * |
| 5836 | * Return codes | 5836 | * Return codes |
| 5837 | * 0 - successful | 5837 | * 0 - successful |
| 5838 | * -ENOMEM - No availble memory | 5838 | * -ENOMEM - No available memory |
| 5839 | * -EIO - The mailbox failed to complete successfully. | 5839 | * -EIO - The mailbox failed to complete successfully. |
| 5840 | **/ | 5840 | **/ |
| 5841 | static int | 5841 | static int |
| @@ -5894,7 +5894,7 @@ lpfc_setup_endian_order(struct lpfc_hba *phba) | |||
| 5894 | * | 5894 | * |
| 5895 | * Return codes | 5895 | * Return codes |
| 5896 | * 0 - successful | 5896 | * 0 - successful |
| 5897 | * -ENOMEM - No availble memory | 5897 | * -ENOMEM - No available memory |
| 5898 | * -EIO - The mailbox failed to complete successfully. | 5898 | * -EIO - The mailbox failed to complete successfully. |
| 5899 | **/ | 5899 | **/ |
| 5900 | static int | 5900 | static int |
| @@ -6189,7 +6189,7 @@ out_error: | |||
| 6189 | * | 6189 | * |
| 6190 | * Return codes | 6190 | * Return codes |
| 6191 | * 0 - successful | 6191 | * 0 - successful |
| 6192 | * -ENOMEM - No availble memory | 6192 | * -ENOMEM - No available memory |
| 6193 | * -EIO - The mailbox failed to complete successfully. | 6193 | * -EIO - The mailbox failed to complete successfully. |
| 6194 | **/ | 6194 | **/ |
| 6195 | static void | 6195 | static void |
| @@ -6253,7 +6253,7 @@ lpfc_sli4_queue_destroy(struct lpfc_hba *phba) | |||
| 6253 | * | 6253 | * |
| 6254 | * Return codes | 6254 | * Return codes |
| 6255 | * 0 - successful | 6255 | * 0 - successful |
| 6256 | * -ENOMEM - No availble memory | 6256 | * -ENOMEM - No available memory |
| 6257 | * -EIO - The mailbox failed to complete successfully. | 6257 | * -EIO - The mailbox failed to complete successfully. |
| 6258 | **/ | 6258 | **/ |
| 6259 | int | 6259 | int |
| @@ -6498,7 +6498,7 @@ out_error: | |||
| 6498 | * | 6498 | * |
| 6499 | * Return codes | 6499 | * Return codes |
| 6500 | * 0 - successful | 6500 | * 0 - successful |
| 6501 | * -ENOMEM - No availble memory | 6501 | * -ENOMEM - No available memory |
| 6502 | * -EIO - The mailbox failed to complete successfully. | 6502 | * -EIO - The mailbox failed to complete successfully. |
| 6503 | **/ | 6503 | **/ |
| 6504 | void | 6504 | void |
| @@ -6543,7 +6543,7 @@ lpfc_sli4_queue_unset(struct lpfc_hba *phba) | |||
| 6543 | * | 6543 | * |
| 6544 | * Return codes | 6544 | * Return codes |
| 6545 | * 0 - successful | 6545 | * 0 - successful |
| 6546 | * -ENOMEM - No availble memory | 6546 | * -ENOMEM - No available memory |
| 6547 | **/ | 6547 | **/ |
| 6548 | static int | 6548 | static int |
| 6549 | lpfc_sli4_cq_event_pool_create(struct lpfc_hba *phba) | 6549 | lpfc_sli4_cq_event_pool_create(struct lpfc_hba *phba) |
| @@ -6704,7 +6704,7 @@ lpfc_sli4_cq_event_release_all(struct lpfc_hba *phba) | |||
| 6704 | * | 6704 | * |
| 6705 | * Return codes | 6705 | * Return codes |
| 6706 | * 0 - successful | 6706 | * 0 - successful |
| 6707 | * -ENOMEM - No availble memory | 6707 | * -ENOMEM - No available memory |
| 6708 | * -EIO - The mailbox failed to complete successfully. | 6708 | * -EIO - The mailbox failed to complete successfully. |
| 6709 | **/ | 6709 | **/ |
| 6710 | int | 6710 | int |
diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c index dba32dfdb59b..fbab9734e9b4 100644 --- a/drivers/scsi/lpfc/lpfc_mbox.c +++ b/drivers/scsi/lpfc/lpfc_mbox.c | |||
| @@ -1834,7 +1834,7 @@ lpfc_sli4_mbox_opcode_get(struct lpfc_hba *phba, struct lpfcMboxq *mbox) | |||
| 1834 | * @fcf_index: index to fcf table. | 1834 | * @fcf_index: index to fcf table. |
| 1835 | * | 1835 | * |
| 1836 | * This routine routine allocates and constructs non-embedded mailbox command | 1836 | * This routine routine allocates and constructs non-embedded mailbox command |
| 1837 | * for reading a FCF table entry refered by @fcf_index. | 1837 | * for reading a FCF table entry referred by @fcf_index. |
| 1838 | * | 1838 | * |
| 1839 | * Return: pointer to the mailbox command constructed if successful, otherwise | 1839 | * Return: pointer to the mailbox command constructed if successful, otherwise |
| 1840 | * NULL. | 1840 | * NULL. |
diff --git a/drivers/scsi/lpfc/lpfc_nl.h b/drivers/scsi/lpfc/lpfc_nl.h index f3cfbe2ce986..f2b1bbcb196f 100644 --- a/drivers/scsi/lpfc/lpfc_nl.h +++ b/drivers/scsi/lpfc/lpfc_nl.h | |||
| @@ -50,7 +50,7 @@ | |||
| 50 | * and subcategory. The event type must come first. | 50 | * and subcategory. The event type must come first. |
| 51 | * The subcategory further defines the data that follows in the rest | 51 | * The subcategory further defines the data that follows in the rest |
| 52 | * of the payload. Each category will have its own unique header plus | 52 | * of the payload. Each category will have its own unique header plus |
| 53 | * any addtional data unique to the subcategory. | 53 | * any additional data unique to the subcategory. |
| 54 | * The payload sent via the fc transport is one-way driver->application. | 54 | * The payload sent via the fc transport is one-way driver->application. |
| 55 | */ | 55 | */ |
| 56 | 56 | ||
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index 52b35159fc35..0d92d4205ea6 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c | |||
| @@ -658,7 +658,7 @@ lpfc_disc_set_adisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) | |||
| 658 | return 0; | 658 | return 0; |
| 659 | } | 659 | } |
| 660 | /** | 660 | /** |
| 661 | * lpfc_release_rpi - Release a RPI by issueing unreg_login mailbox cmd. | 661 | * lpfc_release_rpi - Release a RPI by issuing unreg_login mailbox cmd. |
| 662 | * @phba : Pointer to lpfc_hba structure. | 662 | * @phba : Pointer to lpfc_hba structure. |
| 663 | * @vport: Pointer to lpfc_vport structure. | 663 | * @vport: Pointer to lpfc_vport structure. |
| 664 | * @rpi : rpi to be release. | 664 | * @rpi : rpi to be release. |
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 2b962b020cfb..fe7cc84e773b 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
| @@ -577,7 +577,7 @@ lpfc_new_scsi_buf_s3(struct lpfc_vport *vport, int num_to_alloc) | |||
| 577 | iocb->un.fcpi64.bdl.addrHigh = 0; | 577 | iocb->un.fcpi64.bdl.addrHigh = 0; |
| 578 | iocb->ulpBdeCount = 0; | 578 | iocb->ulpBdeCount = 0; |
| 579 | iocb->ulpLe = 0; | 579 | iocb->ulpLe = 0; |
| 580 | /* fill in responce BDE */ | 580 | /* fill in response BDE */ |
| 581 | iocb->unsli3.fcp_ext.rbde.tus.f.bdeFlags = | 581 | iocb->unsli3.fcp_ext.rbde.tus.f.bdeFlags = |
| 582 | BUFF_TYPE_BDE_64; | 582 | BUFF_TYPE_BDE_64; |
| 583 | iocb->unsli3.fcp_ext.rbde.tus.f.bdeSize = | 583 | iocb->unsli3.fcp_ext.rbde.tus.f.bdeSize = |
| @@ -1217,10 +1217,10 @@ lpfc_scsi_prep_dma_buf_s3(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd) | |||
| 1217 | (2 * sizeof(struct ulp_bde64))); | 1217 | (2 * sizeof(struct ulp_bde64))); |
| 1218 | data_bde->addrHigh = putPaddrHigh(physaddr); | 1218 | data_bde->addrHigh = putPaddrHigh(physaddr); |
| 1219 | data_bde->addrLow = putPaddrLow(physaddr); | 1219 | data_bde->addrLow = putPaddrLow(physaddr); |
| 1220 | /* ebde count includes the responce bde and data bpl */ | 1220 | /* ebde count includes the response bde and data bpl */ |
| 1221 | iocb_cmd->unsli3.fcp_ext.ebde_count = 2; | 1221 | iocb_cmd->unsli3.fcp_ext.ebde_count = 2; |
| 1222 | } else { | 1222 | } else { |
| 1223 | /* ebde count includes the responce bde and data bdes */ | 1223 | /* ebde count includes the response bde and data bdes */ |
| 1224 | iocb_cmd->unsli3.fcp_ext.ebde_count = (num_bde + 1); | 1224 | iocb_cmd->unsli3.fcp_ext.ebde_count = (num_bde + 1); |
| 1225 | } | 1225 | } |
| 1226 | } else { | 1226 | } else { |
| @@ -2380,7 +2380,7 @@ lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, | |||
| 2380 | } | 2380 | } |
| 2381 | /* | 2381 | /* |
| 2382 | * The cmnd->underflow is the minimum number of bytes that must | 2382 | * The cmnd->underflow is the minimum number of bytes that must |
| 2383 | * be transfered for this command. Provided a sense condition | 2383 | * be transferred for this command. Provided a sense condition |
| 2384 | * is not present, make sure the actual amount transferred is at | 2384 | * is not present, make sure the actual amount transferred is at |
| 2385 | * least the underflow value or fail. | 2385 | * least the underflow value or fail. |
| 2386 | */ | 2386 | */ |
| @@ -2873,7 +2873,7 @@ lpfc_scsi_prep_task_mgmt_cmd(struct lpfc_vport *vport, | |||
| 2873 | } | 2873 | } |
| 2874 | 2874 | ||
| 2875 | /** | 2875 | /** |
| 2876 | * lpfc_scsi_api_table_setup - Set up scsi api fucntion jump table | 2876 | * lpfc_scsi_api_table_setup - Set up scsi api function jump table |
| 2877 | * @phba: The hba struct for which this call is being executed. | 2877 | * @phba: The hba struct for which this call is being executed. |
| 2878 | * @dev_grp: The HBA PCI-Device group number. | 2878 | * @dev_grp: The HBA PCI-Device group number. |
| 2879 | * | 2879 | * |
diff --git a/drivers/scsi/lpfc/lpfc_scsi.h b/drivers/scsi/lpfc/lpfc_scsi.h index 5932273870a5..ce645b20a6ad 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.h +++ b/drivers/scsi/lpfc/lpfc_scsi.h | |||
| @@ -130,7 +130,7 @@ struct lpfc_scsi_buf { | |||
| 130 | dma_addr_t nonsg_phys; /* Non scatter-gather physical address. */ | 130 | dma_addr_t nonsg_phys; /* Non scatter-gather physical address. */ |
| 131 | 131 | ||
| 132 | /* | 132 | /* |
| 133 | * data and dma_handle are the kernel virutal and bus address of the | 133 | * data and dma_handle are the kernel virtual and bus address of the |
| 134 | * dma-able buffer containing the fcp_cmd, fcp_rsp and a scatter | 134 | * dma-able buffer containing the fcp_cmd, fcp_rsp and a scatter |
| 135 | * gather bde list that supports the sg_tablesize value. | 135 | * gather bde list that supports the sg_tablesize value. |
| 136 | */ | 136 | */ |
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 4746dcd756dd..dacabbe0a586 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
| @@ -2817,7 +2817,7 @@ void lpfc_poll_eratt(unsigned long ptr) | |||
| 2817 | * This function is called from the interrupt context when there is a ring | 2817 | * This function is called from the interrupt context when there is a ring |
| 2818 | * event for the fcp ring. The caller does not hold any lock. | 2818 | * event for the fcp ring. The caller does not hold any lock. |
| 2819 | * The function processes each response iocb in the response ring until it | 2819 | * The function processes each response iocb in the response ring until it |
| 2820 | * finds an iocb with LE bit set and chains all the iocbs upto the iocb with | 2820 | * finds an iocb with LE bit set and chains all the iocbs up to the iocb with |
| 2821 | * LE bit set. The function will call the completion handler of the command iocb | 2821 | * LE bit set. The function will call the completion handler of the command iocb |
| 2822 | * if the response iocb indicates a completion for a command iocb or it is | 2822 | * if the response iocb indicates a completion for a command iocb or it is |
| 2823 | * an abort completion. The function will call lpfc_sli_process_unsol_iocb | 2823 | * an abort completion. The function will call lpfc_sli_process_unsol_iocb |
| @@ -5117,7 +5117,7 @@ lpfc_mbox_timeout_handler(struct lpfc_hba *phba) | |||
| 5117 | 5117 | ||
| 5118 | /* Setting state unknown so lpfc_sli_abort_iocb_ring | 5118 | /* Setting state unknown so lpfc_sli_abort_iocb_ring |
| 5119 | * would get IOCB_ERROR from lpfc_sli_issue_iocb, allowing | 5119 | * would get IOCB_ERROR from lpfc_sli_issue_iocb, allowing |
| 5120 | * it to fail all oustanding SCSI IO. | 5120 | * it to fail all outstanding SCSI IO. |
| 5121 | */ | 5121 | */ |
| 5122 | spin_lock_irq(&phba->pport->work_port_lock); | 5122 | spin_lock_irq(&phba->pport->work_port_lock); |
| 5123 | phba->pport->work_port_events &= ~WORKER_MBOX_TMO; | 5123 | phba->pport->work_port_events &= ~WORKER_MBOX_TMO; |
| @@ -6031,7 +6031,7 @@ lpfc_sli_issue_mbox(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, uint32_t flag) | |||
| 6031 | } | 6031 | } |
| 6032 | 6032 | ||
| 6033 | /** | 6033 | /** |
| 6034 | * lpfc_mbox_api_table_setup - Set up mbox api fucntion jump table | 6034 | * lpfc_mbox_api_table_setup - Set up mbox api function jump table |
| 6035 | * @phba: The hba struct for which this call is being executed. | 6035 | * @phba: The hba struct for which this call is being executed. |
| 6036 | * @dev_grp: The HBA PCI-Device group number. | 6036 | * @dev_grp: The HBA PCI-Device group number. |
| 6037 | * | 6037 | * |
| @@ -6847,7 +6847,7 @@ __lpfc_sli_issue_iocb(struct lpfc_hba *phba, uint32_t ring_number, | |||
| 6847 | } | 6847 | } |
| 6848 | 6848 | ||
| 6849 | /** | 6849 | /** |
| 6850 | * lpfc_sli_api_table_setup - Set up sli api fucntion jump table | 6850 | * lpfc_sli_api_table_setup - Set up sli api function jump table |
| 6851 | * @phba: The hba struct for which this call is being executed. | 6851 | * @phba: The hba struct for which this call is being executed. |
| 6852 | * @dev_grp: The HBA PCI-Device group number. | 6852 | * @dev_grp: The HBA PCI-Device group number. |
| 6853 | * | 6853 | * |
| @@ -7521,7 +7521,7 @@ lpfc_sli_ring_taggedbuf_get(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | |||
| 7521 | struct lpfc_dmabuf *mp, *next_mp; | 7521 | struct lpfc_dmabuf *mp, *next_mp; |
| 7522 | struct list_head *slp = &pring->postbufq; | 7522 | struct list_head *slp = &pring->postbufq; |
| 7523 | 7523 | ||
| 7524 | /* Search postbufq, from the begining, looking for a match on tag */ | 7524 | /* Search postbufq, from the beginning, looking for a match on tag */ |
| 7525 | spin_lock_irq(&phba->hbalock); | 7525 | spin_lock_irq(&phba->hbalock); |
| 7526 | list_for_each_entry_safe(mp, next_mp, &pring->postbufq, list) { | 7526 | list_for_each_entry_safe(mp, next_mp, &pring->postbufq, list) { |
| 7527 | if (mp->buffer_tag == tag) { | 7527 | if (mp->buffer_tag == tag) { |
| @@ -7565,7 +7565,7 @@ lpfc_sli_ringpostbuf_get(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | |||
| 7565 | struct lpfc_dmabuf *mp, *next_mp; | 7565 | struct lpfc_dmabuf *mp, *next_mp; |
| 7566 | struct list_head *slp = &pring->postbufq; | 7566 | struct list_head *slp = &pring->postbufq; |
| 7567 | 7567 | ||
| 7568 | /* Search postbufq, from the begining, looking for a match on phys */ | 7568 | /* Search postbufq, from the beginning, looking for a match on phys */ |
| 7569 | spin_lock_irq(&phba->hbalock); | 7569 | spin_lock_irq(&phba->hbalock); |
| 7570 | list_for_each_entry_safe(mp, next_mp, &pring->postbufq, list) { | 7570 | list_for_each_entry_safe(mp, next_mp, &pring->postbufq, list) { |
| 7571 | if (mp->phys == phys) { | 7571 | if (mp->phys == phys) { |
| @@ -8438,7 +8438,7 @@ lpfc_sli_mbox_sys_shutdown(struct lpfc_hba *phba) | |||
| 8438 | * for possible error attention events. The caller must hold the hostlock | 8438 | * for possible error attention events. The caller must hold the hostlock |
| 8439 | * with spin_lock_irq(). | 8439 | * with spin_lock_irq(). |
| 8440 | * | 8440 | * |
| 8441 | * This fucntion returns 1 when there is Error Attention in the Host Attention | 8441 | * This function returns 1 when there is Error Attention in the Host Attention |
| 8442 | * Register and returns 0 otherwise. | 8442 | * Register and returns 0 otherwise. |
| 8443 | **/ | 8443 | **/ |
| 8444 | static int | 8444 | static int |
| @@ -8491,7 +8491,7 @@ unplug_err: | |||
| 8491 | * for possible error attention events. The caller must hold the hostlock | 8491 | * for possible error attention events. The caller must hold the hostlock |
| 8492 | * with spin_lock_irq(). | 8492 | * with spin_lock_irq(). |
| 8493 | * | 8493 | * |
| 8494 | * This fucntion returns 1 when there is Error Attention in the Host Attention | 8494 | * This function returns 1 when there is Error Attention in the Host Attention |
| 8495 | * Register and returns 0 otherwise. | 8495 | * Register and returns 0 otherwise. |
| 8496 | **/ | 8496 | **/ |
| 8497 | static int | 8497 | static int |
| @@ -8581,7 +8581,7 @@ lpfc_sli4_eratt_read(struct lpfc_hba *phba) | |||
| 8581 | * This function is called from timer soft interrupt context to check HBA's | 8581 | * This function is called from timer soft interrupt context to check HBA's |
| 8582 | * error attention register bit for error attention events. | 8582 | * error attention register bit for error attention events. |
| 8583 | * | 8583 | * |
| 8584 | * This fucntion returns 1 when there is Error Attention in the Host Attention | 8584 | * This function returns 1 when there is Error Attention in the Host Attention |
| 8585 | * Register and returns 0 otherwise. | 8585 | * Register and returns 0 otherwise. |
| 8586 | **/ | 8586 | **/ |
| 8587 | int | 8587 | int |
| @@ -9684,7 +9684,7 @@ out: | |||
| 9684 | * @cq: Pointer to the completion queue. | 9684 | * @cq: Pointer to the completion queue. |
| 9685 | * @wcqe: Pointer to a completion queue entry. | 9685 | * @wcqe: Pointer to a completion queue entry. |
| 9686 | * | 9686 | * |
| 9687 | * This routine process a slow-path work-queue or recieve queue completion queue | 9687 | * This routine process a slow-path work-queue or receive queue completion queue |
| 9688 | * entry. | 9688 | * entry. |
| 9689 | * | 9689 | * |
| 9690 | * Return: true if work posted to worker thread, otherwise false. | 9690 | * Return: true if work posted to worker thread, otherwise false. |
| @@ -12971,7 +12971,7 @@ lpfc_sli4_build_dflt_fcf_record(struct lpfc_hba *phba, | |||
| 12971 | * record and processing it one at a time starting from the @fcf_index | 12971 | * record and processing it one at a time starting from the @fcf_index |
| 12972 | * for initial FCF discovery or fast FCF failover rediscovery. | 12972 | * for initial FCF discovery or fast FCF failover rediscovery. |
| 12973 | * | 12973 | * |
| 12974 | * Return 0 if the mailbox command is submitted sucessfully, none 0 | 12974 | * Return 0 if the mailbox command is submitted successfully, none 0 |
| 12975 | * otherwise. | 12975 | * otherwise. |
| 12976 | **/ | 12976 | **/ |
| 12977 | int | 12977 | int |
| @@ -13032,7 +13032,7 @@ fail_fcf_scan: | |||
| 13032 | * This routine is invoked to read an FCF record indicated by @fcf_index | 13032 | * This routine is invoked to read an FCF record indicated by @fcf_index |
| 13033 | * and to use it for FLOGI roundrobin FCF failover. | 13033 | * and to use it for FLOGI roundrobin FCF failover. |
| 13034 | * | 13034 | * |
| 13035 | * Return 0 if the mailbox command is submitted sucessfully, none 0 | 13035 | * Return 0 if the mailbox command is submitted successfully, none 0 |
| 13036 | * otherwise. | 13036 | * otherwise. |
| 13037 | **/ | 13037 | **/ |
| 13038 | int | 13038 | int |
| @@ -13078,7 +13078,7 @@ fail_fcf_read: | |||
| 13078 | * This routine is invoked to read an FCF record indicated by @fcf_index to | 13078 | * This routine is invoked to read an FCF record indicated by @fcf_index to |
| 13079 | * determine whether it's eligible for FLOGI roundrobin failover list. | 13079 | * determine whether it's eligible for FLOGI roundrobin failover list. |
| 13080 | * | 13080 | * |
| 13081 | * Return 0 if the mailbox command is submitted sucessfully, none 0 | 13081 | * Return 0 if the mailbox command is submitted successfully, none 0 |
| 13082 | * otherwise. | 13082 | * otherwise. |
| 13083 | **/ | 13083 | **/ |
| 13084 | int | 13084 | int |
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index c212694a9714..f2684dd09ed0 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c | |||
| @@ -284,7 +284,7 @@ mega_query_adapter(adapter_t *adapter) | |||
| 284 | 284 | ||
| 285 | adapter->host->max_id = 16; /* max targets per channel */ | 285 | adapter->host->max_id = 16; /* max targets per channel */ |
| 286 | 286 | ||
| 287 | adapter->host->max_lun = 7; /* Upto 7 luns for non disk devices */ | 287 | adapter->host->max_lun = 7; /* Up to 7 luns for non disk devices */ |
| 288 | 288 | ||
| 289 | adapter->host->cmd_per_lun = max_cmd_per_lun; | 289 | adapter->host->cmd_per_lun = max_cmd_per_lun; |
| 290 | 290 | ||
| @@ -3734,7 +3734,7 @@ mega_m_to_n(void __user *arg, nitioctl_t *uioc) | |||
| 3734 | * check is the application conforms to NIT. We do not have to do much | 3734 | * check is the application conforms to NIT. We do not have to do much |
| 3735 | * in that case. | 3735 | * in that case. |
| 3736 | * We exploit the fact that the signature is stored in the very | 3736 | * We exploit the fact that the signature is stored in the very |
| 3737 | * begining of the structure. | 3737 | * beginning of the structure. |
| 3738 | */ | 3738 | */ |
| 3739 | 3739 | ||
| 3740 | if( copy_from_user(signature, arg, 7) ) | 3740 | if( copy_from_user(signature, arg, 7) ) |
diff --git a/drivers/scsi/megaraid.h b/drivers/scsi/megaraid.h index 853411911b2e..9a7897f8ca43 100644 --- a/drivers/scsi/megaraid.h +++ b/drivers/scsi/megaraid.h | |||
| @@ -532,9 +532,9 @@ struct uioctl_t { | |||
| 532 | 532 | ||
| 533 | /* | 533 | /* |
| 534 | * struct mcontroller is used to pass information about the controllers in the | 534 | * struct mcontroller is used to pass information about the controllers in the |
| 535 | * system. Its upto the application how to use the information. We are passing | 535 | * system. Its up to the application how to use the information. We are passing |
| 536 | * as much info about the cards as possible and useful. Before issuing the | 536 | * as much info about the cards as possible and useful. Before issuing the |
| 537 | * call to find information about the cards, the applicaiton needs to issue a | 537 | * call to find information about the cards, the application needs to issue a |
| 538 | * ioctl first to find out the number of controllers in the system. | 538 | * ioctl first to find out the number of controllers in the system. |
| 539 | */ | 539 | */ |
| 540 | #define MAX_CONTROLLERS 32 | 540 | #define MAX_CONTROLLERS 32 |
| @@ -804,7 +804,7 @@ typedef struct { | |||
| 804 | unsigned long base; | 804 | unsigned long base; |
| 805 | void __iomem *mmio_base; | 805 | void __iomem *mmio_base; |
| 806 | 806 | ||
| 807 | /* mbox64 with mbox not aligned on 16-byte boundry */ | 807 | /* mbox64 with mbox not aligned on 16-byte boundary */ |
| 808 | mbox64_t *una_mbox64; | 808 | mbox64_t *una_mbox64; |
| 809 | dma_addr_t una_mbox64_dma; | 809 | dma_addr_t una_mbox64_dma; |
| 810 | 810 | ||
diff --git a/drivers/scsi/megaraid/mbox_defs.h b/drivers/scsi/megaraid/mbox_defs.h index ce2487a888ed..e01c6f7c2cac 100644 --- a/drivers/scsi/megaraid/mbox_defs.h +++ b/drivers/scsi/megaraid/mbox_defs.h | |||
| @@ -660,7 +660,7 @@ typedef struct { | |||
| 660 | * @lparam : logical drives parameters | 660 | * @lparam : logical drives parameters |
| 661 | * @span : span | 661 | * @span : span |
| 662 | * | 662 | * |
| 663 | * 8-LD logical drive with upto 8 spans | 663 | * 8-LD logical drive with up to 8 spans |
| 664 | */ | 664 | */ |
| 665 | typedef struct { | 665 | typedef struct { |
| 666 | logdrv_param_t lparam; | 666 | logdrv_param_t lparam; |
| @@ -673,7 +673,7 @@ typedef struct { | |||
| 673 | * @lparam : logical drives parameters | 673 | * @lparam : logical drives parameters |
| 674 | * @span : span | 674 | * @span : span |
| 675 | * | 675 | * |
| 676 | * 8-LD logical drive with upto 4 spans | 676 | * 8-LD logical drive with up to 4 spans |
| 677 | */ | 677 | */ |
| 678 | typedef struct { | 678 | typedef struct { |
| 679 | logdrv_param_t lparam; | 679 | logdrv_param_t lparam; |
| @@ -720,7 +720,7 @@ typedef struct { | |||
| 720 | * @ldrv : logical drives information | 720 | * @ldrv : logical drives information |
| 721 | * @pdrv : physical drives information | 721 | * @pdrv : physical drives information |
| 722 | * | 722 | * |
| 723 | * Disk array for 8LD logical drives with upto 8 spans | 723 | * Disk array for 8LD logical drives with up to 8 spans |
| 724 | */ | 724 | */ |
| 725 | typedef struct { | 725 | typedef struct { |
| 726 | uint8_t numldrv; | 726 | uint8_t numldrv; |
| @@ -737,7 +737,7 @@ typedef struct { | |||
| 737 | * @ldrv : logical drives information | 737 | * @ldrv : logical drives information |
| 738 | * @pdrv : physical drives information | 738 | * @pdrv : physical drives information |
| 739 | * | 739 | * |
| 740 | * Disk array for 8LD logical drives with upto 4 spans | 740 | * Disk array for 8LD logical drives with up to 4 spans |
| 741 | */ | 741 | */ |
| 742 | typedef struct { | 742 | typedef struct { |
| 743 | uint8_t numldrv; | 743 | uint8_t numldrv; |
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index 5708cb27d078..1dba32870b4c 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c | |||
| @@ -2689,7 +2689,7 @@ megaraid_reset_handler(struct scsi_cmnd *scp) | |||
| 2689 | (MBOX_RESET_WAIT + MBOX_RESET_EXT_WAIT) - i)); | 2689 | (MBOX_RESET_WAIT + MBOX_RESET_EXT_WAIT) - i)); |
| 2690 | } | 2690 | } |
| 2691 | 2691 | ||
| 2692 | // bailout if no recovery happended in reset time | 2692 | // bailout if no recovery happened in reset time |
| 2693 | if (adapter->outstanding_cmds == 0) { | 2693 | if (adapter->outstanding_cmds == 0) { |
| 2694 | break; | 2694 | break; |
| 2695 | } | 2695 | } |
| @@ -3452,7 +3452,7 @@ megaraid_mbox_display_scb(adapter_t *adapter, scb_t *scb) | |||
| 3452 | * megaraid_mbox_setup_device_map - manage device ids | 3452 | * megaraid_mbox_setup_device_map - manage device ids |
| 3453 | * @adapter : Driver's soft state | 3453 | * @adapter : Driver's soft state |
| 3454 | * | 3454 | * |
| 3455 | * Manange the device ids to have an appropraite mapping between the kernel | 3455 | * Manange the device ids to have an appropriate mapping between the kernel |
| 3456 | * scsi addresses and megaraid scsi and logical drive addresses. We export | 3456 | * scsi addresses and megaraid scsi and logical drive addresses. We export |
| 3457 | * scsi devices on their actual addresses, whereas the logical drives are | 3457 | * scsi devices on their actual addresses, whereas the logical drives are |
| 3458 | * exported on a virtual scsi channel. | 3458 | * exported on a virtual scsi channel. |
| @@ -3973,7 +3973,7 @@ megaraid_sysfs_get_ldmap_timeout(unsigned long data) | |||
| 3973 | * NOTE: The commands issuance functionality is not generalized and | 3973 | * NOTE: The commands issuance functionality is not generalized and |
| 3974 | * implemented in context of "get ld map" command only. If required, the | 3974 | * implemented in context of "get ld map" command only. If required, the |
| 3975 | * command issuance logical can be trivially pulled out and implemented as a | 3975 | * command issuance logical can be trivially pulled out and implemented as a |
| 3976 | * standalone libary. For now, this should suffice since there is no other | 3976 | * standalone library. For now, this should suffice since there is no other |
| 3977 | * user of this interface. | 3977 | * user of this interface. |
| 3978 | * | 3978 | * |
| 3979 | * Return 0 on success. | 3979 | * Return 0 on success. |
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index 635b228c3ead..046dcc672ec1 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h +++ b/drivers/scsi/megaraid/megaraid_sas.h | |||
| @@ -1347,7 +1347,7 @@ struct megasas_instance { | |||
| 1347 | struct timer_list io_completion_timer; | 1347 | struct timer_list io_completion_timer; |
| 1348 | struct list_head internal_reset_pending_q; | 1348 | struct list_head internal_reset_pending_q; |
| 1349 | 1349 | ||
| 1350 | /* Ptr to hba specfic information */ | 1350 | /* Ptr to hba specific information */ |
| 1351 | void *ctrl_context; | 1351 | void *ctrl_context; |
| 1352 | u8 msi_flag; | 1352 | u8 msi_flag; |
| 1353 | struct msix_entry msixentry; | 1353 | struct msix_entry msixentry; |
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index bbd10c81fd9c..66d4cea4df98 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c | |||
| @@ -1698,7 +1698,7 @@ void megasas_do_ocr(struct megasas_instance *instance) | |||
| 1698 | * megasas_wait_for_outstanding - Wait for all outstanding cmds | 1698 | * megasas_wait_for_outstanding - Wait for all outstanding cmds |
| 1699 | * @instance: Adapter soft state | 1699 | * @instance: Adapter soft state |
| 1700 | * | 1700 | * |
| 1701 | * This function waits for upto MEGASAS_RESET_WAIT_TIME seconds for FW to | 1701 | * This function waits for up to MEGASAS_RESET_WAIT_TIME seconds for FW to |
| 1702 | * complete all its outstanding commands. Returns error if one or more IOs | 1702 | * complete all its outstanding commands. Returns error if one or more IOs |
| 1703 | * are pending after this time period. It also marks the controller dead. | 1703 | * are pending after this time period. It also marks the controller dead. |
| 1704 | */ | 1704 | */ |
diff --git a/drivers/scsi/mpt2sas/mpi/mpi2_init.h b/drivers/scsi/mpt2sas/mpi/mpi2_init.h index 20e6b8869341..165454d52591 100644 --- a/drivers/scsi/mpt2sas/mpi/mpi2_init.h +++ b/drivers/scsi/mpt2sas/mpi/mpi2_init.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | * 05-21-08 02.00.05 Fixed typo in name of Mpi2SepRequest_t. | 21 | * 05-21-08 02.00.05 Fixed typo in name of Mpi2SepRequest_t. |
| 22 | * 10-02-08 02.00.06 Removed Untagged and No Disconnect values from SCSI IO | 22 | * 10-02-08 02.00.06 Removed Untagged and No Disconnect values from SCSI IO |
| 23 | * Control field Task Attribute flags. | 23 | * Control field Task Attribute flags. |
| 24 | * Moved LUN field defines to mpi2.h becasue they are | 24 | * Moved LUN field defines to mpi2.h because they are |
| 25 | * common to many structures. | 25 | * common to many structures. |
| 26 | * 05-06-09 02.00.07 Changed task management type of Query Unit Attention to | 26 | * 05-06-09 02.00.07 Changed task management type of Query Unit Attention to |
| 27 | * Query Asynchronous Event. | 27 | * Query Asynchronous Event. |
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index 5e001ffd4c13..3346357031e9 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c | |||
| @@ -925,7 +925,7 @@ _base_interrupt(int irq, void *bus_id) | |||
| 925 | } | 925 | } |
| 926 | 926 | ||
| 927 | /** | 927 | /** |
| 928 | * mpt2sas_base_release_callback_handler - clear interupt callback handler | 928 | * mpt2sas_base_release_callback_handler - clear interrupt callback handler |
| 929 | * @cb_idx: callback index | 929 | * @cb_idx: callback index |
| 930 | * | 930 | * |
| 931 | * Return nothing. | 931 | * Return nothing. |
| @@ -1113,7 +1113,7 @@ _base_restore_msix_table(struct MPT2SAS_ADAPTER *ioc) | |||
| 1113 | * @ioc: per adapter object | 1113 | * @ioc: per adapter object |
| 1114 | * | 1114 | * |
| 1115 | * Check to see if card is capable of MSIX, and set number | 1115 | * Check to see if card is capable of MSIX, and set number |
| 1116 | * of avaliable msix vectors | 1116 | * of available msix vectors |
| 1117 | */ | 1117 | */ |
| 1118 | static int | 1118 | static int |
| 1119 | _base_check_enable_msix(struct MPT2SAS_ADAPTER *ioc) | 1119 | _base_check_enable_msix(struct MPT2SAS_ADAPTER *ioc) |
| @@ -1595,7 +1595,7 @@ mpt2sas_base_put_smid_scsi_io(struct MPT2SAS_ADAPTER *ioc, u16 smid, u16 handle) | |||
| 1595 | 1595 | ||
| 1596 | 1596 | ||
| 1597 | /** | 1597 | /** |
| 1598 | * mpt2sas_base_put_smid_hi_priority - send Task Managment request to firmware | 1598 | * mpt2sas_base_put_smid_hi_priority - send Task Management request to firmware |
| 1599 | * @ioc: per adapter object | 1599 | * @ioc: per adapter object |
| 1600 | * @smid: system request message index | 1600 | * @smid: system request message index |
| 1601 | * | 1601 | * |
| @@ -2599,7 +2599,7 @@ _base_wait_for_doorbell_int(struct MPT2SAS_ADAPTER *ioc, int timeout, | |||
| 2599 | int_status = readl(&ioc->chip->HostInterruptStatus); | 2599 | int_status = readl(&ioc->chip->HostInterruptStatus); |
| 2600 | if (int_status & MPI2_HIS_IOC2SYS_DB_STATUS) { | 2600 | if (int_status & MPI2_HIS_IOC2SYS_DB_STATUS) { |
| 2601 | dhsprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: " | 2601 | dhsprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: " |
| 2602 | "successfull count(%d), timeout(%d)\n", ioc->name, | 2602 | "successful count(%d), timeout(%d)\n", ioc->name, |
| 2603 | __func__, count, timeout)); | 2603 | __func__, count, timeout)); |
| 2604 | return 0; | 2604 | return 0; |
| 2605 | } | 2605 | } |
| @@ -2640,7 +2640,7 @@ _base_wait_for_doorbell_ack(struct MPT2SAS_ADAPTER *ioc, int timeout, | |||
| 2640 | int_status = readl(&ioc->chip->HostInterruptStatus); | 2640 | int_status = readl(&ioc->chip->HostInterruptStatus); |
| 2641 | if (!(int_status & MPI2_HIS_SYS2IOC_DB_STATUS)) { | 2641 | if (!(int_status & MPI2_HIS_SYS2IOC_DB_STATUS)) { |
| 2642 | dhsprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: " | 2642 | dhsprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: " |
| 2643 | "successfull count(%d), timeout(%d)\n", ioc->name, | 2643 | "successful count(%d), timeout(%d)\n", ioc->name, |
| 2644 | __func__, count, timeout)); | 2644 | __func__, count, timeout)); |
| 2645 | return 0; | 2645 | return 0; |
| 2646 | } else if (int_status & MPI2_HIS_IOC2SYS_DB_STATUS) { | 2646 | } else if (int_status & MPI2_HIS_IOC2SYS_DB_STATUS) { |
| @@ -2688,7 +2688,7 @@ _base_wait_for_doorbell_not_used(struct MPT2SAS_ADAPTER *ioc, int timeout, | |||
| 2688 | doorbell_reg = readl(&ioc->chip->Doorbell); | 2688 | doorbell_reg = readl(&ioc->chip->Doorbell); |
| 2689 | if (!(doorbell_reg & MPI2_DOORBELL_USED)) { | 2689 | if (!(doorbell_reg & MPI2_DOORBELL_USED)) { |
| 2690 | dhsprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: " | 2690 | dhsprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: " |
| 2691 | "successfull count(%d), timeout(%d)\n", ioc->name, | 2691 | "successful count(%d), timeout(%d)\n", ioc->name, |
| 2692 | __func__, count, timeout)); | 2692 | __func__, count, timeout)); |
| 2693 | return 0; | 2693 | return 0; |
| 2694 | } | 2694 | } |
diff --git a/drivers/scsi/mpt2sas/mpt2sas_config.c b/drivers/scsi/mpt2sas/mpt2sas_config.c index 6afd67b324fe..6861244249a3 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_config.c +++ b/drivers/scsi/mpt2sas/mpt2sas_config.c | |||
| @@ -93,7 +93,7 @@ struct config_request{ | |||
| 93 | * @mpi_reply: reply message frame | 93 | * @mpi_reply: reply message frame |
| 94 | * Context: none. | 94 | * Context: none. |
| 95 | * | 95 | * |
| 96 | * Function for displaying debug info helpfull when debugging issues | 96 | * Function for displaying debug info helpful when debugging issues |
| 97 | * in this module. | 97 | * in this module. |
| 98 | */ | 98 | */ |
| 99 | static void | 99 | static void |
diff --git a/drivers/scsi/mpt2sas/mpt2sas_ctl.c b/drivers/scsi/mpt2sas/mpt2sas_ctl.c index e92b77af5484..1c6d2b405eef 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_ctl.c +++ b/drivers/scsi/mpt2sas/mpt2sas_ctl.c | |||
| @@ -116,7 +116,7 @@ _ctl_sas_device_find_by_handle(struct MPT2SAS_ADAPTER *ioc, u16 handle) | |||
| 116 | * @mpi_reply: reply message frame | 116 | * @mpi_reply: reply message frame |
| 117 | * Context: none. | 117 | * Context: none. |
| 118 | * | 118 | * |
| 119 | * Function for displaying debug info helpfull when debugging issues | 119 | * Function for displaying debug info helpful when debugging issues |
| 120 | * in this module. | 120 | * in this module. |
| 121 | */ | 121 | */ |
| 122 | static void | 122 | static void |
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c index 6ceb7759bfe5..d2064a0533ae 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c | |||
| @@ -397,7 +397,7 @@ _scsih_get_sas_address(struct MPT2SAS_ADAPTER *ioc, u16 handle, | |||
| 397 | * @is_raid: [flag] 1 = raid object, 0 = sas object | 397 | * @is_raid: [flag] 1 = raid object, 0 = sas object |
| 398 | * | 398 | * |
| 399 | * Determines whether this device should be first reported device to | 399 | * Determines whether this device should be first reported device to |
| 400 | * to scsi-ml or sas transport, this purpose is for persistant boot device. | 400 | * to scsi-ml or sas transport, this purpose is for persistent boot device. |
| 401 | * There are primary, alternate, and current entries in bios page 2. The order | 401 | * There are primary, alternate, and current entries in bios page 2. The order |
| 402 | * priority is primary, alternate, then current. This routine saves | 402 | * priority is primary, alternate, then current. This routine saves |
| 403 | * the corresponding device object and is_raid flag in the ioc object. | 403 | * the corresponding device object and is_raid flag in the ioc object. |
| @@ -2671,10 +2671,10 @@ _scsih_block_io_to_children_attached_directly(struct MPT2SAS_ADAPTER *ioc, | |||
| 2671 | * @handle: device handle | 2671 | * @handle: device handle |
| 2672 | * Context: interrupt time. | 2672 | * Context: interrupt time. |
| 2673 | * | 2673 | * |
| 2674 | * This code is to initiate the device removal handshake protocal | 2674 | * This code is to initiate the device removal handshake protocol |
| 2675 | * with controller firmware. This function will issue target reset | 2675 | * with controller firmware. This function will issue target reset |
| 2676 | * using high priority request queue. It will send a sas iounit | 2676 | * using high priority request queue. It will send a sas iounit |
| 2677 | * controll request (MPI2_SAS_OP_REMOVE_DEVICE) from this completion. | 2677 | * control request (MPI2_SAS_OP_REMOVE_DEVICE) from this completion. |
| 2678 | * | 2678 | * |
| 2679 | * This is designed to send muliple task management request at the same | 2679 | * This is designed to send muliple task management request at the same |
| 2680 | * time to the fifo. If the fifo is full, we will append the request, | 2680 | * time to the fifo. If the fifo is full, we will append the request, |
| @@ -2749,9 +2749,9 @@ _scsih_tm_tr_send(struct MPT2SAS_ADAPTER *ioc, u16 handle) | |||
| 2749 | * @reply: reply message frame(lower 32bit addr) | 2749 | * @reply: reply message frame(lower 32bit addr) |
| 2750 | * Context: interrupt time. | 2750 | * Context: interrupt time. |
| 2751 | * | 2751 | * |
| 2752 | * This is the sas iounit controll completion routine. | 2752 | * This is the sas iounit control completion routine. |
| 2753 | * This code is part of the code to initiate the device removal | 2753 | * This code is part of the code to initiate the device removal |
| 2754 | * handshake protocal with controller firmware. | 2754 | * handshake protocol with controller firmware. |
| 2755 | * | 2755 | * |
| 2756 | * Return 1 meaning mf should be freed from _base_interrupt | 2756 | * Return 1 meaning mf should be freed from _base_interrupt |
| 2757 | * 0 means the mf is freed from this function. | 2757 | * 0 means the mf is freed from this function. |
| @@ -2878,8 +2878,8 @@ _scsih_tm_volume_tr_complete(struct MPT2SAS_ADAPTER *ioc, u16 smid, | |||
| 2878 | * | 2878 | * |
| 2879 | * This is the target reset completion routine. | 2879 | * This is the target reset completion routine. |
| 2880 | * This code is part of the code to initiate the device removal | 2880 | * This code is part of the code to initiate the device removal |
| 2881 | * handshake protocal with controller firmware. | 2881 | * handshake protocol with controller firmware. |
| 2882 | * It will send a sas iounit controll request (MPI2_SAS_OP_REMOVE_DEVICE) | 2882 | * It will send a sas iounit control request (MPI2_SAS_OP_REMOVE_DEVICE) |
| 2883 | * | 2883 | * |
| 2884 | * Return 1 meaning mf should be freed from _base_interrupt | 2884 | * Return 1 meaning mf should be freed from _base_interrupt |
| 2885 | * 0 means the mf is freed from this function. | 2885 | * 0 means the mf is freed from this function. |
| @@ -2984,7 +2984,7 @@ _scsih_check_for_pending_tm(struct MPT2SAS_ADAPTER *ioc, u16 smid) | |||
| 2984 | * | 2984 | * |
| 2985 | * This routine added to better handle cable breaker. | 2985 | * This routine added to better handle cable breaker. |
| 2986 | * | 2986 | * |
| 2987 | * This handles the case where driver recieves multiple expander | 2987 | * This handles the case where driver receives multiple expander |
| 2988 | * add and delete events in a single shot. When there is a delete event | 2988 | * add and delete events in a single shot. When there is a delete event |
| 2989 | * the routine will void any pending add events waiting in the event queue. | 2989 | * the routine will void any pending add events waiting in the event queue. |
| 2990 | * | 2990 | * |
| @@ -3511,7 +3511,7 @@ _scsih_normalize_sense(char *sense_buffer, struct sense_info *data) | |||
| 3511 | 3511 | ||
| 3512 | #ifdef CONFIG_SCSI_MPT2SAS_LOGGING | 3512 | #ifdef CONFIG_SCSI_MPT2SAS_LOGGING |
| 3513 | /** | 3513 | /** |
| 3514 | * _scsih_scsi_ioc_info - translated non-successfull SCSI_IO request | 3514 | * _scsih_scsi_ioc_info - translated non-successful SCSI_IO request |
| 3515 | * @ioc: per adapter object | 3515 | * @ioc: per adapter object |
| 3516 | * @scmd: pointer to scsi command object | 3516 | * @scmd: pointer to scsi command object |
| 3517 | * @mpi_reply: reply mf payload returned from firmware | 3517 | * @mpi_reply: reply mf payload returned from firmware |
| @@ -5138,7 +5138,7 @@ _scsih_sas_broadcast_primative_event(struct MPT2SAS_ADAPTER *ioc, | |||
| 5138 | unsigned long flags; | 5138 | unsigned long flags; |
| 5139 | int r; | 5139 | int r; |
| 5140 | 5140 | ||
| 5141 | dewtprintk(ioc, printk(MPT2SAS_INFO_FMT "broadcast primative: " | 5141 | dewtprintk(ioc, printk(MPT2SAS_INFO_FMT "broadcast primitive: " |
| 5142 | "phy number(%d), width(%d)\n", ioc->name, event_data->PhyNum, | 5142 | "phy number(%d), width(%d)\n", ioc->name, event_data->PhyNum, |
| 5143 | event_data->PortWidth)); | 5143 | event_data->PortWidth)); |
| 5144 | dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: enter\n", ioc->name, | 5144 | dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: enter\n", ioc->name, |
diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c index 46cc3825638d..835d8d66e696 100644 --- a/drivers/scsi/ncr53c8xx.c +++ b/drivers/scsi/ncr53c8xx.c | |||
| @@ -2679,7 +2679,7 @@ static struct script script0 __initdata = { | |||
| 2679 | }/*-------------------------< RESEL_TAG >-------------------*/,{ | 2679 | }/*-------------------------< RESEL_TAG >-------------------*/,{ |
| 2680 | /* | 2680 | /* |
| 2681 | ** Read IDENTIFY + SIMPLE + TAG using a single MOVE. | 2681 | ** Read IDENTIFY + SIMPLE + TAG using a single MOVE. |
| 2682 | ** Agressive optimization, is'nt it? | 2682 | ** Aggressive optimization, is'nt it? |
| 2683 | ** No need to test the SIMPLE TAG message, since the | 2683 | ** No need to test the SIMPLE TAG message, since the |
| 2684 | ** driver only supports conformant devices for tags. ;-) | 2684 | ** driver only supports conformant devices for tags. ;-) |
| 2685 | */ | 2685 | */ |
diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c index 6b8b021400f8..f6a50c98c36f 100644 --- a/drivers/scsi/nsp32.c +++ b/drivers/scsi/nsp32.c | |||
| @@ -1288,7 +1288,7 @@ static irqreturn_t do_nsp32_isr(int irq, void *dev_id) | |||
| 1288 | nsp32_dbg(NSP32_DEBUG_INTR, "SSACK=0x%lx", | 1288 | nsp32_dbg(NSP32_DEBUG_INTR, "SSACK=0x%lx", |
| 1289 | nsp32_read4(base, SAVED_SACK_CNT)); | 1289 | nsp32_read4(base, SAVED_SACK_CNT)); |
| 1290 | 1290 | ||
| 1291 | scsi_set_resid(SCpnt, 0); /* all data transfered! */ | 1291 | scsi_set_resid(SCpnt, 0); /* all data transferred! */ |
| 1292 | } | 1292 | } |
| 1293 | 1293 | ||
| 1294 | /* | 1294 | /* |
| @@ -1630,7 +1630,7 @@ static int nsp32_busfree_occur(struct scsi_cmnd *SCpnt, unsigned short execph) | |||
| 1630 | 1630 | ||
| 1631 | /* | 1631 | /* |
| 1632 | * If SAVEDSACKCNT == 0, it means SavedDataPointer is | 1632 | * If SAVEDSACKCNT == 0, it means SavedDataPointer is |
| 1633 | * come after data transfering. | 1633 | * come after data transferring. |
| 1634 | */ | 1634 | */ |
| 1635 | if (s_sacklen > 0) { | 1635 | if (s_sacklen > 0) { |
| 1636 | /* | 1636 | /* |
| @@ -1785,7 +1785,7 @@ static void nsp32_adjust_busfree(struct scsi_cmnd *SCpnt, unsigned int s_sacklen | |||
| 1785 | the head element of the sg. restlen is correctly calculated. */ | 1785 | the head element of the sg. restlen is correctly calculated. */ |
| 1786 | } | 1786 | } |
| 1787 | 1787 | ||
| 1788 | /* calculate the rest length for transfering */ | 1788 | /* calculate the rest length for transferring */ |
| 1789 | restlen = sentlen - s_sacklen; | 1789 | restlen = sentlen - s_sacklen; |
| 1790 | 1790 | ||
| 1791 | /* update adjusting current SG table entry */ | 1791 | /* update adjusting current SG table entry */ |
diff --git a/drivers/scsi/nsp32.h b/drivers/scsi/nsp32.h index 9565acf1aa72..c0221829069c 100644 --- a/drivers/scsi/nsp32.h +++ b/drivers/scsi/nsp32.h | |||
| @@ -507,7 +507,7 @@ typedef struct _nsp32_lunt { | |||
| 507 | /* | 507 | /* |
| 508 | * SCSI TARGET/LUN definition | 508 | * SCSI TARGET/LUN definition |
| 509 | */ | 509 | */ |
| 510 | #define NSP32_HOST_SCSIID 7 /* SCSI initiator is everytime defined as 7 */ | 510 | #define NSP32_HOST_SCSIID 7 /* SCSI initiator is every time defined as 7 */ |
| 511 | #define MAX_TARGET 8 | 511 | #define MAX_TARGET 8 |
| 512 | #define MAX_LUN 8 /* XXX: In SPI3, max number of LUN is 64. */ | 512 | #define MAX_LUN 8 /* XXX: In SPI3, max number of LUN is 64. */ |
| 513 | 513 | ||
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index 521e2182d45b..58f5be4740e9 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c | |||
| @@ -1366,7 +1366,7 @@ error: | |||
| 1366 | /* The values below are based on the OnStream frame payload size of 32K == 2**15, | 1366 | /* The values below are based on the OnStream frame payload size of 32K == 2**15, |
| 1367 | * that is, OSST_FRAME_SHIFT + OSST_SECTOR_SHIFT must be 15. With a minimum block | 1367 | * that is, OSST_FRAME_SHIFT + OSST_SECTOR_SHIFT must be 15. With a minimum block |
| 1368 | * size of 512 bytes, we need to be able to resolve 32K/512 == 64 == 2**6 positions | 1368 | * size of 512 bytes, we need to be able to resolve 32K/512 == 64 == 2**6 positions |
| 1369 | * inside each frame. Finaly, OSST_SECTOR_MASK == 2**OSST_FRAME_SHIFT - 1. | 1369 | * inside each frame. Finally, OSST_SECTOR_MASK == 2**OSST_FRAME_SHIFT - 1. |
| 1370 | */ | 1370 | */ |
| 1371 | #define OSST_FRAME_SHIFT 6 | 1371 | #define OSST_FRAME_SHIFT 6 |
| 1372 | #define OSST_SECTOR_SHIFT 9 | 1372 | #define OSST_SECTOR_SHIFT 9 |
| @@ -3131,7 +3131,7 @@ static int osst_flush_write_buffer(struct osst_tape *STp, struct osst_request ** | |||
| 3131 | } | 3131 | } |
| 3132 | #if DEBUG | 3132 | #if DEBUG |
| 3133 | if (debugging) | 3133 | if (debugging) |
| 3134 | printk(OSST_DEB_MSG "%s:D: Flushing %d bytes, Transfering %d bytes in %d lblocks.\n", | 3134 | printk(OSST_DEB_MSG "%s:D: Flushing %d bytes, Transferring %d bytes in %d lblocks.\n", |
| 3135 | name, offset, transfer, blks); | 3135 | name, offset, transfer, blks); |
| 3136 | #endif | 3136 | #endif |
| 3137 | 3137 | ||
| @@ -3811,7 +3811,7 @@ static ssize_t osst_read(struct file * filp, char __user * buf, size_t count, lo | |||
| 3811 | 3811 | ||
| 3812 | if (transfer == 0) { | 3812 | if (transfer == 0) { |
| 3813 | printk(KERN_WARNING | 3813 | printk(KERN_WARNING |
| 3814 | "%s:W: Nothing can be transfered, requested %Zd, tape block size (%d%c).\n", | 3814 | "%s:W: Nothing can be transferred, requested %Zd, tape block size (%d%c).\n", |
| 3815 | name, count, STp->block_size < 1024? | 3815 | name, count, STp->block_size < 1024? |
| 3816 | STp->block_size:STp->block_size/1024, | 3816 | STp->block_size:STp->block_size/1024, |
| 3817 | STp->block_size<1024?'b':'k'); | 3817 | STp->block_size<1024?'b':'k'); |
diff --git a/drivers/scsi/osst.h b/drivers/scsi/osst.h index 11d26c57f3f8..b4fea98ba276 100644 --- a/drivers/scsi/osst.h +++ b/drivers/scsi/osst.h | |||
| @@ -413,7 +413,7 @@ typedef struct os_dat_s { | |||
| 413 | * AUX | 413 | * AUX |
| 414 | */ | 414 | */ |
| 415 | typedef struct os_aux_s { | 415 | typedef struct os_aux_s { |
| 416 | __be32 format_id; /* hardware compability AUX is based on */ | 416 | __be32 format_id; /* hardware compatibility AUX is based on */ |
| 417 | char application_sig[4]; /* driver used to write this media */ | 417 | char application_sig[4]; /* driver used to write this media */ |
| 418 | __be32 hdwr; /* reserved */ | 418 | __be32 hdwr; /* reserved */ |
| 419 | __be32 update_frame_cntr; /* for configuration frame */ | 419 | __be32 update_frame_cntr; /* for configuration frame */ |
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c index be3f33d31a99..54bdf6d85c6d 100644 --- a/drivers/scsi/pcmcia/nsp_cs.c +++ b/drivers/scsi/pcmcia/nsp_cs.c | |||
| @@ -742,7 +742,7 @@ static void nsp_pio_read(struct scsi_cmnd *SCpnt) | |||
| 742 | 742 | ||
| 743 | res = nsp_fifo_count(SCpnt) - ocount; | 743 | res = nsp_fifo_count(SCpnt) - ocount; |
| 744 | //nsp_dbg(NSP_DEBUG_DATA_IO, "ptr=0x%p this=0x%x ocount=0x%x res=0x%x", SCpnt->SCp.ptr, SCpnt->SCp.this_residual, ocount, res); | 744 | //nsp_dbg(NSP_DEBUG_DATA_IO, "ptr=0x%p this=0x%x ocount=0x%x res=0x%x", SCpnt->SCp.ptr, SCpnt->SCp.this_residual, ocount, res); |
| 745 | if (res == 0) { /* if some data avilable ? */ | 745 | if (res == 0) { /* if some data available ? */ |
| 746 | if (stat == BUSPHASE_DATA_IN) { /* phase changed? */ | 746 | if (stat == BUSPHASE_DATA_IN) { /* phase changed? */ |
| 747 | //nsp_dbg(NSP_DEBUG_DATA_IO, " wait for data this=%d", SCpnt->SCp.this_residual); | 747 | //nsp_dbg(NSP_DEBUG_DATA_IO, " wait for data this=%d", SCpnt->SCp.this_residual); |
| 748 | continue; | 748 | continue; |
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c index 18b6c55cd08c..8b7db1e53c10 100644 --- a/drivers/scsi/pm8001/pm8001_hwi.c +++ b/drivers/scsi/pm8001/pm8001_hwi.c | |||
| @@ -339,7 +339,7 @@ update_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha, int number) | |||
| 339 | 339 | ||
| 340 | /** | 340 | /** |
| 341 | * bar4_shift - function is called to shift BAR base address | 341 | * bar4_shift - function is called to shift BAR base address |
| 342 | * @pm8001_ha : our hba card infomation | 342 | * @pm8001_ha : our hba card information |
| 343 | * @shiftValue : shifting value in memory bar. | 343 | * @shiftValue : shifting value in memory bar. |
| 344 | */ | 344 | */ |
| 345 | static int bar4_shift(struct pm8001_hba_info *pm8001_ha, u32 shiftValue) | 345 | static int bar4_shift(struct pm8001_hba_info *pm8001_ha, u32 shiftValue) |
diff --git a/drivers/scsi/pm8001/pm8001_hwi.h b/drivers/scsi/pm8001/pm8001_hwi.h index 833a5201eda4..909132041c07 100644 --- a/drivers/scsi/pm8001/pm8001_hwi.h +++ b/drivers/scsi/pm8001/pm8001_hwi.h | |||
| @@ -209,7 +209,7 @@ struct pio_setup_fis { | |||
| 209 | 209 | ||
| 210 | /* | 210 | /* |
| 211 | * brief the data structure of SATA Completion Response | 211 | * brief the data structure of SATA Completion Response |
| 212 | * use to discribe the sata task response (64 bytes) | 212 | * use to describe the sata task response (64 bytes) |
| 213 | */ | 213 | */ |
| 214 | struct sata_completion_resp { | 214 | struct sata_completion_resp { |
| 215 | __le32 tag; | 215 | __le32 tag; |
| @@ -951,7 +951,7 @@ struct set_dev_state_resp { | |||
| 951 | #define PCIE_EVENT_INTERRUPT 0x003044 | 951 | #define PCIE_EVENT_INTERRUPT 0x003044 |
| 952 | #define PCIE_ERROR_INTERRUPT_ENABLE 0x003048 | 952 | #define PCIE_ERROR_INTERRUPT_ENABLE 0x003048 |
| 953 | #define PCIE_ERROR_INTERRUPT 0x00304C | 953 | #define PCIE_ERROR_INTERRUPT 0x00304C |
| 954 | /* signature defintion for host scratch pad0 register */ | 954 | /* signature definition for host scratch pad0 register */ |
| 955 | #define SPC_SOFT_RESET_SIGNATURE 0x252acbcd | 955 | #define SPC_SOFT_RESET_SIGNATURE 0x252acbcd |
| 956 | /* Signature for Soft Reset */ | 956 | /* Signature for Soft Reset */ |
| 957 | 957 | ||
diff --git a/drivers/scsi/pm8001/pm8001_sas.h b/drivers/scsi/pm8001/pm8001_sas.h index bdb6b27dedd6..aa05e661d113 100644 --- a/drivers/scsi/pm8001/pm8001_sas.h +++ b/drivers/scsi/pm8001/pm8001_sas.h | |||
| @@ -445,7 +445,7 @@ struct fw_control_info { | |||
| 445 | struct fw_control_ex { | 445 | struct fw_control_ex { |
| 446 | struct fw_control_info *fw_control; | 446 | struct fw_control_info *fw_control; |
| 447 | void *buffer;/* keep buffer pointer to be | 447 | void *buffer;/* keep buffer pointer to be |
| 448 | freed when the responce comes*/ | 448 | freed when the response comes*/ |
| 449 | void *virtAddr;/* keep virtual address of the data */ | 449 | void *virtAddr;/* keep virtual address of the data */ |
| 450 | void *usrAddr;/* keep virtual address of the | 450 | void *usrAddr;/* keep virtual address of the |
| 451 | user data */ | 451 | user data */ |
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index bcf858e88c64..96d5ad0c1e42 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c | |||
| @@ -213,7 +213,7 @@ static int pmcraid_slave_alloc(struct scsi_device *scsi_dev) | |||
| 213 | * pmcraid_slave_configure - Configures a SCSI device | 213 | * pmcraid_slave_configure - Configures a SCSI device |
| 214 | * @scsi_dev: scsi device struct | 214 | * @scsi_dev: scsi device struct |
| 215 | * | 215 | * |
| 216 | * This fucntion is executed by SCSI mid layer just after a device is first | 216 | * This function is executed by SCSI mid layer just after a device is first |
| 217 | * scanned (i.e. it has responded to an INQUIRY). For VSET resources, the | 217 | * scanned (i.e. it has responded to an INQUIRY). For VSET resources, the |
| 218 | * timeout value (default 30s) will be over-written to a higher value (60s) | 218 | * timeout value (default 30s) will be over-written to a higher value (60s) |
| 219 | * and max_sectors value will be over-written to 512. It also sets queue depth | 219 | * and max_sectors value will be over-written to 512. It also sets queue depth |
| @@ -2122,7 +2122,7 @@ static void pmcraid_fail_outstanding_cmds(struct pmcraid_instance *pinstance) | |||
| 2122 | * | 2122 | * |
| 2123 | * This function executes most of the steps required for IOA reset. This gets | 2123 | * This function executes most of the steps required for IOA reset. This gets |
| 2124 | * called by user threads (modprobe/insmod/rmmod) timer, tasklet and midlayer's | 2124 | * called by user threads (modprobe/insmod/rmmod) timer, tasklet and midlayer's |
| 2125 | * 'eh_' thread. Access to variables used for controling the reset sequence is | 2125 | * 'eh_' thread. Access to variables used for controlling the reset sequence is |
| 2126 | * synchronized using host lock. Various functions called during reset process | 2126 | * synchronized using host lock. Various functions called during reset process |
| 2127 | * would make use of a single command block, pointer to which is also stored in | 2127 | * would make use of a single command block, pointer to which is also stored in |
| 2128 | * adapter instance structure. | 2128 | * adapter instance structure. |
| @@ -2994,7 +2994,7 @@ static int pmcraid_abort_complete(struct pmcraid_cmd *cancel_cmd) | |||
| 2994 | 2994 | ||
| 2995 | /* If the abort task is not timed out we will get a Good completion | 2995 | /* If the abort task is not timed out we will get a Good completion |
| 2996 | * as sense_key, otherwise we may get one the following responses | 2996 | * as sense_key, otherwise we may get one the following responses |
| 2997 | * due to subsquent bus reset or device reset. In case IOASC is | 2997 | * due to subsequent bus reset or device reset. In case IOASC is |
| 2998 | * NR_SYNC_REQUIRED, set sync_reqd flag for the corresponding resource | 2998 | * NR_SYNC_REQUIRED, set sync_reqd flag for the corresponding resource |
| 2999 | */ | 2999 | */ |
| 3000 | if (ioasc == PMCRAID_IOASC_UA_BUS_WAS_RESET || | 3000 | if (ioasc == PMCRAID_IOASC_UA_BUS_WAS_RESET || |
| @@ -3933,7 +3933,7 @@ static long pmcraid_ioctl_passthrough( | |||
| 3933 | 3933 | ||
| 3934 | /* if abort task couldn't find the command i.e it got | 3934 | /* if abort task couldn't find the command i.e it got |
| 3935 | * completed prior to aborting, return good completion. | 3935 | * completed prior to aborting, return good completion. |
| 3936 | * if command got aborted succesfully or there was IOA | 3936 | * if command got aborted successfully or there was IOA |
| 3937 | * reset due to abort task itself getting timedout then | 3937 | * reset due to abort task itself getting timedout then |
| 3938 | * return -ETIMEDOUT | 3938 | * return -ETIMEDOUT |
| 3939 | */ | 3939 | */ |
| @@ -5932,7 +5932,7 @@ static int __devinit pmcraid_probe( | |||
| 5932 | * However, firmware supports 64-bit streaming DMA buffers, whereas | 5932 | * However, firmware supports 64-bit streaming DMA buffers, whereas |
| 5933 | * coherent buffers are to be 32-bit. Since pci_alloc_consistent always | 5933 | * coherent buffers are to be 32-bit. Since pci_alloc_consistent always |
| 5934 | * returns memory within 4GB (if not, change this logic), coherent | 5934 | * returns memory within 4GB (if not, change this logic), coherent |
| 5935 | * buffers are within firmware acceptible address ranges. | 5935 | * buffers are within firmware acceptable address ranges. |
| 5936 | */ | 5936 | */ |
| 5937 | if ((sizeof(dma_addr_t) == 4) || | 5937 | if ((sizeof(dma_addr_t) == 4) || |
| 5938 | pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) | 5938 | pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) |
diff --git a/drivers/scsi/pmcraid.h b/drivers/scsi/pmcraid.h index 4db210d93947..34e4c915002e 100644 --- a/drivers/scsi/pmcraid.h +++ b/drivers/scsi/pmcraid.h | |||
| @@ -1024,7 +1024,7 @@ static struct pmcraid_ioasc_error pmcraid_ioasc_error_table[] = { | |||
| 1024 | 1024 | ||
| 1025 | 1025 | ||
| 1026 | /* | 1026 | /* |
| 1027 | * pmcraid_ioctl_header - definition of header structure that preceeds all the | 1027 | * pmcraid_ioctl_header - definition of header structure that precedes all the |
| 1028 | * buffers given as ioctl arguments. | 1028 | * buffers given as ioctl arguments. |
| 1029 | * | 1029 | * |
| 1030 | * .signature : always ASCII string, "PMCRAID" | 1030 | * .signature : always ASCII string, "PMCRAID" |
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 5dec684bf010..8ba5744c267e 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c | |||
| @@ -78,7 +78,7 @@ | |||
| 78 | - Clean up vchan handling | 78 | - Clean up vchan handling |
| 79 | Rev 3.23.33 July 3, 2003, Jes Sorensen | 79 | Rev 3.23.33 July 3, 2003, Jes Sorensen |
| 80 | - Don't define register access macros before define determining MMIO. | 80 | - Don't define register access macros before define determining MMIO. |
| 81 | This just happend to work out on ia64 but not elsewhere. | 81 | This just happened to work out on ia64 but not elsewhere. |
| 82 | - Don't try and read from the card while it is in reset as | 82 | - Don't try and read from the card while it is in reset as |
| 83 | it won't respond and causes an MCA | 83 | it won't respond and causes an MCA |
| 84 | Rev 3.23.32 June 23, 2003, Jes Sorensen | 84 | Rev 3.23.32 June 23, 2003, Jes Sorensen |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 6c51c0a35b9e..ee20353c8550 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
| @@ -2086,7 +2086,7 @@ struct ct_sns_pkt { | |||
| 2086 | }; | 2086 | }; |
| 2087 | 2087 | ||
| 2088 | /* | 2088 | /* |
| 2089 | * SNS command structures -- for 2200 compatability. | 2089 | * SNS command structures -- for 2200 compatibility. |
| 2090 | */ | 2090 | */ |
| 2091 | #define RFT_ID_SNS_SCMD_LEN 22 | 2091 | #define RFT_ID_SNS_SCMD_LEN 22 |
| 2092 | #define RFT_ID_SNS_CMD_SIZE 60 | 2092 | #define RFT_ID_SNS_CMD_SIZE 60 |
diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h index 631fefc8482d..f5ba09c8a663 100644 --- a/drivers/scsi/qla2xxx/qla_fw.h +++ b/drivers/scsi/qla2xxx/qla_fw.h | |||
| @@ -539,7 +539,7 @@ struct sts_entry_24xx { | |||
| 539 | * If DIF Error is set in comp_status, these additional fields are | 539 | * If DIF Error is set in comp_status, these additional fields are |
| 540 | * defined: | 540 | * defined: |
| 541 | * &data[10] : uint8_t report_runt_bg[2]; - computed guard | 541 | * &data[10] : uint8_t report_runt_bg[2]; - computed guard |
| 542 | * &data[12] : uint8_t actual_dif[8]; - DIF Data recieved | 542 | * &data[12] : uint8_t actual_dif[8]; - DIF Data received |
| 543 | * &data[20] : uint8_t expected_dif[8]; - DIF Data computed | 543 | * &data[20] : uint8_t expected_dif[8]; - DIF Data computed |
| 544 | */ | 544 | */ |
| 545 | }; | 545 | }; |
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index d17ed9a94a0c..712518d05128 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
| @@ -414,7 +414,7 @@ skip_rio: | |||
| 414 | "marked OFFLINE!\n"); | 414 | "marked OFFLINE!\n"); |
| 415 | vha->flags.online = 0; | 415 | vha->flags.online = 0; |
| 416 | } else { | 416 | } else { |
| 417 | /* Check to see if MPI timeout occured */ | 417 | /* Check to see if MPI timeout occurred */ |
| 418 | if ((mbx & MBX_3) && (ha->flags.port0)) | 418 | if ((mbx & MBX_3) && (ha->flags.port0)) |
| 419 | set_bit(MPI_RESET_NEEDED, | 419 | set_bit(MPI_RESET_NEEDED, |
| 420 | &vha->dpc_flags); | 420 | &vha->dpc_flags); |
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 7a7c0ecfe7dd..34893397ac84 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
| @@ -303,7 +303,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) | |||
| 303 | !test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { | 303 | !test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { |
| 304 | 304 | ||
| 305 | qla_printk(KERN_WARNING, ha, | 305 | qla_printk(KERN_WARNING, ha, |
| 306 | "Mailbox command timeout occured. " | 306 | "Mailbox command timeout occurred. " |
| 307 | "Scheduling ISP " "abort. eeh_busy: 0x%x\n", | 307 | "Scheduling ISP " "abort. eeh_busy: 0x%x\n", |
| 308 | ha->flags.eeh_busy); | 308 | ha->flags.eeh_busy); |
| 309 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | 309 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); |
| @@ -321,7 +321,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) | |||
| 321 | !test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { | 321 | !test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { |
| 322 | 322 | ||
| 323 | qla_printk(KERN_WARNING, ha, | 323 | qla_printk(KERN_WARNING, ha, |
| 324 | "Mailbox command timeout occured. " | 324 | "Mailbox command timeout occurred. " |
| 325 | "Issuing ISP abort.\n"); | 325 | "Issuing ISP abort.\n"); |
| 326 | 326 | ||
| 327 | set_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags); | 327 | set_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags); |
| @@ -3789,7 +3789,7 @@ qla2x00_loopback_test(scsi_qla_host_t *vha, struct msg_echo_lb *mreq, | |||
| 3789 | mcp->mb[20] = LSW(MSD(mreq->send_dma)); | 3789 | mcp->mb[20] = LSW(MSD(mreq->send_dma)); |
| 3790 | mcp->mb[21] = MSW(MSD(mreq->send_dma)); | 3790 | mcp->mb[21] = MSW(MSD(mreq->send_dma)); |
| 3791 | 3791 | ||
| 3792 | /* recieve data address */ | 3792 | /* receive data address */ |
| 3793 | mcp->mb[16] = LSW(mreq->rcv_dma); | 3793 | mcp->mb[16] = LSW(mreq->rcv_dma); |
| 3794 | mcp->mb[17] = MSW(mreq->rcv_dma); | 3794 | mcp->mb[17] = MSW(mreq->rcv_dma); |
| 3795 | mcp->mb[6] = LSW(MSD(mreq->rcv_dma)); | 3795 | mcp->mb[6] = LSW(MSD(mreq->rcv_dma)); |
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c index 76ec876e6b21..455fe134d31d 100644 --- a/drivers/scsi/qla2xxx/qla_nx.c +++ b/drivers/scsi/qla2xxx/qla_nx.c | |||
| @@ -2598,7 +2598,7 @@ qla82xx_calc_dsd_lists(uint16_t dsds) | |||
| 2598 | * qla82xx_start_scsi() - Send a SCSI command to the ISP | 2598 | * qla82xx_start_scsi() - Send a SCSI command to the ISP |
| 2599 | * @sp: command to send to the ISP | 2599 | * @sp: command to send to the ISP |
| 2600 | * | 2600 | * |
| 2601 | * Returns non-zero if a failure occured, else zero. | 2601 | * Returns non-zero if a failure occurred, else zero. |
| 2602 | */ | 2602 | */ |
| 2603 | int | 2603 | int |
| 2604 | qla82xx_start_scsi(srb_t *sp) | 2604 | qla82xx_start_scsi(srb_t *sp) |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 75a966c94860..aa7747529165 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
| @@ -1046,7 +1046,7 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd) | |||
| 1046 | 1046 | ||
| 1047 | eh_bus_reset_done: | 1047 | eh_bus_reset_done: |
| 1048 | qla_printk(KERN_INFO, vha->hw, "%s: reset %s\n", __func__, | 1048 | qla_printk(KERN_INFO, vha->hw, "%s: reset %s\n", __func__, |
| 1049 | (ret == FAILED) ? "failed" : "succeded"); | 1049 | (ret == FAILED) ? "failed" : "succeeded"); |
| 1050 | 1050 | ||
| 1051 | return ret; | 1051 | return ret; |
| 1052 | } | 1052 | } |
| @@ -1136,7 +1136,7 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd) | |||
| 1136 | 1136 | ||
| 1137 | eh_host_reset_lock: | 1137 | eh_host_reset_lock: |
| 1138 | qla_printk(KERN_INFO, ha, "%s: reset %s\n", __func__, | 1138 | qla_printk(KERN_INFO, ha, "%s: reset %s\n", __func__, |
| 1139 | (ret == FAILED) ? "failed" : "succeded"); | 1139 | (ret == FAILED) ? "failed" : "succeeded"); |
| 1140 | 1140 | ||
| 1141 | return ret; | 1141 | return ret; |
| 1142 | } | 1142 | } |
| @@ -3902,7 +3902,7 @@ uint32_t qla82xx_error_recovery(scsi_qla_host_t *base_vha) | |||
| 3902 | continue; | 3902 | continue; |
| 3903 | if (atomic_read(&other_pdev->enable_cnt)) { | 3903 | if (atomic_read(&other_pdev->enable_cnt)) { |
| 3904 | DEBUG17(qla_printk(KERN_INFO, ha, | 3904 | DEBUG17(qla_printk(KERN_INFO, ha, |
| 3905 | "Found PCI func availabe and enabled at 0x%x\n", | 3905 | "Found PCI func available and enabled at 0x%x\n", |
| 3906 | fn)); | 3906 | fn)); |
| 3907 | pci_dev_put(other_pdev); | 3907 | pci_dev_put(other_pdev); |
| 3908 | break; | 3908 | break; |
diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h index c1f8d1b150f7..4757878d59dd 100644 --- a/drivers/scsi/qla4xxx/ql4_def.h +++ b/drivers/scsi/qla4xxx/ql4_def.h | |||
| @@ -182,7 +182,7 @@ struct srb { | |||
| 182 | uint16_t flags; /* (1) Status flags. */ | 182 | uint16_t flags; /* (1) Status flags. */ |
| 183 | 183 | ||
| 184 | #define SRB_DMA_VALID BIT_3 /* DMA Buffer mapped. */ | 184 | #define SRB_DMA_VALID BIT_3 /* DMA Buffer mapped. */ |
| 185 | #define SRB_GOT_SENSE BIT_4 /* sense data recieved. */ | 185 | #define SRB_GOT_SENSE BIT_4 /* sense data received. */ |
| 186 | uint8_t state; /* (1) Status flags. */ | 186 | uint8_t state; /* (1) Status flags. */ |
| 187 | 187 | ||
| 188 | #define SRB_NO_QUEUE_STATE 0 /* Request is in between states */ | 188 | #define SRB_NO_QUEUE_STATE 0 /* Request is in between states */ |
diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c index bbb2e903d38a..48e2241ddaf4 100644 --- a/drivers/scsi/qla4xxx/ql4_init.c +++ b/drivers/scsi/qla4xxx/ql4_init.c | |||
| @@ -1338,7 +1338,7 @@ exit_init_hba: | |||
| 1338 | } | 1338 | } |
| 1339 | 1339 | ||
| 1340 | DEBUG2(printk("scsi%ld: initialize adapter: %s\n", ha->host_no, | 1340 | DEBUG2(printk("scsi%ld: initialize adapter: %s\n", ha->host_no, |
| 1341 | status == QLA_ERROR ? "FAILED" : "SUCCEDED")); | 1341 | status == QLA_ERROR ? "FAILED" : "SUCCEEDED")); |
| 1342 | return status; | 1342 | return status; |
| 1343 | } | 1343 | } |
| 1344 | 1344 | ||
diff --git a/drivers/scsi/qla4xxx/ql4_nvram.h b/drivers/scsi/qla4xxx/ql4_nvram.h index b3831bd29479..945cc328f57f 100644 --- a/drivers/scsi/qla4xxx/ql4_nvram.h +++ b/drivers/scsi/qla4xxx/ql4_nvram.h | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | #define FM93C56A_ERASE 0x3 | 28 | #define FM93C56A_ERASE 0x3 |
| 29 | #define FM93C56A_ERASE_ALL 0x0 | 29 | #define FM93C56A_ERASE_ALL 0x0 |
| 30 | 30 | ||
| 31 | /* Command Extentions */ | 31 | /* Command Extensions */ |
| 32 | #define FM93C56A_WEN_EXT 0x3 | 32 | #define FM93C56A_WEN_EXT 0x3 |
| 33 | #define FM93C56A_WRITE_ALL_EXT 0x1 | 33 | #define FM93C56A_WRITE_ALL_EXT 0x1 |
| 34 | #define FM93C56A_WDS_EXT 0x0 | 34 | #define FM93C56A_WDS_EXT 0x0 |
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index a4acb0dd7beb..230ba097d28c 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
| @@ -1213,7 +1213,7 @@ recover_ha_init_adapter: | |||
| 1213 | 1213 | ||
| 1214 | clear_bit(DPC_RESET_ACTIVE, &ha->dpc_flags); | 1214 | clear_bit(DPC_RESET_ACTIVE, &ha->dpc_flags); |
| 1215 | DEBUG2(printk("scsi%ld: recover adapter: %s\n", ha->host_no, | 1215 | DEBUG2(printk("scsi%ld: recover adapter: %s\n", ha->host_no, |
| 1216 | status == QLA_ERROR ? "FAILED" : "SUCCEDED")); | 1216 | status == QLA_ERROR ? "FAILED" : "SUCCEEDED")); |
| 1217 | 1217 | ||
| 1218 | return status; | 1218 | return status; |
| 1219 | } | 1219 | } |
| @@ -2110,7 +2110,7 @@ static int qla4xxx_eh_abort(struct scsi_cmnd *cmd) | |||
| 2110 | 2110 | ||
| 2111 | ql4_printk(KERN_INFO, ha, | 2111 | ql4_printk(KERN_INFO, ha, |
| 2112 | "scsi%ld:%d:%d: Abort command - %s\n", | 2112 | "scsi%ld:%d:%d: Abort command - %s\n", |
| 2113 | ha->host_no, id, lun, (ret == SUCCESS) ? "succeded" : "failed"); | 2113 | ha->host_no, id, lun, (ret == SUCCESS) ? "succeeded" : "failed"); |
| 2114 | 2114 | ||
| 2115 | return ret; | 2115 | return ret; |
| 2116 | } | 2116 | } |
| @@ -2278,7 +2278,7 @@ static int qla4xxx_eh_host_reset(struct scsi_cmnd *cmd) | |||
| 2278 | return_status = SUCCESS; | 2278 | return_status = SUCCESS; |
| 2279 | 2279 | ||
| 2280 | ql4_printk(KERN_INFO, ha, "HOST RESET %s.\n", | 2280 | ql4_printk(KERN_INFO, ha, "HOST RESET %s.\n", |
| 2281 | return_status == FAILED ? "FAILED" : "SUCCEDED"); | 2281 | return_status == FAILED ? "FAILED" : "SUCCEEDED"); |
| 2282 | 2282 | ||
| 2283 | return return_status; | 2283 | return return_status; |
| 2284 | } | 2284 | } |
| @@ -2492,7 +2492,7 @@ qla4xxx_pci_slot_reset(struct pci_dev *pdev) | |||
| 2492 | /* Initialize device or resume if in suspended state */ | 2492 | /* Initialize device or resume if in suspended state */ |
| 2493 | rc = pci_enable_device(pdev); | 2493 | rc = pci_enable_device(pdev); |
| 2494 | if (rc) { | 2494 | if (rc) { |
| 2495 | ql4_printk(KERN_WARNING, ha, "scsi%ld: %s: Cant re-enable " | 2495 | ql4_printk(KERN_WARNING, ha, "scsi%ld: %s: Can't re-enable " |
| 2496 | "device after reset\n", ha->host_no, __func__); | 2496 | "device after reset\n", ha->host_no, __func__); |
| 2497 | goto exit_slot_reset; | 2497 | goto exit_slot_reset; |
| 2498 | } | 2498 | } |
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index fa5758cbdedb..6888b2ca5bfc 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c | |||
| @@ -2454,7 +2454,7 @@ static void scsi_debug_slave_destroy(struct scsi_device *sdp) | |||
| 2454 | printk(KERN_INFO "scsi_debug: slave_destroy <%u %u %u %u>\n", | 2454 | printk(KERN_INFO "scsi_debug: slave_destroy <%u %u %u %u>\n", |
| 2455 | sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); | 2455 | sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); |
| 2456 | if (devip) { | 2456 | if (devip) { |
| 2457 | /* make this slot avaliable for re-use */ | 2457 | /* make this slot available for re-use */ |
| 2458 | devip->used = 0; | 2458 | devip->used = 0; |
| 2459 | sdp->hostdata = NULL; | 2459 | sdp->hostdata = NULL; |
| 2460 | } | 2460 | } |
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 6d5c7ff43f5b..ab55c2fa7ce2 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
| @@ -443,7 +443,7 @@ static void scsi_run_queue(struct request_queue *q) | |||
| 443 | &sdev->request_queue->queue_flags); | 443 | &sdev->request_queue->queue_flags); |
| 444 | if (flagset) | 444 | if (flagset) |
| 445 | queue_flag_set(QUEUE_FLAG_REENTER, sdev->request_queue); | 445 | queue_flag_set(QUEUE_FLAG_REENTER, sdev->request_queue); |
| 446 | __blk_run_queue(sdev->request_queue, false); | 446 | __blk_run_queue(sdev->request_queue); |
| 447 | if (flagset) | 447 | if (flagset) |
| 448 | queue_flag_clear(QUEUE_FLAG_REENTER, sdev->request_queue); | 448 | queue_flag_clear(QUEUE_FLAG_REENTER, sdev->request_queue); |
| 449 | spin_unlock(sdev->request_queue->queue_lock); | 449 | spin_unlock(sdev->request_queue->queue_lock); |
diff --git a/drivers/scsi/scsi_netlink.c b/drivers/scsi/scsi_netlink.c index a2ed201885ae..26a8a45584ef 100644 --- a/drivers/scsi/scsi_netlink.c +++ b/drivers/scsi/scsi_netlink.c | |||
| @@ -499,7 +499,7 @@ scsi_netlink_init(void) | |||
| 499 | SCSI_NL_GRP_CNT, scsi_nl_rcv_msg, NULL, | 499 | SCSI_NL_GRP_CNT, scsi_nl_rcv_msg, NULL, |
| 500 | THIS_MODULE); | 500 | THIS_MODULE); |
| 501 | if (!scsi_nl_sock) { | 501 | if (!scsi_nl_sock) { |
| 502 | printk(KERN_ERR "%s: register of recieve handler failed\n", | 502 | printk(KERN_ERR "%s: register of receive handler failed\n", |
| 503 | __func__); | 503 | __func__); |
| 504 | netlink_unregister_notifier(&scsi_netlink_notifier); | 504 | netlink_unregister_notifier(&scsi_netlink_notifier); |
| 505 | return; | 505 | return; |
diff --git a/drivers/scsi/scsi_tgt_lib.c b/drivers/scsi/scsi_tgt_lib.c index f67282058ba1..8bca8c25ba69 100644 --- a/drivers/scsi/scsi_tgt_lib.c +++ b/drivers/scsi/scsi_tgt_lib.c | |||
| @@ -93,7 +93,7 @@ struct scsi_cmnd *scsi_host_get_command(struct Scsi_Host *shost, | |||
| 93 | 93 | ||
| 94 | /* | 94 | /* |
| 95 | * The blk helpers are used to the READ/WRITE requests | 95 | * The blk helpers are used to the READ/WRITE requests |
| 96 | * transfering data from a initiator point of view. Since | 96 | * transferring data from a initiator point of view. Since |
| 97 | * we are in target mode we want the opposite. | 97 | * we are in target mode we want the opposite. |
| 98 | */ | 98 | */ |
| 99 | rq = blk_get_request(shost->uspace_req_q, !write, gfp_mask); | 99 | rq = blk_get_request(shost->uspace_req_q, !write, gfp_mask); |
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 2941d2d92c94..28c33506e4ad 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c | |||
| @@ -2378,7 +2378,7 @@ fc_flush_devloss(struct Scsi_Host *shost) | |||
| 2378 | * fc_remove_host - called to terminate any fc_transport-related elements for a scsi host. | 2378 | * fc_remove_host - called to terminate any fc_transport-related elements for a scsi host. |
| 2379 | * @shost: Which &Scsi_Host | 2379 | * @shost: Which &Scsi_Host |
| 2380 | * | 2380 | * |
| 2381 | * This routine is expected to be called immediately preceeding the | 2381 | * This routine is expected to be called immediately preceding the |
| 2382 | * a driver's call to scsi_remove_host(). | 2382 | * a driver's call to scsi_remove_host(). |
| 2383 | * | 2383 | * |
| 2384 | * WARNING: A driver utilizing the fc_transport, which fails to call | 2384 | * WARNING: A driver utilizing the fc_transport, which fails to call |
| @@ -2458,7 +2458,7 @@ static void fc_terminate_rport_io(struct fc_rport *rport) | |||
| 2458 | } | 2458 | } |
| 2459 | 2459 | ||
| 2460 | /** | 2460 | /** |
| 2461 | * fc_starget_delete - called to delete the scsi decendents of an rport | 2461 | * fc_starget_delete - called to delete the scsi descendants of an rport |
| 2462 | * @work: remote port to be operated on. | 2462 | * @work: remote port to be operated on. |
| 2463 | * | 2463 | * |
| 2464 | * Deletes target and all sdevs. | 2464 | * Deletes target and all sdevs. |
| @@ -3829,7 +3829,7 @@ fc_bsg_goose_queue(struct fc_rport *rport) | |||
| 3829 | !test_bit(QUEUE_FLAG_REENTER, &rport->rqst_q->queue_flags); | 3829 | !test_bit(QUEUE_FLAG_REENTER, &rport->rqst_q->queue_flags); |
| 3830 | if (flagset) | 3830 | if (flagset) |
| 3831 | queue_flag_set(QUEUE_FLAG_REENTER, rport->rqst_q); | 3831 | queue_flag_set(QUEUE_FLAG_REENTER, rport->rqst_q); |
| 3832 | __blk_run_queue(rport->rqst_q, false); | 3832 | __blk_run_queue(rport->rqst_q); |
| 3833 | if (flagset) | 3833 | if (flagset) |
| 3834 | queue_flag_clear(QUEUE_FLAG_REENTER, rport->rqst_q); | 3834 | queue_flag_clear(QUEUE_FLAG_REENTER, rport->rqst_q); |
| 3835 | spin_unlock_irqrestore(rport->rqst_q->queue_lock, flags); | 3835 | spin_unlock_irqrestore(rport->rqst_q->queue_lock, flags); |
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index b61ebec6bca7..bd0806e64e85 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
| @@ -1055,7 +1055,7 @@ static int sd_getgeo(struct block_device *bdev, struct hd_geometry *geo) | |||
| 1055 | * @arg: this is third argument given to ioctl(2) system call. | 1055 | * @arg: this is third argument given to ioctl(2) system call. |
| 1056 | * Often contains a pointer. | 1056 | * Often contains a pointer. |
| 1057 | * | 1057 | * |
| 1058 | * Returns 0 if successful (some ioctls return postive numbers on | 1058 | * Returns 0 if successful (some ioctls return positive numbers on |
| 1059 | * success as well). Returns a negated errno value in case of error. | 1059 | * success as well). Returns a negated errno value in case of error. |
| 1060 | * | 1060 | * |
| 1061 | * Note: most ioctls are forward onto the block subsystem or further | 1061 | * Note: most ioctls are forward onto the block subsystem or further |
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index aefadc6a1607..95019c747cc1 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c | |||
| @@ -567,7 +567,7 @@ static const struct block_device_operations sr_bdops = | |||
| 567 | .revalidate_disk = sr_block_revalidate_disk, | 567 | .revalidate_disk = sr_block_revalidate_disk, |
| 568 | /* | 568 | /* |
| 569 | * No compat_ioctl for now because sr_block_ioctl never | 569 | * No compat_ioctl for now because sr_block_ioctl never |
| 570 | * seems to pass arbitary ioctls down to host drivers. | 570 | * seems to pass arbitrary ioctls down to host drivers. |
| 571 | */ | 571 | */ |
| 572 | }; | 572 | }; |
| 573 | 573 | ||
diff --git a/drivers/scsi/sun3_NCR5380.c b/drivers/scsi/sun3_NCR5380.c index 4f0e5485ffde..07eaef1c722b 100644 --- a/drivers/scsi/sun3_NCR5380.c +++ b/drivers/scsi/sun3_NCR5380.c | |||
| @@ -467,7 +467,7 @@ static void free_all_tags( void ) | |||
| 467 | * | 467 | * |
| 468 | * Parameters: struct scsi_cmnd *cmd | 468 | * Parameters: struct scsi_cmnd *cmd |
| 469 | * The command to work on. The first scatter buffer's data are | 469 | * The command to work on. The first scatter buffer's data are |
| 470 | * assumed to be already transfered into ptr/this_residual. | 470 | * assumed to be already transferred into ptr/this_residual. |
| 471 | */ | 471 | */ |
| 472 | 472 | ||
| 473 | static void merge_contiguous_buffers(struct scsi_cmnd *cmd) | 473 | static void merge_contiguous_buffers(struct scsi_cmnd *cmd) |
| @@ -1717,7 +1717,7 @@ static int NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd, | |||
| 1717 | * bytes to transfer, **data - pointer to data pointer. | 1717 | * bytes to transfer, **data - pointer to data pointer. |
| 1718 | * | 1718 | * |
| 1719 | * Returns : -1 when different phase is entered without transferring | 1719 | * Returns : -1 when different phase is entered without transferring |
| 1720 | * maximum number of bytes, 0 if all bytes are transfered or exit | 1720 | * maximum number of bytes, 0 if all bytes are transferred or exit |
| 1721 | * is in same phase. | 1721 | * is in same phase. |
| 1722 | * | 1722 | * |
| 1723 | * Also, *phase, *count, *data are modified in place. | 1723 | * Also, *phase, *count, *data are modified in place. |
| @@ -1904,7 +1904,7 @@ static int do_abort (struct Scsi_Host *host) | |||
| 1904 | * bytes to transfer, **data - pointer to data pointer. | 1904 | * bytes to transfer, **data - pointer to data pointer. |
| 1905 | * | 1905 | * |
| 1906 | * Returns : -1 when different phase is entered without transferring | 1906 | * Returns : -1 when different phase is entered without transferring |
| 1907 | * maximum number of bytes, 0 if all bytes or transfered or exit | 1907 | * maximum number of bytes, 0 if all bytes or transferred or exit |
| 1908 | * is in same phase. | 1908 | * is in same phase. |
| 1909 | * | 1909 | * |
| 1910 | * Also, *phase, *count, *data are modified in place. | 1910 | * Also, *phase, *count, *data are modified in place. |
diff --git a/drivers/scsi/sym53c416.c b/drivers/scsi/sym53c416.c index 190107ae120b..012c86edd59f 100644 --- a/drivers/scsi/sym53c416.c +++ b/drivers/scsi/sym53c416.c | |||
| @@ -774,7 +774,7 @@ static int sym53c416_host_reset(Scsi_Cmnd *SCpnt) | |||
| 774 | 774 | ||
| 775 | /* printk("sym53c416_reset\n"); */ | 775 | /* printk("sym53c416_reset\n"); */ |
| 776 | base = SCpnt->device->host->io_port; | 776 | base = SCpnt->device->host->io_port; |
| 777 | /* search scsi_id - fixme, we shouldnt need to iterate for this! */ | 777 | /* search scsi_id - fixme, we shouldn't need to iterate for this! */ |
| 778 | for(i = 0; i < host_index && scsi_id == -1; i++) | 778 | for(i = 0; i < host_index && scsi_id == -1; i++) |
| 779 | if(hosts[i].base == base) | 779 | if(hosts[i].base == base) |
| 780 | scsi_id = hosts[i].scsi_id; | 780 | scsi_id = hosts[i].scsi_id; |
diff --git a/drivers/scsi/sym53c8xx_2/sym_fw1.h b/drivers/scsi/sym53c8xx_2/sym_fw1.h index 7b08d6caaa99..63952ee300b5 100644 --- a/drivers/scsi/sym53c8xx_2/sym_fw1.h +++ b/drivers/scsi/sym53c8xx_2/sym_fw1.h | |||
| @@ -1449,7 +1449,7 @@ static struct SYM_FWB_SCR SYM_FWB_SCR = { | |||
| 1449 | PADDR_B (msg_weird_seen), | 1449 | PADDR_B (msg_weird_seen), |
| 1450 | /* | 1450 | /* |
| 1451 | * We donnot handle extended messages from SCRIPTS. | 1451 | * We donnot handle extended messages from SCRIPTS. |
| 1452 | * Read the amount of data correponding to the | 1452 | * Read the amount of data corresponding to the |
| 1453 | * message length and call the C code. | 1453 | * message length and call the C code. |
| 1454 | */ | 1454 | */ |
| 1455 | SCR_COPY (1), | 1455 | SCR_COPY (1), |
diff --git a/drivers/scsi/sym53c8xx_2/sym_fw2.h b/drivers/scsi/sym53c8xx_2/sym_fw2.h index ae1fb179b88e..c87d72443a16 100644 --- a/drivers/scsi/sym53c8xx_2/sym_fw2.h +++ b/drivers/scsi/sym53c8xx_2/sym_fw2.h | |||
| @@ -1326,7 +1326,7 @@ static struct SYM_FWB_SCR SYM_FWB_SCR = { | |||
| 1326 | PADDR_B (msg_weird_seen), | 1326 | PADDR_B (msg_weird_seen), |
| 1327 | /* | 1327 | /* |
| 1328 | * We donnot handle extended messages from SCRIPTS. | 1328 | * We donnot handle extended messages from SCRIPTS. |
| 1329 | * Read the amount of data correponding to the | 1329 | * Read the amount of data corresponding to the |
| 1330 | * message length and call the C code. | 1330 | * message length and call the C code. |
| 1331 | */ | 1331 | */ |
| 1332 | SCR_STORE_REL (scratcha, 1), | 1332 | SCR_STORE_REL (scratcha, 1), |
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c index 2c3e89ddf069..d92fe4037e94 100644 --- a/drivers/scsi/sym53c8xx_2/sym_hipd.c +++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c | |||
| @@ -2457,7 +2457,7 @@ static void sym_int_ma (struct sym_hcb *np) | |||
| 2457 | } | 2457 | } |
| 2458 | 2458 | ||
| 2459 | /* | 2459 | /* |
| 2460 | * The data in the dma fifo has not been transfered to | 2460 | * The data in the dma fifo has not been transferred to |
| 2461 | * the target -> add the amount to the rest | 2461 | * the target -> add the amount to the rest |
| 2462 | * and clear the data. | 2462 | * and clear the data. |
| 2463 | * Check the sstat2 register in case of wide transfer. | 2463 | * Check the sstat2 register in case of wide transfer. |
| @@ -5094,7 +5094,7 @@ fail: | |||
| 5094 | } | 5094 | } |
| 5095 | 5095 | ||
| 5096 | /* | 5096 | /* |
| 5097 | * Lun control block deallocation. Returns the number of valid remaing LCBs | 5097 | * Lun control block deallocation. Returns the number of valid remaining LCBs |
| 5098 | * for the target. | 5098 | * for the target. |
| 5099 | */ | 5099 | */ |
| 5100 | int sym_free_lcb(struct sym_hcb *np, u_char tn, u_char ln) | 5100 | int sym_free_lcb(struct sym_hcb *np, u_char tn, u_char ln) |
diff --git a/drivers/scsi/sym53c8xx_2/sym_malloc.c b/drivers/scsi/sym53c8xx_2/sym_malloc.c index 883cac10daf9..6f9af0de7ec3 100644 --- a/drivers/scsi/sym53c8xx_2/sym_malloc.c +++ b/drivers/scsi/sym53c8xx_2/sym_malloc.c | |||
| @@ -50,7 +50,7 @@ | |||
| 50 | * from the SCRIPTS code. In addition, cache line alignment | 50 | * from the SCRIPTS code. In addition, cache line alignment |
| 51 | * is guaranteed for power of 2 cache line size. | 51 | * is guaranteed for power of 2 cache line size. |
| 52 | * | 52 | * |
| 53 | * This allocator has been developped for the Linux sym53c8xx | 53 | * This allocator has been developed for the Linux sym53c8xx |
| 54 | * driver, since this O/S does not provide naturally aligned | 54 | * driver, since this O/S does not provide naturally aligned |
| 55 | * allocations. | 55 | * allocations. |
| 56 | * It has the advantage of allowing the driver to use private | 56 | * It has the advantage of allowing the driver to use private |
diff --git a/drivers/scsi/ultrastor.c b/drivers/scsi/ultrastor.c index 0571ef9639cb..9f4b58b7daad 100644 --- a/drivers/scsi/ultrastor.c +++ b/drivers/scsi/ultrastor.c | |||
| @@ -138,6 +138,7 @@ | |||
| 138 | #include <linux/spinlock.h> | 138 | #include <linux/spinlock.h> |
| 139 | #include <linux/stat.h> | 139 | #include <linux/stat.h> |
| 140 | #include <linux/bitops.h> | 140 | #include <linux/bitops.h> |
| 141 | #include <linux/delay.h> | ||
| 141 | 142 | ||
| 142 | #include <asm/io.h> | 143 | #include <asm/io.h> |
| 143 | #include <asm/system.h> | 144 | #include <asm/system.h> |
diff --git a/drivers/scsi/wd33c93.c b/drivers/scsi/wd33c93.c index 5f697e0bd009..4468ae3610f7 100644 --- a/drivers/scsi/wd33c93.c +++ b/drivers/scsi/wd33c93.c | |||
| @@ -1843,7 +1843,7 @@ check_setup_args(char *key, int *flags, int *val, char *buf) | |||
| 1843 | * | 1843 | * |
| 1844 | * The original driver used to rely on a fixed sx_table, containing periods | 1844 | * The original driver used to rely on a fixed sx_table, containing periods |
| 1845 | * for (only) the lower limits of the respective input-clock-frequency ranges | 1845 | * for (only) the lower limits of the respective input-clock-frequency ranges |
| 1846 | * (8-10/12-15/16-20 MHz). Although it seems, that no problems ocurred with | 1846 | * (8-10/12-15/16-20 MHz). Although it seems, that no problems occurred with |
| 1847 | * this setting so far, it might be desirable to adjust the transfer periods | 1847 | * this setting so far, it might be desirable to adjust the transfer periods |
| 1848 | * closer to the really attached, possibly 25% higher, input-clock, since | 1848 | * closer to the really attached, possibly 25% higher, input-clock, since |
| 1849 | * - the wd33c93 may really use a significant shorter period, than it has | 1849 | * - the wd33c93 may really use a significant shorter period, than it has |
diff --git a/drivers/scsi/wd7000.c b/drivers/scsi/wd7000.c index db451ae0a368..9ee0afef2d16 100644 --- a/drivers/scsi/wd7000.c +++ b/drivers/scsi/wd7000.c | |||
| @@ -837,7 +837,7 @@ static inline Scb *alloc_scbs(struct Scsi_Host *host, int needed) | |||
| 837 | } | 837 | } |
| 838 | } | 838 | } |
| 839 | 839 | ||
| 840 | /* Take the lock, then check we didnt get beaten, if so try again */ | 840 | /* Take the lock, then check we didn't get beaten, if so try again */ |
| 841 | spin_lock_irqsave(&scbpool_lock, flags); | 841 | spin_lock_irqsave(&scbpool_lock, flags); |
| 842 | if (freescbs < needed) { | 842 | if (freescbs < needed) { |
| 843 | spin_unlock_irqrestore(&scbpool_lock, flags); | 843 | spin_unlock_irqrestore(&scbpool_lock, flags); |
diff --git a/drivers/sfi/sfi_core.c b/drivers/sfi/sfi_core.c index 04113e5304a0..1e824fb1649b 100644 --- a/drivers/sfi/sfi_core.c +++ b/drivers/sfi/sfi_core.c | |||
| @@ -515,7 +515,7 @@ void __init sfi_init_late(void) | |||
| 515 | } | 515 | } |
| 516 | 516 | ||
| 517 | /* | 517 | /* |
| 518 | * The reason we put it here becasue we need wait till the /sys/firmware | 518 | * The reason we put it here because we need wait till the /sys/firmware |
| 519 | * is setup, then our interface can be registered in /sys/firmware/sfi | 519 | * is setup, then our interface can be registered in /sys/firmware/sfi |
| 520 | */ | 520 | */ |
| 521 | core_initcall(sfi_sysfs_init); | 521 | core_initcall(sfi_sysfs_init); |
diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h index df36a421e675..5b934851efa8 100644 --- a/drivers/sh/intc/internals.h +++ b/drivers/sh/intc/internals.h | |||
| @@ -86,7 +86,7 @@ enum { MODE_ENABLE_REG = 0, /* Bit(s) set -> interrupt enabled */ | |||
| 86 | 86 | ||
| 87 | static inline struct intc_desc_int *get_intc_desc(unsigned int irq) | 87 | static inline struct intc_desc_int *get_intc_desc(unsigned int irq) |
| 88 | { | 88 | { |
| 89 | struct irq_chip *chip = get_irq_chip(irq); | 89 | struct irq_chip *chip = irq_get_chip(irq); |
| 90 | 90 | ||
| 91 | return container_of(chip, struct intc_desc_int, chip); | 91 | return container_of(chip, struct intc_desc_int, chip); |
| 92 | } | 92 | } |
| @@ -103,7 +103,7 @@ static inline void activate_irq(int irq) | |||
| 103 | set_irq_flags(irq, IRQF_VALID); | 103 | set_irq_flags(irq, IRQF_VALID); |
| 104 | #else | 104 | #else |
| 105 | /* same effect on other architectures */ | 105 | /* same effect on other architectures */ |
| 106 | set_irq_noprobe(irq); | 106 | irq_set_noprobe(irq); |
| 107 | #endif | 107 | #endif |
| 108 | } | 108 | } |
| 109 | 109 | ||
diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c index 5a4e0afb9ad6..08de58e7f59f 100644 --- a/drivers/spi/amba-pl022.c +++ b/drivers/spi/amba-pl022.c | |||
| @@ -661,7 +661,7 @@ static void readwriter(struct pl022 *pl022) | |||
| 661 | { | 661 | { |
| 662 | 662 | ||
| 663 | /* | 663 | /* |
| 664 | * The FIFO depth is different inbetween primecell variants. | 664 | * The FIFO depth is different between primecell variants. |
| 665 | * I believe filling in too much in the FIFO might cause | 665 | * I believe filling in too much in the FIFO might cause |
| 666 | * errons in 8bit wide transfers on ARM variants (just 8 words | 666 | * errons in 8bit wide transfers on ARM variants (just 8 words |
| 667 | * FIFO, means only 8x8 = 64 bits in FIFO) at least. | 667 | * FIFO, means only 8x8 = 64 bits in FIFO) at least. |
| @@ -722,7 +722,7 @@ static void readwriter(struct pl022 *pl022) | |||
| 722 | * This inner reader takes care of things appearing in the RX | 722 | * This inner reader takes care of things appearing in the RX |
| 723 | * FIFO as we're transmitting. This will happen a lot since the | 723 | * FIFO as we're transmitting. This will happen a lot since the |
| 724 | * clock starts running when you put things into the TX FIFO, | 724 | * clock starts running when you put things into the TX FIFO, |
| 725 | * and then things are continously clocked into the RX FIFO. | 725 | * and then things are continuously clocked into the RX FIFO. |
| 726 | */ | 726 | */ |
| 727 | while ((readw(SSP_SR(pl022->virtbase)) & SSP_SR_MASK_RNE) | 727 | while ((readw(SSP_SR(pl022->virtbase)) & SSP_SR_MASK_RNE) |
| 728 | && (pl022->rx < pl022->rx_end)) { | 728 | && (pl022->rx < pl022->rx_end)) { |
| @@ -842,7 +842,7 @@ static void dma_callback(void *data) | |||
| 842 | 842 | ||
| 843 | unmap_free_dma_scatter(pl022); | 843 | unmap_free_dma_scatter(pl022); |
| 844 | 844 | ||
| 845 | /* Update total bytes transfered */ | 845 | /* Update total bytes transferred */ |
| 846 | msg->actual_length += pl022->cur_transfer->len; | 846 | msg->actual_length += pl022->cur_transfer->len; |
| 847 | if (pl022->cur_transfer->cs_change) | 847 | if (pl022->cur_transfer->cs_change) |
| 848 | pl022->cur_chip-> | 848 | pl022->cur_chip-> |
| @@ -1224,7 +1224,7 @@ static irqreturn_t pl022_interrupt_handler(int irq, void *dev_id) | |||
| 1224 | "number of bytes on a 16bit bus?)\n", | 1224 | "number of bytes on a 16bit bus?)\n", |
| 1225 | (u32) (pl022->rx - pl022->rx_end)); | 1225 | (u32) (pl022->rx - pl022->rx_end)); |
| 1226 | } | 1226 | } |
| 1227 | /* Update total bytes transfered */ | 1227 | /* Update total bytes transferred */ |
| 1228 | msg->actual_length += pl022->cur_transfer->len; | 1228 | msg->actual_length += pl022->cur_transfer->len; |
| 1229 | if (pl022->cur_transfer->cs_change) | 1229 | if (pl022->cur_transfer->cs_change) |
| 1230 | pl022->cur_chip-> | 1230 | pl022->cur_chip-> |
| @@ -1415,11 +1415,11 @@ static void do_polling_transfer(struct pl022 *pl022) | |||
| 1415 | SSP_CR1(pl022->virtbase)); | 1415 | SSP_CR1(pl022->virtbase)); |
| 1416 | 1416 | ||
| 1417 | dev_dbg(&pl022->adev->dev, "polling transfer ongoing ...\n"); | 1417 | dev_dbg(&pl022->adev->dev, "polling transfer ongoing ...\n"); |
| 1418 | /* FIXME: insert a timeout so we don't hang here indefinately */ | 1418 | /* FIXME: insert a timeout so we don't hang here indefinitely */ |
| 1419 | while (pl022->tx < pl022->tx_end || pl022->rx < pl022->rx_end) | 1419 | while (pl022->tx < pl022->tx_end || pl022->rx < pl022->rx_end) |
| 1420 | readwriter(pl022); | 1420 | readwriter(pl022); |
| 1421 | 1421 | ||
| 1422 | /* Update total byte transfered */ | 1422 | /* Update total byte transferred */ |
| 1423 | message->actual_length += pl022->cur_transfer->len; | 1423 | message->actual_length += pl022->cur_transfer->len; |
| 1424 | if (pl022->cur_transfer->cs_change) | 1424 | if (pl022->cur_transfer->cs_change) |
| 1425 | pl022->cur_chip->cs_control(SSP_CHIP_DESELECT); | 1425 | pl022->cur_chip->cs_control(SSP_CHIP_DESELECT); |
| @@ -1555,7 +1555,7 @@ static int stop_queue(struct pl022 *pl022) | |||
| 1555 | * A wait_queue on the pl022->busy could be used, but then the common | 1555 | * A wait_queue on the pl022->busy could be used, but then the common |
| 1556 | * execution path (pump_messages) would be required to call wake_up or | 1556 | * execution path (pump_messages) would be required to call wake_up or |
| 1557 | * friends on every SPI message. Do this instead */ | 1557 | * friends on every SPI message. Do this instead */ |
| 1558 | while (!list_empty(&pl022->queue) && pl022->busy && limit--) { | 1558 | while ((!list_empty(&pl022->queue) || pl022->busy) && limit--) { |
| 1559 | spin_unlock_irqrestore(&pl022->queue_lock, flags); | 1559 | spin_unlock_irqrestore(&pl022->queue_lock, flags); |
| 1560 | msleep(10); | 1560 | msleep(10); |
| 1561 | spin_lock_irqsave(&pl022->queue_lock, flags); | 1561 | spin_lock_irqsave(&pl022->queue_lock, flags); |
| @@ -2129,7 +2129,7 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id) | |||
| 2129 | "probe - problem registering spi master\n"); | 2129 | "probe - problem registering spi master\n"); |
| 2130 | goto err_spi_register; | 2130 | goto err_spi_register; |
| 2131 | } | 2131 | } |
| 2132 | dev_dbg(dev, "probe succeded\n"); | 2132 | dev_dbg(dev, "probe succeeded\n"); |
| 2133 | /* | 2133 | /* |
| 2134 | * Disable the silicon block pclk and any voltage domain and just | 2134 | * Disable the silicon block pclk and any voltage domain and just |
| 2135 | * power it up and clock it when it's needed | 2135 | * power it up and clock it when it's needed |
| @@ -2184,7 +2184,7 @@ pl022_remove(struct amba_device *adev) | |||
| 2184 | spi_unregister_master(pl022->master); | 2184 | spi_unregister_master(pl022->master); |
| 2185 | spi_master_put(pl022->master); | 2185 | spi_master_put(pl022->master); |
| 2186 | amba_set_drvdata(adev, NULL); | 2186 | amba_set_drvdata(adev, NULL); |
| 2187 | dev_dbg(&adev->dev, "remove succeded\n"); | 2187 | dev_dbg(&adev->dev, "remove succeeded\n"); |
| 2188 | return 0; | 2188 | return 0; |
| 2189 | } | 2189 | } |
| 2190 | 2190 | ||
diff --git a/drivers/spi/au1550_spi.c b/drivers/spi/au1550_spi.c index 3c9ade69643f..b50563d320e1 100644 --- a/drivers/spi/au1550_spi.c +++ b/drivers/spi/au1550_spi.c | |||
| @@ -480,7 +480,7 @@ static irqreturn_t au1550_spi_dma_irq_callback(struct au1550_spi *hw) | |||
| 480 | au1xxx_dbdma_stop(hw->dma_rx_ch); | 480 | au1xxx_dbdma_stop(hw->dma_rx_ch); |
| 481 | au1xxx_dbdma_stop(hw->dma_tx_ch); | 481 | au1xxx_dbdma_stop(hw->dma_tx_ch); |
| 482 | 482 | ||
| 483 | /* get number of transfered bytes */ | 483 | /* get number of transferred bytes */ |
| 484 | hw->rx_count = hw->len - au1xxx_get_dma_residue(hw->dma_rx_ch); | 484 | hw->rx_count = hw->len - au1xxx_get_dma_residue(hw->dma_rx_ch); |
| 485 | hw->tx_count = hw->len - au1xxx_get_dma_residue(hw->dma_tx_ch); | 485 | hw->tx_count = hw->len - au1xxx_get_dma_residue(hw->dma_tx_ch); |
| 486 | 486 | ||
diff --git a/drivers/spi/dw_spi.c b/drivers/spi/dw_spi.c index 9a6196461b27..871e337c917f 100644 --- a/drivers/spi/dw_spi.c +++ b/drivers/spi/dw_spi.c | |||
| @@ -345,7 +345,7 @@ static void int_error_stop(struct dw_spi *dws, const char *msg) | |||
| 345 | 345 | ||
| 346 | void dw_spi_xfer_done(struct dw_spi *dws) | 346 | void dw_spi_xfer_done(struct dw_spi *dws) |
| 347 | { | 347 | { |
| 348 | /* Update total byte transfered return count actual bytes read */ | 348 | /* Update total byte transferred return count actual bytes read */ |
| 349 | dws->cur_msg->actual_length += dws->len; | 349 | dws->cur_msg->actual_length += dws->len; |
| 350 | 350 | ||
| 351 | /* Move to next transfer */ | 351 | /* Move to next transfer */ |
| @@ -821,7 +821,7 @@ static int stop_queue(struct dw_spi *dws) | |||
| 821 | 821 | ||
| 822 | spin_lock_irqsave(&dws->lock, flags); | 822 | spin_lock_irqsave(&dws->lock, flags); |
| 823 | dws->run = QUEUE_STOPPED; | 823 | dws->run = QUEUE_STOPPED; |
| 824 | while (!list_empty(&dws->queue) && dws->busy && limit--) { | 824 | while ((!list_empty(&dws->queue) || dws->busy) && limit--) { |
| 825 | spin_unlock_irqrestore(&dws->lock, flags); | 825 | spin_unlock_irqrestore(&dws->lock, flags); |
| 826 | msleep(10); | 826 | msleep(10); |
| 827 | spin_lock_irqsave(&dws->lock, flags); | 827 | spin_lock_irqsave(&dws->lock, flags); |
diff --git a/drivers/spi/dw_spi.h b/drivers/spi/dw_spi.h index fb0bce564844..b23e452adaf7 100644 --- a/drivers/spi/dw_spi.h +++ b/drivers/spi/dw_spi.h | |||
| @@ -46,7 +46,7 @@ | |||
| 46 | #define SPI_INT_RXFI (1 << 4) | 46 | #define SPI_INT_RXFI (1 << 4) |
| 47 | #define SPI_INT_MSTI (1 << 5) | 47 | #define SPI_INT_MSTI (1 << 5) |
| 48 | 48 | ||
| 49 | /* TX RX interrupt level threshhold, max can be 256 */ | 49 | /* TX RX interrupt level threshold, max can be 256 */ |
| 50 | #define SPI_INT_THRESHOLD 32 | 50 | #define SPI_INT_THRESHOLD 32 |
| 51 | 51 | ||
| 52 | enum dw_ssi_type { | 52 | enum dw_ssi_type { |
diff --git a/drivers/spi/ep93xx_spi.c b/drivers/spi/ep93xx_spi.c index 0ba35df9a6df..d3570071e98f 100644 --- a/drivers/spi/ep93xx_spi.c +++ b/drivers/spi/ep93xx_spi.c | |||
| @@ -512,7 +512,7 @@ static int ep93xx_spi_read_write(struct ep93xx_spi *espi) | |||
| 512 | * | 512 | * |
| 513 | * This function processes one SPI transfer given in @t. Function waits until | 513 | * This function processes one SPI transfer given in @t. Function waits until |
| 514 | * transfer is complete (may sleep) and updates @msg->status based on whether | 514 | * transfer is complete (may sleep) and updates @msg->status based on whether |
| 515 | * transfer was succesfully processed or not. | 515 | * transfer was successfully processed or not. |
| 516 | */ | 516 | */ |
| 517 | static void ep93xx_spi_process_transfer(struct ep93xx_spi *espi, | 517 | static void ep93xx_spi_process_transfer(struct ep93xx_spi *espi, |
| 518 | struct spi_message *msg, | 518 | struct spi_message *msg, |
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c index a429b01d0285..dc25bee8d33f 100644 --- a/drivers/spi/pxa2xx_spi.c +++ b/drivers/spi/pxa2xx_spi.c | |||
| @@ -700,7 +700,7 @@ static void int_transfer_complete(struct driver_data *drv_data) | |||
| 700 | if (!pxa25x_ssp_comp(drv_data)) | 700 | if (!pxa25x_ssp_comp(drv_data)) |
| 701 | write_SSTO(0, reg); | 701 | write_SSTO(0, reg); |
| 702 | 702 | ||
| 703 | /* Update total byte transfered return count actual bytes read */ | 703 | /* Update total byte transferred return count actual bytes read */ |
| 704 | drv_data->cur_msg->actual_length += drv_data->len - | 704 | drv_data->cur_msg->actual_length += drv_data->len - |
| 705 | (drv_data->rx_end - drv_data->rx); | 705 | (drv_data->rx_end - drv_data->rx); |
| 706 | 706 | ||
| @@ -759,7 +759,7 @@ static irqreturn_t interrupt_transfer(struct driver_data *drv_data) | |||
| 759 | 759 | ||
| 760 | /* | 760 | /* |
| 761 | * PXA25x_SSP has no timeout, set up rx threshould for the | 761 | * PXA25x_SSP has no timeout, set up rx threshould for the |
| 762 | * remaing RX bytes. | 762 | * remaining RX bytes. |
| 763 | */ | 763 | */ |
| 764 | if (pxa25x_ssp_comp(drv_data)) { | 764 | if (pxa25x_ssp_comp(drv_data)) { |
| 765 | 765 | ||
| @@ -1493,7 +1493,7 @@ static int stop_queue(struct driver_data *drv_data) | |||
| 1493 | * execution path (pump_messages) would be required to call wake_up or | 1493 | * execution path (pump_messages) would be required to call wake_up or |
| 1494 | * friends on every SPI message. Do this instead */ | 1494 | * friends on every SPI message. Do this instead */ |
| 1495 | drv_data->run = QUEUE_STOPPED; | 1495 | drv_data->run = QUEUE_STOPPED; |
| 1496 | while (!list_empty(&drv_data->queue) && drv_data->busy && limit--) { | 1496 | while ((!list_empty(&drv_data->queue) || drv_data->busy) && limit--) { |
| 1497 | spin_unlock_irqrestore(&drv_data->lock, flags); | 1497 | spin_unlock_irqrestore(&drv_data->lock, flags); |
| 1498 | msleep(10); | 1498 | msleep(10); |
| 1499 | spin_lock_irqsave(&drv_data->lock, flags); | 1499 | spin_lock_irqsave(&drv_data->lock, flags); |
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 34bb17f03019..82b9a428c323 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c | |||
| @@ -957,7 +957,7 @@ EXPORT_SYMBOL_GPL(spi_sync); | |||
| 957 | * drivers may DMA directly into and out of the message buffers. | 957 | * drivers may DMA directly into and out of the message buffers. |
| 958 | * | 958 | * |
| 959 | * This call should be used by drivers that require exclusive access to the | 959 | * This call should be used by drivers that require exclusive access to the |
| 960 | * SPI bus. It has to be preceeded by a spi_bus_lock call. The SPI bus must | 960 | * SPI bus. It has to be preceded by a spi_bus_lock call. The SPI bus must |
| 961 | * be released by a spi_bus_unlock call when the exclusive access is over. | 961 | * be released by a spi_bus_unlock call when the exclusive access is over. |
| 962 | * | 962 | * |
| 963 | * It returns zero on success, else a negative error code. | 963 | * It returns zero on success, else a negative error code. |
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index a28462486df8..f706dba165cf 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c | |||
| @@ -905,7 +905,7 @@ static void bfin_spi_pump_transfers(unsigned long data) | |||
| 905 | "IO write error!\n"); | 905 | "IO write error!\n"); |
| 906 | message->state = ERROR_STATE; | 906 | message->state = ERROR_STATE; |
| 907 | } else { | 907 | } else { |
| 908 | /* Update total byte transfered */ | 908 | /* Update total byte transferred */ |
| 909 | message->actual_length += drv_data->len_in_bytes; | 909 | message->actual_length += drv_data->len_in_bytes; |
| 910 | /* Move to next transfer of this msg */ | 910 | /* Move to next transfer of this msg */ |
| 911 | message->state = bfin_spi_next_transfer(drv_data); | 911 | message->state = bfin_spi_next_transfer(drv_data); |
| @@ -1284,7 +1284,7 @@ static inline int bfin_spi_stop_queue(struct bfin_spi_master_data *drv_data) | |||
| 1284 | * friends on every SPI message. Do this instead | 1284 | * friends on every SPI message. Do this instead |
| 1285 | */ | 1285 | */ |
| 1286 | drv_data->running = false; | 1286 | drv_data->running = false; |
| 1287 | while (!list_empty(&drv_data->queue) && drv_data->busy && limit--) { | 1287 | while ((!list_empty(&drv_data->queue) || drv_data->busy) && limit--) { |
| 1288 | spin_unlock_irqrestore(&drv_data->lock, flags); | 1288 | spin_unlock_irqrestore(&drv_data->lock, flags); |
| 1289 | msleep(10); | 1289 | msleep(10); |
| 1290 | spin_lock_irqsave(&drv_data->lock, flags); | 1290 | spin_lock_irqsave(&drv_data->lock, flags); |
diff --git a/drivers/spi/spi_fsl_espi.c b/drivers/spi/spi_fsl_espi.c index 900e921ab80e..496f895a0024 100644 --- a/drivers/spi/spi_fsl_espi.c +++ b/drivers/spi/spi_fsl_espi.c | |||
| @@ -474,7 +474,7 @@ static int fsl_espi_setup(struct spi_device *spi) | |||
| 474 | mpc8xxx_spi = spi_master_get_devdata(spi->master); | 474 | mpc8xxx_spi = spi_master_get_devdata(spi->master); |
| 475 | reg_base = mpc8xxx_spi->reg_base; | 475 | reg_base = mpc8xxx_spi->reg_base; |
| 476 | 476 | ||
| 477 | hw_mode = cs->hw_mode; /* Save orginal settings */ | 477 | hw_mode = cs->hw_mode; /* Save original settings */ |
| 478 | cs->hw_mode = mpc8xxx_spi_read_reg( | 478 | cs->hw_mode = mpc8xxx_spi_read_reg( |
| 479 | ®_base->csmode[spi->chip_select]); | 479 | ®_base->csmode[spi->chip_select]); |
| 480 | /* mask out bits we are going to set */ | 480 | /* mask out bits we are going to set */ |
diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c index a467b20baac8..6f34963b3c64 100644 --- a/drivers/ssb/pci.c +++ b/drivers/ssb/pci.c | |||
| @@ -670,7 +670,7 @@ static int ssb_pci_sprom_get(struct ssb_bus *bus, | |||
| 670 | ssb_printk(KERN_ERR PFX "No SPROM available!\n"); | 670 | ssb_printk(KERN_ERR PFX "No SPROM available!\n"); |
| 671 | return -ENODEV; | 671 | return -ENODEV; |
| 672 | } | 672 | } |
| 673 | if (bus->chipco.dev) { /* can be unavailible! */ | 673 | if (bus->chipco.dev) { /* can be unavailable! */ |
| 674 | /* | 674 | /* |
| 675 | * get SPROM offset: SSB_SPROM_BASE1 except for | 675 | * get SPROM offset: SSB_SPROM_BASE1 except for |
| 676 | * chipcommon rev >= 31 or chip ID is 0x4312 and | 676 | * chipcommon rev >= 31 or chip ID is 0x4312 and |
diff --git a/drivers/ssb/sprom.c b/drivers/ssb/sprom.c index 4f7cc8d13277..5f34d7a3e3a5 100644 --- a/drivers/ssb/sprom.c +++ b/drivers/ssb/sprom.c | |||
| @@ -185,7 +185,7 @@ bool ssb_is_sprom_available(struct ssb_bus *bus) | |||
| 185 | /* this routine differs from specs as we do not access SPROM directly | 185 | /* this routine differs from specs as we do not access SPROM directly |
| 186 | on PCMCIA */ | 186 | on PCMCIA */ |
| 187 | if (bus->bustype == SSB_BUSTYPE_PCI && | 187 | if (bus->bustype == SSB_BUSTYPE_PCI && |
| 188 | bus->chipco.dev && /* can be unavailible! */ | 188 | bus->chipco.dev && /* can be unavailable! */ |
| 189 | bus->chipco.dev->id.revision >= 31) | 189 | bus->chipco.dev->id.revision >= 31) |
| 190 | return bus->chipco.capabilities & SSB_CHIPCO_CAP_SPROM; | 190 | return bus->chipco.capabilities & SSB_CHIPCO_CAP_SPROM; |
| 191 | 191 | ||
diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index 18b43fcb4171..e3786f161bc3 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig | |||
| @@ -117,8 +117,6 @@ source "drivers/staging/hv/Kconfig" | |||
| 117 | 117 | ||
| 118 | source "drivers/staging/vme/Kconfig" | 118 | source "drivers/staging/vme/Kconfig" |
| 119 | 119 | ||
| 120 | source "drivers/staging/memrar/Kconfig" | ||
| 121 | |||
| 122 | source "drivers/staging/sep/Kconfig" | 120 | source "drivers/staging/sep/Kconfig" |
| 123 | 121 | ||
| 124 | source "drivers/staging/iio/Kconfig" | 122 | source "drivers/staging/iio/Kconfig" |
| @@ -133,8 +131,6 @@ source "drivers/staging/wlags49_h2/Kconfig" | |||
| 133 | 131 | ||
| 134 | source "drivers/staging/wlags49_h25/Kconfig" | 132 | source "drivers/staging/wlags49_h25/Kconfig" |
| 135 | 133 | ||
| 136 | source "drivers/staging/samsung-laptop/Kconfig" | ||
| 137 | |||
| 138 | source "drivers/staging/sm7xx/Kconfig" | 134 | source "drivers/staging/sm7xx/Kconfig" |
| 139 | 135 | ||
| 140 | source "drivers/staging/dt3155v4l/Kconfig" | 136 | source "drivers/staging/dt3155v4l/Kconfig" |
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index cfd13cd55efb..f0d5c5315612 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile | |||
| @@ -40,7 +40,6 @@ obj-$(CONFIG_VT6655) += vt6655/ | |||
| 40 | obj-$(CONFIG_VT6656) += vt6656/ | 40 | obj-$(CONFIG_VT6656) += vt6656/ |
| 41 | obj-$(CONFIG_HYPERV) += hv/ | 41 | obj-$(CONFIG_HYPERV) += hv/ |
| 42 | obj-$(CONFIG_VME_BUS) += vme/ | 42 | obj-$(CONFIG_VME_BUS) += vme/ |
| 43 | obj-$(CONFIG_MRST_RAR_HANDLER) += memrar/ | ||
| 44 | obj-$(CONFIG_DX_SEP) += sep/ | 43 | obj-$(CONFIG_DX_SEP) += sep/ |
| 45 | obj-$(CONFIG_IIO) += iio/ | 44 | obj-$(CONFIG_IIO) += iio/ |
| 46 | obj-$(CONFIG_CS5535_GPIO) += cs5535_gpio/ | 45 | obj-$(CONFIG_CS5535_GPIO) += cs5535_gpio/ |
| @@ -49,7 +48,6 @@ obj-$(CONFIG_XVMALLOC) += zram/ | |||
| 49 | obj-$(CONFIG_ZCACHE) += zcache/ | 48 | obj-$(CONFIG_ZCACHE) += zcache/ |
| 50 | obj-$(CONFIG_WLAGS49_H2) += wlags49_h2/ | 49 | obj-$(CONFIG_WLAGS49_H2) += wlags49_h2/ |
| 51 | obj-$(CONFIG_WLAGS49_H25) += wlags49_h25/ | 50 | obj-$(CONFIG_WLAGS49_H25) += wlags49_h25/ |
| 52 | obj-$(CONFIG_SAMSUNG_LAPTOP) += samsung-laptop/ | ||
| 53 | obj-$(CONFIG_FB_SM7XX) += sm7xx/ | 51 | obj-$(CONFIG_FB_SM7XX) += sm7xx/ |
| 54 | obj-$(CONFIG_VIDEO_DT3155) += dt3155v4l/ | 52 | obj-$(CONFIG_VIDEO_DT3155) += dt3155v4l/ |
| 55 | obj-$(CONFIG_CRYSTALHD) += crystalhd/ | 53 | obj-$(CONFIG_CRYSTALHD) += crystalhd/ |
diff --git a/drivers/staging/altera-stapl/altera-jtag.c b/drivers/staging/altera-stapl/altera-jtag.c index 6b633b179a7e..876308858b82 100644 --- a/drivers/staging/altera-stapl/altera-jtag.c +++ b/drivers/staging/altera-stapl/altera-jtag.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 23 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 24 | */ | 24 | */ |
| 25 | 25 | ||
| 26 | #include <linux/delay.h> | ||
| 26 | #include <linux/firmware.h> | 27 | #include <linux/firmware.h> |
| 27 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
| 28 | #include <staging/altera.h> | 29 | #include <staging/altera.h> |
diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c index c6488e0d1305..41223f953589 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c | |||
| @@ -237,7 +237,7 @@ static int CreditsAvailableCallback(void *pContext, int Credits, bool CreditIRQE | |||
| 237 | pProt->CreditsCurrentSeek)); | 237 | pProt->CreditsCurrentSeek)); |
| 238 | 238 | ||
| 239 | if (pProt->CreditsAvailable >= pProt->CreditsCurrentSeek) { | 239 | if (pProt->CreditsAvailable >= pProt->CreditsCurrentSeek) { |
| 240 | /* we have enough credits to fullfill at least 1 packet waiting in the queue */ | 240 | /* we have enough credits to fulfill at least 1 packet waiting in the queue */ |
| 241 | pProt->CreditsCurrentSeek = 0; | 241 | pProt->CreditsCurrentSeek = 0; |
| 242 | pProt->SendStateFlags &= ~HCI_SEND_WAIT_CREDITS; | 242 | pProt->SendStateFlags &= ~HCI_SEND_WAIT_CREDITS; |
| 243 | doPendingSends = true; | 243 | doPendingSends = true; |
| @@ -285,7 +285,7 @@ static void FailureCallback(void *pContext, int Status) | |||
| 285 | { | 285 | { |
| 286 | struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)pContext; | 286 | struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)pContext; |
| 287 | 287 | ||
| 288 | /* target assertion occured */ | 288 | /* target assertion occurred */ |
| 289 | NotifyTransportFailure(pProt, Status); | 289 | NotifyTransportFailure(pProt, Status); |
| 290 | } | 290 | } |
| 291 | 291 | ||
| @@ -507,7 +507,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB | |||
| 507 | 507 | ||
| 508 | } while (false); | 508 | } while (false); |
| 509 | 509 | ||
| 510 | /* check if we need to disable the reciever */ | 510 | /* check if we need to disable the receiver */ |
| 511 | if (status || blockRecv) { | 511 | if (status || blockRecv) { |
| 512 | DevGMboxIRQAction(pProt->pDev, GMBOX_RECV_IRQ_DISABLE, PROC_IO_SYNC); | 512 | DevGMboxIRQAction(pProt->pDev, GMBOX_RECV_IRQ_DISABLE, PROC_IO_SYNC); |
| 513 | } | 513 | } |
diff --git a/drivers/staging/ath6kl/include/aggr_recv_api.h b/drivers/staging/ath6kl/include/aggr_recv_api.h index 67a058492c4d..5ead58d5febd 100644 --- a/drivers/staging/ath6kl/include/aggr_recv_api.h +++ b/drivers/staging/ath6kl/include/aggr_recv_api.h | |||
| @@ -72,7 +72,7 @@ aggr_process_bar(void *cntxt, u8 tid, u16 seq_no); | |||
| 72 | * This event is to initiate/modify the receive side window. | 72 | * This event is to initiate/modify the receive side window. |
| 73 | * Target will send WMI_ADDBA_REQ_EVENTID event to host - to setup | 73 | * Target will send WMI_ADDBA_REQ_EVENTID event to host - to setup |
| 74 | * recv re-ordering queues. Target will negotiate ADDBA with peer, | 74 | * recv re-ordering queues. Target will negotiate ADDBA with peer, |
| 75 | * and indicate via this event after succesfully completing the | 75 | * and indicate via this event after successfully completing the |
| 76 | * negotiation. This happens in two situations: | 76 | * negotiation. This happens in two situations: |
| 77 | * 1. Initial setup of aggregation | 77 | * 1. Initial setup of aggregation |
| 78 | * 2. Renegotiation of current recv window. | 78 | * 2. Renegotiation of current recv window. |
diff --git a/drivers/staging/ath6kl/include/common/a_hci.h b/drivers/staging/ath6kl/include/common/a_hci.h index 08cb013090be..379d65224e3a 100644 --- a/drivers/staging/ath6kl/include/common/a_hci.h +++ b/drivers/staging/ath6kl/include/common/a_hci.h | |||
| @@ -124,7 +124,7 @@ | |||
| 124 | #define PAL_NUM_COMPL_DATA_BLOCK_EVENT 0x48 | 124 | #define PAL_NUM_COMPL_DATA_BLOCK_EVENT 0x48 |
| 125 | #define PAL_SHORT_RANGE_MODE_CHANGE_COMPL_EVENT 0x4C | 125 | #define PAL_SHORT_RANGE_MODE_CHANGE_COMPL_EVENT 0x4C |
| 126 | #define PAL_AMP_STATUS_CHANGE_EVENT 0x4D | 126 | #define PAL_AMP_STATUS_CHANGE_EVENT 0x4D |
| 127 | /*======== End of PAL events definiton =================*/ | 127 | /*======== End of PAL events definition =================*/ |
| 128 | 128 | ||
| 129 | 129 | ||
| 130 | /*======== Timeouts (not part of HCI cmd, but input to PAL engine) =========*/ | 130 | /*======== Timeouts (not part of HCI cmd, but input to PAL engine) =========*/ |
| @@ -430,7 +430,7 @@ typedef struct hci_event_hw_err_t { | |||
| 430 | u8 hw_err_code; | 430 | u8 hw_err_code; |
| 431 | } POSTPACK HCI_EVENT_HW_ERR; | 431 | } POSTPACK HCI_EVENT_HW_ERR; |
| 432 | 432 | ||
| 433 | /* Flush occured event */ | 433 | /* Flush occurred event */ |
| 434 | /* Qos Violation event */ | 434 | /* Qos Violation event */ |
| 435 | typedef struct hci_event_handle_t { | 435 | typedef struct hci_event_handle_t { |
| 436 | u8 event_code; | 436 | u8 event_code; |
diff --git a/drivers/staging/ath6kl/include/common/dbglog.h b/drivers/staging/ath6kl/include/common/dbglog.h index 3a3d00da0b81..b7a123086ccf 100644 --- a/drivers/staging/ath6kl/include/common/dbglog.h +++ b/drivers/staging/ath6kl/include/common/dbglog.h | |||
| @@ -44,7 +44,7 @@ extern "C" { | |||
| 44 | #define DBGLOG_MODULEID_NUM_MAX 16 /* Upper limit is width of mask */ | 44 | #define DBGLOG_MODULEID_NUM_MAX 16 /* Upper limit is width of mask */ |
| 45 | 45 | ||
| 46 | /* | 46 | /* |
| 47 | * Please ensure that the definition of any new module intrduced is captured | 47 | * Please ensure that the definition of any new module introduced is captured |
| 48 | * between the DBGLOG_MODULEID_START and DBGLOG_MODULEID_END defines. The | 48 | * between the DBGLOG_MODULEID_START and DBGLOG_MODULEID_END defines. The |
| 49 | * structure is required for the parser to correctly pick up the values for | 49 | * structure is required for the parser to correctly pick up the values for |
| 50 | * different modules. | 50 | * different modules. |
diff --git a/drivers/staging/ath6kl/include/common/epping_test.h b/drivers/staging/ath6kl/include/common/epping_test.h index 5c40d8a2229d..7027fac8f37e 100644 --- a/drivers/staging/ath6kl/include/common/epping_test.h +++ b/drivers/staging/ath6kl/include/common/epping_test.h | |||
| @@ -92,7 +92,7 @@ typedef PREPACK struct { | |||
| 92 | #define EPPING_CMD_RESET_RECV_CNT 2 /* reset recv count */ | 92 | #define EPPING_CMD_RESET_RECV_CNT 2 /* reset recv count */ |
| 93 | #define EPPING_CMD_CAPTURE_RECV_CNT 3 /* fetch recv count, 4-byte count returned in CmdBuffer_t */ | 93 | #define EPPING_CMD_CAPTURE_RECV_CNT 3 /* fetch recv count, 4-byte count returned in CmdBuffer_t */ |
| 94 | #define EPPING_CMD_NO_ECHO 4 /* non-echo packet test (tx-only) */ | 94 | #define EPPING_CMD_NO_ECHO 4 /* non-echo packet test (tx-only) */ |
| 95 | #define EPPING_CMD_CONT_RX_START 5 /* continous RX packets, parameters are in CmdBuffer_h */ | 95 | #define EPPING_CMD_CONT_RX_START 5 /* continuous RX packets, parameters are in CmdBuffer_h */ |
| 96 | #define EPPING_CMD_CONT_RX_STOP 6 /* stop continuous RX packet transmission */ | 96 | #define EPPING_CMD_CONT_RX_STOP 6 /* stop continuous RX packet transmission */ |
| 97 | 97 | ||
| 98 | /* test command parameters may be no more than 8 bytes */ | 98 | /* test command parameters may be no more than 8 bytes */ |
diff --git a/drivers/staging/ath6kl/include/common/ini_dset.h b/drivers/staging/ath6kl/include/common/ini_dset.h index 8bfc75940c8f..a9e05fa0f659 100644 --- a/drivers/staging/ath6kl/include/common/ini_dset.h +++ b/drivers/staging/ath6kl/include/common/ini_dset.h | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | */ | 31 | */ |
| 32 | typedef enum { | 32 | typedef enum { |
| 33 | #if defined(AR6002_REV4) || defined(AR6003) | 33 | #if defined(AR6002_REV4) || defined(AR6003) |
| 34 | /* Add these definitions for compatability */ | 34 | /* Add these definitions for compatibility */ |
| 35 | #define WHAL_INI_DATA_ID_BB_RFGAIN_LNA1 WHAL_INI_DATA_ID_BB_RFGAIN | 35 | #define WHAL_INI_DATA_ID_BB_RFGAIN_LNA1 WHAL_INI_DATA_ID_BB_RFGAIN |
| 36 | #define WHAL_INI_DATA_ID_BB_RFGAIN_LNA2 WHAL_INI_DATA_ID_BB_RFGAIN | 36 | #define WHAL_INI_DATA_ID_BB_RFGAIN_LNA2 WHAL_INI_DATA_ID_BB_RFGAIN |
| 37 | WHAL_INI_DATA_ID_NULL =0, | 37 | WHAL_INI_DATA_ID_NULL =0, |
diff --git a/drivers/staging/ath6kl/include/common/testcmd.h b/drivers/staging/ath6kl/include/common/testcmd.h index 9ca1f2ac2cbf..7d94aee508b3 100644 --- a/drivers/staging/ath6kl/include/common/testcmd.h +++ b/drivers/staging/ath6kl/include/common/testcmd.h | |||
| @@ -43,8 +43,8 @@ typedef enum { | |||
| 43 | PN15_PATTERN | 43 | PN15_PATTERN |
| 44 | }TX_DATA_PATTERN; | 44 | }TX_DATA_PATTERN; |
| 45 | 45 | ||
| 46 | /* Continous tx | 46 | /* Continuous tx |
| 47 | mode : TCMD_CONT_TX_OFF - Disabling continous tx | 47 | mode : TCMD_CONT_TX_OFF - Disabling continuous tx |
| 48 | TCMD_CONT_TX_SINE - Enable continuous unmodulated tx | 48 | TCMD_CONT_TX_SINE - Enable continuous unmodulated tx |
| 49 | TCMD_CONT_TX_FRAME- Enable continuous modulated tx | 49 | TCMD_CONT_TX_FRAME- Enable continuous modulated tx |
| 50 | freq : Channel freq in Mhz. (e.g 2412 for channel 1 in 11 g) | 50 | freq : Channel freq in Mhz. (e.g 2412 for channel 1 in 11 g) |
diff --git a/drivers/staging/ath6kl/include/common/wmi.h b/drivers/staging/ath6kl/include/common/wmi.h index c645af373442..4e6343485362 100644 --- a/drivers/staging/ath6kl/include/common/wmi.h +++ b/drivers/staging/ath6kl/include/common/wmi.h | |||
| @@ -1568,8 +1568,8 @@ typedef PREPACK struct { | |||
| 1568 | switch to ps-poll mode | 1568 | switch to ps-poll mode |
| 1569 | default = 3 */ | 1569 | default = 3 */ |
| 1570 | 1570 | ||
| 1571 | u32 scoContStompMax; /* max number of continous stomp allowed in opt mode. | 1571 | u32 scoContStompMax; /* max number of continuous stomp allowed in opt mode. |
| 1572 | if excedded switch to pspoll mode | 1572 | if exceeded switch to pspoll mode |
| 1573 | default = 3 */ | 1573 | default = 3 */ |
| 1574 | 1574 | ||
| 1575 | u32 scoMinlowRateMbps; /* Low rate threshold */ | 1575 | u32 scoMinlowRateMbps; /* Low rate threshold */ |
| @@ -2084,7 +2084,7 @@ typedef PREPACK struct { | |||
| 2084 | /* | 2084 | /* |
| 2085 | * BSS INFO HDR version 2.0 | 2085 | * BSS INFO HDR version 2.0 |
| 2086 | * With 6 bytes HTC header and 6 bytes of WMI header | 2086 | * With 6 bytes HTC header and 6 bytes of WMI header |
| 2087 | * WMI_BSS_INFO_HDR cannot be accomodated in the removed 802.11 management | 2087 | * WMI_BSS_INFO_HDR cannot be accommodated in the removed 802.11 management |
| 2088 | * header space. | 2088 | * header space. |
| 2089 | * - Reduce the ieMask to 2 bytes as only two bit flags are used | 2089 | * - Reduce the ieMask to 2 bytes as only two bit flags are used |
| 2090 | * - Remove rssi and compute it on the host. rssi = snr - 95 | 2090 | * - Remove rssi and compute it on the host. rssi = snr - 95 |
| @@ -2911,7 +2911,7 @@ typedef PREPACK struct { | |||
| 2911 | u8 pktID; /* packet ID to identify parent packet */ | 2911 | u8 pktID; /* packet ID to identify parent packet */ |
| 2912 | u8 rateIdx; /* rate index on successful transmission */ | 2912 | u8 rateIdx; /* rate index on successful transmission */ |
| 2913 | u8 ackFailures; /* number of ACK failures in tx attempt */ | 2913 | u8 ackFailures; /* number of ACK failures in tx attempt */ |
| 2914 | #if 0 /* optional params currently ommitted. */ | 2914 | #if 0 /* optional params currently omitted. */ |
| 2915 | u32 queueDelay; // usec delay measured Tx Start time - host delivery time | 2915 | u32 queueDelay; // usec delay measured Tx Start time - host delivery time |
| 2916 | u32 mediaDelay; // usec delay measured ACK rx time - host delivery time | 2916 | u32 mediaDelay; // usec delay measured ACK rx time - host delivery time |
| 2917 | #endif | 2917 | #endif |
diff --git a/drivers/staging/ath6kl/include/common/wmix.h b/drivers/staging/ath6kl/include/common/wmix.h index 5ebb8285d135..36acba66d49f 100644 --- a/drivers/staging/ath6kl/include/common/wmix.h +++ b/drivers/staging/ath6kl/include/common/wmix.h | |||
| @@ -191,7 +191,7 @@ typedef PREPACK struct { | |||
| 191 | } POSTPACK WMIX_GPIO_INTR_ACK_CMD; | 191 | } POSTPACK WMIX_GPIO_INTR_ACK_CMD; |
| 192 | 192 | ||
| 193 | /* | 193 | /* |
| 194 | * Target informs Host of GPIO interrupts that have ocurred since the | 194 | * Target informs Host of GPIO interrupts that have occurred since the |
| 195 | * last WMIX_GIPO_INTR_ACK_CMD was received. Additional information -- | 195 | * last WMIX_GIPO_INTR_ACK_CMD was received. Additional information -- |
| 196 | * the current GPIO input values is provided -- in order to support | 196 | * the current GPIO input values is provided -- in order to support |
| 197 | * use of a GPIO interrupt as a Data Valid signal for other GPIO pins. | 197 | * use of a GPIO interrupt as a Data Valid signal for other GPIO pins. |
diff --git a/drivers/staging/ath6kl/include/htc_api.h b/drivers/staging/ath6kl/include/htc_api.h index 1bc2488788ab..4fb767559f82 100644 --- a/drivers/staging/ath6kl/include/htc_api.h +++ b/drivers/staging/ath6kl/include/htc_api.h | |||
| @@ -209,7 +209,7 @@ struct htc_endpoint_credit_dist { | |||
| 209 | typedef enum _HTC_CREDIT_DIST_REASON { | 209 | typedef enum _HTC_CREDIT_DIST_REASON { |
| 210 | HTC_CREDIT_DIST_SEND_COMPLETE = 0, /* credits available as a result of completed | 210 | HTC_CREDIT_DIST_SEND_COMPLETE = 0, /* credits available as a result of completed |
| 211 | send operations (MANDATORY) resulting in credit reports */ | 211 | send operations (MANDATORY) resulting in credit reports */ |
| 212 | HTC_CREDIT_DIST_ACTIVITY_CHANGE = 1, /* a change in endpoint activity occured (OPTIONAL) */ | 212 | HTC_CREDIT_DIST_ACTIVITY_CHANGE = 1, /* a change in endpoint activity occurred (OPTIONAL) */ |
| 213 | HTC_CREDIT_DIST_SEEK_CREDITS, /* an endpoint needs to "seek" credits (OPTIONAL) */ | 213 | HTC_CREDIT_DIST_SEEK_CREDITS, /* an endpoint needs to "seek" credits (OPTIONAL) */ |
| 214 | HTC_DUMP_CREDIT_STATE /* for debugging, dump any state information that is kept by | 214 | HTC_DUMP_CREDIT_STATE /* for debugging, dump any state information that is kept by |
| 215 | the distribution function */ | 215 | the distribution function */ |
| @@ -253,7 +253,7 @@ struct htc_endpoint_stats { | |||
| 253 | u32 RxPacketsBundled; /* count of recv packets received in a bundle */ | 253 | u32 RxPacketsBundled; /* count of recv packets received in a bundle */ |
| 254 | u32 RxBundleLookAheads; /* count of number of bundled lookaheads */ | 254 | u32 RxBundleLookAheads; /* count of number of bundled lookaheads */ |
| 255 | u32 RxBundleIndFromHdr; /* count of the number of bundle indications from the HTC header */ | 255 | u32 RxBundleIndFromHdr; /* count of the number of bundle indications from the HTC header */ |
| 256 | u32 RxAllocThreshHit; /* count of the number of times the recv allocation threshhold was hit */ | 256 | u32 RxAllocThreshHit; /* count of the number of times the recv allocation threshold was hit */ |
| 257 | u32 RxAllocThreshBytes; /* total number of bytes */ | 257 | u32 RxAllocThreshBytes; /* total number of bytes */ |
| 258 | }; | 258 | }; |
| 259 | 259 | ||
| @@ -391,7 +391,7 @@ int HTCSendPkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket); | |||
| 391 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ | 391 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ |
| 392 | void HTCStop(HTC_HANDLE HTCHandle); | 392 | void HTCStop(HTC_HANDLE HTCHandle); |
| 393 | /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | 393 | /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 394 | @desc: Destory HTC service | 394 | @desc: Destroy HTC service |
| 395 | @function name: HTCDestroy | 395 | @function name: HTCDestroy |
| 396 | @input: HTCHandle | 396 | @input: HTCHandle |
| 397 | @output: | 397 | @output: |
diff --git a/drivers/staging/ath6kl/miscdrv/credit_dist.c b/drivers/staging/ath6kl/miscdrv/credit_dist.c index ae54e1f48e50..33fa0209026d 100644 --- a/drivers/staging/ath6kl/miscdrv/credit_dist.c +++ b/drivers/staging/ath6kl/miscdrv/credit_dist.c | |||
| @@ -341,7 +341,7 @@ static void SeekCredits(struct common_credit_state_info *pCredInfo, | |||
| 341 | credits = min(pCredInfo->CurrentFreeCredits,pEPDist->TxCreditsSeek); | 341 | credits = min(pCredInfo->CurrentFreeCredits,pEPDist->TxCreditsSeek); |
| 342 | 342 | ||
| 343 | if (credits >= pEPDist->TxCreditsSeek) { | 343 | if (credits >= pEPDist->TxCreditsSeek) { |
| 344 | /* we found some to fullfill the seek request */ | 344 | /* we found some to fulfill the seek request */ |
| 345 | break; | 345 | break; |
| 346 | } | 346 | } |
| 347 | 347 | ||
| @@ -364,8 +364,8 @@ static void SeekCredits(struct common_credit_state_info *pCredInfo, | |||
| 364 | 364 | ||
| 365 | if ((pCurEpDist->TxCreditsAssigned - need) >= pCurEpDist->TxCreditsMin) { | 365 | if ((pCurEpDist->TxCreditsAssigned - need) >= pCurEpDist->TxCreditsMin) { |
| 366 | /* the current one has been allocated more than it's minimum and it | 366 | /* the current one has been allocated more than it's minimum and it |
| 367 | * has enough credits assigned above it's minimum to fullfill our need | 367 | * has enough credits assigned above it's minimum to fulfill our need |
| 368 | * try to take away just enough to fullfill our need */ | 368 | * try to take away just enough to fulfill our need */ |
| 369 | ReduceCredits(pCredInfo, | 369 | ReduceCredits(pCredInfo, |
| 370 | pCurEpDist, | 370 | pCurEpDist, |
| 371 | pCurEpDist->TxCreditsAssigned - need); | 371 | pCurEpDist->TxCreditsAssigned - need); |
diff --git a/drivers/staging/ath6kl/os/linux/ar6000_android.c b/drivers/staging/ath6kl/os/linux/ar6000_android.c index c96f6e9c99c6..4aa75ee2cb13 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_android.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_android.c | |||
| @@ -372,7 +372,7 @@ void android_ar6k_check_wow_status(struct ar6_softc *ar, struct sk_buff *skb, bo | |||
| 372 | } | 372 | } |
| 373 | } | 373 | } |
| 374 | if (needWake) { | 374 | if (needWake) { |
| 375 | /* keep host wake up if there is any event and packate comming in*/ | 375 | /* keep host wake up if there is any event and packate coming in*/ |
| 376 | if (wowledon) { | 376 | if (wowledon) { |
| 377 | char buf[32]; | 377 | char buf[32]; |
| 378 | int len = sprintf(buf, "on"); | 378 | int len = sprintf(buf, "on"); |
diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index 27cb02dfad3c..97d6ce63b5c0 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c | |||
| @@ -520,7 +520,7 @@ dbglog_parse_debug_logs(s8 *datap, u32 len) | |||
| 520 | int | 520 | int |
| 521 | ar6000_dbglog_get_debug_logs(struct ar6_softc *ar) | 521 | ar6000_dbglog_get_debug_logs(struct ar6_softc *ar) |
| 522 | { | 522 | { |
| 523 | u32 data[8]; /* Should be able to accomodate struct dbglog_buf_s */ | 523 | u32 data[8]; /* Should be able to accommodate struct dbglog_buf_s */ |
| 524 | u32 address; | 524 | u32 address; |
| 525 | u32 length; | 525 | u32 length; |
| 526 | u32 dropped; | 526 | u32 dropped; |
| @@ -2063,7 +2063,7 @@ ar6000_stop_endpoint(struct net_device *dev, bool keepprofile, bool getdbglogs) | |||
| 2063 | * - In case of surprise removal, the hcd already frees up the pending | 2063 | * - In case of surprise removal, the hcd already frees up the pending |
| 2064 | * for the device and hence there is no need to unregister the function | 2064 | * for the device and hence there is no need to unregister the function |
| 2065 | * driver inorder to get these requests. For planned removal, the function | 2065 | * driver inorder to get these requests. For planned removal, the function |
| 2066 | * driver has to explictly unregister itself to have the hcd return all the | 2066 | * driver has to explicitly unregister itself to have the hcd return all the |
| 2067 | * pending requests before the data structures for the devices are freed up. | 2067 | * pending requests before the data structures for the devices are freed up. |
| 2068 | * Note that as per the current implementation, the function driver will | 2068 | * Note that as per the current implementation, the function driver will |
| 2069 | * end up releasing all the devices since there is no API to selectively | 2069 | * end up releasing all the devices since there is no API to selectively |
| @@ -2982,7 +2982,7 @@ ar6000_data_tx(struct sk_buff *skb, struct net_device *dev) | |||
| 2982 | /* If target is not associated */ | 2982 | /* If target is not associated */ |
| 2983 | if( (!ar->arConnected && !bypasswmi) | 2983 | if( (!ar->arConnected && !bypasswmi) |
| 2984 | #ifdef CONFIG_HOST_TCMD_SUPPORT | 2984 | #ifdef CONFIG_HOST_TCMD_SUPPORT |
| 2985 | /* TCMD doesnt support any data, free the buf and return */ | 2985 | /* TCMD doesn't support any data, free the buf and return */ |
| 2986 | || (ar->arTargetMode == AR6000_TCMD_MODE) | 2986 | || (ar->arTargetMode == AR6000_TCMD_MODE) |
| 2987 | #endif | 2987 | #endif |
| 2988 | ) { | 2988 | ) { |
| @@ -6393,7 +6393,7 @@ static void DoHTCSendPktsTest(struct ar6_softc *ar, int MapNo, HTC_ENDPOINT_ID e | |||
| 6393 | /* | 6393 | /* |
| 6394 | * Add support for adding and removing a virtual adapter for soft AP. | 6394 | * Add support for adding and removing a virtual adapter for soft AP. |
| 6395 | * Some OS requires different adapters names for station and soft AP mode. | 6395 | * Some OS requires different adapters names for station and soft AP mode. |
| 6396 | * To support these requirement, create and destory a netdevice instance | 6396 | * To support these requirement, create and destroy a netdevice instance |
| 6397 | * when the AP mode is operational. A full fledged support for virual device | 6397 | * when the AP mode is operational. A full fledged support for virual device |
| 6398 | * is not implemented. Rather a virtual interface is created and is linked | 6398 | * is not implemented. Rather a virtual interface is created and is linked |
| 6399 | * with the existing physical device instance during the operation of the | 6399 | * with the existing physical device instance during the operation of the |
diff --git a/drivers/staging/ath6kl/wmi/wmi.c b/drivers/staging/ath6kl/wmi/wmi.c index 0ddaee21f9d7..a00bf0a59871 100644 --- a/drivers/staging/ath6kl/wmi/wmi.c +++ b/drivers/staging/ath6kl/wmi/wmi.c | |||
| @@ -4867,7 +4867,7 @@ wmi_set_country(struct wmi_t *wmip, u8 *countryCode) | |||
| 4867 | #ifdef CONFIG_HOST_TCMD_SUPPORT | 4867 | #ifdef CONFIG_HOST_TCMD_SUPPORT |
| 4868 | /* WMI layer doesn't need to know the data type of the test cmd. | 4868 | /* WMI layer doesn't need to know the data type of the test cmd. |
| 4869 | This would be beneficial for customers like Qualcomm, who might | 4869 | This would be beneficial for customers like Qualcomm, who might |
| 4870 | have different test command requirements from differnt manufacturers | 4870 | have different test command requirements from different manufacturers |
| 4871 | */ | 4871 | */ |
| 4872 | int | 4872 | int |
| 4873 | wmi_test_cmd(struct wmi_t *wmip, u8 *buf, u32 len) | 4873 | wmi_test_cmd(struct wmi_t *wmip, u8 *buf, u32 len) |
diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h index 32909e2938d5..20cca24ff5f0 100644 --- a/drivers/staging/bcm/Adapter.h +++ b/drivers/staging/bcm/Adapter.h | |||
| @@ -412,7 +412,7 @@ struct _MINI_ADAPTER | |||
| 412 | 412 | ||
| 413 | // this to keep track of the Tx and Rx MailBox Registers. | 413 | // this to keep track of the Tx and Rx MailBox Registers. |
| 414 | atomic_t CurrNumFreeTxDesc; | 414 | atomic_t CurrNumFreeTxDesc; |
| 415 | // to keep track the no of byte recieved | 415 | // to keep track the no of byte received |
| 416 | USHORT PrevNumRecvDescs; | 416 | USHORT PrevNumRecvDescs; |
| 417 | USHORT CurrNumRecvDescs; | 417 | USHORT CurrNumRecvDescs; |
| 418 | UINT u32TotalDSD; | 418 | UINT u32TotalDSD; |
| @@ -527,7 +527,7 @@ struct _MINI_ADAPTER | |||
| 527 | BOOLEAN bStatusWrite; | 527 | BOOLEAN bStatusWrite; |
| 528 | UINT uiNVMDSDSize; | 528 | UINT uiNVMDSDSize; |
| 529 | UINT uiVendorExtnFlag; | 529 | UINT uiVendorExtnFlag; |
| 530 | //it will always represent choosed DSD at any point of time. | 530 | //it will always represent chosen DSD at any point of time. |
| 531 | // Generally it is Active DSD but in case of NVM RD/WR it might be different. | 531 | // Generally it is Active DSD but in case of NVM RD/WR it might be different. |
| 532 | UINT ulFlashCalStart; | 532 | UINT ulFlashCalStart; |
| 533 | ULONG ulFlashControlSectionStart; | 533 | ULONG ulFlashControlSectionStart; |
| @@ -546,10 +546,10 @@ struct _MINI_ADAPTER | |||
| 546 | PFLASH_CS_INFO psFlashCSInfo ; | 546 | PFLASH_CS_INFO psFlashCSInfo ; |
| 547 | PFLASH2X_VENDORSPECIFIC_INFO psFlash2xVendorInfo; | 547 | PFLASH2X_VENDORSPECIFIC_INFO psFlash2xVendorInfo; |
| 548 | UINT uiFlashBaseAdd; //Flash start address | 548 | UINT uiFlashBaseAdd; //Flash start address |
| 549 | UINT uiActiveISOOffset; //Active ISO offset choosen before f/w download | 549 | UINT uiActiveISOOffset; //Active ISO offset chosen before f/w download |
| 550 | FLASH2X_SECTION_VAL eActiveISO; //Active ISO section val | 550 | FLASH2X_SECTION_VAL eActiveISO; //Active ISO section val |
| 551 | FLASH2X_SECTION_VAL eActiveDSD; //Active DSD val choosen before f/w download | 551 | FLASH2X_SECTION_VAL eActiveDSD; //Active DSD val chosen before f/w download |
| 552 | UINT uiActiveDSDOffsetAtFwDld; //For accessing Active DSD choosen before f/w download | 552 | UINT uiActiveDSDOffsetAtFwDld; //For accessing Active DSD chosen before f/w download |
| 553 | UINT uiFlashLayoutMajorVersion ; | 553 | UINT uiFlashLayoutMajorVersion ; |
| 554 | UINT uiFlashLayoutMinorVersion; | 554 | UINT uiFlashLayoutMinorVersion; |
| 555 | BOOLEAN bAllDSDWriteAllow ; | 555 | BOOLEAN bAllDSDWriteAllow ; |
diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 9be184f143e5..c0ee95a71343 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c | |||
| @@ -384,7 +384,7 @@ static inline VOID CopyClassifierRuleToSF(PMINI_ADAPTER Adapter,stConvergenceSLT | |||
| 384 | } | 384 | } |
| 385 | if(psfCSType->cCPacketClassificationRule.u8Protocol == 0) | 385 | if(psfCSType->cCPacketClassificationRule.u8Protocol == 0) |
| 386 | { | 386 | { |
| 387 | //we didnt get protocol field filled in by the BS | 387 | //we didn't get protocol field filled in by the BS |
| 388 | pstClassifierEntry->ucProtocolLength=0; | 388 | pstClassifierEntry->ucProtocolLength=0; |
| 389 | } | 389 | } |
| 390 | else | 390 | else |
| @@ -879,7 +879,7 @@ static VOID CopyToAdapter( register PMINI_ADAPTER Adapter, /**<Pointer to the A | |||
| 879 | 879 | ||
| 880 | /* | 880 | /* |
| 881 | Passing the argument u8PHSI instead of clsid. Because for DL with no classifier rule, | 881 | Passing the argument u8PHSI instead of clsid. Because for DL with no classifier rule, |
| 882 | clsid will be zero hence we cant have multiple PHS rules for the same SF. | 882 | clsid will be zero hence we can't have multiple PHS rules for the same SF. |
| 883 | To support multiple PHS rule, passing u8PHSI. | 883 | To support multiple PHS rule, passing u8PHSI. |
| 884 | */ | 884 | */ |
| 885 | 885 | ||
| @@ -1103,7 +1103,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) | |||
| 1103 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8TrafficIndicationPreference : 0x%X", | 1103 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8TrafficIndicationPreference : 0x%X", |
| 1104 | pstAddIndication->sfAuthorizedSet.u8TrafficIndicationPreference); | 1104 | pstAddIndication->sfAuthorizedSet.u8TrafficIndicationPreference); |
| 1105 | 1105 | ||
| 1106 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " Total Classifiers Recieved : 0x%X",pstAddIndication->sfAuthorizedSet.u8TotalClassifiers); | 1106 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " Total Classifiers Received : 0x%X",pstAddIndication->sfAuthorizedSet.u8TotalClassifiers); |
| 1107 | 1107 | ||
| 1108 | nCurClassifierCnt = pstAddIndication->sfAuthorizedSet.u8TotalClassifiers; | 1108 | nCurClassifierCnt = pstAddIndication->sfAuthorizedSet.u8TotalClassifiers; |
| 1109 | 1109 | ||
| @@ -1305,7 +1305,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) | |||
| 1305 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8TrafficIndicationPreference : 0x%02X", | 1305 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8TrafficIndicationPreference : 0x%02X", |
| 1306 | pstAddIndication->sfAdmittedSet.u8TrafficIndicationPreference); | 1306 | pstAddIndication->sfAdmittedSet.u8TrafficIndicationPreference); |
| 1307 | 1307 | ||
| 1308 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " Total Classifiers Recieved : 0x%X",pstAddIndication->sfAdmittedSet.u8TotalClassifiers); | 1308 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " Total Classifiers Received : 0x%X",pstAddIndication->sfAdmittedSet.u8TotalClassifiers); |
| 1309 | 1309 | ||
| 1310 | nCurClassifierCnt = pstAddIndication->sfAdmittedSet.u8TotalClassifiers; | 1310 | nCurClassifierCnt = pstAddIndication->sfAdmittedSet.u8TotalClassifiers; |
| 1311 | 1311 | ||
| @@ -1502,7 +1502,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) | |||
| 1502 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8TrafficIndicationPreference : 0x%X", | 1502 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8TrafficIndicationPreference : 0x%X", |
| 1503 | pstAddIndication->sfActiveSet.u8TrafficIndicationPreference); | 1503 | pstAddIndication->sfActiveSet.u8TrafficIndicationPreference); |
| 1504 | 1504 | ||
| 1505 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " Total Classifiers Recieved : 0x%X",pstAddIndication->sfActiveSet.u8TotalClassifiers); | 1505 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " Total Classifiers Received : 0x%X",pstAddIndication->sfActiveSet.u8TotalClassifiers); |
| 1506 | 1506 | ||
| 1507 | nCurClassifierCnt = pstAddIndication->sfActiveSet.u8TotalClassifiers; | 1507 | nCurClassifierCnt = pstAddIndication->sfActiveSet.u8TotalClassifiers; |
| 1508 | 1508 | ||
| @@ -1696,7 +1696,7 @@ ULONG StoreCmControlResponseMessage(PMINI_ADAPTER Adapter,PVOID pvBuffer,UINT *p | |||
| 1696 | //No Special handling send the message as it is | 1696 | //No Special handling send the message as it is |
| 1697 | return 1; | 1697 | return 1; |
| 1698 | } | 1698 | } |
| 1699 | // For DSA_REQ, only upto "psfAuthorizedSet" parameter should be accessed by driver! | 1699 | // For DSA_REQ, only up to "psfAuthorizedSet" parameter should be accessed by driver! |
| 1700 | 1700 | ||
| 1701 | pstAddIndication=kmalloc(sizeof(*pstAddIndication), GFP_KERNEL); | 1701 | pstAddIndication=kmalloc(sizeof(*pstAddIndication), GFP_KERNEL); |
| 1702 | if(NULL==pstAddIndication) | 1702 | if(NULL==pstAddIndication) |
| @@ -1788,7 +1788,7 @@ static inline stLocalSFAddIndicationAlt | |||
| 1788 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Inside RestoreCmControlResponseMessage "); | 1788 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Inside RestoreCmControlResponseMessage "); |
| 1789 | /* | 1789 | /* |
| 1790 | //Need to Allocate memory to contain the SUPER Large structures | 1790 | //Need to Allocate memory to contain the SUPER Large structures |
| 1791 | //Our driver cant create these structures on Stack :( | 1791 | //Our driver can't create these structures on Stack :( |
| 1792 | */ | 1792 | */ |
| 1793 | pstAddIndicationDest=kmalloc(sizeof(stLocalSFAddIndicationAlt), GFP_KERNEL); | 1793 | pstAddIndicationDest=kmalloc(sizeof(stLocalSFAddIndicationAlt), GFP_KERNEL); |
| 1794 | 1794 | ||
| @@ -1957,7 +1957,7 @@ INT AllocAdapterDsxBuffer(PMINI_ADAPTER Adapter) | |||
| 1957 | { | 1957 | { |
| 1958 | /* | 1958 | /* |
| 1959 | //Need to Allocate memory to contain the SUPER Large structures | 1959 | //Need to Allocate memory to contain the SUPER Large structures |
| 1960 | //Our driver cant create these structures on Stack | 1960 | //Our driver can't create these structures on Stack |
| 1961 | */ | 1961 | */ |
| 1962 | Adapter->caDsxReqResp=kmalloc(sizeof(stLocalSFAddIndicationAlt)+LEADER_SIZE, GFP_KERNEL); | 1962 | Adapter->caDsxReqResp=kmalloc(sizeof(stLocalSFAddIndicationAlt)+LEADER_SIZE, GFP_KERNEL); |
| 1963 | if(!Adapter->caDsxReqResp) | 1963 | if(!Adapter->caDsxReqResp) |
diff --git a/drivers/staging/bcm/HostMIBSInterface.h b/drivers/staging/bcm/HostMIBSInterface.h index f17a4f13474c..e34531b638e8 100644 --- a/drivers/staging/bcm/HostMIBSInterface.h +++ b/drivers/staging/bcm/HostMIBSInterface.h | |||
| @@ -62,7 +62,7 @@ typedef struct _S_MIBS_HOST_INFO | |||
| 62 | ULONG NumDesUsed; | 62 | ULONG NumDesUsed; |
| 63 | ULONG CurrNumFreeDesc; | 63 | ULONG CurrNumFreeDesc; |
| 64 | ULONG PrevNumFreeDesc; | 64 | ULONG PrevNumFreeDesc; |
| 65 | // to keep track the no of byte recieved | 65 | // to keep track the no of byte received |
| 66 | ULONG PrevNumRcevBytes; | 66 | ULONG PrevNumRcevBytes; |
| 67 | ULONG CurrNumRcevBytes; | 67 | ULONG CurrNumRcevBytes; |
| 68 | 68 | ||
diff --git a/drivers/staging/bcm/IPv6Protocol.c b/drivers/staging/bcm/IPv6Protocol.c index 91b6fbe33c91..5b4fd372ec36 100644 --- a/drivers/staging/bcm/IPv6Protocol.c +++ b/drivers/staging/bcm/IPv6Protocol.c | |||
| @@ -287,7 +287,7 @@ static BOOLEAN MatchSrcIpv6Address(S_CLASSIFIER_RULE *pstClassifierRule,IPV6Head | |||
| 287 | 287 | ||
| 288 | for(uiLoopIndex=0;uiLoopIndex<uiCountIPSrcAddresses;uiLoopIndex+=uiIpv6AddrNoLongWords) | 288 | for(uiLoopIndex=0;uiLoopIndex<uiCountIPSrcAddresses;uiLoopIndex+=uiIpv6AddrNoLongWords) |
| 289 | { | 289 | { |
| 290 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Src Ipv6 Address In Recieved Packet : \n "); | 290 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Src Ipv6 Address In Received Packet : \n "); |
| 291 | DumpIpv6Address(aulSrcIP); | 291 | DumpIpv6Address(aulSrcIP); |
| 292 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Src Ipv6 Mask In Classifier Rule: \n"); | 292 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Src Ipv6 Mask In Classifier Rule: \n"); |
| 293 | DumpIpv6Address(&pstClassifierRule->stSrcIpAddress.ulIpv6Mask[uiLoopIndex]); | 293 | DumpIpv6Address(&pstClassifierRule->stSrcIpAddress.ulIpv6Mask[uiLoopIndex]); |
| @@ -340,7 +340,7 @@ static BOOLEAN MatchDestIpv6Address(S_CLASSIFIER_RULE *pstClassifierRule,IPV6Hea | |||
| 340 | 340 | ||
| 341 | for(uiLoopIndex=0;uiLoopIndex<uiCountIPDestinationAddresses;uiLoopIndex+=uiIpv6AddrNoLongWords) | 341 | for(uiLoopIndex=0;uiLoopIndex<uiCountIPDestinationAddresses;uiLoopIndex+=uiIpv6AddrNoLongWords) |
| 342 | { | 342 | { |
| 343 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Destination Ipv6 Address In Recieved Packet : \n "); | 343 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Destination Ipv6 Address In Received Packet : \n "); |
| 344 | DumpIpv6Address(aulDestIP); | 344 | DumpIpv6Address(aulDestIP); |
| 345 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Destination Ipv6 Mask In Classifier Rule: \n"); | 345 | BCM_DEBUG_PRINT( Adapter,DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Destination Ipv6 Mask In Classifier Rule: \n"); |
| 346 | DumpIpv6Address(&pstClassifierRule->stDestIpAddress.ulIpv6Mask[uiLoopIndex]); | 346 | DumpIpv6Address(&pstClassifierRule->stDestIpAddress.ulIpv6Mask[uiLoopIndex]); |
diff --git a/drivers/staging/bcm/InterfaceIdleMode.c b/drivers/staging/bcm/InterfaceIdleMode.c index bf5c0ad86610..96fa4ead7930 100644 --- a/drivers/staging/bcm/InterfaceIdleMode.c +++ b/drivers/staging/bcm/InterfaceIdleMode.c | |||
| @@ -11,7 +11,7 @@ Input parameters: IN PMINI_ADAPTER Adapter - Miniport Adapter Context | |||
| 11 | 11 | ||
| 12 | 12 | ||
| 13 | Return: BCM_STATUS_SUCCESS - If Wakeup of the HW Interface was successful. | 13 | Return: BCM_STATUS_SUCCESS - If Wakeup of the HW Interface was successful. |
| 14 | Other - If an error occured. | 14 | Other - If an error occurred. |
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | 17 | ||
| @@ -26,7 +26,7 @@ Input parameters: IN PMINI_ADAPTER Adapter - Miniport Adapter Context | |||
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | Return: BCM_STATUS_SUCCESS - If Idle mode response related HW configuration was successful. | 28 | Return: BCM_STATUS_SUCCESS - If Idle mode response related HW configuration was successful. |
| 29 | Other - If an error occured. | 29 | Other - If an error occurred. |
| 30 | */ | 30 | */ |
| 31 | 31 | ||
| 32 | /* | 32 | /* |
diff --git a/drivers/staging/bcm/InterfaceIsr.c b/drivers/staging/bcm/InterfaceIsr.c index 220ff922bdcf..67719d57256d 100644 --- a/drivers/staging/bcm/InterfaceIsr.c +++ b/drivers/staging/bcm/InterfaceIsr.c | |||
| @@ -80,8 +80,8 @@ static void read_int_callback(struct urb *urb/*, struct pt_regs *regs*/) | |||
| 80 | } | 80 | } |
| 81 | case -EINPROGRESS: | 81 | case -EINPROGRESS: |
| 82 | { | 82 | { |
| 83 | //This situation may happend when URBunlink is used. for detail check usb_unlink_urb documentation. | 83 | //This situation may happened when URBunlink is used. for detail check usb_unlink_urb documentation. |
| 84 | BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Impossibe condition has occured... something very bad is going on"); | 84 | BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Impossibe condition has occurred... something very bad is going on"); |
| 85 | break ; | 85 | break ; |
| 86 | //return; | 86 | //return; |
| 87 | } | 87 | } |
diff --git a/drivers/staging/bcm/InterfaceRx.c b/drivers/staging/bcm/InterfaceRx.c index 533f8ebe0f84..806ef5d18522 100644 --- a/drivers/staging/bcm/InterfaceRx.c +++ b/drivers/staging/bcm/InterfaceRx.c | |||
| @@ -34,7 +34,7 @@ GetBulkInRcb(PS_INTERFACE_ADAPTER psIntfAdapter) | |||
| 34 | return pRcb; | 34 | return pRcb; |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | /*this is receive call back - when pkt avilable for receive (BULK IN- end point)*/ | 37 | /*this is receive call back - when pkt available for receive (BULK IN- end point)*/ |
| 38 | static void read_bulk_callback(struct urb *urb) | 38 | static void read_bulk_callback(struct urb *urb) |
| 39 | { | 39 | { |
| 40 | struct sk_buff *skb = NULL; | 40 | struct sk_buff *skb = NULL; |
| @@ -123,7 +123,7 @@ static void read_bulk_callback(struct urb *urb) | |||
| 123 | if((ntohs(pLeader->Vcid) == VCID_CONTROL_PACKET) || | 123 | if((ntohs(pLeader->Vcid) == VCID_CONTROL_PACKET) || |
| 124 | (!(pLeader->Status >= 0x20 && pLeader->Status <= 0x3F))) | 124 | (!(pLeader->Status >= 0x20 && pLeader->Status <= 0x3F))) |
| 125 | { | 125 | { |
| 126 | BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_RX, RX_CTRL, DBG_LVL_ALL, "Recived control pkt..."); | 126 | BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_RX, RX_CTRL, DBG_LVL_ALL, "Received control pkt..."); |
| 127 | *(PUSHORT)skb->data = pLeader->Status; | 127 | *(PUSHORT)skb->data = pLeader->Status; |
| 128 | memcpy(skb->data+sizeof(USHORT), urb->transfer_buffer + | 128 | memcpy(skb->data+sizeof(USHORT), urb->transfer_buffer + |
| 129 | (sizeof(LEADER)), pLeader->PLength); | 129 | (sizeof(LEADER)), pLeader->PLength); |
| @@ -142,7 +142,7 @@ static void read_bulk_callback(struct urb *urb) | |||
| 142 | * Data Packet, Format a proper Ethernet Header | 142 | * Data Packet, Format a proper Ethernet Header |
| 143 | * and give it to the stack | 143 | * and give it to the stack |
| 144 | */ | 144 | */ |
| 145 | BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_RX, RX_DATA, DBG_LVL_ALL, "Recived Data pkt..."); | 145 | BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_RX, RX_DATA, DBG_LVL_ALL, "Received Data pkt..."); |
| 146 | skb_reserve(skb, 2 + SKB_RESERVE_PHS_BYTES); | 146 | skb_reserve(skb, 2 + SKB_RESERVE_PHS_BYTES); |
| 147 | memcpy(skb->data+ETH_HLEN, (PUCHAR)urb->transfer_buffer + sizeof(LEADER), pLeader->PLength); | 147 | memcpy(skb->data+ETH_HLEN, (PUCHAR)urb->transfer_buffer + sizeof(LEADER), pLeader->PLength); |
| 148 | skb->dev = Adapter->dev; | 148 | skb->dev = Adapter->dev; |
| @@ -151,7 +151,7 @@ static void read_bulk_callback(struct urb *urb) | |||
| 151 | skb_put (skb, pLeader->PLength + ETH_HLEN); | 151 | skb_put (skb, pLeader->PLength + ETH_HLEN); |
| 152 | Adapter->PackInfo[QueueIndex].uiTotalRxBytes+=pLeader->PLength; | 152 | Adapter->PackInfo[QueueIndex].uiTotalRxBytes+=pLeader->PLength; |
| 153 | Adapter->PackInfo[QueueIndex].uiThisPeriodRxBytes+= pLeader->PLength; | 153 | Adapter->PackInfo[QueueIndex].uiThisPeriodRxBytes+= pLeader->PLength; |
| 154 | BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_RX, RX_DATA, DBG_LVL_ALL, "Recived Data pkt of len :0x%X", pLeader->PLength); | 154 | BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_RX, RX_DATA, DBG_LVL_ALL, "Received Data pkt of len :0x%X", pLeader->PLength); |
| 155 | 155 | ||
| 156 | if(netif_running(Adapter->dev)) | 156 | if(netif_running(Adapter->dev)) |
| 157 | { | 157 | { |
| @@ -237,7 +237,7 @@ Input parameters: IN PMINI_ADAPTER Adapter - Miniport Adapter Context | |||
| 237 | 237 | ||
| 238 | 238 | ||
| 239 | Return: TRUE - If Rx was successful. | 239 | Return: TRUE - If Rx was successful. |
| 240 | Other - If an error occured. | 240 | Other - If an error occurred. |
| 241 | */ | 241 | */ |
| 242 | 242 | ||
| 243 | BOOLEAN InterfaceRx (PS_INTERFACE_ADAPTER psIntfAdapter) | 243 | BOOLEAN InterfaceRx (PS_INTERFACE_ADAPTER psIntfAdapter) |
diff --git a/drivers/staging/bcm/Ioctl.h b/drivers/staging/bcm/Ioctl.h index e4f8eb70be1e..f859cf1c47b0 100644 --- a/drivers/staging/bcm/Ioctl.h +++ b/drivers/staging/bcm/Ioctl.h | |||
| @@ -241,7 +241,7 @@ typedef struct bulkwrmbuffer | |||
| 241 | 241 | ||
| 242 | typedef enum _FLASH2X_SECTION_VAL | 242 | typedef enum _FLASH2X_SECTION_VAL |
| 243 | { | 243 | { |
| 244 | NO_SECTION_VAL = 0, //no section is choosen when absolute offset is given for RD/WR | 244 | NO_SECTION_VAL = 0, //no section is chosen when absolute offset is given for RD/WR |
| 245 | ISO_IMAGE1, | 245 | ISO_IMAGE1, |
| 246 | ISO_IMAGE2, | 246 | ISO_IMAGE2, |
| 247 | DSD0, | 247 | DSD0, |
diff --git a/drivers/staging/bcm/LeakyBucket.c b/drivers/staging/bcm/LeakyBucket.c index f4cf41c0e46b..a55d4228e8e0 100644 --- a/drivers/staging/bcm/LeakyBucket.c +++ b/drivers/staging/bcm/LeakyBucket.c | |||
| @@ -213,7 +213,7 @@ static VOID CheckAndSendPacketFromIndex(PMINI_ADAPTER Adapter, PacketInfo *psSF) | |||
| 213 | BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "For Queue: %zd\n", psSF-Adapter->PackInfo); | 213 | BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "For Queue: %zd\n", psSF-Adapter->PackInfo); |
| 214 | BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "\nAvailable Tokens = %d required = %d\n", | 214 | BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "\nAvailable Tokens = %d required = %d\n", |
| 215 | psSF->uiCurrentTokenCount, iPacketLen); | 215 | psSF->uiCurrentTokenCount, iPacketLen); |
| 216 | //this part indicates that becuase of non-availability of the tokens | 216 | //this part indicates that because of non-availability of the tokens |
| 217 | //pkt has not been send out hence setting the pending flag indicating the host to send it out | 217 | //pkt has not been send out hence setting the pending flag indicating the host to send it out |
| 218 | //first next iteration . | 218 | //first next iteration . |
| 219 | psSF->uiPendedLast = TRUE; | 219 | psSF->uiPendedLast = TRUE; |
diff --git a/drivers/staging/bcm/Misc.c b/drivers/staging/bcm/Misc.c index d624f35d0551..c5003b62234c 100644 --- a/drivers/staging/bcm/Misc.c +++ b/drivers/staging/bcm/Misc.c | |||
| @@ -602,7 +602,7 @@ VOID LinkControlResponseMessage(PMINI_ADAPTER Adapter,PUCHAR pucBuffer) | |||
| 602 | Adapter->LinkStatus=LINKUP_DONE; | 602 | Adapter->LinkStatus=LINKUP_DONE; |
| 603 | Adapter->bPHSEnabled = *(pucBuffer+3); | 603 | Adapter->bPHSEnabled = *(pucBuffer+3); |
| 604 | Adapter->bETHCSEnabled = *(pucBuffer+4) & ETH_CS_MASK; | 604 | Adapter->bETHCSEnabled = *(pucBuffer+4) & ETH_CS_MASK; |
| 605 | BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "PHS Support Status Recieved In LinkUp Ack : %x \n",Adapter->bPHSEnabled); | 605 | BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "PHS Support Status Received In LinkUp Ack : %x \n",Adapter->bPHSEnabled); |
| 606 | if((FALSE == Adapter->bShutStatus)&& | 606 | if((FALSE == Adapter->bShutStatus)&& |
| 607 | (FALSE == Adapter->IdleMode)) | 607 | (FALSE == Adapter->IdleMode)) |
| 608 | { | 608 | { |
| @@ -1153,7 +1153,7 @@ int InitCardAndDownloadFirmware(PMINI_ADAPTER ps_adapter) | |||
| 1153 | 1153 | ||
| 1154 | /* | 1154 | /* |
| 1155 | * 1. If the LED Settings fails, do not stop and do the Firmware download. | 1155 | * 1. If the LED Settings fails, do not stop and do the Firmware download. |
| 1156 | * 2. This init would happend only if the cfg file is present, else | 1156 | * 2. This init would happened only if the cfg file is present, else |
| 1157 | * call from the ioctl context. | 1157 | * call from the ioctl context. |
| 1158 | */ | 1158 | */ |
| 1159 | 1159 | ||
| @@ -1185,7 +1185,7 @@ int InitCardAndDownloadFirmware(PMINI_ADAPTER ps_adapter) | |||
| 1185 | status = PropagateCalParamsFromFlashToMemory(ps_adapter); | 1185 | status = PropagateCalParamsFromFlashToMemory(ps_adapter); |
| 1186 | if(status) | 1186 | if(status) |
| 1187 | { | 1187 | { |
| 1188 | BCM_DEBUG_PRINT(ps_adapter,DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL," Propogation of Cal param failed .." ); | 1188 | BCM_DEBUG_PRINT(ps_adapter,DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL," Propagation of Cal param failed .." ); |
| 1189 | goto OUT; | 1189 | goto OUT; |
| 1190 | } | 1190 | } |
| 1191 | } | 1191 | } |
diff --git a/drivers/staging/bcm/Qos.c b/drivers/staging/bcm/Qos.c index feade9451b2e..c97020f0fb6a 100644 --- a/drivers/staging/bcm/Qos.c +++ b/drivers/staging/bcm/Qos.c | |||
| @@ -727,7 +727,7 @@ static BOOLEAN EthCSMatchVLANRules(S_CLASSIFIER_RULE *pstClassifierRule,struct s | |||
| 727 | 727 | ||
| 728 | BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "%s CLS UserPrio:%x CLS VLANID:%x\n",__FUNCTION__,ntohs(*((USHORT *)pstClassifierRule->usUserPriority)),pstClassifierRule->usVLANID); | 728 | BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "%s CLS UserPrio:%x CLS VLANID:%x\n",__FUNCTION__,ntohs(*((USHORT *)pstClassifierRule->usUserPriority)),pstClassifierRule->usVLANID); |
| 729 | 729 | ||
| 730 | /* In case FW didn't recieve the TLV, the priority field should be ignored */ | 730 | /* In case FW didn't receive the TLV, the priority field should be ignored */ |
| 731 | if(pstClassifierRule->usValidityBitMap & (1<<PKT_CLASSIFICATION_USER_PRIORITY_VALID)) | 731 | if(pstClassifierRule->usValidityBitMap & (1<<PKT_CLASSIFICATION_USER_PRIORITY_VALID)) |
| 732 | { | 732 | { |
| 733 | if(pstEthCsPktInfo->eNwpktEthFrameType!=eEth802QVLANFrame) | 733 | if(pstEthCsPktInfo->eNwpktEthFrameType!=eEth802QVLANFrame) |
diff --git a/drivers/staging/bcm/cntrl_SignalingInterface.h b/drivers/staging/bcm/cntrl_SignalingInterface.h index 890778450a86..ab131806e2c9 100644 --- a/drivers/staging/bcm/cntrl_SignalingInterface.h +++ b/drivers/staging/bcm/cntrl_SignalingInterface.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #define VENDOR_PHS_PARAM_LENGTH 10 | 21 | #define VENDOR_PHS_PARAM_LENGTH 10 |
| 22 | #define MAX_NUM_ACTIVE_BS 10 | 22 | #define MAX_NUM_ACTIVE_BS 10 |
| 23 | #define AUTH_TOKEN_LENGTH 10 | 23 | #define AUTH_TOKEN_LENGTH 10 |
| 24 | #define NUM_HARQ_CHANNELS 16 //Changed from 10 to 16 to accomodate all HARQ channels | 24 | #define NUM_HARQ_CHANNELS 16 //Changed from 10 to 16 to accommodate all HARQ channels |
| 25 | #define VENDOR_CLASSIFIER_PARAM_LENGTH 1 //Changed the size to 1 byte since we dnt use it | 25 | #define VENDOR_CLASSIFIER_PARAM_LENGTH 1 //Changed the size to 1 byte since we dnt use it |
| 26 | #define VENDOR_SPECIF_QOS_PARAM 1 | 26 | #define VENDOR_SPECIF_QOS_PARAM 1 |
| 27 | #define VENDOR_PHS_PARAM_LENGTH 10 | 27 | #define VENDOR_PHS_PARAM_LENGTH 10 |
| @@ -109,13 +109,13 @@ typedef struct _stPhsRuleSI { | |||
| 109 | B_UINT8 u8PHSI; | 109 | B_UINT8 u8PHSI; |
| 110 | /** PHSF Length Of The Service Flow*/ | 110 | /** PHSF Length Of The Service Flow*/ |
| 111 | B_UINT8 u8PHSFLength; | 111 | B_UINT8 u8PHSFLength; |
| 112 | /** String of bytes containing header information to be supressed by the sending CS and reconstructed by the receiving CS*/ | 112 | /** String of bytes containing header information to be suppressed by the sending CS and reconstructed by the receiving CS*/ |
| 113 | B_UINT8 u8PHSF[MAX_PHS_LENGTHS]; | 113 | B_UINT8 u8PHSF[MAX_PHS_LENGTHS]; |
| 114 | /** PHSM Length Of The Service Flow*/ | 114 | /** PHSM Length Of The Service Flow*/ |
| 115 | B_UINT8 u8PHSMLength; | 115 | B_UINT8 u8PHSMLength; |
| 116 | /** PHS Mask for the SF*/ | 116 | /** PHS Mask for the SF*/ |
| 117 | B_UINT8 u8PHSM[MAX_PHS_LENGTHS]; | 117 | B_UINT8 u8PHSM[MAX_PHS_LENGTHS]; |
| 118 | /** 8bit Total number of bytes to be supressed for the Service Flow*/ | 118 | /** 8bit Total number of bytes to be suppressed for the Service Flow*/ |
| 119 | B_UINT8 u8PHSS; | 119 | B_UINT8 u8PHSS; |
| 120 | /** 8bit Indicates whether or not Packet Header contents need to be verified prior to supression */ | 120 | /** 8bit Indicates whether or not Packet Header contents need to be verified prior to supression */ |
| 121 | B_UINT8 u8PHSV; | 121 | B_UINT8 u8PHSV; |
diff --git a/drivers/staging/bcm/nvm.c b/drivers/staging/bcm/nvm.c index c7292373a65f..4da5b7b54a1a 100644 --- a/drivers/staging/bcm/nvm.c +++ b/drivers/staging/bcm/nvm.c | |||
| @@ -313,7 +313,7 @@ INT ReadMacAddressFromNVM(PMINI_ADAPTER Adapter) | |||
| 313 | // uiNumBytes - Number of bytes to be read from the EEPROM. | 313 | // uiNumBytes - Number of bytes to be read from the EEPROM. |
| 314 | // | 314 | // |
| 315 | // Returns: | 315 | // Returns: |
| 316 | // OSAL_STATUS_SUCCESS - if EEPROM read is successfull. | 316 | // OSAL_STATUS_SUCCESS - if EEPROM read is successful. |
| 317 | // <FAILURE> - if failed. | 317 | // <FAILURE> - if failed. |
| 318 | //----------------------------------------------------------------------------- | 318 | //----------------------------------------------------------------------------- |
| 319 | 319 | ||
| @@ -431,7 +431,7 @@ INT BeceemEEPROMBulkRead( | |||
| 431 | // uiNumBytes - Number of bytes to be read from the FLASH. | 431 | // uiNumBytes - Number of bytes to be read from the FLASH. |
| 432 | // | 432 | // |
| 433 | // Returns: | 433 | // Returns: |
| 434 | // OSAL_STATUS_SUCCESS - if FLASH read is successfull. | 434 | // OSAL_STATUS_SUCCESS - if FLASH read is successful. |
| 435 | // <FAILURE> - if failed. | 435 | // <FAILURE> - if failed. |
| 436 | //----------------------------------------------------------------------------- | 436 | //----------------------------------------------------------------------------- |
| 437 | 437 | ||
| @@ -1174,7 +1174,7 @@ static INT BeceemFlashBulkWrite( | |||
| 1174 | if(NULL == pTempBuff) | 1174 | if(NULL == pTempBuff) |
| 1175 | goto BeceemFlashBulkWrite_EXIT; | 1175 | goto BeceemFlashBulkWrite_EXIT; |
| 1176 | // | 1176 | // |
| 1177 | // check if the data to be written is overlapped accross sectors | 1177 | // check if the data to be written is overlapped across sectors |
| 1178 | // | 1178 | // |
| 1179 | if(uiOffset+uiNumBytes < uiSectBoundary) | 1179 | if(uiOffset+uiNumBytes < uiSectBoundary) |
| 1180 | { | 1180 | { |
| @@ -1390,7 +1390,7 @@ static INT BeceemFlashBulkWriteStatus( | |||
| 1390 | goto BeceemFlashBulkWriteStatus_EXIT; | 1390 | goto BeceemFlashBulkWriteStatus_EXIT; |
| 1391 | 1391 | ||
| 1392 | // | 1392 | // |
| 1393 | // check if the data to be written is overlapped accross sectors | 1393 | // check if the data to be written is overlapped across sectors |
| 1394 | // | 1394 | // |
| 1395 | if(uiOffset+uiNumBytes < uiSectBoundary) | 1395 | if(uiOffset+uiNumBytes < uiSectBoundary) |
| 1396 | { | 1396 | { |
| @@ -2020,7 +2020,7 @@ INT BeceemEEPROMBulkWrite( | |||
| 2020 | // uiNumBytes - Number of bytes to be read from the NVM. | 2020 | // uiNumBytes - Number of bytes to be read from the NVM. |
| 2021 | // | 2021 | // |
| 2022 | // Returns: | 2022 | // Returns: |
| 2023 | // OSAL_STATUS_SUCCESS - if NVM read is successfull. | 2023 | // OSAL_STATUS_SUCCESS - if NVM read is successful. |
| 2024 | // <FAILURE> - if failed. | 2024 | // <FAILURE> - if failed. |
| 2025 | //----------------------------------------------------------------------------- | 2025 | //----------------------------------------------------------------------------- |
| 2026 | 2026 | ||
| @@ -2083,7 +2083,7 @@ INT BeceemNVMRead( | |||
| 2083 | // uiNumBytes - Number of bytes to be written.. | 2083 | // uiNumBytes - Number of bytes to be written.. |
| 2084 | // | 2084 | // |
| 2085 | // Returns: | 2085 | // Returns: |
| 2086 | // OSAL_STATUS_SUCCESS - if NVM write is successfull. | 2086 | // OSAL_STATUS_SUCCESS - if NVM write is successful. |
| 2087 | // <FAILURE> - if failed. | 2087 | // <FAILURE> - if failed. |
| 2088 | //----------------------------------------------------------------------------- | 2088 | //----------------------------------------------------------------------------- |
| 2089 | 2089 | ||
| @@ -2218,7 +2218,7 @@ INT BeceemNVMWrite( | |||
| 2218 | // uiSectorSize - sector size | 2218 | // uiSectorSize - sector size |
| 2219 | // | 2219 | // |
| 2220 | // Returns: | 2220 | // Returns: |
| 2221 | // OSAL_STATUS_SUCCESS - if NVM write is successfull. | 2221 | // OSAL_STATUS_SUCCESS - if NVM write is successful. |
| 2222 | // <FAILURE> - if failed. | 2222 | // <FAILURE> - if failed. |
| 2223 | //----------------------------------------------------------------------------- | 2223 | //----------------------------------------------------------------------------- |
| 2224 | 2224 | ||
| @@ -2430,7 +2430,7 @@ INT BcmInitNVM(PMINI_ADAPTER ps_adapter) | |||
| 2430 | *Input Parameter: | 2430 | *Input Parameter: |
| 2431 | * Adapter data structure | 2431 | * Adapter data structure |
| 2432 | *Return Value : | 2432 | *Return Value : |
| 2433 | * 0. means sucess; | 2433 | * 0. means success; |
| 2434 | */ | 2434 | */ |
| 2435 | /***************************************************************************/ | 2435 | /***************************************************************************/ |
| 2436 | 2436 | ||
| @@ -2998,7 +2998,7 @@ INT BcmGetSectionValStartOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlas | |||
| 2998 | /* | 2998 | /* |
| 2999 | * Considering all the section for which end offset can be calculated or directly given | 2999 | * Considering all the section for which end offset can be calculated or directly given |
| 3000 | * in CS Structure. if matching case does not exist, return STATUS_FAILURE indicating section | 3000 | * in CS Structure. if matching case does not exist, return STATUS_FAILURE indicating section |
| 3001 | * endoffset can't be calculated or given in CS Stucture. | 3001 | * endoffset can't be calculated or given in CS Structure. |
| 3002 | */ | 3002 | */ |
| 3003 | 3003 | ||
| 3004 | INT SectStartOffset = 0 ; | 3004 | INT SectStartOffset = 0 ; |
| @@ -3173,7 +3173,7 @@ INT BcmGetSectionValEndOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2 | |||
| 3173 | * @uiNumBytes : Number of Bytes for Read | 3173 | * @uiNumBytes : Number of Bytes for Read |
| 3174 | * | 3174 | * |
| 3175 | * Return value:- | 3175 | * Return value:- |
| 3176 | * return true on sucess and STATUS_FAILURE on fail. | 3176 | * return true on success and STATUS_FAILURE on fail. |
| 3177 | */ | 3177 | */ |
| 3178 | 3178 | ||
| 3179 | INT BcmFlash2xBulkRead( | 3179 | INT BcmFlash2xBulkRead( |
| @@ -3241,7 +3241,7 @@ INT BcmFlash2xBulkRead( | |||
| 3241 | * @uiNumBytes : Number of Bytes for Write | 3241 | * @uiNumBytes : Number of Bytes for Write |
| 3242 | * | 3242 | * |
| 3243 | * Return value:- | 3243 | * Return value:- |
| 3244 | * return true on sucess and STATUS_FAILURE on fail. | 3244 | * return true on success and STATUS_FAILURE on fail. |
| 3245 | * | 3245 | * |
| 3246 | */ | 3246 | */ |
| 3247 | 3247 | ||
| @@ -3308,7 +3308,7 @@ INT BcmFlash2xBulkWrite( | |||
| 3308 | * @Adapter :-Drivers private Data Structure | 3308 | * @Adapter :-Drivers private Data Structure |
| 3309 | * | 3309 | * |
| 3310 | * Return Value:- | 3310 | * Return Value:- |
| 3311 | * Return STATUS_SUCESS if get sucess in setting the right DSD else negaive error code | 3311 | * Return STATUS_SUCESS if get success in setting the right DSD else negaive error code |
| 3312 | * | 3312 | * |
| 3313 | **/ | 3313 | **/ |
| 3314 | static INT BcmGetActiveDSD(PMINI_ADAPTER Adapter) | 3314 | static INT BcmGetActiveDSD(PMINI_ADAPTER Adapter) |
| @@ -3384,7 +3384,7 @@ static INT BcmGetActiveISO(PMINI_ADAPTER Adapter) | |||
| 3384 | * @uiOffset : Offset provided in the Flash | 3384 | * @uiOffset : Offset provided in the Flash |
| 3385 | * | 3385 | * |
| 3386 | * Return Value:- | 3386 | * Return Value:- |
| 3387 | * Sucess:-TRUE , offset is writable | 3387 | * Success:-TRUE , offset is writable |
| 3388 | * Failure:-FALSE, offset is RO | 3388 | * Failure:-FALSE, offset is RO |
| 3389 | * | 3389 | * |
| 3390 | **/ | 3390 | **/ |
| @@ -3441,7 +3441,7 @@ static INT BcmDumpFlash2xSectionBitMap(PFLASH2X_BITMAP psFlash2xBitMap) | |||
| 3441 | @Adapter:-Driver private Data Structure | 3441 | @Adapter:-Driver private Data Structure |
| 3442 | * | 3442 | * |
| 3443 | * Return value:- | 3443 | * Return value:- |
| 3444 | * Sucess:- STATUS_SUCESS | 3444 | * Success:- STATUS_SUCESS |
| 3445 | * Failure:- negative error code | 3445 | * Failure:- negative error code |
| 3446 | **/ | 3446 | **/ |
| 3447 | 3447 | ||
| @@ -3783,7 +3783,7 @@ INT BcmSetActiveSection(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectV | |||
| 3783 | // This is a SPECIAL Case which will only happen if the current highest priority ISO has priority value = 0x7FFFFFFF. | 3783 | // This is a SPECIAL Case which will only happen if the current highest priority ISO has priority value = 0x7FFFFFFF. |
| 3784 | // We will write 1 to the current Highest priority ISO And then shall increase the priority of the requested ISO | 3784 | // We will write 1 to the current Highest priority ISO And then shall increase the priority of the requested ISO |
| 3785 | // by user | 3785 | // by user |
| 3786 | BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, "SectImagePriority wraparound happend, eFlash2xSectVal: 0x%x\n",eFlash2xSectVal); | 3786 | BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, "SectImagePriority wraparound happened, eFlash2xSectVal: 0x%x\n",eFlash2xSectVal); |
| 3787 | SectImagePriority = htonl(0x1); | 3787 | SectImagePriority = htonl(0x1); |
| 3788 | Status = BcmFlash2xBulkWrite(Adapter, | 3788 | Status = BcmFlash2xBulkWrite(Adapter, |
| 3789 | &SectImagePriority, | 3789 | &SectImagePriority, |
| @@ -3853,7 +3853,7 @@ INT BcmSetActiveSection(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectV | |||
| 3853 | // This is a SPECIAL Case which will only happen if the current highest priority DSD has priority value = 0x7FFFFFFF. | 3853 | // This is a SPECIAL Case which will only happen if the current highest priority DSD has priority value = 0x7FFFFFFF. |
| 3854 | // We will write 1 to the current Highest priority DSD And then shall increase the priority of the requested DSD | 3854 | // We will write 1 to the current Highest priority DSD And then shall increase the priority of the requested DSD |
| 3855 | // by user | 3855 | // by user |
| 3856 | BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, NVM_RW, DBG_LVL_ALL, "SectImagePriority wraparound happend, eFlash2xSectVal: 0x%x\n",eFlash2xSectVal); | 3856 | BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, NVM_RW, DBG_LVL_ALL, "SectImagePriority wraparound happened, eFlash2xSectVal: 0x%x\n",eFlash2xSectVal); |
| 3857 | SectImagePriority = htonl(0x1); | 3857 | SectImagePriority = htonl(0x1); |
| 3858 | 3858 | ||
| 3859 | Status = BcmFlash2xBulkWrite(Adapter, | 3859 | Status = BcmFlash2xBulkWrite(Adapter, |
| @@ -4119,7 +4119,7 @@ INT BcmCopyISO(PMINI_ADAPTER Adapter, FLASH2X_COPY_SECTION sCopySectStrut) | |||
| 4119 | MAX_RW_SIZE); | 4119 | MAX_RW_SIZE); |
| 4120 | IsThisHeaderSector = FALSE ; | 4120 | IsThisHeaderSector = FALSE ; |
| 4121 | } | 4121 | } |
| 4122 | //substracting the written Data | 4122 | //subtracting the written Data |
| 4123 | uiTotalDataToCopy = uiTotalDataToCopy - Adapter->uiSectorSize ; | 4123 | uiTotalDataToCopy = uiTotalDataToCopy - Adapter->uiSectorSize ; |
| 4124 | } | 4124 | } |
| 4125 | 4125 | ||
| @@ -4250,7 +4250,7 @@ INT BcmCopyISO(PMINI_ADAPTER Adapter, FLASH2X_COPY_SECTION sCopySectStrut) | |||
| 4250 | IsThisHeaderSector = FALSE ; | 4250 | IsThisHeaderSector = FALSE ; |
| 4251 | } | 4251 | } |
| 4252 | 4252 | ||
| 4253 | //substracting the written Data | 4253 | //subtracting the written Data |
| 4254 | uiTotalDataToCopy = uiTotalDataToCopy - Adapter->uiSectorSize ; | 4254 | uiTotalDataToCopy = uiTotalDataToCopy - Adapter->uiSectorSize ; |
| 4255 | } | 4255 | } |
| 4256 | 4256 | ||
| @@ -4268,7 +4268,7 @@ BcmFlash2xCorruptSig : this API is used to corrupt the written sig in Bcm Header | |||
| 4268 | @eFlash2xSectionVal :- Flash section val which has header | 4268 | @eFlash2xSectionVal :- Flash section val which has header |
| 4269 | 4269 | ||
| 4270 | Return Value :- | 4270 | Return Value :- |
| 4271 | Sucess :- If Section is present and writable, corrupt the sig and return STATUS_SUCCESS | 4271 | Success :- If Section is present and writable, corrupt the sig and return STATUS_SUCCESS |
| 4272 | Failure :-Return negative error code | 4272 | Failure :-Return negative error code |
| 4273 | 4273 | ||
| 4274 | 4274 | ||
| @@ -4301,7 +4301,7 @@ BcmFlash2xWriteSig :-this API is used to Write the sig if requested Section has | |||
| 4301 | @eFlashSectionVal :- Flash section val which has header | 4301 | @eFlashSectionVal :- Flash section val which has header |
| 4302 | 4302 | ||
| 4303 | Return Value :- | 4303 | Return Value :- |
| 4304 | Sucess :- If Section is present and writable write the sig and return STATUS_SUCCESS | 4304 | Success :- If Section is present and writable write the sig and return STATUS_SUCCESS |
| 4305 | Failure :-Return negative error code | 4305 | Failure :-Return negative error code |
| 4306 | 4306 | ||
| 4307 | **/ | 4307 | **/ |
| @@ -4504,7 +4504,7 @@ BcmCopySection :- This API is used to copy the One section in another. Both sect | |||
| 4504 | in case of numofBytes equal zero complete section will be copied. | 4504 | in case of numofBytes equal zero complete section will be copied. |
| 4505 | 4505 | ||
| 4506 | Return Values- | 4506 | Return Values- |
| 4507 | Sucess : Return STATUS_SUCCESS | 4507 | Success : Return STATUS_SUCCESS |
| 4508 | Faillure :- return negative error code | 4508 | Faillure :- return negative error code |
| 4509 | 4509 | ||
| 4510 | **/ | 4510 | **/ |
| @@ -4621,7 +4621,7 @@ SaveHeaderIfPresent :- This API is use to Protect the Header in case of Header S | |||
| 4621 | @uiOffset :- Flash offset that has to be written. | 4621 | @uiOffset :- Flash offset that has to be written. |
| 4622 | 4622 | ||
| 4623 | Return value :- | 4623 | Return value :- |
| 4624 | Sucess :- On sucess return STATUS_SUCCESS | 4624 | Success :- On success return STATUS_SUCCESS |
| 4625 | Faillure :- Return negative error code | 4625 | Faillure :- Return negative error code |
| 4626 | 4626 | ||
| 4627 | **/ | 4627 | **/ |
| @@ -4634,7 +4634,7 @@ INT SaveHeaderIfPresent(PMINI_ADAPTER Adapter, PUCHAR pBuff, UINT uiOffset) | |||
| 4634 | UINT uiSectAlignAddr = 0; | 4634 | UINT uiSectAlignAddr = 0; |
| 4635 | UINT sig = 0; | 4635 | UINT sig = 0; |
| 4636 | 4636 | ||
| 4637 | //making the offset sector alligned | 4637 | //making the offset sector aligned |
| 4638 | uiSectAlignAddr = uiOffset & ~(Adapter->uiSectorSize - 1); | 4638 | uiSectAlignAddr = uiOffset & ~(Adapter->uiSectorSize - 1); |
| 4639 | 4639 | ||
| 4640 | 4640 | ||
| @@ -4643,7 +4643,7 @@ INT SaveHeaderIfPresent(PMINI_ADAPTER Adapter, PUCHAR pBuff, UINT uiOffset) | |||
| 4643 | (uiSectAlignAddr == BcmGetSectionValEndOffset(Adapter,DSD0)- Adapter->uiSectorSize)) | 4643 | (uiSectAlignAddr == BcmGetSectionValEndOffset(Adapter,DSD0)- Adapter->uiSectorSize)) |
| 4644 | { | 4644 | { |
| 4645 | 4645 | ||
| 4646 | //offset from the sector boundry having the header map | 4646 | //offset from the sector boundary having the header map |
| 4647 | offsetToProtect = Adapter->psFlash2xCSInfo->OffsetFromDSDStartForDSDHeader % Adapter->uiSectorSize; | 4647 | offsetToProtect = Adapter->psFlash2xCSInfo->OffsetFromDSDStartForDSDHeader % Adapter->uiSectorSize; |
| 4648 | HeaderSizeToProtect = sizeof(DSD_HEADER); | 4648 | HeaderSizeToProtect = sizeof(DSD_HEADER); |
| 4649 | bHasHeader = TRUE ; | 4649 | bHasHeader = TRUE ; |
| @@ -4697,7 +4697,7 @@ BcmDoChipSelect : This will selcet the appropriate chip for writing. | |||
| 4697 | @Adapater :- Bcm Driver Private Data Structure | 4697 | @Adapater :- Bcm Driver Private Data Structure |
| 4698 | 4698 | ||
| 4699 | OutPut:- | 4699 | OutPut:- |
| 4700 | Select the Appropriate chip and retrn status Sucess | 4700 | Select the Appropriate chip and retrn status Success |
| 4701 | **/ | 4701 | **/ |
| 4702 | static INT BcmDoChipSelect(PMINI_ADAPTER Adapter, UINT offset) | 4702 | static INT BcmDoChipSelect(PMINI_ADAPTER Adapter, UINT offset) |
| 4703 | { | 4703 | { |
| @@ -5086,7 +5086,7 @@ static INT CorruptDSDSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSect | |||
| 5086 | { | 5086 | { |
| 5087 | if(IsSectionWritable(Adapter,eFlash2xSectionVal) != TRUE) | 5087 | if(IsSectionWritable(Adapter,eFlash2xSectionVal) != TRUE) |
| 5088 | { | 5088 | { |
| 5089 | BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Section is not Writable...Hence cant Corrupt signature"); | 5089 | BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Section is not Writable...Hence can't Corrupt signature"); |
| 5090 | return SECTOR_IS_NOT_WRITABLE; | 5090 | return SECTOR_IS_NOT_WRITABLE; |
| 5091 | } | 5091 | } |
| 5092 | } | 5092 | } |
| @@ -5155,7 +5155,7 @@ static INT CorruptISOSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSect | |||
| 5155 | 5155 | ||
| 5156 | if(IsSectionWritable(Adapter,eFlash2xSectionVal) != TRUE) | 5156 | if(IsSectionWritable(Adapter,eFlash2xSectionVal) != TRUE) |
| 5157 | { | 5157 | { |
| 5158 | BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Section is not Writable...Hence cant Corrupt signature"); | 5158 | BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Section is not Writable...Hence can't Corrupt signature"); |
| 5159 | return SECTOR_IS_NOT_WRITABLE; | 5159 | return SECTOR_IS_NOT_WRITABLE; |
| 5160 | } | 5160 | } |
| 5161 | 5161 | ||
diff --git a/drivers/staging/brcm80211/README b/drivers/staging/brcm80211/README index 99e67669f26b..f8facb0786ec 100644 --- a/drivers/staging/brcm80211/README +++ b/drivers/staging/brcm80211/README | |||
| @@ -71,7 +71,7 @@ the driver. The devices use a single worldwide regulatory domain, with channels | |||
| 71 | passive operation. Transmission on those channels is suppressed until | 71 | passive operation. Transmission on those channels is suppressed until |
| 72 | appropriate other traffic is observed on those channels. | 72 | appropriate other traffic is observed on those channels. |
| 73 | 73 | ||
| 74 | Within the driver, we use the ficticious country code "X2" to represent this | 74 | Within the driver, we use the fictitious country code "X2" to represent this |
| 75 | worldwide regulatory domain. There is currently no interface to configure a | 75 | worldwide regulatory domain. There is currently no interface to configure a |
| 76 | different domain. | 76 | different domain. |
| 77 | 77 | ||
diff --git a/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c index 65313fa0cf4a..71c3571ee143 100644 --- a/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c +++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c | |||
| @@ -264,7 +264,7 @@ extern SDIOH_API_RC sdioh_disable_func_intr(void) | |||
| 264 | } | 264 | } |
| 265 | #endif /* defined(OOB_INTR_ONLY) && defined(HW_OOB) */ | 265 | #endif /* defined(OOB_INTR_ONLY) && defined(HW_OOB) */ |
| 266 | 266 | ||
| 267 | /* Configure callback to client when we recieve client interrupt */ | 267 | /* Configure callback to client when we receive client interrupt */ |
| 268 | extern SDIOH_API_RC | 268 | extern SDIOH_API_RC |
| 269 | sdioh_interrupt_register(sdioh_info_t *sd, sdioh_cb_fn_t fn, void *argh) | 269 | sdioh_interrupt_register(sdioh_info_t *sd, sdioh_cb_fn_t fn, void *argh) |
| 270 | { | 270 | { |
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_custom_gpio.c b/drivers/staging/brcm80211/brcmfmac/dhd_custom_gpio.c index cbfa1c1b7059..1cf6c5dc2bb7 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_custom_gpio.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_custom_gpio.c | |||
| @@ -46,7 +46,7 @@ extern int sdioh_mmc_irq(int irq); | |||
| 46 | #include <mach/gpio.h> | 46 | #include <mach/gpio.h> |
| 47 | #endif | 47 | #endif |
| 48 | 48 | ||
| 49 | /* Customer specific Host GPIO defintion */ | 49 | /* Customer specific Host GPIO definition */ |
| 50 | static int dhd_oob_gpio_num = -1; /* GG 19 */ | 50 | static int dhd_oob_gpio_num = -1; /* GG 19 */ |
| 51 | 51 | ||
| 52 | module_param(dhd_oob_gpio_num, int, 0644); | 52 | module_param(dhd_oob_gpio_num, int, 0644); |
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c index 02c6d446934c..dd0375793875 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c | |||
| @@ -478,7 +478,7 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd) | |||
| 478 | dhd_set_packet_filter(1, dhd); | 478 | dhd_set_packet_filter(1, dhd); |
| 479 | 479 | ||
| 480 | /* if dtim skip setup as default force it | 480 | /* if dtim skip setup as default force it |
| 481 | * to wake each thrid dtim | 481 | * to wake each third dtim |
| 482 | * for better power saving. | 482 | * for better power saving. |
| 483 | * Note that side effect is chance to miss BC/MC | 483 | * Note that side effect is chance to miss BC/MC |
| 484 | * packet | 484 | * packet |
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c index 106627040db0..464f52af1315 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c | |||
| @@ -3659,7 +3659,7 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished) | |||
| 3659 | * control pkt receives. | 3659 | * control pkt receives. |
| 3660 | * Later we use buffer-poll for data as well | 3660 | * Later we use buffer-poll for data as well |
| 3661 | * as control packets. | 3661 | * as control packets. |
| 3662 | * This is required becuase dhd receives full | 3662 | * This is required because dhd receives full |
| 3663 | * frame in gSPI unlike SDIO. | 3663 | * frame in gSPI unlike SDIO. |
| 3664 | * After the frame is received we have to | 3664 | * After the frame is received we have to |
| 3665 | * distinguish whether it is data | 3665 | * distinguish whether it is data |
| @@ -3744,7 +3744,7 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished) | |||
| 3744 | bus->dhd->rx_errors++; | 3744 | bus->dhd->rx_errors++; |
| 3745 | dhd_os_sdunlock_rxq(bus->dhd); | 3745 | dhd_os_sdunlock_rxq(bus->dhd); |
| 3746 | /* Force retry w/normal header read. | 3746 | /* Force retry w/normal header read. |
| 3747 | * Don't attemp NAK for | 3747 | * Don't attempt NAK for |
| 3748 | * gSPI | 3748 | * gSPI |
| 3749 | */ | 3749 | */ |
| 3750 | dhdsdio_rxfail(bus, true, | 3750 | dhdsdio_rxfail(bus, true, |
diff --git a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c index 774b4e916b29..c1b07ae31674 100644 --- a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c +++ b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c | |||
| @@ -1079,7 +1079,7 @@ static int ieee_hw_init(struct ieee80211_hw *hw) | |||
| 1079 | */ | 1079 | */ |
| 1080 | hw->max_rates = 2; /* Primary rate and 1 fallback rate */ | 1080 | hw->max_rates = 2; /* Primary rate and 1 fallback rate */ |
| 1081 | 1081 | ||
| 1082 | hw->channel_change_time = 7 * 1000; /* channel change time is dependant on chip and band */ | 1082 | hw->channel_change_time = 7 * 1000; /* channel change time is dependent on chip and band */ |
| 1083 | hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); | 1083 | hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); |
| 1084 | 1084 | ||
| 1085 | hw->rate_control_algorithm = "minstrel_ht"; | 1085 | hw->rate_control_algorithm = "minstrel_ht"; |
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c b/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c index c6cdcd940956..f00865957881 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c +++ b/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c | |||
| @@ -89,7 +89,7 @@ u32 wl_ampdu_dbg = | |||
| 89 | /* structure to hold tx fifo information and pre-loading state | 89 | /* structure to hold tx fifo information and pre-loading state |
| 90 | * counters specific to tx underflows of ampdus | 90 | * counters specific to tx underflows of ampdus |
| 91 | * some counters might be redundant with the ones in wlc or ampdu structures. | 91 | * some counters might be redundant with the ones in wlc or ampdu structures. |
| 92 | * This allows to maintain a specific state independantly of | 92 | * This allows to maintain a specific state independently of |
| 93 | * how often and/or when the wlc counters are updated. | 93 | * how often and/or when the wlc counters are updated. |
| 94 | */ | 94 | */ |
| 95 | typedef struct wlc_fifo_info { | 95 | typedef struct wlc_fifo_info { |
| @@ -265,7 +265,7 @@ static void scb_ampdu_update_config(struct ampdu_info *ampdu, struct scb *scb) | |||
| 265 | 265 | ||
| 266 | scb_ampdu->max_pdu = (u8) ampdu->wlc->pub->tunables->ampdunummpdu; | 266 | scb_ampdu->max_pdu = (u8) ampdu->wlc->pub->tunables->ampdunummpdu; |
| 267 | 267 | ||
| 268 | /* go back to legacy size if some preloading is occuring */ | 268 | /* go back to legacy size if some preloading is occurring */ |
| 269 | for (i = 0; i < NUM_FFPLD_FIFO; i++) { | 269 | for (i = 0; i < NUM_FFPLD_FIFO; i++) { |
| 270 | if (ampdu->fifo_tb[i].ampdu_pld_size > FFPLD_PLD_INCR) | 270 | if (ampdu->fifo_tb[i].ampdu_pld_size > FFPLD_PLD_INCR) |
| 271 | scb_ampdu->max_pdu = AMPDU_NUM_MPDU_LEGACY; | 271 | scb_ampdu->max_pdu = AMPDU_NUM_MPDU_LEGACY; |
| @@ -406,7 +406,7 @@ static int wlc_ffpld_check_txfunfl(struct wlc_info *wlc, int fid) | |||
| 406 | /* | 406 | /* |
| 407 | compute a new dma xfer rate for max_mpdu @ max mcs. | 407 | compute a new dma xfer rate for max_mpdu @ max mcs. |
| 408 | This is the minimum dma rate that | 408 | This is the minimum dma rate that |
| 409 | can acheive no unferflow condition for the current mpdu size. | 409 | can achieve no unferflow condition for the current mpdu size. |
| 410 | */ | 410 | */ |
| 411 | /* note : we divide/multiply by 100 to avoid integer overflows */ | 411 | /* note : we divide/multiply by 100 to avoid integer overflows */ |
| 412 | fifo->dmaxferrate = | 412 | fifo->dmaxferrate = |
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c b/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c index 5a96dc3cdb36..4b6e181c7dc9 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c +++ b/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c | |||
| @@ -1915,7 +1915,7 @@ void wlc_bmac_phy_reset(struct wlc_hw_info *wlc_hw) | |||
| 1915 | 1915 | ||
| 1916 | phy_bw_clkbits = wlc_phy_clk_bwbits(wlc_hw->band->pi); | 1916 | phy_bw_clkbits = wlc_phy_clk_bwbits(wlc_hw->band->pi); |
| 1917 | 1917 | ||
| 1918 | /* Specfic reset sequence required for NPHY rev 3 and 4 */ | 1918 | /* Specific reset sequence required for NPHY rev 3 and 4 */ |
| 1919 | if (WLCISNPHY(wlc_hw->band) && NREV_GE(wlc_hw->band->phyrev, 3) && | 1919 | if (WLCISNPHY(wlc_hw->band) && NREV_GE(wlc_hw->band->phyrev, 3) && |
| 1920 | NREV_LE(wlc_hw->band->phyrev, 4)) { | 1920 | NREV_LE(wlc_hw->band->phyrev, 4)) { |
| 1921 | /* Set the PHY bandwidth */ | 1921 | /* Set the PHY bandwidth */ |
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_main.c b/drivers/staging/brcm80211/brcmsmac/wlc_main.c index 639b5d7c9603..ab7ab850e199 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_main.c +++ b/drivers/staging/brcm80211/brcmsmac/wlc_main.c | |||
| @@ -6283,7 +6283,7 @@ wlc_d11hdrs_mac80211(struct wlc_info *wlc, struct ieee80211_hw *hw, | |||
| 6283 | ((preamble_type[1] == WLC_MM_PREAMBLE) == | 6283 | ((preamble_type[1] == WLC_MM_PREAMBLE) == |
| 6284 | (txh->MModeFbrLen != 0))); | 6284 | (txh->MModeFbrLen != 0))); |
| 6285 | 6285 | ||
| 6286 | ac = wme_fifo2ac[queue]; | 6286 | ac = skb_get_queue_mapping(p); |
| 6287 | if (SCB_WME(scb) && qos && wlc->edcf_txop[ac]) { | 6287 | if (SCB_WME(scb) && qos && wlc->edcf_txop[ac]) { |
| 6288 | uint frag_dur, dur, dur_fallback; | 6288 | uint frag_dur, dur, dur_fallback; |
| 6289 | 6289 | ||
| @@ -6919,8 +6919,7 @@ prep_mac80211_status(struct wlc_info *wlc, d11rxhdr_t *rxh, struct sk_buff *p, | |||
| 6919 | preamble = 0; | 6919 | preamble = 0; |
| 6920 | if (IS_CCK(rspec)) { | 6920 | if (IS_CCK(rspec)) { |
| 6921 | if (rxh->PhyRxStatus_0 & PRXS0_SHORTH) | 6921 | if (rxh->PhyRxStatus_0 & PRXS0_SHORTH) |
| 6922 | WL_ERROR("Short CCK\n"); | 6922 | rx_status->flag |= RX_FLAG_SHORTPRE; |
| 6923 | rx_status->flag |= RX_FLAG_SHORTPRE; | ||
| 6924 | } else if (IS_OFDM(rspec)) { | 6923 | } else if (IS_OFDM(rspec)) { |
| 6925 | rx_status->flag |= RX_FLAG_SHORTPRE; | 6924 | rx_status->flag |= RX_FLAG_SHORTPRE; |
| 6926 | } else { | 6925 | } else { |
| @@ -7079,10 +7078,8 @@ void BCMFASTPATH wlc_recv(struct wlc_info *wlc, struct sk_buff *p) | |||
| 7079 | if (ieee80211_is_probe_req(h->frame_control)) | 7078 | if (ieee80211_is_probe_req(h->frame_control)) |
| 7080 | goto toss; | 7079 | goto toss; |
| 7081 | 7080 | ||
| 7082 | if (is_amsdu) { | 7081 | if (is_amsdu) |
| 7083 | WL_ERROR("%s: is_amsdu causing toss\n", __func__); | ||
| 7084 | goto toss; | 7082 | goto toss; |
| 7085 | } | ||
| 7086 | 7083 | ||
| 7087 | wlc_recvctl(wlc, rxh, p); | 7084 | wlc_recvctl(wlc, rxh, p); |
| 7088 | return; | 7085 | return; |
| @@ -8295,7 +8292,7 @@ wlc_txflowcontrol_prio_isset(struct wlc_info *wlc, struct wlc_txq_info *q, | |||
| 8295 | return (q->stopped & prio_mask) == prio_mask; | 8292 | return (q->stopped & prio_mask) == prio_mask; |
| 8296 | } | 8293 | } |
| 8297 | 8294 | ||
| 8298 | /* propogate the flow control to all interfaces using the given tx queue */ | 8295 | /* propagate the flow control to all interfaces using the given tx queue */ |
| 8299 | void wlc_txflowcontrol(struct wlc_info *wlc, struct wlc_txq_info *qi, | 8296 | void wlc_txflowcontrol(struct wlc_info *wlc, struct wlc_txq_info *qi, |
| 8300 | bool on, int prio) | 8297 | bool on, int prio) |
| 8301 | { | 8298 | { |
| @@ -8462,7 +8459,7 @@ static void wlc_txq_free(struct wlc_info *wlc, struct wlc_txq_info *qi) | |||
| 8462 | } | 8459 | } |
| 8463 | 8460 | ||
| 8464 | /* | 8461 | /* |
| 8465 | * Flag 'scan in progress' to withold dynamic phy calibration | 8462 | * Flag 'scan in progress' to withhold dynamic phy calibration |
| 8466 | */ | 8463 | */ |
| 8467 | void wlc_scan_start(struct wlc_info *wlc) | 8464 | void wlc_scan_start(struct wlc_info *wlc) |
| 8468 | { | 8465 | { |
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_rate.c b/drivers/staging/brcm80211/brcmsmac/wlc_rate.c index 0cfa36023cf1..d284f1ac49cc 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_rate.c +++ b/drivers/staging/brcm80211/brcmsmac/wlc_rate.c | |||
| @@ -332,7 +332,7 @@ wlc_rate_hwrs_filter_sort_validate(wlc_rateset_t *rs, | |||
| 332 | return false; | 332 | return false; |
| 333 | } | 333 | } |
| 334 | 334 | ||
| 335 | /* caluclate the rate of a rx'd frame and return it as a ratespec */ | 335 | /* calculate the rate of a rx'd frame and return it as a ratespec */ |
| 336 | ratespec_t BCMFASTPATH wlc_compute_rspec(d11rxhdr_t *rxh, u8 *plcp) | 336 | ratespec_t BCMFASTPATH wlc_compute_rspec(d11rxhdr_t *rxh, u8 *plcp) |
| 337 | { | 337 | { |
| 338 | int phy_type; | 338 | int phy_type; |
diff --git a/drivers/staging/brcm80211/include/bcmsrom_fmt.h b/drivers/staging/brcm80211/include/bcmsrom_fmt.h index ae2bff828607..4768968f910a 100644 --- a/drivers/staging/brcm80211/include/bcmsrom_fmt.h +++ b/drivers/staging/brcm80211/include/bcmsrom_fmt.h | |||
| @@ -103,7 +103,7 @@ | |||
| 103 | 103 | ||
| 104 | #define SROM_CRCREV 63 | 104 | #define SROM_CRCREV 63 |
| 105 | 105 | ||
| 106 | /* SROM Rev 4: Reallocate the software part of the srom to accomodate | 106 | /* SROM Rev 4: Reallocate the software part of the srom to accommodate |
| 107 | * MIMO features. It assumes up to two PCIE functions and 440 bytes | 107 | * MIMO features. It assumes up to two PCIE functions and 440 bytes |
| 108 | * of useable srom i.e. the useable storage in chips with OTP that | 108 | * of useable srom i.e. the useable storage in chips with OTP that |
| 109 | * implements hardware redundancy. | 109 | * implements hardware redundancy. |
diff --git a/drivers/staging/brcm80211/include/hndsoc.h b/drivers/staging/brcm80211/include/hndsoc.h index 9747cc46ca96..6435686b329f 100644 --- a/drivers/staging/brcm80211/include/hndsoc.h +++ b/drivers/staging/brcm80211/include/hndsoc.h | |||
| @@ -181,7 +181,7 @@ | |||
| 181 | * conventions for the use the flash space: | 181 | * conventions for the use the flash space: |
| 182 | */ | 182 | */ |
| 183 | 183 | ||
| 184 | /* Minumum amount of flash we support */ | 184 | /* Minimum amount of flash we support */ |
| 185 | #define FLASH_MIN 0x00020000 /* Minimum flash size */ | 185 | #define FLASH_MIN 0x00020000 /* Minimum flash size */ |
| 186 | 186 | ||
| 187 | /* A boot/binary may have an embedded block that describes its size */ | 187 | /* A boot/binary may have an embedded block that describes its size */ |
diff --git a/drivers/staging/brcm80211/util/bcmotp.c b/drivers/staging/brcm80211/util/bcmotp.c index ba71c108b366..17991212a22d 100644 --- a/drivers/staging/brcm80211/util/bcmotp.c +++ b/drivers/staging/brcm80211/util/bcmotp.c | |||
| @@ -213,7 +213,7 @@ static u16 ipxotp_read_bit(void *oh, chipcregs_t *cc, uint off) | |||
| 213 | return (int)st; | 213 | return (int)st; |
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | /* Calculate max HW/SW region byte size by substracting fuse region and checksum size, | 216 | /* Calculate max HW/SW region byte size by subtracting fuse region and checksum size, |
| 217 | * osizew is oi->wsize (OTP size - GU size) in words | 217 | * osizew is oi->wsize (OTP size - GU size) in words |
| 218 | */ | 218 | */ |
| 219 | static int ipxotp_max_rgnsz(si_t *sih, int osizew) | 219 | static int ipxotp_max_rgnsz(si_t *sih, int osizew) |
| @@ -229,7 +229,7 @@ static int ipxotp_max_rgnsz(si_t *sih, int osizew) | |||
| 229 | ret = osizew * 2 - OTP_SZ_FU_72 - OTP_SZ_CHECKSUM; | 229 | ret = osizew * 2 - OTP_SZ_FU_72 - OTP_SZ_CHECKSUM; |
| 230 | break; | 230 | break; |
| 231 | default: | 231 | default: |
| 232 | ASSERT(0); /* Don't konw about this chip */ | 232 | ASSERT(0); /* Don't know about this chip */ |
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | return ret; | 235 | return ret; |
diff --git a/drivers/staging/brcm80211/util/bcmsrom.c b/drivers/staging/brcm80211/util/bcmsrom.c index eca35b94e96c..850bfa6593e0 100644 --- a/drivers/staging/brcm80211/util/bcmsrom.c +++ b/drivers/staging/brcm80211/util/bcmsrom.c | |||
| @@ -1859,7 +1859,7 @@ static int initvars_srom_pci(si_t *sih, void *curmap, char **vars, uint *count) | |||
| 1859 | 1859 | ||
| 1860 | /* | 1860 | /* |
| 1861 | * Apply CRC over SROM content regardless SROM is present or not, | 1861 | * Apply CRC over SROM content regardless SROM is present or not, |
| 1862 | * and use variable <devpath>sromrev's existance in flash to decide | 1862 | * and use variable <devpath>sromrev's existence in flash to decide |
| 1863 | * if we should return an error when CRC fails or read SROM variables | 1863 | * if we should return an error when CRC fails or read SROM variables |
| 1864 | * from flash. | 1864 | * from flash. |
| 1865 | */ | 1865 | */ |
diff --git a/drivers/staging/brcm80211/util/hnddma.c b/drivers/staging/brcm80211/util/hnddma.c index 8a81eb997f99..be339feae77d 100644 --- a/drivers/staging/brcm80211/util/hnddma.c +++ b/drivers/staging/brcm80211/util/hnddma.c | |||
| @@ -1179,7 +1179,7 @@ static void BCMFASTPATH dma64_txreclaim(dma_info_t *di, txd_range_t range) | |||
| 1179 | (range == HNDDMA_RANGE_ALL) ? "all" : | 1179 | (range == HNDDMA_RANGE_ALL) ? "all" : |
| 1180 | ((range == | 1180 | ((range == |
| 1181 | HNDDMA_RANGE_TRANSMITTED) ? "transmitted" : | 1181 | HNDDMA_RANGE_TRANSMITTED) ? "transmitted" : |
| 1182 | "transfered"))); | 1182 | "transferred"))); |
| 1183 | 1183 | ||
| 1184 | if (di->txin == di->txout) | 1184 | if (di->txin == di->txout) |
| 1185 | return; | 1185 | return; |
| @@ -1549,7 +1549,7 @@ static int BCMFASTPATH dma64_txfast(dma_info_t *di, struct sk_buff *p0, | |||
| 1549 | * If range is HNDDMA_RANGE_TRANSMITTED, reclaim descriptors that have be | 1549 | * If range is HNDDMA_RANGE_TRANSMITTED, reclaim descriptors that have be |
| 1550 | * transmitted as noted by the hardware "CurrDescr" pointer. | 1550 | * transmitted as noted by the hardware "CurrDescr" pointer. |
| 1551 | * If range is HNDDMA_RANGE_TRANSFERED, reclaim descriptors that have be | 1551 | * If range is HNDDMA_RANGE_TRANSFERED, reclaim descriptors that have be |
| 1552 | * transfered by the DMA as noted by the hardware "ActiveDescr" pointer. | 1552 | * transferred by the DMA as noted by the hardware "ActiveDescr" pointer. |
| 1553 | * If range is HNDDMA_RANGE_ALL, reclaim all txd(s) posted to the ring and | 1553 | * If range is HNDDMA_RANGE_ALL, reclaim all txd(s) posted to the ring and |
| 1554 | * return associated packet regardless of the value of hardware pointers. | 1554 | * return associated packet regardless of the value of hardware pointers. |
| 1555 | */ | 1555 | */ |
| @@ -1563,7 +1563,7 @@ static void *BCMFASTPATH dma64_getnexttxp(dma_info_t *di, txd_range_t range) | |||
| 1563 | (range == HNDDMA_RANGE_ALL) ? "all" : | 1563 | (range == HNDDMA_RANGE_ALL) ? "all" : |
| 1564 | ((range == | 1564 | ((range == |
| 1565 | HNDDMA_RANGE_TRANSMITTED) ? "transmitted" : | 1565 | HNDDMA_RANGE_TRANSMITTED) ? "transmitted" : |
| 1566 | "transfered"))); | 1566 | "transferred"))); |
| 1567 | 1567 | ||
| 1568 | if (di->ntxd == 0) | 1568 | if (di->ntxd == 0) |
| 1569 | return NULL; | 1569 | return NULL; |
diff --git a/drivers/staging/brcm80211/util/sbpcmcia.h b/drivers/staging/brcm80211/util/sbpcmcia.h index 6b9923f551a9..d4c156586e81 100644 --- a/drivers/staging/brcm80211/util/sbpcmcia.h +++ b/drivers/staging/brcm80211/util/sbpcmcia.h | |||
| @@ -109,7 +109,7 @@ | |||
| 109 | #define CISTPL_CFTABLE 0x1b /* Config table entry */ | 109 | #define CISTPL_CFTABLE 0x1b /* Config table entry */ |
| 110 | #define CISTPL_END 0xff /* End of the CIS tuple chain */ | 110 | #define CISTPL_END 0xff /* End of the CIS tuple chain */ |
| 111 | 111 | ||
| 112 | /* Function identifier provides context for the function extentions tuple */ | 112 | /* Function identifier provides context for the function extensions tuple */ |
| 113 | #define CISTPL_FID_SDIO 0x0c /* Extensions defined by SDIO spec */ | 113 | #define CISTPL_FID_SDIO 0x0c /* Extensions defined by SDIO spec */ |
| 114 | 114 | ||
| 115 | /* Function extensions for LANs (assumed for extensions other than SDIO) */ | 115 | /* Function extensions for LANs (assumed for extensions other than SDIO) */ |
diff --git a/drivers/staging/brcm80211/util/siutils.c b/drivers/staging/brcm80211/util/siutils.c index ed168ceba5f0..6ebd7f58af81 100644 --- a/drivers/staging/brcm80211/util/siutils.c +++ b/drivers/staging/brcm80211/util/siutils.c | |||
| @@ -1319,7 +1319,7 @@ int si_clkctl_xtal(si_t *sih, uint what, bool on) | |||
| 1319 | } | 1319 | } |
| 1320 | 1320 | ||
| 1321 | /* | 1321 | /* |
| 1322 | * clock control policy function throught chipcommon | 1322 | * clock control policy function through chipcommon |
| 1323 | * | 1323 | * |
| 1324 | * set dynamic clk control mode (forceslow, forcefast, dynamic) | 1324 | * set dynamic clk control mode (forceslow, forcefast, dynamic) |
| 1325 | * returns true if we are forcing fast clock | 1325 | * returns true if we are forcing fast clock |
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index a4ceb29c358e..e7e72b8d8cde 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c | |||
| @@ -2064,7 +2064,7 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s) | |||
| 2064 | COMEDI_CB_OVERFLOW)) { | 2064 | COMEDI_CB_OVERFLOW)) { |
| 2065 | runflags_mask |= SRF_RUNNING; | 2065 | runflags_mask |= SRF_RUNNING; |
| 2066 | } | 2066 | } |
| 2067 | /* remember if an error event has occured, so an error | 2067 | /* remember if an error event has occurred, so an error |
| 2068 | * can be returned the next time the user does a read() */ | 2068 | * can be returned the next time the user does a read() */ |
| 2069 | if (s->async->events & (COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW)) { | 2069 | if (s->async->events & (COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW)) { |
| 2070 | runflags_mask |= SRF_ERROR; | 2070 | runflags_mask |= SRF_ERROR; |
diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.c b/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.c index 644bda44556e..482a412aa652 100644 --- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.c +++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.c | |||
| @@ -124,9 +124,9 @@ You should also find the complete GPL in the COPYING file accompanying this sour | |||
| 124 | | -5: The selected PCI input clock is wrong | | 124 | | -5: The selected PCI input clock is wrong | |
| 125 | | -6: Timing unity selection is wrong | | 125 | | -6: Timing unity selection is wrong | |
| 126 | | -7: Base timing selection is wrong | | 126 | | -7: Base timing selection is wrong | |
| 127 | | -8: You can not used the 40MHz clock selection wich | | 127 | | -8: You can not used the 40MHz clock selection with | |
| 128 | | this board | | 128 | | this board | |
| 129 | | -9: You can not used the 40MHz clock selection wich | | 129 | | -9: You can not used the 40MHz clock selection with | |
| 130 | | this CHRONOS version | | 130 | | this CHRONOS version | |
| 131 | +----------------------------------------------------------------------------+ | 131 | +----------------------------------------------------------------------------+ |
| 132 | */ | 132 | */ |
| @@ -721,10 +721,10 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device *dev, struct comedi_sub | |||
| 721 | } | 721 | } |
| 722 | } else { | 722 | } else { |
| 723 | /**************************************************************/ | 723 | /**************************************************************/ |
| 724 | /* You can not used the 40MHz clock selection wich this board */ | 724 | /* You can not use the 40MHz clock selection with this board */ |
| 725 | /**************************************************************/ | 725 | /**************************************************************/ |
| 726 | 726 | ||
| 727 | DPRINTK("You can not used the 40MHz clock selection wich this board\n"); | 727 | DPRINTK("You can not used the 40MHz clock selection with this board\n"); |
| 728 | i_ReturnValue = | 728 | i_ReturnValue = |
| 729 | -8; | 729 | -8; |
| 730 | } | 730 | } |
diff --git a/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c b/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c index 90e71e12784a..b973095146f9 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c | |||
| @@ -59,7 +59,7 @@ You should also find the complete GPL in the COPYING file accompanying this sour | |||
| 59 | /*+----------------------------------------------------------------------------+*/ | 59 | /*+----------------------------------------------------------------------------+*/ |
| 60 | /*| Input Parameters : int i_NbOfWordsToRead : Nbr. of word to read |*/ | 60 | /*| Input Parameters : int i_NbOfWordsToRead : Nbr. of word to read |*/ |
| 61 | /*| unsigned int dw_PCIBoardEepromAddress : Address of the eeprom |*/ | 61 | /*| unsigned int dw_PCIBoardEepromAddress : Address of the eeprom |*/ |
| 62 | /*| unsigned short w_EepromStartAddress : Eeprom strat address |*/ | 62 | /*| unsigned short w_EepromStartAddress : Eeprom start address |*/ |
| 63 | /*+----------------------------------------------------------------------------+*/ | 63 | /*+----------------------------------------------------------------------------+*/ |
| 64 | /*| Output Parameters : unsigned short * pw_DataRead : Read data |*/ | 64 | /*| Output Parameters : unsigned short * pw_DataRead : Read data |*/ |
| 65 | /*+----------------------------------------------------------------------------+*/ | 65 | /*+----------------------------------------------------------------------------+*/ |
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.c index 9dd857df93c8..002297dfe33f 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.c | |||
| @@ -498,7 +498,7 @@ void v_APCI2032_Interrupt(int irq, void *d) | |||
| 498 | struct comedi_device *dev = d; | 498 | struct comedi_device *dev = d; |
| 499 | unsigned int ui_DO; | 499 | unsigned int ui_DO; |
| 500 | 500 | ||
| 501 | ui_DO = inl(devpriv->iobase + APCI2032_DIGITAL_OP_IRQ) & 0x1; /* Check if VCC OR CC interrupt has occured. */ | 501 | ui_DO = inl(devpriv->iobase + APCI2032_DIGITAL_OP_IRQ) & 0x1; /* Check if VCC OR CC interrupt has occurred. */ |
| 502 | 502 | ||
| 503 | if (ui_DO == 0) { | 503 | if (ui_DO == 0) { |
| 504 | printk("\nInterrupt from unKnown source\n"); | 504 | printk("\nInterrupt from unKnown source\n"); |
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c index a813fdbbd96e..fc61214151b7 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | |||
| @@ -148,7 +148,7 @@ int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, struct comedi_subd | |||
| 148 | unsigned short us_ConvertTiming, us_TmpValue, i; | 148 | unsigned short us_ConvertTiming, us_TmpValue, i; |
| 149 | unsigned char b_Tmp; | 149 | unsigned char b_Tmp; |
| 150 | 150 | ||
| 151 | /* fix convertion time to 10 us */ | 151 | /* fix conversion time to 10 us */ |
| 152 | if (!devpriv->ui_EocEosConversionTime) { | 152 | if (!devpriv->ui_EocEosConversionTime) { |
| 153 | printk("No timer0 Value using 10 us\n"); | 153 | printk("No timer0 Value using 10 us\n"); |
| 154 | us_ConvertTiming = 10; | 154 | us_ConvertTiming = 10; |
| @@ -251,7 +251,7 @@ int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, struct comedi_subd | |||
| 251 | APCI3120_SELECT_TIMER_0_WORD; | 251 | APCI3120_SELECT_TIMER_0_WORD; |
| 252 | outb(b_Tmp, devpriv->iobase + APCI3120_TIMER_CRT0); | 252 | outb(b_Tmp, devpriv->iobase + APCI3120_TIMER_CRT0); |
| 253 | 253 | ||
| 254 | /* Set the convertion time */ | 254 | /* Set the conversion time */ |
| 255 | outw(us_ConvertTiming, | 255 | outw(us_ConvertTiming, |
| 256 | devpriv->iobase + APCI3120_TIMER_VALUE); | 256 | devpriv->iobase + APCI3120_TIMER_VALUE); |
| 257 | 257 | ||
| @@ -311,7 +311,7 @@ int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, struct comedi_subd | |||
| 311 | APCI3120_SELECT_TIMER_0_WORD; | 311 | APCI3120_SELECT_TIMER_0_WORD; |
| 312 | outb(b_Tmp, devpriv->iobase + APCI3120_TIMER_CRT0); | 312 | outb(b_Tmp, devpriv->iobase + APCI3120_TIMER_CRT0); |
| 313 | 313 | ||
| 314 | /* Set the convertion time */ | 314 | /* Set the conversion time */ |
| 315 | outw(us_ConvertTiming, | 315 | outw(us_ConvertTiming, |
| 316 | devpriv->iobase + APCI3120_TIMER_VALUE); | 316 | devpriv->iobase + APCI3120_TIMER_VALUE); |
| 317 | 317 | ||
| @@ -354,9 +354,9 @@ int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, struct comedi_subd | |||
| 354 | /* Start conversion */ | 354 | /* Start conversion */ |
| 355 | outw(0, devpriv->iobase + APCI3120_START_CONVERSION); | 355 | outw(0, devpriv->iobase + APCI3120_START_CONVERSION); |
| 356 | 356 | ||
| 357 | /* Waiting of end of convertion if interrupt is not installed */ | 357 | /* Waiting of end of conversion if interrupt is not installed */ |
| 358 | if (devpriv->b_EocEosInterrupt == APCI3120_DISABLE) { | 358 | if (devpriv->b_EocEosInterrupt == APCI3120_DISABLE) { |
| 359 | /* Waiting the end of convertion */ | 359 | /* Waiting the end of conversion */ |
| 360 | do { | 360 | do { |
| 361 | us_TmpValue = | 361 | us_TmpValue = |
| 362 | inw(devpriv->iobase + | 362 | inw(devpriv->iobase + |
| @@ -854,7 +854,7 @@ int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device *dev, | |||
| 854 | b_DigitalOutputRegister) & 0xF0) | | 854 | b_DigitalOutputRegister) & 0xF0) | |
| 855 | APCI3120_SELECT_TIMER_0_WORD; | 855 | APCI3120_SELECT_TIMER_0_WORD; |
| 856 | outb(b_Tmp, dev->iobase + APCI3120_TIMER_CRT0); | 856 | outb(b_Tmp, dev->iobase + APCI3120_TIMER_CRT0); |
| 857 | /* Set the convertion time */ | 857 | /* Set the conversion time */ |
| 858 | outw(((unsigned short) ui_TimerValue0), | 858 | outw(((unsigned short) ui_TimerValue0), |
| 859 | dev->iobase + APCI3120_TIMER_VALUE); | 859 | dev->iobase + APCI3120_TIMER_VALUE); |
| 860 | break; | 860 | break; |
| @@ -872,7 +872,7 @@ int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device *dev, | |||
| 872 | b_DigitalOutputRegister) & 0xF0) | | 872 | b_DigitalOutputRegister) & 0xF0) | |
| 873 | APCI3120_SELECT_TIMER_1_WORD; | 873 | APCI3120_SELECT_TIMER_1_WORD; |
| 874 | outb(b_Tmp, dev->iobase + APCI3120_TIMER_CRT0); | 874 | outb(b_Tmp, dev->iobase + APCI3120_TIMER_CRT0); |
| 875 | /* Set the convertion time */ | 875 | /* Set the conversion time */ |
| 876 | outw(((unsigned short) ui_TimerValue1), | 876 | outw(((unsigned short) ui_TimerValue1), |
| 877 | dev->iobase + APCI3120_TIMER_VALUE); | 877 | dev->iobase + APCI3120_TIMER_VALUE); |
| 878 | 878 | ||
| @@ -889,7 +889,7 @@ int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device *dev, | |||
| 889 | APCI3120_SELECT_TIMER_0_WORD; | 889 | APCI3120_SELECT_TIMER_0_WORD; |
| 890 | outb(b_Tmp, dev->iobase + APCI3120_TIMER_CRT0); | 890 | outb(b_Tmp, dev->iobase + APCI3120_TIMER_CRT0); |
| 891 | 891 | ||
| 892 | /* Set the convertion time */ | 892 | /* Set the conversion time */ |
| 893 | outw(((unsigned short) ui_TimerValue0), | 893 | outw(((unsigned short) ui_TimerValue0), |
| 894 | dev->iobase + APCI3120_TIMER_VALUE); | 894 | dev->iobase + APCI3120_TIMER_VALUE); |
| 895 | break; | 895 | break; |
| @@ -1104,7 +1104,7 @@ int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device *dev, | |||
| 1104 | 1104 | ||
| 1105 | /* | 1105 | /* |
| 1106 | * 4 | 1106 | * 4 |
| 1107 | * amount of bytes to be transfered set transfer count used ADDON | 1107 | * amount of bytes to be transferred set transfer count used ADDON |
| 1108 | * MWTC register commented testing | 1108 | * MWTC register commented testing |
| 1109 | * outl(devpriv->ui_DmaBufferUsesize[0], | 1109 | * outl(devpriv->ui_DmaBufferUsesize[0], |
| 1110 | * devpriv->i_IobaseAddon+AMCC_OP_REG_AMWTC); | 1110 | * devpriv->i_IobaseAddon+AMCC_OP_REG_AMWTC); |
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h index b3c81979f14d..50eb0a0a0a05 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h | |||
| @@ -169,7 +169,7 @@ struct str_AnalogReadInformation { | |||
| 169 | 169 | ||
| 170 | unsigned char b_Type; /* EOC or EOS */ | 170 | unsigned char b_Type; /* EOC or EOS */ |
| 171 | unsigned char b_InterruptFlag; /* Interrupt use or not */ | 171 | unsigned char b_InterruptFlag; /* Interrupt use or not */ |
| 172 | unsigned int ui_ConvertTiming; /* Selection of the convertion time */ | 172 | unsigned int ui_ConvertTiming; /* Selection of the conversion time */ |
| 173 | unsigned char b_NbrOfChannel; /* Number of channel to read */ | 173 | unsigned char b_NbrOfChannel; /* Number of channel to read */ |
| 174 | unsigned int ui_ChannelList[MAX_ANALOGINPUT_CHANNELS]; /* Number of the channel to be read */ | 174 | unsigned int ui_ChannelList[MAX_ANALOGINPUT_CHANNELS]; /* Number of the channel to be read */ |
| 175 | unsigned int ui_RangeList[MAX_ANALOGINPUT_CHANNELS]; /* Gain of each channel */ | 175 | unsigned int ui_RangeList[MAX_ANALOGINPUT_CHANNELS]; /* Gain of each channel */ |
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c index a93e2349ad3a..c75a1a1fd775 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c | |||
| @@ -103,7 +103,7 @@ struct str_BoardInfos s_BoardInfos[100]; /* 100 will be the max number of board | |||
| 103 | /*+----------------------------------------------------------------------------+*/ | 103 | /*+----------------------------------------------------------------------------+*/ |
| 104 | /*| Input Parameters : int i_NbOfWordsToRead : Nbr. of word to read |*/ | 104 | /*| Input Parameters : int i_NbOfWordsToRead : Nbr. of word to read |*/ |
| 105 | /*| unsigned int dw_PCIBoardEepromAddress : Address of the eeprom |*/ | 105 | /*| unsigned int dw_PCIBoardEepromAddress : Address of the eeprom |*/ |
| 106 | /*| unsigned short w_EepromStartAddress : Eeprom strat address |*/ | 106 | /*| unsigned short w_EepromStartAddress : Eeprom start address |*/ |
| 107 | /*+----------------------------------------------------------------------------+*/ | 107 | /*+----------------------------------------------------------------------------+*/ |
| 108 | /*| Output Parameters : unsigned short * pw_DataRead : Read data |*/ | 108 | /*| Output Parameters : unsigned short * pw_DataRead : Read data |*/ |
| 109 | /*+----------------------------------------------------------------------------+*/ | 109 | /*+----------------------------------------------------------------------------+*/ |
| @@ -849,7 +849,7 @@ int i_APCI3200_ReadDigitalOutput(struct comedi_device *dev, struct comedi_subdev | |||
| 849 | | 0:Single Read | 849 | | 0:Single Read |
| 850 | | 1:Read more channel | 850 | | 1:Read more channel |
| 851 | 2:Single scan | 851 | 2:Single scan |
| 852 | | 3:Continous Scan | 852 | | 3:Continuous Scan |
| 853 | data[13] :Number of channels to read | 853 | data[13] :Number of channels to read |
| 854 | | data[14] :RTD connection type | 854 | | data[14] :RTD connection type |
| 855 | :0:RTD not used | 855 | :0:RTD not used |
diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c index 766103c882ad..632d5d0721cd 100644 --- a/drivers/staging/comedi/drivers/adl_pci9118.c +++ b/drivers/staging/comedi/drivers/adl_pci9118.c | |||
| @@ -23,7 +23,7 @@ For AI: | |||
| 23 | - If cmd->scan_begin_src=TRIG_EXT then trigger input is TGIN (pin 46). | 23 | - If cmd->scan_begin_src=TRIG_EXT then trigger input is TGIN (pin 46). |
| 24 | - If cmd->convert_src=TRIG_EXT then trigger input is EXTTRG (pin 44). | 24 | - If cmd->convert_src=TRIG_EXT then trigger input is EXTTRG (pin 44). |
| 25 | - If cmd->start_src/stop_src=TRIG_EXT then trigger input is TGIN (pin 46). | 25 | - If cmd->start_src/stop_src=TRIG_EXT then trigger input is TGIN (pin 46). |
| 26 | - It is not neccessary to have cmd.scan_end_arg=cmd.chanlist_len but | 26 | - It is not necessary to have cmd.scan_end_arg=cmd.chanlist_len but |
| 27 | cmd.scan_end_arg modulo cmd.chanlist_len must by 0. | 27 | cmd.scan_end_arg modulo cmd.chanlist_len must by 0. |
| 28 | - If return value of cmdtest is 5 then you've bad channel list | 28 | - If return value of cmdtest is 5 then you've bad channel list |
| 29 | (it isn't possible mixture S.E. and DIFF inputs or bipolar and unipolar | 29 | (it isn't possible mixture S.E. and DIFF inputs or bipolar and unipolar |
| @@ -823,7 +823,7 @@ static void interrupt_pci9118_ai_dma(struct comedi_device *dev, | |||
| 823 | move_block_from_dma(dev, s, | 823 | move_block_from_dma(dev, s, |
| 824 | devpriv->dmabuf_virt[devpriv->dma_actbuf], | 824 | devpriv->dmabuf_virt[devpriv->dma_actbuf], |
| 825 | samplesinbuf); | 825 | samplesinbuf); |
| 826 | m = m - sampls; /* m= how many samples was transfered */ | 826 | m = m - sampls; /* m= how many samples was transferred */ |
| 827 | } | 827 | } |
| 828 | /* DPRINTK("YYY\n"); */ | 828 | /* DPRINTK("YYY\n"); */ |
| 829 | 829 | ||
| @@ -1297,7 +1297,7 @@ static int Compute_and_setup_dma(struct comedi_device *dev) | |||
| 1297 | DPRINTK("3 dmalen0=%d dmalen1=%d\n", dmalen0, dmalen1); | 1297 | DPRINTK("3 dmalen0=%d dmalen1=%d\n", dmalen0, dmalen1); |
| 1298 | /* transfer without TRIG_WAKE_EOS */ | 1298 | /* transfer without TRIG_WAKE_EOS */ |
| 1299 | if (!(devpriv->ai_flags & TRIG_WAKE_EOS)) { | 1299 | if (!(devpriv->ai_flags & TRIG_WAKE_EOS)) { |
| 1300 | /* if it's possible then allign DMA buffers to length of scan */ | 1300 | /* if it's possible then align DMA buffers to length of scan */ |
| 1301 | i = dmalen0; | 1301 | i = dmalen0; |
| 1302 | dmalen0 = | 1302 | dmalen0 = |
| 1303 | (dmalen0 / (devpriv->ai_n_realscanlen << 1)) * | 1303 | (dmalen0 / (devpriv->ai_n_realscanlen << 1)) * |
diff --git a/drivers/staging/comedi/drivers/adq12b.c b/drivers/staging/comedi/drivers/adq12b.c index 4b470000b69c..5361f318b010 100644 --- a/drivers/staging/comedi/drivers/adq12b.c +++ b/drivers/staging/comedi/drivers/adq12b.c | |||
| @@ -65,7 +65,7 @@ If you do not specify any options, they will default to | |||
| 65 | written by jeremy theler <thelerg@ib.cnea.gov.ar> | 65 | written by jeremy theler <thelerg@ib.cnea.gov.ar> |
| 66 | 66 | ||
| 67 | instituto balseiro | 67 | instituto balseiro |
| 68 | comision nacional de energia atomica | 68 | commission nacional de energia atomica |
| 69 | universidad nacional de cuyo | 69 | universidad nacional de cuyo |
| 70 | argentina | 70 | argentina |
| 71 | 71 | ||
| @@ -342,7 +342,7 @@ static int adq12b_ai_rinsn(struct comedi_device *dev, | |||
| 342 | /* convert n samples */ | 342 | /* convert n samples */ |
| 343 | for (n = 0; n < insn->n; n++) { | 343 | for (n = 0; n < insn->n; n++) { |
| 344 | 344 | ||
| 345 | /* wait for end of convertion */ | 345 | /* wait for end of conversion */ |
| 346 | i = 0; | 346 | i = 0; |
| 347 | do { | 347 | do { |
| 348 | /* udelay(1); */ | 348 | /* udelay(1); */ |
diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c index 466e69f94ef2..da2b75b15d4e 100644 --- a/drivers/staging/comedi/drivers/adv_pci1710.c +++ b/drivers/staging/comedi/drivers/adv_pci1710.c | |||
| @@ -98,7 +98,7 @@ Configuration options: | |||
| 98 | #define Status_FE 0x0100 /* 1=FIFO is empty */ | 98 | #define Status_FE 0x0100 /* 1=FIFO is empty */ |
| 99 | #define Status_FH 0x0200 /* 1=FIFO is half full */ | 99 | #define Status_FH 0x0200 /* 1=FIFO is half full */ |
| 100 | #define Status_FF 0x0400 /* 1=FIFO is full, fatal error */ | 100 | #define Status_FF 0x0400 /* 1=FIFO is full, fatal error */ |
| 101 | #define Status_IRQ 0x0800 /* 1=IRQ occured */ | 101 | #define Status_IRQ 0x0800 /* 1=IRQ occurred */ |
| 102 | /* bits from control register (PCI171x_CONTROL) */ | 102 | /* bits from control register (PCI171x_CONTROL) */ |
| 103 | #define Control_CNT0 0x0040 /* 1=CNT0 have external source, | 103 | #define Control_CNT0 0x0040 /* 1=CNT0 have external source, |
| 104 | * 0=have internal 100kHz source */ | 104 | * 0=have internal 100kHz source */ |
| @@ -1161,7 +1161,7 @@ static int check_channel_list(struct comedi_device *dev, | |||
| 1161 | } | 1161 | } |
| 1162 | 1162 | ||
| 1163 | if (n_chan > 1) { | 1163 | if (n_chan > 1) { |
| 1164 | chansegment[0] = chanlist[0]; /* first channel is everytime ok */ | 1164 | chansegment[0] = chanlist[0]; /* first channel is every time ok */ |
| 1165 | for (i = 1, seglen = 1; i < n_chan; i++, seglen++) { /* build part of chanlist */ | 1165 | for (i = 1, seglen = 1; i < n_chan; i++, seglen++) { /* build part of chanlist */ |
| 1166 | /* printk("%d. %d %d\n",i,CR_CHAN(chanlist[i]),CR_RANGE(chanlist[i])); */ | 1166 | /* printk("%d. %d %d\n",i,CR_CHAN(chanlist[i]),CR_RANGE(chanlist[i])); */ |
| 1167 | if (chanlist[0] == chanlist[i]) | 1167 | if (chanlist[0] == chanlist[i]) |
| @@ -1176,9 +1176,9 @@ static int check_channel_list(struct comedi_device *dev, | |||
| 1176 | (CR_CHAN(chansegment[i - 1]) + 1) % s->n_chan; | 1176 | (CR_CHAN(chansegment[i - 1]) + 1) % s->n_chan; |
| 1177 | if (CR_AREF(chansegment[i - 1]) == AREF_DIFF) | 1177 | if (CR_AREF(chansegment[i - 1]) == AREF_DIFF) |
| 1178 | nowmustbechan = (nowmustbechan + 1) % s->n_chan; | 1178 | nowmustbechan = (nowmustbechan + 1) % s->n_chan; |
| 1179 | if (nowmustbechan != CR_CHAN(chanlist[i])) { /* channel list isn't continous :-( */ | 1179 | if (nowmustbechan != CR_CHAN(chanlist[i])) { /* channel list isn't continuous :-( */ |
| 1180 | printk | 1180 | printk |
| 1181 | ("channel list must be continous! chanlist[%i]=%d but must be %d or %d!\n", | 1181 | ("channel list must be continuous! chanlist[%i]=%d but must be %d or %d!\n", |
| 1182 | i, CR_CHAN(chanlist[i]), nowmustbechan, | 1182 | i, CR_CHAN(chanlist[i]), nowmustbechan, |
| 1183 | CR_CHAN(chanlist[0])); | 1183 | CR_CHAN(chanlist[0])); |
| 1184 | return 0; | 1184 | return 0; |
diff --git a/drivers/staging/comedi/drivers/cb_pcidas.c b/drivers/staging/comedi/drivers/cb_pcidas.c index 0941643b3869..61968a505f24 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas.c +++ b/drivers/staging/comedi/drivers/cb_pcidas.c | |||
| @@ -115,7 +115,7 @@ analog triggering on 1602 series | |||
| 115 | #define INT_MASK 0x3 /* mask of interrupt select bits */ | 115 | #define INT_MASK 0x3 /* mask of interrupt select bits */ |
| 116 | #define INTE 0x4 /* interrupt enable */ | 116 | #define INTE 0x4 /* interrupt enable */ |
| 117 | #define DAHFIE 0x8 /* dac half full interrupt enable */ | 117 | #define DAHFIE 0x8 /* dac half full interrupt enable */ |
| 118 | #define EOAIE 0x10 /* end of aquisition interrupt enable */ | 118 | #define EOAIE 0x10 /* end of acquisition interrupt enable */ |
| 119 | #define DAHFI 0x20 /* dac half full read status / write interrupt clear */ | 119 | #define DAHFI 0x20 /* dac half full read status / write interrupt clear */ |
| 120 | #define EOAI 0x40 /* read end of acq. interrupt status / write clear */ | 120 | #define EOAI 0x40 /* read end of acq. interrupt status / write clear */ |
| 121 | #define INT 0x80 /* read interrupt status / write clear */ | 121 | #define INT 0x80 /* read interrupt status / write clear */ |
| @@ -440,7 +440,7 @@ struct cb_pcidas_private { | |||
| 440 | unsigned int divisor1; | 440 | unsigned int divisor1; |
| 441 | unsigned int divisor2; | 441 | unsigned int divisor2; |
| 442 | volatile unsigned int count; /* number of analog input samples remaining */ | 442 | volatile unsigned int count; /* number of analog input samples remaining */ |
| 443 | volatile unsigned int adc_fifo_bits; /* bits to write to interupt/adcfifo register */ | 443 | volatile unsigned int adc_fifo_bits; /* bits to write to interrupt/adcfifo register */ |
| 444 | volatile unsigned int s5933_intcsr_bits; /* bits to write to amcc s5933 interrupt control/status register */ | 444 | volatile unsigned int s5933_intcsr_bits; /* bits to write to amcc s5933 interrupt control/status register */ |
| 445 | volatile unsigned int ao_control_bits; /* bits to write to ao control and status register */ | 445 | volatile unsigned int ao_control_bits; /* bits to write to ao control and status register */ |
| 446 | short ai_buffer[AI_BUFFER_SIZE]; | 446 | short ai_buffer[AI_BUFFER_SIZE]; |
| @@ -1653,7 +1653,7 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d) | |||
| 1653 | spin_unlock_irqrestore(&dev->spinlock, flags); | 1653 | spin_unlock_irqrestore(&dev->spinlock, flags); |
| 1654 | } else if (status & EOAI) { | 1654 | } else if (status & EOAI) { |
| 1655 | comedi_error(dev, | 1655 | comedi_error(dev, |
| 1656 | "bug! encountered end of aquisition interrupt?"); | 1656 | "bug! encountered end of acquisition interrupt?"); |
| 1657 | /* clear EOA interrupt latch */ | 1657 | /* clear EOA interrupt latch */ |
| 1658 | spin_lock_irqsave(&dev->spinlock, flags); | 1658 | spin_lock_irqsave(&dev->spinlock, flags); |
| 1659 | outw(devpriv->adc_fifo_bits | EOAI, | 1659 | outw(devpriv->adc_fifo_bits | EOAI, |
diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c index 2583e16cd02a..1e324198996c 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas64.c +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c | |||
| @@ -104,7 +104,7 @@ TODO: | |||
| 104 | #endif | 104 | #endif |
| 105 | 105 | ||
| 106 | #define TIMER_BASE 25 /* 40MHz master clock */ | 106 | #define TIMER_BASE 25 /* 40MHz master clock */ |
| 107 | #define PRESCALED_TIMER_BASE 10000 /* 100kHz 'prescaled' clock for slow aquisition, maybe I'll support this someday */ | 107 | #define PRESCALED_TIMER_BASE 10000 /* 100kHz 'prescaled' clock for slow acquisition, maybe I'll support this someday */ |
| 108 | #define DMA_BUFFER_SIZE 0x1000 | 108 | #define DMA_BUFFER_SIZE 0x1000 |
| 109 | 109 | ||
| 110 | #define PCI_VENDOR_ID_COMPUTERBOARDS 0x1307 | 110 | #define PCI_VENDOR_ID_COMPUTERBOARDS 0x1307 |
| @@ -136,7 +136,7 @@ enum write_only_registers { | |||
| 136 | ADC_DELAY_INTERVAL_UPPER_REG = 0x1c, /* upper 8 bits of delay interval counter */ | 136 | ADC_DELAY_INTERVAL_UPPER_REG = 0x1c, /* upper 8 bits of delay interval counter */ |
| 137 | ADC_COUNT_LOWER_REG = 0x1e, /* lower 16 bits of hardware conversion/scan counter */ | 137 | ADC_COUNT_LOWER_REG = 0x1e, /* lower 16 bits of hardware conversion/scan counter */ |
| 138 | ADC_COUNT_UPPER_REG = 0x20, /* upper 8 bits of hardware conversion/scan counter */ | 138 | ADC_COUNT_UPPER_REG = 0x20, /* upper 8 bits of hardware conversion/scan counter */ |
| 139 | ADC_START_REG = 0x22, /* software trigger to start aquisition */ | 139 | ADC_START_REG = 0x22, /* software trigger to start acquisition */ |
| 140 | ADC_CONVERT_REG = 0x24, /* initiates single conversion */ | 140 | ADC_CONVERT_REG = 0x24, /* initiates single conversion */ |
| 141 | ADC_QUEUE_CLEAR_REG = 0x26, /* clears adc queue */ | 141 | ADC_QUEUE_CLEAR_REG = 0x26, /* clears adc queue */ |
| 142 | ADC_QUEUE_LOAD_REG = 0x28, /* loads adc queue */ | 142 | ADC_QUEUE_LOAD_REG = 0x28, /* loads adc queue */ |
| @@ -199,7 +199,7 @@ enum intr_enable_contents { | |||
| 199 | ADC_INTR_EOSCAN_BITS = 0x2, /* interrupt end of scan */ | 199 | ADC_INTR_EOSCAN_BITS = 0x2, /* interrupt end of scan */ |
| 200 | ADC_INTR_EOSEQ_BITS = 0x3, /* interrupt end of sequence (probably wont use this it's pretty fancy) */ | 200 | ADC_INTR_EOSEQ_BITS = 0x3, /* interrupt end of sequence (probably wont use this it's pretty fancy) */ |
| 201 | EN_ADC_INTR_SRC_BIT = 0x4, /* enable adc interrupt source */ | 201 | EN_ADC_INTR_SRC_BIT = 0x4, /* enable adc interrupt source */ |
| 202 | EN_ADC_DONE_INTR_BIT = 0x8, /* enable adc aquisition done interrupt */ | 202 | EN_ADC_DONE_INTR_BIT = 0x8, /* enable adc acquisition done interrupt */ |
| 203 | DAC_INTR_SRC_MASK = 0x30, | 203 | DAC_INTR_SRC_MASK = 0x30, |
| 204 | DAC_INTR_QEMPTY_BITS = 0x0, | 204 | DAC_INTR_QEMPTY_BITS = 0x0, |
| 205 | DAC_INTR_HIGH_CHAN_BITS = 0x10, | 205 | DAC_INTR_HIGH_CHAN_BITS = 0x10, |
| @@ -2867,7 +2867,7 @@ static int ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) | |||
| 2867 | 2867 | ||
| 2868 | spin_unlock_irqrestore(&dev->spinlock, flags); | 2868 | spin_unlock_irqrestore(&dev->spinlock, flags); |
| 2869 | 2869 | ||
| 2870 | /* start aquisition */ | 2870 | /* start acquisition */ |
| 2871 | if (cmd->start_src == TRIG_NOW) { | 2871 | if (cmd->start_src == TRIG_NOW) { |
| 2872 | writew(0, priv(dev)->main_iobase + ADC_START_REG); | 2872 | writew(0, priv(dev)->main_iobase + ADC_START_REG); |
| 2873 | DEBUG_PRINT("soft trig\n"); | 2873 | DEBUG_PRINT("soft trig\n"); |
| @@ -2942,7 +2942,7 @@ static void pio_drain_ai_fifo_16(struct comedi_device *dev) | |||
| 2942 | /* Read from 32 bit wide ai fifo of 4020 - deal with insane grey coding of pointers. | 2942 | /* Read from 32 bit wide ai fifo of 4020 - deal with insane grey coding of pointers. |
| 2943 | * The pci-4020 hardware only supports | 2943 | * The pci-4020 hardware only supports |
| 2944 | * dma transfers (it only supports the use of pio for draining the last remaining | 2944 | * dma transfers (it only supports the use of pio for draining the last remaining |
| 2945 | * points from the fifo when a data aquisition operation has completed). | 2945 | * points from the fifo when a data acquisition operation has completed). |
| 2946 | */ | 2946 | */ |
| 2947 | static void pio_drain_ai_fifo_32(struct comedi_device *dev) | 2947 | static void pio_drain_ai_fifo_32(struct comedi_device *dev) |
| 2948 | { | 2948 | { |
| @@ -3046,7 +3046,7 @@ static void handle_ai_interrupt(struct comedi_device *dev, | |||
| 3046 | comedi_error(dev, "fifo overrun"); | 3046 | comedi_error(dev, "fifo overrun"); |
| 3047 | async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR; | 3047 | async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR; |
| 3048 | } | 3048 | } |
| 3049 | /* spin lock makes sure noone else changes plx dma control reg */ | 3049 | /* spin lock makes sure no one else changes plx dma control reg */ |
| 3050 | spin_lock_irqsave(&dev->spinlock, flags); | 3050 | spin_lock_irqsave(&dev->spinlock, flags); |
| 3051 | dma1_status = readb(priv(dev)->plx9080_iobase + PLX_DMA1_CS_REG); | 3051 | dma1_status = readb(priv(dev)->plx9080_iobase + PLX_DMA1_CS_REG); |
| 3052 | if (plx_status & ICS_DMA1_A) { /* dma chan 1 interrupt */ | 3052 | if (plx_status & ICS_DMA1_A) { /* dma chan 1 interrupt */ |
| @@ -3170,7 +3170,7 @@ static void handle_ao_interrupt(struct comedi_device *dev, | |||
| 3170 | async = s->async; | 3170 | async = s->async; |
| 3171 | cmd = &async->cmd; | 3171 | cmd = &async->cmd; |
| 3172 | 3172 | ||
| 3173 | /* spin lock makes sure noone else changes plx dma control reg */ | 3173 | /* spin lock makes sure no one else changes plx dma control reg */ |
| 3174 | spin_lock_irqsave(&dev->spinlock, flags); | 3174 | spin_lock_irqsave(&dev->spinlock, flags); |
| 3175 | dma0_status = readb(priv(dev)->plx9080_iobase + PLX_DMA0_CS_REG); | 3175 | dma0_status = readb(priv(dev)->plx9080_iobase + PLX_DMA0_CS_REG); |
| 3176 | if (plx_status & ICS_DMA0_A) { /* dma chan 0 interrupt */ | 3176 | if (plx_status & ICS_DMA0_A) { /* dma chan 0 interrupt */ |
diff --git a/drivers/staging/comedi/drivers/comedi_test.c b/drivers/staging/comedi/drivers/comedi_test.c index b220b3055412..a804742b8022 100644 --- a/drivers/staging/comedi/drivers/comedi_test.c +++ b/drivers/staging/comedi/drivers/comedi_test.c | |||
| @@ -81,7 +81,7 @@ static const struct waveform_board waveform_boards[] = { | |||
| 81 | /* Data unique to this driver */ | 81 | /* Data unique to this driver */ |
| 82 | struct waveform_private { | 82 | struct waveform_private { |
| 83 | struct timer_list timer; | 83 | struct timer_list timer; |
| 84 | struct timeval last; /* time at which last timer interrupt occured */ | 84 | struct timeval last; /* time at which last timer interrupt occurred */ |
| 85 | unsigned int uvolt_amplitude; /* waveform amplitude in microvolts */ | 85 | unsigned int uvolt_amplitude; /* waveform amplitude in microvolts */ |
| 86 | unsigned long usec_period; /* waveform period in microseconds */ | 86 | unsigned long usec_period; /* waveform period in microseconds */ |
| 87 | unsigned long usec_current; /* current time (modulo waveform period) */ | 87 | unsigned long usec_current; /* current time (modulo waveform period) */ |
diff --git a/drivers/staging/comedi/drivers/das1800.c b/drivers/staging/comedi/drivers/das1800.c index 6ea93f9c0b48..60c2b12d6ffb 100644 --- a/drivers/staging/comedi/drivers/das1800.c +++ b/drivers/staging/comedi/drivers/das1800.c | |||
| @@ -1087,7 +1087,7 @@ static void das1800_flush_dma_channel(struct comedi_device *dev, | |||
| 1087 | return; | 1087 | return; |
| 1088 | } | 1088 | } |
| 1089 | 1089 | ||
| 1090 | /* flushes remaining data from board when external trigger has stopped aquisition | 1090 | /* flushes remaining data from board when external trigger has stopped acquisition |
| 1091 | * and we are using dma transfers */ | 1091 | * and we are using dma transfers */ |
| 1092 | static void das1800_flush_dma(struct comedi_device *dev, | 1092 | static void das1800_flush_dma(struct comedi_device *dev, |
| 1093 | struct comedi_subdevice *s) | 1093 | struct comedi_subdevice *s) |
diff --git a/drivers/staging/comedi/drivers/das800.c b/drivers/staging/comedi/drivers/das800.c index aecaedc5027e..96d41ad76956 100644 --- a/drivers/staging/comedi/drivers/das800.c +++ b/drivers/staging/comedi/drivers/das800.c | |||
| @@ -391,7 +391,7 @@ static irqreturn_t das800_interrupt(int irq, void *d) | |||
| 391 | spin_lock_irqsave(&dev->spinlock, irq_flags); | 391 | spin_lock_irqsave(&dev->spinlock, irq_flags); |
| 392 | outb(CONTROL1, dev->iobase + DAS800_GAIN); /* select base address + 7 to be STATUS2 register */ | 392 | outb(CONTROL1, dev->iobase + DAS800_GAIN); /* select base address + 7 to be STATUS2 register */ |
| 393 | status = inb(dev->iobase + DAS800_STATUS2) & STATUS2_HCEN; | 393 | status = inb(dev->iobase + DAS800_STATUS2) & STATUS2_HCEN; |
| 394 | /* don't release spinlock yet since we want to make sure noone else disables hardware conversions */ | 394 | /* don't release spinlock yet since we want to make sure no one else disables hardware conversions */ |
| 395 | if (status == 0) { | 395 | if (status == 0) { |
| 396 | spin_unlock_irqrestore(&dev->spinlock, irq_flags); | 396 | spin_unlock_irqrestore(&dev->spinlock, irq_flags); |
| 397 | return IRQ_HANDLED; | 397 | return IRQ_HANDLED; |
diff --git a/drivers/staging/comedi/drivers/dmm32at.c b/drivers/staging/comedi/drivers/dmm32at.c index 693728e14bdb..2b4e6e6eb825 100644 --- a/drivers/staging/comedi/drivers/dmm32at.c +++ b/drivers/staging/comedi/drivers/dmm32at.c | |||
| @@ -532,7 +532,7 @@ static int dmm32at_ai_rinsn(struct comedi_device *dev, | |||
| 532 | msb = dmm_inb(dev, DMM32AT_AIMSB); | 532 | msb = dmm_inb(dev, DMM32AT_AIMSB); |
| 533 | 533 | ||
| 534 | /* invert sign bit to make range unsigned, this is an | 534 | /* invert sign bit to make range unsigned, this is an |
| 535 | idiosyncracy of the diamond board, it return | 535 | idiosyncrasy of the diamond board, it return |
| 536 | conversions as a signed value, i.e. -32768 to | 536 | conversions as a signed value, i.e. -32768 to |
| 537 | 32767, flipping the bit and interpreting it as | 537 | 32767, flipping the bit and interpreting it as |
| 538 | signed gives you a range of 0 to 65535 which is | 538 | signed gives you a range of 0 to 65535 which is |
diff --git a/drivers/staging/comedi/drivers/dt2811.c b/drivers/staging/comedi/drivers/dt2811.c index a1664caa1d96..0131d5225b52 100644 --- a/drivers/staging/comedi/drivers/dt2811.c +++ b/drivers/staging/comedi/drivers/dt2811.c | |||
| @@ -560,7 +560,7 @@ int dt2811_adtrig(kdev_t minor, comedi_adtrig *adtrig) | |||
| 560 | switch (dev->i_admode) { | 560 | switch (dev->i_admode) { |
| 561 | case COMEDI_MDEMAND: | 561 | case COMEDI_MDEMAND: |
| 562 | dev->ntrig = adtrig->n - 1; | 562 | dev->ntrig = adtrig->n - 1; |
| 563 | /* not neccessary */ | 563 | /* not necessary */ |
| 564 | /*printk("dt2811: AD soft trigger\n"); */ | 564 | /*printk("dt2811: AD soft trigger\n"); */ |
| 565 | /*outb(DT2811_CLRERROR|DT2811_INTENB, | 565 | /*outb(DT2811_CLRERROR|DT2811_INTENB, |
| 566 | dev->iobase+DT2811_ADCSR); */ | 566 | dev->iobase+DT2811_ADCSR); */ |
diff --git a/drivers/staging/comedi/drivers/dt9812.c b/drivers/staging/comedi/drivers/dt9812.c index 06059850dae2..32d9c42e9659 100644 --- a/drivers/staging/comedi/drivers/dt9812.c +++ b/drivers/staging/comedi/drivers/dt9812.c | |||
| @@ -773,7 +773,7 @@ static int dt9812_probe(struct usb_interface *interface, | |||
| 773 | retval = dt9812_read_info(dev, 1, &fw, sizeof(fw)); | 773 | retval = dt9812_read_info(dev, 1, &fw, sizeof(fw)); |
| 774 | if (retval == 0) { | 774 | if (retval == 0) { |
| 775 | dev_info(&interface->dev, | 775 | dev_info(&interface->dev, |
| 776 | "usb_reset_configuration succeded " | 776 | "usb_reset_configuration succeeded " |
| 777 | "after %d iterations\n", i); | 777 | "after %d iterations\n", i); |
| 778 | break; | 778 | break; |
| 779 | } | 779 | } |
diff --git a/drivers/staging/comedi/drivers/gsc_hpdi.c b/drivers/staging/comedi/drivers/gsc_hpdi.c index 1661b57ca2ad..bc020dea141b 100644 --- a/drivers/staging/comedi/drivers/gsc_hpdi.c +++ b/drivers/staging/comedi/drivers/gsc_hpdi.c | |||
| @@ -1031,7 +1031,7 @@ static irqreturn_t handle_interrupt(int irq, void *d) | |||
| 1031 | writel(hpdi_intr_status, | 1031 | writel(hpdi_intr_status, |
| 1032 | priv(dev)->hpdi_iobase + INTERRUPT_STATUS_REG); | 1032 | priv(dev)->hpdi_iobase + INTERRUPT_STATUS_REG); |
| 1033 | } | 1033 | } |
| 1034 | /* spin lock makes sure noone else changes plx dma control reg */ | 1034 | /* spin lock makes sure no one else changes plx dma control reg */ |
| 1035 | spin_lock_irqsave(&dev->spinlock, flags); | 1035 | spin_lock_irqsave(&dev->spinlock, flags); |
| 1036 | dma0_status = readb(priv(dev)->plx9080_iobase + PLX_DMA0_CS_REG); | 1036 | dma0_status = readb(priv(dev)->plx9080_iobase + PLX_DMA0_CS_REG); |
| 1037 | if (plx_status & ICS_DMA0_A) { /* dma chan 0 interrupt */ | 1037 | if (plx_status & ICS_DMA0_A) { /* dma chan 0 interrupt */ |
| @@ -1045,7 +1045,7 @@ static irqreturn_t handle_interrupt(int irq, void *d) | |||
| 1045 | } | 1045 | } |
| 1046 | spin_unlock_irqrestore(&dev->spinlock, flags); | 1046 | spin_unlock_irqrestore(&dev->spinlock, flags); |
| 1047 | 1047 | ||
| 1048 | /* spin lock makes sure noone else changes plx dma control reg */ | 1048 | /* spin lock makes sure no one else changes plx dma control reg */ |
| 1049 | spin_lock_irqsave(&dev->spinlock, flags); | 1049 | spin_lock_irqsave(&dev->spinlock, flags); |
| 1050 | dma1_status = readb(priv(dev)->plx9080_iobase + PLX_DMA1_CS_REG); | 1050 | dma1_status = readb(priv(dev)->plx9080_iobase + PLX_DMA1_CS_REG); |
| 1051 | if (plx_status & ICS_DMA1_A) { /* XXX *//* dma chan 1 interrupt */ | 1051 | if (plx_status & ICS_DMA1_A) { /* XXX *//* dma chan 1 interrupt */ |
diff --git a/drivers/staging/comedi/drivers/icp_multi.c b/drivers/staging/comedi/drivers/icp_multi.c index 0bab39b3409b..126550f3c02b 100644 --- a/drivers/staging/comedi/drivers/icp_multi.c +++ b/drivers/staging/comedi/drivers/icp_multi.c | |||
| @@ -715,7 +715,7 @@ Description: | |||
| 715 | is built correctly | 715 | is built correctly |
| 716 | 716 | ||
| 717 | Parameters: | 717 | Parameters: |
| 718 | struct comedi_device *dev Pointer to current sevice structure | 718 | struct comedi_device *dev Pointer to current service structure |
| 719 | struct comedi_subdevice *s Pointer to current subdevice structure | 719 | struct comedi_subdevice *s Pointer to current subdevice structure |
| 720 | unsigned int *chanlist Pointer to packed channel list | 720 | unsigned int *chanlist Pointer to packed channel list |
| 721 | unsigned int n_chan Number of channels to scan | 721 | unsigned int n_chan Number of channels to scan |
| @@ -772,7 +772,7 @@ Description: | |||
| 772 | Status register. | 772 | Status register. |
| 773 | 773 | ||
| 774 | Parameters: | 774 | Parameters: |
| 775 | struct comedi_device *dev Pointer to current sevice structure | 775 | struct comedi_device *dev Pointer to current service structure |
| 776 | struct comedi_subdevice *s Pointer to current subdevice structure | 776 | struct comedi_subdevice *s Pointer to current subdevice structure |
| 777 | unsigned int *chanlist Pointer to packed channel list | 777 | unsigned int *chanlist Pointer to packed channel list |
| 778 | unsigned int n_chan Number of channels to scan | 778 | unsigned int n_chan Number of channels to scan |
| @@ -848,7 +848,7 @@ Description: | |||
| 848 | This function resets the icp multi device to a 'safe' state | 848 | This function resets the icp multi device to a 'safe' state |
| 849 | 849 | ||
| 850 | Parameters: | 850 | Parameters: |
| 851 | struct comedi_device *dev Pointer to current sevice structure | 851 | struct comedi_device *dev Pointer to current service structure |
| 852 | 852 | ||
| 853 | Returns:int 0 = success | 853 | Returns:int 0 = success |
| 854 | 854 | ||
diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c index 75511bae0191..b692fea0d2b0 100644 --- a/drivers/staging/comedi/drivers/me4000.c +++ b/drivers/staging/comedi/drivers/me4000.c | |||
| @@ -1810,7 +1810,7 @@ static irqreturn_t me4000_ai_isr(int irq, void *dev_id) | |||
| 1810 | ai_context->irq_status_reg) & | 1810 | ai_context->irq_status_reg) & |
| 1811 | ME4000_IRQ_STATUS_BIT_AI_HF) { | 1811 | ME4000_IRQ_STATUS_BIT_AI_HF) { |
| 1812 | ISR_PDEBUG | 1812 | ISR_PDEBUG |
| 1813 | ("me4000_ai_isr(): Fifo half full interrupt occured\n"); | 1813 | ("me4000_ai_isr(): Fifo half full interrupt occurred\n"); |
| 1814 | 1814 | ||
| 1815 | /* Read status register to find out what happened */ | 1815 | /* Read status register to find out what happened */ |
| 1816 | tmp = me4000_inl(dev, ai_context->ctrl_reg); | 1816 | tmp = me4000_inl(dev, ai_context->ctrl_reg); |
| @@ -1903,7 +1903,7 @@ static irqreturn_t me4000_ai_isr(int irq, void *dev_id) | |||
| 1903 | if (me4000_inl(dev, | 1903 | if (me4000_inl(dev, |
| 1904 | ai_context->irq_status_reg) & ME4000_IRQ_STATUS_BIT_SC) { | 1904 | ai_context->irq_status_reg) & ME4000_IRQ_STATUS_BIT_SC) { |
| 1905 | ISR_PDEBUG | 1905 | ISR_PDEBUG |
| 1906 | ("me4000_ai_isr(): Sample counter interrupt occured\n"); | 1906 | ("me4000_ai_isr(): Sample counter interrupt occurred\n"); |
| 1907 | 1907 | ||
| 1908 | s->async->events |= COMEDI_CB_BLOCK | COMEDI_CB_EOA; | 1908 | s->async->events |= COMEDI_CB_BLOCK | COMEDI_CB_EOA; |
| 1909 | 1909 | ||
diff --git a/drivers/staging/comedi/drivers/mpc624.c b/drivers/staging/comedi/drivers/mpc624.c index a89eebd23f65..dd09a6d46e5c 100644 --- a/drivers/staging/comedi/drivers/mpc624.c +++ b/drivers/staging/comedi/drivers/mpc624.c | |||
| @@ -39,8 +39,8 @@ Status: working | |||
| 39 | 39 | ||
| 40 | Configuration Options: | 40 | Configuration Options: |
| 41 | [0] - I/O base address | 41 | [0] - I/O base address |
| 42 | [1] - convertion rate | 42 | [1] - conversion rate |
| 43 | Convertion rate RMS noise Effective Number Of Bits | 43 | Conversion rate RMS noise Effective Number Of Bits |
| 44 | 0 3.52kHz 23uV 17 | 44 | 0 3.52kHz 23uV 17 |
| 45 | 1 1.76kHz 3.5uV 20 | 45 | 1 1.76kHz 3.5uV 20 |
| 46 | 2 880Hz 2uV 21.3 | 46 | 2 880Hz 2uV 21.3 |
| @@ -93,8 +93,8 @@ Configuration Options: | |||
| 93 | #define MPC624_DMY_BIT (1<<30) | 93 | #define MPC624_DMY_BIT (1<<30) |
| 94 | #define MPC624_SGN_BIT (1<<29) | 94 | #define MPC624_SGN_BIT (1<<29) |
| 95 | 95 | ||
| 96 | /* Convertion speeds */ | 96 | /* Conversion speeds */ |
| 97 | /* OSR4 OSR3 OSR2 OSR1 OSR0 Convertion rate RMS noise ENOB^ | 97 | /* OSR4 OSR3 OSR2 OSR1 OSR0 Conversion rate RMS noise ENOB^ |
| 98 | * X 0 0 0 1 3.52kHz 23uV 17 | 98 | * X 0 0 0 1 3.52kHz 23uV 17 |
| 99 | * X 0 0 1 0 1.76kHz 3.5uV 20 | 99 | * X 0 0 1 0 1.76kHz 3.5uV 20 |
| 100 | * X 0 0 1 1 880Hz 2uV 21.3 | 100 | * X 0 0 1 1 880Hz 2uV 21.3 |
| @@ -227,7 +227,7 @@ static int mpc624_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
| 227 | break; | 227 | break; |
| 228 | default: | 228 | default: |
| 229 | printk | 229 | printk |
| 230 | (KERN_ERR "illegal convertion rate setting!" | 230 | (KERN_ERR "illegal conversion rate setting!" |
| 231 | " Valid numbers are 0..9. Using 9 => 6.875 Hz, "); | 231 | " Valid numbers are 0..9. Using 9 => 6.875 Hz, "); |
| 232 | devpriv->ulConvertionRate = MPC624_SPEED_3_52_kHz; | 232 | devpriv->ulConvertionRate = MPC624_SPEED_3_52_kHz; |
| 233 | } | 233 | } |
| @@ -296,7 +296,7 @@ static int mpc624_ai_rinsn(struct comedi_device *dev, | |||
| 296 | } | 296 | } |
| 297 | 297 | ||
| 298 | for (n = 0; n < insn->n; n++) { | 298 | for (n = 0; n < insn->n; n++) { |
| 299 | /* Trigger the convertion */ | 299 | /* Trigger the conversion */ |
| 300 | outb(MPC624_ADSCK, dev->iobase + MPC624_ADC); | 300 | outb(MPC624_ADSCK, dev->iobase + MPC624_ADC); |
| 301 | udelay(1); | 301 | udelay(1); |
| 302 | outb(MPC624_ADCS | MPC624_ADSCK, dev->iobase + MPC624_ADC); | 302 | outb(MPC624_ADCS | MPC624_ADSCK, dev->iobase + MPC624_ADC); |
| @@ -304,7 +304,7 @@ static int mpc624_ai_rinsn(struct comedi_device *dev, | |||
| 304 | outb(0, dev->iobase + MPC624_ADC); | 304 | outb(0, dev->iobase + MPC624_ADC); |
| 305 | udelay(1); | 305 | udelay(1); |
| 306 | 306 | ||
| 307 | /* Wait for the convertion to end */ | 307 | /* Wait for the conversion to end */ |
| 308 | for (i = 0; i < TIMEOUT; i++) { | 308 | for (i = 0; i < TIMEOUT; i++) { |
| 309 | ucPort = inb(dev->iobase + MPC624_ADC); | 309 | ucPort = inb(dev->iobase + MPC624_ADC); |
| 310 | if (ucPort & MPC624_ADBUSY) | 310 | if (ucPort & MPC624_ADBUSY) |
diff --git a/drivers/staging/comedi/drivers/ni_at_a2150.c b/drivers/staging/comedi/drivers/ni_at_a2150.c index 4d0053ea2465..c192b71ec04f 100644 --- a/drivers/staging/comedi/drivers/ni_at_a2150.c +++ b/drivers/staging/comedi/drivers/ni_at_a2150.c | |||
| @@ -104,10 +104,10 @@ TRIG_WAKE_EOS | |||
| 104 | #define STATUS_REG 0x12 /* read only */ | 104 | #define STATUS_REG 0x12 /* read only */ |
| 105 | #define FNE_BIT 0x1 /* fifo not empty */ | 105 | #define FNE_BIT 0x1 /* fifo not empty */ |
| 106 | #define OVFL_BIT 0x8 /* fifo overflow */ | 106 | #define OVFL_BIT 0x8 /* fifo overflow */ |
| 107 | #define EDAQ_BIT 0x10 /* end of aquisition interrupt */ | 107 | #define EDAQ_BIT 0x10 /* end of acquisition interrupt */ |
| 108 | #define DCAL_BIT 0x20 /* offset calibration in progress */ | 108 | #define DCAL_BIT 0x20 /* offset calibration in progress */ |
| 109 | #define INTR_BIT 0x40 /* interrupt has occured */ | 109 | #define INTR_BIT 0x40 /* interrupt has occurred */ |
| 110 | #define DMA_TC_BIT 0x80 /* dma terminal count interrupt has occured */ | 110 | #define DMA_TC_BIT 0x80 /* dma terminal count interrupt has occurred */ |
| 111 | #define ID_BITS(x) (((x) >> 8) & 0x3) | 111 | #define ID_BITS(x) (((x) >> 8) & 0x3) |
| 112 | #define IRQ_DMA_CNTRL_REG 0x12 /* write only */ | 112 | #define IRQ_DMA_CNTRL_REG 0x12 /* write only */ |
| 113 | #define DMA_CHAN_BITS(x) ((x) & 0x7) /* sets dma channel */ | 113 | #define DMA_CHAN_BITS(x) ((x) & 0x7) /* sets dma channel */ |
| @@ -434,7 +434,7 @@ static int a2150_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
| 434 | s->cancel = a2150_cancel; | 434 | s->cancel = a2150_cancel; |
| 435 | 435 | ||
| 436 | /* need to do this for software counting of completed conversions, to | 436 | /* need to do this for software counting of completed conversions, to |
| 437 | * prevent hardware count from stopping aquisition */ | 437 | * prevent hardware count from stopping acquisition */ |
| 438 | outw(HW_COUNT_DISABLE, dev->iobase + I8253_MODE_REG); | 438 | outw(HW_COUNT_DISABLE, dev->iobase + I8253_MODE_REG); |
| 439 | 439 | ||
| 440 | /* set card's irq and dma levels */ | 440 | /* set card's irq and dma levels */ |
| @@ -729,7 +729,7 @@ static int a2150_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) | |||
| 729 | /* send trigger config bits */ | 729 | /* send trigger config bits */ |
| 730 | outw(trigger_bits, dev->iobase + TRIGGER_REG); | 730 | outw(trigger_bits, dev->iobase + TRIGGER_REG); |
| 731 | 731 | ||
| 732 | /* start aquisition for soft trigger */ | 732 | /* start acquisition for soft trigger */ |
| 733 | if (cmd->start_src == TRIG_NOW) { | 733 | if (cmd->start_src == TRIG_NOW) { |
| 734 | outw(0, dev->iobase + FIFO_START_REG); | 734 | outw(0, dev->iobase + FIFO_START_REG); |
| 735 | } | 735 | } |
| @@ -768,7 +768,7 @@ static int a2150_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s, | |||
| 768 | /* setup start triggering */ | 768 | /* setup start triggering */ |
| 769 | outw(0, dev->iobase + TRIGGER_REG); | 769 | outw(0, dev->iobase + TRIGGER_REG); |
| 770 | 770 | ||
| 771 | /* start aquisition for soft trigger */ | 771 | /* start acquisition for soft trigger */ |
| 772 | outw(0, dev->iobase + FIFO_START_REG); | 772 | outw(0, dev->iobase + FIFO_START_REG); |
| 773 | 773 | ||
| 774 | /* there is a 35.6 sample delay for data to get through the antialias filter */ | 774 | /* there is a 35.6 sample delay for data to get through the antialias filter */ |
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index 241fe525abf0..ab8f37022a3c 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c | |||
| @@ -183,11 +183,11 @@ NI manuals: | |||
| 183 | #define OVERRUN_BIT 0x2 | 183 | #define OVERRUN_BIT 0x2 |
| 184 | /* fifo overflow */ | 184 | /* fifo overflow */ |
| 185 | #define OVERFLOW_BIT 0x4 | 185 | #define OVERFLOW_BIT 0x4 |
| 186 | /* timer interrupt has occured */ | 186 | /* timer interrupt has occurred */ |
| 187 | #define TIMER_BIT 0x8 | 187 | #define TIMER_BIT 0x8 |
| 188 | /* dma terminal count has occured */ | 188 | /* dma terminal count has occurred */ |
| 189 | #define DMATC_BIT 0x10 | 189 | #define DMATC_BIT 0x10 |
| 190 | /* external trigger has occured */ | 190 | /* external trigger has occurred */ |
| 191 | #define EXT_TRIG_BIT 0x40 | 191 | #define EXT_TRIG_BIT 0x40 |
| 192 | /* 1200 boards only */ | 192 | /* 1200 boards only */ |
| 193 | #define STATUS2_REG 0x1d | 193 | #define STATUS2_REG 0x1d |
| @@ -1149,7 +1149,7 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) | |||
| 1149 | range = CR_RANGE(cmd->chanlist[0]); | 1149 | range = CR_RANGE(cmd->chanlist[0]); |
| 1150 | aref = CR_AREF(cmd->chanlist[0]); | 1150 | aref = CR_AREF(cmd->chanlist[0]); |
| 1151 | 1151 | ||
| 1152 | /* make sure board is disabled before setting up aquisition */ | 1152 | /* make sure board is disabled before setting up acquisition */ |
| 1153 | spin_lock_irqsave(&dev->spinlock, flags); | 1153 | spin_lock_irqsave(&dev->spinlock, flags); |
| 1154 | devpriv->command2_bits &= ~SWTRIG_BIT & ~HWTRIG_BIT & ~PRETRIG_BIT; | 1154 | devpriv->command2_bits &= ~SWTRIG_BIT & ~HWTRIG_BIT & ~PRETRIG_BIT; |
| 1155 | devpriv->write_byte(devpriv->command2_bits, dev->iobase + COMMAND2_REG); | 1155 | devpriv->write_byte(devpriv->command2_bits, dev->iobase + COMMAND2_REG); |
| @@ -1349,7 +1349,7 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) | |||
| 1349 | devpriv->command3_bits &= ~ADC_FNE_INTR_EN_BIT; | 1349 | devpriv->command3_bits &= ~ADC_FNE_INTR_EN_BIT; |
| 1350 | devpriv->write_byte(devpriv->command3_bits, dev->iobase + COMMAND3_REG); | 1350 | devpriv->write_byte(devpriv->command3_bits, dev->iobase + COMMAND3_REG); |
| 1351 | 1351 | ||
| 1352 | /* startup aquisition */ | 1352 | /* startup acquisition */ |
| 1353 | 1353 | ||
| 1354 | /* command2 reg */ | 1354 | /* command2 reg */ |
| 1355 | /* use 2 cascaded counters for pacing */ | 1355 | /* use 2 cascaded counters for pacing */ |
| @@ -1571,8 +1571,8 @@ static void handle_isa_dma(struct comedi_device *dev) | |||
| 1571 | devpriv->write_byte(0x1, dev->iobase + DMATC_CLEAR_REG); | 1571 | devpriv->write_byte(0x1, dev->iobase + DMATC_CLEAR_REG); |
| 1572 | } | 1572 | } |
| 1573 | 1573 | ||
| 1574 | /* makes sure all data acquired by board is transfered to comedi (used | 1574 | /* makes sure all data acquired by board is transferred to comedi (used |
| 1575 | * when aquisition is terminated by stop_src == TRIG_EXT). */ | 1575 | * when acquisition is terminated by stop_src == TRIG_EXT). */ |
| 1576 | static void labpc_drain_dregs(struct comedi_device *dev) | 1576 | static void labpc_drain_dregs(struct comedi_device *dev) |
| 1577 | { | 1577 | { |
| 1578 | if (devpriv->current_transfer == isa_dma_transfer) | 1578 | if (devpriv->current_transfer == isa_dma_transfer) |
diff --git a/drivers/staging/comedi/drivers/ni_pcidio.c b/drivers/staging/comedi/drivers/ni_pcidio.c index 005d2fe86ee4..8dd3a01d48dd 100644 --- a/drivers/staging/comedi/drivers/ni_pcidio.c +++ b/drivers/staging/comedi/drivers/ni_pcidio.c | |||
| @@ -821,7 +821,7 @@ static int ni_pcidio_cmdtest(struct comedi_device *dev, | |||
| 821 | cmd->scan_begin_arg = MAX_SPEED; | 821 | cmd->scan_begin_arg = MAX_SPEED; |
| 822 | err++; | 822 | err++; |
| 823 | } | 823 | } |
| 824 | /* no minumum speed */ | 824 | /* no minimum speed */ |
| 825 | } else { | 825 | } else { |
| 826 | /* TRIG_EXT */ | 826 | /* TRIG_EXT */ |
| 827 | /* should be level/edge, hi/lo specification here */ | 827 | /* should be level/edge, hi/lo specification here */ |
diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers/pcl812.c index c6dce4a1425e..09ff4723b225 100644 --- a/drivers/staging/comedi/drivers/pcl812.c +++ b/drivers/staging/comedi/drivers/pcl812.c | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | * and I cann't test all features.) | 34 | * and I cann't test all features.) |
| 35 | * | 35 | * |
| 36 | * This driver supports insn and cmd interfaces. Some boards support only insn | 36 | * This driver supports insn and cmd interfaces. Some boards support only insn |
| 37 | * becouse their hardware don't allow more (PCL-813/B, ACL-8113, ISO-813). | 37 | * because their hardware don't allow more (PCL-813/B, ACL-8113, ISO-813). |
| 38 | * Data transfer over DMA is supported only when you measure only one | 38 | * Data transfer over DMA is supported only when you measure only one |
| 39 | * channel, this is too hardware limitation of these boards. | 39 | * channel, this is too hardware limitation of these boards. |
| 40 | * | 40 | * |
diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers/pcl816.c index ef3cc4f3be6e..8f3fc6ee088b 100644 --- a/drivers/staging/comedi/drivers/pcl816.c +++ b/drivers/staging/comedi/drivers/pcl816.c | |||
| @@ -954,7 +954,7 @@ check_channel_list(struct comedi_device *dev, | |||
| 954 | } | 954 | } |
| 955 | 955 | ||
| 956 | if (chanlen > 1) { | 956 | if (chanlen > 1) { |
| 957 | /* first channel is everytime ok */ | 957 | /* first channel is every time ok */ |
| 958 | chansegment[0] = chanlist[0]; | 958 | chansegment[0] = chanlist[0]; |
| 959 | for (i = 1, seglen = 1; i < chanlen; i++, seglen++) { | 959 | for (i = 1, seglen = 1; i < chanlen; i++, seglen++) { |
| 960 | /* build part of chanlist */ | 960 | /* build part of chanlist */ |
| @@ -968,10 +968,10 @@ check_channel_list(struct comedi_device *dev, | |||
| 968 | nowmustbechan = | 968 | nowmustbechan = |
| 969 | (CR_CHAN(chansegment[i - 1]) + 1) % chanlen; | 969 | (CR_CHAN(chansegment[i - 1]) + 1) % chanlen; |
| 970 | if (nowmustbechan != CR_CHAN(chanlist[i])) { | 970 | if (nowmustbechan != CR_CHAN(chanlist[i])) { |
| 971 | /* channel list isn't continous :-( */ | 971 | /* channel list isn't continuous :-( */ |
| 972 | printk(KERN_WARNING | 972 | printk(KERN_WARNING |
| 973 | "comedi%d: pcl816: channel list must " | 973 | "comedi%d: pcl816: channel list must " |
| 974 | "be continous! chanlist[%i]=%d but " | 974 | "be continuous! chanlist[%i]=%d but " |
| 975 | "must be %d or %d!\n", dev->minor, | 975 | "must be %d or %d!\n", dev->minor, |
| 976 | i, CR_CHAN(chanlist[i]), nowmustbechan, | 976 | i, CR_CHAN(chanlist[i]), nowmustbechan, |
| 977 | CR_CHAN(chanlist[0])); | 977 | CR_CHAN(chanlist[0])); |
diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/pcl818.c index f58d75be7295..e3eea09ae1fb 100644 --- a/drivers/staging/comedi/drivers/pcl818.c +++ b/drivers/staging/comedi/drivers/pcl818.c | |||
| @@ -1231,7 +1231,7 @@ static int check_channel_list(struct comedi_device *dev, | |||
| 1231 | } | 1231 | } |
| 1232 | 1232 | ||
| 1233 | if (n_chan > 1) { | 1233 | if (n_chan > 1) { |
| 1234 | /* first channel is everytime ok */ | 1234 | /* first channel is every time ok */ |
| 1235 | chansegment[0] = chanlist[0]; | 1235 | chansegment[0] = chanlist[0]; |
| 1236 | /* build part of chanlist */ | 1236 | /* build part of chanlist */ |
| 1237 | for (i = 1, seglen = 1; i < n_chan; i++, seglen++) { | 1237 | for (i = 1, seglen = 1; i < n_chan; i++, seglen++) { |
| @@ -1245,9 +1245,9 @@ static int check_channel_list(struct comedi_device *dev, | |||
| 1245 | break; | 1245 | break; |
| 1246 | nowmustbechan = | 1246 | nowmustbechan = |
| 1247 | (CR_CHAN(chansegment[i - 1]) + 1) % s->n_chan; | 1247 | (CR_CHAN(chansegment[i - 1]) + 1) % s->n_chan; |
| 1248 | if (nowmustbechan != CR_CHAN(chanlist[i])) { /* channel list isn't continous :-( */ | 1248 | if (nowmustbechan != CR_CHAN(chanlist[i])) { /* channel list isn't continuous :-( */ |
| 1249 | printk | 1249 | printk |
| 1250 | ("comedi%d: pcl818: channel list must be continous! chanlist[%i]=%d but must be %d or %d!\n", | 1250 | ("comedi%d: pcl818: channel list must be continuous! chanlist[%i]=%d but must be %d or %d!\n", |
| 1251 | dev->minor, i, CR_CHAN(chanlist[i]), | 1251 | dev->minor, i, CR_CHAN(chanlist[i]), |
| 1252 | nowmustbechan, CR_CHAN(chanlist[0])); | 1252 | nowmustbechan, CR_CHAN(chanlist[0])); |
| 1253 | return 0; | 1253 | return 0; |
diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c index 5c832d7ed45d..f2e88e57d558 100644 --- a/drivers/staging/comedi/drivers/pcmmio.c +++ b/drivers/staging/comedi/drivers/pcmmio.c | |||
| @@ -733,7 +733,7 @@ static int pcmmio_dio_insn_config(struct comedi_device *dev, | |||
| 733 | break; | 733 | break; |
| 734 | 734 | ||
| 735 | case INSN_CONFIG_DIO_QUERY: | 735 | case INSN_CONFIG_DIO_QUERY: |
| 736 | /* retreive from shadow register */ | 736 | /* retrieve from shadow register */ |
| 737 | data[1] = | 737 | data[1] = |
| 738 | (s->io_bits & (1 << chan)) ? COMEDI_OUTPUT : COMEDI_INPUT; | 738 | (s->io_bits & (1 << chan)) ? COMEDI_OUTPUT : COMEDI_INPUT; |
| 739 | return insn->n; | 739 | return insn->n; |
| @@ -1279,7 +1279,7 @@ static int wait_dac_ready(unsigned long iobase) | |||
| 1279 | "no busy waiting" policy. The fact is that the hardware is | 1279 | "no busy waiting" policy. The fact is that the hardware is |
| 1280 | normally so fast that we usually only need one time through the loop | 1280 | normally so fast that we usually only need one time through the loop |
| 1281 | anyway. The longer timeout is for rare occasions and for detecting | 1281 | anyway. The longer timeout is for rare occasions and for detecting |
| 1282 | non-existant hardware. */ | 1282 | non-existent hardware. */ |
| 1283 | 1283 | ||
| 1284 | while (retry--) { | 1284 | while (retry--) { |
| 1285 | if (inb(iobase + 3) & 0x80) | 1285 | if (inb(iobase + 3) & 0x80) |
diff --git a/drivers/staging/comedi/drivers/pcmuio.c b/drivers/staging/comedi/drivers/pcmuio.c index 7a9287433b2e..b2c2c8971a32 100644 --- a/drivers/staging/comedi/drivers/pcmuio.c +++ b/drivers/staging/comedi/drivers/pcmuio.c | |||
| @@ -605,7 +605,7 @@ static int pcmuio_dio_insn_config(struct comedi_device *dev, | |||
| 605 | break; | 605 | break; |
| 606 | 606 | ||
| 607 | case INSN_CONFIG_DIO_QUERY: | 607 | case INSN_CONFIG_DIO_QUERY: |
| 608 | /* retreive from shadow register */ | 608 | /* retrieve from shadow register */ |
| 609 | data[1] = | 609 | data[1] = |
| 610 | (s->io_bits & (1 << chan)) ? COMEDI_OUTPUT : COMEDI_INPUT; | 610 | (s->io_bits & (1 << chan)) ? COMEDI_OUTPUT : COMEDI_INPUT; |
| 611 | return insn->n; | 611 | return insn->n; |
diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c index ebba9bb47777..82942e5728a5 100644 --- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c +++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c | |||
| @@ -390,7 +390,7 @@ static int daqp_ai_insn_read(struct comedi_device *dev, | |||
| 390 | 390 | ||
| 391 | outb(v, dev->iobase + DAQP_CONTROL); | 391 | outb(v, dev->iobase + DAQP_CONTROL); |
| 392 | 392 | ||
| 393 | /* Reset any pending interrupts (my card has a tendancy to require | 393 | /* Reset any pending interrupts (my card has a tendency to require |
| 394 | * require multiple reads on the status register to achieve this) | 394 | * require multiple reads on the status register to achieve this) |
| 395 | */ | 395 | */ |
| 396 | 396 | ||
| @@ -752,7 +752,7 @@ static int daqp_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) | |||
| 752 | 752 | ||
| 753 | outb(v, dev->iobase + DAQP_CONTROL); | 753 | outb(v, dev->iobase + DAQP_CONTROL); |
| 754 | 754 | ||
| 755 | /* Reset any pending interrupts (my card has a tendancy to require | 755 | /* Reset any pending interrupts (my card has a tendency to require |
| 756 | * require multiple reads on the status register to achieve this) | 756 | * require multiple reads on the status register to achieve this) |
| 757 | */ | 757 | */ |
| 758 | counter = 100; | 758 | counter = 100; |
diff --git a/drivers/staging/comedi/drivers/rtd520.c b/drivers/staging/comedi/drivers/rtd520.c index 357858d27441..7f09ed755fe6 100644 --- a/drivers/staging/comedi/drivers/rtd520.c +++ b/drivers/staging/comedi/drivers/rtd520.c | |||
| @@ -75,7 +75,7 @@ Configuration options: | |||
| 75 | das1800, since they have the best documented code. Driver | 75 | das1800, since they have the best documented code. Driver |
| 76 | cb_pcidas64.c uses the same DMA controller. | 76 | cb_pcidas64.c uses the same DMA controller. |
| 77 | 77 | ||
| 78 | As far as I can tell, the About interrupt doesnt work if Sample is | 78 | As far as I can tell, the About interrupt doesn't work if Sample is |
| 79 | also enabled. It turns out that About really isn't needed, since | 79 | also enabled. It turns out that About really isn't needed, since |
| 80 | we always count down samples read. | 80 | we always count down samples read. |
| 81 | 81 | ||
| @@ -370,7 +370,7 @@ struct rtdPrivate { | |||
| 370 | /* timer gate (when enabled) */ | 370 | /* timer gate (when enabled) */ |
| 371 | u8 utcGate[4]; /* 1 extra allows simple range check */ | 371 | u8 utcGate[4]; /* 1 extra allows simple range check */ |
| 372 | 372 | ||
| 373 | /* shadow registers affect other registers, but cant be read back */ | 373 | /* shadow registers affect other registers, but can't be read back */ |
| 374 | /* The macros below update these on writes */ | 374 | /* The macros below update these on writes */ |
| 375 | u16 intMask; /* interrupt mask */ | 375 | u16 intMask; /* interrupt mask */ |
| 376 | u16 intClearMask; /* interrupt clear mask */ | 376 | u16 intClearMask; /* interrupt clear mask */ |
| @@ -485,7 +485,7 @@ struct rtdPrivate { | |||
| 485 | #define RtdAdcFifoGet(dev) \ | 485 | #define RtdAdcFifoGet(dev) \ |
| 486 | readw(devpriv->las1+LAS1_ADC_FIFO) | 486 | readw(devpriv->las1+LAS1_ADC_FIFO) |
| 487 | 487 | ||
| 488 | /* Read two ADC data values (DOESNT WORK) */ | 488 | /* Read two ADC data values (DOESN'T WORK) */ |
| 489 | #define RtdAdcFifoGet2(dev) \ | 489 | #define RtdAdcFifoGet2(dev) \ |
| 490 | readl(devpriv->las1+LAS1_ADC_FIFO) | 490 | readl(devpriv->las1+LAS1_ADC_FIFO) |
| 491 | 491 | ||
| @@ -857,7 +857,7 @@ static int rtd_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
| 857 | DPRINTK("rtd520: PCI latency = %d\n", pci_latency); | 857 | DPRINTK("rtd520: PCI latency = %d\n", pci_latency); |
| 858 | } | 858 | } |
| 859 | 859 | ||
| 860 | /* Undocumented EPLD version (doesnt match RTD driver results) */ | 860 | /* Undocumented EPLD version (doesn't match RTD driver results) */ |
| 861 | /*DPRINTK ("rtd520: Reading epld from %p\n", | 861 | /*DPRINTK ("rtd520: Reading epld from %p\n", |
| 862 | devpriv->las0+0); | 862 | devpriv->las0+0); |
| 863 | epld_version = readl (devpriv->las0+0); | 863 | epld_version = readl (devpriv->las0+0); |
| @@ -1291,7 +1291,7 @@ static int rtd520_probe_fifo_depth(struct comedi_device *dev) | |||
| 1291 | /* | 1291 | /* |
| 1292 | "instructions" read/write data in "one-shot" or "software-triggered" | 1292 | "instructions" read/write data in "one-shot" or "software-triggered" |
| 1293 | mode (simplest case). | 1293 | mode (simplest case). |
| 1294 | This doesnt use interrupts. | 1294 | This doesn't use interrupts. |
| 1295 | 1295 | ||
| 1296 | Note, we don't do any settling delays. Use a instruction list to | 1296 | Note, we don't do any settling delays. Use a instruction list to |
| 1297 | select, delay, then read. | 1297 | select, delay, then read. |
| @@ -2120,7 +2120,7 @@ static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) | |||
| 2120 | } | 2120 | } |
| 2121 | 2121 | ||
| 2122 | /* | 2122 | /* |
| 2123 | Stop a running data aquisition. | 2123 | Stop a running data acquisition. |
| 2124 | */ | 2124 | */ |
| 2125 | static int rtd_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s) | 2125 | static int rtd_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s) |
| 2126 | { | 2126 | { |
diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c index d5ba3ab357a3..23fc64b9988e 100644 --- a/drivers/staging/comedi/drivers/s626.c +++ b/drivers/staging/comedi/drivers/s626.c | |||
| @@ -139,7 +139,7 @@ struct s626_private { | |||
| 139 | int got_regions; | 139 | int got_regions; |
| 140 | short allocatedBuf; | 140 | short allocatedBuf; |
| 141 | uint8_t ai_cmd_running; /* ai_cmd is running */ | 141 | uint8_t ai_cmd_running; /* ai_cmd is running */ |
| 142 | uint8_t ai_continous; /* continous aquisition */ | 142 | uint8_t ai_continous; /* continous acquisition */ |
| 143 | int ai_sample_count; /* number of samples to acquire */ | 143 | int ai_sample_count; /* number of samples to acquire */ |
| 144 | unsigned int ai_sample_timer; | 144 | unsigned int ai_sample_timer; |
| 145 | /* time between samples in units of the timer */ | 145 | /* time between samples in units of the timer */ |
| @@ -1048,7 +1048,7 @@ static irqreturn_t s626_irq_handler(int irq, void *d) | |||
| 1048 | uint8_t group; | 1048 | uint8_t group; |
| 1049 | uint16_t irqbit; | 1049 | uint16_t irqbit; |
| 1050 | 1050 | ||
| 1051 | DEBUG("s626_irq_handler: interrupt request recieved!!!\n"); | 1051 | DEBUG("s626_irq_handler: interrupt request received!!!\n"); |
| 1052 | 1052 | ||
| 1053 | if (dev->attached == 0) | 1053 | if (dev->attached == 0) |
| 1054 | return IRQ_NONE; | 1054 | return IRQ_NONE; |
| @@ -1165,14 +1165,14 @@ static irqreturn_t s626_irq_handler(int irq, void *d) | |||
| 1165 | (16 * group))) | 1165 | (16 * group))) |
| 1166 | == 1 && cmd->start_src == TRIG_EXT) { | 1166 | == 1 && cmd->start_src == TRIG_EXT) { |
| 1167 | DEBUG | 1167 | DEBUG |
| 1168 | ("s626_irq_handler: Edge capture interrupt recieved from channel %d\n", | 1168 | ("s626_irq_handler: Edge capture interrupt received from channel %d\n", |
| 1169 | cmd->start_arg); | 1169 | cmd->start_arg); |
| 1170 | 1170 | ||
| 1171 | /* Start executing the RPS program. */ | 1171 | /* Start executing the RPS program. */ |
| 1172 | MC_ENABLE(P_MC1, MC1_ERPS1); | 1172 | MC_ENABLE(P_MC1, MC1_ERPS1); |
| 1173 | 1173 | ||
| 1174 | DEBUG | 1174 | DEBUG |
| 1175 | ("s626_irq_handler: aquisition start triggered!!!\n"); | 1175 | ("s626_irq_handler: acquisition start triggered!!!\n"); |
| 1176 | 1176 | ||
| 1177 | if (cmd->scan_begin_src == | 1177 | if (cmd->scan_begin_src == |
| 1178 | TRIG_EXT) { | 1178 | TRIG_EXT) { |
| @@ -1194,7 +1194,7 @@ static irqreturn_t s626_irq_handler(int irq, void *d) | |||
| 1194 | && cmd->scan_begin_src == | 1194 | && cmd->scan_begin_src == |
| 1195 | TRIG_EXT) { | 1195 | TRIG_EXT) { |
| 1196 | DEBUG | 1196 | DEBUG |
| 1197 | ("s626_irq_handler: Edge capture interrupt recieved from channel %d\n", | 1197 | ("s626_irq_handler: Edge capture interrupt received from channel %d\n", |
| 1198 | cmd->scan_begin_arg); | 1198 | cmd->scan_begin_arg); |
| 1199 | 1199 | ||
| 1200 | /* Trigger ADC scan loop start by setting RPS Signal 0. */ | 1200 | /* Trigger ADC scan loop start by setting RPS Signal 0. */ |
| @@ -1236,7 +1236,7 @@ static irqreturn_t s626_irq_handler(int irq, void *d) | |||
| 1236 | == 1 | 1236 | == 1 |
| 1237 | && cmd->convert_src == TRIG_EXT) { | 1237 | && cmd->convert_src == TRIG_EXT) { |
| 1238 | DEBUG | 1238 | DEBUG |
| 1239 | ("s626_irq_handler: Edge capture interrupt recieved from channel %d\n", | 1239 | ("s626_irq_handler: Edge capture interrupt received from channel %d\n", |
| 1240 | cmd->convert_arg); | 1240 | cmd->convert_arg); |
| 1241 | 1241 | ||
| 1242 | /* Trigger ADC scan loop start by setting RPS Signal 0. */ | 1242 | /* Trigger ADC scan loop start by setting RPS Signal 0. */ |
| @@ -1805,7 +1805,7 @@ static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) | |||
| 1805 | DEBUG("s626_ai_cmd: NULL command\n"); | 1805 | DEBUG("s626_ai_cmd: NULL command\n"); |
| 1806 | return -EINVAL; | 1806 | return -EINVAL; |
| 1807 | } else { | 1807 | } else { |
| 1808 | DEBUG("s626_ai_cmd: command recieved!!!\n"); | 1808 | DEBUG("s626_ai_cmd: command received!!!\n"); |
| 1809 | } | 1809 | } |
| 1810 | 1810 | ||
| 1811 | if (dev->irq == 0) { | 1811 | if (dev->irq == 0) { |
| @@ -1880,7 +1880,7 @@ static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) | |||
| 1880 | devpriv->ai_continous = 0; | 1880 | devpriv->ai_continous = 0; |
| 1881 | break; | 1881 | break; |
| 1882 | case TRIG_NONE: | 1882 | case TRIG_NONE: |
| 1883 | /* continous aquisition */ | 1883 | /* continous acquisition */ |
| 1884 | devpriv->ai_continous = 1; | 1884 | devpriv->ai_continous = 1; |
| 1885 | devpriv->ai_sample_count = 0; | 1885 | devpriv->ai_sample_count = 0; |
| 1886 | break; | 1886 | break; |
| @@ -2570,7 +2570,7 @@ static uint32_t I2Chandshake(struct comedi_device *dev, uint32_t val) | |||
| 2570 | while ((RR7146(P_I2CCTRL) & (I2C_BUSY | I2C_ERR)) == I2C_BUSY) | 2570 | while ((RR7146(P_I2CCTRL) & (I2C_BUSY | I2C_ERR)) == I2C_BUSY) |
| 2571 | ; | 2571 | ; |
| 2572 | 2572 | ||
| 2573 | /* Return non-zero if I2C error occured. */ | 2573 | /* Return non-zero if I2C error occurred. */ |
| 2574 | return RR7146(P_I2CCTRL) & I2C_ERR; | 2574 | return RR7146(P_I2CCTRL) & I2C_ERR; |
| 2575 | 2575 | ||
| 2576 | } | 2576 | } |
diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c index be93c30e4b15..e543e6c2b1bb 100644 --- a/drivers/staging/comedi/drivers/usbdux.c +++ b/drivers/staging/comedi/drivers/usbdux.c | |||
| @@ -285,7 +285,7 @@ struct usbduxsub { | |||
| 285 | short int ao_cmd_running; | 285 | short int ao_cmd_running; |
| 286 | /* pwm is running */ | 286 | /* pwm is running */ |
| 287 | short int pwm_cmd_running; | 287 | short int pwm_cmd_running; |
| 288 | /* continous aquisition */ | 288 | /* continous acquisition */ |
| 289 | short int ai_continous; | 289 | short int ai_continous; |
| 290 | short int ao_continous; | 290 | short int ao_continous; |
| 291 | /* number of samples to acquire */ | 291 | /* number of samples to acquire */ |
| @@ -500,7 +500,7 @@ static void usbduxsub_ai_IsocIrq(struct urb *urb) | |||
| 500 | 500 | ||
| 501 | /* test, if we transmit only a fixed number of samples */ | 501 | /* test, if we transmit only a fixed number of samples */ |
| 502 | if (!(this_usbduxsub->ai_continous)) { | 502 | if (!(this_usbduxsub->ai_continous)) { |
| 503 | /* not continous, fixed number of samples */ | 503 | /* not continuous, fixed number of samples */ |
| 504 | this_usbduxsub->ai_sample_count--; | 504 | this_usbduxsub->ai_sample_count--; |
| 505 | /* all samples received? */ | 505 | /* all samples received? */ |
| 506 | if (this_usbduxsub->ai_sample_count < 0) { | 506 | if (this_usbduxsub->ai_sample_count < 0) { |
| @@ -653,7 +653,7 @@ static void usbduxsub_ao_IsocIrq(struct urb *urb) | |||
| 653 | /* timer zero */ | 653 | /* timer zero */ |
| 654 | this_usbduxsub->ao_counter = this_usbduxsub->ao_timer; | 654 | this_usbduxsub->ao_counter = this_usbduxsub->ao_timer; |
| 655 | 655 | ||
| 656 | /* handle non continous aquisition */ | 656 | /* handle non continous acquisition */ |
| 657 | if (!(this_usbduxsub->ao_continous)) { | 657 | if (!(this_usbduxsub->ao_continous)) { |
| 658 | /* fixed number of samples */ | 658 | /* fixed number of samples */ |
| 659 | this_usbduxsub->ao_sample_count--; | 659 | this_usbduxsub->ao_sample_count--; |
| @@ -957,7 +957,7 @@ static int usbdux_ai_cmdtest(struct comedi_device *dev, | |||
| 957 | if (!cmd->scan_begin_src || tmp != cmd->scan_begin_src) | 957 | if (!cmd->scan_begin_src || tmp != cmd->scan_begin_src) |
| 958 | err++; | 958 | err++; |
| 959 | 959 | ||
| 960 | /* scanning is continous */ | 960 | /* scanning is continuous */ |
| 961 | tmp = cmd->convert_src; | 961 | tmp = cmd->convert_src; |
| 962 | cmd->convert_src &= TRIG_NOW; | 962 | cmd->convert_src &= TRIG_NOW; |
| 963 | if (!cmd->convert_src || tmp != cmd->convert_src) | 963 | if (!cmd->convert_src || tmp != cmd->convert_src) |
| @@ -1222,7 +1222,7 @@ static int usbdux_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) | |||
| 1222 | up(&this_usbduxsub->sem); | 1222 | up(&this_usbduxsub->sem); |
| 1223 | return -EBUSY; | 1223 | return -EBUSY; |
| 1224 | } | 1224 | } |
| 1225 | /* set current channel of the running aquisition to zero */ | 1225 | /* set current channel of the running acquisition to zero */ |
| 1226 | s->async->cur_chan = 0; | 1226 | s->async->cur_chan = 0; |
| 1227 | 1227 | ||
| 1228 | this_usbduxsub->dux_commands[1] = cmd->chanlist_len; | 1228 | this_usbduxsub->dux_commands[1] = cmd->chanlist_len; |
| @@ -1284,7 +1284,7 @@ static int usbdux_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) | |||
| 1284 | this_usbduxsub->ai_sample_count = cmd->stop_arg; | 1284 | this_usbduxsub->ai_sample_count = cmd->stop_arg; |
| 1285 | this_usbduxsub->ai_continous = 0; | 1285 | this_usbduxsub->ai_continous = 0; |
| 1286 | } else { | 1286 | } else { |
| 1287 | /* continous aquisition */ | 1287 | /* continous acquisition */ |
| 1288 | this_usbduxsub->ai_continous = 1; | 1288 | this_usbduxsub->ai_continous = 1; |
| 1289 | this_usbduxsub->ai_sample_count = 0; | 1289 | this_usbduxsub->ai_sample_count = 0; |
| 1290 | } | 1290 | } |
| @@ -1515,7 +1515,7 @@ static int usbdux_ao_cmdtest(struct comedi_device *dev, | |||
| 1515 | /* just now we scan also in the high speed mode every frame */ | 1515 | /* just now we scan also in the high speed mode every frame */ |
| 1516 | /* this is due to ehci driver limitations */ | 1516 | /* this is due to ehci driver limitations */ |
| 1517 | if (0) { /* (this_usbduxsub->high_speed) */ | 1517 | if (0) { /* (this_usbduxsub->high_speed) */ |
| 1518 | /* start immidiately a new scan */ | 1518 | /* start immediately a new scan */ |
| 1519 | /* the sampling rate is set by the coversion rate */ | 1519 | /* the sampling rate is set by the coversion rate */ |
| 1520 | cmd->scan_begin_src &= TRIG_FOLLOW; | 1520 | cmd->scan_begin_src &= TRIG_FOLLOW; |
| 1521 | } else { | 1521 | } else { |
| @@ -1525,7 +1525,7 @@ static int usbdux_ao_cmdtest(struct comedi_device *dev, | |||
| 1525 | if (!cmd->scan_begin_src || tmp != cmd->scan_begin_src) | 1525 | if (!cmd->scan_begin_src || tmp != cmd->scan_begin_src) |
| 1526 | err++; | 1526 | err++; |
| 1527 | 1527 | ||
| 1528 | /* scanning is continous */ | 1528 | /* scanning is continuous */ |
| 1529 | tmp = cmd->convert_src; | 1529 | tmp = cmd->convert_src; |
| 1530 | /* we always output at 1kHz just now all channels at once */ | 1530 | /* we always output at 1kHz just now all channels at once */ |
| 1531 | if (0) { /* (this_usbduxsub->high_speed) */ | 1531 | if (0) { /* (this_usbduxsub->high_speed) */ |
| @@ -1645,7 +1645,7 @@ static int usbdux_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s) | |||
| 1645 | dev_dbg(&this_usbduxsub->interface->dev, | 1645 | dev_dbg(&this_usbduxsub->interface->dev, |
| 1646 | "comedi%d: %s\n", dev->minor, __func__); | 1646 | "comedi%d: %s\n", dev->minor, __func__); |
| 1647 | 1647 | ||
| 1648 | /* set current channel of the running aquisition to zero */ | 1648 | /* set current channel of the running acquisition to zero */ |
| 1649 | s->async->cur_chan = 0; | 1649 | s->async->cur_chan = 0; |
| 1650 | for (i = 0; i < cmd->chanlist_len; ++i) { | 1650 | for (i = 0; i < cmd->chanlist_len; ++i) { |
| 1651 | chan = CR_CHAN(cmd->chanlist[i]); | 1651 | chan = CR_CHAN(cmd->chanlist[i]); |
| @@ -1694,7 +1694,7 @@ static int usbdux_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s) | |||
| 1694 | this_usbduxsub->ao_counter = this_usbduxsub->ao_timer; | 1694 | this_usbduxsub->ao_counter = this_usbduxsub->ao_timer; |
| 1695 | 1695 | ||
| 1696 | if (cmd->stop_src == TRIG_COUNT) { | 1696 | if (cmd->stop_src == TRIG_COUNT) { |
| 1697 | /* not continous */ | 1697 | /* not continuous */ |
| 1698 | /* counter */ | 1698 | /* counter */ |
| 1699 | /* high speed also scans everything at once */ | 1699 | /* high speed also scans everything at once */ |
| 1700 | if (0) { /* (this_usbduxsub->high_speed) */ | 1700 | if (0) { /* (this_usbduxsub->high_speed) */ |
| @@ -1708,7 +1708,7 @@ static int usbdux_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s) | |||
| 1708 | } | 1708 | } |
| 1709 | this_usbduxsub->ao_continous = 0; | 1709 | this_usbduxsub->ao_continous = 0; |
| 1710 | } else { | 1710 | } else { |
| 1711 | /* continous aquisition */ | 1711 | /* continous acquisition */ |
| 1712 | this_usbduxsub->ao_continous = 1; | 1712 | this_usbduxsub->ao_continous = 1; |
| 1713 | this_usbduxsub->ao_sample_count = 0; | 1713 | this_usbduxsub->ao_sample_count = 0; |
| 1714 | } | 1714 | } |
diff --git a/drivers/staging/comedi/drivers/usbduxfast.c b/drivers/staging/comedi/drivers/usbduxfast.c index 5b15e6df54e6..2a8e725b7859 100644 --- a/drivers/staging/comedi/drivers/usbduxfast.c +++ b/drivers/staging/comedi/drivers/usbduxfast.c | |||
| @@ -180,7 +180,7 @@ struct usbduxfastsub_s { | |||
| 180 | /* comedi device for the interrupt context */ | 180 | /* comedi device for the interrupt context */ |
| 181 | struct comedi_device *comedidev; | 181 | struct comedi_device *comedidev; |
| 182 | short int ai_cmd_running; /* asynchronous command is running */ | 182 | short int ai_cmd_running; /* asynchronous command is running */ |
| 183 | short int ai_continous; /* continous aquisition */ | 183 | short int ai_continous; /* continous acquisition */ |
| 184 | long int ai_sample_count; /* number of samples to acquire */ | 184 | long int ai_sample_count; /* number of samples to acquire */ |
| 185 | uint8_t *dux_commands; /* commands */ | 185 | uint8_t *dux_commands; /* commands */ |
| 186 | int ignore; /* counter which ignores the first | 186 | int ignore; /* counter which ignores the first |
| @@ -392,7 +392,7 @@ static void usbduxfastsub_ai_Irq(struct urb *urb) | |||
| 392 | p = urb->transfer_buffer; | 392 | p = urb->transfer_buffer; |
| 393 | if (!udfs->ignore) { | 393 | if (!udfs->ignore) { |
| 394 | if (!udfs->ai_continous) { | 394 | if (!udfs->ai_continous) { |
| 395 | /* not continous, fixed number of samples */ | 395 | /* not continuous, fixed number of samples */ |
| 396 | n = urb->actual_length / sizeof(uint16_t); | 396 | n = urb->actual_length / sizeof(uint16_t); |
| 397 | if (unlikely(udfs->ai_sample_count < n)) { | 397 | if (unlikely(udfs->ai_sample_count < n)) { |
| 398 | /* | 398 | /* |
| @@ -775,7 +775,7 @@ static int usbduxfast_ai_cmd(struct comedi_device *dev, | |||
| 775 | up(&udfs->sem); | 775 | up(&udfs->sem); |
| 776 | return -EBUSY; | 776 | return -EBUSY; |
| 777 | } | 777 | } |
| 778 | /* set current channel of the running aquisition to zero */ | 778 | /* set current channel of the running acquisition to zero */ |
| 779 | s->async->cur_chan = 0; | 779 | s->async->cur_chan = 0; |
| 780 | 780 | ||
| 781 | /* | 781 | /* |
| @@ -1182,7 +1182,7 @@ static int usbduxfast_ai_cmd(struct comedi_device *dev, | |||
| 1182 | } | 1182 | } |
| 1183 | udfs->ai_continous = 0; | 1183 | udfs->ai_continous = 0; |
| 1184 | } else { | 1184 | } else { |
| 1185 | /* continous aquisition */ | 1185 | /* continous acquisition */ |
| 1186 | udfs->ai_continous = 1; | 1186 | udfs->ai_continous = 1; |
| 1187 | udfs->ai_sample_count = 0; | 1187 | udfs->ai_sample_count = 0; |
| 1188 | } | 1188 | } |
diff --git a/drivers/staging/cptm1217/clearpad_tm1217.c b/drivers/staging/cptm1217/clearpad_tm1217.c index 76e4b782d2fb..0fe713e72e9d 100644 --- a/drivers/staging/cptm1217/clearpad_tm1217.c +++ b/drivers/staging/cptm1217/clearpad_tm1217.c | |||
| @@ -52,7 +52,7 @@ | |||
| 52 | #define TMA1217_DEV_STATUS 0x13 /* Device Status */ | 52 | #define TMA1217_DEV_STATUS 0x13 /* Device Status */ |
| 53 | #define TMA1217_INT_STATUS 0x14 /* Interrupt Status */ | 53 | #define TMA1217_INT_STATUS 0x14 /* Interrupt Status */ |
| 54 | 54 | ||
| 55 | /* Controller can detect upto 2 possible finger touches. | 55 | /* Controller can detect up to 2 possible finger touches. |
| 56 | * Each finger touch provides 12 bit X Y co-ordinates, the values are split | 56 | * Each finger touch provides 12 bit X Y co-ordinates, the values are split |
| 57 | * across 2 registers, and an 8 bit Z value */ | 57 | * across 2 registers, and an 8 bit Z value */ |
| 58 | #define TMA1217_FINGER_STATE 0x18 /* Finger State */ | 58 | #define TMA1217_FINGER_STATE 0x18 /* Finger State */ |
diff --git a/drivers/staging/crystalhd/crystalhd_cmds.c b/drivers/staging/crystalhd/crystalhd_cmds.c index 1429608544d6..3735ed3da4c6 100644 --- a/drivers/staging/crystalhd/crystalhd_cmds.c +++ b/drivers/staging/crystalhd/crystalhd_cmds.c | |||
| @@ -914,7 +914,7 @@ enum BC_STATUS crystalhd_user_open(struct crystalhd_cmd *ctx, | |||
| 914 | * Return: | 914 | * Return: |
| 915 | * status | 915 | * status |
| 916 | * | 916 | * |
| 917 | * Closer aplication handle and release app specific | 917 | * Closer application handle and release app specific |
| 918 | * resources. | 918 | * resources. |
| 919 | */ | 919 | */ |
| 920 | enum BC_STATUS crystalhd_user_close(struct crystalhd_cmd *ctx, struct crystalhd_user *uc) | 920 | enum BC_STATUS crystalhd_user_close(struct crystalhd_cmd *ctx, struct crystalhd_user *uc) |
diff --git a/drivers/staging/crystalhd/crystalhd_hw.c b/drivers/staging/crystalhd/crystalhd_hw.c index 13a514dd0f79..5acf39e7cdef 100644 --- a/drivers/staging/crystalhd/crystalhd_hw.c +++ b/drivers/staging/crystalhd/crystalhd_hw.c | |||
| @@ -302,7 +302,7 @@ static bool crystalhd_start_device(struct crystalhd_adp *adp) | |||
| 302 | crystalhd_enable_interrupts(adp); | 302 | crystalhd_enable_interrupts(adp); |
| 303 | 303 | ||
| 304 | /* Enable the option for getting the total no. of DWORDS | 304 | /* Enable the option for getting the total no. of DWORDS |
| 305 | * that have been transfered by the RXDMA engine | 305 | * that have been transferred by the RXDMA engine |
| 306 | */ | 306 | */ |
| 307 | dbg_options = crystalhd_reg_rd(adp, MISC1_DMA_DEBUG_OPTIONS_REG); | 307 | dbg_options = crystalhd_reg_rd(adp, MISC1_DMA_DEBUG_OPTIONS_REG); |
| 308 | dbg_options |= 0x10; | 308 | dbg_options |= 0x10; |
| @@ -1776,7 +1776,7 @@ enum BC_STATUS crystalhd_do_fw_cmd(struct crystalhd_hw *hw, | |||
| 1776 | return sts; | 1776 | return sts; |
| 1777 | } | 1777 | } |
| 1778 | 1778 | ||
| 1779 | /*Get the Responce Address*/ | 1779 | /*Get the Response Address*/ |
| 1780 | cmd_res_addr = bc_dec_reg_rd(hw->adp, Cpu2HstMbx1); | 1780 | cmd_res_addr = bc_dec_reg_rd(hw->adp, Cpu2HstMbx1); |
| 1781 | 1781 | ||
| 1782 | /*Read the Response*/ | 1782 | /*Read the Response*/ |
| @@ -2367,7 +2367,7 @@ enum BC_STATUS crystalhd_hw_set_core_clock(struct crystalhd_hw *hw) | |||
| 2367 | BCMLOG(BCMLOG_INFO, "clock is moving to %d with n %d with vco_mg %d\n", | 2367 | BCMLOG(BCMLOG_INFO, "clock is moving to %d with n %d with vco_mg %d\n", |
| 2368 | hw->core_clock_mhz, n, vco_mg); | 2368 | hw->core_clock_mhz, n, vco_mg); |
| 2369 | 2369 | ||
| 2370 | /* Change the DRAM refresh rate to accomodate the new frequency */ | 2370 | /* Change the DRAM refresh rate to accommodate the new frequency */ |
| 2371 | /* refresh reg = ((refresh_rate * clock_rate)/16) - 1; rounding up*/ | 2371 | /* refresh reg = ((refresh_rate * clock_rate)/16) - 1; rounding up*/ |
| 2372 | refresh_reg = (7 * hw->core_clock_mhz / 16); | 2372 | refresh_reg = (7 * hw->core_clock_mhz / 16); |
| 2373 | bc_dec_reg_wr(hw->adp, SDRAM_REF_PARAM, ((1 << 12) | refresh_reg)); | 2373 | bc_dec_reg_wr(hw->adp, SDRAM_REF_PARAM, ((1 << 12) | refresh_reg)); |
diff --git a/drivers/staging/cxt1e1/musycc.c b/drivers/staging/cxt1e1/musycc.c index f274c77fb3fc..5cc3423a6646 100644 --- a/drivers/staging/cxt1e1/musycc.c +++ b/drivers/staging/cxt1e1/musycc.c | |||
| @@ -1455,7 +1455,7 @@ musycc_intr_bh_tasklet (ci_t * ci) | |||
| 1455 | /* | 1455 | /* |
| 1456 | * If the descriptor has not recovered, then leaving the EMPTY | 1456 | * If the descriptor has not recovered, then leaving the EMPTY |
| 1457 | * entry set will not signal to the MUSYCC that this descriptor | 1457 | * entry set will not signal to the MUSYCC that this descriptor |
| 1458 | * has been serviced. The Interrupt Queue can then start loosing | 1458 | * has been serviced. The Interrupt Queue can then start losing |
| 1459 | * available descriptors and MUSYCC eventually encounters and | 1459 | * available descriptors and MUSYCC eventually encounters and |
| 1460 | * reports the INTFULL condition. Per manual, changing any bit | 1460 | * reports the INTFULL condition. Per manual, changing any bit |
| 1461 | * marks descriptor as available, thus the use of different | 1461 | * marks descriptor as available, thus the use of different |
diff --git a/drivers/staging/cxt1e1/musycc.h b/drivers/staging/cxt1e1/musycc.h index d2c91ef686d1..68f3660f4477 100644 --- a/drivers/staging/cxt1e1/musycc.h +++ b/drivers/staging/cxt1e1/musycc.h | |||
| @@ -74,7 +74,7 @@ extern "C" | |||
| 74 | 74 | ||
| 75 | #define INT_QUEUE_SIZE MUSYCC_NIQD | 75 | #define INT_QUEUE_SIZE MUSYCC_NIQD |
| 76 | 76 | ||
| 77 | /* RAM image of MUSYCC registers layed out as a C structure */ | 77 | /* RAM image of MUSYCC registers laid out as a C structure */ |
| 78 | struct musycc_groupr | 78 | struct musycc_groupr |
| 79 | { | 79 | { |
| 80 | VINT32 thp[32]; /* Transmit Head Pointer [5-29] */ | 80 | VINT32 thp[32]; /* Transmit Head Pointer [5-29] */ |
| @@ -96,7 +96,7 @@ extern "C" | |||
| 96 | VINT32 pcd; /* Port Configuration Descriptor [5-19] */ | 96 | VINT32 pcd; /* Port Configuration Descriptor [5-19] */ |
| 97 | }; | 97 | }; |
| 98 | 98 | ||
| 99 | /* hardware MUSYCC registers layed out as a C structure */ | 99 | /* hardware MUSYCC registers laid out as a C structure */ |
| 100 | struct musycc_globalr | 100 | struct musycc_globalr |
| 101 | { | 101 | { |
| 102 | VINT32 gbp; /* Group Base Pointer */ | 102 | VINT32 gbp; /* Group Base Pointer */ |
diff --git a/drivers/staging/cxt1e1/pmcc4_defs.h b/drivers/staging/cxt1e1/pmcc4_defs.h index 186347b8d565..a39505f45c29 100644 --- a/drivers/staging/cxt1e1/pmcc4_defs.h +++ b/drivers/staging/cxt1e1/pmcc4_defs.h | |||
| @@ -54,8 +54,8 @@ | |||
| 54 | #define MUSYCC_MTU 2048 /* default */ | 54 | #define MUSYCC_MTU 2048 /* default */ |
| 55 | #define MUSYCC_TXDESC_MIN 10 /* HDLC mode default */ | 55 | #define MUSYCC_TXDESC_MIN 10 /* HDLC mode default */ |
| 56 | #define MUSYCC_RXDESC_MIN 18 /* HDLC mode default */ | 56 | #define MUSYCC_RXDESC_MIN 18 /* HDLC mode default */ |
| 57 | #define MUSYCC_TXDESC_TRANS 4 /* Transparent mode minumum # of TX descriptors */ | 57 | #define MUSYCC_TXDESC_TRANS 4 /* Transparent mode minimum # of TX descriptors */ |
| 58 | #define MUSYCC_RXDESC_TRANS 12 /* Transparent mode minumum # of RX descriptors */ | 58 | #define MUSYCC_RXDESC_TRANS 12 /* Transparent mode minimum # of RX descriptors */ |
| 59 | 59 | ||
| 60 | #define MAX_DEFAULT_IFQLEN 32 /* network qlen */ | 60 | #define MAX_DEFAULT_IFQLEN 32 /* network qlen */ |
| 61 | 61 | ||
diff --git a/drivers/staging/cxt1e1/sbecrc.c b/drivers/staging/cxt1e1/sbecrc.c index 51232948091f..3f3cd60ac367 100644 --- a/drivers/staging/cxt1e1/sbecrc.c +++ b/drivers/staging/cxt1e1/sbecrc.c | |||
| @@ -95,7 +95,7 @@ sbeCrc (u_int8_t *buffer, /* data buffer to crc */ | |||
| 95 | 95 | ||
| 96 | /* | 96 | /* |
| 97 | * if table not yet created, do so. Don't care about "extra" time | 97 | * if table not yet created, do so. Don't care about "extra" time |
| 98 | * checking this everytime sbeCrc() is called, since CRC calculations are | 98 | * checking this every time sbeCrc() is called, since CRC calculations are |
| 99 | * already time consuming | 99 | * already time consuming |
| 100 | */ | 100 | */ |
| 101 | if (!crcTableInit) | 101 | if (!crcTableInit) |
diff --git a/drivers/staging/cxt1e1/sbeproc.c b/drivers/staging/cxt1e1/sbeproc.c index 70b9b33f3522..f42531c3d8da 100644 --- a/drivers/staging/cxt1e1/sbeproc.c +++ b/drivers/staging/cxt1e1/sbeproc.c | |||
| @@ -239,7 +239,7 @@ sbecom_proc_get_sbe_info (char *buffer, char **start, off_t offset, | |||
| 239 | */ | 239 | */ |
| 240 | 240 | ||
| 241 | #if 1 | 241 | #if 1 |
| 242 | /* #4 - intepretation of above = set EOF, return len */ | 242 | /* #4 - interpretation of above = set EOF, return len */ |
| 243 | *eof = 1; | 243 | *eof = 1; |
| 244 | #endif | 244 | #endif |
| 245 | 245 | ||
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index e6c8cb3828e9..425e9274f28a 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h | |||
| @@ -856,7 +856,7 @@ typedef union _RXMAC_UNI_PF_ADDR3_t { | |||
| 856 | */ | 856 | */ |
| 857 | 857 | ||
| 858 | /* | 858 | /* |
| 859 | * structure for space availiable reg in rxmac address map. | 859 | * structure for space available reg in rxmac address map. |
| 860 | * located at address 0x4094 | 860 | * located at address 0x4094 |
| 861 | * | 861 | * |
| 862 | * 31-17: reserved | 862 | * 31-17: reserved |
| @@ -1031,7 +1031,7 @@ typedef struct _RXMAC_t { /* Location: */ | |||
| 1031 | * 31: reset MII mgmt | 1031 | * 31: reset MII mgmt |
| 1032 | * 30-6: unused | 1032 | * 30-6: unused |
| 1033 | * 5: scan auto increment | 1033 | * 5: scan auto increment |
| 1034 | * 4: preamble supress | 1034 | * 4: preamble suppress |
| 1035 | * 3: undefined | 1035 | * 3: undefined |
| 1036 | * 2-0: mgmt clock reset | 1036 | * 2-0: mgmt clock reset |
| 1037 | */ | 1037 | */ |
diff --git a/drivers/staging/et131x/et1310_phy.h b/drivers/staging/et131x/et1310_phy.h index 78349adc7d8e..946c0c547404 100644 --- a/drivers/staging/et131x/et1310_phy.h +++ b/drivers/staging/et131x/et1310_phy.h | |||
| @@ -468,7 +468,7 @@ typedef union _MI_ANAR_t { | |||
| 468 | #define TRUEPHY_ANEG_COMPLETE 1 | 468 | #define TRUEPHY_ANEG_COMPLETE 1 |
| 469 | #define TRUEPHY_ANEG_DISABLED 2 | 469 | #define TRUEPHY_ANEG_DISABLED 2 |
| 470 | 470 | ||
| 471 | /* Define duplex advertisment flags */ | 471 | /* Define duplex advertisement flags */ |
| 472 | #define TRUEPHY_ADV_DUPLEX_NONE 0x00 | 472 | #define TRUEPHY_ADV_DUPLEX_NONE 0x00 |
| 473 | #define TRUEPHY_ADV_DUPLEX_FULL 0x01 | 473 | #define TRUEPHY_ADV_DUPLEX_FULL 0x01 |
| 474 | #define TRUEPHY_ADV_DUPLEX_HALF 0x02 | 474 | #define TRUEPHY_ADV_DUPLEX_HALF 0x02 |
diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c index 339136f64be1..fc6bd438366d 100644 --- a/drivers/staging/et131x/et1310_rx.c +++ b/drivers/staging/et131x/et1310_rx.c | |||
| @@ -122,7 +122,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) | |||
| 122 | * number of entries in FBR1. | 122 | * number of entries in FBR1. |
| 123 | * | 123 | * |
| 124 | * FBR1 holds "large" frames, FBR0 holds "small" frames. If FBR1 | 124 | * FBR1 holds "large" frames, FBR0 holds "small" frames. If FBR1 |
| 125 | * entries are huge in order to accomodate a "jumbo" frame, then it | 125 | * entries are huge in order to accommodate a "jumbo" frame, then it |
| 126 | * will have less entries. Conversely, FBR1 will now be relied upon | 126 | * will have less entries. Conversely, FBR1 will now be relied upon |
| 127 | * to carry more "normal" frames, thus it's entry size also increases | 127 | * to carry more "normal" frames, thus it's entry size also increases |
| 128 | * and the number of entries goes up too (since it now carries | 128 | * and the number of entries goes up too (since it now carries |
diff --git a/drivers/staging/et131x/et131x_isr.c b/drivers/staging/et131x/et131x_isr.c index ce4d93042679..f716e408712b 100644 --- a/drivers/staging/et131x/et131x_isr.c +++ b/drivers/staging/et131x/et131x_isr.c | |||
| @@ -466,7 +466,7 @@ void et131x_isr_handler(struct work_struct *work) | |||
| 466 | /* Handle SLV Timeout Interrupt */ | 466 | /* Handle SLV Timeout Interrupt */ |
| 467 | if (status & ET_INTR_SLV_TIMEOUT) { | 467 | if (status & ET_INTR_SLV_TIMEOUT) { |
| 468 | /* | 468 | /* |
| 469 | * This means a timeout has occured on a read or | 469 | * This means a timeout has occurred on a read or |
| 470 | * write request to one of the JAGCore registers. The | 470 | * write request to one of the JAGCore registers. The |
| 471 | * Global Resources block has terminated the request | 471 | * Global Resources block has terminated the request |
| 472 | * and on a read request, returned a "fake" value. | 472 | * and on a read request, returned a "fake" value. |
diff --git a/drivers/staging/et131x/et131x_netdev.c b/drivers/staging/et131x/et131x_netdev.c index 0c298cae90d9..b25bae29042e 100644 --- a/drivers/staging/et131x/et131x_netdev.c +++ b/drivers/staging/et131x/et131x_netdev.c | |||
| @@ -415,7 +415,7 @@ void et131x_multicast(struct net_device *netdev) | |||
| 415 | */ | 415 | */ |
| 416 | PacketFilter = adapter->PacketFilter; | 416 | PacketFilter = adapter->PacketFilter; |
| 417 | 417 | ||
| 418 | /* Clear the 'multicast' flag locally; becuase we only have a single | 418 | /* Clear the 'multicast' flag locally; because we only have a single |
| 419 | * flag to check multicast, and multiple multicast addresses can be | 419 | * flag to check multicast, and multiple multicast addresses can be |
| 420 | * set, this is the easiest way to determine if more than one | 420 | * set, this is the easiest way to determine if more than one |
| 421 | * multicast address is being set. | 421 | * multicast address is being set. |
diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_dev.h b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_dev.h index 4a89bd1bbf74..0b63f051f27c 100644 --- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_dev.h +++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_dev.h | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | //--------------------------------------------------------------------------- | 30 | //--------------------------------------------------------------------------- |
| 31 | // | 31 | // |
| 32 | // Function: ft1000_read_reg | 32 | // Function: ft1000_read_reg |
| 33 | // Descripton: This function will read the value of a given ASIC register. | 33 | // Description: This function will read the value of a given ASIC register. |
| 34 | // Input: | 34 | // Input: |
| 35 | // dev - device structure | 35 | // dev - device structure |
| 36 | // offset - ASIC register offset | 36 | // offset - ASIC register offset |
| @@ -49,7 +49,7 @@ static inline u16 ft1000_read_reg (struct net_device *dev, u16 offset) { | |||
| 49 | //--------------------------------------------------------------------------- | 49 | //--------------------------------------------------------------------------- |
| 50 | // | 50 | // |
| 51 | // Function: ft1000_write_reg | 51 | // Function: ft1000_write_reg |
| 52 | // Descripton: This function will set the value for a given ASIC register. | 52 | // Description: This function will set the value for a given ASIC register. |
| 53 | // Input: | 53 | // Input: |
| 54 | // dev - device structure | 54 | // dev - device structure |
| 55 | // offset - ASIC register offset | 55 | // offset - ASIC register offset |
diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c index b0729fc3c89a..fb375ea26dd2 100644 --- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c +++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c | |||
| @@ -95,47 +95,47 @@ void put_request_value(struct net_device *dev, long lvalue); | |||
| 95 | USHORT hdr_checksum(PPSEUDO_HDR pHdr); | 95 | USHORT hdr_checksum(PPSEUDO_HDR pHdr); |
| 96 | 96 | ||
| 97 | typedef struct _DSP_FILE_HDR { | 97 | typedef struct _DSP_FILE_HDR { |
| 98 | long build_date; | 98 | u32 build_date; |
| 99 | long dsp_coff_date; | 99 | u32 dsp_coff_date; |
| 100 | long loader_code_address; | 100 | u32 loader_code_address; |
| 101 | long loader_code_size; | 101 | u32 loader_code_size; |
| 102 | long loader_code_end; | 102 | u32 loader_code_end; |
| 103 | long dsp_code_address; | 103 | u32 dsp_code_address; |
| 104 | long dsp_code_size; | 104 | u32 dsp_code_size; |
| 105 | long dsp_code_end; | 105 | u32 dsp_code_end; |
| 106 | long reserved[8]; | 106 | u32 reserved[8]; |
| 107 | } __attribute__ ((packed)) DSP_FILE_HDR, *PDSP_FILE_HDR; | 107 | } __attribute__ ((packed)) DSP_FILE_HDR, *PDSP_FILE_HDR; |
| 108 | 108 | ||
| 109 | typedef struct _DSP_FILE_HDR_5 { | 109 | typedef struct _DSP_FILE_HDR_5 { |
| 110 | long version_id; // Version ID of this image format. | 110 | u32 version_id; // Version ID of this image format. |
| 111 | long package_id; // Package ID of code release. | 111 | u32 package_id; // Package ID of code release. |
| 112 | long build_date; // Date/time stamp when file was built. | 112 | u32 build_date; // Date/time stamp when file was built. |
| 113 | long commands_offset; // Offset to attached commands in Pseudo Hdr format. | 113 | u32 commands_offset; // Offset to attached commands in Pseudo Hdr format. |
| 114 | long loader_offset; // Offset to bootloader code. | 114 | u32 loader_offset; // Offset to bootloader code. |
| 115 | long loader_code_address; // Start address of bootloader. | 115 | u32 loader_code_address; // Start address of bootloader. |
| 116 | long loader_code_end; // Where bootloader code ends. | 116 | u32 loader_code_end; // Where bootloader code ends. |
| 117 | long loader_code_size; | 117 | u32 loader_code_size; |
| 118 | long version_data_offset; // Offset were scrambled version data begins. | 118 | u32 version_data_offset; // Offset were scrambled version data begins. |
| 119 | long version_data_size; // Size, in words, of scrambled version data. | 119 | u32 version_data_size; // Size, in words, of scrambled version data. |
| 120 | long nDspImages; // Number of DSP images in file. | 120 | u32 nDspImages; // Number of DSP images in file. |
| 121 | } __attribute__ ((packed)) DSP_FILE_HDR_5, *PDSP_FILE_HDR_5; | 121 | } __attribute__ ((packed)) DSP_FILE_HDR_5, *PDSP_FILE_HDR_5; |
| 122 | 122 | ||
| 123 | typedef struct _DSP_IMAGE_INFO { | 123 | typedef struct _DSP_IMAGE_INFO { |
| 124 | long coff_date; // Date/time when DSP Coff image was built. | 124 | u32 coff_date; // Date/time when DSP Coff image was built. |
| 125 | long begin_offset; // Offset in file where image begins. | 125 | u32 begin_offset; // Offset in file where image begins. |
| 126 | long end_offset; // Offset in file where image begins. | 126 | u32 end_offset; // Offset in file where image begins. |
| 127 | long run_address; // On chip Start address of DSP code. | 127 | u32 run_address; // On chip Start address of DSP code. |
| 128 | long image_size; // Size of image. | 128 | u32 image_size; // Size of image. |
| 129 | long version; // Embedded version # of DSP code. | 129 | u32 version; // Embedded version # of DSP code. |
| 130 | } __attribute__ ((packed)) DSP_IMAGE_INFO, *PDSP_IMAGE_INFO; | 130 | } __attribute__ ((packed)) DSP_IMAGE_INFO, *PDSP_IMAGE_INFO; |
| 131 | 131 | ||
| 132 | typedef struct _DSP_IMAGE_INFO_V6 { | 132 | typedef struct _DSP_IMAGE_INFO_V6 { |
| 133 | long coff_date; // Date/time when DSP Coff image was built. | 133 | u32 coff_date; // Date/time when DSP Coff image was built. |
| 134 | long begin_offset; // Offset in file where image begins. | 134 | u32 begin_offset; // Offset in file where image begins. |
| 135 | long end_offset; // Offset in file where image begins. | 135 | u32 end_offset; // Offset in file where image begins. |
| 136 | long run_address; // On chip Start address of DSP code. | 136 | u32 run_address; // On chip Start address of DSP code. |
| 137 | long image_size; // Size of image. | 137 | u32 image_size; // Size of image. |
| 138 | long version; // Embedded version # of DSP code. | 138 | u32 version; // Embedded version # of DSP code. |
| 139 | unsigned short checksum; // Dsp File checksum | 139 | unsigned short checksum; // Dsp File checksum |
| 140 | unsigned short pad1; | 140 | unsigned short pad1; |
| 141 | } __attribute__ ((packed)) DSP_IMAGE_INFO_V6, *PDSP_IMAGE_INFO_V6; | 141 | } __attribute__ ((packed)) DSP_IMAGE_INFO_V6, *PDSP_IMAGE_INFO_V6; |
| @@ -846,8 +846,8 @@ int card_download(struct net_device *dev, const u8 *pFileStart, UINT FileLength) | |||
| 846 | break; | 846 | break; |
| 847 | 847 | ||
| 848 | case STATE_DONE_DWNLD: | 848 | case STATE_DONE_DWNLD: |
| 849 | if (((UINT) (pUcFile) - (UINT) pFileStart) >= | 849 | if (((unsigned long) (pUcFile) - (unsigned long) pFileStart) >= |
| 850 | (UINT) FileLength) { | 850 | (unsigned long) FileLength) { |
| 851 | uiState = STATE_DONE_FILE; | 851 | uiState = STATE_DONE_FILE; |
| 852 | break; | 852 | break; |
| 853 | } | 853 | } |
| @@ -901,11 +901,11 @@ int card_download(struct net_device *dev, const u8 *pFileStart, UINT FileLength) | |||
| 901 | &info->prov_list); | 901 | &info->prov_list); |
| 902 | // Move to next entry if available | 902 | // Move to next entry if available |
| 903 | pUcFile = | 903 | pUcFile = |
| 904 | (UCHAR *) ((UINT) pUcFile + | 904 | (UCHAR *) ((unsigned long) pUcFile + |
| 905 | (UINT) ((usHdrLength + 1) & 0xFFFFFFFE) + sizeof(PSEUDO_HDR)); | 905 | (unsigned long) ((usHdrLength + 1) & 0xFFFFFFFE) + sizeof(PSEUDO_HDR)); |
| 906 | if ((UINT) (pUcFile) - | 906 | if ((unsigned long) (pUcFile) - |
| 907 | (UINT) (pFileStart) >= | 907 | (unsigned long) (pFileStart) >= |
| 908 | (UINT) FileLength) { | 908 | (unsigned long) FileLength) { |
| 909 | uiState = | 909 | uiState = |
| 910 | STATE_DONE_FILE; | 910 | STATE_DONE_FILE; |
| 911 | } | 911 | } |
diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c index ff691d9b984e..eeb7dd43f9a8 100644 --- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | |||
| @@ -90,7 +90,7 @@ MODULE_SUPPORTED_DEVICE("FT1000"); | |||
| 90 | //--------------------------------------------------------------------------- | 90 | //--------------------------------------------------------------------------- |
| 91 | // | 91 | // |
| 92 | // Function: ft1000_asic_read | 92 | // Function: ft1000_asic_read |
| 93 | // Descripton: This function will retrieve the value of a specific ASIC | 93 | // Description: This function will retrieve the value of a specific ASIC |
| 94 | // register. | 94 | // register. |
| 95 | // Input: | 95 | // Input: |
| 96 | // dev - network device structure | 96 | // dev - network device structure |
| @@ -107,7 +107,7 @@ inline u16 ft1000_asic_read(struct net_device *dev, u16 offset) | |||
| 107 | //--------------------------------------------------------------------------- | 107 | //--------------------------------------------------------------------------- |
| 108 | // | 108 | // |
| 109 | // Function: ft1000_asic_write | 109 | // Function: ft1000_asic_write |
| 110 | // Descripton: This function will set the value of a specific ASIC | 110 | // Description: This function will set the value of a specific ASIC |
| 111 | // register. | 111 | // register. |
| 112 | // Input: | 112 | // Input: |
| 113 | // dev - network device structure | 113 | // dev - network device structure |
| @@ -124,7 +124,7 @@ inline void ft1000_asic_write(struct net_device *dev, u16 offset, u16 value) | |||
| 124 | //--------------------------------------------------------------------------- | 124 | //--------------------------------------------------------------------------- |
| 125 | // | 125 | // |
| 126 | // Function: ft1000_read_fifo_len | 126 | // Function: ft1000_read_fifo_len |
| 127 | // Descripton: This function will read the ASIC Uplink FIFO status register | 127 | // Description: This function will read the ASIC Uplink FIFO status register |
| 128 | // which will return the number of bytes remaining in the Uplink FIFO. | 128 | // which will return the number of bytes remaining in the Uplink FIFO. |
| 129 | // Sixteen bytes are subtracted to make sure that the ASIC does not | 129 | // Sixteen bytes are subtracted to make sure that the ASIC does not |
| 130 | // reach its threshold. | 130 | // reach its threshold. |
| @@ -148,7 +148,7 @@ static inline u16 ft1000_read_fifo_len(struct net_device *dev) | |||
| 148 | //--------------------------------------------------------------------------- | 148 | //--------------------------------------------------------------------------- |
| 149 | // | 149 | // |
| 150 | // Function: ft1000_read_dpram | 150 | // Function: ft1000_read_dpram |
| 151 | // Descripton: This function will read the specific area of dpram | 151 | // Description: This function will read the specific area of dpram |
| 152 | // (Electrabuzz ASIC only) | 152 | // (Electrabuzz ASIC only) |
| 153 | // Input: | 153 | // Input: |
| 154 | // dev - device structure | 154 | // dev - device structure |
| @@ -175,7 +175,7 @@ u16 ft1000_read_dpram(struct net_device * dev, int offset) | |||
| 175 | //--------------------------------------------------------------------------- | 175 | //--------------------------------------------------------------------------- |
| 176 | // | 176 | // |
| 177 | // Function: ft1000_write_dpram | 177 | // Function: ft1000_write_dpram |
| 178 | // Descripton: This function will write to a specific area of dpram | 178 | // Description: This function will write to a specific area of dpram |
| 179 | // (Electrabuzz ASIC only) | 179 | // (Electrabuzz ASIC only) |
| 180 | // Input: | 180 | // Input: |
| 181 | // dev - device structure | 181 | // dev - device structure |
| @@ -201,7 +201,7 @@ static inline void ft1000_write_dpram(struct net_device *dev, | |||
| 201 | //--------------------------------------------------------------------------- | 201 | //--------------------------------------------------------------------------- |
| 202 | // | 202 | // |
| 203 | // Function: ft1000_read_dpram_mag_16 | 203 | // Function: ft1000_read_dpram_mag_16 |
| 204 | // Descripton: This function will read the specific area of dpram | 204 | // Description: This function will read the specific area of dpram |
| 205 | // (Magnemite ASIC only) | 205 | // (Magnemite ASIC only) |
| 206 | // Input: | 206 | // Input: |
| 207 | // dev - device structure | 207 | // dev - device structure |
| @@ -233,7 +233,7 @@ u16 ft1000_read_dpram_mag_16(struct net_device *dev, int offset, int Index) | |||
| 233 | //--------------------------------------------------------------------------- | 233 | //--------------------------------------------------------------------------- |
| 234 | // | 234 | // |
| 235 | // Function: ft1000_write_dpram_mag_16 | 235 | // Function: ft1000_write_dpram_mag_16 |
| 236 | // Descripton: This function will write to a specific area of dpram | 236 | // Description: This function will write to a specific area of dpram |
| 237 | // (Magnemite ASIC only) | 237 | // (Magnemite ASIC only) |
| 238 | // Input: | 238 | // Input: |
| 239 | // dev - device structure | 239 | // dev - device structure |
| @@ -263,7 +263,7 @@ static inline void ft1000_write_dpram_mag_16(struct net_device *dev, | |||
| 263 | //--------------------------------------------------------------------------- | 263 | //--------------------------------------------------------------------------- |
| 264 | // | 264 | // |
| 265 | // Function: ft1000_read_dpram_mag_32 | 265 | // Function: ft1000_read_dpram_mag_32 |
| 266 | // Descripton: This function will read the specific area of dpram | 266 | // Description: This function will read the specific area of dpram |
| 267 | // (Magnemite ASIC only) | 267 | // (Magnemite ASIC only) |
| 268 | // Input: | 268 | // Input: |
| 269 | // dev - device structure | 269 | // dev - device structure |
| @@ -290,7 +290,7 @@ u32 ft1000_read_dpram_mag_32(struct net_device *dev, int offset) | |||
| 290 | //--------------------------------------------------------------------------- | 290 | //--------------------------------------------------------------------------- |
| 291 | // | 291 | // |
| 292 | // Function: ft1000_write_dpram_mag_32 | 292 | // Function: ft1000_write_dpram_mag_32 |
| 293 | // Descripton: This function will write to a specific area of dpram | 293 | // Description: This function will write to a specific area of dpram |
| 294 | // (Magnemite ASIC only) | 294 | // (Magnemite ASIC only) |
| 295 | // Input: | 295 | // Input: |
| 296 | // dev - device structure | 296 | // dev - device structure |
| @@ -315,7 +315,7 @@ void ft1000_write_dpram_mag_32(struct net_device *dev, int offset, u32 value) | |||
| 315 | //--------------------------------------------------------------------------- | 315 | //--------------------------------------------------------------------------- |
| 316 | // | 316 | // |
| 317 | // Function: ft1000_enable_interrupts | 317 | // Function: ft1000_enable_interrupts |
| 318 | // Descripton: This function will enable interrupts base on the current interrupt mask. | 318 | // Description: This function will enable interrupts base on the current interrupt mask. |
| 319 | // Input: | 319 | // Input: |
| 320 | // dev - device structure | 320 | // dev - device structure |
| 321 | // Output: | 321 | // Output: |
| @@ -340,7 +340,7 @@ static void ft1000_enable_interrupts(struct net_device *dev) | |||
| 340 | //--------------------------------------------------------------------------- | 340 | //--------------------------------------------------------------------------- |
| 341 | // | 341 | // |
| 342 | // Function: ft1000_disable_interrupts | 342 | // Function: ft1000_disable_interrupts |
| 343 | // Descripton: This function will disable all interrupts. | 343 | // Description: This function will disable all interrupts. |
| 344 | // Input: | 344 | // Input: |
| 345 | // dev - device structure | 345 | // dev - device structure |
| 346 | // Output: | 346 | // Output: |
| @@ -364,7 +364,7 @@ static void ft1000_disable_interrupts(struct net_device *dev) | |||
| 364 | //--------------------------------------------------------------------------- | 364 | //--------------------------------------------------------------------------- |
| 365 | // | 365 | // |
| 366 | // Function: ft1000_reset_asic | 366 | // Function: ft1000_reset_asic |
| 367 | // Descripton: This function will call the Card Service function to reset the | 367 | // Description: This function will call the Card Service function to reset the |
| 368 | // ASIC. | 368 | // ASIC. |
| 369 | // Input: | 369 | // Input: |
| 370 | // dev - device structure | 370 | // dev - device structure |
| @@ -408,7 +408,7 @@ static void ft1000_reset_asic(struct net_device *dev) | |||
| 408 | //--------------------------------------------------------------------------- | 408 | //--------------------------------------------------------------------------- |
| 409 | // | 409 | // |
| 410 | // Function: ft1000_reset_card | 410 | // Function: ft1000_reset_card |
| 411 | // Descripton: This function will reset the card | 411 | // Description: This function will reset the card |
| 412 | // Input: | 412 | // Input: |
| 413 | // dev - device structure | 413 | // dev - device structure |
| 414 | // Output: | 414 | // Output: |
| @@ -571,7 +571,7 @@ static int ft1000_reset_card(struct net_device *dev) | |||
| 571 | //--------------------------------------------------------------------------- | 571 | //--------------------------------------------------------------------------- |
| 572 | // | 572 | // |
| 573 | // Function: ft1000_chkcard | 573 | // Function: ft1000_chkcard |
| 574 | // Descripton: This function will check if the device is presently available on | 574 | // Description: This function will check if the device is presently available on |
| 575 | // the system. | 575 | // the system. |
| 576 | // Input: | 576 | // Input: |
| 577 | // dev - device structure | 577 | // dev - device structure |
| @@ -607,7 +607,7 @@ static int ft1000_chkcard(struct net_device *dev) | |||
| 607 | //--------------------------------------------------------------------------- | 607 | //--------------------------------------------------------------------------- |
| 608 | // | 608 | // |
| 609 | // Function: ft1000_hbchk | 609 | // Function: ft1000_hbchk |
| 610 | // Descripton: This function will perform the heart beat check of the DSP as | 610 | // Description: This function will perform the heart beat check of the DSP as |
| 611 | // well as the ASIC. | 611 | // well as the ASIC. |
| 612 | // Input: | 612 | // Input: |
| 613 | // dev - device structure | 613 | // dev - device structure |
| @@ -828,7 +828,7 @@ static void ft1000_hbchk(u_long data) | |||
| 828 | //--------------------------------------------------------------------------- | 828 | //--------------------------------------------------------------------------- |
| 829 | // | 829 | // |
| 830 | // Function: ft1000_send_cmd | 830 | // Function: ft1000_send_cmd |
| 831 | // Descripton: | 831 | // Description: |
| 832 | // Input: | 832 | // Input: |
| 833 | // Output: | 833 | // Output: |
| 834 | // | 834 | // |
| @@ -908,7 +908,7 @@ void ft1000_send_cmd (struct net_device *dev, u16 *ptempbuffer, int size, u16 qt | |||
| 908 | //--------------------------------------------------------------------------- | 908 | //--------------------------------------------------------------------------- |
| 909 | // | 909 | // |
| 910 | // Function: ft1000_receive_cmd | 910 | // Function: ft1000_receive_cmd |
| 911 | // Descripton: This function will read a message from the dpram area. | 911 | // Description: This function will read a message from the dpram area. |
| 912 | // Input: | 912 | // Input: |
| 913 | // dev - network device structure | 913 | // dev - network device structure |
| 914 | // pbuffer - caller supply address to buffer | 914 | // pbuffer - caller supply address to buffer |
| @@ -1003,7 +1003,7 @@ BOOLEAN ft1000_receive_cmd(struct net_device *dev, u16 * pbuffer, int maxsz, u16 | |||
| 1003 | //--------------------------------------------------------------------------- | 1003 | //--------------------------------------------------------------------------- |
| 1004 | // | 1004 | // |
| 1005 | // Function: ft1000_proc_drvmsg | 1005 | // Function: ft1000_proc_drvmsg |
| 1006 | // Descripton: This function will process the various driver messages. | 1006 | // Description: This function will process the various driver messages. |
| 1007 | // Input: | 1007 | // Input: |
| 1008 | // dev - device structure | 1008 | // dev - device structure |
| 1009 | // pnxtph - pointer to next pseudo header | 1009 | // pnxtph - pointer to next pseudo header |
| @@ -1285,7 +1285,7 @@ void ft1000_proc_drvmsg(struct net_device *dev) | |||
| 1285 | //--------------------------------------------------------------------------- | 1285 | //--------------------------------------------------------------------------- |
| 1286 | // | 1286 | // |
| 1287 | // Function: ft1000_parse_dpram_msg | 1287 | // Function: ft1000_parse_dpram_msg |
| 1288 | // Descripton: This function will parse the message received from the DSP | 1288 | // Description: This function will parse the message received from the DSP |
| 1289 | // via the DPRAM interface. | 1289 | // via the DPRAM interface. |
| 1290 | // Input: | 1290 | // Input: |
| 1291 | // dev - device structure | 1291 | // dev - device structure |
| @@ -1442,7 +1442,7 @@ int ft1000_parse_dpram_msg(struct net_device *dev) | |||
| 1442 | //--------------------------------------------------------------------------- | 1442 | //--------------------------------------------------------------------------- |
| 1443 | // | 1443 | // |
| 1444 | // Function: ft1000_flush_fifo | 1444 | // Function: ft1000_flush_fifo |
| 1445 | // Descripton: This function will flush one packet from the downlink | 1445 | // Description: This function will flush one packet from the downlink |
| 1446 | // FIFO. | 1446 | // FIFO. |
| 1447 | // Input: | 1447 | // Input: |
| 1448 | // dev - device structure | 1448 | // dev - device structure |
| @@ -1587,7 +1587,7 @@ static void ft1000_flush_fifo(struct net_device *dev, u16 DrvErrNum) | |||
| 1587 | //--------------------------------------------------------------------------- | 1587 | //--------------------------------------------------------------------------- |
| 1588 | // | 1588 | // |
| 1589 | // Function: ft1000_copy_up_pkt | 1589 | // Function: ft1000_copy_up_pkt |
| 1590 | // Descripton: This function will pull Flarion packets out of the Downlink | 1590 | // Description: This function will pull Flarion packets out of the Downlink |
| 1591 | // FIFO and convert it to an ethernet packet. The ethernet packet will | 1591 | // FIFO and convert it to an ethernet packet. The ethernet packet will |
| 1592 | // then be deliver to the TCP/IP stack. | 1592 | // then be deliver to the TCP/IP stack. |
| 1593 | // Input: | 1593 | // Input: |
| @@ -1773,7 +1773,7 @@ int ft1000_copy_up_pkt(struct net_device *dev) | |||
| 1773 | //--------------------------------------------------------------------------- | 1773 | //--------------------------------------------------------------------------- |
| 1774 | // | 1774 | // |
| 1775 | // Function: ft1000_copy_down_pkt | 1775 | // Function: ft1000_copy_down_pkt |
| 1776 | // Descripton: This function will take an ethernet packet and convert it to | 1776 | // Description: This function will take an ethernet packet and convert it to |
| 1777 | // a Flarion packet prior to sending it to the ASIC Downlink | 1777 | // a Flarion packet prior to sending it to the ASIC Downlink |
| 1778 | // FIFO. | 1778 | // FIFO. |
| 1779 | // Input: | 1779 | // Input: |
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c index 8e622425aa13..1972b72450d4 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c | |||
| @@ -488,7 +488,7 @@ static int check_buffers(u16 *buff_w, u16 *buff_r, int len, int offset) | |||
| 488 | // Parameters: struct ft1000_device - device structure | 488 | // Parameters: struct ft1000_device - device structure |
| 489 | // u16 **pUsFile - DSP image file pointer in u16 | 489 | // u16 **pUsFile - DSP image file pointer in u16 |
| 490 | // u8 **pUcFile - DSP image file pointer in u8 | 490 | // u8 **pUcFile - DSP image file pointer in u8 |
| 491 | // long word_length - lenght of the buffer to be written | 491 | // long word_length - length of the buffer to be written |
| 492 | // to DPRAM | 492 | // to DPRAM |
| 493 | // | 493 | // |
| 494 | // Returns: STATUS_SUCCESS - success | 494 | // Returns: STATUS_SUCCESS - success |
| @@ -628,7 +628,7 @@ static void usb_dnld_complete (struct urb *urb) | |||
| 628 | // Parameters: struct ft1000_device - device structure | 628 | // Parameters: struct ft1000_device - device structure |
| 629 | // u16 **pUsFile - DSP image file pointer in u16 | 629 | // u16 **pUsFile - DSP image file pointer in u16 |
| 630 | // u8 **pUcFile - DSP image file pointer in u8 | 630 | // u8 **pUcFile - DSP image file pointer in u8 |
| 631 | // long word_length - lenght of the buffer to be written | 631 | // long word_length - length of the buffer to be written |
| 632 | // to DPRAM | 632 | // to DPRAM |
| 633 | // | 633 | // |
| 634 | // Returns: STATUS_SUCCESS - success | 634 | // Returns: STATUS_SUCCESS - success |
| @@ -817,7 +817,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, | |||
| 817 | * Error, beyond boot code range. | 817 | * Error, beyond boot code range. |
| 818 | */ | 818 | */ |
| 819 | DEBUG | 819 | DEBUG |
| 820 | ("FT1000:download:Download error: Requested len=%d exceeds BOOT code boundry.\n", | 820 | ("FT1000:download:Download error: Requested len=%d exceeds BOOT code boundary.\n", |
| 821 | (int)word_length); | 821 | (int)word_length); |
| 822 | status = STATUS_FAILURE; | 822 | status = STATUS_FAILURE; |
| 823 | break; | 823 | break; |
| @@ -950,7 +950,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, | |||
| 950 | * Error, beyond boot code range. | 950 | * Error, beyond boot code range. |
| 951 | */ | 951 | */ |
| 952 | DEBUG | 952 | DEBUG |
| 953 | ("FT1000:download:Download error: Requested len=%d exceeds DSP code boundry.\n", | 953 | ("FT1000:download:Download error: Requested len=%d exceeds DSP code boundary.\n", |
| 954 | (int)word_length); | 954 | (int)word_length); |
| 955 | status = STATUS_FAILURE; | 955 | status = STATUS_FAILURE; |
| 956 | break; | 956 | break; |
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c index 78dcd49bb985..684e69eacb71 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | |||
| @@ -585,7 +585,7 @@ int dsp_reload(struct ft1000_device *ft1000dev) | |||
| 585 | //--------------------------------------------------------------------------- | 585 | //--------------------------------------------------------------------------- |
| 586 | // | 586 | // |
| 587 | // Function: ft1000_reset_asic | 587 | // Function: ft1000_reset_asic |
| 588 | // Descripton: This function will call the Card Service function to reset the | 588 | // Description: This function will call the Card Service function to reset the |
| 589 | // ASIC. | 589 | // ASIC. |
| 590 | // Input: | 590 | // Input: |
| 591 | // dev - device structure | 591 | // dev - device structure |
| @@ -626,7 +626,7 @@ static void ft1000_reset_asic(struct net_device *dev) | |||
| 626 | //--------------------------------------------------------------------------- | 626 | //--------------------------------------------------------------------------- |
| 627 | // | 627 | // |
| 628 | // Function: ft1000_reset_card | 628 | // Function: ft1000_reset_card |
| 629 | // Descripton: This function will reset the card | 629 | // Description: This function will reset the card |
| 630 | // Input: | 630 | // Input: |
| 631 | // dev - device structure | 631 | // dev - device structure |
| 632 | // Output: | 632 | // Output: |
| @@ -917,7 +917,7 @@ static void ft1000_usb_transmit_complete(struct urb *urb) | |||
| 917 | //--------------------------------------------------------------------------- | 917 | //--------------------------------------------------------------------------- |
| 918 | // | 918 | // |
| 919 | // Function: ft1000_copy_down_pkt | 919 | // Function: ft1000_copy_down_pkt |
| 920 | // Descripton: This function will take an ethernet packet and convert it to | 920 | // Description: This function will take an ethernet packet and convert it to |
| 921 | // a Flarion packet prior to sending it to the ASIC Downlink | 921 | // a Flarion packet prior to sending it to the ASIC Downlink |
| 922 | // FIFO. | 922 | // FIFO. |
| 923 | // Input: | 923 | // Input: |
| @@ -1075,10 +1075,10 @@ err: | |||
| 1075 | //--------------------------------------------------------------------------- | 1075 | //--------------------------------------------------------------------------- |
| 1076 | // | 1076 | // |
| 1077 | // Function: ft1000_copy_up_pkt | 1077 | // Function: ft1000_copy_up_pkt |
| 1078 | // Descripton: This function will take a packet from the FIFO up link and | 1078 | // Description: This function will take a packet from the FIFO up link and |
| 1079 | // convert it into an ethernet packet and deliver it to the IP stack | 1079 | // convert it into an ethernet packet and deliver it to the IP stack |
| 1080 | // Input: | 1080 | // Input: |
| 1081 | // urb - the receving usb urb | 1081 | // urb - the receiving usb urb |
| 1082 | // | 1082 | // |
| 1083 | // Output: | 1083 | // Output: |
| 1084 | // status - FAILURE | 1084 | // status - FAILURE |
| @@ -1182,7 +1182,7 @@ static int ft1000_copy_up_pkt(struct urb *urb) | |||
| 1182 | //--------------------------------------------------------------------------- | 1182 | //--------------------------------------------------------------------------- |
| 1183 | // | 1183 | // |
| 1184 | // Function: ft1000_submit_rx_urb | 1184 | // Function: ft1000_submit_rx_urb |
| 1185 | // Descripton: the receiving function of the network driver | 1185 | // Description: the receiving function of the network driver |
| 1186 | // | 1186 | // |
| 1187 | // Input: | 1187 | // Input: |
| 1188 | // info - a private structure contains the device information | 1188 | // info - a private structure contains the device information |
| @@ -1316,7 +1316,7 @@ Jim | |||
| 1316 | //--------------------------------------------------------------------------- | 1316 | //--------------------------------------------------------------------------- |
| 1317 | // | 1317 | // |
| 1318 | // Function: ft1000_chkcard | 1318 | // Function: ft1000_chkcard |
| 1319 | // Descripton: This function will check if the device is presently available on | 1319 | // Description: This function will check if the device is presently available on |
| 1320 | // the system. | 1320 | // the system. |
| 1321 | // Input: | 1321 | // Input: |
| 1322 | // dev - device structure | 1322 | // dev - device structure |
| @@ -1363,7 +1363,7 @@ static int ft1000_chkcard(struct ft1000_device *dev) | |||
| 1363 | //--------------------------------------------------------------------------- | 1363 | //--------------------------------------------------------------------------- |
| 1364 | // | 1364 | // |
| 1365 | // Function: ft1000_receive_cmd | 1365 | // Function: ft1000_receive_cmd |
| 1366 | // Descripton: This function will read a message from the dpram area. | 1366 | // Description: This function will read a message from the dpram area. |
| 1367 | // Input: | 1367 | // Input: |
| 1368 | // dev - network device structure | 1368 | // dev - network device structure |
| 1369 | // pbuffer - caller supply address to buffer | 1369 | // pbuffer - caller supply address to buffer |
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h b/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h index 3f72d5bb3f92..6a8a1969f9e1 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h | |||
| @@ -55,7 +55,7 @@ struct pseudo_hdr { | |||
| 55 | unsigned char seq_num; //sequence number | 55 | unsigned char seq_num; //sequence number |
| 56 | unsigned char rsvd2; //reserved | 56 | unsigned char rsvd2; //reserved |
| 57 | unsigned short qos_class; //Quality of Service class (Not applicable on Mobile) | 57 | unsigned short qos_class; //Quality of Service class (Not applicable on Mobile) |
| 58 | unsigned short checksum; //Psuedo header checksum | 58 | unsigned short checksum; //Pseudo header checksum |
| 59 | } __attribute__ ((packed)); | 59 | } __attribute__ ((packed)); |
| 60 | 60 | ||
| 61 | typedef struct _IOCTL_GET_VER | 61 | typedef struct _IOCTL_GET_VER |
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h index e047c03fbf3a..f2ecb3eae9cd 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | |||
| @@ -364,7 +364,7 @@ struct prov_record { | |||
| 364 | 364 | ||
| 365 | #define ISR_EMPTY (u8)0x00 // no bits set in ISR | 365 | #define ISR_EMPTY (u8)0x00 // no bits set in ISR |
| 366 | 366 | ||
| 367 | #define ISR_DOORBELL_ACK (u8)0x01 // the doorbell i sent has been recieved. | 367 | #define ISR_DOORBELL_ACK (u8)0x01 // the doorbell i sent has been received. |
| 368 | 368 | ||
| 369 | #define ISR_DOORBELL_PEND (u8)0x02 // doorbell for me | 369 | #define ISR_DOORBELL_PEND (u8)0x02 // doorbell for me |
| 370 | 370 | ||
diff --git a/drivers/staging/generic_serial/generic_serial.c b/drivers/staging/generic_serial/generic_serial.c index 466988dbc37d..f29dda4e9f20 100644 --- a/drivers/staging/generic_serial/generic_serial.c +++ b/drivers/staging/generic_serial/generic_serial.c | |||
| @@ -113,7 +113,7 @@ int gs_write(struct tty_struct * tty, | |||
| 113 | 113 | ||
| 114 | c = count; | 114 | c = count; |
| 115 | 115 | ||
| 116 | /* This is safe because we "OWN" the "head". Noone else can | 116 | /* This is safe because we "OWN" the "head". No one else can |
| 117 | change the "head": we own the port_write_mutex. */ | 117 | change the "head": we own the port_write_mutex. */ |
| 118 | /* Don't overrun the end of the buffer */ | 118 | /* Don't overrun the end of the buffer */ |
| 119 | t = SERIAL_XMIT_SIZE - port->xmit_head; | 119 | t = SERIAL_XMIT_SIZE - port->xmit_head; |
diff --git a/drivers/staging/generic_serial/rio/map.h b/drivers/staging/generic_serial/rio/map.h index 8366978578c1..28a66129293e 100644 --- a/drivers/staging/generic_serial/rio/map.h +++ b/drivers/staging/generic_serial/rio/map.h | |||
| @@ -87,7 +87,7 @@ struct Map { | |||
| 87 | ** The Topology array contains the ID of the unit connected to each of the | 87 | ** The Topology array contains the ID of the unit connected to each of the |
| 88 | ** four links on this unit. The entry will be 0xFFFF if NOTHING is connected | 88 | ** four links on this unit. The entry will be 0xFFFF if NOTHING is connected |
| 89 | ** to the link, or will be 0xFF00 if an UNKNOWN unit is connected to the link. | 89 | ** to the link, or will be 0xFF00 if an UNKNOWN unit is connected to the link. |
| 90 | ** The Name field is a null-terminated string, upto 31 characters, containing | 90 | ** The Name field is a null-terminated string, up to 31 characters, containing |
| 91 | ** the 'cute' name that the sysadmin/users know the RTA by. It is permissible | 91 | ** the 'cute' name that the sysadmin/users know the RTA by. It is permissible |
| 92 | ** for this string to contain any character in the range \040 to \176 inclusive. | 92 | ** for this string to contain any character in the range \040 to \176 inclusive. |
| 93 | ** In particular, ctrl sequences and DEL (0x7F, \177) are not allowed. The | 93 | ** In particular, ctrl sequences and DEL (0x7F, \177) are not allowed. The |
diff --git a/drivers/staging/generic_serial/rio/rioboot.c b/drivers/staging/generic_serial/rio/rioboot.c index d956dd316005..ffa01c590216 100644 --- a/drivers/staging/generic_serial/rio/rioboot.c +++ b/drivers/staging/generic_serial/rio/rioboot.c | |||
| @@ -109,7 +109,7 @@ int RIOBootCodeRTA(struct rio_info *p, struct DownLoad * rbp) | |||
| 109 | rio_dprintk(RIO_DEBUG_BOOT, "Data at user address %p\n", rbp->DataP); | 109 | rio_dprintk(RIO_DEBUG_BOOT, "Data at user address %p\n", rbp->DataP); |
| 110 | 110 | ||
| 111 | /* | 111 | /* |
| 112 | ** Check that we have set asside enough memory for this | 112 | ** Check that we have set aside enough memory for this |
| 113 | */ | 113 | */ |
| 114 | if (rbp->Count > SIXTY_FOUR_K) { | 114 | if (rbp->Count > SIXTY_FOUR_K) { |
| 115 | rio_dprintk(RIO_DEBUG_BOOT, "RTA Boot Code Too Large!\n"); | 115 | rio_dprintk(RIO_DEBUG_BOOT, "RTA Boot Code Too Large!\n"); |
| @@ -293,7 +293,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) | |||
| 293 | /* | 293 | /* |
| 294 | ** S T O P ! | 294 | ** S T O P ! |
| 295 | ** | 295 | ** |
| 296 | ** Upto this point the code has been fairly rational, and possibly | 296 | ** Up to this point the code has been fairly rational, and possibly |
| 297 | ** even straight forward. What follows is a pile of crud that will | 297 | ** even straight forward. What follows is a pile of crud that will |
| 298 | ** magically turn into six bytes of transputer assembler. Normally | 298 | ** magically turn into six bytes of transputer assembler. Normally |
| 299 | ** you would expect an array or something, but, being me, I have | 299 | ** you would expect an array or something, but, being me, I have |
| @@ -419,7 +419,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) | |||
| 419 | rio_dprintk(RIO_DEBUG_BOOT, "Set control port\n"); | 419 | rio_dprintk(RIO_DEBUG_BOOT, "Set control port\n"); |
| 420 | 420 | ||
| 421 | /* | 421 | /* |
| 422 | ** Now, wait for upto five seconds for the Tp to setup the parmmap | 422 | ** Now, wait for up to five seconds for the Tp to setup the parmmap |
| 423 | ** pointer: | 423 | ** pointer: |
| 424 | */ | 424 | */ |
| 425 | for (wait_count = 0; (wait_count < p->RIOConf.StartupTime) && (readw(&HostP->__ParmMapR) == OldParmMap); wait_count++) { | 425 | for (wait_count = 0; (wait_count < p->RIOConf.StartupTime) && (readw(&HostP->__ParmMapR) == OldParmMap); wait_count++) { |
| @@ -475,7 +475,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) | |||
| 475 | 475 | ||
| 476 | /* | 476 | /* |
| 477 | ** now wait for the card to set all the parmmap->XXX stuff | 477 | ** now wait for the card to set all the parmmap->XXX stuff |
| 478 | ** this is a wait of upto two seconds.... | 478 | ** this is a wait of up to two seconds.... |
| 479 | */ | 479 | */ |
| 480 | rio_dprintk(RIO_DEBUG_BOOT, "Looking for init_done - %d ticks\n", p->RIOConf.StartupTime); | 480 | rio_dprintk(RIO_DEBUG_BOOT, "Looking for init_done - %d ticks\n", p->RIOConf.StartupTime); |
| 481 | HostP->timeout_id = 0; | 481 | HostP->timeout_id = 0; |
diff --git a/drivers/staging/generic_serial/rio/riocmd.c b/drivers/staging/generic_serial/rio/riocmd.c index f121357e5af0..61efd538e850 100644 --- a/drivers/staging/generic_serial/rio/riocmd.c +++ b/drivers/staging/generic_serial/rio/riocmd.c | |||
| @@ -863,7 +863,7 @@ int RIOUnUse(unsigned long iPortP, struct CmdBlk *CmdBlkP) | |||
| 863 | ** being transferred from the write queue into the transmit packets | 863 | ** being transferred from the write queue into the transmit packets |
| 864 | ** (add_transmit) and no furthur transmit interrupt will be sent for that | 864 | ** (add_transmit) and no furthur transmit interrupt will be sent for that |
| 865 | ** data. The next interrupt will occur up to 500ms later (RIOIntr is called | 865 | ** data. The next interrupt will occur up to 500ms later (RIOIntr is called |
| 866 | ** twice a second as a saftey measure). This was the case when kermit was | 866 | ** twice a second as a safety measure). This was the case when kermit was |
| 867 | ** used to send data into a RIO port. After each packet was sent, TCFLSH | 867 | ** used to send data into a RIO port. After each packet was sent, TCFLSH |
| 868 | ** was called to flush the read queue preemptively. PortP->InUse was | 868 | ** was called to flush the read queue preemptively. PortP->InUse was |
| 869 | ** incremented, thereby blocking the 6 byte acknowledgement packet | 869 | ** incremented, thereby blocking the 6 byte acknowledgement packet |
diff --git a/drivers/staging/generic_serial/rio/rioroute.c b/drivers/staging/generic_serial/rio/rioroute.c index f9b936ac3394..8757378e8320 100644 --- a/drivers/staging/generic_serial/rio/rioroute.c +++ b/drivers/staging/generic_serial/rio/rioroute.c | |||
| @@ -450,7 +450,7 @@ int RIORouteRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct | |||
| 450 | ** we reset the unit, because we didn't boot it. | 450 | ** we reset the unit, because we didn't boot it. |
| 451 | ** However, if the table is full, it could be that we did boot | 451 | ** However, if the table is full, it could be that we did boot |
| 452 | ** this unit, and so we won't reboot it, because it isn't really | 452 | ** this unit, and so we won't reboot it, because it isn't really |
| 453 | ** all that disasterous to keep the old bins in most cases. This | 453 | ** all that disastrous to keep the old bins in most cases. This |
| 454 | ** is a rather tacky feature, but we are on the edge of reallity | 454 | ** is a rather tacky feature, but we are on the edge of reallity |
| 455 | ** here, because the implication is that someone has connected | 455 | ** here, because the implication is that someone has connected |
| 456 | ** 16+MAX_EXTRA_UNITS onto one host. | 456 | ** 16+MAX_EXTRA_UNITS onto one host. |
| @@ -678,7 +678,7 @@ static int RIOCheck(struct Host *HostP, unsigned int UnitId) | |||
| 678 | 678 | ||
| 679 | HostP->Mapping[UnitId].Flags &= ~BEEN_HERE; | 679 | HostP->Mapping[UnitId].Flags &= ~BEEN_HERE; |
| 680 | 680 | ||
| 681 | /* rio_dprint(RIO_DEBUG_ROUTE, ("Unit %d DOESNT KNOW THE HOST!\n", UnitId)); */ | 681 | /* rio_dprint(RIO_DEBUG_ROUTE, ("Unit %d DOESN'T KNOW THE HOST!\n", UnitId)); */ |
| 682 | 682 | ||
| 683 | return 0; | 683 | return 0; |
| 684 | } | 684 | } |
diff --git a/drivers/staging/generic_serial/rio/riotty.c b/drivers/staging/generic_serial/rio/riotty.c index 8a90393faf3c..e7e9911d7a72 100644 --- a/drivers/staging/generic_serial/rio/riotty.c +++ b/drivers/staging/generic_serial/rio/riotty.c | |||
| @@ -124,7 +124,7 @@ int riotopen(struct tty_struct *tty, struct file *filp) | |||
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | /* | 126 | /* |
| 127 | ** Grab pointer to the port stucture | 127 | ** Grab pointer to the port structure |
| 128 | */ | 128 | */ |
| 129 | PortP = p->RIOPortp[SysPort]; /* Get control struc */ | 129 | PortP = p->RIOPortp[SysPort]; /* Get control struc */ |
| 130 | rio_dprintk(RIO_DEBUG_TTY, "PortP: %p\n", PortP); | 130 | rio_dprintk(RIO_DEBUG_TTY, "PortP: %p\n", PortP); |
| @@ -161,7 +161,7 @@ int riotopen(struct tty_struct *tty, struct file *filp) | |||
| 161 | } | 161 | } |
| 162 | 162 | ||
| 163 | /* | 163 | /* |
| 164 | ** If the RTA has not booted yet and the user has choosen to block | 164 | ** If the RTA has not booted yet and the user has chosen to block |
| 165 | ** until the RTA is present then we must spin here waiting for | 165 | ** until the RTA is present then we must spin here waiting for |
| 166 | ** the RTA to boot. | 166 | ** the RTA to boot. |
| 167 | */ | 167 | */ |
diff --git a/drivers/staging/generic_serial/sx.c b/drivers/staging/generic_serial/sx.c index 1291462bcddb..4f94aaffbe83 100644 --- a/drivers/staging/generic_serial/sx.c +++ b/drivers/staging/generic_serial/sx.c | |||
| @@ -158,13 +158,13 @@ | |||
| 158 | * Readying for release on 2.0.x (sorry David, 1.01 becomes 1.1 for RCS). | 158 | * Readying for release on 2.0.x (sorry David, 1.01 becomes 1.1 for RCS). |
| 159 | * | 159 | * |
| 160 | * Revision 0.12 1999/03/28 09:20:10 wolff | 160 | * Revision 0.12 1999/03/28 09:20:10 wolff |
| 161 | * Fixed problem in 0.11, continueing cleanup. | 161 | * Fixed problem in 0.11, continuing cleanup. |
| 162 | * | 162 | * |
| 163 | * Revision 0.11 1999/03/28 08:46:44 wolff | 163 | * Revision 0.11 1999/03/28 08:46:44 wolff |
| 164 | * cleanup. Not good. | 164 | * cleanup. Not good. |
| 165 | * | 165 | * |
| 166 | * Revision 0.10 1999/03/28 08:09:43 wolff | 166 | * Revision 0.10 1999/03/28 08:09:43 wolff |
| 167 | * Fixed loosing characters on close. | 167 | * Fixed losing characters on close. |
| 168 | * | 168 | * |
| 169 | * Revision 0.9 1999/03/21 22:52:01 wolff | 169 | * Revision 0.9 1999/03/21 22:52:01 wolff |
| 170 | * Ported back to 2.2.... (minor things) | 170 | * Ported back to 2.2.... (minor things) |
| @@ -1588,7 +1588,7 @@ static void sx_close(void *ptr) | |||
| 1588 | #define R0 if (read_sx_byte(board, i) != 0x55) return 1 | 1588 | #define R0 if (read_sx_byte(board, i) != 0x55) return 1 |
| 1589 | #define R1 if (read_sx_byte(board, i) != 0xaa) return 1 | 1589 | #define R1 if (read_sx_byte(board, i) != 0xaa) return 1 |
| 1590 | 1590 | ||
| 1591 | /* This memtest takes a human-noticable time. You normally only do it | 1591 | /* This memtest takes a human-noticeable time. You normally only do it |
| 1592 | once a boot, so I guess that it is worth it. */ | 1592 | once a boot, so I guess that it is worth it. */ |
| 1593 | static int do_memtest(struct sx_board *board, int min, int max) | 1593 | static int do_memtest(struct sx_board *board, int min, int max) |
| 1594 | { | 1594 | { |
| @@ -1645,7 +1645,7 @@ static int do_memtest(struct sx_board *board, int min, int max) | |||
| 1645 | #define R1 if (read_sx_word(board, i) != 0xaa55) return 1 | 1645 | #define R1 if (read_sx_word(board, i) != 0xaa55) return 1 |
| 1646 | 1646 | ||
| 1647 | #if 0 | 1647 | #if 0 |
| 1648 | /* This memtest takes a human-noticable time. You normally only do it | 1648 | /* This memtest takes a human-noticeable time. You normally only do it |
| 1649 | once a boot, so I guess that it is worth it. */ | 1649 | once a boot, so I guess that it is worth it. */ |
| 1650 | static int do_memtest_w(struct sx_board *board, int min, int max) | 1650 | static int do_memtest_w(struct sx_board *board, int min, int max) |
| 1651 | { | 1651 | { |
diff --git a/drivers/staging/gma500/psb_drm.h b/drivers/staging/gma500/psb_drm.h index fb9b4245bada..a339406052ef 100644 --- a/drivers/staging/gma500/psb_drm.h +++ b/drivers/staging/gma500/psb_drm.h | |||
| @@ -131,7 +131,7 @@ struct drm_psb_reloc { | |||
| 131 | u32 pre_add; /* Destination format: */ | 131 | u32 pre_add; /* Destination format: */ |
| 132 | u32 background; /* Destination add */ | 132 | u32 background; /* Destination add */ |
| 133 | u32 dst_buffer; /* Destination buffer. Index into buffer_list */ | 133 | u32 dst_buffer; /* Destination buffer. Index into buffer_list */ |
| 134 | u32 arg0; /* Reloc-op dependant */ | 134 | u32 arg0; /* Reloc-op dependent */ |
| 135 | u32 arg1; | 135 | u32 arg1; |
| 136 | }; | 136 | }; |
| 137 | 137 | ||
diff --git a/drivers/staging/gma500/psb_drv.c b/drivers/staging/gma500/psb_drv.c index 44cd095d2862..d01d45e7a14d 100644 --- a/drivers/staging/gma500/psb_drv.c +++ b/drivers/staging/gma500/psb_drv.c | |||
| @@ -561,7 +561,7 @@ static int psb_driver_unload(struct drm_device *dev) | |||
| 561 | kfree(dev_priv); | 561 | kfree(dev_priv); |
| 562 | dev->dev_private = NULL; | 562 | dev->dev_private = NULL; |
| 563 | 563 | ||
| 564 | /*destory VBT data*/ | 564 | /*destroy VBT data*/ |
| 565 | psb_intel_destroy_bios(dev); | 565 | psb_intel_destroy_bios(dev); |
| 566 | } | 566 | } |
| 567 | 567 | ||
diff --git a/drivers/staging/gma500/psb_intel_bios.c b/drivers/staging/gma500/psb_intel_bios.c index f5bcd119b87d..48ac8ba7f40b 100644 --- a/drivers/staging/gma500/psb_intel_bios.c +++ b/drivers/staging/gma500/psb_intel_bios.c | |||
| @@ -271,7 +271,7 @@ bool psb_intel_init_bios(struct drm_device *dev) | |||
| 271 | } | 271 | } |
| 272 | 272 | ||
| 273 | /** | 273 | /** |
| 274 | * Destory and free VBT data | 274 | * Destroy and free VBT data |
| 275 | */ | 275 | */ |
| 276 | void psb_intel_destroy_bios(struct drm_device *dev) | 276 | void psb_intel_destroy_bios(struct drm_device *dev) |
| 277 | { | 277 | { |
diff --git a/drivers/staging/gma500/psb_intel_sdvo.c b/drivers/staging/gma500/psb_intel_sdvo.c index 731a5a2261d3..1d2bb021c0a5 100644 --- a/drivers/staging/gma500/psb_intel_sdvo.c +++ b/drivers/staging/gma500/psb_intel_sdvo.c | |||
| @@ -573,7 +573,7 @@ static bool psb_sdvo_set_current_inoutmap(struct psb_intel_output *output, | |||
| 573 | /* Make all fields of the args/ret to zero */ | 573 | /* Make all fields of the args/ret to zero */ |
| 574 | memset(byArgs, 0, sizeof(byArgs)); | 574 | memset(byArgs, 0, sizeof(byArgs)); |
| 575 | 575 | ||
| 576 | /* Fill up the arguement values; */ | 576 | /* Fill up the argument values; */ |
| 577 | byArgs[0] = (u8) (in0outputmask & 0xFF); | 577 | byArgs[0] = (u8) (in0outputmask & 0xFF); |
| 578 | byArgs[1] = (u8) ((in0outputmask >> 8) & 0xFF); | 578 | byArgs[1] = (u8) ((in0outputmask >> 8) & 0xFF); |
| 579 | byArgs[2] = (u8) (in1outputmask & 0xFF); | 579 | byArgs[2] = (u8) (in1outputmask & 0xFF); |
diff --git a/drivers/staging/gma500/psb_intel_sdvo_regs.h b/drivers/staging/gma500/psb_intel_sdvo_regs.h index a1d1475a9315..c7107a37e33d 100644 --- a/drivers/staging/gma500/psb_intel_sdvo_regs.h +++ b/drivers/staging/gma500/psb_intel_sdvo_regs.h | |||
| @@ -217,7 +217,7 @@ struct psb_intel_sdvo_set_target_input_args { | |||
| 217 | } __attribute__ ((packed)); | 217 | } __attribute__ ((packed)); |
| 218 | 218 | ||
| 219 | /** | 219 | /** |
| 220 | * Takes a struct psb_intel_sdvo_output_flags of which outputs are targetted by | 220 | * Takes a struct psb_intel_sdvo_output_flags of which outputs are targeted by |
| 221 | * future output commands. | 221 | * future output commands. |
| 222 | * | 222 | * |
| 223 | * Affected commands inclue SET_OUTPUT_TIMINGS_PART[12], | 223 | * Affected commands inclue SET_OUTPUT_TIMINGS_PART[12], |
diff --git a/drivers/staging/gma500/psb_ttm_fence_user.h b/drivers/staging/gma500/psb_ttm_fence_user.h index fc13f89c6e12..762a05728632 100644 --- a/drivers/staging/gma500/psb_ttm_fence_user.h +++ b/drivers/staging/gma500/psb_ttm_fence_user.h | |||
| @@ -130,7 +130,7 @@ struct ttm_fence_unref_arg { | |||
| 130 | }; | 130 | }; |
| 131 | 131 | ||
| 132 | /* | 132 | /* |
| 133 | * Ioctl offsets frome extenstion start. | 133 | * Ioctl offsets from extenstion start. |
| 134 | */ | 134 | */ |
| 135 | 135 | ||
| 136 | #define TTM_FENCE_SIGNALED 0x01 | 136 | #define TTM_FENCE_SIGNALED 0x01 |
diff --git a/drivers/staging/go7007/go7007.txt b/drivers/staging/go7007/go7007.txt index 06a76da32128..9db1f3952fd2 100644 --- a/drivers/staging/go7007/go7007.txt +++ b/drivers/staging/go7007/go7007.txt | |||
| @@ -2,7 +2,7 @@ This is a driver for the WIS GO7007SB multi-format video encoder. | |||
| 2 | 2 | ||
| 3 | Pete Eberlein <pete@sensoray.com> | 3 | Pete Eberlein <pete@sensoray.com> |
| 4 | 4 | ||
| 5 | The driver was orignally released under the GPL and is currently hosted at: | 5 | The driver was originally released under the GPL and is currently hosted at: |
| 6 | http://nikosapi.org/wiki/index.php/WIS_Go7007_Linux_driver | 6 | http://nikosapi.org/wiki/index.php/WIS_Go7007_Linux_driver |
| 7 | The go7007 firmware can be acquired from the package on the site above. | 7 | The go7007 firmware can be acquired from the package on the site above. |
| 8 | 8 | ||
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c index af789937be4e..68ad17d67098 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c | |||
| @@ -894,7 +894,7 @@ static int blkvsc_submit_request(struct blkvsc_request *blkvsc_req, | |||
| 894 | 894 | ||
| 895 | /* | 895 | /* |
| 896 | * We break the request into 1 or more blkvsc_requests and submit | 896 | * We break the request into 1 or more blkvsc_requests and submit |
| 897 | * them. If we cant submit them all, we put them on the | 897 | * them. If we can't submit them all, we put them on the |
| 898 | * pending_list. The blkvsc_request() will work on the pending_list. | 898 | * pending_list. The blkvsc_request() will work on the pending_list. |
| 899 | */ | 899 | */ |
| 900 | static int blkvsc_do_request(struct block_device_context *blkdev, | 900 | static int blkvsc_do_request(struct block_device_context *blkdev, |
diff --git a/drivers/staging/hv/channel.c b/drivers/staging/hv/channel.c index 775a52a91222..f7ce7d2494b3 100644 --- a/drivers/staging/hv/channel.c +++ b/drivers/staging/hv/channel.c | |||
| @@ -81,14 +81,14 @@ static void vmbus_setevent(struct vmbus_channel *channel) | |||
| 81 | 81 | ||
| 82 | if (channel->offermsg.monitor_allocated) { | 82 | if (channel->offermsg.monitor_allocated) { |
| 83 | /* Each u32 represents 32 channels */ | 83 | /* Each u32 represents 32 channels */ |
| 84 | set_bit(channel->offermsg.child_relid & 31, | 84 | sync_set_bit(channel->offermsg.child_relid & 31, |
| 85 | (unsigned long *) vmbus_connection.send_int_page + | 85 | (unsigned long *) vmbus_connection.send_int_page + |
| 86 | (channel->offermsg.child_relid >> 5)); | 86 | (channel->offermsg.child_relid >> 5)); |
| 87 | 87 | ||
| 88 | monitorpage = vmbus_connection.monitor_pages; | 88 | monitorpage = vmbus_connection.monitor_pages; |
| 89 | monitorpage++; /* Get the child to parent monitor page */ | 89 | monitorpage++; /* Get the child to parent monitor page */ |
| 90 | 90 | ||
| 91 | set_bit(channel->monitor_bit, | 91 | sync_set_bit(channel->monitor_bit, |
| 92 | (unsigned long *)&monitorpage->trigger_group | 92 | (unsigned long *)&monitorpage->trigger_group |
| 93 | [channel->monitor_grp].pending); | 93 | [channel->monitor_grp].pending); |
| 94 | 94 | ||
| @@ -104,7 +104,7 @@ static void VmbusChannelClearEvent(struct vmbus_channel *channel) | |||
| 104 | 104 | ||
| 105 | if (Channel->offermsg.monitor_allocated) { | 105 | if (Channel->offermsg.monitor_allocated) { |
| 106 | /* Each u32 represents 32 channels */ | 106 | /* Each u32 represents 32 channels */ |
| 107 | clear_bit(Channel->offermsg.child_relid & 31, | 107 | sync_clear_bit(Channel->offermsg.child_relid & 31, |
| 108 | (unsigned long *)vmbus_connection.send_int_page + | 108 | (unsigned long *)vmbus_connection.send_int_page + |
| 109 | (Channel->offermsg.child_relid >> 5)); | 109 | (Channel->offermsg.child_relid >> 5)); |
| 110 | 110 | ||
| @@ -112,7 +112,7 @@ static void VmbusChannelClearEvent(struct vmbus_channel *channel) | |||
| 112 | vmbus_connection.monitor_pages; | 112 | vmbus_connection.monitor_pages; |
| 113 | monitorPage++; /* Get the child to parent monitor page */ | 113 | monitorPage++; /* Get the child to parent monitor page */ |
| 114 | 114 | ||
| 115 | clear_bit(Channel->monitor_bit, | 115 | sync_clear_bit(Channel->monitor_bit, |
| 116 | (unsigned long *)&monitorPage->trigger_group | 116 | (unsigned long *)&monitorPage->trigger_group |
| 117 | [Channel->monitor_grp].Pending); | 117 | [Channel->monitor_grp].Pending); |
| 118 | } | 118 | } |
diff --git a/drivers/staging/hv/channel_mgmt.c b/drivers/staging/hv/channel_mgmt.c index bc0393a41d29..06b573227e8d 100644 --- a/drivers/staging/hv/channel_mgmt.c +++ b/drivers/staging/hv/channel_mgmt.c | |||
| @@ -166,7 +166,7 @@ EXPORT_SYMBOL(prep_negotiate_resp); | |||
| 166 | * from Hyper-V. This stub responds to the default negotiate messages | 166 | * from Hyper-V. This stub responds to the default negotiate messages |
| 167 | * that come in for every non IDE/SCSI/Network request. | 167 | * that come in for every non IDE/SCSI/Network request. |
| 168 | * This behavior is normally overwritten in the hv_utils driver. That | 168 | * This behavior is normally overwritten in the hv_utils driver. That |
| 169 | * driver handles requests like gracefull shutdown, heartbeats etc. | 169 | * driver handles requests like graceful shutdown, heartbeats etc. |
| 170 | * | 170 | * |
| 171 | * Mainly used by Hyper-V drivers. | 171 | * Mainly used by Hyper-V drivers. |
| 172 | */ | 172 | */ |
diff --git a/drivers/staging/hv/connection.c b/drivers/staging/hv/connection.c index 44b203b95a22..afc8116e7aa4 100644 --- a/drivers/staging/hv/connection.c +++ b/drivers/staging/hv/connection.c | |||
| @@ -296,7 +296,7 @@ void vmbus_on_event(unsigned long data) | |||
| 296 | for (dword = 0; dword < maxdword; dword++) { | 296 | for (dword = 0; dword < maxdword; dword++) { |
| 297 | if (recv_int_page[dword]) { | 297 | if (recv_int_page[dword]) { |
| 298 | for (bit = 0; bit < 32; bit++) { | 298 | for (bit = 0; bit < 32; bit++) { |
| 299 | if (test_and_clear_bit(bit, | 299 | if (sync_test_and_clear_bit(bit, |
| 300 | (unsigned long *) | 300 | (unsigned long *) |
| 301 | &recv_int_page[dword])) { | 301 | &recv_int_page[dword])) { |
| 302 | relid = (dword << 5) + bit; | 302 | relid = (dword << 5) + bit; |
| @@ -338,7 +338,7 @@ int vmbus_post_msg(void *buffer, size_t buflen) | |||
| 338 | int vmbus_set_event(u32 child_relid) | 338 | int vmbus_set_event(u32 child_relid) |
| 339 | { | 339 | { |
| 340 | /* Each u32 represents 32 channels */ | 340 | /* Each u32 represents 32 channels */ |
| 341 | set_bit(child_relid & 31, | 341 | sync_set_bit(child_relid & 31, |
| 342 | (unsigned long *)vmbus_connection.send_int_page + | 342 | (unsigned long *)vmbus_connection.send_int_page + |
| 343 | (child_relid >> 5)); | 343 | (child_relid >> 5)); |
| 344 | 344 | ||
diff --git a/drivers/staging/hv/hv.c b/drivers/staging/hv/hv.c index 2d492adb95bb..0b06f4fe5838 100644 --- a/drivers/staging/hv/hv.c +++ b/drivers/staging/hv/hv.c | |||
| @@ -37,7 +37,7 @@ struct hv_context hv_context = { | |||
| 37 | 37 | ||
| 38 | /* | 38 | /* |
| 39 | * query_hypervisor_presence | 39 | * query_hypervisor_presence |
| 40 | * - Query the cpuid for presense of windows hypervisor | 40 | * - Query the cpuid for presence of windows hypervisor |
| 41 | */ | 41 | */ |
| 42 | static int query_hypervisor_presence(void) | 42 | static int query_hypervisor_presence(void) |
| 43 | { | 43 | { |
diff --git a/drivers/staging/hv/hv_api.h b/drivers/staging/hv/hv_api.h index 7114fceab21e..43a722888dc4 100644 --- a/drivers/staging/hv/hv_api.h +++ b/drivers/staging/hv/hv_api.h | |||
| @@ -53,14 +53,14 @@ struct hv_guid { | |||
| 53 | 53 | ||
| 54 | /* | 54 | /* |
| 55 | * HV_STATUS_INVALID_ALIGNMENT | 55 | * HV_STATUS_INVALID_ALIGNMENT |
| 56 | * The hypervisor could not perform the operation beacuse a parameter has an | 56 | * The hypervisor could not perform the operation because a parameter has an |
| 57 | * invalid alignment. | 57 | * invalid alignment. |
| 58 | */ | 58 | */ |
| 59 | #define HV_STATUS_INVALID_ALIGNMENT ((u16)0x0004) | 59 | #define HV_STATUS_INVALID_ALIGNMENT ((u16)0x0004) |
| 60 | 60 | ||
| 61 | /* | 61 | /* |
| 62 | * HV_STATUS_INVALID_PARAMETER | 62 | * HV_STATUS_INVALID_PARAMETER |
| 63 | * The hypervisor could not perform the operation beacuse an invalid parameter | 63 | * The hypervisor could not perform the operation because an invalid parameter |
| 64 | * was specified. | 64 | * was specified. |
| 65 | */ | 65 | */ |
| 66 | #define HV_STATUS_INVALID_PARAMETER ((u16)0x0005) | 66 | #define HV_STATUS_INVALID_PARAMETER ((u16)0x0005) |
diff --git a/drivers/staging/hv/hv_kvp.h b/drivers/staging/hv/hv_kvp.h index e069f59b5135..8c402f357d37 100644 --- a/drivers/staging/hv/hv_kvp.h +++ b/drivers/staging/hv/hv_kvp.h | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | * registry. | 36 | * registry. |
| 37 | * | 37 | * |
| 38 | * Note: This value is used in defining the KVP exchange message - this value | 38 | * Note: This value is used in defining the KVP exchange message - this value |
| 39 | * cannot be modified without affecting the message size and compatability. | 39 | * cannot be modified without affecting the message size and compatibility. |
| 40 | */ | 40 | */ |
| 41 | 41 | ||
| 42 | /* | 42 | /* |
diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c index 50147f84741c..118c7be22562 100644 --- a/drivers/staging/hv/hv_mouse.c +++ b/drivers/staging/hv/hv_mouse.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | */ | 14 | */ |
| 15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
| 16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
| 17 | #include <linux/delay.h> | ||
| 17 | #include <linux/device.h> | 18 | #include <linux/device.h> |
| 18 | #include <linux/workqueue.h> | 19 | #include <linux/workqueue.h> |
| 19 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
| @@ -23,6 +24,7 @@ | |||
| 23 | #include <linux/hiddev.h> | 24 | #include <linux/hiddev.h> |
| 24 | #include <linux/pci.h> | 25 | #include <linux/pci.h> |
| 25 | #include <linux/dmi.h> | 26 | #include <linux/dmi.h> |
| 27 | #include <linux/delay.h> | ||
| 26 | 28 | ||
| 27 | #include "hv_api.h" | 29 | #include "hv_api.h" |
| 28 | #include "logging.h" | 30 | #include "logging.h" |
| @@ -374,7 +376,7 @@ static void MousevscOnReceiveDeviceInfo(struct mousevsc_dev *InputDevice, struct | |||
| 374 | desc->desc[0].wDescriptorLength); | 376 | desc->desc[0].wDescriptorLength); |
| 375 | 377 | ||
| 376 | /* Send the ack */ | 378 | /* Send the ack */ |
| 377 | memset(&ack, sizeof(struct mousevsc_prt_msg), 0); | 379 | memset(&ack, 0, sizeof(struct mousevsc_prt_msg)); |
| 378 | 380 | ||
| 379 | ack.type = PipeMessageData; | 381 | ack.type = PipeMessageData; |
| 380 | ack.size = sizeof(struct synthhid_device_info_ack); | 382 | ack.size = sizeof(struct synthhid_device_info_ack); |
| @@ -595,7 +597,7 @@ static int MousevscConnectToVsp(struct hv_device *Device) | |||
| 595 | /* | 597 | /* |
| 596 | * Now, initiate the vsc/vsp initialization protocol on the open channel | 598 | * Now, initiate the vsc/vsp initialization protocol on the open channel |
| 597 | */ | 599 | */ |
| 598 | memset(request, sizeof(struct mousevsc_prt_msg), 0); | 600 | memset(request, 0, sizeof(struct mousevsc_prt_msg)); |
| 599 | 601 | ||
| 600 | request->type = PipeMessageData; | 602 | request->type = PipeMessageData; |
| 601 | request->size = sizeof(struct synthhid_protocol_request); | 603 | request->size = sizeof(struct synthhid_protocol_request); |
diff --git a/drivers/staging/hv/hv_util.c b/drivers/staging/hv/hv_util.c index 4792f2c402b2..2df15683f8fa 100644 --- a/drivers/staging/hv/hv_util.c +++ b/drivers/staging/hv/hv_util.c | |||
| @@ -80,7 +80,7 @@ static void shutdown_onchannelcallback(void *context) | |||
| 80 | execute_shutdown = true; | 80 | execute_shutdown = true; |
| 81 | 81 | ||
| 82 | DPRINT_INFO(VMBUS, "Shutdown request received -" | 82 | DPRINT_INFO(VMBUS, "Shutdown request received -" |
| 83 | " gracefull shutdown initiated"); | 83 | " graceful shutdown initiated"); |
| 84 | break; | 84 | break; |
| 85 | default: | 85 | default: |
| 86 | icmsghdrp->status = HV_E_FAIL; | 86 | icmsghdrp->status = HV_E_FAIL; |
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 2d40f5f86b24..33973568214f 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c | |||
| @@ -46,6 +46,7 @@ struct net_device_context { | |||
| 46 | /* point back to our device context */ | 46 | /* point back to our device context */ |
| 47 | struct hv_device *device_ctx; | 47 | struct hv_device *device_ctx; |
| 48 | unsigned long avail; | 48 | unsigned long avail; |
| 49 | struct work_struct work; | ||
| 49 | }; | 50 | }; |
| 50 | 51 | ||
| 51 | 52 | ||
| @@ -219,6 +220,7 @@ static void netvsc_linkstatus_callback(struct hv_device *device_obj, | |||
| 219 | unsigned int status) | 220 | unsigned int status) |
| 220 | { | 221 | { |
| 221 | struct net_device *net = dev_get_drvdata(&device_obj->device); | 222 | struct net_device *net = dev_get_drvdata(&device_obj->device); |
| 223 | struct net_device_context *ndev_ctx; | ||
| 222 | 224 | ||
| 223 | if (!net) { | 225 | if (!net) { |
| 224 | DPRINT_ERR(NETVSC_DRV, "got link status but net device " | 226 | DPRINT_ERR(NETVSC_DRV, "got link status but net device " |
| @@ -230,6 +232,8 @@ static void netvsc_linkstatus_callback(struct hv_device *device_obj, | |||
| 230 | netif_carrier_on(net); | 232 | netif_carrier_on(net); |
| 231 | netif_wake_queue(net); | 233 | netif_wake_queue(net); |
| 232 | netif_notify_peers(net); | 234 | netif_notify_peers(net); |
| 235 | ndev_ctx = netdev_priv(net); | ||
| 236 | schedule_work(&ndev_ctx->work); | ||
| 233 | } else { | 237 | } else { |
| 234 | netif_carrier_off(net); | 238 | netif_carrier_off(net); |
| 235 | netif_stop_queue(net); | 239 | netif_stop_queue(net); |
| @@ -328,6 +332,25 @@ static const struct net_device_ops device_ops = { | |||
| 328 | .ndo_set_mac_address = eth_mac_addr, | 332 | .ndo_set_mac_address = eth_mac_addr, |
| 329 | }; | 333 | }; |
| 330 | 334 | ||
| 335 | /* | ||
| 336 | * Send GARP packet to network peers after migrations. | ||
| 337 | * After Quick Migration, the network is not immediately operational in the | ||
| 338 | * current context when receiving RNDIS_STATUS_MEDIA_CONNECT event. So, add | ||
| 339 | * another netif_notify_peers() into a scheduled work, otherwise GARP packet | ||
| 340 | * will not be sent after quick migration, and cause network disconnection. | ||
| 341 | */ | ||
| 342 | static void netvsc_send_garp(struct work_struct *w) | ||
| 343 | { | ||
| 344 | struct net_device_context *ndev_ctx; | ||
| 345 | struct net_device *net; | ||
| 346 | |||
| 347 | msleep(20); | ||
| 348 | ndev_ctx = container_of(w, struct net_device_context, work); | ||
| 349 | net = dev_get_drvdata(&ndev_ctx->device_ctx->device); | ||
| 350 | netif_notify_peers(net); | ||
| 351 | } | ||
| 352 | |||
| 353 | |||
| 331 | static int netvsc_probe(struct device *device) | 354 | static int netvsc_probe(struct device *device) |
| 332 | { | 355 | { |
| 333 | struct hv_driver *drv = | 356 | struct hv_driver *drv = |
| @@ -353,6 +376,7 @@ static int netvsc_probe(struct device *device) | |||
| 353 | net_device_ctx->device_ctx = device_obj; | 376 | net_device_ctx->device_ctx = device_obj; |
| 354 | net_device_ctx->avail = ring_size; | 377 | net_device_ctx->avail = ring_size; |
| 355 | dev_set_drvdata(device, net); | 378 | dev_set_drvdata(device, net); |
| 379 | INIT_WORK(&net_device_ctx->work, netvsc_send_garp); | ||
| 356 | 380 | ||
| 357 | /* Notify the netvsc driver of the new device */ | 381 | /* Notify the netvsc driver of the new device */ |
| 358 | ret = net_drv_obj->base.dev_add(device_obj, &device_info); | 382 | ret = net_drv_obj->base.dev_add(device_obj, &device_info); |
diff --git a/drivers/staging/hv/rndis_filter.c b/drivers/staging/hv/rndis_filter.c index e7189cd324ca..048376b2b676 100644 --- a/drivers/staging/hv/rndis_filter.c +++ b/drivers/staging/hv/rndis_filter.c | |||
| @@ -585,7 +585,7 @@ static int rndis_filter_set_packet_filter(struct rndis_device *dev, | |||
| 585 | ret = -1; | 585 | ret = -1; |
| 586 | DPRINT_ERR(NETVSC, "timeout before we got a set response..."); | 586 | DPRINT_ERR(NETVSC, "timeout before we got a set response..."); |
| 587 | /* | 587 | /* |
| 588 | * We cant deallocate the request since we may still receive a | 588 | * We can't deallocate the request since we may still receive a |
| 589 | * send completion for it. | 589 | * send completion for it. |
| 590 | */ | 590 | */ |
| 591 | goto Exit; | 591 | goto Exit; |
diff --git a/drivers/staging/hv/tools/hv_kvp_daemon.c b/drivers/staging/hv/tools/hv_kvp_daemon.c index f5a2dd694611..33f0f1c8ad73 100644 --- a/drivers/staging/hv/tools/hv_kvp_daemon.c +++ b/drivers/staging/hv/tools/hv_kvp_daemon.c | |||
| @@ -102,22 +102,22 @@ static char kvp_send_buffer[4096]; | |||
| 102 | static char kvp_recv_buffer[4096]; | 102 | static char kvp_recv_buffer[4096]; |
| 103 | static struct sockaddr_nl addr; | 103 | static struct sockaddr_nl addr; |
| 104 | 104 | ||
| 105 | static char os_name[100]; | 105 | static char *os_name = ""; |
| 106 | static char os_major[50]; | 106 | static char *os_major = ""; |
| 107 | static char os_minor[50]; | 107 | static char *os_minor = ""; |
| 108 | static char processor_arch[50]; | 108 | static char *processor_arch; |
| 109 | static char os_build[100]; | 109 | static char *os_build; |
| 110 | static char *lic_version; | 110 | static char *lic_version; |
| 111 | static struct utsname uts_buf; | ||
| 111 | 112 | ||
| 112 | void kvp_get_os_info(void) | 113 | void kvp_get_os_info(void) |
| 113 | { | 114 | { |
| 114 | FILE *file; | 115 | FILE *file; |
| 115 | char *eol; | 116 | char *p, buf[512]; |
| 116 | struct utsname buf; | ||
| 117 | 117 | ||
| 118 | uname(&buf); | 118 | uname(&uts_buf); |
| 119 | strcpy(os_build, buf.release); | 119 | os_build = uts_buf.release; |
| 120 | strcpy(processor_arch, buf.machine); | 120 | processor_arch= uts_buf.machine; |
| 121 | 121 | ||
| 122 | file = fopen("/etc/SuSE-release", "r"); | 122 | file = fopen("/etc/SuSE-release", "r"); |
| 123 | if (file != NULL) | 123 | if (file != NULL) |
| @@ -132,21 +132,46 @@ void kvp_get_os_info(void) | |||
| 132 | /* | 132 | /* |
| 133 | * We don't have information about the os. | 133 | * We don't have information about the os. |
| 134 | */ | 134 | */ |
| 135 | strcpy(os_name, "Linux"); | 135 | os_name = uts_buf.sysname; |
| 136 | strcpy(os_major, "0"); | ||
| 137 | strcpy(os_minor, "0"); | ||
| 138 | return; | 136 | return; |
| 139 | 137 | ||
| 140 | kvp_osinfo_found: | 138 | kvp_osinfo_found: |
| 141 | fgets(os_name, 99, file); | 139 | /* up to three lines */ |
| 142 | eol = index(os_name, '\n'); | 140 | p = fgets(buf, sizeof(buf), file); |
| 143 | *eol = '\0'; | 141 | if (p) { |
| 144 | fgets(os_major, 49, file); | 142 | p = strchr(buf, '\n'); |
| 145 | eol = index(os_major, '\n'); | 143 | if (p) |
| 146 | *eol = '\0'; | 144 | *p = '\0'; |
| 147 | fgets(os_minor, 49, file); | 145 | p = strdup(buf); |
| 148 | eol = index(os_minor, '\n'); | 146 | if (!p) |
| 149 | *eol = '\0'; | 147 | goto done; |
| 148 | os_name = p; | ||
| 149 | |||
| 150 | /* second line */ | ||
| 151 | p = fgets(buf, sizeof(buf), file); | ||
| 152 | if (p) { | ||
| 153 | p = strchr(buf, '\n'); | ||
| 154 | if (p) | ||
| 155 | *p = '\0'; | ||
| 156 | p = strdup(buf); | ||
| 157 | if (!p) | ||
| 158 | goto done; | ||
| 159 | os_major = p; | ||
| 160 | |||
| 161 | /* third line */ | ||
| 162 | p = fgets(buf, sizeof(buf), file); | ||
| 163 | if (p) { | ||
| 164 | p = strchr(buf, '\n'); | ||
| 165 | if (p) | ||
| 166 | *p = '\0'; | ||
| 167 | p = strdup(buf); | ||
| 168 | if (p) | ||
| 169 | os_minor = p; | ||
| 170 | } | ||
| 171 | } | ||
| 172 | } | ||
| 173 | |||
| 174 | done: | ||
| 150 | fclose(file); | 175 | fclose(file); |
| 151 | return; | 176 | return; |
| 152 | } | 177 | } |
| @@ -202,7 +227,7 @@ kvp_get_ip_address(int family, char *buffer, int length) | |||
| 202 | 227 | ||
| 203 | /* | 228 | /* |
| 204 | * We only support AF_INET and AF_INET6 | 229 | * We only support AF_INET and AF_INET6 |
| 205 | * and the list of addresses is seperated by a ";". | 230 | * and the list of addresses is separated by a ";". |
| 206 | */ | 231 | */ |
| 207 | struct sockaddr_in6 *addr = | 232 | struct sockaddr_in6 *addr = |
| 208 | (struct sockaddr_in6 *) curp->ifa_addr; | 233 | (struct sockaddr_in6 *) curp->ifa_addr; |
| @@ -293,7 +318,7 @@ netlink_send(int fd, struct cn_msg *msg) | |||
| 293 | return sendmsg(fd, &message, 0); | 318 | return sendmsg(fd, &message, 0); |
| 294 | } | 319 | } |
| 295 | 320 | ||
| 296 | main(void) | 321 | int main(void) |
| 297 | { | 322 | { |
| 298 | int fd, len, sock_opt; | 323 | int fd, len, sock_opt; |
| 299 | int error; | 324 | int error; |
| @@ -301,9 +326,10 @@ main(void) | |||
| 301 | struct pollfd pfd; | 326 | struct pollfd pfd; |
| 302 | struct nlmsghdr *incoming_msg; | 327 | struct nlmsghdr *incoming_msg; |
| 303 | struct cn_msg *incoming_cn_msg; | 328 | struct cn_msg *incoming_cn_msg; |
| 329 | struct hv_ku_msg *hv_msg; | ||
| 330 | char *p; | ||
| 304 | char *key_value; | 331 | char *key_value; |
| 305 | char *key_name; | 332 | char *key_name; |
| 306 | int key_index; | ||
| 307 | 333 | ||
| 308 | daemon(1, 0); | 334 | daemon(1, 0); |
| 309 | openlog("KVP", 0, LOG_USER); | 335 | openlog("KVP", 0, LOG_USER); |
| @@ -373,9 +399,10 @@ main(void) | |||
| 373 | * Driver is registering with us; stash away the version | 399 | * Driver is registering with us; stash away the version |
| 374 | * information. | 400 | * information. |
| 375 | */ | 401 | */ |
| 376 | lic_version = malloc(strlen(incoming_cn_msg->data) + 1); | 402 | p = (char *)incoming_cn_msg->data; |
| 403 | lic_version = malloc(strlen(p) + 1); | ||
| 377 | if (lic_version) { | 404 | if (lic_version) { |
| 378 | strcpy(lic_version, incoming_cn_msg->data); | 405 | strcpy(lic_version, p); |
| 379 | syslog(LOG_INFO, "KVP LIC Version: %s", | 406 | syslog(LOG_INFO, "KVP LIC Version: %s", |
| 380 | lic_version); | 407 | lic_version); |
| 381 | } else { | 408 | } else { |
| @@ -389,14 +416,11 @@ main(void) | |||
| 389 | continue; | 416 | continue; |
| 390 | } | 417 | } |
| 391 | 418 | ||
| 392 | key_index = | 419 | hv_msg = (struct hv_ku_msg *)incoming_cn_msg->data; |
| 393 | ((struct hv_ku_msg *)incoming_cn_msg->data)->kvp_index; | 420 | key_name = (char *)hv_msg->kvp_key; |
| 394 | key_name = | 421 | key_value = (char *)hv_msg->kvp_value; |
| 395 | ((struct hv_ku_msg *)incoming_cn_msg->data)->kvp_key; | ||
| 396 | key_value = | ||
| 397 | ((struct hv_ku_msg *)incoming_cn_msg->data)->kvp_value; | ||
| 398 | 422 | ||
| 399 | switch (key_index) { | 423 | switch (hv_msg->kvp_index) { |
| 400 | case FullyQualifiedDomainName: | 424 | case FullyQualifiedDomainName: |
| 401 | kvp_get_domain_name(key_value, | 425 | kvp_get_domain_name(key_value, |
| 402 | HV_KVP_EXCHANGE_MAX_VALUE_SIZE); | 426 | HV_KVP_EXCHANGE_MAX_VALUE_SIZE); |
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index b473f468dd83..79089f85d903 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c | |||
| @@ -254,7 +254,7 @@ static int vmbus_on_isr(void) | |||
| 254 | event = (union hv_synic_event_flags *)page_addr + VMBUS_MESSAGE_SINT; | 254 | event = (union hv_synic_event_flags *)page_addr + VMBUS_MESSAGE_SINT; |
| 255 | 255 | ||
| 256 | /* Since we are a child, we only need to check bit 0 */ | 256 | /* Since we are a child, we only need to check bit 0 */ |
| 257 | if (test_and_clear_bit(0, (unsigned long *) &event->flags32[0])) { | 257 | if (sync_test_and_clear_bit(0, (unsigned long *) &event->flags32[0])) { |
| 258 | DPRINT_DBG(VMBUS, "received event %d", event->flags32[0]); | 258 | DPRINT_DBG(VMBUS, "received event %d", event->flags32[0]); |
| 259 | ret |= 0x2; | 259 | ret |= 0x2; |
| 260 | } | 260 | } |
diff --git a/drivers/staging/hv/vmbus_private.h b/drivers/staging/hv/vmbus_private.h index ca050a499b99..6f0d8df5e178 100644 --- a/drivers/staging/hv/vmbus_private.h +++ b/drivers/staging/hv/vmbus_private.h | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #include "channel_mgmt.h" | 31 | #include "channel_mgmt.h" |
| 32 | #include "ring_buffer.h" | 32 | #include "ring_buffer.h" |
| 33 | #include <linux/list.h> | 33 | #include <linux/list.h> |
| 34 | #include <asm/sync_bitops.h> | ||
| 34 | 35 | ||
| 35 | 36 | ||
| 36 | /* | 37 | /* |
diff --git a/drivers/staging/iio/Documentation/iio_utils.h b/drivers/staging/iio/Documentation/iio_utils.h index 8095727b3966..fd78e4ff99ae 100644 --- a/drivers/staging/iio/Documentation/iio_utils.h +++ b/drivers/staging/iio/Documentation/iio_utils.h | |||
| @@ -556,7 +556,7 @@ int _write_sysfs_string(char *filename, char *basedir, char *val, int verify) | |||
| 556 | if (strcmp(temp, val) != 0) { | 556 | if (strcmp(temp, val) != 0) { |
| 557 | printf("Possible failure in string write of %s " | 557 | printf("Possible failure in string write of %s " |
| 558 | "Should be %s " | 558 | "Should be %s " |
| 559 | "writen to %s\%s\n", | 559 | "written to %s\%s\n", |
| 560 | temp, | 560 | temp, |
| 561 | val, | 561 | val, |
| 562 | basedir, | 562 | basedir, |
diff --git a/drivers/staging/iio/accel/adis16201.h b/drivers/staging/iio/accel/adis16201.h index c9bf22c13428..23fe54d09d12 100644 --- a/drivers/staging/iio/accel/adis16201.h +++ b/drivers/staging/iio/accel/adis16201.h | |||
| @@ -70,7 +70,7 @@ | |||
| 70 | * @indio_dev: industrial I/O device structure | 70 | * @indio_dev: industrial I/O device structure |
| 71 | * @trig: data ready trigger registered with iio | 71 | * @trig: data ready trigger registered with iio |
| 72 | * @tx: transmit buffer | 72 | * @tx: transmit buffer |
| 73 | * @rx: recieve buffer | 73 | * @rx: receive buffer |
| 74 | * @buf_lock: mutex to protect tx and rx | 74 | * @buf_lock: mutex to protect tx and rx |
| 75 | **/ | 75 | **/ |
| 76 | struct adis16201_state { | 76 | struct adis16201_state { |
diff --git a/drivers/staging/iio/accel/adis16203.h b/drivers/staging/iio/accel/adis16203.h index b39323eac9e3..b88688128d61 100644 --- a/drivers/staging/iio/accel/adis16203.h +++ b/drivers/staging/iio/accel/adis16203.h | |||
| @@ -65,7 +65,7 @@ | |||
| 65 | * @indio_dev: industrial I/O device structure | 65 | * @indio_dev: industrial I/O device structure |
| 66 | * @trig: data ready trigger registered with iio | 66 | * @trig: data ready trigger registered with iio |
| 67 | * @tx: transmit buffer | 67 | * @tx: transmit buffer |
| 68 | * @rx: recieve buffer | 68 | * @rx: receive buffer |
| 69 | * @buf_lock: mutex to protect tx and rx | 69 | * @buf_lock: mutex to protect tx and rx |
| 70 | **/ | 70 | **/ |
| 71 | struct adis16203_state { | 71 | struct adis16203_state { |
diff --git a/drivers/staging/iio/accel/adis16204.h b/drivers/staging/iio/accel/adis16204.h index e9ed7cb048cf..e61844684f99 100644 --- a/drivers/staging/iio/accel/adis16204.h +++ b/drivers/staging/iio/accel/adis16204.h | |||
| @@ -73,7 +73,7 @@ | |||
| 73 | * @indio_dev: industrial I/O device structure | 73 | * @indio_dev: industrial I/O device structure |
| 74 | * @trig: data ready trigger registered with iio | 74 | * @trig: data ready trigger registered with iio |
| 75 | * @tx: transmit buffer | 75 | * @tx: transmit buffer |
| 76 | * @rx: recieve buffer | 76 | * @rx: receive buffer |
| 77 | * @buf_lock: mutex to protect tx and rx | 77 | * @buf_lock: mutex to protect tx and rx |
| 78 | **/ | 78 | **/ |
| 79 | struct adis16204_state { | 79 | struct adis16204_state { |
diff --git a/drivers/staging/iio/accel/adis16209.h b/drivers/staging/iio/accel/adis16209.h index 4e97596620ef..8b0da1349555 100644 --- a/drivers/staging/iio/accel/adis16209.h +++ b/drivers/staging/iio/accel/adis16209.h | |||
| @@ -109,7 +109,7 @@ | |||
| 109 | * @indio_dev: industrial I/O device structure | 109 | * @indio_dev: industrial I/O device structure |
| 110 | * @trig: data ready trigger registered with iio | 110 | * @trig: data ready trigger registered with iio |
| 111 | * @tx: transmit buffer | 111 | * @tx: transmit buffer |
| 112 | * @rx: recieve buffer | 112 | * @rx: receive buffer |
| 113 | * @buf_lock: mutex to protect tx and rx | 113 | * @buf_lock: mutex to protect tx and rx |
| 114 | **/ | 114 | **/ |
| 115 | struct adis16209_state { | 115 | struct adis16209_state { |
diff --git a/drivers/staging/iio/accel/adis16220.h b/drivers/staging/iio/accel/adis16220.h index 7013314a9d77..4d5758c2c047 100644 --- a/drivers/staging/iio/accel/adis16220.h +++ b/drivers/staging/iio/accel/adis16220.h | |||
| @@ -132,7 +132,7 @@ | |||
| 132 | * @indio_dev: industrial I/O device structure | 132 | * @indio_dev: industrial I/O device structure |
| 133 | * @trig: data ready trigger registered with iio | 133 | * @trig: data ready trigger registered with iio |
| 134 | * @tx: transmit buffer | 134 | * @tx: transmit buffer |
| 135 | * @rx: recieve buffer | 135 | * @rx: receive buffer |
| 136 | * @buf_lock: mutex to protect tx and rx | 136 | * @buf_lock: mutex to protect tx and rx |
| 137 | **/ | 137 | **/ |
| 138 | struct adis16220_state { | 138 | struct adis16220_state { |
diff --git a/drivers/staging/iio/accel/adis16240.h b/drivers/staging/iio/accel/adis16240.h index 51a807dde27c..76a45797b9dd 100644 --- a/drivers/staging/iio/accel/adis16240.h +++ b/drivers/staging/iio/accel/adis16240.h | |||
| @@ -132,7 +132,7 @@ | |||
| 132 | * @indio_dev: industrial I/O device structure | 132 | * @indio_dev: industrial I/O device structure |
| 133 | * @trig: data ready trigger registered with iio | 133 | * @trig: data ready trigger registered with iio |
| 134 | * @tx: transmit buffer | 134 | * @tx: transmit buffer |
| 135 | * @rx: recieve buffer | 135 | * @rx: receive buffer |
| 136 | * @buf_lock: mutex to protect tx and rx | 136 | * @buf_lock: mutex to protect tx and rx |
| 137 | **/ | 137 | **/ |
| 138 | struct adis16240_state { | 138 | struct adis16240_state { |
diff --git a/drivers/staging/iio/accel/lis3l02dq.h b/drivers/staging/iio/accel/lis3l02dq.h index 579b3a26e5d7..11402187f9ae 100644 --- a/drivers/staging/iio/accel/lis3l02dq.h +++ b/drivers/staging/iio/accel/lis3l02dq.h | |||
| @@ -57,7 +57,7 @@ | |||
| 57 | /* Reboot memory content */ | 57 | /* Reboot memory content */ |
| 58 | #define LIS3L02DQ_REG_CTRL_2_REBOOT_MEMORY 0x10 | 58 | #define LIS3L02DQ_REG_CTRL_2_REBOOT_MEMORY 0x10 |
| 59 | 59 | ||
| 60 | /* Interupt Enable - applies data ready to the RDY pad */ | 60 | /* Interrupt Enable - applies data ready to the RDY pad */ |
| 61 | #define LIS3L02DQ_REG_CTRL_2_ENABLE_INTERRUPT 0x08 | 61 | #define LIS3L02DQ_REG_CTRL_2_ENABLE_INTERRUPT 0x08 |
| 62 | 62 | ||
| 63 | /* Enable Data Ready Generation - relationship with previous unclear in docs */ | 63 | /* Enable Data Ready Generation - relationship with previous unclear in docs */ |
| @@ -70,34 +70,34 @@ | |||
| 70 | * - option for 16 bit left justified */ | 70 | * - option for 16 bit left justified */ |
| 71 | #define LIS3L02DQ_REG_CTRL_2_DATA_ALIGNMENT_16_BIT_LEFT_JUSTIFIED 0x01 | 71 | #define LIS3L02DQ_REG_CTRL_2_DATA_ALIGNMENT_16_BIT_LEFT_JUSTIFIED 0x01 |
| 72 | 72 | ||
| 73 | /* Interupt related stuff */ | 73 | /* Interrupt related stuff */ |
| 74 | #define LIS3L02DQ_REG_WAKE_UP_CFG_ADDR 0x23 | 74 | #define LIS3L02DQ_REG_WAKE_UP_CFG_ADDR 0x23 |
| 75 | 75 | ||
| 76 | /* Switch from or combination fo conditions to and */ | 76 | /* Switch from or combination fo conditions to and */ |
| 77 | #define LIS3L02DQ_REG_WAKE_UP_CFG_BOOLEAN_AND 0x80 | 77 | #define LIS3L02DQ_REG_WAKE_UP_CFG_BOOLEAN_AND 0x80 |
| 78 | 78 | ||
| 79 | /* Latch interupt request, | 79 | /* Latch interrupt request, |
| 80 | * if on ack must be given by reading the ack register */ | 80 | * if on ack must be given by reading the ack register */ |
| 81 | #define LIS3L02DQ_REG_WAKE_UP_CFG_LATCH_SRC 0x40 | 81 | #define LIS3L02DQ_REG_WAKE_UP_CFG_LATCH_SRC 0x40 |
| 82 | 82 | ||
| 83 | /* Z Interupt on High (above threshold)*/ | 83 | /* Z Interrupt on High (above threshold)*/ |
| 84 | #define LIS3L02DQ_REG_WAKE_UP_CFG_INTERRUPT_Z_HIGH 0x20 | 84 | #define LIS3L02DQ_REG_WAKE_UP_CFG_INTERRUPT_Z_HIGH 0x20 |
| 85 | /* Z Interupt on Low */ | 85 | /* Z Interrupt on Low */ |
| 86 | #define LIS3L02DQ_REG_WAKE_UP_CFG_INTERRUPT_Z_LOW 0x10 | 86 | #define LIS3L02DQ_REG_WAKE_UP_CFG_INTERRUPT_Z_LOW 0x10 |
| 87 | /* Y Interupt on High */ | 87 | /* Y Interrupt on High */ |
| 88 | #define LIS3L02DQ_REG_WAKE_UP_CFG_INTERRUPT_Y_HIGH 0x08 | 88 | #define LIS3L02DQ_REG_WAKE_UP_CFG_INTERRUPT_Y_HIGH 0x08 |
| 89 | /* Y Interupt on Low */ | 89 | /* Y Interrupt on Low */ |
| 90 | #define LIS3L02DQ_REG_WAKE_UP_CFG_INTERRUPT_Y_LOW 0x04 | 90 | #define LIS3L02DQ_REG_WAKE_UP_CFG_INTERRUPT_Y_LOW 0x04 |
| 91 | /* X Interupt on High */ | 91 | /* X Interrupt on High */ |
| 92 | #define LIS3L02DQ_REG_WAKE_UP_CFG_INTERRUPT_X_HIGH 0x02 | 92 | #define LIS3L02DQ_REG_WAKE_UP_CFG_INTERRUPT_X_HIGH 0x02 |
| 93 | /* X Interupt on Low */ | 93 | /* X Interrupt on Low */ |
| 94 | #define LIS3L02DQ_REG_WAKE_UP_CFG_INTERRUPT_X_LOW 0x01 | 94 | #define LIS3L02DQ_REG_WAKE_UP_CFG_INTERRUPT_X_LOW 0x01 |
| 95 | 95 | ||
| 96 | /* Register that gives description of what caused interupt | 96 | /* Register that gives description of what caused interrupt |
| 97 | * - latched if set in CFG_ADDRES */ | 97 | * - latched if set in CFG_ADDRES */ |
| 98 | #define LIS3L02DQ_REG_WAKE_UP_SRC_ADDR 0x24 | 98 | #define LIS3L02DQ_REG_WAKE_UP_SRC_ADDR 0x24 |
| 99 | /* top bit ignored */ | 99 | /* top bit ignored */ |
| 100 | /* Interupt Active */ | 100 | /* Interrupt Active */ |
| 101 | #define LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_ACTIVATED 0x40 | 101 | #define LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_ACTIVATED 0x40 |
| 102 | /* Interupts that have been triggered */ | 102 | /* Interupts that have been triggered */ |
| 103 | #define LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_Z_HIGH 0x20 | 103 | #define LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_Z_HIGH 0x20 |
| @@ -123,7 +123,7 @@ | |||
| 123 | #define LIS3L02DQ_REG_STATUS_X_NEW_DATA 0x01 | 123 | #define LIS3L02DQ_REG_STATUS_X_NEW_DATA 0x01 |
| 124 | 124 | ||
| 125 | /* The accelerometer readings - low and high bytes. | 125 | /* The accelerometer readings - low and high bytes. |
| 126 | Form of high byte dependant on justification set in ctrl reg */ | 126 | Form of high byte dependent on justification set in ctrl reg */ |
| 127 | #define LIS3L02DQ_REG_OUT_X_L_ADDR 0x28 | 127 | #define LIS3L02DQ_REG_OUT_X_L_ADDR 0x28 |
| 128 | #define LIS3L02DQ_REG_OUT_X_H_ADDR 0x29 | 128 | #define LIS3L02DQ_REG_OUT_X_H_ADDR 0x29 |
| 129 | #define LIS3L02DQ_REG_OUT_Y_L_ADDR 0x2A | 129 | #define LIS3L02DQ_REG_OUT_Y_L_ADDR 0x2A |
| @@ -155,7 +155,7 @@ Form of high byte dependant on justification set in ctrl reg */ | |||
| 155 | * @inter: used to check if new interrupt has been triggered | 155 | * @inter: used to check if new interrupt has been triggered |
| 156 | * @trig: data ready trigger registered with iio | 156 | * @trig: data ready trigger registered with iio |
| 157 | * @tx: transmit buffer | 157 | * @tx: transmit buffer |
| 158 | * @rx: recieve buffer | 158 | * @rx: receive buffer |
| 159 | * @buf_lock: mutex to protect tx and rx | 159 | * @buf_lock: mutex to protect tx and rx |
| 160 | **/ | 160 | **/ |
| 161 | struct lis3l02dq_state { | 161 | struct lis3l02dq_state { |
diff --git a/drivers/staging/iio/accel/lis3l02dq_core.c b/drivers/staging/iio/accel/lis3l02dq_core.c index c4b4ab7e6423..3067f9662d20 100644 --- a/drivers/staging/iio/accel/lis3l02dq_core.c +++ b/drivers/staging/iio/accel/lis3l02dq_core.c | |||
| @@ -77,7 +77,7 @@ int lis3l02dq_spi_read_reg_8(struct device *dev, u8 reg_address, u8 *val) | |||
| 77 | /** | 77 | /** |
| 78 | * lis3l02dq_spi_write_reg_8() - write single byte to a register | 78 | * lis3l02dq_spi_write_reg_8() - write single byte to a register |
| 79 | * @dev: device associated with child of actual device (iio_dev or iio_trig) | 79 | * @dev: device associated with child of actual device (iio_dev or iio_trig) |
| 80 | * @reg_address: the address of the register to be writen | 80 | * @reg_address: the address of the register to be written |
| 81 | * @val: the value to write | 81 | * @val: the value to write |
| 82 | **/ | 82 | **/ |
| 83 | int lis3l02dq_spi_write_reg_8(struct device *dev, | 83 | int lis3l02dq_spi_write_reg_8(struct device *dev, |
diff --git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c index 2c461a31f129..529a3cc6d0c7 100644 --- a/drivers/staging/iio/accel/lis3l02dq_ring.c +++ b/drivers/staging/iio/accel/lis3l02dq_ring.c | |||
| @@ -217,7 +217,7 @@ static const u8 read_all_tx_array[] = { | |||
| 217 | /** | 217 | /** |
| 218 | * lis3l02dq_read_all() Reads all channels currently selected | 218 | * lis3l02dq_read_all() Reads all channels currently selected |
| 219 | * @st: device specific state | 219 | * @st: device specific state |
| 220 | * @rx_array: (dma capable) recieve array, must be at least | 220 | * @rx_array: (dma capable) receive array, must be at least |
| 221 | * 4*number of channels | 221 | * 4*number of channels |
| 222 | **/ | 222 | **/ |
| 223 | static int lis3l02dq_read_all(struct lis3l02dq_state *st, u8 *rx_array) | 223 | static int lis3l02dq_read_all(struct lis3l02dq_state *st, u8 *rx_array) |
| @@ -409,7 +409,7 @@ static const struct attribute_group lis3l02dq_trigger_attr_group = { | |||
| 409 | * | 409 | * |
| 410 | * As the trigger may occur on any data element being updated it is | 410 | * As the trigger may occur on any data element being updated it is |
| 411 | * really rather likely to occur during the read from the previous | 411 | * really rather likely to occur during the read from the previous |
| 412 | * trigger event. The only way to discover if this has occured on | 412 | * trigger event. The only way to discover if this has occurred on |
| 413 | * boards not supporting level interrupts is to take a look at the line. | 413 | * boards not supporting level interrupts is to take a look at the line. |
| 414 | * If it is indicating another interrupt and we don't seem to have a | 414 | * If it is indicating another interrupt and we don't seem to have a |
| 415 | * handler looking at it, then we need to notify the core that we need | 415 | * handler looking at it, then we need to notify the core that we need |
diff --git a/drivers/staging/iio/accel/sca3000.h b/drivers/staging/iio/accel/sca3000.h index 23892848f5ae..db710334b99b 100644 --- a/drivers/staging/iio/accel/sca3000.h +++ b/drivers/staging/iio/accel/sca3000.h | |||
| @@ -185,7 +185,7 @@ struct sca3000_state { | |||
| 185 | }; | 185 | }; |
| 186 | 186 | ||
| 187 | /** | 187 | /** |
| 188 | * struct sca3000_chip_info - model dependant parameters | 188 | * struct sca3000_chip_info - model dependent parameters |
| 189 | * @name: model identification | 189 | * @name: model identification |
| 190 | * @scale: string containing floating point scale factor | 190 | * @scale: string containing floating point scale factor |
| 191 | * @temp_output: some devices have temperature sensors. | 191 | * @temp_output: some devices have temperature sensors. |
| @@ -213,7 +213,7 @@ struct sca3000_chip_info { | |||
| 213 | * sca3000_read_data() read a series of values from the device | 213 | * sca3000_read_data() read a series of values from the device |
| 214 | * @dev: device | 214 | * @dev: device |
| 215 | * @reg_address_high: start address (decremented read) | 215 | * @reg_address_high: start address (decremented read) |
| 216 | * @rx: pointer where recieved data is placed. Callee | 216 | * @rx: pointer where received data is placed. Callee |
| 217 | * responsible for freeing this. | 217 | * responsible for freeing this. |
| 218 | * @len: number of bytes to read | 218 | * @len: number of bytes to read |
| 219 | * | 219 | * |
diff --git a/drivers/staging/iio/accel/sca3000_ring.c b/drivers/staging/iio/accel/sca3000_ring.c index c872fddfb2bf..a730a7638de1 100644 --- a/drivers/staging/iio/accel/sca3000_ring.c +++ b/drivers/staging/iio/accel/sca3000_ring.c | |||
| @@ -43,7 +43,7 @@ | |||
| 43 | * leading byte used in bus comms. | 43 | * leading byte used in bus comms. |
| 44 | * | 44 | * |
| 45 | * Currently does not provide timestamps. As the hardware doesn't add them they | 45 | * Currently does not provide timestamps. As the hardware doesn't add them they |
| 46 | * can only be inferred aproximately from ring buffer events such as 50% full | 46 | * can only be inferred approximately from ring buffer events such as 50% full |
| 47 | * and knowledge of when buffer was last emptied. This is left to userspace. | 47 | * and knowledge of when buffer was last emptied. This is left to userspace. |
| 48 | **/ | 48 | **/ |
| 49 | static int sca3000_rip_hw_rb(struct iio_ring_buffer *r, | 49 | static int sca3000_rip_hw_rb(struct iio_ring_buffer *r, |
diff --git a/drivers/staging/iio/adc/ad7298_ring.c b/drivers/staging/iio/adc/ad7298_ring.c index 19d1aced1e6c..9068d7f54d15 100644 --- a/drivers/staging/iio/adc/ad7298_ring.c +++ b/drivers/staging/iio/adc/ad7298_ring.c | |||
| @@ -157,7 +157,7 @@ static int ad7298_ring_preenable(struct iio_dev *indio_dev) | |||
| 157 | /** | 157 | /** |
| 158 | * ad7298_poll_func_th() th of trigger launched polling to ring buffer | 158 | * ad7298_poll_func_th() th of trigger launched polling to ring buffer |
| 159 | * | 159 | * |
| 160 | * As sampling only occurs on spi comms occuring, leave timestamping until | 160 | * As sampling only occurs on spi comms occurring, leave timestamping until |
| 161 | * then. Some triggers will generate their own time stamp. Currently | 161 | * then. Some triggers will generate their own time stamp. Currently |
| 162 | * there is no way of notifying them when no one cares. | 162 | * there is no way of notifying them when no one cares. |
| 163 | **/ | 163 | **/ |
diff --git a/drivers/staging/iio/adc/ad7476_ring.c b/drivers/staging/iio/adc/ad7476_ring.c index 1d654c86099d..92d93787d5b8 100644 --- a/drivers/staging/iio/adc/ad7476_ring.c +++ b/drivers/staging/iio/adc/ad7476_ring.c | |||
| @@ -112,7 +112,7 @@ static int ad7476_ring_preenable(struct iio_dev *indio_dev) | |||
| 112 | /** | 112 | /** |
| 113 | * ad7476_poll_func_th() th of trigger launched polling to ring buffer | 113 | * ad7476_poll_func_th() th of trigger launched polling to ring buffer |
| 114 | * | 114 | * |
| 115 | * As sampling only occurs on i2c comms occuring, leave timestamping until | 115 | * As sampling only occurs on i2c comms occurring, leave timestamping until |
| 116 | * then. Some triggers will generate their own time stamp. Currently | 116 | * then. Some triggers will generate their own time stamp. Currently |
| 117 | * there is no way of notifying them when no one cares. | 117 | * there is no way of notifying them when no one cares. |
| 118 | **/ | 118 | **/ |
diff --git a/drivers/staging/iio/adc/ad7887_ring.c b/drivers/staging/iio/adc/ad7887_ring.c index 2d7fe65049dd..da77f266c16b 100644 --- a/drivers/staging/iio/adc/ad7887_ring.c +++ b/drivers/staging/iio/adc/ad7887_ring.c | |||
| @@ -165,7 +165,7 @@ static int ad7887_ring_postdisable(struct iio_dev *indio_dev) | |||
| 165 | /** | 165 | /** |
| 166 | * ad7887_poll_func_th() th of trigger launched polling to ring buffer | 166 | * ad7887_poll_func_th() th of trigger launched polling to ring buffer |
| 167 | * | 167 | * |
| 168 | * As sampling only occurs on spi comms occuring, leave timestamping until | 168 | * As sampling only occurs on spi comms occurring, leave timestamping until |
| 169 | * then. Some triggers will generate their own time stamp. Currently | 169 | * then. Some triggers will generate their own time stamp. Currently |
| 170 | * there is no way of notifying them when no one cares. | 170 | * there is no way of notifying them when no one cares. |
| 171 | **/ | 171 | **/ |
diff --git a/drivers/staging/iio/adc/ad799x_core.c b/drivers/staging/iio/adc/ad799x_core.c index e50841b3ac69..f04e642e7272 100644 --- a/drivers/staging/iio/adc/ad799x_core.c +++ b/drivers/staging/iio/adc/ad799x_core.c | |||
| @@ -184,7 +184,7 @@ static ssize_t ad799x_read_single_channel(struct device *dev, | |||
| 184 | 184 | ||
| 185 | mutex_lock(&dev_info->mlock); | 185 | mutex_lock(&dev_info->mlock); |
| 186 | mask = 1 << this_attr->address; | 186 | mask = 1 << this_attr->address; |
| 187 | /* If ring buffer capture is occuring, query the buffer */ | 187 | /* If ring buffer capture is occurring, query the buffer */ |
| 188 | if (iio_ring_enabled(dev_info)) { | 188 | if (iio_ring_enabled(dev_info)) { |
| 189 | data = ret = ad799x_single_channel_from_ring(st, mask); | 189 | data = ret = ad799x_single_channel_from_ring(st, mask); |
| 190 | if (ret < 0) | 190 | if (ret < 0) |
diff --git a/drivers/staging/iio/adc/ad799x_ring.c b/drivers/staging/iio/adc/ad799x_ring.c index 56abc395f177..0875a7ef67a5 100644 --- a/drivers/staging/iio/adc/ad799x_ring.c +++ b/drivers/staging/iio/adc/ad799x_ring.c | |||
| @@ -101,7 +101,7 @@ static int ad799x_ring_preenable(struct iio_dev *indio_dev) | |||
| 101 | /** | 101 | /** |
| 102 | * ad799x_poll_func_th() th of trigger launched polling to ring buffer | 102 | * ad799x_poll_func_th() th of trigger launched polling to ring buffer |
| 103 | * | 103 | * |
| 104 | * As sampling only occurs on i2c comms occuring, leave timestamping until | 104 | * As sampling only occurs on i2c comms occurring, leave timestamping until |
| 105 | * then. Some triggers will generate their own time stamp. Currently | 105 | * then. Some triggers will generate their own time stamp. Currently |
| 106 | * there is no way of notifying them when no one cares. | 106 | * there is no way of notifying them when no one cares. |
| 107 | **/ | 107 | **/ |
diff --git a/drivers/staging/iio/adc/max1363_core.c b/drivers/staging/iio/adc/max1363_core.c index dde097afb430..de83c3b37a2d 100644 --- a/drivers/staging/iio/adc/max1363_core.c +++ b/drivers/staging/iio/adc/max1363_core.c | |||
| @@ -255,7 +255,7 @@ static ssize_t max1363_read_single_channel(struct device *dev, | |||
| 255 | goto error_ret; | 255 | goto error_ret; |
| 256 | } | 256 | } |
| 257 | 257 | ||
| 258 | /* If ring buffer capture is occuring, query the buffer */ | 258 | /* If ring buffer capture is occurring, query the buffer */ |
| 259 | if (iio_ring_enabled(dev_info)) { | 259 | if (iio_ring_enabled(dev_info)) { |
| 260 | mask = max1363_mode_table[this_attr->address].modemask; | 260 | mask = max1363_mode_table[this_attr->address].modemask; |
| 261 | data = max1363_single_channel_from_ring(mask, st); | 261 | data = max1363_single_channel_from_ring(mask, st); |
| @@ -1425,7 +1425,7 @@ error_ret: | |||
| 1425 | } | 1425 | } |
| 1426 | 1426 | ||
| 1427 | /* | 1427 | /* |
| 1428 | * To keep this managable we always use one of 3 scan modes. | 1428 | * To keep this manageable we always use one of 3 scan modes. |
| 1429 | * Scan 0...3, 0-1,2-3 and 1-0,3-2 | 1429 | * Scan 0...3, 0-1,2-3 and 1-0,3-2 |
| 1430 | */ | 1430 | */ |
| 1431 | static inline int __max1363_check_event_mask(int thismask, int checkmask) | 1431 | static inline int __max1363_check_event_mask(int thismask, int checkmask) |
diff --git a/drivers/staging/iio/adc/max1363_ring.c b/drivers/staging/iio/adc/max1363_ring.c index 5532f3e466bc..d36fcc62e976 100644 --- a/drivers/staging/iio/adc/max1363_ring.c +++ b/drivers/staging/iio/adc/max1363_ring.c | |||
| @@ -108,7 +108,7 @@ static int max1363_ring_preenable(struct iio_dev *indio_dev) | |||
| 108 | /** | 108 | /** |
| 109 | * max1363_poll_func_th() - th of trigger launched polling to ring buffer | 109 | * max1363_poll_func_th() - th of trigger launched polling to ring buffer |
| 110 | * | 110 | * |
| 111 | * As sampling only occurs on i2c comms occuring, leave timestamping until | 111 | * As sampling only occurs on i2c comms occurring, leave timestamping until |
| 112 | * then. Some triggers will generate their own time stamp. Currently | 112 | * then. Some triggers will generate their own time stamp. Currently |
| 113 | * there is no way of notifying them when no one cares. | 113 | * there is no way of notifying them when no one cares. |
| 114 | **/ | 114 | **/ |
diff --git a/drivers/staging/iio/chrdev.h b/drivers/staging/iio/chrdev.h index 98d1a2c12df2..4fcb99c816f9 100644 --- a/drivers/staging/iio/chrdev.h +++ b/drivers/staging/iio/chrdev.h | |||
| @@ -33,7 +33,7 @@ struct iio_handler { | |||
| 33 | /** | 33 | /** |
| 34 | * struct iio_event_data - The actual event being pushed to userspace | 34 | * struct iio_event_data - The actual event being pushed to userspace |
| 35 | * @id: event identifier | 35 | * @id: event identifier |
| 36 | * @timestamp: best estimate of time of event occurance (often from | 36 | * @timestamp: best estimate of time of event occurrence (often from |
| 37 | * the interrupt handler) | 37 | * the interrupt handler) |
| 38 | */ | 38 | */ |
| 39 | struct iio_event_data { | 39 | struct iio_event_data { |
| @@ -42,7 +42,7 @@ struct iio_event_data { | |||
| 42 | }; | 42 | }; |
| 43 | 43 | ||
| 44 | /** | 44 | /** |
| 45 | * struct iio_detected_event_list - list element for events that have occured | 45 | * struct iio_detected_event_list - list element for events that have occurred |
| 46 | * @list: linked list header | 46 | * @list: linked list header |
| 47 | * @ev: the event itself | 47 | * @ev: the event itself |
| 48 | * @shared_pointer: used when the event is shared - i.e. can be escallated | 48 | * @shared_pointer: used when the event is shared - i.e. can be escallated |
| @@ -98,7 +98,7 @@ struct iio_event_interface { | |||
| 98 | * @list: list header | 98 | * @list: list header |
| 99 | * @refcount: as the handler may be shared between multiple device | 99 | * @refcount: as the handler may be shared between multiple device |
| 100 | * side events, reference counting ensures clean removal | 100 | * side events, reference counting ensures clean removal |
| 101 | * @exist_lock: prevents race conditions related to refcount useage. | 101 | * @exist_lock: prevents race conditions related to refcount usage. |
| 102 | * @handler: event handler function - called on event if this | 102 | * @handler: event handler function - called on event if this |
| 103 | * event_handler is enabled. | 103 | * event_handler is enabled. |
| 104 | * | 104 | * |
diff --git a/drivers/staging/iio/gyro/adis16060_core.c b/drivers/staging/iio/gyro/adis16060_core.c index 700eb3980f9e..ae53e71d1c2f 100644 --- a/drivers/staging/iio/gyro/adis16060_core.c +++ b/drivers/staging/iio/gyro/adis16060_core.c | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | * @us_w: actual spi_device to write config | 30 | * @us_w: actual spi_device to write config |
| 31 | * @us_r: actual spi_device to read back data | 31 | * @us_r: actual spi_device to read back data |
| 32 | * @indio_dev: industrial I/O device structure | 32 | * @indio_dev: industrial I/O device structure |
| 33 | * @buf: transmit or recieve buffer | 33 | * @buf: transmit or receive buffer |
| 34 | * @buf_lock: mutex to protect tx and rx | 34 | * @buf_lock: mutex to protect tx and rx |
| 35 | **/ | 35 | **/ |
| 36 | struct adis16060_state { | 36 | struct adis16060_state { |
diff --git a/drivers/staging/iio/gyro/adis16080_core.c b/drivers/staging/iio/gyro/adis16080_core.c index fb4336c7d2a6..ef9e304a226d 100644 --- a/drivers/staging/iio/gyro/adis16080_core.c +++ b/drivers/staging/iio/gyro/adis16080_core.c | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | * struct adis16080_state - device instance specific data | 35 | * struct adis16080_state - device instance specific data |
| 36 | * @us: actual spi_device to write data | 36 | * @us: actual spi_device to write data |
| 37 | * @indio_dev: industrial I/O device structure | 37 | * @indio_dev: industrial I/O device structure |
| 38 | * @buf: transmit or recieve buffer | 38 | * @buf: transmit or receive buffer |
| 39 | * @buf_lock: mutex to protect tx and rx | 39 | * @buf_lock: mutex to protect tx and rx |
| 40 | **/ | 40 | **/ |
| 41 | struct adis16080_state { | 41 | struct adis16080_state { |
diff --git a/drivers/staging/iio/gyro/adis16260.h b/drivers/staging/iio/gyro/adis16260.h index c1fd4364287f..1369501b4096 100644 --- a/drivers/staging/iio/gyro/adis16260.h +++ b/drivers/staging/iio/gyro/adis16260.h | |||
| @@ -91,7 +91,7 @@ | |||
| 91 | * @indio_dev: industrial I/O device structure | 91 | * @indio_dev: industrial I/O device structure |
| 92 | * @trig: data ready trigger registered with iio | 92 | * @trig: data ready trigger registered with iio |
| 93 | * @tx: transmit buffer | 93 | * @tx: transmit buffer |
| 94 | * @rx: recieve buffer | 94 | * @rx: receive buffer |
| 95 | * @buf_lock: mutex to protect tx and rx | 95 | * @buf_lock: mutex to protect tx and rx |
| 96 | * @negate: negate the scale parameter | 96 | * @negate: negate the scale parameter |
| 97 | **/ | 97 | **/ |
diff --git a/drivers/staging/iio/iio.h b/drivers/staging/iio/iio.h index 248bdd2846fd..7127f26f8d26 100644 --- a/drivers/staging/iio/iio.h +++ b/drivers/staging/iio/iio.h | |||
| @@ -92,7 +92,7 @@ void iio_remove_event_from_list(struct iio_event_handler_list *el, | |||
| 92 | * changes | 92 | * changes |
| 93 | * @available_scan_masks: [DRIVER] optional array of allowed bitmasks | 93 | * @available_scan_masks: [DRIVER] optional array of allowed bitmasks |
| 94 | * @trig: [INTERN] current device trigger (ring buffer modes) | 94 | * @trig: [INTERN] current device trigger (ring buffer modes) |
| 95 | * @pollfunc: [DRIVER] function run on trigger being recieved | 95 | * @pollfunc: [DRIVER] function run on trigger being received |
| 96 | **/ | 96 | **/ |
| 97 | struct iio_dev { | 97 | struct iio_dev { |
| 98 | int id; | 98 | int id; |
diff --git a/drivers/staging/iio/imu/adis16300.h b/drivers/staging/iio/imu/adis16300.h index 1f25d68064a0..c0957591aed7 100644 --- a/drivers/staging/iio/imu/adis16300.h +++ b/drivers/staging/iio/imu/adis16300.h | |||
| @@ -99,7 +99,7 @@ | |||
| 99 | * @indio_dev: industrial I/O device structure | 99 | * @indio_dev: industrial I/O device structure |
| 100 | * @trig: data ready trigger registered with iio | 100 | * @trig: data ready trigger registered with iio |
| 101 | * @tx: transmit buffer | 101 | * @tx: transmit buffer |
| 102 | * @rx: recieve buffer | 102 | * @rx: receive buffer |
| 103 | * @buf_lock: mutex to protect tx and rx | 103 | * @buf_lock: mutex to protect tx and rx |
| 104 | **/ | 104 | **/ |
| 105 | struct adis16300_state { | 105 | struct adis16300_state { |
diff --git a/drivers/staging/iio/imu/adis16350.h b/drivers/staging/iio/imu/adis16350.h index b00001e3edd0..b1ad48662a2c 100644 --- a/drivers/staging/iio/imu/adis16350.h +++ b/drivers/staging/iio/imu/adis16350.h | |||
| @@ -105,7 +105,7 @@ | |||
| 105 | * @indio_dev: industrial I/O device structure | 105 | * @indio_dev: industrial I/O device structure |
| 106 | * @trig: data ready trigger registered with iio | 106 | * @trig: data ready trigger registered with iio |
| 107 | * @tx: transmit buffer | 107 | * @tx: transmit buffer |
| 108 | * @rx: recieve buffer | 108 | * @rx: receive buffer |
| 109 | * @buf_lock: mutex to protect tx and rx | 109 | * @buf_lock: mutex to protect tx and rx |
| 110 | **/ | 110 | **/ |
| 111 | struct adis16350_state { | 111 | struct adis16350_state { |
diff --git a/drivers/staging/iio/imu/adis16400.h b/drivers/staging/iio/imu/adis16400.h index 6ff33e1ad8c1..e328bcc5922f 100644 --- a/drivers/staging/iio/imu/adis16400.h +++ b/drivers/staging/iio/imu/adis16400.h | |||
| @@ -17,7 +17,8 @@ | |||
| 17 | #ifndef SPI_ADIS16400_H_ | 17 | #ifndef SPI_ADIS16400_H_ |
| 18 | #define SPI_ADIS16400_H_ | 18 | #define SPI_ADIS16400_H_ |
| 19 | 19 | ||
| 20 | #define ADIS16400_STARTUP_DELAY 220 /* ms */ | 20 | #define ADIS16400_STARTUP_DELAY 290 /* ms */ |
| 21 | #define ADIS16400_MTEST_DELAY 90 /* ms */ | ||
| 21 | 22 | ||
| 22 | #define ADIS16400_READ_REG(a) a | 23 | #define ADIS16400_READ_REG(a) a |
| 23 | #define ADIS16400_WRITE_REG(a) ((a) | 0x80) | 24 | #define ADIS16400_WRITE_REG(a) ((a) | 0x80) |
| @@ -131,7 +132,7 @@ | |||
| 131 | * @indio_dev: industrial I/O device structure | 132 | * @indio_dev: industrial I/O device structure |
| 132 | * @trig: data ready trigger registered with iio | 133 | * @trig: data ready trigger registered with iio |
| 133 | * @tx: transmit buffer | 134 | * @tx: transmit buffer |
| 134 | * @rx: recieve buffer | 135 | * @rx: receive buffer |
| 135 | * @buf_lock: mutex to protect tx and rx | 136 | * @buf_lock: mutex to protect tx and rx |
| 136 | **/ | 137 | **/ |
| 137 | struct adis16400_state { | 138 | struct adis16400_state { |
diff --git a/drivers/staging/iio/imu/adis16400_core.c b/drivers/staging/iio/imu/adis16400_core.c index cfb108a1545b..540bde69cc3b 100644 --- a/drivers/staging/iio/imu/adis16400_core.c +++ b/drivers/staging/iio/imu/adis16400_core.c | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | * | 6 | * |
| 7 | * Copyright (c) 2009 Manuel Stahl <manuel.stahl@iis.fraunhofer.de> | 7 | * Copyright (c) 2009 Manuel Stahl <manuel.stahl@iis.fraunhofer.de> |
| 8 | * Copyright (c) 2007 Jonathan Cameron <jic23@cam.ac.uk> | 8 | * Copyright (c) 2007 Jonathan Cameron <jic23@cam.ac.uk> |
| 9 | * Copyright (c) 2011 Analog Devices Inc. | ||
| 9 | * | 10 | * |
| 10 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License version 2 as | 12 | * it under the terms of the GNU General Public License version 2 as |
| @@ -93,7 +94,6 @@ static int adis16400_spi_write_reg_16(struct device *dev, | |||
| 93 | .tx_buf = st->tx + 2, | 94 | .tx_buf = st->tx + 2, |
| 94 | .bits_per_word = 8, | 95 | .bits_per_word = 8, |
| 95 | .len = 2, | 96 | .len = 2, |
| 96 | .cs_change = 1, | ||
| 97 | }, | 97 | }, |
| 98 | }; | 98 | }; |
| 99 | 99 | ||
| @@ -137,7 +137,6 @@ static int adis16400_spi_read_reg_16(struct device *dev, | |||
| 137 | .rx_buf = st->rx, | 137 | .rx_buf = st->rx, |
| 138 | .bits_per_word = 8, | 138 | .bits_per_word = 8, |
| 139 | .len = 2, | 139 | .len = 2, |
| 140 | .cs_change = 1, | ||
| 141 | }, | 140 | }, |
| 142 | }; | 141 | }; |
| 143 | 142 | ||
| @@ -375,7 +374,7 @@ static int adis16400_self_test(struct device *dev) | |||
| 375 | dev_err(dev, "problem starting self test"); | 374 | dev_err(dev, "problem starting self test"); |
| 376 | goto err_ret; | 375 | goto err_ret; |
| 377 | } | 376 | } |
| 378 | 377 | msleep(ADIS16400_MTEST_DELAY); | |
| 379 | adis16400_check_status(dev); | 378 | adis16400_check_status(dev); |
| 380 | 379 | ||
| 381 | err_ret: | 380 | err_ret: |
| @@ -471,10 +470,11 @@ static int adis16400_initial_setup(struct adis16400_state *st) | |||
| 471 | if (ret) | 470 | if (ret) |
| 472 | goto err_ret; | 471 | goto err_ret; |
| 473 | 472 | ||
| 474 | if (prod_id != ADIS16400_PRODUCT_ID_DEFAULT) | 473 | if ((prod_id & 0xF000) != ADIS16400_PRODUCT_ID_DEFAULT) |
| 475 | dev_warn(dev, "unknown product id"); | 474 | dev_warn(dev, "unknown product id"); |
| 476 | 475 | ||
| 477 | printk(KERN_INFO DRIVER_NAME ": prod_id 0x%04x at CS%d (irq %d)\n", | 476 | |
| 477 | dev_info(dev, ": prod_id 0x%04x at CS%d (irq %d)\n", | ||
| 478 | prod_id, st->us->chip_select, st->us->irq); | 478 | prod_id, st->us->chip_select, st->us->irq); |
| 479 | 479 | ||
| 480 | /* use high spi speed if possible */ | 480 | /* use high spi speed if possible */ |
| @@ -497,12 +497,12 @@ err_ret: | |||
| 497 | _reg) | 497 | _reg) |
| 498 | 498 | ||
| 499 | static ADIS16400_DEV_ATTR_CALIBBIAS(GYRO_X, ADIS16400_XGYRO_OFF); | 499 | static ADIS16400_DEV_ATTR_CALIBBIAS(GYRO_X, ADIS16400_XGYRO_OFF); |
| 500 | static ADIS16400_DEV_ATTR_CALIBBIAS(GYRO_Y, ADIS16400_XGYRO_OFF); | 500 | static ADIS16400_DEV_ATTR_CALIBBIAS(GYRO_Y, ADIS16400_YGYRO_OFF); |
| 501 | static ADIS16400_DEV_ATTR_CALIBBIAS(GYRO_Z, ADIS16400_XGYRO_OFF); | 501 | static ADIS16400_DEV_ATTR_CALIBBIAS(GYRO_Z, ADIS16400_ZGYRO_OFF); |
| 502 | 502 | ||
| 503 | static ADIS16400_DEV_ATTR_CALIBBIAS(ACCEL_X, ADIS16400_XACCL_OFF); | 503 | static ADIS16400_DEV_ATTR_CALIBBIAS(ACCEL_X, ADIS16400_XACCL_OFF); |
| 504 | static ADIS16400_DEV_ATTR_CALIBBIAS(ACCEL_Y, ADIS16400_XACCL_OFF); | 504 | static ADIS16400_DEV_ATTR_CALIBBIAS(ACCEL_Y, ADIS16400_YACCL_OFF); |
| 505 | static ADIS16400_DEV_ATTR_CALIBBIAS(ACCEL_Z, ADIS16400_XACCL_OFF); | 505 | static ADIS16400_DEV_ATTR_CALIBBIAS(ACCEL_Z, ADIS16400_ZACCL_OFF); |
| 506 | 506 | ||
| 507 | 507 | ||
| 508 | static IIO_DEV_ATTR_IN_NAMED_RAW(0, supply, adis16400_read_14bit_signed, | 508 | static IIO_DEV_ATTR_IN_NAMED_RAW(0, supply, adis16400_read_14bit_signed, |
| @@ -647,7 +647,7 @@ static int __devinit adis16400_probe(struct spi_device *spi) | |||
| 647 | 647 | ||
| 648 | ret = iio_ring_buffer_register(st->indio_dev->ring, 0); | 648 | ret = iio_ring_buffer_register(st->indio_dev->ring, 0); |
| 649 | if (ret) { | 649 | if (ret) { |
| 650 | printk(KERN_ERR "failed to initialize the ring\n"); | 650 | dev_err(&spi->dev, "failed to initialize the ring\n"); |
| 651 | goto error_unreg_ring_funcs; | 651 | goto error_unreg_ring_funcs; |
| 652 | } | 652 | } |
| 653 | 653 | ||
diff --git a/drivers/staging/iio/imu/adis16400_ring.c b/drivers/staging/iio/imu/adis16400_ring.c index 33293fba9bcc..da28cb4288af 100644 --- a/drivers/staging/iio/imu/adis16400_ring.c +++ b/drivers/staging/iio/imu/adis16400_ring.c | |||
| @@ -122,12 +122,10 @@ static int adis16400_spi_read_burst(struct device *dev, u8 *rx) | |||
| 122 | .tx_buf = st->tx, | 122 | .tx_buf = st->tx, |
| 123 | .bits_per_word = 8, | 123 | .bits_per_word = 8, |
| 124 | .len = 2, | 124 | .len = 2, |
| 125 | .cs_change = 0, | ||
| 126 | }, { | 125 | }, { |
| 127 | .rx_buf = rx, | 126 | .rx_buf = rx, |
| 128 | .bits_per_word = 8, | 127 | .bits_per_word = 8, |
| 129 | .len = 24, | 128 | .len = 24, |
| 130 | .cs_change = 1, | ||
| 131 | }, | 129 | }, |
| 132 | }; | 130 | }; |
| 133 | 131 | ||
| @@ -162,9 +160,10 @@ static void adis16400_trigger_bh_to_ring(struct work_struct *work_s) | |||
| 162 | work_trigger_to_ring); | 160 | work_trigger_to_ring); |
| 163 | struct iio_ring_buffer *ring = st->indio_dev->ring; | 161 | struct iio_ring_buffer *ring = st->indio_dev->ring; |
| 164 | 162 | ||
| 165 | int i = 0; | 163 | int i = 0, j; |
| 166 | s16 *data; | 164 | s16 *data; |
| 167 | size_t datasize = ring->access.get_bytes_per_datum(ring); | 165 | size_t datasize = ring->access.get_bytes_per_datum(ring); |
| 166 | unsigned long mask = ring->scan_mask; | ||
| 168 | 167 | ||
| 169 | data = kmalloc(datasize , GFP_KERNEL); | 168 | data = kmalloc(datasize , GFP_KERNEL); |
| 170 | if (data == NULL) { | 169 | if (data == NULL) { |
| @@ -174,9 +173,12 @@ static void adis16400_trigger_bh_to_ring(struct work_struct *work_s) | |||
| 174 | 173 | ||
| 175 | if (ring->scan_count) | 174 | if (ring->scan_count) |
| 176 | if (adis16400_spi_read_burst(&st->indio_dev->dev, st->rx) >= 0) | 175 | if (adis16400_spi_read_burst(&st->indio_dev->dev, st->rx) >= 0) |
| 177 | for (; i < ring->scan_count; i++) | 176 | for (; i < ring->scan_count; i++) { |
| 177 | j = __ffs(mask); | ||
| 178 | mask &= ~(1 << j); | ||
| 178 | data[i] = be16_to_cpup( | 179 | data[i] = be16_to_cpup( |
| 179 | (__be16 *)&(st->rx[i*2])); | 180 | (__be16 *)&(st->rx[j*2])); |
| 181 | } | ||
| 180 | 182 | ||
| 181 | /* Guaranteed to be aligned with 8 byte boundary */ | 183 | /* Guaranteed to be aligned with 8 byte boundary */ |
| 182 | if (ring->scan_timestamp) | 184 | if (ring->scan_timestamp) |
diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c index f3bf111f354f..1795ee1e8207 100644 --- a/drivers/staging/iio/industrialio-core.c +++ b/drivers/staging/iio/industrialio-core.c | |||
| @@ -258,7 +258,7 @@ static ssize_t iio_event_chrdev_read(struct file *filep, | |||
| 258 | ->det_events.list)); | 258 | ->det_events.list)); |
| 259 | if (ret) | 259 | if (ret) |
| 260 | goto error_ret; | 260 | goto error_ret; |
| 261 | /* Single access device so noone else can get the data */ | 261 | /* Single access device so no one else can get the data */ |
| 262 | mutex_lock(&ev_int->event_list_lock); | 262 | mutex_lock(&ev_int->event_list_lock); |
| 263 | } | 263 | } |
| 264 | 264 | ||
diff --git a/drivers/staging/iio/meter/ade7753.h b/drivers/staging/iio/meter/ade7753.h index 70dabae6efe9..3b9c7f6a50e7 100644 --- a/drivers/staging/iio/meter/ade7753.h +++ b/drivers/staging/iio/meter/ade7753.h | |||
| @@ -62,7 +62,7 @@ | |||
| 62 | * @us: actual spi_device | 62 | * @us: actual spi_device |
| 63 | * @indio_dev: industrial I/O device structure | 63 | * @indio_dev: industrial I/O device structure |
| 64 | * @tx: transmit buffer | 64 | * @tx: transmit buffer |
| 65 | * @rx: recieve buffer | 65 | * @rx: receive buffer |
| 66 | * @buf_lock: mutex to protect tx and rx | 66 | * @buf_lock: mutex to protect tx and rx |
| 67 | **/ | 67 | **/ |
| 68 | struct ade7753_state { | 68 | struct ade7753_state { |
diff --git a/drivers/staging/iio/meter/ade7754.h b/drivers/staging/iio/meter/ade7754.h index 8faa9b3b48b6..0aa0522a33a3 100644 --- a/drivers/staging/iio/meter/ade7754.h +++ b/drivers/staging/iio/meter/ade7754.h | |||
| @@ -80,7 +80,7 @@ | |||
| 80 | * @us: actual spi_device | 80 | * @us: actual spi_device |
| 81 | * @indio_dev: industrial I/O device structure | 81 | * @indio_dev: industrial I/O device structure |
| 82 | * @tx: transmit buffer | 82 | * @tx: transmit buffer |
| 83 | * @rx: recieve buffer | 83 | * @rx: receive buffer |
| 84 | * @buf_lock: mutex to protect tx and rx | 84 | * @buf_lock: mutex to protect tx and rx |
| 85 | **/ | 85 | **/ |
| 86 | struct ade7754_state { | 86 | struct ade7754_state { |
diff --git a/drivers/staging/iio/meter/ade7758.h b/drivers/staging/iio/meter/ade7758.h index df5bb7ba5a0f..c6fd94f3b3ee 100644 --- a/drivers/staging/iio/meter/ade7758.h +++ b/drivers/staging/iio/meter/ade7758.h | |||
| @@ -98,7 +98,7 @@ | |||
| 98 | * @indio_dev: industrial I/O device structure | 98 | * @indio_dev: industrial I/O device structure |
| 99 | * @trig: data ready trigger registered with iio | 99 | * @trig: data ready trigger registered with iio |
| 100 | * @tx: transmit buffer | 100 | * @tx: transmit buffer |
| 101 | * @rx: recieve buffer | 101 | * @rx: receive buffer |
| 102 | * @buf_lock: mutex to protect tx and rx | 102 | * @buf_lock: mutex to protect tx and rx |
| 103 | **/ | 103 | **/ |
| 104 | struct ade7758_state { | 104 | struct ade7758_state { |
diff --git a/drivers/staging/iio/meter/ade7759.h b/drivers/staging/iio/meter/ade7759.h index e9d1c43336fe..cc76c2c4c039 100644 --- a/drivers/staging/iio/meter/ade7759.h +++ b/drivers/staging/iio/meter/ade7759.h | |||
| @@ -43,7 +43,7 @@ | |||
| 43 | * @us: actual spi_device | 43 | * @us: actual spi_device |
| 44 | * @indio_dev: industrial I/O device structure | 44 | * @indio_dev: industrial I/O device structure |
| 45 | * @tx: transmit buffer | 45 | * @tx: transmit buffer |
| 46 | * @rx: recieve buffer | 46 | * @rx: receive buffer |
| 47 | * @buf_lock: mutex to protect tx and rx | 47 | * @buf_lock: mutex to protect tx and rx |
| 48 | **/ | 48 | **/ |
| 49 | struct ade7759_state { | 49 | struct ade7759_state { |
diff --git a/drivers/staging/iio/meter/ade7854.h b/drivers/staging/iio/meter/ade7854.h index 4ad84a3bb462..79a21109f4e2 100644 --- a/drivers/staging/iio/meter/ade7854.h +++ b/drivers/staging/iio/meter/ade7854.h | |||
| @@ -149,7 +149,7 @@ | |||
| 149 | * @spi: actual spi_device | 149 | * @spi: actual spi_device |
| 150 | * @indio_dev: industrial I/O device structure | 150 | * @indio_dev: industrial I/O device structure |
| 151 | * @tx: transmit buffer | 151 | * @tx: transmit buffer |
| 152 | * @rx: recieve buffer | 152 | * @rx: receive buffer |
| 153 | * @buf_lock: mutex to protect tx and rx | 153 | * @buf_lock: mutex to protect tx and rx |
| 154 | **/ | 154 | **/ |
| 155 | struct ade7854_state { | 155 | struct ade7854_state { |
diff --git a/drivers/staging/iio/ring_generic.h b/drivers/staging/iio/ring_generic.h index f21ac09373cf..32948e55dc81 100644 --- a/drivers/staging/iio/ring_generic.h +++ b/drivers/staging/iio/ring_generic.h | |||
| @@ -30,7 +30,7 @@ int iio_push_ring_event(struct iio_ring_buffer *ring_buf, | |||
| 30 | * @event_code: event indentification code | 30 | * @event_code: event indentification code |
| 31 | * @timestamp: time of event | 31 | * @timestamp: time of event |
| 32 | * | 32 | * |
| 33 | * Typical usecase is to escalate a 50% ring full to 75% full if noone has yet | 33 | * Typical usecase is to escalate a 50% ring full to 75% full if no one has yet |
| 34 | * read the first event. Clearly the 50% full is no longer of interest in | 34 | * read the first event. Clearly the 50% full is no longer of interest in |
| 35 | * typical use case. | 35 | * typical use case. |
| 36 | **/ | 36 | **/ |
diff --git a/drivers/staging/intel_sst/TODO b/drivers/staging/intel_sst/TODO index a24e5ed5689c..c733d7011091 100644 --- a/drivers/staging/intel_sst/TODO +++ b/drivers/staging/intel_sst/TODO | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | TODO | 1 | TODO |
| 2 | ---- | 2 | ---- |
| 3 | 3 | ||
| 4 | Get the memrar driver cleaned up and upstream (dependancy blocking SST) | 4 | Get the memrar driver cleaned up and upstream (dependency blocking SST) |
| 5 | Replace long/short press with two virtual buttons | 5 | Replace long/short press with two virtual buttons |
| 6 | Review the printks and kill off any left over ST_ERR: messages | 6 | Review the printks and kill off any left over ST_ERR: messages |
| 7 | Review the misc device ioctls for 32/64bit safety and sanity | 7 | Review the misc device ioctls for 32/64bit safety and sanity |
diff --git a/drivers/staging/intel_sst/intel_sst.c b/drivers/staging/intel_sst/intel_sst.c index ce4a9f79ccd2..81c24d19eb9e 100644 --- a/drivers/staging/intel_sst/intel_sst.c +++ b/drivers/staging/intel_sst/intel_sst.c | |||
| @@ -263,7 +263,7 @@ static int __devinit intel_sst_probe(struct pci_dev *pci, | |||
| 263 | /* Init the device */ | 263 | /* Init the device */ |
| 264 | ret = pci_enable_device(pci); | 264 | ret = pci_enable_device(pci); |
| 265 | if (ret) { | 265 | if (ret) { |
| 266 | pr_err("device cant be enabled\n"); | 266 | pr_err("device can't be enabled\n"); |
| 267 | goto do_free_mem; | 267 | goto do_free_mem; |
| 268 | } | 268 | } |
| 269 | sst_drv_ctx->pci = pci_dev_get(pci); | 269 | sst_drv_ctx->pci = pci_dev_get(pci); |
| @@ -453,7 +453,7 @@ int intel_sst_resume(struct pci_dev *pci) | |||
| 453 | pci_restore_state(pci); | 453 | pci_restore_state(pci); |
| 454 | ret = pci_enable_device(pci); | 454 | ret = pci_enable_device(pci); |
| 455 | if (ret) | 455 | if (ret) |
| 456 | pr_err("device cant be enabled\n"); | 456 | pr_err("device can't be enabled\n"); |
| 457 | 457 | ||
| 458 | mutex_lock(&sst_drv_ctx->sst_lock); | 458 | mutex_lock(&sst_drv_ctx->sst_lock); |
| 459 | sst_drv_ctx->sst_state = SST_UN_INIT; | 459 | sst_drv_ctx->sst_state = SST_UN_INIT; |
diff --git a/drivers/staging/intel_sst/intel_sst_app_interface.c b/drivers/staging/intel_sst/intel_sst_app_interface.c index a367991d5600..1d0621260ea8 100644 --- a/drivers/staging/intel_sst/intel_sst_app_interface.c +++ b/drivers/staging/intel_sst/intel_sst_app_interface.c | |||
| @@ -236,7 +236,7 @@ int intel_sst_mmap(struct file *file_ptr, struct vm_area_struct *vma) | |||
| 236 | if (!sst_drv_ctx->mmap_mem) | 236 | if (!sst_drv_ctx->mmap_mem) |
| 237 | return -EIO; | 237 | return -EIO; |
| 238 | 238 | ||
| 239 | /* round it up to the page bondary */ | 239 | /* round it up to the page boundary */ |
| 240 | /*mem_area = (void *)((((unsigned long)sst_drv_ctx->mmap_mem) | 240 | /*mem_area = (void *)((((unsigned long)sst_drv_ctx->mmap_mem) |
| 241 | + PAGE_SIZE - 1) & PAGE_MASK);*/ | 241 | + PAGE_SIZE - 1) & PAGE_MASK);*/ |
| 242 | mem_area = (void *) PAGE_ALIGN((unsigned int) sst_drv_ctx->mmap_mem); | 242 | mem_area = (void *) PAGE_ALIGN((unsigned int) sst_drv_ctx->mmap_mem); |
| @@ -871,7 +871,7 @@ int sst_send_algo_ipc(struct ipc_post **msg) | |||
| 871 | } | 871 | } |
| 872 | 872 | ||
| 873 | /** | 873 | /** |
| 874 | * intel_sst_ioctl_dsp - recieves the device ioctl's | 874 | * intel_sst_ioctl_dsp - receives the device ioctl's |
| 875 | * | 875 | * |
| 876 | * @cmd:Ioctl cmd | 876 | * @cmd:Ioctl cmd |
| 877 | * @arg:data | 877 | * @arg:data |
| @@ -1067,7 +1067,7 @@ long intel_sst_ioctl(struct file *file_ptr, unsigned int cmd, unsigned long arg) | |||
| 1067 | retval = -EFAULT; | 1067 | retval = -EFAULT; |
| 1068 | break; | 1068 | break; |
| 1069 | } | 1069 | } |
| 1070 | pr_debug("SET_VOLUME recieved for %d!\n", | 1070 | pr_debug("SET_VOLUME received for %d!\n", |
| 1071 | set_vol.stream_id); | 1071 | set_vol.stream_id); |
| 1072 | if (minor == STREAM_MODULE && set_vol.stream_id == 0) { | 1072 | if (minor == STREAM_MODULE && set_vol.stream_id == 0) { |
| 1073 | pr_debug("invalid operation!\n"); | 1073 | pr_debug("invalid operation!\n"); |
| @@ -1085,7 +1085,7 @@ long intel_sst_ioctl(struct file *file_ptr, unsigned int cmd, unsigned long arg) | |||
| 1085 | retval = -EFAULT; | 1085 | retval = -EFAULT; |
| 1086 | break; | 1086 | break; |
| 1087 | } | 1087 | } |
| 1088 | pr_debug("IOCTL_GET_VOLUME recieved for stream = %d!\n", | 1088 | pr_debug("IOCTL_GET_VOLUME received for stream = %d!\n", |
| 1089 | get_vol.stream_id); | 1089 | get_vol.stream_id); |
| 1090 | if (minor == STREAM_MODULE && get_vol.stream_id == 0) { | 1090 | if (minor == STREAM_MODULE && get_vol.stream_id == 0) { |
| 1091 | pr_debug("invalid operation!\n"); | 1091 | pr_debug("invalid operation!\n"); |
| @@ -1117,7 +1117,7 @@ long intel_sst_ioctl(struct file *file_ptr, unsigned int cmd, unsigned long arg) | |||
| 1117 | retval = -EFAULT; | 1117 | retval = -EFAULT; |
| 1118 | break; | 1118 | break; |
| 1119 | } | 1119 | } |
| 1120 | pr_debug("SNDRV_SST_SET_VOLUME recieved for %d!\n", | 1120 | pr_debug("SNDRV_SST_SET_VOLUME received for %d!\n", |
| 1121 | set_mute.stream_id); | 1121 | set_mute.stream_id); |
| 1122 | if (minor == STREAM_MODULE && set_mute.stream_id == 0) { | 1122 | if (minor == STREAM_MODULE && set_mute.stream_id == 0) { |
| 1123 | retval = -EPERM; | 1123 | retval = -EPERM; |
| @@ -1153,7 +1153,7 @@ long intel_sst_ioctl(struct file *file_ptr, unsigned int cmd, unsigned long arg) | |||
| 1153 | case _IOC_NR(SNDRV_SST_MMAP_CAPTURE): { | 1153 | case _IOC_NR(SNDRV_SST_MMAP_CAPTURE): { |
| 1154 | struct snd_sst_mmap_buffs mmap_buf; | 1154 | struct snd_sst_mmap_buffs mmap_buf; |
| 1155 | 1155 | ||
| 1156 | pr_debug("SNDRV_SST_MMAP_PLAY/CAPTURE recieved!\n"); | 1156 | pr_debug("SNDRV_SST_MMAP_PLAY/CAPTURE received!\n"); |
| 1157 | if (minor != STREAM_MODULE) { | 1157 | if (minor != STREAM_MODULE) { |
| 1158 | retval = -EBADRQC; | 1158 | retval = -EBADRQC; |
| 1159 | break; | 1159 | break; |
| @@ -1239,7 +1239,7 @@ long intel_sst_ioctl(struct file *file_ptr, unsigned int cmd, unsigned long arg) | |||
| 1239 | case _IOC_NR(SNDRV_SST_SET_TARGET_DEVICE): { | 1239 | case _IOC_NR(SNDRV_SST_SET_TARGET_DEVICE): { |
| 1240 | struct snd_sst_target_device target_device; | 1240 | struct snd_sst_target_device target_device; |
| 1241 | 1241 | ||
| 1242 | pr_debug("SET_TARGET_DEVICE recieved!\n"); | 1242 | pr_debug("SET_TARGET_DEVICE received!\n"); |
| 1243 | if (copy_from_user(&target_device, (void __user *)arg, | 1243 | if (copy_from_user(&target_device, (void __user *)arg, |
| 1244 | sizeof(target_device))) { | 1244 | sizeof(target_device))) { |
| 1245 | retval = -EFAULT; | 1245 | retval = -EFAULT; |
| @@ -1256,7 +1256,7 @@ long intel_sst_ioctl(struct file *file_ptr, unsigned int cmd, unsigned long arg) | |||
| 1256 | case _IOC_NR(SNDRV_SST_DRIVER_INFO): { | 1256 | case _IOC_NR(SNDRV_SST_DRIVER_INFO): { |
| 1257 | struct snd_sst_driver_info info; | 1257 | struct snd_sst_driver_info info; |
| 1258 | 1258 | ||
| 1259 | pr_debug("SNDRV_SST_DRIVER_INFO recived\n"); | 1259 | pr_debug("SNDRV_SST_DRIVER_INFO received\n"); |
| 1260 | info.version = SST_VERSION_NUM; | 1260 | info.version = SST_VERSION_NUM; |
| 1261 | /* hard coding, shud get sumhow later */ | 1261 | /* hard coding, shud get sumhow later */ |
| 1262 | info.active_pcm_streams = sst_drv_ctx->stream_cnt - | 1262 | info.active_pcm_streams = sst_drv_ctx->stream_cnt - |
diff --git a/drivers/staging/intel_sst/intel_sst_drv_interface.c b/drivers/staging/intel_sst/intel_sst_drv_interface.c index ea8e251b5099..e9c182108243 100644 --- a/drivers/staging/intel_sst/intel_sst_drv_interface.c +++ b/drivers/staging/intel_sst/intel_sst_drv_interface.c | |||
| @@ -315,7 +315,7 @@ int sst_open_pcm_stream(struct snd_sst_params *str_param) | |||
| 315 | pm_runtime_get_sync(&sst_drv_ctx->pci->dev); | 315 | pm_runtime_get_sync(&sst_drv_ctx->pci->dev); |
| 316 | 316 | ||
| 317 | if (sst_drv_ctx->sst_state == SST_SUSPENDED) { | 317 | if (sst_drv_ctx->sst_state == SST_SUSPENDED) { |
| 318 | /* LPE is suspended, resume it before proceding*/ | 318 | /* LPE is suspended, resume it before proceeding*/ |
| 319 | pr_debug("Resuming from Suspended state\n"); | 319 | pr_debug("Resuming from Suspended state\n"); |
| 320 | retval = intel_sst_resume(sst_drv_ctx->pci); | 320 | retval = intel_sst_resume(sst_drv_ctx->pci); |
| 321 | if (retval) { | 321 | if (retval) { |
diff --git a/drivers/staging/intel_sst/intel_sst_dsp.c b/drivers/staging/intel_sst/intel_sst_dsp.c index 6e5c9152da9f..bffe4c6e2928 100644 --- a/drivers/staging/intel_sst/intel_sst_dsp.c +++ b/drivers/staging/intel_sst/intel_sst_dsp.c | |||
| @@ -350,7 +350,7 @@ static int sst_download_library(const struct firmware *fw_lib, | |||
| 350 | 350 | ||
| 351 | } | 351 | } |
| 352 | 352 | ||
| 353 | /* This function is called befoer downloading the codec/postprocessing | 353 | /* This function is called before downloading the codec/postprocessing |
| 354 | library is set for download to SST DSP*/ | 354 | library is set for download to SST DSP*/ |
| 355 | static int sst_validate_library(const struct firmware *fw_lib, | 355 | static int sst_validate_library(const struct firmware *fw_lib, |
| 356 | struct lib_slot_info *slot, | 356 | struct lib_slot_info *slot, |
| @@ -405,7 +405,7 @@ exit: | |||
| 405 | 405 | ||
| 406 | } | 406 | } |
| 407 | 407 | ||
| 408 | /* This function is called when FW requests for a particular libary download | 408 | /* This function is called when FW requests for a particular library download |
| 409 | This function prepares the library to download*/ | 409 | This function prepares the library to download*/ |
| 410 | int sst_load_library(struct snd_sst_lib_download *lib, u8 ops) | 410 | int sst_load_library(struct snd_sst_lib_download *lib, u8 ops) |
| 411 | { | 411 | { |
diff --git a/drivers/staging/intel_sst/intel_sst_fw_ipc.h b/drivers/staging/intel_sst/intel_sst_fw_ipc.h index 8df313d10d2a..0f0c5bbc5f4b 100644 --- a/drivers/staging/intel_sst/intel_sst_fw_ipc.h +++ b/drivers/staging/intel_sst/intel_sst_fw_ipc.h | |||
| @@ -111,7 +111,7 @@ | |||
| 111 | #define IPC_SST_PERIOD_ELAPSED 0x97 /* period elapsed */ | 111 | #define IPC_SST_PERIOD_ELAPSED 0x97 /* period elapsed */ |
| 112 | #define IPC_IA_TARGET_DEV_CHNGD 0x98 /* error in processing a stream */ | 112 | #define IPC_IA_TARGET_DEV_CHNGD 0x98 /* error in processing a stream */ |
| 113 | 113 | ||
| 114 | #define IPC_SST_ERROR_EVENT 0x99 /* Buffer over run occured */ | 114 | #define IPC_SST_ERROR_EVENT 0x99 /* Buffer over run occurred */ |
| 115 | /* L2S messages */ | 115 | /* L2S messages */ |
| 116 | #define IPC_SC_DDR_LINK_UP 0xC0 | 116 | #define IPC_SC_DDR_LINK_UP 0xC0 |
| 117 | #define IPC_SC_DDR_LINK_DOWN 0xC1 | 117 | #define IPC_SC_DDR_LINK_DOWN 0xC1 |
diff --git a/drivers/staging/intel_sst/intel_sst_stream.c b/drivers/staging/intel_sst/intel_sst_stream.c index 795e42ab7360..dd58be5b1975 100644 --- a/drivers/staging/intel_sst/intel_sst_stream.c +++ b/drivers/staging/intel_sst/intel_sst_stream.c | |||
| @@ -98,7 +98,7 @@ static unsigned int get_mrst_stream_id(void) | |||
| 98 | if (sst_drv_ctx->streams[i].status == STREAM_UN_INIT) | 98 | if (sst_drv_ctx->streams[i].status == STREAM_UN_INIT) |
| 99 | return i; | 99 | return i; |
| 100 | } | 100 | } |
| 101 | pr_debug("Didnt find empty stream for mrst\n"); | 101 | pr_debug("Didn't find empty stream for mrst\n"); |
| 102 | return -EBUSY; | 102 | return -EBUSY; |
| 103 | } | 103 | } |
| 104 | 104 | ||
diff --git a/drivers/staging/intel_sst/intel_sst_stream_encoded.c b/drivers/staging/intel_sst/intel_sst_stream_encoded.c index 29753c7519a7..d5f07b878828 100644 --- a/drivers/staging/intel_sst/intel_sst_stream_encoded.c +++ b/drivers/staging/intel_sst/intel_sst_stream_encoded.c | |||
| @@ -914,7 +914,7 @@ static int sst_prepare_input_buffers_rar(struct stream_info *str_info, | |||
| 914 | (void *) ((unsigned long) rar_buffers.bus_address); | 914 | (void *) ((unsigned long) rar_buffers.bus_address); |
| 915 | pr_debug("RAR buf addr in DnR (input buffer function)0x%lu", | 915 | pr_debug("RAR buf addr in DnR (input buffer function)0x%lu", |
| 916 | (unsigned long) str_info->decode_ibuf); | 916 | (unsigned long) str_info->decode_ibuf); |
| 917 | pr_debug("rar in DnR decode funtion/output b_add rar =0x%lu", | 917 | pr_debug("rar in DnR decode function/output b_add rar =0x%lu", |
| 918 | (unsigned long) rar_buffers.bus_address); | 918 | (unsigned long) rar_buffers.bus_address); |
| 919 | *input_index = i + 1; | 919 | *input_index = i + 1; |
| 920 | str_info->decode_isize = dbufs->ibufs->buff_entry[i].size; | 920 | str_info->decode_isize = dbufs->ibufs->buff_entry[i].size; |
diff --git a/drivers/staging/intel_sst/intelmid.c b/drivers/staging/intel_sst/intelmid.c index fb2292186703..d207636a7b6d 100644 --- a/drivers/staging/intel_sst/intelmid.c +++ b/drivers/staging/intel_sst/intelmid.c | |||
| @@ -773,7 +773,7 @@ static int __devinit snd_intelmad_sst_register( | |||
| 773 | if (ret_val) | 773 | if (ret_val) |
| 774 | return ret_val; | 774 | return ret_val; |
| 775 | sst_card_vendor_id = (vendor_addr.value & (MASK2|MASK1|MASK0)); | 775 | sst_card_vendor_id = (vendor_addr.value & (MASK2|MASK1|MASK0)); |
| 776 | pr_debug("orginal n extrated vendor id = 0x%x %d\n", | 776 | pr_debug("original n extrated vendor id = 0x%x %d\n", |
| 777 | vendor_addr.value, sst_card_vendor_id); | 777 | vendor_addr.value, sst_card_vendor_id); |
| 778 | if (sst_card_vendor_id < 0 || sst_card_vendor_id > 2) { | 778 | if (sst_card_vendor_id < 0 || sst_card_vendor_id > 2) { |
| 779 | pr_err("vendor card not supported!!\n"); | 779 | pr_err("vendor card not supported!!\n"); |
diff --git a/drivers/staging/intel_sst/intelmid.h b/drivers/staging/intel_sst/intelmid.h index ca881b790cb2..e77da87e1df0 100644 --- a/drivers/staging/intel_sst/intelmid.h +++ b/drivers/staging/intel_sst/intelmid.h | |||
| @@ -90,7 +90,7 @@ struct mad_jack_msg_wq { | |||
| 90 | * @card_index: sound card index | 90 | * @card_index: sound card index |
| 91 | * @card_id: sound card id detected | 91 | * @card_id: sound card id detected |
| 92 | * @sstdrv_ops: ptr to sst driver ops | 92 | * @sstdrv_ops: ptr to sst driver ops |
| 93 | * @pdev: ptr to platfrom device | 93 | * @pdev: ptr to platform device |
| 94 | * @irq: interrupt number detected | 94 | * @irq: interrupt number detected |
| 95 | * @pmic_status: Device status of sound card | 95 | * @pmic_status: Device status of sound card |
| 96 | * @int_base: ptr to MMIO interrupt region | 96 | * @int_base: ptr to MMIO interrupt region |
diff --git a/drivers/staging/keucr/init.c b/drivers/staging/keucr/init.c index 5c01f28f0734..8af7c84daee2 100644 --- a/drivers/staging/keucr/init.c +++ b/drivers/staging/keucr/init.c | |||
| @@ -90,7 +90,7 @@ int ENE_MSInit(struct us_data *us) | |||
| 90 | 90 | ||
| 91 | result = ENE_SendScsiCmd(us, FDIR_READ, &buf, 0); | 91 | result = ENE_SendScsiCmd(us, FDIR_READ, &buf, 0); |
| 92 | if (result != USB_STOR_XFER_GOOD) { | 92 | if (result != USB_STOR_XFER_GOOD) { |
| 93 | printk(KERN_ERR "Exection MS Init Code Fail !!\n"); | 93 | printk(KERN_ERR "Execution MS Init Code Fail !!\n"); |
| 94 | return USB_STOR_TRANSPORT_ERROR; | 94 | return USB_STOR_TRANSPORT_ERROR; |
| 95 | } | 95 | } |
| 96 | 96 | ||
| @@ -145,7 +145,7 @@ int ENE_SMInit(struct us_data *us) | |||
| 145 | result = ENE_SendScsiCmd(us, FDIR_READ, &buf, 0); | 145 | result = ENE_SendScsiCmd(us, FDIR_READ, &buf, 0); |
| 146 | if (result != USB_STOR_XFER_GOOD) { | 146 | if (result != USB_STOR_XFER_GOOD) { |
| 147 | printk(KERN_ERR | 147 | printk(KERN_ERR |
| 148 | "Exection SM Init Code Fail !! result = %x\n", result); | 148 | "Execution SM Init Code Fail !! result = %x\n", result); |
| 149 | return USB_STOR_TRANSPORT_ERROR; | 149 | return USB_STOR_TRANSPORT_ERROR; |
| 150 | } | 150 | } |
| 151 | 151 | ||
diff --git a/drivers/staging/keucr/smilmain.c b/drivers/staging/keucr/smilmain.c index 2cbe9f897eef..95c688a5c95a 100644 --- a/drivers/staging/keucr/smilmain.c +++ b/drivers/staging/keucr/smilmain.c | |||
| @@ -64,7 +64,7 @@ extern struct SSFDCTYPE Ssfdc; | |||
| 64 | extern struct ADDRESS Media; | 64 | extern struct ADDRESS Media; |
| 65 | extern struct CIS_AREA CisArea; | 65 | extern struct CIS_AREA CisArea; |
| 66 | 66 | ||
| 67 | //BIT Controll Macro | 67 | //BIT Control Macro |
| 68 | BYTE BitData[] = { 0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80 } ; | 68 | BYTE BitData[] = { 0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80 } ; |
| 69 | #define Set_D_Bit(a,b) (a[(BYTE)((b)/8)]|= BitData[(b)%8]) | 69 | #define Set_D_Bit(a,b) (a[(BYTE)((b)/8)]|= BitData[(b)%8]) |
| 70 | #define Clr_D_Bit(a,b) (a[(BYTE)((b)/8)]&=~BitData[(b)%8]) | 70 | #define Clr_D_Bit(a,b) (a[(BYTE)((b)/8)]&=~BitData[(b)%8]) |
| @@ -76,7 +76,7 @@ extern BYTE IsXDCompliance; | |||
| 76 | 76 | ||
| 77 | 77 | ||
| 78 | // | 78 | // |
| 79 | ////Power Controll & Media Exist Check Function | 79 | ////Power Control & Media Exist Check Function |
| 80 | ////----- Init_D_SmartMedia() -------------------------------------------- | 80 | ////----- Init_D_SmartMedia() -------------------------------------------- |
| 81 | //int Init_D_SmartMedia(void) | 81 | //int Init_D_SmartMedia(void) |
| 82 | //{ | 82 | //{ |
| @@ -575,7 +575,7 @@ int Media_D_OneSectWriteFlush(PFDO_DEVICE_EXTENSION fdoExt) | |||
| 575 | // return(SUCCESS); | 575 | // return(SUCCESS); |
| 576 | //} | 576 | //} |
| 577 | // | 577 | // |
| 578 | ////Power Controll & Media Exist Check Subroutine | 578 | ////Power Control & Media Exist Check Subroutine |
| 579 | ////----- Initialize_D_Media() ------------------------------------------- | 579 | ////----- Initialize_D_Media() ------------------------------------------- |
| 580 | //void Initialize_D_Media(void) | 580 | //void Initialize_D_Media(void) |
| 581 | //{ | 581 | //{ |
| @@ -738,7 +738,7 @@ int Check_D_MediaFmt(struct us_data *us) | |||
| 738 | // return(SUCCESS); | 738 | // return(SUCCESS); |
| 739 | //} | 739 | //} |
| 740 | */ | 740 | */ |
| 741 | //SmartMedia Physical Address Controll Subroutine | 741 | //SmartMedia Physical Address Control Subroutine |
| 742 | //----- Conv_D_MediaAddr() --------------------------------------------- | 742 | //----- Conv_D_MediaAddr() --------------------------------------------- |
| 743 | int Conv_D_MediaAddr(struct us_data *us, DWORD addr) | 743 | int Conv_D_MediaAddr(struct us_data *us, DWORD addr) |
| 744 | { | 744 | { |
diff --git a/drivers/staging/keucr/smilsub.c b/drivers/staging/keucr/smilsub.c index 80da61c37bff..4fe47422eb79 100644 --- a/drivers/staging/keucr/smilsub.c +++ b/drivers/staging/keucr/smilsub.c | |||
| @@ -57,7 +57,7 @@ extern WORD WriteBlock; | |||
| 57 | #define ODD 1 // Odd Page for 256byte/page | 57 | #define ODD 1 // Odd Page for 256byte/page |
| 58 | 58 | ||
| 59 | 59 | ||
| 60 | //SmartMedia Redundant buffer data Controll Subroutine | 60 | //SmartMedia Redundant buffer data Control Subroutine |
| 61 | //----- Check_D_DataBlank() -------------------------------------------- | 61 | //----- Check_D_DataBlank() -------------------------------------------- |
| 62 | int Check_D_DataBlank(BYTE *redundant) | 62 | int Check_D_DataBlank(BYTE *redundant) |
| 63 | { | 63 | { |
| @@ -1367,7 +1367,7 @@ BYTE _Check_D_DevCode(BYTE dcode) | |||
| 1367 | } | 1367 | } |
| 1368 | } | 1368 | } |
| 1369 | /* | 1369 | /* |
| 1370 | ////SmartMedia Power Controll Subroutine | 1370 | ////SmartMedia Power Control Subroutine |
| 1371 | ////----- Cnt_D_Reset() ---------------------------------------------- | 1371 | ////----- Cnt_D_Reset() ---------------------------------------------- |
| 1372 | //void Cnt_D_Reset(void) | 1372 | //void Cnt_D_Reset(void) |
| 1373 | //{ | 1373 | //{ |
| @@ -1478,7 +1478,7 @@ BYTE _Check_D_DevCode(BYTE dcode) | |||
| 1478 | //} | 1478 | //} |
| 1479 | // | 1479 | // |
| 1480 | */ | 1480 | */ |
| 1481 | //SmartMedia ECC Controll Subroutine | 1481 | //SmartMedia ECC Control Subroutine |
| 1482 | //----- Check_D_ReadError() ---------------------------------------------- | 1482 | //----- Check_D_ReadError() ---------------------------------------------- |
| 1483 | int Check_D_ReadError(BYTE *redundant) | 1483 | int Check_D_ReadError(BYTE *redundant) |
| 1484 | { | 1484 | { |
diff --git a/drivers/staging/lirc/lirc_ene0100.h b/drivers/staging/lirc/lirc_ene0100.h index 776b693bb307..06bebd6acc46 100644 --- a/drivers/staging/lirc/lirc_ene0100.h +++ b/drivers/staging/lirc/lirc_ene0100.h | |||
| @@ -81,7 +81,7 @@ | |||
| 81 | 81 | ||
| 82 | /* CIR block settings */ | 82 | /* CIR block settings */ |
| 83 | #define ENE_CIR_CONF1 0xFEC0 | 83 | #define ENE_CIR_CONF1 0xFEC0 |
| 84 | #define ENE_CIR_CONF1_ADC_ON 0x7 /* reciever on gpio40 enabled */ | 84 | #define ENE_CIR_CONF1_ADC_ON 0x7 /* receiver on gpio40 enabled */ |
| 85 | #define ENE_CIR_CONF1_LEARN1 (1 << 3) /* enabled on learning mode */ | 85 | #define ENE_CIR_CONF1_LEARN1 (1 << 3) /* enabled on learning mode */ |
| 86 | #define ENE_CIR_CONF1_TX_ON 0x30 /* enabled on transmit */ | 86 | #define ENE_CIR_CONF1_TX_ON 0x30 /* enabled on transmit */ |
| 87 | #define ENE_CIR_CONF1_TX_CARR (1 << 7) /* send TX carrier or not */ | 87 | #define ENE_CIR_CONF1_TX_CARR (1 << 7) /* send TX carrier or not */ |
| @@ -96,7 +96,7 @@ | |||
| 96 | 96 | ||
| 97 | /* transmitter - not implemented yet */ | 97 | /* transmitter - not implemented yet */ |
| 98 | /* KB3926C and higher */ | 98 | /* KB3926C and higher */ |
| 99 | /* transmission is very similiar to recieving, a byte is written to */ | 99 | /* transmission is very similar to receiving, a byte is written to */ |
| 100 | /* ENE_TX_INPUT, in same manner as it is read from sample buffer */ | 100 | /* ENE_TX_INPUT, in same manner as it is read from sample buffer */ |
| 101 | /* sample period is fixed*/ | 101 | /* sample period is fixed*/ |
| 102 | 102 | ||
diff --git a/drivers/staging/memrar/Kconfig b/drivers/staging/memrar/Kconfig deleted file mode 100644 index cbeebc550904..000000000000 --- a/drivers/staging/memrar/Kconfig +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | config MRST_RAR_HANDLER | ||
| 2 | tristate "RAR handler driver for Intel Moorestown platform" | ||
| 3 | depends on RAR_REGISTER | ||
| 4 | ---help--- | ||
| 5 | This driver provides a memory management interface to | ||
| 6 | restricted access regions (RAR) available on the Intel | ||
| 7 | Moorestown platform. | ||
| 8 | |||
| 9 | Once locked down, restricted access regions are only | ||
| 10 | accessible by specific hardware on the platform. The x86 | ||
| 11 | CPU is typically not one of those platforms. As such this | ||
| 12 | driver does not access RAR, and only provides a buffer | ||
| 13 | allocation/bookkeeping mechanism. | ||
| 14 | |||
| 15 | If unsure, say N. | ||
diff --git a/drivers/staging/memrar/Makefile b/drivers/staging/memrar/Makefile deleted file mode 100644 index a3336c00cc5f..000000000000 --- a/drivers/staging/memrar/Makefile +++ /dev/null | |||
| @@ -1,2 +0,0 @@ | |||
| 1 | obj-$(CONFIG_MRST_RAR_HANDLER) += memrar.o | ||
| 2 | memrar-y := memrar_allocator.o memrar_handler.o | ||
diff --git a/drivers/staging/memrar/TODO b/drivers/staging/memrar/TODO deleted file mode 100644 index 435e09ba44c5..000000000000 --- a/drivers/staging/memrar/TODO +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | RAR Handler (memrar) Driver TODO Items | ||
| 2 | ====================================== | ||
| 3 | |||
| 4 | Maintainer: Eugene Epshteyn <eugene.epshteyn@intel.com> | ||
| 5 | |||
| 6 | memrar.h | ||
| 7 | -------- | ||
| 8 | 1. This header exposes the driver's user space and kernel space | ||
| 9 | interfaces. It should be moved to <linux/rar/memrar.h>, or | ||
| 10 | something along those lines, when this memrar driver is moved out | ||
| 11 | of `staging'. | ||
| 12 | a. It would be ideal if staging/rar_register/rar_register.h was | ||
| 13 | moved to the same directory. | ||
| 14 | |||
| 15 | memrar_allocator.[ch] | ||
| 16 | --------------------- | ||
| 17 | 1. Address potential fragmentation issues with the memrar_allocator. | ||
| 18 | |||
| 19 | 2. Hide struct memrar_allocator details/fields. They need not be | ||
| 20 | exposed to the user. | ||
| 21 | a. Forward declare struct memrar_allocator. | ||
| 22 | b. Move all three struct definitions to `memrar_allocator.c' | ||
| 23 | source file. | ||
| 24 | c. Add a memrar_allocator_largest_free_area() function, or | ||
| 25 | something like that to get access to the value of the struct | ||
| 26 | memrar_allocator "largest_free_area" field. This allows the | ||
| 27 | struct memrar_allocator fields to be completely hidden from | ||
| 28 | the user. The memrar_handler code really only needs this for | ||
| 29 | statistic gathering on-demand. | ||
| 30 | d. Do the same for the "capacity" field as the | ||
| 31 | "largest_free_area" field. | ||
| 32 | |||
| 33 | 3. Move memrar_allocator.* to kernel `lib' directory since it is HW | ||
| 34 | neutral. | ||
| 35 | a. Alternatively, use lib/genalloc.c instead. | ||
| 36 | b. A kernel port of Doug Lea's malloc() implementation may also | ||
| 37 | be an option. | ||
| 38 | |||
| 39 | memrar_handler.c | ||
| 40 | ---------------- | ||
| 41 | 1. Split user space interface (ioctl code) from core/kernel code, | ||
| 42 | e.g.: | ||
| 43 | memrar_handler.c -> memrar_core.c, memrar_user.c | ||
diff --git a/drivers/staging/memrar/memrar-abi b/drivers/staging/memrar/memrar-abi deleted file mode 100644 index c23fc996a435..000000000000 --- a/drivers/staging/memrar/memrar-abi +++ /dev/null | |||
| @@ -1,89 +0,0 @@ | |||
| 1 | What: /dev/memrar | ||
| 2 | Date: March 2010 | ||
| 3 | KernelVersion: 2.6.34 | ||
| 4 | Contact: Eugene Epshteyn <eugene.epshteyn@intel.com> | ||
| 5 | Description: The Intel Moorestown Restricted Access Region (RAR) | ||
| 6 | Handler driver exposes an ioctl() based interface that | ||
| 7 | allows a user to reserve and release blocks of RAR | ||
| 8 | memory. | ||
| 9 | |||
| 10 | Note: A sysfs based one was not appropriate for the | ||
| 11 | RAR handler's usage model. | ||
| 12 | |||
| 13 | ========================================================= | ||
| 14 | ioctl() Requests | ||
| 15 | ========================================================= | ||
| 16 | RAR_HANDLER_RESERVE | ||
| 17 | ------------------- | ||
| 18 | Description: Reserve RAR block. | ||
| 19 | Type: struct RAR_block_info | ||
| 20 | Direction: in/out | ||
| 21 | Errors: EINVAL (invalid RAR type or size) | ||
| 22 | ENOMEM (not enough RAR memory) | ||
| 23 | |||
| 24 | RAR_HANDLER_STAT | ||
| 25 | ---------------- | ||
| 26 | Description: Get RAR statistics. | ||
| 27 | Type: struct RAR_stat | ||
| 28 | Direction: in/out | ||
| 29 | Errors: EINVAL (invalid RAR type) | ||
| 30 | |||
| 31 | RAR_HANDLER_RELEASE | ||
| 32 | ------------------- | ||
| 33 | Description: Release previously reserved RAR block. | ||
| 34 | Type: 32 bit unsigned integer | ||
| 35 | (e.g. uint32_t), i.e the RAR "handle". | ||
| 36 | Direction: in | ||
| 37 | Errors: EINVAL (invalid RAR handle) | ||
| 38 | |||
| 39 | |||
| 40 | ========================================================= | ||
| 41 | ioctl() Request Parameter Types | ||
| 42 | ========================================================= | ||
| 43 | The structures referred to above are defined as | ||
| 44 | follows: | ||
| 45 | |||
| 46 | /** | ||
| 47 | * struct RAR_block_info - user space struct that | ||
| 48 | * describes RAR buffer | ||
| 49 | * @type: Type of RAR memory (e.g., | ||
| 50 | * RAR_TYPE_VIDEO or RAR_TYPE_AUDIO) [in] | ||
| 51 | * @size: Requested size of a block in bytes to | ||
| 52 | * be reserved in RAR. [in] | ||
| 53 | * @handle: Handle that can be used to refer to | ||
| 54 | * reserved block. [out] | ||
| 55 | * | ||
| 56 | * This is the basic structure exposed to the user | ||
| 57 | * space that describes a given RAR buffer. It used | ||
| 58 | * as the parameter for the RAR_HANDLER_RESERVE ioctl. | ||
| 59 | * The buffer's underlying bus address is not exposed | ||
| 60 | * to the user. User space code refers to the buffer | ||
| 61 | * entirely by "handle". | ||
| 62 | */ | ||
| 63 | struct RAR_block_info { | ||
| 64 | __u32 type; | ||
| 65 | __u32 size; | ||
| 66 | __u32 handle; | ||
| 67 | }; | ||
| 68 | |||
| 69 | /** | ||
| 70 | * struct RAR_stat - RAR statistics structure | ||
| 71 | * @type: Type of RAR memory (e.g., | ||
| 72 | * RAR_TYPE_VIDEO or | ||
| 73 | * RAR_TYPE_AUDIO) [in] | ||
| 74 | * @capacity: Total size of RAR memory | ||
| 75 | * region. [out] | ||
| 76 | * @largest_block_size: Size of the largest reservable | ||
| 77 | * block. [out] | ||
| 78 | * | ||
| 79 | * This structure is used for RAR_HANDLER_STAT ioctl. | ||
| 80 | */ | ||
| 81 | struct RAR_stat { | ||
| 82 | __u32 type; | ||
| 83 | __u32 capacity; | ||
| 84 | __u32 largest_block_size; | ||
| 85 | }; | ||
| 86 | |||
| 87 | Lastly, the RAR_HANDLER_RELEASE ioctl expects a | ||
| 88 | "handle" to the RAR block of memory. It is a 32 bit | ||
| 89 | unsigned integer. | ||
diff --git a/drivers/staging/memrar/memrar.h b/drivers/staging/memrar/memrar.h deleted file mode 100644 index 0feb73b94c91..000000000000 --- a/drivers/staging/memrar/memrar.h +++ /dev/null | |||
| @@ -1,174 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * RAR Handler (/dev/memrar) internal driver API. | ||
| 3 | * Copyright (C) 2010 Intel Corporation. All rights reserved. | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or | ||
| 6 | * modify it under the terms of version 2 of the GNU General | ||
| 7 | * Public License as published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be | ||
| 10 | * useful, but WITHOUT ANY WARRANTY; without even the implied | ||
| 11 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | ||
| 12 | * PURPOSE. See the GNU General Public License for more details. | ||
| 13 | * You should have received a copy of the GNU General Public | ||
| 14 | * License along with this program; if not, write to the Free | ||
| 15 | * Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 16 | * Boston, MA 02111-1307, USA. | ||
| 17 | * The full GNU General Public License is included in this | ||
| 18 | * distribution in the file called COPYING. | ||
| 19 | */ | ||
| 20 | |||
| 21 | |||
| 22 | #ifndef _MEMRAR_H | ||
| 23 | #define _MEMRAR_H | ||
| 24 | |||
| 25 | #include <linux/ioctl.h> | ||
| 26 | #include <linux/types.h> | ||
| 27 | |||
| 28 | |||
| 29 | /** | ||
| 30 | * struct RAR_stat - RAR statistics structure | ||
| 31 | * @type: Type of RAR memory (e.g., audio vs. video) | ||
| 32 | * @capacity: Total size of RAR memory region. | ||
| 33 | * @largest_block_size: Size of the largest reservable block. | ||
| 34 | * | ||
| 35 | * This structure is used for RAR_HANDLER_STAT ioctl and for the | ||
| 36 | * RAR_get_stat() user space wrapper function. | ||
| 37 | */ | ||
| 38 | struct RAR_stat { | ||
| 39 | __u32 type; | ||
| 40 | __u32 capacity; | ||
| 41 | __u32 largest_block_size; | ||
| 42 | }; | ||
| 43 | |||
| 44 | |||
| 45 | /** | ||
| 46 | * struct RAR_block_info - user space struct that describes RAR buffer | ||
| 47 | * @type: Type of RAR memory (e.g., audio vs. video) | ||
| 48 | * @size: Requested size of a block to be reserved in RAR. | ||
| 49 | * @handle: Handle that can be used to refer to reserved block. | ||
| 50 | * | ||
| 51 | * This is the basic structure exposed to the user space that | ||
| 52 | * describes a given RAR buffer. The buffer's underlying bus address | ||
| 53 | * is not exposed to the user. User space code refers to the buffer | ||
| 54 | * entirely by "handle". | ||
| 55 | */ | ||
| 56 | struct RAR_block_info { | ||
| 57 | __u32 type; | ||
| 58 | __u32 size; | ||
| 59 | __u32 handle; | ||
| 60 | }; | ||
| 61 | |||
| 62 | |||
| 63 | #define RAR_IOCTL_BASE 0xE0 | ||
| 64 | |||
| 65 | /* Reserve RAR block. */ | ||
| 66 | #define RAR_HANDLER_RESERVE _IOWR(RAR_IOCTL_BASE, 0x00, struct RAR_block_info) | ||
| 67 | |||
| 68 | /* Release previously reserved RAR block. */ | ||
| 69 | #define RAR_HANDLER_RELEASE _IOW(RAR_IOCTL_BASE, 0x01, __u32) | ||
| 70 | |||
| 71 | /* Get RAR stats. */ | ||
| 72 | #define RAR_HANDLER_STAT _IOWR(RAR_IOCTL_BASE, 0x02, struct RAR_stat) | ||
| 73 | |||
| 74 | |||
| 75 | #ifdef __KERNEL__ | ||
| 76 | |||
| 77 | /* -------------------------------------------------------------- */ | ||
| 78 | /* Kernel Side RAR Handler Interface */ | ||
| 79 | /* -------------------------------------------------------------- */ | ||
| 80 | |||
| 81 | /** | ||
| 82 | * struct RAR_buffer - kernel space struct that describes RAR buffer | ||
| 83 | * @info: structure containing base RAR buffer information | ||
| 84 | * @bus_address: buffer bus address | ||
| 85 | * | ||
| 86 | * Structure that contains all information related to a given block of | ||
| 87 | * memory in RAR. It is generally only used when retrieving RAR | ||
| 88 | * related bus addresses. | ||
| 89 | * | ||
| 90 | * Note: This structure is used only by RAR-enabled drivers, and is | ||
| 91 | * not intended to be exposed to the user space. | ||
| 92 | */ | ||
| 93 | struct RAR_buffer { | ||
| 94 | struct RAR_block_info info; | ||
| 95 | dma_addr_t bus_address; | ||
| 96 | }; | ||
| 97 | |||
| 98 | #if defined(CONFIG_MRST_RAR_HANDLER) | ||
| 99 | /** | ||
| 100 | * rar_reserve() - reserve RAR buffers | ||
| 101 | * @buffers: array of RAR_buffers where type and size of buffers to | ||
| 102 | * reserve are passed in, handle and bus address are | ||
| 103 | * passed out | ||
| 104 | * @count: number of RAR_buffers in the "buffers" array | ||
| 105 | * | ||
| 106 | * This function will reserve buffers in the restricted access regions | ||
| 107 | * of given types. | ||
| 108 | * | ||
| 109 | * It returns the number of successfully reserved buffers. Successful | ||
| 110 | * buffer reservations will have the corresponding bus_address field | ||
| 111 | * set to a non-zero value in the given buffers vector. | ||
| 112 | */ | ||
| 113 | extern size_t rar_reserve(struct RAR_buffer *buffers, | ||
| 114 | size_t count); | ||
| 115 | |||
| 116 | /** | ||
| 117 | * rar_release() - release RAR buffers | ||
| 118 | * @buffers: array of RAR_buffers where handles to buffers to be | ||
| 119 | * released are passed in | ||
| 120 | * @count: number of RAR_buffers in the "buffers" array | ||
| 121 | * | ||
| 122 | * This function will release RAR buffers that were retrieved through | ||
| 123 | * a call to rar_reserve() or rar_handle_to_bus() by decrementing the | ||
| 124 | * reference count. The RAR buffer will be reclaimed when the | ||
| 125 | * reference count drops to zero. | ||
| 126 | * | ||
| 127 | * It returns the number of successfully released buffers. Successful | ||
| 128 | * releases will have their handle field set to zero in the given | ||
| 129 | * buffers vector. | ||
| 130 | */ | ||
| 131 | extern size_t rar_release(struct RAR_buffer *buffers, | ||
| 132 | size_t count); | ||
| 133 | |||
| 134 | /** | ||
| 135 | * rar_handle_to_bus() - convert a vector of RAR handles to bus addresses | ||
| 136 | * @buffers: array of RAR_buffers containing handles to be | ||
| 137 | * converted to bus_addresses | ||
| 138 | * @count: number of RAR_buffers in the "buffers" array | ||
| 139 | |||
| 140 | * This function will retrieve the RAR buffer bus addresses, type and | ||
| 141 | * size corresponding to the RAR handles provided in the buffers | ||
| 142 | * vector. | ||
| 143 | * | ||
| 144 | * It returns the number of successfully converted buffers. The bus | ||
| 145 | * address will be set to 0 for unrecognized handles. | ||
| 146 | * | ||
| 147 | * The reference count for each corresponding buffer in RAR will be | ||
| 148 | * incremented. Call rar_release() when done with the buffers. | ||
| 149 | */ | ||
| 150 | extern size_t rar_handle_to_bus(struct RAR_buffer *buffers, | ||
| 151 | size_t count); | ||
| 152 | |||
| 153 | #else | ||
| 154 | |||
| 155 | extern inline size_t rar_reserve(struct RAR_buffer *buffers, size_t count) | ||
| 156 | { | ||
| 157 | return 0; | ||
| 158 | } | ||
| 159 | |||
| 160 | extern inline size_t rar_release(struct RAR_buffer *buffers, size_t count) | ||
| 161 | { | ||
| 162 | return 0; | ||
| 163 | } | ||
| 164 | |||
| 165 | extern inline size_t rar_handle_to_bus(struct RAR_buffer *buffers, | ||
| 166 | size_t count) | ||
| 167 | { | ||
| 168 | return 0; | ||
| 169 | } | ||
| 170 | |||
| 171 | #endif /* MRST_RAR_HANDLER */ | ||
| 172 | #endif /* __KERNEL__ */ | ||
| 173 | |||
| 174 | #endif /* _MEMRAR_H */ | ||
diff --git a/drivers/staging/memrar/memrar_allocator.c b/drivers/staging/memrar/memrar_allocator.c deleted file mode 100644 index a4f8c5846a00..000000000000 --- a/drivers/staging/memrar/memrar_allocator.c +++ /dev/null | |||
| @@ -1,432 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * memrar_allocator 1.0: An allocator for Intel RAR. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Intel Corporation. All rights reserved. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of version 2 of the GNU General | ||
| 8 | * Public License as published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be | ||
| 11 | * useful, but WITHOUT ANY WARRANTY; without even the implied | ||
| 12 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | ||
| 13 | * PURPOSE. See the GNU General Public License for more details. | ||
| 14 | * You should have received a copy of the GNU General Public | ||
| 15 | * License along with this program; if not, write to the Free | ||
| 16 | * Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 17 | * Boston, MA 02111-1307, USA. | ||
| 18 | * The full GNU General Public License is included in this | ||
| 19 | * distribution in the file called COPYING. | ||
| 20 | * | ||
| 21 | * | ||
| 22 | * ------------------------------------------------------------------ | ||
| 23 | * | ||
| 24 | * This simple allocator implementation provides a | ||
| 25 | * malloc()/free()-like interface for reserving space within a | ||
| 26 | * previously reserved block of memory. It is not specific to | ||
| 27 | * any hardware, nor is it coupled with the lower level paging | ||
| 28 | * mechanism. | ||
| 29 | * | ||
| 30 | * The primary goal of this implementation is to provide a means | ||
| 31 | * to partition an arbitrary block of memory without actually | ||
| 32 | * accessing the memory or incurring any hardware side-effects | ||
| 33 | * (e.g. paging). It is, in effect, a bookkeeping mechanism for | ||
| 34 | * buffers. | ||
| 35 | */ | ||
| 36 | |||
| 37 | |||
| 38 | #include "memrar_allocator.h" | ||
| 39 | #include <linux/slab.h> | ||
| 40 | #include <linux/bug.h> | ||
| 41 | #include <linux/kernel.h> | ||
| 42 | |||
| 43 | |||
| 44 | struct memrar_allocator *memrar_create_allocator(unsigned long base, | ||
| 45 | size_t capacity, | ||
| 46 | size_t block_size) | ||
| 47 | { | ||
| 48 | struct memrar_allocator *allocator = NULL; | ||
| 49 | struct memrar_address_ranges *first_node = NULL; | ||
| 50 | |||
| 51 | /* | ||
| 52 | * Make sure the base address is aligned on a block_size | ||
| 53 | * boundary. | ||
| 54 | * | ||
| 55 | * @todo Is this necessary? | ||
| 56 | */ | ||
| 57 | /* base = ALIGN(base, block_size); */ | ||
| 58 | |||
| 59 | /* Validate parameters. | ||
| 60 | * | ||
| 61 | * Make sure we can allocate the entire memory space. Zero | ||
| 62 | * capacity or block size are obviously invalid. | ||
| 63 | */ | ||
| 64 | if (base == 0 | ||
| 65 | || capacity == 0 | ||
| 66 | || block_size == 0 | ||
| 67 | || ULONG_MAX - capacity < base | ||
| 68 | || capacity < block_size) | ||
| 69 | return allocator; | ||
| 70 | |||
| 71 | /* | ||
| 72 | * There isn't much point in creating a memory allocator that | ||
| 73 | * is only capable of holding one block but we'll allow it, | ||
| 74 | * and issue a diagnostic. | ||
| 75 | */ | ||
| 76 | WARN(capacity < block_size * 2, | ||
| 77 | "memrar: Only one block available to allocator.\n"); | ||
| 78 | |||
| 79 | allocator = kmalloc(sizeof(*allocator), GFP_KERNEL); | ||
| 80 | |||
| 81 | if (allocator == NULL) | ||
| 82 | return allocator; | ||
| 83 | |||
| 84 | mutex_init(&allocator->lock); | ||
| 85 | allocator->base = base; | ||
| 86 | |||
| 87 | /* Round the capacity down to a multiple of block_size. */ | ||
| 88 | allocator->capacity = (capacity / block_size) * block_size; | ||
| 89 | |||
| 90 | allocator->block_size = block_size; | ||
| 91 | |||
| 92 | allocator->largest_free_area = allocator->capacity; | ||
| 93 | |||
| 94 | /* Initialize the handle and free lists. */ | ||
| 95 | INIT_LIST_HEAD(&allocator->allocated_list.list); | ||
| 96 | INIT_LIST_HEAD(&allocator->free_list.list); | ||
| 97 | |||
| 98 | first_node = kmalloc(sizeof(*first_node), GFP_KERNEL); | ||
| 99 | if (first_node == NULL) { | ||
| 100 | kfree(allocator); | ||
| 101 | allocator = NULL; | ||
| 102 | } else { | ||
| 103 | /* Full range of blocks is available. */ | ||
| 104 | first_node->range.begin = base; | ||
| 105 | first_node->range.end = base + allocator->capacity; | ||
| 106 | list_add(&first_node->list, | ||
| 107 | &allocator->free_list.list); | ||
| 108 | } | ||
| 109 | |||
| 110 | return allocator; | ||
| 111 | } | ||
| 112 | |||
| 113 | void memrar_destroy_allocator(struct memrar_allocator *allocator) | ||
| 114 | { | ||
| 115 | /* | ||
| 116 | * Assume that the memory allocator lock isn't held at this | ||
| 117 | * point in time. Caller must ensure that. | ||
| 118 | */ | ||
| 119 | |||
| 120 | struct memrar_address_ranges *pos = NULL; | ||
| 121 | struct memrar_address_ranges *n = NULL; | ||
| 122 | |||
| 123 | if (allocator == NULL) | ||
| 124 | return; | ||
| 125 | |||
| 126 | mutex_lock(&allocator->lock); | ||
| 127 | |||
| 128 | /* Reclaim free list resources. */ | ||
| 129 | list_for_each_entry_safe(pos, | ||
| 130 | n, | ||
| 131 | &allocator->free_list.list, | ||
| 132 | list) { | ||
| 133 | list_del(&pos->list); | ||
| 134 | kfree(pos); | ||
| 135 | } | ||
| 136 | |||
| 137 | mutex_unlock(&allocator->lock); | ||
| 138 | |||
| 139 | kfree(allocator); | ||
| 140 | } | ||
| 141 | |||
| 142 | unsigned long memrar_allocator_alloc(struct memrar_allocator *allocator, | ||
| 143 | size_t size) | ||
| 144 | { | ||
| 145 | struct memrar_address_ranges *pos = NULL; | ||
| 146 | |||
| 147 | size_t num_blocks; | ||
| 148 | unsigned long reserved_bytes; | ||
| 149 | |||
| 150 | /* | ||
| 151 | * Address of allocated buffer. We assume that zero is not a | ||
| 152 | * valid address. | ||
| 153 | */ | ||
| 154 | unsigned long addr = 0; | ||
| 155 | |||
| 156 | if (allocator == NULL || size == 0) | ||
| 157 | return addr; | ||
| 158 | |||
| 159 | /* Reserve enough blocks to hold the amount of bytes requested. */ | ||
| 160 | num_blocks = DIV_ROUND_UP(size, allocator->block_size); | ||
| 161 | |||
| 162 | reserved_bytes = num_blocks * allocator->block_size; | ||
| 163 | |||
| 164 | mutex_lock(&allocator->lock); | ||
| 165 | |||
| 166 | if (reserved_bytes > allocator->largest_free_area) { | ||
| 167 | mutex_unlock(&allocator->lock); | ||
| 168 | return addr; | ||
| 169 | } | ||
| 170 | |||
| 171 | /* | ||
| 172 | * Iterate through the free list to find a suitably sized | ||
| 173 | * range of free contiguous memory blocks. | ||
| 174 | * | ||
| 175 | * We also take the opportunity to reset the size of the | ||
| 176 | * largest free area size statistic. | ||
| 177 | */ | ||
| 178 | list_for_each_entry(pos, &allocator->free_list.list, list) { | ||
| 179 | struct memrar_address_range * const fr = &pos->range; | ||
| 180 | size_t const curr_size = fr->end - fr->begin; | ||
| 181 | |||
| 182 | if (curr_size >= reserved_bytes && addr == 0) { | ||
| 183 | struct memrar_address_range *range = NULL; | ||
| 184 | struct memrar_address_ranges * const new_node = | ||
| 185 | kmalloc(sizeof(*new_node), GFP_KERNEL); | ||
| 186 | |||
| 187 | if (new_node == NULL) | ||
| 188 | break; | ||
| 189 | |||
| 190 | list_add(&new_node->list, | ||
| 191 | &allocator->allocated_list.list); | ||
| 192 | |||
| 193 | /* | ||
| 194 | * Carve out area of memory from end of free | ||
| 195 | * range. | ||
| 196 | */ | ||
| 197 | range = &new_node->range; | ||
| 198 | range->end = fr->end; | ||
| 199 | fr->end -= reserved_bytes; | ||
| 200 | range->begin = fr->end; | ||
| 201 | addr = range->begin; | ||
| 202 | |||
| 203 | /* | ||
| 204 | * Check if largest area has decreased in | ||
| 205 | * size. We'll need to continue scanning for | ||
| 206 | * the next largest area if it has. | ||
| 207 | */ | ||
| 208 | if (curr_size == allocator->largest_free_area) | ||
| 209 | allocator->largest_free_area -= | ||
| 210 | reserved_bytes; | ||
| 211 | else | ||
| 212 | break; | ||
| 213 | } | ||
| 214 | |||
| 215 | /* | ||
| 216 | * Reset largest free area size statistic as needed, | ||
| 217 | * but only if we've actually allocated memory. | ||
| 218 | */ | ||
| 219 | if (addr != 0 | ||
| 220 | && curr_size > allocator->largest_free_area) { | ||
| 221 | allocator->largest_free_area = curr_size; | ||
| 222 | break; | ||
| 223 | } | ||
| 224 | } | ||
| 225 | |||
| 226 | mutex_unlock(&allocator->lock); | ||
| 227 | |||
| 228 | return addr; | ||
| 229 | } | ||
| 230 | |||
| 231 | long memrar_allocator_free(struct memrar_allocator *allocator, | ||
| 232 | unsigned long addr) | ||
| 233 | { | ||
| 234 | struct list_head *pos = NULL; | ||
| 235 | struct list_head *tmp = NULL; | ||
| 236 | struct list_head *dst = NULL; | ||
| 237 | |||
| 238 | struct memrar_address_ranges *allocated = NULL; | ||
| 239 | struct memrar_address_range const *handle = NULL; | ||
| 240 | |||
| 241 | unsigned long old_end = 0; | ||
| 242 | unsigned long new_chunk_size = 0; | ||
| 243 | |||
| 244 | if (allocator == NULL) | ||
| 245 | return -EINVAL; | ||
| 246 | |||
| 247 | if (addr == 0) | ||
| 248 | return 0; /* Ignore "free(0)". */ | ||
| 249 | |||
| 250 | mutex_lock(&allocator->lock); | ||
| 251 | |||
| 252 | /* Find the corresponding handle. */ | ||
| 253 | list_for_each_entry(allocated, | ||
| 254 | &allocator->allocated_list.list, | ||
| 255 | list) { | ||
| 256 | if (allocated->range.begin == addr) { | ||
| 257 | handle = &allocated->range; | ||
| 258 | break; | ||
| 259 | } | ||
| 260 | } | ||
| 261 | |||
| 262 | /* No such buffer created by this allocator. */ | ||
| 263 | if (handle == NULL) { | ||
| 264 | mutex_unlock(&allocator->lock); | ||
| 265 | return -EFAULT; | ||
| 266 | } | ||
| 267 | |||
| 268 | /* | ||
| 269 | * Coalesce adjacent chunks of memory if possible. | ||
| 270 | * | ||
| 271 | * @note This isn't full blown coalescing since we're only | ||
| 272 | * coalescing at most three chunks of memory. | ||
| 273 | */ | ||
| 274 | list_for_each_safe(pos, tmp, &allocator->free_list.list) { | ||
| 275 | /* @todo O(n) performance. Optimize. */ | ||
| 276 | |||
| 277 | struct memrar_address_range * const chunk = | ||
| 278 | &list_entry(pos, | ||
| 279 | struct memrar_address_ranges, | ||
| 280 | list)->range; | ||
| 281 | |||
| 282 | /* Extend size of existing free adjacent chunk. */ | ||
| 283 | if (chunk->end == handle->begin) { | ||
| 284 | /* | ||
| 285 | * Chunk "less than" than the one we're | ||
| 286 | * freeing is adjacent. | ||
| 287 | * | ||
| 288 | * Before: | ||
| 289 | * | ||
| 290 | * +-----+------+ | ||
| 291 | * |chunk|handle| | ||
| 292 | * +-----+------+ | ||
| 293 | * | ||
| 294 | * After: | ||
| 295 | * | ||
| 296 | * +------------+ | ||
| 297 | * | chunk | | ||
| 298 | * +------------+ | ||
| 299 | */ | ||
| 300 | |||
| 301 | struct memrar_address_ranges const * const next = | ||
| 302 | list_entry(pos->next, | ||
| 303 | struct memrar_address_ranges, | ||
| 304 | list); | ||
| 305 | |||
| 306 | chunk->end = handle->end; | ||
| 307 | |||
| 308 | /* | ||
| 309 | * Now check if next free chunk is adjacent to | ||
| 310 | * the current extended free chunk. | ||
| 311 | * | ||
| 312 | * Before: | ||
| 313 | * | ||
| 314 | * +------------+----+ | ||
| 315 | * | chunk |next| | ||
| 316 | * +------------+----+ | ||
| 317 | * | ||
| 318 | * After: | ||
| 319 | * | ||
| 320 | * +-----------------+ | ||
| 321 | * | chunk | | ||
| 322 | * +-----------------+ | ||
| 323 | */ | ||
| 324 | if (!list_is_singular(pos) | ||
| 325 | && chunk->end == next->range.begin) { | ||
| 326 | chunk->end = next->range.end; | ||
| 327 | list_del(pos->next); | ||
| 328 | kfree(next); | ||
| 329 | } | ||
| 330 | |||
| 331 | list_del(&allocated->list); | ||
| 332 | |||
| 333 | new_chunk_size = chunk->end - chunk->begin; | ||
| 334 | |||
| 335 | goto exit_memrar_free; | ||
| 336 | |||
| 337 | } else if (handle->end == chunk->begin) { | ||
| 338 | /* | ||
| 339 | * Chunk "greater than" than the one we're | ||
| 340 | * freeing is adjacent. | ||
| 341 | * | ||
| 342 | * +------+-----+ | ||
| 343 | * |handle|chunk| | ||
| 344 | * +------+-----+ | ||
| 345 | * | ||
| 346 | * After: | ||
| 347 | * | ||
| 348 | * +------------+ | ||
| 349 | * | chunk | | ||
| 350 | * +------------+ | ||
| 351 | */ | ||
| 352 | |||
| 353 | struct memrar_address_ranges const * const prev = | ||
| 354 | list_entry(pos->prev, | ||
| 355 | struct memrar_address_ranges, | ||
| 356 | list); | ||
| 357 | |||
| 358 | chunk->begin = handle->begin; | ||
| 359 | |||
| 360 | /* | ||
| 361 | * Now check if previous free chunk is | ||
| 362 | * adjacent to the current extended free | ||
| 363 | * chunk. | ||
| 364 | * | ||
| 365 | * | ||
| 366 | * Before: | ||
| 367 | * | ||
| 368 | * +----+------------+ | ||
| 369 | * |prev| chunk | | ||
| 370 | * +----+------------+ | ||
| 371 | * | ||
| 372 | * After: | ||
| 373 | * | ||
| 374 | * +-----------------+ | ||
| 375 | * | chunk | | ||
| 376 | * +-----------------+ | ||
| 377 | */ | ||
| 378 | if (!list_is_singular(pos) | ||
| 379 | && prev->range.end == chunk->begin) { | ||
| 380 | chunk->begin = prev->range.begin; | ||
| 381 | list_del(pos->prev); | ||
| 382 | kfree(prev); | ||
| 383 | } | ||
| 384 | |||
| 385 | list_del(&allocated->list); | ||
| 386 | |||
| 387 | new_chunk_size = chunk->end - chunk->begin; | ||
| 388 | |||
| 389 | goto exit_memrar_free; | ||
| 390 | |||
| 391 | } else if (chunk->end < handle->begin | ||
| 392 | && chunk->end > old_end) { | ||
| 393 | /* Keep track of where the entry could be | ||
| 394 | * potentially moved from the "allocated" list | ||
| 395 | * to the "free" list if coalescing doesn't | ||
| 396 | * occur, making sure the "free" list remains | ||
| 397 | * sorted. | ||
| 398 | */ | ||
| 399 | old_end = chunk->end; | ||
| 400 | dst = pos; | ||
| 401 | } | ||
| 402 | } | ||
| 403 | |||
| 404 | /* | ||
| 405 | * Nothing to coalesce. | ||
| 406 | * | ||
| 407 | * Move the entry from the "allocated" list to the "free" | ||
| 408 | * list. | ||
| 409 | */ | ||
| 410 | list_move(&allocated->list, dst); | ||
| 411 | new_chunk_size = handle->end - handle->begin; | ||
| 412 | allocated = NULL; | ||
| 413 | |||
| 414 | exit_memrar_free: | ||
| 415 | |||
| 416 | if (new_chunk_size > allocator->largest_free_area) | ||
| 417 | allocator->largest_free_area = new_chunk_size; | ||
| 418 | |||
| 419 | mutex_unlock(&allocator->lock); | ||
| 420 | |||
| 421 | kfree(allocated); | ||
| 422 | |||
| 423 | return 0; | ||
| 424 | } | ||
| 425 | |||
| 426 | |||
| 427 | |||
| 428 | /* | ||
| 429 | Local Variables: | ||
| 430 | c-file-style: "linux" | ||
| 431 | End: | ||
| 432 | */ | ||
diff --git a/drivers/staging/memrar/memrar_allocator.h b/drivers/staging/memrar/memrar_allocator.h deleted file mode 100644 index 0b80dead710f..000000000000 --- a/drivers/staging/memrar/memrar_allocator.h +++ /dev/null | |||
| @@ -1,149 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 Intel Corporation. All rights reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or | ||
| 5 | * modify it under the terms of version 2 of the GNU General | ||
| 6 | * Public License as published by the Free Software Foundation. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be | ||
| 9 | * useful, but WITHOUT ANY WARRANTY; without even the implied | ||
| 10 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | ||
| 11 | * PURPOSE. See the GNU General Public License for more details. | ||
| 12 | * You should have received a copy of the GNU General Public | ||
| 13 | * License along with this program; if not, write to the Free | ||
| 14 | * Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 15 | * Boston, MA 02111-1307, USA. | ||
| 16 | * The full GNU General Public License is included in this | ||
| 17 | * distribution in the file called COPYING. | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef MEMRAR_ALLOCATOR_H | ||
| 21 | #define MEMRAR_ALLOCATOR_H | ||
| 22 | |||
| 23 | |||
| 24 | #include <linux/mutex.h> | ||
| 25 | #include <linux/list.h> | ||
| 26 | #include <linux/types.h> | ||
| 27 | #include <linux/kernel.h> | ||
| 28 | |||
| 29 | |||
| 30 | /** | ||
| 31 | * struct memrar_address_range - struct that describes a memory range | ||
| 32 | * @begin: Beginning of available address range. | ||
| 33 | * @end: End of available address range, one past the end, | ||
| 34 | * i.e. [begin, end). | ||
| 35 | */ | ||
| 36 | struct memrar_address_range { | ||
| 37 | /* private: internal use only */ | ||
| 38 | unsigned long begin; | ||
| 39 | unsigned long end; | ||
| 40 | }; | ||
| 41 | |||
| 42 | /** | ||
| 43 | * struct memrar_address_ranges - list of areas of memory. | ||
| 44 | * @list: Linked list of address ranges. | ||
| 45 | * @range: Memory address range corresponding to given list node. | ||
| 46 | */ | ||
| 47 | struct memrar_address_ranges { | ||
| 48 | /* private: internal use only */ | ||
| 49 | struct list_head list; | ||
| 50 | struct memrar_address_range range; | ||
| 51 | }; | ||
| 52 | |||
| 53 | /** | ||
| 54 | * struct memrar_allocator - encapsulation of the memory allocator state | ||
| 55 | * @lock: Lock used to synchronize access to the memory | ||
| 56 | * allocator state. | ||
| 57 | * @base: Base (start) address of the allocator memory | ||
| 58 | * space. | ||
| 59 | * @capacity: Size of the allocator memory space in bytes. | ||
| 60 | * @block_size: The size in bytes of individual blocks within | ||
| 61 | * the allocator memory space. | ||
| 62 | * @largest_free_area: Largest free area of memory in the allocator | ||
| 63 | * in bytes. | ||
| 64 | * @allocated_list: List of allocated memory block address | ||
| 65 | * ranges. | ||
| 66 | * @free_list: List of free address ranges. | ||
| 67 | * | ||
| 68 | * This structure contains all memory allocator state, including the | ||
| 69 | * base address, capacity, free list, lock, etc. | ||
| 70 | */ | ||
| 71 | struct memrar_allocator { | ||
| 72 | /* private: internal use only */ | ||
| 73 | struct mutex lock; | ||
| 74 | unsigned long base; | ||
| 75 | size_t capacity; | ||
| 76 | size_t block_size; | ||
| 77 | size_t largest_free_area; | ||
| 78 | struct memrar_address_ranges allocated_list; | ||
| 79 | struct memrar_address_ranges free_list; | ||
| 80 | }; | ||
| 81 | |||
| 82 | /** | ||
| 83 | * memrar_create_allocator() - create a memory allocator | ||
| 84 | * @base: Address at which the memory allocator begins. | ||
| 85 | * @capacity: Desired size of the memory allocator. This value must | ||
| 86 | * be larger than the block_size, ideally more than twice | ||
| 87 | * as large since there wouldn't be much point in using a | ||
| 88 | * memory allocator otherwise. | ||
| 89 | * @block_size: The size of individual blocks within the memory | ||
| 90 | * allocator. This value must smaller than the | ||
| 91 | * capacity. | ||
| 92 | * | ||
| 93 | * Create a memory allocator with the given capacity and block size. | ||
| 94 | * The capacity will be reduced to be a multiple of the block size, if | ||
| 95 | * necessary. | ||
| 96 | * | ||
| 97 | * Returns an instance of the memory allocator, if creation succeeds, | ||
| 98 | * otherwise zero if creation fails. Failure may occur if not enough | ||
| 99 | * kernel memory exists to create the memrar_allocator instance | ||
| 100 | * itself, or if the capacity and block_size arguments are not | ||
| 101 | * compatible or make sense. | ||
| 102 | */ | ||
| 103 | struct memrar_allocator *memrar_create_allocator(unsigned long base, | ||
| 104 | size_t capacity, | ||
| 105 | size_t block_size); | ||
| 106 | |||
| 107 | /** | ||
| 108 | * memrar_destroy_allocator() - destroy allocator | ||
| 109 | * @allocator: The allocator being destroyed. | ||
| 110 | * | ||
| 111 | * Reclaim resources held by the memory allocator. The caller must | ||
| 112 | * explicitly free all memory reserved by memrar_allocator_alloc() | ||
| 113 | * prior to calling this function. Otherwise leaks will occur. | ||
| 114 | */ | ||
| 115 | void memrar_destroy_allocator(struct memrar_allocator *allocator); | ||
| 116 | |||
| 117 | /** | ||
| 118 | * memrar_allocator_alloc() - reserve an area of memory of given size | ||
| 119 | * @allocator: The allocator instance being used to reserve buffer. | ||
| 120 | * @size: The size in bytes of the buffer to allocate. | ||
| 121 | * | ||
| 122 | * This functions reserves an area of memory managed by the given | ||
| 123 | * allocator. It returns zero if allocation was not possible. | ||
| 124 | * Failure may occur if the allocator no longer has space available. | ||
| 125 | */ | ||
| 126 | unsigned long memrar_allocator_alloc(struct memrar_allocator *allocator, | ||
| 127 | size_t size); | ||
| 128 | |||
| 129 | /** | ||
| 130 | * memrar_allocator_free() - release buffer starting at given address | ||
| 131 | * @allocator: The allocator instance being used to release the buffer. | ||
| 132 | * @address: The address of the buffer being released. | ||
| 133 | * | ||
| 134 | * Release an area of memory starting at the given address. Failure | ||
| 135 | * could occur if the given address is not in the address space | ||
| 136 | * managed by the allocator. Returns zero on success or an errno | ||
| 137 | * (negative value) on failure. | ||
| 138 | */ | ||
| 139 | long memrar_allocator_free(struct memrar_allocator *allocator, | ||
| 140 | unsigned long address); | ||
| 141 | |||
| 142 | #endif /* MEMRAR_ALLOCATOR_H */ | ||
| 143 | |||
| 144 | |||
| 145 | /* | ||
| 146 | Local Variables: | ||
| 147 | c-file-style: "linux" | ||
| 148 | End: | ||
| 149 | */ | ||
diff --git a/drivers/staging/memrar/memrar_handler.c b/drivers/staging/memrar/memrar_handler.c deleted file mode 100644 index cfcaa8e5b8e6..000000000000 --- a/drivers/staging/memrar/memrar_handler.c +++ /dev/null | |||
| @@ -1,1007 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * memrar_handler 1.0: An Intel restricted access region handler device | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Intel Corporation. All rights reserved. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of version 2 of the GNU General | ||
| 8 | * Public License as published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be | ||
| 11 | * useful, but WITHOUT ANY WARRANTY; without even the implied | ||
| 12 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | ||
| 13 | * PURPOSE. See the GNU General Public License for more details. | ||
| 14 | * You should have received a copy of the GNU General Public | ||
| 15 | * License along with this program; if not, write to the Free | ||
| 16 | * Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 17 | * Boston, MA 02111-1307, USA. | ||
| 18 | * The full GNU General Public License is included in this | ||
| 19 | * distribution in the file called COPYING. | ||
| 20 | * | ||
| 21 | * ------------------------------------------------------------------- | ||
| 22 | * | ||
| 23 | * Moorestown restricted access regions (RAR) provide isolated | ||
| 24 | * areas of main memory that are only acceessible by authorized | ||
| 25 | * devices. | ||
| 26 | * | ||
| 27 | * The Intel Moorestown RAR handler module exposes a kernel space | ||
| 28 | * RAR memory management mechanism. It is essentially a | ||
| 29 | * RAR-specific allocator. | ||
| 30 | * | ||
| 31 | * Besides providing RAR buffer management, the RAR handler also | ||
| 32 | * behaves in many ways like an OS virtual memory manager. For | ||
| 33 | * example, the RAR "handles" created by the RAR handler are | ||
| 34 | * analogous to user space virtual addresses. | ||
| 35 | * | ||
| 36 | * RAR memory itself is never accessed directly by the RAR | ||
| 37 | * handler. | ||
| 38 | */ | ||
| 39 | |||
| 40 | #include <linux/miscdevice.h> | ||
| 41 | #include <linux/fs.h> | ||
| 42 | #include <linux/slab.h> | ||
| 43 | #include <linux/kref.h> | ||
| 44 | #include <linux/mutex.h> | ||
| 45 | #include <linux/kernel.h> | ||
| 46 | #include <linux/uaccess.h> | ||
| 47 | #include <linux/mm.h> | ||
| 48 | #include <linux/ioport.h> | ||
| 49 | #include <linux/io.h> | ||
| 50 | #include <linux/rar_register.h> | ||
| 51 | |||
| 52 | #include "memrar.h" | ||
| 53 | #include "memrar_allocator.h" | ||
| 54 | |||
| 55 | |||
| 56 | #define MEMRAR_VER "1.0" | ||
| 57 | |||
| 58 | /* | ||
| 59 | * Moorestown supports three restricted access regions. | ||
| 60 | * | ||
| 61 | * We only care about the first two, video and audio. The third, | ||
| 62 | * reserved for Chaabi and the P-unit, will be handled by their | ||
| 63 | * respective drivers. | ||
| 64 | */ | ||
| 65 | #define MRST_NUM_RAR 2 | ||
| 66 | |||
| 67 | /* ---------------- -------------------- ------------------- */ | ||
| 68 | |||
| 69 | /** | ||
| 70 | * struct memrar_buffer_info - struct that keeps track of all RAR buffers | ||
| 71 | * @list: Linked list of memrar_buffer_info objects. | ||
| 72 | * @buffer: Core RAR buffer information. | ||
| 73 | * @refcount: Reference count. | ||
| 74 | * @owner: File handle corresponding to process that reserved the | ||
| 75 | * block of memory in RAR. This will be zero for buffers | ||
| 76 | * allocated by other drivers instead of by a user space | ||
| 77 | * process. | ||
| 78 | * | ||
| 79 | * This structure encapsulates a link list of RAR buffers, as well as | ||
| 80 | * other characteristics specific to a given list node, such as the | ||
| 81 | * reference count on the corresponding RAR buffer. | ||
| 82 | */ | ||
| 83 | struct memrar_buffer_info { | ||
| 84 | struct list_head list; | ||
| 85 | struct RAR_buffer buffer; | ||
| 86 | struct kref refcount; | ||
| 87 | struct file *owner; | ||
| 88 | }; | ||
| 89 | |||
| 90 | /** | ||
| 91 | * struct memrar_rar_info - characteristics of a given RAR | ||
| 92 | * @base: Base bus address of the RAR. | ||
| 93 | * @length: Length of the RAR. | ||
| 94 | * @iobase: Virtual address of RAR mapped into kernel. | ||
| 95 | * @allocator: Allocator associated with the RAR. Note the allocator | ||
| 96 | * "capacity" may be smaller than the RAR length if the | ||
| 97 | * length is not a multiple of the configured allocator | ||
| 98 | * block size. | ||
| 99 | * @buffers: Table that keeps track of all reserved RAR buffers. | ||
| 100 | * @lock: Lock used to synchronize access to RAR-specific data | ||
| 101 | * structures. | ||
| 102 | * | ||
| 103 | * Each RAR has an associated memrar_rar_info structure that describes | ||
| 104 | * where in memory the RAR is located, how large it is, and a list of | ||
| 105 | * reserved RAR buffers inside that RAR. Each RAR also has a mutex | ||
| 106 | * associated with it to reduce lock contention when operations on | ||
| 107 | * multiple RARs are performed in parallel. | ||
| 108 | */ | ||
| 109 | struct memrar_rar_info { | ||
| 110 | dma_addr_t base; | ||
| 111 | unsigned long length; | ||
| 112 | void __iomem *iobase; | ||
| 113 | struct memrar_allocator *allocator; | ||
| 114 | struct memrar_buffer_info buffers; | ||
| 115 | struct mutex lock; | ||
| 116 | int allocated; /* True if we own this RAR */ | ||
| 117 | }; | ||
| 118 | |||
| 119 | /* | ||
| 120 | * Array of RAR characteristics. | ||
| 121 | */ | ||
| 122 | static struct memrar_rar_info memrars[MRST_NUM_RAR]; | ||
| 123 | |||
| 124 | /* ---------------- -------------------- ------------------- */ | ||
| 125 | |||
| 126 | /* Validate RAR type. */ | ||
| 127 | static inline int memrar_is_valid_rar_type(u32 type) | ||
| 128 | { | ||
| 129 | return type == RAR_TYPE_VIDEO || type == RAR_TYPE_AUDIO; | ||
| 130 | } | ||
| 131 | |||
| 132 | /* Check if an address/handle falls with the given RAR memory range. */ | ||
| 133 | static inline int memrar_handle_in_range(struct memrar_rar_info *rar, | ||
| 134 | u32 vaddr) | ||
| 135 | { | ||
| 136 | unsigned long const iobase = (unsigned long) (rar->iobase); | ||
| 137 | return (vaddr >= iobase && vaddr < iobase + rar->length); | ||
| 138 | } | ||
| 139 | |||
| 140 | /* Retrieve RAR information associated with the given handle. */ | ||
| 141 | static struct memrar_rar_info *memrar_get_rar_info(u32 vaddr) | ||
| 142 | { | ||
| 143 | int i; | ||
| 144 | for (i = 0; i < MRST_NUM_RAR; ++i) { | ||
| 145 | struct memrar_rar_info * const rar = &memrars[i]; | ||
| 146 | if (memrar_handle_in_range(rar, vaddr)) | ||
| 147 | return rar; | ||
| 148 | } | ||
| 149 | |||
| 150 | return NULL; | ||
| 151 | } | ||
| 152 | |||
| 153 | /** | ||
| 154 | * memrar_get_bus address - handle to bus address | ||
| 155 | * | ||
| 156 | * Retrieve bus address from given handle. | ||
| 157 | * | ||
| 158 | * Returns address corresponding to given handle. Zero if handle is | ||
| 159 | * invalid. | ||
| 160 | */ | ||
| 161 | static dma_addr_t memrar_get_bus_address( | ||
| 162 | struct memrar_rar_info *rar, | ||
| 163 | u32 vaddr) | ||
| 164 | { | ||
| 165 | unsigned long const iobase = (unsigned long) (rar->iobase); | ||
| 166 | |||
| 167 | if (!memrar_handle_in_range(rar, vaddr)) | ||
| 168 | return 0; | ||
| 169 | |||
| 170 | /* | ||
| 171 | * An assumption is made that the virtual address offset is | ||
| 172 | * the same as the bus address offset, at least based on the | ||
| 173 | * way this driver is implemented. For example, vaddr + 2 == | ||
| 174 | * baddr + 2. | ||
| 175 | * | ||
| 176 | * @todo Is that a valid assumption? | ||
| 177 | */ | ||
| 178 | return rar->base + (vaddr - iobase); | ||
| 179 | } | ||
| 180 | |||
| 181 | /** | ||
| 182 | * memrar_get_physical_address - handle to physical address | ||
| 183 | * | ||
| 184 | * Retrieve physical address from given handle. | ||
| 185 | * | ||
| 186 | * Returns address corresponding to given handle. Zero if handle is | ||
| 187 | * invalid. | ||
| 188 | */ | ||
| 189 | static dma_addr_t memrar_get_physical_address( | ||
| 190 | struct memrar_rar_info *rar, | ||
| 191 | u32 vaddr) | ||
| 192 | { | ||
| 193 | /* | ||
| 194 | * @todo This assumes that the bus address and physical | ||
| 195 | * address are the same. That is true for Moorestown | ||
| 196 | * but not necessarily on other platforms. This | ||
| 197 | * deficiency should be addressed at some point. | ||
| 198 | */ | ||
| 199 | return memrar_get_bus_address(rar, vaddr); | ||
| 200 | } | ||
| 201 | |||
| 202 | /** | ||
| 203 | * memrar_release_block - release a block to the pool | ||
| 204 | * @kref: kref of block | ||
| 205 | * | ||
| 206 | * Core block release code. A node has hit zero references so can | ||
| 207 | * be released and the lists must be updated. | ||
| 208 | * | ||
| 209 | * Note: This code removes the node from a list. Make sure any list | ||
| 210 | * iteration is performed using list_for_each_safe(). | ||
| 211 | */ | ||
| 212 | static void memrar_release_block_i(struct kref *ref) | ||
| 213 | { | ||
| 214 | /* | ||
| 215 | * Last reference is being released. Remove from the table, | ||
| 216 | * and reclaim resources. | ||
| 217 | */ | ||
| 218 | |||
| 219 | struct memrar_buffer_info * const node = | ||
| 220 | container_of(ref, struct memrar_buffer_info, refcount); | ||
| 221 | |||
| 222 | struct RAR_block_info * const user_info = | ||
| 223 | &node->buffer.info; | ||
| 224 | |||
| 225 | struct memrar_allocator * const allocator = | ||
| 226 | memrars[user_info->type].allocator; | ||
| 227 | |||
| 228 | list_del(&node->list); | ||
| 229 | |||
| 230 | memrar_allocator_free(allocator, user_info->handle); | ||
| 231 | |||
| 232 | kfree(node); | ||
| 233 | } | ||
| 234 | |||
| 235 | /** | ||
| 236 | * memrar_init_rar_resources - configure a RAR | ||
| 237 | * @rarnum: rar that has been allocated | ||
| 238 | * @devname: name of our device | ||
| 239 | * | ||
| 240 | * Initialize RAR parameters, such as bus addresses, etc and make | ||
| 241 | * the resource accessible. | ||
| 242 | */ | ||
| 243 | static int memrar_init_rar_resources(int rarnum, char const *devname) | ||
| 244 | { | ||
| 245 | /* ---- Sanity Checks ---- | ||
| 246 | * 1. RAR bus addresses in both Lincroft and Langwell RAR | ||
| 247 | * registers should be the same. | ||
| 248 | * a. There's no way we can do this through IA. | ||
| 249 | * | ||
| 250 | * 2. Secure device ID in Langwell RAR registers should be set | ||
| 251 | * appropriately, e.g. only LPE DMA for the audio RAR, and | ||
| 252 | * security for the other Langwell based RAR registers. | ||
| 253 | * a. There's no way we can do this through IA. | ||
| 254 | * | ||
| 255 | * 3. Audio and video RAR registers and RAR access should be | ||
| 256 | * locked down. If not, enable RAR access control. Except | ||
| 257 | * for debugging purposes, there is no reason for them to | ||
| 258 | * be unlocked. | ||
| 259 | * a. We can only do this for the Lincroft (IA) side. | ||
| 260 | * | ||
| 261 | * @todo Should the RAR handler driver even be aware of audio | ||
| 262 | * and video RAR settings? | ||
| 263 | */ | ||
| 264 | |||
| 265 | /* | ||
| 266 | * RAR buffer block size. | ||
| 267 | * | ||
| 268 | * We choose it to be the size of a page to simplify the | ||
| 269 | * /dev/memrar mmap() implementation and usage. Otherwise | ||
| 270 | * paging is not involved once an RAR is locked down. | ||
| 271 | */ | ||
| 272 | static size_t const RAR_BLOCK_SIZE = PAGE_SIZE; | ||
| 273 | |||
| 274 | dma_addr_t low, high; | ||
| 275 | struct memrar_rar_info * const rar = &memrars[rarnum]; | ||
| 276 | |||
| 277 | BUG_ON(MRST_NUM_RAR != ARRAY_SIZE(memrars)); | ||
| 278 | BUG_ON(!memrar_is_valid_rar_type(rarnum)); | ||
| 279 | BUG_ON(rar->allocated); | ||
| 280 | |||
| 281 | if (rar_get_address(rarnum, &low, &high) != 0) | ||
| 282 | /* No RAR is available. */ | ||
| 283 | return -ENODEV; | ||
| 284 | |||
| 285 | if (low == 0 || high == 0) { | ||
| 286 | rar->base = 0; | ||
| 287 | rar->length = 0; | ||
| 288 | rar->iobase = NULL; | ||
| 289 | rar->allocator = NULL; | ||
| 290 | return -ENOSPC; | ||
| 291 | } | ||
| 292 | |||
| 293 | /* | ||
| 294 | * @todo Verify that LNC and LNW RAR register contents | ||
| 295 | * addresses, security, etc are compatible and | ||
| 296 | * consistent). | ||
| 297 | */ | ||
| 298 | |||
| 299 | rar->length = high - low + 1; | ||
| 300 | |||
| 301 | /* Claim RAR memory as our own. */ | ||
| 302 | if (request_mem_region(low, rar->length, devname) == NULL) { | ||
| 303 | rar->length = 0; | ||
| 304 | pr_err("%s: Unable to claim RAR[%d] memory.\n", | ||
| 305 | devname, rarnum); | ||
| 306 | pr_err("%s: RAR[%d] disabled.\n", devname, rarnum); | ||
| 307 | return -EBUSY; | ||
| 308 | } | ||
| 309 | |||
| 310 | rar->base = low; | ||
| 311 | |||
| 312 | /* | ||
| 313 | * Now map it into the kernel address space. | ||
| 314 | * | ||
| 315 | * Note that the RAR memory may only be accessed by IA | ||
| 316 | * when debugging. Otherwise attempts to access the | ||
| 317 | * RAR memory when it is locked down will result in | ||
| 318 | * behavior similar to writing to /dev/null and | ||
| 319 | * reading from /dev/zero. This behavior is enforced | ||
| 320 | * by the hardware. Even if we don't access the | ||
| 321 | * memory, mapping it into the kernel provides us with | ||
| 322 | * a convenient RAR handle to bus address mapping. | ||
| 323 | */ | ||
| 324 | rar->iobase = ioremap_nocache(rar->base, rar->length); | ||
| 325 | if (rar->iobase == NULL) { | ||
| 326 | pr_err("%s: Unable to map RAR memory.\n", devname); | ||
| 327 | release_mem_region(low, rar->length); | ||
| 328 | return -ENOMEM; | ||
| 329 | } | ||
| 330 | |||
| 331 | /* Initialize corresponding memory allocator. */ | ||
| 332 | rar->allocator = memrar_create_allocator((unsigned long) rar->iobase, | ||
| 333 | rar->length, RAR_BLOCK_SIZE); | ||
| 334 | if (rar->allocator == NULL) { | ||
| 335 | iounmap(rar->iobase); | ||
| 336 | release_mem_region(low, rar->length); | ||
| 337 | return -ENOMEM; | ||
| 338 | } | ||
| 339 | |||
| 340 | pr_info("%s: BRAR[%d] bus address range = [0x%lx, 0x%lx]\n", | ||
| 341 | devname, rarnum, (unsigned long) low, (unsigned long) high); | ||
| 342 | |||
| 343 | pr_info("%s: BRAR[%d] size = %zu KiB\n", | ||
| 344 | devname, rarnum, rar->allocator->capacity / 1024); | ||
| 345 | |||
| 346 | rar->allocated = 1; | ||
| 347 | return 0; | ||
| 348 | } | ||
| 349 | |||
| 350 | /** | ||
| 351 | * memrar_fini_rar_resources - free up RAR resources | ||
| 352 | * | ||
| 353 | * Finalize RAR resources. Free up the resource tables, hand the memory | ||
| 354 | * back to the kernel, unmap the device and release the address space. | ||
| 355 | */ | ||
| 356 | static void memrar_fini_rar_resources(void) | ||
| 357 | { | ||
| 358 | int z; | ||
| 359 | struct memrar_buffer_info *pos; | ||
| 360 | struct memrar_buffer_info *tmp; | ||
| 361 | |||
| 362 | /* | ||
| 363 | * @todo Do we need to hold a lock at this point in time? | ||
| 364 | * (module initialization failure or exit?) | ||
| 365 | */ | ||
| 366 | |||
| 367 | for (z = MRST_NUM_RAR; z-- != 0; ) { | ||
| 368 | struct memrar_rar_info * const rar = &memrars[z]; | ||
| 369 | |||
| 370 | if (!rar->allocated) | ||
| 371 | continue; | ||
| 372 | |||
| 373 | /* Clean up remaining resources. */ | ||
| 374 | |||
| 375 | list_for_each_entry_safe(pos, | ||
| 376 | tmp, | ||
| 377 | &rar->buffers.list, | ||
| 378 | list) { | ||
| 379 | kref_put(&pos->refcount, memrar_release_block_i); | ||
| 380 | } | ||
| 381 | |||
| 382 | memrar_destroy_allocator(rar->allocator); | ||
| 383 | rar->allocator = NULL; | ||
| 384 | |||
| 385 | iounmap(rar->iobase); | ||
| 386 | release_mem_region(rar->base, rar->length); | ||
| 387 | |||
| 388 | rar->iobase = NULL; | ||
| 389 | rar->base = 0; | ||
| 390 | rar->length = 0; | ||
| 391 | |||
| 392 | unregister_rar(z); | ||
| 393 | } | ||
| 394 | } | ||
| 395 | |||
| 396 | /** | ||
| 397 | * memrar_reserve_block - handle an allocation request | ||
| 398 | * @request: block being requested | ||
| 399 | * @filp: owner it is tied to | ||
| 400 | * | ||
| 401 | * Allocate a block of the requested RAR. If successful return the | ||
| 402 | * request object filled in and zero, if not report an error code | ||
| 403 | */ | ||
| 404 | |||
| 405 | static long memrar_reserve_block(struct RAR_buffer *request, | ||
| 406 | struct file *filp) | ||
| 407 | { | ||
| 408 | struct RAR_block_info * const rinfo = &request->info; | ||
| 409 | struct RAR_buffer *buffer; | ||
| 410 | struct memrar_buffer_info *buffer_info; | ||
| 411 | u32 handle; | ||
| 412 | struct memrar_rar_info *rar = NULL; | ||
| 413 | |||
| 414 | /* Prevent array overflow. */ | ||
| 415 | if (!memrar_is_valid_rar_type(rinfo->type)) | ||
| 416 | return -EINVAL; | ||
| 417 | |||
| 418 | rar = &memrars[rinfo->type]; | ||
| 419 | if (!rar->allocated) | ||
| 420 | return -ENODEV; | ||
| 421 | |||
| 422 | /* Reserve memory in RAR. */ | ||
| 423 | handle = memrar_allocator_alloc(rar->allocator, rinfo->size); | ||
| 424 | if (handle == 0) | ||
| 425 | return -ENOMEM; | ||
| 426 | |||
| 427 | buffer_info = kmalloc(sizeof(*buffer_info), GFP_KERNEL); | ||
| 428 | |||
| 429 | if (buffer_info == NULL) { | ||
| 430 | memrar_allocator_free(rar->allocator, handle); | ||
| 431 | return -ENOMEM; | ||
| 432 | } | ||
| 433 | |||
| 434 | buffer = &buffer_info->buffer; | ||
| 435 | buffer->info.type = rinfo->type; | ||
| 436 | buffer->info.size = rinfo->size; | ||
| 437 | |||
| 438 | /* Memory handle corresponding to the bus address. */ | ||
| 439 | buffer->info.handle = handle; | ||
| 440 | buffer->bus_address = memrar_get_bus_address(rar, handle); | ||
| 441 | |||
| 442 | /* | ||
| 443 | * Keep track of owner so that we can later cleanup if | ||
| 444 | * necessary. | ||
| 445 | */ | ||
| 446 | buffer_info->owner = filp; | ||
| 447 | |||
| 448 | kref_init(&buffer_info->refcount); | ||
| 449 | |||
| 450 | mutex_lock(&rar->lock); | ||
| 451 | list_add(&buffer_info->list, &rar->buffers.list); | ||
| 452 | mutex_unlock(&rar->lock); | ||
| 453 | |||
| 454 | rinfo->handle = buffer->info.handle; | ||
| 455 | request->bus_address = buffer->bus_address; | ||
| 456 | |||
| 457 | return 0; | ||
| 458 | } | ||
| 459 | |||
| 460 | /** | ||
| 461 | * memrar_release_block - release a RAR block | ||
| 462 | * @addr: address in RAR space | ||
| 463 | * | ||
| 464 | * Release a previously allocated block. Releases act on complete | ||
| 465 | * blocks, partially freeing a block is not supported | ||
| 466 | */ | ||
| 467 | |||
| 468 | static long memrar_release_block(u32 addr) | ||
| 469 | { | ||
| 470 | struct memrar_buffer_info *pos; | ||
| 471 | struct memrar_buffer_info *tmp; | ||
| 472 | struct memrar_rar_info * const rar = memrar_get_rar_info(addr); | ||
| 473 | long result = -EINVAL; | ||
| 474 | |||
| 475 | if (rar == NULL) | ||
| 476 | return -ENOENT; | ||
| 477 | |||
| 478 | mutex_lock(&rar->lock); | ||
| 479 | |||
| 480 | /* | ||
| 481 | * Iterate through the buffer list to find the corresponding | ||
| 482 | * buffer to be released. | ||
| 483 | */ | ||
| 484 | list_for_each_entry_safe(pos, | ||
| 485 | tmp, | ||
| 486 | &rar->buffers.list, | ||
| 487 | list) { | ||
| 488 | struct RAR_block_info * const info = | ||
| 489 | &pos->buffer.info; | ||
| 490 | |||
| 491 | /* | ||
| 492 | * Take into account handle offsets that may have been | ||
| 493 | * added to the base handle, such as in the following | ||
| 494 | * scenario: | ||
| 495 | * | ||
| 496 | * u32 handle = base + offset; | ||
| 497 | * rar_handle_to_bus(handle); | ||
| 498 | * rar_release(handle); | ||
| 499 | */ | ||
| 500 | if (addr >= info->handle | ||
| 501 | && addr < (info->handle + info->size) | ||
| 502 | && memrar_is_valid_rar_type(info->type)) { | ||
| 503 | kref_put(&pos->refcount, memrar_release_block_i); | ||
| 504 | result = 0; | ||
| 505 | break; | ||
| 506 | } | ||
| 507 | } | ||
| 508 | |||
| 509 | mutex_unlock(&rar->lock); | ||
| 510 | |||
| 511 | return result; | ||
| 512 | } | ||
| 513 | |||
| 514 | /** | ||
| 515 | * memrar_get_stats - read statistics for a RAR | ||
| 516 | * @r: statistics to be filled in | ||
| 517 | * | ||
| 518 | * Returns the statistics data for the RAR, or an error code if | ||
| 519 | * the request cannot be completed | ||
| 520 | */ | ||
| 521 | static long memrar_get_stat(struct RAR_stat *r) | ||
| 522 | { | ||
| 523 | struct memrar_allocator *allocator; | ||
| 524 | |||
| 525 | if (!memrar_is_valid_rar_type(r->type)) | ||
| 526 | return -EINVAL; | ||
| 527 | |||
| 528 | if (!memrars[r->type].allocated) | ||
| 529 | return -ENODEV; | ||
| 530 | |||
| 531 | allocator = memrars[r->type].allocator; | ||
| 532 | |||
| 533 | BUG_ON(allocator == NULL); | ||
| 534 | |||
| 535 | /* | ||
| 536 | * Allocator capacity doesn't change over time. No | ||
| 537 | * need to synchronize. | ||
| 538 | */ | ||
| 539 | r->capacity = allocator->capacity; | ||
| 540 | |||
| 541 | mutex_lock(&allocator->lock); | ||
| 542 | r->largest_block_size = allocator->largest_free_area; | ||
| 543 | mutex_unlock(&allocator->lock); | ||
| 544 | return 0; | ||
| 545 | } | ||
| 546 | |||
| 547 | /** | ||
| 548 | * memrar_ioctl - ioctl callback | ||
| 549 | * @filp: file issuing the request | ||
| 550 | * @cmd: command | ||
| 551 | * @arg: pointer to control information | ||
| 552 | * | ||
| 553 | * Perform one of the ioctls supported by the memrar device | ||
| 554 | */ | ||
| 555 | |||
| 556 | static long memrar_ioctl(struct file *filp, | ||
| 557 | unsigned int cmd, | ||
| 558 | unsigned long arg) | ||
| 559 | { | ||
| 560 | void __user *argp = (void __user *)arg; | ||
| 561 | long result = 0; | ||
| 562 | |||
| 563 | struct RAR_buffer buffer; | ||
| 564 | struct RAR_block_info * const request = &buffer.info; | ||
| 565 | struct RAR_stat rar_info; | ||
| 566 | u32 rar_handle; | ||
| 567 | |||
| 568 | switch (cmd) { | ||
| 569 | case RAR_HANDLER_RESERVE: | ||
| 570 | if (copy_from_user(request, | ||
| 571 | argp, | ||
| 572 | sizeof(*request))) | ||
| 573 | return -EFAULT; | ||
| 574 | |||
| 575 | result = memrar_reserve_block(&buffer, filp); | ||
| 576 | if (result != 0) | ||
| 577 | return result; | ||
| 578 | |||
| 579 | return copy_to_user(argp, request, sizeof(*request)); | ||
| 580 | |||
| 581 | case RAR_HANDLER_RELEASE: | ||
| 582 | if (copy_from_user(&rar_handle, | ||
| 583 | argp, | ||
| 584 | sizeof(rar_handle))) | ||
| 585 | return -EFAULT; | ||
| 586 | |||
| 587 | return memrar_release_block(rar_handle); | ||
| 588 | |||
| 589 | case RAR_HANDLER_STAT: | ||
| 590 | if (copy_from_user(&rar_info, | ||
| 591 | argp, | ||
| 592 | sizeof(rar_info))) | ||
| 593 | return -EFAULT; | ||
| 594 | |||
| 595 | /* | ||
| 596 | * Populate the RAR_stat structure based on the RAR | ||
| 597 | * type given by the user | ||
| 598 | */ | ||
| 599 | if (memrar_get_stat(&rar_info) != 0) | ||
| 600 | return -EINVAL; | ||
| 601 | |||
| 602 | /* | ||
| 603 | * @todo Do we need to verify destination pointer | ||
| 604 | * "argp" is non-zero? Is that already done by | ||
| 605 | * copy_to_user()? | ||
| 606 | */ | ||
| 607 | return copy_to_user(argp, | ||
| 608 | &rar_info, | ||
| 609 | sizeof(rar_info)) ? -EFAULT : 0; | ||
| 610 | |||
| 611 | default: | ||
| 612 | return -ENOTTY; | ||
| 613 | } | ||
| 614 | |||
| 615 | return 0; | ||
| 616 | } | ||
| 617 | |||
| 618 | /** | ||
| 619 | * memrar_mmap - mmap helper for deubgging | ||
| 620 | * @filp: handle doing the mapping | ||
| 621 | * @vma: memory area | ||
| 622 | * | ||
| 623 | * Support the mmap operation on the RAR space for debugging systems | ||
| 624 | * when the memory is not locked down. | ||
| 625 | */ | ||
| 626 | |||
| 627 | static int memrar_mmap(struct file *filp, struct vm_area_struct *vma) | ||
| 628 | { | ||
| 629 | /* | ||
| 630 | * This mmap() implementation is predominantly useful for | ||
| 631 | * debugging since the CPU will be prevented from accessing | ||
| 632 | * RAR memory by the hardware when RAR is properly locked | ||
| 633 | * down. | ||
| 634 | * | ||
| 635 | * In order for this implementation to be useful RAR memory | ||
| 636 | * must be not be locked down. However, we only want to do | ||
| 637 | * that when debugging. DO NOT leave RAR memory unlocked in a | ||
| 638 | * deployed device that utilizes RAR. | ||
| 639 | */ | ||
| 640 | |||
| 641 | size_t const size = vma->vm_end - vma->vm_start; | ||
| 642 | |||
| 643 | /* Users pass the RAR handle as the mmap() offset parameter. */ | ||
| 644 | unsigned long const handle = vma->vm_pgoff << PAGE_SHIFT; | ||
| 645 | |||
| 646 | struct memrar_rar_info * const rar = memrar_get_rar_info(handle); | ||
| 647 | unsigned long pfn; | ||
| 648 | |||
| 649 | /* Only allow priviledged apps to go poking around this way */ | ||
| 650 | if (!capable(CAP_SYS_RAWIO)) | ||
| 651 | return -EPERM; | ||
| 652 | |||
| 653 | /* Invalid RAR handle or size passed to mmap(). */ | ||
| 654 | if (rar == NULL | ||
| 655 | || handle == 0 | ||
| 656 | || size > (handle - (unsigned long) rar->iobase)) | ||
| 657 | return -EINVAL; | ||
| 658 | |||
| 659 | /* | ||
| 660 | * Retrieve physical address corresponding to the RAR handle, | ||
| 661 | * and convert it to a page frame. | ||
| 662 | */ | ||
| 663 | pfn = memrar_get_physical_address(rar, handle) >> PAGE_SHIFT; | ||
| 664 | |||
| 665 | |||
| 666 | pr_debug("memrar: mapping RAR range [0x%lx, 0x%lx) into user space.\n", | ||
| 667 | handle, | ||
| 668 | handle + size); | ||
| 669 | |||
| 670 | /* | ||
| 671 | * Map RAR memory into user space. This is really only useful | ||
| 672 | * for debugging purposes since the memory won't be | ||
| 673 | * accessible, i.e. reads return zero and writes are ignored, | ||
| 674 | * when RAR access control is enabled. | ||
| 675 | */ | ||
| 676 | if (remap_pfn_range(vma, | ||
| 677 | vma->vm_start, | ||
| 678 | pfn, | ||
| 679 | size, | ||
| 680 | vma->vm_page_prot)) | ||
| 681 | return -EAGAIN; | ||
| 682 | |||
| 683 | /* vma->vm_ops = &memrar_mem_ops; */ | ||
| 684 | |||
| 685 | return 0; | ||
| 686 | } | ||
| 687 | |||
| 688 | /** | ||
| 689 | * memrar_open - device open method | ||
| 690 | * @inode: inode to open | ||
| 691 | * @filp: file handle | ||
| 692 | * | ||
| 693 | * As we support multiple arbitary opens there is no work to be done | ||
| 694 | * really. | ||
| 695 | */ | ||
| 696 | |||
| 697 | static int memrar_open(struct inode *inode, struct file *filp) | ||
| 698 | { | ||
| 699 | nonseekable_open(inode, filp); | ||
| 700 | return 0; | ||
| 701 | } | ||
| 702 | |||
| 703 | /** | ||
| 704 | * memrar_release - close method for miscev | ||
| 705 | * @inode: inode of device | ||
| 706 | * @filp: handle that is going away | ||
| 707 | * | ||
| 708 | * Free up all the regions that belong to this file handle. We use | ||
| 709 | * the handle as a natural Linux style 'lifetime' indicator and to | ||
| 710 | * ensure resources are not leaked when their owner explodes in an | ||
| 711 | * unplanned fashion. | ||
| 712 | */ | ||
| 713 | |||
| 714 | static int memrar_release(struct inode *inode, struct file *filp) | ||
| 715 | { | ||
| 716 | /* Free all regions associated with the given file handle. */ | ||
| 717 | |||
| 718 | struct memrar_buffer_info *pos; | ||
| 719 | struct memrar_buffer_info *tmp; | ||
| 720 | int z; | ||
| 721 | |||
| 722 | for (z = 0; z != MRST_NUM_RAR; ++z) { | ||
| 723 | struct memrar_rar_info * const rar = &memrars[z]; | ||
| 724 | |||
| 725 | mutex_lock(&rar->lock); | ||
| 726 | |||
| 727 | list_for_each_entry_safe(pos, | ||
| 728 | tmp, | ||
| 729 | &rar->buffers.list, | ||
| 730 | list) { | ||
| 731 | if (filp == pos->owner) | ||
| 732 | kref_put(&pos->refcount, | ||
| 733 | memrar_release_block_i); | ||
| 734 | } | ||
| 735 | |||
| 736 | mutex_unlock(&rar->lock); | ||
| 737 | } | ||
| 738 | |||
| 739 | return 0; | ||
| 740 | } | ||
| 741 | |||
| 742 | /** | ||
| 743 | * rar_reserve - reserve RAR memory | ||
| 744 | * @buffers: buffers to reserve | ||
| 745 | * @count: number wanted | ||
| 746 | * | ||
| 747 | * Reserve a series of buffers in the RAR space. Returns the number of | ||
| 748 | * buffers successfully allocated | ||
| 749 | */ | ||
| 750 | |||
| 751 | size_t rar_reserve(struct RAR_buffer *buffers, size_t count) | ||
| 752 | { | ||
| 753 | struct RAR_buffer * const end = | ||
| 754 | (buffers == NULL ? buffers : buffers + count); | ||
| 755 | struct RAR_buffer *i; | ||
| 756 | |||
| 757 | size_t reserve_count = 0; | ||
| 758 | |||
| 759 | for (i = buffers; i != end; ++i) { | ||
| 760 | if (memrar_reserve_block(i, NULL) == 0) | ||
| 761 | ++reserve_count; | ||
| 762 | else | ||
| 763 | i->bus_address = 0; | ||
| 764 | } | ||
| 765 | |||
| 766 | return reserve_count; | ||
| 767 | } | ||
| 768 | EXPORT_SYMBOL(rar_reserve); | ||
| 769 | |||
| 770 | /** | ||
| 771 | * rar_release - return RAR buffers | ||
| 772 | * @buffers: buffers to release | ||
| 773 | * @size: size of released block | ||
| 774 | * | ||
| 775 | * Return a set of buffers to the RAR pool | ||
| 776 | */ | ||
| 777 | |||
| 778 | size_t rar_release(struct RAR_buffer *buffers, size_t count) | ||
| 779 | { | ||
| 780 | struct RAR_buffer * const end = | ||
| 781 | (buffers == NULL ? buffers : buffers + count); | ||
| 782 | struct RAR_buffer *i; | ||
| 783 | |||
| 784 | size_t release_count = 0; | ||
| 785 | |||
| 786 | for (i = buffers; i != end; ++i) { | ||
| 787 | u32 * const handle = &i->info.handle; | ||
| 788 | if (memrar_release_block(*handle) == 0) { | ||
| 789 | /* | ||
| 790 | * @todo We assume we should do this each time | ||
| 791 | * the ref count is decremented. Should | ||
| 792 | * we instead only do this when the ref | ||
| 793 | * count has dropped to zero, and the | ||
| 794 | * buffer has been completely | ||
| 795 | * released/unmapped? | ||
| 796 | */ | ||
| 797 | *handle = 0; | ||
| 798 | ++release_count; | ||
| 799 | } | ||
| 800 | } | ||
| 801 | |||
| 802 | return release_count; | ||
| 803 | } | ||
| 804 | EXPORT_SYMBOL(rar_release); | ||
| 805 | |||
| 806 | /** | ||
| 807 | * rar_handle_to_bus - RAR to bus address | ||
| 808 | * @buffers: RAR buffer structure | ||
| 809 | * @count: number of buffers to convert | ||
| 810 | * | ||
| 811 | * Turn a list of RAR handle mappings into actual bus addresses. Note | ||
| 812 | * that when the device is locked down the bus addresses in question | ||
| 813 | * are not CPU accessible. | ||
| 814 | */ | ||
| 815 | |||
| 816 | size_t rar_handle_to_bus(struct RAR_buffer *buffers, size_t count) | ||
| 817 | { | ||
| 818 | struct RAR_buffer * const end = | ||
| 819 | (buffers == NULL ? buffers : buffers + count); | ||
| 820 | struct RAR_buffer *i; | ||
| 821 | struct memrar_buffer_info *pos; | ||
| 822 | |||
| 823 | size_t conversion_count = 0; | ||
| 824 | |||
| 825 | /* | ||
| 826 | * Find all bus addresses corresponding to the given handles. | ||
| 827 | * | ||
| 828 | * @todo Not liking this nested loop. Optimize. | ||
| 829 | */ | ||
| 830 | for (i = buffers; i != end; ++i) { | ||
| 831 | struct memrar_rar_info * const rar = | ||
| 832 | memrar_get_rar_info(i->info.handle); | ||
| 833 | |||
| 834 | /* | ||
| 835 | * Check if we have a bogus handle, and then continue | ||
| 836 | * with remaining buffers. | ||
| 837 | */ | ||
| 838 | if (rar == NULL) { | ||
| 839 | i->bus_address = 0; | ||
| 840 | continue; | ||
| 841 | } | ||
| 842 | |||
| 843 | mutex_lock(&rar->lock); | ||
| 844 | |||
| 845 | list_for_each_entry(pos, &rar->buffers.list, list) { | ||
| 846 | struct RAR_block_info * const user_info = | ||
| 847 | &pos->buffer.info; | ||
| 848 | |||
| 849 | /* | ||
| 850 | * Take into account handle offsets that may | ||
| 851 | * have been added to the base handle, such as | ||
| 852 | * in the following scenario: | ||
| 853 | * | ||
| 854 | * u32 handle = base + offset; | ||
| 855 | * rar_handle_to_bus(handle); | ||
| 856 | */ | ||
| 857 | |||
| 858 | if (i->info.handle >= user_info->handle | ||
| 859 | && i->info.handle < (user_info->handle | ||
| 860 | + user_info->size)) { | ||
| 861 | u32 const offset = | ||
| 862 | i->info.handle - user_info->handle; | ||
| 863 | |||
| 864 | i->info.type = user_info->type; | ||
| 865 | i->info.size = user_info->size - offset; | ||
| 866 | i->bus_address = | ||
| 867 | pos->buffer.bus_address | ||
| 868 | + offset; | ||
| 869 | |||
| 870 | /* Increment the reference count. */ | ||
| 871 | kref_get(&pos->refcount); | ||
| 872 | |||
| 873 | ++conversion_count; | ||
| 874 | break; | ||
| 875 | } else { | ||
| 876 | i->bus_address = 0; | ||
| 877 | } | ||
| 878 | } | ||
| 879 | |||
| 880 | mutex_unlock(&rar->lock); | ||
| 881 | } | ||
| 882 | |||
| 883 | return conversion_count; | ||
| 884 | } | ||
| 885 | EXPORT_SYMBOL(rar_handle_to_bus); | ||
| 886 | |||
| 887 | static const struct file_operations memrar_fops = { | ||
| 888 | .owner = THIS_MODULE, | ||
| 889 | .unlocked_ioctl = memrar_ioctl, | ||
| 890 | .mmap = memrar_mmap, | ||
| 891 | .open = memrar_open, | ||
| 892 | .release = memrar_release, | ||
| 893 | .llseek = no_llseek, | ||
| 894 | }; | ||
| 895 | |||
| 896 | static struct miscdevice memrar_miscdev = { | ||
| 897 | .minor = MISC_DYNAMIC_MINOR, /* dynamic allocation */ | ||
| 898 | .name = "memrar", /* /dev/memrar */ | ||
| 899 | .fops = &memrar_fops | ||
| 900 | }; | ||
| 901 | |||
| 902 | static char const banner[] __initdata = | ||
| 903 | KERN_INFO | ||
| 904 | "Intel RAR Handler: " MEMRAR_VER " initialized.\n"; | ||
| 905 | |||
| 906 | /** | ||
| 907 | * memrar_registration_callback - RAR obtained | ||
| 908 | * @rar: RAR number | ||
| 909 | * | ||
| 910 | * We have been granted ownership of the RAR. Add it to our memory | ||
| 911 | * management tables | ||
| 912 | */ | ||
| 913 | |||
| 914 | static int memrar_registration_callback(unsigned long rar) | ||
| 915 | { | ||
| 916 | /* | ||
| 917 | * We initialize the RAR parameters early on so that we can | ||
| 918 | * discontinue memrar device initialization and registration | ||
| 919 | * if suitably configured RARs are not available. | ||
| 920 | */ | ||
| 921 | return memrar_init_rar_resources(rar, memrar_miscdev.name); | ||
| 922 | } | ||
| 923 | |||
| 924 | /** | ||
| 925 | * memrar_init - initialise RAR support | ||
| 926 | * | ||
| 927 | * Initialise support for RAR handlers. This may get loaded before | ||
| 928 | * the RAR support is activated, but the callbacks on the registration | ||
| 929 | * will handle that situation for us anyway. | ||
| 930 | */ | ||
| 931 | |||
| 932 | static int __init memrar_init(void) | ||
| 933 | { | ||
| 934 | int err; | ||
| 935 | int i; | ||
| 936 | |||
| 937 | printk(banner); | ||
| 938 | |||
| 939 | /* | ||
| 940 | * Some delayed initialization is performed in this driver. | ||
| 941 | * Make sure resources that are used during driver clean-up | ||
| 942 | * (e.g. during driver's release() function) are fully | ||
| 943 | * initialized before first use. This is particularly | ||
| 944 | * important for the case when the delayed initialization | ||
| 945 | * isn't completed, leaving behind a partially initialized | ||
| 946 | * driver. | ||
| 947 | * | ||
| 948 | * Such a scenario can occur when RAR is not available on the | ||
| 949 | * platform, and the driver is release()d. | ||
| 950 | */ | ||
| 951 | for (i = 0; i != ARRAY_SIZE(memrars); ++i) { | ||
| 952 | struct memrar_rar_info * const rar = &memrars[i]; | ||
| 953 | mutex_init(&rar->lock); | ||
| 954 | INIT_LIST_HEAD(&rar->buffers.list); | ||
| 955 | } | ||
| 956 | |||
| 957 | err = misc_register(&memrar_miscdev); | ||
| 958 | if (err) | ||
| 959 | return err; | ||
| 960 | |||
| 961 | /* Now claim the two RARs we want */ | ||
| 962 | err = register_rar(0, memrar_registration_callback, 0); | ||
| 963 | if (err) | ||
| 964 | goto fail; | ||
| 965 | |||
| 966 | err = register_rar(1, memrar_registration_callback, 1); | ||
| 967 | if (err == 0) | ||
| 968 | return 0; | ||
| 969 | |||
| 970 | /* It is possible rar 0 registered and allocated resources then rar 1 | ||
| 971 | failed so do a full resource free */ | ||
| 972 | memrar_fini_rar_resources(); | ||
| 973 | fail: | ||
| 974 | misc_deregister(&memrar_miscdev); | ||
| 975 | return err; | ||
| 976 | } | ||
| 977 | |||
| 978 | /** | ||
| 979 | * memrar_exit - unregister and unload | ||
| 980 | * | ||
| 981 | * Unregister the device and then unload any mappings and release | ||
| 982 | * the RAR resources | ||
| 983 | */ | ||
| 984 | |||
| 985 | static void __exit memrar_exit(void) | ||
| 986 | { | ||
| 987 | misc_deregister(&memrar_miscdev); | ||
| 988 | memrar_fini_rar_resources(); | ||
| 989 | } | ||
| 990 | |||
| 991 | |||
| 992 | module_init(memrar_init); | ||
| 993 | module_exit(memrar_exit); | ||
| 994 | |||
| 995 | |||
| 996 | MODULE_AUTHOR("Ossama Othman <ossama.othman@intel.com>"); | ||
| 997 | MODULE_DESCRIPTION("Intel Restricted Access Region Handler"); | ||
| 998 | MODULE_LICENSE("GPL"); | ||
| 999 | MODULE_VERSION(MEMRAR_VER); | ||
| 1000 | |||
| 1001 | |||
| 1002 | |||
| 1003 | /* | ||
| 1004 | Local Variables: | ||
| 1005 | c-file-style: "linux" | ||
| 1006 | End: | ||
| 1007 | */ | ||
diff --git a/drivers/staging/msm/mdp4_overlay.c b/drivers/staging/msm/mdp4_overlay.c index de284c28faa1..b9acf5299297 100644 --- a/drivers/staging/msm/mdp4_overlay.c +++ b/drivers/staging/msm/mdp4_overlay.c | |||
| @@ -696,7 +696,7 @@ void mdp4_mixer_stage_down(struct mdp4_overlay_pipe *pipe) | |||
| 696 | stage = pipe->mixer_stage; | 696 | stage = pipe->mixer_stage; |
| 697 | mixer = pipe->mixer_num; | 697 | mixer = pipe->mixer_num; |
| 698 | 698 | ||
| 699 | if (pipe != ctrl->stage[mixer][stage]) /* not runing */ | 699 | if (pipe != ctrl->stage[mixer][stage]) /* not running */ |
| 700 | return; | 700 | return; |
| 701 | 701 | ||
| 702 | /* MDP_LAYERMIXER_IN_CFG, shard by both mixer 0 and 1 */ | 702 | /* MDP_LAYERMIXER_IN_CFG, shard by both mixer 0 and 1 */ |
diff --git a/drivers/staging/msm/mdp_ppp_dq.c b/drivers/staging/msm/mdp_ppp_dq.c index 3dc1c0cc61f9..3a687c7a5695 100644 --- a/drivers/staging/msm/mdp_ppp_dq.c +++ b/drivers/staging/msm/mdp_ppp_dq.c | |||
| @@ -200,7 +200,7 @@ static void mdp_ppp_flush_dirty_djobs(void *cond) | |||
| 200 | msm_fb_ensure_mem_coherency_after_dma(job->info, &job->req, 1); | 200 | msm_fb_ensure_mem_coherency_after_dma(job->info, &job->req, 1); |
| 201 | 201 | ||
| 202 | /* Schedule jobs for cleanup | 202 | /* Schedule jobs for cleanup |
| 203 | * A seperate worker thread does this */ | 203 | * A separate worker thread does this */ |
| 204 | queue_delayed_work(mdp_ppp_djob_clnr, &job->cleaner, | 204 | queue_delayed_work(mdp_ppp_djob_clnr, &job->cleaner, |
| 205 | mdp_timer_duration); | 205 | mdp_timer_duration); |
| 206 | } | 206 | } |
diff --git a/drivers/staging/msm/msm_fb.c b/drivers/staging/msm/msm_fb.c index a2f29d464051..e7ef836eb8de 100644 --- a/drivers/staging/msm/msm_fb.c +++ b/drivers/staging/msm/msm_fb.c | |||
| @@ -859,7 +859,7 @@ static int msm_fb_register(struct msm_fb_data_type *mfd) | |||
| 859 | break; | 859 | break; |
| 860 | 860 | ||
| 861 | default: | 861 | default: |
| 862 | MSM_FB_ERR("msm_fb_init: fb %d unkown image type!\n", | 862 | MSM_FB_ERR("msm_fb_init: fb %d unknown image type!\n", |
| 863 | mfd->index); | 863 | mfd->index); |
| 864 | return ret; | 864 | return ret; |
| 865 | } | 865 | } |
| @@ -1793,9 +1793,9 @@ static int msmfb_async_blit(struct fb_info *info, void __user *p) | |||
| 1793 | /* | 1793 | /* |
| 1794 | * NOTE: The userspace issues blit operations in a sequence, the sequence | 1794 | * NOTE: The userspace issues blit operations in a sequence, the sequence |
| 1795 | * start with a operation marked START and ends in an operation marked | 1795 | * start with a operation marked START and ends in an operation marked |
| 1796 | * END. It is guranteed by the userspace that all the blit operations | 1796 | * END. It is guaranteed by the userspace that all the blit operations |
| 1797 | * between START and END are only within the regions of areas designated | 1797 | * between START and END are only within the regions of areas designated |
| 1798 | * by the START and END operations and that the userspace doesnt modify | 1798 | * by the START and END operations and that the userspace doesn't modify |
| 1799 | * those areas. Hence it would be enough to perform barrier/cache operations | 1799 | * those areas. Hence it would be enough to perform barrier/cache operations |
| 1800 | * only on the START and END operations. | 1800 | * only on the START and END operations. |
| 1801 | */ | 1801 | */ |
diff --git a/drivers/staging/octeon/cvmx-cmd-queue.h b/drivers/staging/octeon/cvmx-cmd-queue.h index 59d221422293..614653b686a0 100644 --- a/drivers/staging/octeon/cvmx-cmd-queue.h +++ b/drivers/staging/octeon/cvmx-cmd-queue.h | |||
| @@ -214,7 +214,7 @@ static inline int __cvmx_cmd_queue_get_index(cvmx_cmd_queue_id_t queue_id) | |||
| 214 | /* | 214 | /* |
| 215 | * Warning: This code currently only works with devices that | 215 | * Warning: This code currently only works with devices that |
| 216 | * have 256 queues or less. Devices with more than 16 queues | 216 | * have 256 queues or less. Devices with more than 16 queues |
| 217 | * are layed out in memory to allow cores quick access to | 217 | * are laid out in memory to allow cores quick access to |
| 218 | * every 16th queue. This reduces cache thrashing when you are | 218 | * every 16th queue. This reduces cache thrashing when you are |
| 219 | * running 16 queues per port to support lockless operation. | 219 | * running 16 queues per port to support lockless operation. |
| 220 | */ | 220 | */ |
diff --git a/drivers/staging/octeon/cvmx-fpa.h b/drivers/staging/octeon/cvmx-fpa.h index 50a8c91778fa..1f04f9658736 100644 --- a/drivers/staging/octeon/cvmx-fpa.h +++ b/drivers/staging/octeon/cvmx-fpa.h | |||
| @@ -195,7 +195,7 @@ static inline void cvmx_fpa_async_alloc(uint64_t scr_addr, uint64_t pool) | |||
| 195 | cvmx_fpa_iobdma_data_t data; | 195 | cvmx_fpa_iobdma_data_t data; |
| 196 | 196 | ||
| 197 | /* | 197 | /* |
| 198 | * Hardware only uses 64 bit alligned locations, so convert | 198 | * Hardware only uses 64 bit aligned locations, so convert |
| 199 | * from byte address to 64-bit index | 199 | * from byte address to 64-bit index |
| 200 | */ | 200 | */ |
| 201 | data.s.scraddr = scr_addr >> 3; | 201 | data.s.scraddr = scr_addr >> 3; |
diff --git a/drivers/staging/octeon/cvmx-helper-board.h b/drivers/staging/octeon/cvmx-helper-board.h index 611a8e03c216..b465bec43553 100644 --- a/drivers/staging/octeon/cvmx-helper-board.h +++ b/drivers/staging/octeon/cvmx-helper-board.h | |||
| @@ -81,7 +81,7 @@ extern int cvmx_helper_board_get_mii_address(int ipd_port); | |||
| 81 | * @phy_addr: The address of the PHY to program | 81 | * @phy_addr: The address of the PHY to program |
| 82 | * @link_flags: | 82 | * @link_flags: |
| 83 | * Flags to control autonegotiation. Bit 0 is autonegotiation | 83 | * Flags to control autonegotiation. Bit 0 is autonegotiation |
| 84 | * enable/disable to maintain backware compatability. | 84 | * enable/disable to maintain backware compatibility. |
| 85 | * @link_info: Link speed to program. If the speed is zero and autonegotiation | 85 | * @link_info: Link speed to program. If the speed is zero and autonegotiation |
| 86 | * is enabled, all possible negotiation speeds are advertised. | 86 | * is enabled, all possible negotiation speeds are advertised. |
| 87 | * | 87 | * |
diff --git a/drivers/staging/octeon/cvmx-helper-util.c b/drivers/staging/octeon/cvmx-helper-util.c index 41ef8a40bb03..131182bf5abb 100644 --- a/drivers/staging/octeon/cvmx-helper-util.c +++ b/drivers/staging/octeon/cvmx-helper-util.c | |||
| @@ -362,7 +362,7 @@ int __cvmx_helper_setup_gmx(int interface, int num_ports) | |||
| 362 | } | 362 | } |
| 363 | 363 | ||
| 364 | /** | 364 | /** |
| 365 | * Returns the IPD/PKO port number for a port on teh given | 365 | * Returns the IPD/PKO port number for a port on the given |
| 366 | * interface. | 366 | * interface. |
| 367 | * | 367 | * |
| 368 | * @interface: Interface to use | 368 | * @interface: Interface to use |
diff --git a/drivers/staging/octeon/cvmx-helper.c b/drivers/staging/octeon/cvmx-helper.c index 591506643d02..e9c5c836ceff 100644 --- a/drivers/staging/octeon/cvmx-helper.c +++ b/drivers/staging/octeon/cvmx-helper.c | |||
| @@ -691,7 +691,7 @@ int __cvmx_helper_errata_fix_ipd_ptr_alignment(void) | |||
| 691 | 691 | ||
| 692 | if (!retry_cnt) | 692 | if (!retry_cnt) |
| 693 | cvmx_dprintf("WARNING: FIX_IPD_PTR_ALIGNMENT " | 693 | cvmx_dprintf("WARNING: FIX_IPD_PTR_ALIGNMENT " |
| 694 | "get_work() timeout occured.\n"); | 694 | "get_work() timeout occurred.\n"); |
| 695 | 695 | ||
| 696 | /* Free packet */ | 696 | /* Free packet */ |
| 697 | if (work) | 697 | if (work) |
diff --git a/drivers/staging/octeon/cvmx-mdio.h b/drivers/staging/octeon/cvmx-mdio.h index f45dc49512f2..d88ab8d8e37d 100644 --- a/drivers/staging/octeon/cvmx-mdio.h +++ b/drivers/staging/octeon/cvmx-mdio.h | |||
| @@ -254,7 +254,7 @@ typedef union { | |||
| 254 | #define MDIO_CLAUSE_45_READ_INC 2 | 254 | #define MDIO_CLAUSE_45_READ_INC 2 |
| 255 | #define MDIO_CLAUSE_45_READ 3 | 255 | #define MDIO_CLAUSE_45_READ 3 |
| 256 | 256 | ||
| 257 | /* MMD identifiers, mostly for accessing devices withing XENPAK modules. */ | 257 | /* MMD identifiers, mostly for accessing devices within XENPAK modules. */ |
| 258 | #define CVMX_MMD_DEVICE_PMA_PMD 1 | 258 | #define CVMX_MMD_DEVICE_PMA_PMD 1 |
| 259 | #define CVMX_MMD_DEVICE_WIS 2 | 259 | #define CVMX_MMD_DEVICE_WIS 2 |
| 260 | #define CVMX_MMD_DEVICE_PCS 3 | 260 | #define CVMX_MMD_DEVICE_PCS 3 |
diff --git a/drivers/staging/octeon/cvmx-pko.h b/drivers/staging/octeon/cvmx-pko.h index f068c1982497..de3412aada5d 100644 --- a/drivers/staging/octeon/cvmx-pko.h +++ b/drivers/staging/octeon/cvmx-pko.h | |||
| @@ -98,7 +98,7 @@ typedef enum { | |||
| 98 | /* | 98 | /* |
| 99 | * PKO doesn't do any locking. It is the responsibility of the | 99 | * PKO doesn't do any locking. It is the responsibility of the |
| 100 | * application to make sure that no other core is accessing | 100 | * application to make sure that no other core is accessing |
| 101 | * the same queue at the smae time | 101 | * the same queue at the same time |
| 102 | */ | 102 | */ |
| 103 | CVMX_PKO_LOCK_NONE = 0, | 103 | CVMX_PKO_LOCK_NONE = 0, |
| 104 | /* | 104 | /* |
| @@ -324,7 +324,7 @@ static inline void cvmx_pko_doorbell(uint64_t port, uint64_t queue, | |||
| 324 | * - CVMX_PKO_LOCK_NONE | 324 | * - CVMX_PKO_LOCK_NONE |
| 325 | * - PKO doesn't do any locking. It is the responsibility | 325 | * - PKO doesn't do any locking. It is the responsibility |
| 326 | * of the application to make sure that no other core | 326 | * of the application to make sure that no other core |
| 327 | * is accessing the same queue at the smae time. | 327 | * is accessing the same queue at the same time. |
| 328 | * - CVMX_PKO_LOCK_ATOMIC_TAG | 328 | * - CVMX_PKO_LOCK_ATOMIC_TAG |
| 329 | * - PKO performs an atomic tagswitch to insure exclusive | 329 | * - PKO performs an atomic tagswitch to insure exclusive |
| 330 | * access to the output queue. This will maintain | 330 | * access to the output queue. This will maintain |
diff --git a/drivers/staging/octeon/cvmx-pow.h b/drivers/staging/octeon/cvmx-pow.h index bf9e069a898c..999aefe3274c 100644 --- a/drivers/staging/octeon/cvmx-pow.h +++ b/drivers/staging/octeon/cvmx-pow.h | |||
| @@ -1492,8 +1492,8 @@ static inline void cvmx_pow_tag_sw_full(cvmx_wqe_t *wqp, uint32_t tag, | |||
| 1492 | /** | 1492 | /** |
| 1493 | * Switch to a NULL tag, which ends any ordering or | 1493 | * Switch to a NULL tag, which ends any ordering or |
| 1494 | * synchronization provided by the POW for the current | 1494 | * synchronization provided by the POW for the current |
| 1495 | * work queue entry. This operation completes immediatly, | 1495 | * work queue entry. This operation completes immediately, |
| 1496 | * so completetion should not be waited for. | 1496 | * so completion should not be waited for. |
| 1497 | * This function does NOT wait for previous tag switches to complete, | 1497 | * This function does NOT wait for previous tag switches to complete, |
| 1498 | * so the caller must ensure that any previous tag switches have completed. | 1498 | * so the caller must ensure that any previous tag switches have completed. |
| 1499 | */ | 1499 | */ |
| @@ -1532,8 +1532,8 @@ static inline void cvmx_pow_tag_sw_null_nocheck(void) | |||
| 1532 | /** | 1532 | /** |
| 1533 | * Switch to a NULL tag, which ends any ordering or | 1533 | * Switch to a NULL tag, which ends any ordering or |
| 1534 | * synchronization provided by the POW for the current | 1534 | * synchronization provided by the POW for the current |
| 1535 | * work queue entry. This operation completes immediatly, | 1535 | * work queue entry. This operation completes immediately, |
| 1536 | * so completetion should not be waited for. | 1536 | * so completion should not be waited for. |
| 1537 | * This function waits for any pending tag switches to complete | 1537 | * This function waits for any pending tag switches to complete |
| 1538 | * before requesting the switch to NULL. | 1538 | * before requesting the switch to NULL. |
| 1539 | */ | 1539 | */ |
| @@ -1672,7 +1672,7 @@ static inline void cvmx_pow_set_priority(uint64_t core_num, | |||
| 1672 | 1672 | ||
| 1673 | /** | 1673 | /** |
| 1674 | * Performs a tag switch and then an immediate deschedule. This completes | 1674 | * Performs a tag switch and then an immediate deschedule. This completes |
| 1675 | * immediatly, so completion must not be waited for. This function does NOT | 1675 | * immediately, so completion must not be waited for. This function does NOT |
| 1676 | * update the wqe in DRAM to match arguments. | 1676 | * update the wqe in DRAM to match arguments. |
| 1677 | * | 1677 | * |
| 1678 | * This function does NOT wait for any prior tag switches to complete, so the | 1678 | * This function does NOT wait for any prior tag switches to complete, so the |
| @@ -1758,7 +1758,7 @@ static inline void cvmx_pow_tag_sw_desched_nocheck( | |||
| 1758 | 1758 | ||
| 1759 | /** | 1759 | /** |
| 1760 | * Performs a tag switch and then an immediate deschedule. This completes | 1760 | * Performs a tag switch and then an immediate deschedule. This completes |
| 1761 | * immediatly, so completion must not be waited for. This function does NOT | 1761 | * immediately, so completion must not be waited for. This function does NOT |
| 1762 | * update the wqe in DRAM to match arguments. | 1762 | * update the wqe in DRAM to match arguments. |
| 1763 | * | 1763 | * |
| 1764 | * This function waits for any prior tag switches to complete, so the | 1764 | * This function waits for any prior tag switches to complete, so the |
diff --git a/drivers/staging/octeon/ethernet-util.h b/drivers/staging/octeon/ethernet-util.h index 23467563fe57..c745a72a0594 100644 --- a/drivers/staging/octeon/ethernet-util.h +++ b/drivers/staging/octeon/ethernet-util.h | |||
| @@ -55,7 +55,7 @@ static inline int INTERFACE(int ipd_port) | |||
| 55 | return 2; | 55 | return 2; |
| 56 | else if (ipd_port < 40) /* Interface 3 for loopback */ | 56 | else if (ipd_port < 40) /* Interface 3 for loopback */ |
| 57 | return 3; | 57 | return 3; |
| 58 | else if (ipd_port == 40) /* Non existant interface for POW0 */ | 58 | else if (ipd_port == 40) /* Non existent interface for POW0 */ |
| 59 | return 4; | 59 | return 4; |
| 60 | else | 60 | else |
| 61 | panic("Illegal ipd_port %d passed to INTERFACE\n", ipd_port); | 61 | panic("Illegal ipd_port %d passed to INTERFACE\n", ipd_port); |
diff --git a/drivers/staging/olpc_dcon/Kconfig b/drivers/staging/olpc_dcon/Kconfig index f1082f50fdce..b05306766870 100644 --- a/drivers/staging/olpc_dcon/Kconfig +++ b/drivers/staging/olpc_dcon/Kconfig | |||
| @@ -9,7 +9,7 @@ config FB_OLPC_DCON | |||
| 9 | 9 | ||
| 10 | config FB_OLPC_DCON_1 | 10 | config FB_OLPC_DCON_1 |
| 11 | bool "OLPC XO-1 DCON support" | 11 | bool "OLPC XO-1 DCON support" |
| 12 | depends on FB_OLPC_DCON | 12 | depends on FB_OLPC_DCON && GPIO_CS5535 |
| 13 | default y | 13 | default y |
| 14 | ---help--- | 14 | ---help--- |
| 15 | Enable support for the DCON in XO-1 model laptops. The kernel | 15 | Enable support for the DCON in XO-1 model laptops. The kernel |
diff --git a/drivers/staging/olpc_dcon/olpc_dcon_xo_1.c b/drivers/staging/olpc_dcon/olpc_dcon_xo_1.c index b154be7a2fe6..b5d21f6497f9 100644 --- a/drivers/staging/olpc_dcon/olpc_dcon_xo_1.c +++ b/drivers/staging/olpc_dcon/olpc_dcon_xo_1.c | |||
| @@ -80,7 +80,7 @@ static int dcon_init_xo_1(struct dcon_priv *dcon) | |||
| 80 | lob &= ~(1 << DCON_IRQ); | 80 | lob &= ~(1 << DCON_IRQ); |
| 81 | outb(lob, 0x4d0); | 81 | outb(lob, 0x4d0); |
| 82 | 82 | ||
| 83 | /* Register the interupt handler */ | 83 | /* Register the interrupt handler */ |
| 84 | if (request_irq(DCON_IRQ, &dcon_interrupt, 0, "DCON", dcon)) { | 84 | if (request_irq(DCON_IRQ, &dcon_interrupt, 0, "DCON", dcon)) { |
| 85 | printk(KERN_ERR "olpc-dcon: failed to request DCON's irq\n"); | 85 | printk(KERN_ERR "olpc-dcon: failed to request DCON's irq\n"); |
| 86 | goto err_req_irq; | 86 | goto err_req_irq; |
diff --git a/drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c b/drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c index e213b63f8116..7aa9b1a45bd6 100644 --- a/drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c +++ b/drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | */ | 7 | */ |
| 8 | 8 | ||
| 9 | #include <linux/acpi.h> | 9 | #include <linux/acpi.h> |
| 10 | #include <linux/delay.h> | ||
| 10 | #include <linux/pci.h> | 11 | #include <linux/pci.h> |
| 11 | #include <linux/gpio.h> | 12 | #include <linux/gpio.h> |
| 12 | #include <asm/olpc.h> | 13 | #include <asm/olpc.h> |
diff --git a/drivers/staging/pohmelfs/crypto.c b/drivers/staging/pohmelfs/crypto.c index 6540864216c8..5cca24fcf6ca 100644 --- a/drivers/staging/pohmelfs/crypto.c +++ b/drivers/staging/pohmelfs/crypto.c | |||
| @@ -745,7 +745,7 @@ static int pohmelfs_crypto_init_handshake(struct pohmelfs_sb *psb) | |||
| 745 | 745 | ||
| 746 | /* | 746 | /* |
| 747 | * At this point NETFS_CAPABILITIES response command | 747 | * At this point NETFS_CAPABILITIES response command |
| 748 | * should setup superblock in a way, which is acceptible | 748 | * should setup superblock in a way, which is acceptable |
| 749 | * for both client and server, so if server refuses connection, | 749 | * for both client and server, so if server refuses connection, |
| 750 | * it will send error in transaction response. | 750 | * it will send error in transaction response. |
| 751 | */ | 751 | */ |
diff --git a/drivers/staging/quatech_usb2/quatech_usb2.c b/drivers/staging/quatech_usb2/quatech_usb2.c index c45b09ed0d35..ca098cabc2bc 100644 --- a/drivers/staging/quatech_usb2/quatech_usb2.c +++ b/drivers/staging/quatech_usb2/quatech_usb2.c | |||
| @@ -148,7 +148,7 @@ static struct usb_driver quausb2_usb_driver = { | |||
| 148 | * value of the line status flags from the port | 148 | * value of the line status flags from the port |
| 149 | * @shadowMSR: Last received state of the modem status register, holds | 149 | * @shadowMSR: Last received state of the modem status register, holds |
| 150 | * the value of the modem status received from the port | 150 | * the value of the modem status received from the port |
| 151 | * @rcv_flush: Flag indicating that a receive flush has occured on | 151 | * @rcv_flush: Flag indicating that a receive flush has occurred on |
| 152 | * the hardware. | 152 | * the hardware. |
| 153 | * @xmit_flush: Flag indicating that a transmit flush has been processed by | 153 | * @xmit_flush: Flag indicating that a transmit flush has been processed by |
| 154 | * the hardware. | 154 | * the hardware. |
| @@ -156,7 +156,7 @@ static struct usb_driver quausb2_usb_driver = { | |||
| 156 | * includes the size (excluding header) of URBs that have been submitted but | 156 | * includes the size (excluding header) of URBs that have been submitted but |
| 157 | * have not yet been sent to to the device, and bytes that have been sent out | 157 | * have not yet been sent to to the device, and bytes that have been sent out |
| 158 | * of the port but not yet reported sent by the "xmit_empty" messages (which | 158 | * of the port but not yet reported sent by the "xmit_empty" messages (which |
| 159 | * indicate the number of bytes sent each time they are recieved, despite the | 159 | * indicate the number of bytes sent each time they are received, despite the |
| 160 | * misleading name). | 160 | * misleading name). |
| 161 | * - Starts at zero when port is initialised. | 161 | * - Starts at zero when port is initialised. |
| 162 | * - is incremented by the size of the data to be written (no headers) | 162 | * - is incremented by the size of the data to be written (no headers) |
| @@ -649,7 +649,7 @@ static void qt2_close(struct usb_serial_port *port) | |||
| 649 | /* although the USB side is now empty, the UART itself may | 649 | /* although the USB side is now empty, the UART itself may |
| 650 | * still be pushing characters out over the line, so we have to | 650 | * still be pushing characters out over the line, so we have to |
| 651 | * wait testing the actual line status until the lines change | 651 | * wait testing the actual line status until the lines change |
| 652 | * indicating that the data is done transfering. */ | 652 | * indicating that the data is done transferring. */ |
| 653 | /* FIXME: slow this polling down so it doesn't run the USB bus flat out | 653 | /* FIXME: slow this polling down so it doesn't run the USB bus flat out |
| 654 | * if it actually has to spend any time in this loop (which it normally | 654 | * if it actually has to spend any time in this loop (which it normally |
| 655 | * doesn't because the buffer is nearly empty) */ | 655 | * doesn't because the buffer is nearly empty) */ |
| @@ -726,7 +726,7 @@ static int qt2_write(struct tty_struct *tty, struct usb_serial_port *port, | |||
| 726 | return 0; | 726 | return 0; |
| 727 | } else if (port_extra->tx_pending_bytes >= QT2_FIFO_DEPTH) { | 727 | } else if (port_extra->tx_pending_bytes >= QT2_FIFO_DEPTH) { |
| 728 | /* buffer is full (==). > should not occur, but would indicate | 728 | /* buffer is full (==). > should not occur, but would indicate |
| 729 | * that an overflow had occured */ | 729 | * that an overflow had occurred */ |
| 730 | dbg("%s(): port transmit buffer is full!", __func__); | 730 | dbg("%s(): port transmit buffer is full!", __func__); |
| 731 | /* schedule_work(&port->work); commented in vendor driver */ | 731 | /* schedule_work(&port->work); commented in vendor driver */ |
| 732 | return 0; | 732 | return 0; |
| @@ -823,7 +823,7 @@ static int qt2_write_room(struct tty_struct *tty) | |||
| 823 | * reduce the free space count by the size of the dispatched write. | 823 | * reduce the free space count by the size of the dispatched write. |
| 824 | * When a "transmit empty" message comes back up the USB read stream, | 824 | * When a "transmit empty" message comes back up the USB read stream, |
| 825 | * we decrement the count by the number of bytes reported sent, thus | 825 | * we decrement the count by the number of bytes reported sent, thus |
| 826 | * keeping track of the difference between sent and recieved bytes. | 826 | * keeping track of the difference between sent and received bytes. |
| 827 | */ | 827 | */ |
| 828 | 828 | ||
| 829 | room = (QT2_FIFO_DEPTH - port_extra->tx_pending_bytes); | 829 | room = (QT2_FIFO_DEPTH - port_extra->tx_pending_bytes); |
| @@ -1795,7 +1795,7 @@ static void qt2_process_rx_char(struct usb_serial_port *port, | |||
| 1795 | } | 1795 | } |
| 1796 | } | 1796 | } |
| 1797 | 1797 | ||
| 1798 | /** @brief Retreive the value of a register from the device | 1798 | /** @brief Retrieve the value of a register from the device |
| 1799 | * | 1799 | * |
| 1800 | * Issues a GET_REGISTER vendor-spcific request over the USB control | 1800 | * Issues a GET_REGISTER vendor-spcific request over the USB control |
| 1801 | * pipe to obtain a value back from a specific register on a specific | 1801 | * pipe to obtain a value back from a specific register on a specific |
diff --git a/drivers/staging/rt2860/chip/rtmp_phy.h b/drivers/staging/rt2860/chip/rtmp_phy.h index 98454df30a22..a52221f1294e 100644 --- a/drivers/staging/rt2860/chip/rtmp_phy.h +++ b/drivers/staging/rt2860/chip/rtmp_phy.h | |||
| @@ -467,7 +467,7 @@ | |||
| 467 | DBGPRINT_ERR("BBP write R%d=0x%x fail. BusyCnt= %d.bPCIclkOff = %d. \n", _I, BbpCsr.word, BusyCnt, (_A)->bPCIclkOff); \ | 467 | DBGPRINT_ERR("BBP write R%d=0x%x fail. BusyCnt= %d.bPCIclkOff = %d. \n", _I, BbpCsr.word, BusyCnt, (_A)->bPCIclkOff); \ |
| 468 | } \ | 468 | } \ |
| 469 | } else { \ | 469 | } else { \ |
| 470 | DBGPRINT_ERR("****** BBP_Write_Latch Buffer exceeds max boundry ****** \n"); \ | 470 | DBGPRINT_ERR("****** BBP_Write_Latch Buffer exceeds max boundary ****** \n"); \ |
| 471 | } \ | 471 | } \ |
| 472 | } | 472 | } |
| 473 | #endif /* RTMP_MAC_PCI // */ | 473 | #endif /* RTMP_MAC_PCI // */ |
diff --git a/drivers/staging/rt2860/common/ba_action.c b/drivers/staging/rt2860/common/ba_action.c index 62f6f6be4acb..133bc1b87d2c 100644 --- a/drivers/staging/rt2860/common/ba_action.c +++ b/drivers/staging/rt2860/common/ba_action.c | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | #include "../rt_config.h" | 28 | #include "../rt_config.h" |
| 29 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
| 30 | 30 | ||
| 31 | #define BA_ORI_INIT_SEQ (pEntry->TxSeq[TID]) /*1 // inital sequence number of BA session */ | 31 | #define BA_ORI_INIT_SEQ (pEntry->TxSeq[TID]) /*1 // initial sequence number of BA session */ |
| 32 | 32 | ||
| 33 | #define ORI_SESSION_MAX_RETRY 8 | 33 | #define ORI_SESSION_MAX_RETRY 8 |
| 34 | #define ORI_BA_SESSION_TIMEOUT (2000) /* ms */ | 34 | #define ORI_BA_SESSION_TIMEOUT (2000) /* ms */ |
| @@ -1487,7 +1487,7 @@ static void ba_enqueue_reordering_packet(struct rt_rtmp_adapter *pAd, | |||
| 1487 | 1487 | ||
| 1488 | /* | 1488 | /* |
| 1489 | * flush all pending reordering mpdus | 1489 | * flush all pending reordering mpdus |
| 1490 | * and receving mpdu to upper layer | 1490 | * and receiving mpdu to upper layer |
| 1491 | * make tcp/ip to take care reordering mechanism | 1491 | * make tcp/ip to take care reordering mechanism |
| 1492 | */ | 1492 | */ |
| 1493 | /*ba_refresh_reordering_mpdus(pAd, pBAEntry); */ | 1493 | /*ba_refresh_reordering_mpdus(pAd, pBAEntry); */ |
diff --git a/drivers/staging/rt2860/common/cmm_aes.c b/drivers/staging/rt2860/common/cmm_aes.c index a99879bada42..d70d229a6e53 100644 --- a/drivers/staging/rt2860/common/cmm_aes.c +++ b/drivers/staging/rt2860/common/cmm_aes.c | |||
| @@ -858,7 +858,7 @@ static uint32 KT1[256]; | |||
| 858 | static uint32 KT2[256]; | 858 | static uint32 KT2[256]; |
| 859 | static uint32 KT3[256]; | 859 | static uint32 KT3[256]; |
| 860 | 860 | ||
| 861 | /* platform-independant 32-bit integer manipulation macros */ | 861 | /* platform-independent 32-bit integer manipulation macros */ |
| 862 | 862 | ||
| 863 | #define GET_UINT32(n,b,i) \ | 863 | #define GET_UINT32(n,b,i) \ |
| 864 | { \ | 864 | { \ |
diff --git a/drivers/staging/rt2860/common/cmm_cfg.c b/drivers/staging/rt2860/common/cmm_cfg.c index 24f439378439..727f79929258 100644 --- a/drivers/staging/rt2860/common/cmm_cfg.c +++ b/drivers/staging/rt2860/common/cmm_cfg.c | |||
| @@ -223,7 +223,7 @@ int RT_CfgSetWepKey(struct rt_rtmp_adapter *pAd, | |||
| 223 | pAdapter Pointer to our adapter | 223 | pAdapter Pointer to our adapter |
| 224 | keyString WPA pre-shared key string | 224 | keyString WPA pre-shared key string |
| 225 | pHashStr String used for password hash function | 225 | pHashStr String used for password hash function |
| 226 | hashStrLen Lenght of the hash string | 226 | hashStrLen Length of the hash string |
| 227 | pPMKBuf Output buffer of WPAPSK key | 227 | pPMKBuf Output buffer of WPAPSK key |
| 228 | 228 | ||
| 229 | Return: | 229 | Return: |
diff --git a/drivers/staging/rt2860/common/cmm_data.c b/drivers/staging/rt2860/common/cmm_data.c index f6c193cb84ee..33799e1449ae 100644 --- a/drivers/staging/rt2860/common/cmm_data.c +++ b/drivers/staging/rt2860/common/cmm_data.c | |||
| @@ -337,7 +337,7 @@ int MlmeHardTransmitMgmtRing(struct rt_rtmp_adapter *pAd, | |||
| 337 | 337 | ||
| 338 | /* */ | 338 | /* */ |
| 339 | /* In WMM-UAPSD, mlme frame should be set psm as power saving but probe request frame */ | 339 | /* In WMM-UAPSD, mlme frame should be set psm as power saving but probe request frame */ |
| 340 | /* Data-Null packets alse pass through MMRequest in RT2860, however, we hope control the psm bit to pass APSD */ | 340 | /* Data-Null packets also pass through MMRequest in RT2860, however, we hope control the psm bit to pass APSD */ |
| 341 | /* if ((pHeader_802_11->FC.Type != BTYPE_DATA) && (pHeader_802_11->FC.Type != BTYPE_CNTL)) */ | 341 | /* if ((pHeader_802_11->FC.Type != BTYPE_DATA) && (pHeader_802_11->FC.Type != BTYPE_CNTL)) */ |
| 342 | { | 342 | { |
| 343 | if ((pHeader_802_11->FC.SubType == SUBTYPE_ACTION) || | 343 | if ((pHeader_802_11->FC.SubType == SUBTYPE_ACTION) || |
| @@ -1933,7 +1933,7 @@ BOOLEAN RTMPCheckEtherType(struct rt_rtmp_adapter *pAd, void *pPacket) | |||
| 1933 | 1933 | ||
| 1934 | if (TypeLen <= 1500) { /* 802.3, 802.3 LLC */ | 1934 | if (TypeLen <= 1500) { /* 802.3, 802.3 LLC */ |
| 1935 | /* | 1935 | /* |
| 1936 | DestMAC(6) + SrcMAC(6) + Lenght(2) + | 1936 | DestMAC(6) + SrcMAC(6) + Length(2) + |
| 1937 | DSAP(1) + SSAP(1) + Control(1) + | 1937 | DSAP(1) + SSAP(1) + Control(1) + |
| 1938 | if the DSAP = 0xAA, SSAP=0xAA, Contorl = 0x03, it has a 5-bytes SNAP header. | 1938 | if the DSAP = 0xAA, SSAP=0xAA, Contorl = 0x03, it has a 5-bytes SNAP header. |
| 1939 | => + SNAP (5, OriginationID(3) + etherType(2)) | 1939 | => + SNAP (5, OriginationID(3) + etherType(2)) |
diff --git a/drivers/staging/rt2860/common/cmm_data_pci.c b/drivers/staging/rt2860/common/cmm_data_pci.c index 7af59ff9e220..bef0bbd8cef7 100644 --- a/drivers/staging/rt2860/common/cmm_data_pci.c +++ b/drivers/staging/rt2860/common/cmm_data_pci.c | |||
| @@ -438,13 +438,13 @@ int RTMPCheckRxError(struct rt_rtmp_adapter *pAd, | |||
| 438 | /* Add Rx size to channel load counter, we should ignore error counts */ | 438 | /* Add Rx size to channel load counter, we should ignore error counts */ |
| 439 | pAd->StaCfg.CLBusyBytes += (pRxD->SDL0 + 14); | 439 | pAd->StaCfg.CLBusyBytes += (pRxD->SDL0 + 14); |
| 440 | 440 | ||
| 441 | /* Drop ToDs promiscous frame, it is opened due to CCX 2 channel load statistics */ | 441 | /* Drop ToDs promiscuous frame, it is opened due to CCX 2 channel load statistics */ |
| 442 | if (pHeader != NULL) { | 442 | if (pHeader != NULL) { |
| 443 | if (pHeader->FC.ToDs) { | 443 | if (pHeader->FC.ToDs) { |
| 444 | return (NDIS_STATUS_FAILURE); | 444 | return (NDIS_STATUS_FAILURE); |
| 445 | } | 445 | } |
| 446 | } | 446 | } |
| 447 | /* Drop not U2M frames, cant's drop here because we will drop beacon in this case */ | 447 | /* Drop not U2M frames, can't's drop here because we will drop beacon in this case */ |
| 448 | /* I am kind of doubting the U2M bit operation */ | 448 | /* I am kind of doubting the U2M bit operation */ |
| 449 | /* if (pRxD->U2M == 0) */ | 449 | /* if (pRxD->U2M == 0) */ |
| 450 | /* return(NDIS_STATUS_FAILURE); */ | 450 | /* return(NDIS_STATUS_FAILURE); */ |
| @@ -939,7 +939,7 @@ int MlmeHardTransmitTxRing(struct rt_rtmp_adapter *pAd, | |||
| 939 | /* */ | 939 | /* */ |
| 940 | /* */ | 940 | /* */ |
| 941 | /* In WMM-UAPSD, mlme frame should be set psm as power saving but probe request frame */ | 941 | /* In WMM-UAPSD, mlme frame should be set psm as power saving but probe request frame */ |
| 942 | /* Data-Null packets alse pass through MMRequest in RT2860, however, we hope control the psm bit to pass APSD */ | 942 | /* Data-Null packets also pass through MMRequest in RT2860, however, we hope control the psm bit to pass APSD */ |
| 943 | if (pHeader_802_11->FC.Type != BTYPE_DATA) { | 943 | if (pHeader_802_11->FC.Type != BTYPE_DATA) { |
| 944 | if ((pHeader_802_11->FC.SubType == SUBTYPE_PROBE_REQ) | 944 | if ((pHeader_802_11->FC.SubType == SUBTYPE_PROBE_REQ) |
| 945 | || !(pAd->CommonCfg.bAPSDCapable | 945 | || !(pAd->CommonCfg.bAPSDCapable |
diff --git a/drivers/staging/rt2860/common/cmm_data_usb.c b/drivers/staging/rt2860/common/cmm_data_usb.c index 7c56c2f51987..5637857ae9eb 100644 --- a/drivers/staging/rt2860/common/cmm_data_usb.c +++ b/drivers/staging/rt2860/common/cmm_data_usb.c | |||
| @@ -702,7 +702,7 @@ Arguments: | |||
| 702 | *pRxPending pending received packet flag | 702 | *pRxPending pending received packet flag |
| 703 | 703 | ||
| 704 | Return Value: | 704 | Return Value: |
| 705 | the recieved packet | 705 | the received packet |
| 706 | 706 | ||
| 707 | Note: | 707 | Note: |
| 708 | ======================================================================== | 708 | ======================================================================== |
| @@ -850,7 +850,7 @@ int RTMPCheckRxError(struct rt_rtmp_adapter *pAd, | |||
| 850 | /* Add Rx size to channel load counter, we should ignore error counts */ | 850 | /* Add Rx size to channel load counter, we should ignore error counts */ |
| 851 | pAd->StaCfg.CLBusyBytes += (pRxWI->MPDUtotalByteCount + 14); | 851 | pAd->StaCfg.CLBusyBytes += (pRxWI->MPDUtotalByteCount + 14); |
| 852 | 852 | ||
| 853 | /* Drop ToDs promiscous frame, it is opened due to CCX 2 channel load statistics */ | 853 | /* Drop ToDs promiscuous frame, it is opened due to CCX 2 channel load statistics */ |
| 854 | if (pHeader->FC.ToDs) { | 854 | if (pHeader->FC.ToDs) { |
| 855 | DBGPRINT_RAW(RT_DEBUG_ERROR, ("Err;FC.ToDs\n")); | 855 | DBGPRINT_RAW(RT_DEBUG_ERROR, ("Err;FC.ToDs\n")); |
| 856 | return NDIS_STATUS_FAILURE; | 856 | return NDIS_STATUS_FAILURE; |
| @@ -860,7 +860,7 @@ int RTMPCheckRxError(struct rt_rtmp_adapter *pAd, | |||
| 860 | DBGPRINT_RAW(RT_DEBUG_ERROR, ("received packet too long\n")); | 860 | DBGPRINT_RAW(RT_DEBUG_ERROR, ("received packet too long\n")); |
| 861 | return NDIS_STATUS_FAILURE; | 861 | return NDIS_STATUS_FAILURE; |
| 862 | } | 862 | } |
| 863 | /* Drop not U2M frames, cant's drop here because we will drop beacon in this case */ | 863 | /* Drop not U2M frames, can't's drop here because we will drop beacon in this case */ |
| 864 | /* I am kind of doubting the U2M bit operation */ | 864 | /* I am kind of doubting the U2M bit operation */ |
| 865 | /* if (pRxD->U2M == 0) */ | 865 | /* if (pRxD->U2M == 0) */ |
| 866 | /* return(NDIS_STATUS_FAILURE); */ | 866 | /* return(NDIS_STATUS_FAILURE); */ |
diff --git a/drivers/staging/rt2860/common/cmm_mac_pci.c b/drivers/staging/rt2860/common/cmm_mac_pci.c index 21eed2507e1c..d06f0a6dc379 100644 --- a/drivers/staging/rt2860/common/cmm_mac_pci.c +++ b/drivers/staging/rt2860/common/cmm_mac_pci.c | |||
| @@ -1446,7 +1446,7 @@ BOOLEAN RT28xxPciAsicRadioOff(struct rt_rtmp_adapter *pAd, | |||
| 1446 | pAd->CheckDmaBusyCount = 0; | 1446 | pAd->CheckDmaBusyCount = 0; |
| 1447 | } | 1447 | } |
| 1448 | */ | 1448 | */ |
| 1449 | /*KH Debug:My original codes have the follwoing codes, but currecnt codes do not have it. */ | 1449 | /*KH Debug:My original codes have the following codes, but currecnt codes do not have it. */ |
| 1450 | /* Disable for stability. If PCIE Link Control is modified for advance power save, re-covery this code segment. */ | 1450 | /* Disable for stability. If PCIE Link Control is modified for advance power save, re-covery this code segment. */ |
| 1451 | RTMP_IO_WRITE32(pAd, PBF_SYS_CTRL, 0x1280); | 1451 | RTMP_IO_WRITE32(pAd, PBF_SYS_CTRL, 0x1280); |
| 1452 | /*OPSTATUS_SET_FLAG(pAd, fOP_STATUS_CLKSELECT_40MHZ); */ | 1452 | /*OPSTATUS_SET_FLAG(pAd, fOP_STATUS_CLKSELECT_40MHZ); */ |
diff --git a/drivers/staging/rt2860/common/cmm_sanity.c b/drivers/staging/rt2860/common/cmm_sanity.c index 6b003c903444..3bfb4ad00c1a 100644 --- a/drivers/staging/rt2860/common/cmm_sanity.c +++ b/drivers/staging/rt2860/common/cmm_sanity.c | |||
| @@ -67,7 +67,7 @@ BOOLEAN MlmeAddBAReqSanity(struct rt_rtmp_adapter *pAd, | |||
| 67 | 67 | ||
| 68 | if ((MsgLen != sizeof(struct rt_mlme_addba_req))) { | 68 | if ((MsgLen != sizeof(struct rt_mlme_addba_req))) { |
| 69 | DBGPRINT(RT_DEBUG_TRACE, | 69 | DBGPRINT(RT_DEBUG_TRACE, |
| 70 | ("MlmeAddBAReqSanity fail - message lenght not correct.\n")); | 70 | ("MlmeAddBAReqSanity fail - message length not correct.\n")); |
| 71 | return FALSE; | 71 | return FALSE; |
| 72 | } | 72 | } |
| 73 | 73 | ||
| @@ -104,7 +104,7 @@ BOOLEAN MlmeDelBAReqSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned lon | |||
| 104 | 104 | ||
| 105 | if ((MsgLen != sizeof(struct rt_mlme_delba_req))) { | 105 | if ((MsgLen != sizeof(struct rt_mlme_delba_req))) { |
| 106 | DBGPRINT(RT_DEBUG_ERROR, | 106 | DBGPRINT(RT_DEBUG_ERROR, |
| 107 | ("MlmeDelBAReqSanity fail - message lenght not correct.\n")); | 107 | ("MlmeDelBAReqSanity fail - message length not correct.\n")); |
| 108 | return FALSE; | 108 | return FALSE; |
| 109 | } | 109 | } |
| 110 | 110 | ||
diff --git a/drivers/staging/rt2860/common/cmm_sync.c b/drivers/staging/rt2860/common/cmm_sync.c index f84194da47bc..aefe1b774650 100644 --- a/drivers/staging/rt2860/common/cmm_sync.c +++ b/drivers/staging/rt2860/common/cmm_sync.c | |||
| @@ -694,7 +694,7 @@ void ScanNextChannel(struct rt_rtmp_adapter *pAd) | |||
| 694 | MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen); | 694 | MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen); |
| 695 | MlmeFreeMemory(pAd, pOutBuffer); | 695 | MlmeFreeMemory(pAd, pOutBuffer); |
| 696 | } | 696 | } |
| 697 | /* For SCAN_CISCO_PASSIVE, do nothing and silently wait for beacon or other probe reponse */ | 697 | /* For SCAN_CISCO_PASSIVE, do nothing and silently wait for beacon or other probe response */ |
| 698 | 698 | ||
| 699 | pAd->Mlme.SyncMachine.CurrState = SCAN_LISTEN; | 699 | pAd->Mlme.SyncMachine.CurrState = SCAN_LISTEN; |
| 700 | } | 700 | } |
diff --git a/drivers/staging/rt2860/common/cmm_wpa.c b/drivers/staging/rt2860/common/cmm_wpa.c index 0040f45b629b..616ebec50c61 100644 --- a/drivers/staging/rt2860/common/cmm_wpa.c +++ b/drivers/staging/rt2860/common/cmm_wpa.c | |||
| @@ -1222,7 +1222,7 @@ void PeerGroupMsg2Action(struct rt_rtmp_adapter *pAd, | |||
| 1222 | 1222 | ||
| 1223 | Note: | 1223 | Note: |
| 1224 | All these constants are defined in wpa.h | 1224 | All these constants are defined in wpa.h |
| 1225 | For supplicant, there is only EAPOL Key message avaliable | 1225 | For supplicant, there is only EAPOL Key message available |
| 1226 | 1226 | ||
| 1227 | ======================================================================== | 1227 | ======================================================================== |
| 1228 | */ | 1228 | */ |
| @@ -1267,7 +1267,7 @@ BOOLEAN WpaMsgTypeSubst(u8 EAPType, int * MsgType) | |||
| 1267 | int prefix_len - the length of the label | 1267 | int prefix_len - the length of the label |
| 1268 | u8 *data - a specific data with variable length | 1268 | u8 *data - a specific data with variable length |
| 1269 | int data_len - the length of a specific data | 1269 | int data_len - the length of a specific data |
| 1270 | int len - the output lenght | 1270 | int len - the output length |
| 1271 | 1271 | ||
| 1272 | Return Value: | 1272 | Return Value: |
| 1273 | u8 *output - the calculated result | 1273 | u8 *output - the calculated result |
diff --git a/drivers/staging/rt2860/common/mlme.c b/drivers/staging/rt2860/common/mlme.c index d9c3fd5c2166..e48eac0f3a29 100644 --- a/drivers/staging/rt2860/common/mlme.c +++ b/drivers/staging/rt2860/common/mlme.c | |||
| @@ -632,7 +632,7 @@ void MlmeHalt(struct rt_rtmp_adapter *pAd) | |||
| 632 | pChipOps->AsicHaltAction(pAd); | 632 | pChipOps->AsicHaltAction(pAd); |
| 633 | } | 633 | } |
| 634 | 634 | ||
| 635 | RTMPusecDelay(5000); /* 5 msec to gurantee Ant Diversity timer canceled */ | 635 | RTMPusecDelay(5000); /* 5 msec to guarantee Ant Diversity timer canceled */ |
| 636 | 636 | ||
| 637 | MlmeQueueDestroy(&pAd->Mlme.Queue); | 637 | MlmeQueueDestroy(&pAd->Mlme.Queue); |
| 638 | NdisFreeSpinLock(&pAd->Mlme.TaskLock); | 638 | NdisFreeSpinLock(&pAd->Mlme.TaskLock); |
| @@ -1107,14 +1107,14 @@ void MlmeSelectTxRateTable(struct rt_rtmp_adapter *pAd, | |||
| 1107 | *pInitTxRateIdx = | 1107 | *pInitTxRateIdx = |
| 1108 | RateSwitchTable11N1S[1]; | 1108 | RateSwitchTable11N1S[1]; |
| 1109 | DBGPRINT_RAW(RT_DEBUG_ERROR, | 1109 | DBGPRINT_RAW(RT_DEBUG_ERROR, |
| 1110 | ("DRS: unkown mode,default use 11N 1S AP \n")); | 1110 | ("DRS: unknown mode,default use 11N 1S AP \n")); |
| 1111 | } else { | 1111 | } else { |
| 1112 | *ppTable = RateSwitchTable11N2S; | 1112 | *ppTable = RateSwitchTable11N2S; |
| 1113 | *pTableSize = RateSwitchTable11N2S[0]; | 1113 | *pTableSize = RateSwitchTable11N2S[0]; |
| 1114 | *pInitTxRateIdx = | 1114 | *pInitTxRateIdx = |
| 1115 | RateSwitchTable11N2S[1]; | 1115 | RateSwitchTable11N2S[1]; |
| 1116 | DBGPRINT_RAW(RT_DEBUG_ERROR, | 1116 | DBGPRINT_RAW(RT_DEBUG_ERROR, |
| 1117 | ("DRS: unkown mode,default use 11N 2S AP \n")); | 1117 | ("DRS: unknown mode,default use 11N 2S AP \n")); |
| 1118 | } | 1118 | } |
| 1119 | } else { | 1119 | } else { |
| 1120 | if (pAd->CommonCfg.TxStream == 1) { | 1120 | if (pAd->CommonCfg.TxStream == 1) { |
| @@ -1123,7 +1123,7 @@ void MlmeSelectTxRateTable(struct rt_rtmp_adapter *pAd, | |||
| 1123 | *pInitTxRateIdx = | 1123 | *pInitTxRateIdx = |
| 1124 | RateSwitchTable11N1S[1]; | 1124 | RateSwitchTable11N1S[1]; |
| 1125 | DBGPRINT_RAW(RT_DEBUG_ERROR, | 1125 | DBGPRINT_RAW(RT_DEBUG_ERROR, |
| 1126 | ("DRS: unkown mode,default use 11N 1S AP \n")); | 1126 | ("DRS: unknown mode,default use 11N 1S AP \n")); |
| 1127 | } else { | 1127 | } else { |
| 1128 | *ppTable = RateSwitchTable11N2SForABand; | 1128 | *ppTable = RateSwitchTable11N2SForABand; |
| 1129 | *pTableSize = | 1129 | *pTableSize = |
| @@ -1131,11 +1131,11 @@ void MlmeSelectTxRateTable(struct rt_rtmp_adapter *pAd, | |||
| 1131 | *pInitTxRateIdx = | 1131 | *pInitTxRateIdx = |
| 1132 | RateSwitchTable11N2SForABand[1]; | 1132 | RateSwitchTable11N2SForABand[1]; |
| 1133 | DBGPRINT_RAW(RT_DEBUG_ERROR, | 1133 | DBGPRINT_RAW(RT_DEBUG_ERROR, |
| 1134 | ("DRS: unkown mode,default use 11N 2S AP \n")); | 1134 | ("DRS: unknown mode,default use 11N 2S AP \n")); |
| 1135 | } | 1135 | } |
| 1136 | } | 1136 | } |
| 1137 | DBGPRINT_RAW(RT_DEBUG_ERROR, | 1137 | DBGPRINT_RAW(RT_DEBUG_ERROR, |
| 1138 | ("DRS: unkown mode (SupRateLen=%d, ExtRateLen=%d, MCSSet[0]=0x%x, MCSSet[1]=0x%x)\n", | 1138 | ("DRS: unknown mode (SupRateLen=%d, ExtRateLen=%d, MCSSet[0]=0x%x, MCSSet[1]=0x%x)\n", |
| 1139 | pAd->StaActive.SupRateLen, | 1139 | pAd->StaActive.SupRateLen, |
| 1140 | pAd->StaActive.ExtRateLen, | 1140 | pAd->StaActive.ExtRateLen, |
| 1141 | pAd->StaActive.SupportedPhyInfo.MCSSet[0], | 1141 | pAd->StaActive.SupportedPhyInfo.MCSSet[0], |
| @@ -1368,7 +1368,7 @@ void STAMlmePeriodicExec(struct rt_rtmp_adapter *pAd) | |||
| 1368 | if ((pAd->StaCfg.LastScanTime + | 1368 | if ((pAd->StaCfg.LastScanTime + |
| 1369 | 10 * OS_HZ) < pAd->Mlme.Now32) { | 1369 | 10 * OS_HZ) < pAd->Mlme.Now32) { |
| 1370 | DBGPRINT(RT_DEBUG_TRACE, | 1370 | DBGPRINT(RT_DEBUG_TRACE, |
| 1371 | ("MMCHK - Roaming, No eligable entry, try new scan!\n")); | 1371 | ("MMCHK - Roaming, No eligible entry, try new scan!\n")); |
| 1372 | pAd->StaCfg.ScanCnt = 2; | 1372 | pAd->StaCfg.ScanCnt = 2; |
| 1373 | pAd->StaCfg.LastScanTime = | 1373 | pAd->StaCfg.LastScanTime = |
| 1374 | pAd->Mlme.Now32; | 1374 | pAd->Mlme.Now32; |
| @@ -2828,7 +2828,7 @@ void UpdateBasicRateBitmap(struct rt_rtmp_adapter *pAdapter) | |||
| 2828 | 2828 | ||
| 2829 | /* IRQL = PASSIVE_LEVEL */ | 2829 | /* IRQL = PASSIVE_LEVEL */ |
| 2830 | /* IRQL = DISPATCH_LEVEL */ | 2830 | /* IRQL = DISPATCH_LEVEL */ |
| 2831 | /* bLinkUp is to identify the inital link speed. */ | 2831 | /* bLinkUp is to identify the initial link speed. */ |
| 2832 | /* TRUE indicates the rate update at linkup, we should not try to set the rate at 54Mbps. */ | 2832 | /* TRUE indicates the rate update at linkup, we should not try to set the rate at 54Mbps. */ |
| 2833 | void MlmeUpdateTxRates(struct rt_rtmp_adapter *pAd, IN BOOLEAN bLinkUp, u8 apidx) | 2833 | void MlmeUpdateTxRates(struct rt_rtmp_adapter *pAd, IN BOOLEAN bLinkUp, u8 apidx) |
| 2834 | { | 2834 | { |
diff --git a/drivers/staging/rt2860/common/rtmp_init.c b/drivers/staging/rt2860/common/rtmp_init.c index d359a14f5d4d..5fa193eac0d3 100644 --- a/drivers/staging/rt2860/common/rtmp_init.c +++ b/drivers/staging/rt2860/common/rtmp_init.c | |||
| @@ -2037,7 +2037,7 @@ void NICUpdateFifoStaCounters(struct rt_rtmp_adapter *pAd) | |||
| 2037 | 2037 | ||
| 2038 | pEntry->FIFOCount = 0; | 2038 | pEntry->FIFOCount = 0; |
| 2039 | pEntry->OneSecTxNoRetryOkCount++; | 2039 | pEntry->OneSecTxNoRetryOkCount++; |
| 2040 | /* update NoDataIdleCount when sucessful send packet to STA. */ | 2040 | /* update NoDataIdleCount when successful send packet to STA. */ |
| 2041 | pEntry->NoDataIdleCount = 0; | 2041 | pEntry->NoDataIdleCount = 0; |
| 2042 | pEntry->ContinueTxFailCnt = 0; | 2042 | pEntry->ContinueTxFailCnt = 0; |
| 2043 | } | 2043 | } |
| @@ -2516,7 +2516,7 @@ void UserCfgInit(struct rt_rtmp_adapter *pAd) | |||
| 2516 | /*pAd->TurnAggrBulkInCount = 0; */ | 2516 | /*pAd->TurnAggrBulkInCount = 0; */ |
| 2517 | pAd->bUsbTxBulkAggre = 0; | 2517 | pAd->bUsbTxBulkAggre = 0; |
| 2518 | 2518 | ||
| 2519 | /* init as unsed value to ensure driver will set to MCU once. */ | 2519 | /* init as unused value to ensure driver will set to MCU once. */ |
| 2520 | pAd->LedIndicatorStrength = 0xFF; | 2520 | pAd->LedIndicatorStrength = 0xFF; |
| 2521 | 2521 | ||
| 2522 | pAd->CommonCfg.MaxPktOneTxBulk = 2; | 2522 | pAd->CommonCfg.MaxPktOneTxBulk = 2; |
| @@ -3076,11 +3076,11 @@ void RTMPSetLED(struct rt_rtmp_adapter *pAd, u8 Status) | |||
| 3076 | ======================================================================== | 3076 | ======================================================================== |
| 3077 | 3077 | ||
| 3078 | Routine Description: | 3078 | Routine Description: |
| 3079 | Set LED Signal Stregth | 3079 | Set LED Signal Strength |
| 3080 | 3080 | ||
| 3081 | Arguments: | 3081 | Arguments: |
| 3082 | pAd Pointer to our adapter | 3082 | pAd Pointer to our adapter |
| 3083 | Dbm Signal Stregth | 3083 | Dbm Signal Strength |
| 3084 | 3084 | ||
| 3085 | Return Value: | 3085 | Return Value: |
| 3086 | None | 3086 | None |
| @@ -3090,7 +3090,7 @@ void RTMPSetLED(struct rt_rtmp_adapter *pAd, u8 Status) | |||
| 3090 | Note: | 3090 | Note: |
| 3091 | Can be run on any IRQL level. | 3091 | Can be run on any IRQL level. |
| 3092 | 3092 | ||
| 3093 | According to Microsoft Zero Config Wireless Signal Stregth definition as belows. | 3093 | According to Microsoft Zero Config Wireless Signal Strength definition as belows. |
| 3094 | <= -90 No Signal | 3094 | <= -90 No Signal |
| 3095 | <= -81 Very Low | 3095 | <= -81 Very Low |
| 3096 | <= -71 Low | 3096 | <= -71 Low |
| @@ -3118,7 +3118,7 @@ void RTMPSetSignalLED(struct rt_rtmp_adapter *pAd, IN NDIS_802_11_RSSI Dbm) | |||
| 3118 | nLed = 31; | 3118 | nLed = 31; |
| 3119 | 3119 | ||
| 3120 | /* */ | 3120 | /* */ |
| 3121 | /* Update Signal Stregth to firmware if changed. */ | 3121 | /* Update Signal Strength to firmware if changed. */ |
| 3122 | /* */ | 3122 | /* */ |
| 3123 | if (pAd->LedIndicatorStrength != nLed) { | 3123 | if (pAd->LedIndicatorStrength != nLed) { |
| 3124 | AsicSendCommandToMcu(pAd, 0x51, 0xff, nLed, | 3124 | AsicSendCommandToMcu(pAd, 0x51, 0xff, nLed, |
| @@ -3166,7 +3166,7 @@ void RTMPEnableRxTx(struct rt_rtmp_adapter *pAd) | |||
| 3166 | if (pAd->CommonCfg.PSPXlink) | 3166 | if (pAd->CommonCfg.PSPXlink) |
| 3167 | rx_filter_flag = PSPXLINK; | 3167 | rx_filter_flag = PSPXLINK; |
| 3168 | else | 3168 | else |
| 3169 | rx_filter_flag = STANORMAL; /* Staion not drop control frame will fail WiFi Certification. */ | 3169 | rx_filter_flag = STANORMAL; /* Station not drop control frame will fail WiFi Certification. */ |
| 3170 | RTMP_IO_WRITE32(pAd, RX_FILTR_CFG, rx_filter_flag); | 3170 | RTMP_IO_WRITE32(pAd, RX_FILTR_CFG, rx_filter_flag); |
| 3171 | } | 3171 | } |
| 3172 | 3172 | ||
diff --git a/drivers/staging/rt2860/common/spectrum.c b/drivers/staging/rt2860/common/spectrum.c index c0d2f428069c..ceb622df12d7 100644 --- a/drivers/staging/rt2860/common/spectrum.c +++ b/drivers/staging/rt2860/common/spectrum.c | |||
| @@ -1058,8 +1058,8 @@ static void InsertMeasureReqIE(struct rt_rtmp_adapter *pAd, | |||
| 1058 | 3. Measure Token. | 1058 | 3. Measure Token. |
| 1059 | 4. Measure Request Mode. | 1059 | 4. Measure Request Mode. |
| 1060 | 5. Measure Request Type. | 1060 | 5. Measure Request Type. |
| 1061 | 6. Length of Report Infomation | 1061 | 6. Length of Report Information |
| 1062 | 7. Pointer of Report Infomation Buffer. | 1062 | 7. Pointer of Report Information Buffer. |
| 1063 | 1063 | ||
| 1064 | Return : None. | 1064 | Return : None. |
| 1065 | ========================================================================== | 1065 | ========================================================================== |
| @@ -1400,7 +1400,7 @@ static void StartDFSProcedure(struct rt_rtmp_adapter *pAd, | |||
| 1400 | Parametrs: | 1400 | Parametrs: |
| 1401 | 1. MLME message containing the received frame | 1401 | 1. MLME message containing the received frame |
| 1402 | 2. message length. | 1402 | 2. message length. |
| 1403 | 3. Channel switch announcement infomation buffer. | 1403 | 3. Channel switch announcement information buffer. |
| 1404 | 1404 | ||
| 1405 | Return : None. | 1405 | Return : None. |
| 1406 | ========================================================================== | 1406 | ========================================================================== |
| @@ -1465,7 +1465,7 @@ static BOOLEAN PeerChSwAnnSanity(struct rt_rtmp_adapter *pAd, | |||
| 1465 | Parametrs: | 1465 | Parametrs: |
| 1466 | 1. MLME message containing the received frame | 1466 | 1. MLME message containing the received frame |
| 1467 | 2. message length. | 1467 | 2. message length. |
| 1468 | 3. Measurement request infomation buffer. | 1468 | 3. Measurement request information buffer. |
| 1469 | 1469 | ||
| 1470 | Return : None. | 1470 | Return : None. |
| 1471 | ========================================================================== | 1471 | ========================================================================== |
| @@ -1538,8 +1538,8 @@ static BOOLEAN PeerMeasureReqSanity(struct rt_rtmp_adapter *pAd, | |||
| 1538 | Parametrs: | 1538 | Parametrs: |
| 1539 | 1. MLME message containing the received frame | 1539 | 1. MLME message containing the received frame |
| 1540 | 2. message length. | 1540 | 2. message length. |
| 1541 | 3. Measurement report infomation buffer. | 1541 | 3. Measurement report information buffer. |
| 1542 | 4. basic report infomation buffer. | 1542 | 4. basic report information buffer. |
| 1543 | 1543 | ||
| 1544 | Return : None. | 1544 | Return : None. |
| 1545 | ========================================================================== | 1545 | ========================================================================== |
diff --git a/drivers/staging/rt2860/mlme.h b/drivers/staging/rt2860/mlme.h index cd1ee3d7a91d..a285851692ee 100644 --- a/drivers/staging/rt2860/mlme.h +++ b/drivers/staging/rt2860/mlme.h | |||
| @@ -374,7 +374,7 @@ struct PACKED rt_sec_cha_offset_ie { | |||
| 374 | struct rt_ht_phy_info { | 374 | struct rt_ht_phy_info { |
| 375 | BOOLEAN bHtEnable; /* If we should use ht rate. */ | 375 | BOOLEAN bHtEnable; /* If we should use ht rate. */ |
| 376 | BOOLEAN bPreNHt; /* If we should use ht rate. */ | 376 | BOOLEAN bPreNHt; /* If we should use ht rate. */ |
| 377 | /*Substract from HT Capability IE */ | 377 | /*Subtract from HT Capability IE */ |
| 378 | u8 MCSSet[16]; | 378 | u8 MCSSet[16]; |
| 379 | }; | 379 | }; |
| 380 | 380 | ||
| @@ -392,7 +392,7 @@ struct rt_ht_capability { | |||
| 392 | u16 AmsduSize:1; /* Max receiving A-MSDU size */ | 392 | u16 AmsduSize:1; /* Max receiving A-MSDU size */ |
| 393 | u16 rsv:5; | 393 | u16 rsv:5; |
| 394 | 394 | ||
| 395 | /*Substract from Addiont HT INFO IE */ | 395 | /*Subtract from Addiont HT INFO IE */ |
| 396 | u8 MaxRAmpduFactor:2; | 396 | u8 MaxRAmpduFactor:2; |
| 397 | u8 MpduDensity:3; | 397 | u8 MpduDensity:3; |
| 398 | u8 ExtChanOffset:2; /* Please note the difference with following u8 NewExtChannelOffset; from 802.11n */ | 398 | u8 ExtChanOffset:2; /* Please note the difference with following u8 NewExtChannelOffset; from 802.11n */ |
| @@ -410,7 +410,7 @@ struct rt_ht_capability { | |||
| 410 | u8 BSSCoexist2040; | 410 | u8 BSSCoexist2040; |
| 411 | }; | 411 | }; |
| 412 | 412 | ||
| 413 | /* field in Addtional HT Information IE . */ | 413 | /* field in Additional HT Information IE . */ |
| 414 | struct PACKED rt_add_htinfo { | 414 | struct PACKED rt_add_htinfo { |
| 415 | u8 ExtChanOffset:2; | 415 | u8 ExtChanOffset:2; |
| 416 | u8 RecomWidth:1; | 416 | u8 RecomWidth:1; |
| @@ -857,7 +857,7 @@ struct rt_state_machine { | |||
| 857 | }; | 857 | }; |
| 858 | 858 | ||
| 859 | /* MLME AUX data structure that holds temporarliy settings during a connection attempt. */ | 859 | /* MLME AUX data structure that holds temporarliy settings during a connection attempt. */ |
| 860 | /* Once this attemp succeeds, all settings will be copy to pAd->StaActive. */ | 860 | /* Once this attempt succeeds, all settings will be copy to pAd->StaActive. */ |
| 861 | /* A connection attempt (user set OID, roaming, CCX fast roaming,..) consists of */ | 861 | /* A connection attempt (user set OID, roaming, CCX fast roaming,..) consists of */ |
| 862 | /* several steps (JOIN, AUTH, ASSOC or REASSOC) and may fail at any step. We purposely */ | 862 | /* several steps (JOIN, AUTH, ASSOC or REASSOC) and may fail at any step. We purposely */ |
| 863 | /* separate this under-trial settings away from pAd->StaActive so that once */ | 863 | /* separate this under-trial settings away from pAd->StaActive so that once */ |
diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c index e5b042712430..1583347fcd52 100644 --- a/drivers/staging/rt2860/rt_linux.c +++ b/drivers/staging/rt2860/rt_linux.c | |||
| @@ -283,7 +283,7 @@ BOOLEAN OS_Need_Clone_Packet(void) | |||
| 283 | Arguments: | 283 | Arguments: |
| 284 | pAd Pointer to our adapter | 284 | pAd Pointer to our adapter |
| 285 | pInsAMSDUHdr EWC A-MSDU format has extra 14-bytes header. if TRUE, insert this 14-byte hdr in front of MSDU. | 285 | pInsAMSDUHdr EWC A-MSDU format has extra 14-bytes header. if TRUE, insert this 14-byte hdr in front of MSDU. |
| 286 | *pSrcTotalLen return total packet length. This lenght is calculated with 802.3 format packet. | 286 | *pSrcTotalLen return total packet length. This length is calculated with 802.3 format packet. |
| 287 | 287 | ||
| 288 | Return Value: | 288 | Return Value: |
| 289 | NDIS_STATUS_SUCCESS | 289 | NDIS_STATUS_SUCCESS |
diff --git a/drivers/staging/rt2860/rt_pci_rbus.c b/drivers/staging/rt2860/rt_pci_rbus.c index e5fb67cd9a68..f80ab4e6a0ac 100644 --- a/drivers/staging/rt2860/rt_pci_rbus.c +++ b/drivers/staging/rt2860/rt_pci_rbus.c | |||
| @@ -619,7 +619,7 @@ IRQ_HANDLE_TYPE rt2860_interrupt(int irq, void *dev_instance) | |||
| 619 | Or kernel will panic after ifconfig ra0 down sometimes */ | 619 | Or kernel will panic after ifconfig ra0 down sometimes */ |
| 620 | 620 | ||
| 621 | /* */ | 621 | /* */ |
| 622 | /* Inital the Interrupt source. */ | 622 | /* Initial the Interrupt source. */ |
| 623 | /* */ | 623 | /* */ |
| 624 | IntSource.word = 0x00000000L; | 624 | IntSource.word = 0x00000000L; |
| 625 | /* McuIntSource.word = 0x00000000L; */ | 625 | /* McuIntSource.word = 0x00000000L; */ |
diff --git a/drivers/staging/rt2860/rtmp.h b/drivers/staging/rt2860/rtmp.h index d16b06a6e2ac..3c31340c946a 100644 --- a/drivers/staging/rt2860/rtmp.h +++ b/drivers/staging/rt2860/rtmp.h | |||
| @@ -756,7 +756,7 @@ struct rt_tkip_key_info { | |||
| 756 | /* */ | 756 | /* */ |
| 757 | struct rt_private { | 757 | struct rt_private { |
| 758 | u32 SystemResetCnt; /* System reset counter */ | 758 | u32 SystemResetCnt; /* System reset counter */ |
| 759 | u32 TxRingFullCnt; /* Tx ring full occurrance number */ | 759 | u32 TxRingFullCnt; /* Tx ring full occurrence number */ |
| 760 | u32 PhyRxErrCnt; /* PHY Rx error count, for debug purpose, might move to global counter */ | 760 | u32 PhyRxErrCnt; /* PHY Rx error count, for debug purpose, might move to global counter */ |
| 761 | /* Variables for WEP encryption / decryption in rtmp_wep.c */ | 761 | /* Variables for WEP encryption / decryption in rtmp_wep.c */ |
| 762 | u32 FCSCRC32; | 762 | u32 FCSCRC32; |
| @@ -925,7 +925,7 @@ struct rt_mlme { | |||
| 925 | **************************************************************************/ | 925 | **************************************************************************/ |
| 926 | struct reordering_mpdu { | 926 | struct reordering_mpdu { |
| 927 | struct reordering_mpdu *next; | 927 | struct reordering_mpdu *next; |
| 928 | void *pPacket; /* coverted to 802.3 frame */ | 928 | void *pPacket; /* converted to 802.3 frame */ |
| 929 | int Sequence; /* sequence number of MPDU */ | 929 | int Sequence; /* sequence number of MPDU */ |
| 930 | BOOLEAN bAMSDU; | 930 | BOOLEAN bAMSDU; |
| 931 | }; | 931 | }; |
diff --git a/drivers/staging/rt2860/sta_ioctl.c b/drivers/staging/rt2860/sta_ioctl.c index 5717e12a9544..49b1013e7a03 100644 --- a/drivers/staging/rt2860/sta_ioctl.c +++ b/drivers/staging/rt2860/sta_ioctl.c | |||
| @@ -2460,7 +2460,7 @@ int rt28xx_sta_ioctl(IN struct net_device *net_dev, | |||
| 2460 | } | 2460 | } |
| 2461 | } | 2461 | } |
| 2462 | 2462 | ||
| 2463 | { /* determine this ioctl command is comming from which interface. */ | 2463 | { /* determine this ioctl command is coming from which interface. */ |
| 2464 | pObj->ioctl_if_type = INT_MAIN; | 2464 | pObj->ioctl_if_type = INT_MAIN; |
| 2465 | pObj->ioctl_if = MAIN_MBSSID; | 2465 | pObj->ioctl_if = MAIN_MBSSID; |
| 2466 | } | 2466 | } |
diff --git a/drivers/staging/rt2870/common/rtusb_bulk.c b/drivers/staging/rt2870/common/rtusb_bulk.c index d2746f8732e6..679b802d2169 100644 --- a/drivers/staging/rt2870/common/rtusb_bulk.c +++ b/drivers/staging/rt2870/common/rtusb_bulk.c | |||
| @@ -298,7 +298,7 @@ void RTUSBBulkOutDataPacket(struct rt_rtmp_adapter *pAd, | |||
| 298 | /*|| ( (ThisBulkSize != 0) && (pTxWI->AMPDU == 0)) */ | 298 | /*|| ( (ThisBulkSize != 0) && (pTxWI->AMPDU == 0)) */ |
| 299 | ) { | 299 | ) { |
| 300 | /* For USB 1.1 or peer which didn't support AMPDU, limit the BulkOut size. */ | 300 | /* For USB 1.1 or peer which didn't support AMPDU, limit the BulkOut size. */ |
| 301 | /* For performence in b/g mode, now just check for USB 1.1 and didn't care about the APMDU or not! 2008/06/04. */ | 301 | /* For performance in b/g mode, now just check for USB 1.1 and didn't care about the APMDU or not! 2008/06/04. */ |
| 302 | pHTTXContext->ENextBulkOutPosition = | 302 | pHTTXContext->ENextBulkOutPosition = |
| 303 | TmpBulkEndPos; | 303 | TmpBulkEndPos; |
| 304 | break; | 304 | break; |
| @@ -311,7 +311,7 @@ void RTUSBBulkOutDataPacket(struct rt_rtmp_adapter *pAd, | |||
| 311 | TmpBulkEndPos; | 311 | TmpBulkEndPos; |
| 312 | break; | 312 | break; |
| 313 | } else if (((pAd->BulkOutMaxPacketSize < 512) && ((ThisBulkSize & 0xfffff800) != 0)) /*|| ( (ThisBulkSize != 0) && (pTxWI->AMPDU == 0)) */) { /* For USB 1.1 or peer which didn't support AMPDU, limit the BulkOut size. */ | 313 | } else if (((pAd->BulkOutMaxPacketSize < 512) && ((ThisBulkSize & 0xfffff800) != 0)) /*|| ( (ThisBulkSize != 0) && (pTxWI->AMPDU == 0)) */) { /* For USB 1.1 or peer which didn't support AMPDU, limit the BulkOut size. */ |
| 314 | /* For performence in b/g mode, now just check for USB 1.1 and didn't care about the APMDU or not! 2008/06/04. */ | 314 | /* For performance in b/g mode, now just check for USB 1.1 and didn't care about the APMDU or not! 2008/06/04. */ |
| 315 | pHTTXContext->ENextBulkOutPosition = | 315 | pHTTXContext->ENextBulkOutPosition = |
| 316 | TmpBulkEndPos; | 316 | TmpBulkEndPos; |
| 317 | break; | 317 | break; |
| @@ -1016,7 +1016,7 @@ void RTUSBKickBulkOut(struct rt_rtmp_adapter *pAd) | |||
| 1016 | RTUSBBulkOutNullFrame(pAd); | 1016 | RTUSBBulkOutNullFrame(pAd); |
| 1017 | } | 1017 | } |
| 1018 | } | 1018 | } |
| 1019 | /* 8. No data avaliable */ | 1019 | /* 8. No data available */ |
| 1020 | else | 1020 | else |
| 1021 | ; | 1021 | ; |
| 1022 | } | 1022 | } |
diff --git a/drivers/staging/rt2870/common/rtusb_data.c b/drivers/staging/rt2870/common/rtusb_data.c index 69368862217c..5b72bcdaa78f 100644 --- a/drivers/staging/rt2870/common/rtusb_data.c +++ b/drivers/staging/rt2870/common/rtusb_data.c | |||
| @@ -71,7 +71,7 @@ void REPORT_AMSDU_FRAMES_TO_LLC(struct rt_rtmp_adapter *pAd, | |||
| 71 | 71 | ||
| 72 | Routine Description: | 72 | Routine Description: |
| 73 | This subroutine will scan through releative ring descriptor to find | 73 | This subroutine will scan through releative ring descriptor to find |
| 74 | out avaliable free ring descriptor and compare with request size. | 74 | out available free ring descriptor and compare with request size. |
| 75 | 75 | ||
| 76 | Arguments: | 76 | Arguments: |
| 77 | pAd Pointer to our adapter | 77 | pAd Pointer to our adapter |
diff --git a/drivers/staging/rtl8187se/Kconfig b/drivers/staging/rtl8187se/Kconfig index 1b3103fbf29c..3162aabbeb07 100644 --- a/drivers/staging/rtl8187se/Kconfig +++ b/drivers/staging/rtl8187se/Kconfig | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | config R8187SE | 1 | config R8187SE |
| 2 | tristate "RealTek RTL8187SE Wireless LAN NIC driver" | 2 | tristate "RealTek RTL8187SE Wireless LAN NIC driver" |
| 3 | depends on PCI && WLAN | 3 | depends on PCI && WLAN |
| 4 | depends on m | ||
| 4 | select WIRELESS_EXT | 5 | select WIRELESS_EXT |
| 5 | select WEXT_PRIV | 6 | select WEXT_PRIV |
| 6 | select EEPROM_93CX6 | 7 | select EEPROM_93CX6 |
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h index dc608c70deb1..16aa6a8952fd 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h | |||
| @@ -1099,7 +1099,7 @@ struct ieee80211_device { | |||
| 1099 | * not set. As some cards may have different HW queues that | 1099 | * not set. As some cards may have different HW queues that |
| 1100 | * one might want to use for data and management frames | 1100 | * one might want to use for data and management frames |
| 1101 | * the option to have two callbacks might be useful. | 1101 | * the option to have two callbacks might be useful. |
| 1102 | * This fucntion can't sleep. | 1102 | * This function can't sleep. |
| 1103 | */ | 1103 | */ |
| 1104 | int (*softmac_hard_start_xmit)(struct sk_buff *skb, | 1104 | int (*softmac_hard_start_xmit)(struct sk_buff *skb, |
| 1105 | struct net_device *dev); | 1105 | struct net_device *dev); |
| @@ -1138,9 +1138,9 @@ struct ieee80211_device { | |||
| 1138 | * it is called in a work_queue when swithcing to ad-hoc mode | 1138 | * it is called in a work_queue when swithcing to ad-hoc mode |
| 1139 | * or in behalf of iwlist scan when the card is associated | 1139 | * or in behalf of iwlist scan when the card is associated |
| 1140 | * and root user ask for a scan. | 1140 | * and root user ask for a scan. |
| 1141 | * the fucntion stop_scan should stop both the syncro and | 1141 | * the function stop_scan should stop both the syncro and |
| 1142 | * background scanning and can sleep. | 1142 | * background scanning and can sleep. |
| 1143 | * The fucntion start_scan should initiate the background | 1143 | * The function start_scan should initiate the background |
| 1144 | * scanning and can't sleep. | 1144 | * scanning and can't sleep. |
| 1145 | */ | 1145 | */ |
| 1146 | void (*scan_syncro)(struct net_device *dev); | 1146 | void (*scan_syncro)(struct net_device *dev); |
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c index 771e0196842e..736a1404f287 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c | |||
| @@ -1954,7 +1954,7 @@ associate_complete: | |||
| 1954 | 1954 | ||
| 1955 | 1955 | ||
| 1956 | 1956 | ||
| 1957 | /* following are for a simplier TX queue management. | 1957 | /* following are for a simpler TX queue management. |
| 1958 | * Instead of using netif_[stop/wake]_queue the driver | 1958 | * Instead of using netif_[stop/wake]_queue the driver |
| 1959 | * will uses these two function (plus a reset one), that | 1959 | * will uses these two function (plus a reset one), that |
| 1960 | * will internally uses the kernel netif_* and takes | 1960 | * will internally uses the kernel netif_* and takes |
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index 70ab0084e5f5..2155a771c339 100644 --- a/drivers/staging/rtl8187se/r8180_core.c +++ b/drivers/staging/rtl8187se/r8180_core.c | |||
| @@ -1591,7 +1591,7 @@ void rtl8180_rx(struct net_device *dev) | |||
| 1591 | priv->RSSI = RSSI; | 1591 | priv->RSSI = RSSI; |
| 1592 | /* SQ translation formula is provided by SD3 DZ. 2006.06.27 */ | 1592 | /* SQ translation formula is provided by SD3 DZ. 2006.06.27 */ |
| 1593 | if (quality >= 127) | 1593 | if (quality >= 127) |
| 1594 | quality = 1; /*0; */ /* 0 will cause epc to show signal zero , walk aroud now; */ | 1594 | quality = 1; /*0; */ /* 0 will cause epc to show signal zero , walk around now; */ |
| 1595 | else if (quality < 27) | 1595 | else if (quality < 27) |
| 1596 | quality = 100; | 1596 | quality = 100; |
| 1597 | else | 1597 | else |
| @@ -3883,7 +3883,7 @@ void rtl8180_tx_isr(struct net_device *dev, int pri, short error) | |||
| 3883 | * If the packet previous of the nic pointer has been | 3883 | * If the packet previous of the nic pointer has been |
| 3884 | * processed this doesn't matter: it will be checked | 3884 | * processed this doesn't matter: it will be checked |
| 3885 | * here at the next round. Anyway if no more packet are | 3885 | * here at the next round. Anyway if no more packet are |
| 3886 | * TXed no memory leak occour at all. | 3886 | * TXed no memory leak occur at all. |
| 3887 | */ | 3887 | */ |
| 3888 | 3888 | ||
| 3889 | switch (pri) { | 3889 | switch (pri) { |
diff --git a/drivers/staging/rtl8187se/r8180_dm.c b/drivers/staging/rtl8187se/r8180_dm.c index fc4907839c58..261085d4b74a 100644 --- a/drivers/staging/rtl8187se/r8180_dm.c +++ b/drivers/staging/rtl8187se/r8180_dm.c | |||
| @@ -123,7 +123,7 @@ DoTxHighPower( | |||
| 123 | // | 123 | // |
| 124 | // Description: | 124 | // Description: |
| 125 | // Callback function of UpdateTxPowerWorkItem. | 125 | // Callback function of UpdateTxPowerWorkItem. |
| 126 | // Because of some event happend, e.g. CCX TPC, High Power Mechanism, | 126 | // Because of some event happened, e.g. CCX TPC, High Power Mechanism, |
| 127 | // We update Tx power of current channel again. | 127 | // We update Tx power of current channel again. |
| 128 | // | 128 | // |
| 129 | void rtl8180_tx_pw_wq (struct work_struct *work) | 129 | void rtl8180_tx_pw_wq (struct work_struct *work) |
| @@ -984,7 +984,7 @@ StaRateAdaptive87SE( | |||
| 984 | { | 984 | { |
| 985 | priv->TryupingCount = 0; | 985 | priv->TryupingCount = 0; |
| 986 | // | 986 | // |
| 987 | // When transfering from CCK to OFDM, DIG is an important issue. | 987 | // When transferring from CCK to OFDM, DIG is an important issue. |
| 988 | // | 988 | // |
| 989 | if(priv->CurrentOperaRate == 22) | 989 | if(priv->CurrentOperaRate == 22) |
| 990 | bUpdateInitialGain = true; | 990 | bUpdateInitialGain = true; |
diff --git a/drivers/staging/rtl8187se/r8180_rtl8225z2.c b/drivers/staging/rtl8187se/r8180_rtl8225z2.c index 2a2afd51cf42..3f09f76080af 100644 --- a/drivers/staging/rtl8187se/r8180_rtl8225z2.c +++ b/drivers/staging/rtl8187se/r8180_rtl8225z2.c | |||
| @@ -378,7 +378,7 @@ static u32 read_rtl8225(struct net_device *dev, u8 adr) | |||
| 378 | mask = (low2high) ? 0x01 : (((u32)0x01) << (12-1)); | 378 | mask = (low2high) ? 0x01 : (((u32)0x01) << (12-1)); |
| 379 | 379 | ||
| 380 | /* | 380 | /* |
| 381 | * We must set data pin to HW controled, otherwise RF can't driver it | 381 | * We must set data pin to HW controlled, otherwise RF can't driver it |
| 382 | * and value RF register won't be able to read back properly. | 382 | * and value RF register won't be able to read back properly. |
| 383 | */ | 383 | */ |
| 384 | write_nic_word(dev, RFPinsEnable, (oval2 & (~0x01))); | 384 | write_nic_word(dev, RFPinsEnable, (oval2 & (~0x01))); |
diff --git a/drivers/staging/rtl8187se/r8185b_init.c b/drivers/staging/rtl8187se/r8185b_init.c index 3bdf9b31cc4e..4b0b830f9ab6 100644 --- a/drivers/staging/rtl8187se/r8185b_init.c +++ b/drivers/staging/rtl8187se/r8185b_init.c | |||
| @@ -1273,7 +1273,7 @@ MgntDisconnectIBSS( | |||
| 1273 | /* | 1273 | /* |
| 1274 | Stop Beacon. | 1274 | Stop Beacon. |
| 1275 | 1275 | ||
| 1276 | Vista add a Adhoc profile, HW radio off untill OID_DOT11_RESET_REQUEST | 1276 | Vista add a Adhoc profile, HW radio off until OID_DOT11_RESET_REQUEST |
| 1277 | Driver would set MSR=NO_LINK, then HW Radio ON, MgntQueue Stuck. | 1277 | Driver would set MSR=NO_LINK, then HW Radio ON, MgntQueue Stuck. |
| 1278 | Because Bcn DMA isn't complete, mgnt queue would stuck until Bcn packet send. | 1278 | Because Bcn DMA isn't complete, mgnt queue would stuck until Bcn packet send. |
| 1279 | 1279 | ||
diff --git a/drivers/staging/rtl8192e/Kconfig b/drivers/staging/rtl8192e/Kconfig index 2e64b239e241..750c347bfbe1 100644 --- a/drivers/staging/rtl8192e/Kconfig +++ b/drivers/staging/rtl8192e/Kconfig | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | config RTL8192E | 1 | config RTL8192E |
| 2 | tristate "RealTek RTL8192E Wireless LAN NIC driver" | 2 | tristate "RealTek RTL8192E Wireless LAN NIC driver" |
| 3 | depends on PCI && WLAN | 3 | depends on PCI && WLAN |
| 4 | depends on m | ||
| 4 | select WIRELESS_EXT | 5 | select WIRELESS_EXT |
| 5 | select WEXT_PRIV | 6 | select WEXT_PRIV |
| 6 | select CRYPTO | 7 | select CRYPTO |
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211.h b/drivers/staging/rtl8192e/ieee80211/ieee80211.h index 3ca388152616..dbe21ab0dbf7 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211.h | |||
| @@ -1967,7 +1967,7 @@ struct ieee80211_device { | |||
| 1967 | u16 prev_seq_ctl; /* used to drop duplicate frames */ | 1967 | u16 prev_seq_ctl; /* used to drop duplicate frames */ |
| 1968 | 1968 | ||
| 1969 | /* map of allowed channels. 0 is dummy */ | 1969 | /* map of allowed channels. 0 is dummy */ |
| 1970 | // FIXME: remeber to default to a basic channel plan depending of the PHY type | 1970 | // FIXME: remember to default to a basic channel plan depending of the PHY type |
| 1971 | #ifdef ENABLE_DOT11D | 1971 | #ifdef ENABLE_DOT11D |
| 1972 | void* pDot11dInfo; | 1972 | void* pDot11dInfo; |
| 1973 | bool bGlobalDomain; | 1973 | bool bGlobalDomain; |
| @@ -2121,7 +2121,7 @@ struct ieee80211_device { | |||
| 2121 | * not set. As some cards may have different HW queues that | 2121 | * not set. As some cards may have different HW queues that |
| 2122 | * one might want to use for data and management frames | 2122 | * one might want to use for data and management frames |
| 2123 | * the option to have two callbacks might be useful. | 2123 | * the option to have two callbacks might be useful. |
| 2124 | * This fucntion can't sleep. | 2124 | * This function can't sleep. |
| 2125 | */ | 2125 | */ |
| 2126 | int (*softmac_hard_start_xmit)(struct sk_buff *skb, | 2126 | int (*softmac_hard_start_xmit)(struct sk_buff *skb, |
| 2127 | struct ieee80211_device *ieee80211); | 2127 | struct ieee80211_device *ieee80211); |
| @@ -2160,9 +2160,9 @@ struct ieee80211_device { | |||
| 2160 | * it is called in a work_queue when swithcing to ad-hoc mode | 2160 | * it is called in a work_queue when swithcing to ad-hoc mode |
| 2161 | * or in behalf of iwlist scan when the card is associated | 2161 | * or in behalf of iwlist scan when the card is associated |
| 2162 | * and root user ask for a scan. | 2162 | * and root user ask for a scan. |
| 2163 | * the fucntion stop_scan should stop both the syncro and | 2163 | * the function stop_scan should stop both the syncro and |
| 2164 | * background scanning and can sleep. | 2164 | * background scanning and can sleep. |
| 2165 | * The fucntion start_scan should initiate the background | 2165 | * The function start_scan should initiate the background |
| 2166 | * scanning and can't sleep. | 2166 | * scanning and can't sleep. |
| 2167 | */ | 2167 | */ |
| 2168 | void (*scan_syncro)(struct ieee80211_device *ieee80211); | 2168 | void (*scan_syncro)(struct ieee80211_device *ieee80211); |
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c index add015ebba1c..ed5a38023094 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c | |||
| @@ -1426,7 +1426,7 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
| 1426 | static u8 qos_oui[QOS_OUI_LEN] = { 0x00, 0x50, 0xF2 }; | 1426 | static u8 qos_oui[QOS_OUI_LEN] = { 0x00, 0x50, 0xF2 }; |
| 1427 | 1427 | ||
| 1428 | /* | 1428 | /* |
| 1429 | * Make ther structure we read from the beacon packet has | 1429 | * Make the structure we read from the beacon packet to have |
| 1430 | * the right values | 1430 | * the right values |
| 1431 | */ | 1431 | */ |
| 1432 | static int ieee80211_verify_qos_info(struct ieee80211_qos_information_element | 1432 | static int ieee80211_verify_qos_info(struct ieee80211_qos_information_element |
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c index f6922d40a88a..7d4cba3a7c12 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c | |||
| @@ -2023,7 +2023,7 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
| 2023 | return 1; | 2023 | return 1; |
| 2024 | } | 2024 | } |
| 2025 | else | 2025 | else |
| 2026 | { //filling the PeerHTCap. //maybe not neccesary as we can get its info from current_network. | 2026 | { //filling the PeerHTCap. //maybe not necessary as we can get its info from current_network. |
| 2027 | memcpy(ieee->pHTInfo->PeerHTCapBuf, network->bssht.bdHTCapBuf, network->bssht.bdHTCapLen); | 2027 | memcpy(ieee->pHTInfo->PeerHTCapBuf, network->bssht.bdHTCapBuf, network->bssht.bdHTCapLen); |
| 2028 | memcpy(ieee->pHTInfo->PeerHTInfoBuf, network->bssht.bdHTInfoBuf, network->bssht.bdHTInfoLen); | 2028 | memcpy(ieee->pHTInfo->PeerHTInfoBuf, network->bssht.bdHTInfoBuf, network->bssht.bdHTInfoLen); |
| 2029 | } | 2029 | } |
| @@ -2163,7 +2163,7 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
| 2163 | return 0; | 2163 | return 0; |
| 2164 | } | 2164 | } |
| 2165 | 2165 | ||
| 2166 | /* following are for a simplier TX queue management. | 2166 | /* following are for a simpler TX queue management. |
| 2167 | * Instead of using netif_[stop/wake]_queue the driver | 2167 | * Instead of using netif_[stop/wake]_queue the driver |
| 2168 | * will uses these two function (plus a reset one), that | 2168 | * will uses these two function (plus a reset one), that |
| 2169 | * will internally uses the kernel netif_* and takes | 2169 | * will internally uses the kernel netif_* and takes |
diff --git a/drivers/staging/rtl8192e/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192e/ieee80211/rtl819x_HT.h index f968817d073c..56a120cf6291 100644 --- a/drivers/staging/rtl8192e/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192e/ieee80211/rtl819x_HT.h | |||
| @@ -64,7 +64,7 @@ typedef enum _HT_CHANNEL_WIDTH{ | |||
| 64 | }HT_CHANNEL_WIDTH, *PHT_CHANNEL_WIDTH; | 64 | }HT_CHANNEL_WIDTH, *PHT_CHANNEL_WIDTH; |
| 65 | 65 | ||
| 66 | // | 66 | // |
| 67 | // Represent Extention Channel Offset in HT Capabilities | 67 | // Represent Extension Channel Offset in HT Capabilities |
| 68 | // This is available only in 40Mhz mode. | 68 | // This is available only in 40Mhz mode. |
| 69 | // | 69 | // |
| 70 | typedef enum _HT_EXTCHNL_OFFSET{ | 70 | typedef enum _HT_EXTCHNL_OFFSET{ |
diff --git a/drivers/staging/rtl8192e/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192e/ieee80211/rtl819x_HTProc.c index a2a4fe9dd9da..f7a9da3ec829 100644 --- a/drivers/staging/rtl8192e/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192e/ieee80211/rtl819x_HTProc.c | |||
| @@ -459,7 +459,7 @@ u8 HTIOTActIsForcedCTS2Self(struct ieee80211_device *ieee, struct ieee80211_netw | |||
| 459 | /** | 459 | /** |
| 460 | * Function: HTIOTActIsDisableMCS15 | 460 | * Function: HTIOTActIsDisableMCS15 |
| 461 | * | 461 | * |
| 462 | * Overview: Check whether driver should declare capability of receving MCS15 | 462 | * Overview: Check whether driver should declare capability of receiving MCS15 |
| 463 | * | 463 | * |
| 464 | * Input: | 464 | * Input: |
| 465 | * PADAPTER Adapter, | 465 | * PADAPTER Adapter, |
| @@ -496,7 +496,7 @@ bool HTIOTActIsDisableMCS15(struct ieee80211_device* ieee) | |||
| 496 | /** | 496 | /** |
| 497 | * Function: HTIOTActIsDisableMCSTwoSpatialStream | 497 | * Function: HTIOTActIsDisableMCSTwoSpatialStream |
| 498 | * | 498 | * |
| 499 | * Overview: Check whether driver should declare capability of receving All 2 ss packets | 499 | * Overview: Check whether driver should declare capability of receiving All 2 ss packets |
| 500 | * | 500 | * |
| 501 | * Input: | 501 | * Input: |
| 502 | * PADAPTER Adapter, | 502 | * PADAPTER Adapter, |
| @@ -1681,7 +1681,7 @@ void HTSetConnectBwMode(struct ieee80211_device* ieee, HT_CHANNEL_WIDTH Bandwidt | |||
| 1681 | //if in half N mode, set to 20M bandwidth please 09.08.2008 WB. | 1681 | //if in half N mode, set to 20M bandwidth please 09.08.2008 WB. |
| 1682 | if (Bandwidth==HT_CHANNEL_WIDTH_20_40 && (!ieee->GetHalfNmodeSupportByAPsHandler(ieee))) | 1682 | if (Bandwidth==HT_CHANNEL_WIDTH_20_40 && (!ieee->GetHalfNmodeSupportByAPsHandler(ieee))) |
| 1683 | { | 1683 | { |
| 1684 | // Handle Illegal extention channel offset!! | 1684 | // Handle Illegal extension channel offset!! |
| 1685 | if(ieee->current_network.channel<2 && Offset==HT_EXTCHNL_OFFSET_LOWER) | 1685 | if(ieee->current_network.channel<2 && Offset==HT_EXTCHNL_OFFSET_LOWER) |
| 1686 | Offset = HT_EXTCHNL_OFFSET_NO_EXT; | 1686 | Offset = HT_EXTCHNL_OFFSET_NO_EXT; |
| 1687 | if(Offset==HT_EXTCHNL_OFFSET_UPPER || Offset==HT_EXTCHNL_OFFSET_LOWER) { | 1687 | if(Offset==HT_EXTCHNL_OFFSET_UPPER || Offset==HT_EXTCHNL_OFFSET_LOWER) { |
| @@ -1698,7 +1698,7 @@ void HTSetConnectBwMode(struct ieee80211_device* ieee, HT_CHANNEL_WIDTH Bandwidt | |||
| 1698 | 1698 | ||
| 1699 | pHTInfo->bSwBwInProgress = true; | 1699 | pHTInfo->bSwBwInProgress = true; |
| 1700 | 1700 | ||
| 1701 | // TODO: 2007.7.13 by Emily Wait 2000ms in order to garantee that switching | 1701 | // TODO: 2007.7.13 by Emily Wait 2000ms in order to guarantee that switching |
| 1702 | // bandwidth is executed after scan is finished. It is a temporal solution | 1702 | // bandwidth is executed after scan is finished. It is a temporal solution |
| 1703 | // because software should ganrantee the last operation of switching bandwidth | 1703 | // because software should ganrantee the last operation of switching bandwidth |
| 1704 | // is executed properlly. | 1704 | // is executed properlly. |
diff --git a/drivers/staging/rtl8192e/ieee80211/rtl819x_TS.h b/drivers/staging/rtl8192e/ieee80211/rtl819x_TS.h index baaac2149de1..e7e26fd96395 100644 --- a/drivers/staging/rtl8192e/ieee80211/rtl819x_TS.h +++ b/drivers/staging/rtl8192e/ieee80211/rtl819x_TS.h | |||
| @@ -44,7 +44,7 @@ typedef struct _RX_TS_RECORD { | |||
| 44 | u16 RxTimeoutIndicateSeq; | 44 | u16 RxTimeoutIndicateSeq; |
| 45 | struct list_head RxPendingPktList; | 45 | struct list_head RxPendingPktList; |
| 46 | struct timer_list RxPktPendingTimer; | 46 | struct timer_list RxPktPendingTimer; |
| 47 | BA_RECORD RxAdmittedBARecord; // For BA Recepient | 47 | BA_RECORD RxAdmittedBARecord; // For BA Recipient |
| 48 | u16 RxLastSeqNum; | 48 | u16 RxLastSeqNum; |
| 49 | u8 RxLastFragNum; | 49 | u8 RxLastFragNum; |
| 50 | u8 num; | 50 | u8 num; |
diff --git a/drivers/staging/rtl8192e/ieee80211/rtl819x_TSProc.c b/drivers/staging/rtl8192e/ieee80211/rtl819x_TSProc.c index 29eecf0ab769..ad6872dcf1c2 100644 --- a/drivers/staging/rtl8192e/ieee80211/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192e/ieee80211/rtl819x_TSProc.c | |||
| @@ -135,7 +135,7 @@ void ResetRxTsEntry(PRX_TS_RECORD pTS) | |||
| 135 | ResetTsCommonInfo(&pTS->TsCommonInfo); | 135 | ResetTsCommonInfo(&pTS->TsCommonInfo); |
| 136 | pTS->RxIndicateSeq = 0xffff; // This indicate the RxIndicateSeq is not used now!! | 136 | pTS->RxIndicateSeq = 0xffff; // This indicate the RxIndicateSeq is not used now!! |
| 137 | pTS->RxTimeoutIndicateSeq = 0xffff; // This indicate the RxTimeoutIndicateSeq is not used now!! | 137 | pTS->RxTimeoutIndicateSeq = 0xffff; // This indicate the RxTimeoutIndicateSeq is not used now!! |
| 138 | ResetBaEntry(&pTS->RxAdmittedBARecord); // For BA Recepient | 138 | ResetBaEntry(&pTS->RxAdmittedBARecord); // For BA Recipient |
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | void TSInitialize(struct ieee80211_device *ieee) | 141 | void TSInitialize(struct ieee80211_device *ieee) |
diff --git a/drivers/staging/rtl8192e/r819xE_phy.c b/drivers/staging/rtl8192e/r819xE_phy.c index dfa4e112ef46..9e7828ef1cbe 100644 --- a/drivers/staging/rtl8192e/r819xE_phy.c +++ b/drivers/staging/rtl8192e/r819xE_phy.c | |||
| @@ -2032,13 +2032,13 @@ void rtl8192_SetBWModeWorkItem(struct r8192_priv *priv) | |||
| 2032 | { | 2032 | { |
| 2033 | case HT_CHANNEL_WIDTH_20: | 2033 | case HT_CHANNEL_WIDTH_20: |
| 2034 | regBwOpMode |= BW_OPMODE_20MHZ; | 2034 | regBwOpMode |= BW_OPMODE_20MHZ; |
| 2035 | // 2007/02/07 Mark by Emily becasue we have not verify whether this register works | 2035 | // 2007/02/07 Mark by Emily because we have not verify whether this register works |
| 2036 | write_nic_byte(priv, BW_OPMODE, regBwOpMode); | 2036 | write_nic_byte(priv, BW_OPMODE, regBwOpMode); |
| 2037 | break; | 2037 | break; |
| 2038 | 2038 | ||
| 2039 | case HT_CHANNEL_WIDTH_20_40: | 2039 | case HT_CHANNEL_WIDTH_20_40: |
| 2040 | regBwOpMode &= ~BW_OPMODE_20MHZ; | 2040 | regBwOpMode &= ~BW_OPMODE_20MHZ; |
| 2041 | // 2007/02/07 Mark by Emily becasue we have not verify whether this register works | 2041 | // 2007/02/07 Mark by Emily because we have not verify whether this register works |
| 2042 | write_nic_byte(priv, BW_OPMODE, regBwOpMode); | 2042 | write_nic_byte(priv, BW_OPMODE, regBwOpMode); |
| 2043 | break; | 2043 | break; |
| 2044 | 2044 | ||
| @@ -2116,7 +2116,7 @@ void rtl8192_SetBWModeWorkItem(struct r8192_priv *priv) | |||
| 2116 | } | 2116 | } |
| 2117 | 2117 | ||
| 2118 | /****************************************************************************** | 2118 | /****************************************************************************** |
| 2119 | *function: This function schedules bandwith switch work. | 2119 | *function: This function schedules bandwidth switch work. |
| 2120 | * input: struct net_device *dev | 2120 | * input: struct net_device *dev |
| 2121 | * HT_CHANNEL_WIDTH Bandwidth //20M or 40M | 2121 | * HT_CHANNEL_WIDTH Bandwidth //20M or 40M |
| 2122 | * HT_EXTCHNL_OFFSET Offset //Upper, Lower, or Don't care | 2122 | * HT_EXTCHNL_OFFSET Offset //Upper, Lower, or Don't care |
diff --git a/drivers/staging/rtl8192u/Kconfig b/drivers/staging/rtl8192u/Kconfig index 28969198e7e2..3f055091b35f 100644 --- a/drivers/staging/rtl8192u/Kconfig +++ b/drivers/staging/rtl8192u/Kconfig | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | config RTL8192U | 1 | config RTL8192U |
| 2 | tristate "RealTek RTL8192U Wireless LAN NIC driver" | 2 | tristate "RealTek RTL8192U Wireless LAN NIC driver" |
| 3 | depends on PCI && WLAN && USB | 3 | depends on PCI && WLAN && USB |
| 4 | depends on m | ||
| 4 | select WIRELESS_EXT | 5 | select WIRELESS_EXT |
| 5 | select WEXT_PRIV | 6 | select WEXT_PRIV |
| 6 | select CRYPTO | 7 | select CRYPTO |
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index c0b844d75c0d..e716f7b1144f 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h | |||
| @@ -1965,7 +1965,7 @@ struct ieee80211_device { | |||
| 1965 | u16 prev_seq_ctl; /* used to drop duplicate frames */ | 1965 | u16 prev_seq_ctl; /* used to drop duplicate frames */ |
| 1966 | 1966 | ||
| 1967 | /* map of allowed channels. 0 is dummy */ | 1967 | /* map of allowed channels. 0 is dummy */ |
| 1968 | // FIXME: remeber to default to a basic channel plan depending of the PHY type | 1968 | // FIXME: remember to default to a basic channel plan depending of the PHY type |
| 1969 | void* pDot11dInfo; | 1969 | void* pDot11dInfo; |
| 1970 | bool bGlobalDomain; | 1970 | bool bGlobalDomain; |
| 1971 | int rate; /* current rate */ | 1971 | int rate; /* current rate */ |
| @@ -2119,7 +2119,7 @@ struct ieee80211_device { | |||
| 2119 | * not set. As some cards may have different HW queues that | 2119 | * not set. As some cards may have different HW queues that |
| 2120 | * one might want to use for data and management frames | 2120 | * one might want to use for data and management frames |
| 2121 | * the option to have two callbacks might be useful. | 2121 | * the option to have two callbacks might be useful. |
| 2122 | * This fucntion can't sleep. | 2122 | * This function can't sleep. |
| 2123 | */ | 2123 | */ |
| 2124 | int (*softmac_hard_start_xmit)(struct sk_buff *skb, | 2124 | int (*softmac_hard_start_xmit)(struct sk_buff *skb, |
| 2125 | struct net_device *dev); | 2125 | struct net_device *dev); |
| @@ -2158,9 +2158,9 @@ struct ieee80211_device { | |||
| 2158 | * it is called in a work_queue when swithcing to ad-hoc mode | 2158 | * it is called in a work_queue when swithcing to ad-hoc mode |
| 2159 | * or in behalf of iwlist scan when the card is associated | 2159 | * or in behalf of iwlist scan when the card is associated |
| 2160 | * and root user ask for a scan. | 2160 | * and root user ask for a scan. |
| 2161 | * the fucntion stop_scan should stop both the syncro and | 2161 | * the function stop_scan should stop both the syncro and |
| 2162 | * background scanning and can sleep. | 2162 | * background scanning and can sleep. |
| 2163 | * The fucntion start_scan should initiate the background | 2163 | * The function start_scan should initiate the background |
| 2164 | * scanning and can't sleep. | 2164 | * scanning and can't sleep. |
| 2165 | */ | 2165 | */ |
| 2166 | void (*scan_syncro)(struct net_device *dev); | 2166 | void (*scan_syncro)(struct net_device *dev); |
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c index 498b520efcf4..a414303aef54 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | |||
| @@ -1399,7 +1399,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
| 1399 | static u8 qos_oui[QOS_OUI_LEN] = { 0x00, 0x50, 0xF2 }; | 1399 | static u8 qos_oui[QOS_OUI_LEN] = { 0x00, 0x50, 0xF2 }; |
| 1400 | 1400 | ||
| 1401 | /* | 1401 | /* |
| 1402 | * Make ther structure we read from the beacon packet has | 1402 | * Make the structure we read from the beacon packet to have |
| 1403 | * the right values | 1403 | * the right values |
| 1404 | */ | 1404 | */ |
| 1405 | static int ieee80211_verify_qos_info(struct ieee80211_qos_information_element | 1405 | static int ieee80211_verify_qos_info(struct ieee80211_qos_information_element |
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index 4992d630f984..4ec0a6520ddc 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | |||
| @@ -1973,7 +1973,7 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
| 1973 | return 1; | 1973 | return 1; |
| 1974 | } | 1974 | } |
| 1975 | else | 1975 | else |
| 1976 | { //filling the PeerHTCap. //maybe not neccesary as we can get its info from current_network. | 1976 | { //filling the PeerHTCap. //maybe not necessary as we can get its info from current_network. |
| 1977 | memcpy(ieee->pHTInfo->PeerHTCapBuf, network->bssht.bdHTCapBuf, network->bssht.bdHTCapLen); | 1977 | memcpy(ieee->pHTInfo->PeerHTCapBuf, network->bssht.bdHTCapBuf, network->bssht.bdHTCapLen); |
| 1978 | memcpy(ieee->pHTInfo->PeerHTInfoBuf, network->bssht.bdHTInfoBuf, network->bssht.bdHTInfoLen); | 1978 | memcpy(ieee->pHTInfo->PeerHTInfoBuf, network->bssht.bdHTInfoBuf, network->bssht.bdHTInfoLen); |
| 1979 | } | 1979 | } |
| @@ -2113,7 +2113,7 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
| 2113 | return 0; | 2113 | return 0; |
| 2114 | } | 2114 | } |
| 2115 | 2115 | ||
| 2116 | /* following are for a simplier TX queue management. | 2116 | /* following are for a simpler TX queue management. |
| 2117 | * Instead of using netif_[stop/wake]_queue the driver | 2117 | * Instead of using netif_[stop/wake]_queue the driver |
| 2118 | * will uses these two function (plus a reset one), that | 2118 | * will uses these two function (plus a reset one), that |
| 2119 | * will internally uses the kernel netif_* and takes | 2119 | * will internally uses the kernel netif_* and takes |
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index cde603f67f43..0b1a1fc09391 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h | |||
| @@ -64,7 +64,7 @@ typedef enum _HT_CHANNEL_WIDTH{ | |||
| 64 | }HT_CHANNEL_WIDTH, *PHT_CHANNEL_WIDTH; | 64 | }HT_CHANNEL_WIDTH, *PHT_CHANNEL_WIDTH; |
| 65 | 65 | ||
| 66 | // | 66 | // |
| 67 | // Represent Extention Channel Offset in HT Capabilities | 67 | // Represent Extension Channel Offset in HT Capabilities |
| 68 | // This is available only in 40Mhz mode. | 68 | // This is available only in 40Mhz mode. |
| 69 | // | 69 | // |
| 70 | typedef enum _HT_EXTCHNL_OFFSET{ | 70 | typedef enum _HT_EXTCHNL_OFFSET{ |
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index 50f4f5943e75..e88a839b2a91 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | |||
| @@ -423,7 +423,7 @@ u8 HTIOTActIsDisableMCS14(struct ieee80211_device* ieee, u8* PeerMacAddr) | |||
| 423 | /** | 423 | /** |
| 424 | * Function: HTIOTActIsDisableMCS15 | 424 | * Function: HTIOTActIsDisableMCS15 |
| 425 | * | 425 | * |
| 426 | * Overview: Check whether driver should declare capability of receving MCS15 | 426 | * Overview: Check whether driver should declare capability of receiving MCS15 |
| 427 | * | 427 | * |
| 428 | * Input: | 428 | * Input: |
| 429 | * PADAPTER Adapter, | 429 | * PADAPTER Adapter, |
| @@ -460,7 +460,7 @@ bool HTIOTActIsDisableMCS15(struct ieee80211_device* ieee) | |||
| 460 | /** | 460 | /** |
| 461 | * Function: HTIOTActIsDisableMCSTwoSpatialStream | 461 | * Function: HTIOTActIsDisableMCSTwoSpatialStream |
| 462 | * | 462 | * |
| 463 | * Overview: Check whether driver should declare capability of receving All 2 ss packets | 463 | * Overview: Check whether driver should declare capability of receiving All 2 ss packets |
| 464 | * | 464 | * |
| 465 | * Input: | 465 | * Input: |
| 466 | * PADAPTER Adapter, | 466 | * PADAPTER Adapter, |
| @@ -1409,7 +1409,7 @@ void HTSetConnectBwMode(struct ieee80211_device* ieee, HT_CHANNEL_WIDTH Bandwidt | |||
| 1409 | //if in half N mode, set to 20M bandwidth please 09.08.2008 WB. | 1409 | //if in half N mode, set to 20M bandwidth please 09.08.2008 WB. |
| 1410 | if(Bandwidth==HT_CHANNEL_WIDTH_20_40 && (!ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))) | 1410 | if(Bandwidth==HT_CHANNEL_WIDTH_20_40 && (!ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))) |
| 1411 | { | 1411 | { |
| 1412 | // Handle Illegal extention channel offset!! | 1412 | // Handle Illegal extension channel offset!! |
| 1413 | if(ieee->current_network.channel<2 && Offset==HT_EXTCHNL_OFFSET_LOWER) | 1413 | if(ieee->current_network.channel<2 && Offset==HT_EXTCHNL_OFFSET_LOWER) |
| 1414 | Offset = HT_EXTCHNL_OFFSET_NO_EXT; | 1414 | Offset = HT_EXTCHNL_OFFSET_NO_EXT; |
| 1415 | if(Offset==HT_EXTCHNL_OFFSET_UPPER || Offset==HT_EXTCHNL_OFFSET_LOWER) { | 1415 | if(Offset==HT_EXTCHNL_OFFSET_UPPER || Offset==HT_EXTCHNL_OFFSET_LOWER) { |
| @@ -1426,7 +1426,7 @@ void HTSetConnectBwMode(struct ieee80211_device* ieee, HT_CHANNEL_WIDTH Bandwidt | |||
| 1426 | 1426 | ||
| 1427 | pHTInfo->bSwBwInProgress = true; | 1427 | pHTInfo->bSwBwInProgress = true; |
| 1428 | 1428 | ||
| 1429 | // TODO: 2007.7.13 by Emily Wait 2000ms in order to garantee that switching | 1429 | // TODO: 2007.7.13 by Emily Wait 2000ms in order to guarantee that switching |
| 1430 | // bandwidth is executed after scan is finished. It is a temporal solution | 1430 | // bandwidth is executed after scan is finished. It is a temporal solution |
| 1431 | // because software should ganrantee the last operation of switching bandwidth | 1431 | // because software should ganrantee the last operation of switching bandwidth |
| 1432 | // is executed properlly. | 1432 | // is executed properlly. |
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h index baaac2149de1..e7e26fd96395 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h | |||
| @@ -44,7 +44,7 @@ typedef struct _RX_TS_RECORD { | |||
| 44 | u16 RxTimeoutIndicateSeq; | 44 | u16 RxTimeoutIndicateSeq; |
| 45 | struct list_head RxPendingPktList; | 45 | struct list_head RxPendingPktList; |
| 46 | struct timer_list RxPktPendingTimer; | 46 | struct timer_list RxPktPendingTimer; |
| 47 | BA_RECORD RxAdmittedBARecord; // For BA Recepient | 47 | BA_RECORD RxAdmittedBARecord; // For BA Recipient |
| 48 | u16 RxLastSeqNum; | 48 | u16 RxLastSeqNum; |
| 49 | u8 RxLastFragNum; | 49 | u8 RxLastFragNum; |
| 50 | u8 num; | 50 | u8 num; |
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c index c3fcaae0750d..957ce4ef48b5 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | |||
| @@ -135,7 +135,7 @@ void ResetRxTsEntry(PRX_TS_RECORD pTS) | |||
| 135 | ResetTsCommonInfo(&pTS->TsCommonInfo); | 135 | ResetTsCommonInfo(&pTS->TsCommonInfo); |
| 136 | pTS->RxIndicateSeq = 0xffff; // This indicate the RxIndicateSeq is not used now!! | 136 | pTS->RxIndicateSeq = 0xffff; // This indicate the RxIndicateSeq is not used now!! |
| 137 | pTS->RxTimeoutIndicateSeq = 0xffff; // This indicate the RxTimeoutIndicateSeq is not used now!! | 137 | pTS->RxTimeoutIndicateSeq = 0xffff; // This indicate the RxTimeoutIndicateSeq is not used now!! |
| 138 | ResetBaEntry(&pTS->RxAdmittedBARecord); // For BA Recepient | 138 | ResetBaEntry(&pTS->RxAdmittedBARecord); // For BA Recipient |
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | void TSInitialize(struct ieee80211_device *ieee) | 141 | void TSInitialize(struct ieee80211_device *ieee) |
diff --git a/drivers/staging/rtl8192u/ieee80211/scatterwalk.c b/drivers/staging/rtl8192u/ieee80211/scatterwalk.c index 49f401fbce88..3543a6145046 100644 --- a/drivers/staging/rtl8192u/ieee80211/scatterwalk.c +++ b/drivers/staging/rtl8192u/ieee80211/scatterwalk.c | |||
| @@ -71,7 +71,7 @@ static void scatterwalk_pagedone(struct scatter_walk *walk, int out, | |||
| 71 | unsigned int more) | 71 | unsigned int more) |
| 72 | { | 72 | { |
| 73 | /* walk->data may be pointing the first byte of the next page; | 73 | /* walk->data may be pointing the first byte of the next page; |
| 74 | however, we know we transfered at least one byte. So, | 74 | however, we know we transferred at least one byte. So, |
| 75 | walk->data - 1 will be a virtual address in the mapped page. */ | 75 | walk->data - 1 will be a virtual address in the mapped page. */ |
| 76 | 76 | ||
| 77 | if (out) | 77 | if (out) |
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index da612e6d994e..e81b8ab6aa9d 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c | |||
| @@ -460,7 +460,7 @@ u32 read_nic_dword(struct net_device *dev, int indx) | |||
| 460 | /* u8 read_phy_cck(struct net_device *dev, u8 adr); */ | 460 | /* u8 read_phy_cck(struct net_device *dev, u8 adr); */ |
| 461 | /* u8 read_phy_ofdm(struct net_device *dev, u8 adr); */ | 461 | /* u8 read_phy_ofdm(struct net_device *dev, u8 adr); */ |
| 462 | /* this might still called in what was the PHY rtl8185/rtl8192 common code | 462 | /* this might still called in what was the PHY rtl8185/rtl8192 common code |
| 463 | * plans are to possibilty turn it again in one common code... | 463 | * plans are to possibility turn it again in one common code... |
| 464 | */ | 464 | */ |
| 465 | inline void force_pci_posting(struct net_device *dev) | 465 | inline void force_pci_posting(struct net_device *dev) |
| 466 | { | 466 | { |
| @@ -1378,7 +1378,7 @@ struct sk_buff *DrvAggr_Aggregation(struct net_device *dev, struct ieee80211_drv | |||
| 1378 | //tx_agg_desc->LINIP = 0; | 1378 | //tx_agg_desc->LINIP = 0; |
| 1379 | //tx_agg_desc->CmdInit = 1; | 1379 | //tx_agg_desc->CmdInit = 1; |
| 1380 | tx_agg_desc->Offset = sizeof(tx_fwinfo_819x_usb) + 8; | 1380 | tx_agg_desc->Offset = sizeof(tx_fwinfo_819x_usb) + 8; |
| 1381 | /* already raw data, need not to substract header length */ | 1381 | /* already raw data, need not to subtract header length */ |
| 1382 | tx_agg_desc->PktSize = skb->len & 0xffff; | 1382 | tx_agg_desc->PktSize = skb->len & 0xffff; |
| 1383 | 1383 | ||
| 1384 | /*DWORD 1*/ | 1384 | /*DWORD 1*/ |
| @@ -2888,7 +2888,7 @@ static void rtl8192_get_eeprom_size(struct net_device* dev) | |||
| 2888 | RT_TRACE(COMP_EPROM, "<===========%s(), epromtype:%d\n", __FUNCTION__, priv->epromtype); | 2888 | RT_TRACE(COMP_EPROM, "<===========%s(), epromtype:%d\n", __FUNCTION__, priv->epromtype); |
| 2889 | } | 2889 | } |
| 2890 | 2890 | ||
| 2891 | //used to swap endian. as ntohl & htonl are not neccessary to swap endian, so use this instead. | 2891 | //used to swap endian. as ntohl & htonl are not necessary to swap endian, so use this instead. |
| 2892 | static inline u16 endian_swap(u16* data) | 2892 | static inline u16 endian_swap(u16* data) |
| 2893 | { | 2893 | { |
| 2894 | u16 tmp = *data; | 2894 | u16 tmp = *data; |
diff --git a/drivers/staging/rtl8192u/r819xU_HTType.h b/drivers/staging/rtl8192u/r819xU_HTType.h index 01f58b902028..2ac421626e7c 100644 --- a/drivers/staging/rtl8192u/r819xU_HTType.h +++ b/drivers/staging/rtl8192u/r819xU_HTType.h | |||
| @@ -65,7 +65,7 @@ typedef enum _HT_CHANNEL_WIDTH{ | |||
| 65 | }HT_CHANNEL_WIDTH, *PHT_CHANNEL_WIDTH; | 65 | }HT_CHANNEL_WIDTH, *PHT_CHANNEL_WIDTH; |
| 66 | 66 | ||
| 67 | // | 67 | // |
| 68 | // Represent Extention Channel Offset in HT Capabilities | 68 | // Represent Extension Channel Offset in HT Capabilities |
| 69 | // This is available only in 40Mhz mode. | 69 | // This is available only in 40Mhz mode. |
| 70 | // | 70 | // |
| 71 | typedef enum _HT_EXTCHNL_OFFSET{ | 71 | typedef enum _HT_EXTCHNL_OFFSET{ |
diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c index 41684e8fcf4c..c4586b0817d1 100644 --- a/drivers/staging/rtl8192u/r819xU_phy.c +++ b/drivers/staging/rtl8192u/r819xU_phy.c | |||
| @@ -1531,13 +1531,13 @@ void rtl8192_SetBWModeWorkItem(struct net_device *dev) | |||
| 1531 | { | 1531 | { |
| 1532 | case HT_CHANNEL_WIDTH_20: | 1532 | case HT_CHANNEL_WIDTH_20: |
| 1533 | regBwOpMode |= BW_OPMODE_20MHZ; | 1533 | regBwOpMode |= BW_OPMODE_20MHZ; |
| 1534 | // 2007/02/07 Mark by Emily becasue we have not verify whether this register works | 1534 | // 2007/02/07 Mark by Emily because we have not verify whether this register works |
| 1535 | write_nic_byte(dev, BW_OPMODE, regBwOpMode); | 1535 | write_nic_byte(dev, BW_OPMODE, regBwOpMode); |
| 1536 | break; | 1536 | break; |
| 1537 | 1537 | ||
| 1538 | case HT_CHANNEL_WIDTH_20_40: | 1538 | case HT_CHANNEL_WIDTH_20_40: |
| 1539 | regBwOpMode &= ~BW_OPMODE_20MHZ; | 1539 | regBwOpMode &= ~BW_OPMODE_20MHZ; |
| 1540 | // 2007/02/07 Mark by Emily becasue we have not verify whether this register works | 1540 | // 2007/02/07 Mark by Emily because we have not verify whether this register works |
| 1541 | write_nic_byte(dev, BW_OPMODE, regBwOpMode); | 1541 | write_nic_byte(dev, BW_OPMODE, regBwOpMode); |
| 1542 | break; | 1542 | break; |
| 1543 | 1543 | ||
| @@ -1647,7 +1647,7 @@ void rtl8192_SetBWModeWorkItem(struct net_device *dev) | |||
| 1647 | } | 1647 | } |
| 1648 | 1648 | ||
| 1649 | /****************************************************************************** | 1649 | /****************************************************************************** |
| 1650 | *function: This function schedules bandwith switch work. | 1650 | *function: This function schedules bandwidth switch work. |
| 1651 | * input: struct net_device *dev | 1651 | * input: struct net_device *dev |
| 1652 | * HT_CHANNEL_WIDTH Bandwidth //20M or 40M | 1652 | * HT_CHANNEL_WIDTH Bandwidth //20M or 40M |
| 1653 | * HT_EXTCHNL_OFFSET Offset //Upper, Lower, or Don't care | 1653 | * HT_EXTCHNL_OFFSET Offset //Upper, Lower, or Don't care |
diff --git a/drivers/staging/rtl8712/rtl871x_cmd.h b/drivers/staging/rtl8712/rtl871x_cmd.h index 3a945b5f0e01..2dc78476b7d3 100644 --- a/drivers/staging/rtl8712/rtl871x_cmd.h +++ b/drivers/staging/rtl8712/rtl871x_cmd.h | |||
| @@ -656,7 +656,7 @@ struct PT_param { | |||
| 656 | /* | 656 | /* |
| 657 | * Result: | 657 | * Result: |
| 658 | * 0x00: success | 658 | * 0x00: success |
| 659 | * 0x01: sucess, and check Response. | 659 | * 0x01: success, and check Response. |
| 660 | * 0x02: cmd ignored due to duplicated sequcne number | 660 | * 0x02: cmd ignored due to duplicated sequcne number |
| 661 | * 0x03: cmd dropped due to invalid cmd code | 661 | * 0x03: cmd dropped due to invalid cmd code |
| 662 | * 0x04: reserved. | 662 | * 0x04: reserved. |
diff --git a/drivers/staging/rtl8712/rtl871x_led.h b/drivers/staging/rtl8712/rtl871x_led.h index 994ef82141ab..8085e5eb82b1 100644 --- a/drivers/staging/rtl8712/rtl871x_led.h +++ b/drivers/staging/rtl8712/rtl871x_led.h | |||
| @@ -78,14 +78,14 @@ struct LED_871x { | |||
| 78 | }; | 78 | }; |
| 79 | 79 | ||
| 80 | struct led_priv { | 80 | struct led_priv { |
| 81 | /* add for led controll */ | 81 | /* add for led control */ |
| 82 | struct LED_871x SwLed0; | 82 | struct LED_871x SwLed0; |
| 83 | struct LED_871x SwLed1; | 83 | struct LED_871x SwLed1; |
| 84 | enum LED_STRATEGY_871x LedStrategy; | 84 | enum LED_STRATEGY_871x LedStrategy; |
| 85 | u8 bRegUseLed; | 85 | u8 bRegUseLed; |
| 86 | void (*LedControlHandler)(struct _adapter *padapter, | 86 | void (*LedControlHandler)(struct _adapter *padapter, |
| 87 | enum LED_CTL_MODE LedAction); | 87 | enum LED_CTL_MODE LedAction); |
| 88 | /* add for led controll */ | 88 | /* add for led control */ |
| 89 | }; | 89 | }; |
| 90 | 90 | ||
| 91 | /*=========================================================================== | 91 | /*=========================================================================== |
diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c index 98ba7602e250..866554d48d86 100644 --- a/drivers/staging/rtl8712/rtl871x_mlme.c +++ b/drivers/staging/rtl8712/rtl871x_mlme.c | |||
| @@ -1663,7 +1663,7 @@ void r8712_update_registrypriv_dev_network(struct _adapter *adapter) | |||
| 1663 | (struct ndis_wlan_bssid_ex *)pdev_network); | 1663 | (struct ndis_wlan_bssid_ex *)pdev_network); |
| 1664 | } | 1664 | } |
| 1665 | 1665 | ||
| 1666 | /*the fucntion is at passive_level*/ | 1666 | /*the function is at passive_level*/ |
| 1667 | void r8712_joinbss_reset(struct _adapter *padapter) | 1667 | void r8712_joinbss_reset(struct _adapter *padapter) |
| 1668 | { | 1668 | { |
| 1669 | int i; | 1669 | int i; |
| @@ -1726,7 +1726,7 @@ unsigned int r8712_restructure_ht_ie(struct _adapter *padapter, u8 *in_ie, | |||
| 1726 | return phtpriv->ht_option; | 1726 | return phtpriv->ht_option; |
| 1727 | } | 1727 | } |
| 1728 | 1728 | ||
| 1729 | /* the fucntion is > passive_level (in critical_section) */ | 1729 | /* the function is > passive_level (in critical_section) */ |
| 1730 | static void update_ht_cap(struct _adapter *padapter, u8 *pie, uint ie_len) | 1730 | static void update_ht_cap(struct _adapter *padapter, u8 *pie, uint ie_len) |
| 1731 | { | 1731 | { |
| 1732 | u8 *p, max_ampdu_sz; | 1732 | u8 *p, max_ampdu_sz; |
| @@ -1803,7 +1803,7 @@ void r8712_issue_addbareq_cmd(struct _adapter *padapter, int priority) | |||
| 1803 | } | 1803 | } |
| 1804 | } | 1804 | } |
| 1805 | 1805 | ||
| 1806 | /*the fucntion is >= passive_level*/ | 1806 | /*the function is >= passive_level*/ |
| 1807 | unsigned int r8712_add_ht_addt_info(struct _adapter *padapter, | 1807 | unsigned int r8712_add_ht_addt_info(struct _adapter *padapter, |
| 1808 | u8 *in_ie, u8 *out_ie, | 1808 | u8 *in_ie, u8 *out_ie, |
| 1809 | uint in_len, uint *pout_len) | 1809 | uint in_len, uint *pout_len) |
diff --git a/drivers/staging/rtl8712/rtl871x_mlme.h b/drivers/staging/rtl8712/rtl871x_mlme.h index 2b35b740ab89..2794804d0822 100644 --- a/drivers/staging/rtl8712/rtl871x_mlme.h +++ b/drivers/staging/rtl8712/rtl871x_mlme.h | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | * single-tone*/ | 29 | * single-tone*/ |
| 30 | #define WIFI_MP_CTX_BACKGROUND_PENDING 0x00080000 /* pending in cont, tx | 30 | #define WIFI_MP_CTX_BACKGROUND_PENDING 0x00080000 /* pending in cont, tx |
| 31 | * background due to out of skb*/ | 31 | * background due to out of skb*/ |
| 32 | #define WIFI_MP_CTX_CCK_HW 0x00100000 /* in continous tx*/ | 32 | #define WIFI_MP_CTX_CCK_HW 0x00100000 /* in continuous tx*/ |
| 33 | #define WIFI_MP_CTX_CCK_CS 0x00200000 /* in cont, tx with carrier | 33 | #define WIFI_MP_CTX_CCK_CS 0x00200000 /* in cont, tx with carrier |
| 34 | * suppression*/ | 34 | * suppression*/ |
| 35 | #define WIFI_MP_LPBK_STATE 0x00400000 | 35 | #define WIFI_MP_LPBK_STATE 0x00400000 |
diff --git a/drivers/staging/rtl8712/rtl871x_mp_phy_regdef.h b/drivers/staging/rtl8712/rtl871x_mp_phy_regdef.h index e386fb0aac3e..23532a793859 100644 --- a/drivers/staging/rtl8712/rtl871x_mp_phy_regdef.h +++ b/drivers/staging/rtl8712/rtl871x_mp_phy_regdef.h | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | * 2. 0x800/0x900/0xA00/0xC00/0xD00/0xE00 | 38 | * 2. 0x800/0x900/0xA00/0xC00/0xD00/0xE00 |
| 39 | * 3. RF register 0x00-2E | 39 | * 3. RF register 0x00-2E |
| 40 | * 4. Bit Mask for BB/RF register | 40 | * 4. Bit Mask for BB/RF register |
| 41 | * 5. Other defintion for BB/RF R/W | 41 | * 5. Other definition for BB/RF R/W |
| 42 | * | 42 | * |
| 43 | * 1. PMAC duplicate register due to connection: RF_Mode, TRxRN, NumOf L-STF | 43 | * 1. PMAC duplicate register due to connection: RF_Mode, TRxRN, NumOf L-STF |
| 44 | * 1. Page1(0x100) | 44 | * 1. Page1(0x100) |
diff --git a/drivers/staging/rtl8712/usb_halinit.c b/drivers/staging/rtl8712/usb_halinit.c index 0e9483bbabe1..46287c17a417 100644 --- a/drivers/staging/rtl8712/usb_halinit.c +++ b/drivers/staging/rtl8712/usb_halinit.c | |||
| @@ -112,7 +112,7 @@ u8 r8712_usb_hal_bus_init(struct _adapter *padapter) | |||
| 112 | /* Initialization for power on sequence, */ | 112 | /* Initialization for power on sequence, */ |
| 113 | r8712_write8(padapter, SPS0_CTRL + 1, 0x53); | 113 | r8712_write8(padapter, SPS0_CTRL + 1, 0x53); |
| 114 | r8712_write8(padapter, SPS0_CTRL, 0x57); | 114 | r8712_write8(padapter, SPS0_CTRL, 0x57); |
| 115 | /* Enable AFE Macro Block's Bandgap adn Enable AFE Macro | 115 | /* Enable AFE Macro Block's Bandgap and Enable AFE Macro |
| 116 | * Block's Mbias | 116 | * Block's Mbias |
| 117 | */ | 117 | */ |
| 118 | val8 = r8712_read8(padapter, AFE_MISC); | 118 | val8 = r8712_read8(padapter, AFE_MISC); |
diff --git a/drivers/staging/rts_pstor/rtsx.c b/drivers/staging/rts_pstor/rtsx.c index 4514419a5fb8..02525d57ba83 100644 --- a/drivers/staging/rts_pstor/rtsx.c +++ b/drivers/staging/rts_pstor/rtsx.c | |||
| @@ -824,13 +824,13 @@ static void rtsx_init_options(struct rtsx_chip *chip) | |||
| 824 | chip->fpga_ms_hg_clk = CLK_80; | 824 | chip->fpga_ms_hg_clk = CLK_80; |
| 825 | chip->fpga_ms_4bit_clk = CLK_80; | 825 | chip->fpga_ms_4bit_clk = CLK_80; |
| 826 | chip->fpga_ms_1bit_clk = CLK_40; | 826 | chip->fpga_ms_1bit_clk = CLK_40; |
| 827 | chip->asic_sd_sdr104_clk = 207; | 827 | chip->asic_sd_sdr104_clk = 203; |
| 828 | chip->asic_sd_sdr50_clk = 99; | 828 | chip->asic_sd_sdr50_clk = 98; |
| 829 | chip->asic_sd_ddr50_clk = 99; | 829 | chip->asic_sd_ddr50_clk = 98; |
| 830 | chip->asic_sd_hs_clk = 99; | 830 | chip->asic_sd_hs_clk = 98; |
| 831 | chip->asic_mmc_52m_clk = 99; | 831 | chip->asic_mmc_52m_clk = 98; |
| 832 | chip->asic_ms_hg_clk = 119; | 832 | chip->asic_ms_hg_clk = 117; |
| 833 | chip->asic_ms_4bit_clk = 79; | 833 | chip->asic_ms_4bit_clk = 78; |
| 834 | chip->asic_ms_1bit_clk = 39; | 834 | chip->asic_ms_1bit_clk = 39; |
| 835 | chip->ssc_depth_sd_sdr104 = SSC_DEPTH_2M; | 835 | chip->ssc_depth_sd_sdr104 = SSC_DEPTH_2M; |
| 836 | chip->ssc_depth_sd_sdr50 = SSC_DEPTH_2M; | 836 | chip->ssc_depth_sd_sdr50 = SSC_DEPTH_2M; |
diff --git a/drivers/staging/rts_pstor/rtsx_chip.c b/drivers/staging/rts_pstor/rtsx_chip.c index f443d97a56f8..d2f1c715a684 100644 --- a/drivers/staging/rts_pstor/rtsx_chip.c +++ b/drivers/staging/rts_pstor/rtsx_chip.c | |||
| @@ -684,6 +684,11 @@ static int rts5209_init(struct rtsx_chip *chip) | |||
| 684 | RTSX_DEBUGP("dw in 0x724: 0x%x\n", lval); | 684 | RTSX_DEBUGP("dw in 0x724: 0x%x\n", lval); |
| 685 | val = (u8)lval; | 685 | val = (u8)lval; |
| 686 | if (!(val & 0x80)) { | 686 | if (!(val & 0x80)) { |
| 687 | if (val & 0x08) | ||
| 688 | chip->lun_mode = DEFAULT_SINGLE; | ||
| 689 | else | ||
| 690 | chip->lun_mode = SD_MS_2LUN; | ||
| 691 | |||
| 687 | if (val & 0x04) { | 692 | if (val & 0x04) { |
| 688 | SET_SDIO_EXIST(chip); | 693 | SET_SDIO_EXIST(chip); |
| 689 | } else { | 694 | } else { |
| @@ -705,12 +710,6 @@ static int rts5209_init(struct rtsx_chip *chip) | |||
| 705 | 710 | ||
| 706 | chip->aspm_l0s_l1_en = (val >> 5) & 0x03; | 711 | chip->aspm_l0s_l1_en = (val >> 5) & 0x03; |
| 707 | 712 | ||
| 708 | if (val & 0x08) { | ||
| 709 | chip->lun_mode = DEFAULT_SINGLE; | ||
| 710 | } else { | ||
| 711 | chip->lun_mode = SD_MS_2LUN; | ||
| 712 | } | ||
| 713 | |||
| 714 | val = (u8)(lval >> 8); | 713 | val = (u8)(lval >> 8); |
| 715 | 714 | ||
| 716 | clk = (val >> 5) & 0x07; | 715 | clk = (val >> 5) & 0x07; |
diff --git a/drivers/staging/rts_pstor/rtsx_chip.h b/drivers/staging/rts_pstor/rtsx_chip.h index 713c5eaadacd..9f7cd82a1541 100644 --- a/drivers/staging/rts_pstor/rtsx_chip.h +++ b/drivers/staging/rts_pstor/rtsx_chip.h | |||
| @@ -180,8 +180,8 @@ | |||
| 180 | #define CUR_ERR 0x70 /* current error */ | 180 | #define CUR_ERR 0x70 /* current error */ |
| 181 | #define DEF_ERR 0x71 /* specific command error */ | 181 | #define DEF_ERR 0x71 /* specific command error */ |
| 182 | 182 | ||
| 183 | /*---- sense key Infomation ----*/ | 183 | /*---- sense key Information ----*/ |
| 184 | #define SNSKEYINFO_LEN 3 /* length of sense key infomation */ | 184 | #define SNSKEYINFO_LEN 3 /* length of sense key information */ |
| 185 | 185 | ||
| 186 | #define SKSV 0x80 | 186 | #define SKSV 0x80 |
| 187 | #define CDB_ILLEGAL 0x40 | 187 | #define CDB_ILLEGAL 0x40 |
| @@ -235,13 +235,13 @@ struct sense_data_t { | |||
| 235 | unsigned char seg_no; /* segment No. */ | 235 | unsigned char seg_no; /* segment No. */ |
| 236 | unsigned char sense_key; /* byte5 : ILI */ | 236 | unsigned char sense_key; /* byte5 : ILI */ |
| 237 | /* bit3-0 : sense key */ | 237 | /* bit3-0 : sense key */ |
| 238 | unsigned char info[4]; /* infomation */ | 238 | unsigned char info[4]; /* information */ |
| 239 | unsigned char ad_sense_len; /* additional sense data length */ | 239 | unsigned char ad_sense_len; /* additional sense data length */ |
| 240 | unsigned char cmd_info[4]; /* command specific infomation */ | 240 | unsigned char cmd_info[4]; /* command specific information */ |
| 241 | unsigned char asc; /* ASC */ | 241 | unsigned char asc; /* ASC */ |
| 242 | unsigned char ascq; /* ASCQ */ | 242 | unsigned char ascq; /* ASCQ */ |
| 243 | unsigned char rfu; /* FRU */ | 243 | unsigned char rfu; /* FRU */ |
| 244 | unsigned char sns_key_info[3]; /* sense key specific infomation */ | 244 | unsigned char sns_key_info[3]; /* sense key specific information */ |
| 245 | }; | 245 | }; |
| 246 | 246 | ||
| 247 | /* PCI Operation Register Address */ | 247 | /* PCI Operation Register Address */ |
diff --git a/drivers/staging/rts_pstor/rtsx_scsi.h b/drivers/staging/rts_pstor/rtsx_scsi.h index fac122c1eabd..64b84992fdb3 100644 --- a/drivers/staging/rts_pstor/rtsx_scsi.h +++ b/drivers/staging/rts_pstor/rtsx_scsi.h | |||
| @@ -85,7 +85,7 @@ | |||
| 85 | #define CHIP_NORMALMODE 0x00 | 85 | #define CHIP_NORMALMODE 0x00 |
| 86 | #define CHIP_DEBUGMODE 0x01 | 86 | #define CHIP_DEBUGMODE 0x01 |
| 87 | 87 | ||
| 88 | /* SD Pass Through Command Extention */ | 88 | /* SD Pass Through Command Extension */ |
| 89 | #define SD_PASS_THRU_MODE 0xD0 | 89 | #define SD_PASS_THRU_MODE 0xD0 |
| 90 | #define SD_EXECUTE_NO_DATA 0xD1 | 90 | #define SD_EXECUTE_NO_DATA 0xD1 |
| 91 | #define SD_EXECUTE_READ 0xD2 | 91 | #define SD_EXECUTE_READ 0xD2 |
diff --git a/drivers/staging/rts_pstor/sd.c b/drivers/staging/rts_pstor/sd.c index 21bfa5755bec..8d066bd428c4 100644 --- a/drivers/staging/rts_pstor/sd.c +++ b/drivers/staging/rts_pstor/sd.c | |||
| @@ -1719,7 +1719,7 @@ static u8 sd_search_final_phase(struct rtsx_chip *chip, u32 phase_map, u8 tune_d | |||
| 1719 | } | 1719 | } |
| 1720 | 1720 | ||
| 1721 | Search_Finish: | 1721 | Search_Finish: |
| 1722 | RTSX_DEBUGP("Final choosen phase: %d\n", final_phase); | 1722 | RTSX_DEBUGP("Final chosen phase: %d\n", final_phase); |
| 1723 | return final_phase; | 1723 | return final_phase; |
| 1724 | } | 1724 | } |
| 1725 | 1725 | ||
diff --git a/drivers/staging/samsung-laptop/Kconfig b/drivers/staging/samsung-laptop/Kconfig deleted file mode 100644 index f27c60864c26..000000000000 --- a/drivers/staging/samsung-laptop/Kconfig +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | config SAMSUNG_LAPTOP | ||
| 2 | tristate "Samsung Laptop driver" | ||
| 3 | default n | ||
| 4 | depends on RFKILL && BACKLIGHT_CLASS_DEVICE && X86 | ||
| 5 | help | ||
| 6 | This module implements a driver for the N128 Samsung Laptop | ||
| 7 | providing control over the Wireless LED and the LCD backlight | ||
| 8 | |||
| 9 | To compile this driver as a module, choose | ||
| 10 | M here: the module will be called samsung-laptop. | ||
diff --git a/drivers/staging/samsung-laptop/Makefile b/drivers/staging/samsung-laptop/Makefile deleted file mode 100644 index 3c6f42045211..000000000000 --- a/drivers/staging/samsung-laptop/Makefile +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | obj-$(CONFIG_SAMSUNG_LAPTOP) += samsung-laptop.o | ||
diff --git a/drivers/staging/samsung-laptop/TODO b/drivers/staging/samsung-laptop/TODO deleted file mode 100644 index f7a6d589916e..000000000000 --- a/drivers/staging/samsung-laptop/TODO +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | TODO: | ||
| 2 | - review from other developers | ||
| 3 | - figure out ACPI video issues | ||
| 4 | |||
| 5 | Please send patches to Greg Kroah-Hartman <gregkh@suse.de> | ||
diff --git a/drivers/staging/samsung-laptop/samsung-laptop.c b/drivers/staging/samsung-laptop/samsung-laptop.c deleted file mode 100644 index 25294462b8b6..000000000000 --- a/drivers/staging/samsung-laptop/samsung-laptop.c +++ /dev/null | |||
| @@ -1,843 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Samsung Laptop driver | ||
| 3 | * | ||
| 4 | * Copyright (C) 2009,2011 Greg Kroah-Hartman (gregkh@suse.de) | ||
| 5 | * Copyright (C) 2009,2011 Novell Inc. | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it | ||
| 8 | * under the terms of the GNU General Public License version 2 as published by | ||
| 9 | * the Free Software Foundation. | ||
| 10 | * | ||
| 11 | */ | ||
| 12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 13 | |||
| 14 | #include <linux/kernel.h> | ||
| 15 | #include <linux/init.h> | ||
| 16 | #include <linux/module.h> | ||
| 17 | #include <linux/delay.h> | ||
| 18 | #include <linux/pci.h> | ||
| 19 | #include <linux/backlight.h> | ||
| 20 | #include <linux/fb.h> | ||
| 21 | #include <linux/dmi.h> | ||
| 22 | #include <linux/platform_device.h> | ||
| 23 | #include <linux/rfkill.h> | ||
| 24 | |||
| 25 | /* | ||
| 26 | * This driver is needed because a number of Samsung laptops do not hook | ||
| 27 | * their control settings through ACPI. So we have to poke around in the | ||
| 28 | * BIOS to do things like brightness values, and "special" key controls. | ||
| 29 | */ | ||
| 30 | |||
| 31 | /* | ||
| 32 | * We have 0 - 8 as valid brightness levels. The specs say that level 0 should | ||
| 33 | * be reserved by the BIOS (which really doesn't make much sense), we tell | ||
| 34 | * userspace that the value is 0 - 7 and then just tell the hardware 1 - 8 | ||
| 35 | */ | ||
| 36 | #define MAX_BRIGHT 0x07 | ||
| 37 | |||
| 38 | |||
| 39 | #define SABI_IFACE_MAIN 0x00 | ||
| 40 | #define SABI_IFACE_SUB 0x02 | ||
| 41 | #define SABI_IFACE_COMPLETE 0x04 | ||
| 42 | #define SABI_IFACE_DATA 0x05 | ||
| 43 | |||
| 44 | /* Structure to get data back to the calling function */ | ||
| 45 | struct sabi_retval { | ||
| 46 | u8 retval[20]; | ||
| 47 | }; | ||
| 48 | |||
| 49 | struct sabi_header_offsets { | ||
| 50 | u8 port; | ||
| 51 | u8 re_mem; | ||
| 52 | u8 iface_func; | ||
| 53 | u8 en_mem; | ||
| 54 | u8 data_offset; | ||
| 55 | u8 data_segment; | ||
| 56 | }; | ||
| 57 | |||
| 58 | struct sabi_commands { | ||
| 59 | /* | ||
| 60 | * Brightness is 0 - 8, as described above. | ||
| 61 | * Value 0 is for the BIOS to use | ||
| 62 | */ | ||
| 63 | u8 get_brightness; | ||
| 64 | u8 set_brightness; | ||
| 65 | |||
| 66 | /* | ||
| 67 | * first byte: | ||
| 68 | * 0x00 - wireless is off | ||
| 69 | * 0x01 - wireless is on | ||
| 70 | * second byte: | ||
| 71 | * 0x02 - 3G is off | ||
| 72 | * 0x03 - 3G is on | ||
| 73 | * TODO, verify 3G is correct, that doesn't seem right... | ||
| 74 | */ | ||
| 75 | u8 get_wireless_button; | ||
| 76 | u8 set_wireless_button; | ||
| 77 | |||
| 78 | /* 0 is off, 1 is on */ | ||
| 79 | u8 get_backlight; | ||
| 80 | u8 set_backlight; | ||
| 81 | |||
| 82 | /* | ||
| 83 | * 0x80 or 0x00 - no action | ||
| 84 | * 0x81 - recovery key pressed | ||
| 85 | */ | ||
| 86 | u8 get_recovery_mode; | ||
| 87 | u8 set_recovery_mode; | ||
| 88 | |||
| 89 | /* | ||
| 90 | * on seclinux: 0 is low, 1 is high, | ||
| 91 | * on swsmi: 0 is normal, 1 is silent, 2 is turbo | ||
| 92 | */ | ||
| 93 | u8 get_performance_level; | ||
| 94 | u8 set_performance_level; | ||
| 95 | |||
| 96 | /* | ||
| 97 | * Tell the BIOS that Linux is running on this machine. | ||
| 98 | * 81 is on, 80 is off | ||
| 99 | */ | ||
| 100 | u8 set_linux; | ||
| 101 | }; | ||
| 102 | |||
| 103 | struct sabi_performance_level { | ||
| 104 | const char *name; | ||
| 105 | u8 value; | ||
| 106 | }; | ||
| 107 | |||
| 108 | struct sabi_config { | ||
| 109 | const char *test_string; | ||
| 110 | u16 main_function; | ||
| 111 | const struct sabi_header_offsets header_offsets; | ||
| 112 | const struct sabi_commands commands; | ||
| 113 | const struct sabi_performance_level performance_levels[4]; | ||
| 114 | u8 min_brightness; | ||
| 115 | u8 max_brightness; | ||
| 116 | }; | ||
| 117 | |||
| 118 | static const struct sabi_config sabi_configs[] = { | ||
| 119 | { | ||
| 120 | .test_string = "SECLINUX", | ||
| 121 | |||
| 122 | .main_function = 0x4c49, | ||
| 123 | |||
| 124 | .header_offsets = { | ||
| 125 | .port = 0x00, | ||
| 126 | .re_mem = 0x02, | ||
| 127 | .iface_func = 0x03, | ||
| 128 | .en_mem = 0x04, | ||
| 129 | .data_offset = 0x05, | ||
| 130 | .data_segment = 0x07, | ||
| 131 | }, | ||
| 132 | |||
| 133 | .commands = { | ||
| 134 | .get_brightness = 0x00, | ||
| 135 | .set_brightness = 0x01, | ||
| 136 | |||
| 137 | .get_wireless_button = 0x02, | ||
| 138 | .set_wireless_button = 0x03, | ||
| 139 | |||
| 140 | .get_backlight = 0x04, | ||
| 141 | .set_backlight = 0x05, | ||
| 142 | |||
| 143 | .get_recovery_mode = 0x06, | ||
| 144 | .set_recovery_mode = 0x07, | ||
| 145 | |||
| 146 | .get_performance_level = 0x08, | ||
| 147 | .set_performance_level = 0x09, | ||
| 148 | |||
| 149 | .set_linux = 0x0a, | ||
| 150 | }, | ||
| 151 | |||
| 152 | .performance_levels = { | ||
| 153 | { | ||
| 154 | .name = "silent", | ||
| 155 | .value = 0, | ||
| 156 | }, | ||
| 157 | { | ||
| 158 | .name = "normal", | ||
| 159 | .value = 1, | ||
| 160 | }, | ||
| 161 | { }, | ||
| 162 | }, | ||
| 163 | .min_brightness = 1, | ||
| 164 | .max_brightness = 8, | ||
| 165 | }, | ||
| 166 | { | ||
| 167 | .test_string = "SwSmi@", | ||
| 168 | |||
| 169 | .main_function = 0x5843, | ||
| 170 | |||
| 171 | .header_offsets = { | ||
| 172 | .port = 0x00, | ||
| 173 | .re_mem = 0x04, | ||
| 174 | .iface_func = 0x02, | ||
| 175 | .en_mem = 0x03, | ||
| 176 | .data_offset = 0x05, | ||
| 177 | .data_segment = 0x07, | ||
| 178 | }, | ||
| 179 | |||
| 180 | .commands = { | ||
| 181 | .get_brightness = 0x10, | ||
| 182 | .set_brightness = 0x11, | ||
| 183 | |||
| 184 | .get_wireless_button = 0x12, | ||
| 185 | .set_wireless_button = 0x13, | ||
| 186 | |||
| 187 | .get_backlight = 0x2d, | ||
| 188 | .set_backlight = 0x2e, | ||
| 189 | |||
| 190 | .get_recovery_mode = 0xff, | ||
| 191 | .set_recovery_mode = 0xff, | ||
| 192 | |||
| 193 | .get_performance_level = 0x31, | ||
| 194 | .set_performance_level = 0x32, | ||
| 195 | |||
| 196 | .set_linux = 0xff, | ||
| 197 | }, | ||
| 198 | |||
| 199 | .performance_levels = { | ||
| 200 | { | ||
| 201 | .name = "normal", | ||
| 202 | .value = 0, | ||
| 203 | }, | ||
| 204 | { | ||
| 205 | .name = "silent", | ||
| 206 | .value = 1, | ||
| 207 | }, | ||
| 208 | { | ||
| 209 | .name = "overclock", | ||
| 210 | .value = 2, | ||
| 211 | }, | ||
| 212 | { }, | ||
| 213 | }, | ||
| 214 | .min_brightness = 0, | ||
| 215 | .max_brightness = 8, | ||
| 216 | }, | ||
| 217 | { }, | ||
| 218 | }; | ||
| 219 | |||
| 220 | static const struct sabi_config *sabi_config; | ||
| 221 | |||
| 222 | static void __iomem *sabi; | ||
| 223 | static void __iomem *sabi_iface; | ||
| 224 | static void __iomem *f0000_segment; | ||
| 225 | static struct backlight_device *backlight_device; | ||
| 226 | static struct mutex sabi_mutex; | ||
| 227 | static struct platform_device *sdev; | ||
| 228 | static struct rfkill *rfk; | ||
| 229 | |||
| 230 | static int force; | ||
| 231 | module_param(force, bool, 0); | ||
| 232 | MODULE_PARM_DESC(force, | ||
| 233 | "Disable the DMI check and forces the driver to be loaded"); | ||
| 234 | |||
| 235 | static int debug; | ||
| 236 | module_param(debug, bool, S_IRUGO | S_IWUSR); | ||
| 237 | MODULE_PARM_DESC(debug, "Debug enabled or not"); | ||
| 238 | |||
| 239 | static int sabi_get_command(u8 command, struct sabi_retval *sretval) | ||
| 240 | { | ||
| 241 | int retval = 0; | ||
| 242 | u16 port = readw(sabi + sabi_config->header_offsets.port); | ||
| 243 | u8 complete, iface_data; | ||
| 244 | |||
| 245 | mutex_lock(&sabi_mutex); | ||
| 246 | |||
| 247 | /* enable memory to be able to write to it */ | ||
| 248 | outb(readb(sabi + sabi_config->header_offsets.en_mem), port); | ||
| 249 | |||
| 250 | /* write out the command */ | ||
| 251 | writew(sabi_config->main_function, sabi_iface + SABI_IFACE_MAIN); | ||
| 252 | writew(command, sabi_iface + SABI_IFACE_SUB); | ||
| 253 | writeb(0, sabi_iface + SABI_IFACE_COMPLETE); | ||
| 254 | outb(readb(sabi + sabi_config->header_offsets.iface_func), port); | ||
| 255 | |||
| 256 | /* write protect memory to make it safe */ | ||
| 257 | outb(readb(sabi + sabi_config->header_offsets.re_mem), port); | ||
| 258 | |||
| 259 | /* see if the command actually succeeded */ | ||
| 260 | complete = readb(sabi_iface + SABI_IFACE_COMPLETE); | ||
| 261 | iface_data = readb(sabi_iface + SABI_IFACE_DATA); | ||
| 262 | if (complete != 0xaa || iface_data == 0xff) { | ||
| 263 | pr_warn("SABI get command 0x%02x failed with completion flag 0x%02x and data 0x%02x\n", | ||
| 264 | command, complete, iface_data); | ||
| 265 | retval = -EINVAL; | ||
| 266 | goto exit; | ||
| 267 | } | ||
| 268 | /* | ||
| 269 | * Save off the data into a structure so the caller use it. | ||
| 270 | * Right now we only want the first 4 bytes, | ||
| 271 | * There are commands that need more, but not for the ones we | ||
| 272 | * currently care about. | ||
| 273 | */ | ||
| 274 | sretval->retval[0] = readb(sabi_iface + SABI_IFACE_DATA); | ||
| 275 | sretval->retval[1] = readb(sabi_iface + SABI_IFACE_DATA + 1); | ||
| 276 | sretval->retval[2] = readb(sabi_iface + SABI_IFACE_DATA + 2); | ||
| 277 | sretval->retval[3] = readb(sabi_iface + SABI_IFACE_DATA + 3); | ||
| 278 | |||
| 279 | exit: | ||
| 280 | mutex_unlock(&sabi_mutex); | ||
| 281 | return retval; | ||
| 282 | |||
| 283 | } | ||
| 284 | |||
| 285 | static int sabi_set_command(u8 command, u8 data) | ||
| 286 | { | ||
| 287 | int retval = 0; | ||
| 288 | u16 port = readw(sabi + sabi_config->header_offsets.port); | ||
| 289 | u8 complete, iface_data; | ||
| 290 | |||
| 291 | mutex_lock(&sabi_mutex); | ||
| 292 | |||
| 293 | /* enable memory to be able to write to it */ | ||
| 294 | outb(readb(sabi + sabi_config->header_offsets.en_mem), port); | ||
| 295 | |||
| 296 | /* write out the command */ | ||
| 297 | writew(sabi_config->main_function, sabi_iface + SABI_IFACE_MAIN); | ||
| 298 | writew(command, sabi_iface + SABI_IFACE_SUB); | ||
| 299 | writeb(0, sabi_iface + SABI_IFACE_COMPLETE); | ||
| 300 | writeb(data, sabi_iface + SABI_IFACE_DATA); | ||
| 301 | outb(readb(sabi + sabi_config->header_offsets.iface_func), port); | ||
| 302 | |||
| 303 | /* write protect memory to make it safe */ | ||
| 304 | outb(readb(sabi + sabi_config->header_offsets.re_mem), port); | ||
| 305 | |||
| 306 | /* see if the command actually succeeded */ | ||
| 307 | complete = readb(sabi_iface + SABI_IFACE_COMPLETE); | ||
| 308 | iface_data = readb(sabi_iface + SABI_IFACE_DATA); | ||
| 309 | if (complete != 0xaa || iface_data == 0xff) { | ||
| 310 | pr_warn("SABI set command 0x%02x failed with completion flag 0x%02x and data 0x%02x\n", | ||
| 311 | command, complete, iface_data); | ||
| 312 | retval = -EINVAL; | ||
| 313 | } | ||
| 314 | |||
| 315 | mutex_unlock(&sabi_mutex); | ||
| 316 | return retval; | ||
| 317 | } | ||
| 318 | |||
| 319 | static void test_backlight(void) | ||
| 320 | { | ||
| 321 | struct sabi_retval sretval; | ||
| 322 | |||
| 323 | sabi_get_command(sabi_config->commands.get_backlight, &sretval); | ||
| 324 | printk(KERN_DEBUG "backlight = 0x%02x\n", sretval.retval[0]); | ||
| 325 | |||
| 326 | sabi_set_command(sabi_config->commands.set_backlight, 0); | ||
| 327 | printk(KERN_DEBUG "backlight should be off\n"); | ||
| 328 | |||
| 329 | sabi_get_command(sabi_config->commands.get_backlight, &sretval); | ||
| 330 | printk(KERN_DEBUG "backlight = 0x%02x\n", sretval.retval[0]); | ||
| 331 | |||
| 332 | msleep(1000); | ||
| 333 | |||
| 334 | sabi_set_command(sabi_config->commands.set_backlight, 1); | ||
| 335 | printk(KERN_DEBUG "backlight should be on\n"); | ||
| 336 | |||
| 337 | sabi_get_command(sabi_config->commands.get_backlight, &sretval); | ||
| 338 | printk(KERN_DEBUG "backlight = 0x%02x\n", sretval.retval[0]); | ||
| 339 | } | ||
| 340 | |||
| 341 | static void test_wireless(void) | ||
| 342 | { | ||
| 343 | struct sabi_retval sretval; | ||
| 344 | |||
| 345 | sabi_get_command(sabi_config->commands.get_wireless_button, &sretval); | ||
| 346 | printk(KERN_DEBUG "wireless led = 0x%02x\n", sretval.retval[0]); | ||
| 347 | |||
| 348 | sabi_set_command(sabi_config->commands.set_wireless_button, 0); | ||
| 349 | printk(KERN_DEBUG "wireless led should be off\n"); | ||
| 350 | |||
| 351 | sabi_get_command(sabi_config->commands.get_wireless_button, &sretval); | ||
| 352 | printk(KERN_DEBUG "wireless led = 0x%02x\n", sretval.retval[0]); | ||
| 353 | |||
| 354 | msleep(1000); | ||
| 355 | |||
| 356 | sabi_set_command(sabi_config->commands.set_wireless_button, 1); | ||
| 357 | printk(KERN_DEBUG "wireless led should be on\n"); | ||
| 358 | |||
| 359 | sabi_get_command(sabi_config->commands.get_wireless_button, &sretval); | ||
| 360 | printk(KERN_DEBUG "wireless led = 0x%02x\n", sretval.retval[0]); | ||
| 361 | } | ||
| 362 | |||
| 363 | static u8 read_brightness(void) | ||
| 364 | { | ||
| 365 | struct sabi_retval sretval; | ||
| 366 | int user_brightness = 0; | ||
| 367 | int retval; | ||
| 368 | |||
| 369 | retval = sabi_get_command(sabi_config->commands.get_brightness, | ||
| 370 | &sretval); | ||
| 371 | if (!retval) { | ||
| 372 | user_brightness = sretval.retval[0]; | ||
| 373 | if (user_brightness != 0) | ||
| 374 | user_brightness -= sabi_config->min_brightness; | ||
| 375 | } | ||
| 376 | return user_brightness; | ||
| 377 | } | ||
| 378 | |||
| 379 | static void set_brightness(u8 user_brightness) | ||
| 380 | { | ||
| 381 | u8 user_level = user_brightness - sabi_config->min_brightness; | ||
| 382 | |||
| 383 | sabi_set_command(sabi_config->commands.set_brightness, user_level); | ||
| 384 | } | ||
| 385 | |||
| 386 | static int get_brightness(struct backlight_device *bd) | ||
| 387 | { | ||
| 388 | return (int)read_brightness(); | ||
| 389 | } | ||
| 390 | |||
| 391 | static int update_status(struct backlight_device *bd) | ||
| 392 | { | ||
| 393 | set_brightness(bd->props.brightness); | ||
| 394 | |||
| 395 | if (bd->props.power == FB_BLANK_UNBLANK) | ||
| 396 | sabi_set_command(sabi_config->commands.set_backlight, 1); | ||
| 397 | else | ||
| 398 | sabi_set_command(sabi_config->commands.set_backlight, 0); | ||
| 399 | return 0; | ||
| 400 | } | ||
| 401 | |||
| 402 | static const struct backlight_ops backlight_ops = { | ||
| 403 | .get_brightness = get_brightness, | ||
| 404 | .update_status = update_status, | ||
| 405 | }; | ||
| 406 | |||
| 407 | static int rfkill_set(void *data, bool blocked) | ||
| 408 | { | ||
| 409 | /* Do something with blocked...*/ | ||
| 410 | /* | ||
| 411 | * blocked == false is on | ||
| 412 | * blocked == true is off | ||
| 413 | */ | ||
| 414 | if (blocked) | ||
| 415 | sabi_set_command(sabi_config->commands.set_wireless_button, 0); | ||
| 416 | else | ||
| 417 | sabi_set_command(sabi_config->commands.set_wireless_button, 1); | ||
| 418 | |||
| 419 | return 0; | ||
| 420 | } | ||
| 421 | |||
| 422 | static struct rfkill_ops rfkill_ops = { | ||
| 423 | .set_block = rfkill_set, | ||
| 424 | }; | ||
| 425 | |||
| 426 | static int init_wireless(struct platform_device *sdev) | ||
| 427 | { | ||
| 428 | int retval; | ||
| 429 | |||
| 430 | rfk = rfkill_alloc("samsung-wifi", &sdev->dev, RFKILL_TYPE_WLAN, | ||
| 431 | &rfkill_ops, NULL); | ||
| 432 | if (!rfk) | ||
| 433 | return -ENOMEM; | ||
| 434 | |||
| 435 | retval = rfkill_register(rfk); | ||
| 436 | if (retval) { | ||
| 437 | rfkill_destroy(rfk); | ||
| 438 | return -ENODEV; | ||
| 439 | } | ||
| 440 | |||
| 441 | return 0; | ||
| 442 | } | ||
| 443 | |||
| 444 | static void destroy_wireless(void) | ||
| 445 | { | ||
| 446 | rfkill_unregister(rfk); | ||
| 447 | rfkill_destroy(rfk); | ||
| 448 | } | ||
| 449 | |||
| 450 | static ssize_t get_performance_level(struct device *dev, | ||
| 451 | struct device_attribute *attr, char *buf) | ||
| 452 | { | ||
| 453 | struct sabi_retval sretval; | ||
| 454 | int retval; | ||
| 455 | int i; | ||
| 456 | |||
| 457 | /* Read the state */ | ||
| 458 | retval = sabi_get_command(sabi_config->commands.get_performance_level, | ||
| 459 | &sretval); | ||
| 460 | if (retval) | ||
| 461 | return retval; | ||
| 462 | |||
| 463 | /* The logic is backwards, yeah, lots of fun... */ | ||
| 464 | for (i = 0; sabi_config->performance_levels[i].name; ++i) { | ||
| 465 | if (sretval.retval[0] == sabi_config->performance_levels[i].value) | ||
| 466 | return sprintf(buf, "%s\n", sabi_config->performance_levels[i].name); | ||
| 467 | } | ||
| 468 | return sprintf(buf, "%s\n", "unknown"); | ||
| 469 | } | ||
| 470 | |||
| 471 | static ssize_t set_performance_level(struct device *dev, | ||
| 472 | struct device_attribute *attr, const char *buf, | ||
| 473 | size_t count) | ||
| 474 | { | ||
| 475 | if (count >= 1) { | ||
| 476 | int i; | ||
| 477 | for (i = 0; sabi_config->performance_levels[i].name; ++i) { | ||
| 478 | const struct sabi_performance_level *level = | ||
| 479 | &sabi_config->performance_levels[i]; | ||
| 480 | if (!strncasecmp(level->name, buf, strlen(level->name))) { | ||
| 481 | sabi_set_command(sabi_config->commands.set_performance_level, | ||
| 482 | level->value); | ||
| 483 | break; | ||
| 484 | } | ||
| 485 | } | ||
| 486 | if (!sabi_config->performance_levels[i].name) | ||
| 487 | return -EINVAL; | ||
| 488 | } | ||
| 489 | return count; | ||
| 490 | } | ||
| 491 | static DEVICE_ATTR(performance_level, S_IWUSR | S_IRUGO, | ||
| 492 | get_performance_level, set_performance_level); | ||
| 493 | |||
| 494 | |||
| 495 | static int __init dmi_check_cb(const struct dmi_system_id *id) | ||
| 496 | { | ||
| 497 | pr_info("found laptop model '%s'\n", | ||
| 498 | id->ident); | ||
| 499 | return 0; | ||
| 500 | } | ||
| 501 | |||
| 502 | static struct dmi_system_id __initdata samsung_dmi_table[] = { | ||
| 503 | { | ||
| 504 | .ident = "N128", | ||
| 505 | .matches = { | ||
| 506 | DMI_MATCH(DMI_SYS_VENDOR, | ||
| 507 | "SAMSUNG ELECTRONICS CO., LTD."), | ||
| 508 | DMI_MATCH(DMI_PRODUCT_NAME, "N128"), | ||
| 509 | DMI_MATCH(DMI_BOARD_NAME, "N128"), | ||
| 510 | }, | ||
| 511 | .callback = dmi_check_cb, | ||
| 512 | }, | ||
| 513 | { | ||
| 514 | .ident = "N130", | ||
| 515 | .matches = { | ||
| 516 | DMI_MATCH(DMI_SYS_VENDOR, | ||
| 517 | "SAMSUNG ELECTRONICS CO., LTD."), | ||
| 518 | DMI_MATCH(DMI_PRODUCT_NAME, "N130"), | ||
| 519 | DMI_MATCH(DMI_BOARD_NAME, "N130"), | ||
| 520 | }, | ||
| 521 | .callback = dmi_check_cb, | ||
| 522 | }, | ||
| 523 | { | ||
| 524 | .ident = "X125", | ||
| 525 | .matches = { | ||
| 526 | DMI_MATCH(DMI_SYS_VENDOR, | ||
| 527 | "SAMSUNG ELECTRONICS CO., LTD."), | ||
| 528 | DMI_MATCH(DMI_PRODUCT_NAME, "X125"), | ||
| 529 | DMI_MATCH(DMI_BOARD_NAME, "X125"), | ||
| 530 | }, | ||
| 531 | .callback = dmi_check_cb, | ||
| 532 | }, | ||
| 533 | { | ||
| 534 | .ident = "X120/X170", | ||
| 535 | .matches = { | ||
| 536 | DMI_MATCH(DMI_SYS_VENDOR, | ||
| 537 | "SAMSUNG ELECTRONICS CO., LTD."), | ||
| 538 | DMI_MATCH(DMI_PRODUCT_NAME, "X120/X170"), | ||
| 539 | DMI_MATCH(DMI_BOARD_NAME, "X120/X170"), | ||
| 540 | }, | ||
| 541 | .callback = dmi_check_cb, | ||
| 542 | }, | ||
| 543 | { | ||
| 544 | .ident = "NC10", | ||
| 545 | .matches = { | ||
| 546 | DMI_MATCH(DMI_SYS_VENDOR, | ||
| 547 | "SAMSUNG ELECTRONICS CO., LTD."), | ||
| 548 | DMI_MATCH(DMI_PRODUCT_NAME, "NC10"), | ||
| 549 | DMI_MATCH(DMI_BOARD_NAME, "NC10"), | ||
| 550 | }, | ||
| 551 | .callback = dmi_check_cb, | ||
| 552 | }, | ||
| 553 | { | ||
| 554 | .ident = "NP-Q45", | ||
| 555 | .matches = { | ||
| 556 | DMI_MATCH(DMI_SYS_VENDOR, | ||
| 557 | "SAMSUNG ELECTRONICS CO., LTD."), | ||
| 558 | DMI_MATCH(DMI_PRODUCT_NAME, "SQ45S70S"), | ||
| 559 | DMI_MATCH(DMI_BOARD_NAME, "SQ45S70S"), | ||
| 560 | }, | ||
| 561 | .callback = dmi_check_cb, | ||
| 562 | }, | ||
| 563 | { | ||
| 564 | .ident = "X360", | ||
| 565 | .matches = { | ||
| 566 | DMI_MATCH(DMI_SYS_VENDOR, | ||
| 567 | "SAMSUNG ELECTRONICS CO., LTD."), | ||
| 568 | DMI_MATCH(DMI_PRODUCT_NAME, "X360"), | ||
| 569 | DMI_MATCH(DMI_BOARD_NAME, "X360"), | ||
| 570 | }, | ||
| 571 | .callback = dmi_check_cb, | ||
| 572 | }, | ||
| 573 | { | ||
| 574 | .ident = "R410 Plus", | ||
| 575 | .matches = { | ||
| 576 | DMI_MATCH(DMI_SYS_VENDOR, | ||
| 577 | "SAMSUNG ELECTRONICS CO., LTD."), | ||
| 578 | DMI_MATCH(DMI_PRODUCT_NAME, "R410P"), | ||
| 579 | DMI_MATCH(DMI_BOARD_NAME, "R460"), | ||
| 580 | }, | ||
| 581 | .callback = dmi_check_cb, | ||
| 582 | }, | ||
| 583 | { | ||
| 584 | .ident = "R518", | ||
| 585 | .matches = { | ||
| 586 | DMI_MATCH(DMI_SYS_VENDOR, | ||
| 587 | "SAMSUNG ELECTRONICS CO., LTD."), | ||
| 588 | DMI_MATCH(DMI_PRODUCT_NAME, "R518"), | ||
| 589 | DMI_MATCH(DMI_BOARD_NAME, "R518"), | ||
| 590 | }, | ||
| 591 | .callback = dmi_check_cb, | ||
| 592 | }, | ||
| 593 | { | ||
| 594 | .ident = "R519/R719", | ||
| 595 | .matches = { | ||
| 596 | DMI_MATCH(DMI_SYS_VENDOR, | ||
| 597 | "SAMSUNG ELECTRONICS CO., LTD."), | ||
| 598 | DMI_MATCH(DMI_PRODUCT_NAME, "R519/R719"), | ||
| 599 | DMI_MATCH(DMI_BOARD_NAME, "R519/R719"), | ||
| 600 | }, | ||
| 601 | .callback = dmi_check_cb, | ||
| 602 | }, | ||
| 603 | { | ||
| 604 | .ident = "N150/N210/N220/N230", | ||
| 605 | .matches = { | ||
| 606 | DMI_MATCH(DMI_SYS_VENDOR, | ||
| 607 | "SAMSUNG ELECTRONICS CO., LTD."), | ||
| 608 | DMI_MATCH(DMI_PRODUCT_NAME, "N150/N210/N220/N230"), | ||
| 609 | DMI_MATCH(DMI_BOARD_NAME, "N150/N210/N220/N230"), | ||
| 610 | }, | ||
| 611 | .callback = dmi_check_cb, | ||
| 612 | }, | ||
| 613 | { | ||
| 614 | .ident = "N150P/N210P/N220P", | ||
| 615 | .matches = { | ||
| 616 | DMI_MATCH(DMI_SYS_VENDOR, | ||
| 617 | "SAMSUNG ELECTRONICS CO., LTD."), | ||
| 618 | DMI_MATCH(DMI_PRODUCT_NAME, "N150P/N210P/N220P"), | ||
| 619 | DMI_MATCH(DMI_BOARD_NAME, "N150P/N210P/N220P"), | ||
| 620 | }, | ||
| 621 | .callback = dmi_check_cb, | ||
| 622 | }, | ||
| 623 | { | ||
| 624 | .ident = "R530/R730", | ||
| 625 | .matches = { | ||
| 626 | DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), | ||
| 627 | DMI_MATCH(DMI_PRODUCT_NAME, "R530/R730"), | ||
| 628 | DMI_MATCH(DMI_BOARD_NAME, "R530/R730"), | ||
| 629 | }, | ||
| 630 | .callback = dmi_check_cb, | ||
| 631 | }, | ||
| 632 | { | ||
| 633 | .ident = "NF110/NF210/NF310", | ||
| 634 | .matches = { | ||
| 635 | DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), | ||
| 636 | DMI_MATCH(DMI_PRODUCT_NAME, "NF110/NF210/NF310"), | ||
| 637 | DMI_MATCH(DMI_BOARD_NAME, "NF110/NF210/NF310"), | ||
| 638 | }, | ||
| 639 | .callback = dmi_check_cb, | ||
| 640 | }, | ||
| 641 | { | ||
| 642 | .ident = "N145P/N250P/N260P", | ||
| 643 | .matches = { | ||
| 644 | DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), | ||
| 645 | DMI_MATCH(DMI_PRODUCT_NAME, "N145P/N250P/N260P"), | ||
| 646 | DMI_MATCH(DMI_BOARD_NAME, "N145P/N250P/N260P"), | ||
| 647 | }, | ||
| 648 | .callback = dmi_check_cb, | ||
| 649 | }, | ||
| 650 | { | ||
| 651 | .ident = "R70/R71", | ||
| 652 | .matches = { | ||
| 653 | DMI_MATCH(DMI_SYS_VENDOR, | ||
| 654 | "SAMSUNG ELECTRONICS CO., LTD."), | ||
| 655 | DMI_MATCH(DMI_PRODUCT_NAME, "R70/R71"), | ||
| 656 | DMI_MATCH(DMI_BOARD_NAME, "R70/R71"), | ||
| 657 | }, | ||
| 658 | .callback = dmi_check_cb, | ||
| 659 | }, | ||
| 660 | { | ||
| 661 | .ident = "P460", | ||
| 662 | .matches = { | ||
| 663 | DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), | ||
| 664 | DMI_MATCH(DMI_PRODUCT_NAME, "P460"), | ||
| 665 | DMI_MATCH(DMI_BOARD_NAME, "P460"), | ||
| 666 | }, | ||
| 667 | .callback = dmi_check_cb, | ||
| 668 | }, | ||
| 669 | { }, | ||
| 670 | }; | ||
| 671 | MODULE_DEVICE_TABLE(dmi, samsung_dmi_table); | ||
| 672 | |||
| 673 | static int find_signature(void __iomem *memcheck, const char *testStr) | ||
| 674 | { | ||
| 675 | int i = 0; | ||
| 676 | int loca; | ||
| 677 | |||
| 678 | for (loca = 0; loca < 0xffff; loca++) { | ||
| 679 | char temp = readb(memcheck + loca); | ||
| 680 | |||
| 681 | if (temp == testStr[i]) { | ||
| 682 | if (i == strlen(testStr)-1) | ||
| 683 | break; | ||
| 684 | ++i; | ||
| 685 | } else { | ||
| 686 | i = 0; | ||
| 687 | } | ||
| 688 | } | ||
| 689 | return loca; | ||
| 690 | } | ||
| 691 | |||
| 692 | static int __init samsung_init(void) | ||
| 693 | { | ||
| 694 | struct backlight_properties props; | ||
| 695 | struct sabi_retval sretval; | ||
| 696 | unsigned int ifaceP; | ||
| 697 | int i; | ||
| 698 | int loca; | ||
| 699 | int retval; | ||
| 700 | |||
| 701 | mutex_init(&sabi_mutex); | ||
| 702 | |||
| 703 | if (!force && !dmi_check_system(samsung_dmi_table)) | ||
| 704 | return -ENODEV; | ||
| 705 | |||
| 706 | f0000_segment = ioremap_nocache(0xf0000, 0xffff); | ||
| 707 | if (!f0000_segment) { | ||
| 708 | pr_err("Can't map the segment at 0xf0000\n"); | ||
| 709 | return -EINVAL; | ||
| 710 | } | ||
| 711 | |||
| 712 | /* Try to find one of the signatures in memory to find the header */ | ||
| 713 | for (i = 0; sabi_configs[i].test_string != 0; ++i) { | ||
| 714 | sabi_config = &sabi_configs[i]; | ||
| 715 | loca = find_signature(f0000_segment, sabi_config->test_string); | ||
| 716 | if (loca != 0xffff) | ||
| 717 | break; | ||
| 718 | } | ||
| 719 | |||
| 720 | if (loca == 0xffff) { | ||
| 721 | pr_err("This computer does not support SABI\n"); | ||
| 722 | goto error_no_signature; | ||
| 723 | } | ||
| 724 | |||
| 725 | /* point to the SMI port Number */ | ||
| 726 | loca += 1; | ||
| 727 | sabi = (f0000_segment + loca); | ||
| 728 | |||
| 729 | if (debug) { | ||
| 730 | printk(KERN_DEBUG "This computer supports SABI==%x\n", | ||
| 731 | loca + 0xf0000 - 6); | ||
| 732 | printk(KERN_DEBUG "SABI header:\n"); | ||
| 733 | printk(KERN_DEBUG " SMI Port Number = 0x%04x\n", | ||
| 734 | readw(sabi + sabi_config->header_offsets.port)); | ||
| 735 | printk(KERN_DEBUG " SMI Interface Function = 0x%02x\n", | ||
| 736 | readb(sabi + sabi_config->header_offsets.iface_func)); | ||
| 737 | printk(KERN_DEBUG " SMI enable memory buffer = 0x%02x\n", | ||
| 738 | readb(sabi + sabi_config->header_offsets.en_mem)); | ||
| 739 | printk(KERN_DEBUG " SMI restore memory buffer = 0x%02x\n", | ||
| 740 | readb(sabi + sabi_config->header_offsets.re_mem)); | ||
| 741 | printk(KERN_DEBUG " SABI data offset = 0x%04x\n", | ||
| 742 | readw(sabi + sabi_config->header_offsets.data_offset)); | ||
| 743 | printk(KERN_DEBUG " SABI data segment = 0x%04x\n", | ||
| 744 | readw(sabi + sabi_config->header_offsets.data_segment)); | ||
| 745 | } | ||
| 746 | |||
| 747 | /* Get a pointer to the SABI Interface */ | ||
| 748 | ifaceP = (readw(sabi + sabi_config->header_offsets.data_segment) & 0x0ffff) << 4; | ||
| 749 | ifaceP += readw(sabi + sabi_config->header_offsets.data_offset) & 0x0ffff; | ||
| 750 | sabi_iface = ioremap_nocache(ifaceP, 16); | ||
| 751 | if (!sabi_iface) { | ||
| 752 | pr_err("Can't remap %x\n", ifaceP); | ||
| 753 | goto exit; | ||
| 754 | } | ||
| 755 | if (debug) { | ||
| 756 | printk(KERN_DEBUG "ifaceP = 0x%08x\n", ifaceP); | ||
| 757 | printk(KERN_DEBUG "sabi_iface = %p\n", sabi_iface); | ||
| 758 | |||
| 759 | test_backlight(); | ||
| 760 | test_wireless(); | ||
| 761 | |||
| 762 | retval = sabi_get_command(sabi_config->commands.get_brightness, | ||
| 763 | &sretval); | ||
| 764 | printk(KERN_DEBUG "brightness = 0x%02x\n", sretval.retval[0]); | ||
| 765 | } | ||
| 766 | |||
| 767 | /* Turn on "Linux" mode in the BIOS */ | ||
| 768 | if (sabi_config->commands.set_linux != 0xff) { | ||
| 769 | retval = sabi_set_command(sabi_config->commands.set_linux, | ||
| 770 | 0x81); | ||
| 771 | if (retval) { | ||
| 772 | pr_warn("Linux mode was not set!\n"); | ||
| 773 | goto error_no_platform; | ||
| 774 | } | ||
| 775 | } | ||
| 776 | |||
| 777 | /* knock up a platform device to hang stuff off of */ | ||
| 778 | sdev = platform_device_register_simple("samsung", -1, NULL, 0); | ||
| 779 | if (IS_ERR(sdev)) | ||
| 780 | goto error_no_platform; | ||
| 781 | |||
| 782 | /* create a backlight device to talk to this one */ | ||
| 783 | memset(&props, 0, sizeof(struct backlight_properties)); | ||
| 784 | props.type = BACKLIGHT_PLATFORM; | ||
| 785 | props.max_brightness = sabi_config->max_brightness; | ||
| 786 | backlight_device = backlight_device_register("samsung", &sdev->dev, | ||
| 787 | NULL, &backlight_ops, | ||
| 788 | &props); | ||
| 789 | if (IS_ERR(backlight_device)) | ||
| 790 | goto error_no_backlight; | ||
| 791 | |||
| 792 | backlight_device->props.brightness = read_brightness(); | ||
| 793 | backlight_device->props.power = FB_BLANK_UNBLANK; | ||
| 794 | backlight_update_status(backlight_device); | ||
| 795 | |||
| 796 | retval = init_wireless(sdev); | ||
| 797 | if (retval) | ||
| 798 | goto error_no_rfk; | ||
| 799 | |||
| 800 | retval = device_create_file(&sdev->dev, &dev_attr_performance_level); | ||
| 801 | if (retval) | ||
| 802 | goto error_file_create; | ||
| 803 | |||
| 804 | exit: | ||
| 805 | return 0; | ||
| 806 | |||
| 807 | error_file_create: | ||
| 808 | destroy_wireless(); | ||
| 809 | |||
| 810 | error_no_rfk: | ||
| 811 | backlight_device_unregister(backlight_device); | ||
| 812 | |||
| 813 | error_no_backlight: | ||
| 814 | platform_device_unregister(sdev); | ||
| 815 | |||
| 816 | error_no_platform: | ||
| 817 | iounmap(sabi_iface); | ||
| 818 | |||
| 819 | error_no_signature: | ||
| 820 | iounmap(f0000_segment); | ||
| 821 | return -EINVAL; | ||
| 822 | } | ||
| 823 | |||
| 824 | static void __exit samsung_exit(void) | ||
| 825 | { | ||
| 826 | /* Turn off "Linux" mode in the BIOS */ | ||
| 827 | if (sabi_config->commands.set_linux != 0xff) | ||
| 828 | sabi_set_command(sabi_config->commands.set_linux, 0x80); | ||
| 829 | |||
| 830 | device_remove_file(&sdev->dev, &dev_attr_performance_level); | ||
| 831 | backlight_device_unregister(backlight_device); | ||
| 832 | destroy_wireless(); | ||
| 833 | iounmap(sabi_iface); | ||
| 834 | iounmap(f0000_segment); | ||
| 835 | platform_device_unregister(sdev); | ||
| 836 | } | ||
| 837 | |||
| 838 | module_init(samsung_init); | ||
| 839 | module_exit(samsung_exit); | ||
| 840 | |||
| 841 | MODULE_AUTHOR("Greg Kroah-Hartman <gregkh@suse.de>"); | ||
| 842 | MODULE_DESCRIPTION("Samsung Backlight driver"); | ||
| 843 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c index 71a5fbc041e4..890eede5e3f9 100644 --- a/drivers/staging/sep/sep_driver.c +++ b/drivers/staging/sep/sep_driver.c | |||
| @@ -55,8 +55,6 @@ | |||
| 55 | #include <linux/jiffies.h> | 55 | #include <linux/jiffies.h> |
| 56 | #include <linux/rar_register.h> | 56 | #include <linux/rar_register.h> |
| 57 | 57 | ||
| 58 | #include "../memrar/memrar.h" | ||
| 59 | |||
| 60 | #include "sep_driver_hw_defs.h" | 58 | #include "sep_driver_hw_defs.h" |
| 61 | #include "sep_driver_config.h" | 59 | #include "sep_driver_config.h" |
| 62 | #include "sep_driver_api.h" | 60 | #include "sep_driver_api.h" |
| @@ -586,7 +584,7 @@ static unsigned int sep_poll(struct file *filp, poll_table *wait) | |||
| 586 | dev_dbg(&sep->pdev->dev, "poll: send_ct is %lx reply ct is %lx\n", | 584 | dev_dbg(&sep->pdev->dev, "poll: send_ct is %lx reply ct is %lx\n", |
| 587 | sep->send_ct, sep->reply_ct); | 585 | sep->send_ct, sep->reply_ct); |
| 588 | 586 | ||
| 589 | /* Check if error occured during poll */ | 587 | /* Check if error occurred during poll */ |
| 590 | retval2 = sep_read_reg(sep, HW_HOST_SEP_HOST_GPR3_REG_ADDR); | 588 | retval2 = sep_read_reg(sep, HW_HOST_SEP_HOST_GPR3_REG_ADDR); |
| 591 | if (retval2 != 0x0) { | 589 | if (retval2 != 0x0) { |
| 592 | dev_warn(&sep->pdev->dev, "poll; poll error %x\n", retval2); | 590 | dev_warn(&sep->pdev->dev, "poll; poll error %x\n", retval2); |
| @@ -1106,7 +1104,7 @@ static int sep_lock_user_pages(struct sep_device *sep, | |||
| 1106 | lli_array[count].block_size); | 1104 | lli_array[count].block_size); |
| 1107 | } | 1105 | } |
| 1108 | 1106 | ||
| 1109 | /* Set output params acording to the in_out flag */ | 1107 | /* Set output params according to the in_out flag */ |
| 1110 | if (in_out_flag == SEP_DRIVER_IN_FLAG) { | 1108 | if (in_out_flag == SEP_DRIVER_IN_FLAG) { |
| 1111 | *lli_array_ptr = lli_array; | 1109 | *lli_array_ptr = lli_array; |
| 1112 | sep->dma_res_arr[sep->nr_dcb_creat].in_num_pages = num_pages; | 1110 | sep->dma_res_arr[sep->nr_dcb_creat].in_num_pages = num_pages; |
| @@ -1577,7 +1575,7 @@ static int sep_prepare_input_dma_table(struct sep_device *sep, | |||
| 1577 | 1575 | ||
| 1578 | /* | 1576 | /* |
| 1579 | * If this is not the last table - | 1577 | * If this is not the last table - |
| 1580 | * then allign it to the block size | 1578 | * then align it to the block size |
| 1581 | */ | 1579 | */ |
| 1582 | if (!last_table_flag) | 1580 | if (!last_table_flag) |
| 1583 | table_data_size = | 1581 | table_data_size = |
| @@ -1974,7 +1972,7 @@ static int sep_prepare_input_output_dma_table(struct sep_device *sep, | |||
| 1974 | dev_dbg(&sep->pdev->dev, "SEP_DRIVER_ENTRIES_PER_TABLE_IN_SEP is %x\n", | 1972 | dev_dbg(&sep->pdev->dev, "SEP_DRIVER_ENTRIES_PER_TABLE_IN_SEP is %x\n", |
| 1975 | SEP_DRIVER_ENTRIES_PER_TABLE_IN_SEP); | 1973 | SEP_DRIVER_ENTRIES_PER_TABLE_IN_SEP); |
| 1976 | 1974 | ||
| 1977 | /* Call the fucntion that creates table from the lli arrays */ | 1975 | /* Call the function that creates table from the lli arrays */ |
| 1978 | error = sep_construct_dma_tables_from_lli(sep, lli_in_array, | 1976 | error = sep_construct_dma_tables_from_lli(sep, lli_in_array, |
| 1979 | sep->dma_res_arr[sep->nr_dcb_creat].in_num_pages, | 1977 | sep->dma_res_arr[sep->nr_dcb_creat].in_num_pages, |
| 1980 | lli_out_array, | 1978 | lli_out_array, |
| @@ -2372,7 +2370,6 @@ static int sep_rar_prepare_output_msg_handler(struct sep_device *sep, | |||
| 2372 | int error = 0; | 2370 | int error = 0; |
| 2373 | /* Command args */ | 2371 | /* Command args */ |
| 2374 | struct rar_hndl_to_bus_struct command_args; | 2372 | struct rar_hndl_to_bus_struct command_args; |
| 2375 | struct RAR_buffer rar_buf; | ||
| 2376 | /* Bus address */ | 2373 | /* Bus address */ |
| 2377 | dma_addr_t rar_bus = 0; | 2374 | dma_addr_t rar_bus = 0; |
| 2378 | /* Holds the RAR address in the system memory offset */ | 2375 | /* Holds the RAR address in the system memory offset */ |
| @@ -2386,16 +2383,8 @@ static int sep_rar_prepare_output_msg_handler(struct sep_device *sep, | |||
| 2386 | } | 2383 | } |
| 2387 | 2384 | ||
| 2388 | /* Call to translation function only if user handle is not NULL */ | 2385 | /* Call to translation function only if user handle is not NULL */ |
| 2389 | if (command_args.rar_handle) { | 2386 | if (command_args.rar_handle) |
| 2390 | memset(&rar_buf, 0, sizeof(rar_buf)); | 2387 | return -EOPNOTSUPP; |
| 2391 | rar_buf.info.handle = (u32)command_args.rar_handle; | ||
| 2392 | |||
| 2393 | if (rar_handle_to_bus(&rar_buf, 1) != 1) { | ||
| 2394 | error = -EFAULT; | ||
| 2395 | goto end_function; | ||
| 2396 | } | ||
| 2397 | rar_bus = rar_buf.bus_address; | ||
| 2398 | } | ||
| 2399 | dev_dbg(&sep->pdev->dev, "rar msg; rar_addr_bus = %x\n", (u32)rar_bus); | 2388 | dev_dbg(&sep->pdev->dev, "rar msg; rar_addr_bus = %x\n", (u32)rar_bus); |
| 2400 | 2389 | ||
| 2401 | /* Set value in the SYSTEM MEMORY offset */ | 2390 | /* Set value in the SYSTEM MEMORY offset */ |
| @@ -2416,7 +2405,7 @@ end_function: | |||
| 2416 | * @cmd: command | 2405 | * @cmd: command |
| 2417 | * @arg: pointer to argument structure | 2406 | * @arg: pointer to argument structure |
| 2418 | * | 2407 | * |
| 2419 | * Implement the ioctl methods availble on the SEP device. | 2408 | * Implement the ioctl methods available on the SEP device. |
| 2420 | */ | 2409 | */ |
| 2421 | static long sep_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | 2410 | static long sep_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) |
| 2422 | { | 2411 | { |
diff --git a/drivers/staging/sep/sep_driver_config.h b/drivers/staging/sep/sep_driver_config.h index d3b9220f3963..1033425c9c30 100644 --- a/drivers/staging/sep/sep_driver_config.h +++ b/drivers/staging/sep/sep_driver_config.h | |||
| @@ -65,11 +65,11 @@ | |||
| 65 | #define SEP_DRIVER_MIN_DATA_SIZE_PER_TABLE 16 | 65 | #define SEP_DRIVER_MIN_DATA_SIZE_PER_TABLE 16 |
| 66 | 66 | ||
| 67 | /* flag that signifies tah the lock is | 67 | /* flag that signifies tah the lock is |
| 68 | currently held by the proccess (struct file) */ | 68 | currently held by the process (struct file) */ |
| 69 | #define SEP_DRIVER_OWN_LOCK_FLAG 1 | 69 | #define SEP_DRIVER_OWN_LOCK_FLAG 1 |
| 70 | 70 | ||
| 71 | /* flag that signifies tah the lock is currently NOT | 71 | /* flag that signifies tah the lock is currently NOT |
| 72 | held by the proccess (struct file) */ | 72 | held by the process (struct file) */ |
| 73 | #define SEP_DRIVER_DISOWN_LOCK_FLAG 0 | 73 | #define SEP_DRIVER_DISOWN_LOCK_FLAG 0 |
| 74 | 74 | ||
| 75 | /* indicates whether driver has mapped/unmapped shared area */ | 75 | /* indicates whether driver has mapped/unmapped shared area */ |
diff --git a/drivers/staging/slicoss/README b/drivers/staging/slicoss/README index 70f49099c065..b83bba19b7f0 100644 --- a/drivers/staging/slicoss/README +++ b/drivers/staging/slicoss/README | |||
| @@ -33,7 +33,7 @@ TODO: | |||
| 33 | - NAPI? | 33 | - NAPI? |
| 34 | - wasted overhead of extra stats | 34 | - wasted overhead of extra stats |
| 35 | - state variables for things that are | 35 | - state variables for things that are |
| 36 | easily availble and shouldn't be kept in card structure, cardnum, ... | 36 | easily available and shouldn't be kept in card structure, cardnum, ... |
| 37 | slotnumber, events, ... | 37 | slotnumber, events, ... |
| 38 | - get rid of slic_spinlock wrapper | 38 | - get rid of slic_spinlock wrapper |
| 39 | - volatile == bad design => bad code | 39 | - volatile == bad design => bad code |
diff --git a/drivers/staging/sm7xx/smtcfb.c b/drivers/staging/sm7xx/smtcfb.c index d007e4a12c14..3e2230f0879a 100644 --- a/drivers/staging/sm7xx/smtcfb.c +++ b/drivers/staging/sm7xx/smtcfb.c | |||
| @@ -26,10 +26,6 @@ | |||
| 26 | * Boyod.yang <boyod.yang@siliconmotion.com.cn> | 26 | * Boyod.yang <boyod.yang@siliconmotion.com.cn> |
| 27 | */ | 27 | */ |
| 28 | 28 | ||
| 29 | #ifndef __KERNEL__ | ||
| 30 | #define __KERNEL__ | ||
| 31 | #endif | ||
| 32 | |||
| 33 | #include <linux/io.h> | 29 | #include <linux/io.h> |
| 34 | #include <linux/fb.h> | 30 | #include <linux/fb.h> |
| 35 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
| @@ -965,7 +961,7 @@ static int __devinit smtcfb_pci_probe(struct pci_dev *pdev, | |||
| 965 | goto failed; | 961 | goto failed; |
| 966 | 962 | ||
| 967 | smtcfb_setmode(sfb); | 963 | smtcfb_setmode(sfb); |
| 968 | /* Primary display starting from 0 postion */ | 964 | /* Primary display starting from 0 position */ |
| 969 | hw.BaseAddressInVRAM = 0; | 965 | hw.BaseAddressInVRAM = 0; |
| 970 | sfb->fb.par = &hw; | 966 | sfb->fb.par = &hw; |
| 971 | 967 | ||
| @@ -1019,6 +1015,7 @@ static void __devexit smtcfb_pci_remove(struct pci_dev *pdev) | |||
| 1019 | smtc_free_fb_info(sfb); | 1015 | smtc_free_fb_info(sfb); |
| 1020 | } | 1016 | } |
| 1021 | 1017 | ||
| 1018 | #ifdef CONFIG_PM | ||
| 1022 | /* Jason (08/14/2009) | 1019 | /* Jason (08/14/2009) |
| 1023 | * suspend function, called when the suspend event is triggered | 1020 | * suspend function, called when the suspend event is triggered |
| 1024 | */ | 1021 | */ |
| @@ -1055,7 +1052,7 @@ static int __maybe_unused smtcfb_suspend(struct pci_dev *pdev, pm_message_t msg) | |||
| 1055 | 1052 | ||
| 1056 | pdev->dev.power.power_state = msg; | 1053 | pdev->dev.power.power_state = msg; |
| 1057 | 1054 | ||
| 1058 | /* additionaly turn off all function blocks including internal PLLs */ | 1055 | /* additionally turn off all function blocks including internal PLLs */ |
| 1059 | smtc_seqw(0x21, 0xff); | 1056 | smtc_seqw(0x21, 0xff); |
| 1060 | 1057 | ||
| 1061 | return 0; | 1058 | return 0; |
| @@ -1111,6 +1108,7 @@ static int __maybe_unused smtcfb_resume(struct pci_dev *pdev) | |||
| 1111 | 1108 | ||
| 1112 | return 0; | 1109 | return 0; |
| 1113 | } | 1110 | } |
| 1111 | #endif | ||
| 1114 | 1112 | ||
| 1115 | /* Jason (08/13/2009) | 1113 | /* Jason (08/13/2009) |
| 1116 | * pci_driver struct used to wrap the original driver | 1114 | * pci_driver struct used to wrap the original driver |
diff --git a/drivers/staging/speakup/keyhelp.c b/drivers/staging/speakup/keyhelp.c index 23cf7f44f450..170f38815ffd 100644 --- a/drivers/staging/speakup/keyhelp.c +++ b/drivers/staging/speakup/keyhelp.c | |||
| @@ -69,7 +69,7 @@ static void build_key_data(void) | |||
| 69 | memset(key_offsets, 0, sizeof(key_offsets)); | 69 | memset(key_offsets, 0, sizeof(key_offsets)); |
| 70 | kp = state_tbl + nstates + 1; | 70 | kp = state_tbl + nstates + 1; |
| 71 | while (*kp++) { | 71 | while (*kp++) { |
| 72 | /* count occurrances of each function */ | 72 | /* count occurrences of each function */ |
| 73 | for (i = 0; i < nstates; i++, kp++) { | 73 | for (i = 0; i < nstates; i++, kp++) { |
| 74 | if (!*kp) | 74 | if (!*kp) |
| 75 | continue; | 75 | continue; |
diff --git a/drivers/staging/speakup/spkguide.txt b/drivers/staging/speakup/spkguide.txt index 24362eb7b8f1..f3210571e396 100644 --- a/drivers/staging/speakup/spkguide.txt +++ b/drivers/staging/speakup/spkguide.txt | |||
| @@ -1091,7 +1091,7 @@ screen that is constantly changing, such as a clock or status line. | |||
| 1091 | 1091 | ||
| 1092 | There is no way to save these window settings, and you can only have one | 1092 | There is no way to save these window settings, and you can only have one |
| 1093 | window defined for each virtual console. There is also no way to have | 1093 | window defined for each virtual console. There is also no way to have |
| 1094 | windows automaticly defined for specific applications. | 1094 | windows automatically defined for specific applications. |
| 1095 | 1095 | ||
| 1096 | In order to define a window, use the review keys to move your reading | 1096 | In order to define a window, use the review keys to move your reading |
| 1097 | cursor to the beginning of the area you want to define. Then press | 1097 | cursor to the beginning of the area you want to define. Then press |
diff --git a/drivers/staging/spectra/ffsport.c b/drivers/staging/spectra/ffsport.c index 007b24b54e25..20dae73d3b78 100644 --- a/drivers/staging/spectra/ffsport.c +++ b/drivers/staging/spectra/ffsport.c | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | * Outputs: Number of Used Bits | 38 | * Outputs: Number of Used Bits |
| 39 | * 0, if the argument is 0 | 39 | * 0, if the argument is 0 |
| 40 | * Description: Calculate the number of bits used by a given power of 2 number | 40 | * Description: Calculate the number of bits used by a given power of 2 number |
| 41 | * Number can be upto 32 bit | 41 | * Number can be up to 32 bit |
| 42 | *&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/ | 42 | *&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/ |
| 43 | int GLOB_Calc_Used_Bits(u32 n) | 43 | int GLOB_Calc_Used_Bits(u32 n) |
| 44 | { | 44 | { |
| @@ -653,7 +653,7 @@ static int SBD_setup_device(struct spectra_nand_dev *dev, int which) | |||
| 653 | } | 653 | } |
| 654 | dev->queue->queuedata = dev; | 654 | dev->queue->queuedata = dev; |
| 655 | 655 | ||
| 656 | /* As Linux block layer doens't support >4KB hardware sector, */ | 656 | /* As Linux block layer does't support >4KB hardware sector, */ |
| 657 | /* Here we force report 512 byte hardware sector size to Kernel */ | 657 | /* Here we force report 512 byte hardware sector size to Kernel */ |
| 658 | blk_queue_logical_block_size(dev->queue, 512); | 658 | blk_queue_logical_block_size(dev->queue, 512); |
| 659 | 659 | ||
diff --git a/drivers/staging/spectra/flash.c b/drivers/staging/spectra/flash.c index a2f820025ae4..aead358e5c2a 100644 --- a/drivers/staging/spectra/flash.c +++ b/drivers/staging/spectra/flash.c | |||
| @@ -965,7 +965,7 @@ static void process_cmd_fail_abort(int *first_failed_cmd, | |||
| 965 | if (0 == *first_failed_cmd) | 965 | if (0 == *first_failed_cmd) |
| 966 | *first_failed_cmd = PendingCMD[idx].SBDCmdIndex; | 966 | *first_failed_cmd = PendingCMD[idx].SBDCmdIndex; |
| 967 | 967 | ||
| 968 | nand_dbg_print(NAND_DBG_DEBUG, "Uncorrectable error has occured " | 968 | nand_dbg_print(NAND_DBG_DEBUG, "Uncorrectable error has occurred " |
| 969 | "while executing %u Command %u accesing Block %u\n", | 969 | "while executing %u Command %u accesing Block %u\n", |
| 970 | (unsigned int)p_BTableChangesDelta->ftl_cmd_cnt, | 970 | (unsigned int)p_BTableChangesDelta->ftl_cmd_cnt, |
| 971 | PendingCMD[idx].CMD, | 971 | PendingCMD[idx].CMD, |
| @@ -1879,7 +1879,7 @@ static int write_back_to_l2_cache(u8 *buf, u64 logical_addr) | |||
| 1879 | } | 1879 | } |
| 1880 | 1880 | ||
| 1881 | /* | 1881 | /* |
| 1882 | * Seach in the Level2 Cache table to find the cache item. | 1882 | * Search in the Level2 Cache table to find the cache item. |
| 1883 | * If find, read the data from the NAND page of L2 Cache, | 1883 | * If find, read the data from the NAND page of L2 Cache, |
| 1884 | * Otherwise, return FAIL. | 1884 | * Otherwise, return FAIL. |
| 1885 | */ | 1885 | */ |
| @@ -3989,7 +3989,7 @@ int GLOB_FTL_Block_Erase(u64 blk_addr) | |||
| 3989 | * Inputs: index to block that was just incremented and is at the max | 3989 | * Inputs: index to block that was just incremented and is at the max |
| 3990 | * Outputs: PASS=0 / FAIL=1 | 3990 | * Outputs: PASS=0 / FAIL=1 |
| 3991 | * Description: If any erase counts at MAX, adjusts erase count of every | 3991 | * Description: If any erase counts at MAX, adjusts erase count of every |
| 3992 | * block by substracting least worn | 3992 | * block by subtracting least worn |
| 3993 | * counter from counter value of every entry in wear table | 3993 | * counter from counter value of every entry in wear table |
| 3994 | *&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/ | 3994 | *&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/ |
| 3995 | static int FTL_Adjust_Relative_Erase_Count(u32 Index_of_MAX) | 3995 | static int FTL_Adjust_Relative_Erase_Count(u32 Index_of_MAX) |
diff --git a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c index d55a8e40318b..3e68d58fdffd 100644 --- a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +++ b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | |||
| @@ -71,7 +71,7 @@ | |||
| 71 | #define SYNAPTICS_RMI4_DEVICE_CONTROL_FUNC_NUM (0x01) | 71 | #define SYNAPTICS_RMI4_DEVICE_CONTROL_FUNC_NUM (0x01) |
| 72 | 72 | ||
| 73 | /** | 73 | /** |
| 74 | * struct synaptics_rmi4_fn_desc - contains the funtion descriptor information | 74 | * struct synaptics_rmi4_fn_desc - contains the function descriptor information |
| 75 | * @query_base_addr: base address for query | 75 | * @query_base_addr: base address for query |
| 76 | * @cmd_base_addr: base address for command | 76 | * @cmd_base_addr: base address for command |
| 77 | * @ctrl_base_addr: base address for control | 77 | * @ctrl_base_addr: base address for control |
| @@ -92,7 +92,7 @@ struct synaptics_rmi4_fn_desc { | |||
| 92 | }; | 92 | }; |
| 93 | 93 | ||
| 94 | /** | 94 | /** |
| 95 | * struct synaptics_rmi4_fn - contains the funtion information | 95 | * struct synaptics_rmi4_fn - contains the function information |
| 96 | * @fn_number: function number | 96 | * @fn_number: function number |
| 97 | * @num_of_data_sources: number of data sources | 97 | * @num_of_data_sources: number of data sources |
| 98 | * @num_of_data_points: number of fingers touched | 98 | * @num_of_data_points: number of fingers touched |
| @@ -151,7 +151,7 @@ struct synaptics_rmi4_device_info { | |||
| 151 | * @input_dev: pointer for input device | 151 | * @input_dev: pointer for input device |
| 152 | * @i2c_client: pointer for i2c client | 152 | * @i2c_client: pointer for i2c client |
| 153 | * @board: constant pointer for touch platform data | 153 | * @board: constant pointer for touch platform data |
| 154 | * @fn_list_mutex: mutex for funtion list | 154 | * @fn_list_mutex: mutex for function list |
| 155 | * @rmi4_page_mutex: mutex for rmi4 page | 155 | * @rmi4_page_mutex: mutex for rmi4 page |
| 156 | * @current_page: variable for integer | 156 | * @current_page: variable for integer |
| 157 | * @number_of_interrupt_register: interrupt registers count | 157 | * @number_of_interrupt_register: interrupt registers count |
| @@ -278,7 +278,7 @@ static int synaptics_rmi4_i2c_byte_write(struct synaptics_rmi4_data *pdata, | |||
| 278 | txbuf[0] = address & MASK_8BIT; | 278 | txbuf[0] = address & MASK_8BIT; |
| 279 | txbuf[1] = data; | 279 | txbuf[1] = data; |
| 280 | retval = i2c_master_send(pdata->i2c_client, txbuf, 2); | 280 | retval = i2c_master_send(pdata->i2c_client, txbuf, 2); |
| 281 | /* Add in retry on writes only in certian error return values */ | 281 | /* Add in retry on writes only in certain error return values */ |
| 282 | if (retval != 2) { | 282 | if (retval != 2) { |
| 283 | dev_err(&i2c->dev, "%s:failed:%d\n", __func__, retval); | 283 | dev_err(&i2c->dev, "%s:failed:%d\n", __func__, retval); |
| 284 | retval = -EIO; | 284 | retval = -EIO; |
| @@ -561,7 +561,7 @@ static int synpatics_rmi4_touchpad_detect(struct synaptics_rmi4_data *pdata, | |||
| 561 | } | 561 | } |
| 562 | /* | 562 | /* |
| 563 | * 2D data sources have only 3 bits for the number of fingers | 563 | * 2D data sources have only 3 bits for the number of fingers |
| 564 | * supported - so the encoding is a bit wierd. | 564 | * supported - so the encoding is a bit weird. |
| 565 | */ | 565 | */ |
| 566 | if ((queries[1] & MASK_3BIT) <= 4) | 566 | if ((queries[1] & MASK_3BIT) <= 4) |
| 567 | /* add 1 since zero based */ | 567 | /* add 1 since zero based */ |
| @@ -1027,7 +1027,7 @@ err_input: | |||
| 1027 | * synaptics_rmi4_remove() - Removes the i2c-client touchscreen driver | 1027 | * synaptics_rmi4_remove() - Removes the i2c-client touchscreen driver |
| 1028 | * @client: i2c client structure pointer | 1028 | * @client: i2c client structure pointer |
| 1029 | * | 1029 | * |
| 1030 | * This funtion uses to remove the i2c-client | 1030 | * This function uses to remove the i2c-client |
| 1031 | * touchscreen driver and returns integer. | 1031 | * touchscreen driver and returns integer. |
| 1032 | */ | 1032 | */ |
| 1033 | static int __devexit synaptics_rmi4_remove(struct i2c_client *client) | 1033 | static int __devexit synaptics_rmi4_remove(struct i2c_client *client) |
| @@ -1053,7 +1053,7 @@ static int __devexit synaptics_rmi4_remove(struct i2c_client *client) | |||
| 1053 | * synaptics_rmi4_suspend() - suspend the touch screen controller | 1053 | * synaptics_rmi4_suspend() - suspend the touch screen controller |
| 1054 | * @dev: pointer to device structure | 1054 | * @dev: pointer to device structure |
| 1055 | * | 1055 | * |
| 1056 | * This funtion is used to suspend the | 1056 | * This function is used to suspend the |
| 1057 | * touch panel controller and returns integer | 1057 | * touch panel controller and returns integer |
| 1058 | */ | 1058 | */ |
| 1059 | static int synaptics_rmi4_suspend(struct device *dev) | 1059 | static int synaptics_rmi4_suspend(struct device *dev) |
| @@ -1089,7 +1089,7 @@ static int synaptics_rmi4_suspend(struct device *dev) | |||
| 1089 | * synaptics_rmi4_resume() - resume the touch screen controller | 1089 | * synaptics_rmi4_resume() - resume the touch screen controller |
| 1090 | * @dev: pointer to device structure | 1090 | * @dev: pointer to device structure |
| 1091 | * | 1091 | * |
| 1092 | * This funtion is used to resume the touch panel | 1092 | * This function is used to resume the touch panel |
| 1093 | * controller and returns integer. | 1093 | * controller and returns integer. |
| 1094 | */ | 1094 | */ |
| 1095 | static int synaptics_rmi4_resume(struct device *dev) | 1095 | static int synaptics_rmi4_resume(struct device *dev) |
| @@ -1148,7 +1148,7 @@ static struct i2c_driver synaptics_rmi4_driver = { | |||
| 1148 | /** | 1148 | /** |
| 1149 | * synaptics_rmi4_init() - Initialize the touchscreen driver | 1149 | * synaptics_rmi4_init() - Initialize the touchscreen driver |
| 1150 | * | 1150 | * |
| 1151 | * This funtion uses to initializes the synaptics | 1151 | * This function uses to initializes the synaptics |
| 1152 | * touchscreen driver and returns integer. | 1152 | * touchscreen driver and returns integer. |
| 1153 | */ | 1153 | */ |
| 1154 | static int __init synaptics_rmi4_init(void) | 1154 | static int __init synaptics_rmi4_init(void) |
| @@ -1158,7 +1158,7 @@ static int __init synaptics_rmi4_init(void) | |||
| 1158 | /** | 1158 | /** |
| 1159 | * synaptics_rmi4_exit() - De-initialize the touchscreen driver | 1159 | * synaptics_rmi4_exit() - De-initialize the touchscreen driver |
| 1160 | * | 1160 | * |
| 1161 | * This funtion uses to de-initialize the synaptics | 1161 | * This function uses to de-initialize the synaptics |
| 1162 | * touchscreen driver and returns none. | 1162 | * touchscreen driver and returns none. |
| 1163 | */ | 1163 | */ |
| 1164 | static void __exit synaptics_rmi4_exit(void) | 1164 | static void __exit synaptics_rmi4_exit(void) |
diff --git a/drivers/staging/tidspbridge/core/_tiomap.h b/drivers/staging/tidspbridge/core/_tiomap.h index 1e0273e50d2b..7cb587103975 100644 --- a/drivers/staging/tidspbridge/core/_tiomap.h +++ b/drivers/staging/tidspbridge/core/_tiomap.h | |||
| @@ -366,7 +366,7 @@ extern s32 dsp_debug; | |||
| 366 | * ======== sm_interrupt_dsp ======== | 366 | * ======== sm_interrupt_dsp ======== |
| 367 | * Purpose: | 367 | * Purpose: |
| 368 | * Set interrupt value & send an interrupt to the DSP processor(s). | 368 | * Set interrupt value & send an interrupt to the DSP processor(s). |
| 369 | * This is typicaly used when mailbox interrupt mechanisms allow data | 369 | * This is typically used when mailbox interrupt mechanisms allow data |
| 370 | * to be associated with interrupt such as for OMAP's CMD/DATA regs. | 370 | * to be associated with interrupt such as for OMAP's CMD/DATA regs. |
| 371 | * Parameters: | 371 | * Parameters: |
| 372 | * dev_context: Handle to Bridge driver defined device info. | 372 | * dev_context: Handle to Bridge driver defined device info. |
diff --git a/drivers/staging/tidspbridge/core/chnl_sm.c b/drivers/staging/tidspbridge/core/chnl_sm.c index 8381130e1460..6d66e7d0fba8 100644 --- a/drivers/staging/tidspbridge/core/chnl_sm.c +++ b/drivers/staging/tidspbridge/core/chnl_sm.c | |||
| @@ -578,7 +578,7 @@ int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 timeout, | |||
| 578 | } else if (stat_sync == -EPERM) { | 578 | } else if (stat_sync == -EPERM) { |
| 579 | /* This can occur when the user mode thread is | 579 | /* This can occur when the user mode thread is |
| 580 | * aborted (^C), or when _VWIN32_WaitSingleObject() | 580 | * aborted (^C), or when _VWIN32_WaitSingleObject() |
| 581 | * fails due to unkown causes. */ | 581 | * fails due to unknown causes. */ |
| 582 | /* Even though Wait failed, there may be something in | 582 | /* Even though Wait failed, there may be something in |
| 583 | * the Q: */ | 583 | * the Q: */ |
| 584 | if (list_empty(&pchnl->io_completions)) { | 584 | if (list_empty(&pchnl->io_completions)) { |
diff --git a/drivers/staging/tidspbridge/dynload/cload.c b/drivers/staging/tidspbridge/dynload/cload.c index 390040984e03..5cecd237e3f6 100644 --- a/drivers/staging/tidspbridge/dynload/cload.c +++ b/drivers/staging/tidspbridge/dynload/cload.c | |||
| @@ -718,7 +718,7 @@ static void dload_symbols(struct dload_state *dlthis) | |||
| 718 | * as a temporary for .dllview record construction. | 718 | * as a temporary for .dllview record construction. |
| 719 | * Allocate storage for the whole table. Add 1 to the section count | 719 | * Allocate storage for the whole table. Add 1 to the section count |
| 720 | * in case a trampoline section is auto-generated as well as the | 720 | * in case a trampoline section is auto-generated as well as the |
| 721 | * size of the trampoline section name so DLLView doens't get lost. | 721 | * size of the trampoline section name so DLLView does't get lost. |
| 722 | */ | 722 | */ |
| 723 | 723 | ||
| 724 | siz = sym_count * sizeof(struct local_symbol); | 724 | siz = sym_count * sizeof(struct local_symbol); |
diff --git a/drivers/staging/tidspbridge/hw/hw_mmu.c b/drivers/staging/tidspbridge/hw/hw_mmu.c index 014f5d5293ae..c214df9b205e 100644 --- a/drivers/staging/tidspbridge/hw/hw_mmu.c +++ b/drivers/staging/tidspbridge/hw/hw_mmu.c | |||
| @@ -59,7 +59,7 @@ enum hw_mmu_page_size_t { | |||
| 59 | * RETURNS: | 59 | * RETURNS: |
| 60 | * | 60 | * |
| 61 | * Type : hw_status | 61 | * Type : hw_status |
| 62 | * Description : 0 -- No errors occured | 62 | * Description : 0 -- No errors occurred |
| 63 | * RET_BAD_NULL_PARAM -- A Pointer | 63 | * RET_BAD_NULL_PARAM -- A Pointer |
| 64 | * Paramater was set to NULL | 64 | * Paramater was set to NULL |
| 65 | * | 65 | * |
| @@ -102,7 +102,7 @@ static hw_status mmu_flush_entry(const void __iomem *base_address); | |||
| 102 | * RETURNS: | 102 | * RETURNS: |
| 103 | * | 103 | * |
| 104 | * Type : hw_status | 104 | * Type : hw_status |
| 105 | * Description : 0 -- No errors occured | 105 | * Description : 0 -- No errors occurred |
| 106 | * RET_BAD_NULL_PARAM -- A Pointer Paramater | 106 | * RET_BAD_NULL_PARAM -- A Pointer Paramater |
| 107 | * was set to NULL | 107 | * was set to NULL |
| 108 | * RET_PARAM_OUT_OF_RANGE -- Input Parameter out | 108 | * RET_PARAM_OUT_OF_RANGE -- Input Parameter out |
| @@ -147,7 +147,7 @@ static hw_status mmu_set_cam_entry(const void __iomem *base_address, | |||
| 147 | * RETURNS: | 147 | * RETURNS: |
| 148 | * | 148 | * |
| 149 | * Type : hw_status | 149 | * Type : hw_status |
| 150 | * Description : 0 -- No errors occured | 150 | * Description : 0 -- No errors occurred |
| 151 | * RET_BAD_NULL_PARAM -- A Pointer Paramater | 151 | * RET_BAD_NULL_PARAM -- A Pointer Paramater |
| 152 | * was set to NULL | 152 | * was set to NULL |
| 153 | * RET_PARAM_OUT_OF_RANGE -- Input Parameter | 153 | * RET_PARAM_OUT_OF_RANGE -- Input Parameter |
diff --git a/drivers/staging/tidspbridge/include/dspbridge/_chnl_sm.h b/drivers/staging/tidspbridge/include/dspbridge/_chnl_sm.h index d60e25258020..6e7ab4fd8c39 100644 --- a/drivers/staging/tidspbridge/include/dspbridge/_chnl_sm.h +++ b/drivers/staging/tidspbridge/include/dspbridge/_chnl_sm.h | |||
| @@ -144,7 +144,7 @@ struct chnl_object { | |||
| 144 | s8 chnl_mode; /* Chnl mode and attributes */ | 144 | s8 chnl_mode; /* Chnl mode and attributes */ |
| 145 | /* Chnl I/O completion event (user mode) */ | 145 | /* Chnl I/O completion event (user mode) */ |
| 146 | void *user_event; | 146 | void *user_event; |
| 147 | /* Abstract syncronization object */ | 147 | /* Abstract synchronization object */ |
| 148 | struct sync_object *sync_event; | 148 | struct sync_object *sync_event; |
| 149 | u32 process; /* Process which created this channel */ | 149 | u32 process; /* Process which created this channel */ |
| 150 | u32 cb_arg; /* Argument to use with callback */ | 150 | u32 cb_arg; /* Argument to use with callback */ |
| @@ -156,7 +156,7 @@ struct chnl_object { | |||
| 156 | struct list_head io_completions; | 156 | struct list_head io_completions; |
| 157 | struct list_head free_packets_list; /* List of free Irps */ | 157 | struct list_head free_packets_list; /* List of free Irps */ |
| 158 | struct ntfy_object *ntfy_obj; | 158 | struct ntfy_object *ntfy_obj; |
| 159 | u32 bytes_moved; /* Total number of bytes transfered */ | 159 | u32 bytes_moved; /* Total number of bytes transferred */ |
| 160 | 160 | ||
| 161 | /* For DSP-DMA */ | 161 | /* For DSP-DMA */ |
| 162 | 162 | ||
diff --git a/drivers/staging/tidspbridge/include/dspbridge/clk.h b/drivers/staging/tidspbridge/include/dspbridge/clk.h index b23950323421..685341c50693 100644 --- a/drivers/staging/tidspbridge/include/dspbridge/clk.h +++ b/drivers/staging/tidspbridge/include/dspbridge/clk.h | |||
| @@ -55,7 +55,7 @@ extern void dsp_clk_exit(void); | |||
| 55 | * Initializes private state of CLK module. | 55 | * Initializes private state of CLK module. |
| 56 | * Parameters: | 56 | * Parameters: |
| 57 | * Returns: | 57 | * Returns: |
| 58 | * TRUE if initialized; FALSE if error occured. | 58 | * TRUE if initialized; FALSE if error occurred. |
| 59 | * Requires: | 59 | * Requires: |
| 60 | * Ensures: | 60 | * Ensures: |
| 61 | * CLK initialized. | 61 | * CLK initialized. |
| @@ -71,7 +71,7 @@ void dsp_gpt_wait_overflow(short int clk_id, unsigned int load); | |||
| 71 | * Parameters: | 71 | * Parameters: |
| 72 | * Returns: | 72 | * Returns: |
| 73 | * 0: Success. | 73 | * 0: Success. |
| 74 | * -EPERM: Error occured while enabling the clock. | 74 | * -EPERM: Error occurred while enabling the clock. |
| 75 | * Requires: | 75 | * Requires: |
| 76 | * Ensures: | 76 | * Ensures: |
| 77 | */ | 77 | */ |
| @@ -86,7 +86,7 @@ u32 dsp_clock_enable_all(u32 dsp_per_clocks); | |||
| 86 | * Parameters: | 86 | * Parameters: |
| 87 | * Returns: | 87 | * Returns: |
| 88 | * 0: Success. | 88 | * 0: Success. |
| 89 | * -EPERM: Error occured while disabling the clock. | 89 | * -EPERM: Error occurred while disabling the clock. |
| 90 | * Requires: | 90 | * Requires: |
| 91 | * Ensures: | 91 | * Ensures: |
| 92 | */ | 92 | */ |
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cmm.h b/drivers/staging/tidspbridge/include/dspbridge/cmm.h index 27a21b5f3ff0..aff22051cf57 100644 --- a/drivers/staging/tidspbridge/include/dspbridge/cmm.h +++ b/drivers/staging/tidspbridge/include/dspbridge/cmm.h | |||
| @@ -190,7 +190,7 @@ extern int cmm_get_info(struct cmm_object *hcmm_mgr, | |||
| 190 | * Initializes private state of CMM module. | 190 | * Initializes private state of CMM module. |
| 191 | * Parameters: | 191 | * Parameters: |
| 192 | * Returns: | 192 | * Returns: |
| 193 | * TRUE if initialized; FALSE if error occured. | 193 | * TRUE if initialized; FALSE if error occurred. |
| 194 | * Requires: | 194 | * Requires: |
| 195 | * Ensures: | 195 | * Ensures: |
| 196 | * CMM initialized. | 196 | * CMM initialized. |
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cod.h b/drivers/staging/tidspbridge/include/dspbridge/cod.h index 53bd4bb8b0bb..cb684c11b302 100644 --- a/drivers/staging/tidspbridge/include/dspbridge/cod.h +++ b/drivers/staging/tidspbridge/include/dspbridge/cod.h | |||
| @@ -249,7 +249,7 @@ extern int cod_get_sym_value(struct cod_manager *cod_mgr_obj, | |||
| 249 | * Parameters: | 249 | * Parameters: |
| 250 | * None. | 250 | * None. |
| 251 | * Returns: | 251 | * Returns: |
| 252 | * TRUE if initialized; FALSE if error occured. | 252 | * TRUE if initialized; FALSE if error occurred. |
| 253 | * Requires: | 253 | * Requires: |
| 254 | * Ensures: | 254 | * Ensures: |
| 255 | * A requirement for each of the other public COD functions. | 255 | * A requirement for each of the other public COD functions. |
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dev.h b/drivers/staging/tidspbridge/include/dspbridge/dev.h index f41e4783157f..f92b4be0b413 100644 --- a/drivers/staging/tidspbridge/include/dspbridge/dev.h +++ b/drivers/staging/tidspbridge/include/dspbridge/dev.h | |||
| @@ -497,7 +497,7 @@ extern void dev_exit(void); | |||
| 497 | * Initialize DEV's private state, keeping a reference count on each call. | 497 | * Initialize DEV's private state, keeping a reference count on each call. |
| 498 | * Parameters: | 498 | * Parameters: |
| 499 | * Returns: | 499 | * Returns: |
| 500 | * TRUE if initialized; FALSE if error occured. | 500 | * TRUE if initialized; FALSE if error occurred. |
| 501 | * Requires: | 501 | * Requires: |
| 502 | * Ensures: | 502 | * Ensures: |
| 503 | * TRUE: A requirement for the other public DEV functions. | 503 | * TRUE: A requirement for the other public DEV functions. |
diff --git a/drivers/staging/tidspbridge/include/dspbridge/drv.h b/drivers/staging/tidspbridge/include/dspbridge/drv.h index 25ef1a2c58eb..9cdbd955dce9 100644 --- a/drivers/staging/tidspbridge/include/dspbridge/drv.h +++ b/drivers/staging/tidspbridge/include/dspbridge/drv.h | |||
| @@ -154,7 +154,7 @@ struct process_context { | |||
| 154 | * Parameters: | 154 | * Parameters: |
| 155 | * drv_obj: Location to store created DRV Object handle. | 155 | * drv_obj: Location to store created DRV Object handle. |
| 156 | * Returns: | 156 | * Returns: |
| 157 | * 0: Sucess | 157 | * 0: Success |
| 158 | * -ENOMEM: Failed in Memory allocation | 158 | * -ENOMEM: Failed in Memory allocation |
| 159 | * -EPERM: General Failure | 159 | * -EPERM: General Failure |
| 160 | * Requires: | 160 | * Requires: |
| @@ -170,7 +170,7 @@ struct process_context { | |||
| 170 | * There is one Driver Object for the Driver representing | 170 | * There is one Driver Object for the Driver representing |
| 171 | * the driver itself. It contains the list of device | 171 | * the driver itself. It contains the list of device |
| 172 | * Objects and the list of Device Extensions in the system. | 172 | * Objects and the list of Device Extensions in the system. |
| 173 | * Also it can hold other neccessary | 173 | * Also it can hold other necessary |
| 174 | * information in its storage area. | 174 | * information in its storage area. |
| 175 | */ | 175 | */ |
| 176 | extern int drv_create(struct drv_object **drv_obj); | 176 | extern int drv_create(struct drv_object **drv_obj); |
| @@ -180,7 +180,7 @@ extern int drv_create(struct drv_object **drv_obj); | |||
| 180 | * Purpose: | 180 | * Purpose: |
| 181 | * destroys the Dev Object list, DrvExt list | 181 | * destroys the Dev Object list, DrvExt list |
| 182 | * and destroy the DRV object | 182 | * and destroy the DRV object |
| 183 | * Called upon driver unLoading.or unsuccesful loading of the driver. | 183 | * Called upon driver unLoading.or unsuccessful loading of the driver. |
| 184 | * Parameters: | 184 | * Parameters: |
| 185 | * driver_obj: Handle to Driver object . | 185 | * driver_obj: Handle to Driver object . |
| 186 | * Returns: | 186 | * Returns: |
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h index c2ba26c09308..ed32bf383132 100644 --- a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h +++ b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h | |||
| @@ -52,7 +52,7 @@ struct bridge_dev_context; | |||
| 52 | * dev_ctxt: Handle to Bridge driver defined device context. | 52 | * dev_ctxt: Handle to Bridge driver defined device context. |
| 53 | * Returns: | 53 | * Returns: |
| 54 | * 0: Success. | 54 | * 0: Success. |
| 55 | * -ETIMEDOUT: Timeout occured waiting for a response from hardware. | 55 | * -ETIMEDOUT: Timeout occurred waiting for a response from hardware. |
| 56 | * -EPERM: Other, unspecified error. | 56 | * -EPERM: Other, unspecified error. |
| 57 | * Requires: | 57 | * Requires: |
| 58 | * dev_ctxt != NULL | 58 | * dev_ctxt != NULL |
| @@ -91,7 +91,7 @@ typedef int(*fxn_brd_setstate) (struct bridge_dev_context | |||
| 91 | * dsp_addr: DSP address at which to start execution. | 91 | * dsp_addr: DSP address at which to start execution. |
| 92 | * Returns: | 92 | * Returns: |
| 93 | * 0: Success. | 93 | * 0: Success. |
| 94 | * -ETIMEDOUT: Timeout occured waiting for a response from hardware. | 94 | * -ETIMEDOUT: Timeout occurred waiting for a response from hardware. |
| 95 | * -EPERM: Other, unspecified error. | 95 | * -EPERM: Other, unspecified error. |
| 96 | * Requires: | 96 | * Requires: |
| 97 | * dev_ctxt != NULL | 97 | * dev_ctxt != NULL |
| @@ -142,7 +142,7 @@ typedef int(*fxn_brd_memcopy) (struct bridge_dev_context | |||
| 142 | * mem_type: Memory space on DSP to which to transfer. | 142 | * mem_type: Memory space on DSP to which to transfer. |
| 143 | * Returns: | 143 | * Returns: |
| 144 | * 0: Success. | 144 | * 0: Success. |
| 145 | * -ETIMEDOUT: Timeout occured waiting for a response from hardware. | 145 | * -ETIMEDOUT: Timeout occurred waiting for a response from hardware. |
| 146 | * -EPERM: Other, unspecified error. | 146 | * -EPERM: Other, unspecified error. |
| 147 | * Requires: | 147 | * Requires: |
| 148 | * dev_ctxt != NULL; | 148 | * dev_ctxt != NULL; |
| @@ -205,7 +205,7 @@ typedef int(*fxn_brd_memunmap) (struct bridge_dev_context | |||
| 205 | * dev_ctxt: Handle to Bridge driver defined device context. | 205 | * dev_ctxt: Handle to Bridge driver defined device context. |
| 206 | * Returns: | 206 | * Returns: |
| 207 | * 0: Success. | 207 | * 0: Success. |
| 208 | * -ETIMEDOUT: Timeout occured waiting for a response from hardware. | 208 | * -ETIMEDOUT: Timeout occurred waiting for a response from hardware. |
| 209 | * -EPERM: Other, unspecified error. | 209 | * -EPERM: Other, unspecified error. |
| 210 | * Requires: | 210 | * Requires: |
| 211 | * dev_ctxt != NULL | 211 | * dev_ctxt != NULL |
| @@ -248,7 +248,7 @@ typedef int(*fxn_brd_status) (struct bridge_dev_context *dev_ctxt, | |||
| 248 | * mem_type: Memory space on DSP from which to transfer. | 248 | * mem_type: Memory space on DSP from which to transfer. |
| 249 | * Returns: | 249 | * Returns: |
| 250 | * 0: Success. | 250 | * 0: Success. |
| 251 | * -ETIMEDOUT: Timeout occured waiting for a response from hardware. | 251 | * -ETIMEDOUT: Timeout occurred waiting for a response from hardware. |
| 252 | * -EPERM: Other, unspecified error. | 252 | * -EPERM: Other, unspecified error. |
| 253 | * Requires: | 253 | * Requires: |
| 254 | * dev_ctxt != NULL; | 254 | * dev_ctxt != NULL; |
| @@ -274,7 +274,7 @@ typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt, | |||
| 274 | * mem_type: Memory space on DSP to which to transfer. | 274 | * mem_type: Memory space on DSP to which to transfer. |
| 275 | * Returns: | 275 | * Returns: |
| 276 | * 0: Success. | 276 | * 0: Success. |
| 277 | * -ETIMEDOUT: Timeout occured waiting for a response from hardware. | 277 | * -ETIMEDOUT: Timeout occurred waiting for a response from hardware. |
| 278 | * -EPERM: Other, unspecified error. | 278 | * -EPERM: Other, unspecified error. |
| 279 | * Requires: | 279 | * Requires: |
| 280 | * dev_ctxt != NULL; | 280 | * dev_ctxt != NULL; |
| @@ -601,7 +601,7 @@ typedef int(*fxn_chnl_getmgrinfo) (struct chnl_mgr | |||
| 601 | * Returns: | 601 | * Returns: |
| 602 | * 0: Success; | 602 | * 0: Success; |
| 603 | * -EFAULT: Invalid chnl_obj. | 603 | * -EFAULT: Invalid chnl_obj. |
| 604 | * -ETIMEDOUT: Timeout occured before channel could be idled. | 604 | * -ETIMEDOUT: Timeout occurred before channel could be idled. |
| 605 | * Requires: | 605 | * Requires: |
| 606 | * Ensures: | 606 | * Ensures: |
| 607 | */ | 607 | */ |
diff --git a/drivers/staging/tidspbridge/include/dspbridge/mgr.h b/drivers/staging/tidspbridge/include/dspbridge/mgr.h index e506c4d49472..47b0318430e1 100644 --- a/drivers/staging/tidspbridge/include/dspbridge/mgr.h +++ b/drivers/staging/tidspbridge/include/dspbridge/mgr.h | |||
| @@ -176,7 +176,7 @@ extern void mgr_exit(void); | |||
| 176 | * mgr_handle: Handle to the Manager Object | 176 | * mgr_handle: Handle to the Manager Object |
| 177 | * dcd_handle: Ptr to receive the DCD Handle. | 177 | * dcd_handle: Ptr to receive the DCD Handle. |
| 178 | * Returns: | 178 | * Returns: |
| 179 | * 0: Sucess | 179 | * 0: Success |
| 180 | * -EPERM: Failure to get the Handle | 180 | * -EPERM: Failure to get the Handle |
| 181 | * Requires: | 181 | * Requires: |
| 182 | * MGR is initialized. | 182 | * MGR is initialized. |
| @@ -195,7 +195,7 @@ extern int mgr_get_dcd_handle(struct mgr_object | |||
| 195 | * call. Initializes the DCD. | 195 | * call. Initializes the DCD. |
| 196 | * Parameters: | 196 | * Parameters: |
| 197 | * Returns: | 197 | * Returns: |
| 198 | * TRUE if initialized; FALSE if error occured. | 198 | * TRUE if initialized; FALSE if error occurred. |
| 199 | * Requires: | 199 | * Requires: |
| 200 | * Ensures: | 200 | * Ensures: |
| 201 | * TRUE: A requirement for the other public MGR functions. | 201 | * TRUE: A requirement for the other public MGR functions. |
diff --git a/drivers/staging/tidspbridge/include/dspbridge/node.h b/drivers/staging/tidspbridge/include/dspbridge/node.h index 53da0ef483c8..16371d818e3d 100644 --- a/drivers/staging/tidspbridge/include/dspbridge/node.h +++ b/drivers/staging/tidspbridge/include/dspbridge/node.h | |||
| @@ -44,7 +44,7 @@ | |||
| 44 | * -ESPIPE: iAlg functions not found for a DAIS node. | 44 | * -ESPIPE: iAlg functions not found for a DAIS node. |
| 45 | * -EDOM: attr_in != NULL and attr_in->prio out of | 45 | * -EDOM: attr_in != NULL and attr_in->prio out of |
| 46 | * range. | 46 | * range. |
| 47 | * -EPERM: A failure occured, unable to allocate node. | 47 | * -EPERM: A failure occurred, unable to allocate node. |
| 48 | * -EBADR: Proccessor is not in the running state. | 48 | * -EBADR: Proccessor is not in the running state. |
| 49 | * Requires: | 49 | * Requires: |
| 50 | * node_init(void) called. | 50 | * node_init(void) called. |
diff --git a/drivers/staging/tidspbridge/include/dspbridge/proc.h b/drivers/staging/tidspbridge/include/dspbridge/proc.h index 5e09fd165d9d..f00dffd51989 100644 --- a/drivers/staging/tidspbridge/include/dspbridge/proc.h +++ b/drivers/staging/tidspbridge/include/dspbridge/proc.h | |||
| @@ -89,7 +89,7 @@ extern int proc_auto_start(struct cfg_devnode *dev_node_obj, | |||
| 89 | * Returns: | 89 | * Returns: |
| 90 | * 0 : SUCCESS | 90 | * 0 : SUCCESS |
| 91 | * -EFAULT : Invalid processor handle. | 91 | * -EFAULT : Invalid processor handle. |
| 92 | * -ETIME: A Timeout Occured before the Control information | 92 | * -ETIME: A Timeout Occurred before the Control information |
| 93 | * could be sent. | 93 | * could be sent. |
| 94 | * -EPERM : General Failure. | 94 | * -EPERM : General Failure. |
| 95 | * Requires: | 95 | * Requires: |
| @@ -169,7 +169,7 @@ extern int proc_enum_nodes(void *hprocessor, | |||
| 169 | * 0 : Success. | 169 | * 0 : Success. |
| 170 | * -EFAULT : Invalid processor handle. | 170 | * -EFAULT : Invalid processor handle. |
| 171 | * -EBADR: The processor is not in the PROC_RUNNING state. | 171 | * -EBADR: The processor is not in the PROC_RUNNING state. |
| 172 | * -ETIME: A timeout occured before the DSP responded to the | 172 | * -ETIME: A timeout occurred before the DSP responded to the |
| 173 | * querry. | 173 | * querry. |
| 174 | * -EPERM : Unable to get Resource Information | 174 | * -EPERM : Unable to get Resource Information |
| 175 | * Requires: | 175 | * Requires: |
| @@ -229,7 +229,7 @@ extern int proc_get_dev_object(void *hprocessor, | |||
| 229 | * call. | 229 | * call. |
| 230 | * Parameters: | 230 | * Parameters: |
| 231 | * Returns: | 231 | * Returns: |
| 232 | * TRUE if initialized; FALSE if error occured. | 232 | * TRUE if initialized; FALSE if error occurred. |
| 233 | * Requires: | 233 | * Requires: |
| 234 | * Ensures: | 234 | * Ensures: |
| 235 | * TRUE: A requirement for the other public PROC functions. | 235 | * TRUE: A requirement for the other public PROC functions. |
diff --git a/drivers/staging/tidspbridge/include/dspbridge/pwr.h b/drivers/staging/tidspbridge/include/dspbridge/pwr.h index 5e3ab2123aaa..0fb066488da9 100644 --- a/drivers/staging/tidspbridge/include/dspbridge/pwr.h +++ b/drivers/staging/tidspbridge/include/dspbridge/pwr.h | |||
| @@ -46,7 +46,7 @@ | |||
| 46 | * 0: Success. | 46 | * 0: Success. |
| 47 | * 0: Success, but the DSP was already asleep. | 47 | * 0: Success, but the DSP was already asleep. |
| 48 | * -EINVAL: The specified sleep_code is not supported. | 48 | * -EINVAL: The specified sleep_code is not supported. |
| 49 | * -ETIME: A timeout occured while waiting for DSP sleep | 49 | * -ETIME: A timeout occurred while waiting for DSP sleep |
| 50 | * confirmation. | 50 | * confirmation. |
| 51 | * -EPERM: General failure, unable to send sleep command to | 51 | * -EPERM: General failure, unable to send sleep command to |
| 52 | * the DSP. | 52 | * the DSP. |
| @@ -67,7 +67,7 @@ extern int pwr_sleep_dsp(const u32 sleep_code, const u32 timeout); | |||
| 67 | * Returns: | 67 | * Returns: |
| 68 | * 0: Success. | 68 | * 0: Success. |
| 69 | * 0: Success, but the DSP was already awake. | 69 | * 0: Success, but the DSP was already awake. |
| 70 | * -ETIME: A timeout occured while waiting for wake | 70 | * -ETIME: A timeout occurred while waiting for wake |
| 71 | * confirmation. | 71 | * confirmation. |
| 72 | * -EPERM: General failure, unable to send wake command to | 72 | * -EPERM: General failure, unable to send wake command to |
| 73 | * the DSP. | 73 | * the DSP. |
| @@ -85,7 +85,7 @@ extern int pwr_wake_dsp(const u32 timeout); | |||
| 85 | * Returns: | 85 | * Returns: |
| 86 | * 0: Success. | 86 | * 0: Success. |
| 87 | * 0: Success, but the DSP was already awake. | 87 | * 0: Success, but the DSP was already awake. |
| 88 | * -ETIME: A timeout occured while waiting for wake | 88 | * -ETIME: A timeout occurred while waiting for wake |
| 89 | * confirmation. | 89 | * confirmation. |
| 90 | * -EPERM: General failure, unable to send wake command to | 90 | * -EPERM: General failure, unable to send wake command to |
| 91 | * the DSP. | 91 | * the DSP. |
| @@ -103,7 +103,7 @@ extern int pwr_pm_pre_scale(u16 voltage_domain, u32 level); | |||
| 103 | * Returns: | 103 | * Returns: |
| 104 | * 0: Success. | 104 | * 0: Success. |
| 105 | * 0: Success, but the DSP was already awake. | 105 | * 0: Success, but the DSP was already awake. |
| 106 | * -ETIME: A timeout occured while waiting for wake | 106 | * -ETIME: A timeout occurred while waiting for wake |
| 107 | * confirmation. | 107 | * confirmation. |
| 108 | * -EPERM: General failure, unable to send wake command to | 108 | * -EPERM: General failure, unable to send wake command to |
| 109 | * the DSP. | 109 | * the DSP. |
diff --git a/drivers/staging/tidspbridge/pmgr/dev.c b/drivers/staging/tidspbridge/pmgr/dev.c index 9a38d86a84a0..522810bc7427 100644 --- a/drivers/staging/tidspbridge/pmgr/dev.c +++ b/drivers/staging/tidspbridge/pmgr/dev.c | |||
| @@ -787,7 +787,7 @@ int dev_notify_clients(struct dev_object *dev_obj, u32 ret) | |||
| 787 | 787 | ||
| 788 | /* | 788 | /* |
| 789 | * FIXME: this code needs struct proc_object to have a list_head | 789 | * FIXME: this code needs struct proc_object to have a list_head |
| 790 | * at the begining. If not, this can go horribly wrong. | 790 | * at the beginning. If not, this can go horribly wrong. |
| 791 | */ | 791 | */ |
| 792 | list_for_each(curr, &dev_obj->proc_list) | 792 | list_for_each(curr, &dev_obj->proc_list) |
| 793 | proc_notify_clients((void *)curr, ret); | 793 | proc_notify_clients((void *)curr, ret); |
| @@ -810,7 +810,7 @@ int dev_remove_device(struct cfg_devnode *dev_node_obj) | |||
| 810 | if (!dev_node_obj) | 810 | if (!dev_node_obj) |
| 811 | status = -EFAULT; | 811 | status = -EFAULT; |
| 812 | 812 | ||
| 813 | /* Retrieve the device object handle originaly stored with | 813 | /* Retrieve the device object handle originally stored with |
| 814 | * the dev_node: */ | 814 | * the dev_node: */ |
| 815 | if (!status) { | 815 | if (!status) { |
| 816 | /* check the device string and then store dev object */ | 816 | /* check the device string and then store dev object */ |
| @@ -986,7 +986,7 @@ int dev_insert_proc_object(struct dev_object *hdev_obj, | |||
| 986 | /* Add DevObject to tail. */ | 986 | /* Add DevObject to tail. */ |
| 987 | /* | 987 | /* |
| 988 | * FIXME: this code needs struct proc_object to have a list_head | 988 | * FIXME: this code needs struct proc_object to have a list_head |
| 989 | * at the begining. If not, this can go horribly wrong. | 989 | * at the beginning. If not, this can go horribly wrong. |
| 990 | */ | 990 | */ |
| 991 | list_add_tail((struct list_head *)proc_obj, &dev_obj->proc_list); | 991 | list_add_tail((struct list_head *)proc_obj, &dev_obj->proc_list); |
| 992 | 992 | ||
diff --git a/drivers/staging/tidspbridge/rmgr/drv.c b/drivers/staging/tidspbridge/rmgr/drv.c index 8c88583364eb..db8215f540d8 100644 --- a/drivers/staging/tidspbridge/rmgr/drv.c +++ b/drivers/staging/tidspbridge/rmgr/drv.c | |||
| @@ -609,7 +609,7 @@ int drv_request_resources(u32 dw_context, u32 *dev_node_strg) | |||
| 609 | DBC_REQUIRE(dev_node_strg != NULL); | 609 | DBC_REQUIRE(dev_node_strg != NULL); |
| 610 | 610 | ||
| 611 | /* | 611 | /* |
| 612 | * Allocate memory to hold the string. This will live untill | 612 | * Allocate memory to hold the string. This will live until |
| 613 | * it is freed in the Release resources. Update the driver object | 613 | * it is freed in the Release resources. Update the driver object |
| 614 | * list. | 614 | * list. |
| 615 | */ | 615 | */ |
diff --git a/drivers/staging/tidspbridge/rmgr/nldr.c b/drivers/staging/tidspbridge/rmgr/nldr.c index fb5c2ba01d47..0e70cba15ebc 100644 --- a/drivers/staging/tidspbridge/rmgr/nldr.c +++ b/drivers/staging/tidspbridge/rmgr/nldr.c | |||
| @@ -57,9 +57,9 @@ | |||
| 57 | * uuuuuuuu|fueeeeee|fudddddd|fucccccc| | 57 | * uuuuuuuu|fueeeeee|fudddddd|fucccccc| |
| 58 | * where | 58 | * where |
| 59 | * u = unused | 59 | * u = unused |
| 60 | * cccccc = prefered/required dynamic mem segid for create phase data/code | 60 | * cccccc = preferred/required dynamic mem segid for create phase data/code |
| 61 | * dddddd = prefered/required dynamic mem segid for delete phase data/code | 61 | * dddddd = preferred/required dynamic mem segid for delete phase data/code |
| 62 | * eeeeee = prefered/req. dynamic mem segid for execute phase data/code | 62 | * eeeeee = preferred/req. dynamic mem segid for execute phase data/code |
| 63 | * f = flag indicating if memory is preferred or required: | 63 | * f = flag indicating if memory is preferred or required: |
| 64 | * f = 1 if required, f = 0 if preferred. | 64 | * f = 1 if required, f = 0 if preferred. |
| 65 | * | 65 | * |
diff --git a/drivers/staging/tidspbridge/rmgr/proc.c b/drivers/staging/tidspbridge/rmgr/proc.c index c4e5c4e0d71c..242dd1399996 100644 --- a/drivers/staging/tidspbridge/rmgr/proc.c +++ b/drivers/staging/tidspbridge/rmgr/proc.c | |||
| @@ -1670,7 +1670,7 @@ int proc_stop(void *hprocessor) | |||
| 1670 | if (!status) { | 1670 | if (!status) { |
| 1671 | dev_dbg(bridge, "%s: processor in standby mode\n", __func__); | 1671 | dev_dbg(bridge, "%s: processor in standby mode\n", __func__); |
| 1672 | p_proc_object->proc_state = PROC_STOPPED; | 1672 | p_proc_object->proc_state = PROC_STOPPED; |
| 1673 | /* Destory the Node Manager, msg_ctrl Manager */ | 1673 | /* Destroy the Node Manager, msg_ctrl Manager */ |
| 1674 | if (!(dev_destroy2(p_proc_object->dev_obj))) { | 1674 | if (!(dev_destroy2(p_proc_object->dev_obj))) { |
| 1675 | /* Destroy the msg_ctrl by calling msg_delete */ | 1675 | /* Destroy the msg_ctrl by calling msg_delete */ |
| 1676 | dev_get_msg_mgr(p_proc_object->dev_obj, &hmsg_mgr); | 1676 | dev_get_msg_mgr(p_proc_object->dev_obj, &hmsg_mgr); |
| @@ -1827,7 +1827,7 @@ static int proc_monitor(struct proc_object *proc_obj) | |||
| 1827 | 1827 | ||
| 1828 | /* This is needed only when Device is loaded when it is | 1828 | /* This is needed only when Device is loaded when it is |
| 1829 | * already 'ACTIVE' */ | 1829 | * already 'ACTIVE' */ |
| 1830 | /* Destory the Node Manager, msg_ctrl Manager */ | 1830 | /* Destroy the Node Manager, msg_ctrl Manager */ |
| 1831 | if (!dev_destroy2(proc_obj->dev_obj)) { | 1831 | if (!dev_destroy2(proc_obj->dev_obj)) { |
| 1832 | /* Destroy the msg_ctrl by calling msg_delete */ | 1832 | /* Destroy the msg_ctrl by calling msg_delete */ |
| 1833 | dev_get_msg_mgr(proc_obj->dev_obj, &hmsg_mgr); | 1833 | dev_get_msg_mgr(proc_obj->dev_obj, &hmsg_mgr); |
diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index c80a316d9d8f..17db6684abbe 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c | |||
| @@ -182,7 +182,7 @@ static inline void get_next_buf(struct tm6000_dmaqueue *dma_q, | |||
| 182 | if (!buf) | 182 | if (!buf) |
| 183 | return; | 183 | return; |
| 184 | 184 | ||
| 185 | /* Cleans up buffer - Usefull for testing for frame/URB loss */ | 185 | /* Cleans up buffer - Useful for testing for frame/URB loss */ |
| 186 | outp = videobuf_to_vmalloc(&(*buf)->vb); | 186 | outp = videobuf_to_vmalloc(&(*buf)->vb); |
| 187 | 187 | ||
| 188 | return; | 188 | return; |
diff --git a/drivers/staging/tty/cd1865.h b/drivers/staging/tty/cd1865.h index 9940966e7a1d..8c2ad654b79d 100644 --- a/drivers/staging/tty/cd1865.h +++ b/drivers/staging/tty/cd1865.h | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * Please DO contact io8-linux@specialix.co.uk if you require | 9 | * Please DO contact io8-linux@specialix.co.uk if you require |
| 10 | * support. | 10 | * support. |
| 11 | * | 11 | * |
| 12 | * This driver was developped in the BitWizard linux device | 12 | * This driver was developed in the BitWizard linux device |
| 13 | * driver service. If you require a linux device driver for your | 13 | * driver service. If you require a linux device driver for your |
| 14 | * product, please contact devices@BitWizard.nl for a quote. | 14 | * product, please contact devices@BitWizard.nl for a quote. |
| 15 | * | 15 | * |
diff --git a/drivers/staging/tty/epca.c b/drivers/staging/tty/epca.c index 7ad3638967ae..7f1369e5b418 100644 --- a/drivers/staging/tty/epca.c +++ b/drivers/staging/tty/epca.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | ** This driver is no longer supported by Digi ** | 7 | ** This driver is no longer supported by Digi ** |
| 8 | 8 | ||
| 9 | Much of this design and code came from epca.c which was | 9 | Much of this design and code came from epca.c which was |
| 10 | copyright (C) 1994, 1995 Troy De Jongh, and subsquently | 10 | copyright (C) 1994, 1995 Troy De Jongh, and subsequently |
| 11 | modified by David Nugent, Christoph Lameter, Mike McLagan. | 11 | modified by David Nugent, Christoph Lameter, Mike McLagan. |
| 12 | 12 | ||
| 13 | This program is free software; you can redistribute it and/or modify | 13 | This program is free software; you can redistribute it and/or modify |
| @@ -471,7 +471,7 @@ static void shutdown(struct channel *ch, struct tty_struct *tty) | |||
| 471 | memoff(ch); | 471 | memoff(ch); |
| 472 | 472 | ||
| 473 | /* | 473 | /* |
| 474 | * The channel has officialy been closed. The next time it is opened it | 474 | * The channel has officially been closed. The next time it is opened it |
| 475 | * will have to reinitialized. Set a flag to indicate this. | 475 | * will have to reinitialized. Set a flag to indicate this. |
| 476 | */ | 476 | */ |
| 477 | /* Prevent future Digi programmed interrupts from coming active */ | 477 | /* Prevent future Digi programmed interrupts from coming active */ |
| @@ -975,7 +975,7 @@ static int __init pc_init(void) | |||
| 975 | 975 | ||
| 976 | /* | 976 | /* |
| 977 | * Note : If lilo was used to configure the driver and the ignore | 977 | * Note : If lilo was used to configure the driver and the ignore |
| 978 | * epcaconfig option was choosen (digiepca=2) then nbdevs and num_cards | 978 | * epcaconfig option was chosen (digiepca=2) then nbdevs and num_cards |
| 979 | * will equal 0 at this point. This is okay; PCI cards will still be | 979 | * will equal 0 at this point. This is okay; PCI cards will still be |
| 980 | * picked up if detected. | 980 | * picked up if detected. |
| 981 | */ | 981 | */ |
| @@ -1230,14 +1230,14 @@ static void post_fep_init(unsigned int crd) | |||
| 1230 | memaddr = bd->re_map_membase; | 1230 | memaddr = bd->re_map_membase; |
| 1231 | 1231 | ||
| 1232 | /* | 1232 | /* |
| 1233 | * The below assignment will set bc to point at the BEGINING of the | 1233 | * The below assignment will set bc to point at the BEGINNING of the |
| 1234 | * cards channel structures. For 1 card there will be between 8 and 64 | 1234 | * cards channel structures. For 1 card there will be between 8 and 64 |
| 1235 | * of these structures. | 1235 | * of these structures. |
| 1236 | */ | 1236 | */ |
| 1237 | bc = memaddr + CHANSTRUCT; | 1237 | bc = memaddr + CHANSTRUCT; |
| 1238 | 1238 | ||
| 1239 | /* | 1239 | /* |
| 1240 | * The below assignment will set gd to point at the BEGINING of global | 1240 | * The below assignment will set gd to point at the BEGINNING of global |
| 1241 | * memory address 0xc00. The first data in that global memory actually | 1241 | * memory address 0xc00. The first data in that global memory actually |
| 1242 | * starts at address 0xc1a. The command in pointer begins at 0xd10. | 1242 | * starts at address 0xc1a. The command in pointer begins at 0xd10. |
| 1243 | */ | 1243 | */ |
| @@ -1492,7 +1492,7 @@ static void doevent(int crd) | |||
| 1492 | /* | 1492 | /* |
| 1493 | * The two assignments below get the current modem status | 1493 | * The two assignments below get the current modem status |
| 1494 | * (mstat) and the previous modem status (lstat). These are | 1494 | * (mstat) and the previous modem status (lstat). These are |
| 1495 | * useful becuase an event could signal a change in modem | 1495 | * useful because an event could signal a change in modem |
| 1496 | * signals itself. | 1496 | * signals itself. |
| 1497 | */ | 1497 | */ |
| 1498 | mstat = readb(eventbuf + 2); | 1498 | mstat = readb(eventbuf + 2); |
| @@ -1897,7 +1897,7 @@ static void receive_data(struct channel *ch, struct tty_struct *tty) | |||
| 1897 | /* | 1897 | /* |
| 1898 | * Even if head has wrapped around only report the amount of | 1898 | * Even if head has wrapped around only report the amount of |
| 1899 | * data to be equal to the size - tail. Remember memcpy can't | 1899 | * data to be equal to the size - tail. Remember memcpy can't |
| 1900 | * automaticly wrap around the receive buffer. | 1900 | * automatically wrap around the receive buffer. |
| 1901 | */ | 1901 | */ |
| 1902 | dataToRead = (wrapgap < bytesAvailable) ? wrapgap | 1902 | dataToRead = (wrapgap < bytesAvailable) ? wrapgap |
| 1903 | : bytesAvailable; | 1903 | : bytesAvailable; |
| @@ -2543,7 +2543,7 @@ static void __init epca_setup(char *str, int *ints) | |||
| 2543 | break; | 2543 | break; |
| 2544 | /* | 2544 | /* |
| 2545 | * If the index incremented above refers to a | 2545 | * If the index incremented above refers to a |
| 2546 | * legitamate board type set it here. | 2546 | * legitimate board type set it here. |
| 2547 | */ | 2547 | */ |
| 2548 | if (index < EPCA_NUM_TYPES) | 2548 | if (index < EPCA_NUM_TYPES) |
| 2549 | board.type = loop; | 2549 | board.type = loop; |
diff --git a/drivers/staging/tty/ip2/i2hw.h b/drivers/staging/tty/ip2/i2hw.h index c0ba6c05f0cd..8df2f487217a 100644 --- a/drivers/staging/tty/ip2/i2hw.h +++ b/drivers/staging/tty/ip2/i2hw.h | |||
| @@ -335,7 +335,7 @@ be off by a factor of five. The important point is that the first command reset | |||
| 335 | in fact generates a reset pulse on the board. This pulse is guaranteed to last | 335 | in fact generates a reset pulse on the board. This pulse is guaranteed to last |
| 336 | less than 10 milliseconds. The additional delay ensures the 1400 has had the | 336 | less than 10 milliseconds. The additional delay ensures the 1400 has had the |
| 337 | chance to respond sufficiently to the first reset. Why not a longer delay? Much | 337 | chance to respond sufficiently to the first reset. Why not a longer delay? Much |
| 338 | more than 50 milliseconds gets to be noticable, but the board would still work. | 338 | more than 50 milliseconds gets to be noticeable, but the board would still work. |
| 339 | 339 | ||
| 340 | Once all 16 bytes of the Power-on Reset Message have been read, the bootstrap | 340 | Once all 16 bytes of the Power-on Reset Message have been read, the bootstrap |
| 341 | firmware is ready to receive loadware. | 341 | firmware is ready to receive loadware. |
| @@ -399,7 +399,7 @@ typedef union _porStr // "por" stands for Power On Reset | |||
| 399 | // expandable products must report a MAP of available channels. Since | 399 | // expandable products must report a MAP of available channels. Since |
| 400 | // each UART supports four ports, we represent each UART found by a | 400 | // each UART supports four ports, we represent each UART found by a |
| 401 | // single bit. Using two bytes to supply the mapping information we | 401 | // single bit. Using two bytes to supply the mapping information we |
| 402 | // report the presense or absense of up to 16 UARTS, or 64 ports in | 402 | // report the presence or absence of up to 16 UARTS, or 64 ports in |
| 403 | // steps of 4 ports. For -IIEX products, the ports are numbered | 403 | // steps of 4 ports. For -IIEX products, the ports are numbered |
| 404 | // starting at the box closest to the controller in the "chain". | 404 | // starting at the box closest to the controller in the "chain". |
| 405 | 405 | ||
diff --git a/drivers/staging/tty/ip2/i2lib.c b/drivers/staging/tty/ip2/i2lib.c index 0d10b89218ed..13a3caba85f2 100644 --- a/drivers/staging/tty/ip2/i2lib.c +++ b/drivers/staging/tty/ip2/i2lib.c | |||
| @@ -821,7 +821,7 @@ i2GetStatus(i2ChanStrPtr pCh, int resetBits) | |||
| 821 | // | 821 | // |
| 822 | // Description: | 822 | // Description: |
| 823 | // Strips data from the input buffer and writes it to pDest. If there is a | 823 | // Strips data from the input buffer and writes it to pDest. If there is a |
| 824 | // collosal blunder, (invalid structure pointers or the like), returns -1. | 824 | // colossal blunder, (invalid structure pointers or the like), returns -1. |
| 825 | // Otherwise, returns the number of bytes read. | 825 | // Otherwise, returns the number of bytes read. |
| 826 | //****************************************************************************** | 826 | //****************************************************************************** |
| 827 | static int | 827 | static int |
| @@ -909,7 +909,7 @@ i2Input_exit: | |||
| 909 | // Returns: Number of bytes stripped, or -1 for error | 909 | // Returns: Number of bytes stripped, or -1 for error |
| 910 | // | 910 | // |
| 911 | // Description: | 911 | // Description: |
| 912 | // Strips any data from the input buffer. If there is a collosal blunder, | 912 | // Strips any data from the input buffer. If there is a colossal blunder, |
| 913 | // (invalid structure pointers or the like), returns -1. Otherwise, returns the | 913 | // (invalid structure pointers or the like), returns -1. Otherwise, returns the |
| 914 | // number of bytes stripped. | 914 | // number of bytes stripped. |
| 915 | //****************************************************************************** | 915 | //****************************************************************************** |
| @@ -963,7 +963,7 @@ i2InputFlush(i2ChanStrPtr pCh) | |||
| 963 | // Returns: Number of bytes available, or -1 for error | 963 | // Returns: Number of bytes available, or -1 for error |
| 964 | // | 964 | // |
| 965 | // Description: | 965 | // Description: |
| 966 | // If there is a collosal blunder, (invalid structure pointers or the like), | 966 | // If there is a colossal blunder, (invalid structure pointers or the like), |
| 967 | // returns -1. Otherwise, returns the number of bytes stripped. Otherwise, | 967 | // returns -1. Otherwise, returns the number of bytes stripped. Otherwise, |
| 968 | // returns the number of bytes available in the buffer. | 968 | // returns the number of bytes available in the buffer. |
| 969 | //****************************************************************************** | 969 | //****************************************************************************** |
| @@ -1001,7 +1001,7 @@ i2InputAvailable(i2ChanStrPtr pCh) | |||
| 1001 | // | 1001 | // |
| 1002 | // Description: | 1002 | // Description: |
| 1003 | // Queues the data at pSource to be sent as data packets to the board. If there | 1003 | // Queues the data at pSource to be sent as data packets to the board. If there |
| 1004 | // is a collosal blunder, (invalid structure pointers or the like), returns -1. | 1004 | // is a colossal blunder, (invalid structure pointers or the like), returns -1. |
| 1005 | // Otherwise, returns the number of bytes written. What if there is not enough | 1005 | // Otherwise, returns the number of bytes written. What if there is not enough |
| 1006 | // room for all the data? If pCh->channelOptions & CO_NBLOCK_WRITE is set, then | 1006 | // room for all the data? If pCh->channelOptions & CO_NBLOCK_WRITE is set, then |
| 1007 | // we transfer as many characters as we can now, then return. If this bit is | 1007 | // we transfer as many characters as we can now, then return. If this bit is |
diff --git a/drivers/staging/tty/ip2/ip2main.c b/drivers/staging/tty/ip2/ip2main.c index ea7a8fb08283..ba074fbb4ce2 100644 --- a/drivers/staging/tty/ip2/ip2main.c +++ b/drivers/staging/tty/ip2/ip2main.c | |||
| @@ -1824,7 +1824,7 @@ ip2_flush_chars( PTTY tty ) | |||
| 1824 | // ip2trace (CHANN, ITRC_PUTC, 10, 1, strip ); | 1824 | // ip2trace (CHANN, ITRC_PUTC, 10, 1, strip ); |
| 1825 | 1825 | ||
| 1826 | // | 1826 | // |
| 1827 | // We may need to restart i2Output if it does not fullfill this request | 1827 | // We may need to restart i2Output if it does not fulfill this request |
| 1828 | // | 1828 | // |
| 1829 | strip = i2Output( pCh, pCh->Pbuf, pCh->Pbuf_stuff); | 1829 | strip = i2Output( pCh, pCh->Pbuf, pCh->Pbuf_stuff); |
| 1830 | if ( strip != pCh->Pbuf_stuff ) { | 1830 | if ( strip != pCh->Pbuf_stuff ) { |
diff --git a/drivers/staging/tty/specialix.c b/drivers/staging/tty/specialix.c index 17a1be536a46..cb24c6d999db 100644 --- a/drivers/staging/tty/specialix.c +++ b/drivers/staging/tty/specialix.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * support. But please read the documentation (specialix.txt) | 9 | * support. But please read the documentation (specialix.txt) |
| 10 | * first. | 10 | * first. |
| 11 | * | 11 | * |
| 12 | * This driver was developped in the BitWizard linux device | 12 | * This driver was developed in the BitWizard linux device |
| 13 | * driver service. If you require a linux device driver for your | 13 | * driver service. If you require a linux device driver for your |
| 14 | * product, please contact devices@BitWizard.nl for a quote. | 14 | * product, please contact devices@BitWizard.nl for a quote. |
| 15 | * | 15 | * |
| @@ -978,7 +978,7 @@ static void sx_change_speed(struct specialix_board *bp, | |||
| 978 | spin_lock_irqsave(&bp->lock, flags); | 978 | spin_lock_irqsave(&bp->lock, flags); |
| 979 | sx_out(bp, CD186x_CAR, port_No(port)); | 979 | sx_out(bp, CD186x_CAR, port_No(port)); |
| 980 | 980 | ||
| 981 | /* The Specialix board doens't implement the RTS lines. | 981 | /* The Specialix board does't implement the RTS lines. |
| 982 | They are used to set the IRQ level. Don't touch them. */ | 982 | They are used to set the IRQ level. Don't touch them. */ |
| 983 | if (sx_crtscts(tty)) | 983 | if (sx_crtscts(tty)) |
| 984 | port->MSVR = MSVR_DTR | (sx_in(bp, CD186x_MSVR) & MSVR_RTS); | 984 | port->MSVR = MSVR_DTR | (sx_in(bp, CD186x_MSVR) & MSVR_RTS); |
diff --git a/drivers/staging/tty/specialix_io8.h b/drivers/staging/tty/specialix_io8.h index c63005274d9b..1215d7e2cb37 100644 --- a/drivers/staging/tty/specialix_io8.h +++ b/drivers/staging/tty/specialix_io8.h | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | * Please DO contact io8-linux@specialix.co.uk if you require | 10 | * Please DO contact io8-linux@specialix.co.uk if you require |
| 11 | * support. | 11 | * support. |
| 12 | * | 12 | * |
| 13 | * This driver was developped in the BitWizard linux device | 13 | * This driver was developed in the BitWizard linux device |
| 14 | * driver service. If you require a linux device driver for your | 14 | * driver service. If you require a linux device driver for your |
| 15 | * product, please contact devices@BitWizard.nl for a quote. | 15 | * product, please contact devices@BitWizard.nl for a quote. |
| 16 | * | 16 | * |
| @@ -79,7 +79,7 @@ more than a few PCI versions of the card. */ | |||
| 79 | 79 | ||
| 80 | #define SPECIALIX_MAGIC 0x0907 | 80 | #define SPECIALIX_MAGIC 0x0907 |
| 81 | 81 | ||
| 82 | #define SX_CCR_TIMEOUT 10000 /* CCR timeout. You may need to wait upto | 82 | #define SX_CCR_TIMEOUT 10000 /* CCR timeout. You may need to wait up to |
| 83 | 10 milliseconds before the internal | 83 | 10 milliseconds before the internal |
| 84 | processor is available again after | 84 | processor is available again after |
| 85 | you give it a command */ | 85 | you give it a command */ |
diff --git a/drivers/staging/usbip/stub_dev.c b/drivers/staging/usbip/stub_dev.c index 8214c353d9f5..bce7d039346c 100644 --- a/drivers/staging/usbip/stub_dev.c +++ b/drivers/staging/usbip/stub_dev.c | |||
| @@ -220,8 +220,10 @@ static void stub_shutdown_connection(struct usbip_device *ud) | |||
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | /* 1. stop threads */ | 222 | /* 1. stop threads */ |
| 223 | kthread_stop(ud->tcp_rx); | 223 | if (ud->tcp_rx && !task_is_dead(ud->tcp_rx)) |
| 224 | kthread_stop(ud->tcp_tx); | 224 | kthread_stop(ud->tcp_rx); |
| 225 | if (ud->tcp_tx && !task_is_dead(ud->tcp_tx)) | ||
| 226 | kthread_stop(ud->tcp_tx); | ||
| 225 | 227 | ||
| 226 | /* 2. close the socket */ | 228 | /* 2. close the socket */ |
| 227 | /* | 229 | /* |
diff --git a/drivers/staging/usbip/stub_rx.c b/drivers/staging/usbip/stub_rx.c index 6445f12cb4fd..51fbd0986475 100644 --- a/drivers/staging/usbip/stub_rx.c +++ b/drivers/staging/usbip/stub_rx.c | |||
| @@ -171,33 +171,23 @@ static int tweak_set_configuration_cmd(struct urb *urb) | |||
| 171 | 171 | ||
| 172 | static int tweak_reset_device_cmd(struct urb *urb) | 172 | static int tweak_reset_device_cmd(struct urb *urb) |
| 173 | { | 173 | { |
| 174 | struct usb_ctrlrequest *req; | 174 | struct stub_priv *priv = (struct stub_priv *) urb->context; |
| 175 | __u16 value; | 175 | struct stub_device *sdev = priv->sdev; |
| 176 | __u16 index; | ||
| 177 | int ret; | ||
| 178 | |||
| 179 | req = (struct usb_ctrlrequest *) urb->setup_packet; | ||
| 180 | value = le16_to_cpu(req->wValue); | ||
| 181 | index = le16_to_cpu(req->wIndex); | ||
| 182 | |||
| 183 | usbip_uinfo("reset_device (port %d) to %s\n", index, | ||
| 184 | dev_name(&urb->dev->dev)); | ||
| 185 | 176 | ||
| 186 | /* all interfaces should be owned by usbip driver, so just reset it. */ | 177 | usbip_uinfo("reset_device %s\n", dev_name(&urb->dev->dev)); |
| 187 | ret = usb_lock_device_for_reset(urb->dev, NULL); | ||
| 188 | if (ret < 0) { | ||
| 189 | dev_err(&urb->dev->dev, "lock for reset\n"); | ||
| 190 | return ret; | ||
| 191 | } | ||
| 192 | |||
| 193 | /* try to reset the device */ | ||
| 194 | ret = usb_reset_device(urb->dev); | ||
| 195 | if (ret < 0) | ||
| 196 | dev_err(&urb->dev->dev, "device reset\n"); | ||
| 197 | 178 | ||
| 198 | usb_unlock_device(urb->dev); | 179 | /* |
| 199 | 180 | * usb_lock_device_for_reset caused a deadlock: it causes the driver | |
| 200 | return ret; | 181 | * to unbind. In the shutdown the rx thread is signalled to shut down |
| 182 | * but this thread is pending in the usb_lock_device_for_reset. | ||
| 183 | * | ||
| 184 | * Instead queue the reset. | ||
| 185 | * | ||
| 186 | * Unfortunatly an existing usbip connection will be dropped due to | ||
| 187 | * driver unbinding. | ||
| 188 | */ | ||
| 189 | usb_queue_reset_device(sdev->interface); | ||
| 190 | return 0; | ||
| 201 | } | 191 | } |
| 202 | 192 | ||
| 203 | /* | 193 | /* |
diff --git a/drivers/staging/usbip/stub_tx.c b/drivers/staging/usbip/stub_tx.c index 5523f25998e6..64a52b26dcf6 100644 --- a/drivers/staging/usbip/stub_tx.c +++ b/drivers/staging/usbip/stub_tx.c | |||
| @@ -170,7 +170,6 @@ static int stub_send_ret_submit(struct stub_device *sdev) | |||
| 170 | struct stub_priv *priv, *tmp; | 170 | struct stub_priv *priv, *tmp; |
| 171 | 171 | ||
| 172 | struct msghdr msg; | 172 | struct msghdr msg; |
| 173 | struct kvec iov[3]; | ||
| 174 | size_t txsize; | 173 | size_t txsize; |
| 175 | 174 | ||
| 176 | size_t total_size = 0; | 175 | size_t total_size = 0; |
| @@ -180,28 +179,73 @@ static int stub_send_ret_submit(struct stub_device *sdev) | |||
| 180 | struct urb *urb = priv->urb; | 179 | struct urb *urb = priv->urb; |
| 181 | struct usbip_header pdu_header; | 180 | struct usbip_header pdu_header; |
| 182 | void *iso_buffer = NULL; | 181 | void *iso_buffer = NULL; |
| 182 | struct kvec *iov = NULL; | ||
| 183 | int iovnum = 0; | ||
| 183 | 184 | ||
| 184 | txsize = 0; | 185 | txsize = 0; |
| 185 | memset(&pdu_header, 0, sizeof(pdu_header)); | 186 | memset(&pdu_header, 0, sizeof(pdu_header)); |
| 186 | memset(&msg, 0, sizeof(msg)); | 187 | memset(&msg, 0, sizeof(msg)); |
| 187 | memset(&iov, 0, sizeof(iov)); | ||
| 188 | 188 | ||
| 189 | usbip_dbg_stub_tx("setup txdata urb %p\n", urb); | 189 | if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) |
| 190 | iovnum = 2 + urb->number_of_packets; | ||
| 191 | else | ||
| 192 | iovnum = 2; | ||
| 193 | |||
| 194 | iov = kzalloc(iovnum * sizeof(struct kvec), GFP_KERNEL); | ||
| 190 | 195 | ||
| 196 | if (!iov) { | ||
| 197 | usbip_event_add(&sdev->ud, SDEV_EVENT_ERROR_MALLOC); | ||
| 198 | return -1; | ||
| 199 | } | ||
| 200 | |||
| 201 | iovnum = 0; | ||
| 191 | 202 | ||
| 192 | /* 1. setup usbip_header */ | 203 | /* 1. setup usbip_header */ |
| 193 | setup_ret_submit_pdu(&pdu_header, urb); | 204 | setup_ret_submit_pdu(&pdu_header, urb); |
| 205 | usbip_dbg_stub_tx("setup txdata seqnum: %d urb: %p\n", | ||
| 206 | pdu_header.base.seqnum, urb); | ||
| 207 | /*usbip_dump_header(pdu_header);*/ | ||
| 194 | usbip_header_correct_endian(&pdu_header, 1); | 208 | usbip_header_correct_endian(&pdu_header, 1); |
| 195 | 209 | ||
| 196 | iov[0].iov_base = &pdu_header; | 210 | iov[iovnum].iov_base = &pdu_header; |
| 197 | iov[0].iov_len = sizeof(pdu_header); | 211 | iov[iovnum].iov_len = sizeof(pdu_header); |
| 212 | iovnum++; | ||
| 198 | txsize += sizeof(pdu_header); | 213 | txsize += sizeof(pdu_header); |
| 199 | 214 | ||
| 200 | /* 2. setup transfer buffer */ | 215 | /* 2. setup transfer buffer */ |
| 201 | if (usb_pipein(urb->pipe) && urb->actual_length > 0) { | 216 | if (usb_pipein(urb->pipe) && |
| 202 | iov[1].iov_base = urb->transfer_buffer; | 217 | usb_pipetype(urb->pipe) != PIPE_ISOCHRONOUS && |
| 203 | iov[1].iov_len = urb->actual_length; | 218 | urb->actual_length > 0) { |
| 219 | iov[iovnum].iov_base = urb->transfer_buffer; | ||
| 220 | iov[iovnum].iov_len = urb->actual_length; | ||
| 221 | iovnum++; | ||
| 204 | txsize += urb->actual_length; | 222 | txsize += urb->actual_length; |
| 223 | } else if (usb_pipein(urb->pipe) && | ||
| 224 | usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) { | ||
| 225 | /* | ||
| 226 | * For isochronous packets: actual length is the sum of | ||
| 227 | * the actual length of the individual, packets, but as | ||
| 228 | * the packet offsets are not changed there will be | ||
| 229 | * padding between the packets. To optimally use the | ||
| 230 | * bandwidth the padding is not transmitted. | ||
| 231 | */ | ||
| 232 | |||
| 233 | int i; | ||
| 234 | for (i = 0; i < urb->number_of_packets; i++) { | ||
| 235 | iov[iovnum].iov_base = urb->transfer_buffer + urb->iso_frame_desc[i].offset; | ||
| 236 | iov[iovnum].iov_len = urb->iso_frame_desc[i].actual_length; | ||
| 237 | iovnum++; | ||
| 238 | txsize += urb->iso_frame_desc[i].actual_length; | ||
| 239 | } | ||
| 240 | |||
| 241 | if (txsize != sizeof(pdu_header) + urb->actual_length) { | ||
| 242 | dev_err(&sdev->interface->dev, | ||
| 243 | "actual length of urb (%d) does not match iso packet sizes (%d)\n", | ||
| 244 | urb->actual_length, txsize-sizeof(pdu_header)); | ||
| 245 | kfree(iov); | ||
| 246 | usbip_event_add(&sdev->ud, SDEV_EVENT_ERROR_TCP); | ||
| 247 | return -1; | ||
| 248 | } | ||
| 205 | } | 249 | } |
| 206 | 250 | ||
| 207 | /* 3. setup iso_packet_descriptor */ | 251 | /* 3. setup iso_packet_descriptor */ |
| @@ -212,32 +256,34 @@ static int stub_send_ret_submit(struct stub_device *sdev) | |||
| 212 | if (!iso_buffer) { | 256 | if (!iso_buffer) { |
| 213 | usbip_event_add(&sdev->ud, | 257 | usbip_event_add(&sdev->ud, |
| 214 | SDEV_EVENT_ERROR_MALLOC); | 258 | SDEV_EVENT_ERROR_MALLOC); |
| 259 | kfree(iov); | ||
| 215 | return -1; | 260 | return -1; |
| 216 | } | 261 | } |
| 217 | 262 | ||
| 218 | iov[2].iov_base = iso_buffer; | 263 | iov[iovnum].iov_base = iso_buffer; |
| 219 | iov[2].iov_len = len; | 264 | iov[iovnum].iov_len = len; |
| 220 | txsize += len; | 265 | txsize += len; |
| 266 | iovnum++; | ||
| 221 | } | 267 | } |
| 222 | 268 | ||
| 223 | ret = kernel_sendmsg(sdev->ud.tcp_socket, &msg, iov, | 269 | ret = kernel_sendmsg(sdev->ud.tcp_socket, &msg, |
| 224 | 3, txsize); | 270 | iov, iovnum, txsize); |
| 225 | if (ret != txsize) { | 271 | if (ret != txsize) { |
| 226 | dev_err(&sdev->interface->dev, | 272 | dev_err(&sdev->interface->dev, |
| 227 | "sendmsg failed!, retval %d for %zd\n", | 273 | "sendmsg failed!, retval %d for %zd\n", |
| 228 | ret, txsize); | 274 | ret, txsize); |
| 275 | kfree(iov); | ||
| 229 | kfree(iso_buffer); | 276 | kfree(iso_buffer); |
| 230 | usbip_event_add(&sdev->ud, SDEV_EVENT_ERROR_TCP); | 277 | usbip_event_add(&sdev->ud, SDEV_EVENT_ERROR_TCP); |
| 231 | return -1; | 278 | return -1; |
| 232 | } | 279 | } |
| 233 | 280 | ||
| 281 | kfree(iov); | ||
| 234 | kfree(iso_buffer); | 282 | kfree(iso_buffer); |
| 235 | usbip_dbg_stub_tx("send txdata\n"); | ||
| 236 | 283 | ||
| 237 | total_size += txsize; | 284 | total_size += txsize; |
| 238 | } | 285 | } |
| 239 | 286 | ||
| 240 | |||
| 241 | spin_lock_irqsave(&sdev->priv_lock, flags); | 287 | spin_lock_irqsave(&sdev->priv_lock, flags); |
| 242 | 288 | ||
| 243 | list_for_each_entry_safe(priv, tmp, &sdev->priv_free, list) { | 289 | list_for_each_entry_safe(priv, tmp, &sdev->priv_free, list) { |
diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c index 337abc48f714..7b1fe45bf7dd 100644 --- a/drivers/staging/usbip/usbip_common.c +++ b/drivers/staging/usbip/usbip_common.c | |||
| @@ -333,10 +333,11 @@ void usbip_dump_header(struct usbip_header *pdu) | |||
| 333 | usbip_udbg("CMD_UNLINK: seq %u\n", pdu->u.cmd_unlink.seqnum); | 333 | usbip_udbg("CMD_UNLINK: seq %u\n", pdu->u.cmd_unlink.seqnum); |
| 334 | break; | 334 | break; |
| 335 | case USBIP_RET_SUBMIT: | 335 | case USBIP_RET_SUBMIT: |
| 336 | usbip_udbg("RET_SUBMIT: st %d al %u sf %d ec %d\n", | 336 | usbip_udbg("RET_SUBMIT: st %d al %u sf %d #p %d ec %d\n", |
| 337 | pdu->u.ret_submit.status, | 337 | pdu->u.ret_submit.status, |
| 338 | pdu->u.ret_submit.actual_length, | 338 | pdu->u.ret_submit.actual_length, |
| 339 | pdu->u.ret_submit.start_frame, | 339 | pdu->u.ret_submit.start_frame, |
| 340 | pdu->u.ret_submit.number_of_packets, | ||
| 340 | pdu->u.ret_submit.error_count); | 341 | pdu->u.ret_submit.error_count); |
| 341 | case USBIP_RET_UNLINK: | 342 | case USBIP_RET_UNLINK: |
| 342 | usbip_udbg("RET_UNLINK: status %d\n", pdu->u.ret_unlink.status); | 343 | usbip_udbg("RET_UNLINK: status %d\n", pdu->u.ret_unlink.status); |
| @@ -520,6 +521,7 @@ static void usbip_pack_ret_submit(struct usbip_header *pdu, struct urb *urb, | |||
| 520 | rpdu->status = urb->status; | 521 | rpdu->status = urb->status; |
| 521 | rpdu->actual_length = urb->actual_length; | 522 | rpdu->actual_length = urb->actual_length; |
| 522 | rpdu->start_frame = urb->start_frame; | 523 | rpdu->start_frame = urb->start_frame; |
| 524 | rpdu->number_of_packets = urb->number_of_packets; | ||
| 523 | rpdu->error_count = urb->error_count; | 525 | rpdu->error_count = urb->error_count; |
| 524 | } else { | 526 | } else { |
| 525 | /* vhci_rx.c */ | 527 | /* vhci_rx.c */ |
| @@ -527,6 +529,7 @@ static void usbip_pack_ret_submit(struct usbip_header *pdu, struct urb *urb, | |||
| 527 | urb->status = rpdu->status; | 529 | urb->status = rpdu->status; |
| 528 | urb->actual_length = rpdu->actual_length; | 530 | urb->actual_length = rpdu->actual_length; |
| 529 | urb->start_frame = rpdu->start_frame; | 531 | urb->start_frame = rpdu->start_frame; |
| 532 | urb->number_of_packets = rpdu->number_of_packets; | ||
| 530 | urb->error_count = rpdu->error_count; | 533 | urb->error_count = rpdu->error_count; |
| 531 | } | 534 | } |
| 532 | } | 535 | } |
| @@ -595,11 +598,13 @@ static void correct_endian_ret_submit(struct usbip_header_ret_submit *pdu, | |||
| 595 | cpu_to_be32s(&pdu->status); | 598 | cpu_to_be32s(&pdu->status); |
| 596 | cpu_to_be32s(&pdu->actual_length); | 599 | cpu_to_be32s(&pdu->actual_length); |
| 597 | cpu_to_be32s(&pdu->start_frame); | 600 | cpu_to_be32s(&pdu->start_frame); |
| 601 | cpu_to_be32s(&pdu->number_of_packets); | ||
| 598 | cpu_to_be32s(&pdu->error_count); | 602 | cpu_to_be32s(&pdu->error_count); |
| 599 | } else { | 603 | } else { |
| 600 | be32_to_cpus(&pdu->status); | 604 | be32_to_cpus(&pdu->status); |
| 601 | be32_to_cpus(&pdu->actual_length); | 605 | be32_to_cpus(&pdu->actual_length); |
| 602 | be32_to_cpus(&pdu->start_frame); | 606 | be32_to_cpus(&pdu->start_frame); |
| 607 | cpu_to_be32s(&pdu->number_of_packets); | ||
| 603 | be32_to_cpus(&pdu->error_count); | 608 | be32_to_cpus(&pdu->error_count); |
| 604 | } | 609 | } |
| 605 | } | 610 | } |
| @@ -725,6 +730,7 @@ int usbip_recv_iso(struct usbip_device *ud, struct urb *urb) | |||
| 725 | int size = np * sizeof(*iso); | 730 | int size = np * sizeof(*iso); |
| 726 | int i; | 731 | int i; |
| 727 | int ret; | 732 | int ret; |
| 733 | int total_length = 0; | ||
| 728 | 734 | ||
| 729 | if (!usb_pipeisoc(urb->pipe)) | 735 | if (!usb_pipeisoc(urb->pipe)) |
| 730 | return 0; | 736 | return 0; |
| @@ -754,19 +760,75 @@ int usbip_recv_iso(struct usbip_device *ud, struct urb *urb) | |||
| 754 | return -EPIPE; | 760 | return -EPIPE; |
| 755 | } | 761 | } |
| 756 | 762 | ||
| 763 | |||
| 757 | for (i = 0; i < np; i++) { | 764 | for (i = 0; i < np; i++) { |
| 758 | iso = buff + (i * sizeof(*iso)); | 765 | iso = buff + (i * sizeof(*iso)); |
| 759 | 766 | ||
| 760 | usbip_iso_pakcet_correct_endian(iso, 0); | 767 | usbip_iso_pakcet_correct_endian(iso, 0); |
| 761 | usbip_pack_iso(iso, &urb->iso_frame_desc[i], 0); | 768 | usbip_pack_iso(iso, &urb->iso_frame_desc[i], 0); |
| 769 | total_length += urb->iso_frame_desc[i].actual_length; | ||
| 762 | } | 770 | } |
| 763 | 771 | ||
| 764 | kfree(buff); | 772 | kfree(buff); |
| 765 | 773 | ||
| 774 | if (total_length != urb->actual_length) { | ||
| 775 | dev_err(&urb->dev->dev, | ||
| 776 | "total length of iso packets (%d) not equal to actual length of buffer (%d)\n", | ||
| 777 | total_length, urb->actual_length); | ||
| 778 | |||
| 779 | if (ud->side == USBIP_STUB) | ||
| 780 | usbip_event_add(ud, SDEV_EVENT_ERROR_TCP); | ||
| 781 | else | ||
| 782 | usbip_event_add(ud, VDEV_EVENT_ERROR_TCP); | ||
| 783 | |||
| 784 | return -EPIPE; | ||
| 785 | } | ||
| 786 | |||
| 766 | return ret; | 787 | return ret; |
| 767 | } | 788 | } |
| 768 | EXPORT_SYMBOL_GPL(usbip_recv_iso); | 789 | EXPORT_SYMBOL_GPL(usbip_recv_iso); |
| 769 | 790 | ||
| 791 | /* | ||
| 792 | * This functions restores the padding which was removed for optimizing | ||
| 793 | * the bandwidth during transfer over tcp/ip | ||
| 794 | * | ||
| 795 | * buffer and iso packets need to be stored and be in propeper endian in urb | ||
| 796 | * before calling this function | ||
| 797 | */ | ||
| 798 | int usbip_pad_iso(struct usbip_device *ud, struct urb *urb) | ||
| 799 | { | ||
| 800 | int np = urb->number_of_packets; | ||
| 801 | int i; | ||
| 802 | int ret; | ||
| 803 | int actualoffset = urb->actual_length; | ||
| 804 | |||
| 805 | if (!usb_pipeisoc(urb->pipe)) | ||
| 806 | return 0; | ||
| 807 | |||
| 808 | /* if no packets or length of data is 0, then nothing to unpack */ | ||
| 809 | if (np == 0 || urb->actual_length == 0) | ||
| 810 | return 0; | ||
| 811 | |||
| 812 | /* | ||
| 813 | * if actual_length is transfer_buffer_length then no padding is | ||
| 814 | * present. | ||
| 815 | */ | ||
| 816 | if (urb->actual_length == urb->transfer_buffer_length) | ||
| 817 | return 0; | ||
| 818 | |||
| 819 | /* | ||
| 820 | * loop over all packets from last to first (to prevent overwritting | ||
| 821 | * memory when padding) and move them into the proper place | ||
| 822 | */ | ||
| 823 | for (i = np-1; i > 0; i--) { | ||
| 824 | actualoffset -= urb->iso_frame_desc[i].actual_length; | ||
| 825 | memmove(urb->transfer_buffer + urb->iso_frame_desc[i].offset, | ||
| 826 | urb->transfer_buffer + actualoffset, | ||
| 827 | urb->iso_frame_desc[i].actual_length); | ||
| 828 | } | ||
| 829 | return ret; | ||
| 830 | } | ||
| 831 | EXPORT_SYMBOL_GPL(usbip_pad_iso); | ||
| 770 | 832 | ||
| 771 | /* some members of urb must be substituted before. */ | 833 | /* some members of urb must be substituted before. */ |
| 772 | int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb) | 834 | int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb) |
diff --git a/drivers/staging/usbip/usbip_common.h b/drivers/staging/usbip/usbip_common.h index 9f809c315d92..c767f52be5fb 100644 --- a/drivers/staging/usbip/usbip_common.h +++ b/drivers/staging/usbip/usbip_common.h | |||
| @@ -379,6 +379,8 @@ void usbip_header_correct_endian(struct usbip_header *pdu, int send); | |||
| 379 | int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb); | 379 | int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb); |
| 380 | /* some members of urb must be substituted before. */ | 380 | /* some members of urb must be substituted before. */ |
| 381 | int usbip_recv_iso(struct usbip_device *ud, struct urb *urb); | 381 | int usbip_recv_iso(struct usbip_device *ud, struct urb *urb); |
| 382 | /* some members of urb must be substituted before. */ | ||
| 383 | int usbip_pad_iso(struct usbip_device *ud, struct urb *urb); | ||
| 382 | void *usbip_alloc_iso_desc_pdu(struct urb *urb, ssize_t *bufflen); | 384 | void *usbip_alloc_iso_desc_pdu(struct urb *urb, ssize_t *bufflen); |
| 383 | 385 | ||
| 384 | 386 | ||
diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c index e23484998598..0f02a4b12ae4 100644 --- a/drivers/staging/usbip/vhci_hcd.c +++ b/drivers/staging/usbip/vhci_hcd.c | |||
| @@ -194,7 +194,7 @@ void rh_port_disconnect(int rhport) | |||
| 194 | * | 194 | * |
| 195 | * So, the maximum number of ports is 31 ( port 0 to port 30) ? | 195 | * So, the maximum number of ports is 31 ( port 0 to port 30) ? |
| 196 | * | 196 | * |
| 197 | * The return value is the actual transfered length in byte. If nothing has | 197 | * The return value is the actual transferred length in byte. If nothing has |
| 198 | * been changed, return 0. In the case that the number of ports is less than or | 198 | * been changed, return 0. In the case that the number of ports is less than or |
| 199 | * equal to 6 (VHCI_NPORTS==7), return 1. | 199 | * equal to 6 (VHCI_NPORTS==7), return 1. |
| 200 | * | 200 | * |
diff --git a/drivers/staging/usbip/vhci_rx.c b/drivers/staging/usbip/vhci_rx.c index 09bf2355934b..2ffc96a4c0d4 100644 --- a/drivers/staging/usbip/vhci_rx.c +++ b/drivers/staging/usbip/vhci_rx.c | |||
| @@ -100,6 +100,9 @@ static void vhci_recv_ret_submit(struct vhci_device *vdev, | |||
| 100 | if (usbip_recv_iso(ud, urb) < 0) | 100 | if (usbip_recv_iso(ud, urb) < 0) |
| 101 | return; | 101 | return; |
| 102 | 102 | ||
| 103 | /* restore the padding in iso packets */ | ||
| 104 | if (usbip_pad_iso(ud, urb) < 0) | ||
| 105 | return; | ||
| 103 | 106 | ||
| 104 | if (usbip_dbg_flag_vhci_rx) | 107 | if (usbip_dbg_flag_vhci_rx) |
| 105 | usbip_dump_urb(urb); | 108 | usbip_dump_urb(urb); |
diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index d4a48c4e59c2..a4007287ef47 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c | |||
| @@ -621,7 +621,7 @@ static int ca91cx42_master_set(struct vme_master_resource *image, int enabled, | |||
| 621 | 621 | ||
| 622 | /* | 622 | /* |
| 623 | * Let's allocate the resource here rather than further up the stack as | 623 | * Let's allocate the resource here rather than further up the stack as |
| 624 | * it avoids pushing loads of bus dependant stuff up the stack | 624 | * it avoids pushing loads of bus dependent stuff up the stack |
| 625 | */ | 625 | */ |
| 626 | retval = ca91cx42_alloc_resource(image, size); | 626 | retval = ca91cx42_alloc_resource(image, size); |
| 627 | if (retval) { | 627 | if (retval) { |
| @@ -1052,7 +1052,7 @@ static int ca91cx42_dma_list_add(struct vme_dma_list *list, | |||
| 1052 | pci_attr = dest->private; | 1052 | pci_attr = dest->private; |
| 1053 | } | 1053 | } |
| 1054 | 1054 | ||
| 1055 | /* Check we can do fullfill required attributes */ | 1055 | /* Check we can do fulfill required attributes */ |
| 1056 | if ((vme_attr->aspace & ~(VME_A16 | VME_A24 | VME_A32 | VME_USER1 | | 1056 | if ((vme_attr->aspace & ~(VME_A16 | VME_A24 | VME_A32 | VME_USER1 | |
| 1057 | VME_USER2)) != 0) { | 1057 | VME_USER2)) != 0) { |
| 1058 | 1058 | ||
| @@ -1069,7 +1069,7 @@ static int ca91cx42_dma_list_add(struct vme_dma_list *list, | |||
| 1069 | goto err_cycle; | 1069 | goto err_cycle; |
| 1070 | } | 1070 | } |
| 1071 | 1071 | ||
| 1072 | /* Check to see if we can fullfill source and destination */ | 1072 | /* Check to see if we can fulfill source and destination */ |
| 1073 | if (!(((src->type == VME_DMA_PCI) && (dest->type == VME_DMA_VME)) || | 1073 | if (!(((src->type == VME_DMA_PCI) && (dest->type == VME_DMA_VME)) || |
| 1074 | ((src->type == VME_DMA_VME) && (dest->type == VME_DMA_PCI)))) { | 1074 | ((src->type == VME_DMA_VME) && (dest->type == VME_DMA_PCI)))) { |
| 1075 | 1075 | ||
diff --git a/drivers/staging/vme/bridges/vme_tsi148.c b/drivers/staging/vme/bridges/vme_tsi148.c index b00a53e793e7..106aa9daff48 100644 --- a/drivers/staging/vme/bridges/vme_tsi148.c +++ b/drivers/staging/vme/bridges/vme_tsi148.c | |||
| @@ -928,7 +928,7 @@ static int tsi148_master_set(struct vme_master_resource *image, int enabled, | |||
| 928 | spin_lock(&image->lock); | 928 | spin_lock(&image->lock); |
| 929 | 929 | ||
| 930 | /* Let's allocate the resource here rather than further up the stack as | 930 | /* Let's allocate the resource here rather than further up the stack as |
| 931 | * it avoids pushing loads of bus dependant stuff up the stack. If size | 931 | * it avoids pushing loads of bus dependent stuff up the stack. If size |
| 932 | * is zero, any existing resource will be freed. | 932 | * is zero, any existing resource will be freed. |
| 933 | */ | 933 | */ |
| 934 | retval = tsi148_alloc_resource(image, size); | 934 | retval = tsi148_alloc_resource(image, size); |
| @@ -1320,7 +1320,7 @@ static ssize_t tsi148_master_write(struct vme_master_resource *image, void *buf, | |||
| 1320 | 1320 | ||
| 1321 | /* | 1321 | /* |
| 1322 | * Writes are posted. We need to do a read on the VME bus to flush out | 1322 | * Writes are posted. We need to do a read on the VME bus to flush out |
| 1323 | * all of the writes before we check for errors. We can't guarentee | 1323 | * all of the writes before we check for errors. We can't guarantee |
| 1324 | * that reading the data we have just written is safe. It is believed | 1324 | * that reading the data we have just written is safe. It is believed |
| 1325 | * that there isn't any read, write re-ordering, so we can read any | 1325 | * that there isn't any read, write re-ordering, so we can read any |
| 1326 | * location in VME space, so lets read the Device ID from the tsi148's | 1326 | * location in VME space, so lets read the Device ID from the tsi148's |
diff --git a/drivers/staging/vme/bridges/vme_tsi148.h b/drivers/staging/vme/bridges/vme_tsi148.h index 9f97fa8084e8..a3ac2fe98816 100644 --- a/drivers/staging/vme/bridges/vme_tsi148.h +++ b/drivers/staging/vme/bridges/vme_tsi148.h | |||
| @@ -212,7 +212,7 @@ static const int TSI148_LCSR_OT[8] = { TSI148_LCSR_OT0, TSI148_LCSR_OT1, | |||
| 212 | #define TSI148_LCSR_OFFSET_OTAT 0x1C | 212 | #define TSI148_LCSR_OFFSET_OTAT 0x1C |
| 213 | 213 | ||
| 214 | /* | 214 | /* |
| 215 | * VMEbus interupt ack | 215 | * VMEbus interrupt ack |
| 216 | * offset 200 | 216 | * offset 200 |
| 217 | */ | 217 | */ |
| 218 | #define TSI148_LCSR_VIACK1 0x204 | 218 | #define TSI148_LCSR_VIACK1 0x204 |
| @@ -613,7 +613,7 @@ static const int TSI148_GCSR_MBOX[4] = { TSI148_GCSR_MBOX0, | |||
| 613 | /* | 613 | /* |
| 614 | * PCI-X Status Register (CRG +$054) | 614 | * PCI-X Status Register (CRG +$054) |
| 615 | */ | 615 | */ |
| 616 | #define TSI148_PCFS_PCIXSTAT_RSCEM (1<<29) /* Recieved Split Comp Error */ | 616 | #define TSI148_PCFS_PCIXSTAT_RSCEM (1<<29) /* Received Split Comp Error */ |
| 617 | #define TSI148_PCFS_PCIXSTAT_DMCRS_M (7<<26) /* max Cumulative Read Size */ | 617 | #define TSI148_PCFS_PCIXSTAT_DMCRS_M (7<<26) /* max Cumulative Read Size */ |
| 618 | #define TSI148_PCFS_PCIXSTAT_DMOST_M (7<<23) /* max outstanding Split Trans | 618 | #define TSI148_PCFS_PCIXSTAT_DMOST_M (7<<23) /* max outstanding Split Trans |
| 619 | */ | 619 | */ |
| @@ -982,8 +982,8 @@ static const int TSI148_GCSR_MBOX[4] = { TSI148_GCSR_MBOX0, | |||
| 982 | #define TSI148_LCSR_VICR_CNTS_IRQ1 (2<<22) /* IRQ1 to Cntr */ | 982 | #define TSI148_LCSR_VICR_CNTS_IRQ1 (2<<22) /* IRQ1 to Cntr */ |
| 983 | #define TSI148_LCSR_VICR_CNTS_IRQ2 (3<<22) /* IRQ2 to Cntr */ | 983 | #define TSI148_LCSR_VICR_CNTS_IRQ2 (3<<22) /* IRQ2 to Cntr */ |
| 984 | 984 | ||
| 985 | #define TSI148_LCSR_VICR_EDGIS_M (3<<20) /* Edge interupt MASK */ | 985 | #define TSI148_LCSR_VICR_EDGIS_M (3<<20) /* Edge interrupt MASK */ |
| 986 | #define TSI148_LCSR_VICR_EDGIS_DIS (1<<20) /* Edge interupt Disable */ | 986 | #define TSI148_LCSR_VICR_EDGIS_DIS (1<<20) /* Edge interrupt Disable */ |
| 987 | #define TSI148_LCSR_VICR_EDGIS_IRQ1 (2<<20) /* IRQ1 to Edge */ | 987 | #define TSI148_LCSR_VICR_EDGIS_IRQ1 (2<<20) /* IRQ1 to Edge */ |
| 988 | #define TSI148_LCSR_VICR_EDGIS_IRQ2 (3<<20) /* IRQ2 to Edge */ | 988 | #define TSI148_LCSR_VICR_EDGIS_IRQ2 (3<<20) /* IRQ2 to Edge */ |
| 989 | 989 | ||
diff --git a/drivers/staging/vme/vme_api.txt b/drivers/staging/vme/vme_api.txt index a910a0c4388b..4910e92c52af 100644 --- a/drivers/staging/vme/vme_api.txt +++ b/drivers/staging/vme/vme_api.txt | |||
| @@ -6,7 +6,7 @@ Driver registration | |||
| 6 | 6 | ||
| 7 | As with other subsystems within the Linux kernel, VME device drivers register | 7 | As with other subsystems within the Linux kernel, VME device drivers register |
| 8 | with the VME subsystem, typically called from the devices init routine. This is | 8 | with the VME subsystem, typically called from the devices init routine. This is |
| 9 | achieved via a call to the follwoing function: | 9 | achieved via a call to the following function: |
| 10 | 10 | ||
| 11 | int vme_register_driver (struct vme_driver *driver); | 11 | int vme_register_driver (struct vme_driver *driver); |
| 12 | 12 | ||
| @@ -108,7 +108,7 @@ Master windows | |||
| 108 | ============== | 108 | ============== |
| 109 | 109 | ||
| 110 | Master windows provide access from the local processor[s] out onto the VME bus. | 110 | Master windows provide access from the local processor[s] out onto the VME bus. |
| 111 | The number of windows available and the available access modes is dependant on | 111 | The number of windows available and the available access modes is dependent on |
| 112 | the underlying chipset. A window must be configured before it can be used. | 112 | the underlying chipset. A window must be configured before it can be used. |
| 113 | 113 | ||
| 114 | 114 | ||
| @@ -163,7 +163,7 @@ Slave windows | |||
| 163 | 163 | ||
| 164 | Slave windows provide devices on the VME bus access into mapped portions of the | 164 | Slave windows provide devices on the VME bus access into mapped portions of the |
| 165 | local memory. The number of windows available and the access modes that can be | 165 | local memory. The number of windows available and the access modes that can be |
| 166 | used is dependant on the underlying chipset. A window must be configured before | 166 | used is dependent on the underlying chipset. A window must be configured before |
| 167 | it can be used. | 167 | it can be used. |
| 168 | 168 | ||
| 169 | 169 | ||
diff --git a/drivers/staging/vt6655/Kconfig b/drivers/staging/vt6655/Kconfig index 061e730df2d0..c3ba693a8cad 100644 --- a/drivers/staging/vt6655/Kconfig +++ b/drivers/staging/vt6655/Kconfig | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | config VT6655 | 1 | config VT6655 |
| 2 | tristate "VIA Technologies VT6655 support" | 2 | tristate "VIA Technologies VT6655 support" |
| 3 | depends on PCI && WLAN | 3 | depends on PCI && WLAN && m |
| 4 | select WIRELESS_EXT | 4 | select WIRELESS_EXT |
| 5 | select WEXT_PRIV | 5 | select WEXT_PRIV |
| 6 | ---help--- | 6 | ---help--- |
diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c index 951a3a8ddcb2..2721e0798496 100644 --- a/drivers/staging/vt6655/card.c +++ b/drivers/staging/vt6655/card.c | |||
| @@ -1186,7 +1186,7 @@ CARDbStartMeasure ( | |||
| 1186 | wDuration += 1; // 1 TU for channel switching | 1186 | wDuration += 1; // 1 TU for channel switching |
| 1187 | 1187 | ||
| 1188 | if ((LODWORD(qwStartTSF) == 0) && (HIDWORD(qwStartTSF) == 0)) { | 1188 | if ((LODWORD(qwStartTSF) == 0) && (HIDWORD(qwStartTSF) == 0)) { |
| 1189 | // start imediately by setting start TSF == current TSF + 2 TU | 1189 | // start immediately by setting start TSF == current TSF + 2 TU |
| 1190 | LODWORD(qwStartTSF) = LODWORD(qwCurrTSF) + 2048; | 1190 | LODWORD(qwStartTSF) = LODWORD(qwCurrTSF) + 2048; |
| 1191 | HIDWORD(qwStartTSF) = HIDWORD(qwCurrTSF); | 1191 | HIDWORD(qwStartTSF) = HIDWORD(qwCurrTSF); |
| 1192 | if (LODWORD(qwCurrTSF) > LODWORD(qwStartTSF)) { | 1192 | if (LODWORD(qwCurrTSF) > LODWORD(qwStartTSF)) { |
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index efaf19bc07b7..ad39c8727e9b 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c | |||
| @@ -137,7 +137,7 @@ DEVICE_PARAM(TxDescriptors1,"Number of transmit descriptors1"); | |||
| 137 | /* IP_byte_align[] is used for IP header unsigned long byte aligned | 137 | /* IP_byte_align[] is used for IP header unsigned long byte aligned |
| 138 | 0: indicate the IP header won't be unsigned long byte aligned.(Default) . | 138 | 0: indicate the IP header won't be unsigned long byte aligned.(Default) . |
| 139 | 1: indicate the IP header will be unsigned long byte aligned. | 139 | 1: indicate the IP header will be unsigned long byte aligned. |
| 140 | In some enviroment, the IP header should be unsigned long byte aligned, | 140 | In some environment, the IP header should be unsigned long byte aligned, |
| 141 | or the packet will be droped when we receive it. (eg: IPVS) | 141 | or the packet will be droped when we receive it. (eg: IPVS) |
| 142 | */ | 142 | */ |
| 143 | DEVICE_PARAM(IP_byte_align,"Enable IP header dword aligned"); | 143 | DEVICE_PARAM(IP_byte_align,"Enable IP header dword aligned"); |
diff --git a/drivers/staging/vt6655/wcmd.c b/drivers/staging/vt6655/wcmd.c index abd6745bc3fe..c30170a2bc44 100644 --- a/drivers/staging/vt6655/wcmd.c +++ b/drivers/staging/vt6655/wcmd.c | |||
| @@ -587,7 +587,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS | |||
| 587 | if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_JOINTED)) { | 587 | if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_JOINTED)) { |
| 588 | 588 | ||
| 589 | // Call mgr to begin the deauthentication | 589 | // Call mgr to begin the deauthentication |
| 590 | // reason = (3) beacuse sta has left ESS | 590 | // reason = (3) because sta has left ESS |
| 591 | if (pMgmt->eCurrState>= WMAC_STATE_AUTH) { | 591 | if (pMgmt->eCurrState>= WMAC_STATE_AUTH) { |
| 592 | vMgrDeAuthenBeginSta((void *)pDevice, pMgmt, pMgmt->abyCurrBSSID, (3), &Status); | 592 | vMgrDeAuthenBeginSta((void *)pDevice, pMgmt, pMgmt->abyCurrBSSID, (3), &Status); |
| 593 | } | 593 | } |
diff --git a/drivers/staging/vt6655/wmgr.h b/drivers/staging/vt6655/wmgr.h index 141e80b843af..e3ae562f521a 100644 --- a/drivers/staging/vt6655/wmgr.h +++ b/drivers/staging/vt6655/wmgr.h | |||
| @@ -220,7 +220,7 @@ typedef enum tagWMAC_POWER_MODE { | |||
| 220 | */ | 220 | */ |
| 221 | 221 | ||
| 222 | 222 | ||
| 223 | // Tx Managment Packet descriptor | 223 | // Tx Management Packet descriptor |
| 224 | typedef struct tagSTxMgmtPacket { | 224 | typedef struct tagSTxMgmtPacket { |
| 225 | 225 | ||
| 226 | PUWLAN_80211HDR p80211Header; | 226 | PUWLAN_80211HDR p80211Header; |
| @@ -230,7 +230,7 @@ typedef struct tagSTxMgmtPacket { | |||
| 230 | } STxMgmtPacket, *PSTxMgmtPacket; | 230 | } STxMgmtPacket, *PSTxMgmtPacket; |
| 231 | 231 | ||
| 232 | 232 | ||
| 233 | // Rx Managment Packet descriptor | 233 | // Rx Management Packet descriptor |
| 234 | typedef struct tagSRxMgmtPacket { | 234 | typedef struct tagSRxMgmtPacket { |
| 235 | 235 | ||
| 236 | PUWLAN_80211HDR p80211Header; | 236 | PUWLAN_80211HDR p80211Header; |
diff --git a/drivers/staging/vt6656/Kconfig b/drivers/staging/vt6656/Kconfig index a441ba513c40..f89ab205c8e0 100644 --- a/drivers/staging/vt6656/Kconfig +++ b/drivers/staging/vt6656/Kconfig | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | config VT6656 | 1 | config VT6656 |
| 2 | tristate "VIA Technologies VT6656 support" | 2 | tristate "VIA Technologies VT6656 support" |
| 3 | depends on USB && WLAN | 3 | depends on USB && WLAN && m |
| 4 | select WIRELESS_EXT | 4 | select WIRELESS_EXT |
| 5 | select WEXT_PRIV | 5 | select WEXT_PRIV |
| 6 | select FW_LOADER | 6 | select FW_LOADER |
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index 8f18578a5903..5185d61564d7 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c | |||
| @@ -1938,7 +1938,7 @@ s_vGenerateMACHeader ( | |||
| 1938 | * Out: | 1938 | * Out: |
| 1939 | * none | 1939 | * none |
| 1940 | * | 1940 | * |
| 1941 | * Return Value: CMD_STATUS_PENDING if MAC Tx resource avaliable; otherwise FALSE | 1941 | * Return Value: CMD_STATUS_PENDING if MAC Tx resource available; otherwise FALSE |
| 1942 | * | 1942 | * |
| 1943 | -*/ | 1943 | -*/ |
| 1944 | 1944 | ||
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c index b83b660b1f0f..019fb52de366 100644 --- a/drivers/staging/vt6656/wcmd.c +++ b/drivers/staging/vt6656/wcmd.c | |||
| @@ -421,7 +421,7 @@ void vRunCommand(void *hDeviceContext) | |||
| 421 | pMgmt->eScanState = WMAC_IS_SCANNING; | 421 | pMgmt->eScanState = WMAC_IS_SCANNING; |
| 422 | pDevice->byScanBBType = pDevice->byBBType; //lucas | 422 | pDevice->byScanBBType = pDevice->byBBType; //lucas |
| 423 | pDevice->bStopDataPkt = TRUE; | 423 | pDevice->bStopDataPkt = TRUE; |
| 424 | // Turn off RCR_BSSID filter everytime | 424 | // Turn off RCR_BSSID filter every time |
| 425 | MACvRegBitsOff(pDevice, MAC_REG_RCR, RCR_BSSID); | 425 | MACvRegBitsOff(pDevice, MAC_REG_RCR, RCR_BSSID); |
| 426 | pDevice->byRxMode &= ~RCR_BSSID; | 426 | pDevice->byRxMode &= ~RCR_BSSID; |
| 427 | 427 | ||
| @@ -604,7 +604,7 @@ void vRunCommand(void *hDeviceContext) | |||
| 604 | // if Infra mode | 604 | // if Infra mode |
| 605 | if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_JOINTED)) { | 605 | if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_JOINTED)) { |
| 606 | // Call mgr to begin the deauthentication | 606 | // Call mgr to begin the deauthentication |
| 607 | // reason = (3) beacuse sta has left ESS | 607 | // reason = (3) because sta has left ESS |
| 608 | if (pMgmt->eCurrState >= WMAC_STATE_AUTH) { | 608 | if (pMgmt->eCurrState >= WMAC_STATE_AUTH) { |
| 609 | vMgrDeAuthenBeginSta((void *)pDevice, | 609 | vMgrDeAuthenBeginSta((void *)pDevice, |
| 610 | pMgmt, | 610 | pMgmt, |
diff --git a/drivers/staging/vt6656/wmgr.h b/drivers/staging/vt6656/wmgr.h index 594f3a89d8a7..13dfb3bf8328 100644 --- a/drivers/staging/vt6656/wmgr.h +++ b/drivers/staging/vt6656/wmgr.h | |||
| @@ -218,7 +218,7 @@ typedef enum tagWMAC_POWER_MODE { | |||
| 218 | 218 | ||
| 219 | 219 | ||
| 220 | 220 | ||
| 221 | // Tx Managment Packet descriptor | 221 | // Tx Management Packet descriptor |
| 222 | typedef struct tagSTxMgmtPacket { | 222 | typedef struct tagSTxMgmtPacket { |
| 223 | 223 | ||
| 224 | PUWLAN_80211HDR p80211Header; | 224 | PUWLAN_80211HDR p80211Header; |
| @@ -228,7 +228,7 @@ typedef struct tagSTxMgmtPacket { | |||
| 228 | } STxMgmtPacket, *PSTxMgmtPacket; | 228 | } STxMgmtPacket, *PSTxMgmtPacket; |
| 229 | 229 | ||
| 230 | 230 | ||
| 231 | // Rx Managment Packet descriptor | 231 | // Rx Management Packet descriptor |
| 232 | typedef struct tagSRxMgmtPacket { | 232 | typedef struct tagSRxMgmtPacket { |
| 233 | 233 | ||
| 234 | PUWLAN_80211HDR p80211Header; | 234 | PUWLAN_80211HDR p80211Header; |
diff --git a/drivers/staging/westbridge/astoria/api/src/cyasdma.c b/drivers/staging/westbridge/astoria/api/src/cyasdma.c index 16b8ec124510..c461d4f60bfb 100644 --- a/drivers/staging/westbridge/astoria/api/src/cyasdma.c +++ b/drivers/staging/westbridge/astoria/api/src/cyasdma.c | |||
| @@ -1082,7 +1082,7 @@ cy_as_dma_received_data(cy_as_device *dev_p, | |||
| 1082 | /* | 1082 | /* |
| 1083 | * if the data received exceeds the size of the DMA buffer, | 1083 | * if the data received exceeds the size of the DMA buffer, |
| 1084 | * clip the data to the size of the buffer. this can lead | 1084 | * clip the data to the size of the buffer. this can lead |
| 1085 | * to loosing some data, but is not different than doing | 1085 | * to losing some data, but is not different than doing |
| 1086 | * non-packet reads on the other endpoints. | 1086 | * non-packet reads on the other endpoints. |
| 1087 | */ | 1087 | */ |
| 1088 | if (dsize > dma_p->size - dma_p->offset) | 1088 | if (dsize > dma_p->size - dma_p->offset) |
diff --git a/drivers/staging/westbridge/astoria/api/src/cyaslep2pep.c b/drivers/staging/westbridge/astoria/api/src/cyaslep2pep.c index 60b6f3525332..76821e51b817 100644 --- a/drivers/staging/westbridge/astoria/api/src/cyaslep2pep.c +++ b/drivers/staging/westbridge/astoria/api/src/cyaslep2pep.c | |||
| @@ -126,7 +126,7 @@ find_endpoint_directions(cy_as_device *dev_p, | |||
| 126 | cy_as_physical_endpoint_state desired; | 126 | cy_as_physical_endpoint_state desired; |
| 127 | 127 | ||
| 128 | /* | 128 | /* |
| 129 | * note, there is no error checking here becuase | 129 | * note, there is no error checking here because |
| 130 | * ISO error checking happens when the API is called. | 130 | * ISO error checking happens when the API is called. |
| 131 | */ | 131 | */ |
| 132 | for (i = 0; i < 10; i++) { | 132 | for (i = 0; i < 10; i++) { |
diff --git a/drivers/staging/westbridge/astoria/api/src/cyaslowlevel.c b/drivers/staging/westbridge/astoria/api/src/cyaslowlevel.c index d43dd858de58..96a86d088305 100644 --- a/drivers/staging/westbridge/astoria/api/src/cyaslowlevel.c +++ b/drivers/staging/westbridge/astoria/api/src/cyaslowlevel.c | |||
| @@ -432,7 +432,7 @@ cy_as_mail_box_queued_data_handler(cy_as_device *dev_p) | |||
| 432 | * is received. When a complete request is received, the callback | 432 | * is received. When a complete request is received, the callback |
| 433 | * associated with requests on that context is called. When a complete | 433 | * associated with requests on that context is called. When a complete |
| 434 | * response is recevied, the callback associated with the request that | 434 | * response is recevied, the callback associated with the request that |
| 435 | * generated the reponse is called. | 435 | * generated the response is called. |
| 436 | */ | 436 | */ |
| 437 | void | 437 | void |
| 438 | cy_as_mail_box_interrupt_handler(cy_as_device *dev_p) | 438 | cy_as_mail_box_interrupt_handler(cy_as_device *dev_p) |
diff --git a/drivers/staging/westbridge/astoria/api/src/cyasmisc.c b/drivers/staging/westbridge/astoria/api/src/cyasmisc.c index 7852410b0a4c..4564fc11df22 100644 --- a/drivers/staging/westbridge/astoria/api/src/cyasmisc.c +++ b/drivers/staging/westbridge/astoria/api/src/cyasmisc.c | |||
| @@ -428,7 +428,7 @@ my_misc_callback(cy_as_device *dev_p, uint8_t context, | |||
| 428 | if (v & CY_AS_MEM_P0_VM_SET_CFGMODE) | 428 | if (v & CY_AS_MEM_P0_VM_SET_CFGMODE) |
| 429 | cy_as_hal_print_message( | 429 | cy_as_hal_print_message( |
| 430 | "initialization message " | 430 | "initialization message " |
| 431 | "recieved, but config bit " | 431 | "received, but config bit " |
| 432 | "still set\n"); | 432 | "still set\n"); |
| 433 | 433 | ||
| 434 | v = cy_as_hal_read_register(dev_p->tag, | 434 | v = cy_as_hal_read_register(dev_p->tag, |
| @@ -436,7 +436,7 @@ my_misc_callback(cy_as_device *dev_p, uint8_t context, | |||
| 436 | if ((v & CY_AS_MEM_RST_RSTCMPT) == 0) | 436 | if ((v & CY_AS_MEM_RST_RSTCMPT) == 0) |
| 437 | cy_as_hal_print_message( | 437 | cy_as_hal_print_message( |
| 438 | "initialization message " | 438 | "initialization message " |
| 439 | "recieved, but reset complete " | 439 | "received, but reset complete " |
| 440 | "bit still not set\n"); | 440 | "bit still not set\n"); |
| 441 | } | 441 | } |
| 442 | break; | 442 | break; |
| @@ -2381,7 +2381,7 @@ try_wakeup_again: | |||
| 2381 | /* | 2381 | /* |
| 2382 | * release the west bridge micro-_controller from reset, | 2382 | * release the west bridge micro-_controller from reset, |
| 2383 | * so that firmware initialization can complete. the attempt | 2383 | * so that firmware initialization can complete. the attempt |
| 2384 | * to release antioch reset is made upto 8 times. | 2384 | * to release antioch reset is made up to 8 times. |
| 2385 | */ | 2385 | */ |
| 2386 | v = 0x03; | 2386 | v = 0x03; |
| 2387 | count = 0x08; | 2387 | count = 0x08; |
diff --git a/drivers/staging/westbridge/astoria/api/src/cyasmtp.c b/drivers/staging/westbridge/astoria/api/src/cyasmtp.c index 368984633874..8598364f7ab7 100644 --- a/drivers/staging/westbridge/astoria/api/src/cyasmtp.c +++ b/drivers/staging/westbridge/astoria/api/src/cyasmtp.c | |||
| @@ -346,7 +346,7 @@ cy_as_mtp_start(cy_as_device_handle handle, | |||
| 346 | 346 | ||
| 347 | dev_p->mtp_event_cb = event_c_b; | 347 | dev_p->mtp_event_cb = event_c_b; |
| 348 | /* | 348 | /* |
| 349 | * we register here becuase the start request may cause | 349 | * we register here because the start request may cause |
| 350 | * events to occur before the response to the start request. | 350 | * events to occur before the response to the start request. |
| 351 | */ | 351 | */ |
| 352 | cy_as_ll_register_request_callback(dev_p, | 352 | cy_as_ll_register_request_callback(dev_p, |
| @@ -424,7 +424,7 @@ my_handle_response_mtp_stop(cy_as_device *dev_p, | |||
| 424 | goto destroy; | 424 | goto destroy; |
| 425 | 425 | ||
| 426 | /* | 426 | /* |
| 427 | * we sucessfully shutdown the stack, so decrement | 427 | * we successfully shutdown the stack, so decrement |
| 428 | * to make the count zero. | 428 | * to make the count zero. |
| 429 | */ | 429 | */ |
| 430 | dev_p->mtp_count--; | 430 | dev_p->mtp_count--; |
diff --git a/drivers/staging/westbridge/astoria/api/src/cyasstorage.c b/drivers/staging/westbridge/astoria/api/src/cyasstorage.c index 2451404b88d4..7abd6a35e828 100644 --- a/drivers/staging/westbridge/astoria/api/src/cyasstorage.c +++ b/drivers/staging/westbridge/astoria/api/src/cyasstorage.c | |||
| @@ -1773,7 +1773,7 @@ cy_as_storage_async_oper(cy_as_device *dev_p, cy_as_end_point_number_t ep, | |||
| 1773 | if (unit > 255) | 1773 | if (unit > 255) |
| 1774 | return CY_AS_ERROR_NO_SUCH_UNIT; | 1774 | return CY_AS_ERROR_NO_SUCH_UNIT; |
| 1775 | 1775 | ||
| 1776 | /* We are supposed to return sucess if the number of | 1776 | /* We are supposed to return success if the number of |
| 1777 | * blocks is zero | 1777 | * blocks is zero |
| 1778 | */ | 1778 | */ |
| 1779 | if (num_blocks == 0) { | 1779 | if (num_blocks == 0) { |
| @@ -1969,7 +1969,7 @@ cy_as_storage_sync_oper(cy_as_device *dev_p, | |||
| 1969 | if (cy_as_device_is_usb_async_pending(dev_p, 6)) | 1969 | if (cy_as_device_is_usb_async_pending(dev_p, 6)) |
| 1970 | return CY_AS_ERROR_ASYNC_PENDING; | 1970 | return CY_AS_ERROR_ASYNC_PENDING; |
| 1971 | 1971 | ||
| 1972 | /* We are supposed to return sucess if the number of | 1972 | /* We are supposed to return success if the number of |
| 1973 | * blocks is zero | 1973 | * blocks is zero |
| 1974 | */ | 1974 | */ |
| 1975 | if (num_blocks == 0) | 1975 | if (num_blocks == 0) |
| @@ -3285,7 +3285,7 @@ cy_as_sdio_extended_i_o_async( | |||
| 3285 | if (callback == 0) | 3285 | if (callback == 0) |
| 3286 | return CY_AS_ERROR_NULL_CALLBACK; | 3286 | return CY_AS_ERROR_NULL_CALLBACK; |
| 3287 | 3287 | ||
| 3288 | /* We are supposed to return sucess if the number of | 3288 | /* We are supposed to return success if the number of |
| 3289 | * blocks is zero | 3289 | * blocks is zero |
| 3290 | */ | 3290 | */ |
| 3291 | if (((misc_buf&CY_SDIO_BLOCKMODE) != 0) && (argument == 0)) { | 3291 | if (((misc_buf&CY_SDIO_BLOCKMODE) != 0) && (argument == 0)) { |
diff --git a/drivers/staging/westbridge/astoria/api/src/cyasusb.c b/drivers/staging/westbridge/astoria/api/src/cyasusb.c index 92ea42503bf3..1b55e611191e 100644 --- a/drivers/staging/westbridge/astoria/api/src/cyasusb.c +++ b/drivers/staging/westbridge/astoria/api/src/cyasusb.c | |||
| @@ -739,7 +739,7 @@ cy_as_usb_start(cy_as_device_handle handle, | |||
| 739 | cy_as_usb_reset_e_p0_state(dev_p); | 739 | cy_as_usb_reset_e_p0_state(dev_p); |
| 740 | 740 | ||
| 741 | /* | 741 | /* |
| 742 | * we register here becuase the start request may cause | 742 | * we register here because the start request may cause |
| 743 | * events to occur before the response to the start request. | 743 | * events to occur before the response to the start request. |
| 744 | */ | 744 | */ |
| 745 | cy_as_ll_register_request_callback(dev_p, | 745 | cy_as_ll_register_request_callback(dev_p, |
| @@ -867,7 +867,7 @@ my_handle_response_usb_stop(cy_as_device *dev_p, | |||
| 867 | goto destroy; | 867 | goto destroy; |
| 868 | 868 | ||
| 869 | /* | 869 | /* |
| 870 | * we sucessfully shutdown the stack, so | 870 | * we successfully shutdown the stack, so |
| 871 | * decrement to make the count zero. | 871 | * decrement to make the count zero. |
| 872 | */ | 872 | */ |
| 873 | cy_as_usb_cleanup(dev_p); | 873 | cy_as_usb_cleanup(dev_p); |
diff --git a/drivers/staging/westbridge/astoria/arch/arm/mach-omap2/cyashalomap_kernel.c b/drivers/staging/westbridge/astoria/arch/arm/mach-omap2/cyashalomap_kernel.c index 21cdb0637beb..3bcedce13f4a 100644 --- a/drivers/staging/westbridge/astoria/arch/arm/mach-omap2/cyashalomap_kernel.c +++ b/drivers/staging/westbridge/astoria/arch/arm/mach-omap2/cyashalomap_kernel.c | |||
| @@ -87,7 +87,7 @@ | |||
| 87 | 87 | ||
| 88 | 88 | ||
| 89 | /* | 89 | /* |
| 90 | * For performance reasons, we handle storage endpoint transfers upto 4 KB | 90 | * For performance reasons, we handle storage endpoint transfers up to 4 KB |
| 91 | * within the HAL itself. | 91 | * within the HAL itself. |
| 92 | */ | 92 | */ |
| 93 | #define CYASSTORAGE_WRITE_EP_NUM (4) | 93 | #define CYASSTORAGE_WRITE_EP_NUM (4) |
| @@ -108,12 +108,12 @@ | |||
| 108 | ((ep) == 6) || ((ep) == 8)) | 108 | ((ep) == 6) || ((ep) == 8)) |
| 109 | 109 | ||
| 110 | /* | 110 | /* |
| 111 | * persistant, stores current GPMC interface cfg mode | 111 | * persistent, stores current GPMC interface cfg mode |
| 112 | */ | 112 | */ |
| 113 | static uint8_t pnand_16bit; | 113 | static uint8_t pnand_16bit; |
| 114 | 114 | ||
| 115 | /* | 115 | /* |
| 116 | * keep processing new WB DRQ in ISR untill all handled (performance feature) | 116 | * keep processing new WB DRQ in ISR until all handled (performance feature) |
| 117 | */ | 117 | */ |
| 118 | #define PROCESS_MULTIPLE_DRQ_IN_ISR (1) | 118 | #define PROCESS_MULTIPLE_DRQ_IN_ISR (1) |
| 119 | 119 | ||
| @@ -157,7 +157,7 @@ typedef struct cy_as_hal_endpoint_dma { | |||
| 157 | * dma_xfer_sz - size of the next dma xfer on P port | 157 | * dma_xfer_sz - size of the next dma xfer on P port |
| 158 | * seg_xfer_cnt - counts xfered bytes for in current sg_list | 158 | * seg_xfer_cnt - counts xfered bytes for in current sg_list |
| 159 | * memory segment | 159 | * memory segment |
| 160 | * req_xfer_cnt - total number of bytes transfered so far in | 160 | * req_xfer_cnt - total number of bytes transferred so far in |
| 161 | * current request | 161 | * current request |
| 162 | * req_length - total request length | 162 | * req_length - total request length |
| 163 | */ | 163 | */ |
| @@ -2160,7 +2160,7 @@ void cy_as_hal_mem_set(void *ptr, uint8_t value, uint32_t cnt) | |||
| 2160 | /* | 2160 | /* |
| 2161 | * This function is expected to create a sleep channel. | 2161 | * This function is expected to create a sleep channel. |
| 2162 | * The data structure that represents the sleep channel object | 2162 | * The data structure that represents the sleep channel object |
| 2163 | * sleep channel (which is Linux "wait_queue_head_t wq" for this paticular HAL) | 2163 | * sleep channel (which is Linux "wait_queue_head_t wq" for this particular HAL) |
| 2164 | * passed as a pointer, and allpocated by the caller | 2164 | * passed as a pointer, and allpocated by the caller |
| 2165 | * (typically as a local var on the stack) "Create" word should read as | 2165 | * (typically as a local var on the stack) "Create" word should read as |
| 2166 | * "SleepOn", this func doesn't actually create anything | 2166 | * "SleepOn", this func doesn't actually create anything |
| @@ -2364,7 +2364,7 @@ int start_o_m_a_p_kernel(const char *pgm, | |||
| 2364 | */ | 2364 | */ |
| 2365 | cy_as_hal_gpmc_enable_16bit_bus(cy_true); | 2365 | cy_as_hal_gpmc_enable_16bit_bus(cy_true); |
| 2366 | #else | 2366 | #else |
| 2367 | /* Astoria and GPMC are already in 8 bit mode, jsut initialize PNAND_CFG */ | 2367 | /* Astoria and GPMC are already in 8 bit mode, just initialize PNAND_CFG */ |
| 2368 | ast_p_nand_casdi_write(CY_AS_MEM_PNAND_CFG, 0x0000); | 2368 | ast_p_nand_casdi_write(CY_AS_MEM_PNAND_CFG, 0x0000); |
| 2369 | #endif | 2369 | #endif |
| 2370 | 2370 | ||
diff --git a/drivers/staging/westbridge/astoria/arch/arm/plat-omap/include/mach/westbridge/westbridge-omap3-pnand-hal/cyashalomap_kernel.h b/drivers/staging/westbridge/astoria/arch/arm/plat-omap/include/mach/westbridge/westbridge-omap3-pnand-hal/cyashalomap_kernel.h index 80dd530bc4fd..6426ea61f3d4 100644 --- a/drivers/staging/westbridge/astoria/arch/arm/plat-omap/include/mach/westbridge/westbridge-omap3-pnand-hal/cyashalomap_kernel.h +++ b/drivers/staging/westbridge/astoria/arch/arm/plat-omap/include/mach/westbridge/westbridge-omap3-pnand-hal/cyashalomap_kernel.h | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | /* | 22 | /* |
| 23 | * This file contains the defintion of the hardware abstraction | 23 | * This file contains the definition of the hardware abstraction |
| 24 | * layer on OMAP3430 talking to the West Bridge Astoria device | 24 | * layer on OMAP3430 talking to the West Bridge Astoria device |
| 25 | */ | 25 | */ |
| 26 | 26 | ||
diff --git a/drivers/staging/westbridge/astoria/arch/arm/plat-omap/include/mach/westbridge/westbridge-omap3-pnand-hal/cyasmemmap.h b/drivers/staging/westbridge/astoria/arch/arm/plat-omap/include/mach/westbridge/westbridge-omap3-pnand-hal/cyasmemmap.h index 3eee192ffe89..46f06ee29357 100644 --- a/drivers/staging/westbridge/astoria/arch/arm/plat-omap/include/mach/westbridge/westbridge-omap3-pnand-hal/cyasmemmap.h +++ b/drivers/staging/westbridge/astoria/arch/arm/plat-omap/include/mach/westbridge/westbridge-omap3-pnand-hal/cyasmemmap.h | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | * GPMC_ADDR | 51 | * GPMC_ADDR |
| 52 | * [A8:A1]->upD[7:0] | 52 | * [A8:A1]->upD[7:0] |
| 53 | * INT# -GPMC_nWP_GPIO_62 | 53 | * INT# -GPMC_nWP_GPIO_62 |
| 54 | * DACK -N/C not conected | 54 | * DACK -N/C not connected |
| 55 | * WAKEUP-GPIO_167 | 55 | * WAKEUP-GPIO_167 |
| 56 | * RESET-GPIO_126 | 56 | * RESET-GPIO_126 |
| 57 | * R/B -GPMC_WAIT2_GPIO_64 | 57 | * R/B -GPMC_WAIT2_GPIO_64 |
| @@ -108,7 +108,7 @@ | |||
| 108 | * will be monitored | 108 | * will be monitored |
| 109 | * PF_EN_ENGINE - 1- ENABLES ENGINE, but it needs to be started after | 109 | * PF_EN_ENGINE - 1- ENABLES ENGINE, but it needs to be started after |
| 110 | * that C ctrl reg bit 0 | 110 | * that C ctrl reg bit 0 |
| 111 | * PF_FIFO_THRESHOLD - FIFO threshhold in number of BUS(8 or 16) words | 111 | * PF_FIFO_THRESHOLD - FIFO threshold in number of BUS(8 or 16) words |
| 112 | * PF_WEIGHTED_PRIO - NUM of cycles granted to PFE if RND_ROBIN | 112 | * PF_WEIGHTED_PRIO - NUM of cycles granted to PFE if RND_ROBIN |
| 113 | * prioritization is enabled | 113 | * prioritization is enabled |
| 114 | * PF_ROUND_ROBIN - if enabled, gives priority to other CS, but | 114 | * PF_ROUND_ROBIN - if enabled, gives priority to other CS, but |
diff --git a/drivers/staging/westbridge/astoria/block/cyasblkdev_queue.c b/drivers/staging/westbridge/astoria/block/cyasblkdev_queue.c index 0bbb8a3e191d..d1996a27515e 100644 --- a/drivers/staging/westbridge/astoria/block/cyasblkdev_queue.c +++ b/drivers/staging/westbridge/astoria/block/cyasblkdev_queue.c | |||
| @@ -222,7 +222,7 @@ static int cyasblkdev_queue_thread(void *d) | |||
| 222 | continue; | 222 | continue; |
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | /* new req recieved, issue it to the driver */ | 225 | /* new req received, issue it to the driver */ |
| 226 | set_current_state(TASK_RUNNING); | 226 | set_current_state(TASK_RUNNING); |
| 227 | 227 | ||
| 228 | #ifndef WESTBRIDGE_NDEBUG | 228 | #ifndef WESTBRIDGE_NDEBUG |
diff --git a/drivers/staging/westbridge/astoria/gadget/cyasgadget.c b/drivers/staging/westbridge/astoria/gadget/cyasgadget.c index defa05cd5e50..be851ca54cec 100644 --- a/drivers/staging/westbridge/astoria/gadget/cyasgadget.c +++ b/drivers/staging/westbridge/astoria/gadget/cyasgadget.c | |||
| @@ -587,6 +587,7 @@ static int cyasgadget_enable( | |||
| 587 | "cy_as_usb_end_point_config EP %s mismatch " | 587 | "cy_as_usb_end_point_config EP %s mismatch " |
| 588 | "on enabled\n", an_ep->usb_ep_inst.name); | 588 | "on enabled\n", an_ep->usb_ep_inst.name); |
| 589 | #endif | 589 | #endif |
| 590 | spin_unlock_irqrestore(&an_dev->lock, flags); | ||
| 590 | return -EINVAL; | 591 | return -EINVAL; |
| 591 | } | 592 | } |
| 592 | 593 | ||
diff --git a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasdevice.h b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasdevice.h index 0c0726b678ad..6452a9070091 100644 --- a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasdevice.h +++ b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasdevice.h | |||
| @@ -119,7 +119,7 @@ | |||
| 119 | #define CY_AS_REQUEST_LIST_STATE_QUEUED (0x00) | 119 | #define CY_AS_REQUEST_LIST_STATE_QUEUED (0x00) |
| 120 | /* The request is sent, waiting for response */ | 120 | /* The request is sent, waiting for response */ |
| 121 | #define CY_AS_REQUEST_LIST_STATE_WAITING (0x01) | 121 | #define CY_AS_REQUEST_LIST_STATE_WAITING (0x01) |
| 122 | /* The response has been received, processing reponse */ | 122 | /* The response has been received, processing response */ |
| 123 | #define CY_AS_REQUEST_LIST_STATE_RECEIVED (0x02) | 123 | #define CY_AS_REQUEST_LIST_STATE_RECEIVED (0x02) |
| 124 | /* The request/response is being canceled */ | 124 | /* The request/response is being canceled */ |
| 125 | #define CY_AS_REQUEST_LIST_STATE_CANCELING (0x03) | 125 | #define CY_AS_REQUEST_LIST_STATE_CANCELING (0x03) |
| @@ -517,7 +517,7 @@ typedef struct cy_as_context { | |||
| 517 | cy_as_ll_request_list_node *request_queue_p; | 517 | cy_as_ll_request_list_node *request_queue_p; |
| 518 | /* The list node in the request queue */ | 518 | /* The list node in the request queue */ |
| 519 | cy_as_ll_request_list_node *last_node_p; | 519 | cy_as_ll_request_list_node *last_node_p; |
| 520 | /* Index upto which data is stored. */ | 520 | /* Index up to which data is stored. */ |
| 521 | uint16_t queue_index; | 521 | uint16_t queue_index; |
| 522 | /* Index to the next request in the queue. */ | 522 | /* Index to the next request in the queue. */ |
| 523 | uint16_t rqt_index; | 523 | uint16_t rqt_index; |
| @@ -768,7 +768,7 @@ struct cy_as_device { | |||
| 768 | uint32_t mtp_count; | 768 | uint32_t mtp_count; |
| 769 | /* The MTP event callback supplied by the client */ | 769 | /* The MTP event callback supplied by the client */ |
| 770 | cy_as_mtp_event_callback mtp_event_cb; | 770 | cy_as_mtp_event_callback mtp_event_cb; |
| 771 | /* The current block table to be transfered */ | 771 | /* The current block table to be transferred */ |
| 772 | cy_as_mtp_block_table *tp_blk_tbl; | 772 | cy_as_mtp_block_table *tp_blk_tbl; |
| 773 | 773 | ||
| 774 | cy_as_c_b_queue *func_cbs_mtp; | 774 | cy_as_c_b_queue *func_cbs_mtp; |
diff --git a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasdma.h b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasdma.h index 8dab5e900149..16dc9f96018c 100644 --- a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasdma.h +++ b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasdma.h | |||
| @@ -108,7 +108,7 @@ typedef enum cy_as_dma_direction { | |||
| 108 | completes a requested DMA operation. | 108 | completes a requested DMA operation. |
| 109 | 109 | ||
| 110 | Returns | 110 | Returns |
| 111 | CY_AS_ERROR_SUCCESS - the module initialized sucessfully | 111 | CY_AS_ERROR_SUCCESS - the module initialized successfully |
| 112 | CY_AS_ERROR_OUT_OF_MEMORY - memory allocation failed during | 112 | CY_AS_ERROR_OUT_OF_MEMORY - memory allocation failed during |
| 113 | initialization | 113 | initialization |
| 114 | CY_AS_ERROR_ALREADY_RUNNING - the DMA module was already running | 114 | CY_AS_ERROR_ALREADY_RUNNING - the DMA module was already running |
| @@ -131,7 +131,7 @@ cy_as_dma_start( | |||
| 131 | then freeing the resources associated with each DMA endpoint. | 131 | then freeing the resources associated with each DMA endpoint. |
| 132 | 132 | ||
| 133 | Returns | 133 | Returns |
| 134 | CY_AS_ERROR_SUCCESS - the module shutdown sucessfully | 134 | CY_AS_ERROR_SUCCESS - the module shutdown successfully |
| 135 | CY_AS_ERROR_NOT_RUNNING - the DMA module was not running | 135 | CY_AS_ERROR_NOT_RUNNING - the DMA module was not running |
| 136 | 136 | ||
| 137 | See Also | 137 | See Also |
| @@ -161,7 +161,7 @@ cy_as_dma_stop( | |||
| 161 | 161 | ||
| 162 | Returns | 162 | Returns |
| 163 | CY_AS_ERROR_SUCCESS - the traffic on the endpoint is canceled | 163 | CY_AS_ERROR_SUCCESS - the traffic on the endpoint is canceled |
| 164 | sucessfully | 164 | successfully |
| 165 | 165 | ||
| 166 | See Also | 166 | See Also |
| 167 | */ | 167 | */ |
| @@ -266,7 +266,7 @@ cy_as_dma_queue_request( | |||
| 266 | will have to maintain a list of sleep channels to wake. | 266 | will have to maintain a list of sleep channels to wake. |
| 267 | 267 | ||
| 268 | Returns | 268 | Returns |
| 269 | * CY_AS_ERROR_SUCCESS - the queue has drained sucessfully | 269 | * CY_AS_ERROR_SUCCESS - the queue has drained successfully |
| 270 | * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given is not valid | 270 | * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given is not valid |
| 271 | * CY_AS_ERROR_NESTED_SLEEP - CyAsDmaQueueRequest() was requested | 271 | * CY_AS_ERROR_NESTED_SLEEP - CyAsDmaQueueRequest() was requested |
| 272 | * on an endpoint where CyAsDmaQueueRequest was already called | 272 | * on an endpoint where CyAsDmaQueueRequest was already called |
| @@ -295,7 +295,7 @@ cy_as_dma_drain_queue( | |||
| 295 | CyAsHalDmaSetupRead() functoins. | 295 | CyAsHalDmaSetupRead() functoins. |
| 296 | 296 | ||
| 297 | Returns | 297 | Returns |
| 298 | * CY_AS_ERROR_SUCCESS - the value was set sucessfully | 298 | * CY_AS_ERROR_SUCCESS - the value was set successfully |
| 299 | * CY_AS_ERROR_INVALID_SIZE - the size value was not valid | 299 | * CY_AS_ERROR_INVALID_SIZE - the size value was not valid |
| 300 | */ | 300 | */ |
| 301 | extern cy_as_return_status_t | 301 | extern cy_as_return_status_t |
diff --git a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyaserr.h b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyaserr.h index f78d60270d45..2cd0af1ed781 100644 --- a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyaserr.h +++ b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyaserr.h | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | */ | 29 | */ |
| 30 | 30 | ||
| 31 | /* Summary | 31 | /* Summary |
| 32 | The function completed sucessfully | 32 | The function completed successfully |
| 33 | */ | 33 | */ |
| 34 | #define CY_AS_ERROR_SUCCESS (0) | 34 | #define CY_AS_ERROR_SUCCESS (0) |
| 35 | 35 | ||
| @@ -796,7 +796,7 @@ | |||
| 796 | Description | 796 | Description |
| 797 | This error is returned when an operation is attempted that cannot be | 797 | This error is returned when an operation is attempted that cannot be |
| 798 | completed while the USB stack is connected to a USB host. In order | 798 | completed while the USB stack is connected to a USB host. In order |
| 799 | to sucessfully complete the desired operation, CyAsUsbDisconnect() | 799 | to successfully complete the desired operation, CyAsUsbDisconnect() |
| 800 | must be called to disconnect from the host. | 800 | must be called to disconnect from the host. |
| 801 | */ | 801 | */ |
| 802 | #define CY_AS_ERROR_USB_CONNECTED (53) | 802 | #define CY_AS_ERROR_USB_CONNECTED (53) |
diff --git a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyashaldoc.h b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyashaldoc.h index 28136ad75115..5bcbe9bf2f5d 100644 --- a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyashaldoc.h +++ b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyashaldoc.h | |||
| @@ -597,7 +597,7 @@ cy_as_mem_set( | |||
| 597 | CyAsHalSleepChannel. | 597 | CyAsHalSleepChannel. |
| 598 | 598 | ||
| 599 | Returns | 599 | Returns |
| 600 | CyTrue is the initialization was sucessful, and CyFalse otherwise | 600 | CyTrue is the initialization was successful, and CyFalse otherwise |
| 601 | 601 | ||
| 602 | See Also | 602 | See Also |
| 603 | * CyAsHalSleepChannel | 603 | * CyAsHalSleepChannel |
diff --git a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasintr.h b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasintr.h index 3d7063ea3093..60a6fffb5d53 100644 --- a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasintr.h +++ b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasintr.h | |||
| @@ -69,7 +69,7 @@ cy_as_intr_start( | |||
| 69 | 69 | ||
| 70 | Returns | 70 | Returns |
| 71 | * CY_AS_ERROR_SUCCESS - the interrupt module was stopped | 71 | * CY_AS_ERROR_SUCCESS - the interrupt module was stopped |
| 72 | * sucessfully | 72 | * successfully |
| 73 | * CY_AS_ERROR_NOT_RUNNING - the interrupt module was not | 73 | * CY_AS_ERROR_NOT_RUNNING - the interrupt module was not |
| 74 | * running | 74 | * running |
| 75 | 75 | ||
diff --git a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasmisc.h b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasmisc.h index 2f0701850561..df7c2b66cf27 100644 --- a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasmisc.h +++ b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasmisc.h | |||
| @@ -620,7 +620,7 @@ cy_as_misc_in_standby( | |||
| 620 | * Nestable: YES | 620 | * Nestable: YES |
| 621 | 621 | ||
| 622 | Returns | 622 | Returns |
| 623 | * CY_AS_ERROR_SUCCESS - the firmware was sucessfully downloaded | 623 | * CY_AS_ERROR_SUCCESS - the firmware was successfully downloaded |
| 624 | * CY_AS_ERROR_INVALID_HANDLE | 624 | * CY_AS_ERROR_INVALID_HANDLE |
| 625 | * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device | 625 | * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device |
| 626 | * was not configured | 626 | * was not configured |
| @@ -836,7 +836,7 @@ cy_as_misc_reset( | |||
| 836 | ownership. | 836 | ownership. |
| 837 | 837 | ||
| 838 | Returns | 838 | Returns |
| 839 | * CY_AS_ERROR_SUCCESS - the p port sucessfully acquired the | 839 | * CY_AS_ERROR_SUCCESS - the p port successfully acquired the |
| 840 | * resource of interest | 840 | * resource of interest |
| 841 | * CY_AS_ERROR_INVALID_HANDLE | 841 | * CY_AS_ERROR_INVALID_HANDLE |
| 842 | * CY_AS_ERROR_NOT_CONFIGURED | 842 | * CY_AS_ERROR_NOT_CONFIGURED |
| @@ -879,7 +879,7 @@ cy_as_misc_acquire_resource( | |||
| 879 | * Valid In Asynchronous Callback: NO | 879 | * Valid In Asynchronous Callback: NO |
| 880 | 880 | ||
| 881 | Returns | 881 | Returns |
| 882 | * CY_AS_ERROR_SUCCESS - the p port sucessfully released | 882 | * CY_AS_ERROR_SUCCESS - the p port successfully released |
| 883 | * the resource of interest | 883 | * the resource of interest |
| 884 | * CY_AS_ERROR_INVALID_HANDLE | 884 | * CY_AS_ERROR_INVALID_HANDLE |
| 885 | * CY_AS_ERROR_NOT_CONFIGURED | 885 | * CY_AS_ERROR_NOT_CONFIGURED |
| @@ -929,7 +929,7 @@ cy_as_misc_release_resource( | |||
| 929 | 929 | ||
| 930 | Returns | 930 | Returns |
| 931 | * CY_AS_ERROR_SUCCESS - the trace configuration has been | 931 | * CY_AS_ERROR_SUCCESS - the trace configuration has been |
| 932 | * sucessfully changed | 932 | * successfully changed |
| 933 | * CY_AS_ERROR_NO_SUCH_BUS - the bus specified does not exist | 933 | * CY_AS_ERROR_NO_SUCH_BUS - the bus specified does not exist |
| 934 | * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device | 934 | * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device |
| 935 | * pair does not exist | 935 | * pair does not exist |
diff --git a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasprotocol.h b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasprotocol.h index 317805fc4ff4..773b645ea7eb 100644 --- a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasprotocol.h +++ b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasprotocol.h | |||
| @@ -756,7 +756,7 @@ | |||
| 756 | * 1 : Debug mode | 756 | * 1 : Debug mode |
| 757 | 757 | ||
| 758 | Description | 758 | Description |
| 759 | This reponse is sent to return the firmware version | 759 | This response is sent to return the firmware version |
| 760 | number to the requestor. | 760 | number to the requestor. |
| 761 | */ | 761 | */ |
| 762 | #define CY_RESP_FIRMWARE_VERSION (16) | 762 | #define CY_RESP_FIRMWARE_VERSION (16) |
| @@ -3655,7 +3655,7 @@ | |||
| 3655 | This request is sent to the West Bridge when the P port | 3655 | This request is sent to the West Bridge when the P port |
| 3656 | needs to send data to the Host in a Turbo Endpoint. | 3656 | needs to send data to the Host in a Turbo Endpoint. |
| 3657 | Upon receiving this event, Firmware will make the end point | 3657 | Upon receiving this event, Firmware will make the end point |
| 3658 | avilable for the P port. If the length is zero, then | 3658 | available for the P port. If the length is zero, then |
| 3659 | firmware will send a zero length packet. | 3659 | firmware will send a zero length packet. |
| 3660 | 3660 | ||
| 3661 | Direction | 3661 | Direction |
diff --git a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasstorage.h b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasstorage.h index 64f078cf202c..52b93c3e4813 100644 --- a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasstorage.h +++ b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasstorage.h | |||
| @@ -832,7 +832,7 @@ typedef struct cy_as_sdio_func { | |||
| 832 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been | 832 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been |
| 833 | * loaded into West Bridge | 833 | * loaded into West Bridge |
| 834 | * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in | 834 | * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in |
| 835 | * CY_AS_ERROR_SUCCESS - the module started sucessfully | 835 | * CY_AS_ERROR_SUCCESS - the module started successfully |
| 836 | * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating | 836 | * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating |
| 837 | * with the West Bridge device | 837 | * with the West Bridge device |
| 838 | * CY_AS_ERROR_OUT_OF_MEMORY | 838 | * CY_AS_ERROR_OUT_OF_MEMORY |
| @@ -882,7 +882,7 @@ cy_as_storage_start( | |||
| 882 | * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was | 882 | * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was |
| 883 | * passed in | 883 | * passed in |
| 884 | * CY_AS_ERROR_SUCCESS - this module was shut | 884 | * CY_AS_ERROR_SUCCESS - this module was shut |
| 885 | * down sucessfully | 885 | * down successfully |
| 886 | * CY_AS_ERROR_TIMEOUT - a timeout occurred | 886 | * CY_AS_ERROR_TIMEOUT - a timeout occurred |
| 887 | * communicating with the West Bridge device | 887 | * communicating with the West Bridge device |
| 888 | * CY_AS_ERROR_NOT_RUNNING | 888 | * CY_AS_ERROR_NOT_RUNNING |
| @@ -934,7 +934,7 @@ cy_as_storage_stop( | |||
| 934 | * CY_AS_ERROR_INVALID_HANDLE - an invalid handle | 934 | * CY_AS_ERROR_INVALID_HANDLE - an invalid handle |
| 935 | * was passed in | 935 | * was passed in |
| 936 | * CY_AS_ERROR_SUCCESS - the function was registered | 936 | * CY_AS_ERROR_SUCCESS - the function was registered |
| 937 | * sucessfully | 937 | * successfully |
| 938 | * CY_AS_ERROR_NOT_RUNNING - the stack is not running | 938 | * CY_AS_ERROR_NOT_RUNNING - the stack is not running |
| 939 | 939 | ||
| 940 | See Also | 940 | See Also |
| @@ -981,7 +981,7 @@ cy_as_storage_register_callback( | |||
| 981 | * been started | 981 | * been started |
| 982 | * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was | 982 | * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was |
| 983 | * passed in | 983 | * passed in |
| 984 | * CY_AS_ERROR_SUCCESS - this request was sucessfully | 984 | * CY_AS_ERROR_SUCCESS - this request was successfully |
| 985 | * transmitted to the West Bridge device | 985 | * transmitted to the West Bridge device |
| 986 | * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating | 986 | * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating |
| 987 | * with the West Bridge device | 987 | * with the West Bridge device |
| @@ -1034,7 +1034,7 @@ cy_as_storage_claim( | |||
| 1034 | * been started | 1034 | * been started |
| 1035 | * CY_AS_ERROR_INVALID_HANDLE - an invalid handle | 1035 | * CY_AS_ERROR_INVALID_HANDLE - an invalid handle |
| 1036 | * was passed in | 1036 | * was passed in |
| 1037 | * CY_AS_ERROR_SUCCESS - the media was sucessfully | 1037 | * CY_AS_ERROR_SUCCESS - the media was successfully |
| 1038 | * released | 1038 | * released |
| 1039 | * CY_AS_ERROR_MEDIA_NOT_CLAIMED - the media was not | 1039 | * CY_AS_ERROR_MEDIA_NOT_CLAIMED - the media was not |
| 1040 | * claimed by the P port | 1040 | * claimed by the P port |
| @@ -1905,7 +1905,7 @@ cy_as_storage_get_transfer_amount( | |||
| 1905 | differ between SD cards. | 1905 | differ between SD cards. |
| 1906 | 1906 | ||
| 1907 | A large erase can take a while to complete depending on the SD | 1907 | A large erase can take a while to complete depending on the SD |
| 1908 | card. In such a case it is reccomended that an async call is made. | 1908 | card. In such a case it is recommended that an async call is made. |
| 1909 | 1909 | ||
| 1910 | Returns | 1910 | Returns |
| 1911 | * CY_AS_ERROR_SUCCESS - API call completed successfully | 1911 | * CY_AS_ERROR_SUCCESS - API call completed successfully |
| @@ -1926,7 +1926,7 @@ cy_as_storage_get_transfer_amount( | |||
| 1926 | * required before erase is allowed | 1926 | * required before erase is allowed |
| 1927 | * CY_AS_ERROR_NO_SUCH_BUS | 1927 | * CY_AS_ERROR_NO_SUCH_BUS |
| 1928 | * CY_AS_ERROR_NO_SUCH_DEVICE | 1928 | * CY_AS_ERROR_NO_SUCH_DEVICE |
| 1929 | * CY_AS_ERROR_NOT_SUPPORTED - Erase is currenly only supported | 1929 | * CY_AS_ERROR_NOT_SUPPORTED - Erase is currently only supported |
| 1930 | * on SD and using SD only firmware | 1930 | * on SD and using SD only firmware |
| 1931 | * CY_AS_ERROR_OUT_OF_MEMORY | 1931 | * CY_AS_ERROR_OUT_OF_MEMORY |
| 1932 | 1932 | ||
| @@ -1985,7 +1985,7 @@ cy_as_storage_erase( | |||
| 1985 | * type was made | 1985 | * type was made |
| 1986 | * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available | 1986 | * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available |
| 1987 | * CY_AS_ERROR_INVALID_RESPONSE - an error message was | 1987 | * CY_AS_ERROR_INVALID_RESPONSE - an error message was |
| 1988 | * recieved from the firmware | 1988 | * received from the firmware |
| 1989 | * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in | 1989 | * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in |
| 1990 | * reading from the media | 1990 | * reading from the media |
| 1991 | * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made to | 1991 | * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made to |
| @@ -2047,7 +2047,7 @@ cy_as_sdio_get_c_i_s_info( | |||
| 2047 | * pair does not exist | 2047 | * pair does not exist |
| 2048 | * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available | 2048 | * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available |
| 2049 | * CY_AS_ERROR_INVALID_RESPONSE - an error message was | 2049 | * CY_AS_ERROR_INVALID_RESPONSE - an error message was |
| 2050 | * recieved from the firmware | 2050 | * received from the firmware |
| 2051 | 2051 | ||
| 2052 | */ | 2052 | */ |
| 2053 | cy_as_return_status_t | 2053 | cy_as_return_status_t |
| @@ -2095,7 +2095,7 @@ cy_as_sdio_query_card( | |||
| 2095 | * pair does not exist | 2095 | * pair does not exist |
| 2096 | * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available | 2096 | * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available |
| 2097 | * CY_AS_ERROR_INVALID_RESPONSE - an error message was | 2097 | * CY_AS_ERROR_INVALID_RESPONSE - an error message was |
| 2098 | * recieved from the firmware | 2098 | * received from the firmware |
| 2099 | */ | 2099 | */ |
| 2100 | cy_as_return_status_t | 2100 | cy_as_return_status_t |
| 2101 | cy_as_sdio_reset_card( | 2101 | cy_as_sdio_reset_card( |
| @@ -2139,7 +2139,7 @@ cy_as_sdio_reset_card( | |||
| 2139 | * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair | 2139 | * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair |
| 2140 | * does not exist | 2140 | * does not exist |
| 2141 | * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available | 2141 | * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available |
| 2142 | * CY_AS_ERROR_INVALID_RESPONSE - an error message was recieved | 2142 | * CY_AS_ERROR_INVALID_RESPONSE - an error message was received |
| 2143 | * from the firmware | 2143 | * from the firmware |
| 2144 | * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in reading | 2144 | * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in reading |
| 2145 | * from the media | 2145 | * from the media |
| @@ -2198,7 +2198,7 @@ cy_as_sdio_direct_read( | |||
| 2198 | * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device | 2198 | * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device |
| 2199 | * pair does not exist | 2199 | * pair does not exist |
| 2200 | * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available | 2200 | * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available |
| 2201 | * CY_AS_ERROR_INVALID_RESPONSE - an error message was recieved | 2201 | * CY_AS_ERROR_INVALID_RESPONSE - an error message was received |
| 2202 | * from the firmware | 2202 | * from the firmware |
| 2203 | * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in | 2203 | * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in |
| 2204 | * reading from the media | 2204 | * reading from the media |
| @@ -2262,7 +2262,7 @@ cy_as_sdio_direct_write( | |||
| 2262 | * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory | 2262 | * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory |
| 2263 | * available | 2263 | * available |
| 2264 | * CY_AS_ERROR_INVALID_RESPONSE - an error message was | 2264 | * CY_AS_ERROR_INVALID_RESPONSE - an error message was |
| 2265 | * recieved from the firmware | 2265 | * received from the firmware |
| 2266 | * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in | 2266 | * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in |
| 2267 | * reading from the media | 2267 | * reading from the media |
| 2268 | * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made | 2268 | * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made |
| @@ -2319,7 +2319,7 @@ cy_as_sdio_set_blocksize( | |||
| 2319 | * pair does not exist | 2319 | * pair does not exist |
| 2320 | * CY_AS_ERROR_ASYNC_PENDING - an async operation is pending | 2320 | * CY_AS_ERROR_ASYNC_PENDING - an async operation is pending |
| 2321 | * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available | 2321 | * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available |
| 2322 | * CY_AS_ERROR_INVALID_RESPONSE - an error message was recieved | 2322 | * CY_AS_ERROR_INVALID_RESPONSE - an error message was received |
| 2323 | * from the firmware | 2323 | * from the firmware |
| 2324 | * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in | 2324 | * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in |
| 2325 | * reading from the media | 2325 | * reading from the media |
| @@ -2396,7 +2396,7 @@ cy_as_sdio_extended_read( | |||
| 2396 | * CY_AS_ERROR_ASYNC_PENDING - an async operation is pending | 2396 | * CY_AS_ERROR_ASYNC_PENDING - an async operation is pending |
| 2397 | * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available | 2397 | * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available |
| 2398 | * CY_AS_ERROR_INVALID_RESPONSE - an error message was | 2398 | * CY_AS_ERROR_INVALID_RESPONSE - an error message was |
| 2399 | * recieved from the firmware | 2399 | * received from the firmware |
| 2400 | * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in | 2400 | * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in |
| 2401 | * reading from the media | 2401 | * reading from the media |
| 2402 | * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made | 2402 | * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made |
| @@ -2471,7 +2471,7 @@ cy_as_sdio_extended_write( | |||
| 2471 | * pair does not exist | 2471 | * pair does not exist |
| 2472 | * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available | 2472 | * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available |
| 2473 | * CY_AS_ERROR_INVALID_RESPONSE - an error message was | 2473 | * CY_AS_ERROR_INVALID_RESPONSE - an error message was |
| 2474 | * recieved from the firmware | 2474 | * received from the firmware |
| 2475 | * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in | 2475 | * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in |
| 2476 | * reading from the media | 2476 | * reading from the media |
| 2477 | * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made | 2477 | * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made |
| @@ -2714,7 +2714,7 @@ cy_as_sdio_suspend( | |||
| 2714 | * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory | 2714 | * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory |
| 2715 | * available | 2715 | * available |
| 2716 | * CY_AS_ERROR_INVALID_RESPONSE - an error message was | 2716 | * CY_AS_ERROR_INVALID_RESPONSE - an error message was |
| 2717 | * recieved from the firmware | 2717 | * received from the firmware |
| 2718 | * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error | 2718 | * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error |
| 2719 | * in reading from the media | 2719 | * in reading from the media |
| 2720 | * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was | 2720 | * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was |
diff --git a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasusb.h b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasusb.h index 4a549e146812..e3ba9ca4c75f 100644 --- a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasusb.h +++ b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasusb.h | |||
| @@ -464,7 +464,7 @@ typedef struct cy_as_usb_end_point_config { | |||
| 464 | be selected on a partitioned storage device. | 464 | be selected on a partitioned storage device. |
| 465 | 465 | ||
| 466 | Description | 466 | Description |
| 467 | West Bridge firmware supports creating upto two | 467 | West Bridge firmware supports creating up to two |
| 468 | partitions on mass storage devices connected to | 468 | partitions on mass storage devices connected to |
| 469 | West Bridge. When there are two partitions on a device, | 469 | West Bridge. When there are two partitions on a device, |
| 470 | the user can choose which of these partitions should be | 470 | the user can choose which of these partitions should be |
| @@ -698,7 +698,7 @@ cy_as_usb_start( | |||
| 698 | * been configured | 698 | * been configured |
| 699 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded | 699 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded |
| 700 | * into West Bridge | 700 | * into West Bridge |
| 701 | * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully | 701 | * CY_AS_ERROR_SUCCESS - this module was shut down successfully |
| 702 | * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with | 702 | * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with |
| 703 | * the West Bridge device | 703 | * the West Bridge device |
| 704 | 704 | ||
| @@ -752,7 +752,7 @@ cy_as_usb_register_callback( | |||
| 752 | * Nestable: YES | 752 | * Nestable: YES |
| 753 | 753 | ||
| 754 | Returns | 754 | Returns |
| 755 | * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully | 755 | * CY_AS_ERROR_SUCCESS - this module was shut down successfully |
| 756 | * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not | 756 | * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not |
| 757 | * been configured | 757 | * been configured |
| 758 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded | 758 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded |
| @@ -791,7 +791,7 @@ cy_as_usb_connect( | |||
| 791 | * Nestable: YES | 791 | * Nestable: YES |
| 792 | 792 | ||
| 793 | Returns | 793 | Returns |
| 794 | * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully | 794 | * CY_AS_ERROR_SUCCESS - this module was shut down successfully |
| 795 | * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not | 795 | * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not |
| 796 | * been configured | 796 | * been configured |
| 797 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded | 797 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded |
| @@ -825,7 +825,7 @@ cy_as_usb_disconnect( | |||
| 825 | * Valid In Asynchronous Callback: Yes (if cb supplied) | 825 | * Valid In Asynchronous Callback: Yes (if cb supplied) |
| 826 | 826 | ||
| 827 | Returns | 827 | Returns |
| 828 | * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully | 828 | * CY_AS_ERROR_SUCCESS - this module was shut down successfully |
| 829 | * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not | 829 | * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not |
| 830 | * been configured | 830 | * been configured |
| 831 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded | 831 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded |
| @@ -855,13 +855,13 @@ cy_as_usb_set_enum_config( | |||
| 855 | the USB stack | 855 | the USB stack |
| 856 | 856 | ||
| 857 | Description | 857 | Description |
| 858 | This function sends a request to West Bridge to retreive | 858 | This function sends a request to West Bridge to retrieve |
| 859 | the current configuration | 859 | the current configuration |
| 860 | 860 | ||
| 861 | * Valid In Asynchronous Callback: Yes (if cb supplied) | 861 | * Valid In Asynchronous Callback: Yes (if cb supplied) |
| 862 | 862 | ||
| 863 | Returns | 863 | Returns |
| 864 | * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully | 864 | * CY_AS_ERROR_SUCCESS - this module was shut down successfully |
| 865 | * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not | 865 | * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not |
| 866 | * been configured | 866 | * been configured |
| 867 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded | 867 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded |
| @@ -906,7 +906,7 @@ cy_as_usb_get_enum_config( | |||
| 906 | Chapter 9. | 906 | Chapter 9. |
| 907 | 907 | ||
| 908 | Returns | 908 | Returns |
| 909 | * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully | 909 | * CY_AS_ERROR_SUCCESS - this module was shut down successfully |
| 910 | * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not | 910 | * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not |
| 911 | * been configured | 911 | * been configured |
| 912 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded | 912 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded |
| @@ -993,7 +993,7 @@ cy_as_usb_clear_descriptors( | |||
| 993 | Description | 993 | Description |
| 994 | This data structure the buffer to hold the descriptor | 994 | This data structure the buffer to hold the descriptor |
| 995 | data, and an in/out parameter ti indicate the | 995 | data, and an in/out parameter ti indicate the |
| 996 | lenght of the buffer and descriptor data in bytes. | 996 | length of the buffer and descriptor data in bytes. |
| 997 | 997 | ||
| 998 | See Also | 998 | See Also |
| 999 | * CyAsUsbGetDescriptor | 999 | * CyAsUsbGetDescriptor |
| @@ -1027,7 +1027,7 @@ typedef struct cy_as_get_descriptor_data { | |||
| 1027 | Chapter 9. | 1027 | Chapter 9. |
| 1028 | 1028 | ||
| 1029 | Returns | 1029 | Returns |
| 1030 | * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully | 1030 | * CY_AS_ERROR_SUCCESS - this module was shut down successfully |
| 1031 | * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not | 1031 | * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not |
| 1032 | * been configured | 1032 | * been configured |
| 1033 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded | 1033 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded |
| @@ -1106,7 +1106,7 @@ cy_as_usb_get_descriptor( | |||
| 1106 | * Valid In Asynchronous Callback: NO | 1106 | * Valid In Asynchronous Callback: NO |
| 1107 | 1107 | ||
| 1108 | Returns | 1108 | Returns |
| 1109 | * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully | 1109 | * CY_AS_ERROR_SUCCESS - this module was shut down successfully |
| 1110 | * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not | 1110 | * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not |
| 1111 | * been configured | 1111 | * been configured |
| 1112 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded | 1112 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded |
| @@ -1140,7 +1140,7 @@ cy_as_usb_set_physical_configuration( | |||
| 1140 | Add documentation about endpoint configuration limitations | 1140 | Add documentation about endpoint configuration limitations |
| 1141 | 1141 | ||
| 1142 | Returns | 1142 | Returns |
| 1143 | * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully | 1143 | * CY_AS_ERROR_SUCCESS - this module was shut down successfully |
| 1144 | * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not | 1144 | * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not |
| 1145 | * been configured | 1145 | * been configured |
| 1146 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded | 1146 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded |
| @@ -1181,7 +1181,7 @@ cy_as_usb_set_end_point_config( | |||
| 1181 | * Valid In Asynchronous Callback: NO | 1181 | * Valid In Asynchronous Callback: NO |
| 1182 | 1182 | ||
| 1183 | Returns | 1183 | Returns |
| 1184 | * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully | 1184 | * CY_AS_ERROR_SUCCESS - this module was shut down successfully |
| 1185 | * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not | 1185 | * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not |
| 1186 | * been configured | 1186 | * been configured |
| 1187 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded | 1187 | * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded |
| @@ -1219,7 +1219,7 @@ cy_as_usb_get_end_point_config( | |||
| 1219 | functions store away the configuration information and this | 1219 | functions store away the configuration information and this |
| 1220 | CyAsUsbCommitConfig() actually finds the | 1220 | CyAsUsbCommitConfig() actually finds the |
| 1221 | best hardware configuration based on the requested endpoint | 1221 | best hardware configuration based on the requested endpoint |
| 1222 | configuration and sends thsi optimal | 1222 | configuration and sends this optimal |
| 1223 | confiuration down to the West Bridge device. | 1223 | confiuration down to the West Bridge device. |
| 1224 | 1224 | ||
| 1225 | * Valid In Asynchronous Callback: YES (if cb supplied) | 1225 | * Valid In Asynchronous Callback: YES (if cb supplied) |
| @@ -1268,7 +1268,7 @@ cy_as_usb_commit_config( | |||
| 1268 | * Valid In Asynchronous Callback: NO | 1268 | * Valid In Asynchronous Callback: NO |
| 1269 | 1269 | ||
| 1270 | Returns | 1270 | Returns |
| 1271 | * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully | 1271 | * CY_AS_ERROR_SUCCESS - this module was shut down successfully |
| 1272 | * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with | 1272 | * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with |
| 1273 | * the West Bridge device | 1273 | * the West Bridge device |
| 1274 | * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running | 1274 | * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
| @@ -1311,7 +1311,7 @@ cy_as_usb_read_data( | |||
| 1311 | * Valid In Asynchronous Callback: YES | 1311 | * Valid In Asynchronous Callback: YES |
| 1312 | 1312 | ||
| 1313 | Returns | 1313 | Returns |
| 1314 | * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully | 1314 | * CY_AS_ERROR_SUCCESS - this module was shut down successfully |
| 1315 | * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with | 1315 | * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with |
| 1316 | * the West Bridge device | 1316 | * the West Bridge device |
| 1317 | * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running | 1317 | * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
| @@ -1355,7 +1355,7 @@ cy_as_usb_read_data_async( | |||
| 1355 | a zero length packet transmitted to the USB host. | 1355 | a zero length packet transmitted to the USB host. |
| 1356 | 1356 | ||
| 1357 | Returns | 1357 | Returns |
| 1358 | * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully | 1358 | * CY_AS_ERROR_SUCCESS - this module was shut down successfully |
| 1359 | * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with | 1359 | * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with |
| 1360 | * the West Bridge device | 1360 | * the West Bridge device |
| 1361 | * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running | 1361 | * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
| @@ -1395,7 +1395,7 @@ cy_as_usb_write_data( | |||
| 1395 | in a zero length packet transmitted to the USB host. | 1395 | in a zero length packet transmitted to the USB host. |
| 1396 | 1396 | ||
| 1397 | Returns | 1397 | Returns |
| 1398 | * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully | 1398 | * CY_AS_ERROR_SUCCESS - this module was shut down successfully |
| 1399 | * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with | 1399 | * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with |
| 1400 | * the West Bridge device | 1400 | * the West Bridge device |
| 1401 | * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running | 1401 | * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running |
| @@ -1435,7 +1435,7 @@ cy_as_usb_write_data_async( | |||
| 1435 | 1435 | ||
| 1436 | Returns | 1436 | Returns |
| 1437 | * CY_AS_ERROR_SUCCESS - this module was shut down | 1437 | * CY_AS_ERROR_SUCCESS - this module was shut down |
| 1438 | * sucessfully | 1438 | * successfully |
| 1439 | * CY_AS_ERROR_NOT_RUNNING - the USB stack is not | 1439 | * CY_AS_ERROR_NOT_RUNNING - the USB stack is not |
| 1440 | * running | 1440 | * running |
| 1441 | * CY_AS_ERROR_ASYNC_NOT_PENDING - no asynchronous USB | 1441 | * CY_AS_ERROR_ASYNC_NOT_PENDING - no asynchronous USB |
| @@ -1791,7 +1791,7 @@ cy_as_usb_set_m_s_report_threshold( | |||
| 1791 | device should be made visible to USB. | 1791 | device should be made visible to USB. |
| 1792 | 1792 | ||
| 1793 | Description | 1793 | Description |
| 1794 | West Bridge firmware supports the creation of upto two | 1794 | West Bridge firmware supports the creation of up to two |
| 1795 | partitions on mass storage devices connected to the West Bridge | 1795 | partitions on mass storage devices connected to the West Bridge |
| 1796 | device. When there are two partitions on a device, the user can | 1796 | device. When there are two partitions on a device, the user can |
| 1797 | choose which of these partitions should be made visible to the | 1797 | choose which of these partitions should be made visible to the |
diff --git a/drivers/staging/winbond/mds.c b/drivers/staging/winbond/mds.c index 9cfea94bcea5..c9f0e8f856a0 100644 --- a/drivers/staging/winbond/mds.c +++ b/drivers/staging/winbond/mds.c | |||
| @@ -492,7 +492,7 @@ Mds_Tx(struct wbsoft_priv *adapter) | |||
| 492 | 492 | ||
| 493 | TxDesIndex = pMds->TxDesIndex; /* Get the current ID */ | 493 | TxDesIndex = pMds->TxDesIndex; /* Get the current ID */ |
| 494 | pTxDes->Descriptor_ID = TxDesIndex; | 494 | pTxDes->Descriptor_ID = TxDesIndex; |
| 495 | pMds->TxDesFrom[TxDesIndex] = 2; /* Storing the information of source comming from */ | 495 | pMds->TxDesFrom[TxDesIndex] = 2; /* Storing the information of source coming from */ |
| 496 | pMds->TxDesIndex++; | 496 | pMds->TxDesIndex++; |
| 497 | pMds->TxDesIndex %= MAX_USB_TX_DESCRIPTOR; | 497 | pMds->TxDesIndex %= MAX_USB_TX_DESCRIPTOR; |
| 498 | 498 | ||
diff --git a/drivers/staging/wlags49_h2/README.ubuntu b/drivers/staging/wlags49_h2/README.ubuntu index 47beaec86e4a..edee8b9385be 100644 --- a/drivers/staging/wlags49_h2/README.ubuntu +++ b/drivers/staging/wlags49_h2/README.ubuntu | |||
| @@ -116,7 +116,7 @@ LICENSE | |||
| 116 | 116 | ||
| 117 | The Agere Systems license applies. This is why I include the original | 117 | The Agere Systems license applies. This is why I include the original |
| 118 | README.wlags49. The instructions in that file are bogus now. I also | 118 | README.wlags49. The instructions in that file are bogus now. I also |
| 119 | include the man page. Eventhough setting parameters on the module | 119 | include the man page. Even though setting parameters on the module |
| 120 | does not work anymore but it provides some information about all the | 120 | does not work anymore but it provides some information about all the |
| 121 | settings. | 121 | settings. |
| 122 | 122 | ||
diff --git a/drivers/staging/wlags49_h2/TODO b/drivers/staging/wlags49_h2/TODO index 14aa415b1a82..94032b6ac2b5 100644 --- a/drivers/staging/wlags49_h2/TODO +++ b/drivers/staging/wlags49_h2/TODO | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | First of all, the best thing would be that this driver becomes obsolte by | 1 | First of all, the best thing would be that this driver becomes obsolte by |
| 2 | adding support for Hermes II and Hermes II.5 cards to the existing orinoco | 2 | adding support for Hermes II and Hermes II.5 cards to the existing orinoco |
| 3 | driver. The orinoco driver currently only supports Hermes I based cards. | 3 | driver. The orinoco driver currently only supports Hermes I based cards. |
| 4 | Since this will not happen by magic and has not happend until now this | 4 | Since this will not happen by magic and has not happened until now this |
| 5 | driver provides a stop-gap solution for these type of cards. | 5 | driver provides a stop-gap solution for these type of cards. |
| 6 | 6 | ||
| 7 | Having said that, the following wishlist comes to mind to make the driver | 7 | Having said that, the following wishlist comes to mind to make the driver |
| @@ -18,7 +18,7 @@ TODO: | |||
| 18 | - the driver is split into a Hermes II and a Hermes II.5 part, it | 18 | - the driver is split into a Hermes II and a Hermes II.5 part, it |
| 19 | would be nice to handle both with one module instead of two | 19 | would be nice to handle both with one module instead of two |
| 20 | - review by the wireless developer community | 20 | - review by the wireless developer community |
| 21 | - verify the code against the coding standards for a propper linux | 21 | - verify the code against the coding standards for a proper linux |
| 22 | driver | 22 | driver |
| 23 | - resolve license issues (?) | 23 | - resolve license issues (?) |
| 24 | 24 | ||
diff --git a/drivers/staging/wlags49_h2/hcf.c b/drivers/staging/wlags49_h2/hcf.c index d4bdd3ee8be1..a73317ef9350 100644 --- a/drivers/staging/wlags49_h2/hcf.c +++ b/drivers/staging/wlags49_h2/hcf.c | |||
| @@ -540,7 +540,7 @@ HCF_STATIC hcf_16* BASED xxxx[ ] = { | |||
| 540 | * | 540 | * |
| 541 | *.CONDITIONS | 541 | *.CONDITIONS |
| 542 | * Except for hcf_action with HCF_ACT_INT_FORCE_ON or HCF_ACT_INT_OFF as parameter or hcf_connect with an I/O | 542 | * Except for hcf_action with HCF_ACT_INT_FORCE_ON or HCF_ACT_INT_OFF as parameter or hcf_connect with an I/O |
| 543 | * address (i.e. not HCF_DISCONNECT), all hcf-function calls MUST be preceeded by a call of hcf_action with | 543 | * address (i.e. not HCF_DISCONNECT), all hcf-function calls MUST be preceded by a call of hcf_action with |
| 544 | * HCF_ACT_INT_OFF as parameter. | 544 | * HCF_ACT_INT_OFF as parameter. |
| 545 | * Note that hcf_connect defaults to NIC interrupt disabled mode, i.e. as if hcf_action( HCF_ACT_INT_OFF ) | 545 | * Note that hcf_connect defaults to NIC interrupt disabled mode, i.e. as if hcf_action( HCF_ACT_INT_OFF ) |
| 546 | * was called. | 546 | * was called. |
| @@ -843,7 +843,7 @@ hcf_16 i; | |||
| 843 | *.MODULE int hcf_cntl( IFBP ifbp, hcf_16 cmd ) | 843 | *.MODULE int hcf_cntl( IFBP ifbp, hcf_16 cmd ) |
| 844 | *.PURPOSE Connect or disconnect a specific port to a specific network. | 844 | *.PURPOSE Connect or disconnect a specific port to a specific network. |
| 845 | *!! ;???????????????? continue needs more explanation | 845 | *!! ;???????????????? continue needs more explanation |
| 846 | * recovers by means of "continue" when the connect proces in CCX mode fails | 846 | * recovers by means of "continue" when the connect process in CCX mode fails |
| 847 | * Enables or disables data transmission and reception for the NIC. | 847 | * Enables or disables data transmission and reception for the NIC. |
| 848 | * Activates static NIC configuration for a specific port at connect. | 848 | * Activates static NIC configuration for a specific port at connect. |
| 849 | * Activates static configuration for all ports at enable. | 849 | * Activates static configuration for all ports at enable. |
| @@ -1170,12 +1170,12 @@ LTV_STRCT x; | |||
| 1170 | io_addr = io_base; | 1170 | io_addr = io_base; |
| 1171 | } | 1171 | } |
| 1172 | 1172 | ||
| 1173 | #if 0 //;? if a subsequent hcf_connect is preceeded by an hcf_disconnect the wakeup is not needed !! | 1173 | #if 0 //;? if a subsequent hcf_connect is preceded by an hcf_disconnect the wakeup is not needed !! |
| 1174 | #if HCF_SLEEP | 1174 | #if HCF_SLEEP |
| 1175 | OUT_PORT_WORD( .....+HREG_IO, HREG_IO_WAKEUP_ASYNC ); //OPW not yet useable | 1175 | OUT_PORT_WORD( .....+HREG_IO, HREG_IO_WAKEUP_ASYNC ); //OPW not yet useable |
| 1176 | MSF_WAIT(800); // MSF-defined function to wait n microseconds. | 1176 | MSF_WAIT(800); // MSF-defined function to wait n microseconds. |
| 1177 | note that MSF_WAIT uses not yet defined!!!! IFB_IOBase and IFB_TickIni (via PROT_CNT_INI) | 1177 | note that MSF_WAIT uses not yet defined!!!! IFB_IOBase and IFB_TickIni (via PROT_CNT_INI) |
| 1178 | so be carefull if this code is restored | 1178 | so be careful if this code is restored |
| 1179 | #endif // HCF_SLEEP | 1179 | #endif // HCF_SLEEP |
| 1180 | #endif // 0 | 1180 | #endif // 0 |
| 1181 | 1181 | ||
| @@ -1563,7 +1563,7 @@ DESC_STRCT *p = descp->next_desc_addr; //pointer to 2nd descriptor of frame | |||
| 1563 | * This function is called by the MSF to supply the HCF with new/more buffers for receive purposes. | 1563 | * This function is called by the MSF to supply the HCF with new/more buffers for receive purposes. |
| 1564 | * The HCF can be used in 2 fashions: with and without encapsulation for data transfer. | 1564 | * The HCF can be used in 2 fashions: with and without encapsulation for data transfer. |
| 1565 | * This is controlled at compile time by the HCF_ENC bit of the HCF_ENCAP system constant. | 1565 | * This is controlled at compile time by the HCF_ENC bit of the HCF_ENCAP system constant. |
| 1566 | * As a consequence, some additional constaints apply to the number of descriptor and the buffers associated | 1566 | * As a consequence, some additional constraints apply to the number of descriptor and the buffers associated |
| 1567 | * with the first 2 descriptors. Independent of the encapsulation feature, the COUNT fields are ignored. | 1567 | * with the first 2 descriptors. Independent of the encapsulation feature, the COUNT fields are ignored. |
| 1568 | * A special case is the supplying of the DELWA descriptor, which must be supplied as the first descriptor. | 1568 | * A special case is the supplying of the DELWA descriptor, which must be supplied as the first descriptor. |
| 1569 | * | 1569 | * |
| @@ -1735,7 +1735,7 @@ DESC_STRCT *descp; // pointer to start of FrameList | |||
| 1735 | * - in case encapsulation by the HCF is selected: | 1735 | * - in case encapsulation by the HCF is selected: |
| 1736 | * - The FrameList does not consists of at least 2 Descriptors. | 1736 | * - The FrameList does not consists of at least 2 Descriptors. |
| 1737 | * - The first databuffer does not contain exactly the (space for) the 802.11 header (== 28 words) | 1737 | * - The first databuffer does not contain exactly the (space for) the 802.11 header (== 28 words) |
| 1738 | * - The first databuffer does not have a size to additionally accomodate the 802.3 header and the | 1738 | * - The first databuffer does not have a size to additionally accommodate the 802.3 header and the |
| 1739 | * SNAP header of the frame after encapsulation (== 39 words). | 1739 | * SNAP header of the frame after encapsulation (== 39 words). |
| 1740 | * - The second databuffer does not contain at least DA, SA and 'type/length' (==14 bytes or 7 words) | 1740 | * - The second databuffer does not contain at least DA, SA and 'type/length' (==14 bytes or 7 words) |
| 1741 | *!! The 2nd part of the list of asserts should be kept in sync with put_frame_lst, in order to get | 1741 | *!! The 2nd part of the list of asserts should be kept in sync with put_frame_lst, in order to get |
| @@ -1762,14 +1762,14 @@ DESC_STRCT *descp; // pointer to start of FrameList | |||
| 1762 | * - Copy DA/SA fields from the 2nd buffer | 1762 | * - Copy DA/SA fields from the 2nd buffer |
| 1763 | * - Calculate total length of the message (snap-header + type-field + the length of all buffer fragments | 1763 | * - Calculate total length of the message (snap-header + type-field + the length of all buffer fragments |
| 1764 | * associated with the 802.3 frame (i.e all descriptors except the first), but not the DestinationAddress, | 1764 | * associated with the 802.3 frame (i.e all descriptors except the first), but not the DestinationAddress, |
| 1765 | * SourceAddress and lenght-field) | 1765 | * SourceAddress and length-field) |
| 1766 | * Assert the message length | 1766 | * Assert the message length |
| 1767 | * Write length. Note that the message is in BE format, hence on LE platforms the length must be converted | 1767 | * Write length. Note that the message is in BE format, hence on LE platforms the length must be converted |
| 1768 | * ;? THIS IS NOT WHAT CURRENTLY IS IMPLEMENTED | 1768 | * ;? THIS IS NOT WHAT CURRENTLY IS IMPLEMENTED |
| 1769 | * - Write snap header. Note that the last byte of the snap header is NOT copied, that byte is already in | 1769 | * - Write snap header. Note that the last byte of the snap header is NOT copied, that byte is already in |
| 1770 | * place as result of the call to hcf_encap. | 1770 | * place as result of the call to hcf_encap. |
| 1771 | * Note that there are many ways to skin a cat. To express the offsets in the 1st buffer while writing | 1771 | * Note that there are many ways to skin a cat. To express the offsets in the 1st buffer while writing |
| 1772 | * the snap header, HFS_TYPE is choosen as a reference point to make it easier to grasp that the snap header | 1772 | * the snap header, HFS_TYPE is chosen as a reference point to make it easier to grasp that the snap header |
| 1773 | * and encapsualtion type are at least relative in the right. | 1773 | * and encapsualtion type are at least relative in the right. |
| 1774 | *8: modify 1st descriptor to reflect moved part of the 802.3 header + Snap-header | 1774 | *8: modify 1st descriptor to reflect moved part of the 802.3 header + Snap-header |
| 1775 | * modify 2nd descriptor to skip the moved part of the 802.3 header (DA/SA | 1775 | * modify 2nd descriptor to skip the moved part of the 802.3 header (DA/SA |
| @@ -1933,7 +1933,7 @@ hcf_16 t = (hcf_16)(*type<<8) + *(type+1); /* 2 */ | |||
| 1933 | * HCF_SUCCESS Success | 1933 | * HCF_SUCCESS Success |
| 1934 | *!! via cmd_exe ( type >= CFG_RID_FW_MIN ) | 1934 | *!! via cmd_exe ( type >= CFG_RID_FW_MIN ) |
| 1935 | * HCF_ERR_NO_NIC NIC removed during retrieval | 1935 | * HCF_ERR_NO_NIC NIC removed during retrieval |
| 1936 | * HCF_ERR_TIME_OUT Expected Hermes event did not occure in expected time | 1936 | * HCF_ERR_TIME_OUT Expected Hermes event did not occur in expected time |
| 1937 | *!! via cmd_exe and setup_bap (type >= CFG_RID_FW_MIN ) | 1937 | *!! via cmd_exe and setup_bap (type >= CFG_RID_FW_MIN ) |
| 1938 | * HCF_ERR_DEFUNCT_... HCF is in defunct mode (bits 0x7F reflect cause) | 1938 | * HCF_ERR_DEFUNCT_... HCF is in defunct mode (bits 0x7F reflect cause) |
| 1939 | * | 1939 | * |
| @@ -2958,7 +2958,7 @@ or | |||
| 2958 | * hcf_service_nic is also skipped in those cases. | 2958 | * hcf_service_nic is also skipped in those cases. |
| 2959 | * To prevent that hcf_service_nic reports bogus information to the MSF with all - possibly difficult to | 2959 | * To prevent that hcf_service_nic reports bogus information to the MSF with all - possibly difficult to |
| 2960 | * debug - undesirable side effects, it is paramount to check the NIC presence. In former days the presence | 2960 | * debug - undesirable side effects, it is paramount to check the NIC presence. In former days the presence |
| 2961 | * test was based on the Hermes register HREG_SW_0. Since in HCF_ACT_INT_OFF is choosen for strategy based on | 2961 | * test was based on the Hermes register HREG_SW_0. Since in HCF_ACT_INT_OFF is chosen for strategy based on |
| 2962 | * HREG_EV_STAT, this is now also used in hcf_service_nic. The motivation to change strategy is partly | 2962 | * HREG_EV_STAT, this is now also used in hcf_service_nic. The motivation to change strategy is partly |
| 2963 | * due to inconsistent F/W implementations with respect to HREG_SW_0 manipulation around reset and download. | 2963 | * due to inconsistent F/W implementations with respect to HREG_SW_0 manipulation around reset and download. |
| 2964 | * Note that in polled environments Card Removal is not detected by INT_OFF which makes the check in | 2964 | * Note that in polled environments Card Removal is not detected by INT_OFF which makes the check in |
| @@ -4048,7 +4048,7 @@ hcf_32 FAR *p4; //prevent side effects from macro | |||
| 4048 | HCFASSERT( word_len == 0 || word_len == 2 || word_len == 4, word_len ) | 4048 | HCFASSERT( word_len == 0 || word_len == 2 || word_len == 4, word_len ) |
| 4049 | HCFASSERT( word_len == 0 || ((hcf_32)bufp & 1 ) == 0, (hcf_32)bufp ) | 4049 | HCFASSERT( word_len == 0 || ((hcf_32)bufp & 1 ) == 0, (hcf_32)bufp ) |
| 4050 | HCFASSERT( word_len <= len, MERGE2( word_len, len ) ) | 4050 | HCFASSERT( word_len <= len, MERGE2( word_len, len ) ) |
| 4051 | //see put_frag for an alternative implementation, but be carefull about what are int's and what are | 4051 | //see put_frag for an alternative implementation, but be careful about what are int's and what are |
| 4052 | //hcf_16's | 4052 | //hcf_16's |
| 4053 | if ( word_len ) { //. if there is anything to convert | 4053 | if ( word_len ) { //. if there is anything to convert |
| 4054 | hcf_8 c; | 4054 | hcf_8 c; |
| @@ -4712,7 +4712,7 @@ int rc = HCF_SUCCESS; | |||
| 4712 | * Note that len is unsigned, so even MSF I/F violation works out O.K. | 4712 | * Note that len is unsigned, so even MSF I/F violation works out O.K. |
| 4713 | * The '2' in the expression "len+2" is used because 1 word is needed for L itself and 1 word is needed | 4713 | * The '2' in the expression "len+2" is used because 1 word is needed for L itself and 1 word is needed |
| 4714 | * for the zero-sentinel | 4714 | * for the zero-sentinel |
| 4715 | *8: update MailBox Info length report to MSF with "oldest" MB Info Block size. Be carefull here, if you get | 4715 | *8: update MailBox Info length report to MSF with "oldest" MB Info Block size. Be careful here, if you get |
| 4716 | * here before the MailBox is registered, you can't read from the buffer addressed by IFB_MBp (it is the | 4716 | * here before the MailBox is registered, you can't read from the buffer addressed by IFB_MBp (it is the |
| 4717 | * Null buffer) so don't move this code till the end of this routine but keep it where there is garuanteed | 4717 | * Null buffer) so don't move this code till the end of this routine but keep it where there is garuanteed |
| 4718 | * a buffer. | 4718 | * a buffer. |
diff --git a/drivers/staging/wlags49_h2/hcfdef.h b/drivers/staging/wlags49_h2/hcfdef.h index 4e20171b7829..cb1966d8473f 100644 --- a/drivers/staging/wlags49_h2/hcfdef.h +++ b/drivers/staging/wlags49_h2/hcfdef.h | |||
| @@ -315,7 +315,7 @@ err: these values should match; | |||
| 315 | 315 | ||
| 316 | #if HCF_DMA | 316 | #if HCF_DMA |
| 317 | //************************* DMA (bus mastering) | 317 | //************************* DMA (bus mastering) |
| 318 | // Be carefull to use these registers only at a genuine 32 bits NIC | 318 | // Be careful to use these registers only at a genuine 32 bits NIC |
| 319 | // On 16 bits NICs, these addresses are mapped into the range 0x00 through 0x3F with all consequences | 319 | // On 16 bits NICs, these addresses are mapped into the range 0x00 through 0x3F with all consequences |
| 320 | // thereof, e.g. HREG_DMA_CTRL register maps to HREG_CMD. | 320 | // thereof, e.g. HREG_DMA_CTRL register maps to HREG_CMD. |
| 321 | #define HREG_DMA_CTRL 0x0040 | 321 | #define HREG_DMA_CTRL 0x0040 |
diff --git a/drivers/staging/wlags49_h2/wl_wext.c b/drivers/staging/wlags49_h2/wl_wext.c index 9e5da0815371..522a31090c58 100644 --- a/drivers/staging/wlags49_h2/wl_wext.c +++ b/drivers/staging/wlags49_h2/wl_wext.c | |||
| @@ -2575,7 +2575,7 @@ static int wireless_set_scan(struct net_device *dev, struct iw_request_info *inf | |||
| 2575 | * This looks like a nice place to test if the HCF is still | 2575 | * This looks like a nice place to test if the HCF is still |
| 2576 | * communicating with the card. It seems that sometimes BAP_1 | 2576 | * communicating with the card. It seems that sometimes BAP_1 |
| 2577 | * gets corrupted. By looking at the comments in HCF the | 2577 | * gets corrupted. By looking at the comments in HCF the |
| 2578 | * cause is still a mistery. Okay, the communication to the | 2578 | * cause is still a mystery. Okay, the communication to the |
| 2579 | * card is dead, reset the card to revive. | 2579 | * card is dead, reset the card to revive. |
| 2580 | */ | 2580 | */ |
| 2581 | if((lp->hcfCtx.IFB_CardStat & CARD_STAT_DEFUNCT) != 0) | 2581 | if((lp->hcfCtx.IFB_CardStat & CARD_STAT_DEFUNCT) != 0) |
| @@ -3924,7 +3924,7 @@ void wl_wext_event_mic_failed( struct net_device *dev ) | |||
| 3924 | memset( msg, 0, sizeof( msg )); | 3924 | memset( msg, 0, sizeof( msg )); |
| 3925 | 3925 | ||
| 3926 | 3926 | ||
| 3927 | /* Becuase MIC failures are not part of the Wireless Extensions yet, they | 3927 | /* Because MIC failures are not part of the Wireless Extensions yet, they |
| 3928 | must be passed as a string using an IWEVCUSTOM event. In order for the | 3928 | must be passed as a string using an IWEVCUSTOM event. In order for the |
| 3929 | event to be effective, the string format must be known by both the | 3929 | event to be effective, the string format must be known by both the |
| 3930 | driver and the supplicant. The following is the string format used by the | 3930 | driver and the supplicant. The following is the string format used by the |
| @@ -3999,7 +3999,7 @@ void wl_wext_event_assoc_ie( struct net_device *dev ) | |||
| 3999 | memcpy( &data.rawData, &( lp->ltvRecord.u.u8[1] ), 88 ); | 3999 | memcpy( &data.rawData, &( lp->ltvRecord.u.u8[1] ), 88 ); |
| 4000 | wpa_ie = wl_parse_wpa_ie( &data, &length ); | 4000 | wpa_ie = wl_parse_wpa_ie( &data, &length ); |
| 4001 | 4001 | ||
| 4002 | /* Becuase this event (Association WPA-IE) is not part of the Wireless | 4002 | /* Because this event (Association WPA-IE) is not part of the Wireless |
| 4003 | Extensions yet, it must be passed as a string using an IWEVCUSTOM event. | 4003 | Extensions yet, it must be passed as a string using an IWEVCUSTOM event. |
| 4004 | In order for the event to be effective, the string format must be known | 4004 | In order for the event to be effective, the string format must be known |
| 4005 | by both the driver and the supplicant. The following is the string format | 4005 | by both the driver and the supplicant. The following is the string format |
diff --git a/drivers/staging/wlags49_h25/TODO b/drivers/staging/wlags49_h25/TODO index 14aa415b1a82..94032b6ac2b5 100644 --- a/drivers/staging/wlags49_h25/TODO +++ b/drivers/staging/wlags49_h25/TODO | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | First of all, the best thing would be that this driver becomes obsolte by | 1 | First of all, the best thing would be that this driver becomes obsolte by |
| 2 | adding support for Hermes II and Hermes II.5 cards to the existing orinoco | 2 | adding support for Hermes II and Hermes II.5 cards to the existing orinoco |
| 3 | driver. The orinoco driver currently only supports Hermes I based cards. | 3 | driver. The orinoco driver currently only supports Hermes I based cards. |
| 4 | Since this will not happen by magic and has not happend until now this | 4 | Since this will not happen by magic and has not happened until now this |
| 5 | driver provides a stop-gap solution for these type of cards. | 5 | driver provides a stop-gap solution for these type of cards. |
| 6 | 6 | ||
| 7 | Having said that, the following wishlist comes to mind to make the driver | 7 | Having said that, the following wishlist comes to mind to make the driver |
| @@ -18,7 +18,7 @@ TODO: | |||
| 18 | - the driver is split into a Hermes II and a Hermes II.5 part, it | 18 | - the driver is split into a Hermes II and a Hermes II.5 part, it |
| 19 | would be nice to handle both with one module instead of two | 19 | would be nice to handle both with one module instead of two |
| 20 | - review by the wireless developer community | 20 | - review by the wireless developer community |
| 21 | - verify the code against the coding standards for a propper linux | 21 | - verify the code against the coding standards for a proper linux |
| 22 | driver | 22 | driver |
| 23 | - resolve license issues (?) | 23 | - resolve license issues (?) |
| 24 | 24 | ||
diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index ed751f418db9..21f25a21c291 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c | |||
| @@ -1976,7 +1976,7 @@ static wlandevice_t *create_wlan(void) | |||
| 1976 | 1976 | ||
| 1977 | wlandev->nsdcaps = P80211_NSDCAP_HWFRAGMENT | P80211_NSDCAP_AUTOJOIN; | 1977 | wlandev->nsdcaps = P80211_NSDCAP_HWFRAGMENT | P80211_NSDCAP_AUTOJOIN; |
| 1978 | 1978 | ||
| 1979 | /* Initialize the device private data stucture. */ | 1979 | /* Initialize the device private data structure. */ |
| 1980 | hw->dot11_desired_bss_type = 1; | 1980 | hw->dot11_desired_bss_type = 1; |
| 1981 | 1981 | ||
| 1982 | return wlandev; | 1982 | return wlandev; |
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c index 8762a5327693..9669c22cc82c 100644 --- a/drivers/staging/xgifb/vb_setmode.c +++ b/drivers/staging/xgifb/vb_setmode.c | |||
| @@ -7834,7 +7834,7 @@ unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE, | |||
| 7834 | == 600)) { | 7834 | == 600)) { |
| 7835 | index++; | 7835 | index++; |
| 7836 | } | 7836 | } |
| 7837 | /* Alan 10/19/2007; do the similiar adjustment like XGISearchCRT1Rate() */ | 7837 | /* Alan 10/19/2007; do the similar adjustment like XGISearchCRT1Rate() */ |
| 7838 | if ((pVBInfo->RefIndex[RefreshRateTableIndex].XRes == 1024) | 7838 | if ((pVBInfo->RefIndex[RefreshRateTableIndex].XRes == 1024) |
| 7839 | && (pVBInfo->RefIndex[RefreshRateTableIndex].YRes | 7839 | && (pVBInfo->RefIndex[RefreshRateTableIndex].YRes |
| 7840 | == 768)) { | 7840 | == 768)) { |
diff --git a/drivers/staging/xgifb/vgatypes.h b/drivers/staging/xgifb/vgatypes.h index 4b87951f4322..d613e84aab62 100644 --- a/drivers/staging/xgifb/vgatypes.h +++ b/drivers/staging/xgifb/vgatypes.h | |||
| @@ -85,7 +85,7 @@ struct xgi_hw_device_info | |||
| 85 | unsigned long *); | 85 | unsigned long *); |
| 86 | }; | 86 | }; |
| 87 | 87 | ||
| 88 | /* Addtional IOCTL for communication xgifb <> X driver */ | 88 | /* Additional IOCTL for communication xgifb <> X driver */ |
| 89 | /* If changing this, xgifb.h must also be changed (for xgifb) */ | 89 | /* If changing this, xgifb.h must also be changed (for xgifb) */ |
| 90 | 90 | ||
| 91 | 91 | ||
diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c index 2c5fcfed5934..30cbb743d9ba 100644 --- a/drivers/target/target_core_alua.c +++ b/drivers/target/target_core_alua.c | |||
| @@ -496,8 +496,8 @@ static int core_alua_state_check( | |||
| 496 | nonop_delay_msecs = tg_pt_gp->tg_pt_gp_nonop_delay_msecs; | 496 | nonop_delay_msecs = tg_pt_gp->tg_pt_gp_nonop_delay_msecs; |
| 497 | spin_unlock(&tg_pt_gp_mem->tg_pt_gp_mem_lock); | 497 | spin_unlock(&tg_pt_gp_mem->tg_pt_gp_mem_lock); |
| 498 | /* | 498 | /* |
| 499 | * Process ALUA_ACCESS_STATE_ACTIVE_OPTMIZED in a seperate conditional | 499 | * Process ALUA_ACCESS_STATE_ACTIVE_OPTMIZED in a separate conditional |
| 500 | * statement so the complier knows explictly to check this case first. | 500 | * statement so the compiler knows explicitly to check this case first. |
| 501 | * For the Optimized ALUA access state case, we want to process the | 501 | * For the Optimized ALUA access state case, we want to process the |
| 502 | * incoming fabric cmd ASAP.. | 502 | * incoming fabric cmd ASAP.. |
| 503 | */ | 503 | */ |
| @@ -1157,7 +1157,7 @@ void core_alua_free_lu_gp(struct t10_alua_lu_gp *lu_gp) | |||
| 1157 | spin_unlock(&lu_gp->lu_gp_lock); | 1157 | spin_unlock(&lu_gp->lu_gp_lock); |
| 1158 | /* | 1158 | /* |
| 1159 | * | 1159 | * |
| 1160 | * lu_gp_mem is assoicated with a single | 1160 | * lu_gp_mem is associated with a single |
| 1161 | * struct se_device->dev_alua_lu_gp_mem, and is released when | 1161 | * struct se_device->dev_alua_lu_gp_mem, and is released when |
| 1162 | * struct se_device is released via core_alua_free_lu_gp_mem(). | 1162 | * struct se_device is released via core_alua_free_lu_gp_mem(). |
| 1163 | * | 1163 | * |
| @@ -1429,7 +1429,7 @@ void core_alua_free_tg_pt_gp( | |||
| 1429 | } | 1429 | } |
| 1430 | spin_unlock(&tg_pt_gp->tg_pt_gp_lock); | 1430 | spin_unlock(&tg_pt_gp->tg_pt_gp_lock); |
| 1431 | /* | 1431 | /* |
| 1432 | * tg_pt_gp_mem is assoicated with a single | 1432 | * tg_pt_gp_mem is associated with a single |
| 1433 | * se_port->sep_alua_tg_pt_gp_mem, and is released via | 1433 | * se_port->sep_alua_tg_pt_gp_mem, and is released via |
| 1434 | * core_alua_free_tg_pt_gp_mem(). | 1434 | * core_alua_free_tg_pt_gp_mem(). |
| 1435 | * | 1435 | * |
| @@ -1963,7 +1963,7 @@ int core_setup_alua(struct se_device *dev, int force_pt) | |||
| 1963 | printk(KERN_INFO "%s: Enabling ALUA Emulation for SPC-3" | 1963 | printk(KERN_INFO "%s: Enabling ALUA Emulation for SPC-3" |
| 1964 | " device\n", TRANSPORT(dev)->name); | 1964 | " device\n", TRANSPORT(dev)->name); |
| 1965 | /* | 1965 | /* |
| 1966 | * Assoicate this struct se_device with the default ALUA | 1966 | * Associate this struct se_device with the default ALUA |
| 1967 | * LUN Group. | 1967 | * LUN Group. |
| 1968 | */ | 1968 | */ |
| 1969 | lu_gp_mem = core_alua_allocate_lu_gp_mem(dev); | 1969 | lu_gp_mem = core_alua_allocate_lu_gp_mem(dev); |
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index 3fb8e32506ed..d25e20829012 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c | |||
| @@ -371,7 +371,7 @@ int core_update_device_list_for_node( | |||
| 371 | if (!(enable)) { | 371 | if (!(enable)) { |
| 372 | /* | 372 | /* |
| 373 | * deve->se_lun_acl will be NULL for demo-mode created LUNs | 373 | * deve->se_lun_acl will be NULL for demo-mode created LUNs |
| 374 | * that have not been explictly concerted to MappedLUNs -> | 374 | * that have not been explicitly concerted to MappedLUNs -> |
| 375 | * struct se_lun_acl, but we remove deve->alua_port_list from | 375 | * struct se_lun_acl, but we remove deve->alua_port_list from |
| 376 | * port->sep_alua_list. This also means that active UAs and | 376 | * port->sep_alua_list. This also means that active UAs and |
| 377 | * NodeACL context specific PR metadata for demo-mode | 377 | * NodeACL context specific PR metadata for demo-mode |
diff --git a/drivers/target/target_core_fabric_lib.c b/drivers/target/target_core_fabric_lib.c index d57ad672677f..1e193f324895 100644 --- a/drivers/target/target_core_fabric_lib.c +++ b/drivers/target/target_core_fabric_lib.c | |||
| @@ -433,7 +433,7 @@ char *iscsi_parse_pr_out_transport_id( | |||
| 433 | /* | 433 | /* |
| 434 | * Go ahead and do the lower case conversion of the received | 434 | * Go ahead and do the lower case conversion of the received |
| 435 | * 12 ASCII characters representing the ISID in the TransportID | 435 | * 12 ASCII characters representing the ISID in the TransportID |
| 436 | * for comparision against the running iSCSI session's ISID from | 436 | * for comparison against the running iSCSI session's ISID from |
| 437 | * iscsi_target.c:lio_sess_get_initiator_sid() | 437 | * iscsi_target.c:lio_sess_get_initiator_sid() |
| 438 | */ | 438 | */ |
| 439 | for (i = 0; i < 12; i++) { | 439 | for (i = 0; i < 12; i++) { |
diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c index 02f553aef43d..150c4305f385 100644 --- a/drivers/target/target_core_file.c +++ b/drivers/target/target_core_file.c | |||
| @@ -159,7 +159,7 @@ static struct se_device *fd_create_virtdevice( | |||
| 159 | #endif | 159 | #endif |
| 160 | /* flags |= O_DIRECT; */ | 160 | /* flags |= O_DIRECT; */ |
| 161 | /* | 161 | /* |
| 162 | * If fd_buffered_io=1 has not been set explictly (the default), | 162 | * If fd_buffered_io=1 has not been set explicitly (the default), |
| 163 | * use O_SYNC to force FILEIO writes to disk. | 163 | * use O_SYNC to force FILEIO writes to disk. |
| 164 | */ | 164 | */ |
| 165 | if (!(fd_dev->fbd_flags & FDBD_USE_BUFFERED_IO)) | 165 | if (!(fd_dev->fbd_flags & FDBD_USE_BUFFERED_IO)) |
diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c index 2521f75362c3..a79f518ca6e2 100644 --- a/drivers/target/target_core_pr.c +++ b/drivers/target/target_core_pr.c | |||
| @@ -478,7 +478,7 @@ static int core_scsi3_pr_seq_non_holder( | |||
| 478 | break; | 478 | break; |
| 479 | } | 479 | } |
| 480 | /* | 480 | /* |
| 481 | * Case where the CDB is explictly allowed in the above switch | 481 | * Case where the CDB is explicitly allowed in the above switch |
| 482 | * statement. | 482 | * statement. |
| 483 | */ | 483 | */ |
| 484 | if (!(ret) && !(other_cdb)) { | 484 | if (!(ret) && !(other_cdb)) { |
| @@ -3735,7 +3735,7 @@ static int core_scsi3_emulate_pr_out(struct se_cmd *cmd, unsigned char *cdb) | |||
| 3735 | return PYX_TRANSPORT_LU_COMM_FAILURE; | 3735 | return PYX_TRANSPORT_LU_COMM_FAILURE; |
| 3736 | 3736 | ||
| 3737 | if (cmd->data_length < 24) { | 3737 | if (cmd->data_length < 24) { |
| 3738 | printk(KERN_WARNING "SPC-PR: Recieved PR OUT parameter list" | 3738 | printk(KERN_WARNING "SPC-PR: Received PR OUT parameter list" |
| 3739 | " length too small: %u\n", cmd->data_length); | 3739 | " length too small: %u\n", cmd->data_length); |
| 3740 | return PYX_TRANSPORT_INVALID_PARAMETER_LIST; | 3740 | return PYX_TRANSPORT_INVALID_PARAMETER_LIST; |
| 3741 | } | 3741 | } |
| @@ -3778,7 +3778,7 @@ static int core_scsi3_emulate_pr_out(struct se_cmd *cmd, unsigned char *cdb) | |||
| 3778 | */ | 3778 | */ |
| 3779 | if (!(spec_i_pt) && ((cdb[1] & 0x1f) != PRO_REGISTER_AND_MOVE) && | 3779 | if (!(spec_i_pt) && ((cdb[1] & 0x1f) != PRO_REGISTER_AND_MOVE) && |
| 3780 | (cmd->data_length != 24)) { | 3780 | (cmd->data_length != 24)) { |
| 3781 | printk(KERN_WARNING "SPC-PR: Recieved PR OUT illegal parameter" | 3781 | printk(KERN_WARNING "SPC-PR: Received PR OUT illegal parameter" |
| 3782 | " list length: %u\n", cmd->data_length); | 3782 | " list length: %u\n", cmd->data_length); |
| 3783 | return PYX_TRANSPORT_INVALID_PARAMETER_LIST; | 3783 | return PYX_TRANSPORT_INVALID_PARAMETER_LIST; |
| 3784 | } | 3784 | } |
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index bf6aa8a9f1d8..9583b23c9c84 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c | |||
| @@ -719,7 +719,7 @@ static int transport_cmd_check_stop( | |||
| 719 | cmd->se_lun = NULL; | 719 | cmd->se_lun = NULL; |
| 720 | /* | 720 | /* |
| 721 | * Some fabric modules like tcm_loop can release | 721 | * Some fabric modules like tcm_loop can release |
| 722 | * their internally allocated I/O refrence now and | 722 | * their internally allocated I/O reference now and |
| 723 | * struct se_cmd now. | 723 | * struct se_cmd now. |
| 724 | */ | 724 | */ |
| 725 | if (CMD_TFO(cmd)->check_stop_free != NULL) { | 725 | if (CMD_TFO(cmd)->check_stop_free != NULL) { |
| @@ -2029,7 +2029,7 @@ int transport_generic_handle_data( | |||
| 2029 | * If the received CDB has aleady been ABORTED by the generic | 2029 | * If the received CDB has aleady been ABORTED by the generic |
| 2030 | * target engine, we now call transport_check_aborted_status() | 2030 | * target engine, we now call transport_check_aborted_status() |
| 2031 | * to queue any delated TASK_ABORTED status for the received CDB to the | 2031 | * to queue any delated TASK_ABORTED status for the received CDB to the |
| 2032 | * fabric module as we are expecting no futher incoming DATA OUT | 2032 | * fabric module as we are expecting no further incoming DATA OUT |
| 2033 | * sequences at this point. | 2033 | * sequences at this point. |
| 2034 | */ | 2034 | */ |
| 2035 | if (transport_check_aborted_status(cmd, 1) != 0) | 2035 | if (transport_check_aborted_status(cmd, 1) != 0) |
| @@ -2501,7 +2501,7 @@ static inline int transport_execute_task_attr(struct se_cmd *cmd) | |||
| 2501 | if (SE_DEV(cmd)->dev_task_attr_type != SAM_TASK_ATTR_EMULATED) | 2501 | if (SE_DEV(cmd)->dev_task_attr_type != SAM_TASK_ATTR_EMULATED) |
| 2502 | return 1; | 2502 | return 1; |
| 2503 | /* | 2503 | /* |
| 2504 | * Check for the existance of HEAD_OF_QUEUE, and if true return 1 | 2504 | * Check for the existence of HEAD_OF_QUEUE, and if true return 1 |
| 2505 | * to allow the passed struct se_cmd list of tasks to the front of the list. | 2505 | * to allow the passed struct se_cmd list of tasks to the front of the list. |
| 2506 | */ | 2506 | */ |
| 2507 | if (cmd->sam_task_attr == TASK_ATTR_HOQ) { | 2507 | if (cmd->sam_task_attr == TASK_ATTR_HOQ) { |
| @@ -2547,7 +2547,7 @@ static inline int transport_execute_task_attr(struct se_cmd *cmd) | |||
| 2547 | if (atomic_read(&SE_DEV(cmd)->dev_ordered_sync) != 0) { | 2547 | if (atomic_read(&SE_DEV(cmd)->dev_ordered_sync) != 0) { |
| 2548 | /* | 2548 | /* |
| 2549 | * Otherwise, add cmd w/ tasks to delayed cmd queue that | 2549 | * Otherwise, add cmd w/ tasks to delayed cmd queue that |
| 2550 | * will be drained upon competion of HEAD_OF_QUEUE task. | 2550 | * will be drained upon completion of HEAD_OF_QUEUE task. |
| 2551 | */ | 2551 | */ |
| 2552 | spin_lock(&SE_DEV(cmd)->delayed_cmd_lock); | 2552 | spin_lock(&SE_DEV(cmd)->delayed_cmd_lock); |
| 2553 | cmd->se_cmd_flags |= SCF_DELAYED_CMD_FROM_SAM_ATTR; | 2553 | cmd->se_cmd_flags |= SCF_DELAYED_CMD_FROM_SAM_ATTR; |
| @@ -2589,7 +2589,7 @@ static int transport_execute_tasks(struct se_cmd *cmd) | |||
| 2589 | } | 2589 | } |
| 2590 | /* | 2590 | /* |
| 2591 | * Call transport_cmd_check_stop() to see if a fabric exception | 2591 | * Call transport_cmd_check_stop() to see if a fabric exception |
| 2592 | * has occured that prevents execution. | 2592 | * has occurred that prevents execution. |
| 2593 | */ | 2593 | */ |
| 2594 | if (!(transport_cmd_check_stop(cmd, 0, TRANSPORT_PROCESSING))) { | 2594 | if (!(transport_cmd_check_stop(cmd, 0, TRANSPORT_PROCESSING))) { |
| 2595 | /* | 2595 | /* |
| @@ -3109,7 +3109,7 @@ static int transport_generic_cmd_sequencer( | |||
| 3109 | if (ret != 0) { | 3109 | if (ret != 0) { |
| 3110 | cmd->transport_wait_for_tasks = &transport_nop_wait_for_tasks; | 3110 | cmd->transport_wait_for_tasks = &transport_nop_wait_for_tasks; |
| 3111 | /* | 3111 | /* |
| 3112 | * Set SCSI additional sense code (ASC) to 'LUN Not Accessable'; | 3112 | * Set SCSI additional sense code (ASC) to 'LUN Not Accessible'; |
| 3113 | * The ALUA additional sense code qualifier (ASCQ) is determined | 3113 | * The ALUA additional sense code qualifier (ASCQ) is determined |
| 3114 | * by the ALUA primary or secondary access state.. | 3114 | * by the ALUA primary or secondary access state.. |
| 3115 | */ | 3115 | */ |
| @@ -3867,7 +3867,7 @@ static void transport_generic_complete_ok(struct se_cmd *cmd) | |||
| 3867 | } | 3867 | } |
| 3868 | } | 3868 | } |
| 3869 | /* | 3869 | /* |
| 3870 | * Check for a callback, used by amoungst other things | 3870 | * Check for a callback, used by amongst other things |
| 3871 | * XDWRITE_READ_10 emulation. | 3871 | * XDWRITE_READ_10 emulation. |
| 3872 | */ | 3872 | */ |
| 3873 | if (cmd->transport_complete_callback) | 3873 | if (cmd->transport_complete_callback) |
diff --git a/drivers/target/target_core_ua.c b/drivers/target/target_core_ua.c index a2ef346087e8..df355176a377 100644 --- a/drivers/target/target_core_ua.c +++ b/drivers/target/target_core_ua.c | |||
| @@ -247,7 +247,7 @@ void core_scsi3_ua_for_check_condition( | |||
| 247 | } | 247 | } |
| 248 | /* | 248 | /* |
| 249 | * Otherwise for the default 00b, release the UNIT ATTENTION | 249 | * Otherwise for the default 00b, release the UNIT ATTENTION |
| 250 | * condition. Return the ASC/ASCQ of the higest priority UA | 250 | * condition. Return the ASC/ASCQ of the highest priority UA |
| 251 | * (head of the list) in the outgoing CHECK_CONDITION + sense. | 251 | * (head of the list) in the outgoing CHECK_CONDITION + sense. |
| 252 | */ | 252 | */ |
| 253 | if (head) { | 253 | if (head) { |
| @@ -304,7 +304,7 @@ int core_scsi3_ua_clear_for_request_sense( | |||
| 304 | * matching struct se_lun. | 304 | * matching struct se_lun. |
| 305 | * | 305 | * |
| 306 | * Once the returning ASC/ASCQ values are set, we go ahead and | 306 | * Once the returning ASC/ASCQ values are set, we go ahead and |
| 307 | * release all of the Unit Attention conditions for the assoicated | 307 | * release all of the Unit Attention conditions for the associated |
| 308 | * struct se_lun. | 308 | * struct se_lun. |
| 309 | */ | 309 | */ |
| 310 | spin_lock(&deve->ua_lock); | 310 | spin_lock(&deve->ua_lock); |
diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c index b00101972f20..d5f923bcdffe 100644 --- a/drivers/telephony/ixj.c +++ b/drivers/telephony/ixj.c | |||
| @@ -169,7 +169,7 @@ | |||
| 169 | * Added support for Linux 2.4.x kernels. | 169 | * Added support for Linux 2.4.x kernels. |
| 170 | * | 170 | * |
| 171 | * Revision 3.77 2001/01/09 04:00:52 eokerson | 171 | * Revision 3.77 2001/01/09 04:00:52 eokerson |
| 172 | * Linetest will now test the line, even if it has previously succeded. | 172 | * Linetest will now test the line, even if it has previously succeeded. |
| 173 | * | 173 | * |
| 174 | * Revision 3.76 2001/01/08 19:27:00 eokerson | 174 | * Revision 3.76 2001/01/08 19:27:00 eokerson |
| 175 | * Fixed problem with standard cable on Internet PhoneCARD. | 175 | * Fixed problem with standard cable on Internet PhoneCARD. |
| @@ -352,7 +352,7 @@ static void ixj_fsk_alloc(IXJ *j) | |||
| 352 | } else { | 352 | } else { |
| 353 | j->fsksize = 8000; | 353 | j->fsksize = 8000; |
| 354 | if(ixjdebug & 0x0200) { | 354 | if(ixjdebug & 0x0200) { |
| 355 | printk("IXJ phone%d - allocate succeded\n", j->board); | 355 | printk("IXJ phone%d - allocate succeeded\n", j->board); |
| 356 | } | 356 | } |
| 357 | } | 357 | } |
| 358 | } | 358 | } |
| @@ -487,7 +487,7 @@ DSPbase + | |||
| 487 | 8-9 Hardware Status Register Read Only | 487 | 8-9 Hardware Status Register Read Only |
| 488 | A-B Hardware Control Register Read Write | 488 | A-B Hardware Control Register Read Write |
| 489 | C-D Host Transmit (Write) Data Buffer Access Port (buffer input)Write Only | 489 | C-D Host Transmit (Write) Data Buffer Access Port (buffer input)Write Only |
| 490 | E-F Host Recieve (Read) Data Buffer Access Port (buffer input) Read Only | 490 | E-F Host Receive (Read) Data Buffer Access Port (buffer input) Read Only |
| 491 | ************************************************************************/ | 491 | ************************************************************************/ |
| 492 | 492 | ||
| 493 | static inline void ixj_read_HSR(IXJ *j) | 493 | static inline void ixj_read_HSR(IXJ *j) |
| @@ -4195,7 +4195,7 @@ static void ixj_aec_start(IXJ *j, int level) | |||
| 4195 | ixj_WriteDSPCommand(0xE338, j); /* Set Echo Suppresser Attenuation to 0dB */ | 4195 | ixj_WriteDSPCommand(0xE338, j); /* Set Echo Suppresser Attenuation to 0dB */ |
| 4196 | 4196 | ||
| 4197 | /* Now we can set the AGC initial parameters and turn it on */ | 4197 | /* Now we can set the AGC initial parameters and turn it on */ |
| 4198 | ixj_WriteDSPCommand(0xCF90, j); /* Set AGC Minumum gain */ | 4198 | ixj_WriteDSPCommand(0xCF90, j); /* Set AGC Minimum gain */ |
| 4199 | ixj_WriteDSPCommand(0x0020, j); /* to 0.125 (-18dB) */ | 4199 | ixj_WriteDSPCommand(0x0020, j); /* to 0.125 (-18dB) */ |
| 4200 | 4200 | ||
| 4201 | ixj_WriteDSPCommand(0xCF91, j); /* Set AGC Maximum gain */ | 4201 | ixj_WriteDSPCommand(0xCF91, j); /* Set AGC Maximum gain */ |
diff --git a/drivers/telephony/ixj.h b/drivers/telephony/ixj.h index 4c32a43b7914..2c841134f61c 100644 --- a/drivers/telephony/ixj.h +++ b/drivers/telephony/ixj.h | |||
| @@ -1149,7 +1149,7 @@ typedef struct { | |||
| 1149 | unsigned int firstring:1; /* First ring cadence is complete */ | 1149 | unsigned int firstring:1; /* First ring cadence is complete */ |
| 1150 | unsigned int pstncheck:1; /* Currently checking the PSTN Line */ | 1150 | unsigned int pstncheck:1; /* Currently checking the PSTN Line */ |
| 1151 | unsigned int pstn_rmr:1; | 1151 | unsigned int pstn_rmr:1; |
| 1152 | unsigned int x:3; /* unsed bits */ | 1152 | unsigned int x:3; /* unused bits */ |
| 1153 | 1153 | ||
| 1154 | } IXJ_FLAGS; | 1154 | } IXJ_FLAGS; |
| 1155 | 1155 | ||
diff --git a/drivers/tty/hvc/hvc_iucv.c b/drivers/tty/hvc/hvc_iucv.c index c3425bb3a1f6..b6f7d52f7c35 100644 --- a/drivers/tty/hvc/hvc_iucv.c +++ b/drivers/tty/hvc/hvc_iucv.c | |||
| @@ -255,7 +255,7 @@ static int hvc_iucv_write(struct hvc_iucv_private *priv, | |||
| 255 | default: | 255 | default: |
| 256 | written = -EIO; | 256 | written = -EIO; |
| 257 | } | 257 | } |
| 258 | /* remove buffer if an error has occured or received data | 258 | /* remove buffer if an error has occurred or received data |
| 259 | * is not correct */ | 259 | * is not correct */ |
| 260 | if (rc || (rb->mbuf->version != MSG_VERSION) || | 260 | if (rc || (rb->mbuf->version != MSG_VERSION) || |
| 261 | (rb->msg.length != MSG_SIZE(rb->mbuf->datalen))) | 261 | (rb->msg.length != MSG_SIZE(rb->mbuf->datalen))) |
| @@ -620,7 +620,7 @@ static void hvc_iucv_hangup(struct hvc_iucv_private *priv) | |||
| 620 | * the index of an struct hvc_iucv_private instance. | 620 | * the index of an struct hvc_iucv_private instance. |
| 621 | * | 621 | * |
| 622 | * This routine notifies the HVC back-end that a tty hangup (carrier loss, | 622 | * This routine notifies the HVC back-end that a tty hangup (carrier loss, |
| 623 | * virtual or otherwise) has occured. | 623 | * virtual or otherwise) has occurred. |
| 624 | * The z/VM IUCV HVC device driver ignores virtual hangups (vhangup()) | 624 | * The z/VM IUCV HVC device driver ignores virtual hangups (vhangup()) |
| 625 | * to keep an existing IUCV communication path established. | 625 | * to keep an existing IUCV communication path established. |
| 626 | * (Background: vhangup() is called from user space (by getty or login) to | 626 | * (Background: vhangup() is called from user space (by getty or login) to |
diff --git a/drivers/tty/hvc/hvc_vio.c b/drivers/tty/hvc/hvc_vio.c index 5e2f52b33327..e6eea1485244 100644 --- a/drivers/tty/hvc/hvc_vio.c +++ b/drivers/tty/hvc/hvc_vio.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * vio driver interface to hvc_console.c | 2 | * vio driver interface to hvc_console.c |
| 3 | * | 3 | * |
| 4 | * This code was moved here to allow the remaing code to be reused as a | 4 | * This code was moved here to allow the remaining code to be reused as a |
| 5 | * generic polling mode with semi-reliable transport driver core to the | 5 | * generic polling mode with semi-reliable transport driver core to the |
| 6 | * console and tty subsystems. | 6 | * console and tty subsystems. |
| 7 | * | 7 | * |
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c index bef238f9ffd7..4c8b66546930 100644 --- a/drivers/tty/hvc/hvcs.c +++ b/drivers/tty/hvc/hvcs.c | |||
| @@ -118,7 +118,7 @@ | |||
| 118 | * arch/powerepc/include/asm/hvcserver.h | 118 | * arch/powerepc/include/asm/hvcserver.h |
| 119 | * | 119 | * |
| 120 | * 1.3.2 -> 1.3.3 Replaced yield() in hvcs_close() with tty_wait_until_sent() to | 120 | * 1.3.2 -> 1.3.3 Replaced yield() in hvcs_close() with tty_wait_until_sent() to |
| 121 | * prevent possible lockup with realtime scheduling as similarily pointed out by | 121 | * prevent possible lockup with realtime scheduling as similarly pointed out by |
| 122 | * akpm in hvc_console. Changed resulted in the removal of hvcs_final_close() | 122 | * akpm in hvc_console. Changed resulted in the removal of hvcs_final_close() |
| 123 | * to reorder cleanup operations and prevent discarding of pending data during | 123 | * to reorder cleanup operations and prevent discarding of pending data during |
| 124 | * an hvcs_close(). Removed spinlock protection of hvcs_struct data members in | 124 | * an hvcs_close(). Removed spinlock protection of hvcs_struct data members in |
| @@ -581,7 +581,7 @@ static void hvcs_try_write(struct hvcs_struct *hvcsd) | |||
| 581 | /* | 581 | /* |
| 582 | * We are still obligated to deliver the data to the | 582 | * We are still obligated to deliver the data to the |
| 583 | * hypervisor even if the tty has been closed because | 583 | * hypervisor even if the tty has been closed because |
| 584 | * we commited to delivering it. But don't try to wake | 584 | * we committed to delivering it. But don't try to wake |
| 585 | * a non-existent tty. | 585 | * a non-existent tty. |
| 586 | */ | 586 | */ |
| 587 | if (tty) { | 587 | if (tty) { |
| @@ -1349,7 +1349,7 @@ static int hvcs_write(struct tty_struct *tty, | |||
| 1349 | spin_lock_irqsave(&hvcsd->lock, flags); | 1349 | spin_lock_irqsave(&hvcsd->lock, flags); |
| 1350 | 1350 | ||
| 1351 | /* | 1351 | /* |
| 1352 | * Somehow an open succedded but the device was removed or the | 1352 | * Somehow an open succeeded but the device was removed or the |
| 1353 | * connection terminated between the vty-server and partner vty during | 1353 | * connection terminated between the vty-server and partner vty during |
| 1354 | * the middle of a write operation? This is a crummy place to do this | 1354 | * the middle of a write operation? This is a crummy place to do this |
| 1355 | * but we want to keep it all in the spinlock. | 1355 | * but we want to keep it all in the spinlock. |
| @@ -1420,7 +1420,7 @@ static int hvcs_write(struct tty_struct *tty, | |||
| 1420 | } | 1420 | } |
| 1421 | 1421 | ||
| 1422 | /* | 1422 | /* |
| 1423 | * This is really asking how much can we guarentee that we can send or that we | 1423 | * This is really asking how much can we guarantee that we can send or that we |
| 1424 | * absolutely WILL BUFFER if we can't send it. This driver MUST honor the | 1424 | * absolutely WILL BUFFER if we can't send it. This driver MUST honor the |
| 1425 | * return value, hence the reason for hvcs_struct buffering. | 1425 | * return value, hence the reason for hvcs_struct buffering. |
| 1426 | */ | 1426 | */ |
diff --git a/drivers/tty/mxser.h b/drivers/tty/mxser.h index 41878a69203d..0bf794313ffd 100644 --- a/drivers/tty/mxser.h +++ b/drivers/tty/mxser.h | |||
| @@ -113,7 +113,7 @@ | |||
| 113 | #define MOXA_MUST_IIR_RTO 0x0C | 113 | #define MOXA_MUST_IIR_RTO 0x0C |
| 114 | #define MOXA_MUST_IIR_LSR 0x06 | 114 | #define MOXA_MUST_IIR_LSR 0x06 |
| 115 | 115 | ||
| 116 | /* recieved Xon/Xoff or specical interrupt pending */ | 116 | /* received Xon/Xoff or specical interrupt pending */ |
| 117 | #define MOXA_MUST_IIR_XSC 0x10 | 117 | #define MOXA_MUST_IIR_XSC 0x10 |
| 118 | 118 | ||
| 119 | /* RTS/CTS change state interrupt pending */ | 119 | /* RTS/CTS change state interrupt pending */ |
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 176f63256b37..47f8cdb207f1 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c | |||
| @@ -74,7 +74,7 @@ module_param(debug, int, 0600); | |||
| 74 | #endif | 74 | #endif |
| 75 | 75 | ||
| 76 | /* | 76 | /* |
| 77 | * Semi-arbitary buffer size limits. 0710 is normally run with 32-64 byte | 77 | * Semi-arbitrary buffer size limits. 0710 is normally run with 32-64 byte |
| 78 | * limits so this is plenty | 78 | * limits so this is plenty |
| 79 | */ | 79 | */ |
| 80 | #define MAX_MRU 512 | 80 | #define MAX_MRU 512 |
| @@ -82,7 +82,7 @@ module_param(debug, int, 0600); | |||
| 82 | 82 | ||
| 83 | /* | 83 | /* |
| 84 | * Each block of data we have queued to go out is in the form of | 84 | * Each block of data we have queued to go out is in the form of |
| 85 | * a gsm_msg which holds everything we need in a link layer independant | 85 | * a gsm_msg which holds everything we need in a link layer independent |
| 86 | * format | 86 | * format |
| 87 | */ | 87 | */ |
| 88 | 88 | ||
| @@ -1193,8 +1193,8 @@ static void gsm_control_message(struct gsm_mux *gsm, unsigned int command, | |||
| 1193 | break; | 1193 | break; |
| 1194 | /* Optional unsupported commands */ | 1194 | /* Optional unsupported commands */ |
| 1195 | case CMD_PN: /* Parameter negotiation */ | 1195 | case CMD_PN: /* Parameter negotiation */ |
| 1196 | case CMD_RPN: /* Remote port negotation */ | 1196 | case CMD_RPN: /* Remote port negotiation */ |
| 1197 | case CMD_SNC: /* Service negotation command */ | 1197 | case CMD_SNC: /* Service negotiation command */ |
| 1198 | default: | 1198 | default: |
| 1199 | /* Reply to bad commands with an NSC */ | 1199 | /* Reply to bad commands with an NSC */ |
| 1200 | buf[0] = command; | 1200 | buf[0] = command; |
| @@ -2026,7 +2026,7 @@ EXPORT_SYMBOL_GPL(gsm_activate_mux); | |||
| 2026 | * @mux: mux to free | 2026 | * @mux: mux to free |
| 2027 | * | 2027 | * |
| 2028 | * Dispose of allocated resources for a dead mux. No refcounting | 2028 | * Dispose of allocated resources for a dead mux. No refcounting |
| 2029 | * at present so the mux must be truely dead. | 2029 | * at present so the mux must be truly dead. |
| 2030 | */ | 2030 | */ |
| 2031 | void gsm_free_mux(struct gsm_mux *gsm) | 2031 | void gsm_free_mux(struct gsm_mux *gsm) |
| 2032 | { | 2032 | { |
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index 428f4fe0b5f7..0ad32888091c 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c | |||
| @@ -95,6 +95,7 @@ static void n_tty_set_room(struct tty_struct *tty) | |||
| 95 | { | 95 | { |
| 96 | /* tty->read_cnt is not read locked ? */ | 96 | /* tty->read_cnt is not read locked ? */ |
| 97 | int left = N_TTY_BUF_SIZE - tty->read_cnt - 1; | 97 | int left = N_TTY_BUF_SIZE - tty->read_cnt - 1; |
| 98 | int old_left; | ||
| 98 | 99 | ||
| 99 | /* | 100 | /* |
| 100 | * If we are doing input canonicalization, and there are no | 101 | * If we are doing input canonicalization, and there are no |
| @@ -104,7 +105,12 @@ static void n_tty_set_room(struct tty_struct *tty) | |||
| 104 | */ | 105 | */ |
| 105 | if (left <= 0) | 106 | if (left <= 0) |
| 106 | left = tty->icanon && !tty->canon_data; | 107 | left = tty->icanon && !tty->canon_data; |
| 108 | old_left = tty->receive_room; | ||
| 107 | tty->receive_room = left; | 109 | tty->receive_room = left; |
| 110 | |||
| 111 | /* Did this open up the receive buffer? We may need to flip */ | ||
| 112 | if (left && !old_left) | ||
| 113 | schedule_work(&tty->buf.work); | ||
| 108 | } | 114 | } |
| 109 | 115 | ||
| 110 | static void put_tty_queue_nolock(unsigned char c, struct tty_struct *tty) | 116 | static void put_tty_queue_nolock(unsigned char c, struct tty_struct *tty) |
diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c index f4f11164efe5..fd0a98524d51 100644 --- a/drivers/tty/nozomi.c +++ b/drivers/tty/nozomi.c | |||
| @@ -1673,7 +1673,7 @@ static void ntty_hangup(struct tty_struct *tty) | |||
| 1673 | 1673 | ||
| 1674 | /* | 1674 | /* |
| 1675 | * called when the userspace process writes to the tty (/dev/noz*). | 1675 | * called when the userspace process writes to the tty (/dev/noz*). |
| 1676 | * Data is inserted into a fifo, which is then read and transfered to the modem. | 1676 | * Data is inserted into a fifo, which is then read and transferred to the modem. |
| 1677 | */ | 1677 | */ |
| 1678 | static int ntty_write(struct tty_struct *tty, const unsigned char *buffer, | 1678 | static int ntty_write(struct tty_struct *tty, const unsigned char *buffer, |
| 1679 | int count) | 1679 | int count) |
diff --git a/drivers/tty/rocket.c b/drivers/tty/rocket.c index 3780da8ad12d..036feeb5e3f6 100644 --- a/drivers/tty/rocket.c +++ b/drivers/tty/rocket.c | |||
| @@ -2060,7 +2060,7 @@ static __init int register_PCI(int i, struct pci_dev *dev) | |||
| 2060 | sClockPrescale = 0x19; | 2060 | sClockPrescale = 0x19; |
| 2061 | rp_baud_base[i] = 230400; | 2061 | rp_baud_base[i] = 230400; |
| 2062 | } else { | 2062 | } else { |
| 2063 | /* mod 4 (devide by 5) prescale */ | 2063 | /* mod 4 (divide by 5) prescale */ |
| 2064 | sClockPrescale = 0x14; | 2064 | sClockPrescale = 0x14; |
| 2065 | rp_baud_base[i] = 460800; | 2065 | rp_baud_base[i] = 460800; |
| 2066 | } | 2066 | } |
| @@ -2183,7 +2183,7 @@ static int __init init_ISA(int i) | |||
| 2183 | sClockPrescale = 0x19; /* mod 9 (divide by 10) prescale */ | 2183 | sClockPrescale = 0x19; /* mod 9 (divide by 10) prescale */ |
| 2184 | rp_baud_base[i] = 230400; | 2184 | rp_baud_base[i] = 230400; |
| 2185 | } else { | 2185 | } else { |
| 2186 | sClockPrescale = 0x14; /* mod 4 (devide by 5) prescale */ | 2186 | sClockPrescale = 0x14; /* mod 4 (divide by 5) prescale */ |
| 2187 | rp_baud_base[i] = 460800; | 2187 | rp_baud_base[i] = 460800; |
| 2188 | } | 2188 | } |
| 2189 | 2189 | ||
diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c index b3b881bc4712..6611535f4440 100644 --- a/drivers/tty/serial/8250.c +++ b/drivers/tty/serial/8250.c | |||
| @@ -1629,7 +1629,7 @@ static irqreturn_t serial8250_interrupt(int irq, void *dev_id) | |||
| 1629 | up->port.iotype == UPIO_DWAPB32) && | 1629 | up->port.iotype == UPIO_DWAPB32) && |
| 1630 | (iir & UART_IIR_BUSY) == UART_IIR_BUSY) { | 1630 | (iir & UART_IIR_BUSY) == UART_IIR_BUSY) { |
| 1631 | /* The DesignWare APB UART has an Busy Detect (0x07) | 1631 | /* The DesignWare APB UART has an Busy Detect (0x07) |
| 1632 | * interrupt meaning an LCR write attempt occured while the | 1632 | * interrupt meaning an LCR write attempt occurred while the |
| 1633 | * UART was busy. The interrupt must be cleared by reading | 1633 | * UART was busy. The interrupt must be cleared by reading |
| 1634 | * the UART status register (USR) and the LCR re-written. */ | 1634 | * the UART status register (USR) and the LCR re-written. */ |
| 1635 | unsigned int status; | 1635 | unsigned int status; |
diff --git a/drivers/tty/serial/8250_pci.c b/drivers/tty/serial/8250_pci.c index 8b8930f700b5..738cec9807d3 100644 --- a/drivers/tty/serial/8250_pci.c +++ b/drivers/tty/serial/8250_pci.c | |||
| @@ -433,7 +433,7 @@ static void __devexit sbs_exit(struct pci_dev *dev) | |||
| 433 | /* | 433 | /* |
| 434 | * SIIG serial cards have an PCI interface chip which also controls | 434 | * SIIG serial cards have an PCI interface chip which also controls |
| 435 | * the UART clocking frequency. Each UART can be clocked independently | 435 | * the UART clocking frequency. Each UART can be clocked independently |
| 436 | * (except cards equiped with 4 UARTs) and initial clocking settings | 436 | * (except cards equipped with 4 UARTs) and initial clocking settings |
| 437 | * are stored in the EEPROM chip. It can cause problems because this | 437 | * are stored in the EEPROM chip. It can cause problems because this |
| 438 | * version of serial driver doesn't support differently clocked UART's | 438 | * version of serial driver doesn't support differently clocked UART's |
| 439 | * on single PCI card. To prevent this, initialization functions set | 439 | * on single PCI card. To prevent this, initialization functions set |
diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index e1aee37270f5..80484af781e1 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig | |||
| @@ -1506,7 +1506,7 @@ config SERIAL_BCM63XX_CONSOLE | |||
| 1506 | 1506 | ||
| 1507 | config SERIAL_GRLIB_GAISLER_APBUART | 1507 | config SERIAL_GRLIB_GAISLER_APBUART |
| 1508 | tristate "GRLIB APBUART serial support" | 1508 | tristate "GRLIB APBUART serial support" |
| 1509 | depends on OF | 1509 | depends on OF && SPARC |
| 1510 | select SERIAL_CORE | 1510 | select SERIAL_CORE |
| 1511 | ---help--- | 1511 | ---help--- |
| 1512 | Add support for the GRLIB APBUART serial port. | 1512 | Add support for the GRLIB APBUART serial port. |
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 57731e870085..6deee4e546be 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c | |||
| @@ -520,7 +520,7 @@ static bool pl011_dma_tx_irq(struct uart_amba_port *uap) | |||
| 520 | 520 | ||
| 521 | /* | 521 | /* |
| 522 | * We don't have a TX buffer queued, so try to queue one. | 522 | * We don't have a TX buffer queued, so try to queue one. |
| 523 | * If we succesfully queued a buffer, mask the TX IRQ. | 523 | * If we successfully queued a buffer, mask the TX IRQ. |
| 524 | */ | 524 | */ |
| 525 | if (pl011_dma_tx_refill(uap) > 0) { | 525 | if (pl011_dma_tx_refill(uap) > 0) { |
| 526 | uap->im &= ~UART011_TXIM; | 526 | uap->im &= ~UART011_TXIM; |
diff --git a/drivers/tty/serial/apbuart.c b/drivers/tty/serial/apbuart.c index 1ab999b04ef3..19a943693e4c 100644 --- a/drivers/tty/serial/apbuart.c +++ b/drivers/tty/serial/apbuart.c | |||
| @@ -555,10 +555,9 @@ static struct uart_driver grlib_apbuart_driver = { | |||
| 555 | 555 | ||
| 556 | static int __devinit apbuart_probe(struct platform_device *op) | 556 | static int __devinit apbuart_probe(struct platform_device *op) |
| 557 | { | 557 | { |
| 558 | int i = -1; | 558 | int i; |
| 559 | struct uart_port *port = NULL; | 559 | struct uart_port *port = NULL; |
| 560 | 560 | ||
| 561 | i = 0; | ||
| 562 | for (i = 0; i < grlib_apbuart_port_nr; i++) { | 561 | for (i = 0; i < grlib_apbuart_port_nr; i++) { |
| 563 | if (op->dev.of_node == grlib_apbuart_nodes[i]) | 562 | if (op->dev.of_node == grlib_apbuart_nodes[i]) |
| 564 | break; | 563 | break; |
| @@ -566,6 +565,7 @@ static int __devinit apbuart_probe(struct platform_device *op) | |||
| 566 | 565 | ||
| 567 | port = &grlib_apbuart_ports[i]; | 566 | port = &grlib_apbuart_ports[i]; |
| 568 | port->dev = &op->dev; | 567 | port->dev = &op->dev; |
| 568 | port->irq = op->archdata.irqs[0]; | ||
| 569 | 569 | ||
| 570 | uart_add_one_port(&grlib_apbuart_driver, (struct uart_port *) port); | 570 | uart_add_one_port(&grlib_apbuart_driver, (struct uart_port *) port); |
| 571 | 571 | ||
| @@ -598,24 +598,12 @@ static struct platform_driver grlib_apbuart_of_driver = { | |||
| 598 | 598 | ||
| 599 | static int grlib_apbuart_configure(void) | 599 | static int grlib_apbuart_configure(void) |
| 600 | { | 600 | { |
| 601 | struct device_node *np, *rp; | 601 | struct device_node *np; |
| 602 | const u32 *prop; | 602 | int line = 0; |
| 603 | int freq_khz, line = 0; | ||
| 604 | |||
| 605 | /* Get bus frequency */ | ||
| 606 | rp = of_find_node_by_path("/"); | ||
| 607 | if (!rp) | ||
| 608 | return -ENODEV; | ||
| 609 | rp = of_get_next_child(rp, NULL); | ||
| 610 | if (!rp) | ||
| 611 | return -ENODEV; | ||
| 612 | prop = of_get_property(rp, "clock-frequency", NULL); | ||
| 613 | if (!prop) | ||
| 614 | return -ENODEV; | ||
| 615 | freq_khz = *prop; | ||
| 616 | 603 | ||
| 617 | for_each_matching_node(np, apbuart_match) { | 604 | for_each_matching_node(np, apbuart_match) { |
| 618 | const int *irqs, *ampopts; | 605 | const int *ampopts; |
| 606 | const u32 *freq_hz; | ||
| 619 | const struct amba_prom_registers *regs; | 607 | const struct amba_prom_registers *regs; |
| 620 | struct uart_port *port; | 608 | struct uart_port *port; |
| 621 | unsigned long addr; | 609 | unsigned long addr; |
| @@ -623,11 +611,11 @@ static int grlib_apbuart_configure(void) | |||
| 623 | ampopts = of_get_property(np, "ampopts", NULL); | 611 | ampopts = of_get_property(np, "ampopts", NULL); |
| 624 | if (ampopts && (*ampopts == 0)) | 612 | if (ampopts && (*ampopts == 0)) |
| 625 | continue; /* Ignore if used by another OS instance */ | 613 | continue; /* Ignore if used by another OS instance */ |
| 626 | |||
| 627 | irqs = of_get_property(np, "interrupts", NULL); | ||
| 628 | regs = of_get_property(np, "reg", NULL); | 614 | regs = of_get_property(np, "reg", NULL); |
| 615 | /* Frequency of APB Bus is frequency of UART */ | ||
| 616 | freq_hz = of_get_property(np, "freq", NULL); | ||
| 629 | 617 | ||
| 630 | if (!irqs || !regs) | 618 | if (!regs || !freq_hz || (*freq_hz == 0)) |
| 631 | continue; | 619 | continue; |
| 632 | 620 | ||
| 633 | grlib_apbuart_nodes[line] = np; | 621 | grlib_apbuart_nodes[line] = np; |
| @@ -638,12 +626,12 @@ static int grlib_apbuart_configure(void) | |||
| 638 | 626 | ||
| 639 | port->mapbase = addr; | 627 | port->mapbase = addr; |
| 640 | port->membase = ioremap(addr, sizeof(struct grlib_apbuart_regs_map)); | 628 | port->membase = ioremap(addr, sizeof(struct grlib_apbuart_regs_map)); |
| 641 | port->irq = *irqs; | 629 | port->irq = 0; |
| 642 | port->iotype = UPIO_MEM; | 630 | port->iotype = UPIO_MEM; |
| 643 | port->ops = &grlib_apbuart_ops; | 631 | port->ops = &grlib_apbuart_ops; |
| 644 | port->flags = UPF_BOOT_AUTOCONF; | 632 | port->flags = UPF_BOOT_AUTOCONF; |
| 645 | port->line = line; | 633 | port->line = line; |
| 646 | port->uartclk = freq_khz * 1000; | 634 | port->uartclk = *freq_hz; |
| 647 | port->fifosize = apbuart_scan_fifo_size((struct uart_port *) port, line); | 635 | port->fifosize = apbuart_scan_fifo_size((struct uart_port *) port, line); |
| 648 | line++; | 636 | line++; |
| 649 | 637 | ||
diff --git a/drivers/tty/serial/icom.c b/drivers/tty/serial/icom.c index 53a468227056..8a869e58f6d7 100644 --- a/drivers/tty/serial/icom.c +++ b/drivers/tty/serial/icom.c | |||
| @@ -1248,7 +1248,7 @@ static void icom_set_termios(struct uart_port *port, | |||
| 1248 | } | 1248 | } |
| 1249 | } | 1249 | } |
| 1250 | 1250 | ||
| 1251 | /* Enable Transmitter and Reciever */ | 1251 | /* Enable Transmitter and Receiver */ |
| 1252 | offset = | 1252 | offset = |
| 1253 | (unsigned long) &ICOM_PORT->statStg->rcv[0] - | 1253 | (unsigned long) &ICOM_PORT->statStg->rcv[0] - |
| 1254 | (unsigned long) ICOM_PORT->statStg; | 1254 | (unsigned long) ICOM_PORT->statStg; |
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index dfcf4b1878aa..cb36b0d4ef3c 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c | |||
| @@ -78,7 +78,7 @@ | |||
| 78 | #define URXD_FRMERR (1<<12) | 78 | #define URXD_FRMERR (1<<12) |
| 79 | #define URXD_BRK (1<<11) | 79 | #define URXD_BRK (1<<11) |
| 80 | #define URXD_PRERR (1<<10) | 80 | #define URXD_PRERR (1<<10) |
| 81 | #define UCR1_ADEN (1<<15) /* Auto dectect interrupt */ | 81 | #define UCR1_ADEN (1<<15) /* Auto detect interrupt */ |
| 82 | #define UCR1_ADBR (1<<14) /* Auto detect baud rate */ | 82 | #define UCR1_ADBR (1<<14) /* Auto detect baud rate */ |
| 83 | #define UCR1_TRDYEN (1<<13) /* Transmitter ready interrupt enable */ | 83 | #define UCR1_TRDYEN (1<<13) /* Transmitter ready interrupt enable */ |
| 84 | #define UCR1_IDEN (1<<12) /* Idle condition interrupt */ | 84 | #define UCR1_IDEN (1<<12) /* Idle condition interrupt */ |
diff --git a/drivers/tty/serial/ip22zilog.c b/drivers/tty/serial/ip22zilog.c index ebff4a1d4bcc..7b1cda59ebb5 100644 --- a/drivers/tty/serial/ip22zilog.c +++ b/drivers/tty/serial/ip22zilog.c | |||
| @@ -375,7 +375,7 @@ static void ip22zilog_transmit_chars(struct uart_ip22zilog_port *up, | |||
| 375 | * be nice to transmit console writes just like we normally would for | 375 | * be nice to transmit console writes just like we normally would for |
| 376 | * a TTY line. (ie. buffered and TX interrupt driven). That is not | 376 | * a TTY line. (ie. buffered and TX interrupt driven). That is not |
| 377 | * easy because console writes cannot sleep. One solution might be | 377 | * easy because console writes cannot sleep. One solution might be |
| 378 | * to poll on enough port->xmit space becomming free. -DaveM | 378 | * to poll on enough port->xmit space becoming free. -DaveM |
| 379 | */ | 379 | */ |
| 380 | if (!(status & Tx_BUF_EMP)) | 380 | if (!(status & Tx_BUF_EMP)) |
| 381 | return; | 381 | return; |
diff --git a/drivers/tty/serial/jsm/jsm.h b/drivers/tty/serial/jsm/jsm.h index 38a509c684cd..b704c8ce0d71 100644 --- a/drivers/tty/serial/jsm/jsm.h +++ b/drivers/tty/serial/jsm/jsm.h | |||
| @@ -273,7 +273,7 @@ struct neo_uart_struct { | |||
| 273 | u8 fctr; /* WR FCTR - Feature Control Reg */ | 273 | u8 fctr; /* WR FCTR - Feature Control Reg */ |
| 274 | u8 efr; /* WR EFR - Enhanced Function Reg */ | 274 | u8 efr; /* WR EFR - Enhanced Function Reg */ |
| 275 | u8 tfifo; /* WR TXCNT/TXTRG - Transmit FIFO Reg */ | 275 | u8 tfifo; /* WR TXCNT/TXTRG - Transmit FIFO Reg */ |
| 276 | u8 rfifo; /* WR RXCNT/RXTRG - Recieve FIFO Reg */ | 276 | u8 rfifo; /* WR RXCNT/RXTRG - Receive FIFO Reg */ |
| 277 | u8 xoffchar1; /* WR XOFF 1 - XOff Character 1 Reg */ | 277 | u8 xoffchar1; /* WR XOFF 1 - XOff Character 1 Reg */ |
| 278 | u8 xoffchar2; /* WR XOFF 2 - XOff Character 2 Reg */ | 278 | u8 xoffchar2; /* WR XOFF 2 - XOff Character 2 Reg */ |
| 279 | u8 xonchar1; /* WR XON 1 - Xon Character 1 Reg */ | 279 | u8 xonchar1; /* WR XON 1 - Xon Character 1 Reg */ |
diff --git a/drivers/tty/serial/jsm/jsm_neo.c b/drivers/tty/serial/jsm/jsm_neo.c index 7960d9633c15..4538c3e3646e 100644 --- a/drivers/tty/serial/jsm/jsm_neo.c +++ b/drivers/tty/serial/jsm/jsm_neo.c | |||
| @@ -381,7 +381,7 @@ static void neo_copy_data_from_uart_to_queue(struct jsm_channel *ch) | |||
| 381 | /* Copy data from uart to the queue */ | 381 | /* Copy data from uart to the queue */ |
| 382 | memcpy_fromio(ch->ch_rqueue + head, &ch->ch_neo_uart->txrxburst, n); | 382 | memcpy_fromio(ch->ch_rqueue + head, &ch->ch_neo_uart->txrxburst, n); |
| 383 | /* | 383 | /* |
| 384 | * Since RX_FIFO_DATA_ERROR was 0, we are guarenteed | 384 | * Since RX_FIFO_DATA_ERROR was 0, we are guaranteed |
| 385 | * that all the data currently in the FIFO is free of | 385 | * that all the data currently in the FIFO is free of |
| 386 | * breaks and parity/frame/orun errors. | 386 | * breaks and parity/frame/orun errors. |
| 387 | */ | 387 | */ |
| @@ -1210,7 +1210,7 @@ static irqreturn_t neo_intr(int irq, void *voidbrd) | |||
| 1210 | * Why would I check EVERY possibility of type of | 1210 | * Why would I check EVERY possibility of type of |
| 1211 | * interrupt, when we know its TXRDY??? | 1211 | * interrupt, when we know its TXRDY??? |
| 1212 | * Becuz for some reason, even tho we got triggered for TXRDY, | 1212 | * Becuz for some reason, even tho we got triggered for TXRDY, |
| 1213 | * it seems to be occassionally wrong. Instead of TX, which | 1213 | * it seems to be occasionally wrong. Instead of TX, which |
| 1214 | * it should be, I was getting things like RXDY too. Weird. | 1214 | * it should be, I was getting things like RXDY too. Weird. |
| 1215 | */ | 1215 | */ |
| 1216 | neo_parse_isr(brd, port); | 1216 | neo_parse_isr(brd, port); |
diff --git a/drivers/tty/serial/max3107.h b/drivers/tty/serial/max3107.h index 7ab632392502..8415fc723b96 100644 --- a/drivers/tty/serial/max3107.h +++ b/drivers/tty/serial/max3107.h | |||
| @@ -369,7 +369,7 @@ struct max3107_port { | |||
| 369 | struct spi_device *spi; | 369 | struct spi_device *spi; |
| 370 | 370 | ||
| 371 | #if defined(CONFIG_GPIOLIB) | 371 | #if defined(CONFIG_GPIOLIB) |
| 372 | /* GPIO chip stucture */ | 372 | /* GPIO chip structure */ |
| 373 | struct gpio_chip chip; | 373 | struct gpio_chip chip; |
| 374 | #endif | 374 | #endif |
| 375 | 375 | ||
diff --git a/drivers/tty/serial/mrst_max3110.c b/drivers/tty/serial/mrst_max3110.c index 37e13c3d91d9..2f548af4e98a 100644 --- a/drivers/tty/serial/mrst_max3110.c +++ b/drivers/tty/serial/mrst_max3110.c | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | * 1 word. If SPI master controller doesn't support sclk frequency change, | 23 | * 1 word. If SPI master controller doesn't support sclk frequency change, |
| 24 | * then the char need be sent out one by one with some delay | 24 | * then the char need be sent out one by one with some delay |
| 25 | * | 25 | * |
| 26 | * 2. Currently only RX availabe interrrupt is used, no need for waiting TXE | 26 | * 2. Currently only RX available interrrupt is used, no need for waiting TXE |
| 27 | * interrupt for a low speed UART device | 27 | * interrupt for a low speed UART device |
| 28 | */ | 28 | */ |
| 29 | 29 | ||
diff --git a/drivers/tty/serial/mrst_max3110.h b/drivers/tty/serial/mrst_max3110.h index d1ef43af397c..c37ea48c825a 100644 --- a/drivers/tty/serial/mrst_max3110.h +++ b/drivers/tty/serial/mrst_max3110.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | 21 | ||
| 22 | #define WC_IRQ_MASK (0xF << 8) | 22 | #define WC_IRQ_MASK (0xF << 8) |
| 23 | #define WC_TXE_IRQ_ENABLE (1 << 11) /* TX empty irq */ | 23 | #define WC_TXE_IRQ_ENABLE (1 << 11) /* TX empty irq */ |
| 24 | #define WC_RXA_IRQ_ENABLE (1 << 10) /* RX availabe irq */ | 24 | #define WC_RXA_IRQ_ENABLE (1 << 10) /* RX available irq */ |
| 25 | #define WC_PAR_HIGH_IRQ_ENABLE (1 << 9) | 25 | #define WC_PAR_HIGH_IRQ_ENABLE (1 << 9) |
| 26 | #define WC_REC_ACT_IRQ_ENABLE (1 << 8) | 26 | #define WC_REC_ACT_IRQ_ENABLE (1 << 8) |
| 27 | 27 | ||
diff --git a/drivers/tty/serial/msm_serial_hs.c b/drivers/tty/serial/msm_serial_hs.c index b906f11f7c1a..624701f8138a 100644 --- a/drivers/tty/serial/msm_serial_hs.c +++ b/drivers/tty/serial/msm_serial_hs.c | |||
| @@ -495,7 +495,7 @@ static void msm_hs_pm(struct uart_port *uport, unsigned int state, | |||
| 495 | * | 495 | * |
| 496 | * Interrupts should be disabled before we are called, as | 496 | * Interrupts should be disabled before we are called, as |
| 497 | * we modify Set Baud rate | 497 | * we modify Set Baud rate |
| 498 | * Set receive stale interrupt level, dependant on Bit Rate | 498 | * Set receive stale interrupt level, dependent on Bit Rate |
| 499 | * Goal is to have around 8 ms before indicate stale. | 499 | * Goal is to have around 8 ms before indicate stale. |
| 500 | * roundup (((Bit Rate * .008) / 10) + 1 | 500 | * roundup (((Bit Rate * .008) / 10) + 1 |
| 501 | */ | 501 | */ |
| @@ -1350,7 +1350,7 @@ static irqreturn_t msm_hs_rx_wakeup_isr(int irq, void *dev) | |||
| 1350 | 1350 | ||
| 1351 | spin_lock_irqsave(&uport->lock, flags); | 1351 | spin_lock_irqsave(&uport->lock, flags); |
| 1352 | if (msm_uport->clk_state == MSM_HS_CLK_OFF) { | 1352 | if (msm_uport->clk_state == MSM_HS_CLK_OFF) { |
| 1353 | /* ignore the first irq - it is a pending irq that occured | 1353 | /* ignore the first irq - it is a pending irq that occurred |
| 1354 | * before enable_irq() */ | 1354 | * before enable_irq() */ |
| 1355 | if (msm_uport->rx_wakeup.ignore) | 1355 | if (msm_uport->rx_wakeup.ignore) |
| 1356 | msm_uport->rx_wakeup.ignore = 0; | 1356 | msm_uport->rx_wakeup.ignore = 0; |
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 763537943a53..47cadf474149 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | * the Free Software Foundation; either version 2 of the License, or | 13 | * the Free Software Foundation; either version 2 of the License, or |
| 14 | * (at your option) any later version. | 14 | * (at your option) any later version. |
| 15 | * | 15 | * |
| 16 | * Note: This driver is made seperate from 8250 driver as we cannot | 16 | * Note: This driver is made separate from 8250 driver as we cannot |
| 17 | * over load 8250 driver with omap platform specific configuration for | 17 | * over load 8250 driver with omap platform specific configuration for |
| 18 | * features like DMA, it makes easier to implement features like DMA and | 18 | * features like DMA, it makes easier to implement features like DMA and |
| 19 | * hardware flow control and software flow control configuration with | 19 | * hardware flow control and software flow control configuration with |
diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c index 5b9cde79e4ea..e1c8d4f1ce58 100644 --- a/drivers/tty/serial/pmac_zilog.c +++ b/drivers/tty/serial/pmac_zilog.c | |||
| @@ -330,7 +330,7 @@ static struct tty_struct *pmz_receive_chars(struct uart_pmac_port *uap) | |||
| 330 | * When that happens, I disable the receive side of the driver. | 330 | * When that happens, I disable the receive side of the driver. |
| 331 | * Note that what I've been experiencing is a real irq loop where | 331 | * Note that what I've been experiencing is a real irq loop where |
| 332 | * I'm getting flooded regardless of the actual port speed. | 332 | * I'm getting flooded regardless of the actual port speed. |
| 333 | * Something stange is going on with the HW | 333 | * Something strange is going on with the HW |
| 334 | */ | 334 | */ |
| 335 | if ((++loops) > 1000) | 335 | if ((++loops) > 1000) |
| 336 | goto flood; | 336 | goto flood; |
| @@ -396,7 +396,7 @@ static void pmz_transmit_chars(struct uart_pmac_port *uap) | |||
| 396 | * be nice to transmit console writes just like we normally would for | 396 | * be nice to transmit console writes just like we normally would for |
| 397 | * a TTY line. (ie. buffered and TX interrupt driven). That is not | 397 | * a TTY line. (ie. buffered and TX interrupt driven). That is not |
| 398 | * easy because console writes cannot sleep. One solution might be | 398 | * easy because console writes cannot sleep. One solution might be |
| 399 | * to poll on enough port->xmit space becomming free. -DaveM | 399 | * to poll on enough port->xmit space becoming free. -DaveM |
| 400 | */ | 400 | */ |
| 401 | if (!(status & Tx_BUF_EMP)) | 401 | if (!(status & Tx_BUF_EMP)) |
| 402 | return; | 402 | return; |
| @@ -809,7 +809,7 @@ static int pmz_set_scc_power(struct uart_pmac_port *uap, int state) | |||
| 809 | #endif /* !CONFIG_PPC_PMAC */ | 809 | #endif /* !CONFIG_PPC_PMAC */ |
| 810 | 810 | ||
| 811 | /* | 811 | /* |
| 812 | * FixZeroBug....Works around a bug in the SCC receving channel. | 812 | * FixZeroBug....Works around a bug in the SCC receiving channel. |
| 813 | * Inspired from Darwin code, 15 Sept. 2000 -DanM | 813 | * Inspired from Darwin code, 15 Sept. 2000 -DanM |
| 814 | * | 814 | * |
| 815 | * The following sequence prevents a problem that is seen with O'Hare ASICs | 815 | * The following sequence prevents a problem that is seen with O'Hare ASICs |
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index 2335edafe903..9e2fa8d784e2 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c | |||
| @@ -64,7 +64,7 @@ | |||
| 64 | #define tx_enabled(port) ((port)->unused[0]) | 64 | #define tx_enabled(port) ((port)->unused[0]) |
| 65 | #define rx_enabled(port) ((port)->unused[1]) | 65 | #define rx_enabled(port) ((port)->unused[1]) |
| 66 | 66 | ||
| 67 | /* flag to ignore all characters comming in */ | 67 | /* flag to ignore all characters coming in */ |
| 68 | #define RXSTAT_DUMMY_READ (0x10000000) | 68 | #define RXSTAT_DUMMY_READ (0x10000000) |
| 69 | 69 | ||
| 70 | static inline struct s3c24xx_uart_port *to_ourport(struct uart_port *port) | 70 | static inline struct s3c24xx_uart_port *to_ourport(struct uart_port *port) |
| @@ -291,7 +291,7 @@ static irqreturn_t s3c24xx_serial_tx_chars(int irq, void *id) | |||
| 291 | goto out; | 291 | goto out; |
| 292 | } | 292 | } |
| 293 | 293 | ||
| 294 | /* if there isnt anything more to transmit, or the uart is now | 294 | /* if there isn't anything more to transmit, or the uart is now |
| 295 | * stopped, disable the uart and exit | 295 | * stopped, disable the uart and exit |
| 296 | */ | 296 | */ |
| 297 | 297 | ||
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index eb7958c675a8..920a6f929c8b 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c | |||
| @@ -812,7 +812,7 @@ static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr) | |||
| 812 | } | 812 | } |
| 813 | 813 | ||
| 814 | /* | 814 | /* |
| 815 | * Here we define a transistion notifier so that we can update all of our | 815 | * Here we define a transition notifier so that we can update all of our |
| 816 | * ports' baud rate when the peripheral clock changes. | 816 | * ports' baud rate when the peripheral clock changes. |
| 817 | */ | 817 | */ |
| 818 | static int sci_notifier(struct notifier_block *self, | 818 | static int sci_notifier(struct notifier_block *self, |
| @@ -1836,6 +1836,12 @@ static int __devinit serial_console_setup(struct console *co, char *options) | |||
| 1836 | sci_port = &sci_ports[co->index]; | 1836 | sci_port = &sci_ports[co->index]; |
| 1837 | port = &sci_port->port; | 1837 | port = &sci_port->port; |
| 1838 | 1838 | ||
| 1839 | /* | ||
| 1840 | * Refuse to handle uninitialized ports. | ||
| 1841 | */ | ||
| 1842 | if (!port->ops) | ||
| 1843 | return -ENODEV; | ||
| 1844 | |||
| 1839 | ret = sci_remap_port(port); | 1845 | ret = sci_remap_port(port); |
| 1840 | if (unlikely(ret != 0)) | 1846 | if (unlikely(ret != 0)) |
| 1841 | return ret; | 1847 | return ret; |
| @@ -1866,13 +1872,6 @@ static struct console serial_console = { | |||
| 1866 | .data = &sci_uart_driver, | 1872 | .data = &sci_uart_driver, |
| 1867 | }; | 1873 | }; |
| 1868 | 1874 | ||
| 1869 | static int __init sci_console_init(void) | ||
| 1870 | { | ||
| 1871 | register_console(&serial_console); | ||
| 1872 | return 0; | ||
| 1873 | } | ||
| 1874 | console_initcall(sci_console_init); | ||
| 1875 | |||
| 1876 | static struct console early_serial_console = { | 1875 | static struct console early_serial_console = { |
| 1877 | .name = "early_ttySC", | 1876 | .name = "early_ttySC", |
| 1878 | .write = serial_console_write, | 1877 | .write = serial_console_write, |
| @@ -1901,18 +1900,18 @@ static int __devinit sci_probe_earlyprintk(struct platform_device *pdev) | |||
| 1901 | register_console(&early_serial_console); | 1900 | register_console(&early_serial_console); |
| 1902 | return 0; | 1901 | return 0; |
| 1903 | } | 1902 | } |
| 1903 | |||
| 1904 | #define SCI_CONSOLE (&serial_console) | ||
| 1905 | |||
| 1904 | #else | 1906 | #else |
| 1905 | static inline int __devinit sci_probe_earlyprintk(struct platform_device *pdev) | 1907 | static inline int __devinit sci_probe_earlyprintk(struct platform_device *pdev) |
| 1906 | { | 1908 | { |
| 1907 | return -EINVAL; | 1909 | return -EINVAL; |
| 1908 | } | 1910 | } |
| 1909 | #endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */ | ||
| 1910 | 1911 | ||
| 1911 | #if defined(CONFIG_SERIAL_SH_SCI_CONSOLE) | 1912 | #define SCI_CONSOLE NULL |
| 1912 | #define SCI_CONSOLE (&serial_console) | 1913 | |
| 1913 | #else | 1914 | #endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */ |
| 1914 | #define SCI_CONSOLE 0 | ||
| 1915 | #endif | ||
| 1916 | 1915 | ||
| 1917 | static char banner[] __initdata = | 1916 | static char banner[] __initdata = |
| 1918 | KERN_INFO "SuperH SCI(F) driver initialized\n"; | 1917 | KERN_INFO "SuperH SCI(F) driver initialized\n"; |
diff --git a/drivers/tty/serial/sn_console.c b/drivers/tty/serial/sn_console.c index cff9a306660f..377ae74e7154 100644 --- a/drivers/tty/serial/sn_console.c +++ b/drivers/tty/serial/sn_console.c | |||
| @@ -146,7 +146,7 @@ static struct sn_sal_ops intr_ops = { | |||
| 146 | }; | 146 | }; |
| 147 | 147 | ||
| 148 | /* the console does output in two distinctly different ways: | 148 | /* the console does output in two distinctly different ways: |
| 149 | * synchronous (raw) and asynchronous (buffered). initally, early_printk | 149 | * synchronous (raw) and asynchronous (buffered). initially, early_printk |
| 150 | * does synchronous output. any data written goes directly to the SAL | 150 | * does synchronous output. any data written goes directly to the SAL |
| 151 | * to be output (incidentally, it is internally buffered by the SAL) | 151 | * to be output (incidentally, it is internally buffered by the SAL) |
| 152 | * after interrupts and timers are initialized and available for use, | 152 | * after interrupts and timers are initialized and available for use, |
| @@ -481,7 +481,7 @@ sn_receive_chars(struct sn_cons_port *port, unsigned long flags) | |||
| 481 | while (port->sc_ops->sal_input_pending()) { | 481 | while (port->sc_ops->sal_input_pending()) { |
| 482 | ch = port->sc_ops->sal_getc(); | 482 | ch = port->sc_ops->sal_getc(); |
| 483 | if (ch < 0) { | 483 | if (ch < 0) { |
| 484 | printk(KERN_ERR "sn_console: An error occured while " | 484 | printk(KERN_ERR "sn_console: An error occurred while " |
| 485 | "obtaining data from the console (0x%0x)\n", ch); | 485 | "obtaining data from the console (0x%0x)\n", ch); |
| 486 | break; | 486 | break; |
| 487 | } | 487 | } |
diff --git a/drivers/tty/serial/sunzilog.c b/drivers/tty/serial/sunzilog.c index 99ff9abf57ce..8e916e76b7b5 100644 --- a/drivers/tty/serial/sunzilog.c +++ b/drivers/tty/serial/sunzilog.c | |||
| @@ -474,7 +474,7 @@ static void sunzilog_transmit_chars(struct uart_sunzilog_port *up, | |||
| 474 | * be nice to transmit console writes just like we normally would for | 474 | * be nice to transmit console writes just like we normally would for |
| 475 | * a TTY line. (ie. buffered and TX interrupt driven). That is not | 475 | * a TTY line. (ie. buffered and TX interrupt driven). That is not |
| 476 | * easy because console writes cannot sleep. One solution might be | 476 | * easy because console writes cannot sleep. One solution might be |
| 477 | * to poll on enough port->xmit space becomming free. -DaveM | 477 | * to poll on enough port->xmit space becoming free. -DaveM |
| 478 | */ | 478 | */ |
| 479 | if (!(status & Tx_BUF_EMP)) | 479 | if (!(status & Tx_BUF_EMP)) |
| 480 | return; | 480 | return; |
diff --git a/drivers/tty/synclink.c b/drivers/tty/synclink.c index 18888d005a0a..27da23d98e3f 100644 --- a/drivers/tty/synclink.c +++ b/drivers/tty/synclink.c | |||
| @@ -4072,7 +4072,7 @@ static int mgsl_claim_resources(struct mgsl_struct *info) | |||
| 4072 | 4072 | ||
| 4073 | if ( request_irq(info->irq_level,mgsl_interrupt,info->irq_flags, | 4073 | if ( request_irq(info->irq_level,mgsl_interrupt,info->irq_flags, |
| 4074 | info->device_name, info ) < 0 ) { | 4074 | info->device_name, info ) < 0 ) { |
| 4075 | printk( "%s(%d):Cant request interrupt on device %s IRQ=%d\n", | 4075 | printk( "%s(%d):Can't request interrupt on device %s IRQ=%d\n", |
| 4076 | __FILE__,__LINE__,info->device_name, info->irq_level ); | 4076 | __FILE__,__LINE__,info->device_name, info->irq_level ); |
| 4077 | goto errout; | 4077 | goto errout; |
| 4078 | } | 4078 | } |
| @@ -4095,7 +4095,7 @@ static int mgsl_claim_resources(struct mgsl_struct *info) | |||
| 4095 | info->memory_base = ioremap_nocache(info->phys_memory_base, | 4095 | info->memory_base = ioremap_nocache(info->phys_memory_base, |
| 4096 | 0x40000); | 4096 | 0x40000); |
| 4097 | if (!info->memory_base) { | 4097 | if (!info->memory_base) { |
| 4098 | printk( "%s(%d):Cant map shared memory on device %s MemAddr=%08X\n", | 4098 | printk( "%s(%d):Can't map shared memory on device %s MemAddr=%08X\n", |
| 4099 | __FILE__,__LINE__,info->device_name, info->phys_memory_base ); | 4099 | __FILE__,__LINE__,info->device_name, info->phys_memory_base ); |
| 4100 | goto errout; | 4100 | goto errout; |
| 4101 | } | 4101 | } |
| @@ -4109,7 +4109,7 @@ static int mgsl_claim_resources(struct mgsl_struct *info) | |||
| 4109 | info->lcr_base = ioremap_nocache(info->phys_lcr_base, | 4109 | info->lcr_base = ioremap_nocache(info->phys_lcr_base, |
| 4110 | PAGE_SIZE); | 4110 | PAGE_SIZE); |
| 4111 | if (!info->lcr_base) { | 4111 | if (!info->lcr_base) { |
| 4112 | printk( "%s(%d):Cant map LCR memory on device %s MemAddr=%08X\n", | 4112 | printk( "%s(%d):Can't map LCR memory on device %s MemAddr=%08X\n", |
| 4113 | __FILE__,__LINE__,info->device_name, info->phys_lcr_base ); | 4113 | __FILE__,__LINE__,info->device_name, info->phys_lcr_base ); |
| 4114 | goto errout; | 4114 | goto errout; |
| 4115 | } | 4115 | } |
| @@ -4119,7 +4119,7 @@ static int mgsl_claim_resources(struct mgsl_struct *info) | |||
| 4119 | /* claim DMA channel */ | 4119 | /* claim DMA channel */ |
| 4120 | 4120 | ||
| 4121 | if (request_dma(info->dma_level,info->device_name) < 0){ | 4121 | if (request_dma(info->dma_level,info->device_name) < 0){ |
| 4122 | printk( "%s(%d):Cant request DMA channel on device %s DMA=%d\n", | 4122 | printk( "%s(%d):Can't request DMA channel on device %s DMA=%d\n", |
| 4123 | __FILE__,__LINE__,info->device_name, info->dma_level ); | 4123 | __FILE__,__LINE__,info->device_name, info->dma_level ); |
| 4124 | mgsl_release_resources( info ); | 4124 | mgsl_release_resources( info ); |
| 4125 | return -ENODEV; | 4125 | return -ENODEV; |
| @@ -4132,7 +4132,7 @@ static int mgsl_claim_resources(struct mgsl_struct *info) | |||
| 4132 | } | 4132 | } |
| 4133 | 4133 | ||
| 4134 | if ( mgsl_allocate_dma_buffers(info) < 0 ) { | 4134 | if ( mgsl_allocate_dma_buffers(info) < 0 ) { |
| 4135 | printk( "%s(%d):Cant allocate DMA buffers on device %s DMA=%d\n", | 4135 | printk( "%s(%d):Can't allocate DMA buffers on device %s DMA=%d\n", |
| 4136 | __FILE__,__LINE__,info->device_name, info->dma_level ); | 4136 | __FILE__,__LINE__,info->device_name, info->dma_level ); |
| 4137 | goto errout; | 4137 | goto errout; |
| 4138 | } | 4138 | } |
diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c index a35dd549a008..18b48cd3b41d 100644 --- a/drivers/tty/synclink_gt.c +++ b/drivers/tty/synclink_gt.c | |||
| @@ -3491,7 +3491,7 @@ static int claim_resources(struct slgt_info *info) | |||
| 3491 | 3491 | ||
| 3492 | info->reg_addr = ioremap_nocache(info->phys_reg_addr, SLGT_REG_SIZE); | 3492 | info->reg_addr = ioremap_nocache(info->phys_reg_addr, SLGT_REG_SIZE); |
| 3493 | if (!info->reg_addr) { | 3493 | if (!info->reg_addr) { |
| 3494 | DBGERR(("%s cant map device registers, addr=%08X\n", | 3494 | DBGERR(("%s can't map device registers, addr=%08X\n", |
| 3495 | info->device_name, info->phys_reg_addr)); | 3495 | info->device_name, info->phys_reg_addr)); |
| 3496 | info->init_error = DiagStatus_CantAssignPciResources; | 3496 | info->init_error = DiagStatus_CantAssignPciResources; |
| 3497 | goto errout; | 3497 | goto errout; |
diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c index 327343694473..c77831c7675a 100644 --- a/drivers/tty/synclinkmp.c +++ b/drivers/tty/synclinkmp.c | |||
| @@ -3595,7 +3595,7 @@ static int claim_resources(SLMP_INFO *info) | |||
| 3595 | info->memory_base = ioremap_nocache(info->phys_memory_base, | 3595 | info->memory_base = ioremap_nocache(info->phys_memory_base, |
| 3596 | SCA_MEM_SIZE); | 3596 | SCA_MEM_SIZE); |
| 3597 | if (!info->memory_base) { | 3597 | if (!info->memory_base) { |
| 3598 | printk( "%s(%d):%s Cant map shared memory, MemAddr=%08X\n", | 3598 | printk( "%s(%d):%s Can't map shared memory, MemAddr=%08X\n", |
| 3599 | __FILE__,__LINE__,info->device_name, info->phys_memory_base ); | 3599 | __FILE__,__LINE__,info->device_name, info->phys_memory_base ); |
| 3600 | info->init_error = DiagStatus_CantAssignPciResources; | 3600 | info->init_error = DiagStatus_CantAssignPciResources; |
| 3601 | goto errout; | 3601 | goto errout; |
| @@ -3603,7 +3603,7 @@ static int claim_resources(SLMP_INFO *info) | |||
| 3603 | 3603 | ||
| 3604 | info->lcr_base = ioremap_nocache(info->phys_lcr_base, PAGE_SIZE); | 3604 | info->lcr_base = ioremap_nocache(info->phys_lcr_base, PAGE_SIZE); |
| 3605 | if (!info->lcr_base) { | 3605 | if (!info->lcr_base) { |
| 3606 | printk( "%s(%d):%s Cant map LCR memory, MemAddr=%08X\n", | 3606 | printk( "%s(%d):%s Can't map LCR memory, MemAddr=%08X\n", |
| 3607 | __FILE__,__LINE__,info->device_name, info->phys_lcr_base ); | 3607 | __FILE__,__LINE__,info->device_name, info->phys_lcr_base ); |
| 3608 | info->init_error = DiagStatus_CantAssignPciResources; | 3608 | info->init_error = DiagStatus_CantAssignPciResources; |
| 3609 | goto errout; | 3609 | goto errout; |
| @@ -3612,7 +3612,7 @@ static int claim_resources(SLMP_INFO *info) | |||
| 3612 | 3612 | ||
| 3613 | info->sca_base = ioremap_nocache(info->phys_sca_base, PAGE_SIZE); | 3613 | info->sca_base = ioremap_nocache(info->phys_sca_base, PAGE_SIZE); |
| 3614 | if (!info->sca_base) { | 3614 | if (!info->sca_base) { |
| 3615 | printk( "%s(%d):%s Cant map SCA memory, MemAddr=%08X\n", | 3615 | printk( "%s(%d):%s Can't map SCA memory, MemAddr=%08X\n", |
| 3616 | __FILE__,__LINE__,info->device_name, info->phys_sca_base ); | 3616 | __FILE__,__LINE__,info->device_name, info->phys_sca_base ); |
| 3617 | info->init_error = DiagStatus_CantAssignPciResources; | 3617 | info->init_error = DiagStatus_CantAssignPciResources; |
| 3618 | goto errout; | 3618 | goto errout; |
| @@ -3622,7 +3622,7 @@ static int claim_resources(SLMP_INFO *info) | |||
| 3622 | info->statctrl_base = ioremap_nocache(info->phys_statctrl_base, | 3622 | info->statctrl_base = ioremap_nocache(info->phys_statctrl_base, |
| 3623 | PAGE_SIZE); | 3623 | PAGE_SIZE); |
| 3624 | if (!info->statctrl_base) { | 3624 | if (!info->statctrl_base) { |
| 3625 | printk( "%s(%d):%s Cant map SCA Status/Control memory, MemAddr=%08X\n", | 3625 | printk( "%s(%d):%s Can't map SCA Status/Control memory, MemAddr=%08X\n", |
| 3626 | __FILE__,__LINE__,info->device_name, info->phys_statctrl_base ); | 3626 | __FILE__,__LINE__,info->device_name, info->phys_statctrl_base ); |
| 3627 | info->init_error = DiagStatus_CantAssignPciResources; | 3627 | info->init_error = DiagStatus_CantAssignPciResources; |
| 3628 | goto errout; | 3628 | goto errout; |
| @@ -3869,7 +3869,7 @@ static void device_init(int adapter_num, struct pci_dev *pdev) | |||
| 3869 | port_array[0]->irq_flags, | 3869 | port_array[0]->irq_flags, |
| 3870 | port_array[0]->device_name, | 3870 | port_array[0]->device_name, |
| 3871 | port_array[0]) < 0 ) { | 3871 | port_array[0]) < 0 ) { |
| 3872 | printk( "%s(%d):%s Cant request interrupt, IRQ=%d\n", | 3872 | printk( "%s(%d):%s Can't request interrupt, IRQ=%d\n", |
| 3873 | __FILE__,__LINE__, | 3873 | __FILE__,__LINE__, |
| 3874 | port_array[0]->device_name, | 3874 | port_array[0]->device_name, |
| 3875 | port_array[0]->irq_level ); | 3875 | port_array[0]->irq_level ); |
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c index b9451219528b..f1a7918d71aa 100644 --- a/drivers/tty/tty_buffer.c +++ b/drivers/tty/tty_buffer.c | |||
| @@ -442,10 +442,8 @@ static void flush_to_ldisc(struct work_struct *work) | |||
| 442 | line discipline as we want to empty the queue */ | 442 | line discipline as we want to empty the queue */ |
| 443 | if (test_bit(TTY_FLUSHPENDING, &tty->flags)) | 443 | if (test_bit(TTY_FLUSHPENDING, &tty->flags)) |
| 444 | break; | 444 | break; |
| 445 | if (!tty->receive_room || seen_tail) { | 445 | if (!tty->receive_room || seen_tail) |
| 446 | schedule_work(&tty->buf.work); | ||
| 447 | break; | 446 | break; |
| 448 | } | ||
| 449 | if (count > tty->receive_room) | 447 | if (count > tty->receive_room) |
| 450 | count = tty->receive_room; | 448 | count = tty->receive_room; |
| 451 | char_buf = head->char_buf_ptr + head->read; | 449 | char_buf = head->char_buf_ptr + head->read; |
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 936a4ead6c21..d7d50b48287e 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c | |||
| @@ -2134,7 +2134,7 @@ done: | |||
| 2134 | * actually has driver level meaning and triggers a VC resize. | 2134 | * actually has driver level meaning and triggers a VC resize. |
| 2135 | * | 2135 | * |
| 2136 | * Locking: | 2136 | * Locking: |
| 2137 | * Driver dependant. The default do_resize method takes the | 2137 | * Driver dependent. The default do_resize method takes the |
| 2138 | * tty termios mutex and ctrl_lock. The console takes its own lock | 2138 | * tty termios mutex and ctrl_lock. The console takes its own lock |
| 2139 | * then calls into the default method. | 2139 | * then calls into the default method. |
| 2140 | */ | 2140 | */ |
| @@ -2155,7 +2155,7 @@ static int tiocswinsz(struct tty_struct *tty, struct winsize __user *arg) | |||
| 2155 | * tioccons - allow admin to move logical console | 2155 | * tioccons - allow admin to move logical console |
| 2156 | * @file: the file to become console | 2156 | * @file: the file to become console |
| 2157 | * | 2157 | * |
| 2158 | * Allow the adminstrator to move the redirected console device | 2158 | * Allow the administrator to move the redirected console device |
| 2159 | * | 2159 | * |
| 2160 | * Locking: uses redirect_lock to guard the redirect information | 2160 | * Locking: uses redirect_lock to guard the redirect information |
| 2161 | */ | 2161 | */ |
| @@ -2290,7 +2290,7 @@ EXPORT_SYMBOL_GPL(tty_get_pgrp); | |||
| 2290 | /** | 2290 | /** |
| 2291 | * tiocgpgrp - get process group | 2291 | * tiocgpgrp - get process group |
| 2292 | * @tty: tty passed by user | 2292 | * @tty: tty passed by user |
| 2293 | * @real_tty: tty side of the tty pased by the user if a pty else the tty | 2293 | * @real_tty: tty side of the tty passed by the user if a pty else the tty |
| 2294 | * @p: returned pid | 2294 | * @p: returned pid |
| 2295 | * | 2295 | * |
| 2296 | * Obtain the process group of the tty. If there is no process group | 2296 | * Obtain the process group of the tty. If there is no process group |
| @@ -2367,7 +2367,7 @@ out_unlock: | |||
| 2367 | /** | 2367 | /** |
| 2368 | * tiocgsid - get session id | 2368 | * tiocgsid - get session id |
| 2369 | * @tty: tty passed by user | 2369 | * @tty: tty passed by user |
| 2370 | * @real_tty: tty side of the tty pased by the user if a pty else the tty | 2370 | * @real_tty: tty side of the tty passed by the user if a pty else the tty |
| 2371 | * @p: pointer to returned session id | 2371 | * @p: pointer to returned session id |
| 2372 | * | 2372 | * |
| 2373 | * Obtain the session id of the tty. If there is no session | 2373 | * Obtain the session id of the tty. If there is no session |
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c index 1a1135d580a2..21574cb32343 100644 --- a/drivers/tty/tty_ioctl.c +++ b/drivers/tty/tty_ioctl.c | |||
| @@ -247,7 +247,7 @@ speed_t tty_termios_baud_rate(struct ktermios *termios) | |||
| 247 | cbaud = termios->c_cflag & CBAUD; | 247 | cbaud = termios->c_cflag & CBAUD; |
| 248 | 248 | ||
| 249 | #ifdef BOTHER | 249 | #ifdef BOTHER |
| 250 | /* Magic token for arbitary speed via c_ispeed/c_ospeed */ | 250 | /* Magic token for arbitrary speed via c_ispeed/c_ospeed */ |
| 251 | if (cbaud == BOTHER) | 251 | if (cbaud == BOTHER) |
| 252 | return termios->c_ospeed; | 252 | return termios->c_ospeed; |
| 253 | #endif | 253 | #endif |
| @@ -283,7 +283,7 @@ speed_t tty_termios_input_baud_rate(struct ktermios *termios) | |||
| 283 | if (cbaud == B0) | 283 | if (cbaud == B0) |
| 284 | return tty_termios_baud_rate(termios); | 284 | return tty_termios_baud_rate(termios); |
| 285 | 285 | ||
| 286 | /* Magic token for arbitary speed via c_ispeed*/ | 286 | /* Magic token for arbitrary speed via c_ispeed*/ |
| 287 | if (cbaud == BOTHER) | 287 | if (cbaud == BOTHER) |
| 288 | return termios->c_ispeed; | 288 | return termios->c_ispeed; |
| 289 | 289 | ||
| @@ -449,7 +449,7 @@ EXPORT_SYMBOL(tty_get_baud_rate); | |||
| 449 | * @new: New termios | 449 | * @new: New termios |
| 450 | * @old: Old termios | 450 | * @old: Old termios |
| 451 | * | 451 | * |
| 452 | * Propogate the hardware specific terminal setting bits from | 452 | * Propagate the hardware specific terminal setting bits from |
| 453 | * the old termios structure to the new one. This is used in cases | 453 | * the old termios structure to the new one. This is used in cases |
| 454 | * where the hardware does not support reconfiguration or as a helper | 454 | * where the hardware does not support reconfiguration or as a helper |
| 455 | * in some cases where only minimal reconfiguration is supported | 455 | * in some cases where only minimal reconfiguration is supported |
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index c83cdfb56fcc..4bea1efaec98 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c | |||
| @@ -3963,7 +3963,7 @@ void reset_palette(struct vc_data *vc) | |||
| 3963 | * of 32 pixels. Userspace fontdata is stored with 32 bytes (shorts/ints, | 3963 | * of 32 pixels. Userspace fontdata is stored with 32 bytes (shorts/ints, |
| 3964 | * depending on width) reserved for each character which is kinda wasty, but | 3964 | * depending on width) reserved for each character which is kinda wasty, but |
| 3965 | * this is done in order to maintain compatibility with the EGA/VGA fonts. It | 3965 | * this is done in order to maintain compatibility with the EGA/VGA fonts. It |
| 3966 | * is upto the actual low-level console-driver convert data into its favorite | 3966 | * is up to the actual low-level console-driver convert data into its favorite |
| 3967 | * format (maybe we should add a `fontoffset' field to the `display' | 3967 | * format (maybe we should add a `fontoffset' field to the `display' |
| 3968 | * structure so we won't have to convert the fontdata all the time. | 3968 | * structure so we won't have to convert the fontdata all the time. |
| 3969 | * /Jes | 3969 | * /Jes |
diff --git a/drivers/uio/uio_pruss.c b/drivers/uio/uio_pruss.c index daf6e77de2b1..e67b566e7aa3 100644 --- a/drivers/uio/uio_pruss.c +++ b/drivers/uio/uio_pruss.c | |||
| @@ -39,7 +39,7 @@ module_param(extram_pool_sz, int, 0); | |||
| 39 | MODULE_PARM_DESC(extram_pool_sz, "external ram pool size to allocate"); | 39 | MODULE_PARM_DESC(extram_pool_sz, "external ram pool size to allocate"); |
| 40 | 40 | ||
| 41 | /* | 41 | /* |
| 42 | * Host event IRQ numbers from PRUSS - PRUSS can generate upto 8 interrupt | 42 | * Host event IRQ numbers from PRUSS - PRUSS can generate up to 8 interrupt |
| 43 | * events to AINTC of ARM host processor - which can be used for IPC b/w PRUSS | 43 | * events to AINTC of ARM host processor - which can be used for IPC b/w PRUSS |
| 44 | * firmware and user space application, async notification from PRU firmware | 44 | * firmware and user space application, async notification from PRU firmware |
| 45 | * to user space application | 45 | * to user space application |
diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index 41b6e51188e4..006489d82dc3 100644 --- a/drivers/usb/Kconfig +++ b/drivers/usb/Kconfig | |||
| @@ -66,6 +66,7 @@ config USB_ARCH_HAS_EHCI | |||
| 66 | default y if ARCH_VT8500 | 66 | default y if ARCH_VT8500 |
| 67 | default y if PLAT_SPEAR | 67 | default y if PLAT_SPEAR |
| 68 | default y if ARCH_MSM | 68 | default y if ARCH_MSM |
| 69 | default y if MICROBLAZE | ||
| 69 | default PCI | 70 | default PCI |
| 70 | 71 | ||
| 71 | # ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface. | 72 | # ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface. |
diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c index b268e9fccb47..e71521ce3010 100644 --- a/drivers/usb/atm/ueagle-atm.c +++ b/drivers/usb/atm/ueagle-atm.c | |||
| @@ -1283,7 +1283,7 @@ static void uea_set_bulk_timeout(struct uea_softc *sc, u32 dsrate) | |||
| 1283 | 1283 | ||
| 1284 | /* in bulk mode the modem have problem with high rate | 1284 | /* in bulk mode the modem have problem with high rate |
| 1285 | * changing internal timing could improve things, but the | 1285 | * changing internal timing could improve things, but the |
| 1286 | * value is misterious. | 1286 | * value is mysterious. |
| 1287 | * ADI930 don't support it (-EPIPE error). | 1287 | * ADI930 don't support it (-EPIPE error). |
| 1288 | */ | 1288 | */ |
| 1289 | 1289 | ||
| @@ -1743,7 +1743,7 @@ static int uea_send_cmvs_e1(struct uea_softc *sc) | |||
| 1743 | goto out; | 1743 | goto out; |
| 1744 | } | 1744 | } |
| 1745 | } else { | 1745 | } else { |
| 1746 | /* This realy should not happen */ | 1746 | /* This really should not happen */ |
| 1747 | uea_err(INS_TO_USBDEV(sc), "bad cmvs version %d\n", ver); | 1747 | uea_err(INS_TO_USBDEV(sc), "bad cmvs version %d\n", ver); |
| 1748 | goto out; | 1748 | goto out; |
| 1749 | } | 1749 | } |
| @@ -1798,7 +1798,7 @@ static int uea_send_cmvs_e4(struct uea_softc *sc) | |||
| 1798 | goto out; | 1798 | goto out; |
| 1799 | } | 1799 | } |
| 1800 | } else { | 1800 | } else { |
| 1801 | /* This realy should not happen */ | 1801 | /* This really should not happen */ |
| 1802 | uea_err(INS_TO_USBDEV(sc), "bad cmvs version %d\n", ver); | 1802 | uea_err(INS_TO_USBDEV(sc), "bad cmvs version %d\n", ver); |
| 1803 | goto out; | 1803 | goto out; |
| 1804 | } | 1804 | } |
| @@ -1829,7 +1829,7 @@ static int uea_start_reset(struct uea_softc *sc) | |||
| 1829 | 1829 | ||
| 1830 | /* mask interrupt */ | 1830 | /* mask interrupt */ |
| 1831 | sc->booting = 1; | 1831 | sc->booting = 1; |
| 1832 | /* We need to set this here because, a ack timeout could have occured, | 1832 | /* We need to set this here because, a ack timeout could have occurred, |
| 1833 | * but before we start the reboot, the ack occurs and set this to 1. | 1833 | * but before we start the reboot, the ack occurs and set this to 1. |
| 1834 | * So we will failed to wait Ready CMV. | 1834 | * So we will failed to wait Ready CMV. |
| 1835 | */ | 1835 | */ |
diff --git a/drivers/usb/c67x00/c67x00-drv.c b/drivers/usb/c67x00/c67x00-drv.c index b6d49234e521..62050f7a4f97 100644 --- a/drivers/usb/c67x00/c67x00-drv.c +++ b/drivers/usb/c67x00/c67x00-drv.c | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | * the link between the common hardware parts and the subdrivers (e.g. | 27 | * the link between the common hardware parts and the subdrivers (e.g. |
| 28 | * interrupt handling). | 28 | * interrupt handling). |
| 29 | * | 29 | * |
| 30 | * The c67x00 has 2 SIE's (serial interface engine) wich can be configured | 30 | * The c67x00 has 2 SIE's (serial interface engine) which can be configured |
| 31 | * to be host, device or OTG (with some limitations, E.G. only SIE1 can be OTG). | 31 | * to be host, device or OTG (with some limitations, E.G. only SIE1 can be OTG). |
| 32 | * | 32 | * |
| 33 | * Depending on the platform configuration, the SIE's are created and | 33 | * Depending on the platform configuration, the SIE's are created and |
diff --git a/drivers/usb/c67x00/c67x00-hcd.h b/drivers/usb/c67x00/c67x00-hcd.h index 74e44621e313..e3d493d4d61a 100644 --- a/drivers/usb/c67x00/c67x00-hcd.h +++ b/drivers/usb/c67x00/c67x00-hcd.h | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | /* | 34 | /* |
| 35 | * The following parameters depend on the CPU speed, bus speed, ... | 35 | * The following parameters depend on the CPU speed, bus speed, ... |
| 36 | * These can be tuned for specific use cases, e.g. if isochronous transfers | 36 | * These can be tuned for specific use cases, e.g. if isochronous transfers |
| 37 | * are very important, bandwith can be sacrificed to guarantee that the | 37 | * are very important, bandwidth can be sacrificed to guarantee that the |
| 38 | * 1ms deadline will be met. | 38 | * 1ms deadline will be met. |
| 39 | * If bulk transfers are important, the MAX_FRAME_BW can be increased, | 39 | * If bulk transfers are important, the MAX_FRAME_BW can be increased, |
| 40 | * but some (or many) isochronous deadlines might not be met. | 40 | * but some (or many) isochronous deadlines might not be met. |
diff --git a/drivers/usb/c67x00/c67x00-sched.c b/drivers/usb/c67x00/c67x00-sched.c index f6b3c253f3fa..a03fbc15fa9c 100644 --- a/drivers/usb/c67x00/c67x00-sched.c +++ b/drivers/usb/c67x00/c67x00-sched.c | |||
| @@ -907,7 +907,7 @@ static inline int c67x00_end_of_data(struct c67x00_td *td) | |||
| 907 | 907 | ||
| 908 | /* Remove all td's from the list which come | 908 | /* Remove all td's from the list which come |
| 909 | * after last_td and are meant for the same pipe. | 909 | * after last_td and are meant for the same pipe. |
| 910 | * This is used when a short packet has occured */ | 910 | * This is used when a short packet has occurred */ |
| 911 | static inline void c67x00_clear_pipe(struct c67x00_hcd *c67x00, | 911 | static inline void c67x00_clear_pipe(struct c67x00_hcd *c67x00, |
| 912 | struct c67x00_td *last_td) | 912 | struct c67x00_td *last_td) |
| 913 | { | 913 | { |
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h index 5eeb570b9a61..b4ea54dbf323 100644 --- a/drivers/usb/class/cdc-acm.h +++ b/drivers/usb/class/cdc-acm.h | |||
| @@ -52,7 +52,7 @@ | |||
| 52 | */ | 52 | */ |
| 53 | 53 | ||
| 54 | /* | 54 | /* |
| 55 | * The only reason to have several buffers is to accomodate assumptions | 55 | * The only reason to have several buffers is to accommodate assumptions |
| 56 | * in line disciplines. They ask for empty space amount, receive our URB size, | 56 | * in line disciplines. They ask for empty space amount, receive our URB size, |
| 57 | * and proceed to issue several 1-character writes, assuming they will fit. | 57 | * and proceed to issue several 1-character writes, assuming they will fit. |
| 58 | * The very first write takes a complete URB. Fortunately, this only happens | 58 | * The very first write takes a complete URB. Fortunately, this only happens |
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c index 6a54634ab823..385acb895ab3 100644 --- a/drivers/usb/class/usbtmc.c +++ b/drivers/usb/class/usbtmc.c | |||
| @@ -483,7 +483,7 @@ static ssize_t usbtmc_read(struct file *filp, char __user *buf, | |||
| 483 | } | 483 | } |
| 484 | 484 | ||
| 485 | done += n_characters; | 485 | done += n_characters; |
| 486 | /* Terminate if end-of-message bit recieved from device */ | 486 | /* Terminate if end-of-message bit received from device */ |
| 487 | if ((buffer[8] & 0x01) && (actual >= n_characters + 12)) | 487 | if ((buffer[8] & 0x01) && (actual >= n_characters + 12)) |
| 488 | remaining = 0; | 488 | remaining = 0; |
| 489 | else | 489 | else |
diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c index a3d2e2399655..96fdfb815f89 100644 --- a/drivers/usb/core/devices.c +++ b/drivers/usb/core/devices.c | |||
| @@ -221,7 +221,7 @@ static char *usb_dump_endpoint_descriptor(int speed, char *start, char *end, | |||
| 221 | break; | 221 | break; |
| 222 | case USB_ENDPOINT_XFER_INT: | 222 | case USB_ENDPOINT_XFER_INT: |
| 223 | type = "Int."; | 223 | type = "Int."; |
| 224 | if (speed == USB_SPEED_HIGH) | 224 | if (speed == USB_SPEED_HIGH || speed == USB_SPEED_SUPER) |
| 225 | interval = 1 << (desc->bInterval - 1); | 225 | interval = 1 << (desc->bInterval - 1); |
| 226 | else | 226 | else |
| 227 | interval = desc->bInterval; | 227 | interval = desc->bInterval; |
| @@ -229,7 +229,8 @@ static char *usb_dump_endpoint_descriptor(int speed, char *start, char *end, | |||
| 229 | default: /* "can't happen" */ | 229 | default: /* "can't happen" */ |
| 230 | return start; | 230 | return start; |
| 231 | } | 231 | } |
| 232 | interval *= (speed == USB_SPEED_HIGH) ? 125 : 1000; | 232 | interval *= (speed == USB_SPEED_HIGH || |
| 233 | speed == USB_SPEED_SUPER) ? 125 : 1000; | ||
| 233 | if (interval % 1000) | 234 | if (interval % 1000) |
| 234 | unit = 'u'; | 235 | unit = 'u'; |
| 235 | else { | 236 | else { |
| @@ -542,8 +543,9 @@ static ssize_t usb_device_dump(char __user **buffer, size_t *nbytes, | |||
| 542 | if (level == 0) { | 543 | if (level == 0) { |
| 543 | int max; | 544 | int max; |
| 544 | 545 | ||
| 545 | /* high speed reserves 80%, full/low reserves 90% */ | 546 | /* super/high speed reserves 80%, full/low reserves 90% */ |
| 546 | if (usbdev->speed == USB_SPEED_HIGH) | 547 | if (usbdev->speed == USB_SPEED_HIGH || |
| 548 | usbdev->speed == USB_SPEED_SUPER) | ||
| 547 | max = 800; | 549 | max = 800; |
| 548 | else | 550 | else |
| 549 | max = FRAME_TIME_MAX_USECS_ALLOC; | 551 | max = FRAME_TIME_MAX_USECS_ALLOC; |
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 02b4dbfa488a..77a7faec8d78 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
| @@ -700,7 +700,7 @@ void usb_hcd_poll_rh_status(struct usb_hcd *hcd) | |||
| 700 | /* The USB 2.0 spec says 256 ms. This is close enough and won't | 700 | /* The USB 2.0 spec says 256 ms. This is close enough and won't |
| 701 | * exceed that limit if HZ is 100. The math is more clunky than | 701 | * exceed that limit if HZ is 100. The math is more clunky than |
| 702 | * maybe expected, this is to make sure that all timers for USB devices | 702 | * maybe expected, this is to make sure that all timers for USB devices |
| 703 | * fire at the same time to give the CPU a break inbetween */ | 703 | * fire at the same time to give the CPU a break in between */ |
| 704 | if (hcd->uses_new_polling ? HCD_POLL_RH(hcd) : | 704 | if (hcd->uses_new_polling ? HCD_POLL_RH(hcd) : |
| 705 | (length == 0 && hcd->status_urb != NULL)) | 705 | (length == 0 && hcd->status_urb != NULL)) |
| 706 | mod_timer (&hcd->rh_timer, (jiffies/(HZ/4) + 1) * (HZ/4)); | 706 | mod_timer (&hcd->rh_timer, (jiffies/(HZ/4) + 1) * (HZ/4)); |
| @@ -1908,7 +1908,7 @@ void usb_free_streams(struct usb_interface *interface, | |||
| 1908 | 1908 | ||
| 1909 | /* Streams only apply to bulk endpoints. */ | 1909 | /* Streams only apply to bulk endpoints. */ |
| 1910 | for (i = 0; i < num_eps; i++) | 1910 | for (i = 0; i < num_eps; i++) |
| 1911 | if (!usb_endpoint_xfer_bulk(&eps[i]->desc)) | 1911 | if (!eps[i] || !usb_endpoint_xfer_bulk(&eps[i]->desc)) |
| 1912 | return; | 1912 | return; |
| 1913 | 1913 | ||
| 1914 | hcd->driver->free_streams(hcd, dev, eps, num_eps, mem_flags); | 1914 | hcd->driver->free_streams(hcd, dev, eps, num_eps, mem_flags); |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 564eaa5525d7..93720bdc9efd 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
| @@ -1649,7 +1649,7 @@ void usb_disconnect(struct usb_device **pdev) | |||
| 1649 | 1649 | ||
| 1650 | /* mark the device as inactive, so any further urb submissions for | 1650 | /* mark the device as inactive, so any further urb submissions for |
| 1651 | * this device (and any of its children) will fail immediately. | 1651 | * this device (and any of its children) will fail immediately. |
| 1652 | * this quiesces everyting except pending urbs. | 1652 | * this quiesces everything except pending urbs. |
| 1653 | */ | 1653 | */ |
| 1654 | usb_set_device_state(udev, USB_STATE_NOTATTACHED); | 1654 | usb_set_device_state(udev, USB_STATE_NOTATTACHED); |
| 1655 | dev_info(&udev->dev, "USB disconnect, device number %d\n", | 1655 | dev_info(&udev->dev, "USB disconnect, device number %d\n", |
| @@ -2285,7 +2285,17 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg) | |||
| 2285 | } | 2285 | } |
| 2286 | 2286 | ||
| 2287 | /* see 7.1.7.6 */ | 2287 | /* see 7.1.7.6 */ |
| 2288 | status = set_port_feature(hub->hdev, port1, USB_PORT_FEAT_SUSPEND); | 2288 | /* Clear PORT_POWER if it's a USB3.0 device connected to USB 3.0 |
| 2289 | * external hub. | ||
| 2290 | * FIXME: this is a temporary workaround to make the system able | ||
| 2291 | * to suspend/resume. | ||
| 2292 | */ | ||
| 2293 | if ((hub->hdev->parent != NULL) && hub_is_superspeed(hub->hdev)) | ||
| 2294 | status = clear_port_feature(hub->hdev, port1, | ||
| 2295 | USB_PORT_FEAT_POWER); | ||
| 2296 | else | ||
| 2297 | status = set_port_feature(hub->hdev, port1, | ||
| 2298 | USB_PORT_FEAT_SUSPEND); | ||
| 2289 | if (status) { | 2299 | if (status) { |
| 2290 | dev_dbg(hub->intfdev, "can't suspend port %d, status %d\n", | 2300 | dev_dbg(hub->intfdev, "can't suspend port %d, status %d\n", |
| 2291 | port1, status); | 2301 | port1, status); |
diff --git a/drivers/usb/early/ehci-dbgp.c b/drivers/usb/early/ehci-dbgp.c index 0bc06e2bcfcb..a6a350f5827b 100644 --- a/drivers/usb/early/ehci-dbgp.c +++ b/drivers/usb/early/ehci-dbgp.c | |||
| @@ -648,7 +648,7 @@ static int ehci_reset_port(int port) | |||
| 648 | if (!(portsc & PORT_CONNECT)) | 648 | if (!(portsc & PORT_CONNECT)) |
| 649 | return -ENOTCONN; | 649 | return -ENOTCONN; |
| 650 | 650 | ||
| 651 | /* bomb out completely if something weird happend */ | 651 | /* bomb out completely if something weird happened */ |
| 652 | if ((portsc & PORT_CSC)) | 652 | if ((portsc & PORT_CSC)) |
| 653 | return -EINVAL; | 653 | return -EINVAL; |
| 654 | 654 | ||
diff --git a/drivers/usb/gadget/amd5536udc.c b/drivers/usb/gadget/amd5536udc.c index f8dd7269d79c..6e42aab75806 100644 --- a/drivers/usb/gadget/amd5536udc.c +++ b/drivers/usb/gadget/amd5536udc.c | |||
| @@ -278,7 +278,7 @@ static int udc_enable_dev_setup_interrupts(struct udc *dev) | |||
| 278 | return 0; | 278 | return 0; |
| 279 | } | 279 | } |
| 280 | 280 | ||
| 281 | /* Calculates fifo start of endpoint based on preceeding endpoints */ | 281 | /* Calculates fifo start of endpoint based on preceding endpoints */ |
| 282 | static int udc_set_txfifo_addr(struct udc_ep *ep) | 282 | static int udc_set_txfifo_addr(struct udc_ep *ep) |
| 283 | { | 283 | { |
| 284 | struct udc *dev; | 284 | struct udc *dev; |
| @@ -2137,7 +2137,7 @@ static irqreturn_t udc_data_out_isr(struct udc *dev, int ep_ix) | |||
| 2137 | if (use_dma) { | 2137 | if (use_dma) { |
| 2138 | /* BNA event ? */ | 2138 | /* BNA event ? */ |
| 2139 | if (tmp & AMD_BIT(UDC_EPSTS_BNA)) { | 2139 | if (tmp & AMD_BIT(UDC_EPSTS_BNA)) { |
| 2140 | DBG(dev, "BNA ep%dout occured - DESPTR = %x \n", | 2140 | DBG(dev, "BNA ep%dout occurred - DESPTR = %x \n", |
| 2141 | ep->num, readl(&ep->regs->desptr)); | 2141 | ep->num, readl(&ep->regs->desptr)); |
| 2142 | /* clear BNA */ | 2142 | /* clear BNA */ |
| 2143 | writel(tmp | AMD_BIT(UDC_EPSTS_BNA), &ep->regs->sts); | 2143 | writel(tmp | AMD_BIT(UDC_EPSTS_BNA), &ep->regs->sts); |
| @@ -2151,7 +2151,7 @@ static irqreturn_t udc_data_out_isr(struct udc *dev, int ep_ix) | |||
| 2151 | } | 2151 | } |
| 2152 | /* HE event ? */ | 2152 | /* HE event ? */ |
| 2153 | if (tmp & AMD_BIT(UDC_EPSTS_HE)) { | 2153 | if (tmp & AMD_BIT(UDC_EPSTS_HE)) { |
| 2154 | dev_err(&dev->pdev->dev, "HE ep%dout occured\n", ep->num); | 2154 | dev_err(&dev->pdev->dev, "HE ep%dout occurred\n", ep->num); |
| 2155 | 2155 | ||
| 2156 | /* clear HE */ | 2156 | /* clear HE */ |
| 2157 | writel(tmp | AMD_BIT(UDC_EPSTS_HE), &ep->regs->sts); | 2157 | writel(tmp | AMD_BIT(UDC_EPSTS_HE), &ep->regs->sts); |
| @@ -2354,7 +2354,7 @@ static irqreturn_t udc_data_in_isr(struct udc *dev, int ep_ix) | |||
| 2354 | /* BNA ? */ | 2354 | /* BNA ? */ |
| 2355 | if (epsts & AMD_BIT(UDC_EPSTS_BNA)) { | 2355 | if (epsts & AMD_BIT(UDC_EPSTS_BNA)) { |
| 2356 | dev_err(&dev->pdev->dev, | 2356 | dev_err(&dev->pdev->dev, |
| 2357 | "BNA ep%din occured - DESPTR = %08lx \n", | 2357 | "BNA ep%din occurred - DESPTR = %08lx \n", |
| 2358 | ep->num, | 2358 | ep->num, |
| 2359 | (unsigned long) readl(&ep->regs->desptr)); | 2359 | (unsigned long) readl(&ep->regs->desptr)); |
| 2360 | 2360 | ||
| @@ -2367,7 +2367,7 @@ static irqreturn_t udc_data_in_isr(struct udc *dev, int ep_ix) | |||
| 2367 | /* HE event ? */ | 2367 | /* HE event ? */ |
| 2368 | if (epsts & AMD_BIT(UDC_EPSTS_HE)) { | 2368 | if (epsts & AMD_BIT(UDC_EPSTS_HE)) { |
| 2369 | dev_err(&dev->pdev->dev, | 2369 | dev_err(&dev->pdev->dev, |
| 2370 | "HE ep%dn occured - DESPTR = %08lx \n", | 2370 | "HE ep%dn occurred - DESPTR = %08lx \n", |
| 2371 | ep->num, (unsigned long) readl(&ep->regs->desptr)); | 2371 | ep->num, (unsigned long) readl(&ep->regs->desptr)); |
| 2372 | 2372 | ||
| 2373 | /* clear HE */ | 2373 | /* clear HE */ |
| @@ -2384,7 +2384,7 @@ static irqreturn_t udc_data_in_isr(struct udc *dev, int ep_ix) | |||
| 2384 | req = list_entry(ep->queue.next, | 2384 | req = list_entry(ep->queue.next, |
| 2385 | struct udc_request, queue); | 2385 | struct udc_request, queue); |
| 2386 | /* | 2386 | /* |
| 2387 | * length bytes transfered | 2387 | * length bytes transferred |
| 2388 | * check dma done of last desc. in PPBDU mode | 2388 | * check dma done of last desc. in PPBDU mode |
| 2389 | */ | 2389 | */ |
| 2390 | if (use_dma_ppb_du) { | 2390 | if (use_dma_ppb_du) { |
| @@ -2784,7 +2784,7 @@ static irqreturn_t udc_control_in_isr(struct udc *dev) | |||
| 2784 | /* write fifo */ | 2784 | /* write fifo */ |
| 2785 | udc_txfifo_write(ep, &req->req); | 2785 | udc_txfifo_write(ep, &req->req); |
| 2786 | 2786 | ||
| 2787 | /* lengh bytes transfered */ | 2787 | /* lengh bytes transferred */ |
| 2788 | len = req->req.length - req->req.actual; | 2788 | len = req->req.length - req->req.actual; |
| 2789 | if (len > ep->ep.maxpacket) | 2789 | if (len > ep->ep.maxpacket) |
| 2790 | len = ep->ep.maxpacket; | 2790 | len = ep->ep.maxpacket; |
diff --git a/drivers/usb/gadget/amd5536udc.h b/drivers/usb/gadget/amd5536udc.h index 4bbabbbfc93f..1d1c7543468e 100644 --- a/drivers/usb/gadget/amd5536udc.h +++ b/drivers/usb/gadget/amd5536udc.h | |||
| @@ -584,7 +584,7 @@ union udc_setup_data { | |||
| 584 | * SET and GET bitfields in u32 values | 584 | * SET and GET bitfields in u32 values |
| 585 | * via constants for mask/offset: | 585 | * via constants for mask/offset: |
| 586 | * <bit_field_stub_name> is the text between | 586 | * <bit_field_stub_name> is the text between |
| 587 | * UDC_ and _MASK|_OFS of appropiate | 587 | * UDC_ and _MASK|_OFS of appropriate |
| 588 | * constant | 588 | * constant |
| 589 | * | 589 | * |
| 590 | * set bitfield value in u32 u32Val | 590 | * set bitfield value in u32 u32Val |
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index bb8ddf0469f9..9b7cdb16f26b 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c | |||
| @@ -826,7 +826,7 @@ done: | |||
| 826 | return status; | 826 | return status; |
| 827 | } | 827 | } |
| 828 | 828 | ||
| 829 | /* reinit == restore inital software state */ | 829 | /* reinit == restore initial software state */ |
| 830 | static void udc_reinit(struct at91_udc *udc) | 830 | static void udc_reinit(struct at91_udc *udc) |
| 831 | { | 831 | { |
| 832 | u32 i; | 832 | u32 i; |
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index c2251c40a205..82314ed22506 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c | |||
| @@ -42,7 +42,7 @@ | |||
| 42 | static struct usb_composite_driver *composite; | 42 | static struct usb_composite_driver *composite; |
| 43 | static int (*composite_gadget_bind)(struct usb_composite_dev *cdev); | 43 | static int (*composite_gadget_bind)(struct usb_composite_dev *cdev); |
| 44 | 44 | ||
| 45 | /* Some systems will need runtime overrides for the product identifers | 45 | /* Some systems will need runtime overrides for the product identifiers |
| 46 | * published in the device descriptor, either numbers or strings or both. | 46 | * published in the device descriptor, either numbers or strings or both. |
| 47 | * String parameters are in UTF-8 (superset of ASCII's 7 bit characters). | 47 | * String parameters are in UTF-8 (superset of ASCII's 7 bit characters). |
| 48 | */ | 48 | */ |
| @@ -205,14 +205,14 @@ int usb_function_activate(struct usb_function *function) | |||
| 205 | * usb_interface_id() is called from usb_function.bind() callbacks to | 205 | * usb_interface_id() is called from usb_function.bind() callbacks to |
| 206 | * allocate new interface IDs. The function driver will then store that | 206 | * allocate new interface IDs. The function driver will then store that |
| 207 | * ID in interface, association, CDC union, and other descriptors. It | 207 | * ID in interface, association, CDC union, and other descriptors. It |
| 208 | * will also handle any control requests targetted at that interface, | 208 | * will also handle any control requests targeted at that interface, |
| 209 | * particularly changing its altsetting via set_alt(). There may | 209 | * particularly changing its altsetting via set_alt(). There may |
| 210 | * also be class-specific or vendor-specific requests to handle. | 210 | * also be class-specific or vendor-specific requests to handle. |
| 211 | * | 211 | * |
| 212 | * All interface identifier should be allocated using this routine, to | 212 | * All interface identifier should be allocated using this routine, to |
| 213 | * ensure that for example different functions don't wrongly assign | 213 | * ensure that for example different functions don't wrongly assign |
| 214 | * different meanings to the same identifier. Note that since interface | 214 | * different meanings to the same identifier. Note that since interface |
| 215 | * identifers are configuration-specific, functions used in more than | 215 | * identifiers are configuration-specific, functions used in more than |
| 216 | * one configuration (or more than once in a given configuration) need | 216 | * one configuration (or more than once in a given configuration) need |
| 217 | * multiple versions of the relevant descriptors. | 217 | * multiple versions of the relevant descriptors. |
| 218 | * | 218 | * |
diff --git a/drivers/usb/gadget/f_audio.c b/drivers/usb/gadget/f_audio.c index 00975ed903d1..0111f8a9cf7f 100644 --- a/drivers/usb/gadget/f_audio.c +++ b/drivers/usb/gadget/f_audio.c | |||
| @@ -706,6 +706,7 @@ f_audio_unbind(struct usb_configuration *c, struct usb_function *f) | |||
| 706 | struct f_audio *audio = func_to_audio(f); | 706 | struct f_audio *audio = func_to_audio(f); |
| 707 | 707 | ||
| 708 | usb_free_descriptors(f->descriptors); | 708 | usb_free_descriptors(f->descriptors); |
| 709 | usb_free_descriptors(f->hs_descriptors); | ||
| 709 | kfree(audio); | 710 | kfree(audio); |
| 710 | } | 711 | } |
| 711 | 712 | ||
| @@ -742,7 +743,7 @@ int __init control_selector_init(struct f_audio *audio) | |||
| 742 | } | 743 | } |
| 743 | 744 | ||
| 744 | /** | 745 | /** |
| 745 | * audio_bind_config - add USB audio fucntion to a configuration | 746 | * audio_bind_config - add USB audio function to a configuration |
| 746 | * @c: the configuration to supcard the USB audio function | 747 | * @c: the configuration to supcard the USB audio function |
| 747 | * Context: single threaded during gadget setup | 748 | * Context: single threaded during gadget setup |
| 748 | * | 749 | * |
diff --git a/drivers/usb/gadget/f_eem.c b/drivers/usb/gadget/f_eem.c index 95dd4662d6a8..b3c304290150 100644 --- a/drivers/usb/gadget/f_eem.c +++ b/drivers/usb/gadget/f_eem.c | |||
| @@ -314,6 +314,9 @@ eem_unbind(struct usb_configuration *c, struct usb_function *f) | |||
| 314 | 314 | ||
| 315 | static void eem_cmd_complete(struct usb_ep *ep, struct usb_request *req) | 315 | static void eem_cmd_complete(struct usb_ep *ep, struct usb_request *req) |
| 316 | { | 316 | { |
| 317 | struct sk_buff *skb = (struct sk_buff *)req->context; | ||
| 318 | |||
| 319 | dev_kfree_skb_any(skb); | ||
| 317 | } | 320 | } |
| 318 | 321 | ||
| 319 | /* | 322 | /* |
| @@ -428,10 +431,11 @@ static int eem_unwrap(struct gether *port, | |||
| 428 | skb_trim(skb2, len); | 431 | skb_trim(skb2, len); |
| 429 | put_unaligned_le16(BIT(15) | BIT(11) | len, | 432 | put_unaligned_le16(BIT(15) | BIT(11) | len, |
| 430 | skb_push(skb2, 2)); | 433 | skb_push(skb2, 2)); |
| 431 | skb_copy_bits(skb, 0, req->buf, skb->len); | 434 | skb_copy_bits(skb2, 0, req->buf, skb2->len); |
| 432 | req->length = skb->len; | 435 | req->length = skb2->len; |
| 433 | req->complete = eem_cmd_complete; | 436 | req->complete = eem_cmd_complete; |
| 434 | req->zero = 1; | 437 | req->zero = 1; |
| 438 | req->context = skb2; | ||
| 435 | if (usb_ep_queue(port->in_ep, req, GFP_ATOMIC)) | 439 | if (usb_ep_queue(port->in_ep, req, GFP_ATOMIC)) |
| 436 | DBG(cdev, "echo response queue fail\n"); | 440 | DBG(cdev, "echo response queue fail\n"); |
| 437 | break; | 441 | break; |
diff --git a/drivers/usb/gadget/f_ncm.c b/drivers/usb/gadget/f_ncm.c index 130eee678c8b..86902a60bcdb 100644 --- a/drivers/usb/gadget/f_ncm.c +++ b/drivers/usb/gadget/f_ncm.c | |||
| @@ -111,7 +111,7 @@ static inline unsigned ncm_bitrate(struct usb_gadget *g) | |||
| 111 | #define NTB_OUT_SIZE 16384 | 111 | #define NTB_OUT_SIZE 16384 |
| 112 | 112 | ||
| 113 | /* | 113 | /* |
| 114 | * skbs of size less than that will not be alligned | 114 | * skbs of size less than that will not be aligned |
| 115 | * to NCM's dwNtbInMaxSize to save bus bandwidth | 115 | * to NCM's dwNtbInMaxSize to save bus bandwidth |
| 116 | */ | 116 | */ |
| 117 | 117 | ||
diff --git a/drivers/usb/gadget/fsl_qe_udc.c b/drivers/usb/gadget/fsl_qe_udc.c index aee7e3c53c38..36613b37c504 100644 --- a/drivers/usb/gadget/fsl_qe_udc.c +++ b/drivers/usb/gadget/fsl_qe_udc.c | |||
| @@ -1148,6 +1148,12 @@ static int qe_ep_tx(struct qe_ep *ep, struct qe_frame *frame) | |||
| 1148 | static int txcomplete(struct qe_ep *ep, unsigned char restart) | 1148 | static int txcomplete(struct qe_ep *ep, unsigned char restart) |
| 1149 | { | 1149 | { |
| 1150 | if (ep->tx_req != NULL) { | 1150 | if (ep->tx_req != NULL) { |
| 1151 | struct qe_req *req = ep->tx_req; | ||
| 1152 | unsigned zlp = 0, last_len = 0; | ||
| 1153 | |||
| 1154 | last_len = min_t(unsigned, req->req.length - ep->sent, | ||
| 1155 | ep->ep.maxpacket); | ||
| 1156 | |||
| 1151 | if (!restart) { | 1157 | if (!restart) { |
| 1152 | int asent = ep->last; | 1158 | int asent = ep->last; |
| 1153 | ep->sent += asent; | 1159 | ep->sent += asent; |
| @@ -1156,9 +1162,18 @@ static int txcomplete(struct qe_ep *ep, unsigned char restart) | |||
| 1156 | ep->last = 0; | 1162 | ep->last = 0; |
| 1157 | } | 1163 | } |
| 1158 | 1164 | ||
| 1165 | /* zlp needed when req->re.zero is set */ | ||
| 1166 | if (req->req.zero) { | ||
| 1167 | if (last_len == 0 || | ||
| 1168 | (req->req.length % ep->ep.maxpacket) != 0) | ||
| 1169 | zlp = 0; | ||
| 1170 | else | ||
| 1171 | zlp = 1; | ||
| 1172 | } else | ||
| 1173 | zlp = 0; | ||
| 1174 | |||
| 1159 | /* a request already were transmitted completely */ | 1175 | /* a request already were transmitted completely */ |
| 1160 | if ((ep->tx_req->req.length - ep->sent) <= 0) { | 1176 | if (((ep->tx_req->req.length - ep->sent) <= 0) && !zlp) { |
| 1161 | ep->tx_req->req.actual = (unsigned int)ep->sent; | ||
| 1162 | done(ep, ep->tx_req, 0); | 1177 | done(ep, ep->tx_req, 0); |
| 1163 | ep->tx_req = NULL; | 1178 | ep->tx_req = NULL; |
| 1164 | ep->last = 0; | 1179 | ep->last = 0; |
| @@ -1191,6 +1206,7 @@ static int qe_usb_senddata(struct qe_ep *ep, struct qe_frame *frame) | |||
| 1191 | buf = (u8 *)ep->tx_req->req.buf + ep->sent; | 1206 | buf = (u8 *)ep->tx_req->req.buf + ep->sent; |
| 1192 | if (buf && size) { | 1207 | if (buf && size) { |
| 1193 | ep->last = size; | 1208 | ep->last = size; |
| 1209 | ep->tx_req->req.actual += size; | ||
| 1194 | frame_set_data(frame, buf); | 1210 | frame_set_data(frame, buf); |
| 1195 | frame_set_length(frame, size); | 1211 | frame_set_length(frame, size); |
| 1196 | frame_set_status(frame, FRAME_OK); | 1212 | frame_set_status(frame, FRAME_OK); |
diff --git a/drivers/usb/gadget/fsl_qe_udc.h b/drivers/usb/gadget/fsl_qe_udc.h index bea5b827bebe..e35e24fd64bb 100644 --- a/drivers/usb/gadget/fsl_qe_udc.h +++ b/drivers/usb/gadget/fsl_qe_udc.h | |||
| @@ -208,14 +208,14 @@ struct qe_frame{ | |||
| 208 | /* Frame status field */ | 208 | /* Frame status field */ |
| 209 | /* Receive side */ | 209 | /* Receive side */ |
| 210 | #define FRAME_OK 0x00000000 /* Frame tranmitted or received OK */ | 210 | #define FRAME_OK 0x00000000 /* Frame tranmitted or received OK */ |
| 211 | #define FRAME_ERROR 0x80000000 /* Error occured on frame */ | 211 | #define FRAME_ERROR 0x80000000 /* Error occurred on frame */ |
| 212 | #define START_FRAME_LOST 0x40000000 /* START_FRAME_LOST */ | 212 | #define START_FRAME_LOST 0x40000000 /* START_FRAME_LOST */ |
| 213 | #define END_FRAME_LOST 0x20000000 /* END_FRAME_LOST */ | 213 | #define END_FRAME_LOST 0x20000000 /* END_FRAME_LOST */ |
| 214 | #define RX_ER_NONOCT 0x10000000 /* Rx Non Octet Aligned Packet */ | 214 | #define RX_ER_NONOCT 0x10000000 /* Rx Non Octet Aligned Packet */ |
| 215 | #define RX_ER_BITSTUFF 0x08000000 /* Frame Aborted --Received packet | 215 | #define RX_ER_BITSTUFF 0x08000000 /* Frame Aborted --Received packet |
| 216 | with bit stuff error */ | 216 | with bit stuff error */ |
| 217 | #define RX_ER_CRC 0x04000000 /* Received packet with CRC error */ | 217 | #define RX_ER_CRC 0x04000000 /* Received packet with CRC error */ |
| 218 | #define RX_ER_OVERUN 0x02000000 /* Over-run occured on reception */ | 218 | #define RX_ER_OVERUN 0x02000000 /* Over-run occurred on reception */ |
| 219 | #define RX_ER_PID 0x01000000 /* Wrong PID received */ | 219 | #define RX_ER_PID 0x01000000 /* Wrong PID received */ |
| 220 | /* Tranmit side */ | 220 | /* Tranmit side */ |
| 221 | #define TX_ER_NAK 0x00800000 /* Received NAK handshake */ | 221 | #define TX_ER_NAK 0x00800000 /* Received NAK handshake */ |
| @@ -379,7 +379,7 @@ struct qe_udc { | |||
| 379 | #define T_LSP 0x01000000 /* Low-speed transaction */ | 379 | #define T_LSP 0x01000000 /* Low-speed transaction */ |
| 380 | #define T_PID 0x00c00000 /* packet id */ | 380 | #define T_PID 0x00c00000 /* packet id */ |
| 381 | #define T_NAK 0x00100000 /* No ack. */ | 381 | #define T_NAK 0x00100000 /* No ack. */ |
| 382 | #define T_STAL 0x00080000 /* Stall recieved */ | 382 | #define T_STAL 0x00080000 /* Stall received */ |
| 383 | #define T_TO 0x00040000 /* time out */ | 383 | #define T_TO 0x00040000 /* time out */ |
| 384 | #define T_UN 0x00020000 /* underrun */ | 384 | #define T_UN 0x00020000 /* underrun */ |
| 385 | 385 | ||
diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c index 912cb8e63fe3..07499c1cdcc4 100644 --- a/drivers/usb/gadget/fsl_udc_core.c +++ b/drivers/usb/gadget/fsl_udc_core.c | |||
| @@ -464,7 +464,7 @@ static int fsl_ep_enable(struct usb_ep *_ep, | |||
| 464 | 464 | ||
| 465 | max = le16_to_cpu(desc->wMaxPacketSize); | 465 | max = le16_to_cpu(desc->wMaxPacketSize); |
| 466 | 466 | ||
| 467 | /* Disable automatic zlp generation. Driver is reponsible to indicate | 467 | /* Disable automatic zlp generation. Driver is responsible to indicate |
| 468 | * explicitly through req->req.zero. This is needed to enable multi-td | 468 | * explicitly through req->req.zero. This is needed to enable multi-td |
| 469 | * request. */ | 469 | * request. */ |
| 470 | zlt = 1; | 470 | zlt = 1; |
| @@ -648,7 +648,7 @@ static void fsl_queue_td(struct fsl_ep *ep, struct fsl_req *req) | |||
| 648 | | EP_QUEUE_HEAD_STATUS_HALT)); | 648 | | EP_QUEUE_HEAD_STATUS_HALT)); |
| 649 | dQH->size_ioc_int_sts &= temp; | 649 | dQH->size_ioc_int_sts &= temp; |
| 650 | 650 | ||
| 651 | /* Ensure that updates to the QH will occure before priming. */ | 651 | /* Ensure that updates to the QH will occur before priming. */ |
| 652 | wmb(); | 652 | wmb(); |
| 653 | 653 | ||
| 654 | /* Prime endpoint by writing 1 to ENDPTPRIME */ | 654 | /* Prime endpoint by writing 1 to ENDPTPRIME */ |
| @@ -1459,7 +1459,7 @@ static int process_ep_req(struct fsl_udc *udc, int pipe, | |||
| 1459 | status = -EILSEQ; | 1459 | status = -EILSEQ; |
| 1460 | break; | 1460 | break; |
| 1461 | } else | 1461 | } else |
| 1462 | ERR("Unknown error has occured (0x%x)!\n", | 1462 | ERR("Unknown error has occurred (0x%x)!\n", |
| 1463 | errors); | 1463 | errors); |
| 1464 | 1464 | ||
| 1465 | } else if (le32_to_cpu(curr_td->size_ioc_sts) | 1465 | } else if (le32_to_cpu(curr_td->size_ioc_sts) |
diff --git a/drivers/usb/gadget/fsl_usb2_udc.h b/drivers/usb/gadget/fsl_usb2_udc.h index 20aeceed48c7..e88cce5c2c0d 100644 --- a/drivers/usb/gadget/fsl_usb2_udc.h +++ b/drivers/usb/gadget/fsl_usb2_udc.h | |||
| @@ -15,7 +15,7 @@ struct usb_dr_device { | |||
| 15 | u8 res1[256]; | 15 | u8 res1[256]; |
| 16 | u16 caplength; /* Capability Register Length */ | 16 | u16 caplength; /* Capability Register Length */ |
| 17 | u16 hciversion; /* Host Controller Interface Version */ | 17 | u16 hciversion; /* Host Controller Interface Version */ |
| 18 | u32 hcsparams; /* Host Controller Structual Parameters */ | 18 | u32 hcsparams; /* Host Controller Structural Parameters */ |
| 19 | u32 hccparams; /* Host Controller Capability Parameters */ | 19 | u32 hccparams; /* Host Controller Capability Parameters */ |
| 20 | u8 res2[20]; | 20 | u8 res2[20]; |
| 21 | u32 dciversion; /* Device Controller Interface Version */ | 21 | u32 dciversion; /* Device Controller Interface Version */ |
| @@ -52,7 +52,7 @@ struct usb_dr_host { | |||
| 52 | u8 res1[256]; | 52 | u8 res1[256]; |
| 53 | u16 caplength; /* Capability Register Length */ | 53 | u16 caplength; /* Capability Register Length */ |
| 54 | u16 hciversion; /* Host Controller Interface Version */ | 54 | u16 hciversion; /* Host Controller Interface Version */ |
| 55 | u32 hcsparams; /* Host Controller Structual Parameters */ | 55 | u32 hcsparams; /* Host Controller Structural Parameters */ |
| 56 | u32 hccparams; /* Host Controller Capability Parameters */ | 56 | u32 hccparams; /* Host Controller Capability Parameters */ |
| 57 | u8 res2[20]; | 57 | u8 res2[20]; |
| 58 | u32 dciversion; /* Device Controller Interface Version */ | 58 | u32 dciversion; /* Device Controller Interface Version */ |
diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c index 0ab7e141d494..47b86b99d449 100644 --- a/drivers/usb/gadget/gmidi.c +++ b/drivers/usb/gadget/gmidi.c | |||
| @@ -67,7 +67,7 @@ MODULE_PARM_DESC(index, "Index value for the USB MIDI Gadget adapter."); | |||
| 67 | module_param(id, charp, 0444); | 67 | module_param(id, charp, 0444); |
| 68 | MODULE_PARM_DESC(id, "ID string for the USB MIDI Gadget adapter."); | 68 | MODULE_PARM_DESC(id, "ID string for the USB MIDI Gadget adapter."); |
| 69 | 69 | ||
| 70 | /* Some systems will want different product identifers published in the | 70 | /* Some systems will want different product identifiers published in the |
| 71 | * device descriptor, either numbers or strings or both. These string | 71 | * device descriptor, either numbers or strings or both. These string |
| 72 | * parameters are in UTF-8 (superset of ASCII's 7 bit characters). | 72 | * parameters are in UTF-8 (superset of ASCII's 7 bit characters). |
| 73 | */ | 73 | */ |
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c index 3ed73f49cf18..a01383f71f38 100644 --- a/drivers/usb/gadget/inode.c +++ b/drivers/usb/gadget/inode.c | |||
| @@ -386,8 +386,10 @@ ep_read (struct file *fd, char __user *buf, size_t len, loff_t *ptr) | |||
| 386 | 386 | ||
| 387 | /* halt any endpoint by doing a "wrong direction" i/o call */ | 387 | /* halt any endpoint by doing a "wrong direction" i/o call */ |
| 388 | if (usb_endpoint_dir_in(&data->desc)) { | 388 | if (usb_endpoint_dir_in(&data->desc)) { |
| 389 | if (usb_endpoint_xfer_isoc(&data->desc)) | 389 | if (usb_endpoint_xfer_isoc(&data->desc)) { |
| 390 | mutex_unlock(&data->lock); | ||
| 390 | return -EINVAL; | 391 | return -EINVAL; |
| 392 | } | ||
| 391 | DBG (data->dev, "%s halt\n", data->name); | 393 | DBG (data->dev, "%s halt\n", data->name); |
| 392 | spin_lock_irq (&data->dev->lock); | 394 | spin_lock_irq (&data->dev->lock); |
| 393 | if (likely (data->ep != NULL)) | 395 | if (likely (data->ep != NULL)) |
diff --git a/drivers/usb/gadget/langwell_udc.c b/drivers/usb/gadget/langwell_udc.c index 1eca8b47ce3c..9cee88a43a73 100644 --- a/drivers/usb/gadget/langwell_udc.c +++ b/drivers/usb/gadget/langwell_udc.c | |||
| @@ -642,7 +642,7 @@ static int queue_dtd(struct langwell_ep *ep, struct langwell_request *req) | |||
| 642 | dqh->dtd_status &= dtd_status; | 642 | dqh->dtd_status &= dtd_status; |
| 643 | dev_vdbg(&dev->pdev->dev, "dqh->dtd_status = 0x%x\n", dqh->dtd_status); | 643 | dev_vdbg(&dev->pdev->dev, "dqh->dtd_status = 0x%x\n", dqh->dtd_status); |
| 644 | 644 | ||
| 645 | /* ensure that updates to the dQH will occure before priming */ | 645 | /* ensure that updates to the dQH will occur before priming */ |
| 646 | wmb(); | 646 | wmb(); |
| 647 | 647 | ||
| 648 | /* write 1 to endptprime register to PRIME endpoint */ | 648 | /* write 1 to endptprime register to PRIME endpoint */ |
diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c index d5468a7f38e0..b62b2640deb0 100644 --- a/drivers/usb/gadget/mv_udc_core.c +++ b/drivers/usb/gadget/mv_udc_core.c | |||
| @@ -325,7 +325,7 @@ static int queue_dtd(struct mv_ep *ep, struct mv_req *req) | |||
| 325 | 325 | ||
| 326 | /* | 326 | /* |
| 327 | * Ensure that updates to the QH will | 327 | * Ensure that updates to the QH will |
| 328 | * occure before priming. | 328 | * occur before priming. |
| 329 | */ | 329 | */ |
| 330 | wmb(); | 330 | wmb(); |
| 331 | 331 | ||
| @@ -338,7 +338,7 @@ static int queue_dtd(struct mv_ep *ep, struct mv_req *req) | |||
| 338 | & EP_QUEUE_HEAD_NEXT_POINTER_MASK;; | 338 | & EP_QUEUE_HEAD_NEXT_POINTER_MASK;; |
| 339 | dqh->size_ioc_int_sts = 0; | 339 | dqh->size_ioc_int_sts = 0; |
| 340 | 340 | ||
| 341 | /* Ensure that updates to the QH will occure before priming. */ | 341 | /* Ensure that updates to the QH will occur before priming. */ |
| 342 | wmb(); | 342 | wmb(); |
| 343 | 343 | ||
| 344 | /* Prime the Endpoint */ | 344 | /* Prime the Endpoint */ |
| @@ -1845,7 +1845,7 @@ static irqreturn_t mv_udc_irq(int irq, void *dev) | |||
| 1845 | return IRQ_NONE; | 1845 | return IRQ_NONE; |
| 1846 | } | 1846 | } |
| 1847 | 1847 | ||
| 1848 | /* Clear all the interrupts occured */ | 1848 | /* Clear all the interrupts occurred */ |
| 1849 | writel(status, &udc->op_regs->usbsts); | 1849 | writel(status, &udc->op_regs->usbsts); |
| 1850 | 1850 | ||
| 1851 | if (status & USBSTS_ERR) | 1851 | if (status & USBSTS_ERR) |
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c index d09155b25d73..24696f7fa6a9 100644 --- a/drivers/usb/gadget/net2280.c +++ b/drivers/usb/gadget/net2280.c | |||
| @@ -117,7 +117,7 @@ module_param (fifo_mode, ushort, 0644); | |||
| 117 | 117 | ||
| 118 | /* enable_suspend -- When enabled, the driver will respond to | 118 | /* enable_suspend -- When enabled, the driver will respond to |
| 119 | * USB suspend requests by powering down the NET2280. Otherwise, | 119 | * USB suspend requests by powering down the NET2280. Otherwise, |
| 120 | * USB suspend requests will be ignored. This is acceptible for | 120 | * USB suspend requests will be ignored. This is acceptable for |
| 121 | * self-powered devices | 121 | * self-powered devices |
| 122 | */ | 122 | */ |
| 123 | static int enable_suspend = 0; | 123 | static int enable_suspend = 0; |
diff --git a/drivers/usb/gadget/nokia.c b/drivers/usb/gadget/nokia.c index b5364f9d7cd2..55ca63ad3506 100644 --- a/drivers/usb/gadget/nokia.c +++ b/drivers/usb/gadget/nokia.c | |||
| @@ -203,7 +203,7 @@ static int __init nokia_bind(struct usb_composite_dev *cdev) | |||
| 203 | goto err_usb; | 203 | goto err_usb; |
| 204 | } | 204 | } |
| 205 | 205 | ||
| 206 | /* finaly register the configuration */ | 206 | /* finally register the configuration */ |
| 207 | status = usb_add_config(cdev, &nokia_config_500ma_driver, | 207 | status = usb_add_config(cdev, &nokia_config_500ma_driver, |
| 208 | nokia_bind_config); | 208 | nokia_bind_config); |
| 209 | if (status < 0) | 209 | if (status < 0) |
diff --git a/drivers/usb/gadget/pch_udc.c b/drivers/usb/gadget/pch_udc.c index 3e4b35e50c24..68dbcc3e4cc2 100644 --- a/drivers/usb/gadget/pch_udc.c +++ b/drivers/usb/gadget/pch_udc.c | |||
| @@ -1608,7 +1608,7 @@ static int pch_udc_pcd_queue(struct usb_ep *usbep, struct usb_request *usbreq, | |||
| 1608 | return -EINVAL; | 1608 | return -EINVAL; |
| 1609 | if (!dev->driver || (dev->gadget.speed == USB_SPEED_UNKNOWN)) | 1609 | if (!dev->driver || (dev->gadget.speed == USB_SPEED_UNKNOWN)) |
| 1610 | return -ESHUTDOWN; | 1610 | return -ESHUTDOWN; |
| 1611 | spin_lock_irqsave(&ep->dev->lock, iflags); | 1611 | spin_lock_irqsave(&dev->lock, iflags); |
| 1612 | /* map the buffer for dma */ | 1612 | /* map the buffer for dma */ |
| 1613 | if (usbreq->length && | 1613 | if (usbreq->length && |
| 1614 | ((usbreq->dma == DMA_ADDR_INVALID) || !usbreq->dma)) { | 1614 | ((usbreq->dma == DMA_ADDR_INVALID) || !usbreq->dma)) { |
| @@ -1625,8 +1625,10 @@ static int pch_udc_pcd_queue(struct usb_ep *usbep, struct usb_request *usbreq, | |||
| 1625 | DMA_FROM_DEVICE); | 1625 | DMA_FROM_DEVICE); |
| 1626 | } else { | 1626 | } else { |
| 1627 | req->buf = kzalloc(usbreq->length, GFP_ATOMIC); | 1627 | req->buf = kzalloc(usbreq->length, GFP_ATOMIC); |
| 1628 | if (!req->buf) | 1628 | if (!req->buf) { |
| 1629 | return -ENOMEM; | 1629 | retval = -ENOMEM; |
| 1630 | goto probe_end; | ||
| 1631 | } | ||
| 1630 | if (ep->in) { | 1632 | if (ep->in) { |
| 1631 | memcpy(req->buf, usbreq->buf, usbreq->length); | 1633 | memcpy(req->buf, usbreq->buf, usbreq->length); |
| 1632 | req->dma = dma_map_single(&dev->pdev->dev, | 1634 | req->dma = dma_map_single(&dev->pdev->dev, |
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index 12ff6cffedc9..c3f2bd42bd5a 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c | |||
| @@ -126,7 +126,7 @@ static struct printer_dev usb_printer_gadget; | |||
| 126 | #define PRINTER_VENDOR_NUM 0x0525 /* NetChip */ | 126 | #define PRINTER_VENDOR_NUM 0x0525 /* NetChip */ |
| 127 | #define PRINTER_PRODUCT_NUM 0xa4a8 /* Linux-USB Printer Gadget */ | 127 | #define PRINTER_PRODUCT_NUM 0xa4a8 /* Linux-USB Printer Gadget */ |
| 128 | 128 | ||
| 129 | /* Some systems will want different product identifers published in the | 129 | /* Some systems will want different product identifiers published in the |
| 130 | * device descriptor, either numbers or strings or both. These string | 130 | * device descriptor, either numbers or strings or both. These string |
| 131 | * parameters are in UTF-8 (superset of ASCII's 7 bit characters). | 131 | * parameters are in UTF-8 (superset of ASCII's 7 bit characters). |
| 132 | */ | 132 | */ |
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c index b37f92cb71bc..444b60aa15e9 100644 --- a/drivers/usb/gadget/pxa25x_udc.c +++ b/drivers/usb/gadget/pxa25x_udc.c | |||
| @@ -139,24 +139,6 @@ static const char ep0name [] = "ep0"; | |||
| 139 | static void pxa25x_ep_fifo_flush (struct usb_ep *ep); | 139 | static void pxa25x_ep_fifo_flush (struct usb_ep *ep); |
| 140 | static void nuke (struct pxa25x_ep *, int status); | 140 | static void nuke (struct pxa25x_ep *, int status); |
| 141 | 141 | ||
| 142 | /* one GPIO should be used to detect VBUS from the host */ | ||
| 143 | static int is_vbus_present(void) | ||
| 144 | { | ||
| 145 | struct pxa2xx_udc_mach_info *mach = the_controller->mach; | ||
| 146 | |||
| 147 | if (gpio_is_valid(mach->gpio_vbus)) { | ||
| 148 | int value = gpio_get_value(mach->gpio_vbus); | ||
| 149 | |||
| 150 | if (mach->gpio_vbus_inverted) | ||
| 151 | return !value; | ||
| 152 | else | ||
| 153 | return !!value; | ||
| 154 | } | ||
| 155 | if (mach->udc_is_connected) | ||
| 156 | return mach->udc_is_connected(); | ||
| 157 | return 1; | ||
| 158 | } | ||
| 159 | |||
| 160 | /* one GPIO should control a D+ pullup, so host sees this device (or not) */ | 142 | /* one GPIO should control a D+ pullup, so host sees this device (or not) */ |
| 161 | static void pullup_off(void) | 143 | static void pullup_off(void) |
| 162 | { | 144 | { |
| @@ -1055,7 +1037,7 @@ udc_seq_show(struct seq_file *m, void *_d) | |||
| 1055 | "%s version: %s\nGadget driver: %s\nHost %s\n\n", | 1037 | "%s version: %s\nGadget driver: %s\nHost %s\n\n", |
| 1056 | driver_name, DRIVER_VERSION SIZE_STR "(pio)", | 1038 | driver_name, DRIVER_VERSION SIZE_STR "(pio)", |
| 1057 | dev->driver ? dev->driver->driver.name : "(none)", | 1039 | dev->driver ? dev->driver->driver.name : "(none)", |
| 1058 | is_vbus_present() ? "full speed" : "disconnected"); | 1040 | dev->gadget.speed == USB_SPEED_FULL ? "full speed" : "disconnected"); |
| 1059 | 1041 | ||
| 1060 | /* registers for device and ep0 */ | 1042 | /* registers for device and ep0 */ |
| 1061 | seq_printf(m, | 1043 | seq_printf(m, |
| @@ -1094,7 +1076,7 @@ udc_seq_show(struct seq_file *m, void *_d) | |||
| 1094 | (tmp & UDCCFR_ACM) ? " acm" : ""); | 1076 | (tmp & UDCCFR_ACM) ? " acm" : ""); |
| 1095 | } | 1077 | } |
| 1096 | 1078 | ||
| 1097 | if (!is_vbus_present() || !dev->driver) | 1079 | if (dev->gadget.speed != USB_SPEED_FULL || !dev->driver) |
| 1098 | goto done; | 1080 | goto done; |
| 1099 | 1081 | ||
| 1100 | seq_printf(m, "ep0 IN %lu/%lu, OUT %lu/%lu\nirqs %lu\n\n", | 1082 | seq_printf(m, "ep0 IN %lu/%lu, OUT %lu/%lu\nirqs %lu\n\n", |
| @@ -1435,14 +1417,6 @@ lubbock_vbus_irq(int irq, void *_dev) | |||
| 1435 | 1417 | ||
| 1436 | #endif | 1418 | #endif |
| 1437 | 1419 | ||
| 1438 | static irqreturn_t udc_vbus_irq(int irq, void *_dev) | ||
| 1439 | { | ||
| 1440 | struct pxa25x_udc *dev = _dev; | ||
| 1441 | |||
| 1442 | pxa25x_udc_vbus_session(&dev->gadget, is_vbus_present()); | ||
| 1443 | return IRQ_HANDLED; | ||
| 1444 | } | ||
| 1445 | |||
| 1446 | 1420 | ||
| 1447 | /*-------------------------------------------------------------------------*/ | 1421 | /*-------------------------------------------------------------------------*/ |
| 1448 | 1422 | ||
| @@ -1766,12 +1740,9 @@ pxa25x_udc_irq(int irq, void *_dev) | |||
| 1766 | if (unlikely(udccr & UDCCR_SUSIR)) { | 1740 | if (unlikely(udccr & UDCCR_SUSIR)) { |
| 1767 | udc_ack_int_UDCCR(UDCCR_SUSIR); | 1741 | udc_ack_int_UDCCR(UDCCR_SUSIR); |
| 1768 | handled = 1; | 1742 | handled = 1; |
| 1769 | DBG(DBG_VERBOSE, "USB suspend%s\n", is_vbus_present() | 1743 | DBG(DBG_VERBOSE, "USB suspend\n"); |
| 1770 | ? "" : "+disconnect"); | ||
| 1771 | 1744 | ||
| 1772 | if (!is_vbus_present()) | 1745 | if (dev->gadget.speed != USB_SPEED_UNKNOWN |
| 1773 | stop_activity(dev, dev->driver); | ||
| 1774 | else if (dev->gadget.speed != USB_SPEED_UNKNOWN | ||
| 1775 | && dev->driver | 1746 | && dev->driver |
| 1776 | && dev->driver->suspend) | 1747 | && dev->driver->suspend) |
| 1777 | dev->driver->suspend(&dev->gadget); | 1748 | dev->driver->suspend(&dev->gadget); |
| @@ -1786,8 +1757,7 @@ pxa25x_udc_irq(int irq, void *_dev) | |||
| 1786 | 1757 | ||
| 1787 | if (dev->gadget.speed != USB_SPEED_UNKNOWN | 1758 | if (dev->gadget.speed != USB_SPEED_UNKNOWN |
| 1788 | && dev->driver | 1759 | && dev->driver |
| 1789 | && dev->driver->resume | 1760 | && dev->driver->resume) |
| 1790 | && is_vbus_present()) | ||
| 1791 | dev->driver->resume(&dev->gadget); | 1761 | dev->driver->resume(&dev->gadget); |
| 1792 | } | 1762 | } |
| 1793 | 1763 | ||
| @@ -2137,7 +2107,7 @@ static struct pxa25x_udc memory = { | |||
| 2137 | static int __init pxa25x_udc_probe(struct platform_device *pdev) | 2107 | static int __init pxa25x_udc_probe(struct platform_device *pdev) |
| 2138 | { | 2108 | { |
| 2139 | struct pxa25x_udc *dev = &memory; | 2109 | struct pxa25x_udc *dev = &memory; |
| 2140 | int retval, vbus_irq, irq; | 2110 | int retval, irq; |
| 2141 | u32 chiprev; | 2111 | u32 chiprev; |
| 2142 | 2112 | ||
| 2143 | /* insist on Intel/ARM/XScale */ | 2113 | /* insist on Intel/ARM/XScale */ |
| @@ -2199,19 +2169,6 @@ static int __init pxa25x_udc_probe(struct platform_device *pdev) | |||
| 2199 | 2169 | ||
| 2200 | dev->transceiver = otg_get_transceiver(); | 2170 | dev->transceiver = otg_get_transceiver(); |
| 2201 | 2171 | ||
| 2202 | if (gpio_is_valid(dev->mach->gpio_vbus)) { | ||
| 2203 | if ((retval = gpio_request(dev->mach->gpio_vbus, | ||
| 2204 | "pxa25x_udc GPIO VBUS"))) { | ||
| 2205 | dev_dbg(&pdev->dev, | ||
| 2206 | "can't get vbus gpio %d, err: %d\n", | ||
| 2207 | dev->mach->gpio_vbus, retval); | ||
| 2208 | goto err_gpio_vbus; | ||
| 2209 | } | ||
| 2210 | gpio_direction_input(dev->mach->gpio_vbus); | ||
| 2211 | vbus_irq = gpio_to_irq(dev->mach->gpio_vbus); | ||
| 2212 | } else | ||
| 2213 | vbus_irq = 0; | ||
| 2214 | |||
| 2215 | if (gpio_is_valid(dev->mach->gpio_pullup)) { | 2172 | if (gpio_is_valid(dev->mach->gpio_pullup)) { |
| 2216 | if ((retval = gpio_request(dev->mach->gpio_pullup, | 2173 | if ((retval = gpio_request(dev->mach->gpio_pullup, |
| 2217 | "pca25x_udc GPIO PULLUP"))) { | 2174 | "pca25x_udc GPIO PULLUP"))) { |
| @@ -2237,7 +2194,7 @@ static int __init pxa25x_udc_probe(struct platform_device *pdev) | |||
| 2237 | udc_disable(dev); | 2194 | udc_disable(dev); |
| 2238 | udc_reinit(dev); | 2195 | udc_reinit(dev); |
| 2239 | 2196 | ||
| 2240 | dev->vbus = !!is_vbus_present(); | 2197 | dev->vbus = 0; |
| 2241 | 2198 | ||
| 2242 | /* irq setup after old hardware state is cleaned up */ | 2199 | /* irq setup after old hardware state is cleaned up */ |
| 2243 | retval = request_irq(irq, pxa25x_udc_irq, | 2200 | retval = request_irq(irq, pxa25x_udc_irq, |
| @@ -2273,22 +2230,10 @@ lubbock_fail0: | |||
| 2273 | } | 2230 | } |
| 2274 | } else | 2231 | } else |
| 2275 | #endif | 2232 | #endif |
| 2276 | if (vbus_irq) { | ||
| 2277 | retval = request_irq(vbus_irq, udc_vbus_irq, | ||
| 2278 | IRQF_DISABLED | IRQF_SAMPLE_RANDOM | | ||
| 2279 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, | ||
| 2280 | driver_name, dev); | ||
| 2281 | if (retval != 0) { | ||
| 2282 | pr_err("%s: can't get irq %i, err %d\n", | ||
| 2283 | driver_name, vbus_irq, retval); | ||
| 2284 | goto err_vbus_irq; | ||
| 2285 | } | ||
| 2286 | } | ||
| 2287 | create_debug_files(dev); | 2233 | create_debug_files(dev); |
| 2288 | 2234 | ||
| 2289 | return 0; | 2235 | return 0; |
| 2290 | 2236 | ||
| 2291 | err_vbus_irq: | ||
| 2292 | #ifdef CONFIG_ARCH_LUBBOCK | 2237 | #ifdef CONFIG_ARCH_LUBBOCK |
| 2293 | free_irq(LUBBOCK_USB_DISC_IRQ, dev); | 2238 | free_irq(LUBBOCK_USB_DISC_IRQ, dev); |
| 2294 | err_irq_lub: | 2239 | err_irq_lub: |
| @@ -2298,9 +2243,6 @@ lubbock_fail0: | |||
| 2298 | if (gpio_is_valid(dev->mach->gpio_pullup)) | 2243 | if (gpio_is_valid(dev->mach->gpio_pullup)) |
| 2299 | gpio_free(dev->mach->gpio_pullup); | 2244 | gpio_free(dev->mach->gpio_pullup); |
| 2300 | err_gpio_pullup: | 2245 | err_gpio_pullup: |
| 2301 | if (gpio_is_valid(dev->mach->gpio_vbus)) | ||
| 2302 | gpio_free(dev->mach->gpio_vbus); | ||
| 2303 | err_gpio_vbus: | ||
| 2304 | if (dev->transceiver) { | 2246 | if (dev->transceiver) { |
| 2305 | otg_put_transceiver(dev->transceiver); | 2247 | otg_put_transceiver(dev->transceiver); |
| 2306 | dev->transceiver = NULL; | 2248 | dev->transceiver = NULL; |
| @@ -2337,10 +2279,6 @@ static int __exit pxa25x_udc_remove(struct platform_device *pdev) | |||
| 2337 | free_irq(LUBBOCK_USB_IRQ, dev); | 2279 | free_irq(LUBBOCK_USB_IRQ, dev); |
| 2338 | } | 2280 | } |
| 2339 | #endif | 2281 | #endif |
| 2340 | if (gpio_is_valid(dev->mach->gpio_vbus)) { | ||
| 2341 | free_irq(gpio_to_irq(dev->mach->gpio_vbus), dev); | ||
| 2342 | gpio_free(dev->mach->gpio_vbus); | ||
| 2343 | } | ||
| 2344 | if (gpio_is_valid(dev->mach->gpio_pullup)) | 2282 | if (gpio_is_valid(dev->mach->gpio_pullup)) |
| 2345 | gpio_free(dev->mach->gpio_pullup); | 2283 | gpio_free(dev->mach->gpio_pullup); |
| 2346 | 2284 | ||
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index 2efd6732d130..78a39a41547d 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c | |||
| @@ -602,7 +602,7 @@ static void inc_ep_stats_reqs(struct pxa_ep *ep, int is_in) | |||
| 602 | /** | 602 | /** |
| 603 | * inc_ep_stats_bytes - Update ep stats counts | 603 | * inc_ep_stats_bytes - Update ep stats counts |
| 604 | * @ep: physical endpoint | 604 | * @ep: physical endpoint |
| 605 | * @count: bytes transfered on endpoint | 605 | * @count: bytes transferred on endpoint |
| 606 | * @is_in: ep direction (USB_DIR_IN or 0) | 606 | * @is_in: ep direction (USB_DIR_IN or 0) |
| 607 | */ | 607 | */ |
| 608 | static void inc_ep_stats_bytes(struct pxa_ep *ep, int count, int is_in) | 608 | static void inc_ep_stats_bytes(struct pxa_ep *ep, int count, int is_in) |
| @@ -877,7 +877,7 @@ static void nuke(struct pxa_ep *ep, int status) | |||
| 877 | * If there is less space in request than bytes received in OUT endpoint, | 877 | * If there is less space in request than bytes received in OUT endpoint, |
| 878 | * bytes are left in the OUT endpoint. | 878 | * bytes are left in the OUT endpoint. |
| 879 | * | 879 | * |
| 880 | * Returns how many bytes were actually transfered | 880 | * Returns how many bytes were actually transferred |
| 881 | */ | 881 | */ |
| 882 | static int read_packet(struct pxa_ep *ep, struct pxa27x_request *req) | 882 | static int read_packet(struct pxa_ep *ep, struct pxa27x_request *req) |
| 883 | { | 883 | { |
| @@ -914,7 +914,7 @@ static int read_packet(struct pxa_ep *ep, struct pxa27x_request *req) | |||
| 914 | * endpoint. If there are no bytes to transfer, doesn't write anything | 914 | * endpoint. If there are no bytes to transfer, doesn't write anything |
| 915 | * to physical endpoint. | 915 | * to physical endpoint. |
| 916 | * | 916 | * |
| 917 | * Returns how many bytes were actually transfered. | 917 | * Returns how many bytes were actually transferred. |
| 918 | */ | 918 | */ |
| 919 | static int write_packet(struct pxa_ep *ep, struct pxa27x_request *req, | 919 | static int write_packet(struct pxa_ep *ep, struct pxa27x_request *req, |
| 920 | unsigned int max) | 920 | unsigned int max) |
| @@ -991,7 +991,7 @@ static int read_fifo(struct pxa_ep *ep, struct pxa27x_request *req) | |||
| 991 | * caller guarantees at least one packet buffer is ready (or a zlp). | 991 | * caller guarantees at least one packet buffer is ready (or a zlp). |
| 992 | * Doesn't complete the request, that's the caller's job | 992 | * Doesn't complete the request, that's the caller's job |
| 993 | * | 993 | * |
| 994 | * Returns 1 if request fully transfered, 0 if partial transfer | 994 | * Returns 1 if request fully transferred, 0 if partial transfer |
| 995 | */ | 995 | */ |
| 996 | static int write_fifo(struct pxa_ep *ep, struct pxa27x_request *req) | 996 | static int write_fifo(struct pxa_ep *ep, struct pxa27x_request *req) |
| 997 | { | 997 | { |
| @@ -1094,7 +1094,7 @@ static int read_ep0_fifo(struct pxa_ep *ep, struct pxa27x_request *req) | |||
| 1094 | * Sends a request (or a part of the request) to the control endpoint (ep0 in). | 1094 | * Sends a request (or a part of the request) to the control endpoint (ep0 in). |
| 1095 | * If the request doesn't fit, the remaining part will be sent from irq. | 1095 | * If the request doesn't fit, the remaining part will be sent from irq. |
| 1096 | * The request is considered fully written only if either : | 1096 | * The request is considered fully written only if either : |
| 1097 | * - last write transfered all remaining bytes, but fifo was not fully filled | 1097 | * - last write transferred all remaining bytes, but fifo was not fully filled |
| 1098 | * - last write was a 0 length write | 1098 | * - last write was a 0 length write |
| 1099 | * | 1099 | * |
| 1100 | * Returns 1 if request fully written, 0 if request only partially sent | 1100 | * Returns 1 if request fully written, 0 if request only partially sent |
| @@ -1548,7 +1548,7 @@ static int pxa_udc_get_frame(struct usb_gadget *_gadget) | |||
| 1548 | * pxa_udc_wakeup - Force udc device out of suspend | 1548 | * pxa_udc_wakeup - Force udc device out of suspend |
| 1549 | * @_gadget: usb gadget | 1549 | * @_gadget: usb gadget |
| 1550 | * | 1550 | * |
| 1551 | * Returns 0 if successfull, error code otherwise | 1551 | * Returns 0 if successful, error code otherwise |
| 1552 | */ | 1552 | */ |
| 1553 | static int pxa_udc_wakeup(struct usb_gadget *_gadget) | 1553 | static int pxa_udc_wakeup(struct usb_gadget *_gadget) |
| 1554 | { | 1554 | { |
diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c index 015118535f77..6dcc1f68fa60 100644 --- a/drivers/usb/gadget/r8a66597-udc.c +++ b/drivers/usb/gadget/r8a66597-udc.c | |||
| @@ -1083,7 +1083,9 @@ static void irq_device_state(struct r8a66597 *r8a66597) | |||
| 1083 | 1083 | ||
| 1084 | if (dvsq == DS_DFLT) { | 1084 | if (dvsq == DS_DFLT) { |
| 1085 | /* bus reset */ | 1085 | /* bus reset */ |
| 1086 | spin_unlock(&r8a66597->lock); | ||
| 1086 | r8a66597->driver->disconnect(&r8a66597->gadget); | 1087 | r8a66597->driver->disconnect(&r8a66597->gadget); |
| 1088 | spin_lock(&r8a66597->lock); | ||
| 1087 | r8a66597_update_usb_speed(r8a66597); | 1089 | r8a66597_update_usb_speed(r8a66597); |
| 1088 | } | 1090 | } |
| 1089 | if (r8a66597->old_dvsq == DS_CNFG && dvsq != DS_CNFG) | 1091 | if (r8a66597->old_dvsq == DS_CNFG && dvsq != DS_CNFG) |
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index ef825c3baed9..0912679de99a 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c | |||
| @@ -41,8 +41,8 @@ | |||
| 41 | /* EP0_MPS_LIMIT | 41 | /* EP0_MPS_LIMIT |
| 42 | * | 42 | * |
| 43 | * Unfortunately there seems to be a limit of the amount of data that can | 43 | * Unfortunately there seems to be a limit of the amount of data that can |
| 44 | * be transfered by IN transactions on EP0. This is either 127 bytes or 3 | 44 | * be transferred by IN transactions on EP0. This is either 127 bytes or 3 |
| 45 | * packets (which practially means 1 packet and 63 bytes of data) when the | 45 | * packets (which practically means 1 packet and 63 bytes of data) when the |
| 46 | * MPS is set to 64. | 46 | * MPS is set to 64. |
| 47 | * | 47 | * |
| 48 | * This means if we are wanting to move >127 bytes of data, we need to | 48 | * This means if we are wanting to move >127 bytes of data, we need to |
| @@ -783,7 +783,7 @@ static void s3c_hsotg_start_req(struct s3c_hsotg *hsotg, | |||
| 783 | hsotg->regs + S3C_DIEPINT(index)); | 783 | hsotg->regs + S3C_DIEPINT(index)); |
| 784 | 784 | ||
| 785 | /* Note, trying to clear the NAK here causes problems with transmit | 785 | /* Note, trying to clear the NAK here causes problems with transmit |
| 786 | * on the S3C6400 ending up with the TXFIFO becomming full. */ | 786 | * on the S3C6400 ending up with the TXFIFO becoming full. */ |
| 787 | 787 | ||
| 788 | /* check ep is enabled */ | 788 | /* check ep is enabled */ |
| 789 | if (!(readl(hsotg->regs + epctrl_reg) & S3C_DxEPCTL_EPEna)) | 789 | if (!(readl(hsotg->regs + epctrl_reg) & S3C_DxEPCTL_EPEna)) |
| @@ -1176,10 +1176,10 @@ static void s3c_hsotg_process_control(struct s3c_hsotg *hsotg, | |||
| 1176 | writel(ctrl, hsotg->regs + reg); | 1176 | writel(ctrl, hsotg->regs + reg); |
| 1177 | 1177 | ||
| 1178 | dev_dbg(hsotg->dev, | 1178 | dev_dbg(hsotg->dev, |
| 1179 | "writen DxEPCTL=0x%08x to %08x (DxEPCTL=0x%08x)\n", | 1179 | "written DxEPCTL=0x%08x to %08x (DxEPCTL=0x%08x)\n", |
| 1180 | ctrl, reg, readl(hsotg->regs + reg)); | 1180 | ctrl, reg, readl(hsotg->regs + reg)); |
| 1181 | 1181 | ||
| 1182 | /* don't belive we need to anything more to get the EP | 1182 | /* don't believe we need to anything more to get the EP |
| 1183 | * to reply with a STALL packet */ | 1183 | * to reply with a STALL packet */ |
| 1184 | } | 1184 | } |
| 1185 | } | 1185 | } |
| @@ -1416,7 +1416,7 @@ static void s3c_hsotg_rx_data(struct s3c_hsotg *hsotg, int ep_idx, int size) | |||
| 1416 | * transaction. | 1416 | * transaction. |
| 1417 | * | 1417 | * |
| 1418 | * Note, since we don't write any data to the TxFIFO, then it is | 1418 | * Note, since we don't write any data to the TxFIFO, then it is |
| 1419 | * currently belived that we do not need to wait for any space in | 1419 | * currently believed that we do not need to wait for any space in |
| 1420 | * the TxFIFO. | 1420 | * the TxFIFO. |
| 1421 | */ | 1421 | */ |
| 1422 | static void s3c_hsotg_send_zlp(struct s3c_hsotg *hsotg, | 1422 | static void s3c_hsotg_send_zlp(struct s3c_hsotg *hsotg, |
| @@ -1540,7 +1540,7 @@ static u32 s3c_hsotg_read_frameno(struct s3c_hsotg *hsotg) | |||
| 1540 | * that requires processing, so find out what is in there and do the | 1540 | * that requires processing, so find out what is in there and do the |
| 1541 | * appropriate read. | 1541 | * appropriate read. |
| 1542 | * | 1542 | * |
| 1543 | * The RXFIFO is a true FIFO, the packets comming out are still in packet | 1543 | * The RXFIFO is a true FIFO, the packets coming out are still in packet |
| 1544 | * chunks, so if you have x packets received on an endpoint you'll get x | 1544 | * chunks, so if you have x packets received on an endpoint you'll get x |
| 1545 | * FIFO events delivered, each with a packet's worth of data in it. | 1545 | * FIFO events delivered, each with a packet's worth of data in it. |
| 1546 | * | 1546 | * |
| @@ -2188,7 +2188,7 @@ irq_retry: | |||
| 2188 | 2188 | ||
| 2189 | /* these next two seem to crop-up occasionally causing the core | 2189 | /* these next two seem to crop-up occasionally causing the core |
| 2190 | * to shutdown the USB transfer, so try clearing them and logging | 2190 | * to shutdown the USB transfer, so try clearing them and logging |
| 2191 | * the occurence. */ | 2191 | * the occurrence. */ |
| 2192 | 2192 | ||
| 2193 | if (gintsts & S3C_GINTSTS_GOUTNakEff) { | 2193 | if (gintsts & S3C_GINTSTS_GOUTNakEff) { |
| 2194 | dev_info(hsotg->dev, "GOUTNakEff triggered\n"); | 2194 | dev_info(hsotg->dev, "GOUTNakEff triggered\n"); |
| @@ -2469,7 +2469,7 @@ static struct usb_ep_ops s3c_hsotg_ep_ops = { | |||
| 2469 | .queue = s3c_hsotg_ep_queue, | 2469 | .queue = s3c_hsotg_ep_queue, |
| 2470 | .dequeue = s3c_hsotg_ep_dequeue, | 2470 | .dequeue = s3c_hsotg_ep_dequeue, |
| 2471 | .set_halt = s3c_hsotg_ep_sethalt, | 2471 | .set_halt = s3c_hsotg_ep_sethalt, |
| 2472 | /* note, don't belive we have any call for the fifo routines */ | 2472 | /* note, don't believe we have any call for the fifo routines */ |
| 2473 | }; | 2473 | }; |
| 2474 | 2474 | ||
| 2475 | /** | 2475 | /** |
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 9483acdf2e9e..e0e0787b724b 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig | |||
| @@ -402,7 +402,7 @@ config FHCI_DEBUG | |||
| 402 | depends on USB_FHCI_HCD && DEBUG_FS | 402 | depends on USB_FHCI_HCD && DEBUG_FS |
| 403 | help | 403 | help |
| 404 | Say "y" to see some FHCI debug information and statistics | 404 | Say "y" to see some FHCI debug information and statistics |
| 405 | throught debugfs. | 405 | through debugfs. |
| 406 | 406 | ||
| 407 | config USB_U132_HCD | 407 | config USB_U132_HCD |
| 408 | tristate "Elan U132 Adapter Host Controller" | 408 | tristate "Elan U132 Adapter Host Controller" |
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c index 98ded66e8d3f..42abd0f603bf 100644 --- a/drivers/usb/host/ehci-q.c +++ b/drivers/usb/host/ehci-q.c | |||
| @@ -1247,24 +1247,27 @@ static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
| 1247 | 1247 | ||
| 1248 | static void scan_async (struct ehci_hcd *ehci) | 1248 | static void scan_async (struct ehci_hcd *ehci) |
| 1249 | { | 1249 | { |
| 1250 | bool stopped; | ||
| 1250 | struct ehci_qh *qh; | 1251 | struct ehci_qh *qh; |
| 1251 | enum ehci_timer_action action = TIMER_IO_WATCHDOG; | 1252 | enum ehci_timer_action action = TIMER_IO_WATCHDOG; |
| 1252 | 1253 | ||
| 1253 | ehci->stamp = ehci_readl(ehci, &ehci->regs->frame_index); | 1254 | ehci->stamp = ehci_readl(ehci, &ehci->regs->frame_index); |
| 1254 | timer_action_done (ehci, TIMER_ASYNC_SHRINK); | 1255 | timer_action_done (ehci, TIMER_ASYNC_SHRINK); |
| 1255 | rescan: | 1256 | rescan: |
| 1257 | stopped = !HC_IS_RUNNING(ehci_to_hcd(ehci)->state); | ||
| 1256 | qh = ehci->async->qh_next.qh; | 1258 | qh = ehci->async->qh_next.qh; |
| 1257 | if (likely (qh != NULL)) { | 1259 | if (likely (qh != NULL)) { |
| 1258 | do { | 1260 | do { |
| 1259 | /* clean any finished work for this qh */ | 1261 | /* clean any finished work for this qh */ |
| 1260 | if (!list_empty (&qh->qtd_list) | 1262 | if (!list_empty(&qh->qtd_list) && (stopped || |
| 1261 | && qh->stamp != ehci->stamp) { | 1263 | qh->stamp != ehci->stamp)) { |
| 1262 | int temp; | 1264 | int temp; |
| 1263 | 1265 | ||
| 1264 | /* unlinks could happen here; completion | 1266 | /* unlinks could happen here; completion |
| 1265 | * reporting drops the lock. rescan using | 1267 | * reporting drops the lock. rescan using |
| 1266 | * the latest schedule, but don't rescan | 1268 | * the latest schedule, but don't rescan |
| 1267 | * qhs we already finished (no looping). | 1269 | * qhs we already finished (no looping) |
| 1270 | * unless the controller is stopped. | ||
| 1268 | */ | 1271 | */ |
| 1269 | qh = qh_get (qh); | 1272 | qh = qh_get (qh); |
| 1270 | qh->stamp = ehci->stamp; | 1273 | qh->stamp = ehci->stamp; |
| @@ -1285,9 +1288,9 @@ rescan: | |||
| 1285 | */ | 1288 | */ |
| 1286 | if (list_empty(&qh->qtd_list) | 1289 | if (list_empty(&qh->qtd_list) |
| 1287 | && qh->qh_state == QH_STATE_LINKED) { | 1290 | && qh->qh_state == QH_STATE_LINKED) { |
| 1288 | if (!ehci->reclaim | 1291 | if (!ehci->reclaim && (stopped || |
| 1289 | && ((ehci->stamp - qh->stamp) & 0x1fff) | 1292 | ((ehci->stamp - qh->stamp) & 0x1fff) |
| 1290 | >= (EHCI_SHRINK_FRAMES * 8)) | 1293 | >= EHCI_SHRINK_FRAMES * 8)) |
| 1291 | start_unlink_async(ehci, qh); | 1294 | start_unlink_async(ehci, qh); |
| 1292 | else | 1295 | else |
| 1293 | action = TIMER_ASYNC_SHRINK; | 1296 | action = TIMER_ASYNC_SHRINK; |
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index f86d3fa20214..333ddc156919 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h | |||
| @@ -644,7 +644,7 @@ static inline void ehci_writel(const struct ehci_hcd *ehci, | |||
| 644 | /* | 644 | /* |
| 645 | * On certain ppc-44x SoC there is a HW issue, that could only worked around with | 645 | * On certain ppc-44x SoC there is a HW issue, that could only worked around with |
| 646 | * explicit suspend/operate of OHCI. This function hereby makes sense only on that arch. | 646 | * explicit suspend/operate of OHCI. This function hereby makes sense only on that arch. |
| 647 | * Other common bits are dependant on has_amcc_usb23 quirk flag. | 647 | * Other common bits are dependent on has_amcc_usb23 quirk flag. |
| 648 | */ | 648 | */ |
| 649 | #ifdef CONFIG_44x | 649 | #ifdef CONFIG_44x |
| 650 | static inline void set_ohci_hcfs(struct ehci_hcd *ehci, int operational) | 650 | static inline void set_ohci_hcfs(struct ehci_hcd *ehci, int operational) |
diff --git a/drivers/usb/host/fhci-hcd.c b/drivers/usb/host/fhci-hcd.c index b84ff7e51896..19223c7449e1 100644 --- a/drivers/usb/host/fhci-hcd.c +++ b/drivers/usb/host/fhci-hcd.c | |||
| @@ -401,7 +401,7 @@ static int fhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, | |||
| 401 | /* 1 td fro setup,1 for ack */ | 401 | /* 1 td fro setup,1 for ack */ |
| 402 | size = 2; | 402 | size = 2; |
| 403 | case PIPE_BULK: | 403 | case PIPE_BULK: |
| 404 | /* one td for every 4096 bytes(can be upto 8k) */ | 404 | /* one td for every 4096 bytes(can be up to 8k) */ |
| 405 | size += urb->transfer_buffer_length / 4096; | 405 | size += urb->transfer_buffer_length / 4096; |
| 406 | /* ...add for any remaining bytes... */ | 406 | /* ...add for any remaining bytes... */ |
| 407 | if ((urb->transfer_buffer_length % 4096) != 0) | 407 | if ((urb->transfer_buffer_length % 4096) != 0) |
diff --git a/drivers/usb/host/fhci-tds.c b/drivers/usb/host/fhci-tds.c index 38fe058fbe61..0ea577bfca2a 100644 --- a/drivers/usb/host/fhci-tds.c +++ b/drivers/usb/host/fhci-tds.c | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | #define TD_RXER 0x0020 /* Rx error or not */ | 40 | #define TD_RXER 0x0020 /* Rx error or not */ |
| 41 | 41 | ||
| 42 | #define TD_NAK 0x0010 /* No ack. */ | 42 | #define TD_NAK 0x0010 /* No ack. */ |
| 43 | #define TD_STAL 0x0008 /* Stall recieved */ | 43 | #define TD_STAL 0x0008 /* Stall received */ |
| 44 | #define TD_TO 0x0004 /* time out */ | 44 | #define TD_TO 0x0004 /* time out */ |
| 45 | #define TD_UN 0x0002 /* underrun */ | 45 | #define TD_UN 0x0002 /* underrun */ |
| 46 | #define TD_NO 0x0010 /* Rx Non Octet Aligned Packet */ | 46 | #define TD_NO 0x0010 /* Rx Non Octet Aligned Packet */ |
| @@ -274,7 +274,7 @@ void fhci_init_ep_registers(struct fhci_usb *usb, struct endpoint *ep, | |||
| 274 | * It is also preparing the TDs for new frames. If the Tx interrupts | 274 | * It is also preparing the TDs for new frames. If the Tx interrupts |
| 275 | * are disabled, the application should call that routine to get | 275 | * are disabled, the application should call that routine to get |
| 276 | * confirmation about the submitted frames. Otherwise, the routine is | 276 | * confirmation about the submitted frames. Otherwise, the routine is |
| 277 | * called frome the interrupt service routine during the Tx interrupt. | 277 | * called from the interrupt service routine during the Tx interrupt. |
| 278 | * In that case the application is informed by calling the application | 278 | * In that case the application is informed by calling the application |
| 279 | * specific 'fhci_transaction_confirm' routine | 279 | * specific 'fhci_transaction_confirm' routine |
| 280 | */ | 280 | */ |
| @@ -337,7 +337,7 @@ static void fhci_td_transaction_confirm(struct fhci_usb *usb) | |||
| 337 | pkt->status = USB_TD_RX_ER_NONOCT; | 337 | pkt->status = USB_TD_RX_ER_NONOCT; |
| 338 | else | 338 | else |
| 339 | fhci_err(usb->fhci, "illegal error " | 339 | fhci_err(usb->fhci, "illegal error " |
| 340 | "occured\n"); | 340 | "occurred\n"); |
| 341 | } else if (td_status & TD_NAK) | 341 | } else if (td_status & TD_NAK) |
| 342 | pkt->status = USB_TD_TX_ER_NAK; | 342 | pkt->status = USB_TD_TX_ER_NAK; |
| 343 | else if (td_status & TD_TO) | 343 | else if (td_status & TD_TO) |
| @@ -347,7 +347,7 @@ static void fhci_td_transaction_confirm(struct fhci_usb *usb) | |||
| 347 | else if (td_status & TD_STAL) | 347 | else if (td_status & TD_STAL) |
| 348 | pkt->status = USB_TD_TX_ER_STALL; | 348 | pkt->status = USB_TD_TX_ER_STALL; |
| 349 | else | 349 | else |
| 350 | fhci_err(usb->fhci, "illegal error occured\n"); | 350 | fhci_err(usb->fhci, "illegal error occurred\n"); |
| 351 | } else if ((extra_data & TD_TOK_IN) && | 351 | } else if ((extra_data & TD_TOK_IN) && |
| 352 | pkt->len > td_length - CRC_SIZE) { | 352 | pkt->len > td_length - CRC_SIZE) { |
| 353 | pkt->status = USB_TD_RX_DATA_UNDERUN; | 353 | pkt->status = USB_TD_RX_DATA_UNDERUN; |
diff --git a/drivers/usb/host/fhci.h b/drivers/usb/host/fhci.h index 71c3caaea4c1..dc6939a44a1a 100644 --- a/drivers/usb/host/fhci.h +++ b/drivers/usb/host/fhci.h | |||
| @@ -82,7 +82,7 @@ | |||
| 82 | #define USB_TD_RX_ER_NONOCT 0x40000000 /* Tx Non Octet Aligned Packet */ | 82 | #define USB_TD_RX_ER_NONOCT 0x40000000 /* Tx Non Octet Aligned Packet */ |
| 83 | #define USB_TD_RX_ER_BITSTUFF 0x20000000 /* Frame Aborted-Received pkt */ | 83 | #define USB_TD_RX_ER_BITSTUFF 0x20000000 /* Frame Aborted-Received pkt */ |
| 84 | #define USB_TD_RX_ER_CRC 0x10000000 /* CRC error */ | 84 | #define USB_TD_RX_ER_CRC 0x10000000 /* CRC error */ |
| 85 | #define USB_TD_RX_ER_OVERUN 0x08000000 /* Over - run occured */ | 85 | #define USB_TD_RX_ER_OVERUN 0x08000000 /* Over - run occurred */ |
| 86 | #define USB_TD_RX_ER_PID 0x04000000 /* wrong PID received */ | 86 | #define USB_TD_RX_ER_PID 0x04000000 /* wrong PID received */ |
| 87 | #define USB_TD_RX_DATA_UNDERUN 0x02000000 /* shorter than expected */ | 87 | #define USB_TD_RX_DATA_UNDERUN 0x02000000 /* shorter than expected */ |
| 88 | #define USB_TD_RX_DATA_OVERUN 0x01000000 /* longer than expected */ | 88 | #define USB_TD_RX_DATA_OVERUN 0x01000000 /* longer than expected */ |
| @@ -363,7 +363,7 @@ struct ed { | |||
| 363 | struct td { | 363 | struct td { |
| 364 | void *data; /* a pointer to the data buffer */ | 364 | void *data; /* a pointer to the data buffer */ |
| 365 | unsigned int len; /* length of the data to be submitted */ | 365 | unsigned int len; /* length of the data to be submitted */ |
| 366 | unsigned int actual_len; /* actual bytes transfered on this td */ | 366 | unsigned int actual_len; /* actual bytes transferred on this td */ |
| 367 | enum fhci_ta_type type; /* transaction type */ | 367 | enum fhci_ta_type type; /* transaction type */ |
| 368 | u8 toggle; /* toggle for next trans. within this TD */ | 368 | u8 toggle; /* toggle for next trans. within this TD */ |
| 369 | u16 iso_index; /* ISO transaction index */ | 369 | u16 iso_index; /* ISO transaction index */ |
diff --git a/drivers/usb/host/imx21-hcd.c b/drivers/usb/host/imx21-hcd.c index 2562e92e3178..af05718bdc73 100644 --- a/drivers/usb/host/imx21-hcd.c +++ b/drivers/usb/host/imx21-hcd.c | |||
| @@ -1323,7 +1323,7 @@ static void process_etds(struct usb_hcd *hcd, struct imx21 *imx21, int sof) | |||
| 1323 | * (and hence no interrupt occurs). | 1323 | * (and hence no interrupt occurs). |
| 1324 | * This causes the transfer in question to hang. | 1324 | * This causes the transfer in question to hang. |
| 1325 | * The kludge below checks for this condition at each SOF and processes any | 1325 | * The kludge below checks for this condition at each SOF and processes any |
| 1326 | * blocked ETDs (after an arbitary 10 frame wait) | 1326 | * blocked ETDs (after an arbitrary 10 frame wait) |
| 1327 | * | 1327 | * |
| 1328 | * With a single active transfer the usbtest test suite will run for days | 1328 | * With a single active transfer the usbtest test suite will run for days |
| 1329 | * without the kludge. | 1329 | * without the kludge. |
diff --git a/drivers/usb/host/isp116x.h b/drivers/usb/host/isp116x.h index 12db961acdfb..9a2c400e6090 100644 --- a/drivers/usb/host/isp116x.h +++ b/drivers/usb/host/isp116x.h | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | 13 | ||
| 14 | /* Full speed: max # of bytes to transfer for a single urb | 14 | /* Full speed: max # of bytes to transfer for a single urb |
| 15 | at a time must be < 1024 && must be multiple of 64. | 15 | at a time must be < 1024 && must be multiple of 64. |
| 16 | 832 allows transfering 4kiB within 5 frames. */ | 16 | 832 allows transferring 4kiB within 5 frames. */ |
| 17 | #define MAX_TRANSFER_SIZE_FULLSPEED 832 | 17 | #define MAX_TRANSFER_SIZE_FULLSPEED 832 |
| 18 | 18 | ||
| 19 | /* Low speed: there is no reason to schedule in very big | 19 | /* Low speed: there is no reason to schedule in very big |
diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c index 662cd002adfc..f97570a847ca 100644 --- a/drivers/usb/host/isp1362-hcd.c +++ b/drivers/usb/host/isp1362-hcd.c | |||
| @@ -546,7 +546,7 @@ static void postproc_ep(struct isp1362_hcd *isp1362_hcd, struct isp1362_ep *ep) | |||
| 546 | if (usb_pipecontrol(urb->pipe)) { | 546 | if (usb_pipecontrol(urb->pipe)) { |
| 547 | ep->nextpid = USB_PID_ACK; | 547 | ep->nextpid = USB_PID_ACK; |
| 548 | /* save the data underrun error code for later and | 548 | /* save the data underrun error code for later and |
| 549 | * procede with the status stage | 549 | * proceed with the status stage |
| 550 | */ | 550 | */ |
| 551 | urb->actual_length += PTD_GET_COUNT(ptd); | 551 | urb->actual_length += PTD_GET_COUNT(ptd); |
| 552 | BUG_ON(urb->actual_length > urb->transfer_buffer_length); | 552 | BUG_ON(urb->actual_length > urb->transfer_buffer_length); |
diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c index f50e84ac570a..795345ad45e6 100644 --- a/drivers/usb/host/isp1760-hcd.c +++ b/drivers/usb/host/isp1760-hcd.c | |||
| @@ -295,7 +295,7 @@ static void alloc_mem(struct usb_hcd *hcd, struct isp1760_qtd *qtd) | |||
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | dev_err(hcd->self.controller, | 297 | dev_err(hcd->self.controller, |
| 298 | "%s: Can not allocate %lu bytes of memory\n" | 298 | "%s: Cannot allocate %zu bytes of memory\n" |
| 299 | "Current memory map:\n", | 299 | "Current memory map:\n", |
| 300 | __func__, qtd->length); | 300 | __func__, qtd->length); |
| 301 | for (i = 0; i < BLOCKS; i++) { | 301 | for (i = 0; i < BLOCKS; i++) { |
diff --git a/drivers/usb/host/ohci-au1xxx.c b/drivers/usb/host/ohci-au1xxx.c index 17a6043c1fa0..958d985f2951 100644 --- a/drivers/usb/host/ohci-au1xxx.c +++ b/drivers/usb/host/ohci-au1xxx.c | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | 33 | ||
| 34 | #ifdef __LITTLE_ENDIAN | 34 | #ifdef __LITTLE_ENDIAN |
| 35 | #define USBH_ENABLE_INIT (USBH_ENABLE_CE | USBH_ENABLE_E | USBH_ENABLE_C) | 35 | #define USBH_ENABLE_INIT (USBH_ENABLE_CE | USBH_ENABLE_E | USBH_ENABLE_C) |
| 36 | #elif __BIG_ENDIAN | 36 | #elif defined(__BIG_ENDIAN) |
| 37 | #define USBH_ENABLE_INIT (USBH_ENABLE_CE | USBH_ENABLE_E | USBH_ENABLE_C | \ | 37 | #define USBH_ENABLE_INIT (USBH_ENABLE_CE | USBH_ENABLE_E | USBH_ENABLE_C | \ |
| 38 | USBH_ENABLE_BE) | 38 | USBH_ENABLE_BE) |
| 39 | #else | 39 | #else |
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index e7288639edb0..d55723514860 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c | |||
| @@ -162,7 +162,7 @@ static int ohci_urb_enqueue ( | |||
| 162 | // case PIPE_INTERRUPT: | 162 | // case PIPE_INTERRUPT: |
| 163 | // case PIPE_BULK: | 163 | // case PIPE_BULK: |
| 164 | default: | 164 | default: |
| 165 | /* one TD for every 4096 Bytes (can be upto 8K) */ | 165 | /* one TD for every 4096 Bytes (can be up to 8K) */ |
| 166 | size += urb->transfer_buffer_length / 4096; | 166 | size += urb->transfer_buffer_length / 4096; |
| 167 | /* ... and for any remaining bytes ... */ | 167 | /* ... and for any remaining bytes ... */ |
| 168 | if ((urb->transfer_buffer_length % 4096) != 0) | 168 | if ((urb->transfer_buffer_length % 4096) != 0) |
diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c index 44e4deb362e1..4a771f6cc822 100644 --- a/drivers/usb/host/oxu210hp-hcd.c +++ b/drivers/usb/host/oxu210hp-hcd.c | |||
| @@ -2879,7 +2879,7 @@ static int oxu_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, | |||
| 2879 | /* Ok, we have more job to do! :) */ | 2879 | /* Ok, we have more job to do! :) */ |
| 2880 | 2880 | ||
| 2881 | for (i = 0; i < num - 1; i++) { | 2881 | for (i = 0; i < num - 1; i++) { |
| 2882 | /* Get free micro URB poll till a free urb is recieved */ | 2882 | /* Get free micro URB poll till a free urb is received */ |
| 2883 | 2883 | ||
| 2884 | do { | 2884 | do { |
| 2885 | murb = (struct urb *) oxu_murb_alloc(oxu); | 2885 | murb = (struct urb *) oxu_murb_alloc(oxu); |
| @@ -2911,7 +2911,7 @@ static int oxu_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, | |||
| 2911 | 2911 | ||
| 2912 | /* Last urb requires special handling */ | 2912 | /* Last urb requires special handling */ |
| 2913 | 2913 | ||
| 2914 | /* Get free micro URB poll till a free urb is recieved */ | 2914 | /* Get free micro URB poll till a free urb is received */ |
| 2915 | do { | 2915 | do { |
| 2916 | murb = (struct urb *) oxu_murb_alloc(oxu); | 2916 | murb = (struct urb *) oxu_murb_alloc(oxu); |
| 2917 | if (!murb) | 2917 | if (!murb) |
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index 1d586d4f7b56..9b166d70ae91 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c | |||
| @@ -84,65 +84,92 @@ int usb_amd_find_chipset_info(void) | |||
| 84 | { | 84 | { |
| 85 | u8 rev = 0; | 85 | u8 rev = 0; |
| 86 | unsigned long flags; | 86 | unsigned long flags; |
| 87 | struct amd_chipset_info info; | ||
| 88 | int ret; | ||
| 87 | 89 | ||
| 88 | spin_lock_irqsave(&amd_lock, flags); | 90 | spin_lock_irqsave(&amd_lock, flags); |
| 89 | 91 | ||
| 90 | amd_chipset.probe_count++; | ||
| 91 | /* probe only once */ | 92 | /* probe only once */ |
| 92 | if (amd_chipset.probe_count > 1) { | 93 | if (amd_chipset.probe_count > 0) { |
| 94 | amd_chipset.probe_count++; | ||
| 93 | spin_unlock_irqrestore(&amd_lock, flags); | 95 | spin_unlock_irqrestore(&amd_lock, flags); |
| 94 | return amd_chipset.probe_result; | 96 | return amd_chipset.probe_result; |
| 95 | } | 97 | } |
| 98 | memset(&info, 0, sizeof(info)); | ||
| 99 | spin_unlock_irqrestore(&amd_lock, flags); | ||
| 96 | 100 | ||
| 97 | amd_chipset.smbus_dev = pci_get_device(PCI_VENDOR_ID_ATI, 0x4385, NULL); | 101 | info.smbus_dev = pci_get_device(PCI_VENDOR_ID_ATI, 0x4385, NULL); |
| 98 | if (amd_chipset.smbus_dev) { | 102 | if (info.smbus_dev) { |
| 99 | rev = amd_chipset.smbus_dev->revision; | 103 | rev = info.smbus_dev->revision; |
| 100 | if (rev >= 0x40) | 104 | if (rev >= 0x40) |
| 101 | amd_chipset.sb_type = 1; | 105 | info.sb_type = 1; |
| 102 | else if (rev >= 0x30 && rev <= 0x3b) | 106 | else if (rev >= 0x30 && rev <= 0x3b) |
| 103 | amd_chipset.sb_type = 3; | 107 | info.sb_type = 3; |
| 104 | } else { | 108 | } else { |
| 105 | amd_chipset.smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD, | 109 | info.smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD, |
| 106 | 0x780b, NULL); | 110 | 0x780b, NULL); |
| 107 | if (!amd_chipset.smbus_dev) { | 111 | if (!info.smbus_dev) { |
| 108 | spin_unlock_irqrestore(&amd_lock, flags); | 112 | ret = 0; |
| 109 | return 0; | 113 | goto commit; |
| 110 | } | 114 | } |
| 111 | rev = amd_chipset.smbus_dev->revision; | 115 | |
| 116 | rev = info.smbus_dev->revision; | ||
| 112 | if (rev >= 0x11 && rev <= 0x18) | 117 | if (rev >= 0x11 && rev <= 0x18) |
| 113 | amd_chipset.sb_type = 2; | 118 | info.sb_type = 2; |
| 114 | } | 119 | } |
| 115 | 120 | ||
| 116 | if (amd_chipset.sb_type == 0) { | 121 | if (info.sb_type == 0) { |
| 117 | if (amd_chipset.smbus_dev) { | 122 | if (info.smbus_dev) { |
| 118 | pci_dev_put(amd_chipset.smbus_dev); | 123 | pci_dev_put(info.smbus_dev); |
| 119 | amd_chipset.smbus_dev = NULL; | 124 | info.smbus_dev = NULL; |
| 120 | } | 125 | } |
| 121 | spin_unlock_irqrestore(&amd_lock, flags); | 126 | ret = 0; |
| 122 | return 0; | 127 | goto commit; |
| 123 | } | 128 | } |
| 124 | 129 | ||
| 125 | amd_chipset.nb_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x9601, NULL); | 130 | info.nb_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x9601, NULL); |
| 126 | if (amd_chipset.nb_dev) { | 131 | if (info.nb_dev) { |
| 127 | amd_chipset.nb_type = 1; | 132 | info.nb_type = 1; |
| 128 | } else { | 133 | } else { |
| 129 | amd_chipset.nb_dev = pci_get_device(PCI_VENDOR_ID_AMD, | 134 | info.nb_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1510, NULL); |
| 130 | 0x1510, NULL); | 135 | if (info.nb_dev) { |
| 131 | if (amd_chipset.nb_dev) { | 136 | info.nb_type = 2; |
| 132 | amd_chipset.nb_type = 2; | 137 | } else { |
| 133 | } else { | 138 | info.nb_dev = pci_get_device(PCI_VENDOR_ID_AMD, |
| 134 | amd_chipset.nb_dev = pci_get_device(PCI_VENDOR_ID_AMD, | 139 | 0x9600, NULL); |
| 135 | 0x9600, NULL); | 140 | if (info.nb_dev) |
| 136 | if (amd_chipset.nb_dev) | 141 | info.nb_type = 3; |
| 137 | amd_chipset.nb_type = 3; | ||
| 138 | } | 142 | } |
| 139 | } | 143 | } |
| 140 | 144 | ||
| 141 | amd_chipset.probe_result = 1; | 145 | ret = info.probe_result = 1; |
| 142 | printk(KERN_DEBUG "QUIRK: Enable AMD PLL fix\n"); | 146 | printk(KERN_DEBUG "QUIRK: Enable AMD PLL fix\n"); |
| 143 | 147 | ||
| 144 | spin_unlock_irqrestore(&amd_lock, flags); | 148 | commit: |
| 145 | return amd_chipset.probe_result; | 149 | |
| 150 | spin_lock_irqsave(&amd_lock, flags); | ||
| 151 | if (amd_chipset.probe_count > 0) { | ||
| 152 | /* race - someone else was faster - drop devices */ | ||
| 153 | |||
| 154 | /* Mark that we where here */ | ||
| 155 | amd_chipset.probe_count++; | ||
| 156 | ret = amd_chipset.probe_result; | ||
| 157 | |||
| 158 | spin_unlock_irqrestore(&amd_lock, flags); | ||
| 159 | |||
| 160 | if (info.nb_dev) | ||
| 161 | pci_dev_put(info.nb_dev); | ||
| 162 | if (info.smbus_dev) | ||
| 163 | pci_dev_put(info.smbus_dev); | ||
| 164 | |||
| 165 | } else { | ||
| 166 | /* no race - commit the result */ | ||
| 167 | info.probe_count++; | ||
| 168 | amd_chipset = info; | ||
| 169 | spin_unlock_irqrestore(&amd_lock, flags); | ||
| 170 | } | ||
| 171 | |||
| 172 | return ret; | ||
| 146 | } | 173 | } |
| 147 | EXPORT_SYMBOL_GPL(usb_amd_find_chipset_info); | 174 | EXPORT_SYMBOL_GPL(usb_amd_find_chipset_info); |
| 148 | 175 | ||
| @@ -284,6 +311,7 @@ EXPORT_SYMBOL_GPL(usb_amd_quirk_pll_enable); | |||
| 284 | 311 | ||
| 285 | void usb_amd_dev_put(void) | 312 | void usb_amd_dev_put(void) |
| 286 | { | 313 | { |
| 314 | struct pci_dev *nb, *smbus; | ||
| 287 | unsigned long flags; | 315 | unsigned long flags; |
| 288 | 316 | ||
| 289 | spin_lock_irqsave(&amd_lock, flags); | 317 | spin_lock_irqsave(&amd_lock, flags); |
| @@ -294,20 +322,23 @@ void usb_amd_dev_put(void) | |||
| 294 | return; | 322 | return; |
| 295 | } | 323 | } |
| 296 | 324 | ||
| 297 | if (amd_chipset.nb_dev) { | 325 | /* save them to pci_dev_put outside of spinlock */ |
| 298 | pci_dev_put(amd_chipset.nb_dev); | 326 | nb = amd_chipset.nb_dev; |
| 299 | amd_chipset.nb_dev = NULL; | 327 | smbus = amd_chipset.smbus_dev; |
| 300 | } | 328 | |
| 301 | if (amd_chipset.smbus_dev) { | 329 | amd_chipset.nb_dev = NULL; |
| 302 | pci_dev_put(amd_chipset.smbus_dev); | 330 | amd_chipset.smbus_dev = NULL; |
| 303 | amd_chipset.smbus_dev = NULL; | ||
| 304 | } | ||
| 305 | amd_chipset.nb_type = 0; | 331 | amd_chipset.nb_type = 0; |
| 306 | amd_chipset.sb_type = 0; | 332 | amd_chipset.sb_type = 0; |
| 307 | amd_chipset.isoc_reqs = 0; | 333 | amd_chipset.isoc_reqs = 0; |
| 308 | amd_chipset.probe_result = 0; | 334 | amd_chipset.probe_result = 0; |
| 309 | 335 | ||
| 310 | spin_unlock_irqrestore(&amd_lock, flags); | 336 | spin_unlock_irqrestore(&amd_lock, flags); |
| 337 | |||
| 338 | if (nb) | ||
| 339 | pci_dev_put(nb); | ||
| 340 | if (smbus) | ||
| 341 | pci_dev_put(smbus); | ||
| 311 | } | 342 | } |
| 312 | EXPORT_SYMBOL_GPL(usb_amd_dev_put); | 343 | EXPORT_SYMBOL_GPL(usb_amd_dev_put); |
| 313 | 344 | ||
diff --git a/drivers/usb/host/whci/qset.c b/drivers/usb/host/whci/qset.c index dc0ab8382f5d..d6e175428618 100644 --- a/drivers/usb/host/whci/qset.c +++ b/drivers/usb/host/whci/qset.c | |||
| @@ -739,7 +739,7 @@ static int get_urb_status_from_qtd(struct urb *urb, u32 status) | |||
| 739 | * process_inactive_qtd - process an inactive (but not halted) qTD. | 739 | * process_inactive_qtd - process an inactive (but not halted) qTD. |
| 740 | * | 740 | * |
| 741 | * Update the urb with the transfer bytes from the qTD, if the urb is | 741 | * Update the urb with the transfer bytes from the qTD, if the urb is |
| 742 | * completely transfered or (in the case of an IN only) the LPF is | 742 | * completely transferred or (in the case of an IN only) the LPF is |
| 743 | * set, then the transfer is complete and the urb should be returned | 743 | * set, then the transfer is complete and the urb should be returned |
| 744 | * to the system. | 744 | * to the system. |
| 745 | */ | 745 | */ |
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index a003e79aacdc..627f3438028c 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
| @@ -846,7 +846,7 @@ static u32 xhci_find_real_port_number(struct xhci_hcd *xhci, | |||
| 846 | * Skip ports that don't have known speeds, or have duplicate | 846 | * Skip ports that don't have known speeds, or have duplicate |
| 847 | * Extended Capabilities port speed entries. | 847 | * Extended Capabilities port speed entries. |
| 848 | */ | 848 | */ |
| 849 | if (port_speed == 0 || port_speed == -1) | 849 | if (port_speed == 0 || port_speed == DUPLICATE_ENTRY) |
| 850 | continue; | 850 | continue; |
| 851 | 851 | ||
| 852 | /* | 852 | /* |
| @@ -974,6 +974,47 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *ud | |||
| 974 | return 0; | 974 | return 0; |
| 975 | } | 975 | } |
| 976 | 976 | ||
| 977 | /* | ||
| 978 | * Convert interval expressed as 2^(bInterval - 1) == interval into | ||
| 979 | * straight exponent value 2^n == interval. | ||
| 980 | * | ||
| 981 | */ | ||
| 982 | static unsigned int xhci_parse_exponent_interval(struct usb_device *udev, | ||
| 983 | struct usb_host_endpoint *ep) | ||
| 984 | { | ||
| 985 | unsigned int interval; | ||
| 986 | |||
| 987 | interval = clamp_val(ep->desc.bInterval, 1, 16) - 1; | ||
| 988 | if (interval != ep->desc.bInterval - 1) | ||
| 989 | dev_warn(&udev->dev, | ||
| 990 | "ep %#x - rounding interval to %d microframes\n", | ||
| 991 | ep->desc.bEndpointAddress, | ||
| 992 | 1 << interval); | ||
| 993 | |||
| 994 | return interval; | ||
| 995 | } | ||
| 996 | |||
| 997 | /* | ||
| 998 | * Convert bInterval expressed in frames (in 1-255 range) to exponent of | ||
| 999 | * microframes, rounded down to nearest power of 2. | ||
| 1000 | */ | ||
| 1001 | static unsigned int xhci_parse_frame_interval(struct usb_device *udev, | ||
| 1002 | struct usb_host_endpoint *ep) | ||
| 1003 | { | ||
| 1004 | unsigned int interval; | ||
| 1005 | |||
| 1006 | interval = fls(8 * ep->desc.bInterval) - 1; | ||
| 1007 | interval = clamp_val(interval, 3, 10); | ||
| 1008 | if ((1 << interval) != 8 * ep->desc.bInterval) | ||
| 1009 | dev_warn(&udev->dev, | ||
| 1010 | "ep %#x - rounding interval to %d microframes, ep desc says %d microframes\n", | ||
| 1011 | ep->desc.bEndpointAddress, | ||
| 1012 | 1 << interval, | ||
| 1013 | 8 * ep->desc.bInterval); | ||
| 1014 | |||
| 1015 | return interval; | ||
| 1016 | } | ||
| 1017 | |||
| 977 | /* Return the polling or NAK interval. | 1018 | /* Return the polling or NAK interval. |
| 978 | * | 1019 | * |
| 979 | * The polling interval is expressed in "microframes". If xHCI's Interval field | 1020 | * The polling interval is expressed in "microframes". If xHCI's Interval field |
| @@ -982,7 +1023,7 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *ud | |||
| 982 | * The NAK interval is one NAK per 1 to 255 microframes, or no NAKs if interval | 1023 | * The NAK interval is one NAK per 1 to 255 microframes, or no NAKs if interval |
| 983 | * is set to 0. | 1024 | * is set to 0. |
| 984 | */ | 1025 | */ |
| 985 | static inline unsigned int xhci_get_endpoint_interval(struct usb_device *udev, | 1026 | static unsigned int xhci_get_endpoint_interval(struct usb_device *udev, |
| 986 | struct usb_host_endpoint *ep) | 1027 | struct usb_host_endpoint *ep) |
| 987 | { | 1028 | { |
| 988 | unsigned int interval = 0; | 1029 | unsigned int interval = 0; |
| @@ -991,45 +1032,38 @@ static inline unsigned int xhci_get_endpoint_interval(struct usb_device *udev, | |||
| 991 | case USB_SPEED_HIGH: | 1032 | case USB_SPEED_HIGH: |
| 992 | /* Max NAK rate */ | 1033 | /* Max NAK rate */ |
| 993 | if (usb_endpoint_xfer_control(&ep->desc) || | 1034 | if (usb_endpoint_xfer_control(&ep->desc) || |
| 994 | usb_endpoint_xfer_bulk(&ep->desc)) | 1035 | usb_endpoint_xfer_bulk(&ep->desc)) { |
| 995 | interval = ep->desc.bInterval; | 1036 | interval = ep->desc.bInterval; |
| 1037 | break; | ||
| 1038 | } | ||
| 996 | /* Fall through - SS and HS isoc/int have same decoding */ | 1039 | /* Fall through - SS and HS isoc/int have same decoding */ |
| 1040 | |||
| 997 | case USB_SPEED_SUPER: | 1041 | case USB_SPEED_SUPER: |
| 998 | if (usb_endpoint_xfer_int(&ep->desc) || | 1042 | if (usb_endpoint_xfer_int(&ep->desc) || |
| 999 | usb_endpoint_xfer_isoc(&ep->desc)) { | 1043 | usb_endpoint_xfer_isoc(&ep->desc)) { |
| 1000 | if (ep->desc.bInterval == 0) | 1044 | interval = xhci_parse_exponent_interval(udev, ep); |
| 1001 | interval = 0; | ||
| 1002 | else | ||
| 1003 | interval = ep->desc.bInterval - 1; | ||
| 1004 | if (interval > 15) | ||
| 1005 | interval = 15; | ||
| 1006 | if (interval != ep->desc.bInterval + 1) | ||
| 1007 | dev_warn(&udev->dev, "ep %#x - rounding interval to %d microframes\n", | ||
| 1008 | ep->desc.bEndpointAddress, 1 << interval); | ||
| 1009 | } | 1045 | } |
| 1010 | break; | 1046 | break; |
| 1011 | /* Convert bInterval (in 1-255 frames) to microframes and round down to | 1047 | |
| 1012 | * nearest power of 2. | ||
| 1013 | */ | ||
| 1014 | case USB_SPEED_FULL: | 1048 | case USB_SPEED_FULL: |
| 1049 | if (usb_endpoint_xfer_int(&ep->desc)) { | ||
| 1050 | interval = xhci_parse_exponent_interval(udev, ep); | ||
| 1051 | break; | ||
| 1052 | } | ||
| 1053 | /* | ||
| 1054 | * Fall through for isochronous endpoint interval decoding | ||
| 1055 | * since it uses the same rules as low speed interrupt | ||
| 1056 | * endpoints. | ||
| 1057 | */ | ||
| 1058 | |||
| 1015 | case USB_SPEED_LOW: | 1059 | case USB_SPEED_LOW: |
| 1016 | if (usb_endpoint_xfer_int(&ep->desc) || | 1060 | if (usb_endpoint_xfer_int(&ep->desc) || |
| 1017 | usb_endpoint_xfer_isoc(&ep->desc)) { | 1061 | usb_endpoint_xfer_isoc(&ep->desc)) { |
| 1018 | interval = fls(8*ep->desc.bInterval) - 1; | 1062 | |
| 1019 | if (interval > 10) | 1063 | interval = xhci_parse_frame_interval(udev, ep); |
| 1020 | interval = 10; | ||
| 1021 | if (interval < 3) | ||
| 1022 | interval = 3; | ||
| 1023 | if ((1 << interval) != 8*ep->desc.bInterval) | ||
| 1024 | dev_warn(&udev->dev, | ||
| 1025 | "ep %#x - rounding interval" | ||
| 1026 | " to %d microframes, " | ||
| 1027 | "ep desc says %d microframes\n", | ||
| 1028 | ep->desc.bEndpointAddress, | ||
| 1029 | 1 << interval, | ||
| 1030 | 8*ep->desc.bInterval); | ||
| 1031 | } | 1064 | } |
| 1032 | break; | 1065 | break; |
| 1066 | |||
| 1033 | default: | 1067 | default: |
| 1034 | BUG(); | 1068 | BUG(); |
| 1035 | } | 1069 | } |
| @@ -1041,7 +1075,7 @@ static inline unsigned int xhci_get_endpoint_interval(struct usb_device *udev, | |||
| 1041 | * transaction opportunities per microframe", but that goes in the Max Burst | 1075 | * transaction opportunities per microframe", but that goes in the Max Burst |
| 1042 | * endpoint context field. | 1076 | * endpoint context field. |
| 1043 | */ | 1077 | */ |
| 1044 | static inline u32 xhci_get_endpoint_mult(struct usb_device *udev, | 1078 | static u32 xhci_get_endpoint_mult(struct usb_device *udev, |
| 1045 | struct usb_host_endpoint *ep) | 1079 | struct usb_host_endpoint *ep) |
| 1046 | { | 1080 | { |
| 1047 | if (udev->speed != USB_SPEED_SUPER || | 1081 | if (udev->speed != USB_SPEED_SUPER || |
| @@ -1050,7 +1084,7 @@ static inline u32 xhci_get_endpoint_mult(struct usb_device *udev, | |||
| 1050 | return ep->ss_ep_comp.bmAttributes; | 1084 | return ep->ss_ep_comp.bmAttributes; |
| 1051 | } | 1085 | } |
| 1052 | 1086 | ||
| 1053 | static inline u32 xhci_get_endpoint_type(struct usb_device *udev, | 1087 | static u32 xhci_get_endpoint_type(struct usb_device *udev, |
| 1054 | struct usb_host_endpoint *ep) | 1088 | struct usb_host_endpoint *ep) |
| 1055 | { | 1089 | { |
| 1056 | int in; | 1090 | int in; |
| @@ -1084,7 +1118,7 @@ static inline u32 xhci_get_endpoint_type(struct usb_device *udev, | |||
| 1084 | * Basically, this is the maxpacket size, multiplied by the burst size | 1118 | * Basically, this is the maxpacket size, multiplied by the burst size |
| 1085 | * and mult size. | 1119 | * and mult size. |
| 1086 | */ | 1120 | */ |
| 1087 | static inline u32 xhci_get_max_esit_payload(struct xhci_hcd *xhci, | 1121 | static u32 xhci_get_max_esit_payload(struct xhci_hcd *xhci, |
| 1088 | struct usb_device *udev, | 1122 | struct usb_device *udev, |
| 1089 | struct usb_host_endpoint *ep) | 1123 | struct usb_host_endpoint *ep) |
| 1090 | { | 1124 | { |
| @@ -1727,12 +1761,12 @@ static void xhci_add_in_port(struct xhci_hcd *xhci, unsigned int num_ports, | |||
| 1727 | * found a similar duplicate. | 1761 | * found a similar duplicate. |
| 1728 | */ | 1762 | */ |
| 1729 | if (xhci->port_array[i] != major_revision && | 1763 | if (xhci->port_array[i] != major_revision && |
| 1730 | xhci->port_array[i] != (u8) -1) { | 1764 | xhci->port_array[i] != DUPLICATE_ENTRY) { |
| 1731 | if (xhci->port_array[i] == 0x03) | 1765 | if (xhci->port_array[i] == 0x03) |
| 1732 | xhci->num_usb3_ports--; | 1766 | xhci->num_usb3_ports--; |
| 1733 | else | 1767 | else |
| 1734 | xhci->num_usb2_ports--; | 1768 | xhci->num_usb2_ports--; |
| 1735 | xhci->port_array[i] = (u8) -1; | 1769 | xhci->port_array[i] = DUPLICATE_ENTRY; |
| 1736 | } | 1770 | } |
| 1737 | /* FIXME: Should we disable the port? */ | 1771 | /* FIXME: Should we disable the port? */ |
| 1738 | continue; | 1772 | continue; |
| @@ -1831,7 +1865,7 @@ static int xhci_setup_port_arrays(struct xhci_hcd *xhci, gfp_t flags) | |||
| 1831 | for (i = 0; i < num_ports; i++) { | 1865 | for (i = 0; i < num_ports; i++) { |
| 1832 | if (xhci->port_array[i] == 0x03 || | 1866 | if (xhci->port_array[i] == 0x03 || |
| 1833 | xhci->port_array[i] == 0 || | 1867 | xhci->port_array[i] == 0 || |
| 1834 | xhci->port_array[i] == -1) | 1868 | xhci->port_array[i] == DUPLICATE_ENTRY) |
| 1835 | continue; | 1869 | continue; |
| 1836 | 1870 | ||
| 1837 | xhci->usb2_ports[port_index] = | 1871 | xhci->usb2_ports[port_index] = |
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index ceea9f33491c..a10494c2f3c7 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c | |||
| @@ -114,6 +114,10 @@ static int xhci_pci_setup(struct usb_hcd *hcd) | |||
| 114 | if (pdev->vendor == PCI_VENDOR_ID_NEC) | 114 | if (pdev->vendor == PCI_VENDOR_ID_NEC) |
| 115 | xhci->quirks |= XHCI_NEC_HOST; | 115 | xhci->quirks |= XHCI_NEC_HOST; |
| 116 | 116 | ||
| 117 | /* AMD PLL quirk */ | ||
| 118 | if (pdev->vendor == PCI_VENDOR_ID_AMD && usb_amd_find_chipset_info()) | ||
| 119 | xhci->quirks |= XHCI_AMD_PLL_FIX; | ||
| 120 | |||
| 117 | /* Make sure the HC is halted. */ | 121 | /* Make sure the HC is halted. */ |
| 118 | retval = xhci_halt(xhci); | 122 | retval = xhci_halt(xhci); |
| 119 | if (retval) | 123 | if (retval) |
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index cfc1ad92473f..7437386a9a50 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
| @@ -93,7 +93,7 @@ dma_addr_t xhci_trb_virt_to_dma(struct xhci_segment *seg, | |||
| 93 | /* Does this link TRB point to the first segment in a ring, | 93 | /* Does this link TRB point to the first segment in a ring, |
| 94 | * or was the previous TRB the last TRB on the last segment in the ERST? | 94 | * or was the previous TRB the last TRB on the last segment in the ERST? |
| 95 | */ | 95 | */ |
| 96 | static inline bool last_trb_on_last_seg(struct xhci_hcd *xhci, struct xhci_ring *ring, | 96 | static bool last_trb_on_last_seg(struct xhci_hcd *xhci, struct xhci_ring *ring, |
| 97 | struct xhci_segment *seg, union xhci_trb *trb) | 97 | struct xhci_segment *seg, union xhci_trb *trb) |
| 98 | { | 98 | { |
| 99 | if (ring == xhci->event_ring) | 99 | if (ring == xhci->event_ring) |
| @@ -107,7 +107,7 @@ static inline bool last_trb_on_last_seg(struct xhci_hcd *xhci, struct xhci_ring | |||
| 107 | * segment? I.e. would the updated event TRB pointer step off the end of the | 107 | * segment? I.e. would the updated event TRB pointer step off the end of the |
| 108 | * event seg? | 108 | * event seg? |
| 109 | */ | 109 | */ |
| 110 | static inline int last_trb(struct xhci_hcd *xhci, struct xhci_ring *ring, | 110 | static int last_trb(struct xhci_hcd *xhci, struct xhci_ring *ring, |
| 111 | struct xhci_segment *seg, union xhci_trb *trb) | 111 | struct xhci_segment *seg, union xhci_trb *trb) |
| 112 | { | 112 | { |
| 113 | if (ring == xhci->event_ring) | 113 | if (ring == xhci->event_ring) |
| @@ -116,7 +116,7 @@ static inline int last_trb(struct xhci_hcd *xhci, struct xhci_ring *ring, | |||
| 116 | return (trb->link.control & TRB_TYPE_BITMASK) == TRB_TYPE(TRB_LINK); | 116 | return (trb->link.control & TRB_TYPE_BITMASK) == TRB_TYPE(TRB_LINK); |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | static inline int enqueue_is_link_trb(struct xhci_ring *ring) | 119 | static int enqueue_is_link_trb(struct xhci_ring *ring) |
| 120 | { | 120 | { |
| 121 | struct xhci_link_trb *link = &ring->enqueue->link; | 121 | struct xhci_link_trb *link = &ring->enqueue->link; |
| 122 | return ((link->control & TRB_TYPE_BITMASK) == TRB_TYPE(TRB_LINK)); | 122 | return ((link->control & TRB_TYPE_BITMASK) == TRB_TYPE(TRB_LINK)); |
| @@ -592,7 +592,7 @@ void xhci_queue_new_dequeue_state(struct xhci_hcd *xhci, | |||
| 592 | ep->ep_state |= SET_DEQ_PENDING; | 592 | ep->ep_state |= SET_DEQ_PENDING; |
| 593 | } | 593 | } |
| 594 | 594 | ||
| 595 | static inline void xhci_stop_watchdog_timer_in_irq(struct xhci_hcd *xhci, | 595 | static void xhci_stop_watchdog_timer_in_irq(struct xhci_hcd *xhci, |
| 596 | struct xhci_virt_ep *ep) | 596 | struct xhci_virt_ep *ep) |
| 597 | { | 597 | { |
| 598 | ep->ep_state &= ~EP_HALT_PENDING; | 598 | ep->ep_state &= ~EP_HALT_PENDING; |
| @@ -619,6 +619,13 @@ static void xhci_giveback_urb_in_irq(struct xhci_hcd *xhci, | |||
| 619 | 619 | ||
| 620 | /* Only giveback urb when this is the last td in urb */ | 620 | /* Only giveback urb when this is the last td in urb */ |
| 621 | if (urb_priv->td_cnt == urb_priv->length) { | 621 | if (urb_priv->td_cnt == urb_priv->length) { |
| 622 | if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) { | ||
| 623 | xhci_to_hcd(xhci)->self.bandwidth_isoc_reqs--; | ||
| 624 | if (xhci_to_hcd(xhci)->self.bandwidth_isoc_reqs == 0) { | ||
| 625 | if (xhci->quirks & XHCI_AMD_PLL_FIX) | ||
| 626 | usb_amd_quirk_pll_enable(); | ||
| 627 | } | ||
| 628 | } | ||
| 622 | usb_hcd_unlink_urb_from_ep(hcd, urb); | 629 | usb_hcd_unlink_urb_from_ep(hcd, urb); |
| 623 | xhci_dbg(xhci, "Giveback %s URB %p\n", adjective, urb); | 630 | xhci_dbg(xhci, "Giveback %s URB %p\n", adjective, urb); |
| 624 | 631 | ||
| @@ -1209,7 +1216,7 @@ static unsigned int find_faked_portnum_from_hw_portnum(struct usb_hcd *hcd, | |||
| 1209 | * Skip ports that don't have known speeds, or have duplicate | 1216 | * Skip ports that don't have known speeds, or have duplicate |
| 1210 | * Extended Capabilities port speed entries. | 1217 | * Extended Capabilities port speed entries. |
| 1211 | */ | 1218 | */ |
| 1212 | if (port_speed == 0 || port_speed == -1) | 1219 | if (port_speed == 0 || port_speed == DUPLICATE_ENTRY) |
| 1213 | continue; | 1220 | continue; |
| 1214 | 1221 | ||
| 1215 | /* | 1222 | /* |
| @@ -1235,6 +1242,7 @@ static void handle_port_status(struct xhci_hcd *xhci, | |||
| 1235 | u8 major_revision; | 1242 | u8 major_revision; |
| 1236 | struct xhci_bus_state *bus_state; | 1243 | struct xhci_bus_state *bus_state; |
| 1237 | u32 __iomem **port_array; | 1244 | u32 __iomem **port_array; |
| 1245 | bool bogus_port_status = false; | ||
| 1238 | 1246 | ||
| 1239 | /* Port status change events always have a successful completion code */ | 1247 | /* Port status change events always have a successful completion code */ |
| 1240 | if (GET_COMP_CODE(event->generic.field[2]) != COMP_SUCCESS) { | 1248 | if (GET_COMP_CODE(event->generic.field[2]) != COMP_SUCCESS) { |
| @@ -1247,6 +1255,7 @@ static void handle_port_status(struct xhci_hcd *xhci, | |||
| 1247 | max_ports = HCS_MAX_PORTS(xhci->hcs_params1); | 1255 | max_ports = HCS_MAX_PORTS(xhci->hcs_params1); |
| 1248 | if ((port_id <= 0) || (port_id > max_ports)) { | 1256 | if ((port_id <= 0) || (port_id > max_ports)) { |
| 1249 | xhci_warn(xhci, "Invalid port id %d\n", port_id); | 1257 | xhci_warn(xhci, "Invalid port id %d\n", port_id); |
| 1258 | bogus_port_status = true; | ||
| 1250 | goto cleanup; | 1259 | goto cleanup; |
| 1251 | } | 1260 | } |
| 1252 | 1261 | ||
| @@ -1258,12 +1267,14 @@ static void handle_port_status(struct xhci_hcd *xhci, | |||
| 1258 | xhci_warn(xhci, "Event for port %u not in " | 1267 | xhci_warn(xhci, "Event for port %u not in " |
| 1259 | "Extended Capabilities, ignoring.\n", | 1268 | "Extended Capabilities, ignoring.\n", |
| 1260 | port_id); | 1269 | port_id); |
| 1270 | bogus_port_status = true; | ||
| 1261 | goto cleanup; | 1271 | goto cleanup; |
| 1262 | } | 1272 | } |
| 1263 | if (major_revision == (u8) -1) { | 1273 | if (major_revision == DUPLICATE_ENTRY) { |
| 1264 | xhci_warn(xhci, "Event for port %u duplicated in" | 1274 | xhci_warn(xhci, "Event for port %u duplicated in" |
| 1265 | "Extended Capabilities, ignoring.\n", | 1275 | "Extended Capabilities, ignoring.\n", |
| 1266 | port_id); | 1276 | port_id); |
| 1277 | bogus_port_status = true; | ||
| 1267 | goto cleanup; | 1278 | goto cleanup; |
| 1268 | } | 1279 | } |
| 1269 | 1280 | ||
| @@ -1335,6 +1346,13 @@ cleanup: | |||
| 1335 | /* Update event ring dequeue pointer before dropping the lock */ | 1346 | /* Update event ring dequeue pointer before dropping the lock */ |
| 1336 | inc_deq(xhci, xhci->event_ring, true); | 1347 | inc_deq(xhci, xhci->event_ring, true); |
| 1337 | 1348 | ||
| 1349 | /* Don't make the USB core poll the roothub if we got a bad port status | ||
| 1350 | * change event. Besides, at that point we can't tell which roothub | ||
| 1351 | * (USB 2.0 or USB 3.0) to kick. | ||
| 1352 | */ | ||
| 1353 | if (bogus_port_status) | ||
| 1354 | return; | ||
| 1355 | |||
| 1338 | spin_unlock(&xhci->lock); | 1356 | spin_unlock(&xhci->lock); |
| 1339 | /* Pass this up to the core */ | 1357 | /* Pass this up to the core */ |
| 1340 | usb_hcd_poll_rh_status(hcd); | 1358 | usb_hcd_poll_rh_status(hcd); |
| @@ -1554,8 +1572,17 @@ td_cleanup: | |||
| 1554 | 1572 | ||
| 1555 | urb_priv->td_cnt++; | 1573 | urb_priv->td_cnt++; |
| 1556 | /* Giveback the urb when all the tds are completed */ | 1574 | /* Giveback the urb when all the tds are completed */ |
| 1557 | if (urb_priv->td_cnt == urb_priv->length) | 1575 | if (urb_priv->td_cnt == urb_priv->length) { |
| 1558 | ret = 1; | 1576 | ret = 1; |
| 1577 | if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) { | ||
| 1578 | xhci_to_hcd(xhci)->self.bandwidth_isoc_reqs--; | ||
| 1579 | if (xhci_to_hcd(xhci)->self.bandwidth_isoc_reqs | ||
| 1580 | == 0) { | ||
| 1581 | if (xhci->quirks & XHCI_AMD_PLL_FIX) | ||
| 1582 | usb_amd_quirk_pll_enable(); | ||
| 1583 | } | ||
| 1584 | } | ||
| 1585 | } | ||
| 1559 | } | 1586 | } |
| 1560 | 1587 | ||
| 1561 | return ret; | 1588 | return ret; |
| @@ -1675,71 +1702,52 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td, | |||
| 1675 | struct urb_priv *urb_priv; | 1702 | struct urb_priv *urb_priv; |
| 1676 | int idx; | 1703 | int idx; |
| 1677 | int len = 0; | 1704 | int len = 0; |
| 1678 | int skip_td = 0; | ||
| 1679 | union xhci_trb *cur_trb; | 1705 | union xhci_trb *cur_trb; |
| 1680 | struct xhci_segment *cur_seg; | 1706 | struct xhci_segment *cur_seg; |
| 1707 | struct usb_iso_packet_descriptor *frame; | ||
| 1681 | u32 trb_comp_code; | 1708 | u32 trb_comp_code; |
| 1709 | bool skip_td = false; | ||
| 1682 | 1710 | ||
| 1683 | ep_ring = xhci_dma_to_transfer_ring(ep, event->buffer); | 1711 | ep_ring = xhci_dma_to_transfer_ring(ep, event->buffer); |
| 1684 | trb_comp_code = GET_COMP_CODE(event->transfer_len); | 1712 | trb_comp_code = GET_COMP_CODE(event->transfer_len); |
| 1685 | urb_priv = td->urb->hcpriv; | 1713 | urb_priv = td->urb->hcpriv; |
| 1686 | idx = urb_priv->td_cnt; | 1714 | idx = urb_priv->td_cnt; |
| 1715 | frame = &td->urb->iso_frame_desc[idx]; | ||
| 1687 | 1716 | ||
| 1688 | if (ep->skip) { | 1717 | /* handle completion code */ |
| 1689 | /* The transfer is partly done */ | 1718 | switch (trb_comp_code) { |
| 1690 | *status = -EXDEV; | 1719 | case COMP_SUCCESS: |
| 1691 | td->urb->iso_frame_desc[idx].status = -EXDEV; | 1720 | frame->status = 0; |
| 1692 | } else { | 1721 | xhci_dbg(xhci, "Successful isoc transfer!\n"); |
| 1693 | /* handle completion code */ | 1722 | break; |
| 1694 | switch (trb_comp_code) { | 1723 | case COMP_SHORT_TX: |
| 1695 | case COMP_SUCCESS: | 1724 | frame->status = td->urb->transfer_flags & URB_SHORT_NOT_OK ? |
| 1696 | td->urb->iso_frame_desc[idx].status = 0; | 1725 | -EREMOTEIO : 0; |
| 1697 | xhci_dbg(xhci, "Successful isoc transfer!\n"); | 1726 | break; |
| 1698 | break; | 1727 | case COMP_BW_OVER: |
| 1699 | case COMP_SHORT_TX: | 1728 | frame->status = -ECOMM; |
| 1700 | if (td->urb->transfer_flags & URB_SHORT_NOT_OK) | 1729 | skip_td = true; |
| 1701 | td->urb->iso_frame_desc[idx].status = | 1730 | break; |
| 1702 | -EREMOTEIO; | 1731 | case COMP_BUFF_OVER: |
| 1703 | else | 1732 | case COMP_BABBLE: |
| 1704 | td->urb->iso_frame_desc[idx].status = 0; | 1733 | frame->status = -EOVERFLOW; |
| 1705 | break; | 1734 | skip_td = true; |
| 1706 | case COMP_BW_OVER: | 1735 | break; |
| 1707 | td->urb->iso_frame_desc[idx].status = -ECOMM; | 1736 | case COMP_STALL: |
| 1708 | skip_td = 1; | 1737 | frame->status = -EPROTO; |
| 1709 | break; | 1738 | skip_td = true; |
| 1710 | case COMP_BUFF_OVER: | 1739 | break; |
| 1711 | case COMP_BABBLE: | 1740 | case COMP_STOP: |
| 1712 | td->urb->iso_frame_desc[idx].status = -EOVERFLOW; | 1741 | case COMP_STOP_INVAL: |
| 1713 | skip_td = 1; | 1742 | break; |
| 1714 | break; | 1743 | default: |
| 1715 | case COMP_STALL: | 1744 | frame->status = -1; |
| 1716 | td->urb->iso_frame_desc[idx].status = -EPROTO; | 1745 | break; |
| 1717 | skip_td = 1; | ||
| 1718 | break; | ||
| 1719 | case COMP_STOP: | ||
| 1720 | case COMP_STOP_INVAL: | ||
| 1721 | break; | ||
| 1722 | default: | ||
| 1723 | td->urb->iso_frame_desc[idx].status = -1; | ||
| 1724 | break; | ||
| 1725 | } | ||
| 1726 | } | ||
| 1727 | |||
| 1728 | /* calc actual length */ | ||
| 1729 | if (ep->skip) { | ||
| 1730 | td->urb->iso_frame_desc[idx].actual_length = 0; | ||
| 1731 | /* Update ring dequeue pointer */ | ||
| 1732 | while (ep_ring->dequeue != td->last_trb) | ||
| 1733 | inc_deq(xhci, ep_ring, false); | ||
| 1734 | inc_deq(xhci, ep_ring, false); | ||
| 1735 | return finish_td(xhci, td, event_trb, event, ep, status, true); | ||
| 1736 | } | 1746 | } |
| 1737 | 1747 | ||
| 1738 | if (trb_comp_code == COMP_SUCCESS || skip_td == 1) { | 1748 | if (trb_comp_code == COMP_SUCCESS || skip_td) { |
| 1739 | td->urb->iso_frame_desc[idx].actual_length = | 1749 | frame->actual_length = frame->length; |
| 1740 | td->urb->iso_frame_desc[idx].length; | 1750 | td->urb->actual_length += frame->length; |
| 1741 | td->urb->actual_length += | ||
| 1742 | td->urb->iso_frame_desc[idx].length; | ||
| 1743 | } else { | 1751 | } else { |
| 1744 | for (cur_trb = ep_ring->dequeue, | 1752 | for (cur_trb = ep_ring->dequeue, |
| 1745 | cur_seg = ep_ring->deq_seg; cur_trb != event_trb; | 1753 | cur_seg = ep_ring->deq_seg; cur_trb != event_trb; |
| @@ -1755,7 +1763,7 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td, | |||
| 1755 | TRB_LEN(event->transfer_len); | 1763 | TRB_LEN(event->transfer_len); |
| 1756 | 1764 | ||
| 1757 | if (trb_comp_code != COMP_STOP_INVAL) { | 1765 | if (trb_comp_code != COMP_STOP_INVAL) { |
| 1758 | td->urb->iso_frame_desc[idx].actual_length = len; | 1766 | frame->actual_length = len; |
| 1759 | td->urb->actual_length += len; | 1767 | td->urb->actual_length += len; |
| 1760 | } | 1768 | } |
| 1761 | } | 1769 | } |
| @@ -1766,6 +1774,35 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td, | |||
| 1766 | return finish_td(xhci, td, event_trb, event, ep, status, false); | 1774 | return finish_td(xhci, td, event_trb, event, ep, status, false); |
| 1767 | } | 1775 | } |
| 1768 | 1776 | ||
| 1777 | static int skip_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td, | ||
| 1778 | struct xhci_transfer_event *event, | ||
| 1779 | struct xhci_virt_ep *ep, int *status) | ||
| 1780 | { | ||
| 1781 | struct xhci_ring *ep_ring; | ||
| 1782 | struct urb_priv *urb_priv; | ||
| 1783 | struct usb_iso_packet_descriptor *frame; | ||
| 1784 | int idx; | ||
| 1785 | |||
| 1786 | ep_ring = xhci_dma_to_transfer_ring(ep, event->buffer); | ||
| 1787 | urb_priv = td->urb->hcpriv; | ||
| 1788 | idx = urb_priv->td_cnt; | ||
| 1789 | frame = &td->urb->iso_frame_desc[idx]; | ||
| 1790 | |||
| 1791 | /* The transfer is partly done */ | ||
| 1792 | *status = -EXDEV; | ||
| 1793 | frame->status = -EXDEV; | ||
| 1794 | |||
| 1795 | /* calc actual length */ | ||
| 1796 | frame->actual_length = 0; | ||
| 1797 | |||
| 1798 | /* Update ring dequeue pointer */ | ||
| 1799 | while (ep_ring->dequeue != td->last_trb) | ||
| 1800 | inc_deq(xhci, ep_ring, false); | ||
| 1801 | inc_deq(xhci, ep_ring, false); | ||
| 1802 | |||
| 1803 | return finish_td(xhci, td, NULL, event, ep, status, true); | ||
| 1804 | } | ||
| 1805 | |||
| 1769 | /* | 1806 | /* |
| 1770 | * Process bulk and interrupt tds, update urb status and actual_length. | 1807 | * Process bulk and interrupt tds, update urb status and actual_length. |
| 1771 | */ | 1808 | */ |
| @@ -2024,36 +2061,42 @@ static int handle_tx_event(struct xhci_hcd *xhci, | |||
| 2024 | } | 2061 | } |
| 2025 | 2062 | ||
| 2026 | td = list_entry(ep_ring->td_list.next, struct xhci_td, td_list); | 2063 | td = list_entry(ep_ring->td_list.next, struct xhci_td, td_list); |
| 2064 | |||
| 2027 | /* Is this a TRB in the currently executing TD? */ | 2065 | /* Is this a TRB in the currently executing TD? */ |
| 2028 | event_seg = trb_in_td(ep_ring->deq_seg, ep_ring->dequeue, | 2066 | event_seg = trb_in_td(ep_ring->deq_seg, ep_ring->dequeue, |
| 2029 | td->last_trb, event_dma); | 2067 | td->last_trb, event_dma); |
| 2030 | if (event_seg && ep->skip) { | 2068 | if (!event_seg) { |
| 2069 | if (!ep->skip || | ||
| 2070 | !usb_endpoint_xfer_isoc(&td->urb->ep->desc)) { | ||
| 2071 | /* HC is busted, give up! */ | ||
| 2072 | xhci_err(xhci, | ||
| 2073 | "ERROR Transfer event TRB DMA ptr not " | ||
| 2074 | "part of current TD\n"); | ||
| 2075 | return -ESHUTDOWN; | ||
| 2076 | } | ||
| 2077 | |||
| 2078 | ret = skip_isoc_td(xhci, td, event, ep, &status); | ||
| 2079 | goto cleanup; | ||
| 2080 | } | ||
| 2081 | |||
| 2082 | if (ep->skip) { | ||
| 2031 | xhci_dbg(xhci, "Found td. Clear skip flag.\n"); | 2083 | xhci_dbg(xhci, "Found td. Clear skip flag.\n"); |
| 2032 | ep->skip = false; | 2084 | ep->skip = false; |
| 2033 | } | 2085 | } |
| 2034 | if (!event_seg && | ||
| 2035 | (!ep->skip || !usb_endpoint_xfer_isoc(&td->urb->ep->desc))) { | ||
| 2036 | /* HC is busted, give up! */ | ||
| 2037 | xhci_err(xhci, "ERROR Transfer event TRB DMA ptr not " | ||
| 2038 | "part of current TD\n"); | ||
| 2039 | return -ESHUTDOWN; | ||
| 2040 | } | ||
| 2041 | 2086 | ||
| 2042 | if (event_seg) { | 2087 | event_trb = &event_seg->trbs[(event_dma - event_seg->dma) / |
| 2043 | event_trb = &event_seg->trbs[(event_dma - | 2088 | sizeof(*event_trb)]; |
| 2044 | event_seg->dma) / sizeof(*event_trb)]; | 2089 | /* |
| 2045 | /* | 2090 | * No-op TRB should not trigger interrupts. |
| 2046 | * No-op TRB should not trigger interrupts. | 2091 | * If event_trb is a no-op TRB, it means the |
| 2047 | * If event_trb is a no-op TRB, it means the | 2092 | * corresponding TD has been cancelled. Just ignore |
| 2048 | * corresponding TD has been cancelled. Just ignore | 2093 | * the TD. |
| 2049 | * the TD. | 2094 | */ |
| 2050 | */ | 2095 | if ((event_trb->generic.field[3] & TRB_TYPE_BITMASK) |
| 2051 | if ((event_trb->generic.field[3] & TRB_TYPE_BITMASK) | 2096 | == TRB_TYPE(TRB_TR_NOOP)) { |
| 2052 | == TRB_TYPE(TRB_TR_NOOP)) { | 2097 | xhci_dbg(xhci, |
| 2053 | xhci_dbg(xhci, "event_trb is a no-op TRB. " | 2098 | "event_trb is a no-op TRB. Skip it\n"); |
| 2054 | "Skip it\n"); | 2099 | goto cleanup; |
| 2055 | goto cleanup; | ||
| 2056 | } | ||
| 2057 | } | 2100 | } |
| 2058 | 2101 | ||
| 2059 | /* Now update the urb's actual_length and give back to | 2102 | /* Now update the urb's actual_length and give back to |
| @@ -3126,6 +3169,12 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags, | |||
| 3126 | } | 3169 | } |
| 3127 | } | 3170 | } |
| 3128 | 3171 | ||
| 3172 | if (xhci_to_hcd(xhci)->self.bandwidth_isoc_reqs == 0) { | ||
| 3173 | if (xhci->quirks & XHCI_AMD_PLL_FIX) | ||
| 3174 | usb_amd_quirk_pll_disable(); | ||
| 3175 | } | ||
| 3176 | xhci_to_hcd(xhci)->self.bandwidth_isoc_reqs++; | ||
| 3177 | |||
| 3129 | giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id, | 3178 | giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id, |
| 3130 | start_cycle, start_trb); | 3179 | start_cycle, start_trb); |
| 3131 | return 0; | 3180 | return 0; |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 9a3645fd759b..81b976e45880 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
| @@ -550,6 +550,9 @@ void xhci_stop(struct usb_hcd *hcd) | |||
| 550 | del_timer_sync(&xhci->event_ring_timer); | 550 | del_timer_sync(&xhci->event_ring_timer); |
| 551 | #endif | 551 | #endif |
| 552 | 552 | ||
| 553 | if (xhci->quirks & XHCI_AMD_PLL_FIX) | ||
| 554 | usb_amd_dev_put(); | ||
| 555 | |||
| 553 | xhci_dbg(xhci, "// Disabling event ring interrupts\n"); | 556 | xhci_dbg(xhci, "// Disabling event ring interrupts\n"); |
| 554 | temp = xhci_readl(xhci, &xhci->op_regs->status); | 557 | temp = xhci_readl(xhci, &xhci->op_regs->status); |
| 555 | xhci_writel(xhci, temp & ~STS_EINT, &xhci->op_regs->status); | 558 | xhci_writel(xhci, temp & ~STS_EINT, &xhci->op_regs->status); |
| @@ -741,7 +744,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) | |||
| 741 | int retval; | 744 | int retval; |
| 742 | 745 | ||
| 743 | /* Wait a bit if either of the roothubs need to settle from the | 746 | /* Wait a bit if either of the roothubs need to settle from the |
| 744 | * transistion into bus suspend. | 747 | * transition into bus suspend. |
| 745 | */ | 748 | */ |
| 746 | if (time_before(jiffies, xhci->bus_state[0].next_statechange) || | 749 | if (time_before(jiffies, xhci->bus_state[0].next_statechange) || |
| 747 | time_before(jiffies, | 750 | time_before(jiffies, |
| @@ -771,7 +774,9 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) | |||
| 771 | 774 | ||
| 772 | /* If restore operation fails, re-initialize the HC during resume */ | 775 | /* If restore operation fails, re-initialize the HC during resume */ |
| 773 | if ((temp & STS_SRE) || hibernated) { | 776 | if ((temp & STS_SRE) || hibernated) { |
| 774 | usb_root_hub_lost_power(hcd->self.root_hub); | 777 | /* Let the USB core know _both_ roothubs lost power. */ |
| 778 | usb_root_hub_lost_power(xhci->main_hcd->self.root_hub); | ||
| 779 | usb_root_hub_lost_power(xhci->shared_hcd->self.root_hub); | ||
| 775 | 780 | ||
| 776 | xhci_dbg(xhci, "Stop HCD\n"); | 781 | xhci_dbg(xhci, "Stop HCD\n"); |
| 777 | xhci_halt(xhci); | 782 | xhci_halt(xhci); |
| @@ -2072,7 +2077,7 @@ int xhci_alloc_streams(struct usb_hcd *hcd, struct usb_device *udev, | |||
| 2072 | return -EINVAL; | 2077 | return -EINVAL; |
| 2073 | } | 2078 | } |
| 2074 | vdev = xhci->devs[udev->slot_id]; | 2079 | vdev = xhci->devs[udev->slot_id]; |
| 2075 | /* Mark each endpoint as being in transistion, so | 2080 | /* Mark each endpoint as being in transition, so |
| 2076 | * xhci_urb_enqueue() will reject all URBs. | 2081 | * xhci_urb_enqueue() will reject all URBs. |
| 2077 | */ | 2082 | */ |
| 2078 | for (i = 0; i < num_eps; i++) { | 2083 | for (i = 0; i < num_eps; i++) { |
| @@ -2386,10 +2391,18 @@ int xhci_discover_or_reset_device(struct usb_hcd *hcd, struct usb_device *udev) | |||
| 2386 | /* Everything but endpoint 0 is disabled, so free or cache the rings. */ | 2391 | /* Everything but endpoint 0 is disabled, so free or cache the rings. */ |
| 2387 | last_freed_endpoint = 1; | 2392 | last_freed_endpoint = 1; |
| 2388 | for (i = 1; i < 31; ++i) { | 2393 | for (i = 1; i < 31; ++i) { |
| 2389 | if (!virt_dev->eps[i].ring) | 2394 | struct xhci_virt_ep *ep = &virt_dev->eps[i]; |
| 2390 | continue; | 2395 | |
| 2391 | xhci_free_or_cache_endpoint_ring(xhci, virt_dev, i); | 2396 | if (ep->ep_state & EP_HAS_STREAMS) { |
| 2392 | last_freed_endpoint = i; | 2397 | xhci_free_stream_info(xhci, ep->stream_info); |
| 2398 | ep->stream_info = NULL; | ||
| 2399 | ep->ep_state &= ~EP_HAS_STREAMS; | ||
| 2400 | } | ||
| 2401 | |||
| 2402 | if (ep->ring) { | ||
| 2403 | xhci_free_or_cache_endpoint_ring(xhci, virt_dev, i); | ||
| 2404 | last_freed_endpoint = i; | ||
| 2405 | } | ||
| 2393 | } | 2406 | } |
| 2394 | xhci_dbg(xhci, "Output context after successful reset device cmd:\n"); | 2407 | xhci_dbg(xhci, "Output context after successful reset device cmd:\n"); |
| 2395 | xhci_dbg_ctx(xhci, virt_dev->out_ctx, last_freed_endpoint); | 2408 | xhci_dbg_ctx(xhci, virt_dev->out_ctx, last_freed_endpoint); |
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 711de253bc0f..ba1be6b7cc6d 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | 30 | ||
| 31 | /* Code sharing between pci-quirks and xhci hcd */ | 31 | /* Code sharing between pci-quirks and xhci hcd */ |
| 32 | #include "xhci-ext-caps.h" | 32 | #include "xhci-ext-caps.h" |
| 33 | #include "pci-quirks.h" | ||
| 33 | 34 | ||
| 34 | /* xHCI PCI Configuration Registers */ | 35 | /* xHCI PCI Configuration Registers */ |
| 35 | #define XHCI_SBRN_OFFSET (0x60) | 36 | #define XHCI_SBRN_OFFSET (0x60) |
| @@ -232,7 +233,7 @@ struct xhci_op_regs { | |||
| 232 | * notification type that matches a bit set in this bit field. | 233 | * notification type that matches a bit set in this bit field. |
| 233 | */ | 234 | */ |
| 234 | #define DEV_NOTE_MASK (0xffff) | 235 | #define DEV_NOTE_MASK (0xffff) |
| 235 | #define ENABLE_DEV_NOTE(x) (1 << x) | 236 | #define ENABLE_DEV_NOTE(x) (1 << (x)) |
| 236 | /* Most of the device notification types should only be used for debug. | 237 | /* Most of the device notification types should only be used for debug. |
| 237 | * SW does need to pay attention to function wake notifications. | 238 | * SW does need to pay attention to function wake notifications. |
| 238 | */ | 239 | */ |
| @@ -348,6 +349,9 @@ struct xhci_op_regs { | |||
| 348 | /* Initiate a warm port reset - complete when PORT_WRC is '1' */ | 349 | /* Initiate a warm port reset - complete when PORT_WRC is '1' */ |
| 349 | #define PORT_WR (1 << 31) | 350 | #define PORT_WR (1 << 31) |
| 350 | 351 | ||
| 352 | /* We mark duplicate entries with -1 */ | ||
| 353 | #define DUPLICATE_ENTRY ((u8)(-1)) | ||
| 354 | |||
| 351 | /* Port Power Management Status and Control - port_power_base bitmasks */ | 355 | /* Port Power Management Status and Control - port_power_base bitmasks */ |
| 352 | /* Inactivity timer value for transitions into U1, in microseconds. | 356 | /* Inactivity timer value for transitions into U1, in microseconds. |
| 353 | * Timeout can be up to 127us. 0xFF means an infinite timeout. | 357 | * Timeout can be up to 127us. 0xFF means an infinite timeout. |
| @@ -601,11 +605,11 @@ struct xhci_ep_ctx { | |||
| 601 | #define EP_STATE_STOPPED 3 | 605 | #define EP_STATE_STOPPED 3 |
| 602 | #define EP_STATE_ERROR 4 | 606 | #define EP_STATE_ERROR 4 |
| 603 | /* Mult - Max number of burtst within an interval, in EP companion desc. */ | 607 | /* Mult - Max number of burtst within an interval, in EP companion desc. */ |
| 604 | #define EP_MULT(p) ((p & 0x3) << 8) | 608 | #define EP_MULT(p) (((p) & 0x3) << 8) |
| 605 | /* bits 10:14 are Max Primary Streams */ | 609 | /* bits 10:14 are Max Primary Streams */ |
| 606 | /* bit 15 is Linear Stream Array */ | 610 | /* bit 15 is Linear Stream Array */ |
| 607 | /* Interval - period between requests to an endpoint - 125u increments. */ | 611 | /* Interval - period between requests to an endpoint - 125u increments. */ |
| 608 | #define EP_INTERVAL(p) ((p & 0xff) << 16) | 612 | #define EP_INTERVAL(p) (((p) & 0xff) << 16) |
| 609 | #define EP_INTERVAL_TO_UFRAMES(p) (1 << (((p) >> 16) & 0xff)) | 613 | #define EP_INTERVAL_TO_UFRAMES(p) (1 << (((p) >> 16) & 0xff)) |
| 610 | #define EP_MAXPSTREAMS_MASK (0x1f << 10) | 614 | #define EP_MAXPSTREAMS_MASK (0x1f << 10) |
| 611 | #define EP_MAXPSTREAMS(p) (((p) << 10) & EP_MAXPSTREAMS_MASK) | 615 | #define EP_MAXPSTREAMS(p) (((p) << 10) & EP_MAXPSTREAMS_MASK) |
| @@ -873,7 +877,7 @@ struct xhci_transfer_event { | |||
| 873 | #define COMP_CMD_ABORT 25 | 877 | #define COMP_CMD_ABORT 25 |
| 874 | /* Stopped - transfer was terminated by a stop endpoint command */ | 878 | /* Stopped - transfer was terminated by a stop endpoint command */ |
| 875 | #define COMP_STOP 26 | 879 | #define COMP_STOP 26 |
| 876 | /* Same as COMP_EP_STOPPED, but the transfered length in the event is invalid */ | 880 | /* Same as COMP_EP_STOPPED, but the transferred length in the event is invalid */ |
| 877 | #define COMP_STOP_INVAL 27 | 881 | #define COMP_STOP_INVAL 27 |
| 878 | /* Control Abort Error - Debug Capability - control pipe aborted */ | 882 | /* Control Abort Error - Debug Capability - control pipe aborted */ |
| 879 | #define COMP_DBG_ABORT 28 | 883 | #define COMP_DBG_ABORT 28 |
| @@ -1276,6 +1280,7 @@ struct xhci_hcd { | |||
| 1276 | #define XHCI_LINK_TRB_QUIRK (1 << 0) | 1280 | #define XHCI_LINK_TRB_QUIRK (1 << 0) |
| 1277 | #define XHCI_RESET_EP_QUIRK (1 << 1) | 1281 | #define XHCI_RESET_EP_QUIRK (1 << 1) |
| 1278 | #define XHCI_NEC_HOST (1 << 2) | 1282 | #define XHCI_NEC_HOST (1 << 2) |
| 1283 | #define XHCI_AMD_PLL_FIX (1 << 3) | ||
| 1279 | /* There are two roothubs to keep track of bus suspend info for */ | 1284 | /* There are two roothubs to keep track of bus suspend info for */ |
| 1280 | struct xhci_bus_state bus_state[2]; | 1285 | struct xhci_bus_state bus_state[2]; |
| 1281 | /* Is each xHCI roothub port a USB 3.0, USB 2.0, or USB 1.1 port? */ | 1286 | /* Is each xHCI roothub port a USB 3.0, USB 2.0, or USB 1.1 port? */ |
diff --git a/drivers/usb/image/microtek.c b/drivers/usb/image/microtek.c index c90c89dc0003..a0037961e5bd 100644 --- a/drivers/usb/image/microtek.c +++ b/drivers/usb/image/microtek.c | |||
| @@ -69,7 +69,7 @@ | |||
| 69 | * 20000513 added IDs for all products supported by Windows driver (john) | 69 | * 20000513 added IDs for all products supported by Windows driver (john) |
| 70 | * 20000514 Rewrote mts_scsi_queuecommand to use URBs (john) | 70 | * 20000514 Rewrote mts_scsi_queuecommand to use URBs (john) |
| 71 | * 20000514 Version 0.0.8j | 71 | * 20000514 Version 0.0.8j |
| 72 | * 20000514 Fix reporting of non-existant devices to SCSI layer (john) | 72 | * 20000514 Fix reporting of non-existent devices to SCSI layer (john) |
| 73 | * 20000514 Added MTS_DEBUG_INT (john) | 73 | * 20000514 Added MTS_DEBUG_INT (john) |
| 74 | * 20000514 Changed "usb-microtek" to "microtek" for consistency (john) | 74 | * 20000514 Changed "usb-microtek" to "microtek" for consistency (john) |
| 75 | * 20000514 Stupid bug fixes (john) | 75 | * 20000514 Stupid bug fixes (john) |
| @@ -557,14 +557,14 @@ mts_build_transfer_context(struct scsi_cmnd *srb, struct mts_desc* desc) | |||
| 557 | 557 | ||
| 558 | if ( !memcmp( srb->cmnd, mts_read_image_sig, mts_read_image_sig_len ) | 558 | if ( !memcmp( srb->cmnd, mts_read_image_sig, mts_read_image_sig_len ) |
| 559 | ) { pipe = usb_rcvbulkpipe(desc->usb_dev,desc->ep_image); | 559 | ) { pipe = usb_rcvbulkpipe(desc->usb_dev,desc->ep_image); |
| 560 | MTS_DEBUG( "transfering from desc->ep_image == %d\n", | 560 | MTS_DEBUG( "transferring from desc->ep_image == %d\n", |
| 561 | (int)desc->ep_image ); | 561 | (int)desc->ep_image ); |
| 562 | } else if ( MTS_DIRECTION_IS_IN(srb->cmnd[0]) ) { | 562 | } else if ( MTS_DIRECTION_IS_IN(srb->cmnd[0]) ) { |
| 563 | pipe = usb_rcvbulkpipe(desc->usb_dev,desc->ep_response); | 563 | pipe = usb_rcvbulkpipe(desc->usb_dev,desc->ep_response); |
| 564 | MTS_DEBUG( "transfering from desc->ep_response == %d\n", | 564 | MTS_DEBUG( "transferring from desc->ep_response == %d\n", |
| 565 | (int)desc->ep_response); | 565 | (int)desc->ep_response); |
| 566 | } else { | 566 | } else { |
| 567 | MTS_DEBUG("transfering to desc->ep_out == %d\n", | 567 | MTS_DEBUG("transferring to desc->ep_out == %d\n", |
| 568 | (int)desc->ep_out); | 568 | (int)desc->ep_out); |
| 569 | pipe = usb_sndbulkpipe(desc->usb_dev,desc->ep_out); | 569 | pipe = usb_sndbulkpipe(desc->usb_dev,desc->ep_out); |
| 570 | } | 570 | } |
diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c index e573e4704015..a2190b983f52 100644 --- a/drivers/usb/misc/iowarrior.c +++ b/drivers/usb/misc/iowarrior.c | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | #ifdef CONFIG_USB_DYNAMIC_MINORS | 40 | #ifdef CONFIG_USB_DYNAMIC_MINORS |
| 41 | #define IOWARRIOR_MINOR_BASE 0 | 41 | #define IOWARRIOR_MINOR_BASE 0 |
| 42 | #else | 42 | #else |
| 43 | #define IOWARRIOR_MINOR_BASE 208 // SKELETON_MINOR_BASE 192 + 16, not offical yet | 43 | #define IOWARRIOR_MINOR_BASE 208 // SKELETON_MINOR_BASE 192 + 16, not official yet |
| 44 | #endif | 44 | #endif |
| 45 | 45 | ||
| 46 | /* interrupt input queue size */ | 46 | /* interrupt input queue size */ |
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig index 4cbb7e4b368d..74073b363c30 100644 --- a/drivers/usb/musb/Kconfig +++ b/drivers/usb/musb/Kconfig | |||
| @@ -14,7 +14,7 @@ config USB_MUSB_HDRC | |||
| 14 | select TWL4030_USB if MACH_OMAP_3430SDP | 14 | select TWL4030_USB if MACH_OMAP_3430SDP |
| 15 | select TWL6030_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA | 15 | select TWL6030_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA |
| 16 | select USB_OTG_UTILS | 16 | select USB_OTG_UTILS |
| 17 | tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)' | 17 | bool 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)' |
| 18 | help | 18 | help |
| 19 | Say Y here if your system has a dual role high speed USB | 19 | Say Y here if your system has a dual role high speed USB |
| 20 | controller based on the Mentor Graphics silicon IP. Then | 20 | controller based on the Mentor Graphics silicon IP. Then |
| @@ -30,8 +30,8 @@ config USB_MUSB_HDRC | |||
| 30 | 30 | ||
| 31 | If you do not know what this is, please say N. | 31 | If you do not know what this is, please say N. |
| 32 | 32 | ||
| 33 | To compile this driver as a module, choose M here; the | 33 | # To compile this driver as a module, choose M here; the |
| 34 | module will be called "musb-hdrc". | 34 | # module will be called "musb-hdrc". |
| 35 | 35 | ||
| 36 | choice | 36 | choice |
| 37 | prompt "Platform Glue Layer" | 37 | prompt "Platform Glue Layer" |
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c index 52312e8af213..8e2a1ff8a35a 100644 --- a/drivers/usb/musb/blackfin.c +++ b/drivers/usb/musb/blackfin.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <asm/cacheflush.h> | 21 | #include <asm/cacheflush.h> |
| 22 | 22 | ||
| 23 | #include "musb_core.h" | 23 | #include "musb_core.h" |
| 24 | #include "musbhsdma.h" | ||
| 24 | #include "blackfin.h" | 25 | #include "blackfin.h" |
| 25 | 26 | ||
| 26 | struct bfin_glue { | 27 | struct bfin_glue { |
| @@ -332,6 +333,27 @@ static int bfin_musb_set_mode(struct musb *musb, u8 musb_mode) | |||
| 332 | return -EIO; | 333 | return -EIO; |
| 333 | } | 334 | } |
| 334 | 335 | ||
| 336 | static int bfin_musb_adjust_channel_params(struct dma_channel *channel, | ||
| 337 | u16 packet_sz, u8 *mode, | ||
| 338 | dma_addr_t *dma_addr, u32 *len) | ||
| 339 | { | ||
| 340 | struct musb_dma_channel *musb_channel = channel->private_data; | ||
| 341 | |||
| 342 | /* | ||
| 343 | * Anomaly 05000450 might cause data corruption when using DMA | ||
| 344 | * MODE 1 transmits with short packet. So to work around this, | ||
| 345 | * we truncate all MODE 1 transfers down to a multiple of the | ||
| 346 | * max packet size, and then do the last short packet transfer | ||
| 347 | * (if there is any) using MODE 0. | ||
| 348 | */ | ||
| 349 | if (ANOMALY_05000450) { | ||
| 350 | if (musb_channel->transmit && *mode == 1) | ||
| 351 | *len = *len - (*len % packet_sz); | ||
| 352 | } | ||
| 353 | |||
| 354 | return 0; | ||
| 355 | } | ||
| 356 | |||
| 335 | static void bfin_musb_reg_init(struct musb *musb) | 357 | static void bfin_musb_reg_init(struct musb *musb) |
| 336 | { | 358 | { |
| 337 | if (ANOMALY_05000346) { | 359 | if (ANOMALY_05000346) { |
| @@ -430,6 +452,8 @@ static const struct musb_platform_ops bfin_ops = { | |||
| 430 | 452 | ||
| 431 | .vbus_status = bfin_musb_vbus_status, | 453 | .vbus_status = bfin_musb_vbus_status, |
| 432 | .set_vbus = bfin_musb_set_vbus, | 454 | .set_vbus = bfin_musb_set_vbus, |
| 455 | |||
| 456 | .adjust_channel_params = bfin_musb_adjust_channel_params, | ||
| 433 | }; | 457 | }; |
| 434 | 458 | ||
| 435 | static u64 bfin_dmamask = DMA_BIT_MASK(32); | 459 | static u64 bfin_dmamask = DMA_BIT_MASK(32); |
diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c index de55a3c3259a..ab434fbd8c35 100644 --- a/drivers/usb/musb/cppi_dma.c +++ b/drivers/usb/musb/cppi_dma.c | |||
| @@ -597,12 +597,12 @@ cppi_next_tx_segment(struct musb *musb, struct cppi_channel *tx) | |||
| 597 | length = min(n_bds * maxpacket, length); | 597 | length = min(n_bds * maxpacket, length); |
| 598 | } | 598 | } |
| 599 | 599 | ||
| 600 | DBG(4, "TX DMA%d, pktSz %d %s bds %d dma 0x%x len %u\n", | 600 | DBG(4, "TX DMA%d, pktSz %d %s bds %d dma 0x%llx len %u\n", |
| 601 | tx->index, | 601 | tx->index, |
| 602 | maxpacket, | 602 | maxpacket, |
| 603 | rndis ? "rndis" : "transparent", | 603 | rndis ? "rndis" : "transparent", |
| 604 | n_bds, | 604 | n_bds, |
| 605 | addr, length); | 605 | (unsigned long long)addr, length); |
| 606 | 606 | ||
| 607 | cppi_rndis_update(tx, 0, musb->ctrl_base, rndis); | 607 | cppi_rndis_update(tx, 0, musb->ctrl_base, rndis); |
| 608 | 608 | ||
| @@ -820,7 +820,7 @@ cppi_next_rx_segment(struct musb *musb, struct cppi_channel *rx, int onepacket) | |||
| 820 | length = min(n_bds * maxpacket, length); | 820 | length = min(n_bds * maxpacket, length); |
| 821 | 821 | ||
| 822 | DBG(4, "RX DMA%d seg, maxp %d %s bds %d (cnt %d) " | 822 | DBG(4, "RX DMA%d seg, maxp %d %s bds %d (cnt %d) " |
| 823 | "dma 0x%x len %u %u/%u\n", | 823 | "dma 0x%llx len %u %u/%u\n", |
| 824 | rx->index, maxpacket, | 824 | rx->index, maxpacket, |
| 825 | onepacket | 825 | onepacket |
| 826 | ? (is_rndis ? "rndis" : "onepacket") | 826 | ? (is_rndis ? "rndis" : "onepacket") |
| @@ -829,7 +829,8 @@ cppi_next_rx_segment(struct musb *musb, struct cppi_channel *rx, int onepacket) | |||
| 829 | musb_readl(tibase, | 829 | musb_readl(tibase, |
| 830 | DAVINCI_RXCPPI_BUFCNT0_REG + (rx->index * 4)) | 830 | DAVINCI_RXCPPI_BUFCNT0_REG + (rx->index * 4)) |
| 831 | & 0xffff, | 831 | & 0xffff, |
| 832 | addr, length, rx->channel.actual_len, rx->buf_len); | 832 | (unsigned long long)addr, length, |
| 833 | rx->channel.actual_len, rx->buf_len); | ||
| 833 | 834 | ||
| 834 | /* only queue one segment at a time, since the hardware prevents | 835 | /* only queue one segment at a time, since the hardware prevents |
| 835 | * correct queue shutdown after unexpected short packets | 836 | * correct queue shutdown after unexpected short packets |
| @@ -1039,9 +1040,9 @@ static bool cppi_rx_scan(struct cppi *cppi, unsigned ch) | |||
| 1039 | if (!completed && (bd->hw_options & CPPI_OWN_SET)) | 1040 | if (!completed && (bd->hw_options & CPPI_OWN_SET)) |
| 1040 | break; | 1041 | break; |
| 1041 | 1042 | ||
| 1042 | DBG(5, "C/RXBD %08x: nxt %08x buf %08x " | 1043 | DBG(5, "C/RXBD %llx: nxt %08x buf %08x " |
| 1043 | "off.len %08x opt.len %08x (%d)\n", | 1044 | "off.len %08x opt.len %08x (%d)\n", |
| 1044 | bd->dma, bd->hw_next, bd->hw_bufp, | 1045 | (unsigned long long)bd->dma, bd->hw_next, bd->hw_bufp, |
| 1045 | bd->hw_off_len, bd->hw_options, | 1046 | bd->hw_off_len, bd->hw_options, |
| 1046 | rx->channel.actual_len); | 1047 | rx->channel.actual_len); |
| 1047 | 1048 | ||
| @@ -1111,11 +1112,12 @@ static bool cppi_rx_scan(struct cppi *cppi, unsigned ch) | |||
| 1111 | musb_ep_select(cppi->mregs, rx->index + 1); | 1112 | musb_ep_select(cppi->mregs, rx->index + 1); |
| 1112 | csr = musb_readw(regs, MUSB_RXCSR); | 1113 | csr = musb_readw(regs, MUSB_RXCSR); |
| 1113 | if (csr & MUSB_RXCSR_DMAENAB) { | 1114 | if (csr & MUSB_RXCSR_DMAENAB) { |
| 1114 | DBG(4, "list%d %p/%p, last %08x%s, csr %04x\n", | 1115 | DBG(4, "list%d %p/%p, last %llx%s, csr %04x\n", |
| 1115 | rx->index, | 1116 | rx->index, |
| 1116 | rx->head, rx->tail, | 1117 | rx->head, rx->tail, |
| 1117 | rx->last_processed | 1118 | rx->last_processed |
| 1118 | ? rx->last_processed->dma | 1119 | ? (unsigned long long) |
| 1120 | rx->last_processed->dma | ||
| 1119 | : 0, | 1121 | : 0, |
| 1120 | completed ? ", completed" : "", | 1122 | completed ? ", completed" : "", |
| 1121 | csr); | 1123 | csr); |
| @@ -1167,8 +1169,11 @@ irqreturn_t cppi_interrupt(int irq, void *dev_id) | |||
| 1167 | tx = musb_readl(tibase, DAVINCI_TXCPPI_MASKED_REG); | 1169 | tx = musb_readl(tibase, DAVINCI_TXCPPI_MASKED_REG); |
| 1168 | rx = musb_readl(tibase, DAVINCI_RXCPPI_MASKED_REG); | 1170 | rx = musb_readl(tibase, DAVINCI_RXCPPI_MASKED_REG); |
| 1169 | 1171 | ||
| 1170 | if (!tx && !rx) | 1172 | if (!tx && !rx) { |
| 1173 | if (cppi->irq) | ||
| 1174 | spin_unlock_irqrestore(&musb->lock, flags); | ||
| 1171 | return IRQ_NONE; | 1175 | return IRQ_NONE; |
| 1176 | } | ||
| 1172 | 1177 | ||
| 1173 | DBG(4, "CPPI IRQ Tx%x Rx%x\n", tx, rx); | 1178 | DBG(4, "CPPI IRQ Tx%x Rx%x\n", tx, rx); |
| 1174 | 1179 | ||
| @@ -1199,7 +1204,7 @@ irqreturn_t cppi_interrupt(int irq, void *dev_id) | |||
| 1199 | */ | 1204 | */ |
| 1200 | if (NULL == bd) { | 1205 | if (NULL == bd) { |
| 1201 | DBG(1, "null BD\n"); | 1206 | DBG(1, "null BD\n"); |
| 1202 | tx_ram->tx_complete = 0; | 1207 | musb_writel(&tx_ram->tx_complete, 0, 0); |
| 1203 | continue; | 1208 | continue; |
| 1204 | } | 1209 | } |
| 1205 | 1210 | ||
| @@ -1452,7 +1457,7 @@ static int cppi_channel_abort(struct dma_channel *channel) | |||
| 1452 | * compare mode by writing 1 to the tx_complete register. | 1457 | * compare mode by writing 1 to the tx_complete register. |
| 1453 | */ | 1458 | */ |
| 1454 | cppi_reset_tx(tx_ram, 1); | 1459 | cppi_reset_tx(tx_ram, 1); |
| 1455 | cppi_ch->head = 0; | 1460 | cppi_ch->head = NULL; |
| 1456 | musb_writel(&tx_ram->tx_complete, 0, 1); | 1461 | musb_writel(&tx_ram->tx_complete, 0, 1); |
| 1457 | cppi_dump_tx(5, cppi_ch, " (done teardown)"); | 1462 | cppi_dump_tx(5, cppi_ch, " (done teardown)"); |
| 1458 | 1463 | ||
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 630ae7f3cd4c..f10ff00ca09e 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
| @@ -1030,6 +1030,7 @@ static void musb_shutdown(struct platform_device *pdev) | |||
| 1030 | struct musb *musb = dev_to_musb(&pdev->dev); | 1030 | struct musb *musb = dev_to_musb(&pdev->dev); |
| 1031 | unsigned long flags; | 1031 | unsigned long flags; |
| 1032 | 1032 | ||
| 1033 | pm_runtime_get_sync(musb->controller); | ||
| 1033 | spin_lock_irqsave(&musb->lock, flags); | 1034 | spin_lock_irqsave(&musb->lock, flags); |
| 1034 | musb_platform_disable(musb); | 1035 | musb_platform_disable(musb); |
| 1035 | musb_generic_disable(musb); | 1036 | musb_generic_disable(musb); |
| @@ -1040,6 +1041,7 @@ static void musb_shutdown(struct platform_device *pdev) | |||
| 1040 | musb_writeb(musb->mregs, MUSB_DEVCTL, 0); | 1041 | musb_writeb(musb->mregs, MUSB_DEVCTL, 0); |
| 1041 | musb_platform_exit(musb); | 1042 | musb_platform_exit(musb); |
| 1042 | 1043 | ||
| 1044 | pm_runtime_put(musb->controller); | ||
| 1043 | /* FIXME power down */ | 1045 | /* FIXME power down */ |
| 1044 | } | 1046 | } |
| 1045 | 1047 | ||
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index 4bd9e2145ee4..0e053b587960 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h | |||
| @@ -261,6 +261,7 @@ enum musb_g_ep0_state { | |||
| 261 | * @try_ilde: tries to idle the IP | 261 | * @try_ilde: tries to idle the IP |
| 262 | * @vbus_status: returns vbus status if possible | 262 | * @vbus_status: returns vbus status if possible |
| 263 | * @set_vbus: forces vbus status | 263 | * @set_vbus: forces vbus status |
| 264 | * @channel_program: pre check for standard dma channel_program func | ||
| 264 | */ | 265 | */ |
| 265 | struct musb_platform_ops { | 266 | struct musb_platform_ops { |
| 266 | int (*init)(struct musb *musb); | 267 | int (*init)(struct musb *musb); |
| @@ -274,6 +275,10 @@ struct musb_platform_ops { | |||
| 274 | 275 | ||
| 275 | int (*vbus_status)(struct musb *musb); | 276 | int (*vbus_status)(struct musb *musb); |
| 276 | void (*set_vbus)(struct musb *musb, int on); | 277 | void (*set_vbus)(struct musb *musb, int on); |
| 278 | |||
| 279 | int (*adjust_channel_params)(struct dma_channel *channel, | ||
| 280 | u16 packet_sz, u8 *mode, | ||
| 281 | dma_addr_t *dma_addr, u32 *len); | ||
| 277 | }; | 282 | }; |
| 278 | 283 | ||
| 279 | /* | 284 | /* |
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 98519c5d8b5c..6dfbf9ffd7a6 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
| @@ -535,7 +535,7 @@ void musb_g_tx(struct musb *musb, u8 epnum) | |||
| 535 | is_dma = 1; | 535 | is_dma = 1; |
| 536 | csr |= MUSB_TXCSR_P_WZC_BITS; | 536 | csr |= MUSB_TXCSR_P_WZC_BITS; |
| 537 | csr &= ~(MUSB_TXCSR_DMAENAB | MUSB_TXCSR_P_UNDERRUN | | 537 | csr &= ~(MUSB_TXCSR_DMAENAB | MUSB_TXCSR_P_UNDERRUN | |
| 538 | MUSB_TXCSR_TXPKTRDY); | 538 | MUSB_TXCSR_TXPKTRDY | MUSB_TXCSR_AUTOSET); |
| 539 | musb_writew(epio, MUSB_TXCSR, csr); | 539 | musb_writew(epio, MUSB_TXCSR, csr); |
| 540 | /* Ensure writebuffer is empty. */ | 540 | /* Ensure writebuffer is empty. */ |
| 541 | csr = musb_readw(epio, MUSB_TXCSR); | 541 | csr = musb_readw(epio, MUSB_TXCSR); |
| @@ -1296,7 +1296,7 @@ static int musb_gadget_dequeue(struct usb_ep *ep, struct usb_request *request) | |||
| 1296 | } | 1296 | } |
| 1297 | 1297 | ||
| 1298 | /* if the hardware doesn't have the request, easy ... */ | 1298 | /* if the hardware doesn't have the request, easy ... */ |
| 1299 | if (musb_ep->req_list.next != &request->list || musb_ep->busy) | 1299 | if (musb_ep->req_list.next != &req->list || musb_ep->busy) |
| 1300 | musb_g_giveback(musb_ep, request, -ECONNRESET); | 1300 | musb_g_giveback(musb_ep, request, -ECONNRESET); |
| 1301 | 1301 | ||
| 1302 | /* ... else abort the dma transfer ... */ | 1302 | /* ... else abort the dma transfer ... */ |
diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c index 0144a2d481fd..d281792db05c 100644 --- a/drivers/usb/musb/musbhsdma.c +++ b/drivers/usb/musb/musbhsdma.c | |||
| @@ -169,6 +169,14 @@ static int dma_channel_program(struct dma_channel *channel, | |||
| 169 | BUG_ON(channel->status == MUSB_DMA_STATUS_UNKNOWN || | 169 | BUG_ON(channel->status == MUSB_DMA_STATUS_UNKNOWN || |
| 170 | channel->status == MUSB_DMA_STATUS_BUSY); | 170 | channel->status == MUSB_DMA_STATUS_BUSY); |
| 171 | 171 | ||
| 172 | /* Let targets check/tweak the arguments */ | ||
| 173 | if (musb->ops->adjust_channel_params) { | ||
| 174 | int ret = musb->ops->adjust_channel_params(channel, | ||
| 175 | packet_sz, &mode, &dma_addr, &len); | ||
| 176 | if (ret) | ||
| 177 | return ret; | ||
| 178 | } | ||
| 179 | |||
| 172 | /* | 180 | /* |
| 173 | * The DMA engine in RTL1.8 and above cannot handle | 181 | * The DMA engine in RTL1.8 and above cannot handle |
| 174 | * DMA addresses that are not aligned to a 4 byte boundary. | 182 | * DMA addresses that are not aligned to a 4 byte boundary. |
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 25cb8b0003b1..57a27fa954b4 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
| @@ -259,9 +259,10 @@ static int musb_otg_notifications(struct notifier_block *nb, | |||
| 259 | case USB_EVENT_VBUS: | 259 | case USB_EVENT_VBUS: |
| 260 | DBG(4, "VBUS Connect\n"); | 260 | DBG(4, "VBUS Connect\n"); |
| 261 | 261 | ||
| 262 | #ifdef CONFIG_USB_GADGET_MUSB_HDRC | ||
| 262 | if (musb->gadget_driver) | 263 | if (musb->gadget_driver) |
| 263 | pm_runtime_get_sync(musb->controller); | 264 | pm_runtime_get_sync(musb->controller); |
| 264 | 265 | #endif | |
| 265 | otg_init(musb->xceiv); | 266 | otg_init(musb->xceiv); |
| 266 | break; | 267 | break; |
| 267 | 268 | ||
diff --git a/drivers/usb/musb/ux500.c b/drivers/usb/musb/ux500.c index d6384e4aeef9..f7e04bf34a13 100644 --- a/drivers/usb/musb/ux500.c +++ b/drivers/usb/musb/ux500.c | |||
| @@ -93,6 +93,8 @@ static int __init ux500_probe(struct platform_device *pdev) | |||
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | musb->dev.parent = &pdev->dev; | 95 | musb->dev.parent = &pdev->dev; |
| 96 | musb->dev.dma_mask = pdev->dev.dma_mask; | ||
| 97 | musb->dev.coherent_dma_mask = pdev->dev.coherent_dma_mask; | ||
| 96 | 98 | ||
| 97 | glue->dev = &pdev->dev; | 99 | glue->dev = &pdev->dev; |
| 98 | glue->musb = musb; | 100 | glue->musb = musb; |
diff --git a/drivers/usb/otg/isp1301_omap.c b/drivers/usb/otg/isp1301_omap.c index 8c6fdef61d1c..e25700f44b6f 100644 --- a/drivers/usb/otg/isp1301_omap.c +++ b/drivers/usb/otg/isp1301_omap.c | |||
| @@ -1531,7 +1531,7 @@ isp1301_probe(struct i2c_client *i2c, const struct i2c_device_id *id) | |||
| 1531 | i2c_set_clientdata(i2c, isp); | 1531 | i2c_set_clientdata(i2c, isp); |
| 1532 | isp->client = i2c; | 1532 | isp->client = i2c; |
| 1533 | 1533 | ||
| 1534 | /* verify the chip (shouldn't be necesary) */ | 1534 | /* verify the chip (shouldn't be necessary) */ |
| 1535 | status = isp1301_get_u16(isp, ISP1301_VENDOR_ID); | 1535 | status = isp1301_get_u16(isp, ISP1301_VENDOR_ID); |
| 1536 | if (status != I2C_VENDOR_ID_PHILIPS) { | 1536 | if (status != I2C_VENDOR_ID_PHILIPS) { |
| 1537 | dev_dbg(&i2c->dev, "not philips id: %d\n", status); | 1537 | dev_dbg(&i2c->dev, "not philips id: %d\n", status); |
diff --git a/drivers/usb/otg/langwell_otg.c b/drivers/usb/otg/langwell_otg.c index 7f9b8cd4514b..e973ff19c55a 100644 --- a/drivers/usb/otg/langwell_otg.c +++ b/drivers/usb/otg/langwell_otg.c | |||
| @@ -580,7 +580,7 @@ static void langwell_otg_add_ktimer(enum langwell_otg_timer_type timers) | |||
| 580 | time = TB_BUS_SUSPEND; | 580 | time = TB_BUS_SUSPEND; |
| 581 | break; | 581 | break; |
| 582 | default: | 582 | default: |
| 583 | dev_dbg(lnw->dev, "unkown timer, cannot enable it\n"); | 583 | dev_dbg(lnw->dev, "unknown timer, cannot enable it\n"); |
| 584 | return; | 584 | return; |
| 585 | } | 585 | } |
| 586 | 586 | ||
| @@ -1381,7 +1381,7 @@ static void langwell_otg_work(struct work_struct *work) | |||
| 1381 | } else if (!iotg->hsm.a_bus_req && iotg->otg.host && | 1381 | } else if (!iotg->hsm.a_bus_req && iotg->otg.host && |
| 1382 | iotg->otg.host->b_hnp_enable) { | 1382 | iotg->otg.host->b_hnp_enable) { |
| 1383 | /* It is not safe enough to do a fast | 1383 | /* It is not safe enough to do a fast |
| 1384 | * transistion from A_WAIT_BCON to | 1384 | * transition from A_WAIT_BCON to |
| 1385 | * A_SUSPEND */ | 1385 | * A_SUSPEND */ |
| 1386 | msleep(10000); | 1386 | msleep(10000); |
| 1387 | if (iotg->hsm.a_bus_req) | 1387 | if (iotg->hsm.a_bus_req) |
diff --git a/drivers/usb/serial/aircable.c b/drivers/usb/serial/aircable.c index 0db6ace16f7b..aba201cb872c 100644 --- a/drivers/usb/serial/aircable.c +++ b/drivers/usb/serial/aircable.c | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | * When reading the process is almost equal except that the header starts with | 16 | * When reading the process is almost equal except that the header starts with |
| 17 | * 0x00 0x20. | 17 | * 0x00 0x20. |
| 18 | * | 18 | * |
| 19 | * The device simply need some stuff to understand data comming from the usb | 19 | * The device simply need some stuff to understand data coming from the usb |
| 20 | * buffer: The First and Second byte is used for a Header, the Third and Fourth | 20 | * buffer: The First and Second byte is used for a Header, the Third and Fourth |
| 21 | * tells the device the amount of information the package holds. | 21 | * tells the device the amount of information the package holds. |
| 22 | * Packages are 60 bytes long Header Stuff. | 22 | * Packages are 60 bytes long Header Stuff. |
| @@ -30,7 +30,7 @@ | |||
| 30 | * one. | 30 | * one. |
| 31 | * | 31 | * |
| 32 | * The driver registers himself with the USB-serial core and the USB Core. I had | 32 | * The driver registers himself with the USB-serial core and the USB Core. I had |
| 33 | * to implement a probe function agains USB-serial, because other way, the | 33 | * to implement a probe function against USB-serial, because other way, the |
| 34 | * driver was attaching himself to both interfaces. I have tryed with different | 34 | * driver was attaching himself to both interfaces. I have tryed with different |
| 35 | * configurations of usb_serial_driver with out exit, only the probe function | 35 | * configurations of usb_serial_driver with out exit, only the probe function |
| 36 | * could handle this correctly. | 36 | * could handle this correctly. |
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 4df3e0cecbae..0f11afdda134 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c | |||
| @@ -101,7 +101,7 @@ static const struct usb_device_id id_table[] = { | |||
| 101 | { USB_DEVICE(0x10C4, 0x81F2) }, /* C1007 HF band RFID controller */ | 101 | { USB_DEVICE(0x10C4, 0x81F2) }, /* C1007 HF band RFID controller */ |
| 102 | { USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */ | 102 | { USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */ |
| 103 | { USB_DEVICE(0x10C4, 0x822B) }, /* Modem EDGE(GSM) Comander 2 */ | 103 | { USB_DEVICE(0x10C4, 0x822B) }, /* Modem EDGE(GSM) Comander 2 */ |
| 104 | { USB_DEVICE(0x10C4, 0x826B) }, /* Cygnal Integrated Products, Inc., Fasttrax GPS demostration module */ | 104 | { USB_DEVICE(0x10C4, 0x826B) }, /* Cygnal Integrated Products, Inc., Fasttrax GPS demonstration module */ |
| 105 | { USB_DEVICE(0x10C4, 0x8293) }, /* Telegesys ETRX2USB */ | 105 | { USB_DEVICE(0x10C4, 0x8293) }, /* Telegesys ETRX2USB */ |
| 106 | { USB_DEVICE(0x10C4, 0x82F9) }, /* Procyon AVS */ | 106 | { USB_DEVICE(0x10C4, 0x82F9) }, /* Procyon AVS */ |
| 107 | { USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */ | 107 | { USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */ |
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index 987e9bf7bd02..d9906eb9d16a 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | * | 35 | * |
| 36 | * Lonnie Mendez <dignome@gmail.com> | 36 | * Lonnie Mendez <dignome@gmail.com> |
| 37 | * 04-10-2004 | 37 | * 04-10-2004 |
| 38 | * Driver modified to support dynamic line settings. Various improvments | 38 | * Driver modified to support dynamic line settings. Various improvements |
| 39 | * and features. | 39 | * and features. |
| 40 | * | 40 | * |
| 41 | * Neil Whelchel | 41 | * Neil Whelchel |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 65967b36365f..4de6ef0ae52a 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | * See Documentation/usb/usb-serial.txt for more information on using this | 17 | * See Documentation/usb/usb-serial.txt for more information on using this |
| 18 | * driver | 18 | * driver |
| 19 | * | 19 | * |
| 20 | * See http://ftdi-usb-sio.sourceforge.net for upto date testing info | 20 | * See http://ftdi-usb-sio.sourceforge.net for up to date testing info |
| 21 | * and extra documentation | 21 | * and extra documentation |
| 22 | * | 22 | * |
| 23 | * Change entries from 2004 and earlier can be found in versions of this | 23 | * Change entries from 2004 and earlier can be found in versions of this |
| @@ -151,6 +151,8 @@ static struct ftdi_sio_quirk ftdi_stmclite_quirk = { | |||
| 151 | * /sys/bus/usb/ftdi_sio/new_id, then send patch/report! | 151 | * /sys/bus/usb/ftdi_sio/new_id, then send patch/report! |
| 152 | */ | 152 | */ |
| 153 | static struct usb_device_id id_table_combined [] = { | 153 | static struct usb_device_id id_table_combined [] = { |
| 154 | { USB_DEVICE(FTDI_VID, FTDI_CTI_MINI_PID) }, | ||
| 155 | { USB_DEVICE(FTDI_VID, FTDI_CTI_NANO_PID) }, | ||
| 154 | { USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) }, | 156 | { USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) }, |
| 155 | { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) }, | 157 | { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) }, |
| 156 | { USB_DEVICE(FTDI_VID, FTDI_CANDAPTER_PID) }, | 158 | { USB_DEVICE(FTDI_VID, FTDI_CANDAPTER_PID) }, |
| @@ -525,6 +527,7 @@ static struct usb_device_id id_table_combined [] = { | |||
| 525 | { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803_8_PID) }, | 527 | { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803_8_PID) }, |
| 526 | { USB_DEVICE(IDTECH_VID, IDTECH_IDT1221U_PID) }, | 528 | { USB_DEVICE(IDTECH_VID, IDTECH_IDT1221U_PID) }, |
| 527 | { USB_DEVICE(OCT_VID, OCT_US101_PID) }, | 529 | { USB_DEVICE(OCT_VID, OCT_US101_PID) }, |
| 530 | { USB_DEVICE(OCT_VID, OCT_DK201_PID) }, | ||
| 528 | { USB_DEVICE(FTDI_VID, FTDI_HE_TIRA1_PID), | 531 | { USB_DEVICE(FTDI_VID, FTDI_HE_TIRA1_PID), |
| 529 | .driver_info = (kernel_ulong_t)&ftdi_HE_TIRA1_quirk }, | 532 | .driver_info = (kernel_ulong_t)&ftdi_HE_TIRA1_quirk }, |
| 530 | { USB_DEVICE(FTDI_VID, FTDI_USB_UIRT_PID), | 533 | { USB_DEVICE(FTDI_VID, FTDI_USB_UIRT_PID), |
| @@ -787,6 +790,8 @@ static struct usb_device_id id_table_combined [] = { | |||
| 787 | { USB_DEVICE(FTDI_VID, MARVELL_OPENRD_PID), | 790 | { USB_DEVICE(FTDI_VID, MARVELL_OPENRD_PID), |
| 788 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | 791 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
| 789 | { USB_DEVICE(FTDI_VID, HAMEG_HO820_PID) }, | 792 | { USB_DEVICE(FTDI_VID, HAMEG_HO820_PID) }, |
| 793 | { USB_DEVICE(FTDI_VID, HAMEG_HO720_PID) }, | ||
| 794 | { USB_DEVICE(FTDI_VID, HAMEG_HO730_PID) }, | ||
| 790 | { USB_DEVICE(FTDI_VID, HAMEG_HO870_PID) }, | 795 | { USB_DEVICE(FTDI_VID, HAMEG_HO870_PID) }, |
| 791 | { USB_DEVICE(FTDI_VID, MJSG_GENERIC_PID) }, | 796 | { USB_DEVICE(FTDI_VID, MJSG_GENERIC_PID) }, |
| 792 | { USB_DEVICE(FTDI_VID, MJSG_SR_RADIO_PID) }, | 797 | { USB_DEVICE(FTDI_VID, MJSG_SR_RADIO_PID) }, |
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h index c543e55bafba..efffc23723bd 100644 --- a/drivers/usb/serial/ftdi_sio_ids.h +++ b/drivers/usb/serial/ftdi_sio_ids.h | |||
| @@ -300,6 +300,8 @@ | |||
| 300 | * Hameg HO820 and HO870 interface (using VID 0x0403) | 300 | * Hameg HO820 and HO870 interface (using VID 0x0403) |
| 301 | */ | 301 | */ |
| 302 | #define HAMEG_HO820_PID 0xed74 | 302 | #define HAMEG_HO820_PID 0xed74 |
| 303 | #define HAMEG_HO730_PID 0xed73 | ||
| 304 | #define HAMEG_HO720_PID 0xed72 | ||
| 303 | #define HAMEG_HO870_PID 0xed71 | 305 | #define HAMEG_HO870_PID 0xed71 |
| 304 | 306 | ||
| 305 | /* | 307 | /* |
| @@ -572,6 +574,7 @@ | |||
| 572 | /* Note: OCT US101 is also rebadged as Dick Smith Electronics (NZ) XH6381 */ | 574 | /* Note: OCT US101 is also rebadged as Dick Smith Electronics (NZ) XH6381 */ |
| 573 | /* Also rebadged as Dick Smith Electronics (Aus) XH6451 */ | 575 | /* Also rebadged as Dick Smith Electronics (Aus) XH6451 */ |
| 574 | /* Also rebadged as SIIG Inc. model US2308 hardware version 1 */ | 576 | /* Also rebadged as SIIG Inc. model US2308 hardware version 1 */ |
| 577 | #define OCT_DK201_PID 0x0103 /* OCT DK201 USB docking station */ | ||
| 575 | #define OCT_US101_PID 0x0421 /* OCT US101 USB to RS-232 */ | 578 | #define OCT_US101_PID 0x0421 /* OCT US101 USB to RS-232 */ |
| 576 | 579 | ||
| 577 | /* | 580 | /* |
| @@ -1141,3 +1144,12 @@ | |||
| 1141 | #define QIHARDWARE_VID 0x20B7 | 1144 | #define QIHARDWARE_VID 0x20B7 |
| 1142 | #define MILKYMISTONE_JTAGSERIAL_PID 0x0713 | 1145 | #define MILKYMISTONE_JTAGSERIAL_PID 0x0713 |
| 1143 | 1146 | ||
| 1147 | /* | ||
| 1148 | * CTI GmbH RS485 Converter http://www.cti-lean.com/ | ||
| 1149 | */ | ||
| 1150 | /* USB-485-Mini*/ | ||
| 1151 | #define FTDI_CTI_MINI_PID 0xF608 | ||
| 1152 | /* USB-Nano-485*/ | ||
| 1153 | #define FTDI_CTI_NANO_PID 0xF60B | ||
| 1154 | |||
| 1155 | |||
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index f1aedfa7c420..abf095be5753 100644 --- a/drivers/usb/serial/io_edgeport.c +++ b/drivers/usb/serial/io_edgeport.c | |||
| @@ -1981,7 +1981,7 @@ static void process_rcvd_status(struct edgeport_serial *edge_serial, | |||
| 1981 | if (code == IOSP_STATUS_OPEN_RSP) { | 1981 | if (code == IOSP_STATUS_OPEN_RSP) { |
| 1982 | edge_port->txCredits = GET_TX_BUFFER_SIZE(byte3); | 1982 | edge_port->txCredits = GET_TX_BUFFER_SIZE(byte3); |
| 1983 | edge_port->maxTxCredits = edge_port->txCredits; | 1983 | edge_port->maxTxCredits = edge_port->txCredits; |
| 1984 | dbg("%s - Port %u Open Response Inital MSR = %02x TxBufferSize = %d", __func__, edge_serial->rxPort, byte2, edge_port->txCredits); | 1984 | dbg("%s - Port %u Open Response Initial MSR = %02x TxBufferSize = %d", __func__, edge_serial->rxPort, byte2, edge_port->txCredits); |
| 1985 | handle_new_msr(edge_port, byte2); | 1985 | handle_new_msr(edge_port, byte2); |
| 1986 | 1986 | ||
| 1987 | /* send the current line settings to the port so we are | 1987 | /* send the current line settings to the port so we are |
diff --git a/drivers/usb/serial/io_edgeport.h b/drivers/usb/serial/io_edgeport.h index dced7ec65470..ad9c1d47a619 100644 --- a/drivers/usb/serial/io_edgeport.h +++ b/drivers/usb/serial/io_edgeport.h | |||
| @@ -68,7 +68,7 @@ struct comMapper { | |||
| 68 | #define PROC_SET_COM_ENTRY 2 | 68 | #define PROC_SET_COM_ENTRY 2 |
| 69 | 69 | ||
| 70 | 70 | ||
| 71 | /* The following sturcture is passed to the write */ | 71 | /* The following structure is passed to the write */ |
| 72 | struct procWrite { | 72 | struct procWrite { |
| 73 | int Command; | 73 | int Command; |
| 74 | union { | 74 | union { |
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index d8434910fa7b..0aac00afb5c8 100644 --- a/drivers/usb/serial/io_ti.c +++ b/drivers/usb/serial/io_ti.c | |||
| @@ -433,7 +433,7 @@ static int write_i2c_mem(struct edgeport_serial *serial, | |||
| 433 | 433 | ||
| 434 | /* We can only send a maximum of 1 aligned byte page at a time */ | 434 | /* We can only send a maximum of 1 aligned byte page at a time */ |
| 435 | 435 | ||
| 436 | /* calulate the number of bytes left in the first page */ | 436 | /* calculate the number of bytes left in the first page */ |
| 437 | write_length = EPROM_PAGE_SIZE - | 437 | write_length = EPROM_PAGE_SIZE - |
| 438 | (start_address & (EPROM_PAGE_SIZE - 1)); | 438 | (start_address & (EPROM_PAGE_SIZE - 1)); |
| 439 | 439 | ||
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index d2c019637e45..ba0d28727ccb 100644 --- a/drivers/usb/serial/mct_u232.c +++ b/drivers/usb/serial/mct_u232.c | |||
| @@ -106,7 +106,7 @@ static void mct_u232_break_ctl(struct tty_struct *tty, int break_state); | |||
| 106 | static int mct_u232_tiocmget(struct tty_struct *tty); | 106 | static int mct_u232_tiocmget(struct tty_struct *tty); |
| 107 | static int mct_u232_tiocmset(struct tty_struct *tty, | 107 | static int mct_u232_tiocmset(struct tty_struct *tty, |
| 108 | unsigned int set, unsigned int clear); | 108 | unsigned int set, unsigned int clear); |
| 109 | static int mct_u232_ioctl(struct tty_struct *tty, struct file *file, | 109 | static int mct_u232_ioctl(struct tty_struct *tty, |
| 110 | unsigned int cmd, unsigned long arg); | 110 | unsigned int cmd, unsigned long arg); |
| 111 | static int mct_u232_get_icount(struct tty_struct *tty, | 111 | static int mct_u232_get_icount(struct tty_struct *tty, |
| 112 | struct serial_icounter_struct *icount); | 112 | struct serial_icounter_struct *icount); |
| @@ -874,7 +874,7 @@ static void mct_u232_unthrottle(struct tty_struct *tty) | |||
| 874 | } | 874 | } |
| 875 | } | 875 | } |
| 876 | 876 | ||
| 877 | static int mct_u232_ioctl(struct tty_struct *tty, struct file *file, | 877 | static int mct_u232_ioctl(struct tty_struct *tty, |
| 878 | unsigned int cmd, unsigned long arg) | 878 | unsigned int cmd, unsigned long arg) |
| 879 | { | 879 | { |
| 880 | DEFINE_WAIT(wait); | 880 | DEFINE_WAIT(wait); |
diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c index 201f6096844b..1b5633f46984 100644 --- a/drivers/usb/serial/opticon.c +++ b/drivers/usb/serial/opticon.c | |||
| @@ -116,7 +116,7 @@ static void opticon_read_bulk_callback(struct urb *urb) | |||
| 116 | } else { | 116 | } else { |
| 117 | if ((data[0] == 0x00) && (data[1] == 0x01)) { | 117 | if ((data[0] == 0x00) && (data[1] == 0x01)) { |
| 118 | spin_lock_irqsave(&priv->lock, flags); | 118 | spin_lock_irqsave(&priv->lock, flags); |
| 119 | /* CTS status infomation package */ | 119 | /* CTS status information package */ |
| 120 | if (data[2] == 0x00) | 120 | if (data[2] == 0x00) |
| 121 | priv->cts = false; | 121 | priv->cts = false; |
| 122 | else | 122 | else |
| @@ -413,7 +413,7 @@ static int opticon_tiocmget(struct tty_struct *tty) | |||
| 413 | return result; | 413 | return result; |
| 414 | } | 414 | } |
| 415 | 415 | ||
| 416 | static int opticon_tiocmset(struct tty_struct *tty, struct file *file, | 416 | static int opticon_tiocmset(struct tty_struct *tty, |
| 417 | unsigned int set, unsigned int clear) | 417 | unsigned int set, unsigned int clear) |
| 418 | { | 418 | { |
| 419 | struct usb_serial_port *port = tty->driver_data; | 419 | struct usb_serial_port *port = tty->driver_data; |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 75c7f456eed5..d77ff0435896 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
| @@ -407,6 +407,10 @@ static void option_instat_callback(struct urb *urb); | |||
| 407 | /* ONDA MT825UP HSDPA 14.2 modem */ | 407 | /* ONDA MT825UP HSDPA 14.2 modem */ |
| 408 | #define ONDA_MT825UP 0x000b | 408 | #define ONDA_MT825UP 0x000b |
| 409 | 409 | ||
| 410 | /* Samsung products */ | ||
| 411 | #define SAMSUNG_VENDOR_ID 0x04e8 | ||
| 412 | #define SAMSUNG_PRODUCT_GT_B3730 0x6889 | ||
| 413 | |||
| 410 | /* some devices interfaces need special handling due to a number of reasons */ | 414 | /* some devices interfaces need special handling due to a number of reasons */ |
| 411 | enum option_blacklist_reason { | 415 | enum option_blacklist_reason { |
| 412 | OPTION_BLACKLIST_NONE = 0, | 416 | OPTION_BLACKLIST_NONE = 0, |
| @@ -968,6 +972,7 @@ static const struct usb_device_id option_ids[] = { | |||
| 968 | { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) }, | 972 | { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) }, |
| 969 | { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */ | 973 | { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */ |
| 970 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_MT825UP) }, /* ONDA MT825UP modem */ | 974 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_MT825UP) }, /* ONDA MT825UP modem */ |
| 975 | { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730/GT-B3710 LTE USB modem.*/ | ||
| 971 | { } /* Terminating entry */ | 976 | { } /* Terminating entry */ |
| 972 | }; | 977 | }; |
| 973 | MODULE_DEVICE_TABLE(usb, option_ids); | 978 | MODULE_DEVICE_TABLE(usb, option_ids); |
diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c index 8858201eb1d3..54a9dab1f33b 100644 --- a/drivers/usb/serial/qcserial.c +++ b/drivers/usb/serial/qcserial.c | |||
| @@ -111,7 +111,7 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id) | |||
| 111 | ifnum = intf->desc.bInterfaceNumber; | 111 | ifnum = intf->desc.bInterfaceNumber; |
| 112 | dbg("This Interface = %d", ifnum); | 112 | dbg("This Interface = %d", ifnum); |
| 113 | 113 | ||
| 114 | data = serial->private = kzalloc(sizeof(struct usb_wwan_intf_private), | 114 | data = kzalloc(sizeof(struct usb_wwan_intf_private), |
| 115 | GFP_KERNEL); | 115 | GFP_KERNEL); |
| 116 | if (!data) | 116 | if (!data) |
| 117 | return -ENOMEM; | 117 | return -ENOMEM; |
| @@ -134,8 +134,10 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id) | |||
| 134 | usb_endpoint_is_bulk_out(&intf->endpoint[1].desc)) { | 134 | usb_endpoint_is_bulk_out(&intf->endpoint[1].desc)) { |
| 135 | dbg("QDL port found"); | 135 | dbg("QDL port found"); |
| 136 | 136 | ||
| 137 | if (serial->interface->num_altsetting == 1) | 137 | if (serial->interface->num_altsetting == 1) { |
| 138 | return 0; | 138 | retval = 0; /* Success */ |
| 139 | break; | ||
| 140 | } | ||
| 139 | 141 | ||
| 140 | retval = usb_set_interface(serial->dev, ifnum, 1); | 142 | retval = usb_set_interface(serial->dev, ifnum, 1); |
| 141 | if (retval < 0) { | 143 | if (retval < 0) { |
| @@ -145,7 +147,6 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id) | |||
| 145 | retval = -ENODEV; | 147 | retval = -ENODEV; |
| 146 | kfree(data); | 148 | kfree(data); |
| 147 | } | 149 | } |
| 148 | return retval; | ||
| 149 | } | 150 | } |
| 150 | break; | 151 | break; |
| 151 | 152 | ||
| @@ -166,6 +167,7 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id) | |||
| 166 | "Could not set interface, error %d\n", | 167 | "Could not set interface, error %d\n", |
| 167 | retval); | 168 | retval); |
| 168 | retval = -ENODEV; | 169 | retval = -ENODEV; |
| 170 | kfree(data); | ||
| 169 | } | 171 | } |
| 170 | } else if (ifnum == 2) { | 172 | } else if (ifnum == 2) { |
| 171 | dbg("Modem port found"); | 173 | dbg("Modem port found"); |
| @@ -177,7 +179,6 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id) | |||
| 177 | retval = -ENODEV; | 179 | retval = -ENODEV; |
| 178 | kfree(data); | 180 | kfree(data); |
| 179 | } | 181 | } |
| 180 | return retval; | ||
| 181 | } else if (ifnum==3) { | 182 | } else if (ifnum==3) { |
| 182 | /* | 183 | /* |
| 183 | * NMEA (serial line 9600 8N1) | 184 | * NMEA (serial line 9600 8N1) |
| @@ -191,6 +192,7 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id) | |||
| 191 | "Could not set interface, error %d\n", | 192 | "Could not set interface, error %d\n", |
| 192 | retval); | 193 | retval); |
| 193 | retval = -ENODEV; | 194 | retval = -ENODEV; |
| 195 | kfree(data); | ||
| 194 | } | 196 | } |
| 195 | } | 197 | } |
| 196 | break; | 198 | break; |
| @@ -199,12 +201,27 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id) | |||
| 199 | dev_err(&serial->dev->dev, | 201 | dev_err(&serial->dev->dev, |
| 200 | "unknown number of interfaces: %d\n", nintf); | 202 | "unknown number of interfaces: %d\n", nintf); |
| 201 | kfree(data); | 203 | kfree(data); |
| 202 | return -ENODEV; | 204 | retval = -ENODEV; |
| 203 | } | 205 | } |
| 204 | 206 | ||
| 207 | /* Set serial->private if not returning -ENODEV */ | ||
| 208 | if (retval != -ENODEV) | ||
| 209 | usb_set_serial_data(serial, data); | ||
| 205 | return retval; | 210 | return retval; |
| 206 | } | 211 | } |
| 207 | 212 | ||
| 213 | static void qc_release(struct usb_serial *serial) | ||
| 214 | { | ||
| 215 | struct usb_wwan_intf_private *priv = usb_get_serial_data(serial); | ||
| 216 | |||
| 217 | dbg("%s", __func__); | ||
| 218 | |||
| 219 | /* Call usb_wwan release & free the private data allocated in qcprobe */ | ||
| 220 | usb_wwan_release(serial); | ||
| 221 | usb_set_serial_data(serial, NULL); | ||
| 222 | kfree(priv); | ||
| 223 | } | ||
| 224 | |||
| 208 | static struct usb_serial_driver qcdevice = { | 225 | static struct usb_serial_driver qcdevice = { |
| 209 | .driver = { | 226 | .driver = { |
| 210 | .owner = THIS_MODULE, | 227 | .owner = THIS_MODULE, |
| @@ -222,7 +239,7 @@ static struct usb_serial_driver qcdevice = { | |||
| 222 | .chars_in_buffer = usb_wwan_chars_in_buffer, | 239 | .chars_in_buffer = usb_wwan_chars_in_buffer, |
| 223 | .attach = usb_wwan_startup, | 240 | .attach = usb_wwan_startup, |
| 224 | .disconnect = usb_wwan_disconnect, | 241 | .disconnect = usb_wwan_disconnect, |
| 225 | .release = usb_wwan_release, | 242 | .release = qc_release, |
| 226 | #ifdef CONFIG_PM | 243 | #ifdef CONFIG_PM |
| 227 | .suspend = usb_wwan_suspend, | 244 | .suspend = usb_wwan_suspend, |
| 228 | .resume = usb_wwan_resume, | 245 | .resume = usb_wwan_resume, |
diff --git a/drivers/usb/storage/ene_ub6250.c b/drivers/usb/storage/ene_ub6250.c index 08e03745e251..0e5aafda4537 100644 --- a/drivers/usb/storage/ene_ub6250.c +++ b/drivers/usb/storage/ene_ub6250.c | |||
| @@ -562,7 +562,7 @@ static int ene_sd_init(struct us_data *us) | |||
| 562 | 562 | ||
| 563 | result = ene_send_scsi_cmd(us, FDIR_READ, NULL, 0); | 563 | result = ene_send_scsi_cmd(us, FDIR_READ, NULL, 0); |
| 564 | if (result != USB_STOR_XFER_GOOD) { | 564 | if (result != USB_STOR_XFER_GOOD) { |
| 565 | US_DEBUGP("Exection SD Init Code Fail !!\n"); | 565 | US_DEBUGP("Execution SD Init Code Fail !!\n"); |
| 566 | return USB_STOR_TRANSPORT_ERROR; | 566 | return USB_STOR_TRANSPORT_ERROR; |
| 567 | } | 567 | } |
| 568 | 568 | ||
| @@ -581,7 +581,7 @@ static int ene_sd_init(struct us_data *us) | |||
| 581 | 581 | ||
| 582 | result = ene_send_scsi_cmd(us, FDIR_READ, &buf, 0); | 582 | result = ene_send_scsi_cmd(us, FDIR_READ, &buf, 0); |
| 583 | if (result != USB_STOR_XFER_GOOD) { | 583 | if (result != USB_STOR_XFER_GOOD) { |
| 584 | US_DEBUGP("Exection SD Init Code Fail !!\n"); | 584 | US_DEBUGP("Execution SD Init Code Fail !!\n"); |
| 585 | return USB_STOR_TRANSPORT_ERROR; | 585 | return USB_STOR_TRANSPORT_ERROR; |
| 586 | } | 586 | } |
| 587 | 587 | ||
diff --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c index 6b9982cd5423..09e52ba47ddf 100644 --- a/drivers/usb/storage/isd200.c +++ b/drivers/usb/storage/isd200.c | |||
| @@ -1510,7 +1510,7 @@ static int isd200_Initialization(struct us_data *us) | |||
| 1510 | * Protocol and Transport for the ISD200 ASIC | 1510 | * Protocol and Transport for the ISD200 ASIC |
| 1511 | * | 1511 | * |
| 1512 | * This protocol and transport are for ATA devices connected to an ISD200 | 1512 | * This protocol and transport are for ATA devices connected to an ISD200 |
| 1513 | * ASIC. An ATAPI device that is conected as a slave device will be | 1513 | * ASIC. An ATAPI device that is connected as a slave device will be |
| 1514 | * detected in the driver initialization function and the protocol will | 1514 | * detected in the driver initialization function and the protocol will |
| 1515 | * be changed to an ATAPI protocol (Transparent SCSI). | 1515 | * be changed to an ATAPI protocol (Transparent SCSI). |
| 1516 | * | 1516 | * |
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index 689ee1fb702a..13b8bcdf3dba 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c | |||
| @@ -123,7 +123,7 @@ static int slave_configure(struct scsi_device *sdev) | |||
| 123 | { | 123 | { |
| 124 | struct us_data *us = host_to_us(sdev->host); | 124 | struct us_data *us = host_to_us(sdev->host); |
| 125 | 125 | ||
| 126 | /* Many devices have trouble transfering more than 32KB at a time, | 126 | /* Many devices have trouble transferring more than 32KB at a time, |
| 127 | * while others have trouble with more than 64K. At this time we | 127 | * while others have trouble with more than 64K. At this time we |
| 128 | * are limiting both to 32K (64 sectores). | 128 | * are limiting both to 32K (64 sectores). |
| 129 | */ | 129 | */ |
diff --git a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shuttle_usbat.c index bd3f415893d8..0b00091d2ae9 100644 --- a/drivers/usb/storage/shuttle_usbat.c +++ b/drivers/usb/storage/shuttle_usbat.c | |||
| @@ -340,7 +340,7 @@ static int usbat_check_status(struct us_data *us) | |||
| 340 | } | 340 | } |
| 341 | 341 | ||
| 342 | /* | 342 | /* |
| 343 | * Stores critical information in internal registers in prepartion for the execution | 343 | * Stores critical information in internal registers in preparation for the execution |
| 344 | * of a conditional usbat_read_blocks or usbat_write_blocks call. | 344 | * of a conditional usbat_read_blocks or usbat_write_blocks call. |
| 345 | */ | 345 | */ |
| 346 | static int usbat_set_shuttle_features(struct us_data *us, | 346 | static int usbat_set_shuttle_features(struct us_data *us, |
diff --git a/drivers/usb/wusbcore/crypto.c b/drivers/usb/wusbcore/crypto.c index 827c87f10cc5..7e4bf95f8f7b 100644 --- a/drivers/usb/wusbcore/crypto.c +++ b/drivers/usb/wusbcore/crypto.c | |||
| @@ -180,7 +180,7 @@ static void bytewise_xor(void *_bo, const void *_bi1, const void *_bi2, | |||
| 180 | * using the 14 bytes of @a to fill up | 180 | * using the 14 bytes of @a to fill up |
| 181 | * b1.{mac_header,e0,security_reserved,padding}. | 181 | * b1.{mac_header,e0,security_reserved,padding}. |
| 182 | * | 182 | * |
| 183 | * NOTE: The definiton of l(a) in WUSB1.0[6.5] vs the definition of | 183 | * NOTE: The definition of l(a) in WUSB1.0[6.5] vs the definition of |
| 184 | * l(m) is orthogonal, they bear no relationship, so it is not | 184 | * l(m) is orthogonal, they bear no relationship, so it is not |
| 185 | * in conflict with the parameter's relation that | 185 | * in conflict with the parameter's relation that |
| 186 | * WUSB1.0[6.4.2]) defines. | 186 | * WUSB1.0[6.4.2]) defines. |
| @@ -272,7 +272,7 @@ static int wusb_ccm_mac(struct crypto_blkcipher *tfm_cbc, | |||
| 272 | 272 | ||
| 273 | /* Now we crypt the MIC Tag (*iv) with Ax -- values per WUSB1.0[6.5] | 273 | /* Now we crypt the MIC Tag (*iv) with Ax -- values per WUSB1.0[6.5] |
| 274 | * The procedure is to AES crypt the A0 block and XOR the MIC | 274 | * The procedure is to AES crypt the A0 block and XOR the MIC |
| 275 | * Tag agains it; we only do the first 8 bytes and place it | 275 | * Tag against it; we only do the first 8 bytes and place it |
| 276 | * directly in the destination buffer. | 276 | * directly in the destination buffer. |
| 277 | * | 277 | * |
| 278 | * POS Crypto API: size is assumed to be AES's block size. | 278 | * POS Crypto API: size is assumed to be AES's block size. |
diff --git a/drivers/usb/wusbcore/reservation.c b/drivers/usb/wusbcore/reservation.c index 4ed97360c046..6f4fafdc2401 100644 --- a/drivers/usb/wusbcore/reservation.c +++ b/drivers/usb/wusbcore/reservation.c | |||
| @@ -71,7 +71,7 @@ static void wusbhc_rsv_complete_cb(struct uwb_rsv *rsv) | |||
| 71 | 71 | ||
| 72 | /** | 72 | /** |
| 73 | * wusbhc_rsv_establish - establish a reservation for the cluster | 73 | * wusbhc_rsv_establish - establish a reservation for the cluster |
| 74 | * @wusbhc: the WUSB HC requesting a bandwith reservation | 74 | * @wusbhc: the WUSB HC requesting a bandwidth reservation |
| 75 | */ | 75 | */ |
| 76 | int wusbhc_rsv_establish(struct wusbhc *wusbhc) | 76 | int wusbhc_rsv_establish(struct wusbhc *wusbhc) |
| 77 | { | 77 | { |
diff --git a/drivers/usb/wusbcore/rh.c b/drivers/usb/wusbcore/rh.c index c175b7300c73..39de3900ad20 100644 --- a/drivers/usb/wusbcore/rh.c +++ b/drivers/usb/wusbcore/rh.c | |||
| @@ -133,7 +133,7 @@ static int wusbhc_rh_port_reset(struct wusbhc *wusbhc, u8 port_idx) | |||
| 133 | * big of a problem [and we can't make it an spinlock | 133 | * big of a problem [and we can't make it an spinlock |
| 134 | * because other parts need to take it and sleep] . | 134 | * because other parts need to take it and sleep] . |
| 135 | * | 135 | * |
| 136 | * @usb_hcd is refcounted, so it won't dissapear under us | 136 | * @usb_hcd is refcounted, so it won't disappear under us |
| 137 | * and before killing a host, the polling of the root hub | 137 | * and before killing a host, the polling of the root hub |
| 138 | * would be stopped anyway. | 138 | * would be stopped anyway. |
| 139 | */ | 139 | */ |
diff --git a/drivers/usb/wusbcore/wa-rpipe.c b/drivers/usb/wusbcore/wa-rpipe.c index 8cb9d80207fa..ca80171f42c6 100644 --- a/drivers/usb/wusbcore/wa-rpipe.c +++ b/drivers/usb/wusbcore/wa-rpipe.c | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | * | 24 | * |
| 25 | * RPIPE | 25 | * RPIPE |
| 26 | * | 26 | * |
| 27 | * Targetted at different downstream endpoints | 27 | * Targeted at different downstream endpoints |
| 28 | * | 28 | * |
| 29 | * Descriptor: use to config the remote pipe. | 29 | * Descriptor: use to config the remote pipe. |
| 30 | * | 30 | * |
diff --git a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c index 84b744c428a4..6ccd93a9b909 100644 --- a/drivers/usb/wusbcore/wa-xfer.c +++ b/drivers/usb/wusbcore/wa-xfer.c | |||
| @@ -61,7 +61,7 @@ | |||
| 61 | * | 61 | * |
| 62 | * Two methods it could be done: | 62 | * Two methods it could be done: |
| 63 | * | 63 | * |
| 64 | * (a) set up a timer everytime an rpipe's use count drops to 1 | 64 | * (a) set up a timer every time an rpipe's use count drops to 1 |
| 65 | * (which means unused) or when a transfer ends. Reset the | 65 | * (which means unused) or when a transfer ends. Reset the |
| 66 | * timer when a xfer is queued. If the timer expires, release | 66 | * timer when a xfer is queued. If the timer expires, release |
| 67 | * the rpipe [see rpipe_ep_disable()]. | 67 | * the rpipe [see rpipe_ep_disable()]. |
| @@ -140,7 +140,7 @@ struct wa_xfer { | |||
| 140 | 140 | ||
| 141 | struct wahc *wa; /* Wire adapter we are plugged to */ | 141 | struct wahc *wa; /* Wire adapter we are plugged to */ |
| 142 | struct usb_host_endpoint *ep; | 142 | struct usb_host_endpoint *ep; |
| 143 | struct urb *urb; /* URB we are transfering for */ | 143 | struct urb *urb; /* URB we are transferring for */ |
| 144 | struct wa_seg **seg; /* transfer segments */ | 144 | struct wa_seg **seg; /* transfer segments */ |
| 145 | u8 segs, segs_submitted, segs_done; | 145 | u8 segs, segs_submitted, segs_done; |
| 146 | unsigned is_inbound:1; | 146 | unsigned is_inbound:1; |
| @@ -161,7 +161,7 @@ static inline void wa_xfer_init(struct wa_xfer *xfer) | |||
| 161 | } | 161 | } |
| 162 | 162 | ||
| 163 | /* | 163 | /* |
| 164 | * Destory a transfer structure | 164 | * Destroy a transfer structure |
| 165 | * | 165 | * |
| 166 | * Note that the xfer->seg[index] thingies follow the URB life cycle, | 166 | * Note that the xfer->seg[index] thingies follow the URB life cycle, |
| 167 | * so we need to put them, not free them. | 167 | * so we need to put them, not free them. |
| @@ -494,7 +494,7 @@ static void __wa_xfer_setup_hdr0(struct wa_xfer *xfer, | |||
| 494 | * function does almost the same thing and they work closely | 494 | * function does almost the same thing and they work closely |
| 495 | * together. | 495 | * together. |
| 496 | * | 496 | * |
| 497 | * If the seg request has failed but this DTO phase has suceeded, | 497 | * If the seg request has failed but this DTO phase has succeeded, |
| 498 | * wa_seg_cb() has already failed the segment and moved the | 498 | * wa_seg_cb() has already failed the segment and moved the |
| 499 | * status to WA_SEG_ERROR, so this will go through 'case 0' and | 499 | * status to WA_SEG_ERROR, so this will go through 'case 0' and |
| 500 | * effectively do nothing. | 500 | * effectively do nothing. |
diff --git a/drivers/usb/wusbcore/wusbhc.h b/drivers/usb/wusbcore/wusbhc.h index 6bd426b7ec07..3a2d09162e70 100644 --- a/drivers/usb/wusbcore/wusbhc.h +++ b/drivers/usb/wusbcore/wusbhc.h | |||
| @@ -231,7 +231,7 @@ struct wusb_port { | |||
| 231 | * | 231 | * |
| 232 | * Most of the times when you need to use it, it will be non-NULL, | 232 | * Most of the times when you need to use it, it will be non-NULL, |
| 233 | * so there is no real need to check for it (wusb_dev will | 233 | * so there is no real need to check for it (wusb_dev will |
| 234 | * dissapear before usb_dev). | 234 | * disappear before usb_dev). |
| 235 | * | 235 | * |
| 236 | * - The following fields need to be filled out before calling | 236 | * - The following fields need to be filled out before calling |
| 237 | * wusbhc_create(): ports_max, mmcies_max, mmcie_{add,rm}. | 237 | * wusbhc_create(): ports_max, mmcies_max, mmcie_{add,rm}. |
diff --git a/drivers/uwb/driver.c b/drivers/uwb/driver.c index 08bd6dbfd4a6..3e5454aba5d4 100644 --- a/drivers/uwb/driver.c +++ b/drivers/uwb/driver.c | |||
| @@ -61,7 +61,7 @@ | |||
| 61 | 61 | ||
| 62 | 62 | ||
| 63 | /** | 63 | /** |
| 64 | * If a beacon dissapears for longer than this, then we consider the | 64 | * If a beacon disappears for longer than this, then we consider the |
| 65 | * device who was represented by that beacon to be gone. | 65 | * device who was represented by that beacon to be gone. |
| 66 | * | 66 | * |
| 67 | * ECMA-368[17.2.3, last para] establishes that a device must not | 67 | * ECMA-368[17.2.3, last para] establishes that a device must not |
diff --git a/drivers/uwb/drp.c b/drivers/uwb/drp.c index a8d83e25e3b6..3fbcf789dfaa 100644 --- a/drivers/uwb/drp.c +++ b/drivers/uwb/drp.c | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | 27 | ||
| 28 | /* DRP Conflict Actions ([ECMA-368 2nd Edition] 17.4.6) */ | 28 | /* DRP Conflict Actions ([ECMA-368 2nd Edition] 17.4.6) */ |
| 29 | enum uwb_drp_conflict_action { | 29 | enum uwb_drp_conflict_action { |
| 30 | /* Reservation is mantained, no action needed */ | 30 | /* Reservation is maintained, no action needed */ |
| 31 | UWB_DRP_CONFLICT_MANTAIN = 0, | 31 | UWB_DRP_CONFLICT_MANTAIN = 0, |
| 32 | 32 | ||
| 33 | /* the device shall not transmit frames in conflicting MASs in | 33 | /* the device shall not transmit frames in conflicting MASs in |
| @@ -741,12 +741,12 @@ void uwb_drp_process_all(struct uwb_rc *rc, struct uwb_rc_evt_drp *drp_evt, | |||
| 741 | * DRP notifications can occur for three different reasons: | 741 | * DRP notifications can occur for three different reasons: |
| 742 | * | 742 | * |
| 743 | * - UWB_DRP_NOTIF_DRP_IE_RECVD: one or more DRP IEs with the RC as | 743 | * - UWB_DRP_NOTIF_DRP_IE_RECVD: one or more DRP IEs with the RC as |
| 744 | * the target or source have been recieved. | 744 | * the target or source have been received. |
| 745 | * | 745 | * |
| 746 | * These DRP IEs could be new or for an existing reservation. | 746 | * These DRP IEs could be new or for an existing reservation. |
| 747 | * | 747 | * |
| 748 | * If the DRP IE for an existing reservation ceases to be to | 748 | * If the DRP IE for an existing reservation ceases to be to |
| 749 | * recieved for at least mMaxLostBeacons, the reservation should be | 749 | * received for at least mMaxLostBeacons, the reservation should be |
| 750 | * considered to be terminated. Note that the TERMINATE reason (see | 750 | * considered to be terminated. Note that the TERMINATE reason (see |
| 751 | * below) may not always be signalled (e.g., the remote device has | 751 | * below) may not always be signalled (e.g., the remote device has |
| 752 | * two or more reservations established with the RC). | 752 | * two or more reservations established with the RC). |
diff --git a/drivers/uwb/lc-rc.c b/drivers/uwb/lc-rc.c index b0091c771b9a..b4395f41a007 100644 --- a/drivers/uwb/lc-rc.c +++ b/drivers/uwb/lc-rc.c | |||
| @@ -168,7 +168,7 @@ int uwb_rc_mac_addr_setup(struct uwb_rc *rc) | |||
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | if (uwb_mac_addr_unset(&addr) || uwb_mac_addr_bcast(&addr)) { | 170 | if (uwb_mac_addr_unset(&addr) || uwb_mac_addr_bcast(&addr)) { |
| 171 | addr.data[0] = 0x02; /* locally adminstered and unicast */ | 171 | addr.data[0] = 0x02; /* locally administered and unicast */ |
| 172 | get_random_bytes(&addr.data[1], sizeof(addr.data)-1); | 172 | get_random_bytes(&addr.data[1], sizeof(addr.data)-1); |
| 173 | 173 | ||
| 174 | result = uwb_rc_mac_addr_set(rc, &addr); | 174 | result = uwb_rc_mac_addr_set(rc, &addr); |
diff --git a/drivers/uwb/reset.c b/drivers/uwb/reset.c index 27849292b552..3de630b0f691 100644 --- a/drivers/uwb/reset.c +++ b/drivers/uwb/reset.c | |||
| @@ -52,7 +52,7 @@ const char *__strerror[] = { | |||
| 52 | "cancelled", | 52 | "cancelled", |
| 53 | "invalid state", | 53 | "invalid state", |
| 54 | "invalid size", | 54 | "invalid size", |
| 55 | "ack not recieved", | 55 | "ack not received", |
| 56 | "no more asie notification", | 56 | "no more asie notification", |
| 57 | }; | 57 | }; |
| 58 | 58 | ||
diff --git a/drivers/uwb/umc-dev.c b/drivers/uwb/umc-dev.c index ccd2184e05d2..b2948ec57878 100644 --- a/drivers/uwb/umc-dev.c +++ b/drivers/uwb/umc-dev.c | |||
| @@ -78,7 +78,7 @@ EXPORT_SYMBOL_GPL(umc_device_register); | |||
| 78 | * First we unregister the device, make sure the driver can do it's | 78 | * First we unregister the device, make sure the driver can do it's |
| 79 | * resource release thing and then we try to release any left over | 79 | * resource release thing and then we try to release any left over |
| 80 | * resources. We take a ref to the device, to make sure it doesn't | 80 | * resources. We take a ref to the device, to make sure it doesn't |
| 81 | * dissapear under our feet. | 81 | * disappear under our feet. |
| 82 | */ | 82 | */ |
| 83 | void umc_device_unregister(struct umc_dev *umc) | 83 | void umc_device_unregister(struct umc_dev *umc) |
| 84 | { | 84 | { |
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index ccecf9974587..4484c721f0f9 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c | |||
| @@ -637,7 +637,7 @@ static inline unsigned int chan_to_field(unsigned int chan, const struct fb_bitf | |||
| 637 | * magnitude which needs to be scaled in this function for the hardware. | 637 | * magnitude which needs to be scaled in this function for the hardware. |
| 638 | * Things to take into consideration are how many color registers, if | 638 | * Things to take into consideration are how many color registers, if |
| 639 | * any, are supported with the current color visual. With truecolor mode | 639 | * any, are supported with the current color visual. With truecolor mode |
| 640 | * no color palettes are supported. Here a psuedo palette is created | 640 | * no color palettes are supported. Here a pseudo palette is created |
| 641 | * which we store the value in pseudo_palette in struct fb_info. For | 641 | * which we store the value in pseudo_palette in struct fb_info. For |
| 642 | * pseudocolor mode we have a limited color palette. To deal with this | 642 | * pseudocolor mode we have a limited color palette. To deal with this |
| 643 | * we can program what color is displayed for a particular pixel value. | 643 | * we can program what color is displayed for a particular pixel value. |
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index d437b3daf1f5..ebb893c49e90 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
| @@ -3124,12 +3124,12 @@ static int __devinit atyfb_setup_sparc(struct pci_dev *pdev, | |||
| 3124 | M = pll_regs[2]; | 3124 | M = pll_regs[2]; |
| 3125 | 3125 | ||
| 3126 | /* | 3126 | /* |
| 3127 | * PLL Feedback Divider N (Dependant on CLOCK_CNTL): | 3127 | * PLL Feedback Divider N (Dependent on CLOCK_CNTL): |
| 3128 | */ | 3128 | */ |
| 3129 | N = pll_regs[7 + (clock_cntl & 3)]; | 3129 | N = pll_regs[7 + (clock_cntl & 3)]; |
| 3130 | 3130 | ||
| 3131 | /* | 3131 | /* |
| 3132 | * PLL Post Divider P (Dependant on CLOCK_CNTL): | 3132 | * PLL Post Divider P (Dependent on CLOCK_CNTL): |
| 3133 | */ | 3133 | */ |
| 3134 | P = 1 << (pll_regs[6] >> ((clock_cntl & 3) << 1)); | 3134 | P = 1 << (pll_regs[6] >> ((clock_cntl & 3) << 1)); |
| 3135 | 3135 | ||
diff --git a/drivers/video/aty/mach64_cursor.c b/drivers/video/aty/mach64_cursor.c index 2ba8b3c421a1..46f72ed53510 100644 --- a/drivers/video/aty/mach64_cursor.c +++ b/drivers/video/aty/mach64_cursor.c | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | * to a larger number and saturate CUR_HORZ_POSN to zero. | 51 | * to a larger number and saturate CUR_HORZ_POSN to zero. |
| 52 | * | 52 | * |
| 53 | * if Y becomes negative, CUR_VERT_OFFSET must be adjusted to a larger number, | 53 | * if Y becomes negative, CUR_VERT_OFFSET must be adjusted to a larger number, |
| 54 | * CUR_OFFSET must be adjusted to a point to the appropraite line in the cursor | 54 | * CUR_OFFSET must be adjusted to a point to the appropriate line in the cursor |
| 55 | * definitation and CUR_VERT_POSN must be saturated to zero. | 55 | * definitation and CUR_VERT_POSN must be saturated to zero. |
| 56 | */ | 56 | */ |
| 57 | 57 | ||
diff --git a/drivers/video/au1200fb.c b/drivers/video/au1200fb.c index 4ea187d93768..5dff32ac8044 100644 --- a/drivers/video/au1200fb.c +++ b/drivers/video/au1200fb.c | |||
| @@ -1572,7 +1572,7 @@ static int au1200fb_init_fbinfo(struct au1200fb_device *fbdev) | |||
| 1572 | /* Copy monitor specs from panel data */ | 1572 | /* Copy monitor specs from panel data */ |
| 1573 | /* fixme: we're setting up LCD controller windows, so these dont give a | 1573 | /* fixme: we're setting up LCD controller windows, so these dont give a |
| 1574 | damn as to what the monitor specs are (the panel itself does, but that | 1574 | damn as to what the monitor specs are (the panel itself does, but that |
| 1575 | isnt done here...so maybe need a generic catchall monitor setting??? */ | 1575 | isn't done here...so maybe need a generic catchall monitor setting??? */ |
| 1576 | memcpy(&fbi->monspecs, &panel->monspecs, sizeof(struct fb_monspecs)); | 1576 | memcpy(&fbi->monspecs, &panel->monspecs, sizeof(struct fb_monspecs)); |
| 1577 | 1577 | ||
| 1578 | /* We first try the user mode passed in argument. If that failed, | 1578 | /* We first try the user mode passed in argument. If that failed, |
diff --git a/drivers/video/backlight/corgi_lcd.c b/drivers/video/backlight/corgi_lcd.c index af6098396fe6..c6533bad26f8 100644 --- a/drivers/video/backlight/corgi_lcd.c +++ b/drivers/video/backlight/corgi_lcd.c | |||
| @@ -109,7 +109,7 @@ static unsigned long corgibl_flags; | |||
| 109 | #define CORGIBL_BATTLOW 0x02 | 109 | #define CORGIBL_BATTLOW 0x02 |
| 110 | 110 | ||
| 111 | /* | 111 | /* |
| 112 | * This is only a psuedo I2C interface. We can't use the standard kernel | 112 | * This is only a pseudo I2C interface. We can't use the standard kernel |
| 113 | * routines as the interface is write only. We just assume the data is acked... | 113 | * routines as the interface is write only. We just assume the data is acked... |
| 114 | */ | 114 | */ |
| 115 | static void lcdtg_ssp_i2c_send(struct corgi_lcd *lcd, uint8_t data) | 115 | static void lcdtg_ssp_i2c_send(struct corgi_lcd *lcd, uint8_t data) |
diff --git a/drivers/video/backlight/locomolcd.c b/drivers/video/backlight/locomolcd.c index bbca3127071e..be20b5cbe26c 100644 --- a/drivers/video/backlight/locomolcd.c +++ b/drivers/video/backlight/locomolcd.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * GPL v2 | 6 | * GPL v2 |
| 7 | * | 7 | * |
| 8 | * This driver assumes single CPU. That's okay, because collie is | 8 | * This driver assumes single CPU. That's okay, because collie is |
| 9 | * slightly old hardware, and noone is going to retrofit second CPU to | 9 | * slightly old hardware, and no one is going to retrofit second CPU to |
| 10 | * old PDA. | 10 | * old PDA. |
| 11 | */ | 11 | */ |
| 12 | 12 | ||
diff --git a/drivers/video/bfin-lq035q1-fb.c b/drivers/video/bfin-lq035q1-fb.c index c8e1f04941bd..23b6c4b62c78 100644 --- a/drivers/video/bfin-lq035q1-fb.c +++ b/drivers/video/bfin-lq035q1-fb.c | |||
| @@ -154,8 +154,10 @@ static int __devinit lq035q1_spidev_probe(struct spi_device *spi) | |||
| 154 | 154 | ||
| 155 | ret = lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_ON); | 155 | ret = lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_ON); |
| 156 | ret |= lq035q1_control(spi, LQ035_DRIVER_OUTPUT_CTL, ctl->mode); | 156 | ret |= lq035q1_control(spi, LQ035_DRIVER_OUTPUT_CTL, ctl->mode); |
| 157 | if (ret) | 157 | if (ret) { |
| 158 | kfree(ctl); | ||
| 158 | return ret; | 159 | return ret; |
| 160 | } | ||
| 159 | 161 | ||
| 160 | spi_set_drvdata(spi, ctl); | 162 | spi_set_drvdata(spi, ctl); |
| 161 | 163 | ||
diff --git a/drivers/video/bfin_adv7393fb.h b/drivers/video/bfin_adv7393fb.h index 8c7f9e4fc6eb..cd591b5152a5 100644 --- a/drivers/video/bfin_adv7393fb.h +++ b/drivers/video/bfin_adv7393fb.h | |||
| @@ -87,12 +87,12 @@ static const u8 init_NTSC_TESTPATTERN[] = { | |||
| 87 | 87 | ||
| 88 | static const u8 init_NTSC[] = { | 88 | static const u8 init_NTSC[] = { |
| 89 | 0x00, 0x1E, /* Power up all DACs and PLL */ | 89 | 0x00, 0x1E, /* Power up all DACs and PLL */ |
| 90 | 0xC3, 0x26, /* Program RGB->YCrCb Color Space convertion matrix */ | 90 | 0xC3, 0x26, /* Program RGB->YCrCb Color Space conversion matrix */ |
| 91 | 0xC5, 0x12, /* Program RGB->YCrCb Color Space convertion matrix */ | 91 | 0xC5, 0x12, /* Program RGB->YCrCb Color Space conversion matrix */ |
| 92 | 0xC2, 0x4A, /* Program RGB->YCrCb Color Space convertion matrix */ | 92 | 0xC2, 0x4A, /* Program RGB->YCrCb Color Space conversion matrix */ |
| 93 | 0xC6, 0x5E, /* Program RGB->YCrCb Color Space convertion matrix */ | 93 | 0xC6, 0x5E, /* Program RGB->YCrCb Color Space conversion matrix */ |
| 94 | 0xBD, 0x19, /* Program RGB->YCrCb Color Space convertion matrix */ | 94 | 0xBD, 0x19, /* Program RGB->YCrCb Color Space conversion matrix */ |
| 95 | 0xBF, 0x42, /* Program RGB->YCrCb Color Space convertion matrix */ | 95 | 0xBF, 0x42, /* Program RGB->YCrCb Color Space conversion matrix */ |
| 96 | 0x8C, 0x1F, /* NTSC Subcarrier Frequency */ | 96 | 0x8C, 0x1F, /* NTSC Subcarrier Frequency */ |
| 97 | 0x8D, 0x7C, /* NTSC Subcarrier Frequency */ | 97 | 0x8D, 0x7C, /* NTSC Subcarrier Frequency */ |
| 98 | 0x8E, 0xF0, /* NTSC Subcarrier Frequency */ | 98 | 0x8E, 0xF0, /* NTSC Subcarrier Frequency */ |
| @@ -109,12 +109,12 @@ static const u8 init_NTSC[] = { | |||
| 109 | 109 | ||
| 110 | static const u8 init_PAL[] = { | 110 | static const u8 init_PAL[] = { |
| 111 | 0x00, 0x1E, /* Power up all DACs and PLL */ | 111 | 0x00, 0x1E, /* Power up all DACs and PLL */ |
| 112 | 0xC3, 0x26, /* Program RGB->YCrCb Color Space convertion matrix */ | 112 | 0xC3, 0x26, /* Program RGB->YCrCb Color Space conversion matrix */ |
| 113 | 0xC5, 0x12, /* Program RGB->YCrCb Color Space convertion matrix */ | 113 | 0xC5, 0x12, /* Program RGB->YCrCb Color Space conversion matrix */ |
| 114 | 0xC2, 0x4A, /* Program RGB->YCrCb Color Space convertion matrix */ | 114 | 0xC2, 0x4A, /* Program RGB->YCrCb Color Space conversion matrix */ |
| 115 | 0xC6, 0x5E, /* Program RGB->YCrCb Color Space convertion matrix */ | 115 | 0xC6, 0x5E, /* Program RGB->YCrCb Color Space conversion matrix */ |
| 116 | 0xBD, 0x19, /* Program RGB->YCrCb Color Space convertion matrix */ | 116 | 0xBD, 0x19, /* Program RGB->YCrCb Color Space conversion matrix */ |
| 117 | 0xBF, 0x42, /* Program RGB->YCrCb Color Space convertion matrix */ | 117 | 0xBF, 0x42, /* Program RGB->YCrCb Color Space conversion matrix */ |
| 118 | 0x8C, 0xCB, /* PAL Subcarrier Frequency */ | 118 | 0x8C, 0xCB, /* PAL Subcarrier Frequency */ |
| 119 | 0x8D, 0x8A, /* PAL Subcarrier Frequency */ | 119 | 0x8D, 0x8A, /* PAL Subcarrier Frequency */ |
| 120 | 0x8E, 0x09, /* PAL Subcarrier Frequency */ | 120 | 0x8E, 0x09, /* PAL Subcarrier Frequency */ |
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index c58393402da2..8745637e4b7e 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
| @@ -370,7 +370,6 @@ static void fb_flashcursor(struct work_struct *work) | |||
| 370 | { | 370 | { |
| 371 | struct fb_info *info = container_of(work, struct fb_info, queue); | 371 | struct fb_info *info = container_of(work, struct fb_info, queue); |
| 372 | struct fbcon_ops *ops = info->fbcon_par; | 372 | struct fbcon_ops *ops = info->fbcon_par; |
| 373 | struct display *p; | ||
| 374 | struct vc_data *vc = NULL; | 373 | struct vc_data *vc = NULL; |
| 375 | int c; | 374 | int c; |
| 376 | int mode; | 375 | int mode; |
| @@ -386,7 +385,6 @@ static void fb_flashcursor(struct work_struct *work) | |||
| 386 | return; | 385 | return; |
| 387 | } | 386 | } |
| 388 | 387 | ||
| 389 | p = &fb_display[vc->vc_num]; | ||
| 390 | c = scr_readw((u16 *) vc->vc_pos); | 388 | c = scr_readw((u16 *) vc->vc_pos); |
| 391 | mode = (!ops->cursor_flash || ops->cursor_state.enable) ? | 389 | mode = (!ops->cursor_flash || ops->cursor_state.enable) ? |
| 392 | CM_ERASE : CM_DRAW; | 390 | CM_ERASE : CM_DRAW; |
diff --git a/drivers/video/console/font_mini_4x6.c b/drivers/video/console/font_mini_4x6.c index a19a7f33133e..fa6e698e63c4 100644 --- a/drivers/video/console/font_mini_4x6.c +++ b/drivers/video/console/font_mini_4x6.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | 1 | ||
| 2 | /* Hand composed "Miniscule" 4x6 font, with binary data generated using | 2 | /* Hand composed "Minuscule" 4x6 font, with binary data generated using |
| 3 | * Perl stub. | 3 | * Perl stub. |
| 4 | * | 4 | * |
| 5 | * Use 'perl -x mini_4x6.c < mini_4x6.c > new_version.c' to regenerate | 5 | * Use 'perl -x mini_4x6.c < mini_4x6.c > new_version.c' to regenerate |
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index 8d61ef96eedd..8b7d47386f39 100644 --- a/drivers/video/da8xx-fb.c +++ b/drivers/video/da8xx-fb.c | |||
| @@ -763,7 +763,7 @@ static int fb_wait_for_vsync(struct fb_info *info) | |||
| 763 | 763 | ||
| 764 | /* | 764 | /* |
| 765 | * Set flag to 0 and wait for isr to set to 1. It would seem there is a | 765 | * Set flag to 0 and wait for isr to set to 1. It would seem there is a |
| 766 | * race condition here where the ISR could have occured just before or | 766 | * race condition here where the ISR could have occurred just before or |
| 767 | * just after this set. But since we are just coarsely waiting for | 767 | * just after this set. But since we are just coarsely waiting for |
| 768 | * a frame to complete then that's OK. i.e. if the frame completed | 768 | * a frame to complete then that's OK. i.e. if the frame completed |
| 769 | * just before this code executed then we have to wait another full | 769 | * just before this code executed then we have to wait another full |
diff --git a/drivers/video/display/display-sysfs.c b/drivers/video/display/display-sysfs.c index f6a09ab0dac6..0c647d7af0ee 100644 --- a/drivers/video/display/display-sysfs.c +++ b/drivers/video/display/display-sysfs.c | |||
| @@ -182,7 +182,7 @@ void display_device_unregister(struct display_device *ddev) | |||
| 182 | mutex_lock(&ddev->lock); | 182 | mutex_lock(&ddev->lock); |
| 183 | device_unregister(ddev->dev); | 183 | device_unregister(ddev->dev); |
| 184 | mutex_unlock(&ddev->lock); | 184 | mutex_unlock(&ddev->lock); |
| 185 | // Mark device index as avaliable | 185 | // Mark device index as available |
| 186 | mutex_lock(&allocated_dsp_lock); | 186 | mutex_lock(&allocated_dsp_lock); |
| 187 | idr_remove(&allocated_dsp, ddev->idx); | 187 | idr_remove(&allocated_dsp, ddev->idx); |
| 188 | mutex_unlock(&allocated_dsp_lock); | 188 | mutex_unlock(&allocated_dsp_lock); |
diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c index 70477c2e4b61..4eb38db36e4b 100644 --- a/drivers/video/efifb.c +++ b/drivers/video/efifb.c | |||
| @@ -53,6 +53,7 @@ enum { | |||
| 53 | M_MB_7_1, /* MacBook, 7th rev. */ | 53 | M_MB_7_1, /* MacBook, 7th rev. */ |
| 54 | M_MB_SR, /* MacBook, 2nd gen, (Santa Rosa) */ | 54 | M_MB_SR, /* MacBook, 2nd gen, (Santa Rosa) */ |
| 55 | M_MBA, /* MacBook Air */ | 55 | M_MBA, /* MacBook Air */ |
| 56 | M_MBA_3, /* Macbook Air, 3rd rev */ | ||
| 56 | M_MBP, /* MacBook Pro */ | 57 | M_MBP, /* MacBook Pro */ |
| 57 | M_MBP_2, /* MacBook Pro 2nd gen */ | 58 | M_MBP_2, /* MacBook Pro 2nd gen */ |
| 58 | M_MBP_2_2, /* MacBook Pro 2,2nd gen */ | 59 | M_MBP_2_2, /* MacBook Pro 2,2nd gen */ |
| @@ -64,43 +65,54 @@ enum { | |||
| 64 | M_MBP_6_1, /* MacBook Pro, 6,1th gen */ | 65 | M_MBP_6_1, /* MacBook Pro, 6,1th gen */ |
| 65 | M_MBP_6_2, /* MacBook Pro, 6,2th gen */ | 66 | M_MBP_6_2, /* MacBook Pro, 6,2th gen */ |
| 66 | M_MBP_7_1, /* MacBook Pro, 7,1th gen */ | 67 | M_MBP_7_1, /* MacBook Pro, 7,1th gen */ |
| 68 | M_MBP_8_2, /* MacBook Pro, 8,2nd gen */ | ||
| 67 | M_UNKNOWN /* placeholder */ | 69 | M_UNKNOWN /* placeholder */ |
| 68 | }; | 70 | }; |
| 69 | 71 | ||
| 72 | #define OVERRIDE_NONE 0x0 | ||
| 73 | #define OVERRIDE_BASE 0x1 | ||
| 74 | #define OVERRIDE_STRIDE 0x2 | ||
| 75 | #define OVERRIDE_HEIGHT 0x4 | ||
| 76 | #define OVERRIDE_WIDTH 0x8 | ||
| 77 | |||
| 70 | static struct efifb_dmi_info { | 78 | static struct efifb_dmi_info { |
| 71 | char *optname; | 79 | char *optname; |
| 72 | unsigned long base; | 80 | unsigned long base; |
| 73 | int stride; | 81 | int stride; |
| 74 | int width; | 82 | int width; |
| 75 | int height; | 83 | int height; |
| 84 | int flags; | ||
| 76 | } dmi_list[] __initdata = { | 85 | } dmi_list[] __initdata = { |
| 77 | [M_I17] = { "i17", 0x80010000, 1472 * 4, 1440, 900 }, | 86 | [M_I17] = { "i17", 0x80010000, 1472 * 4, 1440, 900, OVERRIDE_NONE }, |
| 78 | [M_I20] = { "i20", 0x80010000, 1728 * 4, 1680, 1050 }, /* guess */ | 87 | [M_I20] = { "i20", 0x80010000, 1728 * 4, 1680, 1050, OVERRIDE_NONE }, /* guess */ |
| 79 | [M_I20_SR] = { "imac7", 0x40010000, 1728 * 4, 1680, 1050 }, | 88 | [M_I20_SR] = { "imac7", 0x40010000, 1728 * 4, 1680, 1050, OVERRIDE_NONE }, |
| 80 | [M_I24] = { "i24", 0x80010000, 2048 * 4, 1920, 1200 }, /* guess */ | 89 | [M_I24] = { "i24", 0x80010000, 2048 * 4, 1920, 1200, OVERRIDE_NONE }, /* guess */ |
| 81 | [M_I24_8_1] = { "imac8", 0xc0060000, 2048 * 4, 1920, 1200 }, | 90 | [M_I24_8_1] = { "imac8", 0xc0060000, 2048 * 4, 1920, 1200, OVERRIDE_NONE }, |
| 82 | [M_I24_10_1] = { "imac10", 0xc0010000, 2048 * 4, 1920, 1080 }, | 91 | [M_I24_10_1] = { "imac10", 0xc0010000, 2048 * 4, 1920, 1080, OVERRIDE_NONE }, |
| 83 | [M_I27_11_1] = { "imac11", 0xc0010000, 2560 * 4, 2560, 1440 }, | 92 | [M_I27_11_1] = { "imac11", 0xc0010000, 2560 * 4, 2560, 1440, OVERRIDE_NONE }, |
| 84 | [M_MINI]= { "mini", 0x80000000, 2048 * 4, 1024, 768 }, | 93 | [M_MINI]= { "mini", 0x80000000, 2048 * 4, 1024, 768, OVERRIDE_NONE }, |
| 85 | [M_MINI_3_1] = { "mini31", 0x40010000, 1024 * 4, 1024, 768 }, | 94 | [M_MINI_3_1] = { "mini31", 0x40010000, 1024 * 4, 1024, 768, OVERRIDE_NONE }, |
| 86 | [M_MINI_4_1] = { "mini41", 0xc0010000, 2048 * 4, 1920, 1200 }, | 95 | [M_MINI_4_1] = { "mini41", 0xc0010000, 2048 * 4, 1920, 1200, OVERRIDE_NONE }, |
| 87 | [M_MB] = { "macbook", 0x80000000, 2048 * 4, 1280, 800 }, | 96 | [M_MB] = { "macbook", 0x80000000, 2048 * 4, 1280, 800, OVERRIDE_NONE }, |
| 88 | [M_MB_5_1] = { "macbook51", 0x80010000, 2048 * 4, 1280, 800 }, | 97 | [M_MB_5_1] = { "macbook51", 0x80010000, 2048 * 4, 1280, 800, OVERRIDE_NONE }, |
| 89 | [M_MB_6_1] = { "macbook61", 0x80010000, 2048 * 4, 1280, 800 }, | 98 | [M_MB_6_1] = { "macbook61", 0x80010000, 2048 * 4, 1280, 800, OVERRIDE_NONE }, |
| 90 | [M_MB_7_1] = { "macbook71", 0x80010000, 2048 * 4, 1280, 800 }, | 99 | [M_MB_7_1] = { "macbook71", 0x80010000, 2048 * 4, 1280, 800, OVERRIDE_NONE }, |
| 91 | [M_MBA] = { "mba", 0x80000000, 2048 * 4, 1280, 800 }, | 100 | [M_MBA] = { "mba", 0x80000000, 2048 * 4, 1280, 800, OVERRIDE_NONE }, |
| 92 | [M_MBP] = { "mbp", 0x80010000, 1472 * 4, 1440, 900 }, | 101 | /* 11" Macbook Air 3,1 passes the wrong stride */ |
| 93 | [M_MBP_2] = { "mbp2", 0, 0, 0, 0 }, /* placeholder */ | 102 | [M_MBA_3] = { "mba3", 0, 2048 * 4, 0, 0, OVERRIDE_STRIDE }, |
| 94 | [M_MBP_2_2] = { "mbp22", 0x80010000, 1472 * 4, 1440, 900 }, | 103 | [M_MBP] = { "mbp", 0x80010000, 1472 * 4, 1440, 900, OVERRIDE_NONE }, |
| 95 | [M_MBP_SR] = { "mbp3", 0x80030000, 2048 * 4, 1440, 900 }, | 104 | [M_MBP_2] = { "mbp2", 0, 0, 0, 0, OVERRIDE_NONE }, /* placeholder */ |
| 96 | [M_MBP_4] = { "mbp4", 0xc0060000, 2048 * 4, 1920, 1200 }, | 105 | [M_MBP_2_2] = { "mbp22", 0x80010000, 1472 * 4, 1440, 900, OVERRIDE_NONE }, |
| 97 | [M_MBP_5_1] = { "mbp51", 0xc0010000, 2048 * 4, 1440, 900 }, | 106 | [M_MBP_SR] = { "mbp3", 0x80030000, 2048 * 4, 1440, 900, OVERRIDE_NONE }, |
| 98 | [M_MBP_5_2] = { "mbp52", 0xc0010000, 2048 * 4, 1920, 1200 }, | 107 | [M_MBP_4] = { "mbp4", 0xc0060000, 2048 * 4, 1920, 1200, OVERRIDE_NONE }, |
| 99 | [M_MBP_5_3] = { "mbp53", 0xd0010000, 2048 * 4, 1440, 900 }, | 108 | [M_MBP_5_1] = { "mbp51", 0xc0010000, 2048 * 4, 1440, 900, OVERRIDE_NONE }, |
| 100 | [M_MBP_6_1] = { "mbp61", 0x90030000, 2048 * 4, 1920, 1200 }, | 109 | [M_MBP_5_2] = { "mbp52", 0xc0010000, 2048 * 4, 1920, 1200, OVERRIDE_NONE }, |
| 101 | [M_MBP_6_2] = { "mbp62", 0x90030000, 2048 * 4, 1680, 1050 }, | 110 | [M_MBP_5_3] = { "mbp53", 0xd0010000, 2048 * 4, 1440, 900, OVERRIDE_NONE }, |
| 102 | [M_MBP_7_1] = { "mbp71", 0xc0010000, 2048 * 4, 1280, 800 }, | 111 | [M_MBP_6_1] = { "mbp61", 0x90030000, 2048 * 4, 1920, 1200, OVERRIDE_NONE }, |
| 103 | [M_UNKNOWN] = { NULL, 0, 0, 0, 0 } | 112 | [M_MBP_6_2] = { "mbp62", 0x90030000, 2048 * 4, 1680, 1050, OVERRIDE_NONE }, |
| 113 | [M_MBP_7_1] = { "mbp71", 0xc0010000, 2048 * 4, 1280, 800, OVERRIDE_NONE }, | ||
| 114 | [M_MBP_8_2] = { "mbp82", 0x90010000, 1472 * 4, 1440, 900, OVERRIDE_NONE }, | ||
| 115 | [M_UNKNOWN] = { NULL, 0, 0, 0, 0, OVERRIDE_NONE } | ||
| 104 | }; | 116 | }; |
| 105 | 117 | ||
| 106 | static int set_system(const struct dmi_system_id *id); | 118 | static int set_system(const struct dmi_system_id *id); |
| @@ -138,6 +150,7 @@ static const struct dmi_system_id dmi_system_table[] __initconst = { | |||
| 138 | EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook6,1", M_MB_6_1), | 150 | EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook6,1", M_MB_6_1), |
| 139 | EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook7,1", M_MB_7_1), | 151 | EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook7,1", M_MB_7_1), |
| 140 | EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookAir1,1", M_MBA), | 152 | EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookAir1,1", M_MBA), |
| 153 | EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookAir3,1", M_MBA_3), | ||
| 141 | EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro1,1", M_MBP), | 154 | EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro1,1", M_MBP), |
| 142 | EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro2,1", M_MBP_2), | 155 | EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro2,1", M_MBP_2), |
| 143 | EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro2,2", M_MBP_2_2), | 156 | EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro2,2", M_MBP_2_2), |
| @@ -151,19 +164,26 @@ static const struct dmi_system_id dmi_system_table[] __initconst = { | |||
| 151 | EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro6,1", M_MBP_6_1), | 164 | EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro6,1", M_MBP_6_1), |
| 152 | EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro6,2", M_MBP_6_2), | 165 | EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro6,2", M_MBP_6_2), |
| 153 | EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro7,1", M_MBP_7_1), | 166 | EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro7,1", M_MBP_7_1), |
| 167 | EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro8,2", M_MBP_8_2), | ||
| 154 | {}, | 168 | {}, |
| 155 | }; | 169 | }; |
| 156 | 170 | ||
| 171 | #define choose_value(dmivalue, fwvalue, field, flags) ({ \ | ||
| 172 | typeof(fwvalue) _ret_ = fwvalue; \ | ||
| 173 | if ((flags) & (field)) \ | ||
| 174 | _ret_ = dmivalue; \ | ||
| 175 | else if ((fwvalue) == 0) \ | ||
| 176 | _ret_ = dmivalue; \ | ||
| 177 | _ret_; \ | ||
| 178 | }) | ||
| 179 | |||
| 157 | static int set_system(const struct dmi_system_id *id) | 180 | static int set_system(const struct dmi_system_id *id) |
| 158 | { | 181 | { |
| 159 | struct efifb_dmi_info *info = id->driver_data; | 182 | struct efifb_dmi_info *info = id->driver_data; |
| 160 | if (info->base == 0) | ||
| 161 | return 0; | ||
| 162 | 183 | ||
| 163 | printk(KERN_INFO "efifb: dmi detected %s - framebuffer at %p " | 184 | if (info->base == 0 && info->height == 0 && info->width == 0 |
| 164 | "(%dx%d, stride %d)\n", id->ident, | 185 | && info->stride == 0) |
| 165 | (void *)info->base, info->width, info->height, | 186 | return 0; |
| 166 | info->stride); | ||
| 167 | 187 | ||
| 168 | /* Trust the bootloader over the DMI tables */ | 188 | /* Trust the bootloader over the DMI tables */ |
| 169 | if (screen_info.lfb_base == 0) { | 189 | if (screen_info.lfb_base == 0) { |
| @@ -171,40 +191,47 @@ static int set_system(const struct dmi_system_id *id) | |||
| 171 | struct pci_dev *dev = NULL; | 191 | struct pci_dev *dev = NULL; |
| 172 | int found_bar = 0; | 192 | int found_bar = 0; |
| 173 | #endif | 193 | #endif |
| 174 | screen_info.lfb_base = info->base; | 194 | if (info->base) { |
| 195 | screen_info.lfb_base = choose_value(info->base, | ||
| 196 | screen_info.lfb_base, OVERRIDE_BASE, | ||
| 197 | info->flags); | ||
| 175 | 198 | ||
| 176 | #if defined(CONFIG_PCI) | 199 | #if defined(CONFIG_PCI) |
| 177 | /* make sure that the address in the table is actually on a | 200 | /* make sure that the address in the table is actually |
| 178 | * VGA device's PCI BAR */ | 201 | * on a VGA device's PCI BAR */ |
| 179 | 202 | ||
| 180 | for_each_pci_dev(dev) { | 203 | for_each_pci_dev(dev) { |
| 181 | int i; | 204 | int i; |
| 182 | if ((dev->class >> 8) != PCI_CLASS_DISPLAY_VGA) | 205 | if ((dev->class >> 8) != PCI_CLASS_DISPLAY_VGA) |
| 183 | continue; | 206 | continue; |
| 184 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { | 207 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { |
| 185 | resource_size_t start, end; | 208 | resource_size_t start, end; |
| 186 | 209 | ||
| 187 | start = pci_resource_start(dev, i); | 210 | start = pci_resource_start(dev, i); |
| 188 | if (start == 0) | 211 | if (start == 0) |
| 189 | break; | 212 | break; |
| 190 | end = pci_resource_end(dev, i); | 213 | end = pci_resource_end(dev, i); |
| 191 | if (screen_info.lfb_base >= start && | 214 | if (screen_info.lfb_base >= start && |
| 192 | screen_info.lfb_base < end) { | 215 | screen_info.lfb_base < end) { |
| 193 | found_bar = 1; | 216 | found_bar = 1; |
| 217 | } | ||
| 194 | } | 218 | } |
| 195 | } | 219 | } |
| 196 | } | 220 | if (!found_bar) |
| 197 | if (!found_bar) | 221 | screen_info.lfb_base = 0; |
| 198 | screen_info.lfb_base = 0; | ||
| 199 | #endif | 222 | #endif |
| 223 | } | ||
| 200 | } | 224 | } |
| 201 | if (screen_info.lfb_base) { | 225 | if (screen_info.lfb_base) { |
| 202 | if (screen_info.lfb_linelength == 0) | 226 | screen_info.lfb_linelength = choose_value(info->stride, |
| 203 | screen_info.lfb_linelength = info->stride; | 227 | screen_info.lfb_linelength, OVERRIDE_STRIDE, |
| 204 | if (screen_info.lfb_width == 0) | 228 | info->flags); |
| 205 | screen_info.lfb_width = info->width; | 229 | screen_info.lfb_width = choose_value(info->width, |
| 206 | if (screen_info.lfb_height == 0) | 230 | screen_info.lfb_width, OVERRIDE_WIDTH, |
| 207 | screen_info.lfb_height = info->height; | 231 | info->flags); |
| 232 | screen_info.lfb_height = choose_value(info->height, | ||
| 233 | screen_info.lfb_height, OVERRIDE_HEIGHT, | ||
| 234 | info->flags); | ||
| 208 | if (screen_info.orig_video_isVGA == 0) | 235 | if (screen_info.orig_video_isVGA == 0) |
| 209 | screen_info.orig_video_isVGA = VIDEO_TYPE_EFI; | 236 | screen_info.orig_video_isVGA = VIDEO_TYPE_EFI; |
| 210 | } else { | 237 | } else { |
| @@ -214,6 +241,13 @@ static int set_system(const struct dmi_system_id *id) | |||
| 214 | screen_info.orig_video_isVGA = 0; | 241 | screen_info.orig_video_isVGA = 0; |
| 215 | return 0; | 242 | return 0; |
| 216 | } | 243 | } |
| 244 | |||
| 245 | printk(KERN_INFO "efifb: dmi detected %s - framebuffer at %p " | ||
| 246 | "(%dx%d, stride %d)\n", id->ident, | ||
| 247 | (void *)screen_info.lfb_base, screen_info.lfb_width, | ||
| 248 | screen_info.lfb_height, screen_info.lfb_linelength); | ||
| 249 | |||
| 250 | |||
| 217 | return 1; | 251 | return 1; |
| 218 | } | 252 | } |
| 219 | 253 | ||
diff --git a/drivers/video/ep93xx-fb.c b/drivers/video/ep93xx-fb.c index b358d045f130..cbdb1bd77c21 100644 --- a/drivers/video/ep93xx-fb.c +++ b/drivers/video/ep93xx-fb.c | |||
| @@ -456,7 +456,7 @@ static int __init ep93xxfb_alloc_videomem(struct fb_info *info) | |||
| 456 | * There is a bug in the ep93xx framebuffer which causes problems | 456 | * There is a bug in the ep93xx framebuffer which causes problems |
| 457 | * if bit 27 of the physical address is set. | 457 | * if bit 27 of the physical address is set. |
| 458 | * See: http://marc.info/?l=linux-arm-kernel&m=110061245502000&w=2 | 458 | * See: http://marc.info/?l=linux-arm-kernel&m=110061245502000&w=2 |
| 459 | * There does not seem to be any offical errata for this, but I | 459 | * There does not seem to be any official errata for this, but I |
| 460 | * have confirmed the problem exists on my hardware (ep9315) at | 460 | * have confirmed the problem exists on my hardware (ep9315) at |
| 461 | * least. | 461 | * least. |
| 462 | */ | 462 | */ |
diff --git a/drivers/video/fb-puv3.c b/drivers/video/fb-puv3.c index dbd2dc4745d1..27f2c57e06e9 100644 --- a/drivers/video/fb-puv3.c +++ b/drivers/video/fb-puv3.c | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
| 14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
| 15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
| 16 | #include <linux/vmalloc.h> | ||
| 17 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
| 18 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
| 19 | #include <linux/fb.h> | 18 | #include <linux/fb.h> |
| @@ -531,7 +530,7 @@ static int unifb_set_par(struct fb_info *info) | |||
| 531 | return -EINVAL; | 530 | return -EINVAL; |
| 532 | } | 531 | } |
| 533 | 532 | ||
| 534 | writel(PKUNITY_UNIGFX_MMAP_BASE, UDE_FSA); | 533 | writel(info->fix.smem_start, UDE_FSA); |
| 535 | writel(info->var.yres, UDE_LS); | 534 | writel(info->var.yres, UDE_LS); |
| 536 | writel(get_line_length(info->var.xres, | 535 | writel(get_line_length(info->var.xres, |
| 537 | info->var.bits_per_pixel) >> 3, UDE_PS); | 536 | info->var.bits_per_pixel) >> 3, UDE_PS); |
| @@ -680,13 +679,27 @@ static int unifb_probe(struct platform_device *dev) | |||
| 680 | struct fb_info *info; | 679 | struct fb_info *info; |
| 681 | u32 unifb_regs[UNIFB_REGS_NUM]; | 680 | u32 unifb_regs[UNIFB_REGS_NUM]; |
| 682 | int retval = -ENOMEM; | 681 | int retval = -ENOMEM; |
| 683 | struct resource *iomem, *mapmem; | 682 | struct resource *iomem; |
| 683 | void *videomemory; | ||
| 684 | |||
| 685 | videomemory = (void *)__get_free_pages(GFP_KERNEL | __GFP_COMP, | ||
| 686 | get_order(UNIFB_MEMSIZE)); | ||
| 687 | if (!videomemory) | ||
| 688 | goto err; | ||
| 689 | |||
| 690 | memset(videomemory, 0, UNIFB_MEMSIZE); | ||
| 691 | |||
| 692 | unifb_fix.smem_start = virt_to_phys(videomemory); | ||
| 693 | unifb_fix.smem_len = UNIFB_MEMSIZE; | ||
| 694 | |||
| 695 | iomem = platform_get_resource(dev, IORESOURCE_MEM, 0); | ||
| 696 | unifb_fix.mmio_start = iomem->start; | ||
| 684 | 697 | ||
| 685 | info = framebuffer_alloc(sizeof(u32)*256, &dev->dev); | 698 | info = framebuffer_alloc(sizeof(u32)*256, &dev->dev); |
| 686 | if (!info) | 699 | if (!info) |
| 687 | goto err; | 700 | goto err; |
| 688 | 701 | ||
| 689 | info->screen_base = (char __iomem *)KUSER_UNIGFX_BASE; | 702 | info->screen_base = (char __iomem *)videomemory; |
| 690 | info->fbops = &unifb_ops; | 703 | info->fbops = &unifb_ops; |
| 691 | 704 | ||
| 692 | retval = fb_find_mode(&info->var, info, NULL, | 705 | retval = fb_find_mode(&info->var, info, NULL, |
| @@ -695,13 +708,6 @@ static int unifb_probe(struct platform_device *dev) | |||
| 695 | if (!retval || (retval == 4)) | 708 | if (!retval || (retval == 4)) |
| 696 | info->var = unifb_default; | 709 | info->var = unifb_default; |
| 697 | 710 | ||
| 698 | iomem = platform_get_resource(dev, IORESOURCE_MEM, 0); | ||
| 699 | unifb_fix.mmio_start = iomem->start; | ||
| 700 | |||
| 701 | mapmem = platform_get_resource(dev, IORESOURCE_MEM, 1); | ||
| 702 | unifb_fix.smem_start = mapmem->start; | ||
| 703 | unifb_fix.smem_len = UNIFB_MEMSIZE; | ||
| 704 | |||
| 705 | info->fix = unifb_fix; | 711 | info->fix = unifb_fix; |
| 706 | info->pseudo_palette = info->par; | 712 | info->pseudo_palette = info->par; |
| 707 | info->par = NULL; | 713 | info->par = NULL; |
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index e2bf95370e40..e0c2284924b6 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
| @@ -1507,7 +1507,7 @@ void remove_conflicting_framebuffers(struct apertures_struct *a, | |||
| 1507 | (primary && gen_aper && gen_aper->count && | 1507 | (primary && gen_aper && gen_aper->count && |
| 1508 | gen_aper->ranges[0].base == VGA_FB_PHYS)) { | 1508 | gen_aper->ranges[0].base == VGA_FB_PHYS)) { |
| 1509 | 1509 | ||
| 1510 | printk(KERN_ERR "fb: conflicting fb hw usage " | 1510 | printk(KERN_INFO "fb: conflicting fb hw usage " |
| 1511 | "%s vs %s - removing generic driver\n", | 1511 | "%s vs %s - removing generic driver\n", |
| 1512 | name, registered_fb[i]->fix.id); | 1512 | name, registered_fb[i]->fix.id); |
| 1513 | unregister_framebuffer(registered_fb[i]); | 1513 | unregister_framebuffer(registered_fb[i]); |
diff --git a/drivers/video/fbsysfs.c b/drivers/video/fbsysfs.c index f4a32779168b..04251ce89184 100644 --- a/drivers/video/fbsysfs.c +++ b/drivers/video/fbsysfs.c | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | * for driver private data (info->par). info->par (if any) will be | 33 | * for driver private data (info->par). info->par (if any) will be |
| 34 | * aligned to sizeof(long). | 34 | * aligned to sizeof(long). |
| 35 | * | 35 | * |
| 36 | * Returns the new structure, or NULL if an error occured. | 36 | * Returns the new structure, or NULL if an error occurred. |
| 37 | * | 37 | * |
| 38 | */ | 38 | */ |
| 39 | struct fb_info *framebuffer_alloc(size_t size, struct device *dev) | 39 | struct fb_info *framebuffer_alloc(size_t size, struct device *dev) |
diff --git a/drivers/video/fm2fb.c b/drivers/video/fm2fb.c index 1b0feb8e7244..d0533b7aad79 100644 --- a/drivers/video/fm2fb.c +++ b/drivers/video/fm2fb.c | |||
| @@ -45,7 +45,7 @@ | |||
| 45 | * buffer needs an amount of memory of 1.769.472 bytes which | 45 | * buffer needs an amount of memory of 1.769.472 bytes which |
| 46 | * is near to 2 MByte (the allocated address space of Zorro2). | 46 | * is near to 2 MByte (the allocated address space of Zorro2). |
| 47 | * The memory is channel interleaved. That means every channel | 47 | * The memory is channel interleaved. That means every channel |
| 48 | * owns four VRAMs. Unfortunatly most FrameMasters II are | 48 | * owns four VRAMs. Unfortunately most FrameMasters II are |
| 49 | * not assembled with memory for the alpha channel. In this | 49 | * not assembled with memory for the alpha channel. In this |
| 50 | * case it could be possible to add the frame buffer into the | 50 | * case it could be possible to add the frame buffer into the |
| 51 | * normal memory pool. | 51 | * normal memory pool. |
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index 9048f87fa8c1..bedf5be27f05 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c | |||
| @@ -882,7 +882,7 @@ static inline __u32 CNVT_TOHW(__u32 val, __u32 width) | |||
| 882 | * which needs to be scaled in this function for the hardware. Things to take | 882 | * which needs to be scaled in this function for the hardware. Things to take |
| 883 | * into consideration are how many color registers, if any, are supported with | 883 | * into consideration are how many color registers, if any, are supported with |
| 884 | * the current color visual. With truecolor mode no color palettes are | 884 | * the current color visual. With truecolor mode no color palettes are |
| 885 | * supported. Here a psuedo palette is created which we store the value in | 885 | * supported. Here a pseudo palette is created which we store the value in |
| 886 | * pseudo_palette in struct fb_info. For pseudocolor mode we have a limited | 886 | * pseudo_palette in struct fb_info. For pseudocolor mode we have a limited |
| 887 | * color palette. | 887 | * color palette. |
| 888 | */ | 888 | */ |
diff --git a/drivers/video/gbefb.c b/drivers/video/gbefb.c index 933899dca33a..7e7b7a9ba274 100644 --- a/drivers/video/gbefb.c +++ b/drivers/video/gbefb.c | |||
| @@ -721,7 +721,7 @@ static int gbefb_set_par(struct fb_info *info) | |||
| 721 | 721 | ||
| 722 | Tiles have the advantage that they can be allocated individually in | 722 | Tiles have the advantage that they can be allocated individually in |
| 723 | memory. However, this mapping is not linear at all, which is not | 723 | memory. However, this mapping is not linear at all, which is not |
| 724 | really convienient. In order to support linear addressing, the GBE | 724 | really convenient. In order to support linear addressing, the GBE |
| 725 | DMA hardware is fooled into thinking the screen is only one tile | 725 | DMA hardware is fooled into thinking the screen is only one tile |
| 726 | large and but has a greater height, so that the DMA transfer covers | 726 | large and but has a greater height, so that the DMA transfer covers |
| 727 | the same region. | 727 | the same region. |
diff --git a/drivers/video/geode/lxfb.h b/drivers/video/geode/lxfb.h index be8ccb47ebe0..cfcd8090f313 100644 --- a/drivers/video/geode/lxfb.h +++ b/drivers/video/geode/lxfb.h | |||
| @@ -117,7 +117,7 @@ enum gp_registers { | |||
| 117 | }; | 117 | }; |
| 118 | 118 | ||
| 119 | #define GP_BLT_STATUS_CE (1 << 4) /* cmd buf empty */ | 119 | #define GP_BLT_STATUS_CE (1 << 4) /* cmd buf empty */ |
| 120 | #define GP_BLT_STATUS_PB (1 << 0) /* primative busy */ | 120 | #define GP_BLT_STATUS_PB (1 << 0) /* primitive busy */ |
| 121 | 121 | ||
| 122 | 122 | ||
| 123 | /* Display Controller registers (table 6-47 from the data book) */ | 123 | /* Display Controller registers (table 6-47 from the data book) */ |
diff --git a/drivers/video/i810/i810_accel.c b/drivers/video/i810/i810_accel.c index f5bedee4310a..7672d2ea9b35 100644 --- a/drivers/video/i810/i810_accel.c +++ b/drivers/video/i810/i810_accel.c | |||
| @@ -112,7 +112,7 @@ static inline int wait_for_engine_idle(struct fb_info *info) | |||
| 112 | * @par: pointer to i810fb_par structure | 112 | * @par: pointer to i810fb_par structure |
| 113 | * | 113 | * |
| 114 | * DESCRIPTION: | 114 | * DESCRIPTION: |
| 115 | * Checks/waits for sufficent space in ringbuffer of size | 115 | * Checks/waits for sufficient space in ringbuffer of size |
| 116 | * space. Returns the tail of the buffer | 116 | * space. Returns the tail of the buffer |
| 117 | */ | 117 | */ |
| 118 | static inline u32 begin_iring(struct fb_info *info, u32 space) | 118 | static inline u32 begin_iring(struct fb_info *info, u32 space) |
diff --git a/drivers/video/kyro/STG4000OverlayDevice.c b/drivers/video/kyro/STG4000OverlayDevice.c index a8c9713413e6..0aeeaa10708b 100644 --- a/drivers/video/kyro/STG4000OverlayDevice.c +++ b/drivers/video/kyro/STG4000OverlayDevice.c | |||
| @@ -417,7 +417,7 @@ int SetOverlayViewPort(volatile STG4000REG __iomem *pSTGReg, | |||
| 417 | /***************** Horizontal decimation/scaling ***************************/ | 417 | /***************** Horizontal decimation/scaling ***************************/ |
| 418 | 418 | ||
| 419 | /* | 419 | /* |
| 420 | * Now we handle the horizontal case, this is a simplified verison of | 420 | * Now we handle the horizontal case, this is a simplified version of |
| 421 | * the vertical case in that we decimate by factors of 2. as we are | 421 | * the vertical case in that we decimate by factors of 2. as we are |
| 422 | * working in words we should always be able to decimate by these | 422 | * working in words we should always be able to decimate by these |
| 423 | * factors. as we always have to have a buffer which is aligned to a | 423 | * factors. as we always have to have a buffer which is aligned to a |
diff --git a/drivers/video/kyro/STG4000Reg.h b/drivers/video/kyro/STG4000Reg.h index 244549e61368..5d6269882589 100644 --- a/drivers/video/kyro/STG4000Reg.h +++ b/drivers/video/kyro/STG4000Reg.h | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | 16 | ||
| 17 | /* | 17 | /* |
| 18 | * Macros that access memory mapped card registers in PCI space | 18 | * Macros that access memory mapped card registers in PCI space |
| 19 | * Add an appropraite section for your OS or processor architecture. | 19 | * Add an appropriate section for your OS or processor architecture. |
| 20 | */ | 20 | */ |
| 21 | #if defined(__KERNEL__) | 21 | #if defined(__KERNEL__) |
| 22 | #include <asm/page.h> | 22 | #include <asm/page.h> |
diff --git a/drivers/video/matrox/matroxfb_DAC1064.h b/drivers/video/matrox/matroxfb_DAC1064.h index c6ed7801efe2..1e6e45b57b78 100644 --- a/drivers/video/matrox/matroxfb_DAC1064.h +++ b/drivers/video/matrox/matroxfb_DAC1064.h | |||
| @@ -46,7 +46,7 @@ void DAC1064_global_restore(struct matrox_fb_info *minfo); | |||
| 46 | #define M1064_XDVICLKCTRL_DVILOOPCTL 0x30 | 46 | #define M1064_XDVICLKCTRL_DVILOOPCTL 0x30 |
| 47 | /* CRTC2 pixel clock allowed to(0)/blocked from(1) driving CRTC2 */ | 47 | /* CRTC2 pixel clock allowed to(0)/blocked from(1) driving CRTC2 */ |
| 48 | #define M1064_XDVICLKCTRL_C2DVICLKEN 0x40 | 48 | #define M1064_XDVICLKCTRL_C2DVICLKEN 0x40 |
| 49 | /* P1PLL loop filter bandwith selection */ | 49 | /* P1PLL loop filter bandwidth selection */ |
| 50 | #define M1064_XDVICLKCTRL_P1LOOPBWDTCTL 0x80 | 50 | #define M1064_XDVICLKCTRL_P1LOOPBWDTCTL 0x80 |
| 51 | #define M1064_XCURCOL0RED 0x08 | 51 | #define M1064_XCURCOL0RED 0x08 |
| 52 | #define M1064_XCURCOL0GREEN 0x09 | 52 | #define M1064_XCURCOL0GREEN 0x09 |
diff --git a/drivers/video/matrox/matroxfb_Ti3026.c b/drivers/video/matrox/matroxfb_Ti3026.c index 835aaaae6b96..9a44cec394b5 100644 --- a/drivers/video/matrox/matroxfb_Ti3026.c +++ b/drivers/video/matrox/matroxfb_Ti3026.c | |||
| @@ -387,7 +387,7 @@ static int Ti3026_init(struct matrox_fb_info *minfo, struct my_timming *m) | |||
| 387 | hw->DACreg[POS3026_XMISCCTRL] = TVP3026_XMISCCTRL_DAC_PUP | TVP3026_XMISCCTRL_DAC_8BIT | TVP3026_XMISCCTRL_PSEL_DIS | TVP3026_XMISCCTRL_PSEL_LOW; | 387 | hw->DACreg[POS3026_XMISCCTRL] = TVP3026_XMISCCTRL_DAC_PUP | TVP3026_XMISCCTRL_DAC_8BIT | TVP3026_XMISCCTRL_PSEL_DIS | TVP3026_XMISCCTRL_PSEL_LOW; |
| 388 | break; | 388 | break; |
| 389 | case 16: | 389 | case 16: |
| 390 | /* XLATCHCTRL should be _4_1 / _2_1... Why is not? (_2_1 is used everytime) */ | 390 | /* XLATCHCTRL should be _4_1 / _2_1... Why is not? (_2_1 is used every time) */ |
| 391 | hw->DACreg[POS3026_XTRUECOLORCTRL] = (minfo->fbcon.var.green.length == 5) ? (TVP3026_XTRUECOLORCTRL_DIRECTCOLOR | TVP3026_XTRUECOLORCTRL_ORGB_1555) : (TVP3026_XTRUECOLORCTRL_DIRECTCOLOR | TVP3026_XTRUECOLORCTRL_RGB_565); | 391 | hw->DACreg[POS3026_XTRUECOLORCTRL] = (minfo->fbcon.var.green.length == 5) ? (TVP3026_XTRUECOLORCTRL_DIRECTCOLOR | TVP3026_XTRUECOLORCTRL_ORGB_1555) : (TVP3026_XTRUECOLORCTRL_DIRECTCOLOR | TVP3026_XTRUECOLORCTRL_RGB_565); |
| 392 | hw->DACreg[POS3026_XMUXCTRL] = muxctrl | TVP3026_XMUXCTRL_PIXEL_16BIT; | 392 | hw->DACreg[POS3026_XMUXCTRL] = muxctrl | TVP3026_XMUXCTRL_PIXEL_16BIT; |
| 393 | hw->DACreg[POS3026_XCLKCTRL] = TVP3026_XCLKCTRL_SRC_PLL | TVP3026_XCLKCTRL_DIV2; | 393 | hw->DACreg[POS3026_XCLKCTRL] = TVP3026_XCLKCTRL_SRC_PLL | TVP3026_XCLKCTRL_DIV2; |
| @@ -399,7 +399,7 @@ static int Ti3026_init(struct matrox_fb_info *minfo, struct my_timming *m) | |||
| 399 | hw->DACreg[POS3026_XCLKCTRL] = TVP3026_XCLKCTRL_SRC_PLL | TVP3026_XCLKCTRL_DIV4; | 399 | hw->DACreg[POS3026_XCLKCTRL] = TVP3026_XCLKCTRL_SRC_PLL | TVP3026_XCLKCTRL_DIV4; |
| 400 | break; | 400 | break; |
| 401 | case 32: | 401 | case 32: |
| 402 | /* XLATCHCTRL should be _2_1 / _1_1... Why is not? (_2_1 is used everytime) */ | 402 | /* XLATCHCTRL should be _2_1 / _1_1... Why is not? (_2_1 is used every time) */ |
| 403 | hw->DACreg[POS3026_XMUXCTRL] = muxctrl | TVP3026_XMUXCTRL_PIXEL_32BIT; | 403 | hw->DACreg[POS3026_XMUXCTRL] = muxctrl | TVP3026_XMUXCTRL_PIXEL_32BIT; |
| 404 | break; | 404 | break; |
| 405 | default: | 405 | default: |
diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c index 5ce6fa6e59f0..44bf8d4a216b 100644 --- a/drivers/video/matrox/matroxfb_base.c +++ b/drivers/video/matrox/matroxfb_base.c | |||
| @@ -621,7 +621,7 @@ static int matroxfb_decode_var(const struct matrox_fb_info *minfo, | |||
| 621 | var->yoffset = var->yres_virtual - var->yres; | 621 | var->yoffset = var->yres_virtual - var->yres; |
| 622 | 622 | ||
| 623 | if (bpp == 16 && var->green.length == 5) { | 623 | if (bpp == 16 && var->green.length == 5) { |
| 624 | bpp--; /* an artifical value - 15 */ | 624 | bpp--; /* an artificial value - 15 */ |
| 625 | } | 625 | } |
| 626 | 626 | ||
| 627 | for (rgbt = table; rgbt->bpp < bpp; rgbt++); | 627 | for (rgbt = table; rgbt->bpp < bpp; rgbt++); |
diff --git a/drivers/video/matrox/matroxfb_base.h b/drivers/video/matrox/matroxfb_base.h index f96a471cb1a8..11ed57bb704e 100644 --- a/drivers/video/matrox/matroxfb_base.h +++ b/drivers/video/matrox/matroxfb_base.h | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | #undef MATROXFB_DEBUG | 12 | #undef MATROXFB_DEBUG |
| 13 | 13 | ||
| 14 | /* heavy debugging: */ | 14 | /* heavy debugging: */ |
| 15 | /* -- logs putc[s], so everytime a char is displayed, it's logged */ | 15 | /* -- logs putc[s], so every time a char is displayed, it's logged */ |
| 16 | #undef MATROXFB_DEBUG_HEAVY | 16 | #undef MATROXFB_DEBUG_HEAVY |
| 17 | 17 | ||
| 18 | /* This one _could_ cause infinite loops */ | 18 | /* This one _could_ cause infinite loops */ |
diff --git a/drivers/video/nuc900fb.h b/drivers/video/nuc900fb.h index 6c23aa3d3b89..bc7c9300f276 100644 --- a/drivers/video/nuc900fb.h +++ b/drivers/video/nuc900fb.h | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * the Free Software Foundation; either version 2 of the License, or | 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. | 9 | * (at your option) any later version. |
| 10 | * | 10 | * |
| 11 | * Auther: | 11 | * Author: |
| 12 | * Wang Qiang(rurality.linux@gmail.com) 2009/12/16 | 12 | * Wang Qiang(rurality.linux@gmail.com) 2009/12/16 |
| 13 | */ | 13 | */ |
| 14 | 14 | ||
diff --git a/drivers/video/omap/Kconfig b/drivers/video/omap/Kconfig index 15e7f1912af9..196fa2e7f438 100644 --- a/drivers/video/omap/Kconfig +++ b/drivers/video/omap/Kconfig | |||
| @@ -64,7 +64,7 @@ config FB_OMAP_MANUAL_UPDATE | |||
| 64 | depends on FB_OMAP && FB_OMAP_LCDC_EXTERNAL | 64 | depends on FB_OMAP && FB_OMAP_LCDC_EXTERNAL |
| 65 | help | 65 | help |
| 66 | Say Y here, if your user-space applications are capable of | 66 | Say Y here, if your user-space applications are capable of |
| 67 | notifying the frame buffer driver when a change has occured in | 67 | notifying the frame buffer driver when a change has occurred in |
| 68 | the frame buffer content and thus a reload of the image data to | 68 | the frame buffer content and thus a reload of the image data to |
| 69 | the external frame buffer is required. If unsure, say N. | 69 | the external frame buffer is required. If unsure, say N. |
| 70 | 70 | ||
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 0d44f070ef36..a981def8099a 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c | |||
| @@ -587,7 +587,7 @@ static void get_edid_timing_data(u8 *edid) | |||
| 587 | struct hdmi_cm cm; | 587 | struct hdmi_cm cm; |
| 588 | struct omap_video_timings edid_timings; | 588 | struct omap_video_timings edid_timings; |
| 589 | 589 | ||
| 590 | /* seach block 0, there are 4 DTDs arranged in priority order */ | 590 | /* search block 0, there are 4 DTDs arranged in priority order */ |
| 591 | for (count = 0; count < EDID_SIZE_BLOCK0_TIMING_DESCRIPTOR; count++) { | 591 | for (count = 0; count < EDID_SIZE_BLOCK0_TIMING_DESCRIPTOR; count++) { |
| 592 | current_descriptor_addrs = | 592 | current_descriptor_addrs = |
| 593 | EDID_DESCRIPTOR_BLOCK0_ADDRESS + | 593 | EDID_DESCRIPTOR_BLOCK0_ADDRESS + |
diff --git a/drivers/video/pxa3xx-gcu.c b/drivers/video/pxa3xx-gcu.c index cf4beb9dc9bb..0283c7021090 100644 --- a/drivers/video/pxa3xx-gcu.c +++ b/drivers/video/pxa3xx-gcu.c | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | 25 | ||
| 26 | /* | 26 | /* |
| 27 | * WARNING: This controller is attached to System Bus 2 of the PXA which | 27 | * WARNING: This controller is attached to System Bus 2 of the PXA which |
| 28 | * needs its arbiter to be enabled explictly (CKENB & 1<<9). | 28 | * needs its arbiter to be enabled explicitly (CKENB & 1<<9). |
| 29 | * There is currently no way to do this from Linux, so you need to teach | 29 | * There is currently no way to do this from Linux, so you need to teach |
| 30 | * your bootloader for now. | 30 | * your bootloader for now. |
| 31 | */ | 31 | */ |
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 825b665245bb..0f4e8c942f9e 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
| @@ -627,7 +627,12 @@ static void overlay1fb_enable(struct pxafb_layer *ofb) | |||
| 627 | 627 | ||
| 628 | static void overlay1fb_disable(struct pxafb_layer *ofb) | 628 | static void overlay1fb_disable(struct pxafb_layer *ofb) |
| 629 | { | 629 | { |
| 630 | uint32_t lccr5 = lcd_readl(ofb->fbi, LCCR5); | 630 | uint32_t lccr5; |
| 631 | |||
| 632 | if (!(lcd_readl(ofb->fbi, OVL1C1) & OVLxC1_OEN)) | ||
| 633 | return; | ||
| 634 | |||
| 635 | lccr5 = lcd_readl(ofb->fbi, LCCR5); | ||
| 631 | 636 | ||
| 632 | lcd_writel(ofb->fbi, OVL1C1, ofb->control[0] & ~OVLxC1_OEN); | 637 | lcd_writel(ofb->fbi, OVL1C1, ofb->control[0] & ~OVLxC1_OEN); |
| 633 | 638 | ||
| @@ -685,7 +690,12 @@ static void overlay2fb_enable(struct pxafb_layer *ofb) | |||
| 685 | 690 | ||
| 686 | static void overlay2fb_disable(struct pxafb_layer *ofb) | 691 | static void overlay2fb_disable(struct pxafb_layer *ofb) |
| 687 | { | 692 | { |
| 688 | uint32_t lccr5 = lcd_readl(ofb->fbi, LCCR5); | 693 | uint32_t lccr5; |
| 694 | |||
| 695 | if (!(lcd_readl(ofb->fbi, OVL2C1) & OVLxC1_OEN)) | ||
| 696 | return; | ||
| 697 | |||
| 698 | lccr5 = lcd_readl(ofb->fbi, LCCR5); | ||
| 689 | 699 | ||
| 690 | lcd_writel(ofb->fbi, OVL2C1, ofb->control[0] & ~OVLxC1_OEN); | 700 | lcd_writel(ofb->fbi, OVL2C1, ofb->control[0] & ~OVLxC1_OEN); |
| 691 | 701 | ||
| @@ -720,12 +730,10 @@ static int overlayfb_open(struct fb_info *info, int user) | |||
| 720 | if (user == 0) | 730 | if (user == 0) |
| 721 | return -ENODEV; | 731 | return -ENODEV; |
| 722 | 732 | ||
| 723 | /* allow only one user at a time */ | 733 | if (ofb->usage++ == 0) |
| 724 | if (atomic_inc_and_test(&ofb->usage)) | 734 | /* unblank the base framebuffer */ |
| 725 | return -EBUSY; | 735 | fb_blank(&ofb->fbi->fb, FB_BLANK_UNBLANK); |
| 726 | 736 | ||
| 727 | /* unblank the base framebuffer */ | ||
| 728 | fb_blank(&ofb->fbi->fb, FB_BLANK_UNBLANK); | ||
| 729 | return 0; | 737 | return 0; |
| 730 | } | 738 | } |
| 731 | 739 | ||
| @@ -733,12 +741,15 @@ static int overlayfb_release(struct fb_info *info, int user) | |||
| 733 | { | 741 | { |
| 734 | struct pxafb_layer *ofb = (struct pxafb_layer*) info; | 742 | struct pxafb_layer *ofb = (struct pxafb_layer*) info; |
| 735 | 743 | ||
| 736 | atomic_dec(&ofb->usage); | 744 | if (ofb->usage == 1) { |
| 737 | ofb->ops->disable(ofb); | 745 | ofb->ops->disable(ofb); |
| 746 | ofb->fb.var.height = -1; | ||
| 747 | ofb->fb.var.width = -1; | ||
| 748 | ofb->fb.var.xres = ofb->fb.var.xres_virtual = 0; | ||
| 749 | ofb->fb.var.yres = ofb->fb.var.yres_virtual = 0; | ||
| 738 | 750 | ||
| 739 | free_pages_exact(ofb->video_mem, ofb->video_mem_size); | 751 | ofb->usage--; |
| 740 | ofb->video_mem = NULL; | 752 | } |
| 741 | ofb->video_mem_size = 0; | ||
| 742 | return 0; | 753 | return 0; |
| 743 | } | 754 | } |
| 744 | 755 | ||
| @@ -750,7 +761,7 @@ static int overlayfb_check_var(struct fb_var_screeninfo *var, | |||
| 750 | int xpos, ypos, pfor, bpp; | 761 | int xpos, ypos, pfor, bpp; |
| 751 | 762 | ||
| 752 | xpos = NONSTD_TO_XPOS(var->nonstd); | 763 | xpos = NONSTD_TO_XPOS(var->nonstd); |
| 753 | ypos = NONSTD_TO_XPOS(var->nonstd); | 764 | ypos = NONSTD_TO_YPOS(var->nonstd); |
| 754 | pfor = NONSTD_TO_PFOR(var->nonstd); | 765 | pfor = NONSTD_TO_PFOR(var->nonstd); |
| 755 | 766 | ||
| 756 | bpp = pxafb_var_to_bpp(var); | 767 | bpp = pxafb_var_to_bpp(var); |
| @@ -794,7 +805,7 @@ static int overlayfb_check_var(struct fb_var_screeninfo *var, | |||
| 794 | return 0; | 805 | return 0; |
| 795 | } | 806 | } |
| 796 | 807 | ||
| 797 | static int overlayfb_map_video_memory(struct pxafb_layer *ofb) | 808 | static int overlayfb_check_video_memory(struct pxafb_layer *ofb) |
| 798 | { | 809 | { |
| 799 | struct fb_var_screeninfo *var = &ofb->fb.var; | 810 | struct fb_var_screeninfo *var = &ofb->fb.var; |
| 800 | int pfor = NONSTD_TO_PFOR(var->nonstd); | 811 | int pfor = NONSTD_TO_PFOR(var->nonstd); |
| @@ -812,27 +823,11 @@ static int overlayfb_map_video_memory(struct pxafb_layer *ofb) | |||
| 812 | 823 | ||
| 813 | size = PAGE_ALIGN(ofb->fb.fix.line_length * var->yres_virtual); | 824 | size = PAGE_ALIGN(ofb->fb.fix.line_length * var->yres_virtual); |
| 814 | 825 | ||
| 815 | /* don't re-allocate if the original video memory is enough */ | ||
| 816 | if (ofb->video_mem) { | 826 | if (ofb->video_mem) { |
| 817 | if (ofb->video_mem_size >= size) | 827 | if (ofb->video_mem_size >= size) |
| 818 | return 0; | 828 | return 0; |
| 819 | |||
| 820 | free_pages_exact(ofb->video_mem, ofb->video_mem_size); | ||
| 821 | } | 829 | } |
| 822 | 830 | return -EINVAL; | |
| 823 | ofb->video_mem = alloc_pages_exact(size, GFP_KERNEL | __GFP_ZERO); | ||
| 824 | if (ofb->video_mem == NULL) | ||
| 825 | return -ENOMEM; | ||
| 826 | |||
| 827 | ofb->video_mem_phys = virt_to_phys(ofb->video_mem); | ||
| 828 | ofb->video_mem_size = size; | ||
| 829 | |||
| 830 | mutex_lock(&ofb->fb.mm_lock); | ||
| 831 | ofb->fb.fix.smem_start = ofb->video_mem_phys; | ||
| 832 | ofb->fb.fix.smem_len = ofb->fb.fix.line_length * var->yres_virtual; | ||
| 833 | mutex_unlock(&ofb->fb.mm_lock); | ||
| 834 | ofb->fb.screen_base = ofb->video_mem; | ||
| 835 | return 0; | ||
| 836 | } | 831 | } |
| 837 | 832 | ||
| 838 | static int overlayfb_set_par(struct fb_info *info) | 833 | static int overlayfb_set_par(struct fb_info *info) |
| @@ -841,13 +836,13 @@ static int overlayfb_set_par(struct fb_info *info) | |||
| 841 | struct fb_var_screeninfo *var = &info->var; | 836 | struct fb_var_screeninfo *var = &info->var; |
| 842 | int xpos, ypos, pfor, bpp, ret; | 837 | int xpos, ypos, pfor, bpp, ret; |
| 843 | 838 | ||
| 844 | ret = overlayfb_map_video_memory(ofb); | 839 | ret = overlayfb_check_video_memory(ofb); |
| 845 | if (ret) | 840 | if (ret) |
| 846 | return ret; | 841 | return ret; |
| 847 | 842 | ||
| 848 | bpp = pxafb_var_to_bpp(var); | 843 | bpp = pxafb_var_to_bpp(var); |
| 849 | xpos = NONSTD_TO_XPOS(var->nonstd); | 844 | xpos = NONSTD_TO_XPOS(var->nonstd); |
| 850 | ypos = NONSTD_TO_XPOS(var->nonstd); | 845 | ypos = NONSTD_TO_YPOS(var->nonstd); |
| 851 | pfor = NONSTD_TO_PFOR(var->nonstd); | 846 | pfor = NONSTD_TO_PFOR(var->nonstd); |
| 852 | 847 | ||
| 853 | ofb->control[0] = OVLxC1_PPL(var->xres) | OVLxC1_LPO(var->yres) | | 848 | ofb->control[0] = OVLxC1_PPL(var->xres) | OVLxC1_LPO(var->yres) | |
| @@ -891,7 +886,7 @@ static void __devinit init_pxafb_overlay(struct pxafb_info *fbi, | |||
| 891 | 886 | ||
| 892 | ofb->id = id; | 887 | ofb->id = id; |
| 893 | ofb->ops = &ofb_ops[id]; | 888 | ofb->ops = &ofb_ops[id]; |
| 894 | atomic_set(&ofb->usage, 0); | 889 | ofb->usage = 0; |
| 895 | ofb->fbi = fbi; | 890 | ofb->fbi = fbi; |
| 896 | init_completion(&ofb->branch_done); | 891 | init_completion(&ofb->branch_done); |
| 897 | } | 892 | } |
| @@ -904,29 +899,60 @@ static inline int pxafb_overlay_supported(void) | |||
| 904 | return 0; | 899 | return 0; |
| 905 | } | 900 | } |
| 906 | 901 | ||
| 907 | static int __devinit pxafb_overlay_init(struct pxafb_info *fbi) | 902 | static int __devinit pxafb_overlay_map_video_memory(struct pxafb_info *pxafb, |
| 903 | struct pxafb_layer *ofb) | ||
| 904 | { | ||
| 905 | /* We assume that user will use at most video_mem_size for overlay fb, | ||
| 906 | * anyway, it's useless to use 16bpp main plane and 24bpp overlay | ||
| 907 | */ | ||
| 908 | ofb->video_mem = alloc_pages_exact(PAGE_ALIGN(pxafb->video_mem_size), | ||
| 909 | GFP_KERNEL | __GFP_ZERO); | ||
| 910 | if (ofb->video_mem == NULL) | ||
| 911 | return -ENOMEM; | ||
| 912 | |||
| 913 | ofb->video_mem_phys = virt_to_phys(ofb->video_mem); | ||
| 914 | ofb->video_mem_size = PAGE_ALIGN(pxafb->video_mem_size); | ||
| 915 | |||
| 916 | mutex_lock(&ofb->fb.mm_lock); | ||
| 917 | ofb->fb.fix.smem_start = ofb->video_mem_phys; | ||
| 918 | ofb->fb.fix.smem_len = pxafb->video_mem_size; | ||
| 919 | mutex_unlock(&ofb->fb.mm_lock); | ||
| 920 | |||
| 921 | ofb->fb.screen_base = ofb->video_mem; | ||
| 922 | |||
| 923 | return 0; | ||
| 924 | } | ||
| 925 | |||
| 926 | static void __devinit pxafb_overlay_init(struct pxafb_info *fbi) | ||
| 908 | { | 927 | { |
| 909 | int i, ret; | 928 | int i, ret; |
| 910 | 929 | ||
| 911 | if (!pxafb_overlay_supported()) | 930 | if (!pxafb_overlay_supported()) |
| 912 | return 0; | 931 | return; |
| 913 | 932 | ||
| 914 | for (i = 0; i < 2; i++) { | 933 | for (i = 0; i < 2; i++) { |
| 915 | init_pxafb_overlay(fbi, &fbi->overlay[i], i); | 934 | struct pxafb_layer *ofb = &fbi->overlay[i]; |
| 916 | ret = register_framebuffer(&fbi->overlay[i].fb); | 935 | init_pxafb_overlay(fbi, ofb, i); |
| 936 | ret = register_framebuffer(&ofb->fb); | ||
| 917 | if (ret) { | 937 | if (ret) { |
| 918 | dev_err(fbi->dev, "failed to register overlay %d\n", i); | 938 | dev_err(fbi->dev, "failed to register overlay %d\n", i); |
| 919 | return ret; | 939 | continue; |
| 920 | } | 940 | } |
| 941 | ret = pxafb_overlay_map_video_memory(fbi, ofb); | ||
| 942 | if (ret) { | ||
| 943 | dev_err(fbi->dev, | ||
| 944 | "failed to map video memory for overlay %d\n", | ||
| 945 | i); | ||
| 946 | unregister_framebuffer(&ofb->fb); | ||
| 947 | continue; | ||
| 948 | } | ||
| 949 | ofb->registered = 1; | ||
| 921 | } | 950 | } |
| 922 | 951 | ||
| 923 | /* mask all IU/BS/EOF/SOF interrupts */ | 952 | /* mask all IU/BS/EOF/SOF interrupts */ |
| 924 | lcd_writel(fbi, LCCR5, ~0); | 953 | lcd_writel(fbi, LCCR5, ~0); |
| 925 | 954 | ||
| 926 | /* place overlay(s) on top of base */ | ||
| 927 | fbi->lccr0 |= LCCR0_OUC; | ||
| 928 | pr_info("PXA Overlay driver loaded successfully!\n"); | 955 | pr_info("PXA Overlay driver loaded successfully!\n"); |
| 929 | return 0; | ||
| 930 | } | 956 | } |
| 931 | 957 | ||
| 932 | static void __devexit pxafb_overlay_exit(struct pxafb_info *fbi) | 958 | static void __devexit pxafb_overlay_exit(struct pxafb_info *fbi) |
| @@ -936,8 +962,15 @@ static void __devexit pxafb_overlay_exit(struct pxafb_info *fbi) | |||
| 936 | if (!pxafb_overlay_supported()) | 962 | if (!pxafb_overlay_supported()) |
| 937 | return; | 963 | return; |
| 938 | 964 | ||
| 939 | for (i = 0; i < 2; i++) | 965 | for (i = 0; i < 2; i++) { |
| 940 | unregister_framebuffer(&fbi->overlay[i].fb); | 966 | struct pxafb_layer *ofb = &fbi->overlay[i]; |
| 967 | if (ofb->registered) { | ||
| 968 | if (ofb->video_mem) | ||
| 969 | free_pages_exact(ofb->video_mem, | ||
| 970 | ofb->video_mem_size); | ||
| 971 | unregister_framebuffer(&ofb->fb); | ||
| 972 | } | ||
| 973 | } | ||
| 941 | } | 974 | } |
| 942 | #else | 975 | #else |
| 943 | static inline void pxafb_overlay_init(struct pxafb_info *fbi) {} | 976 | static inline void pxafb_overlay_init(struct pxafb_info *fbi) {} |
| @@ -1368,7 +1401,8 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var, | |||
| 1368 | (lcd_readl(fbi, LCCR3) != fbi->reg_lccr3) || | 1401 | (lcd_readl(fbi, LCCR3) != fbi->reg_lccr3) || |
| 1369 | (lcd_readl(fbi, LCCR4) != fbi->reg_lccr4) || | 1402 | (lcd_readl(fbi, LCCR4) != fbi->reg_lccr4) || |
| 1370 | (lcd_readl(fbi, FDADR0) != fbi->fdadr[0]) || | 1403 | (lcd_readl(fbi, FDADR0) != fbi->fdadr[0]) || |
| 1371 | (lcd_readl(fbi, FDADR1) != fbi->fdadr[1])) | 1404 | ((fbi->lccr0 & LCCR0_SDS) && |
| 1405 | (lcd_readl(fbi, FDADR1) != fbi->fdadr[1]))) | ||
| 1372 | pxafb_schedule_work(fbi, C_REENABLE); | 1406 | pxafb_schedule_work(fbi, C_REENABLE); |
| 1373 | 1407 | ||
| 1374 | return 0; | 1408 | return 0; |
| @@ -1420,7 +1454,8 @@ static void pxafb_enable_controller(struct pxafb_info *fbi) | |||
| 1420 | lcd_writel(fbi, LCCR0, fbi->reg_lccr0 & ~LCCR0_ENB); | 1454 | lcd_writel(fbi, LCCR0, fbi->reg_lccr0 & ~LCCR0_ENB); |
| 1421 | 1455 | ||
| 1422 | lcd_writel(fbi, FDADR0, fbi->fdadr[0]); | 1456 | lcd_writel(fbi, FDADR0, fbi->fdadr[0]); |
| 1423 | lcd_writel(fbi, FDADR1, fbi->fdadr[1]); | 1457 | if (fbi->lccr0 & LCCR0_SDS) |
| 1458 | lcd_writel(fbi, FDADR1, fbi->fdadr[1]); | ||
| 1424 | lcd_writel(fbi, LCCR0, fbi->reg_lccr0 | LCCR0_ENB); | 1459 | lcd_writel(fbi, LCCR0, fbi->reg_lccr0 | LCCR0_ENB); |
| 1425 | } | 1460 | } |
| 1426 | 1461 | ||
| @@ -1613,7 +1648,10 @@ pxafb_freq_transition(struct notifier_block *nb, unsigned long val, void *data) | |||
| 1613 | 1648 | ||
| 1614 | switch (val) { | 1649 | switch (val) { |
| 1615 | case CPUFREQ_PRECHANGE: | 1650 | case CPUFREQ_PRECHANGE: |
| 1616 | set_ctrlr_state(fbi, C_DISABLE_CLKCHANGE); | 1651 | #ifdef CONFIG_FB_PXA_OVERLAY |
| 1652 | if (!(fbi->overlay[0].usage || fbi->overlay[1].usage)) | ||
| 1653 | #endif | ||
| 1654 | set_ctrlr_state(fbi, C_DISABLE_CLKCHANGE); | ||
| 1617 | break; | 1655 | break; |
| 1618 | 1656 | ||
| 1619 | case CPUFREQ_POSTCHANGE: | 1657 | case CPUFREQ_POSTCHANGE: |
| @@ -1806,6 +1844,12 @@ static struct pxafb_info * __devinit pxafb_init_fbinfo(struct device *dev) | |||
| 1806 | 1844 | ||
| 1807 | pxafb_decode_mach_info(fbi, inf); | 1845 | pxafb_decode_mach_info(fbi, inf); |
| 1808 | 1846 | ||
| 1847 | #ifdef CONFIG_FB_PXA_OVERLAY | ||
| 1848 | /* place overlay(s) on top of base */ | ||
| 1849 | if (pxafb_overlay_supported()) | ||
| 1850 | fbi->lccr0 |= LCCR0_OUC; | ||
| 1851 | #endif | ||
| 1852 | |||
| 1809 | init_waitqueue_head(&fbi->ctrlr_wait); | 1853 | init_waitqueue_head(&fbi->ctrlr_wait); |
| 1810 | INIT_WORK(&fbi->task, pxafb_task); | 1854 | INIT_WORK(&fbi->task, pxafb_task); |
| 1811 | mutex_init(&fbi->ctrlr_lock); | 1855 | mutex_init(&fbi->ctrlr_lock); |
diff --git a/drivers/video/pxafb.h b/drivers/video/pxafb.h index 2353521c5c8c..26ba9fa3f737 100644 --- a/drivers/video/pxafb.h +++ b/drivers/video/pxafb.h | |||
| @@ -92,7 +92,8 @@ struct pxafb_layer_ops { | |||
| 92 | struct pxafb_layer { | 92 | struct pxafb_layer { |
| 93 | struct fb_info fb; | 93 | struct fb_info fb; |
| 94 | int id; | 94 | int id; |
| 95 | atomic_t usage; | 95 | int registered; |
| 96 | uint32_t usage; | ||
| 96 | uint32_t control[2]; | 97 | uint32_t control[2]; |
| 97 | 98 | ||
| 98 | struct pxafb_layer_ops *ops; | 99 | struct pxafb_layer_ops *ops; |
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c index 6817d187d46e..3b6cdcac8f1a 100644 --- a/drivers/video/s3c-fb.c +++ b/drivers/video/s3c-fb.c | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | #undef writel | 48 | #undef writel |
| 49 | #define writel(v, r) do { \ | 49 | #define writel(v, r) do { \ |
| 50 | printk(KERN_DEBUG "%s: %08x => %p\n", __func__, (unsigned int)v, r); \ | 50 | printk(KERN_DEBUG "%s: %08x => %p\n", __func__, (unsigned int)v, r); \ |
| 51 | __raw_writel(v, r); } while(0) | 51 | __raw_writel(v, r); } while (0) |
| 52 | #endif /* FB_S3C_DEBUG_REGWRITE */ | 52 | #endif /* FB_S3C_DEBUG_REGWRITE */ |
| 53 | 53 | ||
| 54 | /* irq_flags bits */ | 54 | /* irq_flags bits */ |
| @@ -518,7 +518,7 @@ static int s3c_fb_set_par(struct fb_info *info) | |||
| 518 | 518 | ||
| 519 | data = VIDTCON2_LINEVAL(var->yres - 1) | | 519 | data = VIDTCON2_LINEVAL(var->yres - 1) | |
| 520 | VIDTCON2_HOZVAL(var->xres - 1); | 520 | VIDTCON2_HOZVAL(var->xres - 1); |
| 521 | writel(data, regs +sfb->variant.vidtcon + 8 ); | 521 | writel(data, regs + sfb->variant.vidtcon + 8); |
| 522 | } | 522 | } |
| 523 | 523 | ||
| 524 | /* write the buffer address */ | 524 | /* write the buffer address */ |
| @@ -1304,6 +1304,7 @@ static void s3c_fb_clear_win(struct s3c_fb *sfb, int win) | |||
| 1304 | 1304 | ||
| 1305 | static int __devinit s3c_fb_probe(struct platform_device *pdev) | 1305 | static int __devinit s3c_fb_probe(struct platform_device *pdev) |
| 1306 | { | 1306 | { |
| 1307 | const struct platform_device_id *platid; | ||
| 1307 | struct s3c_fb_driverdata *fbdrv; | 1308 | struct s3c_fb_driverdata *fbdrv; |
| 1308 | struct device *dev = &pdev->dev; | 1309 | struct device *dev = &pdev->dev; |
| 1309 | struct s3c_fb_platdata *pd; | 1310 | struct s3c_fb_platdata *pd; |
| @@ -1312,7 +1313,8 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev) | |||
| 1312 | int win; | 1313 | int win; |
| 1313 | int ret = 0; | 1314 | int ret = 0; |
| 1314 | 1315 | ||
| 1315 | fbdrv = (struct s3c_fb_driverdata *)platform_get_device_id(pdev)->driver_data; | 1316 | platid = platform_get_device_id(pdev); |
| 1317 | fbdrv = (struct s3c_fb_driverdata *)platid->driver_data; | ||
| 1316 | 1318 | ||
| 1317 | if (fbdrv->variant.nr_windows > S3C_FB_MAX_WIN) { | 1319 | if (fbdrv->variant.nr_windows > S3C_FB_MAX_WIN) { |
| 1318 | dev_err(dev, "too many windows, cannot attach\n"); | 1320 | dev_err(dev, "too many windows, cannot attach\n"); |
diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c index ddedad9cd069..c4482f2e5799 100644 --- a/drivers/video/s3fb.c +++ b/drivers/video/s3fb.c | |||
| @@ -71,9 +71,9 @@ static const int s3_memsizes[] = {4096, 0, 3072, 8192, 2048, 6144, 1024, 512}; | |||
| 71 | 71 | ||
| 72 | static const char * const s3_names[] = {"S3 Unknown", "S3 Trio32", "S3 Trio64", "S3 Trio64V+", | 72 | static const char * const s3_names[] = {"S3 Unknown", "S3 Trio32", "S3 Trio64", "S3 Trio64V+", |
| 73 | "S3 Trio64UV+", "S3 Trio64V2/DX", "S3 Trio64V2/GX", | 73 | "S3 Trio64UV+", "S3 Trio64V2/DX", "S3 Trio64V2/GX", |
| 74 | "S3 Plato/PX", "S3 Aurora64VP", "S3 Virge", | 74 | "S3 Plato/PX", "S3 Aurora64V+", "S3 Virge", |
| 75 | "S3 Virge/VX", "S3 Virge/DX", "S3 Virge/GX", | 75 | "S3 Virge/VX", "S3 Virge/DX", "S3 Virge/GX", |
| 76 | "S3 Virge/GX2", "S3 Virge/GX2P", "S3 Virge/GX2P", | 76 | "S3 Virge/GX2", "S3 Virge/GX2+", "", |
| 77 | "S3 Trio3D/1X", "S3 Trio3D/2X", "S3 Trio3D/2X", | 77 | "S3 Trio3D/1X", "S3 Trio3D/2X", "S3 Trio3D/2X", |
| 78 | "S3 Trio3D"}; | 78 | "S3 Trio3D"}; |
| 79 | 79 | ||
| @@ -90,9 +90,8 @@ static const char * const s3_names[] = {"S3 Unknown", "S3 Trio32", "S3 Trio64", | |||
| 90 | #define CHIP_988_VIRGE_VX 0x0A | 90 | #define CHIP_988_VIRGE_VX 0x0A |
| 91 | #define CHIP_375_VIRGE_DX 0x0B | 91 | #define CHIP_375_VIRGE_DX 0x0B |
| 92 | #define CHIP_385_VIRGE_GX 0x0C | 92 | #define CHIP_385_VIRGE_GX 0x0C |
| 93 | #define CHIP_356_VIRGE_GX2 0x0D | 93 | #define CHIP_357_VIRGE_GX2 0x0D |
| 94 | #define CHIP_357_VIRGE_GX2P 0x0E | 94 | #define CHIP_359_VIRGE_GX2P 0x0E |
| 95 | #define CHIP_359_VIRGE_GX2P 0x0F | ||
| 96 | #define CHIP_360_TRIO3D_1X 0x10 | 95 | #define CHIP_360_TRIO3D_1X 0x10 |
| 97 | #define CHIP_362_TRIO3D_2X 0x11 | 96 | #define CHIP_362_TRIO3D_2X 0x11 |
| 98 | #define CHIP_368_TRIO3D_2X 0x12 | 97 | #define CHIP_368_TRIO3D_2X 0x12 |
| @@ -359,7 +358,9 @@ static void s3_set_pixclock(struct fb_info *info, u32 pixclock) | |||
| 359 | vga_w(par->state.vgabase, VGA_MIS_W, regval | VGA_MIS_ENB_PLL_LOAD); | 358 | vga_w(par->state.vgabase, VGA_MIS_W, regval | VGA_MIS_ENB_PLL_LOAD); |
| 360 | 359 | ||
| 361 | /* Set S3 clock registers */ | 360 | /* Set S3 clock registers */ |
| 362 | if (par->chip == CHIP_360_TRIO3D_1X || | 361 | if (par->chip == CHIP_357_VIRGE_GX2 || |
| 362 | par->chip == CHIP_359_VIRGE_GX2P || | ||
| 363 | par->chip == CHIP_360_TRIO3D_1X || | ||
| 363 | par->chip == CHIP_362_TRIO3D_2X || | 364 | par->chip == CHIP_362_TRIO3D_2X || |
| 364 | par->chip == CHIP_368_TRIO3D_2X) { | 365 | par->chip == CHIP_368_TRIO3D_2X) { |
| 365 | vga_wseq(par->state.vgabase, 0x12, (n - 2) | ((r & 3) << 6)); /* n and two bits of r */ | 366 | vga_wseq(par->state.vgabase, 0x12, (n - 2) | ((r & 3) << 6)); /* n and two bits of r */ |
| @@ -560,7 +561,9 @@ static int s3fb_set_par(struct fb_info *info) | |||
| 560 | pr_debug("fb%d: offset register : %d\n", info->node, offset_value); | 561 | pr_debug("fb%d: offset register : %d\n", info->node, offset_value); |
| 561 | svga_wcrt_multi(par->state.vgabase, s3_offset_regs, offset_value); | 562 | svga_wcrt_multi(par->state.vgabase, s3_offset_regs, offset_value); |
| 562 | 563 | ||
| 563 | if (par->chip != CHIP_360_TRIO3D_1X && | 564 | if (par->chip != CHIP_357_VIRGE_GX2 && |
| 565 | par->chip != CHIP_359_VIRGE_GX2P && | ||
| 566 | par->chip != CHIP_360_TRIO3D_1X && | ||
| 564 | par->chip != CHIP_362_TRIO3D_2X && | 567 | par->chip != CHIP_362_TRIO3D_2X && |
| 565 | par->chip != CHIP_368_TRIO3D_2X) { | 568 | par->chip != CHIP_368_TRIO3D_2X) { |
| 566 | vga_wcrt(par->state.vgabase, 0x54, 0x18); /* M parameter */ | 569 | vga_wcrt(par->state.vgabase, 0x54, 0x18); /* M parameter */ |
| @@ -604,7 +607,9 @@ static int s3fb_set_par(struct fb_info *info) | |||
| 604 | vga_wcrt(par->state.vgabase, 0x66, 0x90); | 607 | vga_wcrt(par->state.vgabase, 0x66, 0x90); |
| 605 | } | 608 | } |
| 606 | 609 | ||
| 607 | if (par->chip == CHIP_360_TRIO3D_1X || | 610 | if (par->chip == CHIP_357_VIRGE_GX2 || |
| 611 | par->chip == CHIP_359_VIRGE_GX2P || | ||
| 612 | par->chip == CHIP_360_TRIO3D_1X || | ||
| 608 | par->chip == CHIP_362_TRIO3D_2X || | 613 | par->chip == CHIP_362_TRIO3D_2X || |
| 609 | par->chip == CHIP_368_TRIO3D_2X || | 614 | par->chip == CHIP_368_TRIO3D_2X || |
| 610 | par->chip == CHIP_365_TRIO3D || | 615 | par->chip == CHIP_365_TRIO3D || |
| @@ -617,8 +622,7 @@ static int s3fb_set_par(struct fb_info *info) | |||
| 617 | vga_wcrt(par->state.vgabase, 0x66, 0x81); | 622 | vga_wcrt(par->state.vgabase, 0x66, 0x81); |
| 618 | } | 623 | } |
| 619 | 624 | ||
| 620 | if (par->chip == CHIP_356_VIRGE_GX2 || | 625 | if (par->chip == CHIP_357_VIRGE_GX2 || |
| 621 | par->chip == CHIP_357_VIRGE_GX2P || | ||
| 622 | par->chip == CHIP_359_VIRGE_GX2P || | 626 | par->chip == CHIP_359_VIRGE_GX2P || |
| 623 | par->chip == CHIP_360_TRIO3D_1X || | 627 | par->chip == CHIP_360_TRIO3D_1X || |
| 624 | par->chip == CHIP_362_TRIO3D_2X || | 628 | par->chip == CHIP_362_TRIO3D_2X || |
| @@ -674,6 +678,8 @@ static int s3fb_set_par(struct fb_info *info) | |||
| 674 | pr_debug("fb%d: 8 bit pseudocolor\n", info->node); | 678 | pr_debug("fb%d: 8 bit pseudocolor\n", info->node); |
| 675 | svga_wcrt_mask(par->state.vgabase, 0x50, 0x00, 0x30); | 679 | svga_wcrt_mask(par->state.vgabase, 0x50, 0x00, 0x30); |
| 676 | if (info->var.pixclock > 20000 || | 680 | if (info->var.pixclock > 20000 || |
| 681 | par->chip == CHIP_357_VIRGE_GX2 || | ||
| 682 | par->chip == CHIP_359_VIRGE_GX2P || | ||
| 677 | par->chip == CHIP_360_TRIO3D_1X || | 683 | par->chip == CHIP_360_TRIO3D_1X || |
| 678 | par->chip == CHIP_362_TRIO3D_2X || | 684 | par->chip == CHIP_362_TRIO3D_2X || |
| 679 | par->chip == CHIP_368_TRIO3D_2X) | 685 | par->chip == CHIP_368_TRIO3D_2X) |
| @@ -702,7 +708,9 @@ static int s3fb_set_par(struct fb_info *info) | |||
| 702 | } else { | 708 | } else { |
| 703 | svga_wcrt_mask(par->state.vgabase, 0x50, 0x10, 0x30); | 709 | svga_wcrt_mask(par->state.vgabase, 0x50, 0x10, 0x30); |
| 704 | svga_wcrt_mask(par->state.vgabase, 0x67, 0x30, 0xF0); | 710 | svga_wcrt_mask(par->state.vgabase, 0x67, 0x30, 0xF0); |
| 705 | if (par->chip != CHIP_360_TRIO3D_1X && | 711 | if (par->chip != CHIP_357_VIRGE_GX2 && |
| 712 | par->chip != CHIP_359_VIRGE_GX2P && | ||
| 713 | par->chip != CHIP_360_TRIO3D_1X && | ||
| 706 | par->chip != CHIP_362_TRIO3D_2X && | 714 | par->chip != CHIP_362_TRIO3D_2X && |
| 707 | par->chip != CHIP_368_TRIO3D_2X) | 715 | par->chip != CHIP_368_TRIO3D_2X) |
| 708 | hmul = 2; | 716 | hmul = 2; |
| @@ -727,7 +735,9 @@ static int s3fb_set_par(struct fb_info *info) | |||
| 727 | } else { | 735 | } else { |
| 728 | svga_wcrt_mask(par->state.vgabase, 0x50, 0x10, 0x30); | 736 | svga_wcrt_mask(par->state.vgabase, 0x50, 0x10, 0x30); |
| 729 | svga_wcrt_mask(par->state.vgabase, 0x67, 0x50, 0xF0); | 737 | svga_wcrt_mask(par->state.vgabase, 0x67, 0x50, 0xF0); |
| 730 | if (par->chip != CHIP_360_TRIO3D_1X && | 738 | if (par->chip != CHIP_357_VIRGE_GX2 && |
| 739 | par->chip != CHIP_359_VIRGE_GX2P && | ||
| 740 | par->chip != CHIP_360_TRIO3D_1X && | ||
| 731 | par->chip != CHIP_362_TRIO3D_2X && | 741 | par->chip != CHIP_362_TRIO3D_2X && |
| 732 | par->chip != CHIP_368_TRIO3D_2X) | 742 | par->chip != CHIP_368_TRIO3D_2X) |
| 733 | hmul = 2; | 743 | hmul = 2; |
| @@ -1069,6 +1079,16 @@ static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_i | |||
| 1069 | info->screen_size = 2 << 20; | 1079 | info->screen_size = 2 << 20; |
| 1070 | break; | 1080 | break; |
| 1071 | } | 1081 | } |
| 1082 | } else if (par->chip == CHIP_357_VIRGE_GX2 || | ||
| 1083 | par->chip == CHIP_359_VIRGE_GX2P) { | ||
| 1084 | switch ((regval & 0xC0) >> 6) { | ||
| 1085 | case 1: /* 4MB */ | ||
| 1086 | info->screen_size = 4 << 20; | ||
| 1087 | break; | ||
| 1088 | case 3: /* 2MB */ | ||
| 1089 | info->screen_size = 2 << 20; | ||
| 1090 | break; | ||
| 1091 | } | ||
| 1072 | } else | 1092 | } else |
| 1073 | info->screen_size = s3_memsizes[regval >> 5] << 10; | 1093 | info->screen_size = s3_memsizes[regval >> 5] << 10; |
| 1074 | info->fix.smem_len = info->screen_size; | 1094 | info->fix.smem_len = info->screen_size; |
| @@ -1268,8 +1288,8 @@ static struct pci_device_id s3_devices[] __devinitdata = { | |||
| 1268 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x5631), .driver_data = CHIP_325_VIRGE}, | 1288 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x5631), .driver_data = CHIP_325_VIRGE}, |
| 1269 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x883D), .driver_data = CHIP_988_VIRGE_VX}, | 1289 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x883D), .driver_data = CHIP_988_VIRGE_VX}, |
| 1270 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A01), .driver_data = CHIP_XXX_VIRGE_DXGX}, | 1290 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A01), .driver_data = CHIP_XXX_VIRGE_DXGX}, |
| 1271 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A10), .driver_data = CHIP_356_VIRGE_GX2}, | 1291 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A10), .driver_data = CHIP_357_VIRGE_GX2}, |
| 1272 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A11), .driver_data = CHIP_357_VIRGE_GX2P}, | 1292 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A11), .driver_data = CHIP_359_VIRGE_GX2P}, |
| 1273 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A12), .driver_data = CHIP_359_VIRGE_GX2P}, | 1293 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A12), .driver_data = CHIP_359_VIRGE_GX2P}, |
| 1274 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A13), .driver_data = CHIP_36X_TRIO3D_1X_2X}, | 1294 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A13), .driver_data = CHIP_36X_TRIO3D_1X_2X}, |
| 1275 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8904), .driver_data = CHIP_365_TRIO3D}, | 1295 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8904), .driver_data = CHIP_365_TRIO3D}, |
diff --git a/drivers/video/savage/savagefb-i2c.c b/drivers/video/savage/savagefb-i2c.c index b16e6138fdd4..bb71fea07284 100644 --- a/drivers/video/savage/savagefb-i2c.c +++ b/drivers/video/savage/savagefb-i2c.c | |||
| @@ -159,8 +159,7 @@ static int savage_setup_i2c_bus(struct savagefb_i2c_chan *chan, | |||
| 159 | else | 159 | else |
| 160 | dev_warn(&chan->par->pcidev->dev, | 160 | dev_warn(&chan->par->pcidev->dev, |
| 161 | "Failed to register I2C bus %s.\n", name); | 161 | "Failed to register I2C bus %s.\n", name); |
| 162 | } else | 162 | } |
| 163 | chan->par = NULL; | ||
| 164 | 163 | ||
| 165 | return rc; | 164 | return rc; |
| 166 | } | 165 | } |
| @@ -170,9 +169,8 @@ void savagefb_create_i2c_busses(struct fb_info *info) | |||
| 170 | struct savagefb_par *par = info->par; | 169 | struct savagefb_par *par = info->par; |
| 171 | par->chan.par = par; | 170 | par->chan.par = par; |
| 172 | 171 | ||
| 173 | switch(info->fix.accel) { | 172 | switch (par->chip) { |
| 174 | case FB_ACCEL_PROSAVAGE_DDRK: | 173 | case S3_PROSAVAGE: |
| 175 | case FB_ACCEL_PROSAVAGE_PM: | ||
| 176 | par->chan.reg = CR_SERIAL2; | 174 | par->chan.reg = CR_SERIAL2; |
| 177 | par->chan.ioaddr = par->mmio.vbase; | 175 | par->chan.ioaddr = par->mmio.vbase; |
| 178 | par->chan.algo.setsda = prosavage_gpio_setsda; | 176 | par->chan.algo.setsda = prosavage_gpio_setsda; |
| @@ -180,7 +178,7 @@ void savagefb_create_i2c_busses(struct fb_info *info) | |||
| 180 | par->chan.algo.getsda = prosavage_gpio_getsda; | 178 | par->chan.algo.getsda = prosavage_gpio_getsda; |
| 181 | par->chan.algo.getscl = prosavage_gpio_getscl; | 179 | par->chan.algo.getscl = prosavage_gpio_getscl; |
| 182 | break; | 180 | break; |
| 183 | case FB_ACCEL_SAVAGE4: | 181 | case S3_SAVAGE4: |
| 184 | par->chan.reg = CR_SERIAL1; | 182 | par->chan.reg = CR_SERIAL1; |
| 185 | if (par->pcidev->revision > 1 && !(VGArCR(0xa6, par) & 0x40)) | 183 | if (par->pcidev->revision > 1 && !(VGArCR(0xa6, par) & 0x40)) |
| 186 | par->chan.reg = CR_SERIAL2; | 184 | par->chan.reg = CR_SERIAL2; |
| @@ -190,8 +188,8 @@ void savagefb_create_i2c_busses(struct fb_info *info) | |||
| 190 | par->chan.algo.getsda = prosavage_gpio_getsda; | 188 | par->chan.algo.getsda = prosavage_gpio_getsda; |
| 191 | par->chan.algo.getscl = prosavage_gpio_getscl; | 189 | par->chan.algo.getscl = prosavage_gpio_getscl; |
| 192 | break; | 190 | break; |
| 193 | case FB_ACCEL_SAVAGE2000: | 191 | case S3_SAVAGE2000: |
| 194 | par->chan.reg = 0xff20; | 192 | par->chan.reg = MM_SERIAL1; |
| 195 | par->chan.ioaddr = par->mmio.vbase; | 193 | par->chan.ioaddr = par->mmio.vbase; |
| 196 | par->chan.algo.setsda = savage4_gpio_setsda; | 194 | par->chan.algo.setsda = savage4_gpio_setsda; |
| 197 | par->chan.algo.setscl = savage4_gpio_setscl; | 195 | par->chan.algo.setscl = savage4_gpio_setscl; |
diff --git a/drivers/video/savage/savagefb.h b/drivers/video/savage/savagefb.h index e4c3f214eb8e..4e9490c19d7d 100644 --- a/drivers/video/savage/savagefb.h +++ b/drivers/video/savage/savagefb.h | |||
| @@ -153,7 +153,7 @@ struct savage_reg { | |||
| 153 | unsigned char CRTC[25]; /* Crtc Controller */ | 153 | unsigned char CRTC[25]; /* Crtc Controller */ |
| 154 | unsigned char Sequencer[5]; /* Video Sequencer */ | 154 | unsigned char Sequencer[5]; /* Video Sequencer */ |
| 155 | unsigned char Graphics[9]; /* Video Graphics */ | 155 | unsigned char Graphics[9]; /* Video Graphics */ |
| 156 | unsigned char Attribute[21]; /* Video Atribute */ | 156 | unsigned char Attribute[21]; /* Video Attribute */ |
| 157 | 157 | ||
| 158 | unsigned int mode, refresh; | 158 | unsigned int mode, refresh; |
| 159 | unsigned char SR08, SR0E, SR0F; | 159 | unsigned char SR08, SR0E, SR0F; |
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c index 487911e2926c..a2dc1a7ec758 100644 --- a/drivers/video/savage/savagefb_driver.c +++ b/drivers/video/savage/savagefb_driver.c | |||
| @@ -385,7 +385,7 @@ SavageSetup2DEngine(struct savagefb_par *par) | |||
| 385 | BCI_SEND(GlobalBitmapDescriptor); | 385 | BCI_SEND(GlobalBitmapDescriptor); |
| 386 | 386 | ||
| 387 | /* | 387 | /* |
| 388 | * I don't know why, sending this twice fixes the intial black screen, | 388 | * I don't know why, sending this twice fixes the initial black screen, |
| 389 | * prevents X from crashing at least in Toshiba laptops with SavageIX. | 389 | * prevents X from crashing at least in Toshiba laptops with SavageIX. |
| 390 | * --Tony | 390 | * --Tony |
| 391 | */ | 391 | */ |
| @@ -2211,7 +2211,7 @@ static int __devinit savagefb_probe(struct pci_dev* dev, | |||
| 2211 | goto failed_mmio; | 2211 | goto failed_mmio; |
| 2212 | 2212 | ||
| 2213 | video_len = savage_init_hw(par); | 2213 | video_len = savage_init_hw(par); |
| 2214 | /* FIXME: cant be negative */ | 2214 | /* FIXME: can't be negative */ |
| 2215 | if (video_len < 0) { | 2215 | if (video_len < 0) { |
| 2216 | err = video_len; | 2216 | err = video_len; |
| 2217 | goto failed_mmio; | 2217 | goto failed_mmio; |
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index 757665bc500f..9bcc61b4ef14 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c | |||
| @@ -643,7 +643,7 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv) | |||
| 643 | continue; | 643 | continue; |
| 644 | 644 | ||
| 645 | board_cfg = &ch->cfg.board_cfg; | 645 | board_cfg = &ch->cfg.board_cfg; |
| 646 | if (try_module_get(board_cfg->owner) && board_cfg->display_on) { | 646 | if (board_cfg->display_on && try_module_get(board_cfg->owner)) { |
| 647 | board_cfg->display_on(board_cfg->board_data, ch->info); | 647 | board_cfg->display_on(board_cfg->board_data, ch->info); |
| 648 | module_put(board_cfg->owner); | 648 | module_put(board_cfg->owner); |
| 649 | } | 649 | } |
| @@ -688,7 +688,7 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv) | |||
| 688 | } | 688 | } |
| 689 | 689 | ||
| 690 | board_cfg = &ch->cfg.board_cfg; | 690 | board_cfg = &ch->cfg.board_cfg; |
| 691 | if (try_module_get(board_cfg->owner) && board_cfg->display_off) { | 691 | if (board_cfg->display_off && try_module_get(board_cfg->owner)) { |
| 692 | board_cfg->display_off(board_cfg->board_data); | 692 | board_cfg->display_off(board_cfg->board_data); |
| 693 | module_put(board_cfg->owner); | 693 | module_put(board_cfg->owner); |
| 694 | } | 694 | } |
| @@ -1032,6 +1032,49 @@ static int sh_mobile_check_var(struct fb_var_screeninfo *var, struct fb_info *in | |||
| 1032 | return 0; | 1032 | return 0; |
| 1033 | } | 1033 | } |
| 1034 | 1034 | ||
| 1035 | /* | ||
| 1036 | * Screen blanking. Behavior is as follows: | ||
| 1037 | * FB_BLANK_UNBLANK: screen unblanked, clocks enabled | ||
| 1038 | * FB_BLANK_NORMAL: screen blanked, clocks enabled | ||
| 1039 | * FB_BLANK_VSYNC, | ||
| 1040 | * FB_BLANK_HSYNC, | ||
| 1041 | * FB_BLANK_POWEROFF: screen blanked, clocks disabled | ||
| 1042 | */ | ||
| 1043 | static int sh_mobile_lcdc_blank(int blank, struct fb_info *info) | ||
| 1044 | { | ||
| 1045 | struct sh_mobile_lcdc_chan *ch = info->par; | ||
| 1046 | struct sh_mobile_lcdc_priv *p = ch->lcdc; | ||
| 1047 | |||
| 1048 | /* blank the screen? */ | ||
| 1049 | if (blank > FB_BLANK_UNBLANK && ch->blank_status == FB_BLANK_UNBLANK) { | ||
| 1050 | struct fb_fillrect rect = { | ||
| 1051 | .width = info->var.xres, | ||
| 1052 | .height = info->var.yres, | ||
| 1053 | }; | ||
| 1054 | sh_mobile_lcdc_fillrect(info, &rect); | ||
| 1055 | } | ||
| 1056 | /* turn clocks on? */ | ||
| 1057 | if (blank <= FB_BLANK_NORMAL && ch->blank_status > FB_BLANK_NORMAL) { | ||
| 1058 | sh_mobile_lcdc_clk_on(p); | ||
| 1059 | } | ||
| 1060 | /* turn clocks off? */ | ||
| 1061 | if (blank > FB_BLANK_NORMAL && ch->blank_status <= FB_BLANK_NORMAL) { | ||
| 1062 | /* make sure the screen is updated with the black fill before | ||
| 1063 | * switching the clocks off. one vsync is not enough since | ||
| 1064 | * blanking may occur in the middle of a refresh. deferred io | ||
| 1065 | * mode will reenable the clocks and update the screen in time, | ||
| 1066 | * so it does not need this. */ | ||
| 1067 | if (!info->fbdefio) { | ||
| 1068 | sh_mobile_wait_for_vsync(info); | ||
| 1069 | sh_mobile_wait_for_vsync(info); | ||
| 1070 | } | ||
| 1071 | sh_mobile_lcdc_clk_off(p); | ||
| 1072 | } | ||
| 1073 | |||
| 1074 | ch->blank_status = blank; | ||
| 1075 | return 0; | ||
| 1076 | } | ||
| 1077 | |||
| 1035 | static struct fb_ops sh_mobile_lcdc_ops = { | 1078 | static struct fb_ops sh_mobile_lcdc_ops = { |
| 1036 | .owner = THIS_MODULE, | 1079 | .owner = THIS_MODULE, |
| 1037 | .fb_setcolreg = sh_mobile_lcdc_setcolreg, | 1080 | .fb_setcolreg = sh_mobile_lcdc_setcolreg, |
| @@ -1040,6 +1083,7 @@ static struct fb_ops sh_mobile_lcdc_ops = { | |||
| 1040 | .fb_fillrect = sh_mobile_lcdc_fillrect, | 1083 | .fb_fillrect = sh_mobile_lcdc_fillrect, |
| 1041 | .fb_copyarea = sh_mobile_lcdc_copyarea, | 1084 | .fb_copyarea = sh_mobile_lcdc_copyarea, |
| 1042 | .fb_imageblit = sh_mobile_lcdc_imageblit, | 1085 | .fb_imageblit = sh_mobile_lcdc_imageblit, |
| 1086 | .fb_blank = sh_mobile_lcdc_blank, | ||
| 1043 | .fb_pan_display = sh_mobile_fb_pan_display, | 1087 | .fb_pan_display = sh_mobile_fb_pan_display, |
| 1044 | .fb_ioctl = sh_mobile_ioctl, | 1088 | .fb_ioctl = sh_mobile_ioctl, |
| 1045 | .fb_open = sh_mobile_open, | 1089 | .fb_open = sh_mobile_open, |
| @@ -1254,7 +1298,7 @@ static int sh_mobile_lcdc_notify(struct notifier_block *nb, | |||
| 1254 | 1298 | ||
| 1255 | switch(action) { | 1299 | switch(action) { |
| 1256 | case FB_EVENT_SUSPEND: | 1300 | case FB_EVENT_SUSPEND: |
| 1257 | if (try_module_get(board_cfg->owner) && board_cfg->display_off) { | 1301 | if (board_cfg->display_off && try_module_get(board_cfg->owner)) { |
| 1258 | board_cfg->display_off(board_cfg->board_data); | 1302 | board_cfg->display_off(board_cfg->board_data); |
| 1259 | module_put(board_cfg->owner); | 1303 | module_put(board_cfg->owner); |
| 1260 | } | 1304 | } |
| @@ -1267,7 +1311,7 @@ static int sh_mobile_lcdc_notify(struct notifier_block *nb, | |||
| 1267 | mutex_unlock(&ch->open_lock); | 1311 | mutex_unlock(&ch->open_lock); |
| 1268 | 1312 | ||
| 1269 | /* HDMI must be enabled before LCDC configuration */ | 1313 | /* HDMI must be enabled before LCDC configuration */ |
| 1270 | if (try_module_get(board_cfg->owner) && board_cfg->display_on) { | 1314 | if (board_cfg->display_on && try_module_get(board_cfg->owner)) { |
| 1271 | board_cfg->display_on(board_cfg->board_data, info); | 1315 | board_cfg->display_on(board_cfg->board_data, info); |
| 1272 | module_put(board_cfg->owner); | 1316 | module_put(board_cfg->owner); |
| 1273 | } | 1317 | } |
diff --git a/drivers/video/sh_mobile_lcdcfb.h b/drivers/video/sh_mobile_lcdcfb.h index 4635eed63eee..f16cb5645a13 100644 --- a/drivers/video/sh_mobile_lcdcfb.h +++ b/drivers/video/sh_mobile_lcdcfb.h | |||
| @@ -37,6 +37,7 @@ struct sh_mobile_lcdc_chan { | |||
| 37 | struct completion vsync_completion; | 37 | struct completion vsync_completion; |
| 38 | struct fb_var_screeninfo display_var; | 38 | struct fb_var_screeninfo display_var; |
| 39 | int use_count; | 39 | int use_count; |
| 40 | int blank_status; | ||
| 40 | struct mutex open_lock; /* protects the use counter */ | 41 | struct mutex open_lock; /* protects the use counter */ |
| 41 | }; | 42 | }; |
| 42 | 43 | ||
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c index 46d1a64fe80d..56ef6b3a9851 100644 --- a/drivers/video/sm501fb.c +++ b/drivers/video/sm501fb.c | |||
| @@ -265,7 +265,7 @@ static unsigned long sm501fb_ps_to_hz(unsigned long psvalue) | |||
| 265 | return (unsigned long)numerator; | 265 | return (unsigned long)numerator; |
| 266 | } | 266 | } |
| 267 | 267 | ||
| 268 | /* sm501fb_hz_to_ps is identical to the oposite transform */ | 268 | /* sm501fb_hz_to_ps is identical to the opposite transform */ |
| 269 | 269 | ||
| 270 | #define sm501fb_hz_to_ps(x) sm501fb_ps_to_hz(x) | 270 | #define sm501fb_hz_to_ps(x) sm501fb_ps_to_hz(x) |
| 271 | 271 | ||
| @@ -1719,7 +1719,7 @@ static int sm501fb_init_fb(struct fb_info *fb, | |||
| 1719 | (head == HEAD_CRT) ? &sm501fb_ops_crt : &sm501fb_ops_pnl, | 1719 | (head == HEAD_CRT) ? &sm501fb_ops_crt : &sm501fb_ops_pnl, |
| 1720 | sizeof(struct fb_ops)); | 1720 | sizeof(struct fb_ops)); |
| 1721 | 1721 | ||
| 1722 | /* update ops dependant on what we've been passed */ | 1722 | /* update ops dependent on what we've been passed */ |
| 1723 | 1723 | ||
| 1724 | if ((pd->flags & SM501FB_FLAG_USE_HWCURSOR) == 0) | 1724 | if ((pd->flags & SM501FB_FLAG_USE_HWCURSOR) == 0) |
| 1725 | par->ops.fb_cursor = NULL; | 1725 | par->ops.fb_cursor = NULL; |
diff --git a/drivers/video/sstfb.c b/drivers/video/sstfb.c index 2ab704118c44..2301c275d63a 100644 --- a/drivers/video/sstfb.c +++ b/drivers/video/sstfb.c | |||
| @@ -221,7 +221,7 @@ static int __sst_wait_idle(u8 __iomem *vbase) | |||
| 221 | while(1) { | 221 | while(1) { |
| 222 | if (__sst_read(vbase, STATUS) & STATUS_FBI_BUSY) { | 222 | if (__sst_read(vbase, STATUS) & STATUS_FBI_BUSY) { |
| 223 | f_dddprintk("status: busy\n"); | 223 | f_dddprintk("status: busy\n"); |
| 224 | /* FIXME basicaly, this is a busy wait. maybe not that good. oh well; | 224 | /* FIXME basically, this is a busy wait. maybe not that good. oh well; |
| 225 | * this is a small loop after all. | 225 | * this is a small loop after all. |
| 226 | * Or maybe we should use mdelay() or udelay() here instead ? */ | 226 | * Or maybe we should use mdelay() or udelay() here instead ? */ |
| 227 | count = 0; | 227 | count = 0; |
| @@ -501,7 +501,7 @@ static int sstfb_set_par(struct fb_info *info) | |||
| 501 | } | 501 | } |
| 502 | 502 | ||
| 503 | if (IS_VOODOO2(par)) { | 503 | if (IS_VOODOO2(par)) { |
| 504 | /* voodoo2 has 32 pixel wide tiles , BUT stange things | 504 | /* voodoo2 has 32 pixel wide tiles , BUT strange things |
| 505 | happen with odd number of tiles */ | 505 | happen with odd number of tiles */ |
| 506 | par->tiles_in_X = (info->var.xres + 63 ) / 64 * 2; | 506 | par->tiles_in_X = (info->var.xres + 63 ) / 64 * 2; |
| 507 | } else { | 507 | } else { |
| @@ -920,11 +920,11 @@ static int __devinit sst_detect_ti(struct fb_info *info) | |||
| 920 | * we get the 1st byte (M value) of preset f1,f7 and fB | 920 | * we get the 1st byte (M value) of preset f1,f7 and fB |
| 921 | * why those 3 ? mmmh... for now, i'll do it the glide way... | 921 | * why those 3 ? mmmh... for now, i'll do it the glide way... |
| 922 | * and ask questions later. anyway, it seems that all the freq registers are | 922 | * and ask questions later. anyway, it seems that all the freq registers are |
| 923 | * realy at their default state (cf specs) so i ask again, why those 3 regs ? | 923 | * really at their default state (cf specs) so i ask again, why those 3 regs ? |
| 924 | * mmmmh.. it seems that's much more ugly than i thought. we use f0 and fA for | 924 | * mmmmh.. it seems that's much more ugly than i thought. we use f0 and fA for |
| 925 | * pll programming, so in fact, we *hope* that the f1, f7 & fB won't be | 925 | * pll programming, so in fact, we *hope* that the f1, f7 & fB won't be |
| 926 | * touched... | 926 | * touched... |
| 927 | * is it realy safe ? how can i reset this ramdac ? geee... | 927 | * is it really safe ? how can i reset this ramdac ? geee... |
| 928 | */ | 928 | */ |
| 929 | static int __devinit sst_detect_ics(struct fb_info *info) | 929 | static int __devinit sst_detect_ics(struct fb_info *info) |
| 930 | { | 930 | { |
diff --git a/drivers/video/sticore.h b/drivers/video/sticore.h index 7fe5be4bc70e..addf7b615ef8 100644 --- a/drivers/video/sticore.h +++ b/drivers/video/sticore.h | |||
| @@ -79,7 +79,7 @@ struct sti_glob_cfg_ext { | |||
| 79 | u8 curr_mon; /* current monitor configured */ | 79 | u8 curr_mon; /* current monitor configured */ |
| 80 | u8 friendly_boot; /* in friendly boot mode */ | 80 | u8 friendly_boot; /* in friendly boot mode */ |
| 81 | s16 power; /* power calculation (in Watts) */ | 81 | s16 power; /* power calculation (in Watts) */ |
| 82 | s32 freq_ref; /* frequency refrence */ | 82 | s32 freq_ref; /* frequency reference */ |
| 83 | u32 sti_mem_addr; /* pointer to global sti memory (size=sti_mem_request) */ | 83 | u32 sti_mem_addr; /* pointer to global sti memory (size=sti_mem_request) */ |
| 84 | u32 future_ptr; /* pointer to future data */ | 84 | u32 future_ptr; /* pointer to future data */ |
| 85 | }; | 85 | }; |
diff --git a/drivers/video/tdfxfb.c b/drivers/video/tdfxfb.c index 3ee5e63cfa4f..a99b994c9b6b 100644 --- a/drivers/video/tdfxfb.c +++ b/drivers/video/tdfxfb.c | |||
| @@ -877,12 +877,12 @@ static void tdfxfb_fillrect(struct fb_info *info, | |||
| 877 | else | 877 | else |
| 878 | tdfx_rop = TDFX_ROP_XOR; | 878 | tdfx_rop = TDFX_ROP_XOR; |
| 879 | 879 | ||
| 880 | /* asume always rect->height < 4096 */ | 880 | /* assume always rect->height < 4096 */ |
| 881 | if (dy + rect->height > 4095) { | 881 | if (dy + rect->height > 4095) { |
| 882 | dstbase = stride * dy; | 882 | dstbase = stride * dy; |
| 883 | dy = 0; | 883 | dy = 0; |
| 884 | } | 884 | } |
| 885 | /* asume always rect->width < 4096 */ | 885 | /* assume always rect->width < 4096 */ |
| 886 | if (dx + rect->width > 4095) { | 886 | if (dx + rect->width > 4095) { |
| 887 | dstbase += dx * bpp >> 3; | 887 | dstbase += dx * bpp >> 3; |
| 888 | dx = 0; | 888 | dx = 0; |
| @@ -915,22 +915,22 @@ static void tdfxfb_copyarea(struct fb_info *info, | |||
| 915 | u32 dstbase = 0; | 915 | u32 dstbase = 0; |
| 916 | u32 srcbase = 0; | 916 | u32 srcbase = 0; |
| 917 | 917 | ||
| 918 | /* asume always area->height < 4096 */ | 918 | /* assume always area->height < 4096 */ |
| 919 | if (sy + area->height > 4095) { | 919 | if (sy + area->height > 4095) { |
| 920 | srcbase = stride * sy; | 920 | srcbase = stride * sy; |
| 921 | sy = 0; | 921 | sy = 0; |
| 922 | } | 922 | } |
| 923 | /* asume always area->width < 4096 */ | 923 | /* assume always area->width < 4096 */ |
| 924 | if (sx + area->width > 4095) { | 924 | if (sx + area->width > 4095) { |
| 925 | srcbase += sx * bpp >> 3; | 925 | srcbase += sx * bpp >> 3; |
| 926 | sx = 0; | 926 | sx = 0; |
| 927 | } | 927 | } |
| 928 | /* asume always area->height < 4096 */ | 928 | /* assume always area->height < 4096 */ |
| 929 | if (dy + area->height > 4095) { | 929 | if (dy + area->height > 4095) { |
| 930 | dstbase = stride * dy; | 930 | dstbase = stride * dy; |
| 931 | dy = 0; | 931 | dy = 0; |
| 932 | } | 932 | } |
| 933 | /* asume always area->width < 4096 */ | 933 | /* assume always area->width < 4096 */ |
| 934 | if (dx + area->width > 4095) { | 934 | if (dx + area->width > 4095) { |
| 935 | dstbase += dx * bpp >> 3; | 935 | dstbase += dx * bpp >> 3; |
| 936 | dx = 0; | 936 | dx = 0; |
| @@ -1003,12 +1003,12 @@ static void tdfxfb_imageblit(struct fb_info *info, const struct fb_image *image) | |||
| 1003 | #else | 1003 | #else |
| 1004 | srcfmt = 0x400000; | 1004 | srcfmt = 0x400000; |
| 1005 | #endif | 1005 | #endif |
| 1006 | /* asume always image->height < 4096 */ | 1006 | /* assume always image->height < 4096 */ |
| 1007 | if (dy + image->height > 4095) { | 1007 | if (dy + image->height > 4095) { |
| 1008 | dstbase = stride * dy; | 1008 | dstbase = stride * dy; |
| 1009 | dy = 0; | 1009 | dy = 0; |
| 1010 | } | 1010 | } |
| 1011 | /* asume always image->width < 4096 */ | 1011 | /* assume always image->width < 4096 */ |
| 1012 | if (dx + image->width > 4095) { | 1012 | if (dx + image->width > 4095) { |
| 1013 | dstbase += dx * bpp >> 3; | 1013 | dstbase += dx * bpp >> 3; |
| 1014 | dx = 0; | 1014 | dx = 0; |
| @@ -1124,7 +1124,7 @@ static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor) | |||
| 1124 | * lower half (least significant 64 bits) of a 128 bit word | 1124 | * lower half (least significant 64 bits) of a 128 bit word |
| 1125 | * and pattern 1 the upper half. If you examine the data of | 1125 | * and pattern 1 the upper half. If you examine the data of |
| 1126 | * the cursor image the graphics card uses then from the | 1126 | * the cursor image the graphics card uses then from the |
| 1127 | * begining you see line one of pattern 0, line one of | 1127 | * beginning you see line one of pattern 0, line one of |
| 1128 | * pattern 1, line two of pattern 0, line two of pattern 1, | 1128 | * pattern 1, line two of pattern 0, line two of pattern 1, |
| 1129 | * etc etc. The linear stride for the cursor is always 16 bytes | 1129 | * etc etc. The linear stride for the cursor is always 16 bytes |
| 1130 | * (128 bits) which is the maximum cursor width times two for | 1130 | * (128 bits) which is the maximum cursor width times two for |
diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c index 9710bf8caeae..0c341d739604 100644 --- a/drivers/video/tmiofb.c +++ b/drivers/video/tmiofb.c | |||
| @@ -359,7 +359,7 @@ tmiofb_acc_wait(struct fb_info *info, unsigned int ccs) | |||
| 359 | { | 359 | { |
| 360 | struct tmiofb_par *par = info->par; | 360 | struct tmiofb_par *par = info->par; |
| 361 | /* | 361 | /* |
| 362 | * This code can be called whith interrupts disabled. | 362 | * This code can be called with interrupts disabled. |
| 363 | * So instead of relaying on irq to trigger the event, | 363 | * So instead of relaying on irq to trigger the event, |
| 364 | * poll the state till the necessary command is executed. | 364 | * poll the state till the necessary command is executed. |
| 365 | */ | 365 | */ |
diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c index 2c8364e9b632..68041d9dc260 100644 --- a/drivers/video/udlfb.c +++ b/drivers/video/udlfb.c | |||
| @@ -769,7 +769,7 @@ static int dlfb_ops_ioctl(struct fb_info *info, unsigned int cmd, | |||
| 769 | 769 | ||
| 770 | /* | 770 | /* |
| 771 | * If we have a damage-aware client, turn fb_defio "off" | 771 | * If we have a damage-aware client, turn fb_defio "off" |
| 772 | * To avoid perf imact of unecessary page fault handling. | 772 | * To avoid perf imact of unnecessary page fault handling. |
| 773 | * Done by resetting the delay for this fb_info to a very | 773 | * Done by resetting the delay for this fb_info to a very |
| 774 | * long period. Pages will become writable and stay that way. | 774 | * long period. Pages will become writable and stay that way. |
| 775 | * Reset to normal value when all clients have closed this fb. | 775 | * Reset to normal value when all clients have closed this fb. |
diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c index 28ccab44a391..53b2c5aae067 100644 --- a/drivers/video/vga16fb.c +++ b/drivers/video/vga16fb.c | |||
| @@ -152,7 +152,7 @@ static inline int setop(int op) | |||
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | /* Set the Enable Set/Reset Register and return its old value. | 154 | /* Set the Enable Set/Reset Register and return its old value. |
| 155 | The code here always uses value 0xf for thsi register. */ | 155 | The code here always uses value 0xf for this register. */ |
| 156 | static inline int setsr(int sr) | 156 | static inline int setsr(int sr) |
| 157 | { | 157 | { |
| 158 | int oldsr; | 158 | int oldsr; |
diff --git a/drivers/video/via/chip.h b/drivers/video/via/chip.h index 781f3aa66b42..29d70244a21f 100644 --- a/drivers/video/via/chip.h +++ b/drivers/video/via/chip.h | |||
| @@ -139,7 +139,6 @@ struct chip_information { | |||
| 139 | 139 | ||
| 140 | struct crt_setting_information { | 140 | struct crt_setting_information { |
| 141 | int iga_path; | 141 | int iga_path; |
| 142 | int refresh_rate; | ||
| 143 | }; | 142 | }; |
| 144 | 143 | ||
| 145 | struct tmds_setting_information { | 144 | struct tmds_setting_information { |
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c index 5728fd76bc11..dc4c778877ce 100644 --- a/drivers/video/via/hw.c +++ b/drivers/video/via/hw.c | |||
| @@ -2002,13 +2002,15 @@ void viafb_fill_crtc_timing(struct crt_mode_table *crt_table, | |||
| 2002 | int i; | 2002 | int i; |
| 2003 | int index = 0; | 2003 | int index = 0; |
| 2004 | int h_addr, v_addr; | 2004 | int h_addr, v_addr; |
| 2005 | u32 pll_D_N, clock; | 2005 | u32 pll_D_N, clock, refresh = viafb_refresh; |
| 2006 | |||
| 2007 | if (viafb_SAMM_ON && set_iga == IGA2) | ||
| 2008 | refresh = viafb_refresh1; | ||
| 2006 | 2009 | ||
| 2007 | for (i = 0; i < video_mode->mode_array; i++) { | 2010 | for (i = 0; i < video_mode->mode_array; i++) { |
| 2008 | index = i; | 2011 | index = i; |
| 2009 | 2012 | ||
| 2010 | if (crt_table[i].refresh_rate == viaparinfo-> | 2013 | if (crt_table[i].refresh_rate == refresh) |
| 2011 | crt_setting_info->refresh_rate) | ||
| 2012 | break; | 2014 | break; |
| 2013 | } | 2015 | } |
| 2014 | 2016 | ||
| @@ -2019,7 +2021,7 @@ void viafb_fill_crtc_timing(struct crt_mode_table *crt_table, | |||
| 2019 | if ((viafb_LCD_ON | viafb_DVI_ON) | 2021 | if ((viafb_LCD_ON | viafb_DVI_ON) |
| 2020 | && video_mode->crtc[0].crtc.hor_addr == 640 | 2022 | && video_mode->crtc[0].crtc.hor_addr == 640 |
| 2021 | && video_mode->crtc[0].crtc.ver_addr == 480 | 2023 | && video_mode->crtc[0].crtc.ver_addr == 480 |
| 2022 | && viaparinfo->crt_setting_info->refresh_rate == 60) { | 2024 | && refresh == 60) { |
| 2023 | /* The border is 8 pixels. */ | 2025 | /* The border is 8 pixels. */ |
| 2024 | crt_reg.hor_blank_start = crt_reg.hor_blank_start - 8; | 2026 | crt_reg.hor_blank_start = crt_reg.hor_blank_start - 8; |
| 2025 | 2027 | ||
| @@ -2070,7 +2072,6 @@ void __devinit viafb_init_chip_info(int chip_type) | |||
| 2070 | init_lvds_chip_info(); | 2072 | init_lvds_chip_info(); |
| 2071 | 2073 | ||
| 2072 | viaparinfo->crt_setting_info->iga_path = IGA1; | 2074 | viaparinfo->crt_setting_info->iga_path = IGA1; |
| 2073 | viaparinfo->crt_setting_info->refresh_rate = viafb_refresh; | ||
| 2074 | 2075 | ||
| 2075 | /*Set IGA path for each device */ | 2076 | /*Set IGA path for each device */ |
| 2076 | viafb_set_iga_path(); | 2077 | viafb_set_iga_path(); |
| @@ -2083,13 +2084,9 @@ void __devinit viafb_init_chip_info(int chip_type) | |||
| 2083 | viaparinfo->lvds_setting_info->lcd_mode; | 2084 | viaparinfo->lvds_setting_info->lcd_mode; |
| 2084 | } | 2085 | } |
| 2085 | 2086 | ||
| 2086 | void viafb_update_device_setting(int hres, int vres, | 2087 | void viafb_update_device_setting(int hres, int vres, int bpp, int flag) |
| 2087 | int bpp, int vmode_refresh, int flag) | ||
| 2088 | { | 2088 | { |
| 2089 | if (flag == 0) { | 2089 | if (flag == 0) { |
| 2090 | viaparinfo->crt_setting_info->refresh_rate = | ||
| 2091 | vmode_refresh; | ||
| 2092 | |||
| 2093 | viaparinfo->tmds_setting_info->h_active = hres; | 2090 | viaparinfo->tmds_setting_info->h_active = hres; |
| 2094 | viaparinfo->tmds_setting_info->v_active = vres; | 2091 | viaparinfo->tmds_setting_info->v_active = vres; |
| 2095 | 2092 | ||
diff --git a/drivers/video/via/hw.h b/drivers/video/via/hw.h index 7295263299f7..8858593405aa 100644 --- a/drivers/video/via/hw.h +++ b/drivers/video/via/hw.h | |||
| @@ -949,8 +949,7 @@ void __devinit viafb_init_chip_info(int chip_type); | |||
| 949 | void __devinit viafb_init_dac(int set_iga); | 949 | void __devinit viafb_init_dac(int set_iga); |
| 950 | int viafb_get_pixclock(int hres, int vres, int vmode_refresh); | 950 | int viafb_get_pixclock(int hres, int vres, int vmode_refresh); |
| 951 | int viafb_get_refresh(int hres, int vres, u32 float_refresh); | 951 | int viafb_get_refresh(int hres, int vres, u32 float_refresh); |
| 952 | void viafb_update_device_setting(int hres, int vres, int bpp, | 952 | void viafb_update_device_setting(int hres, int vres, int bpp, int flag); |
| 953 | int vmode_refresh, int flag); | ||
| 954 | 953 | ||
| 955 | void viafb_set_iga_path(void); | 954 | void viafb_set_iga_path(void); |
| 956 | void viafb_set_primary_color_register(u8 index, u8 red, u8 green, u8 blue); | 955 | void viafb_set_primary_color_register(u8 index, u8 red, u8 green, u8 blue); |
diff --git a/drivers/video/via/via_utility.c b/drivers/video/via/via_utility.c index d05ccb62b55f..35458a5eadc8 100644 --- a/drivers/video/via/via_utility.c +++ b/drivers/video/via/via_utility.c | |||
| @@ -174,7 +174,7 @@ void viafb_set_gamma_table(int bpp, unsigned int *gamma_table) | |||
| 174 | } | 174 | } |
| 175 | 175 | ||
| 176 | /* If adjust Gamma value in SAMM, fill IGA1, | 176 | /* If adjust Gamma value in SAMM, fill IGA1, |
| 177 | IGA2 Gamma table simultanous. */ | 177 | IGA2 Gamma table simultaneous. */ |
| 178 | /* Switch to IGA2 Gamma Table */ | 178 | /* Switch to IGA2 Gamma Table */ |
| 179 | if ((active_device_amount > 1) && | 179 | if ((active_device_amount > 1) && |
| 180 | !((viaparinfo->chip_info->gfx_chip_name == | 180 | !((viaparinfo->chip_info->gfx_chip_name == |
diff --git a/drivers/video/via/via_utility.h b/drivers/video/via/via_utility.h index 1670ba82143f..f23be1708c14 100644 --- a/drivers/video/via/via_utility.h +++ b/drivers/video/via/via_utility.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #ifndef __VIAUTILITY_H__ | 21 | #ifndef __VIAUTILITY_H__ |
| 22 | #define __VIAUTILITY_H__ | 22 | #define __VIAUTILITY_H__ |
| 23 | 23 | ||
| 24 | /* These functions are used to get infomation about device's state */ | 24 | /* These functions are used to get information about device's state */ |
| 25 | void viafb_get_device_support_state(u32 *support_state); | 25 | void viafb_get_device_support_state(u32 *support_state); |
| 26 | void viafb_get_device_connect_state(u32 *connect_state); | 26 | void viafb_get_device_connect_state(u32 *connect_state); |
| 27 | bool viafb_lcd_get_support_expand_state(u32 xres, u32 yres); | 27 | bool viafb_lcd_get_support_expand_state(u32 xres, u32 yres); |
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c index f555b891cc72..a542bed086e2 100644 --- a/drivers/video/via/viafbdev.c +++ b/drivers/video/via/viafbdev.c | |||
| @@ -182,13 +182,24 @@ static int viafb_release(struct fb_info *info, int user) | |||
| 182 | return 0; | 182 | return 0; |
| 183 | } | 183 | } |
| 184 | 184 | ||
| 185 | static inline int get_var_refresh(struct fb_var_screeninfo *var) | ||
| 186 | { | ||
| 187 | u32 htotal, vtotal; | ||
| 188 | |||
| 189 | htotal = var->left_margin + var->xres + var->right_margin | ||
| 190 | + var->hsync_len; | ||
| 191 | vtotal = var->upper_margin + var->yres + var->lower_margin | ||
| 192 | + var->vsync_len; | ||
| 193 | return PICOS2KHZ(var->pixclock) * 1000 / (htotal * vtotal); | ||
| 194 | } | ||
| 195 | |||
| 185 | static int viafb_check_var(struct fb_var_screeninfo *var, | 196 | static int viafb_check_var(struct fb_var_screeninfo *var, |
| 186 | struct fb_info *info) | 197 | struct fb_info *info) |
| 187 | { | 198 | { |
| 188 | int htotal, vtotal, depth; | 199 | int depth, refresh; |
| 189 | struct VideoModeTable *vmode_entry; | 200 | struct VideoModeTable *vmode_entry; |
| 190 | struct viafb_par *ppar = info->par; | 201 | struct viafb_par *ppar = info->par; |
| 191 | u32 long_refresh, line; | 202 | u32 line; |
| 192 | 203 | ||
| 193 | DEBUG_MSG(KERN_INFO "viafb_check_var!\n"); | 204 | DEBUG_MSG(KERN_INFO "viafb_check_var!\n"); |
| 194 | /* Sanity check */ | 205 | /* Sanity check */ |
| @@ -231,17 +242,11 @@ static int viafb_check_var(struct fb_var_screeninfo *var, | |||
| 231 | /* Based on var passed in to calculate the refresh, | 242 | /* Based on var passed in to calculate the refresh, |
| 232 | * because our driver use some modes special. | 243 | * because our driver use some modes special. |
| 233 | */ | 244 | */ |
| 234 | htotal = var->xres + var->left_margin + | 245 | refresh = viafb_get_refresh(var->xres, var->yres, |
| 235 | var->right_margin + var->hsync_len; | 246 | get_var_refresh(var)); |
| 236 | vtotal = var->yres + var->upper_margin + | ||
| 237 | var->lower_margin + var->vsync_len; | ||
| 238 | long_refresh = 1000000000UL / var->pixclock * 1000; | ||
| 239 | long_refresh /= (htotal * vtotal); | ||
| 240 | |||
| 241 | viafb_refresh = viafb_get_refresh(var->xres, var->yres, long_refresh); | ||
| 242 | 247 | ||
| 243 | /* Adjust var according to our driver's own table */ | 248 | /* Adjust var according to our driver's own table */ |
| 244 | viafb_fill_var_timing_info(var, viafb_refresh, vmode_entry); | 249 | viafb_fill_var_timing_info(var, refresh, vmode_entry); |
| 245 | if (var->accel_flags & FB_ACCELF_TEXT && | 250 | if (var->accel_flags & FB_ACCELF_TEXT && |
| 246 | !ppar->shared->vdev->engine_mmio) | 251 | !ppar->shared->vdev->engine_mmio) |
| 247 | var->accel_flags = 0; | 252 | var->accel_flags = 0; |
| @@ -253,12 +258,13 @@ static int viafb_set_par(struct fb_info *info) | |||
| 253 | { | 258 | { |
| 254 | struct viafb_par *viapar = info->par; | 259 | struct viafb_par *viapar = info->par; |
| 255 | struct VideoModeTable *vmode_entry, *vmode_entry1 = NULL; | 260 | struct VideoModeTable *vmode_entry, *vmode_entry1 = NULL; |
| 261 | int refresh; | ||
| 256 | DEBUG_MSG(KERN_INFO "viafb_set_par!\n"); | 262 | DEBUG_MSG(KERN_INFO "viafb_set_par!\n"); |
| 257 | 263 | ||
| 258 | viafb_update_fix(info); | 264 | viafb_update_fix(info); |
| 259 | viapar->depth = fb_get_color_depth(&info->var, &info->fix); | 265 | viapar->depth = fb_get_color_depth(&info->var, &info->fix); |
| 260 | viafb_update_device_setting(viafbinfo->var.xres, viafbinfo->var.yres, | 266 | viafb_update_device_setting(viafbinfo->var.xres, viafbinfo->var.yres, |
| 261 | viafbinfo->var.bits_per_pixel, viafb_refresh, 0); | 267 | viafbinfo->var.bits_per_pixel, 0); |
| 262 | 268 | ||
| 263 | vmode_entry = viafb_get_mode(viafbinfo->var.xres, viafbinfo->var.yres); | 269 | vmode_entry = viafb_get_mode(viafbinfo->var.xres, viafbinfo->var.yres); |
| 264 | if (viafb_dual_fb) { | 270 | if (viafb_dual_fb) { |
| @@ -266,7 +272,7 @@ static int viafb_set_par(struct fb_info *info) | |||
| 266 | viafbinfo1->var.yres); | 272 | viafbinfo1->var.yres); |
| 267 | viafb_update_device_setting(viafbinfo1->var.xres, | 273 | viafb_update_device_setting(viafbinfo1->var.xres, |
| 268 | viafbinfo1->var.yres, viafbinfo1->var.bits_per_pixel, | 274 | viafbinfo1->var.yres, viafbinfo1->var.bits_per_pixel, |
| 269 | viafb_refresh1, 1); | 275 | 1); |
| 270 | } else if (viafb_SAMM_ON == 1) { | 276 | } else if (viafb_SAMM_ON == 1) { |
| 271 | DEBUG_MSG(KERN_INFO | 277 | DEBUG_MSG(KERN_INFO |
| 272 | "viafb_second_xres = %d, viafb_second_yres = %d, bpp = %d\n", | 278 | "viafb_second_xres = %d, viafb_second_yres = %d, bpp = %d\n", |
| @@ -275,14 +281,19 @@ static int viafb_set_par(struct fb_info *info) | |||
| 275 | viafb_second_yres); | 281 | viafb_second_yres); |
| 276 | 282 | ||
| 277 | viafb_update_device_setting(viafb_second_xres, | 283 | viafb_update_device_setting(viafb_second_xres, |
| 278 | viafb_second_yres, viafb_bpp1, viafb_refresh1, 1); | 284 | viafb_second_yres, viafb_bpp1, 1); |
| 279 | } | 285 | } |
| 280 | 286 | ||
| 287 | refresh = viafb_get_refresh(info->var.xres, info->var.yres, | ||
| 288 | get_var_refresh(&info->var)); | ||
| 281 | if (vmode_entry) { | 289 | if (vmode_entry) { |
| 282 | if (viafb_dual_fb && viapar->iga_path == IGA2) | 290 | if (viafb_dual_fb && viapar->iga_path == IGA2) { |
| 283 | viafb_bpp1 = info->var.bits_per_pixel; | 291 | viafb_bpp1 = info->var.bits_per_pixel; |
| 284 | else | 292 | viafb_refresh1 = refresh; |
| 293 | } else { | ||
| 285 | viafb_bpp = info->var.bits_per_pixel; | 294 | viafb_bpp = info->var.bits_per_pixel; |
| 295 | viafb_refresh = refresh; | ||
| 296 | } | ||
| 286 | 297 | ||
| 287 | if (info->var.accel_flags & FB_ACCELF_TEXT) | 298 | if (info->var.accel_flags & FB_ACCELF_TEXT) |
| 288 | info->flags &= ~FBINFO_HWACCEL_DISABLED; | 299 | info->flags &= ~FBINFO_HWACCEL_DISABLED; |
| @@ -1795,14 +1806,9 @@ int __devinit via_fb_pci_probe(struct viafb_dev *vdev) | |||
| 1795 | default_var.xres_virtual = default_xres; | 1806 | default_var.xres_virtual = default_xres; |
| 1796 | default_var.yres_virtual = default_yres; | 1807 | default_var.yres_virtual = default_yres; |
| 1797 | default_var.bits_per_pixel = viafb_bpp; | 1808 | default_var.bits_per_pixel = viafb_bpp; |
| 1798 | default_var.pixclock = | 1809 | viafb_fill_var_timing_info(&default_var, viafb_get_refresh( |
| 1799 | viafb_get_pixclock(default_xres, default_yres, viafb_refresh); | 1810 | default_var.xres, default_var.yres, viafb_refresh), |
| 1800 | default_var.left_margin = (default_xres >> 3) & 0xf8; | 1811 | viafb_get_mode(default_var.xres, default_var.yres)); |
| 1801 | default_var.right_margin = 32; | ||
| 1802 | default_var.upper_margin = 16; | ||
| 1803 | default_var.lower_margin = 4; | ||
| 1804 | default_var.hsync_len = default_var.left_margin; | ||
| 1805 | default_var.vsync_len = 4; | ||
| 1806 | viafb_setup_fixinfo(&viafbinfo->fix, viaparinfo); | 1812 | viafb_setup_fixinfo(&viafbinfo->fix, viaparinfo); |
| 1807 | viafbinfo->var = default_var; | 1813 | viafbinfo->var = default_var; |
| 1808 | 1814 | ||
| @@ -1841,15 +1847,9 @@ int __devinit via_fb_pci_probe(struct viafb_dev *vdev) | |||
| 1841 | default_var.xres_virtual = viafb_second_virtual_xres; | 1847 | default_var.xres_virtual = viafb_second_virtual_xres; |
| 1842 | default_var.yres_virtual = viafb_second_virtual_yres; | 1848 | default_var.yres_virtual = viafb_second_virtual_yres; |
| 1843 | default_var.bits_per_pixel = viafb_bpp1; | 1849 | default_var.bits_per_pixel = viafb_bpp1; |
| 1844 | default_var.pixclock = | 1850 | viafb_fill_var_timing_info(&default_var, viafb_get_refresh( |
| 1845 | viafb_get_pixclock(viafb_second_xres, viafb_second_yres, | 1851 | default_var.xres, default_var.yres, viafb_refresh1), |
| 1846 | viafb_refresh); | 1852 | viafb_get_mode(default_var.xres, default_var.yres)); |
| 1847 | default_var.left_margin = (viafb_second_xres >> 3) & 0xf8; | ||
| 1848 | default_var.right_margin = 32; | ||
| 1849 | default_var.upper_margin = 16; | ||
| 1850 | default_var.lower_margin = 4; | ||
| 1851 | default_var.hsync_len = default_var.left_margin; | ||
| 1852 | default_var.vsync_len = 4; | ||
| 1853 | 1853 | ||
| 1854 | viafb_setup_fixinfo(&viafbinfo1->fix, viaparinfo1); | 1854 | viafb_setup_fixinfo(&viafbinfo1->fix, viaparinfo1); |
| 1855 | viafb_check_var(&default_var, viafbinfo1); | 1855 | viafb_check_var(&default_var, viafbinfo1); |
| @@ -2004,22 +2004,24 @@ static int __init viafb_setup(char *options) | |||
| 2004 | */ | 2004 | */ |
| 2005 | int __init viafb_init(void) | 2005 | int __init viafb_init(void) |
| 2006 | { | 2006 | { |
| 2007 | u32 dummy; | 2007 | u32 dummy_x, dummy_y; |
| 2008 | #ifndef MODULE | 2008 | #ifndef MODULE |
| 2009 | char *option = NULL; | 2009 | char *option = NULL; |
| 2010 | if (fb_get_options("viafb", &option)) | 2010 | if (fb_get_options("viafb", &option)) |
| 2011 | return -ENODEV; | 2011 | return -ENODEV; |
| 2012 | viafb_setup(option); | 2012 | viafb_setup(option); |
| 2013 | #endif | 2013 | #endif |
| 2014 | if (parse_mode(viafb_mode, &dummy, &dummy) | 2014 | if (parse_mode(viafb_mode, &dummy_x, &dummy_y) |
| 2015 | || parse_mode(viafb_mode1, &dummy, &dummy) | 2015 | || !viafb_get_mode(dummy_x, dummy_y) |
| 2016 | || parse_mode(viafb_mode1, &dummy_x, &dummy_y) | ||
| 2017 | || !viafb_get_mode(dummy_x, dummy_y) | ||
| 2016 | || viafb_bpp < 0 || viafb_bpp > 32 | 2018 | || viafb_bpp < 0 || viafb_bpp > 32 |
| 2017 | || viafb_bpp1 < 0 || viafb_bpp1 > 32 | 2019 | || viafb_bpp1 < 0 || viafb_bpp1 > 32 |
| 2018 | || parse_active_dev()) | 2020 | || parse_active_dev()) |
| 2019 | return -EINVAL; | 2021 | return -EINVAL; |
| 2020 | 2022 | ||
| 2021 | printk(KERN_INFO | 2023 | printk(KERN_INFO |
| 2022 | "VIA Graphics Intergration Chipset framebuffer %d.%d initializing\n", | 2024 | "VIA Graphics Integration Chipset framebuffer %d.%d initializing\n", |
| 2023 | VERSION_MAJOR, VERSION_MINOR); | 2025 | VERSION_MAJOR, VERSION_MINOR); |
| 2024 | return 0; | 2026 | return 0; |
| 2025 | } | 2027 | } |
diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c index d8b12c32e3ef..c8be8af0cc6d 100644 --- a/drivers/video/w100fb.c +++ b/drivers/video/w100fb.c | |||
| @@ -1306,7 +1306,7 @@ static void w100_init_lcd(struct w100fb_par *par) | |||
| 1306 | union graphic_v_disp_u graphic_v_disp; | 1306 | union graphic_v_disp_u graphic_v_disp; |
| 1307 | union crtc_total_u crtc_total; | 1307 | union crtc_total_u crtc_total; |
| 1308 | 1308 | ||
| 1309 | /* w3200 doesnt like undefined bits being set so zero register values first */ | 1309 | /* w3200 doesn't like undefined bits being set so zero register values first */ |
| 1310 | 1310 | ||
| 1311 | active_h_disp.val = 0; | 1311 | active_h_disp.val = 0; |
| 1312 | active_h_disp.f.active_h_start=mode->left_margin; | 1312 | active_h_disp.f.active_h_start=mode->left_margin; |
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c index 38e96ab90945..5ef385bfed18 100644 --- a/drivers/w1/masters/omap_hdq.c +++ b/drivers/w1/masters/omap_hdq.c | |||
| @@ -545,7 +545,7 @@ static void omap_w1_write_byte(void *_hdq, u8 byte) | |||
| 545 | return; | 545 | return; |
| 546 | } | 546 | } |
| 547 | 547 | ||
| 548 | /* Second write, data transfered. Release the module */ | 548 | /* Second write, data transferred. Release the module */ |
| 549 | if (hdq_data->init_trans > 1) { | 549 | if (hdq_data->init_trans > 1) { |
| 550 | omap_hdq_put(hdq_data); | 550 | omap_hdq_put(hdq_data); |
| 551 | ret = mutex_lock_interruptible(&hdq_data->hdq_mutex); | 551 | ret = mutex_lock_interruptible(&hdq_data->hdq_mutex); |
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index b69d71482554..1b0f98bc51b5 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig | |||
| @@ -933,7 +933,7 @@ config PNX833X_WDT | |||
| 933 | depends on SOC_PNX8335 | 933 | depends on SOC_PNX8335 |
| 934 | help | 934 | help |
| 935 | Hardware driver for the PNX833x's watchdog. This is a | 935 | Hardware driver for the PNX833x's watchdog. This is a |
| 936 | watchdog timer that will reboot the machine after a programable | 936 | watchdog timer that will reboot the machine after a programmable |
| 937 | timer has expired and no process has written to /dev/watchdog during | 937 | timer has expired and no process has written to /dev/watchdog during |
| 938 | that time. | 938 | that time. |
| 939 | 939 | ||
diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile index d520bf9c3355..3f8608b922a7 100644 --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | # Only one watchdog can succeed. We probe the ISA/PCI/USB based | 5 | # Only one watchdog can succeed. We probe the ISA/PCI/USB based |
| 6 | # watchdog-cards first, then the architecture specific watchdog | 6 | # watchdog-cards first, then the architecture specific watchdog |
| 7 | # drivers and then the architecture independant "softdog" driver. | 7 | # drivers and then the architecture independent "softdog" driver. |
| 8 | # This means that if your ISA/PCI/USB card isn't detected that | 8 | # This means that if your ISA/PCI/USB card isn't detected that |
| 9 | # you can fall back to an architecture specific driver and if | 9 | # you can fall back to an architecture specific driver and if |
| 10 | # that also fails then you can fall back to the software watchdog | 10 | # that also fails then you can fall back to the software watchdog |
| @@ -153,7 +153,7 @@ obj-$(CONFIG_WATCHDOG_CP1XXX) += cpwd.o | |||
| 153 | # Xen | 153 | # Xen |
| 154 | obj-$(CONFIG_XEN_WDT) += xen_wdt.o | 154 | obj-$(CONFIG_XEN_WDT) += xen_wdt.o |
| 155 | 155 | ||
| 156 | # Architecture Independant | 156 | # Architecture Independent |
| 157 | obj-$(CONFIG_WM831X_WATCHDOG) += wm831x_wdt.o | 157 | obj-$(CONFIG_WM831X_WATCHDOG) += wm831x_wdt.o |
| 158 | obj-$(CONFIG_WM8350_WATCHDOG) += wm8350_wdt.o | 158 | obj-$(CONFIG_WM8350_WATCHDOG) += wm8350_wdt.o |
| 159 | obj-$(CONFIG_MAX63XX_WATCHDOG) += max63xx_wdt.o | 159 | obj-$(CONFIG_MAX63XX_WATCHDOG) += max63xx_wdt.o |
diff --git a/drivers/watchdog/acquirewdt.c b/drivers/watchdog/acquirewdt.c index 2ffce4d75443..b6a2b58cbe64 100644 --- a/drivers/watchdog/acquirewdt.c +++ b/drivers/watchdog/acquirewdt.c | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | * Theory of Operation: | 26 | * Theory of Operation: |
| 27 | * The Watch-Dog Timer is provided to ensure that standalone | 27 | * The Watch-Dog Timer is provided to ensure that standalone |
| 28 | * Systems can always recover from catastrophic conditions that | 28 | * Systems can always recover from catastrophic conditions that |
| 29 | * caused the CPU to crash. This condition may have occured by | 29 | * caused the CPU to crash. This condition may have occurred by |
| 30 | * external EMI or a software bug. When the CPU stops working | 30 | * external EMI or a software bug. When the CPU stops working |
| 31 | * correctly, hardware on the board will either perform a hardware | 31 | * correctly, hardware on the board will either perform a hardware |
| 32 | * reset (cold boot) or a non-maskable interrupt (NMI) to bring the | 32 | * reset (cold boot) or a non-maskable interrupt (NMI) to bring the |
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c index 6709d723e017..528bceb220fd 100644 --- a/drivers/watchdog/mpc8xxx_wdt.c +++ b/drivers/watchdog/mpc8xxx_wdt.c | |||
| @@ -195,7 +195,7 @@ static int __devinit mpc8xxx_wdt_probe(struct platform_device *ofdev) | |||
| 195 | 195 | ||
| 196 | if (!ofdev->dev.of_match) | 196 | if (!ofdev->dev.of_match) |
| 197 | return -EINVAL; | 197 | return -EINVAL; |
| 198 | wdt_type = match->data; | 198 | wdt_type = ofdev->dev.of_match->data; |
| 199 | 199 | ||
| 200 | if (!freq || freq == -1) | 200 | if (!freq || freq == -1) |
| 201 | return -EINVAL; | 201 | return -EINVAL; |
diff --git a/drivers/watchdog/pc87413_wdt.c b/drivers/watchdog/pc87413_wdt.c index 139d773300c6..b7c139051575 100644 --- a/drivers/watchdog/pc87413_wdt.c +++ b/drivers/watchdog/pc87413_wdt.c | |||
| @@ -49,7 +49,7 @@ | |||
| 49 | #define WDT_DATA_IO_PORT (WDT_INDEX_IO_PORT+1) | 49 | #define WDT_DATA_IO_PORT (WDT_INDEX_IO_PORT+1) |
| 50 | #define SWC_LDN 0x04 | 50 | #define SWC_LDN 0x04 |
| 51 | #define SIOCFG2 0x22 /* Serial IO register */ | 51 | #define SIOCFG2 0x22 /* Serial IO register */ |
| 52 | #define WDCTL 0x10 /* Watchdog-Timer-Controll-Register */ | 52 | #define WDCTL 0x10 /* Watchdog-Timer-Control-Register */ |
| 53 | #define WDTO 0x11 /* Watchdog timeout register */ | 53 | #define WDTO 0x11 /* Watchdog timeout register */ |
| 54 | #define WDCFG 0x12 /* Watchdog config register */ | 54 | #define WDCFG 0x12 /* Watchdog config register */ |
| 55 | 55 | ||
diff --git a/drivers/watchdog/sbc7240_wdt.c b/drivers/watchdog/sbc7240_wdt.c index 67ddeb1c830a..ff11504c376e 100644 --- a/drivers/watchdog/sbc7240_wdt.c +++ b/drivers/watchdog/sbc7240_wdt.c | |||
| @@ -273,7 +273,7 @@ static int __init sbc7240_wdt_init(void) | |||
| 273 | 273 | ||
| 274 | /* The IO port 0x043 used to disable the watchdog | 274 | /* The IO port 0x043 used to disable the watchdog |
| 275 | * is already claimed by the system timer, so we | 275 | * is already claimed by the system timer, so we |
| 276 | * cant request_region() it ...*/ | 276 | * can't request_region() it ...*/ |
| 277 | 277 | ||
| 278 | if (timeout < 1 || timeout > SBC7240_MAX_TIMEOUT) { | 278 | if (timeout < 1 || timeout > SBC7240_MAX_TIMEOUT) { |
| 279 | timeout = SBC7240_TIMEOUT; | 279 | timeout = SBC7240_TIMEOUT; |
diff --git a/drivers/watchdog/sch311x_wdt.c b/drivers/watchdog/sch311x_wdt.c index b61ab1c54293..c7cf4b01f58d 100644 --- a/drivers/watchdog/sch311x_wdt.c +++ b/drivers/watchdog/sch311x_wdt.c | |||
| @@ -201,7 +201,7 @@ static void sch311x_wdt_get_status(int *status) | |||
| 201 | spin_lock(&sch311x_wdt_data.io_lock); | 201 | spin_lock(&sch311x_wdt_data.io_lock); |
| 202 | 202 | ||
| 203 | /* -- Watchdog timer control -- | 203 | /* -- Watchdog timer control -- |
| 204 | * Bit 0 Status Bit: 0 = Timer counting, 1 = Timeout occured | 204 | * Bit 0 Status Bit: 0 = Timer counting, 1 = Timeout occurred |
| 205 | * Bit 1 Reserved | 205 | * Bit 1 Reserved |
| 206 | * Bit 2 Force Timeout: 1 = Forces WD timeout event (self-cleaning) | 206 | * Bit 2 Force Timeout: 1 = Forces WD timeout event (self-cleaning) |
| 207 | * Bit 3 P20 Force Timeout enabled: | 207 | * Bit 3 P20 Force Timeout enabled: |
diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c index 4e3e7eb5919c..db84f2322d1a 100644 --- a/drivers/watchdog/shwdt.c +++ b/drivers/watchdog/shwdt.c | |||
| @@ -50,7 +50,7 @@ | |||
| 50 | * necssary. | 50 | * necssary. |
| 51 | * | 51 | * |
| 52 | * As a result of this timing problem, the only modes that are particularly | 52 | * As a result of this timing problem, the only modes that are particularly |
| 53 | * feasible are the 4096 and the 2048 divisors, which yeild 5.25 and 2.62ms | 53 | * feasible are the 4096 and the 2048 divisors, which yield 5.25 and 2.62ms |
| 54 | * overflow periods respectively. | 54 | * overflow periods respectively. |
| 55 | * | 55 | * |
| 56 | * Also, since we can't really expect userspace to be responsive enough | 56 | * Also, since we can't really expect userspace to be responsive enough |
diff --git a/drivers/watchdog/smsc37b787_wdt.c b/drivers/watchdog/smsc37b787_wdt.c index df88cfa05f35..e97b0499bd0d 100644 --- a/drivers/watchdog/smsc37b787_wdt.c +++ b/drivers/watchdog/smsc37b787_wdt.c | |||
| @@ -191,7 +191,7 @@ static inline void wdt_timer_conf(unsigned char conf) | |||
| 191 | static inline void wdt_timer_ctrl(unsigned char reg) | 191 | static inline void wdt_timer_ctrl(unsigned char reg) |
| 192 | { | 192 | { |
| 193 | /* -- Watchdog timer control -- | 193 | /* -- Watchdog timer control -- |
| 194 | * Bit 0 Status Bit: 0 = Timer counting, 1 = Timeout occured | 194 | * Bit 0 Status Bit: 0 = Timer counting, 1 = Timeout occurred |
| 195 | * Bit 1 Power LED Toggle: 0 = Disable Toggle, 1 = Toggle at 1 Hz | 195 | * Bit 1 Power LED Toggle: 0 = Disable Toggle, 1 = Toggle at 1 Hz |
| 196 | * Bit 2 Force Timeout: 1 = Forces WD timeout event (self-cleaning) | 196 | * Bit 2 Force Timeout: 1 = Forces WD timeout event (self-cleaning) |
| 197 | * Bit 3 P20 Force Timeout enabled: | 197 | * Bit 3 P20 Force Timeout enabled: |
diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c index 0a0efe713bc8..0d80e08b6439 100644 --- a/drivers/watchdog/sp805_wdt.c +++ b/drivers/watchdog/sp805_wdt.c | |||
| @@ -90,7 +90,7 @@ static void wdt_setload(unsigned int timeout) | |||
| 90 | /* | 90 | /* |
| 91 | * sp805 runs counter with given value twice, after the end of first | 91 | * sp805 runs counter with given value twice, after the end of first |
| 92 | * counter it gives an interrupt and then starts counter again. If | 92 | * counter it gives an interrupt and then starts counter again. If |
| 93 | * interrupt already occured then it resets the system. This is why | 93 | * interrupt already occurred then it resets the system. This is why |
| 94 | * load is half of what should be required. | 94 | * load is half of what should be required. |
| 95 | */ | 95 | */ |
| 96 | load = div_u64(rate, 2) * timeout - 1; | 96 | load = div_u64(rate, 2) * timeout - 1; |
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 036343ba204e..33167b43ac7e 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * domain gets 1024 event channels, but NR_IRQ is not that large, we | 5 | * domain gets 1024 event channels, but NR_IRQ is not that large, we |
| 6 | * must dynamically map irqs<->event channels. The event channels | 6 | * must dynamically map irqs<->event channels. The event channels |
| 7 | * interface with the rest of the kernel by defining a xen interrupt | 7 | * interface with the rest of the kernel by defining a xen interrupt |
| 8 | * chip. When an event is recieved, it is mapped to an irq and sent | 8 | * chip. When an event is received, it is mapped to an irq and sent |
| 9 | * through the normal interrupt processing path. | 9 | * through the normal interrupt processing path. |
| 10 | * | 10 | * |
| 11 | * There are four kinds of events which can be mapped to an event | 11 | * There are four kinds of events which can be mapped to an event |
| @@ -416,7 +416,7 @@ static int __must_check xen_allocate_irq_dynamic(void) | |||
| 416 | #ifdef CONFIG_X86_IO_APIC | 416 | #ifdef CONFIG_X86_IO_APIC |
| 417 | /* | 417 | /* |
| 418 | * For an HVM guest or domain 0 which see "real" (emulated or | 418 | * For an HVM guest or domain 0 which see "real" (emulated or |
| 419 | * actual repectively) GSIs we allocate dynamic IRQs | 419 | * actual respectively) GSIs we allocate dynamic IRQs |
| 420 | * e.g. those corresponding to event channels or MSIs | 420 | * e.g. those corresponding to event channels or MSIs |
| 421 | * etc. from the range above those "real" GSIs to avoid | 421 | * etc. from the range above those "real" GSIs to avoid |
| 422 | * collisions. | 422 | * collisions. |
| @@ -912,8 +912,7 @@ int bind_evtchn_to_irqhandler(unsigned int evtchn, | |||
| 912 | unsigned long irqflags, | 912 | unsigned long irqflags, |
| 913 | const char *devname, void *dev_id) | 913 | const char *devname, void *dev_id) |
| 914 | { | 914 | { |
| 915 | unsigned int irq; | 915 | int irq, retval; |
| 916 | int retval; | ||
| 917 | 916 | ||
| 918 | irq = bind_evtchn_to_irq(evtchn); | 917 | irq = bind_evtchn_to_irq(evtchn); |
| 919 | if (irq < 0) | 918 | if (irq < 0) |
| @@ -955,8 +954,7 @@ int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu, | |||
| 955 | irq_handler_t handler, | 954 | irq_handler_t handler, |
| 956 | unsigned long irqflags, const char *devname, void *dev_id) | 955 | unsigned long irqflags, const char *devname, void *dev_id) |
| 957 | { | 956 | { |
| 958 | unsigned int irq; | 957 | int irq, retval; |
| 959 | int retval; | ||
| 960 | 958 | ||
| 961 | irq = bind_virq_to_irq(virq, cpu); | 959 | irq = bind_virq_to_irq(virq, cpu); |
| 962 | if (irq < 0) | 960 | if (irq < 0) |
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c index 95143dd6904d..1ac94125bf93 100644 --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c | |||
| @@ -61,7 +61,7 @@ static void xen_post_suspend(int cancelled) | |||
| 61 | xen_mm_unpin_all(); | 61 | xen_mm_unpin_all(); |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | #ifdef CONFIG_HIBERNATION | 64 | #ifdef CONFIG_HIBERNATE_CALLBACKS |
| 65 | static int xen_suspend(void *data) | 65 | static int xen_suspend(void *data) |
| 66 | { | 66 | { |
| 67 | struct suspend_info *si = data; | 67 | struct suspend_info *si = data; |
| @@ -173,7 +173,7 @@ out: | |||
| 173 | #endif | 173 | #endif |
| 174 | shutting_down = SHUTDOWN_INVALID; | 174 | shutting_down = SHUTDOWN_INVALID; |
| 175 | } | 175 | } |
| 176 | #endif /* CONFIG_HIBERNATION */ | 176 | #endif /* CONFIG_HIBERNATE_CALLBACKS */ |
| 177 | 177 | ||
| 178 | struct shutdown_handler { | 178 | struct shutdown_handler { |
| 179 | const char *command; | 179 | const char *command; |
| @@ -202,7 +202,7 @@ static void shutdown_handler(struct xenbus_watch *watch, | |||
| 202 | { "poweroff", do_poweroff }, | 202 | { "poweroff", do_poweroff }, |
| 203 | { "halt", do_poweroff }, | 203 | { "halt", do_poweroff }, |
| 204 | { "reboot", do_reboot }, | 204 | { "reboot", do_reboot }, |
| 205 | #ifdef CONFIG_HIBERNATION | 205 | #ifdef CONFIG_HIBERNATE_CALLBACKS |
| 206 | { "suspend", do_suspend }, | 206 | { "suspend", do_suspend }, |
| 207 | #endif | 207 | #endif |
| 208 | {NULL, NULL}, | 208 | {NULL, NULL}, |
diff --git a/fs/9p/fid.c b/fs/9p/fid.c index 0ee594569dcc..85b67ffa2a43 100644 --- a/fs/9p/fid.c +++ b/fs/9p/fid.c | |||
| @@ -286,11 +286,9 @@ static struct p9_fid *v9fs_fid_clone_with_uid(struct dentry *dentry, uid_t uid) | |||
| 286 | 286 | ||
| 287 | struct p9_fid *v9fs_writeback_fid(struct dentry *dentry) | 287 | struct p9_fid *v9fs_writeback_fid(struct dentry *dentry) |
| 288 | { | 288 | { |
| 289 | int err, flags; | 289 | int err; |
| 290 | struct p9_fid *fid; | 290 | struct p9_fid *fid; |
| 291 | struct v9fs_session_info *v9ses; | ||
| 292 | 291 | ||
| 293 | v9ses = v9fs_dentry2v9ses(dentry); | ||
| 294 | fid = v9fs_fid_clone_with_uid(dentry, 0); | 292 | fid = v9fs_fid_clone_with_uid(dentry, 0); |
| 295 | if (IS_ERR(fid)) | 293 | if (IS_ERR(fid)) |
| 296 | goto error_out; | 294 | goto error_out; |
| @@ -299,17 +297,8 @@ struct p9_fid *v9fs_writeback_fid(struct dentry *dentry) | |||
| 299 | * dirty pages. We always request for the open fid in read-write | 297 | * dirty pages. We always request for the open fid in read-write |
| 300 | * mode so that a partial page write which result in page | 298 | * mode so that a partial page write which result in page |
| 301 | * read can work. | 299 | * read can work. |
| 302 | * | ||
| 303 | * we don't have a tsyncfs operation for older version | ||
| 304 | * of protocol. So make sure the write back fid is | ||
| 305 | * opened in O_SYNC mode. | ||
| 306 | */ | 300 | */ |
| 307 | if (!v9fs_proto_dotl(v9ses)) | 301 | err = p9_client_open(fid, O_RDWR); |
| 308 | flags = O_RDWR | O_SYNC; | ||
| 309 | else | ||
| 310 | flags = O_RDWR; | ||
| 311 | |||
| 312 | err = p9_client_open(fid, flags); | ||
| 313 | if (err < 0) { | 302 | if (err < 0) { |
| 314 | p9_client_clunk(fid); | 303 | p9_client_clunk(fid); |
| 315 | fid = ERR_PTR(err); | 304 | fid = ERR_PTR(err); |
diff --git a/fs/9p/v9fs.h b/fs/9p/v9fs.h index 9665c2b840e6..e5ebedfc5ed8 100644 --- a/fs/9p/v9fs.h +++ b/fs/9p/v9fs.h | |||
| @@ -116,7 +116,6 @@ struct v9fs_session_info { | |||
| 116 | struct list_head slist; /* list of sessions registered with v9fs */ | 116 | struct list_head slist; /* list of sessions registered with v9fs */ |
| 117 | struct backing_dev_info bdi; | 117 | struct backing_dev_info bdi; |
| 118 | struct rw_semaphore rename_sem; | 118 | struct rw_semaphore rename_sem; |
| 119 | struct p9_fid *root_fid; /* Used for file system sync */ | ||
| 120 | }; | 119 | }; |
| 121 | 120 | ||
| 122 | /* cache_validity flags */ | 121 | /* cache_validity flags */ |
diff --git a/fs/9p/vfs_dentry.c b/fs/9p/vfs_dentry.c index b6a3b9f7fe4d..e022890c6f40 100644 --- a/fs/9p/vfs_dentry.c +++ b/fs/9p/vfs_dentry.c | |||
| @@ -126,7 +126,9 @@ static int v9fs_lookup_revalidate(struct dentry *dentry, struct nameidata *nd) | |||
| 126 | retval = v9fs_refresh_inode_dotl(fid, inode); | 126 | retval = v9fs_refresh_inode_dotl(fid, inode); |
| 127 | else | 127 | else |
| 128 | retval = v9fs_refresh_inode(fid, inode); | 128 | retval = v9fs_refresh_inode(fid, inode); |
| 129 | if (retval <= 0) | 129 | if (retval == -ENOENT) |
| 130 | return 0; | ||
| 131 | if (retval < 0) | ||
| 130 | return retval; | 132 | return retval; |
| 131 | } | 133 | } |
| 132 | out_valid: | 134 | out_valid: |
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c index ffbb113d5f33..82a7c38ddad0 100644 --- a/fs/9p/vfs_inode_dotl.c +++ b/fs/9p/vfs_inode_dotl.c | |||
| @@ -811,7 +811,7 @@ v9fs_vfs_follow_link_dotl(struct dentry *dentry, struct nameidata *nd) | |||
| 811 | fid = v9fs_fid_lookup(dentry); | 811 | fid = v9fs_fid_lookup(dentry); |
| 812 | if (IS_ERR(fid)) { | 812 | if (IS_ERR(fid)) { |
| 813 | __putname(link); | 813 | __putname(link); |
| 814 | link = ERR_PTR(PTR_ERR(fid)); | 814 | link = ERR_CAST(fid); |
| 815 | goto ndset; | 815 | goto ndset; |
| 816 | } | 816 | } |
| 817 | retval = p9_client_readlink(fid, &target); | 817 | retval = p9_client_readlink(fid, &target); |
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c index f3eed3383e4f..feef6cdc1fd2 100644 --- a/fs/9p/vfs_super.c +++ b/fs/9p/vfs_super.c | |||
| @@ -154,6 +154,7 @@ static struct dentry *v9fs_mount(struct file_system_type *fs_type, int flags, | |||
| 154 | retval = PTR_ERR(inode); | 154 | retval = PTR_ERR(inode); |
| 155 | goto release_sb; | 155 | goto release_sb; |
| 156 | } | 156 | } |
| 157 | |||
| 157 | root = d_alloc_root(inode); | 158 | root = d_alloc_root(inode); |
| 158 | if (!root) { | 159 | if (!root) { |
| 159 | iput(inode); | 160 | iput(inode); |
| @@ -185,21 +186,10 @@ static struct dentry *v9fs_mount(struct file_system_type *fs_type, int flags, | |||
| 185 | p9stat_free(st); | 186 | p9stat_free(st); |
| 186 | kfree(st); | 187 | kfree(st); |
| 187 | } | 188 | } |
| 188 | v9fs_fid_add(root, fid); | ||
| 189 | retval = v9fs_get_acl(inode, fid); | 189 | retval = v9fs_get_acl(inode, fid); |
| 190 | if (retval) | 190 | if (retval) |
| 191 | goto release_sb; | 191 | goto release_sb; |
| 192 | /* | 192 | v9fs_fid_add(root, fid); |
| 193 | * Add the root fid to session info. This is used | ||
| 194 | * for file system sync. We want a cloned fid here | ||
| 195 | * so that we can do a sync_filesystem after a | ||
| 196 | * shrink_dcache_for_umount | ||
| 197 | */ | ||
| 198 | v9ses->root_fid = v9fs_fid_clone(root); | ||
| 199 | if (IS_ERR(v9ses->root_fid)) { | ||
| 200 | retval = PTR_ERR(v9ses->root_fid); | ||
| 201 | goto release_sb; | ||
| 202 | } | ||
| 203 | 193 | ||
| 204 | P9_DPRINTK(P9_DEBUG_VFS, " simple set mount, return 0\n"); | 194 | P9_DPRINTK(P9_DEBUG_VFS, " simple set mount, return 0\n"); |
| 205 | return dget(sb->s_root); | 195 | return dget(sb->s_root); |
| @@ -210,11 +200,15 @@ close_session: | |||
| 210 | v9fs_session_close(v9ses); | 200 | v9fs_session_close(v9ses); |
| 211 | kfree(v9ses); | 201 | kfree(v9ses); |
| 212 | return ERR_PTR(retval); | 202 | return ERR_PTR(retval); |
| 203 | |||
| 213 | release_sb: | 204 | release_sb: |
| 214 | /* | 205 | /* |
| 215 | * we will do the session_close and root dentry | 206 | * we will do the session_close and root dentry release |
| 216 | * release in the below call. | 207 | * in the below call. But we need to clunk fid, because we haven't |
| 208 | * attached the fid to dentry so it won't get clunked | ||
| 209 | * automatically. | ||
| 217 | */ | 210 | */ |
| 211 | p9_client_clunk(fid); | ||
| 218 | deactivate_locked_super(sb); | 212 | deactivate_locked_super(sb); |
| 219 | return ERR_PTR(retval); | 213 | return ERR_PTR(retval); |
| 220 | } | 214 | } |
| @@ -232,7 +226,7 @@ static void v9fs_kill_super(struct super_block *s) | |||
| 232 | P9_DPRINTK(P9_DEBUG_VFS, " %p\n", s); | 226 | P9_DPRINTK(P9_DEBUG_VFS, " %p\n", s); |
| 233 | 227 | ||
| 234 | kill_anon_super(s); | 228 | kill_anon_super(s); |
| 235 | p9_client_clunk(v9ses->root_fid); | 229 | |
| 236 | v9fs_session_cancel(v9ses); | 230 | v9fs_session_cancel(v9ses); |
| 237 | v9fs_session_close(v9ses); | 231 | v9fs_session_close(v9ses); |
| 238 | kfree(v9ses); | 232 | kfree(v9ses); |
| @@ -285,14 +279,6 @@ done: | |||
| 285 | return res; | 279 | return res; |
| 286 | } | 280 | } |
| 287 | 281 | ||
| 288 | static int v9fs_sync_fs(struct super_block *sb, int wait) | ||
| 289 | { | ||
| 290 | struct v9fs_session_info *v9ses = sb->s_fs_info; | ||
| 291 | |||
| 292 | P9_DPRINTK(P9_DEBUG_VFS, "v9fs_sync_fs: super_block %p\n", sb); | ||
| 293 | return p9_client_sync_fs(v9ses->root_fid); | ||
| 294 | } | ||
| 295 | |||
| 296 | static int v9fs_drop_inode(struct inode *inode) | 282 | static int v9fs_drop_inode(struct inode *inode) |
| 297 | { | 283 | { |
| 298 | struct v9fs_session_info *v9ses; | 284 | struct v9fs_session_info *v9ses; |
| @@ -307,6 +293,51 @@ static int v9fs_drop_inode(struct inode *inode) | |||
| 307 | return 1; | 293 | return 1; |
| 308 | } | 294 | } |
| 309 | 295 | ||
| 296 | static int v9fs_write_inode(struct inode *inode, | ||
| 297 | struct writeback_control *wbc) | ||
| 298 | { | ||
| 299 | int ret; | ||
| 300 | struct p9_wstat wstat; | ||
| 301 | struct v9fs_inode *v9inode; | ||
| 302 | /* | ||
| 303 | * send an fsync request to server irrespective of | ||
| 304 | * wbc->sync_mode. | ||
| 305 | */ | ||
| 306 | P9_DPRINTK(P9_DEBUG_VFS, "%s: inode %p\n", __func__, inode); | ||
| 307 | v9inode = V9FS_I(inode); | ||
| 308 | if (!v9inode->writeback_fid) | ||
| 309 | return 0; | ||
| 310 | v9fs_blank_wstat(&wstat); | ||
| 311 | |||
| 312 | ret = p9_client_wstat(v9inode->writeback_fid, &wstat); | ||
| 313 | if (ret < 0) { | ||
| 314 | __mark_inode_dirty(inode, I_DIRTY_DATASYNC); | ||
| 315 | return ret; | ||
| 316 | } | ||
| 317 | return 0; | ||
| 318 | } | ||
| 319 | |||
| 320 | static int v9fs_write_inode_dotl(struct inode *inode, | ||
| 321 | struct writeback_control *wbc) | ||
| 322 | { | ||
| 323 | int ret; | ||
| 324 | struct v9fs_inode *v9inode; | ||
| 325 | /* | ||
| 326 | * send an fsync request to server irrespective of | ||
| 327 | * wbc->sync_mode. | ||
| 328 | */ | ||
| 329 | P9_DPRINTK(P9_DEBUG_VFS, "%s: inode %p\n", __func__, inode); | ||
| 330 | v9inode = V9FS_I(inode); | ||
| 331 | if (!v9inode->writeback_fid) | ||
| 332 | return 0; | ||
| 333 | ret = p9_client_fsync(v9inode->writeback_fid, 0); | ||
| 334 | if (ret < 0) { | ||
| 335 | __mark_inode_dirty(inode, I_DIRTY_DATASYNC); | ||
| 336 | return ret; | ||
| 337 | } | ||
| 338 | return 0; | ||
| 339 | } | ||
| 340 | |||
| 310 | static const struct super_operations v9fs_super_ops = { | 341 | static const struct super_operations v9fs_super_ops = { |
| 311 | .alloc_inode = v9fs_alloc_inode, | 342 | .alloc_inode = v9fs_alloc_inode, |
| 312 | .destroy_inode = v9fs_destroy_inode, | 343 | .destroy_inode = v9fs_destroy_inode, |
| @@ -314,17 +345,18 @@ static const struct super_operations v9fs_super_ops = { | |||
| 314 | .evict_inode = v9fs_evict_inode, | 345 | .evict_inode = v9fs_evict_inode, |
| 315 | .show_options = generic_show_options, | 346 | .show_options = generic_show_options, |
| 316 | .umount_begin = v9fs_umount_begin, | 347 | .umount_begin = v9fs_umount_begin, |
| 348 | .write_inode = v9fs_write_inode, | ||
| 317 | }; | 349 | }; |
| 318 | 350 | ||
| 319 | static const struct super_operations v9fs_super_ops_dotl = { | 351 | static const struct super_operations v9fs_super_ops_dotl = { |
| 320 | .alloc_inode = v9fs_alloc_inode, | 352 | .alloc_inode = v9fs_alloc_inode, |
| 321 | .destroy_inode = v9fs_destroy_inode, | 353 | .destroy_inode = v9fs_destroy_inode, |
| 322 | .sync_fs = v9fs_sync_fs, | ||
| 323 | .statfs = v9fs_statfs, | 354 | .statfs = v9fs_statfs, |
| 324 | .drop_inode = v9fs_drop_inode, | 355 | .drop_inode = v9fs_drop_inode, |
| 325 | .evict_inode = v9fs_evict_inode, | 356 | .evict_inode = v9fs_evict_inode, |
| 326 | .show_options = generic_show_options, | 357 | .show_options = generic_show_options, |
| 327 | .umount_begin = v9fs_umount_begin, | 358 | .umount_begin = v9fs_umount_begin, |
| 359 | .write_inode = v9fs_write_inode_dotl, | ||
| 328 | }; | 360 | }; |
| 329 | 361 | ||
| 330 | struct file_system_type v9fs_fs_type = { | 362 | struct file_system_type v9fs_fs_type = { |
diff --git a/fs/adfs/map.c b/fs/adfs/map.c index d1a5932bb0f1..6935f05202ac 100644 --- a/fs/adfs/map.c +++ b/fs/adfs/map.c | |||
| @@ -51,7 +51,7 @@ static DEFINE_RWLOCK(adfs_map_lock); | |||
| 51 | 51 | ||
| 52 | /* | 52 | /* |
| 53 | * This is fun. We need to load up to 19 bits from the map at an | 53 | * This is fun. We need to load up to 19 bits from the map at an |
| 54 | * arbitary bit alignment. (We're limited to 19 bits by F+ version 2). | 54 | * arbitrary bit alignment. (We're limited to 19 bits by F+ version 2). |
| 55 | */ | 55 | */ |
| 56 | #define GET_FRAG_ID(_map,_start,_idmask) \ | 56 | #define GET_FRAG_ID(_map,_start,_idmask) \ |
| 57 | ({ \ | 57 | ({ \ |
diff --git a/fs/afs/cache.c b/fs/afs/cache.c index 0fb315dd4d2a..577763c3d88b 100644 --- a/fs/afs/cache.c +++ b/fs/afs/cache.c | |||
| @@ -98,7 +98,7 @@ static uint16_t afs_cell_cache_get_key(const void *cookie_netfs_data, | |||
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | /* | 100 | /* |
| 101 | * provide new auxilliary cache data | 101 | * provide new auxiliary cache data |
| 102 | */ | 102 | */ |
| 103 | static uint16_t afs_cell_cache_get_aux(const void *cookie_netfs_data, | 103 | static uint16_t afs_cell_cache_get_aux(const void *cookie_netfs_data, |
| 104 | void *buffer, uint16_t bufmax) | 104 | void *buffer, uint16_t bufmax) |
| @@ -117,7 +117,7 @@ static uint16_t afs_cell_cache_get_aux(const void *cookie_netfs_data, | |||
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | /* | 119 | /* |
| 120 | * check that the auxilliary data indicates that the entry is still valid | 120 | * check that the auxiliary data indicates that the entry is still valid |
| 121 | */ | 121 | */ |
| 122 | static enum fscache_checkaux afs_cell_cache_check_aux(void *cookie_netfs_data, | 122 | static enum fscache_checkaux afs_cell_cache_check_aux(void *cookie_netfs_data, |
| 123 | const void *buffer, | 123 | const void *buffer, |
| @@ -150,7 +150,7 @@ static uint16_t afs_vlocation_cache_get_key(const void *cookie_netfs_data, | |||
| 150 | } | 150 | } |
| 151 | 151 | ||
| 152 | /* | 152 | /* |
| 153 | * provide new auxilliary cache data | 153 | * provide new auxiliary cache data |
| 154 | */ | 154 | */ |
| 155 | static uint16_t afs_vlocation_cache_get_aux(const void *cookie_netfs_data, | 155 | static uint16_t afs_vlocation_cache_get_aux(const void *cookie_netfs_data, |
| 156 | void *buffer, uint16_t bufmax) | 156 | void *buffer, uint16_t bufmax) |
| @@ -172,7 +172,7 @@ static uint16_t afs_vlocation_cache_get_aux(const void *cookie_netfs_data, | |||
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | /* | 174 | /* |
| 175 | * check that the auxilliary data indicates that the entry is still valid | 175 | * check that the auxiliary data indicates that the entry is still valid |
| 176 | */ | 176 | */ |
| 177 | static | 177 | static |
| 178 | enum fscache_checkaux afs_vlocation_cache_check_aux(void *cookie_netfs_data, | 178 | enum fscache_checkaux afs_vlocation_cache_check_aux(void *cookie_netfs_data, |
| @@ -283,7 +283,7 @@ static void afs_vnode_cache_get_attr(const void *cookie_netfs_data, | |||
| 283 | } | 283 | } |
| 284 | 284 | ||
| 285 | /* | 285 | /* |
| 286 | * provide new auxilliary cache data | 286 | * provide new auxiliary cache data |
| 287 | */ | 287 | */ |
| 288 | static uint16_t afs_vnode_cache_get_aux(const void *cookie_netfs_data, | 288 | static uint16_t afs_vnode_cache_get_aux(const void *cookie_netfs_data, |
| 289 | void *buffer, uint16_t bufmax) | 289 | void *buffer, uint16_t bufmax) |
| @@ -309,7 +309,7 @@ static uint16_t afs_vnode_cache_get_aux(const void *cookie_netfs_data, | |||
| 309 | } | 309 | } |
| 310 | 310 | ||
| 311 | /* | 311 | /* |
| 312 | * check that the auxilliary data indicates that the entry is still valid | 312 | * check that the auxiliary data indicates that the entry is still valid |
| 313 | */ | 313 | */ |
| 314 | static enum fscache_checkaux afs_vnode_cache_check_aux(void *cookie_netfs_data, | 314 | static enum fscache_checkaux afs_vnode_cache_check_aux(void *cookie_netfs_data, |
| 315 | const void *buffer, | 315 | const void *buffer, |
diff --git a/fs/afs/cell.c b/fs/afs/cell.c index 0d5eeadf6121..3c090b7555ea 100644 --- a/fs/afs/cell.c +++ b/fs/afs/cell.c | |||
| @@ -293,7 +293,7 @@ struct afs_cell *afs_cell_lookup(const char *name, unsigned namesz, | |||
| 293 | if (!cell) { | 293 | if (!cell) { |
| 294 | /* this should not happen unless user tries to mount | 294 | /* this should not happen unless user tries to mount |
| 295 | * when root cell is not set. Return an impossibly | 295 | * when root cell is not set. Return an impossibly |
| 296 | * bizzare errno to alert the user. Things like | 296 | * bizarre errno to alert the user. Things like |
| 297 | * ENOENT might be "more appropriate" but they happen | 297 | * ENOENT might be "more appropriate" but they happen |
| 298 | * for other reasons. | 298 | * for other reasons. |
| 299 | */ | 299 | */ |
| @@ -128,7 +128,7 @@ EXPORT_SYMBOL(inode_newsize_ok); | |||
| 128 | * setattr_copy must be called with i_mutex held. | 128 | * setattr_copy must be called with i_mutex held. |
| 129 | * | 129 | * |
| 130 | * setattr_copy updates the inode's metadata with that specified | 130 | * setattr_copy updates the inode's metadata with that specified |
| 131 | * in attr. Noticably missing is inode size update, which is more complex | 131 | * in attr. Noticeably missing is inode size update, which is more complex |
| 132 | * as it requires pagecache updates. | 132 | * as it requires pagecache updates. |
| 133 | * | 133 | * |
| 134 | * The inode is not marked as dirty after this operation. The rationale is | 134 | * The inode is not marked as dirty after this operation. The rationale is |
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index 96804a17bbd0..f55ae23b137e 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c | |||
| @@ -612,7 +612,7 @@ static int autofs4_dir_unlink(struct inode *dir, struct dentry *dentry) | |||
| 612 | * set the DMANAGED_AUTOMOUNT and DMANAGED_TRANSIT flags on the leaves | 612 | * set the DMANAGED_AUTOMOUNT and DMANAGED_TRANSIT flags on the leaves |
| 613 | * of the directory tree. There is no need to clear the automount flag | 613 | * of the directory tree. There is no need to clear the automount flag |
| 614 | * following a mount or restore it after an expire because these mounts | 614 | * following a mount or restore it after an expire because these mounts |
| 615 | * are always covered. However, it is neccessary to ensure that these | 615 | * are always covered. However, it is necessary to ensure that these |
| 616 | * flags are clear on non-empty directories to avoid unnecessary calls | 616 | * flags are clear on non-empty directories to avoid unnecessary calls |
| 617 | * during path walks. | 617 | * during path walks. |
| 618 | */ | 618 | */ |
diff --git a/fs/befs/ChangeLog b/fs/befs/ChangeLog index ce8c787916be..75a461cfaca6 100644 --- a/fs/befs/ChangeLog +++ b/fs/befs/ChangeLog | |||
| @@ -24,7 +24,7 @@ Version 0.9 (2002-03-14) | |||
| 24 | 24 | ||
| 25 | Version 0.64 (2002-02-07) | 25 | Version 0.64 (2002-02-07) |
| 26 | ========== | 26 | ========== |
| 27 | * Did the string comparision really right this time (btree.c) [WD] | 27 | * Did the string comparison really right this time (btree.c) [WD] |
| 28 | 28 | ||
| 29 | * Fixed up some places where I assumed that a long int could hold | 29 | * Fixed up some places where I assumed that a long int could hold |
| 30 | a pointer value. (btree.c) [WD] | 30 | a pointer value. (btree.c) [WD] |
| @@ -114,7 +114,7 @@ Version 0.6 (2001-12-15) | |||
| 114 | More flexible. Will soon be controllable at mount time | 114 | More flexible. Will soon be controllable at mount time |
| 115 | (see TODO). [WD] | 115 | (see TODO). [WD] |
| 116 | 116 | ||
| 117 | * Rewrote datastream positon lookups. | 117 | * Rewrote datastream position lookups. |
| 118 | (datastream.c) [WD] | 118 | (datastream.c) [WD] |
| 119 | 119 | ||
| 120 | * Moved the TODO list to its own file. | 120 | * Moved the TODO list to its own file. |
| @@ -150,7 +150,7 @@ Version 0.50 (2001-11-13) | |||
| 150 | * Anton also told me that the blocksize is not allowed to be larger than | 150 | * Anton also told me that the blocksize is not allowed to be larger than |
| 151 | the page size in linux, which is 4k i386. Oops. Added a test for | 151 | the page size in linux, which is 4k i386. Oops. Added a test for |
| 152 | (blocksize > PAGE_SIZE), and refuse to mount in that case. What this | 152 | (blocksize > PAGE_SIZE), and refuse to mount in that case. What this |
| 153 | practicaly means is that 8k blocksize volumes won't work without a major | 153 | practically means is that 8k blocksize volumes won't work without a major |
| 154 | restructuring of the driver (or an alpha or other 64bit hardware). [WD] | 154 | restructuring of the driver (or an alpha or other 64bit hardware). [WD] |
| 155 | 155 | ||
| 156 | * Cleaned up the befs_count_blocks() function. Much smarter now. | 156 | * Cleaned up the befs_count_blocks() function. Much smarter now. |
| @@ -183,7 +183,7 @@ Version 0.45 (2001-10-29) | |||
| 183 | structures into the generic pointer fields of the public structures | 183 | structures into the generic pointer fields of the public structures |
| 184 | with kmalloc(). put_super and put_inode free them. This allows us not | 184 | with kmalloc(). put_super and put_inode free them. This allows us not |
| 185 | to have to touch the definitions of the public structures in | 185 | to have to touch the definitions of the public structures in |
| 186 | include/linux/fs.h. Also, befs_inode_info is huge (becuase of the | 186 | include/linux/fs.h. Also, befs_inode_info is huge (because of the |
| 187 | symlink string). (super.c, inode.c, befs_fs.h) [WD] | 187 | symlink string). (super.c, inode.c, befs_fs.h) [WD] |
| 188 | 188 | ||
| 189 | * Fixed a thinko that was corrupting file reads after the first block_run | 189 | * Fixed a thinko that was corrupting file reads after the first block_run |
| @@ -404,7 +404,7 @@ Version 0.4 (2001-10-28) | |||
| 404 | 404 | ||
| 405 | * Fixed compile errors on 2.4.1 kernel (WD) | 405 | * Fixed compile errors on 2.4.1 kernel (WD) |
| 406 | Resolve rejected patches | 406 | Resolve rejected patches |
| 407 | Accomodate changed NLS interface (util.h) | 407 | Accommodate changed NLS interface (util.h) |
| 408 | Needed to include <linux/slab.h> in most files | 408 | Needed to include <linux/slab.h> in most files |
| 409 | Makefile changes | 409 | Makefile changes |
| 410 | fs/Config.in changes | 410 | fs/Config.in changes |
diff --git a/fs/befs/befs_fs_types.h b/fs/befs/befs_fs_types.h index 7893eaa1e58c..eb557d9dc8be 100644 --- a/fs/befs/befs_fs_types.h +++ b/fs/befs/befs_fs_types.h | |||
| @@ -234,7 +234,7 @@ typedef struct { | |||
| 234 | } PACKED befs_btree_super; | 234 | } PACKED befs_btree_super; |
| 235 | 235 | ||
| 236 | /* | 236 | /* |
| 237 | * Header stucture of each btree node | 237 | * Header structure of each btree node |
| 238 | */ | 238 | */ |
| 239 | typedef struct { | 239 | typedef struct { |
| 240 | fs64 left; | 240 | fs64 left; |
diff --git a/fs/befs/btree.c b/fs/befs/btree.c index 4202db7496cb..a66c9b1136e0 100644 --- a/fs/befs/btree.c +++ b/fs/befs/btree.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * | 5 | * |
| 6 | * Licensed under the GNU GPL. See the file COPYING for details. | 6 | * Licensed under the GNU GPL. See the file COPYING for details. |
| 7 | * | 7 | * |
| 8 | * 2002-02-05: Sergey S. Kostyliov added binary search withing | 8 | * 2002-02-05: Sergey S. Kostyliov added binary search within |
| 9 | * btree nodes. | 9 | * btree nodes. |
| 10 | * | 10 | * |
| 11 | * Many thanks to: | 11 | * Many thanks to: |
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 06457ed8f3e7..54b8c28bebc8 100644 --- a/fs/befs/linuxvfs.c +++ b/fs/befs/linuxvfs.c | |||
| @@ -734,7 +734,7 @@ parse_options(char *options, befs_mount_options * opts) | |||
| 734 | 734 | ||
| 735 | /* This function has the responsibiltiy of getting the | 735 | /* This function has the responsibiltiy of getting the |
| 736 | * filesystem ready for unmounting. | 736 | * filesystem ready for unmounting. |
| 737 | * Basicly, we free everything that we allocated in | 737 | * Basically, we free everything that we allocated in |
| 738 | * befs_read_inode | 738 | * befs_read_inode |
| 739 | */ | 739 | */ |
| 740 | static void | 740 | static void |
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index f34078d702d3..303983fabfd6 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
| @@ -941,9 +941,13 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) | |||
| 941 | current->mm->start_stack = bprm->p; | 941 | current->mm->start_stack = bprm->p; |
| 942 | 942 | ||
| 943 | #ifdef arch_randomize_brk | 943 | #ifdef arch_randomize_brk |
| 944 | if ((current->flags & PF_RANDOMIZE) && (randomize_va_space > 1)) | 944 | if ((current->flags & PF_RANDOMIZE) && (randomize_va_space > 1)) { |
| 945 | current->mm->brk = current->mm->start_brk = | 945 | current->mm->brk = current->mm->start_brk = |
| 946 | arch_randomize_brk(current->mm); | 946 | arch_randomize_brk(current->mm); |
| 947 | #ifdef CONFIG_COMPAT_BRK | ||
| 948 | current->brk_randomized = 1; | ||
| 949 | #endif | ||
| 950 | } | ||
| 947 | #endif | 951 | #endif |
| 948 | 952 | ||
| 949 | if (current->personality & MMAP_PAGE_ZERO) { | 953 | if (current->personality & MMAP_PAGE_ZERO) { |
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index 811384bec8de..397d3057d336 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c | |||
| @@ -717,7 +717,7 @@ static int load_flat_file(struct linux_binprm * bprm, | |||
| 717 | * help simplify all this mumbo jumbo | 717 | * help simplify all this mumbo jumbo |
| 718 | * | 718 | * |
| 719 | * We've got two different sections of relocation entries. | 719 | * We've got two different sections of relocation entries. |
| 720 | * The first is the GOT which resides at the begining of the data segment | 720 | * The first is the GOT which resides at the beginning of the data segment |
| 721 | * and is terminated with a -1. This one can be relocated in place. | 721 | * and is terminated with a -1. This one can be relocated in place. |
| 722 | * The second is the extra relocation entries tacked after the image's | 722 | * The second is the extra relocation entries tacked after the image's |
| 723 | * data segment. These require a little more processing as the entry is | 723 | * data segment. These require a little more processing as the entry is |
| @@ -1436,7 +1436,7 @@ EXPORT_SYMBOL(bio_flush_dcache_pages); | |||
| 1436 | * preferred way to end I/O on a bio, it takes care of clearing | 1436 | * preferred way to end I/O on a bio, it takes care of clearing |
| 1437 | * BIO_UPTODATE on error. @error is 0 on success, and and one of the | 1437 | * BIO_UPTODATE on error. @error is 0 on success, and and one of the |
| 1438 | * established -Exxxx (-EIO, for instance) error values in case | 1438 | * established -Exxxx (-EIO, for instance) error values in case |
| 1439 | * something went wrong. Noone should call bi_end_io() directly on a | 1439 | * something went wrong. No one should call bi_end_io() directly on a |
| 1440 | * bio unless they own it and thus know that it has an end_io | 1440 | * bio unless they own it and thus know that it has an end_io |
| 1441 | * function. | 1441 | * function. |
| 1442 | **/ | 1442 | **/ |
diff --git a/fs/block_dev.c b/fs/block_dev.c index c1511c674f53..5147bdd3b8e1 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
| @@ -653,7 +653,7 @@ void bd_forget(struct inode *inode) | |||
| 653 | * @whole: whole block device containing @bdev, may equal @bdev | 653 | * @whole: whole block device containing @bdev, may equal @bdev |
| 654 | * @holder: holder trying to claim @bdev | 654 | * @holder: holder trying to claim @bdev |
| 655 | * | 655 | * |
| 656 | * Test whther @bdev can be claimed by @holder. | 656 | * Test whether @bdev can be claimed by @holder. |
| 657 | * | 657 | * |
| 658 | * CONTEXT: | 658 | * CONTEXT: |
| 659 | * spin_lock(&bdev_lock). | 659 | * spin_lock(&bdev_lock). |
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index de34bfad9ec3..5d505aaa72fb 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c | |||
| @@ -178,16 +178,17 @@ static int btrfs_xattr_acl_set(struct dentry *dentry, const char *name, | |||
| 178 | 178 | ||
| 179 | if (value) { | 179 | if (value) { |
| 180 | acl = posix_acl_from_xattr(value, size); | 180 | acl = posix_acl_from_xattr(value, size); |
| 181 | if (acl == NULL) { | 181 | if (acl) { |
| 182 | value = NULL; | 182 | ret = posix_acl_valid(acl); |
| 183 | size = 0; | 183 | if (ret) |
| 184 | goto out; | ||
| 184 | } else if (IS_ERR(acl)) { | 185 | } else if (IS_ERR(acl)) { |
| 185 | return PTR_ERR(acl); | 186 | return PTR_ERR(acl); |
| 186 | } | 187 | } |
| 187 | } | 188 | } |
| 188 | 189 | ||
| 189 | ret = btrfs_set_acl(NULL, dentry->d_inode, acl, type); | 190 | ret = btrfs_set_acl(NULL, dentry->d_inode, acl, type); |
| 190 | 191 | out: | |
| 191 | posix_acl_release(acl); | 192 | posix_acl_release(acl); |
| 192 | 193 | ||
| 193 | return ret; | 194 | return ret; |
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index d47ce8307854..2e61fe1b6b8c 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
| @@ -740,8 +740,10 @@ struct btrfs_space_info { | |||
| 740 | */ | 740 | */ |
| 741 | unsigned long reservation_progress; | 741 | unsigned long reservation_progress; |
| 742 | 742 | ||
| 743 | int full; /* indicates that we cannot allocate any more | 743 | int full:1; /* indicates that we cannot allocate any more |
| 744 | chunks for this space */ | 744 | chunks for this space */ |
| 745 | int chunk_alloc:1; /* set if we are allocating a chunk */ | ||
| 746 | |||
| 745 | int force_alloc; /* set if we need to force a chunk alloc for | 747 | int force_alloc; /* set if we need to force a chunk alloc for |
| 746 | this space */ | 748 | this space */ |
| 747 | 749 | ||
| @@ -1284,6 +1286,8 @@ struct btrfs_root { | |||
| 1284 | #define BTRFS_INODE_DIRSYNC (1 << 10) | 1286 | #define BTRFS_INODE_DIRSYNC (1 << 10) |
| 1285 | #define BTRFS_INODE_COMPRESS (1 << 11) | 1287 | #define BTRFS_INODE_COMPRESS (1 << 11) |
| 1286 | 1288 | ||
| 1289 | #define BTRFS_INODE_ROOT_ITEM_INIT (1 << 31) | ||
| 1290 | |||
| 1287 | /* some macros to generate set/get funcs for the struct fields. This | 1291 | /* some macros to generate set/get funcs for the struct fields. This |
| 1288 | * assumes there is a lefoo_to_cpu for every type, so lets make a simple | 1292 | * assumes there is a lefoo_to_cpu for every type, so lets make a simple |
| 1289 | * one for u8: | 1293 | * one for u8: |
| @@ -2359,6 +2363,8 @@ int btrfs_find_dead_roots(struct btrfs_root *root, u64 objectid); | |||
| 2359 | int btrfs_find_orphan_roots(struct btrfs_root *tree_root); | 2363 | int btrfs_find_orphan_roots(struct btrfs_root *tree_root); |
| 2360 | int btrfs_set_root_node(struct btrfs_root_item *item, | 2364 | int btrfs_set_root_node(struct btrfs_root_item *item, |
| 2361 | struct extent_buffer *node); | 2365 | struct extent_buffer *node); |
| 2366 | void btrfs_check_and_init_root_item(struct btrfs_root_item *item); | ||
| 2367 | |||
| 2362 | /* dir-item.c */ | 2368 | /* dir-item.c */ |
| 2363 | int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, | 2369 | int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, |
| 2364 | struct btrfs_root *root, const char *name, | 2370 | struct btrfs_root *root, const char *name, |
| @@ -2572,6 +2578,11 @@ int btrfs_drop_extents(struct btrfs_trans_handle *trans, struct inode *inode, | |||
| 2572 | int btrfs_mark_extent_written(struct btrfs_trans_handle *trans, | 2578 | int btrfs_mark_extent_written(struct btrfs_trans_handle *trans, |
| 2573 | struct inode *inode, u64 start, u64 end); | 2579 | struct inode *inode, u64 start, u64 end); |
| 2574 | int btrfs_release_file(struct inode *inode, struct file *file); | 2580 | int btrfs_release_file(struct inode *inode, struct file *file); |
| 2581 | void btrfs_drop_pages(struct page **pages, size_t num_pages); | ||
| 2582 | int btrfs_dirty_pages(struct btrfs_root *root, struct inode *inode, | ||
| 2583 | struct page **pages, size_t num_pages, | ||
| 2584 | loff_t pos, size_t write_bytes, | ||
| 2585 | struct extent_state **cached); | ||
| 2575 | 2586 | ||
| 2576 | /* tree-defrag.c */ | 2587 | /* tree-defrag.c */ |
| 2577 | int btrfs_defrag_leaves(struct btrfs_trans_handle *trans, | 2588 | int btrfs_defrag_leaves(struct btrfs_trans_handle *trans, |
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index d7a7315bd031..68c84c8c24bd 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
| @@ -1275,8 +1275,10 @@ struct btrfs_root *btrfs_read_fs_root_no_radix(struct btrfs_root *tree_root, | |||
| 1275 | root->commit_root = btrfs_root_node(root); | 1275 | root->commit_root = btrfs_root_node(root); |
| 1276 | BUG_ON(!root->node); | 1276 | BUG_ON(!root->node); |
| 1277 | out: | 1277 | out: |
| 1278 | if (location->objectid != BTRFS_TREE_LOG_OBJECTID) | 1278 | if (location->objectid != BTRFS_TREE_LOG_OBJECTID) { |
| 1279 | root->ref_cows = 1; | 1279 | root->ref_cows = 1; |
| 1280 | btrfs_check_and_init_root_item(&root->root_item); | ||
| 1281 | } | ||
| 1280 | 1282 | ||
| 1281 | return root; | 1283 | return root; |
| 1282 | } | 1284 | } |
| @@ -3055,7 +3057,7 @@ static int btrfs_cleanup_transaction(struct btrfs_root *root) | |||
| 3055 | btrfs_destroy_pinned_extent(root, | 3057 | btrfs_destroy_pinned_extent(root, |
| 3056 | root->fs_info->pinned_extents); | 3058 | root->fs_info->pinned_extents); |
| 3057 | 3059 | ||
| 3058 | t->use_count = 0; | 3060 | atomic_set(&t->use_count, 0); |
| 3059 | list_del_init(&t->list); | 3061 | list_del_init(&t->list); |
| 3060 | memset(t, 0, sizeof(*t)); | 3062 | memset(t, 0, sizeof(*t)); |
| 3061 | kmem_cache_free(btrfs_transaction_cachep, t); | 3063 | kmem_cache_free(btrfs_transaction_cachep, t); |
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index f619c3cb13b7..31f33ba56fe8 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
| @@ -33,6 +33,25 @@ | |||
| 33 | #include "locking.h" | 33 | #include "locking.h" |
| 34 | #include "free-space-cache.h" | 34 | #include "free-space-cache.h" |
| 35 | 35 | ||
| 36 | /* control flags for do_chunk_alloc's force field | ||
| 37 | * CHUNK_ALLOC_NO_FORCE means to only allocate a chunk | ||
| 38 | * if we really need one. | ||
| 39 | * | ||
| 40 | * CHUNK_ALLOC_FORCE means it must try to allocate one | ||
| 41 | * | ||
| 42 | * CHUNK_ALLOC_LIMITED means to only try and allocate one | ||
| 43 | * if we have very few chunks already allocated. This is | ||
| 44 | * used as part of the clustering code to help make sure | ||
| 45 | * we have a good pool of storage to cluster in, without | ||
| 46 | * filling the FS with empty chunks | ||
| 47 | * | ||
| 48 | */ | ||
| 49 | enum { | ||
| 50 | CHUNK_ALLOC_NO_FORCE = 0, | ||
| 51 | CHUNK_ALLOC_FORCE = 1, | ||
| 52 | CHUNK_ALLOC_LIMITED = 2, | ||
| 53 | }; | ||
| 54 | |||
| 36 | static int update_block_group(struct btrfs_trans_handle *trans, | 55 | static int update_block_group(struct btrfs_trans_handle *trans, |
| 37 | struct btrfs_root *root, | 56 | struct btrfs_root *root, |
| 38 | u64 bytenr, u64 num_bytes, int alloc); | 57 | u64 bytenr, u64 num_bytes, int alloc); |
| @@ -3019,7 +3038,8 @@ static int update_space_info(struct btrfs_fs_info *info, u64 flags, | |||
| 3019 | found->bytes_readonly = 0; | 3038 | found->bytes_readonly = 0; |
| 3020 | found->bytes_may_use = 0; | 3039 | found->bytes_may_use = 0; |
| 3021 | found->full = 0; | 3040 | found->full = 0; |
| 3022 | found->force_alloc = 0; | 3041 | found->force_alloc = CHUNK_ALLOC_NO_FORCE; |
| 3042 | found->chunk_alloc = 0; | ||
| 3023 | *space_info = found; | 3043 | *space_info = found; |
| 3024 | list_add_rcu(&found->list, &info->space_info); | 3044 | list_add_rcu(&found->list, &info->space_info); |
| 3025 | atomic_set(&found->caching_threads, 0); | 3045 | atomic_set(&found->caching_threads, 0); |
| @@ -3150,7 +3170,7 @@ again: | |||
| 3150 | if (!data_sinfo->full && alloc_chunk) { | 3170 | if (!data_sinfo->full && alloc_chunk) { |
| 3151 | u64 alloc_target; | 3171 | u64 alloc_target; |
| 3152 | 3172 | ||
| 3153 | data_sinfo->force_alloc = 1; | 3173 | data_sinfo->force_alloc = CHUNK_ALLOC_FORCE; |
| 3154 | spin_unlock(&data_sinfo->lock); | 3174 | spin_unlock(&data_sinfo->lock); |
| 3155 | alloc: | 3175 | alloc: |
| 3156 | alloc_target = btrfs_get_alloc_profile(root, 1); | 3176 | alloc_target = btrfs_get_alloc_profile(root, 1); |
| @@ -3160,7 +3180,8 @@ alloc: | |||
| 3160 | 3180 | ||
| 3161 | ret = do_chunk_alloc(trans, root->fs_info->extent_root, | 3181 | ret = do_chunk_alloc(trans, root->fs_info->extent_root, |
| 3162 | bytes + 2 * 1024 * 1024, | 3182 | bytes + 2 * 1024 * 1024, |
| 3163 | alloc_target, 0); | 3183 | alloc_target, |
| 3184 | CHUNK_ALLOC_NO_FORCE); | ||
| 3164 | btrfs_end_transaction(trans, root); | 3185 | btrfs_end_transaction(trans, root); |
| 3165 | if (ret < 0) { | 3186 | if (ret < 0) { |
| 3166 | if (ret != -ENOSPC) | 3187 | if (ret != -ENOSPC) |
| @@ -3239,31 +3260,56 @@ static void force_metadata_allocation(struct btrfs_fs_info *info) | |||
| 3239 | rcu_read_lock(); | 3260 | rcu_read_lock(); |
| 3240 | list_for_each_entry_rcu(found, head, list) { | 3261 | list_for_each_entry_rcu(found, head, list) { |
| 3241 | if (found->flags & BTRFS_BLOCK_GROUP_METADATA) | 3262 | if (found->flags & BTRFS_BLOCK_GROUP_METADATA) |
| 3242 | found->force_alloc = 1; | 3263 | found->force_alloc = CHUNK_ALLOC_FORCE; |
| 3243 | } | 3264 | } |
| 3244 | rcu_read_unlock(); | 3265 | rcu_read_unlock(); |
| 3245 | } | 3266 | } |
| 3246 | 3267 | ||
| 3247 | static int should_alloc_chunk(struct btrfs_root *root, | 3268 | static int should_alloc_chunk(struct btrfs_root *root, |
| 3248 | struct btrfs_space_info *sinfo, u64 alloc_bytes) | 3269 | struct btrfs_space_info *sinfo, u64 alloc_bytes, |
| 3270 | int force) | ||
| 3249 | { | 3271 | { |
| 3250 | u64 num_bytes = sinfo->total_bytes - sinfo->bytes_readonly; | 3272 | u64 num_bytes = sinfo->total_bytes - sinfo->bytes_readonly; |
| 3273 | u64 num_allocated = sinfo->bytes_used + sinfo->bytes_reserved; | ||
| 3251 | u64 thresh; | 3274 | u64 thresh; |
| 3252 | 3275 | ||
| 3253 | if (sinfo->bytes_used + sinfo->bytes_reserved + | 3276 | if (force == CHUNK_ALLOC_FORCE) |
| 3254 | alloc_bytes + 256 * 1024 * 1024 < num_bytes) | 3277 | return 1; |
| 3278 | |||
| 3279 | /* | ||
| 3280 | * in limited mode, we want to have some free space up to | ||
| 3281 | * about 1% of the FS size. | ||
| 3282 | */ | ||
| 3283 | if (force == CHUNK_ALLOC_LIMITED) { | ||
| 3284 | thresh = btrfs_super_total_bytes(&root->fs_info->super_copy); | ||
| 3285 | thresh = max_t(u64, 64 * 1024 * 1024, | ||
| 3286 | div_factor_fine(thresh, 1)); | ||
| 3287 | |||
| 3288 | if (num_bytes - num_allocated < thresh) | ||
| 3289 | return 1; | ||
| 3290 | } | ||
| 3291 | |||
| 3292 | /* | ||
| 3293 | * we have two similar checks here, one based on percentage | ||
| 3294 | * and once based on a hard number of 256MB. The idea | ||
| 3295 | * is that if we have a good amount of free | ||
| 3296 | * room, don't allocate a chunk. A good mount is | ||
| 3297 | * less than 80% utilized of the chunks we have allocated, | ||
| 3298 | * or more than 256MB free | ||
| 3299 | */ | ||
| 3300 | if (num_allocated + alloc_bytes + 256 * 1024 * 1024 < num_bytes) | ||
| 3255 | return 0; | 3301 | return 0; |
| 3256 | 3302 | ||
| 3257 | if (sinfo->bytes_used + sinfo->bytes_reserved + | 3303 | if (num_allocated + alloc_bytes < div_factor(num_bytes, 8)) |
| 3258 | alloc_bytes < div_factor(num_bytes, 8)) | ||
| 3259 | return 0; | 3304 | return 0; |
| 3260 | 3305 | ||
| 3261 | thresh = btrfs_super_total_bytes(&root->fs_info->super_copy); | 3306 | thresh = btrfs_super_total_bytes(&root->fs_info->super_copy); |
| 3307 | |||
| 3308 | /* 256MB or 5% of the FS */ | ||
| 3262 | thresh = max_t(u64, 256 * 1024 * 1024, div_factor_fine(thresh, 5)); | 3309 | thresh = max_t(u64, 256 * 1024 * 1024, div_factor_fine(thresh, 5)); |
| 3263 | 3310 | ||
| 3264 | if (num_bytes > thresh && sinfo->bytes_used < div_factor(num_bytes, 3)) | 3311 | if (num_bytes > thresh && sinfo->bytes_used < div_factor(num_bytes, 3)) |
| 3265 | return 0; | 3312 | return 0; |
| 3266 | |||
| 3267 | return 1; | 3313 | return 1; |
| 3268 | } | 3314 | } |
| 3269 | 3315 | ||
| @@ -3273,10 +3319,9 @@ static int do_chunk_alloc(struct btrfs_trans_handle *trans, | |||
| 3273 | { | 3319 | { |
| 3274 | struct btrfs_space_info *space_info; | 3320 | struct btrfs_space_info *space_info; |
| 3275 | struct btrfs_fs_info *fs_info = extent_root->fs_info; | 3321 | struct btrfs_fs_info *fs_info = extent_root->fs_info; |
| 3322 | int wait_for_alloc = 0; | ||
| 3276 | int ret = 0; | 3323 | int ret = 0; |
| 3277 | 3324 | ||
| 3278 | mutex_lock(&fs_info->chunk_mutex); | ||
| 3279 | |||
| 3280 | flags = btrfs_reduce_alloc_profile(extent_root, flags); | 3325 | flags = btrfs_reduce_alloc_profile(extent_root, flags); |
| 3281 | 3326 | ||
| 3282 | space_info = __find_space_info(extent_root->fs_info, flags); | 3327 | space_info = __find_space_info(extent_root->fs_info, flags); |
| @@ -3287,21 +3332,40 @@ static int do_chunk_alloc(struct btrfs_trans_handle *trans, | |||
| 3287 | } | 3332 | } |
| 3288 | BUG_ON(!space_info); | 3333 | BUG_ON(!space_info); |
| 3289 | 3334 | ||
| 3335 | again: | ||
| 3290 | spin_lock(&space_info->lock); | 3336 | spin_lock(&space_info->lock); |
| 3291 | if (space_info->force_alloc) | 3337 | if (space_info->force_alloc) |
| 3292 | force = 1; | 3338 | force = space_info->force_alloc; |
| 3293 | if (space_info->full) { | 3339 | if (space_info->full) { |
| 3294 | spin_unlock(&space_info->lock); | 3340 | spin_unlock(&space_info->lock); |
| 3295 | goto out; | 3341 | return 0; |
| 3296 | } | 3342 | } |
| 3297 | 3343 | ||
| 3298 | if (!force && !should_alloc_chunk(extent_root, space_info, | 3344 | if (!should_alloc_chunk(extent_root, space_info, alloc_bytes, force)) { |
| 3299 | alloc_bytes)) { | ||
| 3300 | spin_unlock(&space_info->lock); | 3345 | spin_unlock(&space_info->lock); |
| 3301 | goto out; | 3346 | return 0; |
| 3347 | } else if (space_info->chunk_alloc) { | ||
| 3348 | wait_for_alloc = 1; | ||
| 3349 | } else { | ||
| 3350 | space_info->chunk_alloc = 1; | ||
| 3302 | } | 3351 | } |
| 3352 | |||
| 3303 | spin_unlock(&space_info->lock); | 3353 | spin_unlock(&space_info->lock); |
| 3304 | 3354 | ||
| 3355 | mutex_lock(&fs_info->chunk_mutex); | ||
| 3356 | |||
| 3357 | /* | ||
| 3358 | * The chunk_mutex is held throughout the entirety of a chunk | ||
| 3359 | * allocation, so once we've acquired the chunk_mutex we know that the | ||
| 3360 | * other guy is done and we need to recheck and see if we should | ||
| 3361 | * allocate. | ||
| 3362 | */ | ||
| 3363 | if (wait_for_alloc) { | ||
| 3364 | mutex_unlock(&fs_info->chunk_mutex); | ||
| 3365 | wait_for_alloc = 0; | ||
| 3366 | goto again; | ||
| 3367 | } | ||
| 3368 | |||
| 3305 | /* | 3369 | /* |
| 3306 | * If we have mixed data/metadata chunks we want to make sure we keep | 3370 | * If we have mixed data/metadata chunks we want to make sure we keep |
| 3307 | * allocating mixed chunks instead of individual chunks. | 3371 | * allocating mixed chunks instead of individual chunks. |
| @@ -3327,9 +3391,10 @@ static int do_chunk_alloc(struct btrfs_trans_handle *trans, | |||
| 3327 | space_info->full = 1; | 3391 | space_info->full = 1; |
| 3328 | else | 3392 | else |
| 3329 | ret = 1; | 3393 | ret = 1; |
| 3330 | space_info->force_alloc = 0; | 3394 | |
| 3395 | space_info->force_alloc = CHUNK_ALLOC_NO_FORCE; | ||
| 3396 | space_info->chunk_alloc = 0; | ||
| 3331 | spin_unlock(&space_info->lock); | 3397 | spin_unlock(&space_info->lock); |
| 3332 | out: | ||
| 3333 | mutex_unlock(&extent_root->fs_info->chunk_mutex); | 3398 | mutex_unlock(&extent_root->fs_info->chunk_mutex); |
| 3334 | return ret; | 3399 | return ret; |
| 3335 | } | 3400 | } |
| @@ -5303,11 +5368,13 @@ loop: | |||
| 5303 | 5368 | ||
| 5304 | if (allowed_chunk_alloc) { | 5369 | if (allowed_chunk_alloc) { |
| 5305 | ret = do_chunk_alloc(trans, root, num_bytes + | 5370 | ret = do_chunk_alloc(trans, root, num_bytes + |
| 5306 | 2 * 1024 * 1024, data, 1); | 5371 | 2 * 1024 * 1024, data, |
| 5372 | CHUNK_ALLOC_LIMITED); | ||
| 5307 | allowed_chunk_alloc = 0; | 5373 | allowed_chunk_alloc = 0; |
| 5308 | done_chunk_alloc = 1; | 5374 | done_chunk_alloc = 1; |
| 5309 | } else if (!done_chunk_alloc) { | 5375 | } else if (!done_chunk_alloc && |
| 5310 | space_info->force_alloc = 1; | 5376 | space_info->force_alloc == CHUNK_ALLOC_NO_FORCE) { |
| 5377 | space_info->force_alloc = CHUNK_ALLOC_LIMITED; | ||
| 5311 | } | 5378 | } |
| 5312 | 5379 | ||
| 5313 | if (loop < LOOP_NO_EMPTY_SIZE) { | 5380 | if (loop < LOOP_NO_EMPTY_SIZE) { |
| @@ -5393,7 +5460,8 @@ again: | |||
| 5393 | */ | 5460 | */ |
| 5394 | if (empty_size || root->ref_cows) | 5461 | if (empty_size || root->ref_cows) |
| 5395 | ret = do_chunk_alloc(trans, root->fs_info->extent_root, | 5462 | ret = do_chunk_alloc(trans, root->fs_info->extent_root, |
| 5396 | num_bytes + 2 * 1024 * 1024, data, 0); | 5463 | num_bytes + 2 * 1024 * 1024, data, |
| 5464 | CHUNK_ALLOC_NO_FORCE); | ||
| 5397 | 5465 | ||
| 5398 | WARN_ON(num_bytes < root->sectorsize); | 5466 | WARN_ON(num_bytes < root->sectorsize); |
| 5399 | ret = find_free_extent(trans, root, num_bytes, empty_size, | 5467 | ret = find_free_extent(trans, root, num_bytes, empty_size, |
| @@ -5405,7 +5473,7 @@ again: | |||
| 5405 | num_bytes = num_bytes & ~(root->sectorsize - 1); | 5473 | num_bytes = num_bytes & ~(root->sectorsize - 1); |
| 5406 | num_bytes = max(num_bytes, min_alloc_size); | 5474 | num_bytes = max(num_bytes, min_alloc_size); |
| 5407 | do_chunk_alloc(trans, root->fs_info->extent_root, | 5475 | do_chunk_alloc(trans, root->fs_info->extent_root, |
| 5408 | num_bytes, data, 1); | 5476 | num_bytes, data, CHUNK_ALLOC_FORCE); |
| 5409 | goto again; | 5477 | goto again; |
| 5410 | } | 5478 | } |
| 5411 | if (ret == -ENOSPC && btrfs_test_opt(root, ENOSPC_DEBUG)) { | 5479 | if (ret == -ENOSPC && btrfs_test_opt(root, ENOSPC_DEBUG)) { |
| @@ -8109,13 +8177,15 @@ int btrfs_set_block_group_ro(struct btrfs_root *root, | |||
| 8109 | 8177 | ||
| 8110 | alloc_flags = update_block_group_flags(root, cache->flags); | 8178 | alloc_flags = update_block_group_flags(root, cache->flags); |
| 8111 | if (alloc_flags != cache->flags) | 8179 | if (alloc_flags != cache->flags) |
| 8112 | do_chunk_alloc(trans, root, 2 * 1024 * 1024, alloc_flags, 1); | 8180 | do_chunk_alloc(trans, root, 2 * 1024 * 1024, alloc_flags, |
| 8181 | CHUNK_ALLOC_FORCE); | ||
| 8113 | 8182 | ||
| 8114 | ret = set_block_group_ro(cache); | 8183 | ret = set_block_group_ro(cache); |
| 8115 | if (!ret) | 8184 | if (!ret) |
| 8116 | goto out; | 8185 | goto out; |
| 8117 | alloc_flags = get_alloc_profile(root, cache->space_info->flags); | 8186 | alloc_flags = get_alloc_profile(root, cache->space_info->flags); |
| 8118 | ret = do_chunk_alloc(trans, root, 2 * 1024 * 1024, alloc_flags, 1); | 8187 | ret = do_chunk_alloc(trans, root, 2 * 1024 * 1024, alloc_flags, |
| 8188 | CHUNK_ALLOC_FORCE); | ||
| 8119 | if (ret < 0) | 8189 | if (ret < 0) |
| 8120 | goto out; | 8190 | goto out; |
| 8121 | ret = set_block_group_ro(cache); | 8191 | ret = set_block_group_ro(cache); |
| @@ -8128,7 +8198,8 @@ int btrfs_force_chunk_alloc(struct btrfs_trans_handle *trans, | |||
| 8128 | struct btrfs_root *root, u64 type) | 8198 | struct btrfs_root *root, u64 type) |
| 8129 | { | 8199 | { |
| 8130 | u64 alloc_flags = get_alloc_profile(root, type); | 8200 | u64 alloc_flags = get_alloc_profile(root, type); |
| 8131 | return do_chunk_alloc(trans, root, 2 * 1024 * 1024, alloc_flags, 1); | 8201 | return do_chunk_alloc(trans, root, 2 * 1024 * 1024, alloc_flags, |
| 8202 | CHUNK_ALLOC_FORCE); | ||
| 8132 | } | 8203 | } |
| 8133 | 8204 | ||
| 8134 | /* | 8205 | /* |
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 20ddb28602a8..315138605088 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
| @@ -690,6 +690,15 @@ static void cache_state(struct extent_state *state, | |||
| 690 | } | 690 | } |
| 691 | } | 691 | } |
| 692 | 692 | ||
| 693 | static void uncache_state(struct extent_state **cached_ptr) | ||
| 694 | { | ||
| 695 | if (cached_ptr && (*cached_ptr)) { | ||
| 696 | struct extent_state *state = *cached_ptr; | ||
| 697 | *cached_ptr = NULL; | ||
| 698 | free_extent_state(state); | ||
| 699 | } | ||
| 700 | } | ||
| 701 | |||
| 693 | /* | 702 | /* |
| 694 | * set some bits on a range in the tree. This may require allocations or | 703 | * set some bits on a range in the tree. This may require allocations or |
| 695 | * sleeping, so the gfp mask is used to indicate what is allowed. | 704 | * sleeping, so the gfp mask is used to indicate what is allowed. |
| @@ -940,10 +949,10 @@ static int clear_extent_new(struct extent_io_tree *tree, u64 start, u64 end, | |||
| 940 | } | 949 | } |
| 941 | 950 | ||
| 942 | int set_extent_uptodate(struct extent_io_tree *tree, u64 start, u64 end, | 951 | int set_extent_uptodate(struct extent_io_tree *tree, u64 start, u64 end, |
| 943 | gfp_t mask) | 952 | struct extent_state **cached_state, gfp_t mask) |
| 944 | { | 953 | { |
| 945 | return set_extent_bit(tree, start, end, EXTENT_UPTODATE, 0, NULL, | 954 | return set_extent_bit(tree, start, end, EXTENT_UPTODATE, 0, |
| 946 | NULL, mask); | 955 | NULL, cached_state, mask); |
| 947 | } | 956 | } |
| 948 | 957 | ||
| 949 | static int clear_extent_uptodate(struct extent_io_tree *tree, u64 start, | 958 | static int clear_extent_uptodate(struct extent_io_tree *tree, u64 start, |
| @@ -1012,8 +1021,7 @@ int unlock_extent_cached(struct extent_io_tree *tree, u64 start, u64 end, | |||
| 1012 | mask); | 1021 | mask); |
| 1013 | } | 1022 | } |
| 1014 | 1023 | ||
| 1015 | int unlock_extent(struct extent_io_tree *tree, u64 start, u64 end, | 1024 | int unlock_extent(struct extent_io_tree *tree, u64 start, u64 end, gfp_t mask) |
| 1016 | gfp_t mask) | ||
| 1017 | { | 1025 | { |
| 1018 | return clear_extent_bit(tree, start, end, EXTENT_LOCKED, 1, 0, NULL, | 1026 | return clear_extent_bit(tree, start, end, EXTENT_LOCKED, 1, 0, NULL, |
| 1019 | mask); | 1027 | mask); |
| @@ -1735,6 +1743,9 @@ static void end_bio_extent_readpage(struct bio *bio, int err) | |||
| 1735 | 1743 | ||
| 1736 | do { | 1744 | do { |
| 1737 | struct page *page = bvec->bv_page; | 1745 | struct page *page = bvec->bv_page; |
| 1746 | struct extent_state *cached = NULL; | ||
| 1747 | struct extent_state *state; | ||
| 1748 | |||
| 1738 | tree = &BTRFS_I(page->mapping->host)->io_tree; | 1749 | tree = &BTRFS_I(page->mapping->host)->io_tree; |
| 1739 | 1750 | ||
| 1740 | start = ((u64)page->index << PAGE_CACHE_SHIFT) + | 1751 | start = ((u64)page->index << PAGE_CACHE_SHIFT) + |
| @@ -1749,9 +1760,20 @@ static void end_bio_extent_readpage(struct bio *bio, int err) | |||
| 1749 | if (++bvec <= bvec_end) | 1760 | if (++bvec <= bvec_end) |
| 1750 | prefetchw(&bvec->bv_page->flags); | 1761 | prefetchw(&bvec->bv_page->flags); |
| 1751 | 1762 | ||
| 1763 | spin_lock(&tree->lock); | ||
| 1764 | state = find_first_extent_bit_state(tree, start, EXTENT_LOCKED); | ||
| 1765 | if (state && state->start == start) { | ||
| 1766 | /* | ||
| 1767 | * take a reference on the state, unlock will drop | ||
| 1768 | * the ref | ||
| 1769 | */ | ||
| 1770 | cache_state(state, &cached); | ||
| 1771 | } | ||
| 1772 | spin_unlock(&tree->lock); | ||
| 1773 | |||
| 1752 | if (uptodate && tree->ops && tree->ops->readpage_end_io_hook) { | 1774 | if (uptodate && tree->ops && tree->ops->readpage_end_io_hook) { |
| 1753 | ret = tree->ops->readpage_end_io_hook(page, start, end, | 1775 | ret = tree->ops->readpage_end_io_hook(page, start, end, |
| 1754 | NULL); | 1776 | state); |
| 1755 | if (ret) | 1777 | if (ret) |
| 1756 | uptodate = 0; | 1778 | uptodate = 0; |
| 1757 | } | 1779 | } |
| @@ -1764,15 +1786,16 @@ static void end_bio_extent_readpage(struct bio *bio, int err) | |||
| 1764 | test_bit(BIO_UPTODATE, &bio->bi_flags); | 1786 | test_bit(BIO_UPTODATE, &bio->bi_flags); |
| 1765 | if (err) | 1787 | if (err) |
| 1766 | uptodate = 0; | 1788 | uptodate = 0; |
| 1789 | uncache_state(&cached); | ||
| 1767 | continue; | 1790 | continue; |
| 1768 | } | 1791 | } |
| 1769 | } | 1792 | } |
| 1770 | 1793 | ||
| 1771 | if (uptodate) { | 1794 | if (uptodate) { |
| 1772 | set_extent_uptodate(tree, start, end, | 1795 | set_extent_uptodate(tree, start, end, &cached, |
| 1773 | GFP_ATOMIC); | 1796 | GFP_ATOMIC); |
| 1774 | } | 1797 | } |
| 1775 | unlock_extent(tree, start, end, GFP_ATOMIC); | 1798 | unlock_extent_cached(tree, start, end, &cached, GFP_ATOMIC); |
| 1776 | 1799 | ||
| 1777 | if (whole_page) { | 1800 | if (whole_page) { |
| 1778 | if (uptodate) { | 1801 | if (uptodate) { |
| @@ -1811,6 +1834,7 @@ static void end_bio_extent_preparewrite(struct bio *bio, int err) | |||
| 1811 | 1834 | ||
| 1812 | do { | 1835 | do { |
| 1813 | struct page *page = bvec->bv_page; | 1836 | struct page *page = bvec->bv_page; |
| 1837 | struct extent_state *cached = NULL; | ||
| 1814 | tree = &BTRFS_I(page->mapping->host)->io_tree; | 1838 | tree = &BTRFS_I(page->mapping->host)->io_tree; |
| 1815 | 1839 | ||
| 1816 | start = ((u64)page->index << PAGE_CACHE_SHIFT) + | 1840 | start = ((u64)page->index << PAGE_CACHE_SHIFT) + |
| @@ -1821,13 +1845,14 @@ static void end_bio_extent_preparewrite(struct bio *bio, int err) | |||
| 1821 | prefetchw(&bvec->bv_page->flags); | 1845 | prefetchw(&bvec->bv_page->flags); |
| 1822 | 1846 | ||
| 1823 | if (uptodate) { | 1847 | if (uptodate) { |
| 1824 | set_extent_uptodate(tree, start, end, GFP_ATOMIC); | 1848 | set_extent_uptodate(tree, start, end, &cached, |
| 1849 | GFP_ATOMIC); | ||
| 1825 | } else { | 1850 | } else { |
| 1826 | ClearPageUptodate(page); | 1851 | ClearPageUptodate(page); |
| 1827 | SetPageError(page); | 1852 | SetPageError(page); |
| 1828 | } | 1853 | } |
| 1829 | 1854 | ||
| 1830 | unlock_extent(tree, start, end, GFP_ATOMIC); | 1855 | unlock_extent_cached(tree, start, end, &cached, GFP_ATOMIC); |
| 1831 | 1856 | ||
| 1832 | } while (bvec >= bio->bi_io_vec); | 1857 | } while (bvec >= bio->bi_io_vec); |
| 1833 | 1858 | ||
| @@ -2016,14 +2041,17 @@ static int __extent_read_full_page(struct extent_io_tree *tree, | |||
| 2016 | while (cur <= end) { | 2041 | while (cur <= end) { |
| 2017 | if (cur >= last_byte) { | 2042 | if (cur >= last_byte) { |
| 2018 | char *userpage; | 2043 | char *userpage; |
| 2044 | struct extent_state *cached = NULL; | ||
| 2045 | |||
| 2019 | iosize = PAGE_CACHE_SIZE - page_offset; | 2046 | iosize = PAGE_CACHE_SIZE - page_offset; |
| 2020 | userpage = kmap_atomic(page, KM_USER0); | 2047 | userpage = kmap_atomic(page, KM_USER0); |
| 2021 | memset(userpage + page_offset, 0, iosize); | 2048 | memset(userpage + page_offset, 0, iosize); |
| 2022 | flush_dcache_page(page); | 2049 | flush_dcache_page(page); |
| 2023 | kunmap_atomic(userpage, KM_USER0); | 2050 | kunmap_atomic(userpage, KM_USER0); |
| 2024 | set_extent_uptodate(tree, cur, cur + iosize - 1, | 2051 | set_extent_uptodate(tree, cur, cur + iosize - 1, |
| 2025 | GFP_NOFS); | 2052 | &cached, GFP_NOFS); |
| 2026 | unlock_extent(tree, cur, cur + iosize - 1, GFP_NOFS); | 2053 | unlock_extent_cached(tree, cur, cur + iosize - 1, |
| 2054 | &cached, GFP_NOFS); | ||
| 2027 | break; | 2055 | break; |
| 2028 | } | 2056 | } |
| 2029 | em = get_extent(inode, page, page_offset, cur, | 2057 | em = get_extent(inode, page, page_offset, cur, |
| @@ -2063,14 +2091,17 @@ static int __extent_read_full_page(struct extent_io_tree *tree, | |||
| 2063 | /* we've found a hole, just zero and go on */ | 2091 | /* we've found a hole, just zero and go on */ |
| 2064 | if (block_start == EXTENT_MAP_HOLE) { | 2092 | if (block_start == EXTENT_MAP_HOLE) { |
| 2065 | char *userpage; | 2093 | char *userpage; |
| 2094 | struct extent_state *cached = NULL; | ||
| 2095 | |||
| 2066 | userpage = kmap_atomic(page, KM_USER0); | 2096 | userpage = kmap_atomic(page, KM_USER0); |
| 2067 | memset(userpage + page_offset, 0, iosize); | 2097 | memset(userpage + page_offset, 0, iosize); |
| 2068 | flush_dcache_page(page); | 2098 | flush_dcache_page(page); |
| 2069 | kunmap_atomic(userpage, KM_USER0); | 2099 | kunmap_atomic(userpage, KM_USER0); |
| 2070 | 2100 | ||
| 2071 | set_extent_uptodate(tree, cur, cur + iosize - 1, | 2101 | set_extent_uptodate(tree, cur, cur + iosize - 1, |
| 2072 | GFP_NOFS); | 2102 | &cached, GFP_NOFS); |
| 2073 | unlock_extent(tree, cur, cur + iosize - 1, GFP_NOFS); | 2103 | unlock_extent_cached(tree, cur, cur + iosize - 1, |
| 2104 | &cached, GFP_NOFS); | ||
| 2074 | cur = cur + iosize; | 2105 | cur = cur + iosize; |
| 2075 | page_offset += iosize; | 2106 | page_offset += iosize; |
| 2076 | continue; | 2107 | continue; |
| @@ -2789,9 +2820,12 @@ int extent_prepare_write(struct extent_io_tree *tree, | |||
| 2789 | iocount++; | 2820 | iocount++; |
| 2790 | block_start = block_start + iosize; | 2821 | block_start = block_start + iosize; |
| 2791 | } else { | 2822 | } else { |
| 2792 | set_extent_uptodate(tree, block_start, cur_end, | 2823 | struct extent_state *cached = NULL; |
| 2824 | |||
| 2825 | set_extent_uptodate(tree, block_start, cur_end, &cached, | ||
| 2793 | GFP_NOFS); | 2826 | GFP_NOFS); |
| 2794 | unlock_extent(tree, block_start, cur_end, GFP_NOFS); | 2827 | unlock_extent_cached(tree, block_start, cur_end, |
| 2828 | &cached, GFP_NOFS); | ||
| 2795 | block_start = cur_end + 1; | 2829 | block_start = cur_end + 1; |
| 2796 | } | 2830 | } |
| 2797 | page_offset = block_start & (PAGE_CACHE_SIZE - 1); | 2831 | page_offset = block_start & (PAGE_CACHE_SIZE - 1); |
| @@ -3457,7 +3491,7 @@ int set_extent_buffer_uptodate(struct extent_io_tree *tree, | |||
| 3457 | num_pages = num_extent_pages(eb->start, eb->len); | 3491 | num_pages = num_extent_pages(eb->start, eb->len); |
| 3458 | 3492 | ||
| 3459 | set_extent_uptodate(tree, eb->start, eb->start + eb->len - 1, | 3493 | set_extent_uptodate(tree, eb->start, eb->start + eb->len - 1, |
| 3460 | GFP_NOFS); | 3494 | NULL, GFP_NOFS); |
| 3461 | for (i = 0; i < num_pages; i++) { | 3495 | for (i = 0; i < num_pages; i++) { |
| 3462 | page = extent_buffer_page(eb, i); | 3496 | page = extent_buffer_page(eb, i); |
| 3463 | if ((i == 0 && (eb->start & (PAGE_CACHE_SIZE - 1))) || | 3497 | if ((i == 0 && (eb->start & (PAGE_CACHE_SIZE - 1))) || |
| @@ -3885,6 +3919,12 @@ static void move_pages(struct page *dst_page, struct page *src_page, | |||
| 3885 | kunmap_atomic(dst_kaddr, KM_USER0); | 3919 | kunmap_atomic(dst_kaddr, KM_USER0); |
| 3886 | } | 3920 | } |
| 3887 | 3921 | ||
| 3922 | static inline bool areas_overlap(unsigned long src, unsigned long dst, unsigned long len) | ||
| 3923 | { | ||
| 3924 | unsigned long distance = (src > dst) ? src - dst : dst - src; | ||
| 3925 | return distance < len; | ||
| 3926 | } | ||
| 3927 | |||
| 3888 | static void copy_pages(struct page *dst_page, struct page *src_page, | 3928 | static void copy_pages(struct page *dst_page, struct page *src_page, |
| 3889 | unsigned long dst_off, unsigned long src_off, | 3929 | unsigned long dst_off, unsigned long src_off, |
| 3890 | unsigned long len) | 3930 | unsigned long len) |
| @@ -3892,10 +3932,12 @@ static void copy_pages(struct page *dst_page, struct page *src_page, | |||
| 3892 | char *dst_kaddr = kmap_atomic(dst_page, KM_USER0); | 3932 | char *dst_kaddr = kmap_atomic(dst_page, KM_USER0); |
| 3893 | char *src_kaddr; | 3933 | char *src_kaddr; |
| 3894 | 3934 | ||
| 3895 | if (dst_page != src_page) | 3935 | if (dst_page != src_page) { |
| 3896 | src_kaddr = kmap_atomic(src_page, KM_USER1); | 3936 | src_kaddr = kmap_atomic(src_page, KM_USER1); |
| 3897 | else | 3937 | } else { |
| 3898 | src_kaddr = dst_kaddr; | 3938 | src_kaddr = dst_kaddr; |
| 3939 | BUG_ON(areas_overlap(src_off, dst_off, len)); | ||
| 3940 | } | ||
| 3899 | 3941 | ||
| 3900 | memcpy(dst_kaddr + dst_off, src_kaddr + src_off, len); | 3942 | memcpy(dst_kaddr + dst_off, src_kaddr + src_off, len); |
| 3901 | kunmap_atomic(dst_kaddr, KM_USER0); | 3943 | kunmap_atomic(dst_kaddr, KM_USER0); |
| @@ -3970,7 +4012,7 @@ void memmove_extent_buffer(struct extent_buffer *dst, unsigned long dst_offset, | |||
| 3970 | "len %lu len %lu\n", dst_offset, len, dst->len); | 4012 | "len %lu len %lu\n", dst_offset, len, dst->len); |
| 3971 | BUG_ON(1); | 4013 | BUG_ON(1); |
| 3972 | } | 4014 | } |
| 3973 | if (dst_offset < src_offset) { | 4015 | if (!areas_overlap(src_offset, dst_offset, len)) { |
| 3974 | memcpy_extent_buffer(dst, dst_offset, src_offset, len); | 4016 | memcpy_extent_buffer(dst, dst_offset, src_offset, len); |
| 3975 | return; | 4017 | return; |
| 3976 | } | 4018 | } |
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index f62c5442835d..af2d7179c372 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h | |||
| @@ -208,7 +208,7 @@ int set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, | |||
| 208 | int bits, int exclusive_bits, u64 *failed_start, | 208 | int bits, int exclusive_bits, u64 *failed_start, |
| 209 | struct extent_state **cached_state, gfp_t mask); | 209 | struct extent_state **cached_state, gfp_t mask); |
| 210 | int set_extent_uptodate(struct extent_io_tree *tree, u64 start, u64 end, | 210 | int set_extent_uptodate(struct extent_io_tree *tree, u64 start, u64 end, |
| 211 | gfp_t mask); | 211 | struct extent_state **cached_state, gfp_t mask); |
| 212 | int set_extent_new(struct extent_io_tree *tree, u64 start, u64 end, | 212 | int set_extent_new(struct extent_io_tree *tree, u64 start, u64 end, |
| 213 | gfp_t mask); | 213 | gfp_t mask); |
| 214 | int set_extent_dirty(struct extent_io_tree *tree, u64 start, u64 end, | 214 | int set_extent_dirty(struct extent_io_tree *tree, u64 start, u64 end, |
diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index 2b6c12e983b3..a24a3f2fa13e 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c | |||
| @@ -243,7 +243,7 @@ out: | |||
| 243 | * Insert @em into @tree or perform a simple forward/backward merge with | 243 | * Insert @em into @tree or perform a simple forward/backward merge with |
| 244 | * existing mappings. The extent_map struct passed in will be inserted | 244 | * existing mappings. The extent_map struct passed in will be inserted |
| 245 | * into the tree directly, with an additional reference taken, or a | 245 | * into the tree directly, with an additional reference taken, or a |
| 246 | * reference dropped if the merge attempt was successfull. | 246 | * reference dropped if the merge attempt was successful. |
| 247 | */ | 247 | */ |
| 248 | int add_extent_mapping(struct extent_map_tree *tree, | 248 | int add_extent_mapping(struct extent_map_tree *tree, |
| 249 | struct extent_map *em) | 249 | struct extent_map *em) |
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 656bc0a892b1..75899a01dded 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
| @@ -104,7 +104,7 @@ static noinline int btrfs_copy_from_user(loff_t pos, int num_pages, | |||
| 104 | /* | 104 | /* |
| 105 | * unlocks pages after btrfs_file_write is done with them | 105 | * unlocks pages after btrfs_file_write is done with them |
| 106 | */ | 106 | */ |
| 107 | static noinline void btrfs_drop_pages(struct page **pages, size_t num_pages) | 107 | void btrfs_drop_pages(struct page **pages, size_t num_pages) |
| 108 | { | 108 | { |
| 109 | size_t i; | 109 | size_t i; |
| 110 | for (i = 0; i < num_pages; i++) { | 110 | for (i = 0; i < num_pages; i++) { |
| @@ -127,16 +127,13 @@ static noinline void btrfs_drop_pages(struct page **pages, size_t num_pages) | |||
| 127 | * this also makes the decision about creating an inline extent vs | 127 | * this also makes the decision about creating an inline extent vs |
| 128 | * doing real data extents, marking pages dirty and delalloc as required. | 128 | * doing real data extents, marking pages dirty and delalloc as required. |
| 129 | */ | 129 | */ |
| 130 | static noinline int dirty_and_release_pages(struct btrfs_root *root, | 130 | int btrfs_dirty_pages(struct btrfs_root *root, struct inode *inode, |
| 131 | struct file *file, | 131 | struct page **pages, size_t num_pages, |
| 132 | struct page **pages, | 132 | loff_t pos, size_t write_bytes, |
| 133 | size_t num_pages, | 133 | struct extent_state **cached) |
| 134 | loff_t pos, | ||
| 135 | size_t write_bytes) | ||
| 136 | { | 134 | { |
| 137 | int err = 0; | 135 | int err = 0; |
| 138 | int i; | 136 | int i; |
| 139 | struct inode *inode = fdentry(file)->d_inode; | ||
| 140 | u64 num_bytes; | 137 | u64 num_bytes; |
| 141 | u64 start_pos; | 138 | u64 start_pos; |
| 142 | u64 end_of_last_block; | 139 | u64 end_of_last_block; |
| @@ -149,7 +146,7 @@ static noinline int dirty_and_release_pages(struct btrfs_root *root, | |||
| 149 | 146 | ||
| 150 | end_of_last_block = start_pos + num_bytes - 1; | 147 | end_of_last_block = start_pos + num_bytes - 1; |
| 151 | err = btrfs_set_extent_delalloc(inode, start_pos, end_of_last_block, | 148 | err = btrfs_set_extent_delalloc(inode, start_pos, end_of_last_block, |
| 152 | NULL); | 149 | cached); |
| 153 | if (err) | 150 | if (err) |
| 154 | return err; | 151 | return err; |
| 155 | 152 | ||
| @@ -906,7 +903,7 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file, | |||
| 906 | unsigned long last_index; | 903 | unsigned long last_index; |
| 907 | size_t num_written = 0; | 904 | size_t num_written = 0; |
| 908 | int nrptrs; | 905 | int nrptrs; |
| 909 | int ret; | 906 | int ret = 0; |
| 910 | 907 | ||
| 911 | nrptrs = min((iov_iter_count(i) + PAGE_CACHE_SIZE - 1) / | 908 | nrptrs = min((iov_iter_count(i) + PAGE_CACHE_SIZE - 1) / |
| 912 | PAGE_CACHE_SIZE, PAGE_CACHE_SIZE / | 909 | PAGE_CACHE_SIZE, PAGE_CACHE_SIZE / |
| @@ -992,9 +989,9 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file, | |||
| 992 | } | 989 | } |
| 993 | 990 | ||
| 994 | if (copied > 0) { | 991 | if (copied > 0) { |
| 995 | ret = dirty_and_release_pages(root, file, pages, | 992 | ret = btrfs_dirty_pages(root, inode, pages, |
| 996 | dirty_pages, pos, | 993 | dirty_pages, pos, copied, |
| 997 | copied); | 994 | NULL); |
| 998 | if (ret) { | 995 | if (ret) { |
| 999 | btrfs_delalloc_release_space(inode, | 996 | btrfs_delalloc_release_space(inode, |
| 1000 | dirty_pages << PAGE_CACHE_SHIFT); | 997 | dirty_pages << PAGE_CACHE_SHIFT); |
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 0037427d8a9d..11d2e9cea09e 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include "free-space-cache.h" | 24 | #include "free-space-cache.h" |
| 25 | #include "transaction.h" | 25 | #include "transaction.h" |
| 26 | #include "disk-io.h" | 26 | #include "disk-io.h" |
| 27 | #include "extent_io.h" | ||
| 27 | 28 | ||
| 28 | #define BITS_PER_BITMAP (PAGE_CACHE_SIZE * 8) | 29 | #define BITS_PER_BITMAP (PAGE_CACHE_SIZE * 8) |
| 29 | #define MAX_CACHE_BYTES_PER_GIG (32 * 1024) | 30 | #define MAX_CACHE_BYTES_PER_GIG (32 * 1024) |
| @@ -81,6 +82,8 @@ struct inode *lookup_free_space_inode(struct btrfs_root *root, | |||
| 81 | return ERR_PTR(-ENOENT); | 82 | return ERR_PTR(-ENOENT); |
| 82 | } | 83 | } |
| 83 | 84 | ||
| 85 | inode->i_mapping->flags &= ~__GFP_FS; | ||
| 86 | |||
| 84 | spin_lock(&block_group->lock); | 87 | spin_lock(&block_group->lock); |
| 85 | if (!root->fs_info->closing) { | 88 | if (!root->fs_info->closing) { |
| 86 | block_group->inode = igrab(inode); | 89 | block_group->inode = igrab(inode); |
| @@ -222,6 +225,7 @@ int load_free_space_cache(struct btrfs_fs_info *fs_info, | |||
| 222 | u64 num_entries; | 225 | u64 num_entries; |
| 223 | u64 num_bitmaps; | 226 | u64 num_bitmaps; |
| 224 | u64 generation; | 227 | u64 generation; |
| 228 | u64 used = btrfs_block_group_used(&block_group->item); | ||
| 225 | u32 cur_crc = ~(u32)0; | 229 | u32 cur_crc = ~(u32)0; |
| 226 | pgoff_t index = 0; | 230 | pgoff_t index = 0; |
| 227 | unsigned long first_page_offset; | 231 | unsigned long first_page_offset; |
| @@ -467,6 +471,17 @@ next: | |||
| 467 | index++; | 471 | index++; |
| 468 | } | 472 | } |
| 469 | 473 | ||
| 474 | spin_lock(&block_group->tree_lock); | ||
| 475 | if (block_group->free_space != (block_group->key.offset - used - | ||
| 476 | block_group->bytes_super)) { | ||
| 477 | spin_unlock(&block_group->tree_lock); | ||
| 478 | printk(KERN_ERR "block group %llu has an wrong amount of free " | ||
| 479 | "space\n", block_group->key.objectid); | ||
| 480 | ret = 0; | ||
| 481 | goto free_cache; | ||
| 482 | } | ||
| 483 | spin_unlock(&block_group->tree_lock); | ||
| 484 | |||
| 470 | ret = 1; | 485 | ret = 1; |
| 471 | out: | 486 | out: |
| 472 | kfree(checksums); | 487 | kfree(checksums); |
| @@ -493,18 +508,23 @@ int btrfs_write_out_cache(struct btrfs_root *root, | |||
| 493 | struct inode *inode; | 508 | struct inode *inode; |
| 494 | struct rb_node *node; | 509 | struct rb_node *node; |
| 495 | struct list_head *pos, *n; | 510 | struct list_head *pos, *n; |
| 511 | struct page **pages; | ||
| 496 | struct page *page; | 512 | struct page *page; |
| 497 | struct extent_state *cached_state = NULL; | 513 | struct extent_state *cached_state = NULL; |
| 514 | struct btrfs_free_cluster *cluster = NULL; | ||
| 515 | struct extent_io_tree *unpin = NULL; | ||
| 498 | struct list_head bitmap_list; | 516 | struct list_head bitmap_list; |
| 499 | struct btrfs_key key; | 517 | struct btrfs_key key; |
| 518 | u64 start, end, len; | ||
| 500 | u64 bytes = 0; | 519 | u64 bytes = 0; |
| 501 | u32 *crc, *checksums; | 520 | u32 *crc, *checksums; |
| 502 | pgoff_t index = 0, last_index = 0; | ||
| 503 | unsigned long first_page_offset; | 521 | unsigned long first_page_offset; |
| 504 | int num_checksums; | 522 | int index = 0, num_pages = 0; |
| 505 | int entries = 0; | 523 | int entries = 0; |
| 506 | int bitmaps = 0; | 524 | int bitmaps = 0; |
| 507 | int ret = 0; | 525 | int ret = 0; |
| 526 | bool next_page = false; | ||
| 527 | bool out_of_space = false; | ||
| 508 | 528 | ||
| 509 | root = root->fs_info->tree_root; | 529 | root = root->fs_info->tree_root; |
| 510 | 530 | ||
| @@ -532,24 +552,43 @@ int btrfs_write_out_cache(struct btrfs_root *root, | |||
| 532 | return 0; | 552 | return 0; |
| 533 | } | 553 | } |
| 534 | 554 | ||
| 535 | last_index = (i_size_read(inode) - 1) >> PAGE_CACHE_SHIFT; | 555 | num_pages = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> |
| 556 | PAGE_CACHE_SHIFT; | ||
| 536 | filemap_write_and_wait(inode->i_mapping); | 557 | filemap_write_and_wait(inode->i_mapping); |
| 537 | btrfs_wait_ordered_range(inode, inode->i_size & | 558 | btrfs_wait_ordered_range(inode, inode->i_size & |
| 538 | ~(root->sectorsize - 1), (u64)-1); | 559 | ~(root->sectorsize - 1), (u64)-1); |
| 539 | 560 | ||
| 540 | /* We need a checksum per page. */ | 561 | /* We need a checksum per page. */ |
| 541 | num_checksums = i_size_read(inode) / PAGE_CACHE_SIZE; | 562 | crc = checksums = kzalloc(sizeof(u32) * num_pages, GFP_NOFS); |
| 542 | crc = checksums = kzalloc(sizeof(u32) * num_checksums, GFP_NOFS); | ||
| 543 | if (!crc) { | 563 | if (!crc) { |
| 544 | iput(inode); | 564 | iput(inode); |
| 545 | return 0; | 565 | return 0; |
| 546 | } | 566 | } |
| 547 | 567 | ||
| 568 | pages = kzalloc(sizeof(struct page *) * num_pages, GFP_NOFS); | ||
| 569 | if (!pages) { | ||
| 570 | kfree(crc); | ||
| 571 | iput(inode); | ||
| 572 | return 0; | ||
| 573 | } | ||
| 574 | |||
| 548 | /* Since the first page has all of our checksums and our generation we | 575 | /* Since the first page has all of our checksums and our generation we |
| 549 | * need to calculate the offset into the page that we can start writing | 576 | * need to calculate the offset into the page that we can start writing |
| 550 | * our entries. | 577 | * our entries. |
| 551 | */ | 578 | */ |
| 552 | first_page_offset = (sizeof(u32) * num_checksums) + sizeof(u64); | 579 | first_page_offset = (sizeof(u32) * num_pages) + sizeof(u64); |
| 580 | |||
| 581 | /* Get the cluster for this block_group if it exists */ | ||
| 582 | if (!list_empty(&block_group->cluster_list)) | ||
| 583 | cluster = list_entry(block_group->cluster_list.next, | ||
| 584 | struct btrfs_free_cluster, | ||
| 585 | block_group_list); | ||
| 586 | |||
| 587 | /* | ||
| 588 | * We shouldn't have switched the pinned extents yet so this is the | ||
| 589 | * right one | ||
| 590 | */ | ||
| 591 | unpin = root->fs_info->pinned_extents; | ||
| 553 | 592 | ||
| 554 | /* | 593 | /* |
| 555 | * Lock all pages first so we can lock the extent safely. | 594 | * Lock all pages first so we can lock the extent safely. |
| @@ -559,20 +598,18 @@ int btrfs_write_out_cache(struct btrfs_root *root, | |||
| 559 | * after find_get_page at this point. Just putting this here so people | 598 | * after find_get_page at this point. Just putting this here so people |
| 560 | * know and don't freak out. | 599 | * know and don't freak out. |
| 561 | */ | 600 | */ |
| 562 | while (index <= last_index) { | 601 | while (index < num_pages) { |
| 563 | page = grab_cache_page(inode->i_mapping, index); | 602 | page = grab_cache_page(inode->i_mapping, index); |
| 564 | if (!page) { | 603 | if (!page) { |
| 565 | pgoff_t i = 0; | 604 | int i; |
| 566 | 605 | ||
| 567 | while (i < index) { | 606 | for (i = 0; i < num_pages; i++) { |
| 568 | page = find_get_page(inode->i_mapping, i); | 607 | unlock_page(pages[i]); |
| 569 | unlock_page(page); | 608 | page_cache_release(pages[i]); |
| 570 | page_cache_release(page); | ||
| 571 | page_cache_release(page); | ||
| 572 | i++; | ||
| 573 | } | 609 | } |
| 574 | goto out_free; | 610 | goto out_free; |
| 575 | } | 611 | } |
| 612 | pages[index] = page; | ||
| 576 | index++; | 613 | index++; |
| 577 | } | 614 | } |
| 578 | 615 | ||
| @@ -580,6 +617,12 @@ int btrfs_write_out_cache(struct btrfs_root *root, | |||
| 580 | lock_extent_bits(&BTRFS_I(inode)->io_tree, 0, i_size_read(inode) - 1, | 617 | lock_extent_bits(&BTRFS_I(inode)->io_tree, 0, i_size_read(inode) - 1, |
| 581 | 0, &cached_state, GFP_NOFS); | 618 | 0, &cached_state, GFP_NOFS); |
| 582 | 619 | ||
| 620 | /* | ||
| 621 | * When searching for pinned extents, we need to start at our start | ||
| 622 | * offset. | ||
| 623 | */ | ||
| 624 | start = block_group->key.objectid; | ||
| 625 | |||
| 583 | /* Write out the extent entries */ | 626 | /* Write out the extent entries */ |
| 584 | do { | 627 | do { |
| 585 | struct btrfs_free_space_entry *entry; | 628 | struct btrfs_free_space_entry *entry; |
| @@ -587,18 +630,25 @@ int btrfs_write_out_cache(struct btrfs_root *root, | |||
| 587 | unsigned long offset = 0; | 630 | unsigned long offset = 0; |
| 588 | unsigned long start_offset = 0; | 631 | unsigned long start_offset = 0; |
| 589 | 632 | ||
| 633 | next_page = false; | ||
| 634 | |||
| 590 | if (index == 0) { | 635 | if (index == 0) { |
| 591 | start_offset = first_page_offset; | 636 | start_offset = first_page_offset; |
| 592 | offset = start_offset; | 637 | offset = start_offset; |
| 593 | } | 638 | } |
| 594 | 639 | ||
| 595 | page = find_get_page(inode->i_mapping, index); | 640 | if (index >= num_pages) { |
| 641 | out_of_space = true; | ||
| 642 | break; | ||
| 643 | } | ||
| 644 | |||
| 645 | page = pages[index]; | ||
| 596 | 646 | ||
| 597 | addr = kmap(page); | 647 | addr = kmap(page); |
| 598 | entry = addr + start_offset; | 648 | entry = addr + start_offset; |
| 599 | 649 | ||
| 600 | memset(addr, 0, PAGE_CACHE_SIZE); | 650 | memset(addr, 0, PAGE_CACHE_SIZE); |
| 601 | while (1) { | 651 | while (node && !next_page) { |
| 602 | struct btrfs_free_space *e; | 652 | struct btrfs_free_space *e; |
| 603 | 653 | ||
| 604 | e = rb_entry(node, struct btrfs_free_space, offset_index); | 654 | e = rb_entry(node, struct btrfs_free_space, offset_index); |
| @@ -614,12 +664,49 @@ int btrfs_write_out_cache(struct btrfs_root *root, | |||
| 614 | entry->type = BTRFS_FREE_SPACE_EXTENT; | 664 | entry->type = BTRFS_FREE_SPACE_EXTENT; |
| 615 | } | 665 | } |
| 616 | node = rb_next(node); | 666 | node = rb_next(node); |
| 617 | if (!node) | 667 | if (!node && cluster) { |
| 618 | break; | 668 | node = rb_first(&cluster->root); |
| 669 | cluster = NULL; | ||
| 670 | } | ||
| 619 | offset += sizeof(struct btrfs_free_space_entry); | 671 | offset += sizeof(struct btrfs_free_space_entry); |
| 620 | if (offset + sizeof(struct btrfs_free_space_entry) >= | 672 | if (offset + sizeof(struct btrfs_free_space_entry) >= |
| 621 | PAGE_CACHE_SIZE) | 673 | PAGE_CACHE_SIZE) |
| 674 | next_page = true; | ||
| 675 | entry++; | ||
| 676 | } | ||
| 677 | |||
| 678 | /* | ||
| 679 | * We want to add any pinned extents to our free space cache | ||
| 680 | * so we don't leak the space | ||
| 681 | */ | ||
| 682 | while (!next_page && (start < block_group->key.objectid + | ||
| 683 | block_group->key.offset)) { | ||
| 684 | ret = find_first_extent_bit(unpin, start, &start, &end, | ||
| 685 | EXTENT_DIRTY); | ||
| 686 | if (ret) { | ||
| 687 | ret = 0; | ||
| 622 | break; | 688 | break; |
| 689 | } | ||
| 690 | |||
| 691 | /* This pinned extent is out of our range */ | ||
| 692 | if (start >= block_group->key.objectid + | ||
| 693 | block_group->key.offset) | ||
| 694 | break; | ||
| 695 | |||
| 696 | len = block_group->key.objectid + | ||
| 697 | block_group->key.offset - start; | ||
| 698 | len = min(len, end + 1 - start); | ||
| 699 | |||
| 700 | entries++; | ||
| 701 | entry->offset = cpu_to_le64(start); | ||
| 702 | entry->bytes = cpu_to_le64(len); | ||
| 703 | entry->type = BTRFS_FREE_SPACE_EXTENT; | ||
| 704 | |||
| 705 | start = end + 1; | ||
| 706 | offset += sizeof(struct btrfs_free_space_entry); | ||
| 707 | if (offset + sizeof(struct btrfs_free_space_entry) >= | ||
| 708 | PAGE_CACHE_SIZE) | ||
| 709 | next_page = true; | ||
| 623 | entry++; | 710 | entry++; |
| 624 | } | 711 | } |
| 625 | *crc = ~(u32)0; | 712 | *crc = ~(u32)0; |
| @@ -632,25 +719,8 @@ int btrfs_write_out_cache(struct btrfs_root *root, | |||
| 632 | 719 | ||
| 633 | bytes += PAGE_CACHE_SIZE; | 720 | bytes += PAGE_CACHE_SIZE; |
| 634 | 721 | ||
| 635 | ClearPageChecked(page); | ||
| 636 | set_page_extent_mapped(page); | ||
| 637 | SetPageUptodate(page); | ||
| 638 | set_page_dirty(page); | ||
| 639 | |||
| 640 | /* | ||
| 641 | * We need to release our reference we got for grab_cache_page, | ||
| 642 | * except for the first page which will hold our checksums, we | ||
| 643 | * do that below. | ||
| 644 | */ | ||
| 645 | if (index != 0) { | ||
| 646 | unlock_page(page); | ||
| 647 | page_cache_release(page); | ||
| 648 | } | ||
| 649 | |||
| 650 | page_cache_release(page); | ||
| 651 | |||
| 652 | index++; | 722 | index++; |
| 653 | } while (node); | 723 | } while (node || next_page); |
| 654 | 724 | ||
| 655 | /* Write out the bitmaps */ | 725 | /* Write out the bitmaps */ |
| 656 | list_for_each_safe(pos, n, &bitmap_list) { | 726 | list_for_each_safe(pos, n, &bitmap_list) { |
| @@ -658,7 +728,11 @@ int btrfs_write_out_cache(struct btrfs_root *root, | |||
| 658 | struct btrfs_free_space *entry = | 728 | struct btrfs_free_space *entry = |
| 659 | list_entry(pos, struct btrfs_free_space, list); | 729 | list_entry(pos, struct btrfs_free_space, list); |
| 660 | 730 | ||
| 661 | page = find_get_page(inode->i_mapping, index); | 731 | if (index >= num_pages) { |
| 732 | out_of_space = true; | ||
| 733 | break; | ||
| 734 | } | ||
| 735 | page = pages[index]; | ||
| 662 | 736 | ||
| 663 | addr = kmap(page); | 737 | addr = kmap(page); |
| 664 | memcpy(addr, entry->bitmap, PAGE_CACHE_SIZE); | 738 | memcpy(addr, entry->bitmap, PAGE_CACHE_SIZE); |
| @@ -669,64 +743,58 @@ int btrfs_write_out_cache(struct btrfs_root *root, | |||
| 669 | crc++; | 743 | crc++; |
| 670 | bytes += PAGE_CACHE_SIZE; | 744 | bytes += PAGE_CACHE_SIZE; |
| 671 | 745 | ||
| 672 | ClearPageChecked(page); | ||
| 673 | set_page_extent_mapped(page); | ||
| 674 | SetPageUptodate(page); | ||
| 675 | set_page_dirty(page); | ||
| 676 | unlock_page(page); | ||
| 677 | page_cache_release(page); | ||
| 678 | page_cache_release(page); | ||
| 679 | list_del_init(&entry->list); | 746 | list_del_init(&entry->list); |
| 680 | index++; | 747 | index++; |
| 681 | } | 748 | } |
| 682 | 749 | ||
| 750 | if (out_of_space) { | ||
| 751 | btrfs_drop_pages(pages, num_pages); | ||
| 752 | unlock_extent_cached(&BTRFS_I(inode)->io_tree, 0, | ||
| 753 | i_size_read(inode) - 1, &cached_state, | ||
| 754 | GFP_NOFS); | ||
| 755 | ret = 0; | ||
| 756 | goto out_free; | ||
| 757 | } | ||
| 758 | |||
| 683 | /* Zero out the rest of the pages just to make sure */ | 759 | /* Zero out the rest of the pages just to make sure */ |
| 684 | while (index <= last_index) { | 760 | while (index < num_pages) { |
| 685 | void *addr; | 761 | void *addr; |
| 686 | 762 | ||
| 687 | page = find_get_page(inode->i_mapping, index); | 763 | page = pages[index]; |
| 688 | |||
| 689 | addr = kmap(page); | 764 | addr = kmap(page); |
| 690 | memset(addr, 0, PAGE_CACHE_SIZE); | 765 | memset(addr, 0, PAGE_CACHE_SIZE); |
| 691 | kunmap(page); | 766 | kunmap(page); |
| 692 | ClearPageChecked(page); | ||
| 693 | set_page_extent_mapped(page); | ||
| 694 | SetPageUptodate(page); | ||
| 695 | set_page_dirty(page); | ||
| 696 | unlock_page(page); | ||
| 697 | page_cache_release(page); | ||
| 698 | page_cache_release(page); | ||
| 699 | bytes += PAGE_CACHE_SIZE; | 767 | bytes += PAGE_CACHE_SIZE; |
| 700 | index++; | 768 | index++; |
| 701 | } | 769 | } |
| 702 | 770 | ||
| 703 | btrfs_set_extent_delalloc(inode, 0, bytes - 1, &cached_state); | ||
| 704 | |||
| 705 | /* Write the checksums and trans id to the first page */ | 771 | /* Write the checksums and trans id to the first page */ |
| 706 | { | 772 | { |
| 707 | void *addr; | 773 | void *addr; |
| 708 | u64 *gen; | 774 | u64 *gen; |
| 709 | 775 | ||
| 710 | page = find_get_page(inode->i_mapping, 0); | 776 | page = pages[0]; |
| 711 | 777 | ||
| 712 | addr = kmap(page); | 778 | addr = kmap(page); |
| 713 | memcpy(addr, checksums, sizeof(u32) * num_checksums); | 779 | memcpy(addr, checksums, sizeof(u32) * num_pages); |
| 714 | gen = addr + (sizeof(u32) * num_checksums); | 780 | gen = addr + (sizeof(u32) * num_pages); |
| 715 | *gen = trans->transid; | 781 | *gen = trans->transid; |
| 716 | kunmap(page); | 782 | kunmap(page); |
| 717 | ClearPageChecked(page); | ||
| 718 | set_page_extent_mapped(page); | ||
| 719 | SetPageUptodate(page); | ||
| 720 | set_page_dirty(page); | ||
| 721 | unlock_page(page); | ||
| 722 | page_cache_release(page); | ||
| 723 | page_cache_release(page); | ||
| 724 | } | 783 | } |
| 725 | BTRFS_I(inode)->generation = trans->transid; | ||
| 726 | 784 | ||
| 785 | ret = btrfs_dirty_pages(root, inode, pages, num_pages, 0, | ||
| 786 | bytes, &cached_state); | ||
| 787 | btrfs_drop_pages(pages, num_pages); | ||
| 727 | unlock_extent_cached(&BTRFS_I(inode)->io_tree, 0, | 788 | unlock_extent_cached(&BTRFS_I(inode)->io_tree, 0, |
| 728 | i_size_read(inode) - 1, &cached_state, GFP_NOFS); | 789 | i_size_read(inode) - 1, &cached_state, GFP_NOFS); |
| 729 | 790 | ||
| 791 | if (ret) { | ||
| 792 | ret = 0; | ||
| 793 | goto out_free; | ||
| 794 | } | ||
| 795 | |||
| 796 | BTRFS_I(inode)->generation = trans->transid; | ||
| 797 | |||
| 730 | filemap_write_and_wait(inode->i_mapping); | 798 | filemap_write_and_wait(inode->i_mapping); |
| 731 | 799 | ||
| 732 | key.objectid = BTRFS_FREE_SPACE_OBJECTID; | 800 | key.objectid = BTRFS_FREE_SPACE_OBJECTID; |
| @@ -777,6 +845,7 @@ out_free: | |||
| 777 | BTRFS_I(inode)->generation = 0; | 845 | BTRFS_I(inode)->generation = 0; |
| 778 | } | 846 | } |
| 779 | kfree(checksums); | 847 | kfree(checksums); |
| 848 | kfree(pages); | ||
| 780 | btrfs_update_inode(trans, root, inode); | 849 | btrfs_update_inode(trans, root, inode); |
| 781 | iput(inode); | 850 | iput(inode); |
| 782 | return ret; | 851 | return ret; |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 93c28a1d6bdc..fcd66b6a8086 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
| @@ -112,6 +112,7 @@ static int btrfs_init_inode_security(struct btrfs_trans_handle *trans, | |||
| 112 | static noinline int insert_inline_extent(struct btrfs_trans_handle *trans, | 112 | static noinline int insert_inline_extent(struct btrfs_trans_handle *trans, |
| 113 | struct btrfs_root *root, struct inode *inode, | 113 | struct btrfs_root *root, struct inode *inode, |
| 114 | u64 start, size_t size, size_t compressed_size, | 114 | u64 start, size_t size, size_t compressed_size, |
| 115 | int compress_type, | ||
| 115 | struct page **compressed_pages) | 116 | struct page **compressed_pages) |
| 116 | { | 117 | { |
| 117 | struct btrfs_key key; | 118 | struct btrfs_key key; |
| @@ -126,12 +127,9 @@ static noinline int insert_inline_extent(struct btrfs_trans_handle *trans, | |||
| 126 | size_t cur_size = size; | 127 | size_t cur_size = size; |
| 127 | size_t datasize; | 128 | size_t datasize; |
| 128 | unsigned long offset; | 129 | unsigned long offset; |
| 129 | int compress_type = BTRFS_COMPRESS_NONE; | ||
| 130 | 130 | ||
| 131 | if (compressed_size && compressed_pages) { | 131 | if (compressed_size && compressed_pages) |
| 132 | compress_type = root->fs_info->compress_type; | ||
| 133 | cur_size = compressed_size; | 132 | cur_size = compressed_size; |
| 134 | } | ||
| 135 | 133 | ||
| 136 | path = btrfs_alloc_path(); | 134 | path = btrfs_alloc_path(); |
| 137 | if (!path) | 135 | if (!path) |
| @@ -221,7 +219,7 @@ fail: | |||
| 221 | static noinline int cow_file_range_inline(struct btrfs_trans_handle *trans, | 219 | static noinline int cow_file_range_inline(struct btrfs_trans_handle *trans, |
| 222 | struct btrfs_root *root, | 220 | struct btrfs_root *root, |
| 223 | struct inode *inode, u64 start, u64 end, | 221 | struct inode *inode, u64 start, u64 end, |
| 224 | size_t compressed_size, | 222 | size_t compressed_size, int compress_type, |
| 225 | struct page **compressed_pages) | 223 | struct page **compressed_pages) |
| 226 | { | 224 | { |
| 227 | u64 isize = i_size_read(inode); | 225 | u64 isize = i_size_read(inode); |
| @@ -254,7 +252,7 @@ static noinline int cow_file_range_inline(struct btrfs_trans_handle *trans, | |||
| 254 | inline_len = min_t(u64, isize, actual_end); | 252 | inline_len = min_t(u64, isize, actual_end); |
| 255 | ret = insert_inline_extent(trans, root, inode, start, | 253 | ret = insert_inline_extent(trans, root, inode, start, |
| 256 | inline_len, compressed_size, | 254 | inline_len, compressed_size, |
| 257 | compressed_pages); | 255 | compress_type, compressed_pages); |
| 258 | BUG_ON(ret); | 256 | BUG_ON(ret); |
| 259 | btrfs_delalloc_release_metadata(inode, end + 1 - start); | 257 | btrfs_delalloc_release_metadata(inode, end + 1 - start); |
| 260 | btrfs_drop_extent_cache(inode, start, aligned_end - 1, 0); | 258 | btrfs_drop_extent_cache(inode, start, aligned_end - 1, 0); |
| @@ -433,12 +431,13 @@ again: | |||
| 433 | * to make an uncompressed inline extent. | 431 | * to make an uncompressed inline extent. |
| 434 | */ | 432 | */ |
| 435 | ret = cow_file_range_inline(trans, root, inode, | 433 | ret = cow_file_range_inline(trans, root, inode, |
| 436 | start, end, 0, NULL); | 434 | start, end, 0, 0, NULL); |
| 437 | } else { | 435 | } else { |
| 438 | /* try making a compressed inline extent */ | 436 | /* try making a compressed inline extent */ |
| 439 | ret = cow_file_range_inline(trans, root, inode, | 437 | ret = cow_file_range_inline(trans, root, inode, |
| 440 | start, end, | 438 | start, end, |
| 441 | total_compressed, pages); | 439 | total_compressed, |
| 440 | compress_type, pages); | ||
| 442 | } | 441 | } |
| 443 | if (ret == 0) { | 442 | if (ret == 0) { |
| 444 | /* | 443 | /* |
| @@ -792,7 +791,7 @@ static noinline int cow_file_range(struct inode *inode, | |||
| 792 | if (start == 0) { | 791 | if (start == 0) { |
| 793 | /* lets try to make an inline extent */ | 792 | /* lets try to make an inline extent */ |
| 794 | ret = cow_file_range_inline(trans, root, inode, | 793 | ret = cow_file_range_inline(trans, root, inode, |
| 795 | start, end, 0, NULL); | 794 | start, end, 0, 0, NULL); |
| 796 | if (ret == 0) { | 795 | if (ret == 0) { |
| 797 | extent_clear_unlock_delalloc(inode, | 796 | extent_clear_unlock_delalloc(inode, |
| 798 | &BTRFS_I(inode)->io_tree, | 797 | &BTRFS_I(inode)->io_tree, |
| @@ -1771,9 +1770,12 @@ static int btrfs_finish_ordered_io(struct inode *inode, u64 start, u64 end) | |||
| 1771 | add_pending_csums(trans, inode, ordered_extent->file_offset, | 1770 | add_pending_csums(trans, inode, ordered_extent->file_offset, |
| 1772 | &ordered_extent->list); | 1771 | &ordered_extent->list); |
| 1773 | 1772 | ||
| 1774 | btrfs_ordered_update_i_size(inode, 0, ordered_extent); | 1773 | ret = btrfs_ordered_update_i_size(inode, 0, ordered_extent); |
| 1775 | ret = btrfs_update_inode(trans, root, inode); | 1774 | if (!ret) { |
| 1776 | BUG_ON(ret); | 1775 | ret = btrfs_update_inode(trans, root, inode); |
| 1776 | BUG_ON(ret); | ||
| 1777 | } | ||
| 1778 | ret = 0; | ||
| 1777 | out: | 1779 | out: |
| 1778 | if (nolock) { | 1780 | if (nolock) { |
| 1779 | if (trans) | 1781 | if (trans) |
| @@ -2222,8 +2224,6 @@ int btrfs_orphan_add(struct btrfs_trans_handle *trans, struct inode *inode) | |||
| 2222 | insert = 1; | 2224 | insert = 1; |
| 2223 | #endif | 2225 | #endif |
| 2224 | insert = 1; | 2226 | insert = 1; |
| 2225 | } else { | ||
| 2226 | WARN_ON(!BTRFS_I(inode)->orphan_meta_reserved); | ||
| 2227 | } | 2227 | } |
| 2228 | 2228 | ||
| 2229 | if (!BTRFS_I(inode)->orphan_meta_reserved) { | 2229 | if (!BTRFS_I(inode)->orphan_meta_reserved) { |
| @@ -2324,7 +2324,7 @@ int btrfs_orphan_cleanup(struct btrfs_root *root) | |||
| 2324 | 2324 | ||
| 2325 | /* | 2325 | /* |
| 2326 | * if ret == 0 means we found what we were searching for, which | 2326 | * if ret == 0 means we found what we were searching for, which |
| 2327 | * is weird, but possible, so only screw with path if we didnt | 2327 | * is weird, but possible, so only screw with path if we didn't |
| 2328 | * find the key and see if we have stuff that matches | 2328 | * find the key and see if we have stuff that matches |
| 2329 | */ | 2329 | */ |
| 2330 | if (ret > 0) { | 2330 | if (ret > 0) { |
| @@ -2537,8 +2537,6 @@ static void btrfs_read_locked_inode(struct inode *inode) | |||
| 2537 | BTRFS_I(inode)->flags = btrfs_inode_flags(leaf, inode_item); | 2537 | BTRFS_I(inode)->flags = btrfs_inode_flags(leaf, inode_item); |
| 2538 | 2538 | ||
| 2539 | alloc_group_block = btrfs_inode_block_group(leaf, inode_item); | 2539 | alloc_group_block = btrfs_inode_block_group(leaf, inode_item); |
| 2540 | if (location.objectid == BTRFS_FREE_SPACE_OBJECTID) | ||
| 2541 | inode->i_mapping->flags &= ~__GFP_FS; | ||
| 2542 | 2540 | ||
| 2543 | /* | 2541 | /* |
| 2544 | * try to precache a NULL acl entry for files that don't have | 2542 | * try to precache a NULL acl entry for files that don't have |
| @@ -2595,6 +2593,13 @@ static void fill_inode_item(struct btrfs_trans_handle *trans, | |||
| 2595 | struct btrfs_inode_item *item, | 2593 | struct btrfs_inode_item *item, |
| 2596 | struct inode *inode) | 2594 | struct inode *inode) |
| 2597 | { | 2595 | { |
| 2596 | if (!leaf->map_token) | ||
| 2597 | map_private_extent_buffer(leaf, (unsigned long)item, | ||
| 2598 | sizeof(struct btrfs_inode_item), | ||
| 2599 | &leaf->map_token, &leaf->kaddr, | ||
| 2600 | &leaf->map_start, &leaf->map_len, | ||
| 2601 | KM_USER1); | ||
| 2602 | |||
| 2598 | btrfs_set_inode_uid(leaf, item, inode->i_uid); | 2603 | btrfs_set_inode_uid(leaf, item, inode->i_uid); |
| 2599 | btrfs_set_inode_gid(leaf, item, inode->i_gid); | 2604 | btrfs_set_inode_gid(leaf, item, inode->i_gid); |
| 2600 | btrfs_set_inode_size(leaf, item, BTRFS_I(inode)->disk_i_size); | 2605 | btrfs_set_inode_size(leaf, item, BTRFS_I(inode)->disk_i_size); |
| @@ -2623,6 +2628,11 @@ static void fill_inode_item(struct btrfs_trans_handle *trans, | |||
| 2623 | btrfs_set_inode_rdev(leaf, item, inode->i_rdev); | 2628 | btrfs_set_inode_rdev(leaf, item, inode->i_rdev); |
| 2624 | btrfs_set_inode_flags(leaf, item, BTRFS_I(inode)->flags); | 2629 | btrfs_set_inode_flags(leaf, item, BTRFS_I(inode)->flags); |
| 2625 | btrfs_set_inode_block_group(leaf, item, BTRFS_I(inode)->block_group); | 2630 | btrfs_set_inode_block_group(leaf, item, BTRFS_I(inode)->block_group); |
| 2631 | |||
| 2632 | if (leaf->map_token) { | ||
| 2633 | unmap_extent_buffer(leaf, leaf->map_token, KM_USER1); | ||
| 2634 | leaf->map_token = NULL; | ||
| 2635 | } | ||
| 2626 | } | 2636 | } |
| 2627 | 2637 | ||
| 2628 | /* | 2638 | /* |
| @@ -4212,10 +4222,8 @@ static int btrfs_real_readdir(struct file *filp, void *dirent, | |||
| 4212 | struct btrfs_key found_key; | 4222 | struct btrfs_key found_key; |
| 4213 | struct btrfs_path *path; | 4223 | struct btrfs_path *path; |
| 4214 | int ret; | 4224 | int ret; |
| 4215 | u32 nritems; | ||
| 4216 | struct extent_buffer *leaf; | 4225 | struct extent_buffer *leaf; |
| 4217 | int slot; | 4226 | int slot; |
| 4218 | int advance; | ||
| 4219 | unsigned char d_type; | 4227 | unsigned char d_type; |
| 4220 | int over = 0; | 4228 | int over = 0; |
| 4221 | u32 di_cur; | 4229 | u32 di_cur; |
| @@ -4258,27 +4266,19 @@ static int btrfs_real_readdir(struct file *filp, void *dirent, | |||
| 4258 | ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); | 4266 | ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); |
| 4259 | if (ret < 0) | 4267 | if (ret < 0) |
| 4260 | goto err; | 4268 | goto err; |
| 4261 | advance = 0; | ||
| 4262 | 4269 | ||
| 4263 | while (1) { | 4270 | while (1) { |
| 4264 | leaf = path->nodes[0]; | 4271 | leaf = path->nodes[0]; |
| 4265 | nritems = btrfs_header_nritems(leaf); | ||
| 4266 | slot = path->slots[0]; | 4272 | slot = path->slots[0]; |
| 4267 | if (advance || slot >= nritems) { | 4273 | if (slot >= btrfs_header_nritems(leaf)) { |
| 4268 | if (slot >= nritems - 1) { | 4274 | ret = btrfs_next_leaf(root, path); |
| 4269 | ret = btrfs_next_leaf(root, path); | 4275 | if (ret < 0) |
| 4270 | if (ret) | 4276 | goto err; |
| 4271 | break; | 4277 | else if (ret > 0) |
| 4272 | leaf = path->nodes[0]; | 4278 | break; |
| 4273 | nritems = btrfs_header_nritems(leaf); | 4279 | continue; |
| 4274 | slot = path->slots[0]; | ||
| 4275 | } else { | ||
| 4276 | slot++; | ||
| 4277 | path->slots[0]++; | ||
| 4278 | } | ||
| 4279 | } | 4280 | } |
| 4280 | 4281 | ||
| 4281 | advance = 1; | ||
| 4282 | item = btrfs_item_nr(leaf, slot); | 4282 | item = btrfs_item_nr(leaf, slot); |
| 4283 | btrfs_item_key_to_cpu(leaf, &found_key, slot); | 4283 | btrfs_item_key_to_cpu(leaf, &found_key, slot); |
| 4284 | 4284 | ||
| @@ -4287,7 +4287,7 @@ static int btrfs_real_readdir(struct file *filp, void *dirent, | |||
| 4287 | if (btrfs_key_type(&found_key) != key_type) | 4287 | if (btrfs_key_type(&found_key) != key_type) |
| 4288 | break; | 4288 | break; |
| 4289 | if (found_key.offset < filp->f_pos) | 4289 | if (found_key.offset < filp->f_pos) |
| 4290 | continue; | 4290 | goto next; |
| 4291 | 4291 | ||
| 4292 | filp->f_pos = found_key.offset; | 4292 | filp->f_pos = found_key.offset; |
| 4293 | 4293 | ||
| @@ -4340,6 +4340,8 @@ skip: | |||
| 4340 | di_cur += di_len; | 4340 | di_cur += di_len; |
| 4341 | di = (struct btrfs_dir_item *)((char *)di + di_len); | 4341 | di = (struct btrfs_dir_item *)((char *)di + di_len); |
| 4342 | } | 4342 | } |
| 4343 | next: | ||
| 4344 | path->slots[0]++; | ||
| 4343 | } | 4345 | } |
| 4344 | 4346 | ||
| 4345 | /* Reached end of directory/root. Bump pos past the last item. */ | 4347 | /* Reached end of directory/root. Bump pos past the last item. */ |
| @@ -4532,14 +4534,17 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans, | |||
| 4532 | BUG_ON(!path); | 4534 | BUG_ON(!path); |
| 4533 | 4535 | ||
| 4534 | inode = new_inode(root->fs_info->sb); | 4536 | inode = new_inode(root->fs_info->sb); |
| 4535 | if (!inode) | 4537 | if (!inode) { |
| 4538 | btrfs_free_path(path); | ||
| 4536 | return ERR_PTR(-ENOMEM); | 4539 | return ERR_PTR(-ENOMEM); |
| 4540 | } | ||
| 4537 | 4541 | ||
| 4538 | if (dir) { | 4542 | if (dir) { |
| 4539 | trace_btrfs_inode_request(dir); | 4543 | trace_btrfs_inode_request(dir); |
| 4540 | 4544 | ||
| 4541 | ret = btrfs_set_inode_index(dir, index); | 4545 | ret = btrfs_set_inode_index(dir, index); |
| 4542 | if (ret) { | 4546 | if (ret) { |
| 4547 | btrfs_free_path(path); | ||
| 4543 | iput(inode); | 4548 | iput(inode); |
| 4544 | return ERR_PTR(ret); | 4549 | return ERR_PTR(ret); |
| 4545 | } | 4550 | } |
| @@ -4839,9 +4844,6 @@ static int btrfs_link(struct dentry *old_dentry, struct inode *dir, | |||
| 4839 | if (inode->i_nlink == ~0U) | 4844 | if (inode->i_nlink == ~0U) |
| 4840 | return -EMLINK; | 4845 | return -EMLINK; |
| 4841 | 4846 | ||
| 4842 | btrfs_inc_nlink(inode); | ||
| 4843 | inode->i_ctime = CURRENT_TIME; | ||
| 4844 | |||
| 4845 | err = btrfs_set_inode_index(dir, &index); | 4847 | err = btrfs_set_inode_index(dir, &index); |
| 4846 | if (err) | 4848 | if (err) |
| 4847 | goto fail; | 4849 | goto fail; |
| @@ -4857,6 +4859,9 @@ static int btrfs_link(struct dentry *old_dentry, struct inode *dir, | |||
| 4857 | goto fail; | 4859 | goto fail; |
| 4858 | } | 4860 | } |
| 4859 | 4861 | ||
| 4862 | btrfs_inc_nlink(inode); | ||
| 4863 | inode->i_ctime = CURRENT_TIME; | ||
| 4864 | |||
| 4860 | btrfs_set_trans_block_group(trans, dir); | 4865 | btrfs_set_trans_block_group(trans, dir); |
| 4861 | ihold(inode); | 4866 | ihold(inode); |
| 4862 | 4867 | ||
| @@ -5226,7 +5231,7 @@ again: | |||
| 5226 | btrfs_mark_buffer_dirty(leaf); | 5231 | btrfs_mark_buffer_dirty(leaf); |
| 5227 | } | 5232 | } |
| 5228 | set_extent_uptodate(io_tree, em->start, | 5233 | set_extent_uptodate(io_tree, em->start, |
| 5229 | extent_map_end(em) - 1, GFP_NOFS); | 5234 | extent_map_end(em) - 1, NULL, GFP_NOFS); |
| 5230 | goto insert; | 5235 | goto insert; |
| 5231 | } else { | 5236 | } else { |
| 5232 | printk(KERN_ERR "btrfs unknown found_type %d\n", found_type); | 5237 | printk(KERN_ERR "btrfs unknown found_type %d\n", found_type); |
| @@ -5433,17 +5438,30 @@ out: | |||
| 5433 | } | 5438 | } |
| 5434 | 5439 | ||
| 5435 | static struct extent_map *btrfs_new_extent_direct(struct inode *inode, | 5440 | static struct extent_map *btrfs_new_extent_direct(struct inode *inode, |
| 5441 | struct extent_map *em, | ||
| 5436 | u64 start, u64 len) | 5442 | u64 start, u64 len) |
| 5437 | { | 5443 | { |
| 5438 | struct btrfs_root *root = BTRFS_I(inode)->root; | 5444 | struct btrfs_root *root = BTRFS_I(inode)->root; |
| 5439 | struct btrfs_trans_handle *trans; | 5445 | struct btrfs_trans_handle *trans; |
| 5440 | struct extent_map *em; | ||
| 5441 | struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; | 5446 | struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; |
| 5442 | struct btrfs_key ins; | 5447 | struct btrfs_key ins; |
| 5443 | u64 alloc_hint; | 5448 | u64 alloc_hint; |
| 5444 | int ret; | 5449 | int ret; |
| 5450 | bool insert = false; | ||
| 5445 | 5451 | ||
| 5446 | btrfs_drop_extent_cache(inode, start, start + len - 1, 0); | 5452 | /* |
| 5453 | * Ok if the extent map we looked up is a hole and is for the exact | ||
| 5454 | * range we want, there is no reason to allocate a new one, however if | ||
| 5455 | * it is not right then we need to free this one and drop the cache for | ||
| 5456 | * our range. | ||
| 5457 | */ | ||
| 5458 | if (em->block_start != EXTENT_MAP_HOLE || em->start != start || | ||
| 5459 | em->len != len) { | ||
| 5460 | free_extent_map(em); | ||
| 5461 | em = NULL; | ||
| 5462 | insert = true; | ||
| 5463 | btrfs_drop_extent_cache(inode, start, start + len - 1, 0); | ||
| 5464 | } | ||
| 5447 | 5465 | ||
| 5448 | trans = btrfs_join_transaction(root, 0); | 5466 | trans = btrfs_join_transaction(root, 0); |
| 5449 | if (IS_ERR(trans)) | 5467 | if (IS_ERR(trans)) |
| @@ -5459,10 +5477,12 @@ static struct extent_map *btrfs_new_extent_direct(struct inode *inode, | |||
| 5459 | goto out; | 5477 | goto out; |
| 5460 | } | 5478 | } |
| 5461 | 5479 | ||
| 5462 | em = alloc_extent_map(GFP_NOFS); | ||
| 5463 | if (!em) { | 5480 | if (!em) { |
| 5464 | em = ERR_PTR(-ENOMEM); | 5481 | em = alloc_extent_map(GFP_NOFS); |
| 5465 | goto out; | 5482 | if (!em) { |
| 5483 | em = ERR_PTR(-ENOMEM); | ||
| 5484 | goto out; | ||
| 5485 | } | ||
| 5466 | } | 5486 | } |
| 5467 | 5487 | ||
| 5468 | em->start = start; | 5488 | em->start = start; |
| @@ -5472,9 +5492,15 @@ static struct extent_map *btrfs_new_extent_direct(struct inode *inode, | |||
| 5472 | em->block_start = ins.objectid; | 5492 | em->block_start = ins.objectid; |
| 5473 | em->block_len = ins.offset; | 5493 | em->block_len = ins.offset; |
| 5474 | em->bdev = root->fs_info->fs_devices->latest_bdev; | 5494 | em->bdev = root->fs_info->fs_devices->latest_bdev; |
| 5495 | |||
| 5496 | /* | ||
| 5497 | * We need to do this because if we're using the original em we searched | ||
| 5498 | * for, we could have EXTENT_FLAG_VACANCY set, and we don't want that. | ||
| 5499 | */ | ||
| 5500 | em->flags = 0; | ||
| 5475 | set_bit(EXTENT_FLAG_PINNED, &em->flags); | 5501 | set_bit(EXTENT_FLAG_PINNED, &em->flags); |
| 5476 | 5502 | ||
| 5477 | while (1) { | 5503 | while (insert) { |
| 5478 | write_lock(&em_tree->lock); | 5504 | write_lock(&em_tree->lock); |
| 5479 | ret = add_extent_mapping(em_tree, em); | 5505 | ret = add_extent_mapping(em_tree, em); |
| 5480 | write_unlock(&em_tree->lock); | 5506 | write_unlock(&em_tree->lock); |
| @@ -5692,8 +5718,7 @@ must_cow: | |||
| 5692 | * it above | 5718 | * it above |
| 5693 | */ | 5719 | */ |
| 5694 | len = bh_result->b_size; | 5720 | len = bh_result->b_size; |
| 5695 | free_extent_map(em); | 5721 | em = btrfs_new_extent_direct(inode, em, start, len); |
| 5696 | em = btrfs_new_extent_direct(inode, start, len); | ||
| 5697 | if (IS_ERR(em)) | 5722 | if (IS_ERR(em)) |
| 5698 | return PTR_ERR(em); | 5723 | return PTR_ERR(em); |
| 5699 | len = min(len, em->len - (start - em->start)); | 5724 | len = min(len, em->len - (start - em->start)); |
| @@ -5856,8 +5881,10 @@ again: | |||
| 5856 | } | 5881 | } |
| 5857 | 5882 | ||
| 5858 | add_pending_csums(trans, inode, ordered->file_offset, &ordered->list); | 5883 | add_pending_csums(trans, inode, ordered->file_offset, &ordered->list); |
| 5859 | btrfs_ordered_update_i_size(inode, 0, ordered); | 5884 | ret = btrfs_ordered_update_i_size(inode, 0, ordered); |
| 5860 | btrfs_update_inode(trans, root, inode); | 5885 | if (!ret) |
| 5886 | btrfs_update_inode(trans, root, inode); | ||
| 5887 | ret = 0; | ||
| 5861 | out_unlock: | 5888 | out_unlock: |
| 5862 | unlock_extent_cached(&BTRFS_I(inode)->io_tree, ordered->file_offset, | 5889 | unlock_extent_cached(&BTRFS_I(inode)->io_tree, ordered->file_offset, |
| 5863 | ordered->file_offset + ordered->len - 1, | 5890 | ordered->file_offset + ordered->len - 1, |
| @@ -5943,7 +5970,7 @@ static struct bio *btrfs_dio_bio_alloc(struct block_device *bdev, | |||
| 5943 | 5970 | ||
| 5944 | static inline int __btrfs_submit_dio_bio(struct bio *bio, struct inode *inode, | 5971 | static inline int __btrfs_submit_dio_bio(struct bio *bio, struct inode *inode, |
| 5945 | int rw, u64 file_offset, int skip_sum, | 5972 | int rw, u64 file_offset, int skip_sum, |
| 5946 | u32 *csums) | 5973 | u32 *csums, int async_submit) |
| 5947 | { | 5974 | { |
| 5948 | int write = rw & REQ_WRITE; | 5975 | int write = rw & REQ_WRITE; |
| 5949 | struct btrfs_root *root = BTRFS_I(inode)->root; | 5976 | struct btrfs_root *root = BTRFS_I(inode)->root; |
| @@ -5954,13 +5981,24 @@ static inline int __btrfs_submit_dio_bio(struct bio *bio, struct inode *inode, | |||
| 5954 | if (ret) | 5981 | if (ret) |
| 5955 | goto err; | 5982 | goto err; |
| 5956 | 5983 | ||
| 5957 | if (write && !skip_sum) { | 5984 | if (skip_sum) |
| 5985 | goto map; | ||
| 5986 | |||
| 5987 | if (write && async_submit) { | ||
| 5958 | ret = btrfs_wq_submit_bio(root->fs_info, | 5988 | ret = btrfs_wq_submit_bio(root->fs_info, |
| 5959 | inode, rw, bio, 0, 0, | 5989 | inode, rw, bio, 0, 0, |
| 5960 | file_offset, | 5990 | file_offset, |
| 5961 | __btrfs_submit_bio_start_direct_io, | 5991 | __btrfs_submit_bio_start_direct_io, |
| 5962 | __btrfs_submit_bio_done); | 5992 | __btrfs_submit_bio_done); |
| 5963 | goto err; | 5993 | goto err; |
| 5994 | } else if (write) { | ||
| 5995 | /* | ||
| 5996 | * If we aren't doing async submit, calculate the csum of the | ||
| 5997 | * bio now. | ||
| 5998 | */ | ||
| 5999 | ret = btrfs_csum_one_bio(root, inode, bio, file_offset, 1); | ||
| 6000 | if (ret) | ||
| 6001 | goto err; | ||
| 5964 | } else if (!skip_sum) { | 6002 | } else if (!skip_sum) { |
| 5965 | ret = btrfs_lookup_bio_sums_dio(root, inode, bio, | 6003 | ret = btrfs_lookup_bio_sums_dio(root, inode, bio, |
| 5966 | file_offset, csums); | 6004 | file_offset, csums); |
| @@ -5968,7 +6006,8 @@ static inline int __btrfs_submit_dio_bio(struct bio *bio, struct inode *inode, | |||
| 5968 | goto err; | 6006 | goto err; |
| 5969 | } | 6007 | } |
| 5970 | 6008 | ||
| 5971 | ret = btrfs_map_bio(root, rw, bio, 0, 1); | 6009 | map: |
| 6010 | ret = btrfs_map_bio(root, rw, bio, 0, async_submit); | ||
| 5972 | err: | 6011 | err: |
| 5973 | bio_put(bio); | 6012 | bio_put(bio); |
| 5974 | return ret; | 6013 | return ret; |
| @@ -5990,15 +6029,9 @@ static int btrfs_submit_direct_hook(int rw, struct btrfs_dio_private *dip, | |||
| 5990 | int nr_pages = 0; | 6029 | int nr_pages = 0; |
| 5991 | u32 *csums = dip->csums; | 6030 | u32 *csums = dip->csums; |
| 5992 | int ret = 0; | 6031 | int ret = 0; |
| 6032 | int async_submit = 0; | ||
| 5993 | int write = rw & REQ_WRITE; | 6033 | int write = rw & REQ_WRITE; |
| 5994 | 6034 | ||
| 5995 | bio = btrfs_dio_bio_alloc(orig_bio->bi_bdev, start_sector, GFP_NOFS); | ||
| 5996 | if (!bio) | ||
| 5997 | return -ENOMEM; | ||
| 5998 | bio->bi_private = dip; | ||
| 5999 | bio->bi_end_io = btrfs_end_dio_bio; | ||
| 6000 | atomic_inc(&dip->pending_bios); | ||
| 6001 | |||
| 6002 | map_length = orig_bio->bi_size; | 6035 | map_length = orig_bio->bi_size; |
| 6003 | ret = btrfs_map_block(map_tree, READ, start_sector << 9, | 6036 | ret = btrfs_map_block(map_tree, READ, start_sector << 9, |
| 6004 | &map_length, NULL, 0); | 6037 | &map_length, NULL, 0); |
| @@ -6007,6 +6040,19 @@ static int btrfs_submit_direct_hook(int rw, struct btrfs_dio_private *dip, | |||
| 6007 | return -EIO; | 6040 | return -EIO; |
| 6008 | } | 6041 | } |
| 6009 | 6042 | ||
| 6043 | if (map_length >= orig_bio->bi_size) { | ||
| 6044 | bio = orig_bio; | ||
| 6045 | goto submit; | ||
| 6046 | } | ||
| 6047 | |||
| 6048 | async_submit = 1; | ||
| 6049 | bio = btrfs_dio_bio_alloc(orig_bio->bi_bdev, start_sector, GFP_NOFS); | ||
| 6050 | if (!bio) | ||
| 6051 | return -ENOMEM; | ||
| 6052 | bio->bi_private = dip; | ||
| 6053 | bio->bi_end_io = btrfs_end_dio_bio; | ||
| 6054 | atomic_inc(&dip->pending_bios); | ||
| 6055 | |||
| 6010 | while (bvec <= (orig_bio->bi_io_vec + orig_bio->bi_vcnt - 1)) { | 6056 | while (bvec <= (orig_bio->bi_io_vec + orig_bio->bi_vcnt - 1)) { |
| 6011 | if (unlikely(map_length < submit_len + bvec->bv_len || | 6057 | if (unlikely(map_length < submit_len + bvec->bv_len || |
| 6012 | bio_add_page(bio, bvec->bv_page, bvec->bv_len, | 6058 | bio_add_page(bio, bvec->bv_page, bvec->bv_len, |
| @@ -6020,7 +6066,7 @@ static int btrfs_submit_direct_hook(int rw, struct btrfs_dio_private *dip, | |||
| 6020 | atomic_inc(&dip->pending_bios); | 6066 | atomic_inc(&dip->pending_bios); |
| 6021 | ret = __btrfs_submit_dio_bio(bio, inode, rw, | 6067 | ret = __btrfs_submit_dio_bio(bio, inode, rw, |
| 6022 | file_offset, skip_sum, | 6068 | file_offset, skip_sum, |
| 6023 | csums); | 6069 | csums, async_submit); |
| 6024 | if (ret) { | 6070 | if (ret) { |
| 6025 | bio_put(bio); | 6071 | bio_put(bio); |
| 6026 | atomic_dec(&dip->pending_bios); | 6072 | atomic_dec(&dip->pending_bios); |
| @@ -6057,8 +6103,9 @@ static int btrfs_submit_direct_hook(int rw, struct btrfs_dio_private *dip, | |||
| 6057 | } | 6103 | } |
| 6058 | } | 6104 | } |
| 6059 | 6105 | ||
| 6106 | submit: | ||
| 6060 | ret = __btrfs_submit_dio_bio(bio, inode, rw, file_offset, skip_sum, | 6107 | ret = __btrfs_submit_dio_bio(bio, inode, rw, file_offset, skip_sum, |
| 6061 | csums); | 6108 | csums, async_submit); |
| 6062 | if (!ret) | 6109 | if (!ret) |
| 6063 | return 0; | 6110 | return 0; |
| 6064 | 6111 | ||
| @@ -6153,6 +6200,7 @@ static ssize_t check_direct_IO(struct btrfs_root *root, int rw, struct kiocb *io | |||
| 6153 | unsigned long nr_segs) | 6200 | unsigned long nr_segs) |
| 6154 | { | 6201 | { |
| 6155 | int seg; | 6202 | int seg; |
| 6203 | int i; | ||
| 6156 | size_t size; | 6204 | size_t size; |
| 6157 | unsigned long addr; | 6205 | unsigned long addr; |
| 6158 | unsigned blocksize_mask = root->sectorsize - 1; | 6206 | unsigned blocksize_mask = root->sectorsize - 1; |
| @@ -6167,8 +6215,22 @@ static ssize_t check_direct_IO(struct btrfs_root *root, int rw, struct kiocb *io | |||
| 6167 | addr = (unsigned long)iov[seg].iov_base; | 6215 | addr = (unsigned long)iov[seg].iov_base; |
| 6168 | size = iov[seg].iov_len; | 6216 | size = iov[seg].iov_len; |
| 6169 | end += size; | 6217 | end += size; |
| 6170 | if ((addr & blocksize_mask) || (size & blocksize_mask)) | 6218 | if ((addr & blocksize_mask) || (size & blocksize_mask)) |
| 6171 | goto out; | 6219 | goto out; |
| 6220 | |||
| 6221 | /* If this is a write we don't need to check anymore */ | ||
| 6222 | if (rw & WRITE) | ||
| 6223 | continue; | ||
| 6224 | |||
| 6225 | /* | ||
| 6226 | * Check to make sure we don't have duplicate iov_base's in this | ||
| 6227 | * iovec, if so return EINVAL, otherwise we'll get csum errors | ||
| 6228 | * when reading back. | ||
| 6229 | */ | ||
| 6230 | for (i = seg + 1; i < nr_segs; i++) { | ||
| 6231 | if (iov[seg].iov_base == iov[i].iov_base) | ||
| 6232 | goto out; | ||
| 6233 | } | ||
| 6172 | } | 6234 | } |
| 6173 | retval = 0; | 6235 | retval = 0; |
| 6174 | out: | 6236 | out: |
| @@ -6960,8 +7022,10 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
| 6960 | * should cover the worst case number of items we'll modify. | 7022 | * should cover the worst case number of items we'll modify. |
| 6961 | */ | 7023 | */ |
| 6962 | trans = btrfs_start_transaction(root, 20); | 7024 | trans = btrfs_start_transaction(root, 20); |
| 6963 | if (IS_ERR(trans)) | 7025 | if (IS_ERR(trans)) { |
| 6964 | return PTR_ERR(trans); | 7026 | ret = PTR_ERR(trans); |
| 7027 | goto out_notrans; | ||
| 7028 | } | ||
| 6965 | 7029 | ||
| 6966 | btrfs_set_trans_block_group(trans, new_dir); | 7030 | btrfs_set_trans_block_group(trans, new_dir); |
| 6967 | 7031 | ||
| @@ -7061,7 +7125,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
| 7061 | } | 7125 | } |
| 7062 | out_fail: | 7126 | out_fail: |
| 7063 | btrfs_end_transaction_throttle(trans, root); | 7127 | btrfs_end_transaction_throttle(trans, root); |
| 7064 | 7128 | out_notrans: | |
| 7065 | if (old_inode->i_ino == BTRFS_FIRST_FREE_OBJECTID) | 7129 | if (old_inode->i_ino == BTRFS_FIRST_FREE_OBJECTID) |
| 7066 | up_read(&root->fs_info->subvol_sem); | 7130 | up_read(&root->fs_info->subvol_sem); |
| 7067 | 7131 | ||
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 7c07fe26b7cf..ffb48d6c5433 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
| @@ -373,6 +373,10 @@ static noinline int create_subvol(struct btrfs_root *root, | |||
| 373 | inode_item->nbytes = cpu_to_le64(root->leafsize); | 373 | inode_item->nbytes = cpu_to_le64(root->leafsize); |
| 374 | inode_item->mode = cpu_to_le32(S_IFDIR | 0755); | 374 | inode_item->mode = cpu_to_le32(S_IFDIR | 0755); |
| 375 | 375 | ||
| 376 | root_item.flags = 0; | ||
| 377 | root_item.byte_limit = 0; | ||
| 378 | inode_item->flags = cpu_to_le64(BTRFS_INODE_ROOT_ITEM_INIT); | ||
| 379 | |||
| 376 | btrfs_set_root_bytenr(&root_item, leaf->start); | 380 | btrfs_set_root_bytenr(&root_item, leaf->start); |
| 377 | btrfs_set_root_generation(&root_item, trans->transid); | 381 | btrfs_set_root_generation(&root_item, trans->transid); |
| 378 | btrfs_set_root_level(&root_item, 0); | 382 | btrfs_set_root_level(&root_item, 0); |
| @@ -2283,7 +2287,7 @@ long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg) | |||
| 2283 | struct btrfs_ioctl_space_info space; | 2287 | struct btrfs_ioctl_space_info space; |
| 2284 | struct btrfs_ioctl_space_info *dest; | 2288 | struct btrfs_ioctl_space_info *dest; |
| 2285 | struct btrfs_ioctl_space_info *dest_orig; | 2289 | struct btrfs_ioctl_space_info *dest_orig; |
| 2286 | struct btrfs_ioctl_space_info *user_dest; | 2290 | struct btrfs_ioctl_space_info __user *user_dest; |
| 2287 | struct btrfs_space_info *info; | 2291 | struct btrfs_space_info *info; |
| 2288 | u64 types[] = {BTRFS_BLOCK_GROUP_DATA, | 2292 | u64 types[] = {BTRFS_BLOCK_GROUP_DATA, |
| 2289 | BTRFS_BLOCK_GROUP_SYSTEM, | 2293 | BTRFS_BLOCK_GROUP_SYSTEM, |
| @@ -2436,8 +2440,10 @@ static noinline long btrfs_ioctl_start_sync(struct file *file, void __user *argp | |||
| 2436 | return PTR_ERR(trans); | 2440 | return PTR_ERR(trans); |
| 2437 | transid = trans->transid; | 2441 | transid = trans->transid; |
| 2438 | ret = btrfs_commit_transaction_async(trans, root, 0); | 2442 | ret = btrfs_commit_transaction_async(trans, root, 0); |
| 2439 | if (ret) | 2443 | if (ret) { |
| 2444 | btrfs_end_transaction(trans, root); | ||
| 2440 | return ret; | 2445 | return ret; |
| 2446 | } | ||
| 2441 | 2447 | ||
| 2442 | if (argp) | 2448 | if (argp) |
| 2443 | if (copy_to_user(argp, &transid, sizeof(transid))) | 2449 | if (copy_to_user(argp, &transid, sizeof(transid))) |
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 58250e09eb05..199a80134312 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c | |||
| @@ -2346,7 +2346,7 @@ struct btrfs_root *select_one_root(struct btrfs_trans_handle *trans, | |||
| 2346 | root = next->root; | 2346 | root = next->root; |
| 2347 | BUG_ON(!root); | 2347 | BUG_ON(!root); |
| 2348 | 2348 | ||
| 2349 | /* no other choice for non-refernce counted tree */ | 2349 | /* no other choice for non-references counted tree */ |
| 2350 | if (!root->ref_cows) | 2350 | if (!root->ref_cows) |
| 2351 | return root; | 2351 | return root; |
| 2352 | 2352 | ||
diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c index 29b2d7c930eb..6928bff62daa 100644 --- a/fs/btrfs/root-tree.c +++ b/fs/btrfs/root-tree.c | |||
| @@ -473,3 +473,21 @@ again: | |||
| 473 | btrfs_free_path(path); | 473 | btrfs_free_path(path); |
| 474 | return 0; | 474 | return 0; |
| 475 | } | 475 | } |
| 476 | |||
| 477 | /* | ||
| 478 | * Old btrfs forgets to init root_item->flags and root_item->byte_limit | ||
| 479 | * for subvolumes. To work around this problem, we steal a bit from | ||
| 480 | * root_item->inode_item->flags, and use it to indicate if those fields | ||
| 481 | * have been properly initialized. | ||
| 482 | */ | ||
| 483 | void btrfs_check_and_init_root_item(struct btrfs_root_item *root_item) | ||
| 484 | { | ||
| 485 | u64 inode_flags = le64_to_cpu(root_item->inode.flags); | ||
| 486 | |||
| 487 | if (!(inode_flags & BTRFS_INODE_ROOT_ITEM_INIT)) { | ||
| 488 | inode_flags |= BTRFS_INODE_ROOT_ITEM_INIT; | ||
| 489 | root_item->inode.flags = cpu_to_le64(inode_flags); | ||
| 490 | root_item->flags = 0; | ||
| 491 | root_item->byte_limit = 0; | ||
| 492 | } | ||
| 493 | } | ||
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 2edfc039f098..0ac712efcdf2 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
| @@ -159,7 +159,7 @@ enum { | |||
| 159 | Opt_compress_type, Opt_compress_force, Opt_compress_force_type, | 159 | Opt_compress_type, Opt_compress_force, Opt_compress_force_type, |
| 160 | Opt_notreelog, Opt_ratio, Opt_flushoncommit, Opt_discard, | 160 | Opt_notreelog, Opt_ratio, Opt_flushoncommit, Opt_discard, |
| 161 | Opt_space_cache, Opt_clear_cache, Opt_user_subvol_rm_allowed, | 161 | Opt_space_cache, Opt_clear_cache, Opt_user_subvol_rm_allowed, |
| 162 | Opt_enospc_debug, Opt_err, | 162 | Opt_enospc_debug, Opt_subvolrootid, Opt_err, |
| 163 | }; | 163 | }; |
| 164 | 164 | ||
| 165 | static match_table_t tokens = { | 165 | static match_table_t tokens = { |
| @@ -189,6 +189,7 @@ static match_table_t tokens = { | |||
| 189 | {Opt_clear_cache, "clear_cache"}, | 189 | {Opt_clear_cache, "clear_cache"}, |
| 190 | {Opt_user_subvol_rm_allowed, "user_subvol_rm_allowed"}, | 190 | {Opt_user_subvol_rm_allowed, "user_subvol_rm_allowed"}, |
| 191 | {Opt_enospc_debug, "enospc_debug"}, | 191 | {Opt_enospc_debug, "enospc_debug"}, |
| 192 | {Opt_subvolrootid, "subvolrootid=%d"}, | ||
| 192 | {Opt_err, NULL}, | 193 | {Opt_err, NULL}, |
| 193 | }; | 194 | }; |
| 194 | 195 | ||
| @@ -232,6 +233,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) | |||
| 232 | break; | 233 | break; |
| 233 | case Opt_subvol: | 234 | case Opt_subvol: |
| 234 | case Opt_subvolid: | 235 | case Opt_subvolid: |
| 236 | case Opt_subvolrootid: | ||
| 235 | case Opt_device: | 237 | case Opt_device: |
| 236 | /* | 238 | /* |
| 237 | * These are parsed by btrfs_parse_early_options | 239 | * These are parsed by btrfs_parse_early_options |
| @@ -388,7 +390,7 @@ out: | |||
| 388 | */ | 390 | */ |
| 389 | static int btrfs_parse_early_options(const char *options, fmode_t flags, | 391 | static int btrfs_parse_early_options(const char *options, fmode_t flags, |
| 390 | void *holder, char **subvol_name, u64 *subvol_objectid, | 392 | void *holder, char **subvol_name, u64 *subvol_objectid, |
| 391 | struct btrfs_fs_devices **fs_devices) | 393 | u64 *subvol_rootid, struct btrfs_fs_devices **fs_devices) |
| 392 | { | 394 | { |
| 393 | substring_t args[MAX_OPT_ARGS]; | 395 | substring_t args[MAX_OPT_ARGS]; |
| 394 | char *opts, *orig, *p; | 396 | char *opts, *orig, *p; |
| @@ -429,6 +431,18 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags, | |||
| 429 | *subvol_objectid = intarg; | 431 | *subvol_objectid = intarg; |
| 430 | } | 432 | } |
| 431 | break; | 433 | break; |
| 434 | case Opt_subvolrootid: | ||
| 435 | intarg = 0; | ||
| 436 | error = match_int(&args[0], &intarg); | ||
| 437 | if (!error) { | ||
| 438 | /* we want the original fs_tree */ | ||
| 439 | if (!intarg) | ||
| 440 | *subvol_rootid = | ||
| 441 | BTRFS_FS_TREE_OBJECTID; | ||
| 442 | else | ||
| 443 | *subvol_rootid = intarg; | ||
| 444 | } | ||
| 445 | break; | ||
| 432 | case Opt_device: | 446 | case Opt_device: |
| 433 | error = btrfs_scan_one_device(match_strdup(&args[0]), | 447 | error = btrfs_scan_one_device(match_strdup(&args[0]), |
| 434 | flags, holder, fs_devices); | 448 | flags, holder, fs_devices); |
| @@ -644,6 +658,7 @@ static int btrfs_show_options(struct seq_file *seq, struct vfsmount *vfs) | |||
| 644 | { | 658 | { |
| 645 | struct btrfs_root *root = btrfs_sb(vfs->mnt_sb); | 659 | struct btrfs_root *root = btrfs_sb(vfs->mnt_sb); |
| 646 | struct btrfs_fs_info *info = root->fs_info; | 660 | struct btrfs_fs_info *info = root->fs_info; |
| 661 | char *compress_type; | ||
| 647 | 662 | ||
| 648 | if (btrfs_test_opt(root, DEGRADED)) | 663 | if (btrfs_test_opt(root, DEGRADED)) |
| 649 | seq_puts(seq, ",degraded"); | 664 | seq_puts(seq, ",degraded"); |
| @@ -662,8 +677,16 @@ static int btrfs_show_options(struct seq_file *seq, struct vfsmount *vfs) | |||
| 662 | if (info->thread_pool_size != min_t(unsigned long, | 677 | if (info->thread_pool_size != min_t(unsigned long, |
| 663 | num_online_cpus() + 2, 8)) | 678 | num_online_cpus() + 2, 8)) |
| 664 | seq_printf(seq, ",thread_pool=%d", info->thread_pool_size); | 679 | seq_printf(seq, ",thread_pool=%d", info->thread_pool_size); |
| 665 | if (btrfs_test_opt(root, COMPRESS)) | 680 | if (btrfs_test_opt(root, COMPRESS)) { |
| 666 | seq_puts(seq, ",compress"); | 681 | if (info->compress_type == BTRFS_COMPRESS_ZLIB) |
| 682 | compress_type = "zlib"; | ||
| 683 | else | ||
| 684 | compress_type = "lzo"; | ||
| 685 | if (btrfs_test_opt(root, FORCE_COMPRESS)) | ||
| 686 | seq_printf(seq, ",compress-force=%s", compress_type); | ||
| 687 | else | ||
| 688 | seq_printf(seq, ",compress=%s", compress_type); | ||
| 689 | } | ||
| 667 | if (btrfs_test_opt(root, NOSSD)) | 690 | if (btrfs_test_opt(root, NOSSD)) |
| 668 | seq_puts(seq, ",nossd"); | 691 | seq_puts(seq, ",nossd"); |
| 669 | if (btrfs_test_opt(root, SSD_SPREAD)) | 692 | if (btrfs_test_opt(root, SSD_SPREAD)) |
| @@ -678,6 +701,12 @@ static int btrfs_show_options(struct seq_file *seq, struct vfsmount *vfs) | |||
| 678 | seq_puts(seq, ",discard"); | 701 | seq_puts(seq, ",discard"); |
| 679 | if (!(root->fs_info->sb->s_flags & MS_POSIXACL)) | 702 | if (!(root->fs_info->sb->s_flags & MS_POSIXACL)) |
| 680 | seq_puts(seq, ",noacl"); | 703 | seq_puts(seq, ",noacl"); |
| 704 | if (btrfs_test_opt(root, SPACE_CACHE)) | ||
| 705 | seq_puts(seq, ",space_cache"); | ||
| 706 | if (btrfs_test_opt(root, CLEAR_CACHE)) | ||
| 707 | seq_puts(seq, ",clear_cache"); | ||
| 708 | if (btrfs_test_opt(root, USER_SUBVOL_RM_ALLOWED)) | ||
| 709 | seq_puts(seq, ",user_subvol_rm_allowed"); | ||
| 681 | return 0; | 710 | return 0; |
| 682 | } | 711 | } |
| 683 | 712 | ||
| @@ -721,6 +750,7 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags, | |||
| 721 | fmode_t mode = FMODE_READ; | 750 | fmode_t mode = FMODE_READ; |
| 722 | char *subvol_name = NULL; | 751 | char *subvol_name = NULL; |
| 723 | u64 subvol_objectid = 0; | 752 | u64 subvol_objectid = 0; |
| 753 | u64 subvol_rootid = 0; | ||
| 724 | int error = 0; | 754 | int error = 0; |
| 725 | 755 | ||
| 726 | if (!(flags & MS_RDONLY)) | 756 | if (!(flags & MS_RDONLY)) |
| @@ -728,7 +758,7 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags, | |||
| 728 | 758 | ||
| 729 | error = btrfs_parse_early_options(data, mode, fs_type, | 759 | error = btrfs_parse_early_options(data, mode, fs_type, |
| 730 | &subvol_name, &subvol_objectid, | 760 | &subvol_name, &subvol_objectid, |
| 731 | &fs_devices); | 761 | &subvol_rootid, &fs_devices); |
| 732 | if (error) | 762 | if (error) |
| 733 | return ERR_PTR(error); | 763 | return ERR_PTR(error); |
| 734 | 764 | ||
| @@ -792,15 +822,17 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags, | |||
| 792 | s->s_flags |= MS_ACTIVE; | 822 | s->s_flags |= MS_ACTIVE; |
| 793 | } | 823 | } |
| 794 | 824 | ||
| 795 | root = get_default_root(s, subvol_objectid); | ||
| 796 | if (IS_ERR(root)) { | ||
| 797 | error = PTR_ERR(root); | ||
| 798 | deactivate_locked_super(s); | ||
| 799 | goto error_free_subvol_name; | ||
| 800 | } | ||
| 801 | /* if they gave us a subvolume name bind mount into that */ | 825 | /* if they gave us a subvolume name bind mount into that */ |
| 802 | if (strcmp(subvol_name, ".")) { | 826 | if (strcmp(subvol_name, ".")) { |
| 803 | struct dentry *new_root; | 827 | struct dentry *new_root; |
| 828 | |||
| 829 | root = get_default_root(s, subvol_rootid); | ||
| 830 | if (IS_ERR(root)) { | ||
| 831 | error = PTR_ERR(root); | ||
| 832 | deactivate_locked_super(s); | ||
| 833 | goto error_free_subvol_name; | ||
| 834 | } | ||
| 835 | |||
| 804 | mutex_lock(&root->d_inode->i_mutex); | 836 | mutex_lock(&root->d_inode->i_mutex); |
| 805 | new_root = lookup_one_len(subvol_name, root, | 837 | new_root = lookup_one_len(subvol_name, root, |
| 806 | strlen(subvol_name)); | 838 | strlen(subvol_name)); |
| @@ -821,6 +853,13 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags, | |||
| 821 | } | 853 | } |
| 822 | dput(root); | 854 | dput(root); |
| 823 | root = new_root; | 855 | root = new_root; |
| 856 | } else { | ||
| 857 | root = get_default_root(s, subvol_objectid); | ||
| 858 | if (IS_ERR(root)) { | ||
| 859 | error = PTR_ERR(root); | ||
| 860 | deactivate_locked_super(s); | ||
| 861 | goto error_free_subvol_name; | ||
| 862 | } | ||
| 824 | } | 863 | } |
| 825 | 864 | ||
| 826 | kfree(subvol_name); | 865 | kfree(subvol_name); |
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index ce48eb59d615..c571734d5e5a 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
| @@ -32,10 +32,8 @@ | |||
| 32 | 32 | ||
| 33 | static noinline void put_transaction(struct btrfs_transaction *transaction) | 33 | static noinline void put_transaction(struct btrfs_transaction *transaction) |
| 34 | { | 34 | { |
| 35 | WARN_ON(transaction->use_count == 0); | 35 | WARN_ON(atomic_read(&transaction->use_count) == 0); |
| 36 | transaction->use_count--; | 36 | if (atomic_dec_and_test(&transaction->use_count)) { |
| 37 | if (transaction->use_count == 0) { | ||
| 38 | list_del_init(&transaction->list); | ||
| 39 | memset(transaction, 0, sizeof(*transaction)); | 37 | memset(transaction, 0, sizeof(*transaction)); |
| 40 | kmem_cache_free(btrfs_transaction_cachep, transaction); | 38 | kmem_cache_free(btrfs_transaction_cachep, transaction); |
| 41 | } | 39 | } |
| @@ -60,14 +58,14 @@ static noinline int join_transaction(struct btrfs_root *root) | |||
| 60 | if (!cur_trans) | 58 | if (!cur_trans) |
| 61 | return -ENOMEM; | 59 | return -ENOMEM; |
| 62 | root->fs_info->generation++; | 60 | root->fs_info->generation++; |
| 63 | cur_trans->num_writers = 1; | 61 | atomic_set(&cur_trans->num_writers, 1); |
| 64 | cur_trans->num_joined = 0; | 62 | cur_trans->num_joined = 0; |
| 65 | cur_trans->transid = root->fs_info->generation; | 63 | cur_trans->transid = root->fs_info->generation; |
| 66 | init_waitqueue_head(&cur_trans->writer_wait); | 64 | init_waitqueue_head(&cur_trans->writer_wait); |
| 67 | init_waitqueue_head(&cur_trans->commit_wait); | 65 | init_waitqueue_head(&cur_trans->commit_wait); |
| 68 | cur_trans->in_commit = 0; | 66 | cur_trans->in_commit = 0; |
| 69 | cur_trans->blocked = 0; | 67 | cur_trans->blocked = 0; |
| 70 | cur_trans->use_count = 1; | 68 | atomic_set(&cur_trans->use_count, 1); |
| 71 | cur_trans->commit_done = 0; | 69 | cur_trans->commit_done = 0; |
| 72 | cur_trans->start_time = get_seconds(); | 70 | cur_trans->start_time = get_seconds(); |
| 73 | 71 | ||
| @@ -88,7 +86,7 @@ static noinline int join_transaction(struct btrfs_root *root) | |||
| 88 | root->fs_info->running_transaction = cur_trans; | 86 | root->fs_info->running_transaction = cur_trans; |
| 89 | spin_unlock(&root->fs_info->new_trans_lock); | 87 | spin_unlock(&root->fs_info->new_trans_lock); |
| 90 | } else { | 88 | } else { |
| 91 | cur_trans->num_writers++; | 89 | atomic_inc(&cur_trans->num_writers); |
| 92 | cur_trans->num_joined++; | 90 | cur_trans->num_joined++; |
| 93 | } | 91 | } |
| 94 | 92 | ||
| @@ -145,7 +143,7 @@ static void wait_current_trans(struct btrfs_root *root) | |||
| 145 | cur_trans = root->fs_info->running_transaction; | 143 | cur_trans = root->fs_info->running_transaction; |
| 146 | if (cur_trans && cur_trans->blocked) { | 144 | if (cur_trans && cur_trans->blocked) { |
| 147 | DEFINE_WAIT(wait); | 145 | DEFINE_WAIT(wait); |
| 148 | cur_trans->use_count++; | 146 | atomic_inc(&cur_trans->use_count); |
| 149 | while (1) { | 147 | while (1) { |
| 150 | prepare_to_wait(&root->fs_info->transaction_wait, &wait, | 148 | prepare_to_wait(&root->fs_info->transaction_wait, &wait, |
| 151 | TASK_UNINTERRUPTIBLE); | 149 | TASK_UNINTERRUPTIBLE); |
| @@ -181,6 +179,7 @@ static struct btrfs_trans_handle *start_transaction(struct btrfs_root *root, | |||
| 181 | { | 179 | { |
| 182 | struct btrfs_trans_handle *h; | 180 | struct btrfs_trans_handle *h; |
| 183 | struct btrfs_transaction *cur_trans; | 181 | struct btrfs_transaction *cur_trans; |
| 182 | int retries = 0; | ||
| 184 | int ret; | 183 | int ret; |
| 185 | 184 | ||
| 186 | if (root->fs_info->fs_state & BTRFS_SUPER_FLAG_ERROR) | 185 | if (root->fs_info->fs_state & BTRFS_SUPER_FLAG_ERROR) |
| @@ -197,13 +196,14 @@ again: | |||
| 197 | 196 | ||
| 198 | ret = join_transaction(root); | 197 | ret = join_transaction(root); |
| 199 | if (ret < 0) { | 198 | if (ret < 0) { |
| 199 | kmem_cache_free(btrfs_trans_handle_cachep, h); | ||
| 200 | if (type != TRANS_JOIN_NOLOCK) | 200 | if (type != TRANS_JOIN_NOLOCK) |
| 201 | mutex_unlock(&root->fs_info->trans_mutex); | 201 | mutex_unlock(&root->fs_info->trans_mutex); |
| 202 | return ERR_PTR(ret); | 202 | return ERR_PTR(ret); |
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | cur_trans = root->fs_info->running_transaction; | 205 | cur_trans = root->fs_info->running_transaction; |
| 206 | cur_trans->use_count++; | 206 | atomic_inc(&cur_trans->use_count); |
| 207 | if (type != TRANS_JOIN_NOLOCK) | 207 | if (type != TRANS_JOIN_NOLOCK) |
| 208 | mutex_unlock(&root->fs_info->trans_mutex); | 208 | mutex_unlock(&root->fs_info->trans_mutex); |
| 209 | 209 | ||
| @@ -223,10 +223,18 @@ again: | |||
| 223 | 223 | ||
| 224 | if (num_items > 0) { | 224 | if (num_items > 0) { |
| 225 | ret = btrfs_trans_reserve_metadata(h, root, num_items); | 225 | ret = btrfs_trans_reserve_metadata(h, root, num_items); |
| 226 | if (ret == -EAGAIN) { | 226 | if (ret == -EAGAIN && !retries) { |
| 227 | retries++; | ||
| 227 | btrfs_commit_transaction(h, root); | 228 | btrfs_commit_transaction(h, root); |
| 228 | goto again; | 229 | goto again; |
| 230 | } else if (ret == -EAGAIN) { | ||
| 231 | /* | ||
| 232 | * We have already retried and got EAGAIN, so really we | ||
| 233 | * don't have space, so set ret to -ENOSPC. | ||
| 234 | */ | ||
| 235 | ret = -ENOSPC; | ||
| 229 | } | 236 | } |
| 237 | |||
| 230 | if (ret < 0) { | 238 | if (ret < 0) { |
| 231 | btrfs_end_transaction(h, root); | 239 | btrfs_end_transaction(h, root); |
| 232 | return ERR_PTR(ret); | 240 | return ERR_PTR(ret); |
| @@ -326,7 +334,7 @@ int btrfs_wait_for_commit(struct btrfs_root *root, u64 transid) | |||
| 326 | goto out_unlock; /* nothing committing|committed */ | 334 | goto out_unlock; /* nothing committing|committed */ |
| 327 | } | 335 | } |
| 328 | 336 | ||
| 329 | cur_trans->use_count++; | 337 | atomic_inc(&cur_trans->use_count); |
| 330 | mutex_unlock(&root->fs_info->trans_mutex); | 338 | mutex_unlock(&root->fs_info->trans_mutex); |
| 331 | 339 | ||
| 332 | wait_for_commit(root, cur_trans); | 340 | wait_for_commit(root, cur_trans); |
| @@ -456,18 +464,14 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans, | |||
| 456 | wake_up_process(info->transaction_kthread); | 464 | wake_up_process(info->transaction_kthread); |
| 457 | } | 465 | } |
| 458 | 466 | ||
| 459 | if (lock) | ||
| 460 | mutex_lock(&info->trans_mutex); | ||
| 461 | WARN_ON(cur_trans != info->running_transaction); | 467 | WARN_ON(cur_trans != info->running_transaction); |
| 462 | WARN_ON(cur_trans->num_writers < 1); | 468 | WARN_ON(atomic_read(&cur_trans->num_writers) < 1); |
| 463 | cur_trans->num_writers--; | 469 | atomic_dec(&cur_trans->num_writers); |
| 464 | 470 | ||
| 465 | smp_mb(); | 471 | smp_mb(); |
| 466 | if (waitqueue_active(&cur_trans->writer_wait)) | 472 | if (waitqueue_active(&cur_trans->writer_wait)) |
| 467 | wake_up(&cur_trans->writer_wait); | 473 | wake_up(&cur_trans->writer_wait); |
| 468 | put_transaction(cur_trans); | 474 | put_transaction(cur_trans); |
| 469 | if (lock) | ||
| 470 | mutex_unlock(&info->trans_mutex); | ||
| 471 | 475 | ||
| 472 | if (current->journal_info == trans) | 476 | if (current->journal_info == trans) |
| 473 | current->journal_info = NULL; | 477 | current->journal_info = NULL; |
| @@ -975,6 +979,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, | |||
| 975 | record_root_in_trans(trans, root); | 979 | record_root_in_trans(trans, root); |
| 976 | btrfs_set_root_last_snapshot(&root->root_item, trans->transid); | 980 | btrfs_set_root_last_snapshot(&root->root_item, trans->transid); |
| 977 | memcpy(new_root_item, &root->root_item, sizeof(*new_root_item)); | 981 | memcpy(new_root_item, &root->root_item, sizeof(*new_root_item)); |
| 982 | btrfs_check_and_init_root_item(new_root_item); | ||
| 978 | 983 | ||
| 979 | root_flags = btrfs_root_flags(new_root_item); | 984 | root_flags = btrfs_root_flags(new_root_item); |
| 980 | if (pending->readonly) | 985 | if (pending->readonly) |
| @@ -1176,7 +1181,7 @@ int btrfs_commit_transaction_async(struct btrfs_trans_handle *trans, | |||
| 1176 | /* take transaction reference */ | 1181 | /* take transaction reference */ |
| 1177 | mutex_lock(&root->fs_info->trans_mutex); | 1182 | mutex_lock(&root->fs_info->trans_mutex); |
| 1178 | cur_trans = trans->transaction; | 1183 | cur_trans = trans->transaction; |
| 1179 | cur_trans->use_count++; | 1184 | atomic_inc(&cur_trans->use_count); |
| 1180 | mutex_unlock(&root->fs_info->trans_mutex); | 1185 | mutex_unlock(&root->fs_info->trans_mutex); |
| 1181 | 1186 | ||
| 1182 | btrfs_end_transaction(trans, root); | 1187 | btrfs_end_transaction(trans, root); |
| @@ -1235,7 +1240,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, | |||
| 1235 | 1240 | ||
| 1236 | mutex_lock(&root->fs_info->trans_mutex); | 1241 | mutex_lock(&root->fs_info->trans_mutex); |
| 1237 | if (cur_trans->in_commit) { | 1242 | if (cur_trans->in_commit) { |
| 1238 | cur_trans->use_count++; | 1243 | atomic_inc(&cur_trans->use_count); |
| 1239 | mutex_unlock(&root->fs_info->trans_mutex); | 1244 | mutex_unlock(&root->fs_info->trans_mutex); |
| 1240 | btrfs_end_transaction(trans, root); | 1245 | btrfs_end_transaction(trans, root); |
| 1241 | 1246 | ||
| @@ -1257,7 +1262,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, | |||
| 1257 | prev_trans = list_entry(cur_trans->list.prev, | 1262 | prev_trans = list_entry(cur_trans->list.prev, |
| 1258 | struct btrfs_transaction, list); | 1263 | struct btrfs_transaction, list); |
| 1259 | if (!prev_trans->commit_done) { | 1264 | if (!prev_trans->commit_done) { |
| 1260 | prev_trans->use_count++; | 1265 | atomic_inc(&prev_trans->use_count); |
| 1261 | mutex_unlock(&root->fs_info->trans_mutex); | 1266 | mutex_unlock(&root->fs_info->trans_mutex); |
| 1262 | 1267 | ||
| 1263 | wait_for_commit(root, prev_trans); | 1268 | wait_for_commit(root, prev_trans); |
| @@ -1298,14 +1303,14 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, | |||
| 1298 | TASK_UNINTERRUPTIBLE); | 1303 | TASK_UNINTERRUPTIBLE); |
| 1299 | 1304 | ||
| 1300 | smp_mb(); | 1305 | smp_mb(); |
| 1301 | if (cur_trans->num_writers > 1) | 1306 | if (atomic_read(&cur_trans->num_writers) > 1) |
| 1302 | schedule_timeout(MAX_SCHEDULE_TIMEOUT); | 1307 | schedule_timeout(MAX_SCHEDULE_TIMEOUT); |
| 1303 | else if (should_grow) | 1308 | else if (should_grow) |
| 1304 | schedule_timeout(1); | 1309 | schedule_timeout(1); |
| 1305 | 1310 | ||
| 1306 | mutex_lock(&root->fs_info->trans_mutex); | 1311 | mutex_lock(&root->fs_info->trans_mutex); |
| 1307 | finish_wait(&cur_trans->writer_wait, &wait); | 1312 | finish_wait(&cur_trans->writer_wait, &wait); |
| 1308 | } while (cur_trans->num_writers > 1 || | 1313 | } while (atomic_read(&cur_trans->num_writers) > 1 || |
| 1309 | (should_grow && cur_trans->num_joined != joined)); | 1314 | (should_grow && cur_trans->num_joined != joined)); |
| 1310 | 1315 | ||
| 1311 | ret = create_pending_snapshots(trans, root->fs_info); | 1316 | ret = create_pending_snapshots(trans, root->fs_info); |
| @@ -1392,6 +1397,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, | |||
| 1392 | 1397 | ||
| 1393 | wake_up(&cur_trans->commit_wait); | 1398 | wake_up(&cur_trans->commit_wait); |
| 1394 | 1399 | ||
| 1400 | list_del_init(&cur_trans->list); | ||
| 1395 | put_transaction(cur_trans); | 1401 | put_transaction(cur_trans); |
| 1396 | put_transaction(cur_trans); | 1402 | put_transaction(cur_trans); |
| 1397 | 1403 | ||
diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h index 229a594cacd5..e441acc6c584 100644 --- a/fs/btrfs/transaction.h +++ b/fs/btrfs/transaction.h | |||
| @@ -27,11 +27,11 @@ struct btrfs_transaction { | |||
| 27 | * total writers in this transaction, it must be zero before the | 27 | * total writers in this transaction, it must be zero before the |
| 28 | * transaction can end | 28 | * transaction can end |
| 29 | */ | 29 | */ |
| 30 | unsigned long num_writers; | 30 | atomic_t num_writers; |
| 31 | 31 | ||
| 32 | unsigned long num_joined; | 32 | unsigned long num_joined; |
| 33 | int in_commit; | 33 | int in_commit; |
| 34 | int use_count; | 34 | atomic_t use_count; |
| 35 | int commit_done; | 35 | int commit_done; |
| 36 | int blocked; | 36 | int blocked; |
| 37 | struct list_head list; | 37 | struct list_head list; |
diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c index a5303b871b13..cfd660550ded 100644 --- a/fs/btrfs/xattr.c +++ b/fs/btrfs/xattr.c | |||
| @@ -180,11 +180,10 @@ ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size) | |||
| 180 | struct btrfs_path *path; | 180 | struct btrfs_path *path; |
| 181 | struct extent_buffer *leaf; | 181 | struct extent_buffer *leaf; |
| 182 | struct btrfs_dir_item *di; | 182 | struct btrfs_dir_item *di; |
| 183 | int ret = 0, slot, advance; | 183 | int ret = 0, slot; |
| 184 | size_t total_size = 0, size_left = size; | 184 | size_t total_size = 0, size_left = size; |
| 185 | unsigned long name_ptr; | 185 | unsigned long name_ptr; |
| 186 | size_t name_len; | 186 | size_t name_len; |
| 187 | u32 nritems; | ||
| 188 | 187 | ||
| 189 | /* | 188 | /* |
| 190 | * ok we want all objects associated with this id. | 189 | * ok we want all objects associated with this id. |
| @@ -204,34 +203,24 @@ ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size) | |||
| 204 | ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); | 203 | ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); |
| 205 | if (ret < 0) | 204 | if (ret < 0) |
| 206 | goto err; | 205 | goto err; |
| 207 | advance = 0; | 206 | |
| 208 | while (1) { | 207 | while (1) { |
| 209 | leaf = path->nodes[0]; | 208 | leaf = path->nodes[0]; |
| 210 | nritems = btrfs_header_nritems(leaf); | ||
| 211 | slot = path->slots[0]; | 209 | slot = path->slots[0]; |
| 212 | 210 | ||
| 213 | /* this is where we start walking through the path */ | 211 | /* this is where we start walking through the path */ |
| 214 | if (advance || slot >= nritems) { | 212 | if (slot >= btrfs_header_nritems(leaf)) { |
| 215 | /* | 213 | /* |
| 216 | * if we've reached the last slot in this leaf we need | 214 | * if we've reached the last slot in this leaf we need |
| 217 | * to go to the next leaf and reset everything | 215 | * to go to the next leaf and reset everything |
| 218 | */ | 216 | */ |
| 219 | if (slot >= nritems-1) { | 217 | ret = btrfs_next_leaf(root, path); |
| 220 | ret = btrfs_next_leaf(root, path); | 218 | if (ret < 0) |
| 221 | if (ret) | 219 | goto err; |
| 222 | break; | 220 | else if (ret > 0) |
| 223 | leaf = path->nodes[0]; | 221 | break; |
| 224 | nritems = btrfs_header_nritems(leaf); | 222 | continue; |
| 225 | slot = path->slots[0]; | ||
| 226 | } else { | ||
| 227 | /* | ||
| 228 | * just walking through the slots on this leaf | ||
| 229 | */ | ||
| 230 | slot++; | ||
| 231 | path->slots[0]++; | ||
| 232 | } | ||
| 233 | } | 223 | } |
| 234 | advance = 1; | ||
| 235 | 224 | ||
| 236 | btrfs_item_key_to_cpu(leaf, &found_key, slot); | 225 | btrfs_item_key_to_cpu(leaf, &found_key, slot); |
| 237 | 226 | ||
| @@ -250,7 +239,7 @@ ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size) | |||
| 250 | 239 | ||
| 251 | /* we are just looking for how big our buffer needs to be */ | 240 | /* we are just looking for how big our buffer needs to be */ |
| 252 | if (!size) | 241 | if (!size) |
| 253 | continue; | 242 | goto next; |
| 254 | 243 | ||
| 255 | if (!buffer || (name_len + 1) > size_left) { | 244 | if (!buffer || (name_len + 1) > size_left) { |
| 256 | ret = -ERANGE; | 245 | ret = -ERANGE; |
| @@ -263,6 +252,8 @@ ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size) | |||
| 263 | 252 | ||
| 264 | size_left -= name_len + 1; | 253 | size_left -= name_len + 1; |
| 265 | buffer += name_len + 1; | 254 | buffer += name_len + 1; |
| 255 | next: | ||
| 256 | path->slots[0]++; | ||
| 266 | } | 257 | } |
| 267 | ret = total_size; | 258 | ret = total_size; |
| 268 | 259 | ||
diff --git a/fs/cachefiles/interface.c b/fs/cachefiles/interface.c index 37fe101a4e0d..1064805e653b 100644 --- a/fs/cachefiles/interface.c +++ b/fs/cachefiles/interface.c | |||
| @@ -197,7 +197,7 @@ struct fscache_object *cachefiles_grab_object(struct fscache_object *_object) | |||
| 197 | } | 197 | } |
| 198 | 198 | ||
| 199 | /* | 199 | /* |
| 200 | * update the auxilliary data for an object object on disk | 200 | * update the auxiliary data for an object object on disk |
| 201 | */ | 201 | */ |
| 202 | static void cachefiles_update_object(struct fscache_object *_object) | 202 | static void cachefiles_update_object(struct fscache_object *_object) |
| 203 | { | 203 | { |
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 37368ba2e67c..e159c529fd2b 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | * context needs to be associated with the osd write during writeback. | 24 | * context needs to be associated with the osd write during writeback. |
| 25 | * | 25 | * |
| 26 | * Similarly, struct ceph_inode_info maintains a set of counters to | 26 | * Similarly, struct ceph_inode_info maintains a set of counters to |
| 27 | * count dirty pages on the inode. In the absense of snapshots, | 27 | * count dirty pages on the inode. In the absence of snapshots, |
| 28 | * i_wrbuffer_ref == i_wrbuffer_ref_head == the dirty page count. | 28 | * i_wrbuffer_ref == i_wrbuffer_ref_head == the dirty page count. |
| 29 | * | 29 | * |
| 30 | * When a snapshot is taken (that is, when the client receives | 30 | * When a snapshot is taken (that is, when the client receives |
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 6b61ded701e1..5323c330bbf3 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
| @@ -765,7 +765,7 @@ int __ceph_caps_issued_mask(struct ceph_inode_info *ci, int mask, int touch) | |||
| 765 | if (touch) { | 765 | if (touch) { |
| 766 | struct rb_node *q; | 766 | struct rb_node *q; |
| 767 | 767 | ||
| 768 | /* touch this + preceeding caps */ | 768 | /* touch this + preceding caps */ |
| 769 | __touch_cap(cap); | 769 | __touch_cap(cap); |
| 770 | for (q = rb_first(&ci->i_caps); q != p; | 770 | for (q = rb_first(&ci->i_caps); q != p; |
| 771 | q = rb_next(q)) { | 771 | q = rb_next(q)) { |
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index a1ee8fa3a8e7..f60b07b0feb0 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
| @@ -3215,9 +3215,15 @@ void ceph_mdsc_destroy(struct ceph_fs_client *fsc) | |||
| 3215 | { | 3215 | { |
| 3216 | struct ceph_mds_client *mdsc = fsc->mdsc; | 3216 | struct ceph_mds_client *mdsc = fsc->mdsc; |
| 3217 | 3217 | ||
| 3218 | dout("mdsc_destroy %p\n", mdsc); | ||
| 3218 | ceph_mdsc_stop(mdsc); | 3219 | ceph_mdsc_stop(mdsc); |
| 3220 | |||
| 3221 | /* flush out any connection work with references to us */ | ||
| 3222 | ceph_msgr_flush(); | ||
| 3223 | |||
| 3219 | fsc->mdsc = NULL; | 3224 | fsc->mdsc = NULL; |
| 3220 | kfree(mdsc); | 3225 | kfree(mdsc); |
| 3226 | dout("mdsc_destroy %p done\n", mdsc); | ||
| 3221 | } | 3227 | } |
| 3222 | 3228 | ||
| 3223 | 3229 | ||
diff --git a/fs/ceph/snap.c b/fs/ceph/snap.c index 0aee66b92af3..e86ec1155f8f 100644 --- a/fs/ceph/snap.c +++ b/fs/ceph/snap.c | |||
| @@ -342,7 +342,7 @@ static int build_snap_context(struct ceph_snap_realm *realm) | |||
| 342 | num = 0; | 342 | num = 0; |
| 343 | snapc->seq = realm->seq; | 343 | snapc->seq = realm->seq; |
| 344 | if (parent) { | 344 | if (parent) { |
| 345 | /* include any of parent's snaps occuring _after_ my | 345 | /* include any of parent's snaps occurring _after_ my |
| 346 | parent became my parent */ | 346 | parent became my parent */ |
| 347 | for (i = 0; i < parent->cached_context->num_snaps; i++) | 347 | for (i = 0; i < parent->cached_context->num_snaps; i++) |
| 348 | if (parent->cached_context->snaps[i] >= | 348 | if (parent->cached_context->snaps[i] >= |
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index a9e78b4a258c..f2f77fd3c14c 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c | |||
| @@ -353,7 +353,7 @@ static int ceph_show_options(struct seq_file *m, struct vfsmount *mnt) | |||
| 353 | 353 | ||
| 354 | if (opt->name) | 354 | if (opt->name) |
| 355 | seq_printf(m, ",name=%s", opt->name); | 355 | seq_printf(m, ",name=%s", opt->name); |
| 356 | if (opt->secret) | 356 | if (opt->key) |
| 357 | seq_puts(m, ",secret=<hidden>"); | 357 | seq_puts(m, ",secret=<hidden>"); |
| 358 | 358 | ||
| 359 | if (opt->mount_timeout != CEPH_MOUNT_TIMEOUT_DEFAULT) | 359 | if (opt->mount_timeout != CEPH_MOUNT_TIMEOUT_DEFAULT) |
diff --git a/fs/cifs/AUTHORS b/fs/cifs/AUTHORS index 7f7fa3c302af..ea940b1db77b 100644 --- a/fs/cifs/AUTHORS +++ b/fs/cifs/AUTHORS | |||
| @@ -35,7 +35,7 @@ Adrian Bunk (kcalloc cleanups) | |||
| 35 | Miklos Szeredi | 35 | Miklos Szeredi |
| 36 | Kazeon team for various fixes especially for 2.4 version. | 36 | Kazeon team for various fixes especially for 2.4 version. |
| 37 | Asser Ferno (Change Notify support) | 37 | Asser Ferno (Change Notify support) |
| 38 | Shaggy (Dave Kleikamp) for inumerable small fs suggestions and some good cleanup | 38 | Shaggy (Dave Kleikamp) for innumerable small fs suggestions and some good cleanup |
| 39 | Gunter Kukkukk (testing and suggestions for support of old servers) | 39 | Gunter Kukkukk (testing and suggestions for support of old servers) |
| 40 | Igor Mammedov (DFS support) | 40 | Igor Mammedov (DFS support) |
| 41 | Jeff Layton (many, many fixes, as well as great work on the cifs Kerberos code) | 41 | Jeff Layton (many, many fixes, as well as great work on the cifs Kerberos code) |
diff --git a/fs/cifs/README b/fs/cifs/README index fe1683590828..74ab165fc646 100644 --- a/fs/cifs/README +++ b/fs/cifs/README | |||
| @@ -685,22 +685,6 @@ LinuxExtensionsEnabled If set to one then the client will attempt to | |||
| 685 | support and want to map the uid and gid fields | 685 | support and want to map the uid and gid fields |
| 686 | to values supplied at mount (rather than the | 686 | to values supplied at mount (rather than the |
| 687 | actual values, then set this to zero. (default 1) | 687 | actual values, then set this to zero. (default 1) |
| 688 | Experimental When set to 1 used to enable certain experimental | ||
| 689 | features (currently enables multipage writes | ||
| 690 | when signing is enabled, the multipage write | ||
| 691 | performance enhancement was disabled when | ||
| 692 | signing turned on in case buffer was modified | ||
| 693 | just before it was sent, also this flag will | ||
| 694 | be used to use the new experimental directory change | ||
| 695 | notification code). When set to 2 enables | ||
| 696 | an additional experimental feature, "raw ntlmssp" | ||
| 697 | session establishment support (which allows | ||
| 698 | specifying "sec=ntlmssp" on mount). The Linux cifs | ||
| 699 | module will use ntlmv2 authentication encapsulated | ||
| 700 | in "raw ntlmssp" (not using SPNEGO) when | ||
| 701 | "sec=ntlmssp" is specified on mount. | ||
| 702 | This support also requires building cifs with | ||
| 703 | the CONFIG_CIFS_EXPERIMENTAL configuration flag. | ||
| 704 | 688 | ||
| 705 | These experimental features and tracing can be enabled by changing flags in | 689 | These experimental features and tracing can be enabled by changing flags in |
| 706 | /proc/fs/cifs (after the cifs module has been installed or built into the | 690 | /proc/fs/cifs (after the cifs module has been installed or built into the |
diff --git a/fs/cifs/cache.c b/fs/cifs/cache.c index e654dfd092c3..53d57a3fe427 100644 --- a/fs/cifs/cache.c +++ b/fs/cifs/cache.c | |||
| @@ -50,7 +50,7 @@ void cifs_fscache_unregister(void) | |||
| 50 | */ | 50 | */ |
| 51 | struct cifs_server_key { | 51 | struct cifs_server_key { |
| 52 | uint16_t family; /* address family */ | 52 | uint16_t family; /* address family */ |
| 53 | uint16_t port; /* IP port */ | 53 | __be16 port; /* IP port */ |
| 54 | union { | 54 | union { |
| 55 | struct in_addr ipv4_addr; | 55 | struct in_addr ipv4_addr; |
| 56 | struct in6_addr ipv6_addr; | 56 | struct in6_addr ipv6_addr; |
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c index 65829d32128c..30d01bc90855 100644 --- a/fs/cifs/cifs_debug.c +++ b/fs/cifs/cifs_debug.c | |||
| @@ -423,7 +423,6 @@ static const struct file_operations cifs_lookup_cache_proc_fops; | |||
| 423 | static const struct file_operations traceSMB_proc_fops; | 423 | static const struct file_operations traceSMB_proc_fops; |
| 424 | static const struct file_operations cifs_multiuser_mount_proc_fops; | 424 | static const struct file_operations cifs_multiuser_mount_proc_fops; |
| 425 | static const struct file_operations cifs_security_flags_proc_fops; | 425 | static const struct file_operations cifs_security_flags_proc_fops; |
| 426 | static const struct file_operations cifs_experimental_proc_fops; | ||
| 427 | static const struct file_operations cifs_linux_ext_proc_fops; | 426 | static const struct file_operations cifs_linux_ext_proc_fops; |
| 428 | 427 | ||
| 429 | void | 428 | void |
| @@ -441,8 +440,6 @@ cifs_proc_init(void) | |||
| 441 | proc_create("cifsFYI", 0, proc_fs_cifs, &cifsFYI_proc_fops); | 440 | proc_create("cifsFYI", 0, proc_fs_cifs, &cifsFYI_proc_fops); |
| 442 | proc_create("traceSMB", 0, proc_fs_cifs, &traceSMB_proc_fops); | 441 | proc_create("traceSMB", 0, proc_fs_cifs, &traceSMB_proc_fops); |
| 443 | proc_create("OplockEnabled", 0, proc_fs_cifs, &cifs_oplock_proc_fops); | 442 | proc_create("OplockEnabled", 0, proc_fs_cifs, &cifs_oplock_proc_fops); |
| 444 | proc_create("Experimental", 0, proc_fs_cifs, | ||
| 445 | &cifs_experimental_proc_fops); | ||
| 446 | proc_create("LinuxExtensionsEnabled", 0, proc_fs_cifs, | 443 | proc_create("LinuxExtensionsEnabled", 0, proc_fs_cifs, |
| 447 | &cifs_linux_ext_proc_fops); | 444 | &cifs_linux_ext_proc_fops); |
| 448 | proc_create("MultiuserMount", 0, proc_fs_cifs, | 445 | proc_create("MultiuserMount", 0, proc_fs_cifs, |
| @@ -469,7 +466,6 @@ cifs_proc_clean(void) | |||
| 469 | remove_proc_entry("OplockEnabled", proc_fs_cifs); | 466 | remove_proc_entry("OplockEnabled", proc_fs_cifs); |
| 470 | remove_proc_entry("SecurityFlags", proc_fs_cifs); | 467 | remove_proc_entry("SecurityFlags", proc_fs_cifs); |
| 471 | remove_proc_entry("LinuxExtensionsEnabled", proc_fs_cifs); | 468 | remove_proc_entry("LinuxExtensionsEnabled", proc_fs_cifs); |
| 472 | remove_proc_entry("Experimental", proc_fs_cifs); | ||
| 473 | remove_proc_entry("LookupCacheEnabled", proc_fs_cifs); | 469 | remove_proc_entry("LookupCacheEnabled", proc_fs_cifs); |
| 474 | remove_proc_entry("fs/cifs", NULL); | 470 | remove_proc_entry("fs/cifs", NULL); |
| 475 | } | 471 | } |
| @@ -550,45 +546,6 @@ static const struct file_operations cifs_oplock_proc_fops = { | |||
| 550 | .write = cifs_oplock_proc_write, | 546 | .write = cifs_oplock_proc_write, |
| 551 | }; | 547 | }; |
| 552 | 548 | ||
| 553 | static int cifs_experimental_proc_show(struct seq_file *m, void *v) | ||
| 554 | { | ||
| 555 | seq_printf(m, "%d\n", experimEnabled); | ||
| 556 | return 0; | ||
| 557 | } | ||
| 558 | |||
| 559 | static int cifs_experimental_proc_open(struct inode *inode, struct file *file) | ||
| 560 | { | ||
| 561 | return single_open(file, cifs_experimental_proc_show, NULL); | ||
| 562 | } | ||
| 563 | |||
| 564 | static ssize_t cifs_experimental_proc_write(struct file *file, | ||
| 565 | const char __user *buffer, size_t count, loff_t *ppos) | ||
| 566 | { | ||
| 567 | char c; | ||
| 568 | int rc; | ||
| 569 | |||
| 570 | rc = get_user(c, buffer); | ||
| 571 | if (rc) | ||
| 572 | return rc; | ||
| 573 | if (c == '0' || c == 'n' || c == 'N') | ||
| 574 | experimEnabled = 0; | ||
| 575 | else if (c == '1' || c == 'y' || c == 'Y') | ||
| 576 | experimEnabled = 1; | ||
| 577 | else if (c == '2') | ||
| 578 | experimEnabled = 2; | ||
| 579 | |||
| 580 | return count; | ||
| 581 | } | ||
| 582 | |||
| 583 | static const struct file_operations cifs_experimental_proc_fops = { | ||
| 584 | .owner = THIS_MODULE, | ||
| 585 | .open = cifs_experimental_proc_open, | ||
| 586 | .read = seq_read, | ||
| 587 | .llseek = seq_lseek, | ||
| 588 | .release = single_release, | ||
| 589 | .write = cifs_experimental_proc_write, | ||
| 590 | }; | ||
| 591 | |||
| 592 | static int cifs_linux_ext_proc_show(struct seq_file *m, void *v) | 549 | static int cifs_linux_ext_proc_show(struct seq_file *m, void *v) |
| 593 | { | 550 | { |
| 594 | seq_printf(m, "%d\n", linuxExtEnabled); | 551 | seq_printf(m, "%d\n", linuxExtEnabled); |
diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c index 0a265ad9e426..2b68ac57d97d 100644 --- a/fs/cifs/cifs_dfs_ref.c +++ b/fs/cifs/cifs_dfs_ref.c | |||
| @@ -53,7 +53,7 @@ void cifs_dfs_release_automount_timer(void) | |||
| 53 | * | 53 | * |
| 54 | * Extracts sharename form full UNC. | 54 | * Extracts sharename form full UNC. |
| 55 | * i.e. strips from UNC trailing path that is not part of share | 55 | * i.e. strips from UNC trailing path that is not part of share |
| 56 | * name and fixup missing '\' in the begining of DFS node refferal | 56 | * name and fixup missing '\' in the beginning of DFS node refferal |
| 57 | * if necessary. | 57 | * if necessary. |
| 58 | * Returns pointer to share name on success or ERR_PTR on error. | 58 | * Returns pointer to share name on success or ERR_PTR on error. |
| 59 | * Caller is responsible for freeing returned string. | 59 | * Caller is responsible for freeing returned string. |
diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c index 4dfba8283165..33d221394aca 100644 --- a/fs/cifs/cifs_spnego.c +++ b/fs/cifs/cifs_spnego.c | |||
| @@ -113,7 +113,7 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo) | |||
| 113 | MAX_MECH_STR_LEN + | 113 | MAX_MECH_STR_LEN + |
| 114 | UID_KEY_LEN + (sizeof(uid_t) * 2) + | 114 | UID_KEY_LEN + (sizeof(uid_t) * 2) + |
| 115 | CREDUID_KEY_LEN + (sizeof(uid_t) * 2) + | 115 | CREDUID_KEY_LEN + (sizeof(uid_t) * 2) + |
| 116 | USER_KEY_LEN + strlen(sesInfo->userName) + | 116 | USER_KEY_LEN + strlen(sesInfo->user_name) + |
| 117 | PID_KEY_LEN + (sizeof(pid_t) * 2) + 1; | 117 | PID_KEY_LEN + (sizeof(pid_t) * 2) + 1; |
| 118 | 118 | ||
| 119 | spnego_key = ERR_PTR(-ENOMEM); | 119 | spnego_key = ERR_PTR(-ENOMEM); |
| @@ -153,7 +153,7 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo) | |||
| 153 | sprintf(dp, ";creduid=0x%x", sesInfo->cred_uid); | 153 | sprintf(dp, ";creduid=0x%x", sesInfo->cred_uid); |
| 154 | 154 | ||
| 155 | dp = description + strlen(description); | 155 | dp = description + strlen(description); |
| 156 | sprintf(dp, ";user=%s", sesInfo->userName); | 156 | sprintf(dp, ";user=%s", sesInfo->user_name); |
| 157 | 157 | ||
| 158 | dp = description + strlen(description); | 158 | dp = description + strlen(description); |
| 159 | sprintf(dp, ";pid=0x%x", current->pid); | 159 | sprintf(dp, ";pid=0x%x", current->pid); |
diff --git a/fs/cifs/cifs_unicode.c b/fs/cifs/cifs_unicode.c index fc0fd4fde306..23d43cde4306 100644 --- a/fs/cifs/cifs_unicode.c +++ b/fs/cifs/cifs_unicode.c | |||
| @@ -90,7 +90,7 @@ cifs_mapchar(char *target, const __u16 src_char, const struct nls_table *cp, | |||
| 90 | case UNI_COLON: | 90 | case UNI_COLON: |
| 91 | *target = ':'; | 91 | *target = ':'; |
| 92 | break; | 92 | break; |
| 93 | case UNI_ASTERIK: | 93 | case UNI_ASTERISK: |
| 94 | *target = '*'; | 94 | *target = '*'; |
| 95 | break; | 95 | break; |
| 96 | case UNI_QUESTION: | 96 | case UNI_QUESTION: |
| @@ -264,40 +264,40 @@ cifs_strndup_from_ucs(const char *src, const int maxlen, const bool is_unicode, | |||
| 264 | * names are little endian 16 bit Unicode on the wire | 264 | * names are little endian 16 bit Unicode on the wire |
| 265 | */ | 265 | */ |
| 266 | int | 266 | int |
| 267 | cifsConvertToUCS(__le16 *target, const char *source, int maxlen, | 267 | cifsConvertToUCS(__le16 *target, const char *source, int srclen, |
| 268 | const struct nls_table *cp, int mapChars) | 268 | const struct nls_table *cp, int mapChars) |
| 269 | { | 269 | { |
| 270 | int i, j, charlen; | 270 | int i, j, charlen; |
| 271 | int len_remaining = maxlen; | ||
| 272 | char src_char; | 271 | char src_char; |
| 273 | __u16 temp; | 272 | __le16 dst_char; |
| 273 | wchar_t tmp; | ||
| 274 | 274 | ||
| 275 | if (!mapChars) | 275 | if (!mapChars) |
| 276 | return cifs_strtoUCS(target, source, PATH_MAX, cp); | 276 | return cifs_strtoUCS(target, source, PATH_MAX, cp); |
| 277 | 277 | ||
| 278 | for (i = 0, j = 0; i < maxlen; j++) { | 278 | for (i = 0, j = 0; i < srclen; j++) { |
| 279 | src_char = source[i]; | 279 | src_char = source[i]; |
| 280 | switch (src_char) { | 280 | switch (src_char) { |
| 281 | case 0: | 281 | case 0: |
| 282 | put_unaligned_le16(0, &target[j]); | 282 | put_unaligned(0, &target[j]); |
| 283 | goto ctoUCS_out; | 283 | goto ctoUCS_out; |
| 284 | case ':': | 284 | case ':': |
| 285 | temp = UNI_COLON; | 285 | dst_char = cpu_to_le16(UNI_COLON); |
| 286 | break; | 286 | break; |
| 287 | case '*': | 287 | case '*': |
| 288 | temp = UNI_ASTERIK; | 288 | dst_char = cpu_to_le16(UNI_ASTERISK); |
| 289 | break; | 289 | break; |
| 290 | case '?': | 290 | case '?': |
| 291 | temp = UNI_QUESTION; | 291 | dst_char = cpu_to_le16(UNI_QUESTION); |
| 292 | break; | 292 | break; |
| 293 | case '<': | 293 | case '<': |
| 294 | temp = UNI_LESSTHAN; | 294 | dst_char = cpu_to_le16(UNI_LESSTHAN); |
| 295 | break; | 295 | break; |
| 296 | case '>': | 296 | case '>': |
| 297 | temp = UNI_GRTRTHAN; | 297 | dst_char = cpu_to_le16(UNI_GRTRTHAN); |
| 298 | break; | 298 | break; |
| 299 | case '|': | 299 | case '|': |
| 300 | temp = UNI_PIPE; | 300 | dst_char = cpu_to_le16(UNI_PIPE); |
| 301 | break; | 301 | break; |
| 302 | /* | 302 | /* |
| 303 | * FIXME: We can not handle remapping backslash (UNI_SLASH) | 303 | * FIXME: We can not handle remapping backslash (UNI_SLASH) |
| @@ -305,17 +305,17 @@ cifsConvertToUCS(__le16 *target, const char *source, int maxlen, | |||
| 305 | * as they use backslash as separator. | 305 | * as they use backslash as separator. |
| 306 | */ | 306 | */ |
| 307 | default: | 307 | default: |
| 308 | charlen = cp->char2uni(source+i, len_remaining, | 308 | charlen = cp->char2uni(source + i, srclen - i, &tmp); |
| 309 | &temp); | 309 | dst_char = cpu_to_le16(tmp); |
| 310 | |||
| 310 | /* | 311 | /* |
| 311 | * if no match, use question mark, which at least in | 312 | * if no match, use question mark, which at least in |
| 312 | * some cases serves as wild card | 313 | * some cases serves as wild card |
| 313 | */ | 314 | */ |
| 314 | if (charlen < 1) { | 315 | if (charlen < 1) { |
| 315 | temp = 0x003f; | 316 | dst_char = cpu_to_le16(0x003f); |
| 316 | charlen = 1; | 317 | charlen = 1; |
| 317 | } | 318 | } |
| 318 | len_remaining -= charlen; | ||
| 319 | /* | 319 | /* |
| 320 | * character may take more than one byte in the source | 320 | * character may take more than one byte in the source |
| 321 | * string, but will take exactly two bytes in the | 321 | * string, but will take exactly two bytes in the |
| @@ -324,9 +324,8 @@ cifsConvertToUCS(__le16 *target, const char *source, int maxlen, | |||
| 324 | i += charlen; | 324 | i += charlen; |
| 325 | continue; | 325 | continue; |
| 326 | } | 326 | } |
| 327 | put_unaligned_le16(temp, &target[j]); | 327 | put_unaligned(dst_char, &target[j]); |
| 328 | i++; /* move to next char in source string */ | 328 | i++; /* move to next char in source string */ |
| 329 | len_remaining--; | ||
| 330 | } | 329 | } |
| 331 | 330 | ||
| 332 | ctoUCS_out: | 331 | ctoUCS_out: |
diff --git a/fs/cifs/cifs_unicode.h b/fs/cifs/cifs_unicode.h index 7fe6b52df507..644dd882a560 100644 --- a/fs/cifs/cifs_unicode.h +++ b/fs/cifs/cifs_unicode.h | |||
| @@ -44,7 +44,7 @@ | |||
| 44 | * reserved symbols (along with \ and /), otherwise illegal to store | 44 | * reserved symbols (along with \ and /), otherwise illegal to store |
| 45 | * in filenames in NTFS | 45 | * in filenames in NTFS |
| 46 | */ | 46 | */ |
| 47 | #define UNI_ASTERIK (__u16) ('*' + 0xF000) | 47 | #define UNI_ASTERISK (__u16) ('*' + 0xF000) |
| 48 | #define UNI_QUESTION (__u16) ('?' + 0xF000) | 48 | #define UNI_QUESTION (__u16) ('?' + 0xF000) |
| 49 | #define UNI_COLON (__u16) (':' + 0xF000) | 49 | #define UNI_COLON (__u16) (':' + 0xF000) |
| 50 | #define UNI_GRTRTHAN (__u16) ('>' + 0xF000) | 50 | #define UNI_GRTRTHAN (__u16) ('>' + 0xF000) |
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c index a51585f9852b..d1a016be73ba 100644 --- a/fs/cifs/cifsencrypt.c +++ b/fs/cifs/cifsencrypt.c | |||
| @@ -30,12 +30,13 @@ | |||
| 30 | #include <linux/ctype.h> | 30 | #include <linux/ctype.h> |
| 31 | #include <linux/random.h> | 31 | #include <linux/random.h> |
| 32 | 32 | ||
| 33 | /* Calculate and return the CIFS signature based on the mac key and SMB PDU */ | 33 | /* |
| 34 | /* the 16 byte signature must be allocated by the caller */ | 34 | * Calculate and return the CIFS signature based on the mac key and SMB PDU. |
| 35 | /* Note we only use the 1st eight bytes */ | 35 | * The 16 byte signature must be allocated by the caller. Note we only use the |
| 36 | /* Note that the smb header signature field on input contains the | 36 | * 1st eight bytes and that the smb header signature field on input contains |
| 37 | sequence number before this function is called */ | 37 | * the sequence number before this function is called. Also, this function |
| 38 | 38 | * should be called with the server->srv_mutex held. | |
| 39 | */ | ||
| 39 | static int cifs_calculate_signature(const struct smb_hdr *cifs_pdu, | 40 | static int cifs_calculate_signature(const struct smb_hdr *cifs_pdu, |
| 40 | struct TCP_Server_Info *server, char *signature) | 41 | struct TCP_Server_Info *server, char *signature) |
| 41 | { | 42 | { |
| @@ -209,8 +210,10 @@ int cifs_verify_signature(struct smb_hdr *cifs_pdu, | |||
| 209 | cpu_to_le32(expected_sequence_number); | 210 | cpu_to_le32(expected_sequence_number); |
| 210 | cifs_pdu->Signature.Sequence.Reserved = 0; | 211 | cifs_pdu->Signature.Sequence.Reserved = 0; |
| 211 | 212 | ||
| 213 | mutex_lock(&server->srv_mutex); | ||
| 212 | rc = cifs_calculate_signature(cifs_pdu, server, | 214 | rc = cifs_calculate_signature(cifs_pdu, server, |
| 213 | what_we_think_sig_should_be); | 215 | what_we_think_sig_should_be); |
| 216 | mutex_unlock(&server->srv_mutex); | ||
| 214 | 217 | ||
| 215 | if (rc) | 218 | if (rc) |
| 216 | return rc; | 219 | return rc; |
| @@ -469,15 +472,15 @@ static int calc_ntlmv2_hash(struct cifsSesInfo *ses, char *ntlmv2_hash, | |||
| 469 | return rc; | 472 | return rc; |
| 470 | } | 473 | } |
| 471 | 474 | ||
| 472 | /* convert ses->userName to unicode and uppercase */ | 475 | /* convert ses->user_name to unicode and uppercase */ |
| 473 | len = strlen(ses->userName); | 476 | len = strlen(ses->user_name); |
| 474 | user = kmalloc(2 + (len * 2), GFP_KERNEL); | 477 | user = kmalloc(2 + (len * 2), GFP_KERNEL); |
| 475 | if (user == NULL) { | 478 | if (user == NULL) { |
| 476 | cERROR(1, "calc_ntlmv2_hash: user mem alloc failure\n"); | 479 | cERROR(1, "calc_ntlmv2_hash: user mem alloc failure\n"); |
| 477 | rc = -ENOMEM; | 480 | rc = -ENOMEM; |
| 478 | goto calc_exit_2; | 481 | goto calc_exit_2; |
| 479 | } | 482 | } |
| 480 | len = cifs_strtoUCS((__le16 *)user, ses->userName, len, nls_cp); | 483 | len = cifs_strtoUCS((__le16 *)user, ses->user_name, len, nls_cp); |
| 481 | UniStrupr(user); | 484 | UniStrupr(user); |
| 482 | 485 | ||
| 483 | crypto_shash_update(&ses->server->secmech.sdeschmacmd5->shash, | 486 | crypto_shash_update(&ses->server->secmech.sdeschmacmd5->shash, |
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index f2970136d17d..5c412b33cd7c 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
| @@ -53,7 +53,6 @@ int cifsFYI = 0; | |||
| 53 | int cifsERROR = 1; | 53 | int cifsERROR = 1; |
| 54 | int traceSMB = 0; | 54 | int traceSMB = 0; |
| 55 | unsigned int oplockEnabled = 1; | 55 | unsigned int oplockEnabled = 1; |
| 56 | unsigned int experimEnabled = 0; | ||
| 57 | unsigned int linuxExtEnabled = 1; | 56 | unsigned int linuxExtEnabled = 1; |
| 58 | unsigned int lookupCacheEnabled = 1; | 57 | unsigned int lookupCacheEnabled = 1; |
| 59 | unsigned int multiuser_mount = 0; | 58 | unsigned int multiuser_mount = 0; |
| @@ -127,6 +126,7 @@ cifs_read_super(struct super_block *sb, void *data, | |||
| 127 | kfree(cifs_sb); | 126 | kfree(cifs_sb); |
| 128 | return rc; | 127 | return rc; |
| 129 | } | 128 | } |
| 129 | cifs_sb->bdi.ra_pages = default_backing_dev_info.ra_pages; | ||
| 130 | 130 | ||
| 131 | #ifdef CONFIG_CIFS_DFS_UPCALL | 131 | #ifdef CONFIG_CIFS_DFS_UPCALL |
| 132 | /* copy mount params to sb for use in submounts */ | 132 | /* copy mount params to sb for use in submounts */ |
| @@ -409,8 +409,8 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m) | |||
| 409 | 409 | ||
| 410 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MULTIUSER) | 410 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MULTIUSER) |
| 411 | seq_printf(s, ",multiuser"); | 411 | seq_printf(s, ",multiuser"); |
| 412 | else if (tcon->ses->userName) | 412 | else if (tcon->ses->user_name) |
| 413 | seq_printf(s, ",username=%s", tcon->ses->userName); | 413 | seq_printf(s, ",username=%s", tcon->ses->user_name); |
| 414 | 414 | ||
| 415 | if (tcon->ses->domainName) | 415 | if (tcon->ses->domainName) |
| 416 | seq_printf(s, ",domain=%s", tcon->ses->domainName); | 416 | seq_printf(s, ",domain=%s", tcon->ses->domainName); |
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 17afb0fbcaed..a5d1106fcbde 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
| @@ -37,10 +37,9 @@ | |||
| 37 | 37 | ||
| 38 | #define MAX_TREE_SIZE (2 + MAX_SERVER_SIZE + 1 + MAX_SHARE_SIZE + 1) | 38 | #define MAX_TREE_SIZE (2 + MAX_SERVER_SIZE + 1 + MAX_SHARE_SIZE + 1) |
| 39 | #define MAX_SERVER_SIZE 15 | 39 | #define MAX_SERVER_SIZE 15 |
| 40 | #define MAX_SHARE_SIZE 64 /* used to be 20, this should still be enough */ | 40 | #define MAX_SHARE_SIZE 80 |
| 41 | #define MAX_USERNAME_SIZE 32 /* 32 is to allow for 15 char names + null | 41 | #define MAX_USERNAME_SIZE 256 /* reasonable maximum for current servers */ |
| 42 | termination then *2 for unicode versions */ | 42 | #define MAX_PASSWORD_SIZE 512 /* max for windows seems to be 256 wide chars */ |
| 43 | #define MAX_PASSWORD_SIZE 512 /* max for windows seems to be 256 wide chars */ | ||
| 44 | 43 | ||
| 45 | #define CIFS_MIN_RCV_POOL 4 | 44 | #define CIFS_MIN_RCV_POOL 4 |
| 46 | 45 | ||
| @@ -92,7 +91,8 @@ enum statusEnum { | |||
| 92 | CifsNew = 0, | 91 | CifsNew = 0, |
| 93 | CifsGood, | 92 | CifsGood, |
| 94 | CifsExiting, | 93 | CifsExiting, |
| 95 | CifsNeedReconnect | 94 | CifsNeedReconnect, |
| 95 | CifsNeedNegotiate | ||
| 96 | }; | 96 | }; |
| 97 | 97 | ||
| 98 | enum securityEnum { | 98 | enum securityEnum { |
| @@ -274,7 +274,7 @@ struct cifsSesInfo { | |||
| 274 | int capabilities; | 274 | int capabilities; |
| 275 | char serverName[SERVER_NAME_LEN_WITH_NULL * 2]; /* BB make bigger for | 275 | char serverName[SERVER_NAME_LEN_WITH_NULL * 2]; /* BB make bigger for |
| 276 | TCP names - will ipv6 and sctp addresses fit? */ | 276 | TCP names - will ipv6 and sctp addresses fit? */ |
| 277 | char userName[MAX_USERNAME_SIZE + 1]; | 277 | char *user_name; |
| 278 | char *domainName; | 278 | char *domainName; |
| 279 | char *password; | 279 | char *password; |
| 280 | struct session_key auth_key; | 280 | struct session_key auth_key; |
| @@ -817,7 +817,6 @@ GLOBAL_EXTERN unsigned int multiuser_mount; /* if enabled allows new sessions | |||
| 817 | have the uid/password or Kerberos credential | 817 | have the uid/password or Kerberos credential |
| 818 | or equivalent for current user */ | 818 | or equivalent for current user */ |
| 819 | GLOBAL_EXTERN unsigned int oplockEnabled; | 819 | GLOBAL_EXTERN unsigned int oplockEnabled; |
| 820 | GLOBAL_EXTERN unsigned int experimEnabled; | ||
| 821 | GLOBAL_EXTERN unsigned int lookupCacheEnabled; | 820 | GLOBAL_EXTERN unsigned int lookupCacheEnabled; |
| 822 | GLOBAL_EXTERN unsigned int global_secflags; /* if on, session setup sent | 821 | GLOBAL_EXTERN unsigned int global_secflags; /* if on, session setup sent |
| 823 | with more secure ntlmssp2 challenge/resp */ | 822 | with more secure ntlmssp2 challenge/resp */ |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 904aa47e3515..df959bae6728 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
| @@ -142,9 +142,9 @@ cifs_reconnect_tcon(struct cifsTconInfo *tcon, int smb_command) | |||
| 142 | */ | 142 | */ |
| 143 | while (server->tcpStatus == CifsNeedReconnect) { | 143 | while (server->tcpStatus == CifsNeedReconnect) { |
| 144 | wait_event_interruptible_timeout(server->response_q, | 144 | wait_event_interruptible_timeout(server->response_q, |
| 145 | (server->tcpStatus == CifsGood), 10 * HZ); | 145 | (server->tcpStatus != CifsNeedReconnect), 10 * HZ); |
| 146 | 146 | ||
| 147 | /* is TCP session is reestablished now ?*/ | 147 | /* are we still trying to reconnect? */ |
| 148 | if (server->tcpStatus != CifsNeedReconnect) | 148 | if (server->tcpStatus != CifsNeedReconnect) |
| 149 | break; | 149 | break; |
| 150 | 150 | ||
| @@ -729,7 +729,7 @@ CIFSSMBEcho(struct TCP_Server_Info *server) | |||
| 729 | return rc; | 729 | return rc; |
| 730 | 730 | ||
| 731 | /* set up echo request */ | 731 | /* set up echo request */ |
| 732 | smb->hdr.Tid = cpu_to_le16(0xffff); | 732 | smb->hdr.Tid = 0xffff; |
| 733 | smb->hdr.WordCount = 1; | 733 | smb->hdr.WordCount = 1; |
| 734 | put_unaligned_le16(1, &smb->EchoCount); | 734 | put_unaligned_le16(1, &smb->EchoCount); |
| 735 | put_bcc_le(1, &smb->hdr); | 735 | put_bcc_le(1, &smb->hdr); |
| @@ -1884,10 +1884,10 @@ CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, | |||
| 1884 | __constant_cpu_to_le16(CIFS_WRLCK)) | 1884 | __constant_cpu_to_le16(CIFS_WRLCK)) |
| 1885 | pLockData->fl_type = F_WRLCK; | 1885 | pLockData->fl_type = F_WRLCK; |
| 1886 | 1886 | ||
| 1887 | pLockData->fl_start = parm_data->start; | 1887 | pLockData->fl_start = le64_to_cpu(parm_data->start); |
| 1888 | pLockData->fl_end = parm_data->start + | 1888 | pLockData->fl_end = pLockData->fl_start + |
| 1889 | parm_data->length - 1; | 1889 | le64_to_cpu(parm_data->length) - 1; |
| 1890 | pLockData->fl_pid = parm_data->pid; | 1890 | pLockData->fl_pid = le32_to_cpu(parm_data->pid); |
| 1891 | } | 1891 | } |
| 1892 | } | 1892 | } |
| 1893 | 1893 | ||
| @@ -5247,7 +5247,7 @@ cifs_fill_unix_set_info(FILE_UNIX_BASIC_INFO *data_offset, | |||
| 5247 | * Samba server ignores set of file size to zero due to bugs in some | 5247 | * Samba server ignores set of file size to zero due to bugs in some |
| 5248 | * older clients, but we should be precise - we use SetFileSize to | 5248 | * older clients, but we should be precise - we use SetFileSize to |
| 5249 | * set file size and do not want to truncate file size to zero | 5249 | * set file size and do not want to truncate file size to zero |
| 5250 | * accidently as happened on one Samba server beta by putting | 5250 | * accidentally as happened on one Samba server beta by putting |
| 5251 | * zero instead of -1 here | 5251 | * zero instead of -1 here |
| 5252 | */ | 5252 | */ |
| 5253 | data_offset->EndOfFile = cpu_to_le64(NO_CHANGE_64); | 5253 | data_offset->EndOfFile = cpu_to_le64(NO_CHANGE_64); |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 8d6c17ab593d..db9d55b507d0 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
| @@ -199,8 +199,7 @@ cifs_reconnect(struct TCP_Server_Info *server) | |||
| 199 | } | 199 | } |
| 200 | spin_unlock(&GlobalMid_Lock); | 200 | spin_unlock(&GlobalMid_Lock); |
| 201 | 201 | ||
| 202 | while ((server->tcpStatus != CifsExiting) && | 202 | while (server->tcpStatus == CifsNeedReconnect) { |
| 203 | (server->tcpStatus != CifsGood)) { | ||
| 204 | try_to_freeze(); | 203 | try_to_freeze(); |
| 205 | 204 | ||
| 206 | /* we should try only the port we connected to before */ | 205 | /* we should try only the port we connected to before */ |
| @@ -212,7 +211,7 @@ cifs_reconnect(struct TCP_Server_Info *server) | |||
| 212 | atomic_inc(&tcpSesReconnectCount); | 211 | atomic_inc(&tcpSesReconnectCount); |
| 213 | spin_lock(&GlobalMid_Lock); | 212 | spin_lock(&GlobalMid_Lock); |
| 214 | if (server->tcpStatus != CifsExiting) | 213 | if (server->tcpStatus != CifsExiting) |
| 215 | server->tcpStatus = CifsGood; | 214 | server->tcpStatus = CifsNeedNegotiate; |
| 216 | spin_unlock(&GlobalMid_Lock); | 215 | spin_unlock(&GlobalMid_Lock); |
| 217 | } | 216 | } |
| 218 | } | 217 | } |
| @@ -248,24 +247,24 @@ static int check2ndT2(struct smb_hdr *pSMB, unsigned int maxBufSize) | |||
| 248 | total_data_size = get_unaligned_le16(&pSMBt->t2_rsp.TotalDataCount); | 247 | total_data_size = get_unaligned_le16(&pSMBt->t2_rsp.TotalDataCount); |
| 249 | data_in_this_rsp = get_unaligned_le16(&pSMBt->t2_rsp.DataCount); | 248 | data_in_this_rsp = get_unaligned_le16(&pSMBt->t2_rsp.DataCount); |
| 250 | 249 | ||
| 251 | remaining = total_data_size - data_in_this_rsp; | 250 | if (total_data_size == data_in_this_rsp) |
| 252 | |||
| 253 | if (remaining == 0) | ||
| 254 | return 0; | 251 | return 0; |
| 255 | else if (remaining < 0) { | 252 | else if (total_data_size < data_in_this_rsp) { |
| 256 | cFYI(1, "total data %d smaller than data in frame %d", | 253 | cFYI(1, "total data %d smaller than data in frame %d", |
| 257 | total_data_size, data_in_this_rsp); | 254 | total_data_size, data_in_this_rsp); |
| 258 | return -EINVAL; | 255 | return -EINVAL; |
| 259 | } else { | ||
| 260 | cFYI(1, "missing %d bytes from transact2, check next response", | ||
| 261 | remaining); | ||
| 262 | if (total_data_size > maxBufSize) { | ||
| 263 | cERROR(1, "TotalDataSize %d is over maximum buffer %d", | ||
| 264 | total_data_size, maxBufSize); | ||
| 265 | return -EINVAL; | ||
| 266 | } | ||
| 267 | return remaining; | ||
| 268 | } | 256 | } |
| 257 | |||
| 258 | remaining = total_data_size - data_in_this_rsp; | ||
| 259 | |||
| 260 | cFYI(1, "missing %d bytes from transact2, check next response", | ||
| 261 | remaining); | ||
| 262 | if (total_data_size > maxBufSize) { | ||
| 263 | cERROR(1, "TotalDataSize %d is over maximum buffer %d", | ||
| 264 | total_data_size, maxBufSize); | ||
| 265 | return -EINVAL; | ||
| 266 | } | ||
| 267 | return remaining; | ||
| 269 | } | 268 | } |
| 270 | 269 | ||
| 271 | static int coalesce_t2(struct smb_hdr *psecond, struct smb_hdr *pTargetSMB) | 270 | static int coalesce_t2(struct smb_hdr *psecond, struct smb_hdr *pTargetSMB) |
| @@ -421,7 +420,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) | |||
| 421 | pdu_length = 4; /* enough to get RFC1001 header */ | 420 | pdu_length = 4; /* enough to get RFC1001 header */ |
| 422 | 421 | ||
| 423 | incomplete_rcv: | 422 | incomplete_rcv: |
| 424 | if (echo_retries > 0 && | 423 | if (echo_retries > 0 && server->tcpStatus == CifsGood && |
| 425 | time_after(jiffies, server->lstrp + | 424 | time_after(jiffies, server->lstrp + |
| 426 | (echo_retries * SMB_ECHO_INTERVAL))) { | 425 | (echo_retries * SMB_ECHO_INTERVAL))) { |
| 427 | cERROR(1, "Server %s has not responded in %d seconds. " | 426 | cERROR(1, "Server %s has not responded in %d seconds. " |
| @@ -881,7 +880,8 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
| 881 | /* null user, ie anonymous, authentication */ | 880 | /* null user, ie anonymous, authentication */ |
| 882 | vol->nullauth = 1; | 881 | vol->nullauth = 1; |
| 883 | } | 882 | } |
| 884 | if (strnlen(value, 200) < 200) { | 883 | if (strnlen(value, MAX_USERNAME_SIZE) < |
| 884 | MAX_USERNAME_SIZE) { | ||
| 885 | vol->username = value; | 885 | vol->username = value; |
| 886 | } else { | 886 | } else { |
| 887 | printk(KERN_WARNING "CIFS: username too long\n"); | 887 | printk(KERN_WARNING "CIFS: username too long\n"); |
| @@ -1472,7 +1472,7 @@ srcip_matches(struct sockaddr *srcaddr, struct sockaddr *rhs) | |||
| 1472 | static bool | 1472 | static bool |
| 1473 | match_port(struct TCP_Server_Info *server, struct sockaddr *addr) | 1473 | match_port(struct TCP_Server_Info *server, struct sockaddr *addr) |
| 1474 | { | 1474 | { |
| 1475 | unsigned short int port, *sport; | 1475 | __be16 port, *sport; |
| 1476 | 1476 | ||
| 1477 | switch (addr->sa_family) { | 1477 | switch (addr->sa_family) { |
| 1478 | case AF_INET: | 1478 | case AF_INET: |
| @@ -1572,7 +1572,7 @@ match_security(struct TCP_Server_Info *server, struct smb_vol *vol) | |||
| 1572 | return false; | 1572 | return false; |
| 1573 | } | 1573 | } |
| 1574 | 1574 | ||
| 1575 | /* now check if signing mode is acceptible */ | 1575 | /* now check if signing mode is acceptable */ |
| 1576 | if ((secFlags & CIFSSEC_MAY_SIGN) == 0 && | 1576 | if ((secFlags & CIFSSEC_MAY_SIGN) == 0 && |
| 1577 | (server->secMode & SECMODE_SIGN_REQUIRED)) | 1577 | (server->secMode & SECMODE_SIGN_REQUIRED)) |
| 1578 | return false; | 1578 | return false; |
| @@ -1765,6 +1765,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info) | |||
| 1765 | module_put(THIS_MODULE); | 1765 | module_put(THIS_MODULE); |
| 1766 | goto out_err_crypto_release; | 1766 | goto out_err_crypto_release; |
| 1767 | } | 1767 | } |
| 1768 | tcp_ses->tcpStatus = CifsNeedNegotiate; | ||
| 1768 | 1769 | ||
| 1769 | /* thread spawned, put it on the list */ | 1770 | /* thread spawned, put it on the list */ |
| 1770 | spin_lock(&cifs_tcp_ses_lock); | 1771 | spin_lock(&cifs_tcp_ses_lock); |
| @@ -1808,7 +1809,9 @@ cifs_find_smb_ses(struct TCP_Server_Info *server, struct smb_vol *vol) | |||
| 1808 | break; | 1809 | break; |
| 1809 | default: | 1810 | default: |
| 1810 | /* anything else takes username/password */ | 1811 | /* anything else takes username/password */ |
| 1811 | if (strncmp(ses->userName, vol->username, | 1812 | if (ses->user_name == NULL) |
| 1813 | continue; | ||
| 1814 | if (strncmp(ses->user_name, vol->username, | ||
| 1812 | MAX_USERNAME_SIZE)) | 1815 | MAX_USERNAME_SIZE)) |
| 1813 | continue; | 1816 | continue; |
| 1814 | if (strlen(vol->username) != 0 && | 1817 | if (strlen(vol->username) != 0 && |
| @@ -1851,6 +1854,8 @@ cifs_put_smb_ses(struct cifsSesInfo *ses) | |||
| 1851 | cifs_put_tcp_session(server); | 1854 | cifs_put_tcp_session(server); |
| 1852 | } | 1855 | } |
| 1853 | 1856 | ||
| 1857 | static bool warned_on_ntlm; /* globals init to false automatically */ | ||
| 1858 | |||
| 1854 | static struct cifsSesInfo * | 1859 | static struct cifsSesInfo * |
| 1855 | cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info) | 1860 | cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info) |
| 1856 | { | 1861 | { |
| @@ -1906,9 +1911,11 @@ cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info) | |||
| 1906 | else | 1911 | else |
| 1907 | sprintf(ses->serverName, "%pI4", &addr->sin_addr); | 1912 | sprintf(ses->serverName, "%pI4", &addr->sin_addr); |
| 1908 | 1913 | ||
| 1909 | if (volume_info->username) | 1914 | if (volume_info->username) { |
| 1910 | strncpy(ses->userName, volume_info->username, | 1915 | ses->user_name = kstrdup(volume_info->username, GFP_KERNEL); |
| 1911 | MAX_USERNAME_SIZE); | 1916 | if (!ses->user_name) |
| 1917 | goto get_ses_fail; | ||
| 1918 | } | ||
| 1912 | 1919 | ||
| 1913 | /* volume_info->password freed at unmount */ | 1920 | /* volume_info->password freed at unmount */ |
| 1914 | if (volume_info->password) { | 1921 | if (volume_info->password) { |
| @@ -1923,6 +1930,15 @@ cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info) | |||
| 1923 | } | 1930 | } |
| 1924 | ses->cred_uid = volume_info->cred_uid; | 1931 | ses->cred_uid = volume_info->cred_uid; |
| 1925 | ses->linux_uid = volume_info->linux_uid; | 1932 | ses->linux_uid = volume_info->linux_uid; |
| 1933 | |||
| 1934 | /* ntlmv2 is much stronger than ntlm security, and has been broadly | ||
| 1935 | supported for many years, time to update default security mechanism */ | ||
| 1936 | if ((volume_info->secFlg == 0) && warned_on_ntlm == false) { | ||
| 1937 | warned_on_ntlm = true; | ||
| 1938 | cERROR(1, "default security mechanism requested. The default " | ||
| 1939 | "security mechanism will be upgraded from ntlm to " | ||
| 1940 | "ntlmv2 in kernel release 2.6.41"); | ||
| 1941 | } | ||
| 1926 | ses->overrideSecFlg = volume_info->secFlg; | 1942 | ses->overrideSecFlg = volume_info->secFlg; |
| 1927 | 1943 | ||
| 1928 | mutex_lock(&ses->session_mutex); | 1944 | mutex_lock(&ses->session_mutex); |
| @@ -2276,7 +2292,7 @@ static int | |||
| 2276 | generic_ip_connect(struct TCP_Server_Info *server) | 2292 | generic_ip_connect(struct TCP_Server_Info *server) |
| 2277 | { | 2293 | { |
| 2278 | int rc = 0; | 2294 | int rc = 0; |
| 2279 | unsigned short int sport; | 2295 | __be16 sport; |
| 2280 | int slen, sfamily; | 2296 | int slen, sfamily; |
| 2281 | struct socket *socket = server->ssocket; | 2297 | struct socket *socket = server->ssocket; |
| 2282 | struct sockaddr *saddr; | 2298 | struct sockaddr *saddr; |
| @@ -2361,7 +2377,7 @@ generic_ip_connect(struct TCP_Server_Info *server) | |||
| 2361 | static int | 2377 | static int |
| 2362 | ip_connect(struct TCP_Server_Info *server) | 2378 | ip_connect(struct TCP_Server_Info *server) |
| 2363 | { | 2379 | { |
| 2364 | unsigned short int *sport; | 2380 | __be16 *sport; |
| 2365 | struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&server->dstaddr; | 2381 | struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&server->dstaddr; |
| 2366 | struct sockaddr_in *addr = (struct sockaddr_in *)&server->dstaddr; | 2382 | struct sockaddr_in *addr = (struct sockaddr_in *)&server->dstaddr; |
| 2367 | 2383 | ||
| @@ -2826,7 +2842,7 @@ try_mount_again: | |||
| 2826 | 2842 | ||
| 2827 | remote_path_check: | 2843 | remote_path_check: |
| 2828 | /* check if a whole path (including prepath) is not remote */ | 2844 | /* check if a whole path (including prepath) is not remote */ |
| 2829 | if (!rc && cifs_sb->prepathlen && tcon) { | 2845 | if (!rc && tcon) { |
| 2830 | /* build_path_to_root works only when we have a valid tcon */ | 2846 | /* build_path_to_root works only when we have a valid tcon */ |
| 2831 | full_path = cifs_build_path_to_root(cifs_sb, tcon); | 2847 | full_path = cifs_build_path_to_root(cifs_sb, tcon); |
| 2832 | if (full_path == NULL) { | 2848 | if (full_path == NULL) { |
| @@ -2933,7 +2949,7 @@ mount_fail_check: | |||
| 2933 | if (mount_data != mount_data_global) | 2949 | if (mount_data != mount_data_global) |
| 2934 | kfree(mount_data); | 2950 | kfree(mount_data); |
| 2935 | /* If find_unc succeeded then rc == 0 so we can not end */ | 2951 | /* If find_unc succeeded then rc == 0 so we can not end */ |
| 2936 | /* up accidently freeing someone elses tcon struct */ | 2952 | /* up accidentally freeing someone elses tcon struct */ |
| 2937 | if (tcon) | 2953 | if (tcon) |
| 2938 | cifs_put_tcon(tcon); | 2954 | cifs_put_tcon(tcon); |
| 2939 | else if (pSesInfo) | 2955 | else if (pSesInfo) |
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index dd5f22918c33..9ea65cf36714 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
| @@ -189,7 +189,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |||
| 189 | inode->i_sb, mode, oflags, &oplock, &fileHandle, xid); | 189 | inode->i_sb, mode, oflags, &oplock, &fileHandle, xid); |
| 190 | /* EIO could indicate that (posix open) operation is not | 190 | /* EIO could indicate that (posix open) operation is not |
| 191 | supported, despite what server claimed in capability | 191 | supported, despite what server claimed in capability |
| 192 | negotation. EREMOTE indicates DFS junction, which is not | 192 | negotiation. EREMOTE indicates DFS junction, which is not |
| 193 | handled in posix open */ | 193 | handled in posix open */ |
| 194 | 194 | ||
| 195 | if (rc == 0) { | 195 | if (rc == 0) { |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index c27d236738fc..faf59529e847 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
| @@ -575,8 +575,10 @@ reopen_error_exit: | |||
| 575 | 575 | ||
| 576 | int cifs_close(struct inode *inode, struct file *file) | 576 | int cifs_close(struct inode *inode, struct file *file) |
| 577 | { | 577 | { |
| 578 | cifsFileInfo_put(file->private_data); | 578 | if (file->private_data != NULL) { |
| 579 | file->private_data = NULL; | 579 | cifsFileInfo_put(file->private_data); |
| 580 | file->private_data = NULL; | ||
| 581 | } | ||
| 580 | 582 | ||
| 581 | /* return code from the ->release op is always ignored */ | 583 | /* return code from the ->release op is always ignored */ |
| 582 | return 0; | 584 | return 0; |
| @@ -970,6 +972,9 @@ static ssize_t cifs_write(struct cifsFileInfo *open_file, | |||
| 970 | total_written += bytes_written) { | 972 | total_written += bytes_written) { |
| 971 | rc = -EAGAIN; | 973 | rc = -EAGAIN; |
| 972 | while (rc == -EAGAIN) { | 974 | while (rc == -EAGAIN) { |
| 975 | struct kvec iov[2]; | ||
| 976 | unsigned int len; | ||
| 977 | |||
| 973 | if (open_file->invalidHandle) { | 978 | if (open_file->invalidHandle) { |
| 974 | /* we could deadlock if we called | 979 | /* we could deadlock if we called |
| 975 | filemap_fdatawait from here so tell | 980 | filemap_fdatawait from here so tell |
| @@ -979,31 +984,14 @@ static ssize_t cifs_write(struct cifsFileInfo *open_file, | |||
| 979 | if (rc != 0) | 984 | if (rc != 0) |
| 980 | break; | 985 | break; |
| 981 | } | 986 | } |
| 982 | if (experimEnabled || (pTcon->ses->server && | 987 | |
| 983 | ((pTcon->ses->server->secMode & | 988 | len = min((size_t)cifs_sb->wsize, |
| 984 | (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) | 989 | write_size - total_written); |
| 985 | == 0))) { | 990 | /* iov[0] is reserved for smb header */ |
| 986 | struct kvec iov[2]; | 991 | iov[1].iov_base = (char *)write_data + total_written; |
| 987 | unsigned int len; | 992 | iov[1].iov_len = len; |
| 988 | 993 | rc = CIFSSMBWrite2(xid, pTcon, open_file->netfid, len, | |
| 989 | len = min((size_t)cifs_sb->wsize, | 994 | *poffset, &bytes_written, iov, 1, 0); |
| 990 | write_size - total_written); | ||
| 991 | /* iov[0] is reserved for smb header */ | ||
| 992 | iov[1].iov_base = (char *)write_data + | ||
| 993 | total_written; | ||
| 994 | iov[1].iov_len = len; | ||
| 995 | rc = CIFSSMBWrite2(xid, pTcon, | ||
| 996 | open_file->netfid, len, | ||
| 997 | *poffset, &bytes_written, | ||
| 998 | iov, 1, 0); | ||
| 999 | } else | ||
| 1000 | rc = CIFSSMBWrite(xid, pTcon, | ||
| 1001 | open_file->netfid, | ||
| 1002 | min_t(const int, cifs_sb->wsize, | ||
| 1003 | write_size - total_written), | ||
| 1004 | *poffset, &bytes_written, | ||
| 1005 | write_data + total_written, | ||
| 1006 | NULL, 0); | ||
| 1007 | } | 995 | } |
| 1008 | if (rc || (bytes_written == 0)) { | 996 | if (rc || (bytes_written == 0)) { |
| 1009 | if (total_written) | 997 | if (total_written) |
| @@ -1240,12 +1228,6 @@ static int cifs_writepages(struct address_space *mapping, | |||
| 1240 | } | 1228 | } |
| 1241 | 1229 | ||
| 1242 | tcon = tlink_tcon(open_file->tlink); | 1230 | tcon = tlink_tcon(open_file->tlink); |
| 1243 | if (!experimEnabled && tcon->ses->server->secMode & | ||
| 1244 | (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) { | ||
| 1245 | cifsFileInfo_put(open_file); | ||
| 1246 | kfree(iov); | ||
| 1247 | return generic_writepages(mapping, wbc); | ||
| 1248 | } | ||
| 1249 | cifsFileInfo_put(open_file); | 1231 | cifsFileInfo_put(open_file); |
| 1250 | 1232 | ||
| 1251 | xid = GetXid(); | 1233 | xid = GetXid(); |
| @@ -1980,6 +1962,24 @@ static ssize_t cifs_read(struct file *file, char *read_data, size_t read_size, | |||
| 1980 | return total_read; | 1962 | return total_read; |
| 1981 | } | 1963 | } |
| 1982 | 1964 | ||
| 1965 | /* | ||
| 1966 | * If the page is mmap'ed into a process' page tables, then we need to make | ||
| 1967 | * sure that it doesn't change while being written back. | ||
| 1968 | */ | ||
| 1969 | static int | ||
| 1970 | cifs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) | ||
| 1971 | { | ||
| 1972 | struct page *page = vmf->page; | ||
| 1973 | |||
| 1974 | lock_page(page); | ||
| 1975 | return VM_FAULT_LOCKED; | ||
| 1976 | } | ||
| 1977 | |||
| 1978 | static struct vm_operations_struct cifs_file_vm_ops = { | ||
| 1979 | .fault = filemap_fault, | ||
| 1980 | .page_mkwrite = cifs_page_mkwrite, | ||
| 1981 | }; | ||
| 1982 | |||
| 1983 | int cifs_file_strict_mmap(struct file *file, struct vm_area_struct *vma) | 1983 | int cifs_file_strict_mmap(struct file *file, struct vm_area_struct *vma) |
| 1984 | { | 1984 | { |
| 1985 | int rc, xid; | 1985 | int rc, xid; |
| @@ -1991,6 +1991,8 @@ int cifs_file_strict_mmap(struct file *file, struct vm_area_struct *vma) | |||
| 1991 | cifs_invalidate_mapping(inode); | 1991 | cifs_invalidate_mapping(inode); |
| 1992 | 1992 | ||
| 1993 | rc = generic_file_mmap(file, vma); | 1993 | rc = generic_file_mmap(file, vma); |
| 1994 | if (rc == 0) | ||
| 1995 | vma->vm_ops = &cifs_file_vm_ops; | ||
| 1994 | FreeXid(xid); | 1996 | FreeXid(xid); |
| 1995 | return rc; | 1997 | return rc; |
| 1996 | } | 1998 | } |
| @@ -2007,6 +2009,8 @@ int cifs_file_mmap(struct file *file, struct vm_area_struct *vma) | |||
| 2007 | return rc; | 2009 | return rc; |
| 2008 | } | 2010 | } |
| 2009 | rc = generic_file_mmap(file, vma); | 2011 | rc = generic_file_mmap(file, vma); |
| 2012 | if (rc == 0) | ||
| 2013 | vma->vm_ops = &cifs_file_vm_ops; | ||
| 2010 | FreeXid(xid); | 2014 | FreeXid(xid); |
| 2011 | return rc; | 2015 | return rc; |
| 2012 | } | 2016 | } |
diff --git a/fs/cifs/link.c b/fs/cifs/link.c index e8804d373404..ce417a9764a3 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c | |||
| @@ -239,7 +239,7 @@ CIFSQueryMFSymLink(const int xid, struct cifsTconInfo *tcon, | |||
| 239 | if (rc != 0) | 239 | if (rc != 0) |
| 240 | return rc; | 240 | return rc; |
| 241 | 241 | ||
| 242 | if (file_info.EndOfFile != CIFS_MF_SYMLINK_FILE_SIZE) { | 242 | if (file_info.EndOfFile != cpu_to_le64(CIFS_MF_SYMLINK_FILE_SIZE)) { |
| 243 | CIFSSMBClose(xid, tcon, netfid); | 243 | CIFSSMBClose(xid, tcon, netfid); |
| 244 | /* it's not a symlink */ | 244 | /* it's not a symlink */ |
| 245 | return -EINVAL; | 245 | return -EINVAL; |
| @@ -316,7 +316,7 @@ CIFSCheckMFSymlink(struct cifs_fattr *fattr, | |||
| 316 | if (rc != 0) | 316 | if (rc != 0) |
| 317 | goto out; | 317 | goto out; |
| 318 | 318 | ||
| 319 | if (file_info.EndOfFile != CIFS_MF_SYMLINK_FILE_SIZE) { | 319 | if (file_info.EndOfFile != cpu_to_le64(CIFS_MF_SYMLINK_FILE_SIZE)) { |
| 320 | CIFSSMBClose(xid, pTcon, netfid); | 320 | CIFSSMBClose(xid, pTcon, netfid); |
| 321 | /* it's not a symlink */ | 321 | /* it's not a symlink */ |
| 322 | goto out; | 322 | goto out; |
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index 2a930a752a78..0c684ae4c071 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c | |||
| @@ -100,6 +100,7 @@ sesInfoFree(struct cifsSesInfo *buf_to_free) | |||
| 100 | memset(buf_to_free->password, 0, strlen(buf_to_free->password)); | 100 | memset(buf_to_free->password, 0, strlen(buf_to_free->password)); |
| 101 | kfree(buf_to_free->password); | 101 | kfree(buf_to_free->password); |
| 102 | } | 102 | } |
| 103 | kfree(buf_to_free->user_name); | ||
| 103 | kfree(buf_to_free->domainName); | 104 | kfree(buf_to_free->domainName); |
| 104 | kfree(buf_to_free); | 105 | kfree(buf_to_free); |
| 105 | } | 106 | } |
| @@ -520,7 +521,7 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) | |||
| 520 | (struct smb_com_transaction_change_notify_rsp *)buf; | 521 | (struct smb_com_transaction_change_notify_rsp *)buf; |
| 521 | struct file_notify_information *pnotify; | 522 | struct file_notify_information *pnotify; |
| 522 | __u32 data_offset = 0; | 523 | __u32 data_offset = 0; |
| 523 | if (pSMBr->ByteCount > sizeof(struct file_notify_information)) { | 524 | if (get_bcc_le(buf) > sizeof(struct file_notify_information)) { |
| 524 | data_offset = le32_to_cpu(pSMBr->DataOffset); | 525 | data_offset = le32_to_cpu(pSMBr->DataOffset); |
| 525 | 526 | ||
| 526 | pnotify = (struct file_notify_information *) | 527 | pnotify = (struct file_notify_information *) |
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index 16765703131b..f6728eb6f4b9 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c | |||
| @@ -219,12 +219,12 @@ static void unicode_ssetup_strings(char **pbcc_area, struct cifsSesInfo *ses, | |||
| 219 | bcc_ptr++; | 219 | bcc_ptr++; |
| 220 | } */ | 220 | } */ |
| 221 | /* copy user */ | 221 | /* copy user */ |
| 222 | if (ses->userName == NULL) { | 222 | if (ses->user_name == NULL) { |
| 223 | /* null user mount */ | 223 | /* null user mount */ |
| 224 | *bcc_ptr = 0; | 224 | *bcc_ptr = 0; |
| 225 | *(bcc_ptr+1) = 0; | 225 | *(bcc_ptr+1) = 0; |
| 226 | } else { | 226 | } else { |
| 227 | bytes_ret = cifs_strtoUCS((__le16 *) bcc_ptr, ses->userName, | 227 | bytes_ret = cifs_strtoUCS((__le16 *) bcc_ptr, ses->user_name, |
| 228 | MAX_USERNAME_SIZE, nls_cp); | 228 | MAX_USERNAME_SIZE, nls_cp); |
| 229 | } | 229 | } |
| 230 | bcc_ptr += 2 * bytes_ret; | 230 | bcc_ptr += 2 * bytes_ret; |
| @@ -244,12 +244,11 @@ static void ascii_ssetup_strings(char **pbcc_area, struct cifsSesInfo *ses, | |||
| 244 | /* copy user */ | 244 | /* copy user */ |
| 245 | /* BB what about null user mounts - check that we do this BB */ | 245 | /* BB what about null user mounts - check that we do this BB */ |
| 246 | /* copy user */ | 246 | /* copy user */ |
| 247 | if (ses->userName == NULL) { | 247 | if (ses->user_name != NULL) |
| 248 | /* BB what about null user mounts - check that we do this BB */ | 248 | strncpy(bcc_ptr, ses->user_name, MAX_USERNAME_SIZE); |
| 249 | } else { | 249 | /* else null user mount */ |
| 250 | strncpy(bcc_ptr, ses->userName, MAX_USERNAME_SIZE); | 250 | |
| 251 | } | 251 | bcc_ptr += strnlen(ses->user_name, MAX_USERNAME_SIZE); |
| 252 | bcc_ptr += strnlen(ses->userName, MAX_USERNAME_SIZE); | ||
| 253 | *bcc_ptr = 0; | 252 | *bcc_ptr = 0; |
| 254 | bcc_ptr++; /* account for null termination */ | 253 | bcc_ptr++; /* account for null termination */ |
| 255 | 254 | ||
| @@ -405,8 +404,8 @@ static int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len, | |||
| 405 | /* BB spec says that if AvId field of MsvAvTimestamp is populated then | 404 | /* BB spec says that if AvId field of MsvAvTimestamp is populated then |
| 406 | we must set the MIC field of the AUTHENTICATE_MESSAGE */ | 405 | we must set the MIC field of the AUTHENTICATE_MESSAGE */ |
| 407 | ses->ntlmssp->server_flags = le32_to_cpu(pblob->NegotiateFlags); | 406 | ses->ntlmssp->server_flags = le32_to_cpu(pblob->NegotiateFlags); |
| 408 | tioffset = cpu_to_le16(pblob->TargetInfoArray.BufferOffset); | 407 | tioffset = le32_to_cpu(pblob->TargetInfoArray.BufferOffset); |
| 409 | tilen = cpu_to_le16(pblob->TargetInfoArray.Length); | 408 | tilen = le16_to_cpu(pblob->TargetInfoArray.Length); |
| 410 | if (tilen) { | 409 | if (tilen) { |
| 411 | ses->auth_key.response = kmalloc(tilen, GFP_KERNEL); | 410 | ses->auth_key.response = kmalloc(tilen, GFP_KERNEL); |
| 412 | if (!ses->auth_key.response) { | 411 | if (!ses->auth_key.response) { |
| @@ -523,14 +522,14 @@ static int build_ntlmssp_auth_blob(unsigned char *pbuffer, | |||
| 523 | tmp += len; | 522 | tmp += len; |
| 524 | } | 523 | } |
| 525 | 524 | ||
| 526 | if (ses->userName == NULL) { | 525 | if (ses->user_name == NULL) { |
| 527 | sec_blob->UserName.BufferOffset = cpu_to_le32(tmp - pbuffer); | 526 | sec_blob->UserName.BufferOffset = cpu_to_le32(tmp - pbuffer); |
| 528 | sec_blob->UserName.Length = 0; | 527 | sec_blob->UserName.Length = 0; |
| 529 | sec_blob->UserName.MaximumLength = 0; | 528 | sec_blob->UserName.MaximumLength = 0; |
| 530 | tmp += 2; | 529 | tmp += 2; |
| 531 | } else { | 530 | } else { |
| 532 | int len; | 531 | int len; |
| 533 | len = cifs_strtoUCS((__le16 *)tmp, ses->userName, | 532 | len = cifs_strtoUCS((__le16 *)tmp, ses->user_name, |
| 534 | MAX_USERNAME_SIZE, nls_cp); | 533 | MAX_USERNAME_SIZE, nls_cp); |
| 535 | len *= 2; /* unicode is 2 bytes each */ | 534 | len *= 2; /* unicode is 2 bytes each */ |
| 536 | sec_blob->UserName.BufferOffset = cpu_to_le32(tmp - pbuffer); | 535 | sec_blob->UserName.BufferOffset = cpu_to_le32(tmp - pbuffer); |
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c index 90ff3cb10de3..3313dd19f543 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c | |||
| @@ -990,7 +990,7 @@ static int configfs_dump(struct configfs_dirent *sd, int level) | |||
| 990 | * This describes these functions and their helpers. | 990 | * This describes these functions and their helpers. |
| 991 | * | 991 | * |
| 992 | * Allow another kernel system to depend on a config_item. If this | 992 | * Allow another kernel system to depend on a config_item. If this |
| 993 | * happens, the item cannot go away until the dependant can live without | 993 | * happens, the item cannot go away until the dependent can live without |
| 994 | * it. The idea is to give client modules as simple an interface as | 994 | * it. The idea is to give client modules as simple an interface as |
| 995 | * possible. When a system asks them to depend on an item, they just | 995 | * possible. When a system asks them to depend on an item, they just |
| 996 | * call configfs_depend_item(). If the item is live and the client | 996 | * call configfs_depend_item(). If the item is live and the client |
diff --git a/fs/dcache.c b/fs/dcache.c index ad25c4cec7d5..129a35730994 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
| @@ -2131,7 +2131,7 @@ EXPORT_SYMBOL(d_rehash); | |||
| 2131 | */ | 2131 | */ |
| 2132 | void dentry_update_name_case(struct dentry *dentry, struct qstr *name) | 2132 | void dentry_update_name_case(struct dentry *dentry, struct qstr *name) |
| 2133 | { | 2133 | { |
| 2134 | BUG_ON(!mutex_is_locked(&dentry->d_inode->i_mutex)); | 2134 | BUG_ON(!mutex_is_locked(&dentry->d_parent->d_inode->i_mutex)); |
| 2135 | BUG_ON(dentry->d_name.len != name->len); /* d_lookup gives this */ | 2135 | BUG_ON(dentry->d_name.len != name->len); /* d_lookup gives this */ |
| 2136 | 2136 | ||
| 2137 | spin_lock(&dentry->d_lock); | 2137 | spin_lock(&dentry->d_lock); |
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 04b8c449303f..56d6bfcc1e48 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c | |||
| @@ -519,7 +519,7 @@ static void toss_rsb(struct kref *kref) | |||
| 519 | } | 519 | } |
| 520 | } | 520 | } |
| 521 | 521 | ||
| 522 | /* When all references to the rsb are gone it's transfered to | 522 | /* When all references to the rsb are gone it's transferred to |
| 523 | the tossed list for later disposal. */ | 523 | the tossed list for later disposal. */ |
| 524 | 524 | ||
| 525 | static void put_rsb(struct dlm_rsb *r) | 525 | static void put_rsb(struct dlm_rsb *r) |
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index bffa1e73b9a9..5e2c71f05e46 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c | |||
| @@ -810,7 +810,7 @@ static int tcp_accept_from_sock(struct connection *con) | |||
| 810 | 810 | ||
| 811 | /* | 811 | /* |
| 812 | * Add it to the active queue in case we got data | 812 | * Add it to the active queue in case we got data |
| 813 | * beween processing the accept adding the socket | 813 | * between processing the accept adding the socket |
| 814 | * to the read_sockets list | 814 | * to the read_sockets list |
| 815 | */ | 815 | */ |
| 816 | if (!test_and_set_bit(CF_READ_PENDING, &addcon->flags)) | 816 | if (!test_and_set_bit(CF_READ_PENDING, &addcon->flags)) |
diff --git a/fs/dlm/recover.c b/fs/dlm/recover.c index eda43f362616..14638235f7b2 100644 --- a/fs/dlm/recover.c +++ b/fs/dlm/recover.c | |||
| @@ -304,7 +304,7 @@ static void set_master_lkbs(struct dlm_rsb *r) | |||
| 304 | } | 304 | } |
| 305 | 305 | ||
| 306 | /* | 306 | /* |
| 307 | * Propogate the new master nodeid to locks | 307 | * Propagate the new master nodeid to locks |
| 308 | * The NEW_MASTER flag tells dlm_recover_locks() which rsb's to consider. | 308 | * The NEW_MASTER flag tells dlm_recover_locks() which rsb's to consider. |
| 309 | * The NEW_MASTER2 flag tells recover_lvb() and set_locks_purged() which | 309 | * The NEW_MASTER2 flag tells recover_lvb() and set_locks_purged() which |
| 310 | * rsb's to consider. | 310 | * rsb's to consider. |
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index c27c0ecf90bc..fdb2eb0ad09e 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c | |||
| @@ -276,7 +276,7 @@ static void ecryptfs_init_mount_crypt_stat( | |||
| 276 | /** | 276 | /** |
| 277 | * ecryptfs_parse_options | 277 | * ecryptfs_parse_options |
| 278 | * @sb: The ecryptfs super block | 278 | * @sb: The ecryptfs super block |
| 279 | * @options: The options pased to the kernel | 279 | * @options: The options passed to the kernel |
| 280 | * | 280 | * |
| 281 | * Parse mount options: | 281 | * Parse mount options: |
| 282 | * debug=N - ecryptfs_verbosity level for debug output | 282 | * debug=N - ecryptfs_verbosity level for debug output |
| @@ -840,7 +840,7 @@ static int __init ecryptfs_init(void) | |||
| 840 | } | 840 | } |
| 841 | rc = ecryptfs_init_messaging(); | 841 | rc = ecryptfs_init_messaging(); |
| 842 | if (rc) { | 842 | if (rc) { |
| 843 | printk(KERN_ERR "Failure occured while attempting to " | 843 | printk(KERN_ERR "Failure occurred while attempting to " |
| 844 | "initialize the communications channel to " | 844 | "initialize the communications channel to " |
| 845 | "ecryptfsd\n"); | 845 | "ecryptfsd\n"); |
| 846 | goto out_destroy_kthread; | 846 | goto out_destroy_kthread; |
diff --git a/fs/eventpoll.c b/fs/eventpoll.c index ed38801b57a7..f9cfd168fbe2 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c | |||
| @@ -181,7 +181,7 @@ struct eventpoll { | |||
| 181 | 181 | ||
| 182 | /* | 182 | /* |
| 183 | * This is a single linked list that chains all the "struct epitem" that | 183 | * This is a single linked list that chains all the "struct epitem" that |
| 184 | * happened while transfering ready events to userspace w/out | 184 | * happened while transferring ready events to userspace w/out |
| 185 | * holding ->lock. | 185 | * holding ->lock. |
| 186 | */ | 186 | */ |
| 187 | struct epitem *ovflist; | 187 | struct epitem *ovflist; |
| @@ -606,7 +606,7 @@ static void ep_free(struct eventpoll *ep) | |||
| 606 | * We do not need to hold "ep->mtx" here because the epoll file | 606 | * We do not need to hold "ep->mtx" here because the epoll file |
| 607 | * is on the way to be removed and no one has references to it | 607 | * is on the way to be removed and no one has references to it |
| 608 | * anymore. The only hit might come from eventpoll_release_file() but | 608 | * anymore. The only hit might come from eventpoll_release_file() but |
| 609 | * holding "epmutex" is sufficent here. | 609 | * holding "epmutex" is sufficient here. |
| 610 | */ | 610 | */ |
| 611 | mutex_lock(&epmutex); | 611 | mutex_lock(&epmutex); |
| 612 | 612 | ||
| @@ -720,7 +720,7 @@ void eventpoll_release_file(struct file *file) | |||
| 720 | /* | 720 | /* |
| 721 | * We don't want to get "file->f_lock" because it is not | 721 | * We don't want to get "file->f_lock" because it is not |
| 722 | * necessary. It is not necessary because we're in the "struct file" | 722 | * necessary. It is not necessary because we're in the "struct file" |
| 723 | * cleanup path, and this means that noone is using this file anymore. | 723 | * cleanup path, and this means that no one is using this file anymore. |
| 724 | * So, for example, epoll_ctl() cannot hit here since if we reach this | 724 | * So, for example, epoll_ctl() cannot hit here since if we reach this |
| 725 | * point, the file counter already went to zero and fget() would fail. | 725 | * point, the file counter already went to zero and fget() would fail. |
| 726 | * The only hit might come from ep_free() but by holding the mutex | 726 | * The only hit might come from ep_free() but by holding the mutex |
| @@ -1112,7 +1112,7 @@ static int ep_send_events_proc(struct eventpoll *ep, struct list_head *head, | |||
| 1112 | * Trigger mode, we need to insert back inside | 1112 | * Trigger mode, we need to insert back inside |
| 1113 | * the ready list, so that the next call to | 1113 | * the ready list, so that the next call to |
| 1114 | * epoll_wait() will check again the events | 1114 | * epoll_wait() will check again the events |
| 1115 | * availability. At this point, noone can insert | 1115 | * availability. At this point, no one can insert |
| 1116 | * into ep->rdllist besides us. The epoll_ctl() | 1116 | * into ep->rdllist besides us. The epoll_ctl() |
| 1117 | * callers are locked out by | 1117 | * callers are locked out by |
| 1118 | * ep_scan_ready_list() holding "mtx" and the | 1118 | * ep_scan_ready_list() holding "mtx" and the |
diff --git a/fs/exofs/common.h b/fs/exofs/common.h index 5e74ad3d4009..3bbd46956d77 100644 --- a/fs/exofs/common.h +++ b/fs/exofs/common.h | |||
| @@ -115,7 +115,7 @@ struct exofs_sb_stats { | |||
| 115 | * Describes the raid used in the FS. It is part of the device table. | 115 | * Describes the raid used in the FS. It is part of the device table. |
| 116 | * This here is taken from the pNFS-objects definition. In exofs we | 116 | * This here is taken from the pNFS-objects definition. In exofs we |
| 117 | * use one raid policy through-out the filesystem. (NOTE: the funny | 117 | * use one raid policy through-out the filesystem. (NOTE: the funny |
| 118 | * alignment at begining. We take care of it at exofs_device_table. | 118 | * alignment at beginning. We take care of it at exofs_device_table. |
| 119 | */ | 119 | */ |
| 120 | struct exofs_dt_data_map { | 120 | struct exofs_dt_data_map { |
| 121 | __le32 cb_num_comps; | 121 | __le32 cb_num_comps; |
| @@ -136,7 +136,7 @@ struct exofs_dt_device_info { | |||
| 136 | u8 systemid[OSD_SYSTEMID_LEN]; | 136 | u8 systemid[OSD_SYSTEMID_LEN]; |
| 137 | __le64 long_name_offset; /* If !0 then offset-in-file */ | 137 | __le64 long_name_offset; /* If !0 then offset-in-file */ |
| 138 | __le32 osdname_len; /* */ | 138 | __le32 osdname_len; /* */ |
| 139 | u8 osdname[44]; /* Embbeded, Ususally an asci uuid */ | 139 | u8 osdname[44]; /* Embbeded, Usually an asci uuid */ |
| 140 | } __packed; | 140 | } __packed; |
| 141 | 141 | ||
| 142 | /* | 142 | /* |
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c index 0d06f4e75699..8f44cef1b3ef 100644 --- a/fs/ext2/balloc.c +++ b/fs/ext2/balloc.c | |||
| @@ -850,7 +850,7 @@ static int find_next_reservable_window( | |||
| 850 | rsv_window_remove(sb, my_rsv); | 850 | rsv_window_remove(sb, my_rsv); |
| 851 | 851 | ||
| 852 | /* | 852 | /* |
| 853 | * Let's book the whole avaliable window for now. We will check the | 853 | * Let's book the whole available window for now. We will check the |
| 854 | * disk bitmap later and then, if there are free blocks then we adjust | 854 | * disk bitmap later and then, if there are free blocks then we adjust |
| 855 | * the window size if it's larger than requested. | 855 | * the window size if it's larger than requested. |
| 856 | * Otherwise, we will remove this node from the tree next time | 856 | * Otherwise, we will remove this node from the tree next time |
| @@ -1357,9 +1357,9 @@ retry_alloc: | |||
| 1357 | goto allocated; | 1357 | goto allocated; |
| 1358 | } | 1358 | } |
| 1359 | /* | 1359 | /* |
| 1360 | * We may end up a bogus ealier ENOSPC error due to | 1360 | * We may end up a bogus earlier ENOSPC error due to |
| 1361 | * filesystem is "full" of reservations, but | 1361 | * filesystem is "full" of reservations, but |
| 1362 | * there maybe indeed free blocks avaliable on disk | 1362 | * there maybe indeed free blocks available on disk |
| 1363 | * In this case, we just forget about the reservations | 1363 | * In this case, we just forget about the reservations |
| 1364 | * just do block allocation as without reservations. | 1364 | * just do block allocation as without reservations. |
| 1365 | */ | 1365 | */ |
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index c47f706878b5..788e09a07f7e 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c | |||
| @@ -305,7 +305,7 @@ static ext2_fsblk_t ext2_find_near(struct inode *inode, Indirect *ind) | |||
| 305 | return ind->bh->b_blocknr; | 305 | return ind->bh->b_blocknr; |
| 306 | 306 | ||
| 307 | /* | 307 | /* |
| 308 | * It is going to be refered from inode itself? OK, just put it into | 308 | * It is going to be referred from inode itself? OK, just put it into |
| 309 | * the same cylinder group then. | 309 | * the same cylinder group then. |
| 310 | */ | 310 | */ |
| 311 | bg_start = ext2_group_first_block_no(inode->i_sb, ei->i_block_group); | 311 | bg_start = ext2_group_first_block_no(inode->i_sb, ei->i_block_group); |
| @@ -913,7 +913,7 @@ static inline int all_zeroes(__le32 *p, __le32 *q) | |||
| 913 | * | 913 | * |
| 914 | * When we do truncate() we may have to clean the ends of several indirect | 914 | * When we do truncate() we may have to clean the ends of several indirect |
| 915 | * blocks but leave the blocks themselves alive. Block is partially | 915 | * blocks but leave the blocks themselves alive. Block is partially |
| 916 | * truncated if some data below the new i_size is refered from it (and | 916 | * truncated if some data below the new i_size is referred from it (and |
| 917 | * it is on the path to the first completely truncated data block, indeed). | 917 | * it is on the path to the first completely truncated data block, indeed). |
| 918 | * We have to free the top of that path along with everything to the right | 918 | * We have to free the top of that path along with everything to the right |
| 919 | * of the path. Since no allocation past the truncation point is possible | 919 | * of the path. Since no allocation past the truncation point is possible |
| @@ -990,7 +990,7 @@ no_top: | |||
| 990 | * @p: array of block numbers | 990 | * @p: array of block numbers |
| 991 | * @q: points immediately past the end of array | 991 | * @q: points immediately past the end of array |
| 992 | * | 992 | * |
| 993 | * We are freeing all blocks refered from that array (numbers are | 993 | * We are freeing all blocks referred from that array (numbers are |
| 994 | * stored as little-endian 32-bit) and updating @inode->i_blocks | 994 | * stored as little-endian 32-bit) and updating @inode->i_blocks |
| 995 | * appropriately. | 995 | * appropriately. |
| 996 | */ | 996 | */ |
| @@ -1030,7 +1030,7 @@ static inline void ext2_free_data(struct inode *inode, __le32 *p, __le32 *q) | |||
| 1030 | * @q: pointer immediately past the end of array | 1030 | * @q: pointer immediately past the end of array |
| 1031 | * @depth: depth of the branches to free | 1031 | * @depth: depth of the branches to free |
| 1032 | * | 1032 | * |
| 1033 | * We are freeing all blocks refered from these branches (numbers are | 1033 | * We are freeing all blocks referred from these branches (numbers are |
| 1034 | * stored as little-endian 32-bit) and updating @inode->i_blocks | 1034 | * stored as little-endian 32-bit) and updating @inode->i_blocks |
| 1035 | * appropriately. | 1035 | * appropriately. |
| 1036 | */ | 1036 | */ |
diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 7731695e65d9..0a78dae7e2cb 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c | |||
| @@ -1382,7 +1382,7 @@ static struct dentry *ext2_mount(struct file_system_type *fs_type, | |||
| 1382 | 1382 | ||
| 1383 | /* Read data from quotafile - avoid pagecache and such because we cannot afford | 1383 | /* Read data from quotafile - avoid pagecache and such because we cannot afford |
| 1384 | * acquiring the locks... As quota files are never truncated and quota code | 1384 | * acquiring the locks... As quota files are never truncated and quota code |
| 1385 | * itself serializes the operations (and noone else should touch the files) | 1385 | * itself serializes the operations (and no one else should touch the files) |
| 1386 | * we don't have to be afraid of races */ | 1386 | * we don't have to be afraid of races */ |
| 1387 | static ssize_t ext2_quota_read(struct super_block *sb, int type, char *data, | 1387 | static ssize_t ext2_quota_read(struct super_block *sb, int type, char *data, |
| 1388 | size_t len, loff_t off) | 1388 | size_t len, loff_t off) |
diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c index c2e4dce984d2..529970617a21 100644 --- a/fs/ext2/xattr.c +++ b/fs/ext2/xattr.c | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | * +------------------+ | 35 | * +------------------+ |
| 36 | * | 36 | * |
| 37 | * The block header is followed by multiple entry descriptors. These entry | 37 | * The block header is followed by multiple entry descriptors. These entry |
| 38 | * descriptors are variable in size, and alligned to EXT2_XATTR_PAD | 38 | * descriptors are variable in size, and aligned to EXT2_XATTR_PAD |
| 39 | * byte boundaries. The entry descriptors are sorted by attribute name, | 39 | * byte boundaries. The entry descriptors are sorted by attribute name, |
| 40 | * so that two extended attribute blocks can be compared efficiently. | 40 | * so that two extended attribute blocks can be compared efficiently. |
| 41 | * | 41 | * |
diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c index 153242187fce..fe52297e31ad 100644 --- a/fs/ext3/balloc.c +++ b/fs/ext3/balloc.c | |||
| @@ -590,7 +590,7 @@ do_more: | |||
| 590 | BUFFER_TRACE(debug_bh, "Deleted!"); | 590 | BUFFER_TRACE(debug_bh, "Deleted!"); |
| 591 | if (!bh2jh(bitmap_bh)->b_committed_data) | 591 | if (!bh2jh(bitmap_bh)->b_committed_data) |
| 592 | BUFFER_TRACE(debug_bh, | 592 | BUFFER_TRACE(debug_bh, |
| 593 | "No commited data in bitmap"); | 593 | "No committed data in bitmap"); |
| 594 | BUFFER_TRACE2(debug_bh, bitmap_bh, "bitmap"); | 594 | BUFFER_TRACE2(debug_bh, bitmap_bh, "bitmap"); |
| 595 | __brelse(debug_bh); | 595 | __brelse(debug_bh); |
| 596 | } | 596 | } |
| @@ -1063,7 +1063,7 @@ static int find_next_reservable_window( | |||
| 1063 | rsv_window_remove(sb, my_rsv); | 1063 | rsv_window_remove(sb, my_rsv); |
| 1064 | 1064 | ||
| 1065 | /* | 1065 | /* |
| 1066 | * Let's book the whole avaliable window for now. We will check the | 1066 | * Let's book the whole available window for now. We will check the |
| 1067 | * disk bitmap later and then, if there are free blocks then we adjust | 1067 | * disk bitmap later and then, if there are free blocks then we adjust |
| 1068 | * the window size if it's larger than requested. | 1068 | * the window size if it's larger than requested. |
| 1069 | * Otherwise, we will remove this node from the tree next time | 1069 | * Otherwise, we will remove this node from the tree next time |
| @@ -1456,7 +1456,7 @@ static int ext3_has_free_blocks(struct ext3_sb_info *sbi) | |||
| 1456 | * | 1456 | * |
| 1457 | * ext3_should_retry_alloc() is called when ENOSPC is returned, and if | 1457 | * ext3_should_retry_alloc() is called when ENOSPC is returned, and if |
| 1458 | * it is profitable to retry the operation, this function will wait | 1458 | * it is profitable to retry the operation, this function will wait |
| 1459 | * for the current or commiting transaction to complete, and then | 1459 | * for the current or committing transaction to complete, and then |
| 1460 | * return TRUE. | 1460 | * return TRUE. |
| 1461 | * | 1461 | * |
| 1462 | * if the total number of retries exceed three times, return FALSE. | 1462 | * if the total number of retries exceed three times, return FALSE. |
| @@ -1632,9 +1632,9 @@ retry_alloc: | |||
| 1632 | goto allocated; | 1632 | goto allocated; |
| 1633 | } | 1633 | } |
| 1634 | /* | 1634 | /* |
| 1635 | * We may end up a bogus ealier ENOSPC error due to | 1635 | * We may end up a bogus earlier ENOSPC error due to |
| 1636 | * filesystem is "full" of reservations, but | 1636 | * filesystem is "full" of reservations, but |
| 1637 | * there maybe indeed free blocks avaliable on disk | 1637 | * there maybe indeed free blocks available on disk |
| 1638 | * In this case, we just forget about the reservations | 1638 | * In this case, we just forget about the reservations |
| 1639 | * just do block allocation as without reservations. | 1639 | * just do block allocation as without reservations. |
| 1640 | */ | 1640 | */ |
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index fe2541d250e4..68b2e43d7c35 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c | |||
| @@ -2055,7 +2055,7 @@ static inline int all_zeroes(__le32 *p, __le32 *q) | |||
| 2055 | * | 2055 | * |
| 2056 | * When we do truncate() we may have to clean the ends of several | 2056 | * When we do truncate() we may have to clean the ends of several |
| 2057 | * indirect blocks but leave the blocks themselves alive. Block is | 2057 | * indirect blocks but leave the blocks themselves alive. Block is |
| 2058 | * partially truncated if some data below the new i_size is refered | 2058 | * partially truncated if some data below the new i_size is referred |
| 2059 | * from it (and it is on the path to the first completely truncated | 2059 | * from it (and it is on the path to the first completely truncated |
| 2060 | * data block, indeed). We have to free the top of that path along | 2060 | * data block, indeed). We have to free the top of that path along |
| 2061 | * with everything to the right of the path. Since no allocation | 2061 | * with everything to the right of the path. Since no allocation |
| @@ -2184,7 +2184,7 @@ static void ext3_clear_blocks(handle_t *handle, struct inode *inode, | |||
| 2184 | * @first: array of block numbers | 2184 | * @first: array of block numbers |
| 2185 | * @last: points immediately past the end of array | 2185 | * @last: points immediately past the end of array |
| 2186 | * | 2186 | * |
| 2187 | * We are freeing all blocks refered from that array (numbers are stored as | 2187 | * We are freeing all blocks referred from that array (numbers are stored as |
| 2188 | * little-endian 32-bit) and updating @inode->i_blocks appropriately. | 2188 | * little-endian 32-bit) and updating @inode->i_blocks appropriately. |
| 2189 | * | 2189 | * |
| 2190 | * We accumulate contiguous runs of blocks to free. Conveniently, if these | 2190 | * We accumulate contiguous runs of blocks to free. Conveniently, if these |
| @@ -2272,7 +2272,7 @@ static void ext3_free_data(handle_t *handle, struct inode *inode, | |||
| 2272 | * @last: pointer immediately past the end of array | 2272 | * @last: pointer immediately past the end of array |
| 2273 | * @depth: depth of the branches to free | 2273 | * @depth: depth of the branches to free |
| 2274 | * | 2274 | * |
| 2275 | * We are freeing all blocks refered from these branches (numbers are | 2275 | * We are freeing all blocks referred from these branches (numbers are |
| 2276 | * stored as little-endian 32-bit) and updating @inode->i_blocks | 2276 | * stored as little-endian 32-bit) and updating @inode->i_blocks |
| 2277 | * appropriately. | 2277 | * appropriately. |
| 2278 | */ | 2278 | */ |
| @@ -3291,7 +3291,7 @@ static int ext3_writepage_trans_blocks(struct inode *inode) | |||
| 3291 | if (ext3_should_journal_data(inode)) | 3291 | if (ext3_should_journal_data(inode)) |
| 3292 | ret = 3 * (bpp + indirects) + 2; | 3292 | ret = 3 * (bpp + indirects) + 2; |
| 3293 | else | 3293 | else |
| 3294 | ret = 2 * (bpp + indirects) + 2; | 3294 | ret = 2 * (bpp + indirects) + indirects + 2; |
| 3295 | 3295 | ||
| 3296 | #ifdef CONFIG_QUOTA | 3296 | #ifdef CONFIG_QUOTA |
| 3297 | /* We know that structure was already allocated during dquot_initialize so | 3297 | /* We know that structure was already allocated during dquot_initialize so |
diff --git a/fs/ext3/resize.c b/fs/ext3/resize.c index 108b142e11ed..7916e4ce166a 100644 --- a/fs/ext3/resize.c +++ b/fs/ext3/resize.c | |||
| @@ -1009,7 +1009,7 @@ int ext3_group_extend(struct super_block *sb, struct ext3_super_block *es, | |||
| 1009 | 1009 | ||
| 1010 | if (test_opt(sb, DEBUG)) | 1010 | if (test_opt(sb, DEBUG)) |
| 1011 | printk(KERN_DEBUG "EXT3-fs: extending last group from "E3FSBLK | 1011 | printk(KERN_DEBUG "EXT3-fs: extending last group from "E3FSBLK |
| 1012 | " upto "E3FSBLK" blocks\n", | 1012 | " up to "E3FSBLK" blocks\n", |
| 1013 | o_blocks_count, n_blocks_count); | 1013 | o_blocks_count, n_blocks_count); |
| 1014 | 1014 | ||
| 1015 | if (n_blocks_count == 0 || n_blocks_count == o_blocks_count) | 1015 | if (n_blocks_count == 0 || n_blocks_count == o_blocks_count) |
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 071689f86e18..3c6a9e0eadc1 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
| @@ -2925,7 +2925,7 @@ static int ext3_quota_on(struct super_block *sb, int type, int format_id, | |||
| 2925 | 2925 | ||
| 2926 | /* Read data from quotafile - avoid pagecache and such because we cannot afford | 2926 | /* Read data from quotafile - avoid pagecache and such because we cannot afford |
| 2927 | * acquiring the locks... As quota files are never truncated and quota code | 2927 | * acquiring the locks... As quota files are never truncated and quota code |
| 2928 | * itself serializes the operations (and noone else should touch the files) | 2928 | * itself serializes the operations (and no one else should touch the files) |
| 2929 | * we don't have to be afraid of races */ | 2929 | * we don't have to be afraid of races */ |
| 2930 | static ssize_t ext3_quota_read(struct super_block *sb, int type, char *data, | 2930 | static ssize_t ext3_quota_read(struct super_block *sb, int type, char *data, |
| 2931 | size_t len, loff_t off) | 2931 | size_t len, loff_t off) |
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 97b970e7dd13..1c67139ad4b4 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c | |||
| @@ -547,7 +547,7 @@ int ext4_claim_free_blocks(struct ext4_sb_info *sbi, | |||
| 547 | * | 547 | * |
| 548 | * ext4_should_retry_alloc() is called when ENOSPC is returned, and if | 548 | * ext4_should_retry_alloc() is called when ENOSPC is returned, and if |
| 549 | * it is profitable to retry the operation, this function will wait | 549 | * it is profitable to retry the operation, this function will wait |
| 550 | * for the current or commiting transaction to complete, and then | 550 | * for the current or committing transaction to complete, and then |
| 551 | * return TRUE. | 551 | * return TRUE. |
| 552 | * | 552 | * |
| 553 | * if the total number of retries exceed three times, return FALSE. | 553 | * if the total number of retries exceed three times, return FALSE. |
diff --git a/fs/ext4/ext4_jbd2.h b/fs/ext4/ext4_jbd2.h index e25e99bf7ee1..d0f53538a57f 100644 --- a/fs/ext4/ext4_jbd2.h +++ b/fs/ext4/ext4_jbd2.h | |||
| @@ -86,8 +86,8 @@ | |||
| 86 | 86 | ||
| 87 | #ifdef CONFIG_QUOTA | 87 | #ifdef CONFIG_QUOTA |
| 88 | /* Amount of blocks needed for quota update - we know that the structure was | 88 | /* Amount of blocks needed for quota update - we know that the structure was |
| 89 | * allocated so we need to update only inode+data */ | 89 | * allocated so we need to update only data block */ |
| 90 | #define EXT4_QUOTA_TRANS_BLOCKS(sb) (test_opt(sb, QUOTA) ? 2 : 0) | 90 | #define EXT4_QUOTA_TRANS_BLOCKS(sb) (test_opt(sb, QUOTA) ? 1 : 0) |
| 91 | /* Amount of blocks needed for quota insert/delete - we do some block writes | 91 | /* Amount of blocks needed for quota insert/delete - we do some block writes |
| 92 | * but inode, sb and group updates are done only once */ | 92 | * but inode, sb and group updates are done only once */ |
| 93 | #define EXT4_QUOTA_INIT_BLOCKS(sb) (test_opt(sb, QUOTA) ? (DQUOT_INIT_ALLOC*\ | 93 | #define EXT4_QUOTA_INIT_BLOCKS(sb) (test_opt(sb, QUOTA) ? (DQUOT_INIT_ALLOC*\ |
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index dd2cb5076ff9..4890d6f3ad15 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c | |||
| @@ -1729,7 +1729,7 @@ repeat: | |||
| 1729 | BUG_ON(npath->p_depth != path->p_depth); | 1729 | BUG_ON(npath->p_depth != path->p_depth); |
| 1730 | eh = npath[depth].p_hdr; | 1730 | eh = npath[depth].p_hdr; |
| 1731 | if (le16_to_cpu(eh->eh_entries) < le16_to_cpu(eh->eh_max)) { | 1731 | if (le16_to_cpu(eh->eh_entries) < le16_to_cpu(eh->eh_max)) { |
| 1732 | ext_debug("next leaf isnt full(%d)\n", | 1732 | ext_debug("next leaf isn't full(%d)\n", |
| 1733 | le16_to_cpu(eh->eh_entries)); | 1733 | le16_to_cpu(eh->eh_entries)); |
| 1734 | path = npath; | 1734 | path = npath; |
| 1735 | goto repeat; | 1735 | goto repeat; |
| @@ -2533,7 +2533,7 @@ static int ext4_ext_zeroout(struct inode *inode, struct ext4_extent *ex) | |||
| 2533 | /* | 2533 | /* |
| 2534 | * This function is called by ext4_ext_map_blocks() if someone tries to write | 2534 | * This function is called by ext4_ext_map_blocks() if someone tries to write |
| 2535 | * to an uninitialized extent. It may result in splitting the uninitialized | 2535 | * to an uninitialized extent. It may result in splitting the uninitialized |
| 2536 | * extent into multiple extents (upto three - one initialized and two | 2536 | * extent into multiple extents (up to three - one initialized and two |
| 2537 | * uninitialized). | 2537 | * uninitialized). |
| 2538 | * There are three possibilities: | 2538 | * There are three possibilities: |
| 2539 | * a> There is no split required: Entire extent should be initialized | 2539 | * a> There is no split required: Entire extent should be initialized |
| @@ -3174,7 +3174,7 @@ ext4_ext_handle_uninitialized_extents(handle_t *handle, struct inode *inode, | |||
| 3174 | path, flags); | 3174 | path, flags); |
| 3175 | /* | 3175 | /* |
| 3176 | * Flag the inode(non aio case) or end_io struct (aio case) | 3176 | * Flag the inode(non aio case) or end_io struct (aio case) |
| 3177 | * that this IO needs to convertion to written when IO is | 3177 | * that this IO needs to conversion to written when IO is |
| 3178 | * completed | 3178 | * completed |
| 3179 | */ | 3179 | */ |
| 3180 | if (io && !(io->flag & EXT4_IO_END_UNWRITTEN)) { | 3180 | if (io && !(io->flag & EXT4_IO_END_UNWRITTEN)) { |
| @@ -3460,10 +3460,10 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode, | |||
| 3460 | ext4_ext_mark_uninitialized(&newex); | 3460 | ext4_ext_mark_uninitialized(&newex); |
| 3461 | /* | 3461 | /* |
| 3462 | * io_end structure was created for every IO write to an | 3462 | * io_end structure was created for every IO write to an |
| 3463 | * uninitialized extent. To avoid unecessary conversion, | 3463 | * uninitialized extent. To avoid unnecessary conversion, |
| 3464 | * here we flag the IO that really needs the conversion. | 3464 | * here we flag the IO that really needs the conversion. |
| 3465 | * For non asycn direct IO case, flag the inode state | 3465 | * For non asycn direct IO case, flag the inode state |
| 3466 | * that we need to perform convertion when IO is done. | 3466 | * that we need to perform conversion when IO is done. |
| 3467 | */ | 3467 | */ |
| 3468 | if ((flags & EXT4_GET_BLOCKS_PRE_IO)) { | 3468 | if ((flags & EXT4_GET_BLOCKS_PRE_IO)) { |
| 3469 | if (io && !(io->flag & EXT4_IO_END_UNWRITTEN)) { | 3469 | if (io && !(io->flag & EXT4_IO_END_UNWRITTEN)) { |
diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c index 7f74019d6d77..e9473cbe80df 100644 --- a/fs/ext4/fsync.c +++ b/fs/ext4/fsync.c | |||
| @@ -101,7 +101,7 @@ extern int ext4_flush_completed_IO(struct inode *inode) | |||
| 101 | * to the work-to-be schedule is freed. | 101 | * to the work-to-be schedule is freed. |
| 102 | * | 102 | * |
| 103 | * Thus we need to keep the io structure still valid here after | 103 | * Thus we need to keep the io structure still valid here after |
| 104 | * convertion finished. The io structure has a flag to | 104 | * conversion finished. The io structure has a flag to |
| 105 | * avoid double converting from both fsync and background work | 105 | * avoid double converting from both fsync and background work |
| 106 | * queue work. | 106 | * queue work. |
| 107 | */ | 107 | */ |
| @@ -125,9 +125,11 @@ extern int ext4_flush_completed_IO(struct inode *inode) | |||
| 125 | * the parent directory's parent as well, and so on recursively, if | 125 | * the parent directory's parent as well, and so on recursively, if |
| 126 | * they are also freshly created. | 126 | * they are also freshly created. |
| 127 | */ | 127 | */ |
| 128 | static void ext4_sync_parent(struct inode *inode) | 128 | static int ext4_sync_parent(struct inode *inode) |
| 129 | { | 129 | { |
| 130 | struct writeback_control wbc; | ||
| 130 | struct dentry *dentry = NULL; | 131 | struct dentry *dentry = NULL; |
| 132 | int ret = 0; | ||
| 131 | 133 | ||
| 132 | while (inode && ext4_test_inode_state(inode, EXT4_STATE_NEWENTRY)) { | 134 | while (inode && ext4_test_inode_state(inode, EXT4_STATE_NEWENTRY)) { |
| 133 | ext4_clear_inode_state(inode, EXT4_STATE_NEWENTRY); | 135 | ext4_clear_inode_state(inode, EXT4_STATE_NEWENTRY); |
| @@ -136,8 +138,17 @@ static void ext4_sync_parent(struct inode *inode) | |||
| 136 | if (!dentry || !dentry->d_parent || !dentry->d_parent->d_inode) | 138 | if (!dentry || !dentry->d_parent || !dentry->d_parent->d_inode) |
| 137 | break; | 139 | break; |
| 138 | inode = dentry->d_parent->d_inode; | 140 | inode = dentry->d_parent->d_inode; |
| 139 | sync_mapping_buffers(inode->i_mapping); | 141 | ret = sync_mapping_buffers(inode->i_mapping); |
| 142 | if (ret) | ||
| 143 | break; | ||
| 144 | memset(&wbc, 0, sizeof(wbc)); | ||
| 145 | wbc.sync_mode = WB_SYNC_ALL; | ||
| 146 | wbc.nr_to_write = 0; /* only write out the inode */ | ||
| 147 | ret = sync_inode(inode, &wbc); | ||
| 148 | if (ret) | ||
| 149 | break; | ||
| 140 | } | 150 | } |
| 151 | return ret; | ||
| 141 | } | 152 | } |
| 142 | 153 | ||
| 143 | /* | 154 | /* |
| @@ -176,7 +187,7 @@ int ext4_sync_file(struct file *file, int datasync) | |||
| 176 | if (!journal) { | 187 | if (!journal) { |
| 177 | ret = generic_file_fsync(file, datasync); | 188 | ret = generic_file_fsync(file, datasync); |
| 178 | if (!ret && !list_empty(&inode->i_dentry)) | 189 | if (!ret && !list_empty(&inode->i_dentry)) |
| 179 | ext4_sync_parent(inode); | 190 | ret = ext4_sync_parent(inode); |
| 180 | goto out; | 191 | goto out; |
| 181 | } | 192 | } |
| 182 | 193 | ||
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 1a86282b9024..f2fa5e8a582c 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
| @@ -2502,6 +2502,7 @@ static int ext4_da_get_block_prep(struct inode *inode, sector_t iblock, | |||
| 2502 | * for partial write. | 2502 | * for partial write. |
| 2503 | */ | 2503 | */ |
| 2504 | set_buffer_new(bh); | 2504 | set_buffer_new(bh); |
| 2505 | set_buffer_mapped(bh); | ||
| 2505 | } | 2506 | } |
| 2506 | return 0; | 2507 | return 0; |
| 2507 | } | 2508 | } |
| @@ -2588,7 +2589,7 @@ static void ext4_end_io_buffer_write(struct buffer_head *bh, int uptodate); | |||
| 2588 | * because we should have holes filled from ext4_page_mkwrite(). We even don't | 2589 | * because we should have holes filled from ext4_page_mkwrite(). We even don't |
| 2589 | * need to file the inode to the transaction's list in ordered mode because if | 2590 | * need to file the inode to the transaction's list in ordered mode because if |
| 2590 | * we are writing back data added by write(), the inode is already there and if | 2591 | * we are writing back data added by write(), the inode is already there and if |
| 2591 | * we are writing back data modified via mmap(), noone guarantees in which | 2592 | * we are writing back data modified via mmap(), no one guarantees in which |
| 2592 | * transaction the data will hit the disk. In case we are journaling data, we | 2593 | * transaction the data will hit the disk. In case we are journaling data, we |
| 2593 | * cannot start transaction directly because transaction start ranks above page | 2594 | * cannot start transaction directly because transaction start ranks above page |
| 2594 | * lock so we have to do some magic. | 2595 | * lock so we have to do some magic. |
| @@ -2690,7 +2691,7 @@ static int ext4_writepage(struct page *page, | |||
| 2690 | 2691 | ||
| 2691 | /* | 2692 | /* |
| 2692 | * This is called via ext4_da_writepages() to | 2693 | * This is called via ext4_da_writepages() to |
| 2693 | * calulate the total number of credits to reserve to fit | 2694 | * calculate the total number of credits to reserve to fit |
| 2694 | * a single extent allocation into a single transaction, | 2695 | * a single extent allocation into a single transaction, |
| 2695 | * ext4_da_writpeages() will loop calling this before | 2696 | * ext4_da_writpeages() will loop calling this before |
| 2696 | * the block allocation. | 2697 | * the block allocation. |
| @@ -3304,7 +3305,7 @@ int ext4_alloc_da_blocks(struct inode *inode) | |||
| 3304 | * the pages by calling redirty_page_for_writepage() but that | 3305 | * the pages by calling redirty_page_for_writepage() but that |
| 3305 | * would be ugly in the extreme. So instead we would need to | 3306 | * would be ugly in the extreme. So instead we would need to |
| 3306 | * replicate parts of the code in the above functions, | 3307 | * replicate parts of the code in the above functions, |
| 3307 | * simplifying them becuase we wouldn't actually intend to | 3308 | * simplifying them because we wouldn't actually intend to |
| 3308 | * write out the pages, but rather only collect contiguous | 3309 | * write out the pages, but rather only collect contiguous |
| 3309 | * logical block extents, call the multi-block allocator, and | 3310 | * logical block extents, call the multi-block allocator, and |
| 3310 | * then update the buffer heads with the block allocations. | 3311 | * then update the buffer heads with the block allocations. |
| @@ -3694,7 +3695,7 @@ retry: | |||
| 3694 | * | 3695 | * |
| 3695 | * The unwrritten extents will be converted to written when DIO is completed. | 3696 | * The unwrritten extents will be converted to written when DIO is completed. |
| 3696 | * For async direct IO, since the IO may still pending when return, we | 3697 | * For async direct IO, since the IO may still pending when return, we |
| 3697 | * set up an end_io call back function, which will do the convertion | 3698 | * set up an end_io call back function, which will do the conversion |
| 3698 | * when async direct IO completed. | 3699 | * when async direct IO completed. |
| 3699 | * | 3700 | * |
| 3700 | * If the O_DIRECT write will extend the file then add this inode to the | 3701 | * If the O_DIRECT write will extend the file then add this inode to the |
| @@ -3717,7 +3718,7 @@ static ssize_t ext4_ext_direct_IO(int rw, struct kiocb *iocb, | |||
| 3717 | * We could direct write to holes and fallocate. | 3718 | * We could direct write to holes and fallocate. |
| 3718 | * | 3719 | * |
| 3719 | * Allocated blocks to fill the hole are marked as uninitialized | 3720 | * Allocated blocks to fill the hole are marked as uninitialized |
| 3720 | * to prevent paralel buffered read to expose the stale data | 3721 | * to prevent parallel buffered read to expose the stale data |
| 3721 | * before DIO complete the data IO. | 3722 | * before DIO complete the data IO. |
| 3722 | * | 3723 | * |
| 3723 | * As to previously fallocated extents, ext4 get_block | 3724 | * As to previously fallocated extents, ext4 get_block |
| @@ -3778,7 +3779,7 @@ static ssize_t ext4_ext_direct_IO(int rw, struct kiocb *iocb, | |||
| 3778 | int err; | 3779 | int err; |
| 3779 | /* | 3780 | /* |
| 3780 | * for non AIO case, since the IO is already | 3781 | * for non AIO case, since the IO is already |
| 3781 | * completed, we could do the convertion right here | 3782 | * completed, we could do the conversion right here |
| 3782 | */ | 3783 | */ |
| 3783 | err = ext4_convert_unwritten_extents(inode, | 3784 | err = ext4_convert_unwritten_extents(inode, |
| 3784 | offset, ret); | 3785 | offset, ret); |
| @@ -4025,7 +4026,7 @@ static inline int all_zeroes(__le32 *p, __le32 *q) | |||
| 4025 | * | 4026 | * |
| 4026 | * When we do truncate() we may have to clean the ends of several | 4027 | * When we do truncate() we may have to clean the ends of several |
| 4027 | * indirect blocks but leave the blocks themselves alive. Block is | 4028 | * indirect blocks but leave the blocks themselves alive. Block is |
| 4028 | * partially truncated if some data below the new i_size is refered | 4029 | * partially truncated if some data below the new i_size is referred |
| 4029 | * from it (and it is on the path to the first completely truncated | 4030 | * from it (and it is on the path to the first completely truncated |
| 4030 | * data block, indeed). We have to free the top of that path along | 4031 | * data block, indeed). We have to free the top of that path along |
| 4031 | * with everything to the right of the path. Since no allocation | 4032 | * with everything to the right of the path. Since no allocation |
| @@ -4169,7 +4170,7 @@ out_err: | |||
| 4169 | * @first: array of block numbers | 4170 | * @first: array of block numbers |
| 4170 | * @last: points immediately past the end of array | 4171 | * @last: points immediately past the end of array |
| 4171 | * | 4172 | * |
| 4172 | * We are freeing all blocks refered from that array (numbers are stored as | 4173 | * We are freeing all blocks referred from that array (numbers are stored as |
| 4173 | * little-endian 32-bit) and updating @inode->i_blocks appropriately. | 4174 | * little-endian 32-bit) and updating @inode->i_blocks appropriately. |
| 4174 | * | 4175 | * |
| 4175 | * We accumulate contiguous runs of blocks to free. Conveniently, if these | 4176 | * We accumulate contiguous runs of blocks to free. Conveniently, if these |
| @@ -4261,7 +4262,7 @@ static void ext4_free_data(handle_t *handle, struct inode *inode, | |||
| 4261 | * @last: pointer immediately past the end of array | 4262 | * @last: pointer immediately past the end of array |
| 4262 | * @depth: depth of the branches to free | 4263 | * @depth: depth of the branches to free |
| 4263 | * | 4264 | * |
| 4264 | * We are freeing all blocks refered from these branches (numbers are | 4265 | * We are freeing all blocks referred from these branches (numbers are |
| 4265 | * stored as little-endian 32-bit) and updating @inode->i_blocks | 4266 | * stored as little-endian 32-bit) and updating @inode->i_blocks |
| 4266 | * appropriately. | 4267 | * appropriately. |
| 4267 | */ | 4268 | */ |
| @@ -4429,8 +4430,8 @@ void ext4_truncate(struct inode *inode) | |||
| 4429 | Indirect chain[4]; | 4430 | Indirect chain[4]; |
| 4430 | Indirect *partial; | 4431 | Indirect *partial; |
| 4431 | __le32 nr = 0; | 4432 | __le32 nr = 0; |
| 4432 | int n; | 4433 | int n = 0; |
| 4433 | ext4_lblk_t last_block; | 4434 | ext4_lblk_t last_block, max_block; |
| 4434 | unsigned blocksize = inode->i_sb->s_blocksize; | 4435 | unsigned blocksize = inode->i_sb->s_blocksize; |
| 4435 | 4436 | ||
| 4436 | trace_ext4_truncate_enter(inode); | 4437 | trace_ext4_truncate_enter(inode); |
| @@ -4455,14 +4456,18 @@ void ext4_truncate(struct inode *inode) | |||
| 4455 | 4456 | ||
| 4456 | last_block = (inode->i_size + blocksize-1) | 4457 | last_block = (inode->i_size + blocksize-1) |
| 4457 | >> EXT4_BLOCK_SIZE_BITS(inode->i_sb); | 4458 | >> EXT4_BLOCK_SIZE_BITS(inode->i_sb); |
| 4459 | max_block = (EXT4_SB(inode->i_sb)->s_bitmap_maxbytes + blocksize-1) | ||
| 4460 | >> EXT4_BLOCK_SIZE_BITS(inode->i_sb); | ||
| 4458 | 4461 | ||
| 4459 | if (inode->i_size & (blocksize - 1)) | 4462 | if (inode->i_size & (blocksize - 1)) |
| 4460 | if (ext4_block_truncate_page(handle, mapping, inode->i_size)) | 4463 | if (ext4_block_truncate_page(handle, mapping, inode->i_size)) |
| 4461 | goto out_stop; | 4464 | goto out_stop; |
| 4462 | 4465 | ||
| 4463 | n = ext4_block_to_path(inode, last_block, offsets, NULL); | 4466 | if (last_block != max_block) { |
| 4464 | if (n == 0) | 4467 | n = ext4_block_to_path(inode, last_block, offsets, NULL); |
| 4465 | goto out_stop; /* error */ | 4468 | if (n == 0) |
| 4469 | goto out_stop; /* error */ | ||
| 4470 | } | ||
| 4466 | 4471 | ||
| 4467 | /* | 4472 | /* |
| 4468 | * OK. This truncate is going to happen. We add the inode to the | 4473 | * OK. This truncate is going to happen. We add the inode to the |
| @@ -4493,7 +4498,13 @@ void ext4_truncate(struct inode *inode) | |||
| 4493 | */ | 4498 | */ |
| 4494 | ei->i_disksize = inode->i_size; | 4499 | ei->i_disksize = inode->i_size; |
| 4495 | 4500 | ||
| 4496 | if (n == 1) { /* direct blocks */ | 4501 | if (last_block == max_block) { |
| 4502 | /* | ||
| 4503 | * It is unnecessary to free any data blocks if last_block is | ||
| 4504 | * equal to the indirect block limit. | ||
| 4505 | */ | ||
| 4506 | goto out_unlock; | ||
| 4507 | } else if (n == 1) { /* direct blocks */ | ||
| 4497 | ext4_free_data(handle, inode, NULL, i_data+offsets[0], | 4508 | ext4_free_data(handle, inode, NULL, i_data+offsets[0], |
| 4498 | i_data + EXT4_NDIR_BLOCKS); | 4509 | i_data + EXT4_NDIR_BLOCKS); |
| 4499 | goto do_indirects; | 4510 | goto do_indirects; |
| @@ -4553,6 +4564,7 @@ do_indirects: | |||
| 4553 | ; | 4564 | ; |
| 4554 | } | 4565 | } |
| 4555 | 4566 | ||
| 4567 | out_unlock: | ||
| 4556 | up_write(&ei->i_data_sem); | 4568 | up_write(&ei->i_data_sem); |
| 4557 | inode->i_mtime = inode->i_ctime = ext4_current_time(inode); | 4569 | inode->i_mtime = inode->i_ctime = ext4_current_time(inode); |
| 4558 | ext4_mark_inode_dirty(handle, inode); | 4570 | ext4_mark_inode_dirty(handle, inode); |
| @@ -5398,13 +5410,12 @@ static int ext4_indirect_trans_blocks(struct inode *inode, int nrblocks, | |||
| 5398 | /* if nrblocks are contiguous */ | 5410 | /* if nrblocks are contiguous */ |
| 5399 | if (chunk) { | 5411 | if (chunk) { |
| 5400 | /* | 5412 | /* |
| 5401 | * With N contiguous data blocks, it need at most | 5413 | * With N contiguous data blocks, we need at most |
| 5402 | * N/EXT4_ADDR_PER_BLOCK(inode->i_sb) indirect blocks | 5414 | * N/EXT4_ADDR_PER_BLOCK(inode->i_sb) + 1 indirect blocks, |
| 5403 | * 2 dindirect blocks | 5415 | * 2 dindirect blocks, and 1 tindirect block |
| 5404 | * 1 tindirect block | ||
| 5405 | */ | 5416 | */ |
| 5406 | indirects = nrblocks / EXT4_ADDR_PER_BLOCK(inode->i_sb); | 5417 | return DIV_ROUND_UP(nrblocks, |
| 5407 | return indirects + 3; | 5418 | EXT4_ADDR_PER_BLOCK(inode->i_sb)) + 4; |
| 5408 | } | 5419 | } |
| 5409 | /* | 5420 | /* |
| 5410 | * if nrblocks are not contiguous, worse case, each block touch | 5421 | * if nrblocks are not contiguous, worse case, each block touch |
| @@ -5478,7 +5489,7 @@ static int ext4_meta_trans_blocks(struct inode *inode, int nrblocks, int chunk) | |||
| 5478 | } | 5489 | } |
| 5479 | 5490 | ||
| 5480 | /* | 5491 | /* |
| 5481 | * Calulate the total number of credits to reserve to fit | 5492 | * Calculate the total number of credits to reserve to fit |
| 5482 | * the modification of a single pages into a single transaction, | 5493 | * the modification of a single pages into a single transaction, |
| 5483 | * which may include multiple chunks of block allocations. | 5494 | * which may include multiple chunks of block allocations. |
| 5484 | * | 5495 | * |
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index a5837a837a8b..d8a16eecf1d5 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c | |||
| @@ -92,7 +92,7 @@ | |||
| 92 | * between CPUs. It is possible to get scheduled at this point. | 92 | * between CPUs. It is possible to get scheduled at this point. |
| 93 | * | 93 | * |
| 94 | * The locality group prealloc space is used looking at whether we have | 94 | * The locality group prealloc space is used looking at whether we have |
| 95 | * enough free space (pa_free) withing the prealloc space. | 95 | * enough free space (pa_free) within the prealloc space. |
| 96 | * | 96 | * |
| 97 | * If we can't allocate blocks via inode prealloc or/and locality group | 97 | * If we can't allocate blocks via inode prealloc or/and locality group |
| 98 | * prealloc then we look at the buddy cache. The buddy cache is represented | 98 | * prealloc then we look at the buddy cache. The buddy cache is represented |
diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c index d1bafa57f483..92816b4e0f16 100644 --- a/fs/ext4/migrate.c +++ b/fs/ext4/migrate.c | |||
| @@ -517,7 +517,7 @@ int ext4_ext_migrate(struct inode *inode) | |||
| 517 | * start with one credit accounted for | 517 | * start with one credit accounted for |
| 518 | * superblock modification. | 518 | * superblock modification. |
| 519 | * | 519 | * |
| 520 | * For the tmp_inode we already have commited the | 520 | * For the tmp_inode we already have committed the |
| 521 | * trascation that created the inode. Later as and | 521 | * trascation that created the inode. Later as and |
| 522 | * when we add extents we extent the journal | 522 | * when we add extents we extent the journal |
| 523 | */ | 523 | */ |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 22546ad7f0ae..8553dfb310af 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
| @@ -242,27 +242,44 @@ static void ext4_put_nojournal(handle_t *handle) | |||
| 242 | * journal_end calls result in the superblock being marked dirty, so | 242 | * journal_end calls result in the superblock being marked dirty, so |
| 243 | * that sync() will call the filesystem's write_super callback if | 243 | * that sync() will call the filesystem's write_super callback if |
| 244 | * appropriate. | 244 | * appropriate. |
| 245 | * | ||
| 246 | * To avoid j_barrier hold in userspace when a user calls freeze(), | ||
| 247 | * ext4 prevents a new handle from being started by s_frozen, which | ||
| 248 | * is in an upper layer. | ||
| 245 | */ | 249 | */ |
| 246 | handle_t *ext4_journal_start_sb(struct super_block *sb, int nblocks) | 250 | handle_t *ext4_journal_start_sb(struct super_block *sb, int nblocks) |
| 247 | { | 251 | { |
| 248 | journal_t *journal; | 252 | journal_t *journal; |
| 253 | handle_t *handle; | ||
| 249 | 254 | ||
| 250 | if (sb->s_flags & MS_RDONLY) | 255 | if (sb->s_flags & MS_RDONLY) |
| 251 | return ERR_PTR(-EROFS); | 256 | return ERR_PTR(-EROFS); |
| 252 | 257 | ||
| 253 | vfs_check_frozen(sb, SB_FREEZE_TRANS); | ||
| 254 | /* Special case here: if the journal has aborted behind our | ||
| 255 | * backs (eg. EIO in the commit thread), then we still need to | ||
| 256 | * take the FS itself readonly cleanly. */ | ||
| 257 | journal = EXT4_SB(sb)->s_journal; | 258 | journal = EXT4_SB(sb)->s_journal; |
| 258 | if (journal) { | 259 | handle = ext4_journal_current_handle(); |
| 259 | if (is_journal_aborted(journal)) { | 260 | |
| 260 | ext4_abort(sb, "Detected aborted journal"); | 261 | /* |
| 261 | return ERR_PTR(-EROFS); | 262 | * If a handle has been started, it should be allowed to |
| 262 | } | 263 | * finish, otherwise deadlock could happen between freeze |
| 263 | return jbd2_journal_start(journal, nblocks); | 264 | * and others(e.g. truncate) due to the restart of the |
| 265 | * journal handle if the filesystem is forzen and active | ||
| 266 | * handles are not stopped. | ||
| 267 | */ | ||
| 268 | if (!handle) | ||
| 269 | vfs_check_frozen(sb, SB_FREEZE_TRANS); | ||
| 270 | |||
| 271 | if (!journal) | ||
| 272 | return ext4_get_nojournal(); | ||
| 273 | /* | ||
| 274 | * Special case here: if the journal has aborted behind our | ||
| 275 | * backs (eg. EIO in the commit thread), then we still need to | ||
| 276 | * take the FS itself readonly cleanly. | ||
| 277 | */ | ||
| 278 | if (is_journal_aborted(journal)) { | ||
| 279 | ext4_abort(sb, "Detected aborted journal"); | ||
| 280 | return ERR_PTR(-EROFS); | ||
| 264 | } | 281 | } |
| 265 | return ext4_get_nojournal(); | 282 | return jbd2_journal_start(journal, nblocks); |
| 266 | } | 283 | } |
| 267 | 284 | ||
| 268 | /* | 285 | /* |
| @@ -617,7 +634,7 @@ __acquires(bitlock) | |||
| 617 | * filesystem will have already been marked read/only and the | 634 | * filesystem will have already been marked read/only and the |
| 618 | * journal has been aborted. We return 1 as a hint to callers | 635 | * journal has been aborted. We return 1 as a hint to callers |
| 619 | * who might what to use the return value from | 636 | * who might what to use the return value from |
| 620 | * ext4_grp_locked_error() to distinguish beween the | 637 | * ext4_grp_locked_error() to distinguish between the |
| 621 | * ERRORS_CONT and ERRORS_RO case, and perhaps return more | 638 | * ERRORS_CONT and ERRORS_RO case, and perhaps return more |
| 622 | * aggressively from the ext4 function in question, with a | 639 | * aggressively from the ext4 function in question, with a |
| 623 | * more appropriate error code. | 640 | * more appropriate error code. |
| @@ -2975,6 +2992,12 @@ static int ext4_register_li_request(struct super_block *sb, | |||
| 2975 | mutex_unlock(&ext4_li_info->li_list_mtx); | 2992 | mutex_unlock(&ext4_li_info->li_list_mtx); |
| 2976 | 2993 | ||
| 2977 | sbi->s_li_request = elr; | 2994 | sbi->s_li_request = elr; |
| 2995 | /* | ||
| 2996 | * set elr to NULL here since it has been inserted to | ||
| 2997 | * the request_list and the removal and free of it is | ||
| 2998 | * handled by ext4_clear_request_list from now on. | ||
| 2999 | */ | ||
| 3000 | elr = NULL; | ||
| 2978 | 3001 | ||
| 2979 | if (!(ext4_li_info->li_state & EXT4_LAZYINIT_RUNNING)) { | 3002 | if (!(ext4_li_info->li_state & EXT4_LAZYINIT_RUNNING)) { |
| 2980 | ret = ext4_run_lazyinit_thread(); | 3003 | ret = ext4_run_lazyinit_thread(); |
| @@ -3385,6 +3408,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) | |||
| 3385 | get_random_bytes(&sbi->s_next_generation, sizeof(u32)); | 3408 | get_random_bytes(&sbi->s_next_generation, sizeof(u32)); |
| 3386 | spin_lock_init(&sbi->s_next_gen_lock); | 3409 | spin_lock_init(&sbi->s_next_gen_lock); |
| 3387 | 3410 | ||
| 3411 | init_timer(&sbi->s_err_report); | ||
| 3412 | sbi->s_err_report.function = print_daily_error_info; | ||
| 3413 | sbi->s_err_report.data = (unsigned long) sb; | ||
| 3414 | |||
| 3388 | err = percpu_counter_init(&sbi->s_freeblocks_counter, | 3415 | err = percpu_counter_init(&sbi->s_freeblocks_counter, |
| 3389 | ext4_count_free_blocks(sb)); | 3416 | ext4_count_free_blocks(sb)); |
| 3390 | if (!err) { | 3417 | if (!err) { |
| @@ -3646,9 +3673,6 @@ no_journal: | |||
| 3646 | "Opts: %s%s%s", descr, sbi->s_es->s_mount_opts, | 3673 | "Opts: %s%s%s", descr, sbi->s_es->s_mount_opts, |
| 3647 | *sbi->s_es->s_mount_opts ? "; " : "", orig_data); | 3674 | *sbi->s_es->s_mount_opts ? "; " : "", orig_data); |
| 3648 | 3675 | ||
| 3649 | init_timer(&sbi->s_err_report); | ||
| 3650 | sbi->s_err_report.function = print_daily_error_info; | ||
| 3651 | sbi->s_err_report.data = (unsigned long) sb; | ||
| 3652 | if (es->s_error_count) | 3676 | if (es->s_error_count) |
| 3653 | mod_timer(&sbi->s_err_report, jiffies + 300*HZ); /* 5 minutes */ | 3677 | mod_timer(&sbi->s_err_report, jiffies + 300*HZ); /* 5 minutes */ |
| 3654 | 3678 | ||
| @@ -3672,6 +3696,7 @@ failed_mount_wq: | |||
| 3672 | sbi->s_journal = NULL; | 3696 | sbi->s_journal = NULL; |
| 3673 | } | 3697 | } |
| 3674 | failed_mount3: | 3698 | failed_mount3: |
| 3699 | del_timer(&sbi->s_err_report); | ||
| 3675 | if (sbi->s_flex_groups) { | 3700 | if (sbi->s_flex_groups) { |
| 3676 | if (is_vmalloc_addr(sbi->s_flex_groups)) | 3701 | if (is_vmalloc_addr(sbi->s_flex_groups)) |
| 3677 | vfree(sbi->s_flex_groups); | 3702 | vfree(sbi->s_flex_groups); |
| @@ -4138,6 +4163,11 @@ static int ext4_sync_fs(struct super_block *sb, int wait) | |||
| 4138 | /* | 4163 | /* |
| 4139 | * LVM calls this function before a (read-only) snapshot is created. This | 4164 | * LVM calls this function before a (read-only) snapshot is created. This |
| 4140 | * gives us a chance to flush the journal completely and mark the fs clean. | 4165 | * gives us a chance to flush the journal completely and mark the fs clean. |
| 4166 | * | ||
| 4167 | * Note that only this function cannot bring a filesystem to be in a clean | ||
| 4168 | * state independently, because ext4 prevents a new handle from being started | ||
| 4169 | * by @sb->s_frozen, which stays in an upper layer. It thus needs help from | ||
| 4170 | * the upper layer. | ||
| 4141 | */ | 4171 | */ |
| 4142 | static int ext4_freeze(struct super_block *sb) | 4172 | static int ext4_freeze(struct super_block *sb) |
| 4143 | { | 4173 | { |
| @@ -4614,17 +4644,30 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id, | |||
| 4614 | 4644 | ||
| 4615 | static int ext4_quota_off(struct super_block *sb, int type) | 4645 | static int ext4_quota_off(struct super_block *sb, int type) |
| 4616 | { | 4646 | { |
| 4647 | struct inode *inode = sb_dqopt(sb)->files[type]; | ||
| 4648 | handle_t *handle; | ||
| 4649 | |||
| 4617 | /* Force all delayed allocation blocks to be allocated. | 4650 | /* Force all delayed allocation blocks to be allocated. |
| 4618 | * Caller already holds s_umount sem */ | 4651 | * Caller already holds s_umount sem */ |
| 4619 | if (test_opt(sb, DELALLOC)) | 4652 | if (test_opt(sb, DELALLOC)) |
| 4620 | sync_filesystem(sb); | 4653 | sync_filesystem(sb); |
| 4621 | 4654 | ||
| 4655 | /* Update modification times of quota files when userspace can | ||
| 4656 | * start looking at them */ | ||
| 4657 | handle = ext4_journal_start(inode, 1); | ||
| 4658 | if (IS_ERR(handle)) | ||
| 4659 | goto out; | ||
| 4660 | inode->i_mtime = inode->i_ctime = CURRENT_TIME; | ||
| 4661 | ext4_mark_inode_dirty(handle, inode); | ||
| 4662 | ext4_journal_stop(handle); | ||
| 4663 | |||
| 4664 | out: | ||
| 4622 | return dquot_quota_off(sb, type); | 4665 | return dquot_quota_off(sb, type); |
| 4623 | } | 4666 | } |
| 4624 | 4667 | ||
| 4625 | /* Read data from quotafile - avoid pagecache and such because we cannot afford | 4668 | /* Read data from quotafile - avoid pagecache and such because we cannot afford |
| 4626 | * acquiring the locks... As quota files are never truncated and quota code | 4669 | * acquiring the locks... As quota files are never truncated and quota code |
| 4627 | * itself serializes the operations (and noone else should touch the files) | 4670 | * itself serializes the operations (and no one else should touch the files) |
| 4628 | * we don't have to be afraid of races */ | 4671 | * we don't have to be afraid of races */ |
| 4629 | static ssize_t ext4_quota_read(struct super_block *sb, int type, char *data, | 4672 | static ssize_t ext4_quota_read(struct super_block *sb, int type, char *data, |
| 4630 | size_t len, loff_t off) | 4673 | size_t len, loff_t off) |
| @@ -4714,9 +4757,8 @@ out: | |||
| 4714 | if (inode->i_size < off + len) { | 4757 | if (inode->i_size < off + len) { |
| 4715 | i_size_write(inode, off + len); | 4758 | i_size_write(inode, off + len); |
| 4716 | EXT4_I(inode)->i_disksize = inode->i_size; | 4759 | EXT4_I(inode)->i_disksize = inode->i_size; |
| 4760 | ext4_mark_inode_dirty(handle, inode); | ||
| 4717 | } | 4761 | } |
| 4718 | inode->i_mtime = inode->i_ctime = CURRENT_TIME; | ||
| 4719 | ext4_mark_inode_dirty(handle, inode); | ||
| 4720 | mutex_unlock(&inode->i_mutex); | 4762 | mutex_unlock(&inode->i_mutex); |
| 4721 | return len; | 4763 | return len; |
| 4722 | } | 4764 | } |
diff --git a/fs/fhandle.c b/fs/fhandle.c index bf93ad2bee07..6b088641f5bf 100644 --- a/fs/fhandle.c +++ b/fs/fhandle.c | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | #include <linux/exportfs.h> | 7 | #include <linux/exportfs.h> |
| 8 | #include <linux/fs_struct.h> | 8 | #include <linux/fs_struct.h> |
| 9 | #include <linux/fsnotify.h> | 9 | #include <linux/fsnotify.h> |
| 10 | #include <linux/personality.h> | ||
| 10 | #include <asm/uaccess.h> | 11 | #include <asm/uaccess.h> |
| 11 | #include "internal.h" | 12 | #include "internal.h" |
| 12 | 13 | ||
diff --git a/fs/filesystems.c b/fs/filesystems.c index 751d6b255a12..0845f84f2a5f 100644 --- a/fs/filesystems.c +++ b/fs/filesystems.c | |||
| @@ -110,14 +110,13 @@ int unregister_filesystem(struct file_system_type * fs) | |||
| 110 | *tmp = fs->next; | 110 | *tmp = fs->next; |
| 111 | fs->next = NULL; | 111 | fs->next = NULL; |
| 112 | write_unlock(&file_systems_lock); | 112 | write_unlock(&file_systems_lock); |
| 113 | synchronize_rcu(); | ||
| 113 | return 0; | 114 | return 0; |
| 114 | } | 115 | } |
| 115 | tmp = &(*tmp)->next; | 116 | tmp = &(*tmp)->next; |
| 116 | } | 117 | } |
| 117 | write_unlock(&file_systems_lock); | 118 | write_unlock(&file_systems_lock); |
| 118 | 119 | ||
| 119 | synchronize_rcu(); | ||
| 120 | |||
| 121 | return -EINVAL; | 120 | return -EINVAL; |
| 122 | } | 121 | } |
| 123 | 122 | ||
diff --git a/fs/freevxfs/vxfs_fshead.c b/fs/freevxfs/vxfs_fshead.c index 78948b4b1894..c9a6a94e58e9 100644 --- a/fs/freevxfs/vxfs_fshead.c +++ b/fs/freevxfs/vxfs_fshead.c | |||
| @@ -164,7 +164,7 @@ vxfs_read_fshead(struct super_block *sbp) | |||
| 164 | goto out_free_pfp; | 164 | goto out_free_pfp; |
| 165 | } | 165 | } |
| 166 | if (!VXFS_ISILT(VXFS_INO(infp->vsi_stilist))) { | 166 | if (!VXFS_ISILT(VXFS_INO(infp->vsi_stilist))) { |
| 167 | printk(KERN_ERR "vxfs: structual list inode is of wrong type (%x)\n", | 167 | printk(KERN_ERR "vxfs: structural list inode is of wrong type (%x)\n", |
| 168 | VXFS_INO(infp->vsi_stilist)->vii_mode & VXFS_TYPE_MASK); | 168 | VXFS_INO(infp->vsi_stilist)->vii_mode & VXFS_TYPE_MASK); |
| 169 | goto out_iput_stilist; | 169 | goto out_iput_stilist; |
| 170 | } | 170 | } |
diff --git a/fs/freevxfs/vxfs_lookup.c b/fs/freevxfs/vxfs_lookup.c index 6c5131d592f0..3360f1e678ad 100644 --- a/fs/freevxfs/vxfs_lookup.c +++ b/fs/freevxfs/vxfs_lookup.c | |||
| @@ -162,7 +162,7 @@ vxfs_find_entry(struct inode *ip, struct dentry *dp, struct page **ppp) | |||
| 162 | /** | 162 | /** |
| 163 | * vxfs_inode_by_name - find inode number for dentry | 163 | * vxfs_inode_by_name - find inode number for dentry |
| 164 | * @dip: directory to search in | 164 | * @dip: directory to search in |
| 165 | * @dp: dentry we seach for | 165 | * @dp: dentry we search for |
| 166 | * | 166 | * |
| 167 | * Description: | 167 | * Description: |
| 168 | * vxfs_inode_by_name finds out the inode number of | 168 | * vxfs_inode_by_name finds out the inode number of |
diff --git a/fs/freevxfs/vxfs_olt.h b/fs/freevxfs/vxfs_olt.h index d8324296486f..b7b3af502615 100644 --- a/fs/freevxfs/vxfs_olt.h +++ b/fs/freevxfs/vxfs_olt.h | |||
| @@ -60,7 +60,7 @@ enum { | |||
| 60 | * | 60 | * |
| 61 | * The Object Location Table header is placed at the beginning of each | 61 | * The Object Location Table header is placed at the beginning of each |
| 62 | * OLT extent. It is used to fing certain filesystem-wide metadata, e.g. | 62 | * OLT extent. It is used to fing certain filesystem-wide metadata, e.g. |
| 63 | * the inital inode list, the fileset header or the device configuration. | 63 | * the initial inode list, the fileset header or the device configuration. |
| 64 | */ | 64 | */ |
| 65 | struct vxfs_olt { | 65 | struct vxfs_olt { |
| 66 | u_int32_t olt_magic; /* magic number */ | 66 | u_int32_t olt_magic; /* magic number */ |
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index b5ed541fb137..34591ee804b5 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c | |||
| @@ -144,7 +144,7 @@ __bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages, | |||
| 144 | * | 144 | * |
| 145 | * Description: | 145 | * Description: |
| 146 | * This does WB_SYNC_NONE opportunistic writeback. The IO is only | 146 | * This does WB_SYNC_NONE opportunistic writeback. The IO is only |
| 147 | * started when this function returns, we make no guarentees on | 147 | * started when this function returns, we make no guarantees on |
| 148 | * completion. Caller need not hold sb s_umount semaphore. | 148 | * completion. Caller need not hold sb s_umount semaphore. |
| 149 | * | 149 | * |
| 150 | */ | 150 | */ |
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 6ea00734984e..82a66466a24c 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c | |||
| @@ -523,7 +523,7 @@ static int fuse_readpage(struct file *file, struct page *page) | |||
| 523 | goto out; | 523 | goto out; |
| 524 | 524 | ||
| 525 | /* | 525 | /* |
| 526 | * Page writeback can extend beyond the liftime of the | 526 | * Page writeback can extend beyond the lifetime of the |
| 527 | * page-cache page, so make sure we read a properly synced | 527 | * page-cache page, so make sure we read a properly synced |
| 528 | * page. | 528 | * page. |
| 529 | */ | 529 | */ |
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index ef3dc4b9fae2..74add2ddcc3f 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c | |||
| @@ -1136,7 +1136,7 @@ void gfs2_trim_blocks(struct inode *inode) | |||
| 1136 | * earlier versions of GFS2 have a bug in the stuffed file reading | 1136 | * earlier versions of GFS2 have a bug in the stuffed file reading |
| 1137 | * code which will result in a buffer overrun if the size is larger | 1137 | * code which will result in a buffer overrun if the size is larger |
| 1138 | * than the max stuffed file size. In order to prevent this from | 1138 | * than the max stuffed file size. In order to prevent this from |
| 1139 | * occuring, such files are unstuffed, but in other cases we can | 1139 | * occurring, such files are unstuffed, but in other cases we can |
| 1140 | * just update the inode size directly. | 1140 | * just update the inode size directly. |
| 1141 | * | 1141 | * |
| 1142 | * Returns: 0 on success, or -ve on error | 1142 | * Returns: 0 on success, or -ve on error |
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index e2431313491f..f07643e21bfa 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c | |||
| @@ -1123,7 +1123,7 @@ void gfs2_glock_dq_uninit(struct gfs2_holder *gh) | |||
| 1123 | * @number: the lock number | 1123 | * @number: the lock number |
| 1124 | * @glops: the glock operations for the type of glock | 1124 | * @glops: the glock operations for the type of glock |
| 1125 | * @state: the state to acquire the glock in | 1125 | * @state: the state to acquire the glock in |
| 1126 | * @flags: modifier flags for the aquisition | 1126 | * @flags: modifier flags for the acquisition |
| 1127 | * @gh: the struct gfs2_holder | 1127 | * @gh: the struct gfs2_holder |
| 1128 | * | 1128 | * |
| 1129 | * Returns: errno | 1129 | * Returns: errno |
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index ec73ed70bae1..a4e23d68a398 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c | |||
| @@ -657,7 +657,7 @@ out: | |||
| 657 | * @sdp: the file system | 657 | * @sdp: the file system |
| 658 | * | 658 | * |
| 659 | * This function flushes data and meta data for all machines by | 659 | * This function flushes data and meta data for all machines by |
| 660 | * aquiring the transaction log exclusively. All journals are | 660 | * acquiring the transaction log exclusively. All journals are |
| 661 | * ensured to be in a clean state as well. | 661 | * ensured to be in a clean state as well. |
| 662 | * | 662 | * |
| 663 | * Returns: errno | 663 | * Returns: errno |
diff --git a/fs/inode.c b/fs/inode.c index 5f4e11aaeb5c..33c963d08ab4 100644 --- a/fs/inode.c +++ b/fs/inode.c | |||
| @@ -125,6 +125,14 @@ __cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_wb_list_lock); | |||
| 125 | static DECLARE_RWSEM(iprune_sem); | 125 | static DECLARE_RWSEM(iprune_sem); |
| 126 | 126 | ||
| 127 | /* | 127 | /* |
| 128 | * Empty aops. Can be used for the cases where the user does not | ||
| 129 | * define any of the address_space operations. | ||
| 130 | */ | ||
| 131 | const struct address_space_operations empty_aops = { | ||
| 132 | }; | ||
| 133 | EXPORT_SYMBOL(empty_aops); | ||
| 134 | |||
| 135 | /* | ||
| 128 | * Statistics gathering.. | 136 | * Statistics gathering.. |
| 129 | */ | 137 | */ |
| 130 | struct inodes_stat_t inodes_stat; | 138 | struct inodes_stat_t inodes_stat; |
| @@ -176,7 +184,6 @@ int proc_nr_inodes(ctl_table *table, int write, | |||
| 176 | */ | 184 | */ |
| 177 | int inode_init_always(struct super_block *sb, struct inode *inode) | 185 | int inode_init_always(struct super_block *sb, struct inode *inode) |
| 178 | { | 186 | { |
| 179 | static const struct address_space_operations empty_aops; | ||
| 180 | static const struct inode_operations empty_iops; | 187 | static const struct inode_operations empty_iops; |
| 181 | static const struct file_operations empty_fops; | 188 | static const struct file_operations empty_fops; |
| 182 | struct address_space *const mapping = &inode->i_data; | 189 | struct address_space *const mapping = &inode->i_data; |
diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c index da871ee084d3..69b180459463 100644 --- a/fs/jbd/commit.c +++ b/fs/jbd/commit.c | |||
| @@ -362,7 +362,7 @@ void journal_commit_transaction(journal_t *journal) | |||
| 362 | * we do not require it to remember exactly which old buffers it | 362 | * we do not require it to remember exactly which old buffers it |
| 363 | * has reserved. This is consistent with the existing behaviour | 363 | * has reserved. This is consistent with the existing behaviour |
| 364 | * that multiple journal_get_write_access() calls to the same | 364 | * that multiple journal_get_write_access() calls to the same |
| 365 | * buffer are perfectly permissable. | 365 | * buffer are perfectly permissible. |
| 366 | */ | 366 | */ |
| 367 | while (commit_transaction->t_reserved_list) { | 367 | while (commit_transaction->t_reserved_list) { |
| 368 | jh = commit_transaction->t_reserved_list; | 368 | jh = commit_transaction->t_reserved_list; |
diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c index eb11601f2e00..b3713afaaa9e 100644 --- a/fs/jbd/journal.c +++ b/fs/jbd/journal.c | |||
| @@ -770,7 +770,7 @@ journal_t * journal_init_dev(struct block_device *bdev, | |||
| 770 | journal->j_wbufsize = n; | 770 | journal->j_wbufsize = n; |
| 771 | journal->j_wbuf = kmalloc(n * sizeof(struct buffer_head*), GFP_KERNEL); | 771 | journal->j_wbuf = kmalloc(n * sizeof(struct buffer_head*), GFP_KERNEL); |
| 772 | if (!journal->j_wbuf) { | 772 | if (!journal->j_wbuf) { |
| 773 | printk(KERN_ERR "%s: Cant allocate bhs for commit thread\n", | 773 | printk(KERN_ERR "%s: Can't allocate bhs for commit thread\n", |
| 774 | __func__); | 774 | __func__); |
| 775 | goto out_err; | 775 | goto out_err; |
| 776 | } | 776 | } |
| @@ -831,7 +831,7 @@ journal_t * journal_init_inode (struct inode *inode) | |||
| 831 | journal->j_wbufsize = n; | 831 | journal->j_wbufsize = n; |
| 832 | journal->j_wbuf = kmalloc(n * sizeof(struct buffer_head*), GFP_KERNEL); | 832 | journal->j_wbuf = kmalloc(n * sizeof(struct buffer_head*), GFP_KERNEL); |
| 833 | if (!journal->j_wbuf) { | 833 | if (!journal->j_wbuf) { |
| 834 | printk(KERN_ERR "%s: Cant allocate bhs for commit thread\n", | 834 | printk(KERN_ERR "%s: Can't allocate bhs for commit thread\n", |
| 835 | __func__); | 835 | __func__); |
| 836 | goto out_err; | 836 | goto out_err; |
| 837 | } | 837 | } |
diff --git a/fs/jbd/revoke.c b/fs/jbd/revoke.c index d29018307e2e..305a90763154 100644 --- a/fs/jbd/revoke.c +++ b/fs/jbd/revoke.c | |||
| @@ -71,7 +71,7 @@ | |||
| 71 | * switching hash tables under them. For operations on the lists of entries in | 71 | * switching hash tables under them. For operations on the lists of entries in |
| 72 | * the hash table j_revoke_lock is used. | 72 | * the hash table j_revoke_lock is used. |
| 73 | * | 73 | * |
| 74 | * Finally, also replay code uses the hash tables but at this moment noone else | 74 | * Finally, also replay code uses the hash tables but at this moment no one else |
| 75 | * can touch them (filesystem isn't mounted yet) and hence no locking is | 75 | * can touch them (filesystem isn't mounted yet) and hence no locking is |
| 76 | * needed. | 76 | * needed. |
| 77 | */ | 77 | */ |
diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c index 5b2e4c30a2a1..60d2319651b2 100644 --- a/fs/jbd/transaction.c +++ b/fs/jbd/transaction.c | |||
| @@ -1392,7 +1392,7 @@ int journal_stop(handle_t *handle) | |||
| 1392 | * by 30x or more... | 1392 | * by 30x or more... |
| 1393 | * | 1393 | * |
| 1394 | * We try and optimize the sleep time against what the underlying disk | 1394 | * We try and optimize the sleep time against what the underlying disk |
| 1395 | * can do, instead of having a static sleep time. This is usefull for | 1395 | * can do, instead of having a static sleep time. This is useful for |
| 1396 | * the case where our storage is so fast that it is more optimal to go | 1396 | * the case where our storage is so fast that it is more optimal to go |
| 1397 | * ahead and force a flush and wait for the transaction to be committed | 1397 | * ahead and force a flush and wait for the transaction to be committed |
| 1398 | * than it is to wait for an arbitrary amount of time for new writers to | 1398 | * than it is to wait for an arbitrary amount of time for new writers to |
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index fa36d7662b21..6e28000a4b21 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c | |||
| @@ -105,6 +105,8 @@ static int journal_submit_commit_record(journal_t *journal, | |||
| 105 | int ret; | 105 | int ret; |
| 106 | struct timespec now = current_kernel_time(); | 106 | struct timespec now = current_kernel_time(); |
| 107 | 107 | ||
| 108 | *cbh = NULL; | ||
| 109 | |||
| 108 | if (is_journal_aborted(journal)) | 110 | if (is_journal_aborted(journal)) |
| 109 | return 0; | 111 | return 0; |
| 110 | 112 | ||
| @@ -403,7 +405,7 @@ void jbd2_journal_commit_transaction(journal_t *journal) | |||
| 403 | * we do not require it to remember exactly which old buffers it | 405 | * we do not require it to remember exactly which old buffers it |
| 404 | * has reserved. This is consistent with the existing behaviour | 406 | * has reserved. This is consistent with the existing behaviour |
| 405 | * that multiple jbd2_journal_get_write_access() calls to the same | 407 | * that multiple jbd2_journal_get_write_access() calls to the same |
| 406 | * buffer are perfectly permissable. | 408 | * buffer are perfectly permissible. |
| 407 | */ | 409 | */ |
| 408 | while (commit_transaction->t_reserved_list) { | 410 | while (commit_transaction->t_reserved_list) { |
| 409 | jh = commit_transaction->t_reserved_list; | 411 | jh = commit_transaction->t_reserved_list; |
| @@ -806,7 +808,7 @@ wait_for_iobuf: | |||
| 806 | if (err) | 808 | if (err) |
| 807 | __jbd2_journal_abort_hard(journal); | 809 | __jbd2_journal_abort_hard(journal); |
| 808 | } | 810 | } |
| 809 | if (!err && !is_journal_aborted(journal)) | 811 | if (cbh) |
| 810 | err = journal_wait_on_commit_record(journal, cbh); | 812 | err = journal_wait_on_commit_record(journal, cbh); |
| 811 | if (JBD2_HAS_INCOMPAT_FEATURE(journal, | 813 | if (JBD2_HAS_INCOMPAT_FEATURE(journal, |
| 812 | JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT) && | 814 | JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT) && |
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 90407b8fece7..e0ec3db1c395 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c | |||
| @@ -917,7 +917,7 @@ journal_t * jbd2_journal_init_dev(struct block_device *bdev, | |||
| 917 | journal->j_wbufsize = n; | 917 | journal->j_wbufsize = n; |
| 918 | journal->j_wbuf = kmalloc(n * sizeof(struct buffer_head*), GFP_KERNEL); | 918 | journal->j_wbuf = kmalloc(n * sizeof(struct buffer_head*), GFP_KERNEL); |
| 919 | if (!journal->j_wbuf) { | 919 | if (!journal->j_wbuf) { |
| 920 | printk(KERN_ERR "%s: Cant allocate bhs for commit thread\n", | 920 | printk(KERN_ERR "%s: Can't allocate bhs for commit thread\n", |
| 921 | __func__); | 921 | __func__); |
| 922 | goto out_err; | 922 | goto out_err; |
| 923 | } | 923 | } |
| @@ -983,7 +983,7 @@ journal_t * jbd2_journal_init_inode (struct inode *inode) | |||
| 983 | journal->j_wbufsize = n; | 983 | journal->j_wbufsize = n; |
| 984 | journal->j_wbuf = kmalloc(n * sizeof(struct buffer_head*), GFP_KERNEL); | 984 | journal->j_wbuf = kmalloc(n * sizeof(struct buffer_head*), GFP_KERNEL); |
| 985 | if (!journal->j_wbuf) { | 985 | if (!journal->j_wbuf) { |
| 986 | printk(KERN_ERR "%s: Cant allocate bhs for commit thread\n", | 986 | printk(KERN_ERR "%s: Can't allocate bhs for commit thread\n", |
| 987 | __func__); | 987 | __func__); |
| 988 | goto out_err; | 988 | goto out_err; |
| 989 | } | 989 | } |
| @@ -2413,10 +2413,12 @@ const char *jbd2_dev_to_name(dev_t device) | |||
| 2413 | new_dev = kmalloc(sizeof(struct devname_cache), GFP_KERNEL); | 2413 | new_dev = kmalloc(sizeof(struct devname_cache), GFP_KERNEL); |
| 2414 | if (!new_dev) | 2414 | if (!new_dev) |
| 2415 | return "NODEV-ALLOCFAILURE"; /* Something non-NULL */ | 2415 | return "NODEV-ALLOCFAILURE"; /* Something non-NULL */ |
| 2416 | bd = bdget(device); | ||
| 2416 | spin_lock(&devname_cache_lock); | 2417 | spin_lock(&devname_cache_lock); |
| 2417 | if (devcache[i]) { | 2418 | if (devcache[i]) { |
| 2418 | if (devcache[i]->device == device) { | 2419 | if (devcache[i]->device == device) { |
| 2419 | kfree(new_dev); | 2420 | kfree(new_dev); |
| 2421 | bdput(bd); | ||
| 2420 | ret = devcache[i]->devname; | 2422 | ret = devcache[i]->devname; |
| 2421 | spin_unlock(&devname_cache_lock); | 2423 | spin_unlock(&devname_cache_lock); |
| 2422 | return ret; | 2424 | return ret; |
| @@ -2425,7 +2427,6 @@ const char *jbd2_dev_to_name(dev_t device) | |||
| 2425 | } | 2427 | } |
| 2426 | devcache[i] = new_dev; | 2428 | devcache[i] = new_dev; |
| 2427 | devcache[i]->device = device; | 2429 | devcache[i]->device = device; |
| 2428 | bd = bdget(device); | ||
| 2429 | if (bd) { | 2430 | if (bd) { |
| 2430 | bdevname(bd, devcache[i]->devname); | 2431 | bdevname(bd, devcache[i]->devname); |
| 2431 | bdput(bd); | 2432 | bdput(bd); |
diff --git a/fs/jbd2/revoke.c b/fs/jbd2/revoke.c index 9ad321fd63fd..69fd93588118 100644 --- a/fs/jbd2/revoke.c +++ b/fs/jbd2/revoke.c | |||
| @@ -71,7 +71,7 @@ | |||
| 71 | * switching hash tables under them. For operations on the lists of entries in | 71 | * switching hash tables under them. For operations on the lists of entries in |
| 72 | * the hash table j_revoke_lock is used. | 72 | * the hash table j_revoke_lock is used. |
| 73 | * | 73 | * |
| 74 | * Finally, also replay code uses the hash tables but at this moment noone else | 74 | * Finally, also replay code uses the hash tables but at this moment no one else |
| 75 | * can touch them (filesystem isn't mounted yet) and hence no locking is | 75 | * can touch them (filesystem isn't mounted yet) and hence no locking is |
| 76 | * needed. | 76 | * needed. |
| 77 | */ | 77 | */ |
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index 1d1191050f99..05fa77a23711 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c | |||
| @@ -1403,7 +1403,7 @@ int jbd2_journal_stop(handle_t *handle) | |||
| 1403 | 1403 | ||
| 1404 | /* | 1404 | /* |
| 1405 | * Once we drop t_updates, if it goes to zero the transaction | 1405 | * Once we drop t_updates, if it goes to zero the transaction |
| 1406 | * could start commiting on us and eventually disappear. So | 1406 | * could start committing on us and eventually disappear. So |
| 1407 | * once we do this, we must not dereference transaction | 1407 | * once we do this, we must not dereference transaction |
| 1408 | * pointer again. | 1408 | * pointer again. |
| 1409 | */ | 1409 | */ |
diff --git a/fs/jffs2/TODO b/fs/jffs2/TODO index 5d3ea4070f01..ca28964abd4b 100644 --- a/fs/jffs2/TODO +++ b/fs/jffs2/TODO | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | - checkpointing (do we need this? scan is quite fast) | 11 | - checkpointing (do we need this? scan is quite fast) |
| 12 | - make the scan code populate real inodes so read_inode just after | 12 | - make the scan code populate real inodes so read_inode just after |
| 13 | mount doesn't have to read the flash twice for large files. | 13 | mount doesn't have to read the flash twice for large files. |
| 14 | Make this a per-inode option, changable with chattr, so you can | 14 | Make this a per-inode option, changeable with chattr, so you can |
| 15 | decide which inodes should be in-core immediately after mount. | 15 | decide which inodes should be in-core immediately after mount. |
| 16 | - test, test, test | 16 | - test, test, test |
| 17 | 17 | ||
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c index d32ee9412cb9..2ab1a0d91210 100644 --- a/fs/jffs2/readinode.c +++ b/fs/jffs2/readinode.c | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | * | 24 | * |
| 25 | * Returns: 0 if the data CRC is correct; | 25 | * Returns: 0 if the data CRC is correct; |
| 26 | * 1 - if incorrect; | 26 | * 1 - if incorrect; |
| 27 | * error code if an error occured. | 27 | * error code if an error occurred. |
| 28 | */ | 28 | */ |
| 29 | static int check_node_data(struct jffs2_sb_info *c, struct jffs2_tmp_dnode_info *tn) | 29 | static int check_node_data(struct jffs2_sb_info *c, struct jffs2_tmp_dnode_info *tn) |
| 30 | { | 30 | { |
diff --git a/fs/jffs2/summary.c b/fs/jffs2/summary.c index 800171dca53b..e537fb0e0184 100644 --- a/fs/jffs2/summary.c +++ b/fs/jffs2/summary.c | |||
| @@ -121,7 +121,7 @@ int jffs2_sum_add_inode_mem(struct jffs2_summary *s, struct jffs2_raw_inode *ri, | |||
| 121 | temp->nodetype = ri->nodetype; | 121 | temp->nodetype = ri->nodetype; |
| 122 | temp->inode = ri->ino; | 122 | temp->inode = ri->ino; |
| 123 | temp->version = ri->version; | 123 | temp->version = ri->version; |
| 124 | temp->offset = cpu_to_je32(ofs); /* relative offset from the begining of the jeb */ | 124 | temp->offset = cpu_to_je32(ofs); /* relative offset from the beginning of the jeb */ |
| 125 | temp->totlen = ri->totlen; | 125 | temp->totlen = ri->totlen; |
| 126 | temp->next = NULL; | 126 | temp->next = NULL; |
| 127 | 127 | ||
| @@ -139,7 +139,7 @@ int jffs2_sum_add_dirent_mem(struct jffs2_summary *s, struct jffs2_raw_dirent *r | |||
| 139 | 139 | ||
| 140 | temp->nodetype = rd->nodetype; | 140 | temp->nodetype = rd->nodetype; |
| 141 | temp->totlen = rd->totlen; | 141 | temp->totlen = rd->totlen; |
| 142 | temp->offset = cpu_to_je32(ofs); /* relative from the begining of the jeb */ | 142 | temp->offset = cpu_to_je32(ofs); /* relative from the beginning of the jeb */ |
| 143 | temp->pino = rd->pino; | 143 | temp->pino = rd->pino; |
| 144 | temp->version = rd->version; | 144 | temp->version = rd->version; |
| 145 | temp->ino = rd->ino; | 145 | temp->ino = rd->ino; |
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c index 07ee1546b2fa..4515bea0268f 100644 --- a/fs/jffs2/wbuf.c +++ b/fs/jffs2/wbuf.c | |||
| @@ -1116,7 +1116,7 @@ int jffs2_write_nand_cleanmarker(struct jffs2_sb_info *c, | |||
| 1116 | 1116 | ||
| 1117 | /* | 1117 | /* |
| 1118 | * On NAND we try to mark this block bad. If the block was erased more | 1118 | * On NAND we try to mark this block bad. If the block was erased more |
| 1119 | * than MAX_ERASE_FAILURES we mark it finaly bad. | 1119 | * than MAX_ERASE_FAILURES we mark it finally bad. |
| 1120 | * Don't care about failures. This block remains on the erase-pending | 1120 | * Don't care about failures. This block remains on the erase-pending |
| 1121 | * or badblock list as long as nobody manipulates the flash with | 1121 | * or badblock list as long as nobody manipulates the flash with |
| 1122 | * a bootloader or something like that. | 1122 | * a bootloader or something like that. |
diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c index c92ea3b3ea5e..4496872cf4e7 100644 --- a/fs/jfs/jfs_dmap.c +++ b/fs/jfs/jfs_dmap.c | |||
| @@ -1649,7 +1649,7 @@ static int dbFindCtl(struct bmap * bmp, int l2nb, int level, s64 * blkno) | |||
| 1649 | } | 1649 | } |
| 1650 | 1650 | ||
| 1651 | /* search the tree within the dmap control page for | 1651 | /* search the tree within the dmap control page for |
| 1652 | * sufficent free space. if sufficient free space is found, | 1652 | * sufficient free space. if sufficient free space is found, |
| 1653 | * dbFindLeaf() returns the index of the leaf at which | 1653 | * dbFindLeaf() returns the index of the leaf at which |
| 1654 | * free space was found. | 1654 | * free space was found. |
| 1655 | */ | 1655 | */ |
| @@ -2744,7 +2744,7 @@ static int dbJoin(dmtree_t * tp, int leafno, int newval) | |||
| 2744 | /* check which (leafno or buddy) is the left buddy. | 2744 | /* check which (leafno or buddy) is the left buddy. |
| 2745 | * the left buddy gets to claim the blocks resulting | 2745 | * the left buddy gets to claim the blocks resulting |
| 2746 | * from the join while the right gets to claim none. | 2746 | * from the join while the right gets to claim none. |
| 2747 | * the left buddy is also eligable to participate in | 2747 | * the left buddy is also eligible to participate in |
| 2748 | * a join at the next higher level while the right | 2748 | * a join at the next higher level while the right |
| 2749 | * is not. | 2749 | * is not. |
| 2750 | * | 2750 | * |
diff --git a/fs/jfs/jfs_extent.c b/fs/jfs/jfs_extent.c index 5d3bbd10f8db..e5fe8506ed16 100644 --- a/fs/jfs/jfs_extent.c +++ b/fs/jfs/jfs_extent.c | |||
| @@ -126,7 +126,7 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, bool abnr) | |||
| 126 | 126 | ||
| 127 | /* allocate the disk blocks for the extent. initially, extBalloc() | 127 | /* allocate the disk blocks for the extent. initially, extBalloc() |
| 128 | * will try to allocate disk blocks for the requested size (xlen). | 128 | * will try to allocate disk blocks for the requested size (xlen). |
| 129 | * if this fails (xlen contiguous free blocks not avaliable), it'll | 129 | * if this fails (xlen contiguous free blocks not available), it'll |
| 130 | * try to allocate a smaller number of blocks (producing a smaller | 130 | * try to allocate a smaller number of blocks (producing a smaller |
| 131 | * extent), with this smaller number of blocks consisting of the | 131 | * extent), with this smaller number of blocks consisting of the |
| 132 | * requested number of blocks rounded down to the next smaller | 132 | * requested number of blocks rounded down to the next smaller |
| @@ -481,7 +481,7 @@ int extFill(struct inode *ip, xad_t * xp) | |||
| 481 | * | 481 | * |
| 482 | * initially, we will try to allocate disk blocks for the | 482 | * initially, we will try to allocate disk blocks for the |
| 483 | * requested size (nblocks). if this fails (nblocks | 483 | * requested size (nblocks). if this fails (nblocks |
| 484 | * contiguous free blocks not avaliable), we'll try to allocate | 484 | * contiguous free blocks not available), we'll try to allocate |
| 485 | * a smaller number of blocks (producing a smaller extent), with | 485 | * a smaller number of blocks (producing a smaller extent), with |
| 486 | * this smaller number of blocks consisting of the requested | 486 | * this smaller number of blocks consisting of the requested |
| 487 | * number of blocks rounded down to the next smaller power of 2 | 487 | * number of blocks rounded down to the next smaller power of 2 |
| @@ -575,7 +575,7 @@ extBalloc(struct inode *ip, s64 hint, s64 * nblocks, s64 * blkno) | |||
| 575 | * to a new set of blocks. If moving the extent, we initially | 575 | * to a new set of blocks. If moving the extent, we initially |
| 576 | * will try to allocate disk blocks for the requested size | 576 | * will try to allocate disk blocks for the requested size |
| 577 | * (newnblks). if this fails (new contiguous free blocks not | 577 | * (newnblks). if this fails (new contiguous free blocks not |
| 578 | * avaliable), we'll try to allocate a smaller number of | 578 | * available), we'll try to allocate a smaller number of |
| 579 | * blocks (producing a smaller extent), with this smaller | 579 | * blocks (producing a smaller extent), with this smaller |
| 580 | * number of blocks consisting of the requested number of | 580 | * number of blocks consisting of the requested number of |
| 581 | * blocks rounded down to the next smaller power of 2 | 581 | * blocks rounded down to the next smaller power of 2 |
diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c index 3a09423b6c22..ed53a4740168 100644 --- a/fs/jfs/jfs_imap.c +++ b/fs/jfs/jfs_imap.c | |||
| @@ -1069,7 +1069,7 @@ int diFree(struct inode *ip) | |||
| 1069 | */ | 1069 | */ |
| 1070 | if (iagp->nfreeexts == cpu_to_le32(EXTSPERIAG - 1)) { | 1070 | if (iagp->nfreeexts == cpu_to_le32(EXTSPERIAG - 1)) { |
| 1071 | /* in preparation for removing the iag from the | 1071 | /* in preparation for removing the iag from the |
| 1072 | * ag extent free list, read the iags preceeding | 1072 | * ag extent free list, read the iags preceding |
| 1073 | * and following the iag on the ag extent free | 1073 | * and following the iag on the ag extent free |
| 1074 | * list. | 1074 | * list. |
| 1075 | */ | 1075 | */ |
| @@ -1095,7 +1095,7 @@ int diFree(struct inode *ip) | |||
| 1095 | int inofreefwd = le32_to_cpu(iagp->inofreefwd); | 1095 | int inofreefwd = le32_to_cpu(iagp->inofreefwd); |
| 1096 | 1096 | ||
| 1097 | /* in preparation for removing the iag from the | 1097 | /* in preparation for removing the iag from the |
| 1098 | * ag inode free list, read the iags preceeding | 1098 | * ag inode free list, read the iags preceding |
| 1099 | * and following the iag on the ag inode free | 1099 | * and following the iag on the ag inode free |
| 1100 | * list. before reading these iags, we must make | 1100 | * list. before reading these iags, we must make |
| 1101 | * sure that we already don't have them in hand | 1101 | * sure that we already don't have them in hand |
| @@ -1681,7 +1681,7 @@ diAllocAG(struct inomap * imap, int agno, bool dir, struct inode *ip) | |||
| 1681 | * try to allocate a new extent of free inodes. | 1681 | * try to allocate a new extent of free inodes. |
| 1682 | */ | 1682 | */ |
| 1683 | if (addext) { | 1683 | if (addext) { |
| 1684 | /* if free space is not avaliable for this new extent, try | 1684 | /* if free space is not available for this new extent, try |
| 1685 | * below to allocate a free and existing (already backed) | 1685 | * below to allocate a free and existing (already backed) |
| 1686 | * inode from the ag. | 1686 | * inode from the ag. |
| 1687 | */ | 1687 | */ |
| @@ -2036,7 +2036,7 @@ static int diAllocBit(struct inomap * imap, struct iag * iagp, int ino) | |||
| 2036 | 2036 | ||
| 2037 | /* check if this is the last free inode within the iag. | 2037 | /* check if this is the last free inode within the iag. |
| 2038 | * if so, it will have to be removed from the ag free | 2038 | * if so, it will have to be removed from the ag free |
| 2039 | * inode list, so get the iags preceeding and following | 2039 | * inode list, so get the iags preceding and following |
| 2040 | * it on the list. | 2040 | * it on the list. |
| 2041 | */ | 2041 | */ |
| 2042 | if (iagp->nfreeinos == cpu_to_le32(1)) { | 2042 | if (iagp->nfreeinos == cpu_to_le32(1)) { |
| @@ -2208,7 +2208,7 @@ static int diNewExt(struct inomap * imap, struct iag * iagp, int extno) | |||
| 2208 | 2208 | ||
| 2209 | /* check if this is the last free extent within the | 2209 | /* check if this is the last free extent within the |
| 2210 | * iag. if so, the iag must be removed from the ag | 2210 | * iag. if so, the iag must be removed from the ag |
| 2211 | * free extent list, so get the iags preceeding and | 2211 | * free extent list, so get the iags preceding and |
| 2212 | * following the iag on this list. | 2212 | * following the iag on this list. |
| 2213 | */ | 2213 | */ |
| 2214 | if (iagp->nfreeexts == cpu_to_le32(1)) { | 2214 | if (iagp->nfreeexts == cpu_to_le32(1)) { |
| @@ -2504,7 +2504,7 @@ diNewIAG(struct inomap * imap, int *iagnop, int agno, struct metapage ** mpp) | |||
| 2504 | } | 2504 | } |
| 2505 | 2505 | ||
| 2506 | 2506 | ||
| 2507 | /* get the next avaliable iag number */ | 2507 | /* get the next available iag number */ |
| 2508 | iagno = imap->im_nextiag; | 2508 | iagno = imap->im_nextiag; |
| 2509 | 2509 | ||
| 2510 | /* make sure that we have not exceeded the maximum inode | 2510 | /* make sure that we have not exceeded the maximum inode |
| @@ -2615,7 +2615,7 @@ diNewIAG(struct inomap * imap, int *iagnop, int agno, struct metapage ** mpp) | |||
| 2615 | 2615 | ||
| 2616 | duplicateIXtree(sb, blkno, xlen, &xaddr); | 2616 | duplicateIXtree(sb, blkno, xlen, &xaddr); |
| 2617 | 2617 | ||
| 2618 | /* update the next avaliable iag number */ | 2618 | /* update the next available iag number */ |
| 2619 | imap->im_nextiag += 1; | 2619 | imap->im_nextiag += 1; |
| 2620 | 2620 | ||
| 2621 | /* Add the iag to the iag free list so we don't lose the iag | 2621 | /* Add the iag to the iag free list so we don't lose the iag |
diff --git a/fs/jfs/jfs_logmgr.h b/fs/jfs/jfs_logmgr.h index 9236bc49ae7f..e38c21598850 100644 --- a/fs/jfs/jfs_logmgr.h +++ b/fs/jfs/jfs_logmgr.h | |||
| @@ -288,7 +288,7 @@ struct lrd { | |||
| 288 | /* | 288 | /* |
| 289 | * SYNCPT: log sync point | 289 | * SYNCPT: log sync point |
| 290 | * | 290 | * |
| 291 | * replay log upto syncpt address specified; | 291 | * replay log up to syncpt address specified; |
| 292 | */ | 292 | */ |
| 293 | struct { | 293 | struct { |
| 294 | __le32 sync; /* 4: syncpt address (0 = here) */ | 294 | __le32 sync; /* 4: syncpt address (0 = here) */ |
diff --git a/fs/jfs/jfs_metapage.h b/fs/jfs/jfs_metapage.h index d94f8d9e87d7..a78beda85f68 100644 --- a/fs/jfs/jfs_metapage.h +++ b/fs/jfs/jfs_metapage.h | |||
| @@ -75,7 +75,7 @@ extern void grab_metapage(struct metapage *); | |||
| 75 | extern void force_metapage(struct metapage *); | 75 | extern void force_metapage(struct metapage *); |
| 76 | 76 | ||
| 77 | /* | 77 | /* |
| 78 | * hold_metapage and put_metapage are used in conjuction. The page lock | 78 | * hold_metapage and put_metapage are used in conjunction. The page lock |
| 79 | * is not dropped between the two, so no other threads can get or release | 79 | * is not dropped between the two, so no other threads can get or release |
| 80 | * the metapage | 80 | * the metapage |
| 81 | */ | 81 | */ |
diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c index 9466957ec841..f6cc0c09ec63 100644 --- a/fs/jfs/jfs_txnmgr.c +++ b/fs/jfs/jfs_txnmgr.c | |||
| @@ -636,7 +636,7 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp, | |||
| 636 | * the inode of the page and available to all anonymous | 636 | * the inode of the page and available to all anonymous |
| 637 | * transactions until txCommit() time at which point | 637 | * transactions until txCommit() time at which point |
| 638 | * they are transferred to the transaction tlock list of | 638 | * they are transferred to the transaction tlock list of |
| 639 | * the commiting transaction of the inode) | 639 | * the committing transaction of the inode) |
| 640 | */ | 640 | */ |
| 641 | if (xtid == 0) { | 641 | if (xtid == 0) { |
| 642 | tlck->tid = tid; | 642 | tlck->tid = tid; |
diff --git a/fs/jfs/resize.c b/fs/jfs/resize.c index 1aba0039f1c9..8ea5efb5a34e 100644 --- a/fs/jfs/resize.c +++ b/fs/jfs/resize.c | |||
| @@ -57,7 +57,7 @@ | |||
| 57 | * 2. compute new FSCKSize from new LVSize; | 57 | * 2. compute new FSCKSize from new LVSize; |
| 58 | * 3. set new FSSize as MIN(FSSize, LVSize-(LogSize+FSCKSize)) where | 58 | * 3. set new FSSize as MIN(FSSize, LVSize-(LogSize+FSCKSize)) where |
| 59 | * assert(new FSSize >= old FSSize), | 59 | * assert(new FSSize >= old FSSize), |
| 60 | * i.e., file system must not be shrinked; | 60 | * i.e., file system must not be shrunk; |
| 61 | */ | 61 | */ |
| 62 | int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize) | 62 | int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize) |
| 63 | { | 63 | { |
| @@ -182,7 +182,7 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize) | |||
| 182 | */ | 182 | */ |
| 183 | newFSSize = newLVSize - newLogSize - newFSCKSize; | 183 | newFSSize = newLVSize - newLogSize - newFSCKSize; |
| 184 | 184 | ||
| 185 | /* file system cannot be shrinked */ | 185 | /* file system cannot be shrunk */ |
| 186 | if (newFSSize < bmp->db_mapsize) { | 186 | if (newFSSize < bmp->db_mapsize) { |
| 187 | rc = -EINVAL; | 187 | rc = -EINVAL; |
| 188 | goto out; | 188 | goto out; |
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index eeca48a031ab..06c8a67cbe76 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
| @@ -644,7 +644,7 @@ static int jfs_show_options(struct seq_file *seq, struct vfsmount *vfs) | |||
| 644 | 644 | ||
| 645 | /* Read data from quotafile - avoid pagecache and such because we cannot afford | 645 | /* Read data from quotafile - avoid pagecache and such because we cannot afford |
| 646 | * acquiring the locks... As quota files are never truncated and quota code | 646 | * acquiring the locks... As quota files are never truncated and quota code |
| 647 | * itself serializes the operations (and noone else should touch the files) | 647 | * itself serializes the operations (and no one else should touch the files) |
| 648 | * we don't have to be afraid of races */ | 648 | * we don't have to be afraid of races */ |
| 649 | static ssize_t jfs_quota_read(struct super_block *sb, int type, char *data, | 649 | static ssize_t jfs_quota_read(struct super_block *sb, int type, char *data, |
| 650 | size_t len, loff_t off) | 650 | size_t len, loff_t off) |
diff --git a/fs/logfs/dev_mtd.c b/fs/logfs/dev_mtd.c index 7466e9dcc8c5..339e17e9133d 100644 --- a/fs/logfs/dev_mtd.c +++ b/fs/logfs/dev_mtd.c | |||
| @@ -60,7 +60,7 @@ static int mtd_write(struct super_block *sb, loff_t ofs, size_t len, void *buf) | |||
| 60 | * asynchronous properties. So just to prevent the first implementor of such | 60 | * asynchronous properties. So just to prevent the first implementor of such |
| 61 | * a thing from breaking logfs in 2350, we do the usual pointless dance to | 61 | * a thing from breaking logfs in 2350, we do the usual pointless dance to |
| 62 | * declare a completion variable and wait for completion before returning | 62 | * declare a completion variable and wait for completion before returning |
| 63 | * from mtd_erase(). What an excercise in futility! | 63 | * from mtd_erase(). What an exercise in futility! |
| 64 | */ | 64 | */ |
| 65 | static void logfs_erase_callback(struct erase_info *ei) | 65 | static void logfs_erase_callback(struct erase_info *ei) |
| 66 | { | 66 | { |
diff --git a/fs/logfs/dir.c b/fs/logfs/dir.c index f9ddf0c388c8..9ed89d1663f8 100644 --- a/fs/logfs/dir.c +++ b/fs/logfs/dir.c | |||
| @@ -92,7 +92,7 @@ static int beyond_eof(struct inode *inode, loff_t bix) | |||
| 92 | * so short names (len <= 9) don't even occupy the complete 32bit name | 92 | * so short names (len <= 9) don't even occupy the complete 32bit name |
| 93 | * space. A prime >256 ensures short names quickly spread the 32bit | 93 | * space. A prime >256 ensures short names quickly spread the 32bit |
| 94 | * name space. Add about 26 for the estimated amount of information | 94 | * name space. Add about 26 for the estimated amount of information |
| 95 | * of each character and pick a prime nearby, preferrably a bit-sparse | 95 | * of each character and pick a prime nearby, preferably a bit-sparse |
| 96 | * one. | 96 | * one. |
| 97 | */ | 97 | */ |
| 98 | static u32 hash_32(const char *s, int len, u32 seed) | 98 | static u32 hash_32(const char *s, int len, u32 seed) |
diff --git a/fs/logfs/readwrite.c b/fs/logfs/readwrite.c index ee99a9f5dfd3..9e22085231b3 100644 --- a/fs/logfs/readwrite.c +++ b/fs/logfs/readwrite.c | |||
| @@ -1616,7 +1616,7 @@ int logfs_rewrite_block(struct inode *inode, u64 bix, u64 ofs, | |||
| 1616 | err = logfs_write_buf(inode, page, flags); | 1616 | err = logfs_write_buf(inode, page, flags); |
| 1617 | if (!err && shrink_level(gc_level) == 0) { | 1617 | if (!err && shrink_level(gc_level) == 0) { |
| 1618 | /* Rewrite cannot mark the inode dirty but has to | 1618 | /* Rewrite cannot mark the inode dirty but has to |
| 1619 | * write it immediatly. | 1619 | * write it immediately. |
| 1620 | * Q: Can't we just create an alias for the inode | 1620 | * Q: Can't we just create an alias for the inode |
| 1621 | * instead? And if not, why not? | 1621 | * instead? And if not, why not? |
| 1622 | */ | 1622 | */ |
diff --git a/fs/mbcache.c b/fs/mbcache.c index a25444ab2baf..2f174be06555 100644 --- a/fs/mbcache.c +++ b/fs/mbcache.c | |||
| @@ -542,7 +542,7 @@ __mb_cache_entry_find(struct list_head *l, struct list_head *head, | |||
| 542 | * mb_cache_entry_find_first() | 542 | * mb_cache_entry_find_first() |
| 543 | * | 543 | * |
| 544 | * Find the first cache entry on a given device with a certain key in | 544 | * Find the first cache entry on a given device with a certain key in |
| 545 | * an additional index. Additonal matches can be found with | 545 | * an additional index. Additional matches can be found with |
| 546 | * mb_cache_entry_find_next(). Returns NULL if no match was found. The | 546 | * mb_cache_entry_find_next(). Returns NULL if no match was found. The |
| 547 | * returned cache entry is locked for shared access ("multiple readers"). | 547 | * returned cache entry is locked for shared access ("multiple readers"). |
| 548 | * | 548 | * |
diff --git a/fs/namei.c b/fs/namei.c index 3cb616d38d9c..54fc993e3027 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
| @@ -70,7 +70,7 @@ | |||
| 70 | * name indicated by the symlink. The old code always complained that the | 70 | * name indicated by the symlink. The old code always complained that the |
| 71 | * name already exists, due to not following the symlink even if its target | 71 | * name already exists, due to not following the symlink even if its target |
| 72 | * is nonexistent. The new semantics affects also mknod() and link() when | 72 | * is nonexistent. The new semantics affects also mknod() and link() when |
| 73 | * the name is a symlink pointing to a non-existant name. | 73 | * the name is a symlink pointing to a non-existent name. |
| 74 | * | 74 | * |
| 75 | * I don't know which semantics is the right one, since I have no access | 75 | * I don't know which semantics is the right one, since I have no access |
| 76 | * to standards. But I found by trial that HP-UX 9.0 has the full "new" | 76 | * to standards. But I found by trial that HP-UX 9.0 has the full "new" |
| @@ -697,6 +697,7 @@ static __always_inline void set_root_rcu(struct nameidata *nd) | |||
| 697 | do { | 697 | do { |
| 698 | seq = read_seqcount_begin(&fs->seq); | 698 | seq = read_seqcount_begin(&fs->seq); |
| 699 | nd->root = fs->root; | 699 | nd->root = fs->root; |
| 700 | nd->seq = __read_seqcount_begin(&nd->root.dentry->d_seq); | ||
| 700 | } while (read_seqcount_retry(&fs->seq, seq)); | 701 | } while (read_seqcount_retry(&fs->seq, seq)); |
| 701 | } | 702 | } |
| 702 | } | 703 | } |
diff --git a/fs/namespace.c b/fs/namespace.c index 7dba2ed03429..d99bcf59e4c2 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
| @@ -1030,18 +1030,6 @@ const struct seq_operations mounts_op = { | |||
| 1030 | .show = show_vfsmnt | 1030 | .show = show_vfsmnt |
| 1031 | }; | 1031 | }; |
| 1032 | 1032 | ||
| 1033 | static int uuid_is_nil(u8 *uuid) | ||
| 1034 | { | ||
| 1035 | int i; | ||
| 1036 | u8 *cp = (u8 *)uuid; | ||
| 1037 | |||
| 1038 | for (i = 0; i < 16; i++) { | ||
| 1039 | if (*cp++) | ||
| 1040 | return 0; | ||
| 1041 | } | ||
| 1042 | return 1; | ||
| 1043 | } | ||
| 1044 | |||
| 1045 | static int show_mountinfo(struct seq_file *m, void *v) | 1033 | static int show_mountinfo(struct seq_file *m, void *v) |
| 1046 | { | 1034 | { |
| 1047 | struct proc_mounts *p = m->private; | 1035 | struct proc_mounts *p = m->private; |
| @@ -1085,10 +1073,6 @@ static int show_mountinfo(struct seq_file *m, void *v) | |||
| 1085 | if (IS_MNT_UNBINDABLE(mnt)) | 1073 | if (IS_MNT_UNBINDABLE(mnt)) |
| 1086 | seq_puts(m, " unbindable"); | 1074 | seq_puts(m, " unbindable"); |
| 1087 | 1075 | ||
| 1088 | if (!uuid_is_nil(mnt->mnt_sb->s_uuid)) | ||
| 1089 | /* print the uuid */ | ||
| 1090 | seq_printf(m, " uuid:%pU", mnt->mnt_sb->s_uuid); | ||
| 1091 | |||
| 1092 | /* Filesystem specific data */ | 1076 | /* Filesystem specific data */ |
| 1093 | seq_puts(m, " - "); | 1077 | seq_puts(m, " - "); |
| 1094 | show_type(m, sb); | 1078 | show_type(m, sb); |
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c index 00a1d1c3d3a4..0250e4ce4893 100644 --- a/fs/ncpfs/inode.c +++ b/fs/ncpfs/inode.c | |||
| @@ -596,7 +596,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent) | |||
| 596 | /* server->priv.data = NULL; */ | 596 | /* server->priv.data = NULL; */ |
| 597 | 597 | ||
| 598 | server->m = data; | 598 | server->m = data; |
| 599 | /* Althought anything producing this is buggy, it happens | 599 | /* Although anything producing this is buggy, it happens |
| 600 | now because of PATH_MAX changes.. */ | 600 | now because of PATH_MAX changes.. */ |
| 601 | if (server->m.time_out < 1) { | 601 | if (server->m.time_out < 1) { |
| 602 | server->m.time_out = 10; | 602 | server->m.time_out = 10; |
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c index 14e0f9371d14..00ecf62ce7c1 100644 --- a/fs/nfs/callback_xdr.c +++ b/fs/nfs/callback_xdr.c | |||
| @@ -241,7 +241,7 @@ static __be32 decode_layoutrecall_args(struct svc_rqst *rqstp, | |||
| 241 | 241 | ||
| 242 | args->cbl_layout_type = ntohl(*p++); | 242 | args->cbl_layout_type = ntohl(*p++); |
| 243 | /* Depite the spec's xdr, iomode really belongs in the FILE switch, | 243 | /* Depite the spec's xdr, iomode really belongs in the FILE switch, |
| 244 | * as it is unuseable and ignored with the other types. | 244 | * as it is unusable and ignored with the other types. |
| 245 | */ | 245 | */ |
| 246 | iomode = ntohl(*p++); | 246 | iomode = ntohl(*p++); |
| 247 | args->cbl_layoutchanged = ntohl(*p++); | 247 | args->cbl_layoutchanged = ntohl(*p++); |
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 3ac5bd695e5e..2f093ed16980 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
| @@ -301,7 +301,7 @@ nfs_file_mmap(struct file * file, struct vm_area_struct * vma) | |||
| 301 | * disk, but it retrieves and clears ctx->error after synching, despite | 301 | * disk, but it retrieves and clears ctx->error after synching, despite |
| 302 | * the two being set at the same time in nfs_context_set_write_error(). | 302 | * the two being set at the same time in nfs_context_set_write_error(). |
| 303 | * This is because the former is used to notify the _next_ call to | 303 | * This is because the former is used to notify the _next_ call to |
| 304 | * nfs_file_write() that a write error occured, and hence cause it to | 304 | * nfs_file_write() that a write error occurred, and hence cause it to |
| 305 | * fall back to doing a synchronous write. | 305 | * fall back to doing a synchronous write. |
| 306 | */ | 306 | */ |
| 307 | static int | 307 | static int |
diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c index 9166fcb66da2..89fc160fd5b0 100644 --- a/fs/nfs/namespace.c +++ b/fs/nfs/namespace.c | |||
| @@ -148,67 +148,64 @@ static rpc_authflavor_t nfs_find_best_sec(struct nfs4_secinfo_flavors *flavors, | |||
| 148 | return pseudoflavor; | 148 | return pseudoflavor; |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | static rpc_authflavor_t nfs_negotiate_security(const struct dentry *parent, const struct dentry *dentry) | 151 | static int nfs_negotiate_security(const struct dentry *parent, |
| 152 | const struct dentry *dentry, | ||
| 153 | rpc_authflavor_t *flavor) | ||
| 152 | { | 154 | { |
| 153 | int status = 0; | ||
| 154 | struct page *page; | 155 | struct page *page; |
| 155 | struct nfs4_secinfo_flavors *flavors; | 156 | struct nfs4_secinfo_flavors *flavors; |
| 156 | int (*secinfo)(struct inode *, const struct qstr *, struct nfs4_secinfo_flavors *); | 157 | int (*secinfo)(struct inode *, const struct qstr *, struct nfs4_secinfo_flavors *); |
| 157 | rpc_authflavor_t flavor = RPC_AUTH_UNIX; | 158 | int ret = -EPERM; |
| 158 | 159 | ||
| 159 | secinfo = NFS_PROTO(parent->d_inode)->secinfo; | 160 | secinfo = NFS_PROTO(parent->d_inode)->secinfo; |
| 160 | if (secinfo != NULL) { | 161 | if (secinfo != NULL) { |
| 161 | page = alloc_page(GFP_KERNEL); | 162 | page = alloc_page(GFP_KERNEL); |
| 162 | if (!page) { | 163 | if (!page) { |
| 163 | status = -ENOMEM; | 164 | ret = -ENOMEM; |
| 164 | goto out; | 165 | goto out; |
| 165 | } | 166 | } |
| 166 | flavors = page_address(page); | 167 | flavors = page_address(page); |
| 167 | status = secinfo(parent->d_inode, &dentry->d_name, flavors); | 168 | ret = secinfo(parent->d_inode, &dentry->d_name, flavors); |
| 168 | flavor = nfs_find_best_sec(flavors, dentry->d_inode); | 169 | *flavor = nfs_find_best_sec(flavors, dentry->d_inode); |
| 169 | put_page(page); | 170 | put_page(page); |
| 170 | } | 171 | } |
| 171 | 172 | ||
| 172 | return flavor; | ||
| 173 | |||
| 174 | out: | 173 | out: |
| 175 | status = -ENOMEM; | 174 | return ret; |
| 176 | return status; | ||
| 177 | } | 175 | } |
| 178 | 176 | ||
| 179 | static rpc_authflavor_t nfs_lookup_with_sec(struct nfs_server *server, struct dentry *parent, | 177 | static int nfs_lookup_with_sec(struct nfs_server *server, struct dentry *parent, |
| 180 | struct dentry *dentry, struct path *path, | 178 | struct dentry *dentry, struct path *path, |
| 181 | struct nfs_fh *fh, struct nfs_fattr *fattr) | 179 | struct nfs_fh *fh, struct nfs_fattr *fattr, |
| 180 | rpc_authflavor_t *flavor) | ||
| 182 | { | 181 | { |
| 183 | rpc_authflavor_t flavor; | ||
| 184 | struct rpc_clnt *clone; | 182 | struct rpc_clnt *clone; |
| 185 | struct rpc_auth *auth; | 183 | struct rpc_auth *auth; |
| 186 | int err; | 184 | int err; |
| 187 | 185 | ||
| 188 | flavor = nfs_negotiate_security(parent, path->dentry); | 186 | err = nfs_negotiate_security(parent, path->dentry, flavor); |
| 189 | if (flavor < 0) | 187 | if (err < 0) |
| 190 | goto out; | 188 | goto out; |
| 191 | clone = rpc_clone_client(server->client); | 189 | clone = rpc_clone_client(server->client); |
| 192 | auth = rpcauth_create(flavor, clone); | 190 | auth = rpcauth_create(*flavor, clone); |
| 193 | if (!auth) { | 191 | if (!auth) { |
| 194 | flavor = -EIO; | 192 | err = -EIO; |
| 195 | goto out_shutdown; | 193 | goto out_shutdown; |
| 196 | } | 194 | } |
| 197 | err = server->nfs_client->rpc_ops->lookup(clone, parent->d_inode, | 195 | err = server->nfs_client->rpc_ops->lookup(clone, parent->d_inode, |
| 198 | &path->dentry->d_name, | 196 | &path->dentry->d_name, |
| 199 | fh, fattr); | 197 | fh, fattr); |
| 200 | if (err < 0) | ||
| 201 | flavor = err; | ||
| 202 | out_shutdown: | 198 | out_shutdown: |
| 203 | rpc_shutdown_client(clone); | 199 | rpc_shutdown_client(clone); |
| 204 | out: | 200 | out: |
| 205 | return flavor; | 201 | return err; |
| 206 | } | 202 | } |
| 207 | #else /* CONFIG_NFS_V4 */ | 203 | #else /* CONFIG_NFS_V4 */ |
| 208 | static inline rpc_authflavor_t nfs_lookup_with_sec(struct nfs_server *server, | 204 | static inline int nfs_lookup_with_sec(struct nfs_server *server, |
| 209 | struct dentry *parent, struct dentry *dentry, | 205 | struct dentry *parent, struct dentry *dentry, |
| 210 | struct path *path, struct nfs_fh *fh, | 206 | struct path *path, struct nfs_fh *fh, |
| 211 | struct nfs_fattr *fattr) | 207 | struct nfs_fattr *fattr, |
| 208 | rpc_authflavor_t *flavor) | ||
| 212 | { | 209 | { |
| 213 | return -EPERM; | 210 | return -EPERM; |
| 214 | } | 211 | } |
| @@ -234,7 +231,7 @@ struct vfsmount *nfs_d_automount(struct path *path) | |||
| 234 | struct nfs_fh *fh = NULL; | 231 | struct nfs_fh *fh = NULL; |
| 235 | struct nfs_fattr *fattr = NULL; | 232 | struct nfs_fattr *fattr = NULL; |
| 236 | int err; | 233 | int err; |
| 237 | rpc_authflavor_t flavor = 1; | 234 | rpc_authflavor_t flavor = RPC_AUTH_UNIX; |
| 238 | 235 | ||
| 239 | dprintk("--> nfs_d_automount()\n"); | 236 | dprintk("--> nfs_d_automount()\n"); |
| 240 | 237 | ||
| @@ -255,13 +252,8 @@ struct vfsmount *nfs_d_automount(struct path *path) | |||
| 255 | err = server->nfs_client->rpc_ops->lookup(server->client, parent->d_inode, | 252 | err = server->nfs_client->rpc_ops->lookup(server->client, parent->d_inode, |
| 256 | &path->dentry->d_name, | 253 | &path->dentry->d_name, |
| 257 | fh, fattr); | 254 | fh, fattr); |
| 258 | if (err == -EPERM) { | 255 | if (err == -EPERM && NFS_PROTO(parent->d_inode)->secinfo != NULL) |
| 259 | flavor = nfs_lookup_with_sec(server, parent, path->dentry, path, fh, fattr); | 256 | err = nfs_lookup_with_sec(server, parent, path->dentry, path, fh, fattr, &flavor); |
| 260 | if (flavor < 0) | ||
| 261 | err = flavor; | ||
| 262 | else | ||
| 263 | err = 0; | ||
| 264 | } | ||
| 265 | dput(parent); | 257 | dput(parent); |
| 266 | if (err != 0) { | 258 | if (err != 0) { |
| 267 | mnt = ERR_PTR(err); | 259 | mnt = ERR_PTR(err); |
diff --git a/fs/nfs/nfs4filelayout.h b/fs/nfs/nfs4filelayout.h index 085a354e0f08..7c44579f5832 100644 --- a/fs/nfs/nfs4filelayout.h +++ b/fs/nfs/nfs4filelayout.h | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | #include "pnfs.h" | 33 | #include "pnfs.h" |
| 34 | 34 | ||
| 35 | /* | 35 | /* |
| 36 | * Field testing shows we need to support upto 4096 stripe indices. | 36 | * Field testing shows we need to support up to 4096 stripe indices. |
| 37 | * We store each index as a u8 (u32 on the wire) to keep the memory footprint | 37 | * We store each index as a u8 (u32 on the wire) to keep the memory footprint |
| 38 | * reasonable. This in turn means we support a maximum of 256 | 38 | * reasonable. This in turn means we support a maximum of 256 |
| 39 | * RFC 5661 multipath_list4 structures. | 39 | * RFC 5661 multipath_list4 structures. |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index dfd1e6d7e6c3..9bf41eab3e46 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
| @@ -2204,8 +2204,6 @@ static int nfs4_lookup_root_sec(struct nfs_server *server, struct nfs_fh *fhandl | |||
| 2204 | goto out; | 2204 | goto out; |
| 2205 | } | 2205 | } |
| 2206 | ret = nfs4_lookup_root(server, fhandle, info); | 2206 | ret = nfs4_lookup_root(server, fhandle, info); |
| 2207 | if (ret < 0) | ||
| 2208 | ret = -EAGAIN; | ||
| 2209 | out: | 2207 | out: |
| 2210 | return ret; | 2208 | return ret; |
| 2211 | } | 2209 | } |
| @@ -2226,7 +2224,7 @@ static int nfs4_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle, | |||
| 2226 | 2224 | ||
| 2227 | for (i = 0; i < len; i++) { | 2225 | for (i = 0; i < len; i++) { |
| 2228 | status = nfs4_lookup_root_sec(server, fhandle, info, flav_array[i]); | 2226 | status = nfs4_lookup_root_sec(server, fhandle, info, flav_array[i]); |
| 2229 | if (status == 0) | 2227 | if (status != -EPERM) |
| 2230 | break; | 2228 | break; |
| 2231 | } | 2229 | } |
| 2232 | if (status == 0) | 2230 | if (status == 0) |
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index af0c6279a4a7..e4cbc11a74ab 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
| @@ -542,11 +542,15 @@ nfs_scan_commit(struct inode *inode, struct list_head *dst, pgoff_t idx_start, u | |||
| 542 | if (!nfs_need_commit(nfsi)) | 542 | if (!nfs_need_commit(nfsi)) |
| 543 | return 0; | 543 | return 0; |
| 544 | 544 | ||
| 545 | spin_lock(&inode->i_lock); | ||
| 545 | ret = nfs_scan_list(nfsi, dst, idx_start, npages, NFS_PAGE_TAG_COMMIT); | 546 | ret = nfs_scan_list(nfsi, dst, idx_start, npages, NFS_PAGE_TAG_COMMIT); |
| 546 | if (ret > 0) | 547 | if (ret > 0) |
| 547 | nfsi->ncommit -= ret; | 548 | nfsi->ncommit -= ret; |
| 549 | spin_unlock(&inode->i_lock); | ||
| 550 | |||
| 548 | if (nfs_need_commit(NFS_I(inode))) | 551 | if (nfs_need_commit(NFS_I(inode))) |
| 549 | __mark_inode_dirty(inode, I_DIRTY_DATASYNC); | 552 | __mark_inode_dirty(inode, I_DIRTY_DATASYNC); |
| 553 | |||
| 550 | return ret; | 554 | return ret; |
| 551 | } | 555 | } |
| 552 | #else | 556 | #else |
| @@ -1483,9 +1487,7 @@ int nfs_commit_inode(struct inode *inode, int how) | |||
| 1483 | res = nfs_commit_set_lock(NFS_I(inode), may_wait); | 1487 | res = nfs_commit_set_lock(NFS_I(inode), may_wait); |
| 1484 | if (res <= 0) | 1488 | if (res <= 0) |
| 1485 | goto out_mark_dirty; | 1489 | goto out_mark_dirty; |
| 1486 | spin_lock(&inode->i_lock); | ||
| 1487 | res = nfs_scan_commit(inode, &head, 0, 0); | 1490 | res = nfs_scan_commit(inode, &head, 0, 0); |
| 1488 | spin_unlock(&inode->i_lock); | ||
| 1489 | if (res) { | 1491 | if (res) { |
| 1490 | int error; | 1492 | int error; |
| 1491 | 1493 | ||
diff --git a/fs/nfs_common/nfsacl.c b/fs/nfs_common/nfsacl.c index ec0f277be7f5..6940439bd609 100644 --- a/fs/nfs_common/nfsacl.c +++ b/fs/nfs_common/nfsacl.c | |||
| @@ -173,7 +173,7 @@ xdr_nfsace_decode(struct xdr_array2_desc *desc, void *elem) | |||
| 173 | return -EINVAL; | 173 | return -EINVAL; |
| 174 | break; | 174 | break; |
| 175 | case ACL_MASK: | 175 | case ACL_MASK: |
| 176 | /* Solaris sometimes sets additonal bits in the mask */ | 176 | /* Solaris sometimes sets additional bits in the mask */ |
| 177 | entry->e_perm &= S_IRWXO; | 177 | entry->e_perm &= S_IRWXO; |
| 178 | break; | 178 | break; |
| 179 | default: | 179 | default: |
diff --git a/fs/nfsd/lockd.c b/fs/nfsd/lockd.c index 0c6d81670137..7c831a2731fa 100644 --- a/fs/nfsd/lockd.c +++ b/fs/nfsd/lockd.c | |||
| @@ -38,7 +38,6 @@ nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file **filp) | |||
| 38 | exp_readlock(); | 38 | exp_readlock(); |
| 39 | nfserr = nfsd_open(rqstp, &fh, S_IFREG, NFSD_MAY_LOCK, filp); | 39 | nfserr = nfsd_open(rqstp, &fh, S_IFREG, NFSD_MAY_LOCK, filp); |
| 40 | fh_put(&fh); | 40 | fh_put(&fh); |
| 41 | rqstp->rq_client = NULL; | ||
| 42 | exp_readunlock(); | 41 | exp_readunlock(); |
| 43 | /* We return nlm error codes as nlm doesn't know | 42 | /* We return nlm error codes as nlm doesn't know |
| 44 | * about nfsd, but nfsd does know about nlm.. | 43 | * about nfsd, but nfsd does know about nlm.. |
diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c index 7e84a852cdae..ad48faca20fc 100644 --- a/fs/nfsd/nfs3xdr.c +++ b/fs/nfsd/nfs3xdr.c | |||
| @@ -702,7 +702,7 @@ nfs3svc_encode_readres(struct svc_rqst *rqstp, __be32 *p, | |||
| 702 | *p++ = htonl(resp->eof); | 702 | *p++ = htonl(resp->eof); |
| 703 | *p++ = htonl(resp->count); /* xdr opaque count */ | 703 | *p++ = htonl(resp->count); /* xdr opaque count */ |
| 704 | xdr_ressize_check(rqstp, p); | 704 | xdr_ressize_check(rqstp, p); |
| 705 | /* now update rqstp->rq_res to reflect data aswell */ | 705 | /* now update rqstp->rq_res to reflect data as well */ |
| 706 | rqstp->rq_res.page_len = resp->count; | 706 | rqstp->rq_res.page_len = resp->count; |
| 707 | if (resp->count & 3) { | 707 | if (resp->count & 3) { |
| 708 | /* need to pad the tail */ | 708 | /* need to pad the tail */ |
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index fbde6f79922e..aa309aa93fe8 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
| @@ -397,10 +397,13 @@ static void unhash_generic_stateid(struct nfs4_stateid *stp) | |||
| 397 | 397 | ||
| 398 | static void free_generic_stateid(struct nfs4_stateid *stp) | 398 | static void free_generic_stateid(struct nfs4_stateid *stp) |
| 399 | { | 399 | { |
| 400 | int oflag = nfs4_access_bmap_to_omode(stp); | 400 | int oflag; |
| 401 | 401 | ||
| 402 | nfs4_file_put_access(stp->st_file, oflag); | 402 | if (stp->st_access_bmap) { |
| 403 | put_nfs4_file(stp->st_file); | 403 | oflag = nfs4_access_bmap_to_omode(stp); |
| 404 | nfs4_file_put_access(stp->st_file, oflag); | ||
| 405 | put_nfs4_file(stp->st_file); | ||
| 406 | } | ||
| 404 | kmem_cache_free(stateid_slab, stp); | 407 | kmem_cache_free(stateid_slab, stp); |
| 405 | } | 408 | } |
| 406 | 409 | ||
| @@ -3055,7 +3058,7 @@ check_special_stateids(svc_fh *current_fh, stateid_t *stateid, int flags) | |||
| 3055 | if (ONE_STATEID(stateid) && (flags & RD_STATE)) | 3058 | if (ONE_STATEID(stateid) && (flags & RD_STATE)) |
| 3056 | return nfs_ok; | 3059 | return nfs_ok; |
| 3057 | else if (locks_in_grace()) { | 3060 | else if (locks_in_grace()) { |
| 3058 | /* Answer in remaining cases depends on existance of | 3061 | /* Answer in remaining cases depends on existence of |
| 3059 | * conflicting state; so we must wait out the grace period. */ | 3062 | * conflicting state; so we must wait out the grace period. */ |
| 3060 | return nfserr_grace; | 3063 | return nfserr_grace; |
| 3061 | } else if (flags & WR_STATE) | 3064 | } else if (flags & WR_STATE) |
| @@ -3675,7 +3678,7 @@ find_lockstateowner_str(struct inode *inode, clientid_t *clid, | |||
| 3675 | /* | 3678 | /* |
| 3676 | * Alloc a lock owner structure. | 3679 | * Alloc a lock owner structure. |
| 3677 | * Called in nfsd4_lock - therefore, OPEN and OPEN_CONFIRM (if needed) has | 3680 | * Called in nfsd4_lock - therefore, OPEN and OPEN_CONFIRM (if needed) has |
| 3678 | * occured. | 3681 | * occurred. |
| 3679 | * | 3682 | * |
| 3680 | * strhashval = lock_ownerstr_hashval | 3683 | * strhashval = lock_ownerstr_hashval |
| 3681 | */ | 3684 | */ |
diff --git a/fs/nfsd/nfsxdr.c b/fs/nfsd/nfsxdr.c index 4ce005dbf3e6..65ec595e2226 100644 --- a/fs/nfsd/nfsxdr.c +++ b/fs/nfsd/nfsxdr.c | |||
| @@ -451,7 +451,7 @@ nfssvc_encode_readres(struct svc_rqst *rqstp, __be32 *p, | |||
| 451 | *p++ = htonl(resp->count); | 451 | *p++ = htonl(resp->count); |
| 452 | xdr_ressize_check(rqstp, p); | 452 | xdr_ressize_check(rqstp, p); |
| 453 | 453 | ||
| 454 | /* now update rqstp->rq_res to reflect data aswell */ | 454 | /* now update rqstp->rq_res to reflect data as well */ |
| 455 | rqstp->rq_res.page_len = resp->count; | 455 | rqstp->rq_res.page_len = resp->count; |
| 456 | if (resp->count & 3) { | 456 | if (resp->count & 3) { |
| 457 | /* need to pad the tail */ | 457 | /* need to pad the tail */ |
diff --git a/fs/nilfs2/file.c b/fs/nilfs2/file.c index 93589fccdd97..397e73258631 100644 --- a/fs/nilfs2/file.c +++ b/fs/nilfs2/file.c | |||
| @@ -72,10 +72,9 @@ static int nilfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
| 72 | /* | 72 | /* |
| 73 | * check to see if the page is mapped already (no holes) | 73 | * check to see if the page is mapped already (no holes) |
| 74 | */ | 74 | */ |
| 75 | if (PageMappedToDisk(page)) { | 75 | if (PageMappedToDisk(page)) |
| 76 | unlock_page(page); | ||
| 77 | goto mapped; | 76 | goto mapped; |
| 78 | } | 77 | |
| 79 | if (page_has_buffers(page)) { | 78 | if (page_has_buffers(page)) { |
| 80 | struct buffer_head *bh, *head; | 79 | struct buffer_head *bh, *head; |
| 81 | int fully_mapped = 1; | 80 | int fully_mapped = 1; |
| @@ -90,7 +89,6 @@ static int nilfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
| 90 | 89 | ||
| 91 | if (fully_mapped) { | 90 | if (fully_mapped) { |
| 92 | SetPageMappedToDisk(page); | 91 | SetPageMappedToDisk(page); |
| 93 | unlock_page(page); | ||
| 94 | goto mapped; | 92 | goto mapped; |
| 95 | } | 93 | } |
| 96 | } | 94 | } |
| @@ -105,16 +103,17 @@ static int nilfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
| 105 | return VM_FAULT_SIGBUS; | 103 | return VM_FAULT_SIGBUS; |
| 106 | 104 | ||
| 107 | ret = block_page_mkwrite(vma, vmf, nilfs_get_block); | 105 | ret = block_page_mkwrite(vma, vmf, nilfs_get_block); |
| 108 | if (unlikely(ret)) { | 106 | if (ret != VM_FAULT_LOCKED) { |
| 109 | nilfs_transaction_abort(inode->i_sb); | 107 | nilfs_transaction_abort(inode->i_sb); |
| 110 | return ret; | 108 | return ret; |
| 111 | } | 109 | } |
| 110 | nilfs_set_file_dirty(inode, 1 << (PAGE_SHIFT - inode->i_blkbits)); | ||
| 112 | nilfs_transaction_commit(inode->i_sb); | 111 | nilfs_transaction_commit(inode->i_sb); |
| 113 | 112 | ||
| 114 | mapped: | 113 | mapped: |
| 115 | SetPageChecked(page); | 114 | SetPageChecked(page); |
| 116 | wait_on_page_writeback(page); | 115 | wait_on_page_writeback(page); |
| 117 | return 0; | 116 | return VM_FAULT_LOCKED; |
| 118 | } | 117 | } |
| 119 | 118 | ||
| 120 | static const struct vm_operations_struct nilfs_file_vm_ops = { | 119 | static const struct vm_operations_struct nilfs_file_vm_ops = { |
diff --git a/fs/nilfs2/nilfs.h b/fs/nilfs2/nilfs.h index 856e8e4e0b74..a8dd344303cb 100644 --- a/fs/nilfs2/nilfs.h +++ b/fs/nilfs2/nilfs.h | |||
| @@ -114,19 +114,19 @@ enum { | |||
| 114 | * Macros to check inode numbers | 114 | * Macros to check inode numbers |
| 115 | */ | 115 | */ |
| 116 | #define NILFS_MDT_INO_BITS \ | 116 | #define NILFS_MDT_INO_BITS \ |
| 117 | ((unsigned int)(1 << NILFS_DAT_INO | 1 << NILFS_CPFILE_INO | \ | 117 | ((unsigned int)(1 << NILFS_DAT_INO | 1 << NILFS_CPFILE_INO | \ |
| 118 | 1 << NILFS_SUFILE_INO | 1 << NILFS_IFILE_INO | \ | 118 | 1 << NILFS_SUFILE_INO | 1 << NILFS_IFILE_INO | \ |
| 119 | 1 << NILFS_ATIME_INO | 1 << NILFS_SKETCH_INO)) | 119 | 1 << NILFS_ATIME_INO | 1 << NILFS_SKETCH_INO)) |
| 120 | 120 | ||
| 121 | #define NILFS_SYS_INO_BITS \ | 121 | #define NILFS_SYS_INO_BITS \ |
| 122 | ((unsigned int)(1 << NILFS_ROOT_INO) | NILFS_MDT_INO_BITS) | 122 | ((unsigned int)(1 << NILFS_ROOT_INO) | NILFS_MDT_INO_BITS) |
| 123 | 123 | ||
| 124 | #define NILFS_FIRST_INO(sb) (((struct the_nilfs *)sb->s_fs_info)->ns_first_ino) | 124 | #define NILFS_FIRST_INO(sb) (((struct the_nilfs *)sb->s_fs_info)->ns_first_ino) |
| 125 | 125 | ||
| 126 | #define NILFS_MDT_INODE(sb, ino) \ | 126 | #define NILFS_MDT_INODE(sb, ino) \ |
| 127 | ((ino) < NILFS_FIRST_INO(sb) && (NILFS_MDT_INO_BITS & (1 << (ino)))) | 127 | ((ino) < NILFS_FIRST_INO(sb) && (NILFS_MDT_INO_BITS & (1 << (ino)))) |
| 128 | #define NILFS_VALID_INODE(sb, ino) \ | 128 | #define NILFS_VALID_INODE(sb, ino) \ |
| 129 | ((ino) >= NILFS_FIRST_INO(sb) || (NILFS_SYS_INO_BITS & (1 << (ino)))) | 129 | ((ino) >= NILFS_FIRST_INO(sb) || (NILFS_SYS_INO_BITS & (1 << (ino)))) |
| 130 | 130 | ||
| 131 | /** | 131 | /** |
| 132 | * struct nilfs_transaction_info: context information for synchronization | 132 | * struct nilfs_transaction_info: context information for synchronization |
| @@ -285,7 +285,7 @@ extern void nilfs_destroy_inode(struct inode *); | |||
| 285 | extern void nilfs_error(struct super_block *, const char *, const char *, ...) | 285 | extern void nilfs_error(struct super_block *, const char *, const char *, ...) |
| 286 | __attribute__ ((format (printf, 3, 4))); | 286 | __attribute__ ((format (printf, 3, 4))); |
| 287 | extern void nilfs_warning(struct super_block *, const char *, const char *, ...) | 287 | extern void nilfs_warning(struct super_block *, const char *, const char *, ...) |
| 288 | __attribute__ ((format (printf, 3, 4))); | 288 | __attribute__ ((format (printf, 3, 4))); |
| 289 | extern struct nilfs_super_block * | 289 | extern struct nilfs_super_block * |
| 290 | nilfs_read_super_block(struct super_block *, u64, int, struct buffer_head **); | 290 | nilfs_read_super_block(struct super_block *, u64, int, struct buffer_head **); |
| 291 | extern int nilfs_store_magic_and_option(struct super_block *, | 291 | extern int nilfs_store_magic_and_option(struct super_block *, |
diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c index 4d2a1ee0eb47..1168059c7efd 100644 --- a/fs/nilfs2/page.c +++ b/fs/nilfs2/page.c | |||
| @@ -500,7 +500,7 @@ void nilfs_mapping_init(struct address_space *mapping, | |||
| 500 | mapping_set_gfp_mask(mapping, GFP_NOFS); | 500 | mapping_set_gfp_mask(mapping, GFP_NOFS); |
| 501 | mapping->assoc_mapping = NULL; | 501 | mapping->assoc_mapping = NULL; |
| 502 | mapping->backing_dev_info = bdi; | 502 | mapping->backing_dev_info = bdi; |
| 503 | mapping->a_ops = NULL; | 503 | mapping->a_ops = &empty_aops; |
| 504 | } | 504 | } |
| 505 | 505 | ||
| 506 | /* | 506 | /* |
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c index 6b1305dc26c0..9fde1c00a296 100644 --- a/fs/notify/fanotify/fanotify_user.c +++ b/fs/notify/fanotify/fanotify_user.c | |||
| @@ -164,7 +164,7 @@ static int process_access_response(struct fsnotify_group *group, | |||
| 164 | fd, response); | 164 | fd, response); |
| 165 | /* | 165 | /* |
| 166 | * make sure the response is valid, if invalid we do nothing and either | 166 | * make sure the response is valid, if invalid we do nothing and either |
| 167 | * userspace can send a valid responce or we will clean it up after the | 167 | * userspace can send a valid response or we will clean it up after the |
| 168 | * timeout | 168 | * timeout |
| 169 | */ | 169 | */ |
| 170 | switch (response) { | 170 | switch (response) { |
diff --git a/fs/notify/inotify/inotify_fsnotify.c b/fs/notify/inotify/inotify_fsnotify.c index a91b69a6a291..e3cbd746f64a 100644 --- a/fs/notify/inotify/inotify_fsnotify.c +++ b/fs/notify/inotify/inotify_fsnotify.c | |||
| @@ -194,10 +194,11 @@ static int idr_callback(int id, void *p, void *data) | |||
| 194 | 194 | ||
| 195 | static void inotify_free_group_priv(struct fsnotify_group *group) | 195 | static void inotify_free_group_priv(struct fsnotify_group *group) |
| 196 | { | 196 | { |
| 197 | /* ideally the idr is empty and we won't hit the BUG in teh callback */ | 197 | /* ideally the idr is empty and we won't hit the BUG in the callback */ |
| 198 | idr_for_each(&group->inotify_data.idr, idr_callback, group); | 198 | idr_for_each(&group->inotify_data.idr, idr_callback, group); |
| 199 | idr_remove_all(&group->inotify_data.idr); | 199 | idr_remove_all(&group->inotify_data.idr); |
| 200 | idr_destroy(&group->inotify_data.idr); | 200 | idr_destroy(&group->inotify_data.idr); |
| 201 | atomic_dec(&group->inotify_data.user->inotify_devs); | ||
| 201 | free_uid(group->inotify_data.user); | 202 | free_uid(group->inotify_data.user); |
| 202 | } | 203 | } |
| 203 | 204 | ||
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index bd46e7c8a0ef..8445fbc8985c 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c | |||
| @@ -290,7 +290,6 @@ static int inotify_fasync(int fd, struct file *file, int on) | |||
| 290 | static int inotify_release(struct inode *ignored, struct file *file) | 290 | static int inotify_release(struct inode *ignored, struct file *file) |
| 291 | { | 291 | { |
| 292 | struct fsnotify_group *group = file->private_data; | 292 | struct fsnotify_group *group = file->private_data; |
| 293 | struct user_struct *user = group->inotify_data.user; | ||
| 294 | 293 | ||
| 295 | pr_debug("%s: group=%p\n", __func__, group); | 294 | pr_debug("%s: group=%p\n", __func__, group); |
| 296 | 295 | ||
| @@ -299,8 +298,6 @@ static int inotify_release(struct inode *ignored, struct file *file) | |||
| 299 | /* free this group, matching get was inotify_init->fsnotify_obtain_group */ | 298 | /* free this group, matching get was inotify_init->fsnotify_obtain_group */ |
| 300 | fsnotify_put_group(group); | 299 | fsnotify_put_group(group); |
| 301 | 300 | ||
| 302 | atomic_dec(&user->inotify_devs); | ||
| 303 | |||
| 304 | return 0; | 301 | return 0; |
| 305 | } | 302 | } |
| 306 | 303 | ||
| @@ -697,7 +694,7 @@ retry: | |||
| 697 | return ret; | 694 | return ret; |
| 698 | } | 695 | } |
| 699 | 696 | ||
| 700 | static struct fsnotify_group *inotify_new_group(struct user_struct *user, unsigned int max_events) | 697 | static struct fsnotify_group *inotify_new_group(unsigned int max_events) |
| 701 | { | 698 | { |
| 702 | struct fsnotify_group *group; | 699 | struct fsnotify_group *group; |
| 703 | 700 | ||
| @@ -710,8 +707,14 @@ static struct fsnotify_group *inotify_new_group(struct user_struct *user, unsign | |||
| 710 | spin_lock_init(&group->inotify_data.idr_lock); | 707 | spin_lock_init(&group->inotify_data.idr_lock); |
| 711 | idr_init(&group->inotify_data.idr); | 708 | idr_init(&group->inotify_data.idr); |
| 712 | group->inotify_data.last_wd = 0; | 709 | group->inotify_data.last_wd = 0; |
| 713 | group->inotify_data.user = user; | ||
| 714 | group->inotify_data.fa = NULL; | 710 | group->inotify_data.fa = NULL; |
| 711 | group->inotify_data.user = get_current_user(); | ||
| 712 | |||
| 713 | if (atomic_inc_return(&group->inotify_data.user->inotify_devs) > | ||
| 714 | inotify_max_user_instances) { | ||
| 715 | fsnotify_put_group(group); | ||
| 716 | return ERR_PTR(-EMFILE); | ||
| 717 | } | ||
| 715 | 718 | ||
| 716 | return group; | 719 | return group; |
| 717 | } | 720 | } |
| @@ -721,7 +724,6 @@ static struct fsnotify_group *inotify_new_group(struct user_struct *user, unsign | |||
| 721 | SYSCALL_DEFINE1(inotify_init1, int, flags) | 724 | SYSCALL_DEFINE1(inotify_init1, int, flags) |
| 722 | { | 725 | { |
| 723 | struct fsnotify_group *group; | 726 | struct fsnotify_group *group; |
| 724 | struct user_struct *user; | ||
| 725 | int ret; | 727 | int ret; |
| 726 | 728 | ||
| 727 | /* Check the IN_* constants for consistency. */ | 729 | /* Check the IN_* constants for consistency. */ |
| @@ -731,31 +733,16 @@ SYSCALL_DEFINE1(inotify_init1, int, flags) | |||
| 731 | if (flags & ~(IN_CLOEXEC | IN_NONBLOCK)) | 733 | if (flags & ~(IN_CLOEXEC | IN_NONBLOCK)) |
| 732 | return -EINVAL; | 734 | return -EINVAL; |
| 733 | 735 | ||
| 734 | user = get_current_user(); | ||
| 735 | if (unlikely(atomic_read(&user->inotify_devs) >= | ||
| 736 | inotify_max_user_instances)) { | ||
| 737 | ret = -EMFILE; | ||
| 738 | goto out_free_uid; | ||
| 739 | } | ||
| 740 | |||
| 741 | /* fsnotify_obtain_group took a reference to group, we put this when we kill the file in the end */ | 736 | /* fsnotify_obtain_group took a reference to group, we put this when we kill the file in the end */ |
| 742 | group = inotify_new_group(user, inotify_max_queued_events); | 737 | group = inotify_new_group(inotify_max_queued_events); |
| 743 | if (IS_ERR(group)) { | 738 | if (IS_ERR(group)) |
| 744 | ret = PTR_ERR(group); | 739 | return PTR_ERR(group); |
| 745 | goto out_free_uid; | ||
| 746 | } | ||
| 747 | |||
| 748 | atomic_inc(&user->inotify_devs); | ||
| 749 | 740 | ||
| 750 | ret = anon_inode_getfd("inotify", &inotify_fops, group, | 741 | ret = anon_inode_getfd("inotify", &inotify_fops, group, |
| 751 | O_RDONLY | flags); | 742 | O_RDONLY | flags); |
| 752 | if (ret >= 0) | 743 | if (ret < 0) |
| 753 | return ret; | 744 | fsnotify_put_group(group); |
| 754 | 745 | ||
| 755 | fsnotify_put_group(group); | ||
| 756 | atomic_dec(&user->inotify_devs); | ||
| 757 | out_free_uid: | ||
| 758 | free_uid(user); | ||
| 759 | return ret; | 746 | return ret; |
| 760 | } | 747 | } |
| 761 | 748 | ||
diff --git a/fs/notify/mark.c b/fs/notify/mark.c index 50c00856f730..252ab1f6452b 100644 --- a/fs/notify/mark.c +++ b/fs/notify/mark.c | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | * referencing this object. The object typically will live inside the kernel | 24 | * referencing this object. The object typically will live inside the kernel |
| 25 | * with a refcnt of 2, one for each list it is on (i_list, g_list). Any task | 25 | * with a refcnt of 2, one for each list it is on (i_list, g_list). Any task |
| 26 | * which can find this object holding the appropriete locks, can take a reference | 26 | * which can find this object holding the appropriete locks, can take a reference |
| 27 | * and the object itself is guarenteed to survive until the reference is dropped. | 27 | * and the object itself is guaranteed to survive until the reference is dropped. |
| 28 | * | 28 | * |
| 29 | * LOCKING: | 29 | * LOCKING: |
| 30 | * There are 3 spinlocks involved with fsnotify inode marks and they MUST | 30 | * There are 3 spinlocks involved with fsnotify inode marks and they MUST |
diff --git a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c index f5094ee224c1..f14fde2b03d6 100644 --- a/fs/ntfs/attrib.c +++ b/fs/ntfs/attrib.c | |||
| @@ -197,7 +197,7 @@ err_out: | |||
| 197 | } else if (ctx_needs_reset) { | 197 | } else if (ctx_needs_reset) { |
| 198 | /* | 198 | /* |
| 199 | * If there is no attribute list, restoring the search context | 199 | * If there is no attribute list, restoring the search context |
| 200 | * is acomplished simply by copying the saved context back over | 200 | * is accomplished simply by copying the saved context back over |
| 201 | * the caller supplied context. If there is an attribute list, | 201 | * the caller supplied context. If there is an attribute list, |
| 202 | * things are more complicated as we need to deal with mapping | 202 | * things are more complicated as we need to deal with mapping |
| 203 | * of mft records and resulting potential changes in pointers. | 203 | * of mft records and resulting potential changes in pointers. |
| @@ -1181,7 +1181,7 @@ not_found: | |||
| 1181 | * for, i.e. if one wants to add the attribute to the mft record this is the | 1181 | * for, i.e. if one wants to add the attribute to the mft record this is the |
| 1182 | * correct place to insert its attribute list entry into. | 1182 | * correct place to insert its attribute list entry into. |
| 1183 | * | 1183 | * |
| 1184 | * When -errno != -ENOENT, an error occured during the lookup. @ctx->attr is | 1184 | * When -errno != -ENOENT, an error occurred during the lookup. @ctx->attr is |
| 1185 | * then undefined and in particular you should not rely on it not changing. | 1185 | * then undefined and in particular you should not rely on it not changing. |
| 1186 | */ | 1186 | */ |
| 1187 | int ntfs_attr_lookup(const ATTR_TYPE type, const ntfschar *name, | 1187 | int ntfs_attr_lookup(const ATTR_TYPE type, const ntfschar *name, |
diff --git a/fs/ntfs/compress.c b/fs/ntfs/compress.c index ef9ed854255c..ee4144ce5d7c 100644 --- a/fs/ntfs/compress.c +++ b/fs/ntfs/compress.c | |||
| @@ -501,7 +501,7 @@ int ntfs_read_compressed_block(struct page *page) | |||
| 501 | VCN start_vcn = (((s64)index << PAGE_CACHE_SHIFT) & ~cb_size_mask) >> | 501 | VCN start_vcn = (((s64)index << PAGE_CACHE_SHIFT) & ~cb_size_mask) >> |
| 502 | vol->cluster_size_bits; | 502 | vol->cluster_size_bits; |
| 503 | /* | 503 | /* |
| 504 | * The first vcn after the last wanted vcn (minumum alignment is again | 504 | * The first vcn after the last wanted vcn (minimum alignment is again |
| 505 | * PAGE_CACHE_SIZE. | 505 | * PAGE_CACHE_SIZE. |
| 506 | */ | 506 | */ |
| 507 | VCN end_vcn = ((((s64)(index + 1UL) << PAGE_CACHE_SHIFT) + cb_size - 1) | 507 | VCN end_vcn = ((((s64)(index + 1UL) << PAGE_CACHE_SHIFT) + cb_size - 1) |
diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c index 0b56c6b7ec01..c05d6dcf77a4 100644 --- a/fs/ntfs/inode.c +++ b/fs/ntfs/inode.c | |||
| @@ -622,7 +622,7 @@ static int ntfs_read_locked_inode(struct inode *vi) | |||
| 622 | */ | 622 | */ |
| 623 | /* Everyone gets all permissions. */ | 623 | /* Everyone gets all permissions. */ |
| 624 | vi->i_mode |= S_IRWXUGO; | 624 | vi->i_mode |= S_IRWXUGO; |
| 625 | /* If read-only, noone gets write permissions. */ | 625 | /* If read-only, no one gets write permissions. */ |
| 626 | if (IS_RDONLY(vi)) | 626 | if (IS_RDONLY(vi)) |
| 627 | vi->i_mode &= ~S_IWUGO; | 627 | vi->i_mode &= ~S_IWUGO; |
| 628 | if (m->flags & MFT_RECORD_IS_DIRECTORY) { | 628 | if (m->flags & MFT_RECORD_IS_DIRECTORY) { |
| @@ -2529,7 +2529,7 @@ retry_truncate: | |||
| 2529 | * specifies that the behaviour is unspecified thus we do not | 2529 | * specifies that the behaviour is unspecified thus we do not |
| 2530 | * have to do anything. This means that in our implementation | 2530 | * have to do anything. This means that in our implementation |
| 2531 | * in the rare case that the file is mmap()ped and a write | 2531 | * in the rare case that the file is mmap()ped and a write |
| 2532 | * occured into the mmap()ped region just beyond the file size | 2532 | * occurred into the mmap()ped region just beyond the file size |
| 2533 | * and writepage has not yet been called to write out the page | 2533 | * and writepage has not yet been called to write out the page |
| 2534 | * (which would clear the area beyond the file size) and we now | 2534 | * (which would clear the area beyond the file size) and we now |
| 2535 | * extend the file size to incorporate this dirty region | 2535 | * extend the file size to incorporate this dirty region |
diff --git a/fs/ntfs/layout.h b/fs/ntfs/layout.h index 8b2549f672bf..faece7190866 100644 --- a/fs/ntfs/layout.h +++ b/fs/ntfs/layout.h | |||
| @@ -286,7 +286,7 @@ typedef le16 MFT_RECORD_FLAGS; | |||
| 286 | * fragmented. Volume free space includes the empty part of the mft zone and | 286 | * fragmented. Volume free space includes the empty part of the mft zone and |
| 287 | * when the volume's free 88% are used up, the mft zone is shrunk by a factor | 287 | * when the volume's free 88% are used up, the mft zone is shrunk by a factor |
| 288 | * of 2, thus making more space available for more files/data. This process is | 288 | * of 2, thus making more space available for more files/data. This process is |
| 289 | * repeated everytime there is no more free space except for the mft zone until | 289 | * repeated every time there is no more free space except for the mft zone until |
| 290 | * there really is no more free space. | 290 | * there really is no more free space. |
| 291 | */ | 291 | */ |
| 292 | 292 | ||
| @@ -1657,13 +1657,13 @@ typedef enum { | |||
| 1657 | * pointed to by the Owner field was provided by a defaulting mechanism | 1657 | * pointed to by the Owner field was provided by a defaulting mechanism |
| 1658 | * rather than explicitly provided by the original provider of the | 1658 | * rather than explicitly provided by the original provider of the |
| 1659 | * security descriptor. This may affect the treatment of the SID with | 1659 | * security descriptor. This may affect the treatment of the SID with |
| 1660 | * respect to inheritence of an owner. | 1660 | * respect to inheritance of an owner. |
| 1661 | * | 1661 | * |
| 1662 | * SE_GROUP_DEFAULTED - This boolean flag, when set, indicates that the SID in | 1662 | * SE_GROUP_DEFAULTED - This boolean flag, when set, indicates that the SID in |
| 1663 | * the Group field was provided by a defaulting mechanism rather than | 1663 | * the Group field was provided by a defaulting mechanism rather than |
| 1664 | * explicitly provided by the original provider of the security | 1664 | * explicitly provided by the original provider of the security |
| 1665 | * descriptor. This may affect the treatment of the SID with respect to | 1665 | * descriptor. This may affect the treatment of the SID with respect to |
| 1666 | * inheritence of a primary group. | 1666 | * inheritance of a primary group. |
| 1667 | * | 1667 | * |
| 1668 | * SE_DACL_PRESENT - This boolean flag, when set, indicates that the security | 1668 | * SE_DACL_PRESENT - This boolean flag, when set, indicates that the security |
| 1669 | * descriptor contains a discretionary ACL. If this flag is set and the | 1669 | * descriptor contains a discretionary ACL. If this flag is set and the |
| @@ -1674,7 +1674,7 @@ typedef enum { | |||
| 1674 | * pointed to by the Dacl field was provided by a defaulting mechanism | 1674 | * pointed to by the Dacl field was provided by a defaulting mechanism |
| 1675 | * rather than explicitly provided by the original provider of the | 1675 | * rather than explicitly provided by the original provider of the |
| 1676 | * security descriptor. This may affect the treatment of the ACL with | 1676 | * security descriptor. This may affect the treatment of the ACL with |
| 1677 | * respect to inheritence of an ACL. This flag is ignored if the | 1677 | * respect to inheritance of an ACL. This flag is ignored if the |
| 1678 | * DaclPresent flag is not set. | 1678 | * DaclPresent flag is not set. |
| 1679 | * | 1679 | * |
| 1680 | * SE_SACL_PRESENT - This boolean flag, when set, indicates that the security | 1680 | * SE_SACL_PRESENT - This boolean flag, when set, indicates that the security |
| @@ -1686,7 +1686,7 @@ typedef enum { | |||
| 1686 | * pointed to by the Sacl field was provided by a defaulting mechanism | 1686 | * pointed to by the Sacl field was provided by a defaulting mechanism |
| 1687 | * rather than explicitly provided by the original provider of the | 1687 | * rather than explicitly provided by the original provider of the |
| 1688 | * security descriptor. This may affect the treatment of the ACL with | 1688 | * security descriptor. This may affect the treatment of the ACL with |
| 1689 | * respect to inheritence of an ACL. This flag is ignored if the | 1689 | * respect to inheritance of an ACL. This flag is ignored if the |
| 1690 | * SaclPresent flag is not set. | 1690 | * SaclPresent flag is not set. |
| 1691 | * | 1691 | * |
| 1692 | * SE_SELF_RELATIVE - This boolean flag, when set, indicates that the security | 1692 | * SE_SELF_RELATIVE - This boolean flag, when set, indicates that the security |
| @@ -2283,7 +2283,7 @@ typedef struct { | |||
| 2283 | // the key_length is zero, then the vcn immediately | 2283 | // the key_length is zero, then the vcn immediately |
| 2284 | // follows the INDEX_ENTRY_HEADER. Regardless of | 2284 | // follows the INDEX_ENTRY_HEADER. Regardless of |
| 2285 | // key_length, the address of the 8-byte boundary | 2285 | // key_length, the address of the 8-byte boundary |
| 2286 | // alligned vcn of INDEX_ENTRY{_HEADER} *ie is given by | 2286 | // aligned vcn of INDEX_ENTRY{_HEADER} *ie is given by |
| 2287 | // (char*)ie + le16_to_cpu(ie*)->length) - sizeof(VCN), | 2287 | // (char*)ie + le16_to_cpu(ie*)->length) - sizeof(VCN), |
| 2288 | // where sizeof(VCN) can be hardcoded as 8 if wanted. */ | 2288 | // where sizeof(VCN) can be hardcoded as 8 if wanted. */ |
| 2289 | } __attribute__ ((__packed__)) INDEX_ENTRY; | 2289 | } __attribute__ ((__packed__)) INDEX_ENTRY; |
diff --git a/fs/ntfs/logfile.c b/fs/ntfs/logfile.c index 4dadcdf3d451..c71de292c5ad 100644 --- a/fs/ntfs/logfile.c +++ b/fs/ntfs/logfile.c | |||
| @@ -669,7 +669,7 @@ err_out: | |||
| 669 | * of cases where we think that a volume is dirty when in fact it is clean. | 669 | * of cases where we think that a volume is dirty when in fact it is clean. |
| 670 | * This should only affect volumes that have not been shutdown cleanly but did | 670 | * This should only affect volumes that have not been shutdown cleanly but did |
| 671 | * not have any pending, non-check-pointed i/o, i.e. they were completely idle | 671 | * not have any pending, non-check-pointed i/o, i.e. they were completely idle |
| 672 | * at least for the five seconds preceeding the unclean shutdown. | 672 | * at least for the five seconds preceding the unclean shutdown. |
| 673 | * | 673 | * |
| 674 | * This function assumes that the $LogFile journal has already been consistency | 674 | * This function assumes that the $LogFile journal has already been consistency |
| 675 | * checked by a call to ntfs_check_logfile() and in particular if the $LogFile | 675 | * checked by a call to ntfs_check_logfile() and in particular if the $LogFile |
diff --git a/fs/ntfs/logfile.h b/fs/ntfs/logfile.h index b5a6f08bd35c..aa2b6ac3f0a4 100644 --- a/fs/ntfs/logfile.h +++ b/fs/ntfs/logfile.h | |||
| @@ -222,7 +222,7 @@ typedef struct { | |||
| 222 | /* 24*/ sle64 file_size; /* Usable byte size of the log file. If the | 222 | /* 24*/ sle64 file_size; /* Usable byte size of the log file. If the |
| 223 | restart_area_offset + the offset of the | 223 | restart_area_offset + the offset of the |
| 224 | file_size are > 510 then corruption has | 224 | file_size are > 510 then corruption has |
| 225 | occured. This is the very first check when | 225 | occurred. This is the very first check when |
| 226 | starting with the restart_area as if it | 226 | starting with the restart_area as if it |
| 227 | fails it means that some of the above values | 227 | fails it means that some of the above values |
| 228 | will be corrupted by the multi sector | 228 | will be corrupted by the multi sector |
diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c index 326e7475a22a..382857f9c7db 100644 --- a/fs/ntfs/mft.c +++ b/fs/ntfs/mft.c | |||
| @@ -73,7 +73,7 @@ static inline MFT_RECORD *map_mft_record_page(ntfs_inode *ni) | |||
| 73 | if (index > end_index || (i_size & ~PAGE_CACHE_MASK) < ofs + | 73 | if (index > end_index || (i_size & ~PAGE_CACHE_MASK) < ofs + |
| 74 | vol->mft_record_size) { | 74 | vol->mft_record_size) { |
| 75 | page = ERR_PTR(-ENOENT); | 75 | page = ERR_PTR(-ENOENT); |
| 76 | ntfs_error(vol->sb, "Attemt to read mft record 0x%lx, " | 76 | ntfs_error(vol->sb, "Attempt to read mft record 0x%lx, " |
| 77 | "which is beyond the end of the mft. " | 77 | "which is beyond the end of the mft. " |
| 78 | "This is probably a bug in the ntfs " | 78 | "This is probably a bug in the ntfs " |
| 79 | "driver.", ni->mft_no); | 79 | "driver.", ni->mft_no); |
| @@ -1442,7 +1442,7 @@ static int ntfs_mft_bitmap_extend_allocation_nolock(ntfs_volume *vol) | |||
| 1442 | // Note: It will need to be a special mft record and if none of | 1442 | // Note: It will need to be a special mft record and if none of |
| 1443 | // those are available it gets rather complicated... | 1443 | // those are available it gets rather complicated... |
| 1444 | ntfs_error(vol->sb, "Not enough space in this mft record to " | 1444 | ntfs_error(vol->sb, "Not enough space in this mft record to " |
| 1445 | "accomodate extended mft bitmap attribute " | 1445 | "accommodate extended mft bitmap attribute " |
| 1446 | "extent. Cannot handle this yet."); | 1446 | "extent. Cannot handle this yet."); |
| 1447 | ret = -EOPNOTSUPP; | 1447 | ret = -EOPNOTSUPP; |
| 1448 | goto undo_alloc; | 1448 | goto undo_alloc; |
| @@ -1879,7 +1879,7 @@ static int ntfs_mft_data_extend_allocation_nolock(ntfs_volume *vol) | |||
| 1879 | // and we would then need to update all references to this mft | 1879 | // and we would then need to update all references to this mft |
| 1880 | // record appropriately. This is rather complicated... | 1880 | // record appropriately. This is rather complicated... |
| 1881 | ntfs_error(vol->sb, "Not enough space in this mft record to " | 1881 | ntfs_error(vol->sb, "Not enough space in this mft record to " |
| 1882 | "accomodate extended mft data attribute " | 1882 | "accommodate extended mft data attribute " |
| 1883 | "extent. Cannot handle this yet."); | 1883 | "extent. Cannot handle this yet."); |
| 1884 | ret = -EOPNOTSUPP; | 1884 | ret = -EOPNOTSUPP; |
| 1885 | goto undo_alloc; | 1885 | goto undo_alloc; |
| @@ -2357,7 +2357,7 @@ ntfs_inode *ntfs_mft_record_alloc(ntfs_volume *vol, const int mode, | |||
| 2357 | } | 2357 | } |
| 2358 | #ifdef DEBUG | 2358 | #ifdef DEBUG |
| 2359 | read_lock_irqsave(&mftbmp_ni->size_lock, flags); | 2359 | read_lock_irqsave(&mftbmp_ni->size_lock, flags); |
| 2360 | ntfs_debug("Status of mftbmp after initialized extention: " | 2360 | ntfs_debug("Status of mftbmp after initialized extension: " |
| 2361 | "allocated_size 0x%llx, data_size 0x%llx, " | 2361 | "allocated_size 0x%llx, data_size 0x%llx, " |
| 2362 | "initialized_size 0x%llx.", | 2362 | "initialized_size 0x%llx.", |
| 2363 | (long long)mftbmp_ni->allocated_size, | 2363 | (long long)mftbmp_ni->allocated_size, |
diff --git a/fs/ntfs/runlist.c b/fs/ntfs/runlist.c index 56a9a6d25a2a..eac7d6788a10 100644 --- a/fs/ntfs/runlist.c +++ b/fs/ntfs/runlist.c | |||
| @@ -1243,7 +1243,7 @@ err_out: | |||
| 1243 | * write. | 1243 | * write. |
| 1244 | * | 1244 | * |
| 1245 | * This is used when building the mapping pairs array of a runlist to compress | 1245 | * This is used when building the mapping pairs array of a runlist to compress |
| 1246 | * a given logical cluster number (lcn) or a specific run length to the minumum | 1246 | * a given logical cluster number (lcn) or a specific run length to the minimum |
| 1247 | * size possible. | 1247 | * size possible. |
| 1248 | * | 1248 | * |
| 1249 | * Return the number of bytes written on success. On error, i.e. the | 1249 | * Return the number of bytes written on success. On error, i.e. the |
diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index 29099a07b9fe..b52706da4645 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c | |||
| @@ -458,7 +458,7 @@ static int ntfs_remount(struct super_block *sb, int *flags, char *opt) | |||
| 458 | * the volume on boot and updates them. | 458 | * the volume on boot and updates them. |
| 459 | * | 459 | * |
| 460 | * When remounting read-only, mark the volume clean if no volume errors | 460 | * When remounting read-only, mark the volume clean if no volume errors |
| 461 | * have occured. | 461 | * have occurred. |
| 462 | */ | 462 | */ |
| 463 | if ((sb->s_flags & MS_RDONLY) && !(*flags & MS_RDONLY)) { | 463 | if ((sb->s_flags & MS_RDONLY) && !(*flags & MS_RDONLY)) { |
| 464 | static const char *es = ". Cannot remount read-write."; | 464 | static const char *es = ". Cannot remount read-write."; |
| @@ -1269,7 +1269,7 @@ static int check_windows_hibernation_status(ntfs_volume *vol) | |||
| 1269 | "hibernated on the volume."); | 1269 | "hibernated on the volume."); |
| 1270 | return 0; | 1270 | return 0; |
| 1271 | } | 1271 | } |
| 1272 | /* A real error occured. */ | 1272 | /* A real error occurred. */ |
| 1273 | ntfs_error(vol->sb, "Failed to find inode number for " | 1273 | ntfs_error(vol->sb, "Failed to find inode number for " |
| 1274 | "hiberfil.sys."); | 1274 | "hiberfil.sys."); |
| 1275 | return ret; | 1275 | return ret; |
| @@ -1370,7 +1370,7 @@ static bool load_and_init_quota(ntfs_volume *vol) | |||
| 1370 | NVolSetQuotaOutOfDate(vol); | 1370 | NVolSetQuotaOutOfDate(vol); |
| 1371 | return true; | 1371 | return true; |
| 1372 | } | 1372 | } |
| 1373 | /* A real error occured. */ | 1373 | /* A real error occurred. */ |
| 1374 | ntfs_error(vol->sb, "Failed to find inode number for $Quota."); | 1374 | ntfs_error(vol->sb, "Failed to find inode number for $Quota."); |
| 1375 | return false; | 1375 | return false; |
| 1376 | } | 1376 | } |
| @@ -1454,7 +1454,7 @@ not_enabled: | |||
| 1454 | NVolSetUsnJrnlStamped(vol); | 1454 | NVolSetUsnJrnlStamped(vol); |
| 1455 | return true; | 1455 | return true; |
| 1456 | } | 1456 | } |
| 1457 | /* A real error occured. */ | 1457 | /* A real error occurred. */ |
| 1458 | ntfs_error(vol->sb, "Failed to find inode number for " | 1458 | ntfs_error(vol->sb, "Failed to find inode number for " |
| 1459 | "$UsnJrnl."); | 1459 | "$UsnJrnl."); |
| 1460 | return false; | 1460 | return false; |
| @@ -2292,7 +2292,7 @@ static void ntfs_put_super(struct super_block *sb) | |||
| 2292 | ntfs_commit_inode(vol->mft_ino); | 2292 | ntfs_commit_inode(vol->mft_ino); |
| 2293 | 2293 | ||
| 2294 | /* | 2294 | /* |
| 2295 | * If a read-write mount and no volume errors have occured, mark the | 2295 | * If a read-write mount and no volume errors have occurred, mark the |
| 2296 | * volume clean. Also, re-commit all affected inodes. | 2296 | * volume clean. Also, re-commit all affected inodes. |
| 2297 | */ | 2297 | */ |
| 2298 | if (!(sb->s_flags & MS_RDONLY)) { | 2298 | if (!(sb->s_flags & MS_RDONLY)) { |
| @@ -2496,7 +2496,7 @@ static s64 get_nr_free_clusters(ntfs_volume *vol) | |||
| 2496 | if (vol->nr_clusters & 63) | 2496 | if (vol->nr_clusters & 63) |
| 2497 | nr_free += 64 - (vol->nr_clusters & 63); | 2497 | nr_free += 64 - (vol->nr_clusters & 63); |
| 2498 | up_read(&vol->lcnbmp_lock); | 2498 | up_read(&vol->lcnbmp_lock); |
| 2499 | /* If errors occured we may well have gone below zero, fix this. */ | 2499 | /* If errors occurred we may well have gone below zero, fix this. */ |
| 2500 | if (nr_free < 0) | 2500 | if (nr_free < 0) |
| 2501 | nr_free = 0; | 2501 | nr_free = 0; |
| 2502 | ntfs_debug("Exiting."); | 2502 | ntfs_debug("Exiting."); |
| @@ -2561,7 +2561,7 @@ static unsigned long __get_nr_free_mft_records(ntfs_volume *vol, | |||
| 2561 | } | 2561 | } |
| 2562 | ntfs_debug("Finished reading $MFT/$BITMAP, last index = 0x%lx.", | 2562 | ntfs_debug("Finished reading $MFT/$BITMAP, last index = 0x%lx.", |
| 2563 | index - 1); | 2563 | index - 1); |
| 2564 | /* If errors occured we may well have gone below zero, fix this. */ | 2564 | /* If errors occurred we may well have gone below zero, fix this. */ |
| 2565 | if (nr_free < 0) | 2565 | if (nr_free < 0) |
| 2566 | nr_free = 0; | 2566 | nr_free = 0; |
| 2567 | ntfs_debug("Exiting."); | 2567 | ntfs_debug("Exiting."); |
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index b27a0d86f8c5..48aa9c7401c7 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
| @@ -4519,7 +4519,7 @@ set_tail_append: | |||
| 4519 | } | 4519 | } |
| 4520 | 4520 | ||
| 4521 | /* | 4521 | /* |
| 4522 | * Helper function called at the begining of an insert. | 4522 | * Helper function called at the beginning of an insert. |
| 4523 | * | 4523 | * |
| 4524 | * This computes a few things that are commonly used in the process of | 4524 | * This computes a few things that are commonly used in the process of |
| 4525 | * inserting into the btree: | 4525 | * inserting into the btree: |
diff --git a/fs/ocfs2/aops.h b/fs/ocfs2/aops.h index eceb456037c1..75cf3ad987a6 100644 --- a/fs/ocfs2/aops.h +++ b/fs/ocfs2/aops.h | |||
| @@ -71,7 +71,7 @@ static inline void ocfs2_iocb_set_rw_locked(struct kiocb *iocb, int level) | |||
| 71 | 71 | ||
| 72 | /* | 72 | /* |
| 73 | * Using a named enum representing lock types in terms of #N bit stored in | 73 | * Using a named enum representing lock types in terms of #N bit stored in |
| 74 | * iocb->private, which is going to be used for communication bewteen | 74 | * iocb->private, which is going to be used for communication between |
| 75 | * ocfs2_dio_end_io() and ocfs2_file_aio_write/read(). | 75 | * ocfs2_dio_end_io() and ocfs2_file_aio_write/read(). |
| 76 | */ | 76 | */ |
| 77 | enum ocfs2_iocb_lock_bits { | 77 | enum ocfs2_iocb_lock_bits { |
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index 2461eb3272ed..643720209a98 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c | |||
| @@ -2275,7 +2275,7 @@ void o2hb_free_hb_set(struct config_group *group) | |||
| 2275 | kfree(hs); | 2275 | kfree(hs); |
| 2276 | } | 2276 | } |
| 2277 | 2277 | ||
| 2278 | /* hb callback registration and issueing */ | 2278 | /* hb callback registration and issuing */ |
| 2279 | 2279 | ||
| 2280 | static struct o2hb_callback *hbcall_from_type(enum o2hb_callback_type type) | 2280 | static struct o2hb_callback *hbcall_from_type(enum o2hb_callback_type type) |
| 2281 | { | 2281 | { |
diff --git a/fs/ocfs2/cluster/quorum.c b/fs/ocfs2/cluster/quorum.c index a87366750f23..8f9cea1597af 100644 --- a/fs/ocfs2/cluster/quorum.c +++ b/fs/ocfs2/cluster/quorum.c | |||
| @@ -89,7 +89,7 @@ static void o2quo_fence_self(void) | |||
| 89 | }; | 89 | }; |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | /* Indicate that a timeout occured on a hearbeat region write. The | 92 | /* Indicate that a timeout occurred on a hearbeat region write. The |
| 93 | * other nodes in the cluster may consider us dead at that time so we | 93 | * other nodes in the cluster may consider us dead at that time so we |
| 94 | * want to "fence" ourselves so that we don't scribble on the disk | 94 | * want to "fence" ourselves so that we don't scribble on the disk |
| 95 | * after they think they've recovered us. This can't solve all | 95 | * after they think they've recovered us. This can't solve all |
| @@ -261,7 +261,7 @@ void o2quo_hb_still_up(u8 node) | |||
| 261 | spin_unlock(&qs->qs_lock); | 261 | spin_unlock(&qs->qs_lock); |
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | /* This is analagous to hb_up. as a node's connection comes up we delay the | 264 | /* This is analogous to hb_up. as a node's connection comes up we delay the |
| 265 | * quorum decision until we see it heartbeating. the hold will be droped in | 265 | * quorum decision until we see it heartbeating. the hold will be droped in |
| 266 | * hb_up or hb_down. it might be perpetuated by con_err until hb_down. if | 266 | * hb_up or hb_down. it might be perpetuated by con_err until hb_down. if |
| 267 | * it's already heartbeating we we might be dropping a hold that conn_up got. | 267 | * it's already heartbeating we we might be dropping a hold that conn_up got. |
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index ee04ff5ee603..db5ee4b4f47a 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c | |||
| @@ -565,7 +565,7 @@ static void o2net_set_nn_state(struct o2net_node *nn, | |||
| 565 | * the work queue actually being up. */ | 565 | * the work queue actually being up. */ |
| 566 | if (!valid && o2net_wq) { | 566 | if (!valid && o2net_wq) { |
| 567 | unsigned long delay; | 567 | unsigned long delay; |
| 568 | /* delay if we're withing a RECONNECT_DELAY of the | 568 | /* delay if we're within a RECONNECT_DELAY of the |
| 569 | * last attempt */ | 569 | * last attempt */ |
| 570 | delay = (nn->nn_last_connect_attempt + | 570 | delay = (nn->nn_last_connect_attempt + |
| 571 | msecs_to_jiffies(o2net_reconnect_delay())) | 571 | msecs_to_jiffies(o2net_reconnect_delay())) |
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index 9d67610dfc74..fede57ed005f 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c | |||
| @@ -808,7 +808,7 @@ lookup: | |||
| 808 | dlm_mle_detach_hb_events(dlm, mle); | 808 | dlm_mle_detach_hb_events(dlm, mle); |
| 809 | dlm_put_mle(mle); | 809 | dlm_put_mle(mle); |
| 810 | mle = NULL; | 810 | mle = NULL; |
| 811 | /* this is lame, but we cant wait on either | 811 | /* this is lame, but we can't wait on either |
| 812 | * the mle or lockres waitqueue here */ | 812 | * the mle or lockres waitqueue here */ |
| 813 | if (mig) | 813 | if (mig) |
| 814 | msleep(100); | 814 | msleep(100); |
| @@ -843,7 +843,7 @@ lookup: | |||
| 843 | 843 | ||
| 844 | /* finally add the lockres to its hash bucket */ | 844 | /* finally add the lockres to its hash bucket */ |
| 845 | __dlm_insert_lockres(dlm, res); | 845 | __dlm_insert_lockres(dlm, res); |
| 846 | /* since this lockres is new it doesnt not require the spinlock */ | 846 | /* since this lockres is new it doesn't not require the spinlock */ |
| 847 | dlm_lockres_grab_inflight_ref_new(dlm, res); | 847 | dlm_lockres_grab_inflight_ref_new(dlm, res); |
| 848 | 848 | ||
| 849 | /* if this node does not become the master make sure to drop | 849 | /* if this node does not become the master make sure to drop |
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 177d3a6c2a5f..b4c8bb6b8d28 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c | |||
| @@ -835,7 +835,7 @@ static int ocfs2_inode_is_valid_to_delete(struct inode *inode) | |||
| 835 | 835 | ||
| 836 | /* If we have allowd wipe of this inode for another node, it | 836 | /* If we have allowd wipe of this inode for another node, it |
| 837 | * will be marked here so we can safely skip it. Recovery will | 837 | * will be marked here so we can safely skip it. Recovery will |
| 838 | * cleanup any inodes we might inadvertantly skip here. */ | 838 | * cleanup any inodes we might inadvertently skip here. */ |
| 839 | if (oi->ip_flags & OCFS2_INODE_SKIP_DELETE) | 839 | if (oi->ip_flags & OCFS2_INODE_SKIP_DELETE) |
| 840 | goto bail_unlock; | 840 | goto bail_unlock; |
| 841 | 841 | ||
| @@ -917,7 +917,7 @@ static int ocfs2_query_inode_wipe(struct inode *inode, | |||
| 917 | * the inode open lock in ocfs2_read_locked_inode(). When we | 917 | * the inode open lock in ocfs2_read_locked_inode(). When we |
| 918 | * get to ->delete_inode(), each node tries to convert it's | 918 | * get to ->delete_inode(), each node tries to convert it's |
| 919 | * lock to an exclusive. Trylocks are serialized by the inode | 919 | * lock to an exclusive. Trylocks are serialized by the inode |
| 920 | * meta data lock. If the upconvert suceeds, we know the inode | 920 | * meta data lock. If the upconvert succeeds, we know the inode |
| 921 | * is no longer live and can be deleted. | 921 | * is no longer live and can be deleted. |
| 922 | * | 922 | * |
| 923 | * Though we call this with the meta data lock held, the | 923 | * Though we call this with the meta data lock held, the |
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index dcc2d9327150..b141a44605ca 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c | |||
| @@ -1368,7 +1368,7 @@ skip_recovery: | |||
| 1368 | mlog_errno(status); | 1368 | mlog_errno(status); |
| 1369 | 1369 | ||
| 1370 | /* Now it is right time to recover quotas... We have to do this under | 1370 | /* Now it is right time to recover quotas... We have to do this under |
| 1371 | * superblock lock so that noone can start using the slot (and crash) | 1371 | * superblock lock so that no one can start using the slot (and crash) |
| 1372 | * before we recover it */ | 1372 | * before we recover it */ |
| 1373 | for (i = 0; i < rm_quota_used; i++) { | 1373 | for (i = 0; i < rm_quota_used; i++) { |
| 1374 | qrec = ocfs2_begin_quota_recovery(osb, rm_quota[i]); | 1374 | qrec = ocfs2_begin_quota_recovery(osb, rm_quota[i]); |
diff --git a/fs/ocfs2/journal.h b/fs/ocfs2/journal.h index 6180da1e37e6..68cf2f6d3c6a 100644 --- a/fs/ocfs2/journal.h +++ b/fs/ocfs2/journal.h | |||
| @@ -215,7 +215,7 @@ static inline void ocfs2_checkpoint_inode(struct inode *inode) | |||
| 215 | /* WARNING: This only kicks off a single | 215 | /* WARNING: This only kicks off a single |
| 216 | * checkpoint. If someone races you and adds more | 216 | * checkpoint. If someone races you and adds more |
| 217 | * metadata to the journal, you won't know, and will | 217 | * metadata to the journal, you won't know, and will |
| 218 | * wind up waiting *alot* longer than necessary. Right | 218 | * wind up waiting *a lot* longer than necessary. Right |
| 219 | * now we only use this in clear_inode so that's | 219 | * now we only use this in clear_inode so that's |
| 220 | * OK. */ | 220 | * OK. */ |
| 221 | ocfs2_start_checkpoint(osb); | 221 | ocfs2_start_checkpoint(osb); |
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 28f2cc1080d8..e5d738cd9cc0 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c | |||
| @@ -2128,7 +2128,7 @@ leave: | |||
| 2128 | } | 2128 | } |
| 2129 | 2129 | ||
| 2130 | /** | 2130 | /** |
| 2131 | * ocfs2_prep_new_orphaned_file() - Prepare the orphan dir to recieve a newly | 2131 | * ocfs2_prep_new_orphaned_file() - Prepare the orphan dir to receive a newly |
| 2132 | * allocated file. This is different from the typical 'add to orphan dir' | 2132 | * allocated file. This is different from the typical 'add to orphan dir' |
| 2133 | * operation in that the inode does not yet exist. This is a problem because | 2133 | * operation in that the inode does not yet exist. This is a problem because |
| 2134 | * the orphan dir stringifies the inode block number to come up with it's | 2134 | * the orphan dir stringifies the inode block number to come up with it's |
diff --git a/fs/ocfs2/ocfs2_fs.h b/fs/ocfs2/ocfs2_fs.h index bf2e7764920e..b68f87a83924 100644 --- a/fs/ocfs2/ocfs2_fs.h +++ b/fs/ocfs2/ocfs2_fs.h | |||
| @@ -441,7 +441,7 @@ static unsigned char ocfs2_type_by_mode[S_IFMT >> S_SHIFT] = { | |||
| 441 | struct ocfs2_block_check { | 441 | struct ocfs2_block_check { |
| 442 | /*00*/ __le32 bc_crc32e; /* 802.3 Ethernet II CRC32 */ | 442 | /*00*/ __le32 bc_crc32e; /* 802.3 Ethernet II CRC32 */ |
| 443 | __le16 bc_ecc; /* Single-error-correction parity vector. | 443 | __le16 bc_ecc; /* Single-error-correction parity vector. |
| 444 | This is a simple Hamming code dependant | 444 | This is a simple Hamming code dependent |
| 445 | on the blocksize. OCFS2's maximum | 445 | on the blocksize. OCFS2's maximum |
| 446 | blocksize, 4K, requires 16 parity bits, | 446 | blocksize, 4K, requires 16 parity bits, |
| 447 | so we fit in __le16. */ | 447 | so we fit in __le16. */ |
| @@ -750,7 +750,7 @@ struct ocfs2_dinode { | |||
| 750 | after an unclean | 750 | after an unclean |
| 751 | shutdown */ | 751 | shutdown */ |
| 752 | } journal1; | 752 | } journal1; |
| 753 | } id1; /* Inode type dependant 1 */ | 753 | } id1; /* Inode type dependent 1 */ |
| 754 | /*C0*/ union { | 754 | /*C0*/ union { |
| 755 | struct ocfs2_super_block i_super; | 755 | struct ocfs2_super_block i_super; |
| 756 | struct ocfs2_local_alloc i_lab; | 756 | struct ocfs2_local_alloc i_lab; |
diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c index 279aef68025b..92fcd575775a 100644 --- a/fs/ocfs2/quota_global.c +++ b/fs/ocfs2/quota_global.c | |||
| @@ -556,7 +556,7 @@ int __ocfs2_sync_dquot(struct dquot *dquot, int freeing) | |||
| 556 | spin_unlock(&dq_data_lock); | 556 | spin_unlock(&dq_data_lock); |
| 557 | err = ocfs2_qinfo_lock(info, freeing); | 557 | err = ocfs2_qinfo_lock(info, freeing); |
| 558 | if (err < 0) { | 558 | if (err < 0) { |
| 559 | mlog(ML_ERROR, "Failed to lock quota info, loosing quota write" | 559 | mlog(ML_ERROR, "Failed to lock quota info, losing quota write" |
| 560 | " (type=%d, id=%u)\n", dquot->dq_type, | 560 | " (type=%d, id=%u)\n", dquot->dq_type, |
| 561 | (unsigned)dquot->dq_id); | 561 | (unsigned)dquot->dq_id); |
| 562 | goto out; | 562 | goto out; |
diff --git a/fs/ocfs2/reservations.h b/fs/ocfs2/reservations.h index 1e49cc29d06c..42c2b804f3fd 100644 --- a/fs/ocfs2/reservations.h +++ b/fs/ocfs2/reservations.h | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | struct ocfs2_alloc_reservation { | 29 | struct ocfs2_alloc_reservation { |
| 30 | struct rb_node r_node; | 30 | struct rb_node r_node; |
| 31 | 31 | ||
| 32 | unsigned int r_start; /* Begining of current window */ | 32 | unsigned int r_start; /* Beginning of current window */ |
| 33 | unsigned int r_len; /* Length of the window */ | 33 | unsigned int r_len; /* Length of the window */ |
| 34 | 34 | ||
| 35 | unsigned int r_last_len; /* Length of most recent alloc */ | 35 | unsigned int r_last_len; /* Length of most recent alloc */ |
diff --git a/fs/ocfs2/stackglue.h b/fs/ocfs2/stackglue.h index 8ce7398ae1d2..1ec56fdb8d0d 100644 --- a/fs/ocfs2/stackglue.h +++ b/fs/ocfs2/stackglue.h | |||
| @@ -126,7 +126,7 @@ struct ocfs2_stack_operations { | |||
| 126 | * | 126 | * |
| 127 | * ->connect() must not return until it is guaranteed that | 127 | * ->connect() must not return until it is guaranteed that |
| 128 | * | 128 | * |
| 129 | * - Node down notifications for the filesystem will be recieved | 129 | * - Node down notifications for the filesystem will be received |
| 130 | * and passed to conn->cc_recovery_handler(). | 130 | * and passed to conn->cc_recovery_handler(). |
| 131 | * - Locking requests for the filesystem will be processed. | 131 | * - Locking requests for the filesystem will be processed. |
| 132 | */ | 132 | */ |
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c index ab6e2061074f..ba5d97e4a73e 100644 --- a/fs/ocfs2/suballoc.c +++ b/fs/ocfs2/suballoc.c | |||
| @@ -1511,7 +1511,7 @@ static int ocfs2_cluster_group_search(struct inode *inode, | |||
| 1511 | max_bits = le16_to_cpu(gd->bg_bits); | 1511 | max_bits = le16_to_cpu(gd->bg_bits); |
| 1512 | 1512 | ||
| 1513 | /* Tail groups in cluster bitmaps which aren't cpg | 1513 | /* Tail groups in cluster bitmaps which aren't cpg |
| 1514 | * aligned are prone to partial extention by a failed | 1514 | * aligned are prone to partial extension by a failed |
| 1515 | * fs resize. If the file system resize never got to | 1515 | * fs resize. If the file system resize never got to |
| 1516 | * update the dinode cluster count, then we don't want | 1516 | * update the dinode cluster count, then we don't want |
| 1517 | * to trust any clusters past it, regardless of what | 1517 | * to trust any clusters past it, regardless of what |
| @@ -2459,7 +2459,7 @@ static int _ocfs2_free_suballoc_bits(handle_t *handle, | |||
| 2459 | /* The alloc_bh comes from ocfs2_free_dinode() or | 2459 | /* The alloc_bh comes from ocfs2_free_dinode() or |
| 2460 | * ocfs2_free_clusters(). The callers have all locked the | 2460 | * ocfs2_free_clusters(). The callers have all locked the |
| 2461 | * allocator and gotten alloc_bh from the lock call. This | 2461 | * allocator and gotten alloc_bh from the lock call. This |
| 2462 | * validates the dinode buffer. Any corruption that has happended | 2462 | * validates the dinode buffer. Any corruption that has happened |
| 2463 | * is a code bug. */ | 2463 | * is a code bug. */ |
| 2464 | BUG_ON(!OCFS2_IS_VALID_DINODE(fe)); | 2464 | BUG_ON(!OCFS2_IS_VALID_DINODE(fe)); |
| 2465 | BUG_ON((count + start_bit) > ocfs2_bits_per_group(cl)); | 2465 | BUG_ON((count + start_bit) > ocfs2_bits_per_group(cl)); |
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 69fa11b35aa4..5a521c748859 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
| @@ -78,7 +78,7 @@ static struct kmem_cache *ocfs2_inode_cachep = NULL; | |||
| 78 | struct kmem_cache *ocfs2_dquot_cachep; | 78 | struct kmem_cache *ocfs2_dquot_cachep; |
| 79 | struct kmem_cache *ocfs2_qf_chunk_cachep; | 79 | struct kmem_cache *ocfs2_qf_chunk_cachep; |
| 80 | 80 | ||
| 81 | /* OCFS2 needs to schedule several differnt types of work which | 81 | /* OCFS2 needs to schedule several different types of work which |
| 82 | * require cluster locking, disk I/O, recovery waits, etc. Since these | 82 | * require cluster locking, disk I/O, recovery waits, etc. Since these |
| 83 | * types of work tend to be heavy we avoid using the kernel events | 83 | * types of work tend to be heavy we avoid using the kernel events |
| 84 | * workqueue and schedule on our own. */ | 84 | * workqueue and schedule on our own. */ |
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 57a215dc2d9b..81ecf9c0bf0a 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c | |||
| @@ -3554,7 +3554,7 @@ int ocfs2_xattr_set(struct inode *inode, | |||
| 3554 | down_write(&OCFS2_I(inode)->ip_xattr_sem); | 3554 | down_write(&OCFS2_I(inode)->ip_xattr_sem); |
| 3555 | /* | 3555 | /* |
| 3556 | * Scan inode and external block to find the same name | 3556 | * Scan inode and external block to find the same name |
| 3557 | * extended attribute and collect search infomation. | 3557 | * extended attribute and collect search information. |
| 3558 | */ | 3558 | */ |
| 3559 | ret = ocfs2_xattr_ibody_find(inode, name_index, name, &xis); | 3559 | ret = ocfs2_xattr_ibody_find(inode, name_index, name, &xis); |
| 3560 | if (ret) | 3560 | if (ret) |
| @@ -3578,7 +3578,7 @@ int ocfs2_xattr_set(struct inode *inode, | |||
| 3578 | goto cleanup; | 3578 | goto cleanup; |
| 3579 | } | 3579 | } |
| 3580 | 3580 | ||
| 3581 | /* Check whether the value is refcounted and do some prepartion. */ | 3581 | /* Check whether the value is refcounted and do some preparation. */ |
| 3582 | if (OCFS2_I(inode)->ip_dyn_features & OCFS2_HAS_REFCOUNT_FL && | 3582 | if (OCFS2_I(inode)->ip_dyn_features & OCFS2_HAS_REFCOUNT_FL && |
| 3583 | (!xis.not_found || !xbs.not_found)) { | 3583 | (!xis.not_found || !xbs.not_found)) { |
| 3584 | ret = ocfs2_prepare_refcount_xattr(inode, di, &xi, | 3584 | ret = ocfs2_prepare_refcount_xattr(inode, di, &xi, |
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index ac546975031f..d545e97d99c3 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c | |||
| @@ -500,7 +500,7 @@ struct hd_struct *add_partition(struct gendisk *disk, int partno, | |||
| 500 | /* everything is up and running, commence */ | 500 | /* everything is up and running, commence */ |
| 501 | rcu_assign_pointer(ptbl->part[partno], p); | 501 | rcu_assign_pointer(ptbl->part[partno], p); |
| 502 | 502 | ||
| 503 | /* suppress uevent if the disk supresses it */ | 503 | /* suppress uevent if the disk suppresses it */ |
| 504 | if (!dev_get_uevent_suppress(ddev)) | 504 | if (!dev_get_uevent_suppress(ddev)) |
| 505 | kobject_uevent(&pdev->kobj, KOBJ_ADD); | 505 | kobject_uevent(&pdev->kobj, KOBJ_ADD); |
| 506 | 506 | ||
| @@ -585,7 +585,7 @@ rescan: | |||
| 585 | /* | 585 | /* |
| 586 | * If any partition code tried to read beyond EOD, try | 586 | * If any partition code tried to read beyond EOD, try |
| 587 | * unlocking native capacity even if partition table is | 587 | * unlocking native capacity even if partition table is |
| 588 | * sucessfully read as we could be missing some partitions. | 588 | * successfully read as we could be missing some partitions. |
| 589 | */ | 589 | */ |
| 590 | if (state->access_beyond_eod) { | 590 | if (state->access_beyond_eod) { |
| 591 | printk(KERN_WARNING | 591 | printk(KERN_WARNING |
diff --git a/fs/partitions/ldm.c b/fs/partitions/ldm.c index b10e3540d5b7..ce4f62440425 100644 --- a/fs/partitions/ldm.c +++ b/fs/partitions/ldm.c | |||
| @@ -1299,6 +1299,11 @@ static bool ldm_frag_add (const u8 *data, int size, struct list_head *frags) | |||
| 1299 | 1299 | ||
| 1300 | BUG_ON (!data || !frags); | 1300 | BUG_ON (!data || !frags); |
| 1301 | 1301 | ||
| 1302 | if (size < 2 * VBLK_SIZE_HEAD) { | ||
| 1303 | ldm_error("Value of size is to small."); | ||
| 1304 | return false; | ||
| 1305 | } | ||
| 1306 | |||
| 1302 | group = get_unaligned_be32(data + 0x08); | 1307 | group = get_unaligned_be32(data + 0x08); |
| 1303 | rec = get_unaligned_be16(data + 0x0C); | 1308 | rec = get_unaligned_be16(data + 0x0C); |
| 1304 | num = get_unaligned_be16(data + 0x0E); | 1309 | num = get_unaligned_be16(data + 0x0E); |
| @@ -1306,6 +1311,10 @@ static bool ldm_frag_add (const u8 *data, int size, struct list_head *frags) | |||
| 1306 | ldm_error ("A VBLK claims to have %d parts.", num); | 1311 | ldm_error ("A VBLK claims to have %d parts.", num); |
| 1307 | return false; | 1312 | return false; |
| 1308 | } | 1313 | } |
| 1314 | if (rec >= num) { | ||
| 1315 | ldm_error("REC value (%d) exceeds NUM value (%d)", rec, num); | ||
| 1316 | return false; | ||
| 1317 | } | ||
| 1309 | 1318 | ||
| 1310 | list_for_each (item, frags) { | 1319 | list_for_each (item, frags) { |
| 1311 | f = list_entry (item, struct frag, list); | 1320 | f = list_entry (item, struct frag, list); |
| @@ -1334,10 +1343,9 @@ found: | |||
| 1334 | 1343 | ||
| 1335 | f->map |= (1 << rec); | 1344 | f->map |= (1 << rec); |
| 1336 | 1345 | ||
| 1337 | if (num > 0) { | 1346 | data += VBLK_SIZE_HEAD; |
| 1338 | data += VBLK_SIZE_HEAD; | 1347 | size -= VBLK_SIZE_HEAD; |
| 1339 | size -= VBLK_SIZE_HEAD; | 1348 | |
| 1340 | } | ||
| 1341 | memcpy (f->data+rec*(size-VBLK_SIZE_HEAD)+VBLK_SIZE_HEAD, data, size); | 1349 | memcpy (f->data+rec*(size-VBLK_SIZE_HEAD)+VBLK_SIZE_HEAD, data, size); |
| 1342 | 1350 | ||
| 1343 | return true; | 1351 | return true; |
diff --git a/fs/proc/base.c b/fs/proc/base.c index 5a670c11aeac..dfa532730e55 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
| @@ -220,7 +220,7 @@ static struct mm_struct *__check_mem_permission(struct task_struct *task) | |||
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | /* | 222 | /* |
| 223 | * Noone else is allowed. | 223 | * No one else is allowed. |
| 224 | */ | 224 | */ |
| 225 | mmput(mm); | 225 | mmput(mm); |
| 226 | return ERR_PTR(-EPERM); | 226 | return ERR_PTR(-EPERM); |
| @@ -3124,11 +3124,16 @@ static int proc_pid_fill_cache(struct file *filp, void *dirent, filldir_t filldi | |||
| 3124 | /* for the /proc/ directory itself, after non-process stuff has been done */ | 3124 | /* for the /proc/ directory itself, after non-process stuff has been done */ |
| 3125 | int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir) | 3125 | int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir) |
| 3126 | { | 3126 | { |
| 3127 | unsigned int nr = filp->f_pos - FIRST_PROCESS_ENTRY; | 3127 | unsigned int nr; |
| 3128 | struct task_struct *reaper = get_proc_task(filp->f_path.dentry->d_inode); | 3128 | struct task_struct *reaper; |
| 3129 | struct tgid_iter iter; | 3129 | struct tgid_iter iter; |
| 3130 | struct pid_namespace *ns; | 3130 | struct pid_namespace *ns; |
| 3131 | 3131 | ||
| 3132 | if (filp->f_pos >= PID_MAX_LIMIT + TGID_OFFSET) | ||
| 3133 | goto out_no_task; | ||
| 3134 | nr = filp->f_pos - FIRST_PROCESS_ENTRY; | ||
| 3135 | |||
| 3136 | reaper = get_proc_task(filp->f_path.dentry->d_inode); | ||
| 3132 | if (!reaper) | 3137 | if (!reaper) |
| 3133 | goto out_no_task; | 3138 | goto out_no_task; |
| 3134 | 3139 | ||
diff --git a/fs/pstore/Kconfig b/fs/pstore/Kconfig index 867d0ac026ce..8007ae7c0d8c 100644 --- a/fs/pstore/Kconfig +++ b/fs/pstore/Kconfig | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | config PSTORE | 1 | config PSTORE |
| 2 | bool "Persistant store support" | 2 | bool "Persistent store support" |
| 3 | default n | 3 | default n |
| 4 | help | 4 | help |
| 5 | This option enables generic access to platform level | 5 | This option enables generic access to platform level |
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index fcc8ae75d874..d3c032f5fa0a 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c | |||
| @@ -442,7 +442,7 @@ EXPORT_SYMBOL(dquot_acquire); | |||
| 442 | */ | 442 | */ |
| 443 | int dquot_commit(struct dquot *dquot) | 443 | int dquot_commit(struct dquot *dquot) |
| 444 | { | 444 | { |
| 445 | int ret = 0, ret2 = 0; | 445 | int ret = 0; |
| 446 | struct quota_info *dqopt = sb_dqopt(dquot->dq_sb); | 446 | struct quota_info *dqopt = sb_dqopt(dquot->dq_sb); |
| 447 | 447 | ||
| 448 | mutex_lock(&dqopt->dqio_mutex); | 448 | mutex_lock(&dqopt->dqio_mutex); |
| @@ -454,15 +454,10 @@ int dquot_commit(struct dquot *dquot) | |||
| 454 | spin_unlock(&dq_list_lock); | 454 | spin_unlock(&dq_list_lock); |
| 455 | /* Inactive dquot can be only if there was error during read/init | 455 | /* Inactive dquot can be only if there was error during read/init |
| 456 | * => we have better not writing it */ | 456 | * => we have better not writing it */ |
| 457 | if (test_bit(DQ_ACTIVE_B, &dquot->dq_flags)) { | 457 | if (test_bit(DQ_ACTIVE_B, &dquot->dq_flags)) |
| 458 | ret = dqopt->ops[dquot->dq_type]->commit_dqblk(dquot); | 458 | ret = dqopt->ops[dquot->dq_type]->commit_dqblk(dquot); |
| 459 | if (info_dirty(&dqopt->info[dquot->dq_type])) { | 459 | else |
| 460 | ret2 = dqopt->ops[dquot->dq_type]->write_file_info( | 460 | ret = -EIO; |
| 461 | dquot->dq_sb, dquot->dq_type); | ||
| 462 | } | ||
| 463 | if (ret >= 0) | ||
| 464 | ret = ret2; | ||
| 465 | } | ||
| 466 | out_sem: | 461 | out_sem: |
| 467 | mutex_unlock(&dqopt->dqio_mutex); | 462 | mutex_unlock(&dqopt->dqio_mutex); |
| 468 | return ret; | 463 | return ret; |
| @@ -956,7 +951,7 @@ static inline int dqput_blocks(struct dquot *dquot) | |||
| 956 | 951 | ||
| 957 | /* | 952 | /* |
| 958 | * Remove references to dquots from inode and add dquot to list for freeing | 953 | * Remove references to dquots from inode and add dquot to list for freeing |
| 959 | * if we have the last referece to dquot | 954 | * if we have the last reference to dquot |
| 960 | * We can't race with anybody because we hold dqptr_sem for writing... | 955 | * We can't race with anybody because we hold dqptr_sem for writing... |
| 961 | */ | 956 | */ |
| 962 | static int remove_inode_dquot_ref(struct inode *inode, int type, | 957 | static int remove_inode_dquot_ref(struct inode *inode, int type, |
diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c index 9eead2c796b7..fbb0b478a346 100644 --- a/fs/ramfs/file-nommu.c +++ b/fs/ramfs/file-nommu.c | |||
| @@ -112,6 +112,7 @@ int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize) | |||
| 112 | SetPageDirty(page); | 112 | SetPageDirty(page); |
| 113 | 113 | ||
| 114 | unlock_page(page); | 114 | unlock_page(page); |
| 115 | put_page(page); | ||
| 115 | } | 116 | } |
| 116 | 117 | ||
| 117 | return 0; | 118 | return 0; |
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index c77514bd5776..c5e82ece7c6c 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** Write ahead logging implementation copyright Chris Mason 2000 | 2 | ** Write ahead logging implementation copyright Chris Mason 2000 |
| 3 | ** | 3 | ** |
| 4 | ** The background commits make this code very interelated, and | 4 | ** The background commits make this code very interrelated, and |
| 5 | ** overly complex. I need to rethink things a bit....The major players: | 5 | ** overly complex. I need to rethink things a bit....The major players: |
| 6 | ** | 6 | ** |
| 7 | ** journal_begin -- call with the number of blocks you expect to log. | 7 | ** journal_begin -- call with the number of blocks you expect to log. |
| @@ -2725,7 +2725,7 @@ int journal_init(struct super_block *sb, const char *j_dev_name, | |||
| 2725 | REISERFS_DISK_OFFSET_IN_BYTES / | 2725 | REISERFS_DISK_OFFSET_IN_BYTES / |
| 2726 | sb->s_blocksize + 2); | 2726 | sb->s_blocksize + 2); |
| 2727 | 2727 | ||
| 2728 | /* Sanity check to see is the standard journal fitting withing first bitmap | 2728 | /* Sanity check to see is the standard journal fitting within first bitmap |
| 2729 | (actual for small blocksizes) */ | 2729 | (actual for small blocksizes) */ |
| 2730 | if (!SB_ONDISK_JOURNAL_DEVICE(sb) && | 2730 | if (!SB_ONDISK_JOURNAL_DEVICE(sb) && |
| 2731 | (SB_JOURNAL_1st_RESERVED_BLOCK(sb) + | 2731 | (SB_JOURNAL_1st_RESERVED_BLOCK(sb) + |
diff --git a/fs/reiserfs/lock.c b/fs/reiserfs/lock.c index b87aa2c1afc1..7df1ce48203a 100644 --- a/fs/reiserfs/lock.c +++ b/fs/reiserfs/lock.c | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | * for this mutex, no need for a system wide mutex facility. | 15 | * for this mutex, no need for a system wide mutex facility. |
| 16 | * | 16 | * |
| 17 | * Also this lock is often released before a call that could block because | 17 | * Also this lock is often released before a call that could block because |
| 18 | * reiserfs performances were partialy based on the release while schedule() | 18 | * reiserfs performances were partially based on the release while schedule() |
| 19 | * property of the Bkl. | 19 | * property of the Bkl. |
| 20 | */ | 20 | */ |
| 21 | void reiserfs_write_lock(struct super_block *s) | 21 | void reiserfs_write_lock(struct super_block *s) |
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 0aab04f46827..b216ff6be1c9 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
| @@ -393,7 +393,7 @@ void add_save_link(struct reiserfs_transaction_handle *th, | |||
| 393 | /* body of "save" link */ | 393 | /* body of "save" link */ |
| 394 | link = INODE_PKEY(inode)->k_dir_id; | 394 | link = INODE_PKEY(inode)->k_dir_id; |
| 395 | 395 | ||
| 396 | /* put "save" link inot tree, don't charge quota to anyone */ | 396 | /* put "save" link into tree, don't charge quota to anyone */ |
| 397 | retval = | 397 | retval = |
| 398 | reiserfs_insert_item(th, &path, &key, &ih, NULL, (char *)&link); | 398 | reiserfs_insert_item(th, &path, &key, &ih, NULL, (char *)&link); |
| 399 | if (retval) { | 399 | if (retval) { |
| @@ -2104,7 +2104,7 @@ out: | |||
| 2104 | 2104 | ||
| 2105 | /* Read data from quotafile - avoid pagecache and such because we cannot afford | 2105 | /* Read data from quotafile - avoid pagecache and such because we cannot afford |
| 2106 | * acquiring the locks... As quota files are never truncated and quota code | 2106 | * acquiring the locks... As quota files are never truncated and quota code |
| 2107 | * itself serializes the operations (and noone else should touch the files) | 2107 | * itself serializes the operations (and no one else should touch the files) |
| 2108 | * we don't have to be afraid of races */ | 2108 | * we don't have to be afraid of races */ |
| 2109 | static ssize_t reiserfs_quota_read(struct super_block *sb, int type, char *data, | 2109 | static ssize_t reiserfs_quota_read(struct super_block *sb, int type, char *data, |
| 2110 | size_t len, loff_t off) | 2110 | size_t len, loff_t off) |
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index 5c11ca82b782..47d2a4498b03 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c | |||
| @@ -396,7 +396,7 @@ static struct page *reiserfs_get_page(struct inode *dir, size_t n) | |||
| 396 | struct address_space *mapping = dir->i_mapping; | 396 | struct address_space *mapping = dir->i_mapping; |
| 397 | struct page *page; | 397 | struct page *page; |
| 398 | /* We can deadlock if we try to free dentries, | 398 | /* We can deadlock if we try to free dentries, |
| 399 | and an unlink/rmdir has just occured - GFP_NOFS avoids this */ | 399 | and an unlink/rmdir has just occurred - GFP_NOFS avoids this */ |
| 400 | mapping_set_gfp_mask(mapping, GFP_NOFS); | 400 | mapping_set_gfp_mask(mapping, GFP_NOFS); |
| 401 | page = read_mapping_page(mapping, n >> PAGE_CACHE_SHIFT, NULL); | 401 | page = read_mapping_page(mapping, n >> PAGE_CACHE_SHIFT, NULL); |
| 402 | if (!IS_ERR(page)) { | 402 | if (!IS_ERR(page)) { |
diff --git a/fs/squashfs/cache.c b/fs/squashfs/cache.c index 26b15ae34d6f..c37b520132ff 100644 --- a/fs/squashfs/cache.c +++ b/fs/squashfs/cache.c | |||
| @@ -104,7 +104,7 @@ struct squashfs_cache_entry *squashfs_cache_get(struct super_block *sb, | |||
| 104 | entry = &cache->entry[i]; | 104 | entry = &cache->entry[i]; |
| 105 | 105 | ||
| 106 | /* | 106 | /* |
| 107 | * Initialise choosen cache entry, and fill it in from | 107 | * Initialise chosen cache entry, and fill it in from |
| 108 | * disk. | 108 | * disk. |
| 109 | */ | 109 | */ |
| 110 | cache->unused--; | 110 | cache->unused--; |
| @@ -286,7 +286,7 @@ cleanup: | |||
| 286 | 286 | ||
| 287 | 287 | ||
| 288 | /* | 288 | /* |
| 289 | * Copy upto length bytes from cache entry to buffer starting at offset bytes | 289 | * Copy up to length bytes from cache entry to buffer starting at offset bytes |
| 290 | * into the cache entry. If there's not length bytes then copy the number of | 290 | * into the cache entry. If there's not length bytes then copy the number of |
| 291 | * bytes available. In all cases return the number of bytes copied. | 291 | * bytes available. In all cases return the number of bytes copied. |
| 292 | */ | 292 | */ |
diff --git a/fs/ubifs/Kconfig b/fs/ubifs/Kconfig index d7440904be17..f8b0160da2da 100644 --- a/fs/ubifs/Kconfig +++ b/fs/ubifs/Kconfig | |||
| @@ -47,7 +47,7 @@ config UBIFS_FS_DEBUG | |||
| 47 | bool "Enable debugging support" | 47 | bool "Enable debugging support" |
| 48 | depends on UBIFS_FS | 48 | depends on UBIFS_FS |
| 49 | select DEBUG_FS | 49 | select DEBUG_FS |
| 50 | select KALLSYMS_ALL | 50 | select KALLSYMS |
| 51 | help | 51 | help |
| 52 | This option enables UBIFS debugging support. It makes sure various | 52 | This option enables UBIFS debugging support. It makes sure various |
| 53 | assertions, self-checks, debugging messages and test modes are compiled | 53 | assertions, self-checks, debugging messages and test modes are compiled |
diff --git a/fs/ubifs/budget.c b/fs/ubifs/budget.c index c8ff0d1ae5d3..8b3a7da531eb 100644 --- a/fs/ubifs/budget.c +++ b/fs/ubifs/budget.c | |||
| @@ -147,7 +147,7 @@ static int make_free_space(struct ubifs_info *c) | |||
| 147 | if (liab2 < liab1) | 147 | if (liab2 < liab1) |
| 148 | return -EAGAIN; | 148 | return -EAGAIN; |
| 149 | 149 | ||
| 150 | dbg_budg("new liability %lld (not shrinked)", liab2); | 150 | dbg_budg("new liability %lld (not shrunk)", liab2); |
| 151 | 151 | ||
| 152 | /* Liability did not shrink again, try GC */ | 152 | /* Liability did not shrink again, try GC */ |
| 153 | dbg_budg("Run GC"); | 153 | dbg_budg("Run GC"); |
diff --git a/fs/ubifs/commit.c b/fs/ubifs/commit.c index b148fbc80f8d..1bd01ded7123 100644 --- a/fs/ubifs/commit.c +++ b/fs/ubifs/commit.c | |||
| @@ -577,7 +577,7 @@ int dbg_check_old_index(struct ubifs_info *c, struct ubifs_zbranch *zroot) | |||
| 577 | size_t sz; | 577 | size_t sz; |
| 578 | 578 | ||
| 579 | if (!(ubifs_chk_flags & UBIFS_CHK_OLD_IDX)) | 579 | if (!(ubifs_chk_flags & UBIFS_CHK_OLD_IDX)) |
| 580 | goto out; | 580 | return 0; |
| 581 | 581 | ||
| 582 | INIT_LIST_HEAD(&list); | 582 | INIT_LIST_HEAD(&list); |
| 583 | 583 | ||
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index f25a7339f800..004d3745dc45 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c | |||
| @@ -972,11 +972,39 @@ void dbg_dump_index(struct ubifs_info *c) | |||
| 972 | void dbg_save_space_info(struct ubifs_info *c) | 972 | void dbg_save_space_info(struct ubifs_info *c) |
| 973 | { | 973 | { |
| 974 | struct ubifs_debug_info *d = c->dbg; | 974 | struct ubifs_debug_info *d = c->dbg; |
| 975 | 975 | int freeable_cnt; | |
| 976 | ubifs_get_lp_stats(c, &d->saved_lst); | ||
| 977 | 976 | ||
| 978 | spin_lock(&c->space_lock); | 977 | spin_lock(&c->space_lock); |
| 978 | memcpy(&d->saved_lst, &c->lst, sizeof(struct ubifs_lp_stats)); | ||
| 979 | |||
| 980 | /* | ||
| 981 | * We use a dirty hack here and zero out @c->freeable_cnt, because it | ||
| 982 | * affects the free space calculations, and UBIFS might not know about | ||
| 983 | * all freeable eraseblocks. Indeed, we know about freeable eraseblocks | ||
| 984 | * only when we read their lprops, and we do this only lazily, upon the | ||
| 985 | * need. So at any given point of time @c->freeable_cnt might be not | ||
| 986 | * exactly accurate. | ||
| 987 | * | ||
| 988 | * Just one example about the issue we hit when we did not zero | ||
| 989 | * @c->freeable_cnt. | ||
| 990 | * 1. The file-system is mounted R/O, c->freeable_cnt is %0. We save the | ||
| 991 | * amount of free space in @d->saved_free | ||
| 992 | * 2. We re-mount R/W, which makes UBIFS to read the "lsave" | ||
| 993 | * information from flash, where we cache LEBs from various | ||
| 994 | * categories ('ubifs_remount_fs()' -> 'ubifs_lpt_init()' | ||
| 995 | * -> 'lpt_init_wr()' -> 'read_lsave()' -> 'ubifs_lpt_lookup()' | ||
| 996 | * -> 'ubifs_get_pnode()' -> 'update_cats()' | ||
| 997 | * -> 'ubifs_add_to_cat()'). | ||
| 998 | * 3. Lsave contains a freeable eraseblock, and @c->freeable_cnt | ||
| 999 | * becomes %1. | ||
| 1000 | * 4. We calculate the amount of free space when the re-mount is | ||
| 1001 | * finished in 'dbg_check_space_info()' and it does not match | ||
| 1002 | * @d->saved_free. | ||
| 1003 | */ | ||
| 1004 | freeable_cnt = c->freeable_cnt; | ||
| 1005 | c->freeable_cnt = 0; | ||
| 979 | d->saved_free = ubifs_get_free_space_nolock(c); | 1006 | d->saved_free = ubifs_get_free_space_nolock(c); |
| 1007 | c->freeable_cnt = freeable_cnt; | ||
| 980 | spin_unlock(&c->space_lock); | 1008 | spin_unlock(&c->space_lock); |
| 981 | } | 1009 | } |
| 982 | 1010 | ||
| @@ -993,12 +1021,15 @@ int dbg_check_space_info(struct ubifs_info *c) | |||
| 993 | { | 1021 | { |
| 994 | struct ubifs_debug_info *d = c->dbg; | 1022 | struct ubifs_debug_info *d = c->dbg; |
| 995 | struct ubifs_lp_stats lst; | 1023 | struct ubifs_lp_stats lst; |
| 996 | long long avail, free; | 1024 | long long free; |
| 1025 | int freeable_cnt; | ||
| 997 | 1026 | ||
| 998 | spin_lock(&c->space_lock); | 1027 | spin_lock(&c->space_lock); |
| 999 | avail = ubifs_calc_available(c, c->min_idx_lebs); | 1028 | freeable_cnt = c->freeable_cnt; |
| 1029 | c->freeable_cnt = 0; | ||
| 1030 | free = ubifs_get_free_space_nolock(c); | ||
| 1031 | c->freeable_cnt = freeable_cnt; | ||
| 1000 | spin_unlock(&c->space_lock); | 1032 | spin_unlock(&c->space_lock); |
| 1001 | free = ubifs_get_free_space(c); | ||
| 1002 | 1033 | ||
| 1003 | if (free != d->saved_free) { | 1034 | if (free != d->saved_free) { |
| 1004 | ubifs_err("free space changed from %lld to %lld", | 1035 | ubifs_err("free space changed from %lld to %lld", |
| @@ -2806,40 +2837,38 @@ int dbg_debugfs_init_fs(struct ubifs_info *c) | |||
| 2806 | struct ubifs_debug_info *d = c->dbg; | 2837 | struct ubifs_debug_info *d = c->dbg; |
| 2807 | 2838 | ||
| 2808 | sprintf(d->dfs_dir_name, "ubi%d_%d", c->vi.ubi_num, c->vi.vol_id); | 2839 | sprintf(d->dfs_dir_name, "ubi%d_%d", c->vi.ubi_num, c->vi.vol_id); |
| 2809 | d->dfs_dir = debugfs_create_dir(d->dfs_dir_name, dfs_rootdir); | 2840 | fname = d->dfs_dir_name; |
| 2810 | if (IS_ERR(d->dfs_dir)) { | 2841 | dent = debugfs_create_dir(fname, dfs_rootdir); |
| 2811 | err = PTR_ERR(d->dfs_dir); | 2842 | if (IS_ERR_OR_NULL(dent)) |
| 2812 | ubifs_err("cannot create \"%s\" debugfs directory, error %d\n", | ||
| 2813 | d->dfs_dir_name, err); | ||
| 2814 | goto out; | 2843 | goto out; |
| 2815 | } | 2844 | d->dfs_dir = dent; |
| 2816 | 2845 | ||
| 2817 | fname = "dump_lprops"; | 2846 | fname = "dump_lprops"; |
| 2818 | dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops); | 2847 | dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops); |
| 2819 | if (IS_ERR(dent)) | 2848 | if (IS_ERR_OR_NULL(dent)) |
| 2820 | goto out_remove; | 2849 | goto out_remove; |
| 2821 | d->dfs_dump_lprops = dent; | 2850 | d->dfs_dump_lprops = dent; |
| 2822 | 2851 | ||
| 2823 | fname = "dump_budg"; | 2852 | fname = "dump_budg"; |
| 2824 | dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops); | 2853 | dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops); |
| 2825 | if (IS_ERR(dent)) | 2854 | if (IS_ERR_OR_NULL(dent)) |
| 2826 | goto out_remove; | 2855 | goto out_remove; |
| 2827 | d->dfs_dump_budg = dent; | 2856 | d->dfs_dump_budg = dent; |
| 2828 | 2857 | ||
| 2829 | fname = "dump_tnc"; | 2858 | fname = "dump_tnc"; |
| 2830 | dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops); | 2859 | dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops); |
| 2831 | if (IS_ERR(dent)) | 2860 | if (IS_ERR_OR_NULL(dent)) |
| 2832 | goto out_remove; | 2861 | goto out_remove; |
| 2833 | d->dfs_dump_tnc = dent; | 2862 | d->dfs_dump_tnc = dent; |
| 2834 | 2863 | ||
| 2835 | return 0; | 2864 | return 0; |
| 2836 | 2865 | ||
| 2837 | out_remove: | 2866 | out_remove: |
| 2838 | err = PTR_ERR(dent); | ||
| 2839 | ubifs_err("cannot create \"%s\" debugfs directory, error %d\n", | ||
| 2840 | fname, err); | ||
| 2841 | debugfs_remove_recursive(d->dfs_dir); | 2867 | debugfs_remove_recursive(d->dfs_dir); |
| 2842 | out: | 2868 | out: |
| 2869 | err = dent ? PTR_ERR(dent) : -ENODEV; | ||
| 2870 | ubifs_err("cannot create \"%s\" debugfs directory, error %d\n", | ||
| 2871 | fname, err); | ||
| 2843 | return err; | 2872 | return err; |
| 2844 | } | 2873 | } |
| 2845 | 2874 | ||
diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h index 919f0de29d8f..e6493cac193d 100644 --- a/fs/ubifs/debug.h +++ b/fs/ubifs/debug.h | |||
| @@ -23,6 +23,12 @@ | |||
| 23 | #ifndef __UBIFS_DEBUG_H__ | 23 | #ifndef __UBIFS_DEBUG_H__ |
| 24 | #define __UBIFS_DEBUG_H__ | 24 | #define __UBIFS_DEBUG_H__ |
| 25 | 25 | ||
| 26 | /* Checking helper functions */ | ||
| 27 | typedef int (*dbg_leaf_callback)(struct ubifs_info *c, | ||
| 28 | struct ubifs_zbranch *zbr, void *priv); | ||
| 29 | typedef int (*dbg_znode_callback)(struct ubifs_info *c, | ||
| 30 | struct ubifs_znode *znode, void *priv); | ||
| 31 | |||
| 26 | #ifdef CONFIG_UBIFS_FS_DEBUG | 32 | #ifdef CONFIG_UBIFS_FS_DEBUG |
| 27 | 33 | ||
| 28 | /** | 34 | /** |
| @@ -270,11 +276,6 @@ void dbg_dump_tnc(struct ubifs_info *c); | |||
| 270 | void dbg_dump_index(struct ubifs_info *c); | 276 | void dbg_dump_index(struct ubifs_info *c); |
| 271 | void dbg_dump_lpt_lebs(const struct ubifs_info *c); | 277 | void dbg_dump_lpt_lebs(const struct ubifs_info *c); |
| 272 | 278 | ||
| 273 | /* Checking helper functions */ | ||
| 274 | typedef int (*dbg_leaf_callback)(struct ubifs_info *c, | ||
| 275 | struct ubifs_zbranch *zbr, void *priv); | ||
| 276 | typedef int (*dbg_znode_callback)(struct ubifs_info *c, | ||
| 277 | struct ubifs_znode *znode, void *priv); | ||
| 278 | int dbg_walk_index(struct ubifs_info *c, dbg_leaf_callback leaf_cb, | 279 | int dbg_walk_index(struct ubifs_info *c, dbg_leaf_callback leaf_cb, |
| 279 | dbg_znode_callback znode_cb, void *priv); | 280 | dbg_znode_callback znode_cb, void *priv); |
| 280 | 281 | ||
| @@ -295,7 +296,6 @@ int dbg_check_idx_size(struct ubifs_info *c, long long idx_size); | |||
| 295 | int dbg_check_filesystem(struct ubifs_info *c); | 296 | int dbg_check_filesystem(struct ubifs_info *c); |
| 296 | void dbg_check_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat, | 297 | void dbg_check_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat, |
| 297 | int add_pos); | 298 | int add_pos); |
| 298 | int dbg_check_lprops(struct ubifs_info *c); | ||
| 299 | int dbg_check_lpt_nodes(struct ubifs_info *c, struct ubifs_cnode *cnode, | 299 | int dbg_check_lpt_nodes(struct ubifs_info *c, struct ubifs_cnode *cnode, |
| 300 | int row, int col); | 300 | int row, int col); |
| 301 | int dbg_check_inode_size(struct ubifs_info *c, const struct inode *inode, | 301 | int dbg_check_inode_size(struct ubifs_info *c, const struct inode *inode, |
| @@ -401,58 +401,94 @@ void dbg_debugfs_exit_fs(struct ubifs_info *c); | |||
| 401 | #define DBGKEY(key) ((char *)(key)) | 401 | #define DBGKEY(key) ((char *)(key)) |
| 402 | #define DBGKEY1(key) ((char *)(key)) | 402 | #define DBGKEY1(key) ((char *)(key)) |
| 403 | 403 | ||
| 404 | #define ubifs_debugging_init(c) 0 | 404 | static inline int ubifs_debugging_init(struct ubifs_info *c) { return 0; } |
| 405 | #define ubifs_debugging_exit(c) ({}) | 405 | static inline void ubifs_debugging_exit(struct ubifs_info *c) { return; } |
| 406 | 406 | static inline const char *dbg_ntype(int type) { return ""; } | |
| 407 | #define dbg_ntype(type) "" | 407 | static inline const char *dbg_cstate(int cmt_state) { return ""; } |
| 408 | #define dbg_cstate(cmt_state) "" | 408 | static inline const char *dbg_jhead(int jhead) { return ""; } |
| 409 | #define dbg_jhead(jhead) "" | 409 | static inline const char * |
| 410 | #define dbg_get_key_dump(c, key) ({}) | 410 | dbg_get_key_dump(const struct ubifs_info *c, |
| 411 | #define dbg_dump_inode(c, inode) ({}) | 411 | const union ubifs_key *key) { return ""; } |
| 412 | #define dbg_dump_node(c, node) ({}) | 412 | static inline void dbg_dump_inode(const struct ubifs_info *c, |
| 413 | #define dbg_dump_lpt_node(c, node, lnum, offs) ({}) | 413 | const struct inode *inode) { return; } |
| 414 | #define dbg_dump_budget_req(req) ({}) | 414 | static inline void dbg_dump_node(const struct ubifs_info *c, |
| 415 | #define dbg_dump_lstats(lst) ({}) | 415 | const void *node) { return; } |
| 416 | #define dbg_dump_budg(c) ({}) | 416 | static inline void dbg_dump_lpt_node(const struct ubifs_info *c, |
| 417 | #define dbg_dump_lprop(c, lp) ({}) | 417 | void *node, int lnum, |
| 418 | #define dbg_dump_lprops(c) ({}) | 418 | int offs) { return; } |
| 419 | #define dbg_dump_lpt_info(c) ({}) | 419 | static inline void |
| 420 | #define dbg_dump_leb(c, lnum) ({}) | 420 | dbg_dump_budget_req(const struct ubifs_budget_req *req) { return; } |
| 421 | #define dbg_dump_znode(c, znode) ({}) | 421 | static inline void |
| 422 | #define dbg_dump_heap(c, heap, cat) ({}) | 422 | dbg_dump_lstats(const struct ubifs_lp_stats *lst) { return; } |
| 423 | #define dbg_dump_pnode(c, pnode, parent, iip) ({}) | 423 | static inline void dbg_dump_budg(struct ubifs_info *c) { return; } |
| 424 | #define dbg_dump_tnc(c) ({}) | 424 | static inline void dbg_dump_lprop(const struct ubifs_info *c, |
| 425 | #define dbg_dump_index(c) ({}) | 425 | const struct ubifs_lprops *lp) { return; } |
| 426 | #define dbg_dump_lpt_lebs(c) ({}) | 426 | static inline void dbg_dump_lprops(struct ubifs_info *c) { return; } |
| 427 | 427 | static inline void dbg_dump_lpt_info(struct ubifs_info *c) { return; } | |
| 428 | #define dbg_walk_index(c, leaf_cb, znode_cb, priv) 0 | 428 | static inline void dbg_dump_leb(const struct ubifs_info *c, |
| 429 | #define dbg_old_index_check_init(c, zroot) 0 | 429 | int lnum) { return; } |
| 430 | #define dbg_save_space_info(c) ({}) | 430 | static inline void |
| 431 | #define dbg_check_space_info(c) 0 | 431 | dbg_dump_znode(const struct ubifs_info *c, |
| 432 | #define dbg_check_old_index(c, zroot) 0 | 432 | const struct ubifs_znode *znode) { return; } |
| 433 | #define dbg_check_cats(c) 0 | 433 | static inline void dbg_dump_heap(struct ubifs_info *c, |
| 434 | #define dbg_check_ltab(c) 0 | 434 | struct ubifs_lpt_heap *heap, |
| 435 | #define dbg_chk_lpt_free_spc(c) 0 | 435 | int cat) { return; } |
| 436 | #define dbg_chk_lpt_sz(c, action, len) 0 | 436 | static inline void dbg_dump_pnode(struct ubifs_info *c, |
| 437 | #define dbg_check_synced_i_size(inode) 0 | 437 | struct ubifs_pnode *pnode, |
| 438 | #define dbg_check_dir_size(c, dir) 0 | 438 | struct ubifs_nnode *parent, |
| 439 | #define dbg_check_tnc(c, x) 0 | 439 | int iip) { return; } |
| 440 | #define dbg_check_idx_size(c, idx_size) 0 | 440 | static inline void dbg_dump_tnc(struct ubifs_info *c) { return; } |
| 441 | #define dbg_check_filesystem(c) 0 | 441 | static inline void dbg_dump_index(struct ubifs_info *c) { return; } |
| 442 | #define dbg_check_heap(c, heap, cat, add_pos) ({}) | 442 | static inline void dbg_dump_lpt_lebs(const struct ubifs_info *c) { return; } |
| 443 | #define dbg_check_lprops(c) 0 | 443 | |
| 444 | #define dbg_check_lpt_nodes(c, cnode, row, col) 0 | 444 | static inline int dbg_walk_index(struct ubifs_info *c, |
| 445 | #define dbg_check_inode_size(c, inode, size) 0 | 445 | dbg_leaf_callback leaf_cb, |
| 446 | #define dbg_check_data_nodes_order(c, head) 0 | 446 | dbg_znode_callback znode_cb, |
| 447 | #define dbg_check_nondata_nodes_order(c, head) 0 | 447 | void *priv) { return 0; } |
| 448 | #define dbg_force_in_the_gaps_enabled 0 | 448 | static inline void dbg_save_space_info(struct ubifs_info *c) { return; } |
| 449 | #define dbg_force_in_the_gaps() 0 | 449 | static inline int dbg_check_space_info(struct ubifs_info *c) { return 0; } |
| 450 | #define dbg_failure_mode 0 | 450 | static inline int dbg_check_lprops(struct ubifs_info *c) { return 0; } |
| 451 | 451 | static inline int | |
| 452 | #define dbg_debugfs_init() 0 | 452 | dbg_old_index_check_init(struct ubifs_info *c, |
| 453 | #define dbg_debugfs_exit() | 453 | struct ubifs_zbranch *zroot) { return 0; } |
| 454 | #define dbg_debugfs_init_fs(c) 0 | 454 | static inline int |
| 455 | #define dbg_debugfs_exit_fs(c) 0 | 455 | dbg_check_old_index(struct ubifs_info *c, |
| 456 | struct ubifs_zbranch *zroot) { return 0; } | ||
| 457 | static inline int dbg_check_cats(struct ubifs_info *c) { return 0; } | ||
| 458 | static inline int dbg_check_ltab(struct ubifs_info *c) { return 0; } | ||
| 459 | static inline int dbg_chk_lpt_free_spc(struct ubifs_info *c) { return 0; } | ||
| 460 | static inline int dbg_chk_lpt_sz(struct ubifs_info *c, | ||
| 461 | int action, int len) { return 0; } | ||
| 462 | static inline int dbg_check_synced_i_size(struct inode *inode) { return 0; } | ||
| 463 | static inline int dbg_check_dir_size(struct ubifs_info *c, | ||
| 464 | const struct inode *dir) { return 0; } | ||
| 465 | static inline int dbg_check_tnc(struct ubifs_info *c, int extra) { return 0; } | ||
| 466 | static inline int dbg_check_idx_size(struct ubifs_info *c, | ||
| 467 | long long idx_size) { return 0; } | ||
| 468 | static inline int dbg_check_filesystem(struct ubifs_info *c) { return 0; } | ||
| 469 | static inline void dbg_check_heap(struct ubifs_info *c, | ||
| 470 | struct ubifs_lpt_heap *heap, | ||
| 471 | int cat, int add_pos) { return; } | ||
| 472 | static inline int dbg_check_lpt_nodes(struct ubifs_info *c, | ||
| 473 | struct ubifs_cnode *cnode, int row, int col) { return 0; } | ||
| 474 | static inline int dbg_check_inode_size(struct ubifs_info *c, | ||
| 475 | const struct inode *inode, | ||
| 476 | loff_t size) { return 0; } | ||
| 477 | static inline int | ||
| 478 | dbg_check_data_nodes_order(struct ubifs_info *c, | ||
| 479 | struct list_head *head) { return 0; } | ||
| 480 | static inline int | ||
| 481 | dbg_check_nondata_nodes_order(struct ubifs_info *c, | ||
| 482 | struct list_head *head) { return 0; } | ||
| 483 | |||
| 484 | static inline int dbg_force_in_the_gaps(void) { return 0; } | ||
| 485 | #define dbg_force_in_the_gaps_enabled 0 | ||
| 486 | #define dbg_failure_mode 0 | ||
| 487 | |||
| 488 | static inline int dbg_debugfs_init(void) { return 0; } | ||
| 489 | static inline void dbg_debugfs_exit(void) { return; } | ||
| 490 | static inline int dbg_debugfs_init_fs(struct ubifs_info *c) { return 0; } | ||
| 491 | static inline int dbg_debugfs_exit_fs(struct ubifs_info *c) { return 0; } | ||
| 456 | 492 | ||
| 457 | #endif /* !CONFIG_UBIFS_FS_DEBUG */ | 493 | #endif /* !CONFIG_UBIFS_FS_DEBUG */ |
| 458 | #endif /* !__UBIFS_DEBUG_H__ */ | 494 | #endif /* !__UBIFS_DEBUG_H__ */ |
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index 28be1e6a65e8..b286db79c686 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c | |||
| @@ -1312,6 +1312,9 @@ int ubifs_fsync(struct file *file, int datasync) | |||
| 1312 | 1312 | ||
| 1313 | dbg_gen("syncing inode %lu", inode->i_ino); | 1313 | dbg_gen("syncing inode %lu", inode->i_ino); |
| 1314 | 1314 | ||
| 1315 | if (inode->i_sb->s_flags & MS_RDONLY) | ||
| 1316 | return 0; | ||
| 1317 | |||
| 1315 | /* | 1318 | /* |
| 1316 | * VFS has already synchronized dirty pages for this inode. Synchronize | 1319 | * VFS has already synchronized dirty pages for this inode. Synchronize |
| 1317 | * the inode unless this is a 'datasync()' call. | 1320 | * the inode unless this is a 'datasync()' call. |
diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c index 72775d35b99e..ef5155e109a2 100644 --- a/fs/ubifs/lpt.c +++ b/fs/ubifs/lpt.c | |||
| @@ -1270,10 +1270,9 @@ static int read_pnode(struct ubifs_info *c, struct ubifs_nnode *parent, int iip) | |||
| 1270 | lnum = branch->lnum; | 1270 | lnum = branch->lnum; |
| 1271 | offs = branch->offs; | 1271 | offs = branch->offs; |
| 1272 | pnode = kzalloc(sizeof(struct ubifs_pnode), GFP_NOFS); | 1272 | pnode = kzalloc(sizeof(struct ubifs_pnode), GFP_NOFS); |
| 1273 | if (!pnode) { | 1273 | if (!pnode) |
| 1274 | err = -ENOMEM; | 1274 | return -ENOMEM; |
| 1275 | goto out; | 1275 | |
| 1276 | } | ||
| 1277 | if (lnum == 0) { | 1276 | if (lnum == 0) { |
| 1278 | /* | 1277 | /* |
| 1279 | * This pnode was not written which just means that the LEB | 1278 | * This pnode was not written which just means that the LEB |
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 6ddd9973e681..c75f6133206c 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c | |||
| @@ -1568,6 +1568,7 @@ static int ubifs_remount_rw(struct ubifs_info *c) | |||
| 1568 | mutex_lock(&c->umount_mutex); | 1568 | mutex_lock(&c->umount_mutex); |
| 1569 | dbg_save_space_info(c); | 1569 | dbg_save_space_info(c); |
| 1570 | c->remounting_rw = 1; | 1570 | c->remounting_rw = 1; |
| 1571 | c->ro_mount = 0; | ||
| 1571 | 1572 | ||
| 1572 | err = check_free_space(c); | 1573 | err = check_free_space(c); |
| 1573 | if (err) | 1574 | if (err) |
| @@ -1676,13 +1677,13 @@ static int ubifs_remount_rw(struct ubifs_info *c) | |||
| 1676 | } | 1677 | } |
| 1677 | 1678 | ||
| 1678 | dbg_gen("re-mounted read-write"); | 1679 | dbg_gen("re-mounted read-write"); |
| 1679 | c->ro_mount = 0; | ||
| 1680 | c->remounting_rw = 0; | 1680 | c->remounting_rw = 0; |
| 1681 | err = dbg_check_space_info(c); | 1681 | err = dbg_check_space_info(c); |
| 1682 | mutex_unlock(&c->umount_mutex); | 1682 | mutex_unlock(&c->umount_mutex); |
| 1683 | return err; | 1683 | return err; |
| 1684 | 1684 | ||
| 1685 | out: | 1685 | out: |
| 1686 | c->ro_mount = 1; | ||
| 1686 | vfree(c->orph_buf); | 1687 | vfree(c->orph_buf); |
| 1687 | c->orph_buf = NULL; | 1688 | c->orph_buf = NULL; |
| 1688 | if (c->bgt) { | 1689 | if (c->bgt) { |
diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c index c74400f88fe0..3299f469e712 100644 --- a/fs/ubifs/xattr.c +++ b/fs/ubifs/xattr.c | |||
| @@ -56,6 +56,7 @@ | |||
| 56 | */ | 56 | */ |
| 57 | 57 | ||
| 58 | #include "ubifs.h" | 58 | #include "ubifs.h" |
| 59 | #include <linux/fs.h> | ||
| 59 | #include <linux/slab.h> | 60 | #include <linux/slab.h> |
| 60 | #include <linux/xattr.h> | 61 | #include <linux/xattr.h> |
| 61 | #include <linux/posix_acl_xattr.h> | 62 | #include <linux/posix_acl_xattr.h> |
| @@ -80,7 +81,6 @@ enum { | |||
| 80 | }; | 81 | }; |
| 81 | 82 | ||
| 82 | static const struct inode_operations none_inode_operations; | 83 | static const struct inode_operations none_inode_operations; |
| 83 | static const struct address_space_operations none_address_operations; | ||
| 84 | static const struct file_operations none_file_operations; | 84 | static const struct file_operations none_file_operations; |
| 85 | 85 | ||
| 86 | /** | 86 | /** |
| @@ -130,7 +130,7 @@ static int create_xattr(struct ubifs_info *c, struct inode *host, | |||
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | /* Re-define all operations to be "nothing" */ | 132 | /* Re-define all operations to be "nothing" */ |
| 133 | inode->i_mapping->a_ops = &none_address_operations; | 133 | inode->i_mapping->a_ops = &empty_aops; |
| 134 | inode->i_op = &none_inode_operations; | 134 | inode->i_op = &none_inode_operations; |
| 135 | inode->i_fop = &none_file_operations; | 135 | inode->i_fop = &none_file_operations; |
| 136 | 136 | ||
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c index 27a4babe7df0..e765743cf9f3 100644 --- a/fs/ufs/inode.c +++ b/fs/ufs/inode.c | |||
| @@ -78,7 +78,7 @@ static int ufs_block_to_path(struct inode *inode, sector_t i_block, sector_t off | |||
| 78 | 78 | ||
| 79 | /* | 79 | /* |
| 80 | * Returns the location of the fragment from | 80 | * Returns the location of the fragment from |
| 81 | * the begining of the filesystem. | 81 | * the beginning of the filesystem. |
| 82 | */ | 82 | */ |
| 83 | 83 | ||
| 84 | static u64 ufs_frag_map(struct inode *inode, sector_t frag, bool needs_lock) | 84 | static u64 ufs_frag_map(struct inode *inode, sector_t frag, bool needs_lock) |
diff --git a/fs/ufs/super.c b/fs/ufs/super.c index 7693d6293404..3915ade6f9a8 100644 --- a/fs/ufs/super.c +++ b/fs/ufs/super.c | |||
| @@ -483,9 +483,9 @@ static int ufs_parse_options (char * options, unsigned * mount_options) | |||
| 483 | } | 483 | } |
| 484 | 484 | ||
| 485 | /* | 485 | /* |
| 486 | * Diffrent types of UFS hold fs_cstotal in different | 486 | * Different types of UFS hold fs_cstotal in different |
| 487 | * places, and use diffrent data structure for it. | 487 | * places, and use different data structure for it. |
| 488 | * To make things simplier we just copy fs_cstotal to ufs_sb_private_info | 488 | * To make things simpler we just copy fs_cstotal to ufs_sb_private_info |
| 489 | */ | 489 | */ |
| 490 | static void ufs_setup_cstotal(struct super_block *sb) | 490 | static void ufs_setup_cstotal(struct super_block *sb) |
| 491 | { | 491 | { |
diff --git a/fs/ufs/truncate.c b/fs/ufs/truncate.c index 11014302c9ca..5f821dbc0579 100644 --- a/fs/ufs/truncate.c +++ b/fs/ufs/truncate.c | |||
| @@ -479,7 +479,6 @@ int ufs_truncate(struct inode *inode, loff_t old_i_size) | |||
| 479 | break; | 479 | break; |
| 480 | if (IS_SYNC(inode) && (inode->i_state & I_DIRTY)) | 480 | if (IS_SYNC(inode) && (inode->i_state & I_DIRTY)) |
| 481 | ufs_sync_inode (inode); | 481 | ufs_sync_inode (inode); |
| 482 | blk_flush_plug(current); | ||
| 483 | yield(); | 482 | yield(); |
| 484 | } | 483 | } |
| 485 | 484 | ||
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 52dbd14260ba..79ce38be15a1 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
| @@ -1295,7 +1295,7 @@ xfs_get_blocks_direct( | |||
| 1295 | * If the private argument is non-NULL __xfs_get_blocks signals us that we | 1295 | * If the private argument is non-NULL __xfs_get_blocks signals us that we |
| 1296 | * need to issue a transaction to convert the range from unwritten to written | 1296 | * need to issue a transaction to convert the range from unwritten to written |
| 1297 | * extents. In case this is regular synchronous I/O we just call xfs_end_io | 1297 | * extents. In case this is regular synchronous I/O we just call xfs_end_io |
| 1298 | * to do this and we are done. But in case this was a successfull AIO | 1298 | * to do this and we are done. But in case this was a successful AIO |
| 1299 | * request this handler is called from interrupt context, from which we | 1299 | * request this handler is called from interrupt context, from which we |
| 1300 | * can't start transactions. In that case offload the I/O completion to | 1300 | * can't start transactions. In that case offload the I/O completion to |
| 1301 | * the workqueues we also use for buffered I/O completion. | 1301 | * the workqueues we also use for buffered I/O completion. |
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 596bb2c9de42..9ef9ed2cfe2e 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
| @@ -120,7 +120,7 @@ xfs_buf_lru_add( | |||
| 120 | * The unlocked check is safe here because it only occurs when there are not | 120 | * The unlocked check is safe here because it only occurs when there are not |
| 121 | * b_lru_ref counts left on the inode under the pag->pag_buf_lock. it is there | 121 | * b_lru_ref counts left on the inode under the pag->pag_buf_lock. it is there |
| 122 | * to optimise the shrinker removing the buffer from the LRU and calling | 122 | * to optimise the shrinker removing the buffer from the LRU and calling |
| 123 | * xfs_buf_free(). i.e. it removes an unneccessary round trip on the | 123 | * xfs_buf_free(). i.e. it removes an unnecessary round trip on the |
| 124 | * bt_lru_lock. | 124 | * bt_lru_lock. |
| 125 | */ | 125 | */ |
| 126 | STATIC void | 126 | STATIC void |
| @@ -293,7 +293,6 @@ xfs_buf_allocate_memory( | |||
| 293 | size_t nbytes, offset; | 293 | size_t nbytes, offset; |
| 294 | gfp_t gfp_mask = xb_to_gfp(flags); | 294 | gfp_t gfp_mask = xb_to_gfp(flags); |
| 295 | unsigned short page_count, i; | 295 | unsigned short page_count, i; |
| 296 | pgoff_t first; | ||
| 297 | xfs_off_t end; | 296 | xfs_off_t end; |
| 298 | int error; | 297 | int error; |
| 299 | 298 | ||
| @@ -333,7 +332,6 @@ use_alloc_page: | |||
| 333 | return error; | 332 | return error; |
| 334 | 333 | ||
| 335 | offset = bp->b_offset; | 334 | offset = bp->b_offset; |
| 336 | first = bp->b_file_offset >> PAGE_SHIFT; | ||
| 337 | bp->b_flags |= _XBF_PAGES; | 335 | bp->b_flags |= _XBF_PAGES; |
| 338 | 336 | ||
| 339 | for (i = 0; i < bp->b_page_count; i++) { | 337 | for (i = 0; i < bp->b_page_count; i++) { |
| @@ -380,7 +378,7 @@ out_free_pages: | |||
| 380 | } | 378 | } |
| 381 | 379 | ||
| 382 | /* | 380 | /* |
| 383 | * Map buffer into kernel address-space if nessecary. | 381 | * Map buffer into kernel address-space if necessary. |
| 384 | */ | 382 | */ |
| 385 | STATIC int | 383 | STATIC int |
| 386 | _xfs_buf_map_pages( | 384 | _xfs_buf_map_pages( |
| @@ -657,8 +655,6 @@ xfs_buf_readahead( | |||
| 657 | xfs_off_t ioff, | 655 | xfs_off_t ioff, |
| 658 | size_t isize) | 656 | size_t isize) |
| 659 | { | 657 | { |
| 660 | struct backing_dev_info *bdi; | ||
| 661 | |||
| 662 | if (bdi_read_congested(target->bt_bdi)) | 658 | if (bdi_read_congested(target->bt_bdi)) |
| 663 | return; | 659 | return; |
| 664 | 660 | ||
| @@ -919,8 +915,6 @@ xfs_buf_lock( | |||
| 919 | 915 | ||
| 920 | if (atomic_read(&bp->b_pin_count) && (bp->b_flags & XBF_STALE)) | 916 | if (atomic_read(&bp->b_pin_count) && (bp->b_flags & XBF_STALE)) |
| 921 | xfs_log_force(bp->b_target->bt_mount, 0); | 917 | xfs_log_force(bp->b_target->bt_mount, 0); |
| 922 | if (atomic_read(&bp->b_io_remaining)) | ||
| 923 | blk_flush_plug(current); | ||
| 924 | down(&bp->b_sema); | 918 | down(&bp->b_sema); |
| 925 | XB_SET_OWNER(bp); | 919 | XB_SET_OWNER(bp); |
| 926 | 920 | ||
| @@ -1309,8 +1303,6 @@ xfs_buf_iowait( | |||
| 1309 | { | 1303 | { |
| 1310 | trace_xfs_buf_iowait(bp, _RET_IP_); | 1304 | trace_xfs_buf_iowait(bp, _RET_IP_); |
| 1311 | 1305 | ||
| 1312 | if (atomic_read(&bp->b_io_remaining)) | ||
| 1313 | blk_flush_plug(current); | ||
| 1314 | wait_for_completion(&bp->b_iowait); | 1306 | wait_for_completion(&bp->b_iowait); |
| 1315 | 1307 | ||
| 1316 | trace_xfs_buf_iowait_done(bp, _RET_IP_); | 1308 | trace_xfs_buf_iowait_done(bp, _RET_IP_); |
| @@ -1747,8 +1739,8 @@ xfsbufd( | |||
| 1747 | do { | 1739 | do { |
| 1748 | long age = xfs_buf_age_centisecs * msecs_to_jiffies(10); | 1740 | long age = xfs_buf_age_centisecs * msecs_to_jiffies(10); |
| 1749 | long tout = xfs_buf_timer_centisecs * msecs_to_jiffies(10); | 1741 | long tout = xfs_buf_timer_centisecs * msecs_to_jiffies(10); |
| 1750 | int count = 0; | ||
| 1751 | struct list_head tmp; | 1742 | struct list_head tmp; |
| 1743 | struct blk_plug plug; | ||
| 1752 | 1744 | ||
| 1753 | if (unlikely(freezing(current))) { | 1745 | if (unlikely(freezing(current))) { |
| 1754 | set_bit(XBT_FORCE_SLEEP, &target->bt_flags); | 1746 | set_bit(XBT_FORCE_SLEEP, &target->bt_flags); |
| @@ -1764,16 +1756,15 @@ xfsbufd( | |||
| 1764 | 1756 | ||
| 1765 | xfs_buf_delwri_split(target, &tmp, age); | 1757 | xfs_buf_delwri_split(target, &tmp, age); |
| 1766 | list_sort(NULL, &tmp, xfs_buf_cmp); | 1758 | list_sort(NULL, &tmp, xfs_buf_cmp); |
| 1759 | |||
| 1760 | blk_start_plug(&plug); | ||
| 1767 | while (!list_empty(&tmp)) { | 1761 | while (!list_empty(&tmp)) { |
| 1768 | struct xfs_buf *bp; | 1762 | struct xfs_buf *bp; |
| 1769 | bp = list_first_entry(&tmp, struct xfs_buf, b_list); | 1763 | bp = list_first_entry(&tmp, struct xfs_buf, b_list); |
| 1770 | list_del_init(&bp->b_list); | 1764 | list_del_init(&bp->b_list); |
| 1771 | xfs_bdstrat_cb(bp); | 1765 | xfs_bdstrat_cb(bp); |
| 1772 | count++; | ||
| 1773 | } | 1766 | } |
| 1774 | if (count) | 1767 | blk_finish_plug(&plug); |
| 1775 | blk_flush_plug(current); | ||
| 1776 | |||
| 1777 | } while (!kthread_should_stop()); | 1768 | } while (!kthread_should_stop()); |
| 1778 | 1769 | ||
| 1779 | return 0; | 1770 | return 0; |
| @@ -1793,6 +1784,7 @@ xfs_flush_buftarg( | |||
| 1793 | int pincount = 0; | 1784 | int pincount = 0; |
| 1794 | LIST_HEAD(tmp_list); | 1785 | LIST_HEAD(tmp_list); |
| 1795 | LIST_HEAD(wait_list); | 1786 | LIST_HEAD(wait_list); |
| 1787 | struct blk_plug plug; | ||
| 1796 | 1788 | ||
| 1797 | xfs_buf_runall_queues(xfsconvertd_workqueue); | 1789 | xfs_buf_runall_queues(xfsconvertd_workqueue); |
| 1798 | xfs_buf_runall_queues(xfsdatad_workqueue); | 1790 | xfs_buf_runall_queues(xfsdatad_workqueue); |
| @@ -1807,6 +1799,8 @@ xfs_flush_buftarg( | |||
| 1807 | * we do that after issuing all the IO. | 1799 | * we do that after issuing all the IO. |
| 1808 | */ | 1800 | */ |
| 1809 | list_sort(NULL, &tmp_list, xfs_buf_cmp); | 1801 | list_sort(NULL, &tmp_list, xfs_buf_cmp); |
| 1802 | |||
| 1803 | blk_start_plug(&plug); | ||
| 1810 | while (!list_empty(&tmp_list)) { | 1804 | while (!list_empty(&tmp_list)) { |
| 1811 | bp = list_first_entry(&tmp_list, struct xfs_buf, b_list); | 1805 | bp = list_first_entry(&tmp_list, struct xfs_buf, b_list); |
| 1812 | ASSERT(target == bp->b_target); | 1806 | ASSERT(target == bp->b_target); |
| @@ -1817,10 +1811,10 @@ xfs_flush_buftarg( | |||
| 1817 | } | 1811 | } |
| 1818 | xfs_bdstrat_cb(bp); | 1812 | xfs_bdstrat_cb(bp); |
| 1819 | } | 1813 | } |
| 1814 | blk_finish_plug(&plug); | ||
| 1820 | 1815 | ||
| 1821 | if (wait) { | 1816 | if (wait) { |
| 1822 | /* Expedite and wait for IO to complete. */ | 1817 | /* Wait for IO to complete. */ |
| 1823 | blk_flush_plug(current); | ||
| 1824 | while (!list_empty(&wait_list)) { | 1818 | while (!list_empty(&wait_list)) { |
| 1825 | bp = list_first_entry(&wait_list, struct xfs_buf, b_list); | 1819 | bp = list_first_entry(&wait_list, struct xfs_buf, b_list); |
| 1826 | 1820 | ||
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index 52aadfbed132..f4213ba1ff85 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c | |||
| @@ -381,7 +381,7 @@ xfs_aio_write_isize_update( | |||
| 381 | 381 | ||
| 382 | /* | 382 | /* |
| 383 | * If this was a direct or synchronous I/O that failed (such as ENOSPC) then | 383 | * If this was a direct or synchronous I/O that failed (such as ENOSPC) then |
| 384 | * part of the I/O may have been written to disk before the error occured. In | 384 | * part of the I/O may have been written to disk before the error occurred. In |
| 385 | * this case the on-disk file size may have been adjusted beyond the in-memory | 385 | * this case the on-disk file size may have been adjusted beyond the in-memory |
| 386 | * file size and now needs to be truncated back. | 386 | * file size and now needs to be truncated back. |
| 387 | */ | 387 | */ |
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 9ff7fc603d2f..dd21784525a8 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c | |||
| @@ -70,7 +70,7 @@ xfs_synchronize_times( | |||
| 70 | 70 | ||
| 71 | /* | 71 | /* |
| 72 | * If the linux inode is valid, mark it dirty. | 72 | * If the linux inode is valid, mark it dirty. |
| 73 | * Used when commiting a dirty inode into a transaction so that | 73 | * Used when committing a dirty inode into a transaction so that |
| 74 | * the inode will get written back by the linux code | 74 | * the inode will get written back by the linux code |
| 75 | */ | 75 | */ |
| 76 | void | 76 | void |
diff --git a/fs/xfs/linux-2.6/xfs_message.c b/fs/xfs/linux-2.6/xfs_message.c index 508e06fd7d1e..3ca795609113 100644 --- a/fs/xfs/linux-2.6/xfs_message.c +++ b/fs/xfs/linux-2.6/xfs_message.c | |||
| @@ -28,53 +28,47 @@ | |||
| 28 | /* | 28 | /* |
| 29 | * XFS logging functions | 29 | * XFS logging functions |
| 30 | */ | 30 | */ |
| 31 | static int | 31 | static void |
| 32 | __xfs_printk( | 32 | __xfs_printk( |
| 33 | const char *level, | 33 | const char *level, |
| 34 | const struct xfs_mount *mp, | 34 | const struct xfs_mount *mp, |
| 35 | struct va_format *vaf) | 35 | struct va_format *vaf) |
| 36 | { | 36 | { |
| 37 | if (mp && mp->m_fsname) | 37 | if (mp && mp->m_fsname) |
| 38 | return printk("%sXFS (%s): %pV\n", level, mp->m_fsname, vaf); | 38 | printk("%sXFS (%s): %pV\n", level, mp->m_fsname, vaf); |
| 39 | return printk("%sXFS: %pV\n", level, vaf); | 39 | printk("%sXFS: %pV\n", level, vaf); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | int xfs_printk( | 42 | void xfs_printk( |
| 43 | const char *level, | 43 | const char *level, |
| 44 | const struct xfs_mount *mp, | 44 | const struct xfs_mount *mp, |
| 45 | const char *fmt, ...) | 45 | const char *fmt, ...) |
| 46 | { | 46 | { |
| 47 | struct va_format vaf; | 47 | struct va_format vaf; |
| 48 | va_list args; | 48 | va_list args; |
| 49 | int r; | ||
| 50 | 49 | ||
| 51 | va_start(args, fmt); | 50 | va_start(args, fmt); |
| 52 | 51 | ||
| 53 | vaf.fmt = fmt; | 52 | vaf.fmt = fmt; |
| 54 | vaf.va = &args; | 53 | vaf.va = &args; |
| 55 | 54 | ||
| 56 | r = __xfs_printk(level, mp, &vaf); | 55 | __xfs_printk(level, mp, &vaf); |
| 57 | va_end(args); | 56 | va_end(args); |
| 58 | |||
| 59 | return r; | ||
| 60 | } | 57 | } |
| 61 | 58 | ||
| 62 | #define define_xfs_printk_level(func, kern_level) \ | 59 | #define define_xfs_printk_level(func, kern_level) \ |
| 63 | int func(const struct xfs_mount *mp, const char *fmt, ...) \ | 60 | void func(const struct xfs_mount *mp, const char *fmt, ...) \ |
| 64 | { \ | 61 | { \ |
| 65 | struct va_format vaf; \ | 62 | struct va_format vaf; \ |
| 66 | va_list args; \ | 63 | va_list args; \ |
| 67 | int r; \ | ||
| 68 | \ | 64 | \ |
| 69 | va_start(args, fmt); \ | 65 | va_start(args, fmt); \ |
| 70 | \ | 66 | \ |
| 71 | vaf.fmt = fmt; \ | 67 | vaf.fmt = fmt; \ |
| 72 | vaf.va = &args; \ | 68 | vaf.va = &args; \ |
| 73 | \ | 69 | \ |
| 74 | r = __xfs_printk(kern_level, mp, &vaf); \ | 70 | __xfs_printk(kern_level, mp, &vaf); \ |
| 75 | va_end(args); \ | 71 | va_end(args); \ |
| 76 | \ | ||
| 77 | return r; \ | ||
| 78 | } \ | 72 | } \ |
| 79 | 73 | ||
| 80 | define_xfs_printk_level(xfs_emerg, KERN_EMERG); | 74 | define_xfs_printk_level(xfs_emerg, KERN_EMERG); |
| @@ -88,7 +82,7 @@ define_xfs_printk_level(xfs_info, KERN_INFO); | |||
| 88 | define_xfs_printk_level(xfs_debug, KERN_DEBUG); | 82 | define_xfs_printk_level(xfs_debug, KERN_DEBUG); |
| 89 | #endif | 83 | #endif |
| 90 | 84 | ||
| 91 | int | 85 | void |
| 92 | xfs_alert_tag( | 86 | xfs_alert_tag( |
| 93 | const struct xfs_mount *mp, | 87 | const struct xfs_mount *mp, |
| 94 | int panic_tag, | 88 | int panic_tag, |
| @@ -97,7 +91,6 @@ xfs_alert_tag( | |||
| 97 | struct va_format vaf; | 91 | struct va_format vaf; |
| 98 | va_list args; | 92 | va_list args; |
| 99 | int do_panic = 0; | 93 | int do_panic = 0; |
| 100 | int r; | ||
| 101 | 94 | ||
| 102 | if (xfs_panic_mask && (xfs_panic_mask & panic_tag)) { | 95 | if (xfs_panic_mask && (xfs_panic_mask & panic_tag)) { |
| 103 | xfs_printk(KERN_ALERT, mp, | 96 | xfs_printk(KERN_ALERT, mp, |
| @@ -110,12 +103,10 @@ xfs_alert_tag( | |||
| 110 | vaf.fmt = fmt; | 103 | vaf.fmt = fmt; |
| 111 | vaf.va = &args; | 104 | vaf.va = &args; |
| 112 | 105 | ||
| 113 | r = __xfs_printk(KERN_ALERT, mp, &vaf); | 106 | __xfs_printk(KERN_ALERT, mp, &vaf); |
| 114 | va_end(args); | 107 | va_end(args); |
| 115 | 108 | ||
| 116 | BUG_ON(do_panic); | 109 | BUG_ON(do_panic); |
| 117 | |||
| 118 | return r; | ||
| 119 | } | 110 | } |
| 120 | 111 | ||
| 121 | void | 112 | void |
diff --git a/fs/xfs/linux-2.6/xfs_message.h b/fs/xfs/linux-2.6/xfs_message.h index e77ffa16745b..f1b3fc1b6c4e 100644 --- a/fs/xfs/linux-2.6/xfs_message.h +++ b/fs/xfs/linux-2.6/xfs_message.h | |||
| @@ -3,32 +3,34 @@ | |||
| 3 | 3 | ||
| 4 | struct xfs_mount; | 4 | struct xfs_mount; |
| 5 | 5 | ||
| 6 | extern int xfs_printk(const char *level, const struct xfs_mount *mp, | 6 | extern void xfs_printk(const char *level, const struct xfs_mount *mp, |
| 7 | const char *fmt, ...) | 7 | const char *fmt, ...) |
| 8 | __attribute__ ((format (printf, 3, 4))); | 8 | __attribute__ ((format (printf, 3, 4))); |
| 9 | extern int xfs_emerg(const struct xfs_mount *mp, const char *fmt, ...) | 9 | extern void xfs_emerg(const struct xfs_mount *mp, const char *fmt, ...) |
| 10 | __attribute__ ((format (printf, 2, 3))); | 10 | __attribute__ ((format (printf, 2, 3))); |
| 11 | extern int xfs_alert(const struct xfs_mount *mp, const char *fmt, ...) | 11 | extern void xfs_alert(const struct xfs_mount *mp, const char *fmt, ...) |
| 12 | __attribute__ ((format (printf, 2, 3))); | 12 | __attribute__ ((format (printf, 2, 3))); |
| 13 | extern int xfs_alert_tag(const struct xfs_mount *mp, int tag, | 13 | extern void xfs_alert_tag(const struct xfs_mount *mp, int tag, |
| 14 | const char *fmt, ...) | 14 | const char *fmt, ...) |
| 15 | __attribute__ ((format (printf, 3, 4))); | 15 | __attribute__ ((format (printf, 3, 4))); |
| 16 | extern int xfs_crit(const struct xfs_mount *mp, const char *fmt, ...) | 16 | extern void xfs_crit(const struct xfs_mount *mp, const char *fmt, ...) |
| 17 | __attribute__ ((format (printf, 2, 3))); | 17 | __attribute__ ((format (printf, 2, 3))); |
| 18 | extern int xfs_err(const struct xfs_mount *mp, const char *fmt, ...) | 18 | extern void xfs_err(const struct xfs_mount *mp, const char *fmt, ...) |
| 19 | __attribute__ ((format (printf, 2, 3))); | 19 | __attribute__ ((format (printf, 2, 3))); |
| 20 | extern int xfs_warn(const struct xfs_mount *mp, const char *fmt, ...) | 20 | extern void xfs_warn(const struct xfs_mount *mp, const char *fmt, ...) |
| 21 | __attribute__ ((format (printf, 2, 3))); | 21 | __attribute__ ((format (printf, 2, 3))); |
| 22 | extern int xfs_notice(const struct xfs_mount *mp, const char *fmt, ...) | 22 | extern void xfs_notice(const struct xfs_mount *mp, const char *fmt, ...) |
| 23 | __attribute__ ((format (printf, 2, 3))); | 23 | __attribute__ ((format (printf, 2, 3))); |
| 24 | extern int xfs_info(const struct xfs_mount *mp, const char *fmt, ...) | 24 | extern void xfs_info(const struct xfs_mount *mp, const char *fmt, ...) |
| 25 | __attribute__ ((format (printf, 2, 3))); | 25 | __attribute__ ((format (printf, 2, 3))); |
| 26 | 26 | ||
| 27 | #ifdef DEBUG | 27 | #ifdef DEBUG |
| 28 | extern int xfs_debug(const struct xfs_mount *mp, const char *fmt, ...) | 28 | extern void xfs_debug(const struct xfs_mount *mp, const char *fmt, ...) |
| 29 | __attribute__ ((format (printf, 2, 3))); | 29 | __attribute__ ((format (printf, 2, 3))); |
| 30 | #else | 30 | #else |
| 31 | #define xfs_debug(mp, fmt, ...) (0) | 31 | static inline void xfs_debug(const struct xfs_mount *mp, const char *fmt, ...) |
| 32 | { | ||
| 33 | } | ||
| 32 | #endif | 34 | #endif |
| 33 | 35 | ||
| 34 | extern void assfail(char *expr, char *f, int l); | 36 | extern void assfail(char *expr, char *f, int l); |
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 1ba5c451da36..b38e58d02299 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
| @@ -816,75 +816,6 @@ xfs_setup_devices( | |||
| 816 | return 0; | 816 | return 0; |
| 817 | } | 817 | } |
| 818 | 818 | ||
| 819 | /* | ||
| 820 | * XFS AIL push thread support | ||
| 821 | */ | ||
| 822 | void | ||
| 823 | xfsaild_wakeup( | ||
| 824 | struct xfs_ail *ailp, | ||
| 825 | xfs_lsn_t threshold_lsn) | ||
| 826 | { | ||
| 827 | /* only ever move the target forwards */ | ||
| 828 | if (XFS_LSN_CMP(threshold_lsn, ailp->xa_target) > 0) { | ||
| 829 | ailp->xa_target = threshold_lsn; | ||
| 830 | wake_up_process(ailp->xa_task); | ||
| 831 | } | ||
| 832 | } | ||
| 833 | |||
| 834 | STATIC int | ||
| 835 | xfsaild( | ||
| 836 | void *data) | ||
| 837 | { | ||
| 838 | struct xfs_ail *ailp = data; | ||
| 839 | xfs_lsn_t last_pushed_lsn = 0; | ||
| 840 | long tout = 0; /* milliseconds */ | ||
| 841 | |||
| 842 | while (!kthread_should_stop()) { | ||
| 843 | /* | ||
| 844 | * for short sleeps indicating congestion, don't allow us to | ||
| 845 | * get woken early. Otherwise all we do is bang on the AIL lock | ||
| 846 | * without making progress. | ||
| 847 | */ | ||
| 848 | if (tout && tout <= 20) | ||
| 849 | __set_current_state(TASK_KILLABLE); | ||
| 850 | else | ||
| 851 | __set_current_state(TASK_INTERRUPTIBLE); | ||
| 852 | schedule_timeout(tout ? | ||
| 853 | msecs_to_jiffies(tout) : MAX_SCHEDULE_TIMEOUT); | ||
| 854 | |||
| 855 | /* swsusp */ | ||
| 856 | try_to_freeze(); | ||
| 857 | |||
| 858 | ASSERT(ailp->xa_mount->m_log); | ||
| 859 | if (XFS_FORCED_SHUTDOWN(ailp->xa_mount)) | ||
| 860 | continue; | ||
| 861 | |||
| 862 | tout = xfsaild_push(ailp, &last_pushed_lsn); | ||
| 863 | } | ||
| 864 | |||
| 865 | return 0; | ||
| 866 | } /* xfsaild */ | ||
| 867 | |||
| 868 | int | ||
| 869 | xfsaild_start( | ||
| 870 | struct xfs_ail *ailp) | ||
| 871 | { | ||
| 872 | ailp->xa_target = 0; | ||
| 873 | ailp->xa_task = kthread_run(xfsaild, ailp, "xfsaild/%s", | ||
| 874 | ailp->xa_mount->m_fsname); | ||
| 875 | if (IS_ERR(ailp->xa_task)) | ||
| 876 | return -PTR_ERR(ailp->xa_task); | ||
| 877 | return 0; | ||
| 878 | } | ||
| 879 | |||
| 880 | void | ||
| 881 | xfsaild_stop( | ||
| 882 | struct xfs_ail *ailp) | ||
| 883 | { | ||
| 884 | kthread_stop(ailp->xa_task); | ||
| 885 | } | ||
| 886 | |||
| 887 | |||
| 888 | /* Catch misguided souls that try to use this interface on XFS */ | 819 | /* Catch misguided souls that try to use this interface on XFS */ |
| 889 | STATIC struct inode * | 820 | STATIC struct inode * |
| 890 | xfs_fs_alloc_inode( | 821 | xfs_fs_alloc_inode( |
| @@ -1191,22 +1122,12 @@ xfs_fs_sync_fs( | |||
| 1191 | return -error; | 1122 | return -error; |
| 1192 | 1123 | ||
| 1193 | if (laptop_mode) { | 1124 | if (laptop_mode) { |
| 1194 | int prev_sync_seq = mp->m_sync_seq; | ||
| 1195 | |||
| 1196 | /* | 1125 | /* |
| 1197 | * The disk must be active because we're syncing. | 1126 | * The disk must be active because we're syncing. |
| 1198 | * We schedule xfssyncd now (now that the disk is | 1127 | * We schedule xfssyncd now (now that the disk is |
| 1199 | * active) instead of later (when it might not be). | 1128 | * active) instead of later (when it might not be). |
| 1200 | */ | 1129 | */ |
| 1201 | wake_up_process(mp->m_sync_task); | 1130 | flush_delayed_work_sync(&mp->m_sync_work); |
| 1202 | /* | ||
| 1203 | * We have to wait for the sync iteration to complete. | ||
| 1204 | * If we don't, the disk activity caused by the sync | ||
| 1205 | * will come after the sync is completed, and that | ||
| 1206 | * triggers another sync from laptop mode. | ||
| 1207 | */ | ||
| 1208 | wait_event(mp->m_wait_single_sync_task, | ||
| 1209 | mp->m_sync_seq != prev_sync_seq); | ||
| 1210 | } | 1131 | } |
| 1211 | 1132 | ||
| 1212 | return 0; | 1133 | return 0; |
| @@ -1490,9 +1411,6 @@ xfs_fs_fill_super( | |||
| 1490 | spin_lock_init(&mp->m_sb_lock); | 1411 | spin_lock_init(&mp->m_sb_lock); |
| 1491 | mutex_init(&mp->m_growlock); | 1412 | mutex_init(&mp->m_growlock); |
| 1492 | atomic_set(&mp->m_active_trans, 0); | 1413 | atomic_set(&mp->m_active_trans, 0); |
| 1493 | INIT_LIST_HEAD(&mp->m_sync_list); | ||
| 1494 | spin_lock_init(&mp->m_sync_lock); | ||
| 1495 | init_waitqueue_head(&mp->m_wait_single_sync_task); | ||
| 1496 | 1414 | ||
| 1497 | mp->m_super = sb; | 1415 | mp->m_super = sb; |
| 1498 | sb->s_fs_info = mp; | 1416 | sb->s_fs_info = mp; |
| @@ -1799,6 +1717,38 @@ xfs_destroy_zones(void) | |||
| 1799 | } | 1717 | } |
| 1800 | 1718 | ||
| 1801 | STATIC int __init | 1719 | STATIC int __init |
| 1720 | xfs_init_workqueues(void) | ||
| 1721 | { | ||
| 1722 | /* | ||
| 1723 | * max_active is set to 8 to give enough concurency to allow | ||
| 1724 | * multiple work operations on each CPU to run. This allows multiple | ||
| 1725 | * filesystems to be running sync work concurrently, and scales with | ||
| 1726 | * the number of CPUs in the system. | ||
| 1727 | */ | ||
| 1728 | xfs_syncd_wq = alloc_workqueue("xfssyncd", WQ_CPU_INTENSIVE, 8); | ||
| 1729 | if (!xfs_syncd_wq) | ||
| 1730 | goto out; | ||
| 1731 | |||
| 1732 | xfs_ail_wq = alloc_workqueue("xfsail", WQ_CPU_INTENSIVE, 8); | ||
| 1733 | if (!xfs_ail_wq) | ||
| 1734 | goto out_destroy_syncd; | ||
| 1735 | |||
| 1736 | return 0; | ||
| 1737 | |||
| 1738 | out_destroy_syncd: | ||
| 1739 | destroy_workqueue(xfs_syncd_wq); | ||
| 1740 | out: | ||
| 1741 | return -ENOMEM; | ||
| 1742 | } | ||
| 1743 | |||
| 1744 | STATIC void | ||
| 1745 | xfs_destroy_workqueues(void) | ||
| 1746 | { | ||
| 1747 | destroy_workqueue(xfs_ail_wq); | ||
| 1748 | destroy_workqueue(xfs_syncd_wq); | ||
| 1749 | } | ||
| 1750 | |||
| 1751 | STATIC int __init | ||
| 1802 | init_xfs_fs(void) | 1752 | init_xfs_fs(void) |
| 1803 | { | 1753 | { |
| 1804 | int error; | 1754 | int error; |
| @@ -1813,10 +1763,14 @@ init_xfs_fs(void) | |||
| 1813 | if (error) | 1763 | if (error) |
| 1814 | goto out; | 1764 | goto out; |
| 1815 | 1765 | ||
| 1816 | error = xfs_mru_cache_init(); | 1766 | error = xfs_init_workqueues(); |
| 1817 | if (error) | 1767 | if (error) |
| 1818 | goto out_destroy_zones; | 1768 | goto out_destroy_zones; |
| 1819 | 1769 | ||
| 1770 | error = xfs_mru_cache_init(); | ||
| 1771 | if (error) | ||
| 1772 | goto out_destroy_wq; | ||
| 1773 | |||
| 1820 | error = xfs_filestream_init(); | 1774 | error = xfs_filestream_init(); |
| 1821 | if (error) | 1775 | if (error) |
| 1822 | goto out_mru_cache_uninit; | 1776 | goto out_mru_cache_uninit; |
| @@ -1833,6 +1787,10 @@ init_xfs_fs(void) | |||
| 1833 | if (error) | 1787 | if (error) |
| 1834 | goto out_cleanup_procfs; | 1788 | goto out_cleanup_procfs; |
| 1835 | 1789 | ||
| 1790 | error = xfs_init_workqueues(); | ||
| 1791 | if (error) | ||
| 1792 | goto out_sysctl_unregister; | ||
| 1793 | |||
| 1836 | vfs_initquota(); | 1794 | vfs_initquota(); |
| 1837 | 1795 | ||
| 1838 | error = register_filesystem(&xfs_fs_type); | 1796 | error = register_filesystem(&xfs_fs_type); |
| @@ -1850,6 +1808,8 @@ init_xfs_fs(void) | |||
| 1850 | xfs_filestream_uninit(); | 1808 | xfs_filestream_uninit(); |
| 1851 | out_mru_cache_uninit: | 1809 | out_mru_cache_uninit: |
| 1852 | xfs_mru_cache_uninit(); | 1810 | xfs_mru_cache_uninit(); |
| 1811 | out_destroy_wq: | ||
| 1812 | xfs_destroy_workqueues(); | ||
| 1853 | out_destroy_zones: | 1813 | out_destroy_zones: |
| 1854 | xfs_destroy_zones(); | 1814 | xfs_destroy_zones(); |
| 1855 | out: | 1815 | out: |
| @@ -1866,6 +1826,7 @@ exit_xfs_fs(void) | |||
| 1866 | xfs_buf_terminate(); | 1826 | xfs_buf_terminate(); |
| 1867 | xfs_filestream_uninit(); | 1827 | xfs_filestream_uninit(); |
| 1868 | xfs_mru_cache_uninit(); | 1828 | xfs_mru_cache_uninit(); |
| 1829 | xfs_destroy_workqueues(); | ||
| 1869 | xfs_destroy_zones(); | 1830 | xfs_destroy_zones(); |
| 1870 | } | 1831 | } |
| 1871 | 1832 | ||
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c index 594cd822d84d..e4f9c1b0836c 100644 --- a/fs/xfs/linux-2.6/xfs_sync.c +++ b/fs/xfs/linux-2.6/xfs_sync.c | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include "xfs_log.h" | 22 | #include "xfs_log.h" |
| 23 | #include "xfs_inum.h" | 23 | #include "xfs_inum.h" |
| 24 | #include "xfs_trans.h" | 24 | #include "xfs_trans.h" |
| 25 | #include "xfs_trans_priv.h" | ||
| 25 | #include "xfs_sb.h" | 26 | #include "xfs_sb.h" |
| 26 | #include "xfs_ag.h" | 27 | #include "xfs_ag.h" |
| 27 | #include "xfs_mount.h" | 28 | #include "xfs_mount.h" |
| @@ -39,6 +40,8 @@ | |||
| 39 | #include <linux/kthread.h> | 40 | #include <linux/kthread.h> |
| 40 | #include <linux/freezer.h> | 41 | #include <linux/freezer.h> |
| 41 | 42 | ||
| 43 | struct workqueue_struct *xfs_syncd_wq; /* sync workqueue */ | ||
| 44 | |||
| 42 | /* | 45 | /* |
| 43 | * The inode lookup is done in batches to keep the amount of lock traffic and | 46 | * The inode lookup is done in batches to keep the amount of lock traffic and |
| 44 | * radix tree lookups to a minimum. The batch size is a trade off between | 47 | * radix tree lookups to a minimum. The batch size is a trade off between |
| @@ -401,7 +404,7 @@ xfs_quiesce_fs( | |||
| 401 | /* | 404 | /* |
| 402 | * Second stage of a quiesce. The data is already synced, now we have to take | 405 | * Second stage of a quiesce. The data is already synced, now we have to take |
| 403 | * care of the metadata. New transactions are already blocked, so we need to | 406 | * care of the metadata. New transactions are already blocked, so we need to |
| 404 | * wait for any remaining transactions to drain out before proceding. | 407 | * wait for any remaining transactions to drain out before proceeding. |
| 405 | */ | 408 | */ |
| 406 | void | 409 | void |
| 407 | xfs_quiesce_attr( | 410 | xfs_quiesce_attr( |
| @@ -431,62 +434,12 @@ xfs_quiesce_attr( | |||
| 431 | xfs_unmountfs_writesb(mp); | 434 | xfs_unmountfs_writesb(mp); |
| 432 | } | 435 | } |
| 433 | 436 | ||
| 434 | /* | 437 | static void |
| 435 | * Enqueue a work item to be picked up by the vfs xfssyncd thread. | 438 | xfs_syncd_queue_sync( |
| 436 | * Doing this has two advantages: | 439 | struct xfs_mount *mp) |
| 437 | * - It saves on stack space, which is tight in certain situations | ||
| 438 | * - It can be used (with care) as a mechanism to avoid deadlocks. | ||
| 439 | * Flushing while allocating in a full filesystem requires both. | ||
| 440 | */ | ||
| 441 | STATIC void | ||
| 442 | xfs_syncd_queue_work( | ||
| 443 | struct xfs_mount *mp, | ||
| 444 | void *data, | ||
| 445 | void (*syncer)(struct xfs_mount *, void *), | ||
| 446 | struct completion *completion) | ||
| 447 | { | ||
| 448 | struct xfs_sync_work *work; | ||
| 449 | |||
| 450 | work = kmem_alloc(sizeof(struct xfs_sync_work), KM_SLEEP); | ||
| 451 | INIT_LIST_HEAD(&work->w_list); | ||
| 452 | work->w_syncer = syncer; | ||
| 453 | work->w_data = data; | ||
| 454 | work->w_mount = mp; | ||
| 455 | work->w_completion = completion; | ||
| 456 | spin_lock(&mp->m_sync_lock); | ||
| 457 | list_add_tail(&work->w_list, &mp->m_sync_list); | ||
| 458 | spin_unlock(&mp->m_sync_lock); | ||
| 459 | wake_up_process(mp->m_sync_task); | ||
| 460 | } | ||
| 461 | |||
| 462 | /* | ||
| 463 | * Flush delayed allocate data, attempting to free up reserved space | ||
| 464 | * from existing allocations. At this point a new allocation attempt | ||
| 465 | * has failed with ENOSPC and we are in the process of scratching our | ||
| 466 | * heads, looking about for more room... | ||
| 467 | */ | ||
| 468 | STATIC void | ||
| 469 | xfs_flush_inodes_work( | ||
| 470 | struct xfs_mount *mp, | ||
| 471 | void *arg) | ||
| 472 | { | ||
| 473 | struct inode *inode = arg; | ||
| 474 | xfs_sync_data(mp, SYNC_TRYLOCK); | ||
| 475 | xfs_sync_data(mp, SYNC_TRYLOCK | SYNC_WAIT); | ||
| 476 | iput(inode); | ||
| 477 | } | ||
| 478 | |||
| 479 | void | ||
| 480 | xfs_flush_inodes( | ||
| 481 | xfs_inode_t *ip) | ||
| 482 | { | 440 | { |
| 483 | struct inode *inode = VFS_I(ip); | 441 | queue_delayed_work(xfs_syncd_wq, &mp->m_sync_work, |
| 484 | DECLARE_COMPLETION_ONSTACK(completion); | 442 | msecs_to_jiffies(xfs_syncd_centisecs * 10)); |
| 485 | |||
| 486 | igrab(inode); | ||
| 487 | xfs_syncd_queue_work(ip->i_mount, inode, xfs_flush_inodes_work, &completion); | ||
| 488 | wait_for_completion(&completion); | ||
| 489 | xfs_log_force(ip->i_mount, XFS_LOG_SYNC); | ||
| 490 | } | 443 | } |
| 491 | 444 | ||
| 492 | /* | 445 | /* |
| @@ -496,9 +449,10 @@ xfs_flush_inodes( | |||
| 496 | */ | 449 | */ |
| 497 | STATIC void | 450 | STATIC void |
| 498 | xfs_sync_worker( | 451 | xfs_sync_worker( |
| 499 | struct xfs_mount *mp, | 452 | struct work_struct *work) |
| 500 | void *unused) | ||
| 501 | { | 453 | { |
| 454 | struct xfs_mount *mp = container_of(to_delayed_work(work), | ||
| 455 | struct xfs_mount, m_sync_work); | ||
| 502 | int error; | 456 | int error; |
| 503 | 457 | ||
| 504 | if (!(mp->m_flags & XFS_MOUNT_RDONLY)) { | 458 | if (!(mp->m_flags & XFS_MOUNT_RDONLY)) { |
| @@ -508,73 +462,106 @@ xfs_sync_worker( | |||
| 508 | error = xfs_fs_log_dummy(mp); | 462 | error = xfs_fs_log_dummy(mp); |
| 509 | else | 463 | else |
| 510 | xfs_log_force(mp, 0); | 464 | xfs_log_force(mp, 0); |
| 511 | xfs_reclaim_inodes(mp, 0); | ||
| 512 | error = xfs_qm_sync(mp, SYNC_TRYLOCK); | 465 | error = xfs_qm_sync(mp, SYNC_TRYLOCK); |
| 466 | |||
| 467 | /* start pushing all the metadata that is currently dirty */ | ||
| 468 | xfs_ail_push_all(mp->m_ail); | ||
| 513 | } | 469 | } |
| 514 | mp->m_sync_seq++; | 470 | |
| 515 | wake_up(&mp->m_wait_single_sync_task); | 471 | /* queue us up again */ |
| 472 | xfs_syncd_queue_sync(mp); | ||
| 516 | } | 473 | } |
| 517 | 474 | ||
| 518 | STATIC int | 475 | /* |
| 519 | xfssyncd( | 476 | * Queue a new inode reclaim pass if there are reclaimable inodes and there |
| 520 | void *arg) | 477 | * isn't a reclaim pass already in progress. By default it runs every 5s based |
| 478 | * on the xfs syncd work default of 30s. Perhaps this should have it's own | ||
| 479 | * tunable, but that can be done if this method proves to be ineffective or too | ||
| 480 | * aggressive. | ||
| 481 | */ | ||
| 482 | static void | ||
| 483 | xfs_syncd_queue_reclaim( | ||
| 484 | struct xfs_mount *mp) | ||
| 521 | { | 485 | { |
| 522 | struct xfs_mount *mp = arg; | ||
| 523 | long timeleft; | ||
| 524 | xfs_sync_work_t *work, *n; | ||
| 525 | LIST_HEAD (tmp); | ||
| 526 | |||
| 527 | set_freezable(); | ||
| 528 | timeleft = xfs_syncd_centisecs * msecs_to_jiffies(10); | ||
| 529 | for (;;) { | ||
| 530 | if (list_empty(&mp->m_sync_list)) | ||
| 531 | timeleft = schedule_timeout_interruptible(timeleft); | ||
| 532 | /* swsusp */ | ||
| 533 | try_to_freeze(); | ||
| 534 | if (kthread_should_stop() && list_empty(&mp->m_sync_list)) | ||
| 535 | break; | ||
| 536 | 486 | ||
| 537 | spin_lock(&mp->m_sync_lock); | 487 | /* |
| 538 | /* | 488 | * We can have inodes enter reclaim after we've shut down the syncd |
| 539 | * We can get woken by laptop mode, to do a sync - | 489 | * workqueue during unmount, so don't allow reclaim work to be queued |
| 540 | * that's the (only!) case where the list would be | 490 | * during unmount. |
| 541 | * empty with time remaining. | 491 | */ |
| 542 | */ | 492 | if (!(mp->m_super->s_flags & MS_ACTIVE)) |
| 543 | if (!timeleft || list_empty(&mp->m_sync_list)) { | 493 | return; |
| 544 | if (!timeleft) | ||
| 545 | timeleft = xfs_syncd_centisecs * | ||
| 546 | msecs_to_jiffies(10); | ||
| 547 | INIT_LIST_HEAD(&mp->m_sync_work.w_list); | ||
| 548 | list_add_tail(&mp->m_sync_work.w_list, | ||
| 549 | &mp->m_sync_list); | ||
| 550 | } | ||
| 551 | list_splice_init(&mp->m_sync_list, &tmp); | ||
| 552 | spin_unlock(&mp->m_sync_lock); | ||
| 553 | 494 | ||
| 554 | list_for_each_entry_safe(work, n, &tmp, w_list) { | 495 | rcu_read_lock(); |
| 555 | (*work->w_syncer)(mp, work->w_data); | 496 | if (radix_tree_tagged(&mp->m_perag_tree, XFS_ICI_RECLAIM_TAG)) { |
| 556 | list_del(&work->w_list); | 497 | queue_delayed_work(xfs_syncd_wq, &mp->m_reclaim_work, |
| 557 | if (work == &mp->m_sync_work) | 498 | msecs_to_jiffies(xfs_syncd_centisecs / 6 * 10)); |
| 558 | continue; | ||
| 559 | if (work->w_completion) | ||
| 560 | complete(work->w_completion); | ||
| 561 | kmem_free(work); | ||
| 562 | } | ||
| 563 | } | 499 | } |
| 500 | rcu_read_unlock(); | ||
| 501 | } | ||
| 564 | 502 | ||
| 565 | return 0; | 503 | /* |
| 504 | * This is a fast pass over the inode cache to try to get reclaim moving on as | ||
| 505 | * many inodes as possible in a short period of time. It kicks itself every few | ||
| 506 | * seconds, as well as being kicked by the inode cache shrinker when memory | ||
| 507 | * goes low. It scans as quickly as possible avoiding locked inodes or those | ||
| 508 | * already being flushed, and once done schedules a future pass. | ||
| 509 | */ | ||
| 510 | STATIC void | ||
| 511 | xfs_reclaim_worker( | ||
| 512 | struct work_struct *work) | ||
| 513 | { | ||
| 514 | struct xfs_mount *mp = container_of(to_delayed_work(work), | ||
| 515 | struct xfs_mount, m_reclaim_work); | ||
| 516 | |||
| 517 | xfs_reclaim_inodes(mp, SYNC_TRYLOCK); | ||
| 518 | xfs_syncd_queue_reclaim(mp); | ||
| 519 | } | ||
| 520 | |||
| 521 | /* | ||
| 522 | * Flush delayed allocate data, attempting to free up reserved space | ||
| 523 | * from existing allocations. At this point a new allocation attempt | ||
| 524 | * has failed with ENOSPC and we are in the process of scratching our | ||
| 525 | * heads, looking about for more room. | ||
| 526 | * | ||
| 527 | * Queue a new data flush if there isn't one already in progress and | ||
| 528 | * wait for completion of the flush. This means that we only ever have one | ||
| 529 | * inode flush in progress no matter how many ENOSPC events are occurring and | ||
| 530 | * so will prevent the system from bogging down due to every concurrent | ||
| 531 | * ENOSPC event scanning all the active inodes in the system for writeback. | ||
| 532 | */ | ||
| 533 | void | ||
| 534 | xfs_flush_inodes( | ||
| 535 | struct xfs_inode *ip) | ||
| 536 | { | ||
| 537 | struct xfs_mount *mp = ip->i_mount; | ||
| 538 | |||
| 539 | queue_work(xfs_syncd_wq, &mp->m_flush_work); | ||
| 540 | flush_work_sync(&mp->m_flush_work); | ||
| 541 | } | ||
| 542 | |||
| 543 | STATIC void | ||
| 544 | xfs_flush_worker( | ||
| 545 | struct work_struct *work) | ||
| 546 | { | ||
| 547 | struct xfs_mount *mp = container_of(work, | ||
| 548 | struct xfs_mount, m_flush_work); | ||
| 549 | |||
| 550 | xfs_sync_data(mp, SYNC_TRYLOCK); | ||
| 551 | xfs_sync_data(mp, SYNC_TRYLOCK | SYNC_WAIT); | ||
| 566 | } | 552 | } |
| 567 | 553 | ||
| 568 | int | 554 | int |
| 569 | xfs_syncd_init( | 555 | xfs_syncd_init( |
| 570 | struct xfs_mount *mp) | 556 | struct xfs_mount *mp) |
| 571 | { | 557 | { |
| 572 | mp->m_sync_work.w_syncer = xfs_sync_worker; | 558 | INIT_WORK(&mp->m_flush_work, xfs_flush_worker); |
| 573 | mp->m_sync_work.w_mount = mp; | 559 | INIT_DELAYED_WORK(&mp->m_sync_work, xfs_sync_worker); |
| 574 | mp->m_sync_work.w_completion = NULL; | 560 | INIT_DELAYED_WORK(&mp->m_reclaim_work, xfs_reclaim_worker); |
| 575 | mp->m_sync_task = kthread_run(xfssyncd, mp, "xfssyncd/%s", mp->m_fsname); | 561 | |
| 576 | if (IS_ERR(mp->m_sync_task)) | 562 | xfs_syncd_queue_sync(mp); |
| 577 | return -PTR_ERR(mp->m_sync_task); | 563 | xfs_syncd_queue_reclaim(mp); |
| 564 | |||
| 578 | return 0; | 565 | return 0; |
| 579 | } | 566 | } |
| 580 | 567 | ||
| @@ -582,7 +569,9 @@ void | |||
| 582 | xfs_syncd_stop( | 569 | xfs_syncd_stop( |
| 583 | struct xfs_mount *mp) | 570 | struct xfs_mount *mp) |
| 584 | { | 571 | { |
| 585 | kthread_stop(mp->m_sync_task); | 572 | cancel_delayed_work_sync(&mp->m_sync_work); |
| 573 | cancel_delayed_work_sync(&mp->m_reclaim_work); | ||
| 574 | cancel_work_sync(&mp->m_flush_work); | ||
| 586 | } | 575 | } |
| 587 | 576 | ||
| 588 | void | 577 | void |
| @@ -601,6 +590,10 @@ __xfs_inode_set_reclaim_tag( | |||
| 601 | XFS_INO_TO_AGNO(ip->i_mount, ip->i_ino), | 590 | XFS_INO_TO_AGNO(ip->i_mount, ip->i_ino), |
| 602 | XFS_ICI_RECLAIM_TAG); | 591 | XFS_ICI_RECLAIM_TAG); |
| 603 | spin_unlock(&ip->i_mount->m_perag_lock); | 592 | spin_unlock(&ip->i_mount->m_perag_lock); |
| 593 | |||
| 594 | /* schedule periodic background inode reclaim */ | ||
| 595 | xfs_syncd_queue_reclaim(ip->i_mount); | ||
| 596 | |||
| 604 | trace_xfs_perag_set_reclaim(ip->i_mount, pag->pag_agno, | 597 | trace_xfs_perag_set_reclaim(ip->i_mount, pag->pag_agno, |
| 605 | -1, _RET_IP_); | 598 | -1, _RET_IP_); |
| 606 | } | 599 | } |
| @@ -1017,7 +1010,13 @@ xfs_reclaim_inodes( | |||
| 1017 | } | 1010 | } |
| 1018 | 1011 | ||
| 1019 | /* | 1012 | /* |
| 1020 | * Shrinker infrastructure. | 1013 | * Inode cache shrinker. |
| 1014 | * | ||
| 1015 | * When called we make sure that there is a background (fast) inode reclaim in | ||
| 1016 | * progress, while we will throttle the speed of reclaim via doiing synchronous | ||
| 1017 | * reclaim of inodes. That means if we come across dirty inodes, we wait for | ||
| 1018 | * them to be cleaned, which we hope will not be very long due to the | ||
| 1019 | * background walker having already kicked the IO off on those dirty inodes. | ||
| 1021 | */ | 1020 | */ |
| 1022 | static int | 1021 | static int |
| 1023 | xfs_reclaim_inode_shrink( | 1022 | xfs_reclaim_inode_shrink( |
| @@ -1032,10 +1031,15 @@ xfs_reclaim_inode_shrink( | |||
| 1032 | 1031 | ||
| 1033 | mp = container_of(shrink, struct xfs_mount, m_inode_shrink); | 1032 | mp = container_of(shrink, struct xfs_mount, m_inode_shrink); |
| 1034 | if (nr_to_scan) { | 1033 | if (nr_to_scan) { |
| 1034 | /* kick background reclaimer and push the AIL */ | ||
| 1035 | xfs_syncd_queue_reclaim(mp); | ||
| 1036 | xfs_ail_push_all(mp->m_ail); | ||
| 1037 | |||
| 1035 | if (!(gfp_mask & __GFP_FS)) | 1038 | if (!(gfp_mask & __GFP_FS)) |
| 1036 | return -1; | 1039 | return -1; |
| 1037 | 1040 | ||
| 1038 | xfs_reclaim_inodes_ag(mp, SYNC_TRYLOCK, &nr_to_scan); | 1041 | xfs_reclaim_inodes_ag(mp, SYNC_TRYLOCK | SYNC_WAIT, |
| 1042 | &nr_to_scan); | ||
| 1039 | /* terminate if we don't exhaust the scan */ | 1043 | /* terminate if we don't exhaust the scan */ |
| 1040 | if (nr_to_scan > 0) | 1044 | if (nr_to_scan > 0) |
| 1041 | return -1; | 1045 | return -1; |
diff --git a/fs/xfs/linux-2.6/xfs_sync.h b/fs/xfs/linux-2.6/xfs_sync.h index 32ba6628290c..e3a6ad27415f 100644 --- a/fs/xfs/linux-2.6/xfs_sync.h +++ b/fs/xfs/linux-2.6/xfs_sync.h | |||
| @@ -32,6 +32,8 @@ typedef struct xfs_sync_work { | |||
| 32 | #define SYNC_WAIT 0x0001 /* wait for i/o to complete */ | 32 | #define SYNC_WAIT 0x0001 /* wait for i/o to complete */ |
| 33 | #define SYNC_TRYLOCK 0x0002 /* only try to lock inodes */ | 33 | #define SYNC_TRYLOCK 0x0002 /* only try to lock inodes */ |
| 34 | 34 | ||
| 35 | extern struct workqueue_struct *xfs_syncd_wq; /* sync workqueue */ | ||
| 36 | |||
| 35 | int xfs_syncd_init(struct xfs_mount *mp); | 37 | int xfs_syncd_init(struct xfs_mount *mp); |
| 36 | void xfs_syncd_stop(struct xfs_mount *mp); | 38 | void xfs_syncd_stop(struct xfs_mount *mp); |
| 37 | 39 | ||
diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c index 7e2416478503..6fa214603819 100644 --- a/fs/xfs/quota/xfs_dquot.c +++ b/fs/xfs/quota/xfs_dquot.c | |||
| @@ -600,7 +600,7 @@ xfs_qm_dqread( | |||
| 600 | 600 | ||
| 601 | /* | 601 | /* |
| 602 | * Reservation counters are defined as reservation plus current usage | 602 | * Reservation counters are defined as reservation plus current usage |
| 603 | * to avoid having to add everytime. | 603 | * to avoid having to add every time. |
| 604 | */ | 604 | */ |
| 605 | dqp->q_res_bcount = be64_to_cpu(ddqp->d_bcount); | 605 | dqp->q_res_bcount = be64_to_cpu(ddqp->d_bcount); |
| 606 | dqp->q_res_icount = be64_to_cpu(ddqp->d_icount); | 606 | dqp->q_res_icount = be64_to_cpu(ddqp->d_icount); |
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c index 254ee062bd7d..69228aa8605a 100644 --- a/fs/xfs/quota/xfs_qm.c +++ b/fs/xfs/quota/xfs_qm.c | |||
| @@ -461,12 +461,10 @@ xfs_qm_dqflush_all( | |||
| 461 | struct xfs_quotainfo *q = mp->m_quotainfo; | 461 | struct xfs_quotainfo *q = mp->m_quotainfo; |
| 462 | int recl; | 462 | int recl; |
| 463 | struct xfs_dquot *dqp; | 463 | struct xfs_dquot *dqp; |
| 464 | int niters; | ||
| 465 | int error; | 464 | int error; |
| 466 | 465 | ||
| 467 | if (!q) | 466 | if (!q) |
| 468 | return 0; | 467 | return 0; |
| 469 | niters = 0; | ||
| 470 | again: | 468 | again: |
| 471 | mutex_lock(&q->qi_dqlist_lock); | 469 | mutex_lock(&q->qi_dqlist_lock); |
| 472 | list_for_each_entry(dqp, &q->qi_dqlist, q_mplist) { | 470 | list_for_each_entry(dqp, &q->qi_dqlist, q_mplist) { |
| @@ -1314,14 +1312,9 @@ xfs_qm_dqiter_bufs( | |||
| 1314 | { | 1312 | { |
| 1315 | xfs_buf_t *bp; | 1313 | xfs_buf_t *bp; |
| 1316 | int error; | 1314 | int error; |
| 1317 | int notcommitted; | ||
| 1318 | int incr; | ||
| 1319 | int type; | 1315 | int type; |
| 1320 | 1316 | ||
| 1321 | ASSERT(blkcnt > 0); | 1317 | ASSERT(blkcnt > 0); |
| 1322 | notcommitted = 0; | ||
| 1323 | incr = (blkcnt > XFS_QM_MAX_DQCLUSTER_LOGSZ) ? | ||
| 1324 | XFS_QM_MAX_DQCLUSTER_LOGSZ : blkcnt; | ||
| 1325 | type = flags & XFS_QMOPT_UQUOTA ? XFS_DQ_USER : | 1318 | type = flags & XFS_QMOPT_UQUOTA ? XFS_DQ_USER : |
| 1326 | (flags & XFS_QMOPT_PQUOTA ? XFS_DQ_PROJ : XFS_DQ_GROUP); | 1319 | (flags & XFS_QMOPT_PQUOTA ? XFS_DQ_PROJ : XFS_DQ_GROUP); |
| 1327 | error = 0; | 1320 | error = 0; |
diff --git a/fs/xfs/quota/xfs_qm.h b/fs/xfs/quota/xfs_qm.h index c9446f1c726d..567b29b9f1b3 100644 --- a/fs/xfs/quota/xfs_qm.h +++ b/fs/xfs/quota/xfs_qm.h | |||
| @@ -65,11 +65,6 @@ extern kmem_zone_t *qm_dqtrxzone; | |||
| 65 | * block in the dquot/xqm code. | 65 | * block in the dquot/xqm code. |
| 66 | */ | 66 | */ |
| 67 | #define XFS_DQUOT_CLUSTER_SIZE_FSB (xfs_filblks_t)1 | 67 | #define XFS_DQUOT_CLUSTER_SIZE_FSB (xfs_filblks_t)1 |
| 68 | /* | ||
| 69 | * When doing a quotacheck, we log dquot clusters of this many FSBs at most | ||
| 70 | * in a single transaction. We don't want to ask for too huge a log reservation. | ||
| 71 | */ | ||
| 72 | #define XFS_QM_MAX_DQCLUSTER_LOGSZ 3 | ||
| 73 | 68 | ||
| 74 | typedef xfs_dqhash_t xfs_dqlist_t; | 69 | typedef xfs_dqhash_t xfs_dqlist_t; |
| 75 | 70 | ||
diff --git a/fs/xfs/quota/xfs_qm_bhv.c b/fs/xfs/quota/xfs_qm_bhv.c index 774d7ec6df8e..a0a829addca9 100644 --- a/fs/xfs/quota/xfs_qm_bhv.c +++ b/fs/xfs/quota/xfs_qm_bhv.c | |||
| @@ -134,7 +134,7 @@ xfs_qm_newmount( | |||
| 134 | */ | 134 | */ |
| 135 | if (quotaondisk && !XFS_QM_NEED_QUOTACHECK(mp)) { | 135 | if (quotaondisk && !XFS_QM_NEED_QUOTACHECK(mp)) { |
| 136 | /* | 136 | /* |
| 137 | * If an error occured, qm_mount_quotas code | 137 | * If an error occurred, qm_mount_quotas code |
| 138 | * has already disabled quotas. So, just finish | 138 | * has already disabled quotas. So, just finish |
| 139 | * mounting, and get on with the boring life | 139 | * mounting, and get on with the boring life |
| 140 | * without disk quotas. | 140 | * without disk quotas. |
diff --git a/fs/xfs/quota/xfs_qm_syscalls.c b/fs/xfs/quota/xfs_qm_syscalls.c index c82f06778a27..2dadb15d5ca9 100644 --- a/fs/xfs/quota/xfs_qm_syscalls.c +++ b/fs/xfs/quota/xfs_qm_syscalls.c | |||
| @@ -172,7 +172,7 @@ xfs_qm_scall_quotaoff( | |||
| 172 | /* | 172 | /* |
| 173 | * Next we make the changes in the quota flag in the mount struct. | 173 | * Next we make the changes in the quota flag in the mount struct. |
| 174 | * This isn't protected by a particular lock directly, because we | 174 | * This isn't protected by a particular lock directly, because we |
| 175 | * don't want to take a mrlock everytime we depend on quotas being on. | 175 | * don't want to take a mrlock every time we depend on quotas being on. |
| 176 | */ | 176 | */ |
| 177 | mp->m_qflags &= ~(flags); | 177 | mp->m_qflags &= ~(flags); |
| 178 | 178 | ||
| @@ -313,14 +313,12 @@ xfs_qm_scall_quotaon( | |||
| 313 | { | 313 | { |
| 314 | int error; | 314 | int error; |
| 315 | uint qf; | 315 | uint qf; |
| 316 | uint accflags; | ||
| 317 | __int64_t sbflags; | 316 | __int64_t sbflags; |
| 318 | 317 | ||
| 319 | flags &= (XFS_ALL_QUOTA_ACCT | XFS_ALL_QUOTA_ENFD); | 318 | flags &= (XFS_ALL_QUOTA_ACCT | XFS_ALL_QUOTA_ENFD); |
| 320 | /* | 319 | /* |
| 321 | * Switching on quota accounting must be done at mount time. | 320 | * Switching on quota accounting must be done at mount time. |
| 322 | */ | 321 | */ |
| 323 | accflags = flags & XFS_ALL_QUOTA_ACCT; | ||
| 324 | flags &= ~(XFS_ALL_QUOTA_ACCT); | 322 | flags &= ~(XFS_ALL_QUOTA_ACCT); |
| 325 | 323 | ||
| 326 | sbflags = 0; | 324 | sbflags = 0; |
| @@ -354,7 +352,7 @@ xfs_qm_scall_quotaon( | |||
| 354 | return XFS_ERROR(EINVAL); | 352 | return XFS_ERROR(EINVAL); |
| 355 | } | 353 | } |
| 356 | /* | 354 | /* |
| 357 | * If everything's upto-date incore, then don't waste time. | 355 | * If everything's up to-date incore, then don't waste time. |
| 358 | */ | 356 | */ |
| 359 | if ((mp->m_qflags & flags) == flags) | 357 | if ((mp->m_qflags & flags) == flags) |
| 360 | return XFS_ERROR(EEXIST); | 358 | return XFS_ERROR(EEXIST); |
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c index 4bc3c649aee4..27d64d752eab 100644 --- a/fs/xfs/xfs_alloc.c +++ b/fs/xfs/xfs_alloc.c | |||
| @@ -2395,17 +2395,33 @@ xfs_free_extent( | |||
| 2395 | memset(&args, 0, sizeof(xfs_alloc_arg_t)); | 2395 | memset(&args, 0, sizeof(xfs_alloc_arg_t)); |
| 2396 | args.tp = tp; | 2396 | args.tp = tp; |
| 2397 | args.mp = tp->t_mountp; | 2397 | args.mp = tp->t_mountp; |
| 2398 | |||
| 2399 | /* | ||
| 2400 | * validate that the block number is legal - the enables us to detect | ||
| 2401 | * and handle a silent filesystem corruption rather than crashing. | ||
| 2402 | */ | ||
| 2398 | args.agno = XFS_FSB_TO_AGNO(args.mp, bno); | 2403 | args.agno = XFS_FSB_TO_AGNO(args.mp, bno); |
| 2399 | ASSERT(args.agno < args.mp->m_sb.sb_agcount); | 2404 | if (args.agno >= args.mp->m_sb.sb_agcount) |
| 2405 | return EFSCORRUPTED; | ||
| 2406 | |||
| 2400 | args.agbno = XFS_FSB_TO_AGBNO(args.mp, bno); | 2407 | args.agbno = XFS_FSB_TO_AGBNO(args.mp, bno); |
| 2408 | if (args.agbno >= args.mp->m_sb.sb_agblocks) | ||
| 2409 | return EFSCORRUPTED; | ||
| 2410 | |||
| 2401 | args.pag = xfs_perag_get(args.mp, args.agno); | 2411 | args.pag = xfs_perag_get(args.mp, args.agno); |
| 2402 | if ((error = xfs_alloc_fix_freelist(&args, XFS_ALLOC_FLAG_FREEING))) | 2412 | ASSERT(args.pag); |
| 2413 | |||
| 2414 | error = xfs_alloc_fix_freelist(&args, XFS_ALLOC_FLAG_FREEING); | ||
| 2415 | if (error) | ||
| 2403 | goto error0; | 2416 | goto error0; |
| 2404 | #ifdef DEBUG | 2417 | |
| 2405 | ASSERT(args.agbp != NULL); | 2418 | /* validate the extent size is legal now we have the agf locked */ |
| 2406 | ASSERT((args.agbno + len) <= | 2419 | if (args.agbno + len > |
| 2407 | be32_to_cpu(XFS_BUF_TO_AGF(args.agbp)->agf_length)); | 2420 | be32_to_cpu(XFS_BUF_TO_AGF(args.agbp)->agf_length)) { |
| 2408 | #endif | 2421 | error = EFSCORRUPTED; |
| 2422 | goto error0; | ||
| 2423 | } | ||
| 2424 | |||
| 2409 | error = xfs_free_ag_extent(tp, args.agbp, args.agno, args.agbno, len, 0); | 2425 | error = xfs_free_ag_extent(tp, args.agbp, args.agno, args.agbno, len, 0); |
| 2410 | error0: | 2426 | error0: |
| 2411 | xfs_perag_put(args.pag); | 2427 | xfs_perag_put(args.pag); |
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c index e5413d96f1af..7b7e005e3dcc 100644 --- a/fs/xfs/xfs_buf_item.c +++ b/fs/xfs/xfs_buf_item.c | |||
| @@ -992,7 +992,7 @@ xfs_buf_iodone_callbacks( | |||
| 992 | lasttarg = XFS_BUF_TARGET(bp); | 992 | lasttarg = XFS_BUF_TARGET(bp); |
| 993 | 993 | ||
| 994 | /* | 994 | /* |
| 995 | * If the write was asynchronous then noone will be looking for the | 995 | * If the write was asynchronous then no one will be looking for the |
| 996 | * error. Clear the error state and write the buffer out again. | 996 | * error. Clear the error state and write the buffer out again. |
| 997 | * | 997 | * |
| 998 | * During sync or umount we'll write all pending buffers again | 998 | * During sync or umount we'll write all pending buffers again |
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 742c8330994a..a37480a6e023 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
| @@ -2789,7 +2789,7 @@ xfs_iflush( | |||
| 2789 | 2789 | ||
| 2790 | /* | 2790 | /* |
| 2791 | * We can't flush the inode until it is unpinned, so wait for it if we | 2791 | * We can't flush the inode until it is unpinned, so wait for it if we |
| 2792 | * are allowed to block. We know noone new can pin it, because we are | 2792 | * are allowed to block. We know no one new can pin it, because we are |
| 2793 | * holding the inode lock shared and you need to hold it exclusively to | 2793 | * holding the inode lock shared and you need to hold it exclusively to |
| 2794 | * pin the inode. | 2794 | * pin the inode. |
| 2795 | * | 2795 | * |
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index f753200cef8d..ff4e2a30227d 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h | |||
| @@ -111,7 +111,7 @@ struct xfs_imap { | |||
| 111 | * Generally, we do not want to hold the i_rlock while holding the | 111 | * Generally, we do not want to hold the i_rlock while holding the |
| 112 | * i_ilock. Hierarchy is i_iolock followed by i_rlock. | 112 | * i_ilock. Hierarchy is i_iolock followed by i_rlock. |
| 113 | * | 113 | * |
| 114 | * xfs_iptr_t contains all the inode fields upto and including the | 114 | * xfs_iptr_t contains all the inode fields up to and including the |
| 115 | * i_mnext and i_mprev fields, it is used as a marker in the inode | 115 | * i_mnext and i_mprev fields, it is used as a marker in the inode |
| 116 | * chain off the mount structure by xfs_sync calls. | 116 | * chain off the mount structure by xfs_sync calls. |
| 117 | */ | 117 | */ |
| @@ -336,7 +336,7 @@ xfs_iflags_test_and_clear(xfs_inode_t *ip, unsigned short flags) | |||
| 336 | 336 | ||
| 337 | /* | 337 | /* |
| 338 | * Project quota id helpers (previously projid was 16bit only | 338 | * Project quota id helpers (previously projid was 16bit only |
| 339 | * and using two 16bit values to hold new 32bit projid was choosen | 339 | * and using two 16bit values to hold new 32bit projid was chosen |
| 340 | * to retain compatibility with "old" filesystems). | 340 | * to retain compatibility with "old" filesystems). |
| 341 | */ | 341 | */ |
| 342 | static inline prid_t | 342 | static inline prid_t |
diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c index 46cc40131d4a..576fdfe81d60 100644 --- a/fs/xfs/xfs_inode_item.c +++ b/fs/xfs/xfs_inode_item.c | |||
| @@ -198,6 +198,41 @@ xfs_inode_item_size( | |||
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | /* | 200 | /* |
| 201 | * xfs_inode_item_format_extents - convert in-core extents to on-disk form | ||
| 202 | * | ||
| 203 | * For either the data or attr fork in extent format, we need to endian convert | ||
| 204 | * the in-core extent as we place them into the on-disk inode. In this case, we | ||
| 205 | * need to do this conversion before we write the extents into the log. Because | ||
| 206 | * we don't have the disk inode to write into here, we allocate a buffer and | ||
| 207 | * format the extents into it via xfs_iextents_copy(). We free the buffer in | ||
| 208 | * the unlock routine after the copy for the log has been made. | ||
| 209 | * | ||
| 210 | * In the case of the data fork, the in-core and on-disk fork sizes can be | ||
| 211 | * different due to delayed allocation extents. We only log on-disk extents | ||
| 212 | * here, so always use the physical fork size to determine the size of the | ||
| 213 | * buffer we need to allocate. | ||
| 214 | */ | ||
| 215 | STATIC void | ||
| 216 | xfs_inode_item_format_extents( | ||
| 217 | struct xfs_inode *ip, | ||
| 218 | struct xfs_log_iovec *vecp, | ||
| 219 | int whichfork, | ||
| 220 | int type) | ||
| 221 | { | ||
| 222 | xfs_bmbt_rec_t *ext_buffer; | ||
| 223 | |||
| 224 | ext_buffer = kmem_alloc(XFS_IFORK_SIZE(ip, whichfork), KM_SLEEP); | ||
| 225 | if (whichfork == XFS_DATA_FORK) | ||
| 226 | ip->i_itemp->ili_extents_buf = ext_buffer; | ||
| 227 | else | ||
| 228 | ip->i_itemp->ili_aextents_buf = ext_buffer; | ||
| 229 | |||
| 230 | vecp->i_addr = ext_buffer; | ||
| 231 | vecp->i_len = xfs_iextents_copy(ip, ext_buffer, whichfork); | ||
| 232 | vecp->i_type = type; | ||
| 233 | } | ||
| 234 | |||
| 235 | /* | ||
| 201 | * This is called to fill in the vector of log iovecs for the | 236 | * This is called to fill in the vector of log iovecs for the |
| 202 | * given inode log item. It fills the first item with an inode | 237 | * given inode log item. It fills the first item with an inode |
| 203 | * log format structure, the second with the on-disk inode structure, | 238 | * log format structure, the second with the on-disk inode structure, |
| @@ -213,7 +248,6 @@ xfs_inode_item_format( | |||
| 213 | struct xfs_inode *ip = iip->ili_inode; | 248 | struct xfs_inode *ip = iip->ili_inode; |
| 214 | uint nvecs; | 249 | uint nvecs; |
| 215 | size_t data_bytes; | 250 | size_t data_bytes; |
| 216 | xfs_bmbt_rec_t *ext_buffer; | ||
| 217 | xfs_mount_t *mp; | 251 | xfs_mount_t *mp; |
| 218 | 252 | ||
| 219 | vecp->i_addr = &iip->ili_format; | 253 | vecp->i_addr = &iip->ili_format; |
| @@ -320,22 +354,8 @@ xfs_inode_item_format( | |||
| 320 | } else | 354 | } else |
| 321 | #endif | 355 | #endif |
| 322 | { | 356 | { |
| 323 | /* | 357 | xfs_inode_item_format_extents(ip, vecp, |
| 324 | * There are delayed allocation extents | 358 | XFS_DATA_FORK, XLOG_REG_TYPE_IEXT); |
| 325 | * in the inode, or we need to convert | ||
| 326 | * the extents to on disk format. | ||
| 327 | * Use xfs_iextents_copy() | ||
| 328 | * to copy only the real extents into | ||
| 329 | * a separate buffer. We'll free the | ||
| 330 | * buffer in the unlock routine. | ||
| 331 | */ | ||
| 332 | ext_buffer = kmem_alloc(ip->i_df.if_bytes, | ||
| 333 | KM_SLEEP); | ||
| 334 | iip->ili_extents_buf = ext_buffer; | ||
| 335 | vecp->i_addr = ext_buffer; | ||
| 336 | vecp->i_len = xfs_iextents_copy(ip, ext_buffer, | ||
| 337 | XFS_DATA_FORK); | ||
| 338 | vecp->i_type = XLOG_REG_TYPE_IEXT; | ||
| 339 | } | 359 | } |
| 340 | ASSERT(vecp->i_len <= ip->i_df.if_bytes); | 360 | ASSERT(vecp->i_len <= ip->i_df.if_bytes); |
| 341 | iip->ili_format.ilf_dsize = vecp->i_len; | 361 | iip->ili_format.ilf_dsize = vecp->i_len; |
| @@ -445,19 +465,12 @@ xfs_inode_item_format( | |||
| 445 | */ | 465 | */ |
| 446 | vecp->i_addr = ip->i_afp->if_u1.if_extents; | 466 | vecp->i_addr = ip->i_afp->if_u1.if_extents; |
| 447 | vecp->i_len = ip->i_afp->if_bytes; | 467 | vecp->i_len = ip->i_afp->if_bytes; |
| 468 | vecp->i_type = XLOG_REG_TYPE_IATTR_EXT; | ||
| 448 | #else | 469 | #else |
| 449 | ASSERT(iip->ili_aextents_buf == NULL); | 470 | ASSERT(iip->ili_aextents_buf == NULL); |
| 450 | /* | 471 | xfs_inode_item_format_extents(ip, vecp, |
| 451 | * Need to endian flip before logging | 472 | XFS_ATTR_FORK, XLOG_REG_TYPE_IATTR_EXT); |
| 452 | */ | ||
| 453 | ext_buffer = kmem_alloc(ip->i_afp->if_bytes, | ||
| 454 | KM_SLEEP); | ||
| 455 | iip->ili_aextents_buf = ext_buffer; | ||
| 456 | vecp->i_addr = ext_buffer; | ||
| 457 | vecp->i_len = xfs_iextents_copy(ip, ext_buffer, | ||
| 458 | XFS_ATTR_FORK); | ||
| 459 | #endif | 473 | #endif |
| 460 | vecp->i_type = XLOG_REG_TYPE_IATTR_EXT; | ||
| 461 | iip->ili_format.ilf_asize = vecp->i_len; | 474 | iip->ili_format.ilf_asize = vecp->i_len; |
| 462 | vecp++; | 475 | vecp++; |
| 463 | nvecs++; | 476 | nvecs++; |
diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c index dc1882adaf54..751e94fe1f77 100644 --- a/fs/xfs/xfs_itable.c +++ b/fs/xfs/xfs_itable.c | |||
| @@ -204,7 +204,6 @@ xfs_bulkstat( | |||
| 204 | xfs_agi_t *agi; /* agi header data */ | 204 | xfs_agi_t *agi; /* agi header data */ |
| 205 | xfs_agino_t agino; /* inode # in allocation group */ | 205 | xfs_agino_t agino; /* inode # in allocation group */ |
| 206 | xfs_agnumber_t agno; /* allocation group number */ | 206 | xfs_agnumber_t agno; /* allocation group number */ |
| 207 | xfs_daddr_t bno; /* inode cluster start daddr */ | ||
| 208 | int chunkidx; /* current index into inode chunk */ | 207 | int chunkidx; /* current index into inode chunk */ |
| 209 | int clustidx; /* current index into inode cluster */ | 208 | int clustidx; /* current index into inode cluster */ |
| 210 | xfs_btree_cur_t *cur; /* btree cursor for ialloc btree */ | 209 | xfs_btree_cur_t *cur; /* btree cursor for ialloc btree */ |
| @@ -463,7 +462,6 @@ xfs_bulkstat( | |||
| 463 | mp->m_sb.sb_inopblog); | 462 | mp->m_sb.sb_inopblog); |
| 464 | } | 463 | } |
| 465 | ino = XFS_AGINO_TO_INO(mp, agno, agino); | 464 | ino = XFS_AGINO_TO_INO(mp, agno, agino); |
| 466 | bno = XFS_AGB_TO_DADDR(mp, agno, agbno); | ||
| 467 | /* | 465 | /* |
| 468 | * Skip if this inode is free. | 466 | * Skip if this inode is free. |
| 469 | */ | 467 | */ |
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 25efa9b8a602..b612ce4520ae 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c | |||
| @@ -761,7 +761,7 @@ xfs_log_need_covered(xfs_mount_t *mp) | |||
| 761 | break; | 761 | break; |
| 762 | case XLOG_STATE_COVER_NEED: | 762 | case XLOG_STATE_COVER_NEED: |
| 763 | case XLOG_STATE_COVER_NEED2: | 763 | case XLOG_STATE_COVER_NEED2: |
| 764 | if (!xfs_trans_ail_tail(log->l_ailp) && | 764 | if (!xfs_ail_min_lsn(log->l_ailp) && |
| 765 | xlog_iclogs_empty(log)) { | 765 | xlog_iclogs_empty(log)) { |
| 766 | if (log->l_covered_state == XLOG_STATE_COVER_NEED) | 766 | if (log->l_covered_state == XLOG_STATE_COVER_NEED) |
| 767 | log->l_covered_state = XLOG_STATE_COVER_DONE; | 767 | log->l_covered_state = XLOG_STATE_COVER_DONE; |
| @@ -801,7 +801,7 @@ xlog_assign_tail_lsn( | |||
| 801 | xfs_lsn_t tail_lsn; | 801 | xfs_lsn_t tail_lsn; |
| 802 | struct log *log = mp->m_log; | 802 | struct log *log = mp->m_log; |
| 803 | 803 | ||
| 804 | tail_lsn = xfs_trans_ail_tail(mp->m_ail); | 804 | tail_lsn = xfs_ail_min_lsn(mp->m_ail); |
| 805 | if (!tail_lsn) | 805 | if (!tail_lsn) |
| 806 | tail_lsn = atomic64_read(&log->l_last_sync_lsn); | 806 | tail_lsn = atomic64_read(&log->l_last_sync_lsn); |
| 807 | 807 | ||
| @@ -1239,7 +1239,7 @@ xlog_grant_push_ail( | |||
| 1239 | * the filesystem is shutting down. | 1239 | * the filesystem is shutting down. |
| 1240 | */ | 1240 | */ |
| 1241 | if (!XLOG_FORCED_SHUTDOWN(log)) | 1241 | if (!XLOG_FORCED_SHUTDOWN(log)) |
| 1242 | xfs_trans_ail_push(log->l_ailp, threshold_lsn); | 1242 | xfs_ail_push(log->l_ailp, threshold_lsn); |
| 1243 | } | 1243 | } |
| 1244 | 1244 | ||
| 1245 | /* | 1245 | /* |
| @@ -3407,6 +3407,17 @@ xlog_verify_dest_ptr( | |||
| 3407 | xfs_emerg(log->l_mp, "%s: invalid ptr", __func__); | 3407 | xfs_emerg(log->l_mp, "%s: invalid ptr", __func__); |
| 3408 | } | 3408 | } |
| 3409 | 3409 | ||
| 3410 | /* | ||
| 3411 | * Check to make sure the grant write head didn't just over lap the tail. If | ||
| 3412 | * the cycles are the same, we can't be overlapping. Otherwise, make sure that | ||
| 3413 | * the cycles differ by exactly one and check the byte count. | ||
| 3414 | * | ||
| 3415 | * This check is run unlocked, so can give false positives. Rather than assert | ||
| 3416 | * on failures, use a warn-once flag and a panic tag to allow the admin to | ||
| 3417 | * determine if they want to panic the machine when such an error occurs. For | ||
| 3418 | * debug kernels this will have the same effect as using an assert but, unlinke | ||
| 3419 | * an assert, it can be turned off at runtime. | ||
| 3420 | */ | ||
| 3410 | STATIC void | 3421 | STATIC void |
| 3411 | xlog_verify_grant_tail( | 3422 | xlog_verify_grant_tail( |
| 3412 | struct log *log) | 3423 | struct log *log) |
| @@ -3414,17 +3425,22 @@ xlog_verify_grant_tail( | |||
| 3414 | int tail_cycle, tail_blocks; | 3425 | int tail_cycle, tail_blocks; |
| 3415 | int cycle, space; | 3426 | int cycle, space; |
| 3416 | 3427 | ||
| 3417 | /* | ||
| 3418 | * Check to make sure the grant write head didn't just over lap the | ||
| 3419 | * tail. If the cycles are the same, we can't be overlapping. | ||
| 3420 | * Otherwise, make sure that the cycles differ by exactly one and | ||
| 3421 | * check the byte count. | ||
| 3422 | */ | ||
| 3423 | xlog_crack_grant_head(&log->l_grant_write_head, &cycle, &space); | 3428 | xlog_crack_grant_head(&log->l_grant_write_head, &cycle, &space); |
| 3424 | xlog_crack_atomic_lsn(&log->l_tail_lsn, &tail_cycle, &tail_blocks); | 3429 | xlog_crack_atomic_lsn(&log->l_tail_lsn, &tail_cycle, &tail_blocks); |
| 3425 | if (tail_cycle != cycle) { | 3430 | if (tail_cycle != cycle) { |
| 3426 | ASSERT(cycle - 1 == tail_cycle); | 3431 | if (cycle - 1 != tail_cycle && |
| 3427 | ASSERT(space <= BBTOB(tail_blocks)); | 3432 | !(log->l_flags & XLOG_TAIL_WARN)) { |
| 3433 | xfs_alert_tag(log->l_mp, XFS_PTAG_LOGRES, | ||
| 3434 | "%s: cycle - 1 != tail_cycle", __func__); | ||
| 3435 | log->l_flags |= XLOG_TAIL_WARN; | ||
| 3436 | } | ||
| 3437 | |||
| 3438 | if (space > BBTOB(tail_blocks) && | ||
| 3439 | !(log->l_flags & XLOG_TAIL_WARN)) { | ||
| 3440 | xfs_alert_tag(log->l_mp, XFS_PTAG_LOGRES, | ||
| 3441 | "%s: space > BBTOB(tail_blocks)", __func__); | ||
| 3442 | log->l_flags |= XLOG_TAIL_WARN; | ||
| 3443 | } | ||
| 3428 | } | 3444 | } |
| 3429 | } | 3445 | } |
| 3430 | 3446 | ||
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h index 15dbf1f9c2be..5864850e9e34 100644 --- a/fs/xfs/xfs_log_priv.h +++ b/fs/xfs/xfs_log_priv.h | |||
| @@ -144,6 +144,7 @@ static inline uint xlog_get_client_id(__be32 i) | |||
| 144 | #define XLOG_RECOVERY_NEEDED 0x4 /* log was recovered */ | 144 | #define XLOG_RECOVERY_NEEDED 0x4 /* log was recovered */ |
| 145 | #define XLOG_IO_ERROR 0x8 /* log hit an I/O error, and being | 145 | #define XLOG_IO_ERROR 0x8 /* log hit an I/O error, and being |
| 146 | shutdown */ | 146 | shutdown */ |
| 147 | #define XLOG_TAIL_WARN 0x10 /* log tail verify warning issued */ | ||
| 147 | 148 | ||
| 148 | #ifdef __KERNEL__ | 149 | #ifdef __KERNEL__ |
| 149 | /* | 150 | /* |
| @@ -570,7 +571,7 @@ int xlog_write(struct log *log, struct xfs_log_vec *log_vector, | |||
| 570 | * When we crack an atomic LSN, we sample it first so that the value will not | 571 | * When we crack an atomic LSN, we sample it first so that the value will not |
| 571 | * change while we are cracking it into the component values. This means we | 572 | * change while we are cracking it into the component values. This means we |
| 572 | * will always get consistent component values to work from. This should always | 573 | * will always get consistent component values to work from. This should always |
| 573 | * be used to smaple and crack LSNs taht are stored and updated in atomic | 574 | * be used to sample and crack LSNs that are stored and updated in atomic |
| 574 | * variables. | 575 | * variables. |
| 575 | */ | 576 | */ |
| 576 | static inline void | 577 | static inline void |
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 0c4a5618e7af..5cc464a17c93 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
| @@ -101,7 +101,7 @@ xlog_get_bp( | |||
| 101 | /* | 101 | /* |
| 102 | * We do log I/O in units of log sectors (a power-of-2 | 102 | * We do log I/O in units of log sectors (a power-of-2 |
| 103 | * multiple of the basic block size), so we round up the | 103 | * multiple of the basic block size), so we round up the |
| 104 | * requested size to acommodate the basic blocks required | 104 | * requested size to accommodate the basic blocks required |
| 105 | * for complete log sectors. | 105 | * for complete log sectors. |
| 106 | * | 106 | * |
| 107 | * In addition, the buffer may be used for a non-sector- | 107 | * In addition, the buffer may be used for a non-sector- |
| @@ -112,7 +112,7 @@ xlog_get_bp( | |||
| 112 | * an issue. Nor will this be a problem if the log I/O is | 112 | * an issue. Nor will this be a problem if the log I/O is |
| 113 | * done in basic blocks (sector size 1). But otherwise we | 113 | * done in basic blocks (sector size 1). But otherwise we |
| 114 | * extend the buffer by one extra log sector to ensure | 114 | * extend the buffer by one extra log sector to ensure |
| 115 | * there's space to accomodate this possiblility. | 115 | * there's space to accommodate this possibility. |
| 116 | */ | 116 | */ |
| 117 | if (nbblks > 1 && log->l_sectBBsize > 1) | 117 | if (nbblks > 1 && log->l_sectBBsize > 1) |
| 118 | nbblks += log->l_sectBBsize; | 118 | nbblks += log->l_sectBBsize; |
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index a62e8971539d..19af0ab0d0c6 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h | |||
| @@ -203,12 +203,9 @@ typedef struct xfs_mount { | |||
| 203 | struct mutex m_icsb_mutex; /* balancer sync lock */ | 203 | struct mutex m_icsb_mutex; /* balancer sync lock */ |
| 204 | #endif | 204 | #endif |
| 205 | struct xfs_mru_cache *m_filestream; /* per-mount filestream data */ | 205 | struct xfs_mru_cache *m_filestream; /* per-mount filestream data */ |
| 206 | struct task_struct *m_sync_task; /* generalised sync thread */ | 206 | struct delayed_work m_sync_work; /* background sync work */ |
| 207 | xfs_sync_work_t m_sync_work; /* work item for VFS_SYNC */ | 207 | struct delayed_work m_reclaim_work; /* background inode reclaim */ |
| 208 | struct list_head m_sync_list; /* sync thread work item list */ | 208 | struct work_struct m_flush_work; /* background inode flush */ |
| 209 | spinlock_t m_sync_lock; /* work item list lock */ | ||
| 210 | int m_sync_seq; /* sync thread generation no. */ | ||
| 211 | wait_queue_head_t m_wait_single_sync_task; | ||
| 212 | __int64_t m_update_flags; /* sb flags we need to update | 209 | __int64_t m_update_flags; /* sb flags we need to update |
| 213 | on the next remount,rw */ | 210 | on the next remount,rw */ |
| 214 | struct shrinker m_inode_shrink; /* inode reclaim shrinker */ | 211 | struct shrinker m_inode_shrink; /* inode reclaim shrinker */ |
diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c index 12aff9584e29..acdb92f14d51 100644 --- a/fs/xfs/xfs_trans_ail.c +++ b/fs/xfs/xfs_trans_ail.c | |||
| @@ -28,74 +28,138 @@ | |||
| 28 | #include "xfs_trans_priv.h" | 28 | #include "xfs_trans_priv.h" |
| 29 | #include "xfs_error.h" | 29 | #include "xfs_error.h" |
| 30 | 30 | ||
| 31 | STATIC void xfs_ail_splice(struct xfs_ail *, struct list_head *, xfs_lsn_t); | 31 | struct workqueue_struct *xfs_ail_wq; /* AIL workqueue */ |
| 32 | STATIC void xfs_ail_delete(struct xfs_ail *, xfs_log_item_t *); | ||
| 33 | STATIC xfs_log_item_t * xfs_ail_min(struct xfs_ail *); | ||
| 34 | STATIC xfs_log_item_t * xfs_ail_next(struct xfs_ail *, xfs_log_item_t *); | ||
| 35 | 32 | ||
| 36 | #ifdef DEBUG | 33 | #ifdef DEBUG |
| 37 | STATIC void xfs_ail_check(struct xfs_ail *, xfs_log_item_t *); | 34 | /* |
| 38 | #else | 35 | * Check that the list is sorted as it should be. |
| 36 | */ | ||
| 37 | STATIC void | ||
| 38 | xfs_ail_check( | ||
| 39 | struct xfs_ail *ailp, | ||
| 40 | xfs_log_item_t *lip) | ||
| 41 | { | ||
| 42 | xfs_log_item_t *prev_lip; | ||
| 43 | |||
| 44 | if (list_empty(&ailp->xa_ail)) | ||
| 45 | return; | ||
| 46 | |||
| 47 | /* | ||
| 48 | * Check the next and previous entries are valid. | ||
| 49 | */ | ||
| 50 | ASSERT((lip->li_flags & XFS_LI_IN_AIL) != 0); | ||
| 51 | prev_lip = list_entry(lip->li_ail.prev, xfs_log_item_t, li_ail); | ||
| 52 | if (&prev_lip->li_ail != &ailp->xa_ail) | ||
| 53 | ASSERT(XFS_LSN_CMP(prev_lip->li_lsn, lip->li_lsn) <= 0); | ||
| 54 | |||
| 55 | prev_lip = list_entry(lip->li_ail.next, xfs_log_item_t, li_ail); | ||
| 56 | if (&prev_lip->li_ail != &ailp->xa_ail) | ||
| 57 | ASSERT(XFS_LSN_CMP(prev_lip->li_lsn, lip->li_lsn) >= 0); | ||
| 58 | |||
| 59 | |||
| 60 | #ifdef XFS_TRANS_DEBUG | ||
| 61 | /* | ||
| 62 | * Walk the list checking lsn ordering, and that every entry has the | ||
| 63 | * XFS_LI_IN_AIL flag set. This is really expensive, so only do it | ||
| 64 | * when specifically debugging the transaction subsystem. | ||
| 65 | */ | ||
| 66 | prev_lip = list_entry(&ailp->xa_ail, xfs_log_item_t, li_ail); | ||
| 67 | list_for_each_entry(lip, &ailp->xa_ail, li_ail) { | ||
| 68 | if (&prev_lip->li_ail != &ailp->xa_ail) | ||
| 69 | ASSERT(XFS_LSN_CMP(prev_lip->li_lsn, lip->li_lsn) <= 0); | ||
| 70 | ASSERT((lip->li_flags & XFS_LI_IN_AIL) != 0); | ||
| 71 | prev_lip = lip; | ||
| 72 | } | ||
| 73 | #endif /* XFS_TRANS_DEBUG */ | ||
| 74 | } | ||
| 75 | #else /* !DEBUG */ | ||
| 39 | #define xfs_ail_check(a,l) | 76 | #define xfs_ail_check(a,l) |
| 40 | #endif /* DEBUG */ | 77 | #endif /* DEBUG */ |
| 41 | 78 | ||
| 79 | /* | ||
| 80 | * Return a pointer to the first item in the AIL. If the AIL is empty, then | ||
| 81 | * return NULL. | ||
| 82 | */ | ||
| 83 | static xfs_log_item_t * | ||
| 84 | xfs_ail_min( | ||
| 85 | struct xfs_ail *ailp) | ||
| 86 | { | ||
| 87 | if (list_empty(&ailp->xa_ail)) | ||
| 88 | return NULL; | ||
| 89 | |||
| 90 | return list_first_entry(&ailp->xa_ail, xfs_log_item_t, li_ail); | ||
| 91 | } | ||
| 92 | |||
| 93 | /* | ||
| 94 | * Return a pointer to the last item in the AIL. If the AIL is empty, then | ||
| 95 | * return NULL. | ||
| 96 | */ | ||
| 97 | static xfs_log_item_t * | ||
| 98 | xfs_ail_max( | ||
| 99 | struct xfs_ail *ailp) | ||
| 100 | { | ||
| 101 | if (list_empty(&ailp->xa_ail)) | ||
| 102 | return NULL; | ||
| 103 | |||
| 104 | return list_entry(ailp->xa_ail.prev, xfs_log_item_t, li_ail); | ||
| 105 | } | ||
| 106 | |||
| 107 | /* | ||
| 108 | * Return a pointer to the item which follows the given item in the AIL. If | ||
| 109 | * the given item is the last item in the list, then return NULL. | ||
| 110 | */ | ||
| 111 | static xfs_log_item_t * | ||
| 112 | xfs_ail_next( | ||
| 113 | struct xfs_ail *ailp, | ||
| 114 | xfs_log_item_t *lip) | ||
| 115 | { | ||
| 116 | if (lip->li_ail.next == &ailp->xa_ail) | ||
| 117 | return NULL; | ||
| 118 | |||
| 119 | return list_first_entry(&lip->li_ail, xfs_log_item_t, li_ail); | ||
| 120 | } | ||
| 42 | 121 | ||
| 43 | /* | 122 | /* |
| 44 | * This is called by the log manager code to determine the LSN | 123 | * This is called by the log manager code to determine the LSN of the tail of |
| 45 | * of the tail of the log. This is exactly the LSN of the first | 124 | * the log. This is exactly the LSN of the first item in the AIL. If the AIL |
| 46 | * item in the AIL. If the AIL is empty, then this function | 125 | * is empty, then this function returns 0. |
| 47 | * returns 0. | ||
| 48 | * | 126 | * |
| 49 | * We need the AIL lock in order to get a coherent read of the | 127 | * We need the AIL lock in order to get a coherent read of the lsn of the last |
| 50 | * lsn of the last item in the AIL. | 128 | * item in the AIL. |
| 51 | */ | 129 | */ |
| 52 | xfs_lsn_t | 130 | xfs_lsn_t |
| 53 | xfs_trans_ail_tail( | 131 | xfs_ail_min_lsn( |
| 54 | struct xfs_ail *ailp) | 132 | struct xfs_ail *ailp) |
| 55 | { | 133 | { |
| 56 | xfs_lsn_t lsn; | 134 | xfs_lsn_t lsn = 0; |
| 57 | xfs_log_item_t *lip; | 135 | xfs_log_item_t *lip; |
| 58 | 136 | ||
| 59 | spin_lock(&ailp->xa_lock); | 137 | spin_lock(&ailp->xa_lock); |
| 60 | lip = xfs_ail_min(ailp); | 138 | lip = xfs_ail_min(ailp); |
| 61 | if (lip == NULL) { | 139 | if (lip) |
| 62 | lsn = (xfs_lsn_t)0; | ||
| 63 | } else { | ||
| 64 | lsn = lip->li_lsn; | 140 | lsn = lip->li_lsn; |
| 65 | } | ||
| 66 | spin_unlock(&ailp->xa_lock); | 141 | spin_unlock(&ailp->xa_lock); |
| 67 | 142 | ||
| 68 | return lsn; | 143 | return lsn; |
| 69 | } | 144 | } |
| 70 | 145 | ||
| 71 | /* | 146 | /* |
| 72 | * xfs_trans_push_ail | 147 | * Return the maximum lsn held in the AIL, or zero if the AIL is empty. |
| 73 | * | ||
| 74 | * This routine is called to move the tail of the AIL forward. It does this by | ||
| 75 | * trying to flush items in the AIL whose lsns are below the given | ||
| 76 | * threshold_lsn. | ||
| 77 | * | ||
| 78 | * the push is run asynchronously in a separate thread, so we return the tail | ||
| 79 | * of the log right now instead of the tail after the push. This means we will | ||
| 80 | * either continue right away, or we will sleep waiting on the async thread to | ||
| 81 | * do its work. | ||
| 82 | * | ||
| 83 | * We do this unlocked - we only need to know whether there is anything in the | ||
| 84 | * AIL at the time we are called. We don't need to access the contents of | ||
| 85 | * any of the objects, so the lock is not needed. | ||
| 86 | */ | 148 | */ |
| 87 | void | 149 | static xfs_lsn_t |
| 88 | xfs_trans_ail_push( | 150 | xfs_ail_max_lsn( |
| 89 | struct xfs_ail *ailp, | 151 | struct xfs_ail *ailp) |
| 90 | xfs_lsn_t threshold_lsn) | ||
| 91 | { | 152 | { |
| 92 | xfs_log_item_t *lip; | 153 | xfs_lsn_t lsn = 0; |
| 154 | xfs_log_item_t *lip; | ||
| 93 | 155 | ||
| 94 | lip = xfs_ail_min(ailp); | 156 | spin_lock(&ailp->xa_lock); |
| 95 | if (lip && !XFS_FORCED_SHUTDOWN(ailp->xa_mount)) { | 157 | lip = xfs_ail_max(ailp); |
| 96 | if (XFS_LSN_CMP(threshold_lsn, ailp->xa_target) > 0) | 158 | if (lip) |
| 97 | xfsaild_wakeup(ailp, threshold_lsn); | 159 | lsn = lip->li_lsn; |
| 98 | } | 160 | spin_unlock(&ailp->xa_lock); |
| 161 | |||
| 162 | return lsn; | ||
| 99 | } | 163 | } |
| 100 | 164 | ||
| 101 | /* | 165 | /* |
| @@ -236,16 +300,57 @@ out: | |||
| 236 | } | 300 | } |
| 237 | 301 | ||
| 238 | /* | 302 | /* |
| 239 | * xfsaild_push does the work of pushing on the AIL. Returning a timeout of | 303 | * splice the log item list into the AIL at the given LSN. |
| 240 | * zero indicates that the caller should sleep until woken. | ||
| 241 | */ | 304 | */ |
| 242 | long | 305 | static void |
| 243 | xfsaild_push( | 306 | xfs_ail_splice( |
| 244 | struct xfs_ail *ailp, | 307 | struct xfs_ail *ailp, |
| 245 | xfs_lsn_t *last_lsn) | 308 | struct list_head *list, |
| 309 | xfs_lsn_t lsn) | ||
| 246 | { | 310 | { |
| 247 | long tout = 0; | 311 | xfs_log_item_t *next_lip; |
| 248 | xfs_lsn_t last_pushed_lsn = *last_lsn; | 312 | |
| 313 | /* If the list is empty, just insert the item. */ | ||
| 314 | if (list_empty(&ailp->xa_ail)) { | ||
| 315 | list_splice(list, &ailp->xa_ail); | ||
| 316 | return; | ||
| 317 | } | ||
| 318 | |||
| 319 | list_for_each_entry_reverse(next_lip, &ailp->xa_ail, li_ail) { | ||
| 320 | if (XFS_LSN_CMP(next_lip->li_lsn, lsn) <= 0) | ||
| 321 | break; | ||
| 322 | } | ||
| 323 | |||
| 324 | ASSERT(&next_lip->li_ail == &ailp->xa_ail || | ||
| 325 | XFS_LSN_CMP(next_lip->li_lsn, lsn) <= 0); | ||
| 326 | |||
| 327 | list_splice_init(list, &next_lip->li_ail); | ||
| 328 | } | ||
| 329 | |||
| 330 | /* | ||
| 331 | * Delete the given item from the AIL. Return a pointer to the item. | ||
| 332 | */ | ||
| 333 | static void | ||
| 334 | xfs_ail_delete( | ||
| 335 | struct xfs_ail *ailp, | ||
| 336 | xfs_log_item_t *lip) | ||
| 337 | { | ||
| 338 | xfs_ail_check(ailp, lip); | ||
| 339 | list_del(&lip->li_ail); | ||
| 340 | xfs_trans_ail_cursor_clear(ailp, lip); | ||
| 341 | } | ||
| 342 | |||
| 343 | /* | ||
| 344 | * xfs_ail_worker does the work of pushing on the AIL. It will requeue itself | ||
| 345 | * to run at a later time if there is more work to do to complete the push. | ||
| 346 | */ | ||
| 347 | STATIC void | ||
| 348 | xfs_ail_worker( | ||
| 349 | struct work_struct *work) | ||
| 350 | { | ||
| 351 | struct xfs_ail *ailp = container_of(to_delayed_work(work), | ||
| 352 | struct xfs_ail, xa_work); | ||
| 353 | long tout; | ||
| 249 | xfs_lsn_t target = ailp->xa_target; | 354 | xfs_lsn_t target = ailp->xa_target; |
| 250 | xfs_lsn_t lsn; | 355 | xfs_lsn_t lsn; |
| 251 | xfs_log_item_t *lip; | 356 | xfs_log_item_t *lip; |
| @@ -256,15 +361,15 @@ xfsaild_push( | |||
| 256 | 361 | ||
| 257 | spin_lock(&ailp->xa_lock); | 362 | spin_lock(&ailp->xa_lock); |
| 258 | xfs_trans_ail_cursor_init(ailp, cur); | 363 | xfs_trans_ail_cursor_init(ailp, cur); |
| 259 | lip = xfs_trans_ail_cursor_first(ailp, cur, *last_lsn); | 364 | lip = xfs_trans_ail_cursor_first(ailp, cur, ailp->xa_last_pushed_lsn); |
| 260 | if (!lip || XFS_FORCED_SHUTDOWN(mp)) { | 365 | if (!lip || XFS_FORCED_SHUTDOWN(mp)) { |
| 261 | /* | 366 | /* |
| 262 | * AIL is empty or our push has reached the end. | 367 | * AIL is empty or our push has reached the end. |
| 263 | */ | 368 | */ |
| 264 | xfs_trans_ail_cursor_done(ailp, cur); | 369 | xfs_trans_ail_cursor_done(ailp, cur); |
| 265 | spin_unlock(&ailp->xa_lock); | 370 | spin_unlock(&ailp->xa_lock); |
| 266 | *last_lsn = 0; | 371 | ailp->xa_last_pushed_lsn = 0; |
| 267 | return tout; | 372 | return; |
| 268 | } | 373 | } |
| 269 | 374 | ||
| 270 | XFS_STATS_INC(xs_push_ail); | 375 | XFS_STATS_INC(xs_push_ail); |
| @@ -301,13 +406,13 @@ xfsaild_push( | |||
| 301 | case XFS_ITEM_SUCCESS: | 406 | case XFS_ITEM_SUCCESS: |
| 302 | XFS_STATS_INC(xs_push_ail_success); | 407 | XFS_STATS_INC(xs_push_ail_success); |
| 303 | IOP_PUSH(lip); | 408 | IOP_PUSH(lip); |
| 304 | last_pushed_lsn = lsn; | 409 | ailp->xa_last_pushed_lsn = lsn; |
| 305 | break; | 410 | break; |
| 306 | 411 | ||
| 307 | case XFS_ITEM_PUSHBUF: | 412 | case XFS_ITEM_PUSHBUF: |
| 308 | XFS_STATS_INC(xs_push_ail_pushbuf); | 413 | XFS_STATS_INC(xs_push_ail_pushbuf); |
| 309 | IOP_PUSHBUF(lip); | 414 | IOP_PUSHBUF(lip); |
| 310 | last_pushed_lsn = lsn; | 415 | ailp->xa_last_pushed_lsn = lsn; |
| 311 | push_xfsbufd = 1; | 416 | push_xfsbufd = 1; |
| 312 | break; | 417 | break; |
| 313 | 418 | ||
| @@ -319,7 +424,7 @@ xfsaild_push( | |||
| 319 | 424 | ||
| 320 | case XFS_ITEM_LOCKED: | 425 | case XFS_ITEM_LOCKED: |
| 321 | XFS_STATS_INC(xs_push_ail_locked); | 426 | XFS_STATS_INC(xs_push_ail_locked); |
| 322 | last_pushed_lsn = lsn; | 427 | ailp->xa_last_pushed_lsn = lsn; |
| 323 | stuck++; | 428 | stuck++; |
| 324 | break; | 429 | break; |
| 325 | 430 | ||
| @@ -374,9 +479,23 @@ xfsaild_push( | |||
| 374 | wake_up_process(mp->m_ddev_targp->bt_task); | 479 | wake_up_process(mp->m_ddev_targp->bt_task); |
| 375 | } | 480 | } |
| 376 | 481 | ||
| 482 | /* assume we have more work to do in a short while */ | ||
| 483 | tout = 10; | ||
| 377 | if (!count) { | 484 | if (!count) { |
| 378 | /* We're past our target or empty, so idle */ | 485 | /* We're past our target or empty, so idle */ |
| 379 | last_pushed_lsn = 0; | 486 | ailp->xa_last_pushed_lsn = 0; |
| 487 | |||
| 488 | /* | ||
| 489 | * Check for an updated push target before clearing the | ||
| 490 | * XFS_AIL_PUSHING_BIT. If the target changed, we've got more | ||
| 491 | * work to do. Wait a bit longer before starting that work. | ||
| 492 | */ | ||
| 493 | smp_rmb(); | ||
| 494 | if (ailp->xa_target == target) { | ||
| 495 | clear_bit(XFS_AIL_PUSHING_BIT, &ailp->xa_flags); | ||
| 496 | return; | ||
| 497 | } | ||
| 498 | tout = 50; | ||
| 380 | } else if (XFS_LSN_CMP(lsn, target) >= 0) { | 499 | } else if (XFS_LSN_CMP(lsn, target) >= 0) { |
| 381 | /* | 500 | /* |
| 382 | * We reached the target so wait a bit longer for I/O to | 501 | * We reached the target so wait a bit longer for I/O to |
| @@ -384,7 +503,7 @@ xfsaild_push( | |||
| 384 | * start the next scan from the start of the AIL. | 503 | * start the next scan from the start of the AIL. |
| 385 | */ | 504 | */ |
| 386 | tout = 50; | 505 | tout = 50; |
| 387 | last_pushed_lsn = 0; | 506 | ailp->xa_last_pushed_lsn = 0; |
| 388 | } else if ((stuck * 100) / count > 90) { | 507 | } else if ((stuck * 100) / count > 90) { |
| 389 | /* | 508 | /* |
| 390 | * Either there is a lot of contention on the AIL or we | 509 | * Either there is a lot of contention on the AIL or we |
| @@ -396,14 +515,61 @@ xfsaild_push( | |||
| 396 | * continuing from where we were. | 515 | * continuing from where we were. |
| 397 | */ | 516 | */ |
| 398 | tout = 20; | 517 | tout = 20; |
| 399 | } else { | ||
| 400 | /* more to do, but wait a short while before continuing */ | ||
| 401 | tout = 10; | ||
| 402 | } | 518 | } |
| 403 | *last_lsn = last_pushed_lsn; | 519 | |
| 404 | return tout; | 520 | /* There is more to do, requeue us. */ |
| 521 | queue_delayed_work(xfs_syncd_wq, &ailp->xa_work, | ||
| 522 | msecs_to_jiffies(tout)); | ||
| 523 | } | ||
| 524 | |||
| 525 | /* | ||
| 526 | * This routine is called to move the tail of the AIL forward. It does this by | ||
| 527 | * trying to flush items in the AIL whose lsns are below the given | ||
| 528 | * threshold_lsn. | ||
| 529 | * | ||
| 530 | * The push is run asynchronously in a workqueue, which means the caller needs | ||
| 531 | * to handle waiting on the async flush for space to become available. | ||
| 532 | * We don't want to interrupt any push that is in progress, hence we only queue | ||
| 533 | * work if we set the pushing bit approriately. | ||
| 534 | * | ||
| 535 | * We do this unlocked - we only need to know whether there is anything in the | ||
| 536 | * AIL at the time we are called. We don't need to access the contents of | ||
| 537 | * any of the objects, so the lock is not needed. | ||
| 538 | */ | ||
| 539 | void | ||
| 540 | xfs_ail_push( | ||
| 541 | struct xfs_ail *ailp, | ||
| 542 | xfs_lsn_t threshold_lsn) | ||
| 543 | { | ||
| 544 | xfs_log_item_t *lip; | ||
| 545 | |||
| 546 | lip = xfs_ail_min(ailp); | ||
| 547 | if (!lip || XFS_FORCED_SHUTDOWN(ailp->xa_mount) || | ||
| 548 | XFS_LSN_CMP(threshold_lsn, ailp->xa_target) <= 0) | ||
| 549 | return; | ||
| 550 | |||
| 551 | /* | ||
| 552 | * Ensure that the new target is noticed in push code before it clears | ||
| 553 | * the XFS_AIL_PUSHING_BIT. | ||
| 554 | */ | ||
| 555 | smp_wmb(); | ||
| 556 | ailp->xa_target = threshold_lsn; | ||
| 557 | if (!test_and_set_bit(XFS_AIL_PUSHING_BIT, &ailp->xa_flags)) | ||
| 558 | queue_delayed_work(xfs_syncd_wq, &ailp->xa_work, 0); | ||
| 405 | } | 559 | } |
| 406 | 560 | ||
| 561 | /* | ||
| 562 | * Push out all items in the AIL immediately | ||
| 563 | */ | ||
| 564 | void | ||
| 565 | xfs_ail_push_all( | ||
| 566 | struct xfs_ail *ailp) | ||
| 567 | { | ||
| 568 | xfs_lsn_t threshold_lsn = xfs_ail_max_lsn(ailp); | ||
| 569 | |||
| 570 | if (threshold_lsn) | ||
| 571 | xfs_ail_push(ailp, threshold_lsn); | ||
| 572 | } | ||
| 407 | 573 | ||
| 408 | /* | 574 | /* |
| 409 | * This is to be called when an item is unlocked that may have | 575 | * This is to be called when an item is unlocked that may have |
| @@ -615,7 +781,6 @@ xfs_trans_ail_init( | |||
| 615 | xfs_mount_t *mp) | 781 | xfs_mount_t *mp) |
| 616 | { | 782 | { |
| 617 | struct xfs_ail *ailp; | 783 | struct xfs_ail *ailp; |
| 618 | int error; | ||
| 619 | 784 | ||
| 620 | ailp = kmem_zalloc(sizeof(struct xfs_ail), KM_MAYFAIL); | 785 | ailp = kmem_zalloc(sizeof(struct xfs_ail), KM_MAYFAIL); |
| 621 | if (!ailp) | 786 | if (!ailp) |
| @@ -624,15 +789,9 @@ xfs_trans_ail_init( | |||
| 624 | ailp->xa_mount = mp; | 789 | ailp->xa_mount = mp; |
| 625 | INIT_LIST_HEAD(&ailp->xa_ail); | 790 | INIT_LIST_HEAD(&ailp->xa_ail); |
| 626 | spin_lock_init(&ailp->xa_lock); | 791 | spin_lock_init(&ailp->xa_lock); |
| 627 | error = xfsaild_start(ailp); | 792 | INIT_DELAYED_WORK(&ailp->xa_work, xfs_ail_worker); |
| 628 | if (error) | ||
| 629 | goto out_free_ailp; | ||
| 630 | mp->m_ail = ailp; | 793 | mp->m_ail = ailp; |
| 631 | return 0; | 794 | return 0; |
| 632 | |||
| 633 | out_free_ailp: | ||
| 634 | kmem_free(ailp); | ||
| 635 | return error; | ||
| 636 | } | 795 | } |
| 637 | 796 | ||
| 638 | void | 797 | void |
| @@ -641,124 +800,6 @@ xfs_trans_ail_destroy( | |||
| 641 | { | 800 | { |
| 642 | struct xfs_ail *ailp = mp->m_ail; | 801 | struct xfs_ail *ailp = mp->m_ail; |
| 643 | 802 | ||
| 644 | xfsaild_stop(ailp); | 803 | cancel_delayed_work_sync(&ailp->xa_work); |
| 645 | kmem_free(ailp); | 804 | kmem_free(ailp); |
| 646 | } | 805 | } |
| 647 | |||
| 648 | /* | ||
| 649 | * splice the log item list into the AIL at the given LSN. | ||
| 650 | */ | ||
| 651 | STATIC void | ||
| 652 | xfs_ail_splice( | ||
| 653 | struct xfs_ail *ailp, | ||
| 654 | struct list_head *list, | ||
| 655 | xfs_lsn_t lsn) | ||
| 656 | { | ||
| 657 | xfs_log_item_t *next_lip; | ||
| 658 | |||
| 659 | /* | ||
| 660 | * If the list is empty, just insert the item. | ||
| 661 | */ | ||
| 662 | if (list_empty(&ailp->xa_ail)) { | ||
| 663 | list_splice(list, &ailp->xa_ail); | ||
| 664 | return; | ||
| 665 | } | ||
| 666 | |||
| 667 | list_for_each_entry_reverse(next_lip, &ailp->xa_ail, li_ail) { | ||
| 668 | if (XFS_LSN_CMP(next_lip->li_lsn, lsn) <= 0) | ||
| 669 | break; | ||
| 670 | } | ||
| 671 | |||
| 672 | ASSERT((&next_lip->li_ail == &ailp->xa_ail) || | ||
| 673 | (XFS_LSN_CMP(next_lip->li_lsn, lsn) <= 0)); | ||
| 674 | |||
| 675 | list_splice_init(list, &next_lip->li_ail); | ||
| 676 | return; | ||
| 677 | } | ||
| 678 | |||
| 679 | /* | ||
| 680 | * Delete the given item from the AIL. Return a pointer to the item. | ||
| 681 | */ | ||
| 682 | STATIC void | ||
| 683 | xfs_ail_delete( | ||
| 684 | struct xfs_ail *ailp, | ||
| 685 | xfs_log_item_t *lip) | ||
| 686 | { | ||
| 687 | xfs_ail_check(ailp, lip); | ||
| 688 | list_del(&lip->li_ail); | ||
| 689 | xfs_trans_ail_cursor_clear(ailp, lip); | ||
| 690 | } | ||
| 691 | |||
| 692 | /* | ||
| 693 | * Return a pointer to the first item in the AIL. | ||
| 694 | * If the AIL is empty, then return NULL. | ||
| 695 | */ | ||
| 696 | STATIC xfs_log_item_t * | ||
| 697 | xfs_ail_min( | ||
| 698 | struct xfs_ail *ailp) | ||
| 699 | { | ||
| 700 | if (list_empty(&ailp->xa_ail)) | ||
| 701 | return NULL; | ||
| 702 | |||
| 703 | return list_first_entry(&ailp->xa_ail, xfs_log_item_t, li_ail); | ||
| 704 | } | ||
| 705 | |||
| 706 | /* | ||
| 707 | * Return a pointer to the item which follows | ||
| 708 | * the given item in the AIL. If the given item | ||
| 709 | * is the last item in the list, then return NULL. | ||
| 710 | */ | ||
| 711 | STATIC xfs_log_item_t * | ||
| 712 | xfs_ail_next( | ||
| 713 | struct xfs_ail *ailp, | ||
| 714 | xfs_log_item_t *lip) | ||
| 715 | { | ||
| 716 | if (lip->li_ail.next == &ailp->xa_ail) | ||
| 717 | return NULL; | ||
| 718 | |||
| 719 | return list_first_entry(&lip->li_ail, xfs_log_item_t, li_ail); | ||
| 720 | } | ||
| 721 | |||
| 722 | #ifdef DEBUG | ||
| 723 | /* | ||
| 724 | * Check that the list is sorted as it should be. | ||
| 725 | */ | ||
| 726 | STATIC void | ||
| 727 | xfs_ail_check( | ||
| 728 | struct xfs_ail *ailp, | ||
| 729 | xfs_log_item_t *lip) | ||
| 730 | { | ||
| 731 | xfs_log_item_t *prev_lip; | ||
| 732 | |||
| 733 | if (list_empty(&ailp->xa_ail)) | ||
| 734 | return; | ||
| 735 | |||
| 736 | /* | ||
| 737 | * Check the next and previous entries are valid. | ||
| 738 | */ | ||
| 739 | ASSERT((lip->li_flags & XFS_LI_IN_AIL) != 0); | ||
| 740 | prev_lip = list_entry(lip->li_ail.prev, xfs_log_item_t, li_ail); | ||
| 741 | if (&prev_lip->li_ail != &ailp->xa_ail) | ||
| 742 | ASSERT(XFS_LSN_CMP(prev_lip->li_lsn, lip->li_lsn) <= 0); | ||
| 743 | |||
| 744 | prev_lip = list_entry(lip->li_ail.next, xfs_log_item_t, li_ail); | ||
| 745 | if (&prev_lip->li_ail != &ailp->xa_ail) | ||
| 746 | ASSERT(XFS_LSN_CMP(prev_lip->li_lsn, lip->li_lsn) >= 0); | ||
| 747 | |||
| 748 | |||
| 749 | #ifdef XFS_TRANS_DEBUG | ||
| 750 | /* | ||
| 751 | * Walk the list checking lsn ordering, and that every entry has the | ||
| 752 | * XFS_LI_IN_AIL flag set. This is really expensive, so only do it | ||
| 753 | * when specifically debugging the transaction subsystem. | ||
| 754 | */ | ||
| 755 | prev_lip = list_entry(&ailp->xa_ail, xfs_log_item_t, li_ail); | ||
| 756 | list_for_each_entry(lip, &ailp->xa_ail, li_ail) { | ||
| 757 | if (&prev_lip->li_ail != &ailp->xa_ail) | ||
| 758 | ASSERT(XFS_LSN_CMP(prev_lip->li_lsn, lip->li_lsn) <= 0); | ||
| 759 | ASSERT((lip->li_flags & XFS_LI_IN_AIL) != 0); | ||
| 760 | prev_lip = lip; | ||
| 761 | } | ||
| 762 | #endif /* XFS_TRANS_DEBUG */ | ||
| 763 | } | ||
| 764 | #endif /* DEBUG */ | ||
diff --git a/fs/xfs/xfs_trans_inode.c b/fs/xfs/xfs_trans_inode.c index 16084d8ea231..048b0c689d3e 100644 --- a/fs/xfs/xfs_trans_inode.c +++ b/fs/xfs/xfs_trans_inode.c | |||
| @@ -81,7 +81,7 @@ xfs_trans_ijoin( | |||
| 81 | * | 81 | * |
| 82 | * | 82 | * |
| 83 | * Grabs a reference to the inode which will be dropped when the transaction | 83 | * Grabs a reference to the inode which will be dropped when the transaction |
| 84 | * is commited. The inode will also be unlocked at that point. The inode | 84 | * is committed. The inode will also be unlocked at that point. The inode |
| 85 | * must be locked, and it cannot be associated with any transaction. | 85 | * must be locked, and it cannot be associated with any transaction. |
| 86 | */ | 86 | */ |
| 87 | void | 87 | void |
diff --git a/fs/xfs/xfs_trans_priv.h b/fs/xfs/xfs_trans_priv.h index 35162c238fa3..6b164e9e9a1f 100644 --- a/fs/xfs/xfs_trans_priv.h +++ b/fs/xfs/xfs_trans_priv.h | |||
| @@ -65,16 +65,22 @@ struct xfs_ail_cursor { | |||
| 65 | struct xfs_ail { | 65 | struct xfs_ail { |
| 66 | struct xfs_mount *xa_mount; | 66 | struct xfs_mount *xa_mount; |
| 67 | struct list_head xa_ail; | 67 | struct list_head xa_ail; |
| 68 | uint xa_gen; | ||
| 69 | struct task_struct *xa_task; | ||
| 70 | xfs_lsn_t xa_target; | 68 | xfs_lsn_t xa_target; |
| 71 | struct xfs_ail_cursor xa_cursors; | 69 | struct xfs_ail_cursor xa_cursors; |
| 72 | spinlock_t xa_lock; | 70 | spinlock_t xa_lock; |
| 71 | struct delayed_work xa_work; | ||
| 72 | xfs_lsn_t xa_last_pushed_lsn; | ||
| 73 | unsigned long xa_flags; | ||
| 73 | }; | 74 | }; |
| 74 | 75 | ||
| 76 | #define XFS_AIL_PUSHING_BIT 0 | ||
| 77 | |||
| 75 | /* | 78 | /* |
| 76 | * From xfs_trans_ail.c | 79 | * From xfs_trans_ail.c |
| 77 | */ | 80 | */ |
| 81 | |||
| 82 | extern struct workqueue_struct *xfs_ail_wq; /* AIL workqueue */ | ||
| 83 | |||
| 78 | void xfs_trans_ail_update_bulk(struct xfs_ail *ailp, | 84 | void xfs_trans_ail_update_bulk(struct xfs_ail *ailp, |
| 79 | struct xfs_log_item **log_items, int nr_items, | 85 | struct xfs_log_item **log_items, int nr_items, |
| 80 | xfs_lsn_t lsn) __releases(ailp->xa_lock); | 86 | xfs_lsn_t lsn) __releases(ailp->xa_lock); |
| @@ -98,12 +104,13 @@ xfs_trans_ail_delete( | |||
| 98 | xfs_trans_ail_delete_bulk(ailp, &lip, 1); | 104 | xfs_trans_ail_delete_bulk(ailp, &lip, 1); |
| 99 | } | 105 | } |
| 100 | 106 | ||
| 101 | void xfs_trans_ail_push(struct xfs_ail *, xfs_lsn_t); | 107 | void xfs_ail_push(struct xfs_ail *, xfs_lsn_t); |
| 108 | void xfs_ail_push_all(struct xfs_ail *); | ||
| 109 | xfs_lsn_t xfs_ail_min_lsn(struct xfs_ail *ailp); | ||
| 110 | |||
| 102 | void xfs_trans_unlocked_item(struct xfs_ail *, | 111 | void xfs_trans_unlocked_item(struct xfs_ail *, |
| 103 | xfs_log_item_t *); | 112 | xfs_log_item_t *); |
| 104 | 113 | ||
| 105 | xfs_lsn_t xfs_trans_ail_tail(struct xfs_ail *ailp); | ||
| 106 | |||
| 107 | struct xfs_log_item *xfs_trans_ail_cursor_first(struct xfs_ail *ailp, | 114 | struct xfs_log_item *xfs_trans_ail_cursor_first(struct xfs_ail *ailp, |
| 108 | struct xfs_ail_cursor *cur, | 115 | struct xfs_ail_cursor *cur, |
| 109 | xfs_lsn_t lsn); | 116 | xfs_lsn_t lsn); |
| @@ -112,11 +119,6 @@ struct xfs_log_item *xfs_trans_ail_cursor_next(struct xfs_ail *ailp, | |||
| 112 | void xfs_trans_ail_cursor_done(struct xfs_ail *ailp, | 119 | void xfs_trans_ail_cursor_done(struct xfs_ail *ailp, |
| 113 | struct xfs_ail_cursor *cur); | 120 | struct xfs_ail_cursor *cur); |
| 114 | 121 | ||
| 115 | long xfsaild_push(struct xfs_ail *, xfs_lsn_t *); | ||
| 116 | void xfsaild_wakeup(struct xfs_ail *, xfs_lsn_t); | ||
| 117 | int xfsaild_start(struct xfs_ail *); | ||
| 118 | void xfsaild_stop(struct xfs_ail *); | ||
| 119 | |||
| 120 | #if BITS_PER_LONG != 64 | 122 | #if BITS_PER_LONG != 64 |
| 121 | static inline void | 123 | static inline void |
| 122 | xfs_trans_ail_copy_lsn( | 124 | xfs_trans_ail_copy_lsn( |
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index c48b4217ec47..b7a5fe7c52c8 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
| @@ -953,7 +953,7 @@ xfs_release( | |||
| 953 | * If we previously truncated this file and removed old data | 953 | * If we previously truncated this file and removed old data |
| 954 | * in the process, we want to initiate "early" writeout on | 954 | * in the process, we want to initiate "early" writeout on |
| 955 | * the last close. This is an attempt to combat the notorious | 955 | * the last close. This is an attempt to combat the notorious |
| 956 | * NULL files problem which is particularly noticable from a | 956 | * NULL files problem which is particularly noticeable from a |
| 957 | * truncate down, buffered (re-)write (delalloc), followed by | 957 | * truncate down, buffered (re-)write (delalloc), followed by |
| 958 | * a crash. What we are effectively doing here is | 958 | * a crash. What we are effectively doing here is |
| 959 | * significantly reducing the time window where we'd otherwise | 959 | * significantly reducing the time window where we'd otherwise |
| @@ -982,7 +982,7 @@ xfs_release( | |||
| 982 | * | 982 | * |
| 983 | * Further, check if the inode is being opened, written and | 983 | * Further, check if the inode is being opened, written and |
| 984 | * closed frequently and we have delayed allocation blocks | 984 | * closed frequently and we have delayed allocation blocks |
| 985 | * oustanding (e.g. streaming writes from the NFS server), | 985 | * outstanding (e.g. streaming writes from the NFS server), |
| 986 | * truncating the blocks past EOF will cause fragmentation to | 986 | * truncating the blocks past EOF will cause fragmentation to |
| 987 | * occur. | 987 | * occur. |
| 988 | * | 988 | * |
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index d41c94885211..f1380287ed4d 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h | |||
| @@ -290,7 +290,7 @@ struct acpi_table_fadt { | |||
| 290 | #define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: [V4] All local APICs must use cluster model (ACPI 3.0) */ | 290 | #define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: [V4] All local APICs must use cluster model (ACPI 3.0) */ |
| 291 | #define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: [V4] All local x_aPICs must use physical dest mode (ACPI 3.0) */ | 291 | #define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: [V4] All local x_aPICs must use physical dest mode (ACPI 3.0) */ |
| 292 | 292 | ||
| 293 | /* Values for preferred_profile (Prefered Power Management Profiles) */ | 293 | /* Values for preferred_profile (Preferred Power Management Profiles) */ |
| 294 | 294 | ||
| 295 | enum acpi_prefered_pm_profiles { | 295 | enum acpi_prefered_pm_profiles { |
| 296 | PM_UNSPECIFIED = 0, | 296 | PM_UNSPECIFIED = 0, |
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index f2d2faf4d9ae..e5a3f5880001 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
| @@ -194,6 +194,13 @@ extern void warn_slowpath_null(const char *file, const int line); | |||
| 194 | #ifdef CONFIG_SMP | 194 | #ifdef CONFIG_SMP |
| 195 | # define WARN_ON_SMP(x) WARN_ON(x) | 195 | # define WARN_ON_SMP(x) WARN_ON(x) |
| 196 | #else | 196 | #else |
| 197 | /* | ||
| 198 | * Use of ({0;}) because WARN_ON_SMP(x) may be used either as | ||
| 199 | * a stand alone line statement or as a condition in an if () | ||
| 200 | * statement. | ||
| 201 | * A simple "0" would cause gcc to give a "statement has no effect" | ||
| 202 | * warning. | ||
| 203 | */ | ||
| 197 | # define WARN_ON_SMP(x) ({0;}) | 204 | # define WARN_ON_SMP(x) ({0;}) |
| 198 | #endif | 205 | #endif |
| 199 | 206 | ||
diff --git a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h index 942d30b5aab1..0dd4e87f6fba 100644 --- a/include/asm-generic/siginfo.h +++ b/include/asm-generic/siginfo.h | |||
| @@ -192,7 +192,7 @@ typedef struct siginfo { | |||
| 192 | * SIGBUS si_codes | 192 | * SIGBUS si_codes |
| 193 | */ | 193 | */ |
| 194 | #define BUS_ADRALN (__SI_FAULT|1) /* invalid address alignment */ | 194 | #define BUS_ADRALN (__SI_FAULT|1) /* invalid address alignment */ |
| 195 | #define BUS_ADRERR (__SI_FAULT|2) /* non-existant physical address */ | 195 | #define BUS_ADRERR (__SI_FAULT|2) /* non-existent physical address */ |
| 196 | #define BUS_OBJERR (__SI_FAULT|3) /* object specific hardware error */ | 196 | #define BUS_OBJERR (__SI_FAULT|3) /* object specific hardware error */ |
| 197 | /* hardware memory error consumed on a machine check: action required */ | 197 | /* hardware memory error consumed on a machine check: action required */ |
| 198 | #define BUS_MCEERR_AR (__SI_FAULT|4) | 198 | #define BUS_MCEERR_AR (__SI_FAULT|4) |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 32c45e5fe0ab..bd297a20ab98 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
| @@ -773,7 +773,7 @@ | |||
| 773 | * the sections that has this restriction (or similar) | 773 | * the sections that has this restriction (or similar) |
| 774 | * is located before the ones requiring PAGE_SIZE alignment. | 774 | * is located before the ones requiring PAGE_SIZE alignment. |
| 775 | * NOSAVE_DATA starts and ends with a PAGE_SIZE alignment which | 775 | * NOSAVE_DATA starts and ends with a PAGE_SIZE alignment which |
| 776 | * matches the requirment of PAGE_ALIGNED_DATA. | 776 | * matches the requirement of PAGE_ALIGNED_DATA. |
| 777 | * | 777 | * |
| 778 | * use 0 as page_align if page_aligned data is not used */ | 778 | * use 0 as page_align if page_aligned data is not used */ |
| 779 | #define RW_DATA_SECTION(cacheline, pagealigned, inittask) \ | 779 | #define RW_DATA_SECTION(cacheline, pagealigned, inittask) \ |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index ad5770f2315c..202424d17ed7 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
| @@ -95,7 +95,7 @@ struct drm_device; | |||
| 95 | * drm_core, drm_driver, drm_kms | 95 | * drm_core, drm_driver, drm_kms |
| 96 | * drm_core level can be used in the generic drm code. For example: | 96 | * drm_core level can be used in the generic drm code. For example: |
| 97 | * drm_ioctl, drm_mm, drm_memory | 97 | * drm_ioctl, drm_mm, drm_memory |
| 98 | * The macro definiton of DRM_DEBUG is used. | 98 | * The macro definition of DRM_DEBUG is used. |
| 99 | * DRM_DEBUG(fmt, args...) | 99 | * DRM_DEBUG(fmt, args...) |
| 100 | * The debug info by using the DRM_DEBUG can be obtained by adding | 100 | * The debug info by using the DRM_DEBUG can be obtained by adding |
| 101 | * the boot option of "drm.debug=1". | 101 | * the boot option of "drm.debug=1". |
| @@ -808,7 +808,7 @@ struct drm_driver { | |||
| 808 | * | 808 | * |
| 809 | * \return Flags, or'ed together as follows: | 809 | * \return Flags, or'ed together as follows: |
| 810 | * | 810 | * |
| 811 | * DRM_SCANOUTPOS_VALID = Query successfull. | 811 | * DRM_SCANOUTPOS_VALID = Query successful. |
| 812 | * DRM_SCANOUTPOS_INVBL = Inside vblank. | 812 | * DRM_SCANOUTPOS_INVBL = Inside vblank. |
| 813 | * DRM_SCANOUTPOS_ACCURATE = Returned position is accurate. A lack of | 813 | * DRM_SCANOUTPOS_ACCURATE = Returned position is accurate. A lack of |
| 814 | * this flag means that returned position may be offset by a constant | 814 | * this flag means that returned position may be offset by a constant |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 60edf9be31e5..d94684b7ba34 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
| @@ -65,7 +65,7 @@ enum drm_mode_status { | |||
| 65 | MODE_H_ILLEGAL, /* mode has illegal horizontal timings */ | 65 | MODE_H_ILLEGAL, /* mode has illegal horizontal timings */ |
| 66 | MODE_V_ILLEGAL, /* mode has illegal horizontal timings */ | 66 | MODE_V_ILLEGAL, /* mode has illegal horizontal timings */ |
| 67 | MODE_BAD_WIDTH, /* requires an unsupported linepitch */ | 67 | MODE_BAD_WIDTH, /* requires an unsupported linepitch */ |
| 68 | MODE_NOMODE, /* no mode with a maching name */ | 68 | MODE_NOMODE, /* no mode with a matching name */ |
| 69 | MODE_NO_INTERLACE, /* interlaced mode not supported */ | 69 | MODE_NO_INTERLACE, /* interlaced mode not supported */ |
| 70 | MODE_NO_DBLESCAN, /* doublescan mode not supported */ | 70 | MODE_NO_DBLESCAN, /* doublescan mode not supported */ |
| 71 | MODE_NO_VSCAN, /* multiscan mode not supported */ | 71 | MODE_NO_VSCAN, /* multiscan mode not supported */ |
| @@ -321,7 +321,7 @@ struct drm_crtc_funcs { | |||
| 321 | 321 | ||
| 322 | /* | 322 | /* |
| 323 | * Flip to the given framebuffer. This implements the page | 323 | * Flip to the given framebuffer. This implements the page |
| 324 | * flip ioctl descibed in drm_mode.h, specifically, the | 324 | * flip ioctl described in drm_mode.h, specifically, the |
| 325 | * implementation must return immediately and block all | 325 | * implementation must return immediately and block all |
| 326 | * rendering to the current fb until the flip has completed. | 326 | * rendering to the current fb until the flip has completed. |
| 327 | * If userspace set the event flag in the ioctl, the event | 327 | * If userspace set the event flag in the ioctl, the event |
| @@ -778,6 +778,7 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev, | |||
| 778 | void *data, struct drm_file *file_priv); | 778 | void *data, struct drm_file *file_priv); |
| 779 | extern int drm_mode_gamma_set_ioctl(struct drm_device *dev, | 779 | extern int drm_mode_gamma_set_ioctl(struct drm_device *dev, |
| 780 | void *data, struct drm_file *file_priv); | 780 | void *data, struct drm_file *file_priv); |
| 781 | extern u8 *drm_find_cea_extension(struct edid *edid); | ||
| 781 | extern bool drm_detect_hdmi_monitor(struct edid *edid); | 782 | extern bool drm_detect_hdmi_monitor(struct edid *edid); |
| 782 | extern bool drm_detect_monitor_audio(struct edid *edid); | 783 | extern bool drm_detect_monitor_audio(struct edid *edid); |
| 783 | extern int drm_mode_page_flip_ioctl(struct drm_device *dev, | 784 | extern int drm_mode_page_flip_ioctl(struct drm_device *dev, |
diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h index b1e7809e5e15..c2f93a8ae2e1 100644 --- a/include/drm/drm_mm.h +++ b/include/drm/drm_mm.h | |||
| @@ -56,7 +56,7 @@ struct drm_mm_node { | |||
| 56 | }; | 56 | }; |
| 57 | 57 | ||
| 58 | struct drm_mm { | 58 | struct drm_mm { |
| 59 | /* List of all memory nodes that immediatly preceed a free hole. */ | 59 | /* List of all memory nodes that immediately precede a free hole. */ |
| 60 | struct list_head hole_stack; | 60 | struct list_head hole_stack; |
| 61 | /* head_node.node_list is the list of all memory nodes, ordered | 61 | /* head_node.node_list is the list of all memory nodes, ordered |
| 62 | * according to the (increasing) start address of the memory node. */ | 62 | * according to the (increasing) start address of the memory node. */ |
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index ae6b7a3dbec7..c4961ea50a49 100644 --- a/include/drm/drm_mode.h +++ b/include/drm/drm_mode.h | |||
| @@ -277,7 +277,7 @@ struct drm_mode_mode_cmd { | |||
| 277 | #define DRM_MODE_CURSOR_MOVE (1<<1) | 277 | #define DRM_MODE_CURSOR_MOVE (1<<1) |
| 278 | 278 | ||
| 279 | /* | 279 | /* |
| 280 | * depending on the value in flags diffrent members are used. | 280 | * depending on the value in flags different members are used. |
| 281 | * | 281 | * |
| 282 | * CURSOR_BO uses | 282 | * CURSOR_BO uses |
| 283 | * crtc | 283 | * crtc |
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 820ee9029482..816e30cbd968 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
| @@ -472,6 +472,8 @@ | |||
| 472 | {0x1002, 0x9803, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 472 | {0x1002, 0x9803, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 473 | {0x1002, 0x9804, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 473 | {0x1002, 0x9804, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 474 | {0x1002, 0x9805, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 474 | {0x1002, 0x9805, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 475 | {0x1002, 0x9806, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
| 476 | {0x1002, 0x9807, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
| 475 | {0, 0, 0} | 477 | {0, 0, 0} |
| 476 | 478 | ||
| 477 | #define r128_PCI_IDS \ | 479 | #define r128_PCI_IDS \ |
diff --git a/include/drm/mga_drm.h b/include/drm/mga_drm.h index c16097f99be0..fca817009e13 100644 --- a/include/drm/mga_drm.h +++ b/include/drm/mga_drm.h | |||
| @@ -107,7 +107,7 @@ | |||
| 107 | */ | 107 | */ |
| 108 | #define MGA_NR_SAREA_CLIPRECTS 8 | 108 | #define MGA_NR_SAREA_CLIPRECTS 8 |
| 109 | 109 | ||
| 110 | /* 2 heaps (1 for card, 1 for agp), each divided into upto 128 | 110 | /* 2 heaps (1 for card, 1 for agp), each divided into up to 128 |
| 111 | * regions, subject to a minimum region size of (1<<16) == 64k. | 111 | * regions, subject to a minimum region size of (1<<16) == 64k. |
| 112 | * | 112 | * |
| 113 | * Clients may subdivide regions internally, but when sharing between | 113 | * Clients may subdivide regions internally, but when sharing between |
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h index 3dec41cf8342..3bce1a4fc305 100644 --- a/include/drm/radeon_drm.h +++ b/include/drm/radeon_drm.h | |||
| @@ -641,7 +641,7 @@ typedef struct drm_radeon_vertex2 { | |||
| 641 | } drm_radeon_vertex2_t; | 641 | } drm_radeon_vertex2_t; |
| 642 | 642 | ||
| 643 | /* v1.3 - obsoletes drm_radeon_vertex2 | 643 | /* v1.3 - obsoletes drm_radeon_vertex2 |
| 644 | * - allows arbitarily large cliprect list | 644 | * - allows arbitrarily large cliprect list |
| 645 | * - allows updating of tcl packet, vector and scalar state | 645 | * - allows updating of tcl packet, vector and scalar state |
| 646 | * - allows memory-efficient description of state updates | 646 | * - allows memory-efficient description of state updates |
| 647 | * - allows state to be emitted without a primitive | 647 | * - allows state to be emitted without a primitive |
diff --git a/include/drm/savage_drm.h b/include/drm/savage_drm.h index 4863cf6bf96f..818d49be2e6e 100644 --- a/include/drm/savage_drm.h +++ b/include/drm/savage_drm.h | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | #ifndef __SAVAGE_SAREA_DEFINES__ | 29 | #ifndef __SAVAGE_SAREA_DEFINES__ |
| 30 | #define __SAVAGE_SAREA_DEFINES__ | 30 | #define __SAVAGE_SAREA_DEFINES__ |
| 31 | 31 | ||
| 32 | /* 2 heaps (1 for card, 1 for agp), each divided into upto 128 | 32 | /* 2 heaps (1 for card, 1 for agp), each divided into up to 128 |
| 33 | * regions, subject to a minimum region size of (1<<16) == 64k. | 33 | * regions, subject to a minimum region size of (1<<16) == 64k. |
| 34 | * | 34 | * |
| 35 | * Clients may subdivide regions internally, but when sharing between | 35 | * Clients may subdivide regions internally, but when sharing between |
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h index 50852aad260a..62a0e4c4ceee 100644 --- a/include/drm/ttm/ttm_bo_api.h +++ b/include/drm/ttm/ttm_bo_api.h | |||
| @@ -50,10 +50,10 @@ struct drm_mm_node; | |||
| 50 | * | 50 | * |
| 51 | * @fpfn: first valid page frame number to put the object | 51 | * @fpfn: first valid page frame number to put the object |
| 52 | * @lpfn: last valid page frame number to put the object | 52 | * @lpfn: last valid page frame number to put the object |
| 53 | * @num_placement: number of prefered placements | 53 | * @num_placement: number of preferred placements |
| 54 | * @placement: prefered placements | 54 | * @placement: preferred placements |
| 55 | * @num_busy_placement: number of prefered placements when need to evict buffer | 55 | * @num_busy_placement: number of preferred placements when need to evict buffer |
| 56 | * @busy_placement: prefered placements when need to evict buffer | 56 | * @busy_placement: preferred placements when need to evict buffer |
| 57 | * | 57 | * |
| 58 | * Structure indicating the placement you request for an object. | 58 | * Structure indicating the placement you request for an object. |
| 59 | */ | 59 | */ |
| @@ -158,9 +158,9 @@ struct ttm_tt; | |||
| 158 | * the object is destroyed. | 158 | * the object is destroyed. |
| 159 | * @event_queue: Queue for processes waiting on buffer object status change. | 159 | * @event_queue: Queue for processes waiting on buffer object status change. |
| 160 | * @mem: structure describing current placement. | 160 | * @mem: structure describing current placement. |
| 161 | * @persistant_swap_storage: Usually the swap storage is deleted for buffers | 161 | * @persistent_swap_storage: Usually the swap storage is deleted for buffers |
| 162 | * pinned in physical memory. If this behaviour is not desired, this member | 162 | * pinned in physical memory. If this behaviour is not desired, this member |
| 163 | * holds a pointer to a persistant shmem object. | 163 | * holds a pointer to a persistent shmem object. |
| 164 | * @ttm: TTM structure holding system pages. | 164 | * @ttm: TTM structure holding system pages. |
| 165 | * @evicted: Whether the object was evicted without user-space knowing. | 165 | * @evicted: Whether the object was evicted without user-space knowing. |
| 166 | * @cpu_writes: For synchronization. Number of cpu writers. | 166 | * @cpu_writes: For synchronization. Number of cpu writers. |
| @@ -221,7 +221,7 @@ struct ttm_buffer_object { | |||
| 221 | */ | 221 | */ |
| 222 | 222 | ||
| 223 | struct ttm_mem_reg mem; | 223 | struct ttm_mem_reg mem; |
| 224 | struct file *persistant_swap_storage; | 224 | struct file *persistent_swap_storage; |
| 225 | struct ttm_tt *ttm; | 225 | struct ttm_tt *ttm; |
| 226 | bool evicted; | 226 | bool evicted; |
| 227 | 227 | ||
| @@ -459,9 +459,9 @@ extern void ttm_bo_synccpu_write_release(struct ttm_buffer_object *bo); | |||
| 459 | * user buffer object. | 459 | * user buffer object. |
| 460 | * @interruptible: If needing to sleep to wait for GPU resources, | 460 | * @interruptible: If needing to sleep to wait for GPU resources, |
| 461 | * sleep interruptible. | 461 | * sleep interruptible. |
| 462 | * @persistant_swap_storage: Usually the swap storage is deleted for buffers | 462 | * @persistent_swap_storage: Usually the swap storage is deleted for buffers |
| 463 | * pinned in physical memory. If this behaviour is not desired, this member | 463 | * pinned in physical memory. If this behaviour is not desired, this member |
| 464 | * holds a pointer to a persistant shmem object. Typically, this would | 464 | * holds a pointer to a persistent shmem object. Typically, this would |
| 465 | * point to the shmem object backing a GEM object if TTM is used to back a | 465 | * point to the shmem object backing a GEM object if TTM is used to back a |
| 466 | * GEM user interface. | 466 | * GEM user interface. |
| 467 | * @acc_size: Accounted size for this object. | 467 | * @acc_size: Accounted size for this object. |
| @@ -490,7 +490,7 @@ extern int ttm_bo_init(struct ttm_bo_device *bdev, | |||
| 490 | uint32_t page_alignment, | 490 | uint32_t page_alignment, |
| 491 | unsigned long buffer_start, | 491 | unsigned long buffer_start, |
| 492 | bool interrubtible, | 492 | bool interrubtible, |
| 493 | struct file *persistant_swap_storage, | 493 | struct file *persistent_swap_storage, |
| 494 | size_t acc_size, | 494 | size_t acc_size, |
| 495 | void (*destroy) (struct ttm_buffer_object *)); | 495 | void (*destroy) (struct ttm_buffer_object *)); |
| 496 | /** | 496 | /** |
| @@ -506,9 +506,9 @@ extern int ttm_bo_init(struct ttm_bo_device *bdev, | |||
| 506 | * user buffer object. | 506 | * user buffer object. |
| 507 | * @interruptible: If needing to sleep while waiting for GPU resources, | 507 | * @interruptible: If needing to sleep while waiting for GPU resources, |
| 508 | * sleep interruptible. | 508 | * sleep interruptible. |
| 509 | * @persistant_swap_storage: Usually the swap storage is deleted for buffers | 509 | * @persistent_swap_storage: Usually the swap storage is deleted for buffers |
| 510 | * pinned in physical memory. If this behaviour is not desired, this member | 510 | * pinned in physical memory. If this behaviour is not desired, this member |
| 511 | * holds a pointer to a persistant shmem object. Typically, this would | 511 | * holds a pointer to a persistent shmem object. Typically, this would |
| 512 | * point to the shmem object backing a GEM object if TTM is used to back a | 512 | * point to the shmem object backing a GEM object if TTM is used to back a |
| 513 | * GEM user interface. | 513 | * GEM user interface. |
| 514 | * @p_bo: On successful completion *p_bo points to the created object. | 514 | * @p_bo: On successful completion *p_bo points to the created object. |
| @@ -528,7 +528,7 @@ extern int ttm_bo_create(struct ttm_bo_device *bdev, | |||
| 528 | uint32_t page_alignment, | 528 | uint32_t page_alignment, |
| 529 | unsigned long buffer_start, | 529 | unsigned long buffer_start, |
| 530 | bool interruptible, | 530 | bool interruptible, |
| 531 | struct file *persistant_swap_storage, | 531 | struct file *persistent_swap_storage, |
| 532 | struct ttm_buffer_object **p_bo); | 532 | struct ttm_buffer_object **p_bo); |
| 533 | 533 | ||
| 534 | /** | 534 | /** |
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index efed0820d9fa..09af2d746d1c 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
| @@ -122,7 +122,7 @@ struct ttm_backend { | |||
| 122 | #define TTM_PAGE_FLAG_USER_DIRTY (1 << 2) | 122 | #define TTM_PAGE_FLAG_USER_DIRTY (1 << 2) |
| 123 | #define TTM_PAGE_FLAG_WRITE (1 << 3) | 123 | #define TTM_PAGE_FLAG_WRITE (1 << 3) |
| 124 | #define TTM_PAGE_FLAG_SWAPPED (1 << 4) | 124 | #define TTM_PAGE_FLAG_SWAPPED (1 << 4) |
| 125 | #define TTM_PAGE_FLAG_PERSISTANT_SWAP (1 << 5) | 125 | #define TTM_PAGE_FLAG_PERSISTENT_SWAP (1 << 5) |
| 126 | #define TTM_PAGE_FLAG_ZERO_ALLOC (1 << 6) | 126 | #define TTM_PAGE_FLAG_ZERO_ALLOC (1 << 6) |
| 127 | #define TTM_PAGE_FLAG_DMA32 (1 << 7) | 127 | #define TTM_PAGE_FLAG_DMA32 (1 << 7) |
| 128 | 128 | ||
| @@ -223,9 +223,9 @@ struct ttm_mem_type_manager_func { | |||
| 223 | * @mem::mm_node should be set to a non-null value, and | 223 | * @mem::mm_node should be set to a non-null value, and |
| 224 | * @mem::start should be set to a value identifying the beginning | 224 | * @mem::start should be set to a value identifying the beginning |
| 225 | * of the range allocated, and the function should return zero. | 225 | * of the range allocated, and the function should return zero. |
| 226 | * If the memory region accomodate the buffer object, @mem::mm_node | 226 | * If the memory region accommodate the buffer object, @mem::mm_node |
| 227 | * should be set to NULL, and the function should return 0. | 227 | * should be set to NULL, and the function should return 0. |
| 228 | * If a system error occured, preventing the request to be fulfilled, | 228 | * If a system error occurred, preventing the request to be fulfilled, |
| 229 | * the function should return a negative error code. | 229 | * the function should return a negative error code. |
| 230 | * | 230 | * |
| 231 | * Note that @mem::mm_node will only be dereferenced by | 231 | * Note that @mem::mm_node will only be dereferenced by |
| @@ -714,7 +714,7 @@ extern void ttm_tt_cache_flush(struct page *pages[], unsigned long num_pages); | |||
| 714 | */ | 714 | */ |
| 715 | extern int ttm_tt_set_placement_caching(struct ttm_tt *ttm, uint32_t placement); | 715 | extern int ttm_tt_set_placement_caching(struct ttm_tt *ttm, uint32_t placement); |
| 716 | extern int ttm_tt_swapout(struct ttm_tt *ttm, | 716 | extern int ttm_tt_swapout(struct ttm_tt *ttm, |
| 717 | struct file *persistant_swap_storage); | 717 | struct file *persistent_swap_storage); |
| 718 | 718 | ||
| 719 | /* | 719 | /* |
| 720 | * ttm_bo.c | 720 | * ttm_bo.c |
| @@ -841,7 +841,7 @@ extern void ttm_mem_io_unlock(struct ttm_mem_type_manager *man); | |||
| 841 | * different order, either by will or as a result of a buffer being evicted | 841 | * different order, either by will or as a result of a buffer being evicted |
| 842 | * to make room for a buffer already reserved. (Buffers are reserved before | 842 | * to make room for a buffer already reserved. (Buffers are reserved before |
| 843 | * they are evicted). The following algorithm prevents such deadlocks from | 843 | * they are evicted). The following algorithm prevents such deadlocks from |
| 844 | * occuring: | 844 | * occurring: |
| 845 | * 1) Buffers are reserved with the lru spinlock held. Upon successful | 845 | * 1) Buffers are reserved with the lru spinlock held. Upon successful |
| 846 | * reservation they are removed from the lru list. This stops a reserved buffer | 846 | * reservation they are removed from the lru list. This stops a reserved buffer |
| 847 | * from being evicted. However the lru spinlock is released between the time | 847 | * from being evicted. However the lru spinlock is released between the time |
diff --git a/include/drm/vmwgfx_drm.h b/include/drm/vmwgfx_drm.h index 650e6bf6f69f..5c36432d9ce5 100644 --- a/include/drm/vmwgfx_drm.h +++ b/include/drm/vmwgfx_drm.h | |||
| @@ -592,7 +592,7 @@ struct drm_vmw_stream_arg { | |||
| 592 | /** | 592 | /** |
| 593 | * DRM_VMW_UPDATE_LAYOUT - Update layout | 593 | * DRM_VMW_UPDATE_LAYOUT - Update layout |
| 594 | * | 594 | * |
| 595 | * Updates the prefered modes and connection status for connectors. The | 595 | * Updates the preferred modes and connection status for connectors. The |
| 596 | * command conisits of one drm_vmw_update_layout_arg pointing out a array | 596 | * command conisits of one drm_vmw_update_layout_arg pointing out a array |
| 597 | * of num_outputs drm_vmw_rect's. | 597 | * of num_outputs drm_vmw_rect's. |
| 598 | */ | 598 | */ |
diff --git a/include/keys/ceph-type.h b/include/keys/ceph-type.h new file mode 100644 index 000000000000..f69c4ac197a0 --- /dev/null +++ b/include/keys/ceph-type.h | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #ifndef _KEYS_CEPH_TYPE_H | ||
| 2 | #define _KEYS_CEPH_TYPE_H | ||
| 3 | |||
| 4 | #include <linux/key.h> | ||
| 5 | |||
| 6 | extern struct key_type key_type_ceph; | ||
| 7 | |||
| 8 | #endif | ||
diff --git a/include/linux/amba/clcd.h b/include/linux/amba/clcd.h index 24d26efd1432..e82e3ee2c54a 100644 --- a/include/linux/amba/clcd.h +++ b/include/linux/amba/clcd.h | |||
| @@ -136,7 +136,7 @@ struct clcd_board { | |||
| 136 | int (*check)(struct clcd_fb *fb, struct fb_var_screeninfo *var); | 136 | int (*check)(struct clcd_fb *fb, struct fb_var_screeninfo *var); |
| 137 | 137 | ||
| 138 | /* | 138 | /* |
| 139 | * Compulsary. Decode fb->fb.var into regs->*. In the case of | 139 | * Compulsory. Decode fb->fb.var into regs->*. In the case of |
| 140 | * fixed timing, set regs->* to the register values required. | 140 | * fixed timing, set regs->* to the register values required. |
| 141 | */ | 141 | */ |
| 142 | void (*decode)(struct clcd_fb *fb, struct clcd_regs *regs); | 142 | void (*decode)(struct clcd_fb *fb, struct clcd_regs *regs); |
diff --git a/include/linux/amba/mmci.h b/include/linux/amba/mmci.h index f60227088b7b..21114810c7c0 100644 --- a/include/linux/amba/mmci.h +++ b/include/linux/amba/mmci.h | |||
| @@ -30,15 +30,15 @@ struct dma_chan; | |||
| 30 | * @cd_invert: true if the gpio_cd pin value is active low | 30 | * @cd_invert: true if the gpio_cd pin value is active low |
| 31 | * @capabilities: the capabilities of the block as implemented in | 31 | * @capabilities: the capabilities of the block as implemented in |
| 32 | * this platform, signify anything MMC_CAP_* from mmc/host.h | 32 | * this platform, signify anything MMC_CAP_* from mmc/host.h |
| 33 | * @dma_filter: function used to select an apropriate RX and TX | 33 | * @dma_filter: function used to select an appropriate RX and TX |
| 34 | * DMA channel to be used for DMA, if and only if you're deploying the | 34 | * DMA channel to be used for DMA, if and only if you're deploying the |
| 35 | * generic DMA engine | 35 | * generic DMA engine |
| 36 | * @dma_rx_param: parameter passed to the DMA allocation | 36 | * @dma_rx_param: parameter passed to the DMA allocation |
| 37 | * filter in order to select an apropriate RX channel. If | 37 | * filter in order to select an appropriate RX channel. If |
| 38 | * there is a bidirectional RX+TX channel, then just specify | 38 | * there is a bidirectional RX+TX channel, then just specify |
| 39 | * this and leave dma_tx_param set to NULL | 39 | * this and leave dma_tx_param set to NULL |
| 40 | * @dma_tx_param: parameter passed to the DMA allocation | 40 | * @dma_tx_param: parameter passed to the DMA allocation |
| 41 | * filter in order to select an apropriate TX channel. If this | 41 | * filter in order to select an appropriate TX channel. If this |
| 42 | * is NULL the driver will attempt to use the RX channel as a | 42 | * is NULL the driver will attempt to use the RX channel as a |
| 43 | * bidirectional channel | 43 | * bidirectional channel |
| 44 | */ | 44 | */ |
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index 475f8c42c0e9..381f4cec8260 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h | |||
| @@ -443,6 +443,7 @@ void atm_dev_signal_change(struct atm_dev *dev, char signal); | |||
| 443 | 443 | ||
| 444 | void vcc_insert_socket(struct sock *sk); | 444 | void vcc_insert_socket(struct sock *sk); |
| 445 | 445 | ||
| 446 | void atm_dev_release_vccs(struct atm_dev *dev); | ||
| 446 | 447 | ||
| 447 | /* | 448 | /* |
| 448 | * This is approximately the algorithm used by alloc_skb. | 449 | * This is approximately the algorithm used by alloc_skb. |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 16a902f099ac..cbbfd98ad4a3 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -697,7 +697,7 @@ extern void blk_start_queue(struct request_queue *q); | |||
| 697 | extern void blk_stop_queue(struct request_queue *q); | 697 | extern void blk_stop_queue(struct request_queue *q); |
| 698 | extern void blk_sync_queue(struct request_queue *q); | 698 | extern void blk_sync_queue(struct request_queue *q); |
| 699 | extern void __blk_stop_queue(struct request_queue *q); | 699 | extern void __blk_stop_queue(struct request_queue *q); |
| 700 | extern void __blk_run_queue(struct request_queue *q, bool force_kblockd); | 700 | extern void __blk_run_queue(struct request_queue *q); |
| 701 | extern void blk_run_queue(struct request_queue *); | 701 | extern void blk_run_queue(struct request_queue *); |
| 702 | extern int blk_rq_map_user(struct request_queue *, struct request *, | 702 | extern int blk_rq_map_user(struct request_queue *, struct request *, |
| 703 | struct rq_map_data *, void __user *, unsigned long, | 703 | struct rq_map_data *, void __user *, unsigned long, |
| @@ -857,26 +857,39 @@ extern void blk_put_queue(struct request_queue *); | |||
| 857 | struct blk_plug { | 857 | struct blk_plug { |
| 858 | unsigned long magic; | 858 | unsigned long magic; |
| 859 | struct list_head list; | 859 | struct list_head list; |
| 860 | struct list_head cb_list; | ||
| 860 | unsigned int should_sort; | 861 | unsigned int should_sort; |
| 861 | }; | 862 | }; |
| 863 | struct blk_plug_cb { | ||
| 864 | struct list_head list; | ||
| 865 | void (*callback)(struct blk_plug_cb *); | ||
| 866 | }; | ||
| 862 | 867 | ||
| 863 | extern void blk_start_plug(struct blk_plug *); | 868 | extern void blk_start_plug(struct blk_plug *); |
| 864 | extern void blk_finish_plug(struct blk_plug *); | 869 | extern void blk_finish_plug(struct blk_plug *); |
| 865 | extern void __blk_flush_plug(struct task_struct *, struct blk_plug *); | 870 | extern void blk_flush_plug_list(struct blk_plug *, bool); |
| 866 | 871 | ||
| 867 | static inline void blk_flush_plug(struct task_struct *tsk) | 872 | static inline void blk_flush_plug(struct task_struct *tsk) |
| 868 | { | 873 | { |
| 869 | struct blk_plug *plug = tsk->plug; | 874 | struct blk_plug *plug = tsk->plug; |
| 870 | 875 | ||
| 871 | if (unlikely(plug)) | 876 | if (plug) |
| 872 | __blk_flush_plug(tsk, plug); | 877 | blk_flush_plug_list(plug, false); |
| 878 | } | ||
| 879 | |||
| 880 | static inline void blk_schedule_flush_plug(struct task_struct *tsk) | ||
| 881 | { | ||
| 882 | struct blk_plug *plug = tsk->plug; | ||
| 883 | |||
| 884 | if (plug) | ||
| 885 | blk_flush_plug_list(plug, true); | ||
| 873 | } | 886 | } |
| 874 | 887 | ||
| 875 | static inline bool blk_needs_flush_plug(struct task_struct *tsk) | 888 | static inline bool blk_needs_flush_plug(struct task_struct *tsk) |
| 876 | { | 889 | { |
| 877 | struct blk_plug *plug = tsk->plug; | 890 | struct blk_plug *plug = tsk->plug; |
| 878 | 891 | ||
| 879 | return plug && !list_empty(&plug->list); | 892 | return plug && (!list_empty(&plug->list) || !list_empty(&plug->cb_list)); |
| 880 | } | 893 | } |
| 881 | 894 | ||
| 882 | /* | 895 | /* |
| @@ -1206,6 +1219,7 @@ struct blk_integrity { | |||
| 1206 | struct kobject kobj; | 1219 | struct kobject kobj; |
| 1207 | }; | 1220 | }; |
| 1208 | 1221 | ||
| 1222 | extern bool blk_integrity_is_initialized(struct gendisk *); | ||
| 1209 | extern int blk_integrity_register(struct gendisk *, struct blk_integrity *); | 1223 | extern int blk_integrity_register(struct gendisk *, struct blk_integrity *); |
| 1210 | extern void blk_integrity_unregister(struct gendisk *); | 1224 | extern void blk_integrity_unregister(struct gendisk *); |
| 1211 | extern int blk_integrity_compare(struct gendisk *, struct gendisk *); | 1225 | extern int blk_integrity_compare(struct gendisk *, struct gendisk *); |
| @@ -1262,6 +1276,7 @@ queue_max_integrity_segments(struct request_queue *q) | |||
| 1262 | #define queue_max_integrity_segments(a) (0) | 1276 | #define queue_max_integrity_segments(a) (0) |
| 1263 | #define blk_integrity_merge_rq(a, b, c) (0) | 1277 | #define blk_integrity_merge_rq(a, b, c) (0) |
| 1264 | #define blk_integrity_merge_bio(a, b, c) (0) | 1278 | #define blk_integrity_merge_bio(a, b, c) (0) |
| 1279 | #define blk_integrity_is_initialized(a) (0) | ||
| 1265 | 1280 | ||
| 1266 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ | 1281 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ |
| 1267 | 1282 | ||
| @@ -1312,6 +1327,11 @@ static inline void blk_flush_plug(struct task_struct *task) | |||
| 1312 | { | 1327 | { |
| 1313 | } | 1328 | } |
| 1314 | 1329 | ||
| 1330 | static inline void blk_schedule_flush_plug(struct task_struct *task) | ||
| 1331 | { | ||
| 1332 | } | ||
| 1333 | |||
| 1334 | |||
| 1315 | static inline bool blk_needs_flush_plug(struct task_struct *tsk) | 1335 | static inline bool blk_needs_flush_plug(struct task_struct *tsk) |
| 1316 | { | 1336 | { |
| 1317 | return false; | 1337 | return false; |
diff --git a/include/linux/can/error.h b/include/linux/can/error.h index d4127fd9e681..5958074302a4 100644 --- a/include/linux/can/error.h +++ b/include/linux/can/error.h | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | #define CAN_ERR_PROT_BIT1 0x10 /* unable to send recessive bit */ | 51 | #define CAN_ERR_PROT_BIT1 0x10 /* unable to send recessive bit */ |
| 52 | #define CAN_ERR_PROT_OVERLOAD 0x20 /* bus overload */ | 52 | #define CAN_ERR_PROT_OVERLOAD 0x20 /* bus overload */ |
| 53 | #define CAN_ERR_PROT_ACTIVE 0x40 /* active error announcement */ | 53 | #define CAN_ERR_PROT_ACTIVE 0x40 /* active error announcement */ |
| 54 | #define CAN_ERR_PROT_TX 0x80 /* error occured on transmission */ | 54 | #define CAN_ERR_PROT_TX 0x80 /* error occurred on transmission */ |
| 55 | 55 | ||
| 56 | /* error in CAN protocol (location) / data[3] */ | 56 | /* error in CAN protocol (location) / data[3] */ |
| 57 | #define CAN_ERR_PROT_LOC_UNSPEC 0x00 /* unspecified */ | 57 | #define CAN_ERR_PROT_LOC_UNSPEC 0x00 /* unspecified */ |
diff --git a/include/linux/can/netlink.h b/include/linux/can/netlink.h index 3250de935e1a..34542d374dd8 100644 --- a/include/linux/can/netlink.h +++ b/include/linux/can/netlink.h | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | /* | 17 | /* |
| 18 | * CAN bit-timing parameters | 18 | * CAN bit-timing parameters |
| 19 | * | 19 | * |
| 20 | * For futher information, please read chapter "8 BIT TIMING | 20 | * For further information, please read chapter "8 BIT TIMING |
| 21 | * REQUIREMENTS" of the "Bosch CAN Specification version 2.0" | 21 | * REQUIREMENTS" of the "Bosch CAN Specification version 2.0" |
| 22 | * at http://www.semiconductors.bosch.de/pdf/can2spec.pdf. | 22 | * at http://www.semiconductors.bosch.de/pdf/can2spec.pdf. |
| 23 | */ | 23 | */ |
diff --git a/include/linux/can/platform/mcp251x.h b/include/linux/can/platform/mcp251x.h index 8e20540043f5..089fe43211a4 100644 --- a/include/linux/can/platform/mcp251x.h +++ b/include/linux/can/platform/mcp251x.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | /** | 12 | /** |
| 13 | * struct mcp251x_platform_data - MCP251X SPI CAN controller platform data | 13 | * struct mcp251x_platform_data - MCP251X SPI CAN controller platform data |
| 14 | * @oscillator_frequency: - oscillator frequency in Hz | 14 | * @oscillator_frequency: - oscillator frequency in Hz |
| 15 | * @irq_flags: - IRQF configuration flags | ||
| 15 | * @board_specific_setup: - called before probing the chip (power,reset) | 16 | * @board_specific_setup: - called before probing the chip (power,reset) |
| 16 | * @transceiver_enable: - called to power on/off the transceiver | 17 | * @transceiver_enable: - called to power on/off the transceiver |
| 17 | * @power_enable: - called to power on/off the mcp *and* the | 18 | * @power_enable: - called to power on/off the mcp *and* the |
| @@ -24,6 +25,7 @@ | |||
| 24 | 25 | ||
| 25 | struct mcp251x_platform_data { | 26 | struct mcp251x_platform_data { |
| 26 | unsigned long oscillator_frequency; | 27 | unsigned long oscillator_frequency; |
| 28 | unsigned long irq_flags; | ||
| 27 | int (*board_specific_setup)(struct spi_device *spi); | 29 | int (*board_specific_setup)(struct spi_device *spi); |
| 28 | int (*transceiver_enable)(int enable); | 30 | int (*transceiver_enable)(int enable); |
| 29 | int (*power_enable) (int enable); | 31 | int (*power_enable) (int enable); |
diff --git a/include/linux/cdk.h b/include/linux/cdk.h index 0908daf7bf56..80093a8d4f64 100644 --- a/include/linux/cdk.h +++ b/include/linux/cdk.h | |||
| @@ -149,7 +149,7 @@ typedef struct cdkhdr { | |||
| 149 | /* | 149 | /* |
| 150 | * Define the memory mapping structure. This structure is pointed to by | 150 | * Define the memory mapping structure. This structure is pointed to by |
| 151 | * the memp field in the stlcdkhdr struct. As many as these structures | 151 | * the memp field in the stlcdkhdr struct. As many as these structures |
| 152 | * as required are layed out in shared memory to define how the rest of | 152 | * as required are laid out in shared memory to define how the rest of |
| 153 | * shared memory is divided up. There will be one for each port. | 153 | * shared memory is divided up. There will be one for each port. |
| 154 | */ | 154 | */ |
| 155 | typedef struct cdkmem { | 155 | typedef struct cdkmem { |
diff --git a/include/linux/ceph/auth.h b/include/linux/ceph/auth.h index 7fff521d7eb5..aa13392a7efb 100644 --- a/include/linux/ceph/auth.h +++ b/include/linux/ceph/auth.h | |||
| @@ -67,12 +67,12 @@ struct ceph_auth_client { | |||
| 67 | bool negotiating; /* true if negotiating protocol */ | 67 | bool negotiating; /* true if negotiating protocol */ |
| 68 | const char *name; /* entity name */ | 68 | const char *name; /* entity name */ |
| 69 | u64 global_id; /* our unique id in system */ | 69 | u64 global_id; /* our unique id in system */ |
| 70 | const char *secret; /* our secret key */ | 70 | const struct ceph_crypto_key *key; /* our secret key */ |
| 71 | unsigned want_keys; /* which services we want */ | 71 | unsigned want_keys; /* which services we want */ |
| 72 | }; | 72 | }; |
| 73 | 73 | ||
| 74 | extern struct ceph_auth_client *ceph_auth_init(const char *name, | 74 | extern struct ceph_auth_client *ceph_auth_init(const char *name, |
| 75 | const char *secret); | 75 | const struct ceph_crypto_key *key); |
| 76 | extern void ceph_auth_destroy(struct ceph_auth_client *ac); | 76 | extern void ceph_auth_destroy(struct ceph_auth_client *ac); |
| 77 | 77 | ||
| 78 | extern void ceph_auth_reset(struct ceph_auth_client *ac); | 78 | extern void ceph_auth_reset(struct ceph_auth_client *ac); |
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h index 0d2e0fffb470..6365f041745b 100644 --- a/include/linux/ceph/libceph.h +++ b/include/linux/ceph/libceph.h | |||
| @@ -61,7 +61,7 @@ struct ceph_options { | |||
| 61 | pointer type of args */ | 61 | pointer type of args */ |
| 62 | int num_mon; | 62 | int num_mon; |
| 63 | char *name; | 63 | char *name; |
| 64 | char *secret; | 64 | struct ceph_crypto_key *key; |
| 65 | }; | 65 | }; |
| 66 | 66 | ||
| 67 | /* | 67 | /* |
diff --git a/include/linux/cfag12864b.h b/include/linux/cfag12864b.h index 6f9f19d66591..b454dfce60d9 100644 --- a/include/linux/cfag12864b.h +++ b/include/linux/cfag12864b.h | |||
| @@ -44,7 +44,7 @@ extern unsigned char * cfag12864b_buffer; | |||
| 44 | /* | 44 | /* |
| 45 | * Get the refresh rate of the LCD | 45 | * Get the refresh rate of the LCD |
| 46 | * | 46 | * |
| 47 | * Returns the refresh rate (hertzs). | 47 | * Returns the refresh rate (hertz). |
| 48 | */ | 48 | */ |
| 49 | extern unsigned int cfag12864b_getrate(void); | 49 | extern unsigned int cfag12864b_getrate(void); |
| 50 | 50 | ||
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index e654fa239916..5ac7ebc36dbb 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
| @@ -240,7 +240,7 @@ struct cgroup { | |||
| 240 | /* For RCU-protected deletion */ | 240 | /* For RCU-protected deletion */ |
| 241 | struct rcu_head rcu_head; | 241 | struct rcu_head rcu_head; |
| 242 | 242 | ||
| 243 | /* List of events which userspace want to recieve */ | 243 | /* List of events which userspace want to receive */ |
| 244 | struct list_head event_list; | 244 | struct list_head event_list; |
| 245 | spinlock_t event_list_lock; | 245 | spinlock_t event_list_lock; |
| 246 | }; | 246 | }; |
diff --git a/include/linux/cm4000_cs.h b/include/linux/cm4000_cs.h index 72bfefdbd767..3c4aac406175 100644 --- a/include/linux/cm4000_cs.h +++ b/include/linux/cm4000_cs.h | |||
| @@ -20,7 +20,7 @@ typedef struct atreq { | |||
| 20 | } atreq_t; | 20 | } atreq_t; |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | /* what is particularly stupid in the original driver is the arch-dependant | 23 | /* what is particularly stupid in the original driver is the arch-dependent |
| 24 | * member sizes. This leads to CONFIG_COMPAT breakage, since 32bit userspace | 24 | * member sizes. This leads to CONFIG_COMPAT breakage, since 32bit userspace |
| 25 | * will lay out the structure members differently than the 64bit kernel. | 25 | * will lay out the structure members differently than the 64bit kernel. |
| 26 | * | 26 | * |
diff --git a/include/linux/configfs.h b/include/linux/configfs.h index ddb7a97c78c2..645778ad899b 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h | |||
| @@ -218,7 +218,7 @@ static ssize_t _item##_attr_store(struct config_item *item, \ | |||
| 218 | * group children. default_groups may coexist alongsize make_group() or | 218 | * group children. default_groups may coexist alongsize make_group() or |
| 219 | * make_item(), but if the group wishes to have only default_groups | 219 | * make_item(), but if the group wishes to have only default_groups |
| 220 | * children (disallowing mkdir(2)), it need not provide either function. | 220 | * children (disallowing mkdir(2)), it need not provide either function. |
| 221 | * If the group has commit(), it supports pending and commited (active) | 221 | * If the group has commit(), it supports pending and committed (active) |
| 222 | * items. | 222 | * items. |
| 223 | */ | 223 | */ |
| 224 | struct configfs_item_operations { | 224 | struct configfs_item_operations { |
diff --git a/include/linux/connector.h b/include/linux/connector.h index bcafc942e5e4..7c60d0942adb 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
| @@ -88,8 +88,6 @@ struct cn_queue_dev { | |||
| 88 | atomic_t refcnt; | 88 | atomic_t refcnt; |
| 89 | unsigned char name[CN_CBQ_NAMELEN]; | 89 | unsigned char name[CN_CBQ_NAMELEN]; |
| 90 | 90 | ||
| 91 | struct workqueue_struct *cn_queue; | ||
| 92 | |||
| 93 | struct list_head queue_list; | 91 | struct list_head queue_list; |
| 94 | spinlock_t queue_lock; | 92 | spinlock_t queue_lock; |
| 95 | 93 | ||
| @@ -101,20 +99,13 @@ struct cn_callback_id { | |||
| 101 | struct cb_id id; | 99 | struct cb_id id; |
| 102 | }; | 100 | }; |
| 103 | 101 | ||
| 104 | struct cn_callback_data { | ||
| 105 | struct sk_buff *skb; | ||
| 106 | void (*callback) (struct cn_msg *, struct netlink_skb_parms *); | ||
| 107 | |||
| 108 | void *free; | ||
| 109 | }; | ||
| 110 | |||
| 111 | struct cn_callback_entry { | 102 | struct cn_callback_entry { |
| 112 | struct list_head callback_entry; | 103 | struct list_head callback_entry; |
| 113 | struct work_struct work; | 104 | atomic_t refcnt; |
| 114 | struct cn_queue_dev *pdev; | 105 | struct cn_queue_dev *pdev; |
| 115 | 106 | ||
| 116 | struct cn_callback_id id; | 107 | struct cn_callback_id id; |
| 117 | struct cn_callback_data data; | 108 | void (*callback) (struct cn_msg *, struct netlink_skb_parms *); |
| 118 | 109 | ||
| 119 | u32 seq, group; | 110 | u32 seq, group; |
| 120 | }; | 111 | }; |
| @@ -138,13 +129,12 @@ int cn_queue_add_callback(struct cn_queue_dev *dev, const char *name, | |||
| 138 | struct cb_id *id, | 129 | struct cb_id *id, |
| 139 | void (*callback)(struct cn_msg *, struct netlink_skb_parms *)); | 130 | void (*callback)(struct cn_msg *, struct netlink_skb_parms *)); |
| 140 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); | 131 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); |
| 132 | void cn_queue_release_callback(struct cn_callback_entry *); | ||
| 141 | 133 | ||
| 142 | struct cn_queue_dev *cn_queue_alloc_dev(const char *name, struct sock *); | 134 | struct cn_queue_dev *cn_queue_alloc_dev(const char *name, struct sock *); |
| 143 | void cn_queue_free_dev(struct cn_queue_dev *dev); | 135 | void cn_queue_free_dev(struct cn_queue_dev *dev); |
| 144 | 136 | ||
| 145 | int cn_cb_equal(struct cb_id *, struct cb_id *); | 137 | int cn_cb_equal(struct cb_id *, struct cb_id *); |
| 146 | 138 | ||
| 147 | void cn_queue_wrapper(struct work_struct *work); | ||
| 148 | |||
| 149 | #endif /* __KERNEL__ */ | 139 | #endif /* __KERNEL__ */ |
| 150 | #endif /* __CONNECTOR_H */ | 140 | #endif /* __CONNECTOR_H */ |
diff --git a/include/linux/cper.h b/include/linux/cper.h index 372a25839fd1..c23049496531 100644 --- a/include/linux/cper.h +++ b/include/linux/cper.h | |||
| @@ -310,7 +310,7 @@ struct cper_sec_proc_ia { | |||
| 310 | __u8 cpuid[48]; | 310 | __u8 cpuid[48]; |
| 311 | }; | 311 | }; |
| 312 | 312 | ||
| 313 | /* IA32/X64 Processor Error Infomation Structure */ | 313 | /* IA32/X64 Processor Error Information Structure */ |
| 314 | struct cper_ia_err_info { | 314 | struct cper_ia_err_info { |
| 315 | uuid_le err_type; | 315 | uuid_le err_type; |
| 316 | __u64 validation_bits; | 316 | __u64 validation_bits; |
diff --git a/include/linux/decompress/mm.h b/include/linux/decompress/mm.h index 4cb72b920c74..7925bf0ee836 100644 --- a/include/linux/decompress/mm.h +++ b/include/linux/decompress/mm.h | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | 16 | ||
| 17 | /* | 17 | /* |
| 18 | * Some architectures want to ensure there is no local data in their | 18 | * Some architectures want to ensure there is no local data in their |
| 19 | * pre-boot environment, so that data can arbitarily relocated (via | 19 | * pre-boot environment, so that data can arbitrarily relocated (via |
| 20 | * GOT references). This is achieved by defining STATIC_RW_DATA to | 20 | * GOT references). This is achieved by defining STATIC_RW_DATA to |
| 21 | * be null. | 21 | * be null. |
| 22 | */ | 22 | */ |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index e2768834f397..32a4423710f5 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
| @@ -197,7 +197,6 @@ struct dm_target { | |||
| 197 | struct dm_target_callbacks { | 197 | struct dm_target_callbacks { |
| 198 | struct list_head list; | 198 | struct list_head list; |
| 199 | int (*congested_fn) (struct dm_target_callbacks *, int); | 199 | int (*congested_fn) (struct dm_target_callbacks *, int); |
| 200 | void (*unplug_fn)(struct dm_target_callbacks *); | ||
| 201 | }; | 200 | }; |
| 202 | 201 | ||
| 203 | int dm_register_target(struct target_type *t); | 202 | int dm_register_target(struct target_type *t); |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 9bebd7f16ef1..eee7addec282 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
| @@ -434,7 +434,7 @@ struct dma_tx_state { | |||
| 434 | * zero or error code | 434 | * zero or error code |
| 435 | * @device_tx_status: poll for transaction completion, the optional | 435 | * @device_tx_status: poll for transaction completion, the optional |
| 436 | * txstate parameter can be supplied with a pointer to get a | 436 | * txstate parameter can be supplied with a pointer to get a |
| 437 | * struct with auxilary transfer status information, otherwise the call | 437 | * struct with auxiliary transfer status information, otherwise the call |
| 438 | * will just return a simple status code | 438 | * will just return a simple status code |
| 439 | * @device_issue_pending: push pending transactions to hardware | 439 | * @device_issue_pending: push pending transactions to hardware |
| 440 | */ | 440 | */ |
diff --git a/include/linux/drbd.h b/include/linux/drbd.h index d18d673ebc78..cec467f5d676 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | #include <sys/wait.h> | 36 | #include <sys/wait.h> |
| 37 | #include <limits.h> | 37 | #include <limits.h> |
| 38 | 38 | ||
| 39 | /* Altough the Linux source code makes a difference between | 39 | /* Although the Linux source code makes a difference between |
| 40 | generic endianness and the bitfields' endianness, there is no | 40 | generic endianness and the bitfields' endianness, there is no |
| 41 | architecture as of Linux-2.6.24-rc4 where the bitfileds' endianness | 41 | architecture as of Linux-2.6.24-rc4 where the bitfileds' endianness |
| 42 | does not match the generic endianness. */ | 42 | does not match the generic endianness. */ |
| @@ -184,7 +184,7 @@ enum drbd_conns { | |||
| 184 | /* These temporal states are all used on the way | 184 | /* These temporal states are all used on the way |
| 185 | * from >= C_CONNECTED to Unconnected. | 185 | * from >= C_CONNECTED to Unconnected. |
| 186 | * The 'disconnect reason' states | 186 | * The 'disconnect reason' states |
| 187 | * I do not allow to change beween them. */ | 187 | * I do not allow to change between them. */ |
| 188 | C_TIMEOUT, | 188 | C_TIMEOUT, |
| 189 | C_BROKEN_PIPE, | 189 | C_BROKEN_PIPE, |
| 190 | C_NETWORK_FAILURE, | 190 | C_NETWORK_FAILURE, |
diff --git a/include/linux/drbd_limits.h b/include/linux/drbd_limits.h index bb264a5732de..246f576c981d 100644 --- a/include/linux/drbd_limits.h +++ b/include/linux/drbd_limits.h | |||
| @@ -43,7 +43,7 @@ | |||
| 43 | 43 | ||
| 44 | /* net { */ | 44 | /* net { */ |
| 45 | /* timeout, unit centi seconds | 45 | /* timeout, unit centi seconds |
| 46 | * more than one minute timeout is not usefull */ | 46 | * more than one minute timeout is not useful */ |
| 47 | #define DRBD_TIMEOUT_MIN 1 | 47 | #define DRBD_TIMEOUT_MIN 1 |
| 48 | #define DRBD_TIMEOUT_MAX 600 | 48 | #define DRBD_TIMEOUT_MAX 600 |
| 49 | #define DRBD_TIMEOUT_DEF 60 /* 6 seconds */ | 49 | #define DRBD_TIMEOUT_DEF 60 /* 6 seconds */ |
| @@ -68,7 +68,7 @@ | |||
| 68 | #define DRBD_MAX_EPOCH_SIZE_MAX 20000 | 68 | #define DRBD_MAX_EPOCH_SIZE_MAX 20000 |
| 69 | #define DRBD_MAX_EPOCH_SIZE_DEF 2048 | 69 | #define DRBD_MAX_EPOCH_SIZE_DEF 2048 |
| 70 | 70 | ||
| 71 | /* I don't think that a tcp send buffer of more than 10M is usefull */ | 71 | /* I don't think that a tcp send buffer of more than 10M is useful */ |
| 72 | #define DRBD_SNDBUF_SIZE_MIN 0 | 72 | #define DRBD_SNDBUF_SIZE_MIN 0 |
| 73 | #define DRBD_SNDBUF_SIZE_MAX (10<<20) | 73 | #define DRBD_SNDBUF_SIZE_MAX (10<<20) |
| 74 | #define DRBD_SNDBUF_SIZE_DEF 0 | 74 | #define DRBD_SNDBUF_SIZE_DEF 0 |
| @@ -101,7 +101,7 @@ | |||
| 101 | #define DRBD_RATE_MAX (4 << 20) | 101 | #define DRBD_RATE_MAX (4 << 20) |
| 102 | #define DRBD_RATE_DEF 250 /* kb/second */ | 102 | #define DRBD_RATE_DEF 250 /* kb/second */ |
| 103 | 103 | ||
| 104 | /* less than 7 would hit performance unneccessarily. | 104 | /* less than 7 would hit performance unnecessarily. |
| 105 | * 3833 is the largest prime that still does fit | 105 | * 3833 is the largest prime that still does fit |
| 106 | * into 64 sectors of activity log */ | 106 | * into 64 sectors of activity log */ |
| 107 | #define DRBD_AL_EXTENTS_MIN 7 | 107 | #define DRBD_AL_EXTENTS_MIN 7 |
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index d93efcc44570..21a8ebf2dc3a 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
| @@ -101,7 +101,6 @@ extern void elv_dispatch_sort(struct request_queue *, struct request *); | |||
| 101 | extern void elv_dispatch_add_tail(struct request_queue *, struct request *); | 101 | extern void elv_dispatch_add_tail(struct request_queue *, struct request *); |
| 102 | extern void elv_add_request(struct request_queue *, struct request *, int); | 102 | extern void elv_add_request(struct request_queue *, struct request *, int); |
| 103 | extern void __elv_add_request(struct request_queue *, struct request *, int); | 103 | extern void __elv_add_request(struct request_queue *, struct request *, int); |
| 104 | extern void elv_insert(struct request_queue *, struct request *, int); | ||
| 105 | extern int elv_merge(struct request_queue *, struct request **, struct bio *); | 104 | extern int elv_merge(struct request_queue *, struct request **, struct bio *); |
| 106 | extern int elv_try_merge(struct request *, struct bio *); | 105 | extern int elv_try_merge(struct request *, struct bio *); |
| 107 | extern void elv_merge_requests(struct request_queue *, struct request *, | 106 | extern void elv_merge_requests(struct request_queue *, struct request *, |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index c8fcbdd2b0e7..dc80d8294247 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
| @@ -614,7 +614,7 @@ struct ethtool_sfeatures { | |||
| 614 | * values of corresponding bits in features[].requested. Bits in .requested | 614 | * values of corresponding bits in features[].requested. Bits in .requested |
| 615 | * not set in .valid or not changeable are ignored. | 615 | * not set in .valid or not changeable are ignored. |
| 616 | * | 616 | * |
| 617 | * Returns %EINVAL when .valid contains undefined or never-changable bits | 617 | * Returns %EINVAL when .valid contains undefined or never-changeable bits |
| 618 | * or size is not equal to required number of features words (32-bit blocks). | 618 | * or size is not equal to required number of features words (32-bit blocks). |
| 619 | * Returns >= 0 if request was completed; bits set in the value mean: | 619 | * Returns >= 0 if request was completed; bits set in the value mean: |
| 620 | * %ETHTOOL_F_UNSUPPORTED - there were bits set in .valid that are not | 620 | * %ETHTOOL_F_UNSUPPORTED - there were bits set in .valid that are not |
diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h index f6856a5a1d4b..f362733186a5 100644 --- a/include/linux/eventpoll.h +++ b/include/linux/eventpoll.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * include/linux/eventpoll.h ( Efficent event polling implementation ) | 2 | * include/linux/eventpoll.h ( Efficient event polling implementation ) |
| 3 | * Copyright (C) 2001,...,2006 Davide Libenzi | 3 | * Copyright (C) 2001,...,2006 Davide Libenzi |
| 4 | * | 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h index 33a42f24b275..3a4cef5322dc 100644 --- a/include/linux/exportfs.h +++ b/include/linux/exportfs.h | |||
| @@ -120,7 +120,7 @@ struct fid { | |||
| 120 | * encode_fh: | 120 | * encode_fh: |
| 121 | * @encode_fh should store in the file handle fragment @fh (using at most | 121 | * @encode_fh should store in the file handle fragment @fh (using at most |
| 122 | * @max_len bytes) information that can be used by @decode_fh to recover the | 122 | * @max_len bytes) information that can be used by @decode_fh to recover the |
| 123 | * file refered to by the &struct dentry @de. If the @connectable flag is | 123 | * file referred to by the &struct dentry @de. If the @connectable flag is |
| 124 | * set, the encode_fh() should store sufficient information so that a good | 124 | * set, the encode_fh() should store sufficient information so that a good |
| 125 | * attempt can be made to find not only the file but also it's place in the | 125 | * attempt can be made to find not only the file but also it's place in the |
| 126 | * filesystem. This typically means storing a reference to de->d_parent in | 126 | * filesystem. This typically means storing a reference to de->d_parent in |
diff --git a/include/linux/fb.h b/include/linux/fb.h index b2a36391d2a1..df728c1c29ed 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
| @@ -534,14 +534,14 @@ struct fb_cursor_user { | |||
| 534 | #define FB_EVENT_GET_CONSOLE_MAP 0x07 | 534 | #define FB_EVENT_GET_CONSOLE_MAP 0x07 |
| 535 | /* CONSOLE-SPECIFIC: set console to framebuffer mapping */ | 535 | /* CONSOLE-SPECIFIC: set console to framebuffer mapping */ |
| 536 | #define FB_EVENT_SET_CONSOLE_MAP 0x08 | 536 | #define FB_EVENT_SET_CONSOLE_MAP 0x08 |
| 537 | /* A hardware display blank change occured */ | 537 | /* A hardware display blank change occurred */ |
| 538 | #define FB_EVENT_BLANK 0x09 | 538 | #define FB_EVENT_BLANK 0x09 |
| 539 | /* Private modelist is to be replaced */ | 539 | /* Private modelist is to be replaced */ |
| 540 | #define FB_EVENT_NEW_MODELIST 0x0A | 540 | #define FB_EVENT_NEW_MODELIST 0x0A |
| 541 | /* The resolution of the passed in fb_info about to change and | 541 | /* The resolution of the passed in fb_info about to change and |
| 542 | all vc's should be changed */ | 542 | all vc's should be changed */ |
| 543 | #define FB_EVENT_MODE_CHANGE_ALL 0x0B | 543 | #define FB_EVENT_MODE_CHANGE_ALL 0x0B |
| 544 | /* A software display blank change occured */ | 544 | /* A software display blank change occurred */ |
| 545 | #define FB_EVENT_CONBLANK 0x0C | 545 | #define FB_EVENT_CONBLANK 0x0C |
| 546 | /* Get drawing requirements */ | 546 | /* Get drawing requirements */ |
| 547 | #define FB_EVENT_GET_REQ 0x0D | 547 | #define FB_EVENT_GET_REQ 0x0D |
| @@ -805,7 +805,7 @@ struct fb_tile_ops { | |||
| 805 | /* A driver may set this flag to indicate that it does want a set_par to be | 805 | /* A driver may set this flag to indicate that it does want a set_par to be |
| 806 | * called every time when fbcon_switch is executed. The advantage is that with | 806 | * called every time when fbcon_switch is executed. The advantage is that with |
| 807 | * this flag set you can really be sure that set_par is always called before | 807 | * this flag set you can really be sure that set_par is always called before |
| 808 | * any of the functions dependant on the correct hardware state or altering | 808 | * any of the functions dependent on the correct hardware state or altering |
| 809 | * that state, even if you are using some broken X releases. The disadvantage | 809 | * that state, even if you are using some broken X releases. The disadvantage |
| 810 | * is that it introduces unwanted delays to every console switch if set_par | 810 | * is that it introduces unwanted delays to every console switch if set_par |
| 811 | * is slow. It is a good idea to try this flag in the drivers initialization | 811 | * is slow. It is a good idea to try this flag in the drivers initialization |
| @@ -877,7 +877,7 @@ struct fb_info { | |||
| 877 | void *fbcon_par; /* fbcon use-only private area */ | 877 | void *fbcon_par; /* fbcon use-only private area */ |
| 878 | /* From here on everything is device dependent */ | 878 | /* From here on everything is device dependent */ |
| 879 | void *par; | 879 | void *par; |
| 880 | /* we need the PCI or similiar aperture base/size not | 880 | /* we need the PCI or similar aperture base/size not |
| 881 | smem_start/size as smem_start may just be an object | 881 | smem_start/size as smem_start may just be an object |
| 882 | allocated inside the aperture so may not actually overlap */ | 882 | allocated inside the aperture so may not actually overlap */ |
| 883 | struct apertures_struct { | 883 | struct apertures_struct { |
diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h index 59ea406be7f6..4ff09889c5c0 100644 --- a/include/linux/firewire-cdev.h +++ b/include/linux/firewire-cdev.h | |||
| @@ -900,7 +900,7 @@ struct fw_cdev_get_cycle_timer2 { | |||
| 900 | 900 | ||
| 901 | /** | 901 | /** |
| 902 | * struct fw_cdev_allocate_iso_resource - (De)allocate a channel or bandwidth | 902 | * struct fw_cdev_allocate_iso_resource - (De)allocate a channel or bandwidth |
| 903 | * @closure: Passed back to userspace in correponding iso resource events | 903 | * @closure: Passed back to userspace in corresponding iso resource events |
| 904 | * @channels: Isochronous channels of which one is to be (de)allocated | 904 | * @channels: Isochronous channels of which one is to be (de)allocated |
| 905 | * @bandwidth: Isochronous bandwidth units to be (de)allocated | 905 | * @bandwidth: Isochronous bandwidth units to be (de)allocated |
| 906 | * @handle: Handle to the allocation, written by the kernel (only valid in | 906 | * @handle: Handle to the allocation, written by the kernel (only valid in |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 52f283c1edb2..dbd860af0804 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -465,7 +465,7 @@ struct iattr { | |||
| 465 | struct timespec ia_ctime; | 465 | struct timespec ia_ctime; |
| 466 | 466 | ||
| 467 | /* | 467 | /* |
| 468 | * Not an attribute, but an auxilary info for filesystems wanting to | 468 | * Not an attribute, but an auxiliary info for filesystems wanting to |
| 469 | * implement an ftruncate() like method. NOTE: filesystem should | 469 | * implement an ftruncate() like method. NOTE: filesystem should |
| 470 | * check for (ia_valid & ATTR_FILE), and not for (ia_file != NULL). | 470 | * check for (ia_valid & ATTR_FILE), and not for (ia_file != NULL). |
| 471 | */ | 471 | */ |
| @@ -613,6 +613,8 @@ struct address_space_operations { | |||
| 613 | int (*error_remove_page)(struct address_space *, struct page *); | 613 | int (*error_remove_page)(struct address_space *, struct page *); |
| 614 | }; | 614 | }; |
| 615 | 615 | ||
| 616 | extern const struct address_space_operations empty_aops; | ||
| 617 | |||
| 616 | /* | 618 | /* |
| 617 | * pagecache_write_begin/pagecache_write_end must be used by general code | 619 | * pagecache_write_begin/pagecache_write_end must be used by general code |
| 618 | * to write into the pagecache. | 620 | * to write into the pagecache. |
| @@ -647,7 +649,7 @@ struct address_space { | |||
| 647 | } __attribute__((aligned(sizeof(long)))); | 649 | } __attribute__((aligned(sizeof(long)))); |
| 648 | /* | 650 | /* |
| 649 | * On most architectures that alignment is already the case; but | 651 | * On most architectures that alignment is already the case; but |
| 650 | * must be enforced here for CRIS, to let the least signficant bit | 652 | * must be enforced here for CRIS, to let the least significant bit |
| 651 | * of struct page's "mapping" pointer be used for PAGE_MAPPING_ANON. | 653 | * of struct page's "mapping" pointer be used for PAGE_MAPPING_ANON. |
| 652 | */ | 654 | */ |
| 653 | 655 | ||
diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h index b8581c09d19f..76427e688d15 100644 --- a/include/linux/fscache-cache.h +++ b/include/linux/fscache-cache.h | |||
| @@ -236,7 +236,7 @@ struct fscache_cache_ops { | |||
| 236 | /* unpin an object in the cache */ | 236 | /* unpin an object in the cache */ |
| 237 | void (*unpin_object)(struct fscache_object *object); | 237 | void (*unpin_object)(struct fscache_object *object); |
| 238 | 238 | ||
| 239 | /* store the updated auxilliary data on an object */ | 239 | /* store the updated auxiliary data on an object */ |
| 240 | void (*update_object)(struct fscache_object *object); | 240 | void (*update_object)(struct fscache_object *object); |
| 241 | 241 | ||
| 242 | /* discard the resources pinned by an object and effect retirement if | 242 | /* discard the resources pinned by an object and effect retirement if |
diff --git a/include/linux/fscache.h b/include/linux/fscache.h index ec0dad5ab90f..7c4d72f5581f 100644 --- a/include/linux/fscache.h +++ b/include/linux/fscache.h | |||
| @@ -102,9 +102,9 @@ struct fscache_cookie_def { | |||
| 102 | */ | 102 | */ |
| 103 | void (*get_attr)(const void *cookie_netfs_data, uint64_t *size); | 103 | void (*get_attr)(const void *cookie_netfs_data, uint64_t *size); |
| 104 | 104 | ||
| 105 | /* get the auxilliary data from netfs data | 105 | /* get the auxiliary data from netfs data |
| 106 | * - this function can be absent if the index carries no state data | 106 | * - this function can be absent if the index carries no state data |
| 107 | * - should store the auxilliary data in the buffer | 107 | * - should store the auxiliary data in the buffer |
| 108 | * - should return the amount of amount stored | 108 | * - should return the amount of amount stored |
| 109 | * - not permitted to return an error | 109 | * - not permitted to return an error |
| 110 | * - the netfs data from the cookie being used as the source is | 110 | * - the netfs data from the cookie being used as the source is |
| @@ -117,7 +117,7 @@ struct fscache_cookie_def { | |||
| 117 | /* consult the netfs about the state of an object | 117 | /* consult the netfs about the state of an object |
| 118 | * - this function can be absent if the index carries no state data | 118 | * - this function can be absent if the index carries no state data |
| 119 | * - the netfs data from the cookie being used as the target is | 119 | * - the netfs data from the cookie being used as the target is |
| 120 | * presented, as is the auxilliary data | 120 | * presented, as is the auxiliary data |
| 121 | */ | 121 | */ |
| 122 | enum fscache_checkaux (*check_aux)(void *cookie_netfs_data, | 122 | enum fscache_checkaux (*check_aux)(void *cookie_netfs_data, |
| 123 | const void *data, | 123 | const void *data, |
diff --git a/include/linux/hid.h b/include/linux/hid.h index bb29bb1dbd2f..42f7e2fb501f 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
| @@ -799,7 +799,7 @@ static inline int __must_check hid_parse(struct hid_device *hdev) | |||
| 799 | * | 799 | * |
| 800 | * Call this in probe function *after* hid_parse. This will setup HW buffers | 800 | * Call this in probe function *after* hid_parse. This will setup HW buffers |
| 801 | * and start the device (if not deffered to device open). hid_hw_stop must be | 801 | * and start the device (if not deffered to device open). hid_hw_stop must be |
| 802 | * called if this was successfull. | 802 | * called if this was successful. |
| 803 | */ | 803 | */ |
| 804 | static inline int __must_check hid_hw_start(struct hid_device *hdev, | 804 | static inline int __must_check hid_hw_start(struct hid_device *hdev, |
| 805 | unsigned int connect_mask) | 805 | unsigned int connect_mask) |
diff --git a/include/linux/hp_sdc.h b/include/linux/hp_sdc.h index 9db3d454887f..d392975d8887 100644 --- a/include/linux/hp_sdc.h +++ b/include/linux/hp_sdc.h | |||
| @@ -101,7 +101,7 @@ int hp_sdc_dequeue_transaction(hp_sdc_transaction *this); | |||
| 101 | #define HP_SDC_STATUS_REG 0x40 /* Data from an i8042 register */ | 101 | #define HP_SDC_STATUS_REG 0x40 /* Data from an i8042 register */ |
| 102 | #define HP_SDC_STATUS_HILCMD 0x50 /* Command from HIL MLC */ | 102 | #define HP_SDC_STATUS_HILCMD 0x50 /* Command from HIL MLC */ |
| 103 | #define HP_SDC_STATUS_HILDATA 0x60 /* Data from HIL MLC */ | 103 | #define HP_SDC_STATUS_HILDATA 0x60 /* Data from HIL MLC */ |
| 104 | #define HP_SDC_STATUS_PUP 0x70 /* Sucessful power-up self test */ | 104 | #define HP_SDC_STATUS_PUP 0x70 /* Successful power-up self test */ |
| 105 | #define HP_SDC_STATUS_KCOOKED 0x80 /* Key from cooked kbd */ | 105 | #define HP_SDC_STATUS_KCOOKED 0x80 /* Key from cooked kbd */ |
| 106 | #define HP_SDC_STATUS_KRPG 0xc0 /* Key from Repeat Gen */ | 106 | #define HP_SDC_STATUS_KRPG 0xc0 /* Key from Repeat Gen */ |
| 107 | #define HP_SDC_STATUS_KMOD_SUP 0x10 /* Shift key is up */ | 107 | #define HP_SDC_STATUS_KMOD_SUP 0x10 /* Shift key is up */ |
diff --git a/include/linux/i2o.h b/include/linux/i2o.h index 9e7a12d6385d..a6deef4f4f67 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h | |||
| @@ -826,7 +826,7 @@ static inline struct i2o_message __iomem *i2o_msg_in_to_virt(struct | |||
| 826 | * @c: I2O controller | 826 | * @c: I2O controller |
| 827 | * | 827 | * |
| 828 | * This function tries to get a message frame. If no message frame is | 828 | * This function tries to get a message frame. If no message frame is |
| 829 | * available do not wait until one is availabe (see also i2o_msg_get_wait). | 829 | * available do not wait until one is available (see also i2o_msg_get_wait). |
| 830 | * The returned pointer to the message frame is not in I/O memory, it is | 830 | * The returned pointer to the message frame is not in I/O memory, it is |
| 831 | * allocated from a mempool. But because a MFA is allocated from the | 831 | * allocated from a mempool. But because a MFA is allocated from the |
| 832 | * controller too it is guaranteed that i2o_msg_post() will never fail. | 832 | * controller too it is guaranteed that i2o_msg_post() will never fail. |
diff --git a/include/linux/input.h b/include/linux/input.h index f3a7794a18c4..771d6d85667d 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -167,6 +167,7 @@ struct input_keymap_entry { | |||
| 167 | #define SYN_REPORT 0 | 167 | #define SYN_REPORT 0 |
| 168 | #define SYN_CONFIG 1 | 168 | #define SYN_CONFIG 1 |
| 169 | #define SYN_MT_REPORT 2 | 169 | #define SYN_MT_REPORT 2 |
| 170 | #define SYN_DROPPED 3 | ||
| 170 | 171 | ||
| 171 | /* | 172 | /* |
| 172 | * Keys and buttons | 173 | * Keys and buttons |
| @@ -553,8 +554,8 @@ struct input_keymap_entry { | |||
| 553 | #define KEY_DVD 0x185 /* Media Select DVD */ | 554 | #define KEY_DVD 0x185 /* Media Select DVD */ |
| 554 | #define KEY_AUX 0x186 | 555 | #define KEY_AUX 0x186 |
| 555 | #define KEY_MP3 0x187 | 556 | #define KEY_MP3 0x187 |
| 556 | #define KEY_AUDIO 0x188 | 557 | #define KEY_AUDIO 0x188 /* AL Audio Browser */ |
| 557 | #define KEY_VIDEO 0x189 | 558 | #define KEY_VIDEO 0x189 /* AL Movie Browser */ |
| 558 | #define KEY_DIRECTORY 0x18a | 559 | #define KEY_DIRECTORY 0x18a |
| 559 | #define KEY_LIST 0x18b | 560 | #define KEY_LIST 0x18b |
| 560 | #define KEY_MEMO 0x18c /* Media Select Messages */ | 561 | #define KEY_MEMO 0x18c /* Media Select Messages */ |
| @@ -603,8 +604,9 @@ struct input_keymap_entry { | |||
| 603 | #define KEY_FRAMEFORWARD 0x1b5 | 604 | #define KEY_FRAMEFORWARD 0x1b5 |
| 604 | #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ | 605 | #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ |
| 605 | #define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ | 606 | #define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ |
| 606 | #define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ | 607 | #define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ |
| 607 | #define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ | 608 | #define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ |
| 609 | #define KEY_IMAGES 0x1ba /* AL Image Browser */ | ||
| 608 | 610 | ||
| 609 | #define KEY_DEL_EOL 0x1c0 | 611 | #define KEY_DEL_EOL 0x1c0 |
| 610 | #define KEY_DEL_EOS 0x1c1 | 612 | #define KEY_DEL_EOS 0x1c1 |
diff --git a/include/linux/input/mt.h b/include/linux/input/mt.h index b3ac06a4435d..318bb82325a6 100644 --- a/include/linux/input/mt.h +++ b/include/linux/input/mt.h | |||
| @@ -48,6 +48,12 @@ static inline void input_mt_slot(struct input_dev *dev, int slot) | |||
| 48 | input_event(dev, EV_ABS, ABS_MT_SLOT, slot); | 48 | input_event(dev, EV_ABS, ABS_MT_SLOT, slot); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | static inline bool input_is_mt_axis(int axis) | ||
| 52 | { | ||
| 53 | return axis == ABS_MT_SLOT || | ||
| 54 | (axis >= ABS_MT_FIRST && axis <= ABS_MT_LAST); | ||
| 55 | } | ||
| 56 | |||
| 51 | void input_mt_report_slot_state(struct input_dev *dev, | 57 | void input_mt_report_slot_state(struct input_dev *dev, |
| 52 | unsigned int tool_type, bool active); | 58 | unsigned int tool_type, bool active); |
| 53 | 59 | ||
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 59b72ca1c5d1..bea0ac750712 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -98,7 +98,7 @@ typedef irqreturn_t (*irq_handler_t)(int, void *); | |||
| 98 | * @next: pointer to the next irqaction for shared interrupts | 98 | * @next: pointer to the next irqaction for shared interrupts |
| 99 | * @irq: interrupt number | 99 | * @irq: interrupt number |
| 100 | * @dir: pointer to the proc/irq/NN/name entry | 100 | * @dir: pointer to the proc/irq/NN/name entry |
| 101 | * @thread_fn: interupt handler function for threaded interrupts | 101 | * @thread_fn: interrupt handler function for threaded interrupts |
| 102 | * @thread: thread pointer for threaded interrupts | 102 | * @thread: thread pointer for threaded interrupts |
| 103 | * @thread_flags: flags related to @thread | 103 | * @thread_flags: flags related to @thread |
| 104 | * @thread_mask: bitmask for keeping track of @thread activity | 104 | * @thread_mask: bitmask for keeping track of @thread activity |
| @@ -338,14 +338,6 @@ static inline void enable_irq_lockdep_irqrestore(unsigned int irq, unsigned long | |||
| 338 | /* IRQ wakeup (PM) control: */ | 338 | /* IRQ wakeup (PM) control: */ |
| 339 | extern int irq_set_irq_wake(unsigned int irq, unsigned int on); | 339 | extern int irq_set_irq_wake(unsigned int irq, unsigned int on); |
| 340 | 340 | ||
| 341 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
| 342 | /* Please do not use: Use the replacement functions instead */ | ||
| 343 | static inline int set_irq_wake(unsigned int irq, unsigned int on) | ||
| 344 | { | ||
| 345 | return irq_set_irq_wake(irq, on); | ||
| 346 | } | ||
| 347 | #endif | ||
| 348 | |||
| 349 | static inline int enable_irq_wake(unsigned int irq) | 341 | static inline int enable_irq_wake(unsigned int irq) |
| 350 | { | 342 | { |
| 351 | return irq_set_irq_wake(irq, 1); | 343 | return irq_set_irq_wake(irq, 1); |
| @@ -492,7 +484,7 @@ extern void __send_remote_softirq(struct call_single_data *cp, int cpu, | |||
| 492 | Properties: | 484 | Properties: |
| 493 | * If tasklet_schedule() is called, then tasklet is guaranteed | 485 | * If tasklet_schedule() is called, then tasklet is guaranteed |
| 494 | to be executed on some cpu at least once after this. | 486 | to be executed on some cpu at least once after this. |
| 495 | * If the tasklet is already scheduled, but its excecution is still not | 487 | * If the tasklet is already scheduled, but its execution is still not |
| 496 | started, it will be executed only once. | 488 | started, it will be executed only once. |
| 497 | * If this tasklet is already running on another CPU (or schedule is called | 489 | * If this tasklet is already running on another CPU (or schedule is called |
| 498 | from tasklet itself), it is rescheduled for later. | 490 | from tasklet itself), it is rescheduled for later. |
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h index 045f2f275cd0..ca85cf894e33 100644 --- a/include/linux/ipmi.h +++ b/include/linux/ipmi.h | |||
| @@ -111,7 +111,7 @@ struct ipmi_ipmb_addr { | |||
| 111 | * A LAN Address. This is an address to/from a LAN interface bridged | 111 | * A LAN Address. This is an address to/from a LAN interface bridged |
| 112 | * by the BMC, not an address actually out on the LAN. | 112 | * by the BMC, not an address actually out on the LAN. |
| 113 | * | 113 | * |
| 114 | * A concious decision was made here to deviate slightly from the IPMI | 114 | * A conscious decision was made here to deviate slightly from the IPMI |
| 115 | * spec. We do not use rqSWID and rsSWID like it shows in the | 115 | * spec. We do not use rqSWID and rsSWID like it shows in the |
| 116 | * message. Instead, we use remote_SWID and local_SWID. This means | 116 | * message. Instead, we use remote_SWID and local_SWID. This means |
| 117 | * that any message (a request or response) from another device will | 117 | * that any message (a request or response) from another device will |
| @@ -259,7 +259,7 @@ struct ipmi_recv_msg { | |||
| 259 | void (*done)(struct ipmi_recv_msg *msg); | 259 | void (*done)(struct ipmi_recv_msg *msg); |
| 260 | 260 | ||
| 261 | /* Place-holder for the data, don't make any assumptions about | 261 | /* Place-holder for the data, don't make any assumptions about |
| 262 | the size or existance of this, since it may change. */ | 262 | the size or existence of this, since it may change. */ |
| 263 | unsigned char msg_data[IPMI_MAX_MSG_LENGTH]; | 263 | unsigned char msg_data[IPMI_MAX_MSG_LENGTH]; |
| 264 | }; | 264 | }; |
| 265 | 265 | ||
diff --git a/include/linux/irq.h b/include/linux/irq.h index 2a375a72ce3c..09a308072f56 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -64,13 +64,6 @@ typedef void (*irq_preflow_handler_t)(struct irq_data *data); | |||
| 64 | * IRQ_NO_BALANCING - Interrupt cannot be balanced (affinity set) | 64 | * IRQ_NO_BALANCING - Interrupt cannot be balanced (affinity set) |
| 65 | * IRQ_MOVE_PCNTXT - Interrupt can be migrated from process context | 65 | * IRQ_MOVE_PCNTXT - Interrupt can be migrated from process context |
| 66 | * IRQ_NESTED_TRHEAD - Interrupt nests into another thread | 66 | * IRQ_NESTED_TRHEAD - Interrupt nests into another thread |
| 67 | * | ||
| 68 | * Deprecated bits. They are kept updated as long as | ||
| 69 | * CONFIG_GENERIC_HARDIRQS_NO_COMPAT is not set. Will go away soon. These bits | ||
| 70 | * are internal state of the core code and if you really need to acces | ||
| 71 | * them then talk to the genirq maintainer instead of hacking | ||
| 72 | * something weird. | ||
| 73 | * | ||
| 74 | */ | 67 | */ |
| 75 | enum { | 68 | enum { |
| 76 | IRQ_TYPE_NONE = 0x00000000, | 69 | IRQ_TYPE_NONE = 0x00000000, |
diff --git a/include/linux/isdn/hdlc.h b/include/linux/isdn/hdlc.h index 4b3ecc40889a..96521370c782 100644 --- a/include/linux/isdn/hdlc.h +++ b/include/linux/isdn/hdlc.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * hdlc.h -- General purpose ISDN HDLC decoder. | 2 | * hdlc.h -- General purpose ISDN HDLC decoder. |
| 3 | * | 3 | * |
| 4 | * Implementation of a HDLC decoder/encoder in software. | 4 | * Implementation of a HDLC decoder/encoder in software. |
| 5 | * Neccessary because some ISDN devices don't have HDLC | 5 | * Necessary because some ISDN devices don't have HDLC |
| 6 | * controllers. | 6 | * controllers. |
| 7 | * | 7 | * |
| 8 | * Copyright (C) | 8 | * Copyright (C) |
diff --git a/include/linux/ixjuser.h b/include/linux/ixjuser.h index 88b45895746d..94ab5e942e53 100644 --- a/include/linux/ixjuser.h +++ b/include/linux/ixjuser.h | |||
| @@ -50,7 +50,7 @@ | |||
| 50 | * IOCTL's used for the Quicknet Telephony Cards | 50 | * IOCTL's used for the Quicknet Telephony Cards |
| 51 | * | 51 | * |
| 52 | * If you use the IXJCTL_TESTRAM command, the card must be power cycled to | 52 | * If you use the IXJCTL_TESTRAM command, the card must be power cycled to |
| 53 | * reset the SRAM values before futher use. | 53 | * reset the SRAM values before further use. |
| 54 | * | 54 | * |
| 55 | ******************************************************************************/ | 55 | ******************************************************************************/ |
| 56 | 56 | ||
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 922aa313c9f9..f97672a36fa8 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
| @@ -42,7 +42,7 @@ | |||
| 42 | /* LATCH is used in the interval timer and ftape setup. */ | 42 | /* LATCH is used in the interval timer and ftape setup. */ |
| 43 | #define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ | 43 | #define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ |
| 44 | 44 | ||
| 45 | /* Suppose we want to devide two numbers NOM and DEN: NOM/DEN, then we can | 45 | /* Suppose we want to divide two numbers NOM and DEN: NOM/DEN, then we can |
| 46 | * improve accuracy by shifting LSH bits, hence calculating: | 46 | * improve accuracy by shifting LSH bits, hence calculating: |
| 47 | * (NOM << LSH) / DEN | 47 | * (NOM << LSH) / DEN |
| 48 | * This however means trouble for large NOM, because (NOM << LSH) may no | 48 | * This however means trouble for large NOM, because (NOM << LSH) may no |
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 03e8e8dbc577..c2478a342cd7 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
| @@ -208,6 +208,7 @@ int __init parse_crashkernel(char *cmdline, unsigned long long system_ram, | |||
| 208 | unsigned long long *crash_size, unsigned long long *crash_base); | 208 | unsigned long long *crash_size, unsigned long long *crash_base); |
| 209 | int crash_shrink_memory(unsigned long new_size); | 209 | int crash_shrink_memory(unsigned long new_size); |
| 210 | size_t crash_get_memory_size(void); | 210 | size_t crash_get_memory_size(void); |
| 211 | void crash_free_reserved_phys_range(unsigned long begin, unsigned long end); | ||
| 211 | 212 | ||
| 212 | #else /* !CONFIG_KEXEC */ | 213 | #else /* !CONFIG_KEXEC */ |
| 213 | struct pt_regs; | 214 | struct pt_regs; |
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index e1ceaa9b36bb..603bec2913b0 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | * | 35 | * |
| 36 | * On 32-bit CPUs an optimized representation of the timespec structure | 36 | * On 32-bit CPUs an optimized representation of the timespec structure |
| 37 | * is used to avoid expensive conversions from and to timespecs. The | 37 | * is used to avoid expensive conversions from and to timespecs. The |
| 38 | * endian-aware order of the tv struct members is choosen to allow | 38 | * endian-aware order of the tv struct members is chosen to allow |
| 39 | * mathematical operations on the tv64 member of the union too, which | 39 | * mathematical operations on the tv64 member of the union too, which |
| 40 | * for certain operations produces better code. | 40 | * for certain operations produces better code. |
| 41 | * | 41 | * |
| @@ -158,7 +158,7 @@ static inline ktime_t ktime_set(const long secs, const unsigned long nsecs) | |||
| 158 | * @lhs: minuend | 158 | * @lhs: minuend |
| 159 | * @rhs: subtrahend | 159 | * @rhs: subtrahend |
| 160 | * | 160 | * |
| 161 | * Returns the remainder of the substraction | 161 | * Returns the remainder of the subtraction |
| 162 | */ | 162 | */ |
| 163 | static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs) | 163 | static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs) |
| 164 | { | 164 | { |
diff --git a/include/linux/led-lm3530.h b/include/linux/led-lm3530.h index bb69d20da0dc..58592fa67d24 100644 --- a/include/linux/led-lm3530.h +++ b/include/linux/led-lm3530.h | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | #define LM3530_RAMP_TIME_8s (7) | 41 | #define LM3530_RAMP_TIME_8s (7) |
| 42 | 42 | ||
| 43 | /* ALS Resistor Select */ | 43 | /* ALS Resistor Select */ |
| 44 | #define LM3530_ALS_IMPD_Z (0x00) /* ALS Impedence */ | 44 | #define LM3530_ALS_IMPD_Z (0x00) /* ALS Impedance */ |
| 45 | #define LM3530_ALS_IMPD_13_53kOhm (0x01) | 45 | #define LM3530_ALS_IMPD_13_53kOhm (0x01) |
| 46 | #define LM3530_ALS_IMPD_9_01kOhm (0x02) | 46 | #define LM3530_ALS_IMPD_9_01kOhm (0x02) |
| 47 | #define LM3530_ALS_IMPD_5_41kOhm (0x03) | 47 | #define LM3530_ALS_IMPD_5_41kOhm (0x03) |
diff --git a/include/linux/libata.h b/include/linux/libata.h index c71f46960f39..7f675aa81d87 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -364,7 +364,7 @@ enum { | |||
| 364 | ATA_EH_CMD_TIMEOUT_TABLE_SIZE = 6, | 364 | ATA_EH_CMD_TIMEOUT_TABLE_SIZE = 6, |
| 365 | 365 | ||
| 366 | /* Horkage types. May be set by libata or controller on drives | 366 | /* Horkage types. May be set by libata or controller on drives |
| 367 | (some horkage may be drive/controller pair dependant */ | 367 | (some horkage may be drive/controller pair dependent */ |
| 368 | 368 | ||
| 369 | ATA_HORKAGE_DIAGNOSTIC = (1 << 0), /* Failed boot diag */ | 369 | ATA_HORKAGE_DIAGNOSTIC = (1 << 0), /* Failed boot diag */ |
| 370 | ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */ | 370 | ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */ |
diff --git a/include/linux/lru_cache.h b/include/linux/lru_cache.h index 78fbf24f357a..6a4fab7c6e09 100644 --- a/include/linux/lru_cache.h +++ b/include/linux/lru_cache.h | |||
| @@ -148,7 +148,7 @@ write intent log information, three of which are mentioned here. | |||
| 148 | * | 148 | * |
| 149 | * DRBD currently (May 2009) only uses 61 elements on the resync lru_cache | 149 | * DRBD currently (May 2009) only uses 61 elements on the resync lru_cache |
| 150 | * (total memory usage 2 pages), and up to 3833 elements on the act_log | 150 | * (total memory usage 2 pages), and up to 3833 elements on the act_log |
| 151 | * lru_cache, totalling ~215 kB for 64bit architechture, ~53 pages. | 151 | * lru_cache, totalling ~215 kB for 64bit architecture, ~53 pages. |
| 152 | * | 152 | * |
| 153 | * We usually do not actually free these objects again, but only "recycle" | 153 | * We usually do not actually free these objects again, but only "recycle" |
| 154 | * them, as the change "index: -old_label, +LC_FREE" would need a transaction | 154 | * them, as the change "index: -old_label, +LC_FREE" would need a transaction |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 5a5ce7055839..5e9840f50980 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
| @@ -216,7 +216,7 @@ static inline void mem_cgroup_del_lru_list(struct page *page, int lru) | |||
| 216 | return ; | 216 | return ; |
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | static inline inline void mem_cgroup_rotate_reclaimable_page(struct page *page) | 219 | static inline void mem_cgroup_rotate_reclaimable_page(struct page *page) |
| 220 | { | 220 | { |
| 221 | return ; | 221 | return ; |
| 222 | } | 222 | } |
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index ad1b19aa6508..aef23309a742 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h | |||
| @@ -86,16 +86,25 @@ extern int mfd_clone_cell(const char *cell, const char **clones, | |||
| 86 | */ | 86 | */ |
| 87 | static inline const struct mfd_cell *mfd_get_cell(struct platform_device *pdev) | 87 | static inline const struct mfd_cell *mfd_get_cell(struct platform_device *pdev) |
| 88 | { | 88 | { |
| 89 | return pdev->dev.platform_data; | 89 | return pdev->mfd_cell; |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | /* | 92 | /* |
| 93 | * Given a platform device that's been created by mfd_add_devices(), fetch | 93 | * Given a platform device that's been created by mfd_add_devices(), fetch |
| 94 | * the .mfd_data entry from the mfd_cell that created it. | 94 | * the .mfd_data entry from the mfd_cell that created it. |
| 95 | * Otherwise just return the platform_data pointer. | ||
| 96 | * This maintains compatibility with platform drivers whose devices aren't | ||
| 97 | * created by the mfd layer, and expect platform_data to contain what would've | ||
| 98 | * otherwise been in mfd_data. | ||
| 95 | */ | 99 | */ |
| 96 | static inline void *mfd_get_data(struct platform_device *pdev) | 100 | static inline void *mfd_get_data(struct platform_device *pdev) |
| 97 | { | 101 | { |
| 98 | return mfd_get_cell(pdev)->mfd_data; | 102 | const struct mfd_cell *cell = mfd_get_cell(pdev); |
| 103 | |||
| 104 | if (cell) | ||
| 105 | return cell->mfd_data; | ||
| 106 | else | ||
| 107 | return pdev->dev.platform_data; | ||
| 99 | } | 108 | } |
| 100 | 109 | ||
| 101 | extern int mfd_add_devices(struct device *parent, int id, | 110 | extern int mfd_add_devices(struct device *parent, int id, |
diff --git a/include/linux/mfd/wm8350/pmic.h b/include/linux/mfd/wm8350/pmic.h index e786fe9841ef..579b50ca2e02 100644 --- a/include/linux/mfd/wm8350/pmic.h +++ b/include/linux/mfd/wm8350/pmic.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * pmic.h -- Power Managment Driver for Wolfson WM8350 PMIC | 2 | * pmic.h -- Power Management Driver for Wolfson WM8350 PMIC |
| 3 | * | 3 | * |
| 4 | * Copyright 2007 Wolfson Microelectronics PLC | 4 | * Copyright 2007 Wolfson Microelectronics PLC |
| 5 | * | 5 | * |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 7606d7db96c9..692dbae6ffa7 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -608,7 +608,7 @@ static inline pte_t maybe_mkwrite(pte_t pte, struct vm_area_struct *vma) | |||
| 608 | #endif | 608 | #endif |
| 609 | 609 | ||
| 610 | /* | 610 | /* |
| 611 | * Define the bit shifts to access each section. For non-existant | 611 | * Define the bit shifts to access each section. For non-existent |
| 612 | * sections we define the shift as 0; that plus a 0 mask ensures | 612 | * sections we define the shift as 0; that plus a 0 mask ensures |
| 613 | * the compiler will optimise away reference to them. | 613 | * the compiler will optimise away reference to them. |
| 614 | */ | 614 | */ |
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h index c0207a770476..bdd7ceeb99e4 100644 --- a/include/linux/mmc/dw_mmc.h +++ b/include/linux/mmc/dw_mmc.h | |||
| @@ -98,7 +98,7 @@ struct mmc_data; | |||
| 98 | * EVENT_DATA_COMPLETE is set in @pending_events, all data-related | 98 | * EVENT_DATA_COMPLETE is set in @pending_events, all data-related |
| 99 | * interrupts must be disabled and @data_status updated with a | 99 | * interrupts must be disabled and @data_status updated with a |
| 100 | * snapshot of SR. Similarly, before EVENT_CMD_COMPLETE is set, the | 100 | * snapshot of SR. Similarly, before EVENT_CMD_COMPLETE is set, the |
| 101 | * CMDRDY interupt must be disabled and @cmd_status updated with a | 101 | * CMDRDY interrupt must be disabled and @cmd_status updated with a |
| 102 | * snapshot of SR, and before EVENT_XFER_COMPLETE can be set, the | 102 | * snapshot of SR, and before EVENT_XFER_COMPLETE can be set, the |
| 103 | * bytes_xfered field of @data must be written. This is ensured by | 103 | * bytes_xfered field of @data must be written. This is ensured by |
| 104 | * using barriers. | 104 | * using barriers. |
| @@ -172,7 +172,7 @@ struct dw_mci_dma_ops { | |||
| 172 | #define DW_MCI_QUIRK_IDMAC_DTO BIT(0) | 172 | #define DW_MCI_QUIRK_IDMAC_DTO BIT(0) |
| 173 | /* delay needed between retries on some 2.11a implementations */ | 173 | /* delay needed between retries on some 2.11a implementations */ |
| 174 | #define DW_MCI_QUIRK_RETRY_DELAY BIT(1) | 174 | #define DW_MCI_QUIRK_RETRY_DELAY BIT(1) |
| 175 | /* High Speed Capable - Supports HS cards (upto 50MHz) */ | 175 | /* High Speed Capable - Supports HS cards (up to 50MHz) */ |
| 176 | #define DW_MCI_QUIRK_HIGHSPEED BIT(2) | 176 | #define DW_MCI_QUIRK_HIGHSPEED BIT(2) |
| 177 | /* Unreliable card detection */ | 177 | /* Unreliable card detection */ |
| 178 | #define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(3) | 178 | #define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(3) |
diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h index 9d2deb200f54..a3759cb0ac10 100644 --- a/include/linux/mroute6.h +++ b/include/linux/mroute6.h | |||
| @@ -249,7 +249,7 @@ static inline int ip6mr_sk_done(struct sock *sk) | |||
| 249 | * Structure used to communicate from kernel to multicast router. | 249 | * Structure used to communicate from kernel to multicast router. |
| 250 | * We'll overlay the structure onto an MLD header (not an IPv6 heder like igmpmsg{} | 250 | * We'll overlay the structure onto an MLD header (not an IPv6 heder like igmpmsg{} |
| 251 | * used for IPv4 implementation). This is because this structure will be passed via an | 251 | * used for IPv4 implementation). This is because this structure will be passed via an |
| 252 | * IPv6 raw socket, on wich an application will only receiver the payload i.e the data after | 252 | * IPv6 raw socket, on which an application will only receiver the payload i.e the data after |
| 253 | * the IPv6 header and all the extension headers. (See section 3 of RFC 3542) | 253 | * the IPv6 header and all the extension headers. (See section 3 of RFC 3542) |
| 254 | */ | 254 | */ |
| 255 | 255 | ||
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h index 0d823f2dd667..d24925492972 100644 --- a/include/linux/mtd/cfi.h +++ b/include/linux/mtd/cfi.h | |||
| @@ -308,7 +308,7 @@ static inline uint32_t cfi_build_cmd_addr(uint32_t cmd_ofs, | |||
| 308 | 308 | ||
| 309 | addr = (cmd_ofs * type) * interleave; | 309 | addr = (cmd_ofs * type) * interleave; |
| 310 | 310 | ||
| 311 | /* Modify the unlock address if we are in compatiblity mode. | 311 | /* Modify the unlock address if we are in compatibility mode. |
| 312 | * For 16bit devices on 8 bit busses | 312 | * For 16bit devices on 8 bit busses |
| 313 | * and 32bit devices on 16 bit busses | 313 | * and 32bit devices on 16 bit busses |
| 314 | * set the low bit of the alternating bit sequence of the address. | 314 | * set the low bit of the alternating bit sequence of the address. |
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index ae67ef56a8f5..d44192740f6f 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
| @@ -416,9 +416,9 @@ struct nand_buffers { | |||
| 416 | * @select_chip: [REPLACEABLE] select chip nr | 416 | * @select_chip: [REPLACEABLE] select chip nr |
| 417 | * @block_bad: [REPLACEABLE] check, if the block is bad | 417 | * @block_bad: [REPLACEABLE] check, if the block is bad |
| 418 | * @block_markbad: [REPLACEABLE] mark the block bad | 418 | * @block_markbad: [REPLACEABLE] mark the block bad |
| 419 | * @cmd_ctrl: [BOARDSPECIFIC] hardwarespecific funtion for controlling | 419 | * @cmd_ctrl: [BOARDSPECIFIC] hardwarespecific function for controlling |
| 420 | * ALE/CLE/nCE. Also used to write command and address | 420 | * ALE/CLE/nCE. Also used to write command and address |
| 421 | * @init_size: [BOARDSPECIFIC] hardwarespecific funtion for setting | 421 | * @init_size: [BOARDSPECIFIC] hardwarespecific function for setting |
| 422 | * mtd->oobsize, mtd->writesize and so on. | 422 | * mtd->oobsize, mtd->writesize and so on. |
| 423 | * @id_data contains the 8 bytes values of NAND_CMD_READID. | 423 | * @id_data contains the 8 bytes values of NAND_CMD_READID. |
| 424 | * Return with the bus width. | 424 | * Return with the bus width. |
| @@ -437,7 +437,7 @@ struct nand_buffers { | |||
| 437 | * @erase_cmd: [INTERN] erase command write function, selectable due | 437 | * @erase_cmd: [INTERN] erase command write function, selectable due |
| 438 | * to AND support. | 438 | * to AND support. |
| 439 | * @scan_bbt: [REPLACEABLE] function to scan bad block table | 439 | * @scan_bbt: [REPLACEABLE] function to scan bad block table |
| 440 | * @chip_delay: [BOARDSPECIFIC] chip dependent delay for transfering | 440 | * @chip_delay: [BOARDSPECIFIC] chip dependent delay for transferring |
| 441 | * data from array to read regs (tR). | 441 | * data from array to read regs (tR). |
| 442 | * @state: [INTERN] the current state of the NAND device | 442 | * @state: [INTERN] the current state of the NAND device |
| 443 | * @oob_poi: poison value buffer | 443 | * @oob_poi: poison value buffer |
diff --git a/include/linux/mtd/xip.h b/include/linux/mtd/xip.h index 36efcba15ecd..abed4dec5c2f 100644 --- a/include/linux/mtd/xip.h +++ b/include/linux/mtd/xip.h | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | * return in usecs the elapsed timebetween now and the reference x as | 51 | * return in usecs the elapsed timebetween now and the reference x as |
| 52 | * returned by xip_currtime(). | 52 | * returned by xip_currtime(). |
| 53 | * | 53 | * |
| 54 | * note 1: convertion to usec can be approximated, as long as the | 54 | * note 1: conversion to usec can be approximated, as long as the |
| 55 | * returned value is <= the real elapsed time. | 55 | * returned value is <= the real elapsed time. |
| 56 | * note 2: this should be able to cope with a few seconds without | 56 | * note 2: this should be able to cope with a few seconds without |
| 57 | * overflowing. | 57 | * overflowing. |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 5eeb2cd3631c..0249fe7e3872 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -2598,8 +2598,8 @@ static inline int dev_ethtool_get_settings(struct net_device *dev, | |||
| 2598 | 2598 | ||
| 2599 | static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) | 2599 | static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) |
| 2600 | { | 2600 | { |
| 2601 | if (dev->hw_features & NETIF_F_RXCSUM) | 2601 | if (dev->features & NETIF_F_RXCSUM) |
| 2602 | return !!(dev->features & NETIF_F_RXCSUM); | 2602 | return 1; |
| 2603 | if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum) | 2603 | if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum) |
| 2604 | return 0; | 2604 | return 0; |
| 2605 | return dev->ethtool_ops->get_rx_csum(dev); | 2605 | return dev->ethtool_ops->get_rx_csum(dev); |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index eeec00abb664..7fa95df60146 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
| @@ -270,7 +270,8 @@ struct nf_afinfo { | |||
| 270 | unsigned int dataoff, | 270 | unsigned int dataoff, |
| 271 | unsigned int len, | 271 | unsigned int len, |
| 272 | u_int8_t protocol); | 272 | u_int8_t protocol); |
| 273 | int (*route)(struct dst_entry **dst, struct flowi *fl); | 273 | int (*route)(struct net *net, struct dst_entry **dst, |
| 274 | struct flowi *fl, bool strict); | ||
| 274 | void (*saveroute)(const struct sk_buff *skb, | 275 | void (*saveroute)(const struct sk_buff *skb, |
| 275 | struct nf_queue_entry *entry); | 276 | struct nf_queue_entry *entry); |
| 276 | int (*reroute)(struct sk_buff *skb, | 277 | int (*reroute)(struct sk_buff *skb, |
diff --git a/include/linux/netfilter/ipset/ip_set.h b/include/linux/netfilter/ipset/ip_set.h index ec333d83f3b4..5a262e3ae715 100644 --- a/include/linux/netfilter/ipset/ip_set.h +++ b/include/linux/netfilter/ipset/ip_set.h | |||
| @@ -293,7 +293,7 @@ struct ip_set { | |||
| 293 | /* Lock protecting the set data */ | 293 | /* Lock protecting the set data */ |
| 294 | rwlock_t lock; | 294 | rwlock_t lock; |
| 295 | /* References to the set */ | 295 | /* References to the set */ |
| 296 | atomic_t ref; | 296 | u32 ref; |
| 297 | /* The core set type */ | 297 | /* The core set type */ |
| 298 | struct ip_set_type *type; | 298 | struct ip_set_type *type; |
| 299 | /* The type variant doing the real job */ | 299 | /* The type variant doing the real job */ |
diff --git a/include/linux/netfilter/ipset/ip_set_ahash.h b/include/linux/netfilter/ipset/ip_set_ahash.h index ec9d9bea1e37..a0196ac79051 100644 --- a/include/linux/netfilter/ipset/ip_set_ahash.h +++ b/include/linux/netfilter/ipset/ip_set_ahash.h | |||
| @@ -515,8 +515,7 @@ type_pf_head(struct ip_set *set, struct sk_buff *skb) | |||
| 515 | if (h->netmask != HOST_MASK) | 515 | if (h->netmask != HOST_MASK) |
| 516 | NLA_PUT_U8(skb, IPSET_ATTR_NETMASK, h->netmask); | 516 | NLA_PUT_U8(skb, IPSET_ATTR_NETMASK, h->netmask); |
| 517 | #endif | 517 | #endif |
| 518 | NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, | 518 | NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, htonl(set->ref - 1)); |
| 519 | htonl(atomic_read(&set->ref) - 1)); | ||
| 520 | NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE, htonl(memsize)); | 519 | NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE, htonl(memsize)); |
| 521 | if (with_timeout(h->timeout)) | 520 | if (with_timeout(h->timeout)) |
| 522 | NLA_PUT_NET32(skb, IPSET_ATTR_TIMEOUT, htonl(h->timeout)); | 521 | NLA_PUT_NET32(skb, IPSET_ATTR_TIMEOUT, htonl(h->timeout)); |
diff --git a/include/linux/netfilter/nf_conntrack_proto_gre.h b/include/linux/netfilter/nf_conntrack_proto_gre.h index 2a10efda17fb..6a0664c0c451 100644 --- a/include/linux/netfilter/nf_conntrack_proto_gre.h +++ b/include/linux/netfilter/nf_conntrack_proto_gre.h | |||
| @@ -60,7 +60,7 @@ struct gre_hdr_pptp { | |||
| 60 | __be16 payload_len; /* size of ppp payload, not inc. gre header */ | 60 | __be16 payload_len; /* size of ppp payload, not inc. gre header */ |
| 61 | __be16 call_id; /* peer's call_id for this session */ | 61 | __be16 call_id; /* peer's call_id for this session */ |
| 62 | __be32 seq; /* sequence number. Present if S==1 */ | 62 | __be32 seq; /* sequence number. Present if S==1 */ |
| 63 | __be32 ack; /* seq number of highest packet recieved by */ | 63 | __be32 ack; /* seq number of highest packet received by */ |
| 64 | /* sender in this session */ | 64 | /* sender in this session */ |
| 65 | }; | 65 | }; |
| 66 | 66 | ||
diff --git a/include/linux/netfilter_bridge/ebtables.h b/include/linux/netfilter_bridge/ebtables.h index 1c6f0c5f530e..8797ed16feb2 100644 --- a/include/linux/netfilter_bridge/ebtables.h +++ b/include/linux/netfilter_bridge/ebtables.h | |||
| @@ -92,7 +92,7 @@ struct ebt_entries { | |||
| 92 | 92 | ||
| 93 | /* This is a hack to make a difference between an ebt_entry struct and an | 93 | /* This is a hack to make a difference between an ebt_entry struct and an |
| 94 | * ebt_entries struct when traversing the entries from start to end. | 94 | * ebt_entries struct when traversing the entries from start to end. |
| 95 | * Using this simplifies the code alot, while still being able to use | 95 | * Using this simplifies the code a lot, while still being able to use |
| 96 | * ebt_entries. | 96 | * ebt_entries. |
| 97 | * Contrary, iptables doesn't use something like ebt_entries and therefore uses | 97 | * Contrary, iptables doesn't use something like ebt_entries and therefore uses |
| 98 | * different techniques for naming the policy and such. So, iptables doesn't | 98 | * different techniques for naming the policy and such. So, iptables doesn't |
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index b528f6d4b860..178fafe0ff93 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
| @@ -359,7 +359,7 @@ enum nfsstat4 { | |||
| 359 | /* Error 10073 is unused. */ | 359 | /* Error 10073 is unused. */ |
| 360 | NFS4ERR_CLIENTID_BUSY = 10074, /* clientid has state */ | 360 | NFS4ERR_CLIENTID_BUSY = 10074, /* clientid has state */ |
| 361 | NFS4ERR_PNFS_IO_HOLE = 10075, /* IO to _SPARSE file hole */ | 361 | NFS4ERR_PNFS_IO_HOLE = 10075, /* IO to _SPARSE file hole */ |
| 362 | NFS4ERR_SEQ_FALSE_RETRY = 10076, /* retry not origional */ | 362 | NFS4ERR_SEQ_FALSE_RETRY = 10076, /* retry not original */ |
| 363 | NFS4ERR_BAD_HIGH_SLOT = 10077, /* sequence arg bad */ | 363 | NFS4ERR_BAD_HIGH_SLOT = 10077, /* sequence arg bad */ |
| 364 | NFS4ERR_DEADSESSION = 10078, /* persistent session dead */ | 364 | NFS4ERR_DEADSESSION = 10078, /* persistent session dead */ |
| 365 | NFS4ERR_ENCR_ALG_UNSUPP = 10079, /* SSV alg mismatch */ | 365 | NFS4ERR_ENCR_ALG_UNSUPP = 10079, /* SSV alg mismatch */ |
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index bd316159278c..84058ec69390 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h | |||
| @@ -80,7 +80,7 @@ struct nfsd4_fs_locations { | |||
| 80 | 80 | ||
| 81 | /* | 81 | /* |
| 82 | * We keep an array of pseudoflavors with the export, in order from most | 82 | * We keep an array of pseudoflavors with the export, in order from most |
| 83 | * to least preferred. For the forseeable future, we don't expect more | 83 | * to least preferred. For the foreseeable future, we don't expect more |
| 84 | * than the eight pseudoflavors null, unix, krb5, krb5i, krb5p, skpm3, | 84 | * than the eight pseudoflavors null, unix, krb5, krb5i, krb5p, skpm3, |
| 85 | * spkm3i, and spkm3p (and using all 8 at once should be rare). | 85 | * spkm3i, and spkm3p (and using all 8 at once should be rare). |
| 86 | */ | 86 | */ |
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index 80d55bbc5365..f76d80ccec10 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h | |||
| @@ -49,7 +49,7 @@ struct nfs_fhbase_old { | |||
| 49 | * | 49 | * |
| 50 | * The auth_type field specifies how the filehandle can be authenticated | 50 | * The auth_type field specifies how the filehandle can be authenticated |
| 51 | * This might allow a file to be confirmed to be in a writable part of a | 51 | * This might allow a file to be confirmed to be in a writable part of a |
| 52 | * filetree without checking the path from it upto the root. | 52 | * filetree without checking the path from it up to the root. |
| 53 | * Current values: | 53 | * Current values: |
| 54 | * 0 - No authentication. fb_auth is 0 bytes long | 54 | * 0 - No authentication. fb_auth is 0 bytes long |
| 55 | * Possible future values: | 55 | * Possible future values: |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 30022189104d..bbfa1093f606 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
| @@ -414,7 +414,7 @@ | |||
| 414 | * @__NL80211_CMD_AFTER_LAST: internal use | 414 | * @__NL80211_CMD_AFTER_LAST: internal use |
| 415 | */ | 415 | */ |
| 416 | enum nl80211_commands { | 416 | enum nl80211_commands { |
| 417 | /* don't change the order or add anything inbetween, this is ABI! */ | 417 | /* don't change the order or add anything between, this is ABI! */ |
| 418 | NL80211_CMD_UNSPEC, | 418 | NL80211_CMD_UNSPEC, |
| 419 | 419 | ||
| 420 | NL80211_CMD_GET_WIPHY, /* can dump */ | 420 | NL80211_CMD_GET_WIPHY, /* can dump */ |
| @@ -860,7 +860,7 @@ enum nl80211_commands { | |||
| 860 | * This can be used to mask out antennas which are not attached or should | 860 | * This can be used to mask out antennas which are not attached or should |
| 861 | * not be used for receiving. If an antenna is not selected in this bitmap | 861 | * not be used for receiving. If an antenna is not selected in this bitmap |
| 862 | * the hardware should not be configured to receive on this antenna. | 862 | * the hardware should not be configured to receive on this antenna. |
| 863 | * For a more detailed descripton see @NL80211_ATTR_WIPHY_ANTENNA_TX. | 863 | * For a more detailed description see @NL80211_ATTR_WIPHY_ANTENNA_TX. |
| 864 | * | 864 | * |
| 865 | * @NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX: Bitmap of antennas which are available | 865 | * @NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX: Bitmap of antennas which are available |
| 866 | * for configuration as TX antennas via the above parameters. | 866 | * for configuration as TX antennas via the above parameters. |
| @@ -891,7 +891,7 @@ enum nl80211_commands { | |||
| 891 | * @__NL80211_ATTR_AFTER_LAST: internal use | 891 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| 892 | */ | 892 | */ |
| 893 | enum nl80211_attrs { | 893 | enum nl80211_attrs { |
| 894 | /* don't change the order or add anything inbetween, this is ABI! */ | 894 | /* don't change the order or add anything between, this is ABI! */ |
| 895 | NL80211_ATTR_UNSPEC, | 895 | NL80211_ATTR_UNSPEC, |
| 896 | 896 | ||
| 897 | NL80211_ATTR_WIPHY, | 897 | NL80211_ATTR_WIPHY, |
| @@ -1419,7 +1419,7 @@ enum nl80211_bitrate_attr { | |||
| 1419 | * 802.11 country information element with regulatory information it | 1419 | * 802.11 country information element with regulatory information it |
| 1420 | * thinks we should consider. cfg80211 only processes the country | 1420 | * thinks we should consider. cfg80211 only processes the country |
| 1421 | * code from the IE, and relies on the regulatory domain information | 1421 | * code from the IE, and relies on the regulatory domain information |
| 1422 | * structure pased by userspace (CRDA) from our wireless-regdb. | 1422 | * structure passed by userspace (CRDA) from our wireless-regdb. |
| 1423 | * If a channel is enabled but the country code indicates it should | 1423 | * If a channel is enabled but the country code indicates it should |
| 1424 | * be disabled we disable the channel and re-enable it upon disassociation. | 1424 | * be disabled we disable the channel and re-enable it upon disassociation. |
| 1425 | */ | 1425 | */ |
| @@ -1598,7 +1598,7 @@ enum nl80211_mntr_flags { | |||
| 1598 | * @NL80211_MESHCONF_RETRY_TIMEOUT: specifies the initial retry timeout in | 1598 | * @NL80211_MESHCONF_RETRY_TIMEOUT: specifies the initial retry timeout in |
| 1599 | * millisecond units, used by the Peer Link Open message | 1599 | * millisecond units, used by the Peer Link Open message |
| 1600 | * | 1600 | * |
| 1601 | * @NL80211_MESHCONF_CONFIRM_TIMEOUT: specifies the inital confirm timeout, in | 1601 | * @NL80211_MESHCONF_CONFIRM_TIMEOUT: specifies the initial confirm timeout, in |
| 1602 | * millisecond units, used by the peer link management to close a peer link | 1602 | * millisecond units, used by the peer link management to close a peer link |
| 1603 | * | 1603 | * |
| 1604 | * @NL80211_MESHCONF_HOLDING_TIMEOUT: specifies the holding timeout, in | 1604 | * @NL80211_MESHCONF_HOLDING_TIMEOUT: specifies the holding timeout, in |
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index 2026f9e1ceb8..621dfa16acc0 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
| @@ -237,7 +237,7 @@ static inline int notifier_to_errno(int ret) | |||
| 237 | * enabling interrupts. Must not sleep, | 237 | * enabling interrupts. Must not sleep, |
| 238 | * must not fail */ | 238 | * must not fail */ |
| 239 | 239 | ||
| 240 | /* Used for CPU hotplug events occuring while tasks are frozen due to a suspend | 240 | /* Used for CPU hotplug events occurring while tasks are frozen due to a suspend |
| 241 | * operation in progress | 241 | * operation in progress |
| 242 | */ | 242 | */ |
| 243 | #define CPU_TASKS_FROZEN 0x0010 | 243 | #define CPU_TASKS_FROZEN 0x0010 |
diff --git a/include/linux/omap3isp.h b/include/linux/omap3isp.h index 150822b4dbff..b6111f8cd49a 100644 --- a/include/linux/omap3isp.h +++ b/include/linux/omap3isp.h | |||
| @@ -250,7 +250,7 @@ enum omap3isp_h3a_af_rgbpos { | |||
| 250 | /* Contains the information regarding the Horizontal Median Filter */ | 250 | /* Contains the information regarding the Horizontal Median Filter */ |
| 251 | struct omap3isp_h3a_af_hmf { | 251 | struct omap3isp_h3a_af_hmf { |
| 252 | __u8 enable; /* Status of Horizontal Median Filter */ | 252 | __u8 enable; /* Status of Horizontal Median Filter */ |
| 253 | __u8 threshold; /* Threshhold Value for Horizontal Median Filter */ | 253 | __u8 threshold; /* Threshold Value for Horizontal Median Filter */ |
| 254 | }; | 254 | }; |
| 255 | 255 | ||
| 256 | /* Contains the information regarding the IIR Filters */ | 256 | /* Contains the information regarding the IIR Filters */ |
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index f5de21de31dd..961ecc7d30bc 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
| @@ -138,7 +138,7 @@ static inline void move_unlock_page_cgroup(struct page_cgroup *pc, | |||
| 138 | 138 | ||
| 139 | #define PCG_ARRAYID_OFFSET (BITS_PER_LONG - PCG_ARRAYID_WIDTH) | 139 | #define PCG_ARRAYID_OFFSET (BITS_PER_LONG - PCG_ARRAYID_WIDTH) |
| 140 | /* | 140 | /* |
| 141 | * Zero the shift count for non-existant fields, to prevent compiler | 141 | * Zero the shift count for non-existent fields, to prevent compiler |
| 142 | * warnings and ensure references are optimized away. | 142 | * warnings and ensure references are optimized away. |
| 143 | */ | 143 | */ |
| 144 | #define PCG_ARRAYID_SHIFT (PCG_ARRAYID_OFFSET * (PCG_ARRAYID_WIDTH != 0)) | 144 | #define PCG_ARRAYID_SHIFT (PCG_ARRAYID_OFFSET * (PCG_ARRAYID_WIDTH != 0)) |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 11fd38151cc9..4e2c9150a785 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -518,7 +518,7 @@ | |||
| 518 | #define PCI_DEVICE_ID_AMD_11H_NB_MISC 0x1303 | 518 | #define PCI_DEVICE_ID_AMD_11H_NB_MISC 0x1303 |
| 519 | #define PCI_DEVICE_ID_AMD_11H_NB_LINK 0x1304 | 519 | #define PCI_DEVICE_ID_AMD_11H_NB_LINK 0x1304 |
| 520 | #define PCI_DEVICE_ID_AMD_15H_NB_F3 0x1603 | 520 | #define PCI_DEVICE_ID_AMD_15H_NB_F3 0x1603 |
| 521 | #define PCI_DEVICE_ID_AMD_15H_NB_LINK 0x1604 | 521 | #define PCI_DEVICE_ID_AMD_15H_NB_F4 0x1604 |
| 522 | #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 | 522 | #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 |
| 523 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 | 523 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 |
| 524 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 | 524 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index 5b7e6b1ba54f..be01380f798a 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
| @@ -223,7 +223,7 @@ | |||
| 223 | #define PCI_PM_CAP_PME_CLOCK 0x0008 /* PME clock required */ | 223 | #define PCI_PM_CAP_PME_CLOCK 0x0008 /* PME clock required */ |
| 224 | #define PCI_PM_CAP_RESERVED 0x0010 /* Reserved field */ | 224 | #define PCI_PM_CAP_RESERVED 0x0010 /* Reserved field */ |
| 225 | #define PCI_PM_CAP_DSI 0x0020 /* Device specific initialization */ | 225 | #define PCI_PM_CAP_DSI 0x0020 /* Device specific initialization */ |
| 226 | #define PCI_PM_CAP_AUX_POWER 0x01C0 /* Auxilliary power support mask */ | 226 | #define PCI_PM_CAP_AUX_POWER 0x01C0 /* Auxiliary power support mask */ |
| 227 | #define PCI_PM_CAP_D1 0x0200 /* D1 power state support */ | 227 | #define PCI_PM_CAP_D1 0x0200 /* D1 power state support */ |
| 228 | #define PCI_PM_CAP_D2 0x0400 /* D2 power state support */ | 228 | #define PCI_PM_CAP_D2 0x0400 /* D2 power state support */ |
| 229 | #define PCI_PM_CAP_PME 0x0800 /* PME pin supported */ | 229 | #define PCI_PM_CAP_PME 0x0800 /* PME pin supported */ |
| @@ -435,7 +435,7 @@ | |||
| 435 | #define PCI_EXP_LNKCAP_L0SEL 0x00007000 /* L0s Exit Latency */ | 435 | #define PCI_EXP_LNKCAP_L0SEL 0x00007000 /* L0s Exit Latency */ |
| 436 | #define PCI_EXP_LNKCAP_L1EL 0x00038000 /* L1 Exit Latency */ | 436 | #define PCI_EXP_LNKCAP_L1EL 0x00038000 /* L1 Exit Latency */ |
| 437 | #define PCI_EXP_LNKCAP_CLKPM 0x00040000 /* L1 Clock Power Management */ | 437 | #define PCI_EXP_LNKCAP_CLKPM 0x00040000 /* L1 Clock Power Management */ |
| 438 | #define PCI_EXP_LNKCAP_SDERC 0x00080000 /* Suprise Down Error Reporting Capable */ | 438 | #define PCI_EXP_LNKCAP_SDERC 0x00080000 /* Surprise Down Error Reporting Capable */ |
| 439 | #define PCI_EXP_LNKCAP_DLLLARC 0x00100000 /* Data Link Layer Link Active Reporting Capable */ | 439 | #define PCI_EXP_LNKCAP_DLLLARC 0x00100000 /* Data Link Layer Link Active Reporting Capable */ |
| 440 | #define PCI_EXP_LNKCAP_LBNC 0x00200000 /* Link Bandwidth Notification Capability */ | 440 | #define PCI_EXP_LNKCAP_LBNC 0x00200000 /* Link Bandwidth Notification Capability */ |
| 441 | #define PCI_EXP_LNKCAP_PN 0xff000000 /* Port Number */ | 441 | #define PCI_EXP_LNKCAP_PN 0xff000000 /* Port Number */ |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 311b4dc785a1..ee9f1e782800 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -662,7 +662,7 @@ struct pmu { | |||
| 662 | int (*commit_txn) (struct pmu *pmu); /* optional */ | 662 | int (*commit_txn) (struct pmu *pmu); /* optional */ |
| 663 | /* | 663 | /* |
| 664 | * Will cancel the transaction, assumes ->del() is called | 664 | * Will cancel the transaction, assumes ->del() is called |
| 665 | * for each successfull ->add() during the transaction. | 665 | * for each successful ->add() during the transaction. |
| 666 | */ | 666 | */ |
| 667 | void (*cancel_txn) (struct pmu *pmu); /* optional */ | 667 | void (*cancel_txn) (struct pmu *pmu); /* optional */ |
| 668 | }; | 668 | }; |
| @@ -1086,7 +1086,7 @@ void perf_event_task_sched_out(struct task_struct *task, struct task_struct *nex | |||
| 1086 | { | 1086 | { |
| 1087 | perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, NULL, 0); | 1087 | perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, NULL, 0); |
| 1088 | 1088 | ||
| 1089 | COND_STMT(&perf_sched_events, __perf_event_task_sched_out(task, next)); | 1089 | __perf_event_task_sched_out(task, next); |
| 1090 | } | 1090 | } |
| 1091 | 1091 | ||
| 1092 | extern void perf_event_mmap(struct vm_area_struct *vma); | 1092 | extern void perf_event_mmap(struct vm_area_struct *vma); |
diff --git a/include/linux/pid.h b/include/linux/pid.h index efceda0a51b1..cdced84261d7 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
| @@ -21,7 +21,7 @@ enum pid_type | |||
| 21 | * quickly from the numeric pid value. The attached processes may be | 21 | * quickly from the numeric pid value. The attached processes may be |
| 22 | * quickly accessed by following pointers from struct pid. | 22 | * quickly accessed by following pointers from struct pid. |
| 23 | * | 23 | * |
| 24 | * Storing pid_t values in the kernel and refering to them later has a | 24 | * Storing pid_t values in the kernel and referring to them later has a |
| 25 | * problem. The process originally with that pid may have exited and the | 25 | * problem. The process originally with that pid may have exited and the |
| 26 | * pid allocator wrapped, and another process could have come along | 26 | * pid allocator wrapped, and another process could have come along |
| 27 | * and been assigned that pid. | 27 | * and been assigned that pid. |
| @@ -117,7 +117,7 @@ extern struct pid *find_vpid(int nr); | |||
| 117 | */ | 117 | */ |
| 118 | extern struct pid *find_get_pid(int nr); | 118 | extern struct pid *find_get_pid(int nr); |
| 119 | extern struct pid *find_ge_pid(int nr, struct pid_namespace *); | 119 | extern struct pid *find_ge_pid(int nr, struct pid_namespace *); |
| 120 | int next_pidmap(struct pid_namespace *pid_ns, int last); | 120 | int next_pidmap(struct pid_namespace *pid_ns, unsigned int last); |
| 121 | 121 | ||
| 122 | extern struct pid *alloc_pid(struct pid_namespace *ns); | 122 | extern struct pid *alloc_pid(struct pid_namespace *ns); |
| 123 | extern void free_pid(struct pid *pid); | 123 | extern void free_pid(struct pid *pid); |
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index b1032a3fafdc..3a02e0208575 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
| @@ -223,7 +223,7 @@ struct tc_gred_qopt { | |||
| 223 | __u32 limit; /* HARD maximal queue length (bytes) */ | 223 | __u32 limit; /* HARD maximal queue length (bytes) */ |
| 224 | __u32 qth_min; /* Min average length threshold (bytes) */ | 224 | __u32 qth_min; /* Min average length threshold (bytes) */ |
| 225 | __u32 qth_max; /* Max average length threshold (bytes) */ | 225 | __u32 qth_max; /* Max average length threshold (bytes) */ |
| 226 | __u32 DP; /* upto 2^32 DPs */ | 226 | __u32 DP; /* up to 2^32 DPs */ |
| 227 | __u32 backlog; | 227 | __u32 backlog; |
| 228 | __u32 qave; | 228 | __u32 qave; |
| 229 | __u32 forced; | 229 | __u32 forced; |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index d96db9825708..744942c95fec 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
| @@ -14,6 +14,8 @@ | |||
| 14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
| 15 | #include <linux/mod_devicetable.h> | 15 | #include <linux/mod_devicetable.h> |
| 16 | 16 | ||
| 17 | struct mfd_cell; | ||
| 18 | |||
| 17 | struct platform_device { | 19 | struct platform_device { |
| 18 | const char * name; | 20 | const char * name; |
| 19 | int id; | 21 | int id; |
| @@ -23,6 +25,9 @@ struct platform_device { | |||
| 23 | 25 | ||
| 24 | const struct platform_device_id *id_entry; | 26 | const struct platform_device_id *id_entry; |
| 25 | 27 | ||
| 28 | /* MFD cell pointer */ | ||
| 29 | struct mfd_cell *mfd_cell; | ||
| 30 | |||
| 26 | /* arch specific additions */ | 31 | /* arch specific additions */ |
| 27 | struct pdev_archdata archdata; | 32 | struct pdev_archdata archdata; |
| 28 | }; | 33 | }; |
diff --git a/include/linux/poll.h b/include/linux/poll.h index 1a2ccd6f3823..cf40010ce0cd 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h | |||
| @@ -82,7 +82,7 @@ static inline int poll_schedule(struct poll_wqueues *pwq, int state) | |||
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | /* | 84 | /* |
| 85 | * Scaleable version of the fd_set. | 85 | * Scalable version of the fd_set. |
| 86 | */ | 86 | */ |
| 87 | 87 | ||
| 88 | typedef struct { | 88 | typedef struct { |
diff --git a/include/linux/prefetch.h b/include/linux/prefetch.h index af7c36a5a521..a3bfbdf63d32 100644 --- a/include/linux/prefetch.h +++ b/include/linux/prefetch.h | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | prefetchw(x) - prefetches the cacheline at "x" for write | 29 | prefetchw(x) - prefetches the cacheline at "x" for write |
| 30 | spin_lock_prefetch(x) - prefetches the spinlock *x for taking | 30 | spin_lock_prefetch(x) - prefetches the spinlock *x for taking |
| 31 | 31 | ||
| 32 | there is also PREFETCH_STRIDE which is the architecure-prefered | 32 | there is also PREFETCH_STRIDE which is the architecure-preferred |
| 33 | "lookahead" size for prefetching streamed operations. | 33 | "lookahead" size for prefetching streamed operations. |
| 34 | 34 | ||
| 35 | */ | 35 | */ |
diff --git a/include/linux/pxa2xx_ssp.h b/include/linux/pxa2xx_ssp.h index 2f691e4e6222..44835fb39793 100644 --- a/include/linux/pxa2xx_ssp.h +++ b/include/linux/pxa2xx_ssp.h | |||
| @@ -122,7 +122,7 @@ | |||
| 122 | #define SSCR1_TSRE (1 << 21) /* Transmit Service Request Enable */ | 122 | #define SSCR1_TSRE (1 << 21) /* Transmit Service Request Enable */ |
| 123 | #define SSCR1_RSRE (1 << 20) /* Receive Service Request Enable */ | 123 | #define SSCR1_RSRE (1 << 20) /* Receive Service Request Enable */ |
| 124 | #define SSCR1_TINTE (1 << 19) /* Receiver Time-out Interrupt enable */ | 124 | #define SSCR1_TINTE (1 << 19) /* Receiver Time-out Interrupt enable */ |
| 125 | #define SSCR1_PINTE (1 << 18) /* Peripheral Trailing Byte Interupt Enable */ | 125 | #define SSCR1_PINTE (1 << 18) /* Peripheral Trailing Byte Interrupt Enable */ |
| 126 | #define SSCR1_IFS (1 << 16) /* Invert Frame Signal */ | 126 | #define SSCR1_IFS (1 << 16) /* Invert Frame Signal */ |
| 127 | #define SSCR1_STRF (1 << 15) /* Select FIFO or EFWR */ | 127 | #define SSCR1_STRF (1 << 15) /* Select FIFO or EFWR */ |
| 128 | #define SSCR1_EFWR (1 << 14) /* Enable FIFO Write/Read */ | 128 | #define SSCR1_EFWR (1 << 14) /* Enable FIFO Write/Read */ |
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h index ffa2efbbe382..75cbf4f62fe8 100644 --- a/include/linux/raid/md_p.h +++ b/include/linux/raid/md_p.h | |||
| @@ -251,7 +251,7 @@ struct mdp_superblock_1 { | |||
| 251 | __le64 utime; /* 40 bits second, 24 btes microseconds */ | 251 | __le64 utime; /* 40 bits second, 24 btes microseconds */ |
| 252 | __le64 events; /* incremented when superblock updated */ | 252 | __le64 events; /* incremented when superblock updated */ |
| 253 | __le64 resync_offset; /* data before this offset (from data_offset) known to be in sync */ | 253 | __le64 resync_offset; /* data before this offset (from data_offset) known to be in sync */ |
| 254 | __le32 sb_csum; /* checksum upto devs[max_dev] */ | 254 | __le32 sb_csum; /* checksum up to devs[max_dev] */ |
| 255 | __le32 max_dev; /* size of devs[] array to consider */ | 255 | __le32 max_dev; /* size of devs[] array to consider */ |
| 256 | __u8 pad3[64-32]; /* set to 0 when writing */ | 256 | __u8 pad3[64-32]; /* set to 0 when writing */ |
| 257 | 257 | ||
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index af5614856285..ff422d2b7f90 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -339,6 +339,12 @@ extern int rcu_my_thread_group_empty(void); | |||
| 339 | ((typeof(*p) __force __kernel *)(p)); \ | 339 | ((typeof(*p) __force __kernel *)(p)); \ |
| 340 | }) | 340 | }) |
| 341 | 341 | ||
| 342 | #define __rcu_access_index(p, space) \ | ||
| 343 | ({ \ | ||
| 344 | typeof(p) _________p1 = ACCESS_ONCE(p); \ | ||
| 345 | rcu_dereference_sparse(p, space); \ | ||
| 346 | (_________p1); \ | ||
| 347 | }) | ||
| 342 | #define __rcu_dereference_index_check(p, c) \ | 348 | #define __rcu_dereference_index_check(p, c) \ |
| 343 | ({ \ | 349 | ({ \ |
| 344 | typeof(p) _________p1 = ACCESS_ONCE(p); \ | 350 | typeof(p) _________p1 = ACCESS_ONCE(p); \ |
| @@ -429,6 +435,20 @@ extern int rcu_my_thread_group_empty(void); | |||
| 429 | #define rcu_dereference_raw(p) rcu_dereference_check(p, 1) /*@@@ needed? @@@*/ | 435 | #define rcu_dereference_raw(p) rcu_dereference_check(p, 1) /*@@@ needed? @@@*/ |
| 430 | 436 | ||
| 431 | /** | 437 | /** |
| 438 | * rcu_access_index() - fetch RCU index with no dereferencing | ||
| 439 | * @p: The index to read | ||
| 440 | * | ||
| 441 | * Return the value of the specified RCU-protected index, but omit the | ||
| 442 | * smp_read_barrier_depends() and keep the ACCESS_ONCE(). This is useful | ||
| 443 | * when the value of this index is accessed, but the index is not | ||
| 444 | * dereferenced, for example, when testing an RCU-protected index against | ||
| 445 | * -1. Although rcu_access_index() may also be used in cases where | ||
| 446 | * update-side locks prevent the value of the index from changing, you | ||
| 447 | * should instead use rcu_dereference_index_protected() for this use case. | ||
| 448 | */ | ||
| 449 | #define rcu_access_index(p) __rcu_access_index((p), __rcu) | ||
| 450 | |||
| 451 | /** | ||
| 432 | * rcu_dereference_index_check() - rcu_dereference for indices with debug checking | 452 | * rcu_dereference_index_check() - rcu_dereference for indices with debug checking |
| 433 | * @p: The pointer to read, prior to dereferencing | 453 | * @p: The pointer to read, prior to dereferencing |
| 434 | * @c: The conditions under which the dereference will take place | 454 | * @c: The conditions under which the dereference will take place |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 0a3842aacba9..eca75df00fed 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
| @@ -1557,7 +1557,7 @@ struct tree_balance { | |||
| 1557 | /* When inserting an item. */ | 1557 | /* When inserting an item. */ |
| 1558 | #define M_INSERT 'i' | 1558 | #define M_INSERT 'i' |
| 1559 | /* When inserting into (directories only) or appending onto an already | 1559 | /* When inserting into (directories only) or appending onto an already |
| 1560 | existant item. */ | 1560 | existent item. */ |
| 1561 | #define M_PASTE 'p' | 1561 | #define M_PASTE 'p' |
| 1562 | /* When deleting an item. */ | 1562 | /* When deleting an item. */ |
| 1563 | #define M_DELETE 'd' | 1563 | #define M_DELETE 'd' |
diff --git a/include/linux/rio.h b/include/linux/rio.h index 4e37a7cfa726..4d50611112ba 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h | |||
| @@ -396,7 +396,7 @@ union rio_pw_msg { | |||
| 396 | }; | 396 | }; |
| 397 | 397 | ||
| 398 | /* Architecture and hardware-specific functions */ | 398 | /* Architecture and hardware-specific functions */ |
| 399 | extern void rio_register_mport(struct rio_mport *); | 399 | extern int rio_register_mport(struct rio_mport *); |
| 400 | extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int); | 400 | extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int); |
| 401 | extern void rio_close_inb_mbox(struct rio_mport *, int); | 401 | extern void rio_close_inb_mbox(struct rio_mport *, int); |
| 402 | extern int rio_open_outb_mbox(struct rio_mport *, void *, int, int); | 402 | extern int rio_open_outb_mbox(struct rio_mport *, void *, int, int); |
diff --git a/include/linux/rio_ids.h b/include/linux/rio_ids.h index 7410d3365e2a..0cee0152aca9 100644 --- a/include/linux/rio_ids.h +++ b/include/linux/rio_ids.h | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | #define RIO_DID_IDTCPS6Q 0x035f | 35 | #define RIO_DID_IDTCPS6Q 0x035f |
| 36 | #define RIO_DID_IDTCPS10Q 0x035e | 36 | #define RIO_DID_IDTCPS10Q 0x035e |
| 37 | #define RIO_DID_IDTCPS1848 0x0374 | 37 | #define RIO_DID_IDTCPS1848 0x0374 |
| 38 | #define RIO_DID_IDTCPS1432 0x0375 | ||
| 38 | #define RIO_DID_IDTCPS1616 0x0379 | 39 | #define RIO_DID_IDTCPS1616 0x0379 |
| 39 | #define RIO_DID_IDTVPS1616 0x0377 | 40 | #define RIO_DID_IDTVPS1616 0x0377 |
| 40 | #define RIO_DID_IDTSPS1616 0x0378 | 41 | #define RIO_DID_IDTSPS1616 0x0378 |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 2ca7e8a78060..877ece45426f 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
| @@ -228,6 +228,8 @@ extern int rtc_read_alarm(struct rtc_device *rtc, | |||
| 228 | struct rtc_wkalrm *alrm); | 228 | struct rtc_wkalrm *alrm); |
| 229 | extern int rtc_set_alarm(struct rtc_device *rtc, | 229 | extern int rtc_set_alarm(struct rtc_device *rtc, |
| 230 | struct rtc_wkalrm *alrm); | 230 | struct rtc_wkalrm *alrm); |
| 231 | extern int rtc_initialize_alarm(struct rtc_device *rtc, | ||
| 232 | struct rtc_wkalrm *alrm); | ||
| 231 | extern void rtc_update_irq(struct rtc_device *rtc, | 233 | extern void rtc_update_irq(struct rtc_device *rtc, |
| 232 | unsigned long num, unsigned long events); | 234 | unsigned long num, unsigned long events); |
| 233 | 235 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 83bd2e2982fc..18d63cea2848 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -854,7 +854,7 @@ extern int __weak arch_sd_sibiling_asym_packing(void); | |||
| 854 | 854 | ||
| 855 | /* | 855 | /* |
| 856 | * Optimise SD flags for power savings: | 856 | * Optimise SD flags for power savings: |
| 857 | * SD_BALANCE_NEWIDLE helps agressive task consolidation and power savings. | 857 | * SD_BALANCE_NEWIDLE helps aggressive task consolidation and power savings. |
| 858 | * Keep default SD flags if sched_{smt,mc}_power_saving=0 | 858 | * Keep default SD flags if sched_{smt,mc}_power_saving=0 |
| 859 | */ | 859 | */ |
| 860 | 860 | ||
| @@ -1254,6 +1254,9 @@ struct task_struct { | |||
| 1254 | #endif | 1254 | #endif |
| 1255 | 1255 | ||
| 1256 | struct mm_struct *mm, *active_mm; | 1256 | struct mm_struct *mm, *active_mm; |
| 1257 | #ifdef CONFIG_COMPAT_BRK | ||
| 1258 | unsigned brk_randomized:1; | ||
| 1259 | #endif | ||
| 1257 | #if defined(SPLIT_RSS_COUNTING) | 1260 | #if defined(SPLIT_RSS_COUNTING) |
| 1258 | struct task_rss_stat rss_stat; | 1261 | struct task_rss_stat rss_stat; |
| 1259 | #endif | 1262 | #endif |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 239083bfea13..d0ae90af0b40 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -126,7 +126,7 @@ struct sk_buff; | |||
| 126 | * GRO uses frags we allocate at least 16 regardless of page size. | 126 | * GRO uses frags we allocate at least 16 regardless of page size. |
| 127 | */ | 127 | */ |
| 128 | #if (65536/PAGE_SIZE + 2) < 16 | 128 | #if (65536/PAGE_SIZE + 2) < 16 |
| 129 | #define MAX_SKB_FRAGS 16 | 129 | #define MAX_SKB_FRAGS 16UL |
| 130 | #else | 130 | #else |
| 131 | #define MAX_SKB_FRAGS (65536/PAGE_SIZE + 2) | 131 | #define MAX_SKB_FRAGS (65536/PAGE_SIZE + 2) |
| 132 | #endif | 132 | #endif |
| @@ -474,7 +474,7 @@ static inline void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst) | |||
| 474 | extern void skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst); | 474 | extern void skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst); |
| 475 | 475 | ||
| 476 | /** | 476 | /** |
| 477 | * skb_dst_is_noref - Test if skb dst isnt refcounted | 477 | * skb_dst_is_noref - Test if skb dst isn't refcounted |
| 478 | * @skb: buffer | 478 | * @skb: buffer |
| 479 | */ | 479 | */ |
| 480 | static inline bool skb_dst_is_noref(const struct sk_buff *skb) | 480 | static inline bool skb_dst_is_noref(const struct sk_buff *skb) |
diff --git a/include/linux/smc91x.h b/include/linux/smc91x.h index bc21db598c06..76199b75d584 100644 --- a/include/linux/smc91x.h +++ b/include/linux/smc91x.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #define RPC_LED_10 (0x02) /* LED = 10Mbps link detect */ | 21 | #define RPC_LED_10 (0x02) /* LED = 10Mbps link detect */ |
| 22 | #define RPC_LED_FD (0x03) /* LED = Full Duplex Mode */ | 22 | #define RPC_LED_FD (0x03) /* LED = Full Duplex Mode */ |
| 23 | #define RPC_LED_TX_RX (0x04) /* LED = TX or RX packet occurred */ | 23 | #define RPC_LED_TX_RX (0x04) /* LED = TX or RX packet occurred */ |
| 24 | #define RPC_LED_100 (0x05) /* LED = 100Mbps link dectect */ | 24 | #define RPC_LED_100 (0x05) /* LED = 100Mbps link detect */ |
| 25 | #define RPC_LED_TX (0x06) /* LED = TX packet occurred */ | 25 | #define RPC_LED_TX (0x06) /* LED = TX packet occurred */ |
| 26 | #define RPC_LED_RX (0x07) /* LED = RX packet occurred */ | 26 | #define RPC_LED_RX (0x07) /* LED = RX packet occurred */ |
| 27 | 27 | ||
diff --git a/include/linux/socket.h b/include/linux/socket.h index edbb1d07ddf4..d2b5e982f079 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
| @@ -88,7 +88,7 @@ struct cmsghdr { | |||
| 88 | }; | 88 | }; |
| 89 | 89 | ||
| 90 | /* | 90 | /* |
| 91 | * Ancilliary data object information MACROS | 91 | * Ancillary data object information MACROS |
| 92 | * Table 5-14 of POSIX 1003.1g | 92 | * Table 5-14 of POSIX 1003.1g |
| 93 | */ | 93 | */ |
| 94 | 94 | ||
diff --git a/include/linux/soundcard.h b/include/linux/soundcard.h index 1904afedb82f..fe204fe39f7c 100644 --- a/include/linux/soundcard.h +++ b/include/linux/soundcard.h | |||
| @@ -1231,7 +1231,7 @@ void seqbuf_dump(void); /* This function must be provided by programs */ | |||
| 1231 | #define SEQ_PANNING(dev, voice, pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos+128) / 2) | 1231 | #define SEQ_PANNING(dev, voice, pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos+128) / 2) |
| 1232 | 1232 | ||
| 1233 | /* | 1233 | /* |
| 1234 | * Timing and syncronization macros | 1234 | * Timing and synchronization macros |
| 1235 | */ | 1235 | */ |
| 1236 | 1236 | ||
| 1237 | #define _TIMER_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\ | 1237 | #define _TIMER_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\ |
diff --git a/include/linux/spi/spidev.h b/include/linux/spi/spidev.h index bf0570a84f7a..52d9ed01855f 100644 --- a/include/linux/spi/spidev.h +++ b/include/linux/spi/spidev.h | |||
| @@ -66,7 +66,7 @@ | |||
| 66 | * are in a different address space (and may be of different sizes in some | 66 | * are in a different address space (and may be of different sizes in some |
| 67 | * cases, such as 32-bit i386 userspace over a 64-bit x86_64 kernel). | 67 | * cases, such as 32-bit i386 userspace over a 64-bit x86_64 kernel). |
| 68 | * Zero-initialize the structure, including currently unused fields, to | 68 | * Zero-initialize the structure, including currently unused fields, to |
| 69 | * accomodate potential future updates. | 69 | * accommodate potential future updates. |
| 70 | * | 70 | * |
| 71 | * SPI_IOC_MESSAGE gives userspace the equivalent of kernel spi_sync(). | 71 | * SPI_IOC_MESSAGE gives userspace the equivalent of kernel spi_sync(). |
| 72 | * Pass it an array of related transfers, they'll execute together. | 72 | * Pass it an array of related transfers, they'll execute together. |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 80e535897de6..0b22d51258e6 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
| @@ -81,7 +81,7 @@ | |||
| 81 | #include <linux/spinlock_types.h> | 81 | #include <linux/spinlock_types.h> |
| 82 | 82 | ||
| 83 | /* | 83 | /* |
| 84 | * Pull the arch_spin*() functions/declarations (UP-nondebug doesnt need them): | 84 | * Pull the arch_spin*() functions/declarations (UP-nondebug doesn't need them): |
| 85 | */ | 85 | */ |
| 86 | #ifdef CONFIG_SMP | 86 | #ifdef CONFIG_SMP |
| 87 | # include <asm/spinlock.h> | 87 | # include <asm/spinlock.h> |
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index e10352915698..f29197a4b227 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | #ifndef __STMMAC_PLATFORM_DATA | 26 | #ifndef __STMMAC_PLATFORM_DATA |
| 27 | #define __STMMAC_PLATFORM_DATA | 27 | #define __STMMAC_PLATFORM_DATA |
| 28 | 28 | ||
| 29 | /* platfrom data for platfrom device structure's platfrom_data field */ | 29 | /* platform data for platform device structure's platform_data field */ |
| 30 | 30 | ||
| 31 | /* Private data for the STM on-board ethernet driver */ | 31 | /* Private data for the STM on-board ethernet driver */ |
| 32 | struct plat_stmmacenet_data { | 32 | struct plat_stmmacenet_data { |
diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h index 1808960c5059..092dc9b1ce7d 100644 --- a/include/linux/stop_machine.h +++ b/include/linux/stop_machine.h | |||
| @@ -105,7 +105,7 @@ static inline int try_stop_cpus(const struct cpumask *cpumask, | |||
| 105 | * @cpus: the cpus to run the @fn() on (NULL = any online cpu) | 105 | * @cpus: the cpus to run the @fn() on (NULL = any online cpu) |
| 106 | * | 106 | * |
| 107 | * Description: This causes a thread to be scheduled on every cpu, | 107 | * Description: This causes a thread to be scheduled on every cpu, |
| 108 | * each of which disables interrupts. The result is that noone is | 108 | * each of which disables interrupts. The result is that no one is |
| 109 | * holding a spinlock or inside any other preempt-disabled region when | 109 | * holding a spinlock or inside any other preempt-disabled region when |
| 110 | * @fn() runs. | 110 | * @fn() runs. |
| 111 | * | 111 | * |
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 7898ea13de70..8d2eef1a8582 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
| @@ -35,10 +35,10 @@ | |||
| 35 | * Each cache must be registered so that it can be cleaned regularly. | 35 | * Each cache must be registered so that it can be cleaned regularly. |
| 36 | * When the cache is unregistered, it is flushed completely. | 36 | * When the cache is unregistered, it is flushed completely. |
| 37 | * | 37 | * |
| 38 | * Entries have a ref count and a 'hashed' flag which counts the existance | 38 | * Entries have a ref count and a 'hashed' flag which counts the existence |
| 39 | * in the hash table. | 39 | * in the hash table. |
| 40 | * We only expire entries when refcount is zero. | 40 | * We only expire entries when refcount is zero. |
| 41 | * Existance in the cache is counted the refcount. | 41 | * Existence in the cache is counted the refcount. |
| 42 | */ | 42 | */ |
| 43 | 43 | ||
| 44 | /* Every cache item has a common header that is used | 44 | /* Every cache item has a common header that is used |
diff --git a/include/linux/sunrpc/svcauth_gss.h b/include/linux/sunrpc/svcauth_gss.h index ca7d725861fc..83bbee3f089c 100644 --- a/include/linux/sunrpc/svcauth_gss.h +++ b/include/linux/sunrpc/svcauth_gss.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * linux/include/linux/sunrpc/svcauth_gss.h | 2 | * linux/include/linux/sunrpc/svcauth_gss.h |
| 3 | * | 3 | * |
| 4 | * Bruce Fields <bfields@umich.edu> | 4 | * Bruce Fields <bfields@umich.edu> |
| 5 | * Copyright (c) 2002 The Regents of the Unviersity of Michigan | 5 | * Copyright (c) 2002 The Regents of the University of Michigan |
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | #ifndef _LINUX_SUNRPC_SVCAUTH_GSS_H | 8 | #ifndef _LINUX_SUNRPC_SVCAUTH_GSS_H |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 5a89e3612875..083ffea7ba18 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
| @@ -249,6 +249,8 @@ extern void hibernation_set_ops(const struct platform_hibernation_ops *ops); | |||
| 249 | extern int hibernate(void); | 249 | extern int hibernate(void); |
| 250 | extern bool system_entering_hibernation(void); | 250 | extern bool system_entering_hibernation(void); |
| 251 | #else /* CONFIG_HIBERNATION */ | 251 | #else /* CONFIG_HIBERNATION */ |
| 252 | static inline void register_nosave_region(unsigned long b, unsigned long e) {} | ||
| 253 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) {} | ||
| 252 | static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } | 254 | static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } |
| 253 | static inline void swsusp_set_page_free(struct page *p) {} | 255 | static inline void swsusp_set_page_free(struct page *p) {} |
| 254 | static inline void swsusp_unset_page_free(struct page *p) {} | 256 | static inline void swsusp_unset_page_free(struct page *p) {} |
| @@ -297,14 +299,7 @@ static inline bool pm_wakeup_pending(void) { return false; } | |||
| 297 | 299 | ||
| 298 | extern struct mutex pm_mutex; | 300 | extern struct mutex pm_mutex; |
| 299 | 301 | ||
| 300 | #ifndef CONFIG_HIBERNATION | 302 | #ifndef CONFIG_HIBERNATE_CALLBACKS |
| 301 | static inline void register_nosave_region(unsigned long b, unsigned long e) | ||
| 302 | { | ||
| 303 | } | ||
| 304 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) | ||
| 305 | { | ||
| 306 | } | ||
| 307 | |||
| 308 | static inline void lock_system_sleep(void) {} | 303 | static inline void lock_system_sleep(void) {} |
| 309 | static inline void unlock_system_sleep(void) {} | 304 | static inline void unlock_system_sleep(void) {} |
| 310 | 305 | ||
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index 8a75da551e4e..dfb078db8ebb 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h | |||
| @@ -7,13 +7,13 @@ | |||
| 7 | * We still have a notion of a driver for a system device, because we still | 7 | * We still have a notion of a driver for a system device, because we still |
| 8 | * want to perform basic operations on these devices. | 8 | * want to perform basic operations on these devices. |
| 9 | * | 9 | * |
| 10 | * We also support auxillary drivers binding to devices of a certain class. | 10 | * We also support auxiliary drivers binding to devices of a certain class. |
| 11 | * | 11 | * |
| 12 | * This allows configurable drivers to register themselves for devices of | 12 | * This allows configurable drivers to register themselves for devices of |
| 13 | * a certain type. And, it allows class definitions to reside in generic | 13 | * a certain type. And, it allows class definitions to reside in generic |
| 14 | * code while arch-specific code can register specific drivers. | 14 | * code while arch-specific code can register specific drivers. |
| 15 | * | 15 | * |
| 16 | * Auxillary drivers registered with a NULL cls are registered as drivers | 16 | * Auxiliary drivers registered with a NULL cls are registered as drivers |
| 17 | * for all system devices, and get notification calls for each device. | 17 | * for all system devices, and get notification calls for each device. |
| 18 | */ | 18 | */ |
| 19 | 19 | ||
| @@ -70,7 +70,7 @@ extern int sysdev_class_create_file(struct sysdev_class *, | |||
| 70 | extern void sysdev_class_remove_file(struct sysdev_class *, | 70 | extern void sysdev_class_remove_file(struct sysdev_class *, |
| 71 | struct sysdev_class_attribute *); | 71 | struct sysdev_class_attribute *); |
| 72 | /** | 72 | /** |
| 73 | * Auxillary system device drivers. | 73 | * Auxiliary system device drivers. |
| 74 | */ | 74 | */ |
| 75 | 75 | ||
| 76 | struct sysdev_driver { | 76 | struct sysdev_driver { |
diff --git a/include/linux/timerqueue.h b/include/linux/timerqueue.h index d24aabaca474..a520fd70a59f 100644 --- a/include/linux/timerqueue.h +++ b/include/linux/timerqueue.h | |||
| @@ -24,7 +24,7 @@ extern struct timerqueue_node *timerqueue_iterate_next( | |||
| 24 | struct timerqueue_node *node); | 24 | struct timerqueue_node *node); |
| 25 | 25 | ||
| 26 | /** | 26 | /** |
| 27 | * timerqueue_getnext - Returns the timer with the earlies expiration time | 27 | * timerqueue_getnext - Returns the timer with the earliest expiration time |
| 28 | * | 28 | * |
| 29 | * @head: head of timerqueue | 29 | * @head: head of timerqueue |
| 30 | * | 30 | * |
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index 3a2e66d88a32..ebcfa4ebdbf8 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h | |||
| @@ -169,7 +169,7 @@ static inline int tracehook_unsafe_exec(struct task_struct *task) | |||
| 169 | * tracehook_tracer_task - return the task that is tracing the given task | 169 | * tracehook_tracer_task - return the task that is tracing the given task |
| 170 | * @tsk: task to consider | 170 | * @tsk: task to consider |
| 171 | * | 171 | * |
| 172 | * Returns NULL if noone is tracing @task, or the &struct task_struct | 172 | * Returns NULL if no one is tracing @task, or the &struct task_struct |
| 173 | * pointer to its tracer. | 173 | * pointer to its tracer. |
| 174 | * | 174 | * |
| 175 | * Must called under rcu_read_lock(). The pointer returned might be kept | 175 | * Must called under rcu_read_lock(). The pointer returned might be kept |
| @@ -448,7 +448,7 @@ static inline int tracehook_force_sigpending(void) | |||
| 448 | * | 448 | * |
| 449 | * Return zero to check for a real pending signal normally. | 449 | * Return zero to check for a real pending signal normally. |
| 450 | * Return -1 after releasing the siglock to repeat the check. | 450 | * Return -1 after releasing the siglock to repeat the check. |
| 451 | * Return a signal number to induce an artifical signal delivery, | 451 | * Return a signal number to induce an artificial signal delivery, |
| 452 | * setting *@info and *@return_ka to specify its details and behavior. | 452 | * setting *@info and *@return_ka to specify its details and behavior. |
| 453 | * | 453 | * |
| 454 | * The @return_ka->sa_handler value controls the disposition of the | 454 | * The @return_ka->sa_handler value controls the disposition of the |
diff --git a/include/linux/ucb1400.h b/include/linux/ucb1400.h index 1b4790911052..5c75153f9441 100644 --- a/include/linux/ucb1400.h +++ b/include/linux/ucb1400.h | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Copyright: MontaVista Software, Inc. | 8 | * Copyright: MontaVista Software, Inc. |
| 9 | * | 9 | * |
| 10 | * Spliting done by: Marek Vasut <marek.vasut@gmail.com> | 10 | * Spliting done by: Marek Vasut <marek.vasut@gmail.com> |
| 11 | * If something doesnt work and it worked before spliting, e-mail me, | 11 | * If something doesn't work and it worked before spliting, e-mail me, |
| 12 | * dont bother Nicolas please ;-) | 12 | * dont bother Nicolas please ;-) |
| 13 | * | 13 | * |
| 14 | * This program is free software; you can redistribute it and/or modify | 14 | * This program is free software; you can redistribute it and/or modify |
diff --git a/include/linux/usb.h b/include/linux/usb.h index e63efeb378e3..65f78ca5d88e 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -623,7 +623,7 @@ extern struct usb_host_interface *usb_find_alt_setting( | |||
| 623 | * USB hubs. That makes it stay the same until systems are physically | 623 | * USB hubs. That makes it stay the same until systems are physically |
| 624 | * reconfigured, by re-cabling a tree of USB devices or by moving USB host | 624 | * reconfigured, by re-cabling a tree of USB devices or by moving USB host |
| 625 | * controllers. Adding and removing devices, including virtual root hubs | 625 | * controllers. Adding and removing devices, including virtual root hubs |
| 626 | * in host controller driver modules, does not change these path identifers; | 626 | * in host controller driver modules, does not change these path identifiers; |
| 627 | * neither does rebooting or re-enumerating. These are more useful identifiers | 627 | * neither does rebooting or re-enumerating. These are more useful identifiers |
| 628 | * than changeable ("unstable") ones like bus numbers or device addresses. | 628 | * than changeable ("unstable") ones like bus numbers or device addresses. |
| 629 | * | 629 | * |
| @@ -793,7 +793,7 @@ struct usbdrv_wrap { | |||
| 793 | * usb_set_intfdata() to associate driver-specific data with the | 793 | * usb_set_intfdata() to associate driver-specific data with the |
| 794 | * interface. It may also use usb_set_interface() to specify the | 794 | * interface. It may also use usb_set_interface() to specify the |
| 795 | * appropriate altsetting. If unwilling to manage the interface, | 795 | * appropriate altsetting. If unwilling to manage the interface, |
| 796 | * return -ENODEV, if genuine IO errors occured, an appropriate | 796 | * return -ENODEV, if genuine IO errors occurred, an appropriate |
| 797 | * negative errno value. | 797 | * negative errno value. |
| 798 | * @disconnect: Called when the interface is no longer accessible, usually | 798 | * @disconnect: Called when the interface is no longer accessible, usually |
| 799 | * because its device has been (or is being) disconnected or the | 799 | * because its device has been (or is being) disconnected or the |
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index 3d29a7dcac2d..882a084a8411 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h | |||
| @@ -188,7 +188,7 @@ ep_choose(struct usb_gadget *g, struct usb_endpoint_descriptor *hs, | |||
| 188 | * @bind() method is then used to initialize all the functions and then | 188 | * @bind() method is then used to initialize all the functions and then |
| 189 | * call @usb_add_function() for them. | 189 | * call @usb_add_function() for them. |
| 190 | * | 190 | * |
| 191 | * Those functions would normally be independant of each other, but that's | 191 | * Those functions would normally be independent of each other, but that's |
| 192 | * not mandatory. CDC WMC devices are an example where functions often | 192 | * not mandatory. CDC WMC devices are an example where functions often |
| 193 | * depend on other functions, with some functions subsidiary to others. | 193 | * depend on other functions, with some functions subsidiary to others. |
| 194 | * Such interdependency may be managed in any way, so long as all of the | 194 | * Such interdependency may be managed in any way, so long as all of the |
diff --git a/include/linux/usb/ehci_def.h b/include/linux/usb/ehci_def.h index 656380245198..e49dfd45baa4 100644 --- a/include/linux/usb/ehci_def.h +++ b/include/linux/usb/ehci_def.h | |||
| @@ -159,7 +159,7 @@ struct ehci_regs { | |||
| 159 | #define USBMODE_CM_IDLE (0<<0) /* idle state */ | 159 | #define USBMODE_CM_IDLE (0<<0) /* idle state */ |
| 160 | 160 | ||
| 161 | /* Moorestown has some non-standard registers, partially due to the fact that | 161 | /* Moorestown has some non-standard registers, partially due to the fact that |
| 162 | * its EHCI controller has both TT and LPM support. HOSTPCx are extentions to | 162 | * its EHCI controller has both TT and LPM support. HOSTPCx are extensions to |
| 163 | * PORTSCx | 163 | * PORTSCx |
| 164 | */ | 164 | */ |
| 165 | #define HOSTPC0 0x84 /* HOSTPC extension */ | 165 | #define HOSTPC0 0x84 /* HOSTPC extension */ |
diff --git a/include/linux/usb/functionfs.h b/include/linux/usb/functionfs.h index 6f649c13193b..7587ef934ba8 100644 --- a/include/linux/usb/functionfs.h +++ b/include/linux/usb/functionfs.h | |||
| @@ -45,7 +45,7 @@ struct usb_functionfs_descs_head { | |||
| 45 | * | off | name | type | description | | 45 | * | off | name | type | description | |
| 46 | * |-----+-----------+--------------+--------------------------------------| | 46 | * |-----+-----------+--------------+--------------------------------------| |
| 47 | * | 0 | magic | LE32 | FUNCTIONFS_{FS,HS}_DESCRIPTORS_MAGIC | | 47 | * | 0 | magic | LE32 | FUNCTIONFS_{FS,HS}_DESCRIPTORS_MAGIC | |
| 48 | * | 4 | lenght | LE32 | length of the whole data chunk | | 48 | * | 4 | length | LE32 | length of the whole data chunk | |
| 49 | * | 8 | fs_count | LE32 | number of full-speed descriptors | | 49 | * | 8 | fs_count | LE32 | number of full-speed descriptors | |
| 50 | * | 12 | hs_count | LE32 | number of high-speed descriptors | | 50 | * | 12 | hs_count | LE32 | number of high-speed descriptors | |
| 51 | * | 16 | fs_descrs | Descriptor[] | list of full-speed descriptors | | 51 | * | 16 | fs_descrs | Descriptor[] | list of full-speed descriptors | |
| @@ -86,7 +86,7 @@ struct usb_functionfs_strings_head { | |||
| 86 | * | 0 | lang | LE16 | language code | | 86 | * | 0 | lang | LE16 | language code | |
| 87 | * | 2 | strings | String[str_count] | array of strings in given language | | 87 | * | 2 | strings | String[str_count] | array of strings in given language | |
| 88 | * | 88 | * |
| 89 | * For each string ther is one strings entry (ie. there are str_count | 89 | * For each string there is one strings entry (ie. there are str_count |
| 90 | * string entries). Each String is a NUL terminated string encoded in | 90 | * string entries). Each String is a NUL terminated string encoded in |
| 91 | * UTF-8. | 91 | * UTF-8. |
| 92 | */ | 92 | */ |
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 006412ce2303..e538172c0f64 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
| @@ -72,7 +72,7 @@ struct usb_ep; | |||
| 72 | * Bulk endpoints can use any size buffers, and can also be used for interrupt | 72 | * Bulk endpoints can use any size buffers, and can also be used for interrupt |
| 73 | * transfers. interrupt-only endpoints can be much less functional. | 73 | * transfers. interrupt-only endpoints can be much less functional. |
| 74 | * | 74 | * |
| 75 | * NOTE: this is analagous to 'struct urb' on the host side, except that | 75 | * NOTE: this is analogous to 'struct urb' on the host side, except that |
| 76 | * it's thinner and promotes more pre-allocation. | 76 | * it's thinner and promotes more pre-allocation. |
| 77 | */ | 77 | */ |
| 78 | 78 | ||
| @@ -269,7 +269,7 @@ static inline void usb_ep_free_request(struct usb_ep *ep, | |||
| 269 | * | 269 | * |
| 270 | * Control endpoints ... after getting a setup() callback, the driver queues | 270 | * Control endpoints ... after getting a setup() callback, the driver queues |
| 271 | * one response (even if it would be zero length). That enables the | 271 | * one response (even if it would be zero length). That enables the |
| 272 | * status ack, after transfering data as specified in the response. Setup | 272 | * status ack, after transferring data as specified in the response. Setup |
| 273 | * functions may return negative error codes to generate protocol stalls. | 273 | * functions may return negative error codes to generate protocol stalls. |
| 274 | * (Note that some USB device controllers disallow protocol stall responses | 274 | * (Note that some USB device controllers disallow protocol stall responses |
| 275 | * in some cases.) When control responses are deferred (the response is | 275 | * in some cases.) When control responses are deferred (the response is |
diff --git a/include/linux/usb/midi.h b/include/linux/usb/midi.h index 1d1040865661..c8c52e3c91de 100644 --- a/include/linux/usb/midi.h +++ b/include/linux/usb/midi.h | |||
| @@ -70,7 +70,7 @@ struct usb_midi_out_jack_descriptor { | |||
| 70 | __u8 bJackID; | 70 | __u8 bJackID; |
| 71 | __u8 bNrInputPins; /* p */ | 71 | __u8 bNrInputPins; /* p */ |
| 72 | struct usb_midi_source_pin pins[]; /* [p] */ | 72 | struct usb_midi_source_pin pins[]; /* [p] */ |
| 73 | /*__u8 iJack; -- ommitted due to variable-sized pins[] */ | 73 | /*__u8 iJack; -- omitted due to variable-sized pins[] */ |
| 74 | } __attribute__ ((packed)); | 74 | } __attribute__ ((packed)); |
| 75 | 75 | ||
| 76 | #define USB_DT_MIDI_OUT_SIZE(p) (7 + 2 * (p)) | 76 | #define USB_DT_MIDI_OUT_SIZE(p) (7 + 2 * (p)) |
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 44842c8d38c0..3c7329b8ea0e 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
| @@ -97,11 +97,14 @@ struct driver_info { | |||
| 97 | 97 | ||
| 98 | #define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */ | 98 | #define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */ |
| 99 | 99 | ||
| 100 | #define FLAG_POINTTOPOINT 0x1000 /* possibly use "usb%d" names */ | ||
| 101 | |||
| 100 | /* | 102 | /* |
| 101 | * Indicates to usbnet, that USB driver accumulates multiple IP packets. | 103 | * Indicates to usbnet, that USB driver accumulates multiple IP packets. |
| 102 | * Affects statistic (counters) and short packet handling. | 104 | * Affects statistic (counters) and short packet handling. |
| 103 | */ | 105 | */ |
| 104 | #define FLAG_MULTI_PACKET 0x1000 | 106 | #define FLAG_MULTI_PACKET 0x1000 |
| 107 | #define FLAG_RX_ASSEMBLE 0x2000 /* rx packets may span >1 frames */ | ||
| 105 | 108 | ||
| 106 | /* init device ... can sleep, or cause probe() failure */ | 109 | /* init device ... can sleep, or cause probe() failure */ |
| 107 | int (*bind)(struct usbnet *, struct usb_interface *); | 110 | int (*bind)(struct usbnet *, struct usb_interface *); |
| @@ -172,7 +175,9 @@ struct cdc_state { | |||
| 172 | }; | 175 | }; |
| 173 | 176 | ||
| 174 | extern int usbnet_generic_cdc_bind(struct usbnet *, struct usb_interface *); | 177 | extern int usbnet_generic_cdc_bind(struct usbnet *, struct usb_interface *); |
| 178 | extern int usbnet_cdc_bind(struct usbnet *, struct usb_interface *); | ||
| 175 | extern void usbnet_cdc_unbind(struct usbnet *, struct usb_interface *); | 179 | extern void usbnet_cdc_unbind(struct usbnet *, struct usb_interface *); |
| 180 | extern void usbnet_cdc_status(struct usbnet *, struct urb *); | ||
| 176 | 181 | ||
| 177 | /* CDC and RNDIS support the same host-chosen packet filters for IN transfers */ | 182 | /* CDC and RNDIS support the same host-chosen packet filters for IN transfers */ |
| 178 | #define DEFAULT_FILTER (USB_CDC_PACKET_TYPE_BROADCAST \ | 183 | #define DEFAULT_FILTER (USB_CDC_PACKET_TYPE_BROADCAST \ |
diff --git a/include/linux/usb/wusb.h b/include/linux/usb/wusb.h index 63ebdcc5dda6..0c4d4ca370ec 100644 --- a/include/linux/usb/wusb.h +++ b/include/linux/usb/wusb.h | |||
| @@ -126,7 +126,7 @@ enum { | |||
| 126 | /** | 126 | /** |
| 127 | * WUSB IE: Channel Stop (WUSB1.0[7.5.8]) | 127 | * WUSB IE: Channel Stop (WUSB1.0[7.5.8]) |
| 128 | * | 128 | * |
| 129 | * Tells devices the host is going to stop sending MMCs and will dissapear. | 129 | * Tells devices the host is going to stop sending MMCs and will disappear. |
| 130 | */ | 130 | */ |
| 131 | struct wuie_channel_stop { | 131 | struct wuie_channel_stop { |
| 132 | struct wuie_hdr hdr; | 132 | struct wuie_hdr hdr; |
diff --git a/include/linux/uwb.h b/include/linux/uwb.h index 7fc9746f22cd..b0c564ec2160 100644 --- a/include/linux/uwb.h +++ b/include/linux/uwb.h | |||
| @@ -274,7 +274,7 @@ static inline void uwb_mas_bm_copy_le(void *dst, const struct uwb_mas_bm *mas) | |||
| 274 | 274 | ||
| 275 | /** | 275 | /** |
| 276 | * struct uwb_drp_avail - a radio controller's view of MAS usage | 276 | * struct uwb_drp_avail - a radio controller's view of MAS usage |
| 277 | * @global: MAS unused by neighbors (excluding reservations targetted | 277 | * @global: MAS unused by neighbors (excluding reservations targeted |
| 278 | * or owned by the local radio controller) or the beaon period | 278 | * or owned by the local radio controller) or the beaon period |
| 279 | * @local: MAS unused by local established reservations | 279 | * @local: MAS unused by local established reservations |
| 280 | * @pending: MAS unused by local pending reservations | 280 | * @pending: MAS unused by local pending reservations |
| @@ -702,10 +702,10 @@ void edc_init(struct edc *edc) | |||
| 702 | edc->timestart = jiffies; | 702 | edc->timestart = jiffies; |
| 703 | } | 703 | } |
| 704 | 704 | ||
| 705 | /* Called when an error occured. | 705 | /* Called when an error occurred. |
| 706 | * This is way to determine if the number of acceptable errors per time | 706 | * This is way to determine if the number of acceptable errors per time |
| 707 | * period has been exceeded. It is not accurate as there are cases in which | 707 | * period has been exceeded. It is not accurate as there are cases in which |
| 708 | * this scheme will not work, for example if there are periodic occurences | 708 | * this scheme will not work, for example if there are periodic occurrences |
| 709 | * of errors that straddle updates to the start time. This scheme is | 709 | * of errors that straddle updates to the start time. This scheme is |
| 710 | * sufficient for our usage. | 710 | * sufficient for our usage. |
| 711 | * | 711 | * |
diff --git a/include/linux/uwb/umc.h b/include/linux/uwb/umc.h index 4b4fc0f43855..7b4842028ca7 100644 --- a/include/linux/uwb/umc.h +++ b/include/linux/uwb/umc.h | |||
| @@ -132,7 +132,7 @@ int umc_match_pci_id(struct umc_driver *umc_drv, struct umc_dev *umc); | |||
| 132 | * | 132 | * |
| 133 | * FIXME: This is as dirty as it gets, but we need some way to check | 133 | * FIXME: This is as dirty as it gets, but we need some way to check |
| 134 | * the correct type of umc_dev->parent (so that for example, we can | 134 | * the correct type of umc_dev->parent (so that for example, we can |
| 135 | * cast to pci_dev). Casting to pci_dev is necesary because at some | 135 | * cast to pci_dev). Casting to pci_dev is necessary because at some |
| 136 | * point we need to request resources from the device. Mapping is | 136 | * point we need to request resources from the device. Mapping is |
| 137 | * easily over come (ioremap and stuff are bus agnostic), but hooking | 137 | * easily over come (ioremap and stuff are bus agnostic), but hooking |
| 138 | * up to some error handlers (such as pci error handlers) might need | 138 | * up to some error handlers (such as pci error handlers) might need |
diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h index e9e1524b582c..9c3120dca294 100644 --- a/include/linux/vgaarb.h +++ b/include/linux/vgaarb.h | |||
| @@ -78,7 +78,7 @@ extern void vga_set_legacy_decoding(struct pci_dev *pdev, | |||
| 78 | * wether the card is doing legacy decoding for that type of resource. If | 78 | * wether the card is doing legacy decoding for that type of resource. If |
| 79 | * yes, the lock is "converted" into a legacy resource lock. | 79 | * yes, the lock is "converted" into a legacy resource lock. |
| 80 | * The arbiter will first look for all VGA cards that might conflict | 80 | * The arbiter will first look for all VGA cards that might conflict |
| 81 | * and disable their IOs and/or Memory access, inlcuding VGA forwarding | 81 | * and disable their IOs and/or Memory access, including VGA forwarding |
| 82 | * on P2P bridges if necessary, so that the requested resources can | 82 | * on P2P bridges if necessary, so that the requested resources can |
| 83 | * be used. Then, the card is marked as locking these resources and | 83 | * be used. Then, the card is marked as locking these resources and |
| 84 | * the IO and/or Memory accesse are enabled on the card (including | 84 | * the IO and/or Memory accesse are enabled on the card (including |
| @@ -187,7 +187,7 @@ extern struct pci_dev *vga_default_device(void); | |||
| 187 | * vga_conflicts | 187 | * vga_conflicts |
| 188 | * | 188 | * |
| 189 | * Architectures should define this if they have several | 189 | * Architectures should define this if they have several |
| 190 | * independant PCI domains that can afford concurrent VGA | 190 | * independent PCI domains that can afford concurrent VGA |
| 191 | * decoding | 191 | * decoding |
| 192 | */ | 192 | */ |
| 193 | 193 | ||
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 461c0119664f..2b3831b58aa4 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
| @@ -58,6 +58,13 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | |||
| 58 | UNEVICTABLE_PGCLEARED, /* on COW, page truncate */ | 58 | UNEVICTABLE_PGCLEARED, /* on COW, page truncate */ |
| 59 | UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */ | 59 | UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */ |
| 60 | UNEVICTABLE_MLOCKFREED, | 60 | UNEVICTABLE_MLOCKFREED, |
| 61 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
| 62 | THP_FAULT_ALLOC, | ||
| 63 | THP_FAULT_FALLBACK, | ||
| 64 | THP_COLLAPSE_ALLOC, | ||
| 65 | THP_COLLAPSE_ALLOC_FAILED, | ||
| 66 | THP_SPLIT, | ||
| 67 | #endif | ||
| 61 | NR_VM_EVENT_ITEMS | 68 | NR_VM_EVENT_ITEMS |
| 62 | }; | 69 | }; |
| 63 | 70 | ||
diff --git a/include/linux/wimax.h b/include/linux/wimax.h index 4fdcc5635518..9f6b77af2f6d 100644 --- a/include/linux/wimax.h +++ b/include/linux/wimax.h | |||
| @@ -114,7 +114,7 @@ enum { | |||
| 114 | WIMAX_GNL_RESET_IFIDX = 1, | 114 | WIMAX_GNL_RESET_IFIDX = 1, |
| 115 | }; | 115 | }; |
| 116 | 116 | ||
| 117 | /* Atributes for wimax_state_get() */ | 117 | /* Attributes for wimax_state_get() */ |
| 118 | enum { | 118 | enum { |
| 119 | WIMAX_GNL_STGET_IFIDX = 1, | 119 | WIMAX_GNL_STGET_IFIDX = 1, |
| 120 | }; | 120 | }; |
diff --git a/include/linux/xilinxfb.h b/include/linux/xilinxfb.h index f2463f559fb9..5a155a968054 100644 --- a/include/linux/xilinxfb.h +++ b/include/linux/xilinxfb.h | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | /* ML300/403 reference design framebuffer driver platform data struct */ | 16 | /* ML300/403 reference design framebuffer driver platform data struct */ |
| 17 | struct xilinxfb_platform_data { | 17 | struct xilinxfb_platform_data { |
| 18 | u32 rotate_screen; /* Flag to rotate display 180 degrees */ | 18 | u32 rotate_screen; /* Flag to rotate display 180 degrees */ |
| 19 | u32 screen_height_mm; /* Physical dimentions of screen in mm */ | 19 | u32 screen_height_mm; /* Physical dimensions of screen in mm */ |
| 20 | u32 screen_width_mm; | 20 | u32 screen_width_mm; |
| 21 | u32 xres, yres; /* resolution of screen in pixels */ | 21 | u32 xres, yres; /* resolution of screen in pixels */ |
| 22 | u32 xvirt, yvirt; /* resolution of memory buffer */ | 22 | u32 xvirt, yvirt; /* resolution of memory buffer */ |
diff --git a/include/media/davinci/dm355_ccdc.h b/include/media/davinci/dm355_ccdc.h index df8a7b107477..adf2fe4bf0bb 100644 --- a/include/media/davinci/dm355_ccdc.h +++ b/include/media/davinci/dm355_ccdc.h | |||
| @@ -193,7 +193,7 @@ struct ccdc_dft_corr_mem_ctl { | |||
| 193 | #define CCDC_DFT_TABLE_SIZE 16 | 193 | #define CCDC_DFT_TABLE_SIZE 16 |
| 194 | /* | 194 | /* |
| 195 | * Main Structure for vertical defect correction. Vertical defect | 195 | * Main Structure for vertical defect correction. Vertical defect |
| 196 | * correction can correct upto 16 defects if defects less than 16 | 196 | * correction can correct up to 16 defects if defects less than 16 |
| 197 | * then pad the rest with 0 | 197 | * then pad the rest with 0 |
| 198 | */ | 198 | */ |
| 199 | struct ccdc_vertical_dft { | 199 | struct ccdc_vertical_dft { |
diff --git a/include/media/davinci/isif.h b/include/media/davinci/isif.h index b0b74ad618cc..7f3d76a4b9e3 100644 --- a/include/media/davinci/isif.h +++ b/include/media/davinci/isif.h | |||
| @@ -199,7 +199,7 @@ struct isif_black_clamp { | |||
| 199 | }; | 199 | }; |
| 200 | 200 | ||
| 201 | /************************************************************************* | 201 | /************************************************************************* |
| 202 | ** Color Space Convertion (CSC) | 202 | ** Color Space Conversion (CSC) |
| 203 | *************************************************************************/ | 203 | *************************************************************************/ |
| 204 | #define ISIF_CSC_NUM_COEFF 16 | 204 | #define ISIF_CSC_NUM_COEFF 16 |
| 205 | struct isif_color_space_conv { | 205 | struct isif_color_space_conv { |
diff --git a/include/media/lirc.h b/include/media/lirc.h index 6678a169fd9e..4b3ab2966b5a 100644 --- a/include/media/lirc.h +++ b/include/media/lirc.h | |||
| @@ -137,7 +137,7 @@ | |||
| 137 | */ | 137 | */ |
| 138 | #define LIRC_SET_REC_FILTER_SPACE _IOW('i', 0x0000001b, __u32) | 138 | #define LIRC_SET_REC_FILTER_SPACE _IOW('i', 0x0000001b, __u32) |
| 139 | /* | 139 | /* |
| 140 | * if filter cannot be set independantly for pulse/space, this should | 140 | * if filter cannot be set independently for pulse/space, this should |
| 141 | * be used | 141 | * be used |
| 142 | */ | 142 | */ |
| 143 | #define LIRC_SET_REC_FILTER _IOW('i', 0x0000001c, __u32) | 143 | #define LIRC_SET_REC_FILTER _IOW('i', 0x0000001c, __u32) |
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index 6b75a6971346..d2df55b0c213 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
| @@ -119,7 +119,7 @@ do { \ | |||
| 119 | * @P9_TREAD: request to transfer data from a file or directory | 119 | * @P9_TREAD: request to transfer data from a file or directory |
| 120 | * @P9_RREAD: response with data requested | 120 | * @P9_RREAD: response with data requested |
| 121 | * @P9_TWRITE: reuqest to transfer data to a file | 121 | * @P9_TWRITE: reuqest to transfer data to a file |
| 122 | * @P9_RWRITE: response with out much data was transfered to file | 122 | * @P9_RWRITE: response with out much data was transferred to file |
| 123 | * @P9_TCLUNK: forget about a handle to an entity within the file system | 123 | * @P9_TCLUNK: forget about a handle to an entity within the file system |
| 124 | * @P9_RCLUNK: response when server has forgotten about the handle | 124 | * @P9_RCLUNK: response when server has forgotten about the handle |
| 125 | * @P9_TREMOVE: request to remove an entity from the hierarchy | 125 | * @P9_TREMOVE: request to remove an entity from the hierarchy |
| @@ -139,8 +139,6 @@ do { \ | |||
| 139 | */ | 139 | */ |
| 140 | 140 | ||
| 141 | enum p9_msg_t { | 141 | enum p9_msg_t { |
| 142 | P9_TSYNCFS = 0, | ||
| 143 | P9_RSYNCFS, | ||
| 144 | P9_TLERROR = 6, | 142 | P9_TLERROR = 6, |
| 145 | P9_RLERROR, | 143 | P9_RLERROR, |
| 146 | P9_TSTATFS = 8, | 144 | P9_TSTATFS = 8, |
| @@ -294,7 +292,7 @@ enum p9_perm_t { | |||
| 294 | * | 292 | * |
| 295 | * QID types are a subset of permissions - they are primarily | 293 | * QID types are a subset of permissions - they are primarily |
| 296 | * used to differentiate semantics for a file system entity via | 294 | * used to differentiate semantics for a file system entity via |
| 297 | * a jump-table. Their value is also the most signifigant 16 bits | 295 | * a jump-table. Their value is also the most significant 16 bits |
| 298 | * of the permission_t | 296 | * of the permission_t |
| 299 | * | 297 | * |
| 300 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat | 298 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat |
| @@ -366,8 +364,8 @@ struct p9_qid { | |||
| 366 | /** | 364 | /** |
| 367 | * struct p9_stat - file system metadata information | 365 | * struct p9_stat - file system metadata information |
| 368 | * @size: length prefix for this stat structure instance | 366 | * @size: length prefix for this stat structure instance |
| 369 | * @type: the type of the server (equivilent to a major number) | 367 | * @type: the type of the server (equivalent to a major number) |
| 370 | * @dev: the sub-type of the server (equivilent to a minor number) | 368 | * @dev: the sub-type of the server (equivalent to a minor number) |
| 371 | * @qid: unique id from the server of type &p9_qid | 369 | * @qid: unique id from the server of type &p9_qid |
| 372 | * @mode: Plan 9 format permissions of type &p9_perm_t | 370 | * @mode: Plan 9 format permissions of type &p9_perm_t |
| 373 | * @atime: Last access/read time | 371 | * @atime: Last access/read time |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index 0a30977e3c1f..051a99f79769 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
| @@ -101,7 +101,7 @@ enum p9_req_status_t { | |||
| 101 | * Transport use an array to track outstanding requests | 101 | * Transport use an array to track outstanding requests |
| 102 | * instead of a list. While this may incurr overhead during initial | 102 | * instead of a list. While this may incurr overhead during initial |
| 103 | * allocation or expansion, it makes request lookup much easier as the | 103 | * allocation or expansion, it makes request lookup much easier as the |
| 104 | * tag id is a index into an array. (We use tag+1 so that we can accomodate | 104 | * tag id is a index into an array. (We use tag+1 so that we can accommodate |
| 105 | * the -1 tag for the T_VERSION request). | 105 | * the -1 tag for the T_VERSION request). |
| 106 | * This also has the nice effect of only having to allocate wait_queues | 106 | * This also has the nice effect of only having to allocate wait_queues |
| 107 | * once, instead of constantly allocating and freeing them. Its possible | 107 | * once, instead of constantly allocating and freeing them. Its possible |
| @@ -218,8 +218,8 @@ void p9_client_disconnect(struct p9_client *clnt); | |||
| 218 | void p9_client_begin_disconnect(struct p9_client *clnt); | 218 | void p9_client_begin_disconnect(struct p9_client *clnt); |
| 219 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, | 219 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, |
| 220 | char *uname, u32 n_uname, char *aname); | 220 | char *uname, u32 n_uname, char *aname); |
| 221 | struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames, | 221 | struct p9_fid *p9_client_walk(struct p9_fid *oldfid, uint16_t nwname, |
| 222 | int clone); | 222 | char **wnames, int clone); |
| 223 | int p9_client_open(struct p9_fid *fid, int mode); | 223 | int p9_client_open(struct p9_fid *fid, int mode); |
| 224 | int p9_client_fcreate(struct p9_fid *fid, char *name, u32 perm, int mode, | 224 | int p9_client_fcreate(struct p9_fid *fid, char *name, u32 perm, int mode, |
| 225 | char *extension); | 225 | char *extension); |
| @@ -230,7 +230,6 @@ int p9_client_create_dotl(struct p9_fid *ofid, char *name, u32 flags, u32 mode, | |||
| 230 | gid_t gid, struct p9_qid *qid); | 230 | gid_t gid, struct p9_qid *qid); |
| 231 | int p9_client_clunk(struct p9_fid *fid); | 231 | int p9_client_clunk(struct p9_fid *fid); |
| 232 | int p9_client_fsync(struct p9_fid *fid, int datasync); | 232 | int p9_client_fsync(struct p9_fid *fid, int datasync); |
| 233 | int p9_client_sync_fs(struct p9_fid *fid); | ||
| 234 | int p9_client_remove(struct p9_fid *fid); | 233 | int p9_client_remove(struct p9_fid *fid); |
| 235 | int p9_client_read(struct p9_fid *fid, char *data, char __user *udata, | 234 | int p9_client_read(struct p9_fid *fid, char *data, char __user *udata, |
| 236 | u64 offset, u32 count); | 235 | u64 offset, u32 count); |
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index 82868f18c573..8f08c736c4c3 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | 30 | ||
| 31 | /* Default. Add Payload to PDU before sending it down to transport layer */ | 31 | /* Default. Add Payload to PDU before sending it down to transport layer */ |
| 32 | #define P9_TRANS_PREF_PAYLOAD_DEF 0x0 | 32 | #define P9_TRANS_PREF_PAYLOAD_DEF 0x0 |
| 33 | /* Send pay load seperately to transport layer along with PDU.*/ | 33 | /* Send pay load separately to transport layer along with PDU.*/ |
| 34 | #define P9_TRANS_PREF_PAYLOAD_SEP 0x1 | 34 | #define P9_TRANS_PREF_PAYLOAD_SEP 0x1 |
| 35 | 35 | ||
| 36 | /** | 36 | /** |
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index ec6acf2f1c0b..2c0d309c7381 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
| @@ -84,6 +84,8 @@ enum { | |||
| 84 | HCI_SERVICE_CACHE, | 84 | HCI_SERVICE_CACHE, |
| 85 | HCI_LINK_KEYS, | 85 | HCI_LINK_KEYS, |
| 86 | HCI_DEBUG_KEYS, | 86 | HCI_DEBUG_KEYS, |
| 87 | |||
| 88 | HCI_RESET, | ||
| 87 | }; | 89 | }; |
| 88 | 90 | ||
| 89 | /* HCI ioctl defines */ | 91 | /* HCI ioctl defines */ |
diff --git a/include/net/caif/cfcnfg.h b/include/net/caif/cfcnfg.h index f688478bfb84..f33d36341132 100644 --- a/include/net/caif/cfcnfg.h +++ b/include/net/caif/cfcnfg.h | |||
| @@ -69,7 +69,7 @@ void cfcnfg_remove(struct cfcnfg *cfg); | |||
| 69 | * cfcnfg_add_adapt_layer to specify PHY for the link. | 69 | * cfcnfg_add_adapt_layer to specify PHY for the link. |
| 70 | * @pref: The phy (link layer) preference. | 70 | * @pref: The phy (link layer) preference. |
| 71 | * @fcs: Specify if checksum is used in CAIF Framing Layer. | 71 | * @fcs: Specify if checksum is used in CAIF Framing Layer. |
| 72 | * @stx: Specify if Start Of Frame eXtention is used. | 72 | * @stx: Specify if Start Of Frame extension is used. |
| 73 | */ | 73 | */ |
| 74 | 74 | ||
| 75 | void | 75 | void |
diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h index fa157712e982..a79b6cfb02a8 100644 --- a/include/net/gen_stats.h +++ b/include/net/gen_stats.h | |||
| @@ -11,7 +11,7 @@ struct gnet_dump { | |||
| 11 | struct sk_buff * skb; | 11 | struct sk_buff * skb; |
| 12 | struct nlattr * tail; | 12 | struct nlattr * tail; |
| 13 | 13 | ||
| 14 | /* Backward compatability */ | 14 | /* Backward compatibility */ |
| 15 | int compat_tc_stats; | 15 | int compat_tc_stats; |
| 16 | int compat_xstats; | 16 | int compat_xstats; |
| 17 | void * xstats; | 17 | void * xstats; |
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h index 04977eefb0ee..fccc2180c61b 100644 --- a/include/net/if_inet6.h +++ b/include/net/if_inet6.h | |||
| @@ -286,5 +286,21 @@ static inline void ipv6_ib_mc_map(const struct in6_addr *addr, | |||
| 286 | buf[9] = broadcast[9]; | 286 | buf[9] = broadcast[9]; |
| 287 | memcpy(buf + 10, addr->s6_addr + 6, 10); | 287 | memcpy(buf + 10, addr->s6_addr + 6, 10); |
| 288 | } | 288 | } |
| 289 | |||
| 290 | static inline int ipv6_ipgre_mc_map(const struct in6_addr *addr, | ||
| 291 | const unsigned char *broadcast, char *buf) | ||
| 292 | { | ||
| 293 | if ((broadcast[0] | broadcast[1] | broadcast[2] | broadcast[3]) != 0) { | ||
| 294 | memcpy(buf, broadcast, 4); | ||
| 295 | } else { | ||
| 296 | /* v4mapped? */ | ||
| 297 | if ((addr->s6_addr32[0] | addr->s6_addr32[1] | | ||
| 298 | (addr->s6_addr32[2] ^ htonl(0x0000ffff))) != 0) | ||
| 299 | return -EINVAL; | ||
| 300 | memcpy(buf, &addr->s6_addr32[3], 4); | ||
| 301 | } | ||
| 302 | return 0; | ||
| 303 | } | ||
| 304 | |||
| 289 | #endif | 305 | #endif |
| 290 | #endif | 306 | #endif |
diff --git a/include/net/ip.h b/include/net/ip.h index a4f631108c54..7c416583b710 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
| @@ -339,6 +339,14 @@ static inline void ip_ib_mc_map(__be32 naddr, const unsigned char *broadcast, ch | |||
| 339 | buf[16] = addr & 0x0f; | 339 | buf[16] = addr & 0x0f; |
| 340 | } | 340 | } |
| 341 | 341 | ||
| 342 | static inline void ip_ipgre_mc_map(__be32 naddr, const unsigned char *broadcast, char *buf) | ||
| 343 | { | ||
| 344 | if ((broadcast[0] | broadcast[1] | broadcast[2] | broadcast[3]) != 0) | ||
| 345 | memcpy(buf, broadcast, 4); | ||
| 346 | else | ||
| 347 | memcpy(buf, &naddr, sizeof(naddr)); | ||
| 348 | } | ||
| 349 | |||
| 342 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 350 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
| 343 | #include <linux/ipv6.h> | 351 | #include <linux/ipv6.h> |
| 344 | #endif | 352 | #endif |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 30b49ed72f0d..d516f00c8e0f 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
| @@ -52,7 +52,7 @@ static inline struct net *skb_net(const struct sk_buff *skb) | |||
| 52 | */ | 52 | */ |
| 53 | if (likely(skb->dev && skb->dev->nd_net)) | 53 | if (likely(skb->dev && skb->dev->nd_net)) |
| 54 | return dev_net(skb->dev); | 54 | return dev_net(skb->dev); |
| 55 | if (skb_dst(skb)->dev) | 55 | if (skb_dst(skb) && skb_dst(skb)->dev) |
| 56 | return dev_net(skb_dst(skb)->dev); | 56 | return dev_net(skb_dst(skb)->dev); |
| 57 | WARN(skb->sk, "Maybe skb_sknet should be used in %s() at line:%d\n", | 57 | WARN(skb->sk, "Maybe skb_sknet should be used in %s() at line:%d\n", |
| 58 | __func__, __LINE__); | 58 | __func__, __LINE__); |
| @@ -92,7 +92,7 @@ static inline struct net *skb_sknet(const struct sk_buff *skb) | |||
| 92 | } | 92 | } |
| 93 | /* | 93 | /* |
| 94 | * This one needed for single_open_net since net is stored directly in | 94 | * This one needed for single_open_net since net is stored directly in |
| 95 | * private not as a struct i.e. seq_file_net cant be used. | 95 | * private not as a struct i.e. seq_file_net can't be used. |
| 96 | */ | 96 | */ |
| 97 | static inline struct net *seq_file_single_net(struct seq_file *seq) | 97 | static inline struct net *seq_file_single_net(struct seq_file *seq) |
| 98 | { | 98 | { |
diff --git a/include/net/irda/irlap.h b/include/net/irda/irlap.h index 17fcd964f9d9..fb4b76d5d7f1 100644 --- a/include/net/irda/irlap.h +++ b/include/net/irda/irlap.h | |||
| @@ -204,7 +204,7 @@ struct irlap_cb { | |||
| 204 | 204 | ||
| 205 | notify_t notify; /* Callbacks to IrLMP */ | 205 | notify_t notify; /* Callbacks to IrLMP */ |
| 206 | 206 | ||
| 207 | int mtt_required; /* Minumum turnaround time required */ | 207 | int mtt_required; /* Minimum turnaround time required */ |
| 208 | int xbofs_delay; /* Nr of XBOF's used to MTT */ | 208 | int xbofs_delay; /* Nr of XBOF's used to MTT */ |
| 209 | int bofs_count; /* Negotiated extra BOFs */ | 209 | int bofs_count; /* Negotiated extra BOFs */ |
| 210 | int next_bofs; /* Negotiated extra BOFs after next frame */ | 210 | int next_bofs; /* Negotiated extra BOFs after next frame */ |
diff --git a/include/net/irda/wrapper.h b/include/net/irda/wrapper.h index 2942ad6ab932..eef53ebe3d76 100644 --- a/include/net/irda/wrapper.h +++ b/include/net/irda/wrapper.h | |||
| @@ -42,7 +42,7 @@ | |||
| 42 | 42 | ||
| 43 | #define IRDA_TRANS 0x20 /* Asynchronous transparency modifier */ | 43 | #define IRDA_TRANS 0x20 /* Asynchronous transparency modifier */ |
| 44 | 44 | ||
| 45 | /* States for receving a frame in async mode */ | 45 | /* States for receiving a frame in async mode */ |
| 46 | enum { | 46 | enum { |
| 47 | OUTSIDE_FRAME, | 47 | OUTSIDE_FRAME, |
| 48 | BEGIN_FRAME, | 48 | BEGIN_FRAME, |
diff --git a/include/net/iucv/iucv.h b/include/net/iucv/iucv.h index 205a3360156e..1121baa9f695 100644 --- a/include/net/iucv/iucv.h +++ b/include/net/iucv/iucv.h | |||
| @@ -173,7 +173,7 @@ struct iucv_handler { | |||
| 173 | /* | 173 | /* |
| 174 | * The message_pending function is called after an icuv interrupt | 174 | * The message_pending function is called after an icuv interrupt |
| 175 | * type 0x06 or type 0x07 has been received. A new message is | 175 | * type 0x06 or type 0x07 has been received. A new message is |
| 176 | * availabe and can be received with iucv_message_receive. | 176 | * available and can be received with iucv_message_receive. |
| 177 | */ | 177 | */ |
| 178 | void (*message_pending)(struct iucv_path *, struct iucv_message *); | 178 | void (*message_pending)(struct iucv_path *, struct iucv_message *); |
| 179 | /* | 179 | /* |
diff --git a/include/net/iw_handler.h b/include/net/iw_handler.h index 3afdb21cc31d..5d5a6a4732ef 100644 --- a/include/net/iw_handler.h +++ b/include/net/iw_handler.h | |||
| @@ -91,7 +91,7 @@ | |||
| 91 | * -------------------- | 91 | * -------------------- |
| 92 | * The implementation goals were as follow : | 92 | * The implementation goals were as follow : |
| 93 | * o Obvious : you should not need a PhD to understand what's happening, | 93 | * o Obvious : you should not need a PhD to understand what's happening, |
| 94 | * the benefit is easier maintainance. | 94 | * the benefit is easier maintenance. |
| 95 | * o Flexible : it should accommodate a wide variety of driver | 95 | * o Flexible : it should accommodate a wide variety of driver |
| 96 | * implementations and be as flexible as the old API. | 96 | * implementations and be as flexible as the old API. |
| 97 | * o Lean : it should be efficient memory wise to minimise the impact | 97 | * o Lean : it should be efficient memory wise to minimise the impact |
| @@ -129,7 +129,7 @@ | |||
| 129 | * | 129 | * |
| 130 | * Functions prototype uses union iwreq_data | 130 | * Functions prototype uses union iwreq_data |
| 131 | * ----------------------------------------- | 131 | * ----------------------------------------- |
| 132 | * Some would have prefered functions defined this way : | 132 | * Some would have preferred functions defined this way : |
| 133 | * static int mydriver_ioctl_setrate(struct net_device *dev, | 133 | * static int mydriver_ioctl_setrate(struct net_device *dev, |
| 134 | * long rate, int auto) | 134 | * long rate, int auto) |
| 135 | * 1) The kernel code doesn't "validate" the content of iwreq_data, and | 135 | * 1) The kernel code doesn't "validate" the content of iwreq_data, and |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index cefe1b37c493..025d4cc7bbf8 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
| @@ -1294,7 +1294,7 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
| 1294 | * acceleration (i.e. iwlwifi). Those drivers should provide update_tkip_key | 1294 | * acceleration (i.e. iwlwifi). Those drivers should provide update_tkip_key |
| 1295 | * handler. | 1295 | * handler. |
| 1296 | * The update_tkip_key() call updates the driver with the new phase 1 key. | 1296 | * The update_tkip_key() call updates the driver with the new phase 1 key. |
| 1297 | * This happens everytime the iv16 wraps around (every 65536 packets). The | 1297 | * This happens every time the iv16 wraps around (every 65536 packets). The |
| 1298 | * set_key() call will happen only once for each key (unless the AP did | 1298 | * set_key() call will happen only once for each key (unless the AP did |
| 1299 | * rekeying), it will not include a valid phase 1 key. The valid phase 1 key is | 1299 | * rekeying), it will not include a valid phase 1 key. The valid phase 1 key is |
| 1300 | * provided by update_tkip_key only. The trigger that makes mac80211 call this | 1300 | * provided by update_tkip_key only. The trigger that makes mac80211 call this |
| @@ -1753,8 +1753,19 @@ enum ieee80211_ampdu_mlme_action { | |||
| 1753 | * that TX/RX_STOP can pass NULL for this parameter. | 1753 | * that TX/RX_STOP can pass NULL for this parameter. |
| 1754 | * The @buf_size parameter is only valid when the action is set to | 1754 | * The @buf_size parameter is only valid when the action is set to |
| 1755 | * %IEEE80211_AMPDU_TX_OPERATIONAL and indicates the peer's reorder | 1755 | * %IEEE80211_AMPDU_TX_OPERATIONAL and indicates the peer's reorder |
| 1756 | * buffer size (number of subframes) for this session -- aggregates | 1756 | * buffer size (number of subframes) for this session -- the driver |
| 1757 | * containing more subframes than this may not be transmitted to the peer. | 1757 | * may neither send aggregates containing more subframes than this |
| 1758 | * nor send aggregates in a way that lost frames would exceed the | ||
| 1759 | * buffer size. If just limiting the aggregate size, this would be | ||
| 1760 | * possible with a buf_size of 8: | ||
| 1761 | * - TX: 1.....7 | ||
| 1762 | * - RX: 2....7 (lost frame #1) | ||
| 1763 | * - TX: 8..1... | ||
| 1764 | * which is invalid since #1 was now re-transmitted well past the | ||
| 1765 | * buffer size of 8. Correct ways to retransmit #1 would be: | ||
| 1766 | * - TX: 1 or 18 or 81 | ||
| 1767 | * Even "189" would be wrong since 1 could be lost again. | ||
| 1768 | * | ||
| 1758 | * Returns a negative error code on failure. | 1769 | * Returns a negative error code on failure. |
| 1759 | * The callback can sleep. | 1770 | * The callback can sleep. |
| 1760 | * | 1771 | * |
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index d9549af6929a..65afc4966204 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
| @@ -32,7 +32,7 @@ static inline void *qdisc_priv(struct Qdisc *q) | |||
| 32 | 32 | ||
| 33 | The result: [34]86 is not good choice for QoS router :-( | 33 | The result: [34]86 is not good choice for QoS router :-( |
| 34 | 34 | ||
| 35 | The things are not so bad, because we may use artifical | 35 | The things are not so bad, because we may use artificial |
| 36 | clock evaluated by integration of network data flow | 36 | clock evaluated by integration of network data flow |
| 37 | in the most critical places. | 37 | in the most critical places. |
| 38 | */ | 38 | */ |
diff --git a/include/net/route.h b/include/net/route.h index f88429cad52a..8fce0621cad1 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
| @@ -64,6 +64,7 @@ struct rtable { | |||
| 64 | 64 | ||
| 65 | __be32 rt_dst; /* Path destination */ | 65 | __be32 rt_dst; /* Path destination */ |
| 66 | __be32 rt_src; /* Path source */ | 66 | __be32 rt_src; /* Path source */ |
| 67 | int rt_route_iif; | ||
| 67 | int rt_iif; | 68 | int rt_iif; |
| 68 | int rt_oif; | 69 | int rt_oif; |
| 69 | __u32 rt_mark; | 70 | __u32 rt_mark; |
| @@ -80,12 +81,12 @@ struct rtable { | |||
| 80 | 81 | ||
| 81 | static inline bool rt_is_input_route(struct rtable *rt) | 82 | static inline bool rt_is_input_route(struct rtable *rt) |
| 82 | { | 83 | { |
| 83 | return rt->rt_iif != 0; | 84 | return rt->rt_route_iif != 0; |
| 84 | } | 85 | } |
| 85 | 86 | ||
| 86 | static inline bool rt_is_output_route(struct rtable *rt) | 87 | static inline bool rt_is_output_route(struct rtable *rt) |
| 87 | { | 88 | { |
| 88 | return rt->rt_iif == 0; | 89 | return rt->rt_route_iif == 0; |
| 89 | } | 90 | } |
| 90 | 91 | ||
| 91 | struct ip_rt_acct { | 92 | struct ip_rt_acct { |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index cc9185ca8fd1..0f6e60a9c308 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
| @@ -422,7 +422,7 @@ struct sctp_cookie { | |||
| 422 | __u32 adaptation_ind; | 422 | __u32 adaptation_ind; |
| 423 | 423 | ||
| 424 | __u8 auth_random[sizeof(sctp_paramhdr_t) + SCTP_AUTH_RANDOM_LENGTH]; | 424 | __u8 auth_random[sizeof(sctp_paramhdr_t) + SCTP_AUTH_RANDOM_LENGTH]; |
| 425 | __u8 auth_hmacs[SCTP_AUTH_NUM_HMACS + 2]; | 425 | __u8 auth_hmacs[SCTP_AUTH_NUM_HMACS * sizeof(__u16) + 2]; |
| 426 | __u8 auth_chunks[sizeof(sctp_paramhdr_t) + SCTP_AUTH_MAX_CHUNKS]; | 426 | __u8 auth_chunks[sizeof(sctp_paramhdr_t) + SCTP_AUTH_MAX_CHUNKS]; |
| 427 | 427 | ||
| 428 | /* This is a shim for my peer's INIT packet, followed by | 428 | /* This is a shim for my peer's INIT packet, followed by |
diff --git a/include/net/sock.h b/include/net/sock.h index da0534d3401c..01810a3f19df 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -1749,7 +1749,7 @@ void sock_net_set(struct sock *sk, struct net *net) | |||
| 1749 | 1749 | ||
| 1750 | /* | 1750 | /* |
| 1751 | * Kernel sockets, f.e. rtnl or icmp_socket, are a part of a namespace. | 1751 | * Kernel sockets, f.e. rtnl or icmp_socket, are a part of a namespace. |
| 1752 | * They should not hold a referrence to a namespace in order to allow | 1752 | * They should not hold a reference to a namespace in order to allow |
| 1753 | * to stop it. | 1753 | * to stop it. |
| 1754 | * Sockets after sk_change_net should be released using sk_release_kernel | 1754 | * Sockets after sk_change_net should be released using sk_release_kernel |
| 1755 | */ | 1755 | */ |
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h index eeb077dd735f..a8122dc56410 100644 --- a/include/net/transp_v6.h +++ b/include/net/transp_v6.h | |||
| @@ -16,7 +16,7 @@ extern struct proto tcpv6_prot; | |||
| 16 | 16 | ||
| 17 | struct flowi6; | 17 | struct flowi6; |
| 18 | 18 | ||
| 19 | /* extention headers */ | 19 | /* extension headers */ |
| 20 | extern int ipv6_exthdrs_init(void); | 20 | extern int ipv6_exthdrs_init(void); |
| 21 | extern void ipv6_exthdrs_exit(void); | 21 | extern void ipv6_exthdrs_exit(void); |
| 22 | extern int ipv6_frag_init(void); | 22 | extern int ipv6_frag_init(void); |
diff --git a/include/net/wimax.h b/include/net/wimax.h index 3461aa1df1e0..c799ba7b708b 100644 --- a/include/net/wimax.h +++ b/include/net/wimax.h | |||
| @@ -286,7 +286,7 @@ struct wimax_dev; | |||
| 286 | * does not disconnect the device from the bus and return 0. | 286 | * does not disconnect the device from the bus and return 0. |
| 287 | * If that fails, it should resort to some sort of cold or bus | 287 | * If that fails, it should resort to some sort of cold or bus |
| 288 | * reset (even if it implies a bus disconnection and device | 288 | * reset (even if it implies a bus disconnection and device |
| 289 | * dissapearance). In that case, -ENODEV should be returned to | 289 | * disappearance). In that case, -ENODEV should be returned to |
| 290 | * indicate the device is gone. | 290 | * indicate the device is gone. |
| 291 | * This operation has to be synchronous, and return only when the | 291 | * This operation has to be synchronous, and return only when the |
| 292 | * reset is complete. In case of having had to resort to bus/cold | 292 | * reset is complete. In case of having had to resort to bus/cold |
diff --git a/include/net/wpan-phy.h b/include/net/wpan-phy.h index 85926231c07a..d86fffd3c03c 100644 --- a/include/net/wpan-phy.h +++ b/include/net/wpan-phy.h | |||
| @@ -28,7 +28,7 @@ struct wpan_phy { | |||
| 28 | struct mutex pib_lock; | 28 | struct mutex pib_lock; |
| 29 | 29 | ||
| 30 | /* | 30 | /* |
| 31 | * This is a PIB acording to 802.15.4-2006. | 31 | * This is a PIB according to 802.15.4-2006. |
| 32 | * We do not provide timing-related variables, as they | 32 | * We do not provide timing-related variables, as they |
| 33 | * aren't used outside of driver | 33 | * aren't used outside of driver |
| 34 | */ | 34 | */ |
diff --git a/include/rxrpc/packet.h b/include/rxrpc/packet.h index 9b2c30897e50..f2902ef7ab75 100644 --- a/include/rxrpc/packet.h +++ b/include/rxrpc/packet.h | |||
| @@ -148,7 +148,7 @@ struct rxkad_challenge { | |||
| 148 | * Kerberos security type-2 response packet | 148 | * Kerberos security type-2 response packet |
| 149 | */ | 149 | */ |
| 150 | struct rxkad_response { | 150 | struct rxkad_response { |
| 151 | __be32 version; /* version of this reponse type */ | 151 | __be32 version; /* version of this response type */ |
| 152 | __be32 __pad; | 152 | __be32 __pad; |
| 153 | 153 | ||
| 154 | /* encrypted bit of the response */ | 154 | /* encrypted bit of the response */ |
diff --git a/include/scsi/fc/fc_fcp.h b/include/scsi/fc/fc_fcp.h index 8a143ca79878..652dec230514 100644 --- a/include/scsi/fc/fc_fcp.h +++ b/include/scsi/fc/fc_fcp.h | |||
| @@ -75,7 +75,7 @@ struct fcp_cmnd32 { | |||
| 75 | #define FCP_PTA_SIMPLE 0 /* simple task attribute */ | 75 | #define FCP_PTA_SIMPLE 0 /* simple task attribute */ |
| 76 | #define FCP_PTA_HEADQ 1 /* head of queue task attribute */ | 76 | #define FCP_PTA_HEADQ 1 /* head of queue task attribute */ |
| 77 | #define FCP_PTA_ORDERED 2 /* ordered task attribute */ | 77 | #define FCP_PTA_ORDERED 2 /* ordered task attribute */ |
| 78 | #define FCP_PTA_ACA 4 /* auto. contigent allegiance */ | 78 | #define FCP_PTA_ACA 4 /* auto. contingent allegiance */ |
| 79 | #define FCP_PTA_MASK 7 /* mask for task attribute field */ | 79 | #define FCP_PTA_MASK 7 /* mask for task attribute field */ |
| 80 | #define FCP_PRI_SHIFT 3 /* priority field starts in bit 3 */ | 80 | #define FCP_PRI_SHIFT 3 /* priority field starts in bit 3 */ |
| 81 | #define FCP_PRI_RESVD_MASK 0x80 /* reserved bits in priority field */ | 81 | #define FCP_PRI_RESVD_MASK 0x80 /* reserved bits in priority field */ |
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index c3e1cbcc2ad2..ddb04568a509 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h | |||
| @@ -292,7 +292,7 @@ enum iscsi_param { | |||
| 292 | ISCSI_PARAM_PERSISTENT_PORT, | 292 | ISCSI_PARAM_PERSISTENT_PORT, |
| 293 | ISCSI_PARAM_SESS_RECOVERY_TMO, | 293 | ISCSI_PARAM_SESS_RECOVERY_TMO, |
| 294 | 294 | ||
| 295 | /* pased in through bind conn using transport_fd */ | 295 | /* passed in through bind conn using transport_fd */ |
| 296 | ISCSI_PARAM_CONN_PORT, | 296 | ISCSI_PARAM_CONN_PORT, |
| 297 | ISCSI_PARAM_CONN_ADDRESS, | 297 | ISCSI_PARAM_CONN_ADDRESS, |
| 298 | 298 | ||
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 24193c1b0da0..a3cbda4ddb5c 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
| @@ -260,7 +260,7 @@ struct fcoe_dev_stats { | |||
| 260 | /** | 260 | /** |
| 261 | * struct fc_seq_els_data - ELS data used for passing ELS specific responses | 261 | * struct fc_seq_els_data - ELS data used for passing ELS specific responses |
| 262 | * @reason: The reason for rejection | 262 | * @reason: The reason for rejection |
| 263 | * @explan: The explaination of the rejection | 263 | * @explan: The explanation of the rejection |
| 264 | * | 264 | * |
| 265 | * Mainly used by the exchange manager layer. | 265 | * Mainly used by the exchange manager layer. |
| 266 | */ | 266 | */ |
| @@ -525,7 +525,7 @@ struct libfc_function_template { | |||
| 525 | struct fc_frame *); | 525 | struct fc_frame *); |
| 526 | 526 | ||
| 527 | /* | 527 | /* |
| 528 | * Send an ELS response using infomation from the received frame. | 528 | * Send an ELS response using information from the received frame. |
| 529 | * | 529 | * |
| 530 | * STATUS: OPTIONAL | 530 | * STATUS: OPTIONAL |
| 531 | */ | 531 | */ |
| @@ -663,7 +663,7 @@ struct libfc_function_template { | |||
| 663 | int (*rport_logoff)(struct fc_rport_priv *); | 663 | int (*rport_logoff)(struct fc_rport_priv *); |
| 664 | 664 | ||
| 665 | /* | 665 | /* |
| 666 | * Recieve a request from a remote port. | 666 | * Receive a request from a remote port. |
| 667 | * | 667 | * |
| 668 | * STATUS: OPTIONAL | 668 | * STATUS: OPTIONAL |
| 669 | */ | 669 | */ |
| @@ -704,7 +704,7 @@ struct libfc_function_template { | |||
| 704 | void *)); | 704 | void *)); |
| 705 | 705 | ||
| 706 | /* | 706 | /* |
| 707 | * Cleanup the FCP layer, used durring link down and reset | 707 | * Cleanup the FCP layer, used during link down and reset |
| 708 | * | 708 | * |
| 709 | * STATUS: OPTIONAL | 709 | * STATUS: OPTIONAL |
| 710 | */ | 710 | */ |
diff --git a/include/scsi/libiscsi_tcp.h b/include/scsi/libiscsi_tcp.h index e6b9fd2eea34..ac0cc1d925ef 100644 --- a/include/scsi/libiscsi_tcp.h +++ b/include/scsi/libiscsi_tcp.h | |||
| @@ -52,7 +52,7 @@ struct iscsi_segment { | |||
| 52 | iscsi_segment_done_fn_t *done; | 52 | iscsi_segment_done_fn_t *done; |
| 53 | }; | 53 | }; |
| 54 | 54 | ||
| 55 | /* Socket connection recieve helper */ | 55 | /* Socket connection receive helper */ |
| 56 | struct iscsi_tcp_recv { | 56 | struct iscsi_tcp_recv { |
| 57 | struct iscsi_hdr *hdr; | 57 | struct iscsi_hdr *hdr; |
| 58 | struct iscsi_segment segment; | 58 | struct iscsi_segment segment; |
diff --git a/include/scsi/osd_initiator.h b/include/scsi/osd_initiator.h index 53a9e886612b..0a5079974fe9 100644 --- a/include/scsi/osd_initiator.h +++ b/include/scsi/osd_initiator.h | |||
| @@ -265,7 +265,7 @@ int osd_execute_request_async(struct osd_request *or, | |||
| 265 | * @osi - Recievs a more detailed error report information (optional). | 265 | * @osi - Recievs a more detailed error report information (optional). |
| 266 | * @silent - Do not print to dmsg (Even if enabled) | 266 | * @silent - Do not print to dmsg (Even if enabled) |
| 267 | * @bad_obj_list - Some commands act on multiple objects. Failed objects will | 267 | * @bad_obj_list - Some commands act on multiple objects. Failed objects will |
| 268 | * be recieved here (optional) | 268 | * be received here (optional) |
| 269 | * @max_obj - Size of @bad_obj_list. | 269 | * @max_obj - Size of @bad_obj_list. |
| 270 | * @bad_attr_list - List of failing attributes (optional) | 270 | * @bad_attr_list - List of failing attributes (optional) |
| 271 | * @max_attr - Size of @bad_attr_list. | 271 | * @max_attr - Size of @bad_attr_list. |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index e7e385842a38..f1f2644137b8 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
| @@ -46,7 +46,7 @@ struct blk_queue_tags; | |||
| 46 | enum { | 46 | enum { |
| 47 | SCSI_QDEPTH_DEFAULT, /* default requested change, e.g. from sysfs */ | 47 | SCSI_QDEPTH_DEFAULT, /* default requested change, e.g. from sysfs */ |
| 48 | SCSI_QDEPTH_QFULL, /* scsi-ml requested due to queue full */ | 48 | SCSI_QDEPTH_QFULL, /* scsi-ml requested due to queue full */ |
| 49 | SCSI_QDEPTH_RAMP_UP, /* scsi-ml requested due to threshhold event */ | 49 | SCSI_QDEPTH_RAMP_UP, /* scsi-ml requested due to threshold event */ |
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | struct scsi_host_template { | 52 | struct scsi_host_template { |
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index 59816fe31e68..2a65167a8f10 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h | |||
| @@ -192,9 +192,9 @@ struct fc_vport_identifiers { | |||
| 192 | * | 192 | * |
| 193 | * This structure exists for each FC port is a virtual FC port. Virtual | 193 | * This structure exists for each FC port is a virtual FC port. Virtual |
| 194 | * ports share the physical link with the Physical port. Each virtual | 194 | * ports share the physical link with the Physical port. Each virtual |
| 195 | * ports has a unique presense on the SAN, and may be instantiated via | 195 | * ports has a unique presence on the SAN, and may be instantiated via |
| 196 | * NPIV, Virtual Fabrics, or via additional ALPAs. As the vport is a | 196 | * NPIV, Virtual Fabrics, or via additional ALPAs. As the vport is a |
| 197 | * unique presense, each vport has it's own view of the fabric, | 197 | * unique presence, each vport has it's own view of the fabric, |
| 198 | * authentication privilege, and priorities. | 198 | * authentication privilege, and priorities. |
| 199 | * | 199 | * |
| 200 | * A virtual port may support 1 or more FC4 roles. Typically it is a | 200 | * A virtual port may support 1 or more FC4 roles. Typically it is a |
| @@ -370,7 +370,7 @@ struct fc_rport { /* aka fc_starget_attrs */ | |||
| 370 | /* | 370 | /* |
| 371 | * FC SCSI Target Attributes | 371 | * FC SCSI Target Attributes |
| 372 | * | 372 | * |
| 373 | * The SCSI Target is considered an extention of a remote port (as | 373 | * The SCSI Target is considered an extension of a remote port (as |
| 374 | * a remote port can be more than a SCSI Target). Within the scsi | 374 | * a remote port can be more than a SCSI Target). Within the scsi |
| 375 | * subsystem, we leave the Target as a separate entity. Doing so | 375 | * subsystem, we leave the Target as a separate entity. Doing so |
| 376 | * provides backward compatibility with prior FC transport api's, | 376 | * provides backward compatibility with prior FC transport api's, |
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h index f1dcefe4532b..02cbb50225bb 100644 --- a/include/sound/ac97_codec.h +++ b/include/sound/ac97_codec.h | |||
| @@ -385,7 +385,7 @@ | |||
| 385 | #define AC97_SCAP_DETECT_BY_VENDOR (1<<8) /* use vendor registers for read tests */ | 385 | #define AC97_SCAP_DETECT_BY_VENDOR (1<<8) /* use vendor registers for read tests */ |
| 386 | #define AC97_SCAP_NO_SPDIF (1<<9) /* don't build SPDIF controls */ | 386 | #define AC97_SCAP_NO_SPDIF (1<<9) /* don't build SPDIF controls */ |
| 387 | #define AC97_SCAP_EAPD_LED (1<<10) /* EAPD as mute LED */ | 387 | #define AC97_SCAP_EAPD_LED (1<<10) /* EAPD as mute LED */ |
| 388 | #define AC97_SCAP_POWER_SAVE (1<<11) /* capable for aggresive power-saving */ | 388 | #define AC97_SCAP_POWER_SAVE (1<<11) /* capable for aggressive power-saving */ |
| 389 | 389 | ||
| 390 | /* ac97->flags */ | 390 | /* ac97->flags */ |
| 391 | #define AC97_HAS_PC_BEEP (1<<0) /* force PC Speaker usage */ | 391 | #define AC97_HAS_PC_BEEP (1<<0) /* force PC Speaker usage */ |
diff --git a/include/sound/control.h b/include/sound/control.h index e67db2869360..404acb859cee 100644 --- a/include/sound/control.h +++ b/include/sound/control.h | |||
| @@ -191,7 +191,7 @@ int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave, | |||
| 191 | * Returns zero if successful or a negative error code. | 191 | * Returns zero if successful or a negative error code. |
| 192 | * | 192 | * |
| 193 | * All slaves must be the same type (returning the same information | 193 | * All slaves must be the same type (returning the same information |
| 194 | * via info callback). The fucntion doesn't check it, so it's your | 194 | * via info callback). The function doesn't check it, so it's your |
| 195 | * responsibility. | 195 | * responsibility. |
| 196 | * | 196 | * |
| 197 | * Also, some additional limitations: | 197 | * Also, some additional limitations: |
diff --git a/include/sound/cs46xx_dsp_spos.h b/include/sound/cs46xx_dsp_spos.h index 49b03c9e5e55..8008c59288a6 100644 --- a/include/sound/cs46xx_dsp_spos.h +++ b/include/sound/cs46xx_dsp_spos.h | |||
| @@ -147,7 +147,7 @@ struct dsp_pcm_channel_descriptor { | |||
| 147 | }; | 147 | }; |
| 148 | 148 | ||
| 149 | struct dsp_spos_instance { | 149 | struct dsp_spos_instance { |
| 150 | struct dsp_symbol_desc symbol_table; /* currently availble loaded symbols in SP */ | 150 | struct dsp_symbol_desc symbol_table; /* currently available loaded symbols in SP */ |
| 151 | 151 | ||
| 152 | int nmodules; | 152 | int nmodules; |
| 153 | struct dsp_module_desc * modules; /* modules loaded into SP */ | 153 | struct dsp_module_desc * modules; /* modules loaded into SP */ |
diff --git a/include/sound/hdspm.h b/include/sound/hdspm.h index 1774ff5ff632..1f59ea2a4a76 100644 --- a/include/sound/hdspm.h +++ b/include/sound/hdspm.h | |||
| @@ -193,7 +193,7 @@ struct hdspm_version { | |||
| 193 | * 32768 Bytes | 193 | * 32768 Bytes |
| 194 | */ | 194 | */ |
| 195 | 195 | ||
| 196 | /* organisation is 64 channelfader in a continous memory block */ | 196 | /* organisation is 64 channelfader in a continuous memory block */ |
| 197 | /* equivalent to hardware definition, maybe for future feature of mmap of | 197 | /* equivalent to hardware definition, maybe for future feature of mmap of |
| 198 | * them | 198 | * them |
| 199 | */ | 199 | */ |
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 979ed84e07d6..f72c1039a6fb 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | /* | 23 | /* |
| 24 | * SoC dynamic audio power management | 24 | * SoC dynamic audio power management |
| 25 | * | 25 | * |
| 26 | * We can have upto 4 power domains | 26 | * We can have up to 4 power domains |
| 27 | * 1. Codec domain - VREF, VMID | 27 | * 1. Codec domain - VREF, VMID |
| 28 | * Usually controlled at codec probe/remove, although can be set | 28 | * Usually controlled at codec probe/remove, although can be set |
| 29 | * at stream time if power is not needed for sidetone, etc. | 29 | * at stream time if power is not needed for sidetone, etc. |
| @@ -45,25 +45,25 @@ | |||
| 45 | /* platform domain */ | 45 | /* platform domain */ |
| 46 | #define SND_SOC_DAPM_INPUT(wname) \ | 46 | #define SND_SOC_DAPM_INPUT(wname) \ |
| 47 | { .id = snd_soc_dapm_input, .name = wname, .kcontrols = NULL, \ | 47 | { .id = snd_soc_dapm_input, .name = wname, .kcontrols = NULL, \ |
| 48 | .num_kcontrols = 0} | 48 | .num_kcontrols = 0, .reg = SND_SOC_NOPM } |
| 49 | #define SND_SOC_DAPM_OUTPUT(wname) \ | 49 | #define SND_SOC_DAPM_OUTPUT(wname) \ |
| 50 | { .id = snd_soc_dapm_output, .name = wname, .kcontrols = NULL, \ | 50 | { .id = snd_soc_dapm_output, .name = wname, .kcontrols = NULL, \ |
| 51 | .num_kcontrols = 0} | 51 | .num_kcontrols = 0, .reg = SND_SOC_NOPM } |
| 52 | #define SND_SOC_DAPM_MIC(wname, wevent) \ | 52 | #define SND_SOC_DAPM_MIC(wname, wevent) \ |
| 53 | { .id = snd_soc_dapm_mic, .name = wname, .kcontrols = NULL, \ | 53 | { .id = snd_soc_dapm_mic, .name = wname, .kcontrols = NULL, \ |
| 54 | .num_kcontrols = 0, .event = wevent, \ | 54 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
| 55 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD} | 55 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD} |
| 56 | #define SND_SOC_DAPM_HP(wname, wevent) \ | 56 | #define SND_SOC_DAPM_HP(wname, wevent) \ |
| 57 | { .id = snd_soc_dapm_hp, .name = wname, .kcontrols = NULL, \ | 57 | { .id = snd_soc_dapm_hp, .name = wname, .kcontrols = NULL, \ |
| 58 | .num_kcontrols = 0, .event = wevent, \ | 58 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
| 59 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} | 59 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} |
| 60 | #define SND_SOC_DAPM_SPK(wname, wevent) \ | 60 | #define SND_SOC_DAPM_SPK(wname, wevent) \ |
| 61 | { .id = snd_soc_dapm_spk, .name = wname, .kcontrols = NULL, \ | 61 | { .id = snd_soc_dapm_spk, .name = wname, .kcontrols = NULL, \ |
| 62 | .num_kcontrols = 0, .event = wevent, \ | 62 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
| 63 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} | 63 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} |
| 64 | #define SND_SOC_DAPM_LINE(wname, wevent) \ | 64 | #define SND_SOC_DAPM_LINE(wname, wevent) \ |
| 65 | { .id = snd_soc_dapm_line, .name = wname, .kcontrols = NULL, \ | 65 | { .id = snd_soc_dapm_line, .name = wname, .kcontrols = NULL, \ |
| 66 | .num_kcontrols = 0, .event = wevent, \ | 66 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
| 67 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} | 67 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} |
| 68 | 68 | ||
| 69 | /* path domain */ | 69 | /* path domain */ |
| @@ -189,11 +189,11 @@ | |||
| 189 | /* events that are pre and post DAPM */ | 189 | /* events that are pre and post DAPM */ |
| 190 | #define SND_SOC_DAPM_PRE(wname, wevent) \ | 190 | #define SND_SOC_DAPM_PRE(wname, wevent) \ |
| 191 | { .id = snd_soc_dapm_pre, .name = wname, .kcontrols = NULL, \ | 191 | { .id = snd_soc_dapm_pre, .name = wname, .kcontrols = NULL, \ |
| 192 | .num_kcontrols = 0, .event = wevent, \ | 192 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
| 193 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD} | 193 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD} |
| 194 | #define SND_SOC_DAPM_POST(wname, wevent) \ | 194 | #define SND_SOC_DAPM_POST(wname, wevent) \ |
| 195 | { .id = snd_soc_dapm_post, .name = wname, .kcontrols = NULL, \ | 195 | { .id = snd_soc_dapm_post, .name = wname, .kcontrols = NULL, \ |
| 196 | .num_kcontrols = 0, .event = wevent, \ | 196 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
| 197 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD} | 197 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD} |
| 198 | 198 | ||
| 199 | /* stream domain */ | 199 | /* stream domain */ |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index c15ed5026fb5..1d3b5b2f0dbc 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | * Note that both include/scsi/scsi_cmnd.h:MAX_COMMAND_SIZE and | 22 | * Note that both include/scsi/scsi_cmnd.h:MAX_COMMAND_SIZE and |
| 23 | * include/linux/blkdev.h:BLOCK_MAX_CDB as of v2.6.36-rc4 still use | 23 | * include/linux/blkdev.h:BLOCK_MAX_CDB as of v2.6.36-rc4 still use |
| 24 | * 16-byte CDBs by default and require an extra allocation for | 24 | * 16-byte CDBs by default and require an extra allocation for |
| 25 | * 32-byte CDBs to becasue of legacy issues. | 25 | * 32-byte CDBs to because of legacy issues. |
| 26 | * | 26 | * |
| 27 | * Within TCM Core there are no such legacy limitiations, so we go ahead | 27 | * Within TCM Core there are no such legacy limitiations, so we go ahead |
| 28 | * use 32-byte CDBs by default and use include/scsi/scsi.h:scsi_command_size() | 28 | * use 32-byte CDBs by default and use include/scsi/scsi.h:scsi_command_size() |
| @@ -302,7 +302,7 @@ struct t10_wwn { | |||
| 302 | 302 | ||
| 303 | 303 | ||
| 304 | /* | 304 | /* |
| 305 | * Used by TCM Core internally to signal if >= SPC-3 peristent reservations | 305 | * Used by TCM Core internally to signal if >= SPC-3 persistent reservations |
| 306 | * emulation is enabled or disabled, or running in with TCM/pSCSI passthrough | 306 | * emulation is enabled or disabled, or running in with TCM/pSCSI passthrough |
| 307 | * mode | 307 | * mode |
| 308 | */ | 308 | */ |
| @@ -934,7 +934,7 @@ struct se_portal_group { | |||
| 934 | struct list_head acl_node_list; | 934 | struct list_head acl_node_list; |
| 935 | struct se_lun *tpg_lun_list; | 935 | struct se_lun *tpg_lun_list; |
| 936 | struct se_lun tpg_virt_lun0; | 936 | struct se_lun tpg_virt_lun0; |
| 937 | /* List of TCM sessions assoicated wth this TPG */ | 937 | /* List of TCM sessions associated wth this TPG */ |
| 938 | struct list_head tpg_sess_list; | 938 | struct list_head tpg_sess_list; |
| 939 | /* Pointer to $FABRIC_MOD dependent code */ | 939 | /* Pointer to $FABRIC_MOD dependent code */ |
| 940 | struct target_core_fabric_ops *se_tpg_tfo; | 940 | struct target_core_fabric_ops *se_tpg_tfo; |
diff --git a/include/target/target_core_fabric_ops.h b/include/target/target_core_fabric_ops.h index 5eb8b1ae59d1..dc78f77f9450 100644 --- a/include/target/target_core_fabric_ops.h +++ b/include/target/target_core_fabric_ops.h | |||
| @@ -35,7 +35,7 @@ struct target_core_fabric_ops { | |||
| 35 | /* | 35 | /* |
| 36 | * Optional function pointer for TCM to perform command map | 36 | * Optional function pointer for TCM to perform command map |
| 37 | * from TCM processing thread context, for those struct se_cmd | 37 | * from TCM processing thread context, for those struct se_cmd |
| 38 | * initally allocated in interrupt context. | 38 | * initially allocated in interrupt context. |
| 39 | */ | 39 | */ |
| 40 | int (*new_cmd_map)(struct se_cmd *); | 40 | int (*new_cmd_map)(struct se_cmd *); |
| 41 | /* | 41 | /* |
diff --git a/include/trace/events/block.h b/include/trace/events/block.h index 78f18adb49c8..bf366547da25 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h | |||
| @@ -401,9 +401,9 @@ TRACE_EVENT(block_plug, | |||
| 401 | 401 | ||
| 402 | DECLARE_EVENT_CLASS(block_unplug, | 402 | DECLARE_EVENT_CLASS(block_unplug, |
| 403 | 403 | ||
| 404 | TP_PROTO(struct request_queue *q), | 404 | TP_PROTO(struct request_queue *q, unsigned int depth, bool explicit), |
| 405 | 405 | ||
| 406 | TP_ARGS(q), | 406 | TP_ARGS(q, depth, explicit), |
| 407 | 407 | ||
| 408 | TP_STRUCT__entry( | 408 | TP_STRUCT__entry( |
| 409 | __field( int, nr_rq ) | 409 | __field( int, nr_rq ) |
| @@ -411,7 +411,7 @@ DECLARE_EVENT_CLASS(block_unplug, | |||
| 411 | ), | 411 | ), |
| 412 | 412 | ||
| 413 | TP_fast_assign( | 413 | TP_fast_assign( |
| 414 | __entry->nr_rq = q->rq.count[READ] + q->rq.count[WRITE]; | 414 | __entry->nr_rq = depth; |
| 415 | memcpy(__entry->comm, current->comm, TASK_COMM_LEN); | 415 | memcpy(__entry->comm, current->comm, TASK_COMM_LEN); |
| 416 | ), | 416 | ), |
| 417 | 417 | ||
| @@ -419,31 +419,19 @@ DECLARE_EVENT_CLASS(block_unplug, | |||
| 419 | ); | 419 | ); |
| 420 | 420 | ||
| 421 | /** | 421 | /** |
| 422 | * block_unplug_timer - timed release of operations requests in queue to device driver | 422 | * block_unplug - release of operations requests in request queue |
| 423 | * @q: request queue to unplug | ||
| 424 | * | ||
| 425 | * Unplug the request queue @q because a timer expired and allow block | ||
| 426 | * operation requests to be sent to the device driver. | ||
| 427 | */ | ||
| 428 | DEFINE_EVENT(block_unplug, block_unplug_timer, | ||
| 429 | |||
| 430 | TP_PROTO(struct request_queue *q), | ||
| 431 | |||
| 432 | TP_ARGS(q) | ||
| 433 | ); | ||
| 434 | |||
| 435 | /** | ||
| 436 | * block_unplug_io - release of operations requests in request queue | ||
| 437 | * @q: request queue to unplug | 423 | * @q: request queue to unplug |
| 424 | * @depth: number of requests just added to the queue | ||
| 425 | * @explicit: whether this was an explicit unplug, or one from schedule() | ||
| 438 | * | 426 | * |
| 439 | * Unplug request queue @q because device driver is scheduled to work | 427 | * Unplug request queue @q because device driver is scheduled to work |
| 440 | * on elements in the request queue. | 428 | * on elements in the request queue. |
| 441 | */ | 429 | */ |
| 442 | DEFINE_EVENT(block_unplug, block_unplug_io, | 430 | DEFINE_EVENT(block_unplug, block_unplug, |
| 443 | 431 | ||
| 444 | TP_PROTO(struct request_queue *q), | 432 | TP_PROTO(struct request_queue *q, unsigned int depth, bool explicit), |
| 445 | 433 | ||
| 446 | TP_ARGS(q) | 434 | TP_ARGS(q, depth, explicit) |
| 447 | ); | 435 | ); |
| 448 | 436 | ||
| 449 | /** | 437 | /** |
diff --git a/include/video/kyro.h b/include/video/kyro.h index dba7de2ee4a8..c563968e926c 100644 --- a/include/video/kyro.h +++ b/include/video/kyro.h | |||
| @@ -32,7 +32,7 @@ struct kyrofb_info { | |||
| 32 | u32 PIXCLK; /* Pixel Clock */ | 32 | u32 PIXCLK; /* Pixel Clock */ |
| 33 | u32 HCLK; /* Hor Clock */ | 33 | u32 HCLK; /* Hor Clock */ |
| 34 | 34 | ||
| 35 | /* Usefull to hold depth here for Linux */ | 35 | /* Useful to hold depth here for Linux */ |
| 36 | u8 PIXDEPTH; | 36 | u8 PIXDEPTH; |
| 37 | 37 | ||
| 38 | #ifdef CONFIG_MTRR | 38 | #ifdef CONFIG_MTRR |
diff --git a/include/video/neomagic.h b/include/video/neomagic.h index 08b663782956..bc5013e8059d 100644 --- a/include/video/neomagic.h +++ b/include/video/neomagic.h | |||
| @@ -129,7 +129,7 @@ struct neofb_par { | |||
| 129 | unsigned char CRTC[25]; /* Crtc Controller */ | 129 | unsigned char CRTC[25]; /* Crtc Controller */ |
| 130 | unsigned char Sequencer[5]; /* Video Sequencer */ | 130 | unsigned char Sequencer[5]; /* Video Sequencer */ |
| 131 | unsigned char Graphics[9]; /* Video Graphics */ | 131 | unsigned char Graphics[9]; /* Video Graphics */ |
| 132 | unsigned char Attribute[21]; /* Video Atribute */ | 132 | unsigned char Attribute[21]; /* Video Attribute */ |
| 133 | 133 | ||
| 134 | unsigned char GeneralLockReg; | 134 | unsigned char GeneralLockReg; |
| 135 | unsigned char ExtCRTDispAddr; | 135 | unsigned char ExtCRTDispAddr; |
diff --git a/include/video/newport.h b/include/video/newport.h index 001b935e71c4..3d7c4b492ec6 100644 --- a/include/video/newport.h +++ b/include/video/newport.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * | 5 | * |
| 6 | * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) | 6 | * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) |
| 7 | * | 7 | * |
| 8 | * Ulf Carlsson - Compability with the IRIX structures added | 8 | * Ulf Carlsson - Compatibility with the IRIX structures added |
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | #ifndef _SGI_NEWPORT_H | 11 | #ifndef _SGI_NEWPORT_H |
diff --git a/include/video/sisfb.h b/include/video/sisfb.h index fdd74f1a6791..6dc5df9e43f3 100644 --- a/include/video/sisfb.h +++ b/include/video/sisfb.h | |||
| @@ -151,7 +151,7 @@ struct sisfb_cmd { | |||
| 151 | __u32 sisfb_result[4]; | 151 | __u32 sisfb_result[4]; |
| 152 | }; | 152 | }; |
| 153 | 153 | ||
| 154 | /* Addtional IOCTLs for communication sisfb <> X driver */ | 154 | /* Additional IOCTLs for communication sisfb <> X driver */ |
| 155 | /* If changing this, vgatypes.h must also be changed (for X driver) */ | 155 | /* If changing this, vgatypes.h must also be changed (for X driver) */ |
| 156 | 156 | ||
| 157 | /* ioctl for identifying and giving some info (esp. memory heap start) */ | 157 | /* ioctl for identifying and giving some info (esp. memory heap start) */ |
diff --git a/include/video/sstfb.h b/include/video/sstfb.h index b52f07381243..c449eace12cd 100644 --- a/include/video/sstfb.h +++ b/include/video/sstfb.h | |||
| @@ -156,7 +156,7 @@ | |||
| 156 | #define DAC_READ FBIINIT2 /* in remap mode */ | 156 | #define DAC_READ FBIINIT2 /* in remap mode */ |
| 157 | #define FBIINIT3 0x021c /* fbi controls */ | 157 | #define FBIINIT3 0x021c /* fbi controls */ |
| 158 | # define DISABLE_TEXTURE BIT(6) | 158 | # define DISABLE_TEXTURE BIT(6) |
| 159 | # define Y_SWAP_ORIGIN_SHIFT 22 /* Y swap substraction value */ | 159 | # define Y_SWAP_ORIGIN_SHIFT 22 /* Y swap subtraction value */ |
| 160 | #define HSYNC 0x0220 | 160 | #define HSYNC 0x0220 |
| 161 | #define VSYNC 0x0224 | 161 | #define VSYNC 0x0224 |
| 162 | #define DAC_DATA 0x022c | 162 | #define DAC_DATA 0x022c |
| @@ -212,9 +212,9 @@ | |||
| 212 | # define DACREG_CR0_24BPP 0x50 /* mode 5 */ | 212 | # define DACREG_CR0_24BPP 0x50 /* mode 5 */ |
| 213 | #define DACREG_CR1_I 0x05 | 213 | #define DACREG_CR1_I 0x05 |
| 214 | #define DACREG_CC_I 0x06 | 214 | #define DACREG_CC_I 0x06 |
| 215 | # define DACREG_CC_CLKA BIT(7) /* clk A controled by regs */ | 215 | # define DACREG_CC_CLKA BIT(7) /* clk A controlled by regs */ |
| 216 | # define DACREG_CC_CLKA_C (2<<4) /* clk A uses reg C */ | 216 | # define DACREG_CC_CLKA_C (2<<4) /* clk A uses reg C */ |
| 217 | # define DACREG_CC_CLKB BIT(3) /* clk B controled by regs */ | 217 | # define DACREG_CC_CLKB BIT(3) /* clk B controlled by regs */ |
| 218 | # define DACREG_CC_CLKB_D 3 /* clkB uses reg D */ | 218 | # define DACREG_CC_CLKB_D 3 /* clkB uses reg D */ |
| 219 | #define DACREG_AC0_I 0x48 /* clock A reg C */ | 219 | #define DACREG_AC0_I 0x48 /* clock A reg C */ |
| 220 | #define DACREG_AC1_I 0x49 | 220 | #define DACREG_AC1_I 0x49 |
diff --git a/include/xen/interface/elfnote.h b/include/xen/interface/elfnote.h index 7a8262c375cc..0360b15f4883 100644 --- a/include/xen/interface/elfnote.h +++ b/include/xen/interface/elfnote.h | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | 51 | ||
| 52 | /* | 52 | /* |
| 53 | * The offset of the ELF paddr field from the acutal required | 53 | * The offset of the ELF paddr field from the acutal required |
| 54 | * psuedo-physical address (numeric). | 54 | * pseudo-physical address (numeric). |
| 55 | * | 55 | * |
| 56 | * This is used to maintain backwards compatibility with older kernels | 56 | * This is used to maintain backwards compatibility with older kernels |
| 57 | * which wrote __PAGE_OFFSET into that field. This field defaults to 0 | 57 | * which wrote __PAGE_OFFSET into that field. This field defaults to 0 |
diff --git a/init/do_mounts.c b/init/do_mounts.c index 3e0112157795..c0851a8e030c 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c | |||
| @@ -186,7 +186,7 @@ dev_t name_to_dev_t(char *name) | |||
| 186 | goto done; | 186 | goto done; |
| 187 | 187 | ||
| 188 | /* | 188 | /* |
| 189 | * try non-existant, but valid partition, which may only exist | 189 | * try non-existent, but valid partition, which may only exist |
| 190 | * after revalidating the disk, like partitioned md devices | 190 | * after revalidating the disk, like partitioned md devices |
| 191 | */ | 191 | */ |
| 192 | while (p > s && isdigit(p[-1])) | 192 | while (p > s && isdigit(p[-1])) |
| @@ -704,7 +704,7 @@ long do_msgsnd(int msqid, long mtype, void __user *mtext, | |||
| 704 | msq->q_stime = get_seconds(); | 704 | msq->q_stime = get_seconds(); |
| 705 | 705 | ||
| 706 | if (!pipelined_send(msq, msg)) { | 706 | if (!pipelined_send(msq, msg)) { |
| 707 | /* noone is waiting for this message, enqueue it */ | 707 | /* no one is waiting for this message, enqueue it */ |
| 708 | list_add_tail(&msg->m_list, &msq->q_messages); | 708 | list_add_tail(&msg->m_list, &msq->q_messages); |
| 709 | msq->q_cbytes += msgsz; | 709 | msq->q_cbytes += msgsz; |
| 710 | msq->q_qnum++; | 710 | msq->q_qnum++; |
| @@ -842,7 +842,7 @@ long do_msgrcv(int msqid, long *pmtype, void __user *mtext, | |||
| 842 | * Disable preemption. We don't hold a reference to the queue | 842 | * Disable preemption. We don't hold a reference to the queue |
| 843 | * and getting a reference would defeat the idea of a lockless | 843 | * and getting a reference would defeat the idea of a lockless |
| 844 | * operation, thus the code relies on rcu to guarantee the | 844 | * operation, thus the code relies on rcu to guarantee the |
| 845 | * existance of msq: | 845 | * existence of msq: |
| 846 | * Prior to destruction, expunge_all(-EIRDM) changes r_msg. | 846 | * Prior to destruction, expunge_all(-EIRDM) changes r_msg. |
| 847 | * Thus if r_msg is -EAGAIN, then the queue not yet destroyed. | 847 | * Thus if r_msg is -EAGAIN, then the queue not yet destroyed. |
| 848 | * rcu_read_lock() prevents preemption between reading r_msg | 848 | * rcu_read_lock() prevents preemption between reading r_msg |
| @@ -1362,7 +1362,7 @@ SYSCALL_DEFINE4(semtimedop, int, semid, struct sembuf __user *, tsops, | |||
| 1362 | * semid identifiers are not unique - find_alloc_undo may have | 1362 | * semid identifiers are not unique - find_alloc_undo may have |
| 1363 | * allocated an undo structure, it was invalidated by an RMID | 1363 | * allocated an undo structure, it was invalidated by an RMID |
| 1364 | * and now a new array with received the same id. Check and fail. | 1364 | * and now a new array with received the same id. Check and fail. |
| 1365 | * This case can be detected checking un->semid. The existance of | 1365 | * This case can be detected checking un->semid. The existence of |
| 1366 | * "un" itself is guaranteed by rcu. | 1366 | * "un" itself is guaranteed by rcu. |
| 1367 | */ | 1367 | */ |
| 1368 | error = -EIDRM; | 1368 | error = -EIDRM; |
| @@ -1056,7 +1056,7 @@ SYSCALL_DEFINE1(shmdt, char __user *, shmaddr) | |||
| 1056 | /* | 1056 | /* |
| 1057 | * We need look no further than the maximum address a fragment | 1057 | * We need look no further than the maximum address a fragment |
| 1058 | * could possibly have landed at. Also cast things to loff_t to | 1058 | * could possibly have landed at. Also cast things to loff_t to |
| 1059 | * prevent overflows and make comparisions vs. equal-width types. | 1059 | * prevent overflows and make comparisons vs. equal-width types. |
| 1060 | */ | 1060 | */ |
| 1061 | size = PAGE_ALIGN(size); | 1061 | size = PAGE_ALIGN(size); |
| 1062 | while (vma && (loff_t)(vma->vm_end - addr) <= size) { | 1062 | while (vma && (loff_t)(vma->vm_end - addr) <= size) { |
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c index 37b2bea170c8..e99dda04b126 100644 --- a/kernel/audit_tree.c +++ b/kernel/audit_tree.c | |||
| @@ -607,7 +607,7 @@ void audit_trim_trees(void) | |||
| 607 | spin_lock(&hash_lock); | 607 | spin_lock(&hash_lock); |
| 608 | list_for_each_entry(node, &tree->chunks, list) { | 608 | list_for_each_entry(node, &tree->chunks, list) { |
| 609 | struct audit_chunk *chunk = find_chunk(node); | 609 | struct audit_chunk *chunk = find_chunk(node); |
| 610 | /* this could be NULL if the watch is dieing else where... */ | 610 | /* this could be NULL if the watch is dying else where... */ |
| 611 | struct inode *inode = chunk->mark.i.inode; | 611 | struct inode *inode = chunk->mark.i.inode; |
| 612 | node->index |= 1U<<31; | 612 | node->index |= 1U<<31; |
| 613 | if (iterate_mounts(compare_root, inode, root_mnt)) | 613 | if (iterate_mounts(compare_root, inode, root_mnt)) |
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index f49a0318c2ed..b33513a08beb 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
| @@ -1011,7 +1011,7 @@ static int audit_log_pid_context(struct audit_context *context, pid_t pid, | |||
| 1011 | /* | 1011 | /* |
| 1012 | * to_send and len_sent accounting are very loose estimates. We aren't | 1012 | * to_send and len_sent accounting are very loose estimates. We aren't |
| 1013 | * really worried about a hard cap to MAX_EXECVE_AUDIT_LEN so much as being | 1013 | * really worried about a hard cap to MAX_EXECVE_AUDIT_LEN so much as being |
| 1014 | * within about 500 bytes (next page boundry) | 1014 | * within about 500 bytes (next page boundary) |
| 1015 | * | 1015 | * |
| 1016 | * why snprintf? an int is up to 12 digits long. if we just assumed when | 1016 | * why snprintf? an int is up to 12 digits long. if we just assumed when |
| 1017 | * logging that a[%d]= was going to be 16 characters long we would be wasting | 1017 | * logging that a[%d]= was going to be 16 characters long we would be wasting |
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index e31b220a743d..25c7eb52de1a 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
| @@ -157,7 +157,7 @@ struct css_id { | |||
| 157 | }; | 157 | }; |
| 158 | 158 | ||
| 159 | /* | 159 | /* |
| 160 | * cgroup_event represents events which userspace want to recieve. | 160 | * cgroup_event represents events which userspace want to receive. |
| 161 | */ | 161 | */ |
| 162 | struct cgroup_event { | 162 | struct cgroup_event { |
| 163 | /* | 163 | /* |
diff --git a/kernel/cpu.c b/kernel/cpu.c index c95fc4df0faa..12b7458f23b1 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c | |||
| @@ -126,7 +126,7 @@ static void cpu_hotplug_done(void) | |||
| 126 | #else /* #if CONFIG_HOTPLUG_CPU */ | 126 | #else /* #if CONFIG_HOTPLUG_CPU */ |
| 127 | static void cpu_hotplug_begin(void) {} | 127 | static void cpu_hotplug_begin(void) {} |
| 128 | static void cpu_hotplug_done(void) {} | 128 | static void cpu_hotplug_done(void) {} |
| 129 | #endif /* #esle #if CONFIG_HOTPLUG_CPU */ | 129 | #endif /* #else #if CONFIG_HOTPLUG_CPU */ |
| 130 | 130 | ||
| 131 | /* Need to know about CPUs going up/down? */ | 131 | /* Need to know about CPUs going up/down? */ |
| 132 | int __ref register_cpu_notifier(struct notifier_block *nb) | 132 | int __ref register_cpu_notifier(struct notifier_block *nb) |
diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c index cefd4a11f6d9..bad6786dee88 100644 --- a/kernel/debug/debug_core.c +++ b/kernel/debug/debug_core.c | |||
| @@ -538,7 +538,7 @@ return_normal: | |||
| 538 | 538 | ||
| 539 | /* | 539 | /* |
| 540 | * For single stepping, try to only enter on the processor | 540 | * For single stepping, try to only enter on the processor |
| 541 | * that was single stepping. To gaurd against a deadlock, the | 541 | * that was single stepping. To guard against a deadlock, the |
| 542 | * kernel will only try for the value of sstep_tries before | 542 | * kernel will only try for the value of sstep_tries before |
| 543 | * giving up and continuing on. | 543 | * giving up and continuing on. |
| 544 | */ | 544 | */ |
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c index 6bc6e3bc4f9c..be14779bcef6 100644 --- a/kernel/debug/kdb/kdb_main.c +++ b/kernel/debug/kdb/kdb_main.c | |||
| @@ -441,9 +441,9 @@ static int kdb_check_regs(void) | |||
| 441 | * symbol name, and offset to the caller. | 441 | * symbol name, and offset to the caller. |
| 442 | * | 442 | * |
| 443 | * The argument may consist of a numeric value (decimal or | 443 | * The argument may consist of a numeric value (decimal or |
| 444 | * hexidecimal), a symbol name, a register name (preceeded by the | 444 | * hexidecimal), a symbol name, a register name (preceded by the |
| 445 | * percent sign), an environment variable with a numeric value | 445 | * percent sign), an environment variable with a numeric value |
| 446 | * (preceeded by a dollar sign) or a simple arithmetic expression | 446 | * (preceded by a dollar sign) or a simple arithmetic expression |
| 447 | * consisting of a symbol name, +/-, and a numeric constant value | 447 | * consisting of a symbol name, +/-, and a numeric constant value |
| 448 | * (offset). | 448 | * (offset). |
| 449 | * Parameters: | 449 | * Parameters: |
| @@ -1335,7 +1335,7 @@ void kdb_print_state(const char *text, int value) | |||
| 1335 | * error The hardware-defined error code | 1335 | * error The hardware-defined error code |
| 1336 | * reason2 kdb's current reason code. | 1336 | * reason2 kdb's current reason code. |
| 1337 | * Initially error but can change | 1337 | * Initially error but can change |
| 1338 | * acording to kdb state. | 1338 | * according to kdb state. |
| 1339 | * db_result Result code from break or debug point. | 1339 | * db_result Result code from break or debug point. |
| 1340 | * regs The exception frame at time of fault/breakpoint. | 1340 | * regs The exception frame at time of fault/breakpoint. |
| 1341 | * should always be valid. | 1341 | * should always be valid. |
diff --git a/kernel/debug/kdb/kdb_support.c b/kernel/debug/kdb/kdb_support.c index 6b2485dcb050..5532dd37aa86 100644 --- a/kernel/debug/kdb/kdb_support.c +++ b/kernel/debug/kdb/kdb_support.c | |||
| @@ -545,7 +545,7 @@ int kdb_putword(unsigned long addr, unsigned long word, size_t size) | |||
| 545 | * Mask for process state. | 545 | * Mask for process state. |
| 546 | * Notes: | 546 | * Notes: |
| 547 | * The mask folds data from several sources into a single long value, so | 547 | * The mask folds data from several sources into a single long value, so |
| 548 | * be carefull not to overlap the bits. TASK_* bits are in the LSB, | 548 | * be careful not to overlap the bits. TASK_* bits are in the LSB, |
| 549 | * special cases like UNRUNNABLE are in the MSB. As of 2.6.10-rc1 there | 549 | * special cases like UNRUNNABLE are in the MSB. As of 2.6.10-rc1 there |
| 550 | * is no overlap between TASK_* and EXIT_* but that may not always be | 550 | * is no overlap between TASK_* and EXIT_* but that may not always be |
| 551 | * true, so EXIT_* bits are shifted left 16 bits before being stored in | 551 | * true, so EXIT_* bits are shifted left 16 bits before being stored in |
diff --git a/kernel/exit.c b/kernel/exit.c index 6a488ad2dce5..f5d2f63bae0b 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
| @@ -841,7 +841,7 @@ static void exit_notify(struct task_struct *tsk, int group_dead) | |||
| 841 | /* Let father know we died | 841 | /* Let father know we died |
| 842 | * | 842 | * |
| 843 | * Thread signals are configurable, but you aren't going to use | 843 | * Thread signals are configurable, but you aren't going to use |
| 844 | * that to send signals to arbitary processes. | 844 | * that to send signals to arbitrary processes. |
| 845 | * That stops right now. | 845 | * That stops right now. |
| 846 | * | 846 | * |
| 847 | * If the parent exec id doesn't match the exec id we saved | 847 | * If the parent exec id doesn't match the exec id we saved |
diff --git a/kernel/futex.c b/kernel/futex.c index dfb924ffe65b..fe28dc282eae 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
| @@ -1886,7 +1886,7 @@ retry: | |||
| 1886 | restart->futex.val = val; | 1886 | restart->futex.val = val; |
| 1887 | restart->futex.time = abs_time->tv64; | 1887 | restart->futex.time = abs_time->tv64; |
| 1888 | restart->futex.bitset = bitset; | 1888 | restart->futex.bitset = bitset; |
| 1889 | restart->futex.flags = flags; | 1889 | restart->futex.flags = flags | FLAGS_HAS_TIMEOUT; |
| 1890 | 1890 | ||
| 1891 | ret = -ERESTART_RESTARTBLOCK; | 1891 | ret = -ERESTART_RESTARTBLOCK; |
| 1892 | 1892 | ||
diff --git a/kernel/irq/Kconfig b/kernel/irq/Kconfig index a69c333f78e4..c574f9a12c48 100644 --- a/kernel/irq/Kconfig +++ b/kernel/irq/Kconfig | |||
| @@ -10,9 +10,6 @@ menu "IRQ subsystem" | |||
| 10 | config GENERIC_HARDIRQS | 10 | config GENERIC_HARDIRQS |
| 11 | def_bool y | 11 | def_bool y |
| 12 | 12 | ||
| 13 | config GENERIC_HARDIRQS_NO_COMPAT | ||
| 14 | bool | ||
| 15 | |||
| 16 | # Options selectable by the architecture code | 13 | # Options selectable by the architecture code |
| 17 | 14 | ||
| 18 | # Make sparse irq Kconfig switch below available | 15 | # Make sparse irq Kconfig switch below available |
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 616ec1c6b06f..4af1e2b244cb 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
| @@ -415,7 +415,7 @@ out: | |||
| 415 | * @desc: the interrupt description structure for this irq | 415 | * @desc: the interrupt description structure for this irq |
| 416 | * | 416 | * |
| 417 | * Interrupt occures on the falling and/or rising edge of a hardware | 417 | * Interrupt occures on the falling and/or rising edge of a hardware |
| 418 | * signal. The occurence is latched into the irq controller hardware | 418 | * signal. The occurrence is latched into the irq controller hardware |
| 419 | * and must be acked in order to be reenabled. After the ack another | 419 | * and must be acked in order to be reenabled. After the ack another |
| 420 | * interrupt can happen on the same source even before the first one | 420 | * interrupt can happen on the same source even before the first one |
| 421 | * is handled by the associated event handler. If this happens it | 421 | * is handled by the associated event handler. If this happens it |
| @@ -514,7 +514,7 @@ void handle_edge_eoi_irq(unsigned int irq, struct irq_desc *desc) | |||
| 514 | } while ((desc->istate & IRQS_PENDING) && | 514 | } while ((desc->istate & IRQS_PENDING) && |
| 515 | !irqd_irq_disabled(&desc->irq_data)); | 515 | !irqd_irq_disabled(&desc->irq_data)); |
| 516 | 516 | ||
| 517 | out_unlock: | 517 | out_eoi: |
| 518 | chip->irq_eoi(&desc->irq_data); | 518 | chip->irq_eoi(&desc->irq_data); |
| 519 | raw_spin_unlock(&desc->lock); | 519 | raw_spin_unlock(&desc->lock); |
| 520 | } | 520 | } |
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 12a80fdae11c..07c1611f3899 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
| @@ -1051,6 +1051,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) | |||
| 1051 | register_irq_proc(irq, desc); | 1051 | register_irq_proc(irq, desc); |
| 1052 | new->dir = NULL; | 1052 | new->dir = NULL; |
| 1053 | register_handler_proc(irq, new); | 1053 | register_handler_proc(irq, new); |
| 1054 | free_cpumask_var(mask); | ||
| 1054 | 1055 | ||
| 1055 | return 0; | 1056 | return 0; |
| 1056 | 1057 | ||
diff --git a/kernel/irq/migration.c b/kernel/irq/migration.c index bc6194698dfd..47420908fba0 100644 --- a/kernel/irq/migration.c +++ b/kernel/irq/migration.c | |||
| @@ -35,7 +35,7 @@ void irq_move_masked_irq(struct irq_data *idata) | |||
| 35 | * do the disable, re-program, enable sequence. | 35 | * do the disable, re-program, enable sequence. |
| 36 | * This is *not* particularly important for level triggered | 36 | * This is *not* particularly important for level triggered |
| 37 | * but in a edge trigger case, we might be setting rte | 37 | * but in a edge trigger case, we might be setting rte |
| 38 | * when an active trigger is comming in. This could | 38 | * when an active trigger is coming in. This could |
| 39 | * cause some ioapics to mal-function. | 39 | * cause some ioapics to mal-function. |
| 40 | * Being paranoid i guess! | 40 | * Being paranoid i guess! |
| 41 | * | 41 | * |
diff --git a/kernel/kexec.c b/kernel/kexec.c index ec19b92c7ebd..55936f9cb251 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c | |||
| @@ -144,7 +144,7 @@ static int do_kimage_alloc(struct kimage **rimage, unsigned long entry, | |||
| 144 | /* Initialize the list of destination pages */ | 144 | /* Initialize the list of destination pages */ |
| 145 | INIT_LIST_HEAD(&image->dest_pages); | 145 | INIT_LIST_HEAD(&image->dest_pages); |
| 146 | 146 | ||
| 147 | /* Initialize the list of unuseable pages */ | 147 | /* Initialize the list of unusable pages */ |
| 148 | INIT_LIST_HEAD(&image->unuseable_pages); | 148 | INIT_LIST_HEAD(&image->unuseable_pages); |
| 149 | 149 | ||
| 150 | /* Read in the segments */ | 150 | /* Read in the segments */ |
| @@ -454,7 +454,7 @@ static struct page *kimage_alloc_normal_control_pages(struct kimage *image, | |||
| 454 | /* Deal with the destination pages I have inadvertently allocated. | 454 | /* Deal with the destination pages I have inadvertently allocated. |
| 455 | * | 455 | * |
| 456 | * Ideally I would convert multi-page allocations into single | 456 | * Ideally I would convert multi-page allocations into single |
| 457 | * page allocations, and add everyting to image->dest_pages. | 457 | * page allocations, and add everything to image->dest_pages. |
| 458 | * | 458 | * |
| 459 | * For now it is simpler to just free the pages. | 459 | * For now it is simpler to just free the pages. |
| 460 | */ | 460 | */ |
| @@ -602,7 +602,7 @@ static void kimage_free_extra_pages(struct kimage *image) | |||
| 602 | /* Walk through and free any extra destination pages I may have */ | 602 | /* Walk through and free any extra destination pages I may have */ |
| 603 | kimage_free_page_list(&image->dest_pages); | 603 | kimage_free_page_list(&image->dest_pages); |
| 604 | 604 | ||
| 605 | /* Walk through and free any unuseable pages I have cached */ | 605 | /* Walk through and free any unusable pages I have cached */ |
| 606 | kimage_free_page_list(&image->unuseable_pages); | 606 | kimage_free_page_list(&image->unuseable_pages); |
| 607 | 607 | ||
| 608 | } | 608 | } |
| @@ -1099,7 +1099,8 @@ size_t crash_get_memory_size(void) | |||
| 1099 | return size; | 1099 | return size; |
| 1100 | } | 1100 | } |
| 1101 | 1101 | ||
| 1102 | static void free_reserved_phys_range(unsigned long begin, unsigned long end) | 1102 | void __weak crash_free_reserved_phys_range(unsigned long begin, |
| 1103 | unsigned long end) | ||
| 1103 | { | 1104 | { |
| 1104 | unsigned long addr; | 1105 | unsigned long addr; |
| 1105 | 1106 | ||
| @@ -1135,7 +1136,7 @@ int crash_shrink_memory(unsigned long new_size) | |||
| 1135 | start = roundup(start, PAGE_SIZE); | 1136 | start = roundup(start, PAGE_SIZE); |
| 1136 | end = roundup(start + new_size, PAGE_SIZE); | 1137 | end = roundup(start + new_size, PAGE_SIZE); |
| 1137 | 1138 | ||
| 1138 | free_reserved_phys_range(end, crashk_res.end); | 1139 | crash_free_reserved_phys_range(end, crashk_res.end); |
| 1139 | 1140 | ||
| 1140 | if ((start == end) && (crashk_res.parent != NULL)) | 1141 | if ((start == end) && (crashk_res.parent != NULL)) |
| 1141 | release_resource(&crashk_res); | 1142 | release_resource(&crashk_res); |
diff --git a/kernel/kthread.c b/kernel/kthread.c index 684ab3f7dd72..3b34d2732bce 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c | |||
| @@ -139,7 +139,7 @@ static void create_kthread(struct kthread_create_info *create) | |||
| 139 | * in @node, to get NUMA affinity for kthread stack, or else give -1. | 139 | * in @node, to get NUMA affinity for kthread stack, or else give -1. |
| 140 | * When woken, the thread will run @threadfn() with @data as its | 140 | * When woken, the thread will run @threadfn() with @data as its |
| 141 | * argument. @threadfn() can either call do_exit() directly if it is a | 141 | * argument. @threadfn() can either call do_exit() directly if it is a |
| 142 | * standalone thread for which noone will call kthread_stop(), or | 142 | * standalone thread for which no one will call kthread_stop(), or |
| 143 | * return when 'kthread_should_stop()' is true (which means | 143 | * return when 'kthread_should_stop()' is true (which means |
| 144 | * kthread_stop() has been called). The return value should be zero | 144 | * kthread_stop() has been called). The return value should be zero |
| 145 | * or a negative error number; it will be passed to kthread_stop(). | 145 | * or a negative error number; it will be passed to kthread_stop(). |
diff --git a/kernel/latencytop.c b/kernel/latencytop.c index ee74b35e528d..376066e10413 100644 --- a/kernel/latencytop.c +++ b/kernel/latencytop.c | |||
| @@ -153,7 +153,7 @@ static inline void store_stacktrace(struct task_struct *tsk, | |||
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | /** | 155 | /** |
| 156 | * __account_scheduler_latency - record an occured latency | 156 | * __account_scheduler_latency - record an occurred latency |
| 157 | * @tsk - the task struct of the task hitting the latency | 157 | * @tsk - the task struct of the task hitting the latency |
| 158 | * @usecs - the duration of the latency in microseconds | 158 | * @usecs - the duration of the latency in microseconds |
| 159 | * @inter - 1 if the sleep was interruptible, 0 if uninterruptible | 159 | * @inter - 1 if the sleep was interruptible, 0 if uninterruptible |
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 0d2058da80f5..53a68956f131 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c | |||
| @@ -2309,7 +2309,7 @@ void trace_hardirqs_on_caller(unsigned long ip) | |||
| 2309 | if (unlikely(curr->hardirqs_enabled)) { | 2309 | if (unlikely(curr->hardirqs_enabled)) { |
| 2310 | /* | 2310 | /* |
| 2311 | * Neither irq nor preemption are disabled here | 2311 | * Neither irq nor preemption are disabled here |
| 2312 | * so this is racy by nature but loosing one hit | 2312 | * so this is racy by nature but losing one hit |
| 2313 | * in a stat is not a big deal. | 2313 | * in a stat is not a big deal. |
| 2314 | */ | 2314 | */ |
| 2315 | __debug_atomic_inc(redundant_hardirqs_on); | 2315 | __debug_atomic_inc(redundant_hardirqs_on); |
| @@ -2620,7 +2620,7 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this, | |||
| 2620 | if (!graph_lock()) | 2620 | if (!graph_lock()) |
| 2621 | return 0; | 2621 | return 0; |
| 2622 | /* | 2622 | /* |
| 2623 | * Make sure we didnt race: | 2623 | * Make sure we didn't race: |
| 2624 | */ | 2624 | */ |
| 2625 | if (unlikely(hlock_class(this)->usage_mask & new_mask)) { | 2625 | if (unlikely(hlock_class(this)->usage_mask & new_mask)) { |
| 2626 | graph_unlock(); | 2626 | graph_unlock(); |
diff --git a/kernel/module.c b/kernel/module.c index 1f9f7bc56ca1..d5938a5c19c4 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
| @@ -809,7 +809,7 @@ SYSCALL_DEFINE2(delete_module, const char __user *, name_user, | |||
| 809 | wait_for_zero_refcount(mod); | 809 | wait_for_zero_refcount(mod); |
| 810 | 810 | ||
| 811 | mutex_unlock(&module_mutex); | 811 | mutex_unlock(&module_mutex); |
| 812 | /* Final destruction now noone is using it. */ | 812 | /* Final destruction now no one is using it. */ |
| 813 | if (mod->exit != NULL) | 813 | if (mod->exit != NULL) |
| 814 | mod->exit(); | 814 | mod->exit(); |
| 815 | blocking_notifier_call_chain(&module_notify_list, | 815 | blocking_notifier_call_chain(&module_notify_list, |
| @@ -2777,7 +2777,7 @@ static struct module *load_module(void __user *umod, | |||
| 2777 | mod->state = MODULE_STATE_COMING; | 2777 | mod->state = MODULE_STATE_COMING; |
| 2778 | 2778 | ||
| 2779 | /* Now sew it into the lists so we can get lockdep and oops | 2779 | /* Now sew it into the lists so we can get lockdep and oops |
| 2780 | * info during argument parsing. Noone should access us, since | 2780 | * info during argument parsing. No one should access us, since |
| 2781 | * strong_try_module_get() will fail. | 2781 | * strong_try_module_get() will fail. |
| 2782 | * lockdep/oops can run asynchronous, so use the RCU list insertion | 2782 | * lockdep/oops can run asynchronous, so use the RCU list insertion |
| 2783 | * function to insert in a way safe to concurrent readers. | 2783 | * function to insert in a way safe to concurrent readers. |
| @@ -2971,7 +2971,7 @@ static const char *get_ksymbol(struct module *mod, | |||
| 2971 | else | 2971 | else |
| 2972 | nextval = (unsigned long)mod->module_core+mod->core_text_size; | 2972 | nextval = (unsigned long)mod->module_core+mod->core_text_size; |
| 2973 | 2973 | ||
| 2974 | /* Scan for closest preceeding symbol, and next symbol. (ELF | 2974 | /* Scan for closest preceding symbol, and next symbol. (ELF |
| 2975 | starts real symbols at 1). */ | 2975 | starts real symbols at 1). */ |
| 2976 | for (i = 1; i < mod->num_symtab; i++) { | 2976 | for (i = 1; i < mod->num_symtab; i++) { |
| 2977 | if (mod->symtab[i].st_shndx == SHN_UNDEF) | 2977 | if (mod->symtab[i].st_shndx == SHN_UNDEF) |
diff --git a/kernel/mutex.c b/kernel/mutex.c index a5889fb28ecf..c4195fa98900 100644 --- a/kernel/mutex.c +++ b/kernel/mutex.c | |||
| @@ -245,7 +245,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass, | |||
| 245 | } | 245 | } |
| 246 | __set_task_state(task, state); | 246 | __set_task_state(task, state); |
| 247 | 247 | ||
| 248 | /* didnt get the lock, go to sleep: */ | 248 | /* didn't get the lock, go to sleep: */ |
| 249 | spin_unlock_mutex(&lock->wait_lock, flags); | 249 | spin_unlock_mutex(&lock->wait_lock, flags); |
| 250 | preempt_enable_no_resched(); | 250 | preempt_enable_no_resched(); |
| 251 | schedule(); | 251 | schedule(); |
diff --git a/kernel/padata.c b/kernel/padata.c index 751019415d23..b91941df5e63 100644 --- a/kernel/padata.c +++ b/kernel/padata.c | |||
| @@ -262,7 +262,7 @@ static void padata_reorder(struct parallel_data *pd) | |||
| 262 | /* | 262 | /* |
| 263 | * This cpu has to do the parallel processing of the next | 263 | * This cpu has to do the parallel processing of the next |
| 264 | * object. It's waiting in the cpu's parallelization queue, | 264 | * object. It's waiting in the cpu's parallelization queue, |
| 265 | * so exit imediately. | 265 | * so exit immediately. |
| 266 | */ | 266 | */ |
| 267 | if (PTR_ERR(padata) == -ENODATA) { | 267 | if (PTR_ERR(padata) == -ENODATA) { |
| 268 | del_timer(&pd->timer); | 268 | del_timer(&pd->timer); |
| @@ -284,7 +284,7 @@ static void padata_reorder(struct parallel_data *pd) | |||
| 284 | /* | 284 | /* |
| 285 | * The next object that needs serialization might have arrived to | 285 | * The next object that needs serialization might have arrived to |
| 286 | * the reorder queues in the meantime, we will be called again | 286 | * the reorder queues in the meantime, we will be called again |
| 287 | * from the timer function if noone else cares for it. | 287 | * from the timer function if no one else cares for it. |
| 288 | */ | 288 | */ |
| 289 | if (atomic_read(&pd->reorder_objects) | 289 | if (atomic_read(&pd->reorder_objects) |
| 290 | && !(pinst->flags & PADATA_RESET)) | 290 | && !(pinst->flags & PADATA_RESET)) |
| @@ -515,7 +515,7 @@ static void __padata_stop(struct padata_instance *pinst) | |||
| 515 | put_online_cpus(); | 515 | put_online_cpus(); |
| 516 | } | 516 | } |
| 517 | 517 | ||
| 518 | /* Replace the internal control stucture with a new one. */ | 518 | /* Replace the internal control structure with a new one. */ |
| 519 | static void padata_replace(struct padata_instance *pinst, | 519 | static void padata_replace(struct padata_instance *pinst, |
| 520 | struct parallel_data *pd_new) | 520 | struct parallel_data *pd_new) |
| 521 | { | 521 | { |
| @@ -768,7 +768,7 @@ static int __padata_remove_cpu(struct padata_instance *pinst, int cpu) | |||
| 768 | } | 768 | } |
| 769 | 769 | ||
| 770 | /** | 770 | /** |
| 771 | * padata_remove_cpu - remove a cpu from the one or both(serial and paralell) | 771 | * padata_remove_cpu - remove a cpu from the one or both(serial and parallel) |
| 772 | * padata cpumasks. | 772 | * padata cpumasks. |
| 773 | * | 773 | * |
| 774 | * @pinst: padata instance | 774 | * @pinst: padata instance |
diff --git a/kernel/params.c b/kernel/params.c index 0da1411222b9..7ab388a48a2e 100644 --- a/kernel/params.c +++ b/kernel/params.c | |||
| @@ -95,7 +95,7 @@ static int parse_one(char *param, | |||
| 95 | /* Find parameter */ | 95 | /* Find parameter */ |
| 96 | for (i = 0; i < num_params; i++) { | 96 | for (i = 0; i < num_params; i++) { |
| 97 | if (parameq(param, params[i].name)) { | 97 | if (parameq(param, params[i].name)) { |
| 98 | /* Noone handled NULL, so do it here. */ | 98 | /* No one handled NULL, so do it here. */ |
| 99 | if (!val && params[i].ops->set != param_set_bool) | 99 | if (!val && params[i].ops->set != param_set_bool) |
| 100 | return -EINVAL; | 100 | return -EINVAL; |
| 101 | DEBUGP("They are equal! Calling %p\n", | 101 | DEBUGP("They are equal! Calling %p\n", |
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index c75925c4d1e2..8e81a9860a0d 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
| @@ -145,8 +145,8 @@ static struct srcu_struct pmus_srcu; | |||
| 145 | */ | 145 | */ |
| 146 | int sysctl_perf_event_paranoid __read_mostly = 1; | 146 | int sysctl_perf_event_paranoid __read_mostly = 1; |
| 147 | 147 | ||
| 148 | /* Minimum for 128 pages + 1 for the user control page */ | 148 | /* Minimum for 512 kiB + 1 user control page */ |
| 149 | int sysctl_perf_event_mlock __read_mostly = 516; /* 'free' kb per user */ | 149 | int sysctl_perf_event_mlock __read_mostly = 512 + (PAGE_SIZE / 1024); /* 'free' kiB per user */ |
| 150 | 150 | ||
| 151 | /* | 151 | /* |
| 152 | * max perf event sample rate | 152 | * max perf event sample rate |
| @@ -364,6 +364,7 @@ void perf_cgroup_switch(struct task_struct *task, int mode) | |||
| 364 | } | 364 | } |
| 365 | 365 | ||
| 366 | if (mode & PERF_CGROUP_SWIN) { | 366 | if (mode & PERF_CGROUP_SWIN) { |
| 367 | WARN_ON_ONCE(cpuctx->cgrp); | ||
| 367 | /* set cgrp before ctxsw in to | 368 | /* set cgrp before ctxsw in to |
| 368 | * allow event_filter_match() to not | 369 | * allow event_filter_match() to not |
| 369 | * have to pass task around | 370 | * have to pass task around |
| @@ -2423,6 +2424,14 @@ static void perf_event_enable_on_exec(struct perf_event_context *ctx) | |||
| 2423 | if (!ctx || !ctx->nr_events) | 2424 | if (!ctx || !ctx->nr_events) |
| 2424 | goto out; | 2425 | goto out; |
| 2425 | 2426 | ||
| 2427 | /* | ||
| 2428 | * We must ctxsw out cgroup events to avoid conflict | ||
| 2429 | * when invoking perf_task_event_sched_in() later on | ||
| 2430 | * in this function. Otherwise we end up trying to | ||
| 2431 | * ctxswin cgroup events which are already scheduled | ||
| 2432 | * in. | ||
| 2433 | */ | ||
| 2434 | perf_cgroup_sched_out(current); | ||
| 2426 | task_ctx_sched_out(ctx, EVENT_ALL); | 2435 | task_ctx_sched_out(ctx, EVENT_ALL); |
| 2427 | 2436 | ||
| 2428 | raw_spin_lock(&ctx->lock); | 2437 | raw_spin_lock(&ctx->lock); |
| @@ -2447,6 +2456,9 @@ static void perf_event_enable_on_exec(struct perf_event_context *ctx) | |||
| 2447 | 2456 | ||
| 2448 | raw_spin_unlock(&ctx->lock); | 2457 | raw_spin_unlock(&ctx->lock); |
| 2449 | 2458 | ||
| 2459 | /* | ||
| 2460 | * Also calls ctxswin for cgroup events, if any: | ||
| 2461 | */ | ||
| 2450 | perf_event_context_sched_in(ctx, ctx->task); | 2462 | perf_event_context_sched_in(ctx, ctx->task); |
| 2451 | out: | 2463 | out: |
| 2452 | local_irq_restore(flags); | 2464 | local_irq_restore(flags); |
| @@ -6531,6 +6543,11 @@ SYSCALL_DEFINE5(perf_event_open, | |||
| 6531 | goto err_alloc; | 6543 | goto err_alloc; |
| 6532 | } | 6544 | } |
| 6533 | 6545 | ||
| 6546 | if (task) { | ||
| 6547 | put_task_struct(task); | ||
| 6548 | task = NULL; | ||
| 6549 | } | ||
| 6550 | |||
| 6534 | /* | 6551 | /* |
| 6535 | * Look up the group leader (we will attach this event to it): | 6552 | * Look up the group leader (we will attach this event to it): |
| 6536 | */ | 6553 | */ |
diff --git a/kernel/pid.c b/kernel/pid.c index 02f221274265..57a8346a270e 100644 --- a/kernel/pid.c +++ b/kernel/pid.c | |||
| @@ -217,11 +217,14 @@ static int alloc_pidmap(struct pid_namespace *pid_ns) | |||
| 217 | return -1; | 217 | return -1; |
| 218 | } | 218 | } |
| 219 | 219 | ||
| 220 | int next_pidmap(struct pid_namespace *pid_ns, int last) | 220 | int next_pidmap(struct pid_namespace *pid_ns, unsigned int last) |
| 221 | { | 221 | { |
| 222 | int offset; | 222 | int offset; |
| 223 | struct pidmap *map, *end; | 223 | struct pidmap *map, *end; |
| 224 | 224 | ||
| 225 | if (last >= PID_MAX_LIMIT) | ||
| 226 | return -1; | ||
| 227 | |||
| 225 | offset = (last + 1) & BITS_PER_PAGE_MASK; | 228 | offset = (last + 1) & BITS_PER_PAGE_MASK; |
| 226 | map = &pid_ns->pidmap[(last + 1)/BITS_PER_PAGE]; | 229 | map = &pid_ns->pidmap[(last + 1)/BITS_PER_PAGE]; |
| 227 | end = &pid_ns->pidmap[PIDMAP_ENTRIES]; | 230 | end = &pid_ns->pidmap[PIDMAP_ENTRIES]; |
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c index 67fea9d25d55..0791b13df7bf 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c | |||
| @@ -1347,7 +1347,7 @@ void run_posix_cpu_timers(struct task_struct *tsk) | |||
| 1347 | 1347 | ||
| 1348 | /* | 1348 | /* |
| 1349 | * Now that all the timers on our list have the firing flag, | 1349 | * Now that all the timers on our list have the firing flag, |
| 1350 | * noone will touch their list entries but us. We'll take | 1350 | * no one will touch their list entries but us. We'll take |
| 1351 | * each timer's lock before clearing its firing flag, so no | 1351 | * each timer's lock before clearing its firing flag, so no |
| 1352 | * timer call will interfere. | 1352 | * timer call will interfere. |
| 1353 | */ | 1353 | */ |
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c index 4c0124919f9a..e5498d7405c3 100644 --- a/kernel/posix-timers.c +++ b/kernel/posix-timers.c | |||
| @@ -313,7 +313,7 @@ static void schedule_next_timer(struct k_itimer *timr) | |||
| 313 | * restarted (i.e. we have flagged this in the sys_private entry of the | 313 | * restarted (i.e. we have flagged this in the sys_private entry of the |
| 314 | * info block). | 314 | * info block). |
| 315 | * | 315 | * |
| 316 | * To protect aginst the timer going away while the interrupt is queued, | 316 | * To protect against the timer going away while the interrupt is queued, |
| 317 | * we require that the it_requeue_pending flag be set. | 317 | * we require that the it_requeue_pending flag be set. |
| 318 | */ | 318 | */ |
| 319 | void do_schedule_next_timer(struct siginfo *info) | 319 | void do_schedule_next_timer(struct siginfo *info) |
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig index 4603f08dc47b..6de9a8fc3417 100644 --- a/kernel/power/Kconfig +++ b/kernel/power/Kconfig | |||
| @@ -18,9 +18,13 @@ config SUSPEND_FREEZER | |||
| 18 | 18 | ||
| 19 | Turning OFF this setting is NOT recommended! If in doubt, say Y. | 19 | Turning OFF this setting is NOT recommended! If in doubt, say Y. |
| 20 | 20 | ||
| 21 | config HIBERNATE_CALLBACKS | ||
| 22 | bool | ||
| 23 | |||
| 21 | config HIBERNATION | 24 | config HIBERNATION |
| 22 | bool "Hibernation (aka 'suspend to disk')" | 25 | bool "Hibernation (aka 'suspend to disk')" |
| 23 | depends on SWAP && ARCH_HIBERNATION_POSSIBLE | 26 | depends on SWAP && ARCH_HIBERNATION_POSSIBLE |
| 27 | select HIBERNATE_CALLBACKS | ||
| 24 | select LZO_COMPRESS | 28 | select LZO_COMPRESS |
| 25 | select LZO_DECOMPRESS | 29 | select LZO_DECOMPRESS |
| 26 | ---help--- | 30 | ---help--- |
| @@ -85,7 +89,7 @@ config PM_STD_PARTITION | |||
| 85 | 89 | ||
| 86 | config PM_SLEEP | 90 | config PM_SLEEP |
| 87 | def_bool y | 91 | def_bool y |
| 88 | depends on SUSPEND || HIBERNATION || XEN_SAVE_RESTORE | 92 | depends on SUSPEND || HIBERNATE_CALLBACKS |
| 89 | 93 | ||
| 90 | config PM_SLEEP_SMP | 94 | config PM_SLEEP_SMP |
| 91 | def_bool y | 95 | def_bool y |
diff --git a/kernel/power/main.c b/kernel/power/main.c index 8eaba5f27b10..de9aef8742f4 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c | |||
| @@ -224,7 +224,7 @@ power_attr(state); | |||
| 224 | * writing to 'state'. It first should read from 'wakeup_count' and store | 224 | * writing to 'state'. It first should read from 'wakeup_count' and store |
| 225 | * the read value. Then, after carrying out its own preparations for the system | 225 | * the read value. Then, after carrying out its own preparations for the system |
| 226 | * transition to a sleep state, it should write the stored value to | 226 | * transition to a sleep state, it should write the stored value to |
| 227 | * 'wakeup_count'. If that fails, at least one wakeup event has occured since | 227 | * 'wakeup_count'. If that fails, at least one wakeup event has occurred since |
| 228 | * 'wakeup_count' was read and 'state' should not be written to. Otherwise, it | 228 | * 'wakeup_count' was read and 'state' should not be written to. Otherwise, it |
| 229 | * is allowed to write to 'state', but the transition will be aborted if there | 229 | * is allowed to write to 'state', but the transition will be aborted if there |
| 230 | * are any wakeup events detected after 'wakeup_count' was written to. | 230 | * are any wakeup events detected after 'wakeup_count' was written to. |
diff --git a/kernel/sched.c b/kernel/sched.c index f592ce6f8616..312f8b95c2d4 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
| @@ -2309,7 +2309,7 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state) | |||
| 2309 | * Cause a process which is running on another CPU to enter | 2309 | * Cause a process which is running on another CPU to enter |
| 2310 | * kernel-mode, without any delay. (to get signals handled.) | 2310 | * kernel-mode, without any delay. (to get signals handled.) |
| 2311 | * | 2311 | * |
| 2312 | * NOTE: this function doesnt have to take the runqueue lock, | 2312 | * NOTE: this function doesn't have to take the runqueue lock, |
| 2313 | * because all it wants to ensure is that the remote task enters | 2313 | * because all it wants to ensure is that the remote task enters |
| 2314 | * the kernel. If the IPI races and the task has been migrated | 2314 | * the kernel. If the IPI races and the task has been migrated |
| 2315 | * to another CPU then no harm is done and the purpose has been | 2315 | * to another CPU then no harm is done and the purpose has been |
| @@ -4111,20 +4111,20 @@ need_resched: | |||
| 4111 | try_to_wake_up_local(to_wakeup); | 4111 | try_to_wake_up_local(to_wakeup); |
| 4112 | } | 4112 | } |
| 4113 | deactivate_task(rq, prev, DEQUEUE_SLEEP); | 4113 | deactivate_task(rq, prev, DEQUEUE_SLEEP); |
| 4114 | |||
| 4115 | /* | ||
| 4116 | * If we are going to sleep and we have plugged IO queued, make | ||
| 4117 | * sure to submit it to avoid deadlocks. | ||
| 4118 | */ | ||
| 4119 | if (blk_needs_flush_plug(prev)) { | ||
| 4120 | raw_spin_unlock(&rq->lock); | ||
| 4121 | blk_schedule_flush_plug(prev); | ||
| 4122 | raw_spin_lock(&rq->lock); | ||
| 4123 | } | ||
| 4114 | } | 4124 | } |
| 4115 | switch_count = &prev->nvcsw; | 4125 | switch_count = &prev->nvcsw; |
| 4116 | } | 4126 | } |
| 4117 | 4127 | ||
| 4118 | /* | ||
| 4119 | * If we are going to sleep and we have plugged IO queued, make | ||
| 4120 | * sure to submit it to avoid deadlocks. | ||
| 4121 | */ | ||
| 4122 | if (prev->state != TASK_RUNNING && blk_needs_flush_plug(prev)) { | ||
| 4123 | raw_spin_unlock(&rq->lock); | ||
| 4124 | blk_flush_plug(prev); | ||
| 4125 | raw_spin_lock(&rq->lock); | ||
| 4126 | } | ||
| 4127 | |||
| 4128 | pre_schedule(rq, prev); | 4128 | pre_schedule(rq, prev); |
| 4129 | 4129 | ||
| 4130 | if (unlikely(!rq->nr_running)) | 4130 | if (unlikely(!rq->nr_running)) |
| @@ -4997,7 +4997,7 @@ recheck: | |||
| 4997 | */ | 4997 | */ |
| 4998 | raw_spin_lock_irqsave(&p->pi_lock, flags); | 4998 | raw_spin_lock_irqsave(&p->pi_lock, flags); |
| 4999 | /* | 4999 | /* |
| 5000 | * To be able to change p->policy safely, the apropriate | 5000 | * To be able to change p->policy safely, the appropriate |
| 5001 | * runqueue lock must be held. | 5001 | * runqueue lock must be held. |
| 5002 | */ | 5002 | */ |
| 5003 | rq = __task_rq_lock(p); | 5003 | rq = __task_rq_lock(p); |
| @@ -5011,6 +5011,17 @@ recheck: | |||
| 5011 | return -EINVAL; | 5011 | return -EINVAL; |
| 5012 | } | 5012 | } |
| 5013 | 5013 | ||
| 5014 | /* | ||
| 5015 | * If not changing anything there's no need to proceed further: | ||
| 5016 | */ | ||
| 5017 | if (unlikely(policy == p->policy && (!rt_policy(policy) || | ||
| 5018 | param->sched_priority == p->rt_priority))) { | ||
| 5019 | |||
| 5020 | __task_rq_unlock(rq); | ||
| 5021 | raw_spin_unlock_irqrestore(&p->pi_lock, flags); | ||
| 5022 | return 0; | ||
| 5023 | } | ||
| 5024 | |||
| 5014 | #ifdef CONFIG_RT_GROUP_SCHED | 5025 | #ifdef CONFIG_RT_GROUP_SCHED |
| 5015 | if (user) { | 5026 | if (user) { |
| 5016 | /* | 5027 | /* |
| @@ -5705,7 +5716,7 @@ void show_state_filter(unsigned long state_filter) | |||
| 5705 | do_each_thread(g, p) { | 5716 | do_each_thread(g, p) { |
| 5706 | /* | 5717 | /* |
| 5707 | * reset the NMI-timeout, listing all files on a slow | 5718 | * reset the NMI-timeout, listing all files on a slow |
| 5708 | * console might take alot of time: | 5719 | * console might take a lot of time: |
| 5709 | */ | 5720 | */ |
| 5710 | touch_nmi_watchdog(); | 5721 | touch_nmi_watchdog(); |
| 5711 | if (!state_filter || (p->state & state_filter)) | 5722 | if (!state_filter || (p->state & state_filter)) |
| @@ -6320,6 +6331,9 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) | |||
| 6320 | break; | 6331 | break; |
| 6321 | #endif | 6332 | #endif |
| 6322 | } | 6333 | } |
| 6334 | |||
| 6335 | update_max_interval(); | ||
| 6336 | |||
| 6323 | return NOTIFY_OK; | 6337 | return NOTIFY_OK; |
| 6324 | } | 6338 | } |
| 6325 | 6339 | ||
diff --git a/kernel/sched_autogroup.c b/kernel/sched_autogroup.c index 5946ac515602..429242f3c484 100644 --- a/kernel/sched_autogroup.c +++ b/kernel/sched_autogroup.c | |||
| @@ -179,7 +179,7 @@ void sched_autogroup_create_attach(struct task_struct *p) | |||
| 179 | struct autogroup *ag = autogroup_create(); | 179 | struct autogroup *ag = autogroup_create(); |
| 180 | 180 | ||
| 181 | autogroup_move_group(p, ag); | 181 | autogroup_move_group(p, ag); |
| 182 | /* drop extra refrence added by autogroup_create() */ | 182 | /* drop extra reference added by autogroup_create() */ |
| 183 | autogroup_kref_put(ag); | 183 | autogroup_kref_put(ag); |
| 184 | } | 184 | } |
| 185 | EXPORT_SYMBOL(sched_autogroup_create_attach); | 185 | EXPORT_SYMBOL(sched_autogroup_create_attach); |
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 3f7ec9e27ee1..6fa833ab2cb8 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | 22 | ||
| 23 | #include <linux/latencytop.h> | 23 | #include <linux/latencytop.h> |
| 24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
| 25 | #include <linux/cpumask.h> | ||
| 25 | 26 | ||
| 26 | /* | 27 | /* |
| 27 | * Targeted preemption latency for CPU-bound tasks: | 28 | * Targeted preemption latency for CPU-bound tasks: |
| @@ -2103,21 +2104,20 @@ balance_tasks(struct rq *this_rq, int this_cpu, struct rq *busiest, | |||
| 2103 | enum cpu_idle_type idle, int *all_pinned, | 2104 | enum cpu_idle_type idle, int *all_pinned, |
| 2104 | int *this_best_prio, struct cfs_rq *busiest_cfs_rq) | 2105 | int *this_best_prio, struct cfs_rq *busiest_cfs_rq) |
| 2105 | { | 2106 | { |
| 2106 | int loops = 0, pulled = 0, pinned = 0; | 2107 | int loops = 0, pulled = 0; |
| 2107 | long rem_load_move = max_load_move; | 2108 | long rem_load_move = max_load_move; |
| 2108 | struct task_struct *p, *n; | 2109 | struct task_struct *p, *n; |
| 2109 | 2110 | ||
| 2110 | if (max_load_move == 0) | 2111 | if (max_load_move == 0) |
| 2111 | goto out; | 2112 | goto out; |
| 2112 | 2113 | ||
| 2113 | pinned = 1; | ||
| 2114 | |||
| 2115 | list_for_each_entry_safe(p, n, &busiest_cfs_rq->tasks, se.group_node) { | 2114 | list_for_each_entry_safe(p, n, &busiest_cfs_rq->tasks, se.group_node) { |
| 2116 | if (loops++ > sysctl_sched_nr_migrate) | 2115 | if (loops++ > sysctl_sched_nr_migrate) |
| 2117 | break; | 2116 | break; |
| 2118 | 2117 | ||
| 2119 | if ((p->se.load.weight >> 1) > rem_load_move || | 2118 | if ((p->se.load.weight >> 1) > rem_load_move || |
| 2120 | !can_migrate_task(p, busiest, this_cpu, sd, idle, &pinned)) | 2119 | !can_migrate_task(p, busiest, this_cpu, sd, idle, |
| 2120 | all_pinned)) | ||
| 2121 | continue; | 2121 | continue; |
| 2122 | 2122 | ||
| 2123 | pull_task(busiest, p, this_rq, this_cpu); | 2123 | pull_task(busiest, p, this_rq, this_cpu); |
| @@ -2152,9 +2152,6 @@ out: | |||
| 2152 | */ | 2152 | */ |
| 2153 | schedstat_add(sd, lb_gained[idle], pulled); | 2153 | schedstat_add(sd, lb_gained[idle], pulled); |
| 2154 | 2154 | ||
| 2155 | if (all_pinned) | ||
| 2156 | *all_pinned = pinned; | ||
| 2157 | |||
| 2158 | return max_load_move - rem_load_move; | 2155 | return max_load_move - rem_load_move; |
| 2159 | } | 2156 | } |
| 2160 | 2157 | ||
| @@ -3061,7 +3058,7 @@ static inline void calculate_imbalance(struct sd_lb_stats *sds, int this_cpu, | |||
| 3061 | 3058 | ||
| 3062 | /* | 3059 | /* |
| 3063 | * if *imbalance is less than the average load per runnable task | 3060 | * if *imbalance is less than the average load per runnable task |
| 3064 | * there is no gaurantee that any tasks will be moved so we'll have | 3061 | * there is no guarantee that any tasks will be moved so we'll have |
| 3065 | * a think about bumping its value to force at least one task to be | 3062 | * a think about bumping its value to force at least one task to be |
| 3066 | * moved | 3063 | * moved |
| 3067 | */ | 3064 | */ |
| @@ -3126,6 +3123,8 @@ find_busiest_group(struct sched_domain *sd, int this_cpu, | |||
| 3126 | if (!sds.busiest || sds.busiest_nr_running == 0) | 3123 | if (!sds.busiest || sds.busiest_nr_running == 0) |
| 3127 | goto out_balanced; | 3124 | goto out_balanced; |
| 3128 | 3125 | ||
| 3126 | sds.avg_load = (SCHED_LOAD_SCALE * sds.total_load) / sds.total_pwr; | ||
| 3127 | |||
| 3129 | /* | 3128 | /* |
| 3130 | * If the busiest group is imbalanced the below checks don't | 3129 | * If the busiest group is imbalanced the below checks don't |
| 3131 | * work because they assumes all things are equal, which typically | 3130 | * work because they assumes all things are equal, which typically |
| @@ -3150,7 +3149,6 @@ find_busiest_group(struct sched_domain *sd, int this_cpu, | |||
| 3150 | * Don't pull any tasks if this group is already above the domain | 3149 | * Don't pull any tasks if this group is already above the domain |
| 3151 | * average load. | 3150 | * average load. |
| 3152 | */ | 3151 | */ |
| 3153 | sds.avg_load = (SCHED_LOAD_SCALE * sds.total_load) / sds.total_pwr; | ||
| 3154 | if (sds.this_load >= sds.avg_load) | 3152 | if (sds.this_load >= sds.avg_load) |
| 3155 | goto out_balanced; | 3153 | goto out_balanced; |
| 3156 | 3154 | ||
| @@ -3339,6 +3337,7 @@ redo: | |||
| 3339 | * still unbalanced. ld_moved simply stays zero, so it is | 3337 | * still unbalanced. ld_moved simply stays zero, so it is |
| 3340 | * correctly treated as an imbalance. | 3338 | * correctly treated as an imbalance. |
| 3341 | */ | 3339 | */ |
| 3340 | all_pinned = 1; | ||
| 3342 | local_irq_save(flags); | 3341 | local_irq_save(flags); |
| 3343 | double_rq_lock(this_rq, busiest); | 3342 | double_rq_lock(this_rq, busiest); |
| 3344 | ld_moved = move_tasks(this_rq, this_cpu, busiest, | 3343 | ld_moved = move_tasks(this_rq, this_cpu, busiest, |
| @@ -3819,6 +3818,17 @@ void select_nohz_load_balancer(int stop_tick) | |||
| 3819 | 3818 | ||
| 3820 | static DEFINE_SPINLOCK(balancing); | 3819 | static DEFINE_SPINLOCK(balancing); |
| 3821 | 3820 | ||
| 3821 | static unsigned long __read_mostly max_load_balance_interval = HZ/10; | ||
| 3822 | |||
| 3823 | /* | ||
| 3824 | * Scale the max load_balance interval with the number of CPUs in the system. | ||
| 3825 | * This trades load-balance latency on larger machines for less cross talk. | ||
| 3826 | */ | ||
| 3827 | static void update_max_interval(void) | ||
| 3828 | { | ||
| 3829 | max_load_balance_interval = HZ*num_online_cpus()/10; | ||
| 3830 | } | ||
| 3831 | |||
| 3822 | /* | 3832 | /* |
| 3823 | * It checks each scheduling domain to see if it is due to be balanced, | 3833 | * It checks each scheduling domain to see if it is due to be balanced, |
| 3824 | * and initiates a balancing operation if so. | 3834 | * and initiates a balancing operation if so. |
| @@ -3848,10 +3858,7 @@ static void rebalance_domains(int cpu, enum cpu_idle_type idle) | |||
| 3848 | 3858 | ||
| 3849 | /* scale ms to jiffies */ | 3859 | /* scale ms to jiffies */ |
| 3850 | interval = msecs_to_jiffies(interval); | 3860 | interval = msecs_to_jiffies(interval); |
| 3851 | if (unlikely(!interval)) | 3861 | interval = clamp(interval, 1UL, max_load_balance_interval); |
| 3852 | interval = 1; | ||
| 3853 | if (interval > HZ*NR_CPUS/10) | ||
| 3854 | interval = HZ*NR_CPUS/10; | ||
| 3855 | 3862 | ||
| 3856 | need_serialize = sd->flags & SD_SERIALIZE; | 3863 | need_serialize = sd->flags & SD_SERIALIZE; |
| 3857 | 3864 | ||
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index db308cb08b75..e7cebdc65f82 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c | |||
| @@ -1378,7 +1378,7 @@ retry: | |||
| 1378 | task = pick_next_pushable_task(rq); | 1378 | task = pick_next_pushable_task(rq); |
| 1379 | if (task_cpu(next_task) == rq->cpu && task == next_task) { | 1379 | if (task_cpu(next_task) == rq->cpu && task == next_task) { |
| 1380 | /* | 1380 | /* |
| 1381 | * If we get here, the task hasnt moved at all, but | 1381 | * If we get here, the task hasn't moved at all, but |
| 1382 | * it has failed to push. We will not try again, | 1382 | * it has failed to push. We will not try again, |
| 1383 | * since the other cpus will pull from us when they | 1383 | * since the other cpus will pull from us when they |
| 1384 | * are ready. | 1384 | * are ready. |
| @@ -1488,7 +1488,7 @@ static int pull_rt_task(struct rq *this_rq) | |||
| 1488 | /* | 1488 | /* |
| 1489 | * We continue with the search, just in | 1489 | * We continue with the search, just in |
| 1490 | * case there's an even higher prio task | 1490 | * case there's an even higher prio task |
| 1491 | * in another runqueue. (low likelyhood | 1491 | * in another runqueue. (low likelihood |
| 1492 | * but possible) | 1492 | * but possible) |
| 1493 | */ | 1493 | */ |
| 1494 | } | 1494 | } |
diff --git a/kernel/signal.c b/kernel/signal.c index 1186cf7fac77..7165af5f1b11 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
| @@ -226,7 +226,7 @@ static inline void print_dropped_signal(int sig) | |||
| 226 | /* | 226 | /* |
| 227 | * allocate a new signal queue record | 227 | * allocate a new signal queue record |
| 228 | * - this may be called without locks if and only if t == current, otherwise an | 228 | * - this may be called without locks if and only if t == current, otherwise an |
| 229 | * appopriate lock must be held to stop the target task from exiting | 229 | * appropriate lock must be held to stop the target task from exiting |
| 230 | */ | 230 | */ |
| 231 | static struct sigqueue * | 231 | static struct sigqueue * |
| 232 | __sigqueue_alloc(int sig, struct task_struct *t, gfp_t flags, int override_rlimit) | 232 | __sigqueue_alloc(int sig, struct task_struct *t, gfp_t flags, int override_rlimit) |
| @@ -375,15 +375,15 @@ int unhandled_signal(struct task_struct *tsk, int sig) | |||
| 375 | return !tracehook_consider_fatal_signal(tsk, sig); | 375 | return !tracehook_consider_fatal_signal(tsk, sig); |
| 376 | } | 376 | } |
| 377 | 377 | ||
| 378 | 378 | /* | |
| 379 | /* Notify the system that a driver wants to block all signals for this | 379 | * Notify the system that a driver wants to block all signals for this |
| 380 | * process, and wants to be notified if any signals at all were to be | 380 | * process, and wants to be notified if any signals at all were to be |
| 381 | * sent/acted upon. If the notifier routine returns non-zero, then the | 381 | * sent/acted upon. If the notifier routine returns non-zero, then the |
| 382 | * signal will be acted upon after all. If the notifier routine returns 0, | 382 | * signal will be acted upon after all. If the notifier routine returns 0, |
| 383 | * then then signal will be blocked. Only one block per process is | 383 | * then then signal will be blocked. Only one block per process is |
| 384 | * allowed. priv is a pointer to private data that the notifier routine | 384 | * allowed. priv is a pointer to private data that the notifier routine |
| 385 | * can use to determine if the signal should be blocked or not. */ | 385 | * can use to determine if the signal should be blocked or not. |
| 386 | 386 | */ | |
| 387 | void | 387 | void |
| 388 | block_all_signals(int (*notifier)(void *priv), void *priv, sigset_t *mask) | 388 | block_all_signals(int (*notifier)(void *priv), void *priv, sigset_t *mask) |
| 389 | { | 389 | { |
| @@ -434,9 +434,10 @@ still_pending: | |||
| 434 | copy_siginfo(info, &first->info); | 434 | copy_siginfo(info, &first->info); |
| 435 | __sigqueue_free(first); | 435 | __sigqueue_free(first); |
| 436 | } else { | 436 | } else { |
| 437 | /* Ok, it wasn't in the queue. This must be | 437 | /* |
| 438 | a fast-pathed signal or we must have been | 438 | * Ok, it wasn't in the queue. This must be |
| 439 | out of queue space. So zero out the info. | 439 | * a fast-pathed signal or we must have been |
| 440 | * out of queue space. So zero out the info. | ||
| 440 | */ | 441 | */ |
| 441 | info->si_signo = sig; | 442 | info->si_signo = sig; |
| 442 | info->si_errno = 0; | 443 | info->si_errno = 0; |
| @@ -468,7 +469,7 @@ static int __dequeue_signal(struct sigpending *pending, sigset_t *mask, | |||
| 468 | } | 469 | } |
| 469 | 470 | ||
| 470 | /* | 471 | /* |
| 471 | * Dequeue a signal and return the element to the caller, which is | 472 | * Dequeue a signal and return the element to the caller, which is |
| 472 | * expected to free it. | 473 | * expected to free it. |
| 473 | * | 474 | * |
| 474 | * All callers have to hold the siglock. | 475 | * All callers have to hold the siglock. |
| @@ -490,7 +491,7 @@ int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info) | |||
| 490 | * itimers are process shared and we restart periodic | 491 | * itimers are process shared and we restart periodic |
| 491 | * itimers in the signal delivery path to prevent DoS | 492 | * itimers in the signal delivery path to prevent DoS |
| 492 | * attacks in the high resolution timer case. This is | 493 | * attacks in the high resolution timer case. This is |
| 493 | * compliant with the old way of self restarting | 494 | * compliant with the old way of self-restarting |
| 494 | * itimers, as the SIGALRM is a legacy signal and only | 495 | * itimers, as the SIGALRM is a legacy signal and only |
| 495 | * queued once. Changing the restart behaviour to | 496 | * queued once. Changing the restart behaviour to |
| 496 | * restart the timer in the signal dequeue path is | 497 | * restart the timer in the signal dequeue path is |
| @@ -923,14 +924,15 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t, | |||
| 923 | if (info == SEND_SIG_FORCED) | 924 | if (info == SEND_SIG_FORCED) |
| 924 | goto out_set; | 925 | goto out_set; |
| 925 | 926 | ||
| 926 | /* Real-time signals must be queued if sent by sigqueue, or | 927 | /* |
| 927 | some other real-time mechanism. It is implementation | 928 | * Real-time signals must be queued if sent by sigqueue, or |
| 928 | defined whether kill() does so. We attempt to do so, on | 929 | * some other real-time mechanism. It is implementation |
| 929 | the principle of least surprise, but since kill is not | 930 | * defined whether kill() does so. We attempt to do so, on |
| 930 | allowed to fail with EAGAIN when low on memory we just | 931 | * the principle of least surprise, but since kill is not |
| 931 | make sure at least one signal gets delivered and don't | 932 | * allowed to fail with EAGAIN when low on memory we just |
| 932 | pass on the info struct. */ | 933 | * make sure at least one signal gets delivered and don't |
| 933 | 934 | * pass on the info struct. | |
| 935 | */ | ||
| 934 | if (sig < SIGRTMIN) | 936 | if (sig < SIGRTMIN) |
| 935 | override_rlimit = (is_si_special(info) || info->si_code >= 0); | 937 | override_rlimit = (is_si_special(info) || info->si_code >= 0); |
| 936 | else | 938 | else |
| @@ -1201,8 +1203,7 @@ retry: | |||
| 1201 | return error; | 1203 | return error; |
| 1202 | } | 1204 | } |
| 1203 | 1205 | ||
| 1204 | int | 1206 | int kill_proc_info(int sig, struct siginfo *info, pid_t pid) |
| 1205 | kill_proc_info(int sig, struct siginfo *info, pid_t pid) | ||
| 1206 | { | 1207 | { |
| 1207 | int error; | 1208 | int error; |
| 1208 | rcu_read_lock(); | 1209 | rcu_read_lock(); |
| @@ -1299,8 +1300,7 @@ static int kill_something_info(int sig, struct siginfo *info, pid_t pid) | |||
| 1299 | * These are for backward compatibility with the rest of the kernel source. | 1300 | * These are for backward compatibility with the rest of the kernel source. |
| 1300 | */ | 1301 | */ |
| 1301 | 1302 | ||
| 1302 | int | 1303 | int send_sig_info(int sig, struct siginfo *info, struct task_struct *p) |
| 1303 | send_sig_info(int sig, struct siginfo *info, struct task_struct *p) | ||
| 1304 | { | 1304 | { |
| 1305 | /* | 1305 | /* |
| 1306 | * Make sure legacy kernel users don't send in bad values | 1306 | * Make sure legacy kernel users don't send in bad values |
| @@ -1368,7 +1368,7 @@ EXPORT_SYMBOL(kill_pid); | |||
| 1368 | * These functions support sending signals using preallocated sigqueue | 1368 | * These functions support sending signals using preallocated sigqueue |
| 1369 | * structures. This is needed "because realtime applications cannot | 1369 | * structures. This is needed "because realtime applications cannot |
| 1370 | * afford to lose notifications of asynchronous events, like timer | 1370 | * afford to lose notifications of asynchronous events, like timer |
| 1371 | * expirations or I/O completions". In the case of Posix Timers | 1371 | * expirations or I/O completions". In the case of POSIX Timers |
| 1372 | * we allocate the sigqueue structure from the timer_create. If this | 1372 | * we allocate the sigqueue structure from the timer_create. If this |
| 1373 | * allocation fails we are able to report the failure to the application | 1373 | * allocation fails we are able to report the failure to the application |
| 1374 | * with an EAGAIN error. | 1374 | * with an EAGAIN error. |
| @@ -1553,7 +1553,7 @@ static void do_notify_parent_cldstop(struct task_struct *tsk, int why) | |||
| 1553 | info.si_signo = SIGCHLD; | 1553 | info.si_signo = SIGCHLD; |
| 1554 | info.si_errno = 0; | 1554 | info.si_errno = 0; |
| 1555 | /* | 1555 | /* |
| 1556 | * see comment in do_notify_parent() abot the following 3 lines | 1556 | * see comment in do_notify_parent() about the following 4 lines |
| 1557 | */ | 1557 | */ |
| 1558 | rcu_read_lock(); | 1558 | rcu_read_lock(); |
| 1559 | info.si_pid = task_pid_nr_ns(tsk, parent->nsproxy->pid_ns); | 1559 | info.si_pid = task_pid_nr_ns(tsk, parent->nsproxy->pid_ns); |
| @@ -1611,7 +1611,7 @@ static inline int may_ptrace_stop(void) | |||
| 1611 | } | 1611 | } |
| 1612 | 1612 | ||
| 1613 | /* | 1613 | /* |
| 1614 | * Return nonzero if there is a SIGKILL that should be waking us up. | 1614 | * Return non-zero if there is a SIGKILL that should be waking us up. |
| 1615 | * Called with the siglock held. | 1615 | * Called with the siglock held. |
| 1616 | */ | 1616 | */ |
| 1617 | static int sigkill_pending(struct task_struct *tsk) | 1617 | static int sigkill_pending(struct task_struct *tsk) |
| @@ -1735,7 +1735,7 @@ void ptrace_notify(int exit_code) | |||
| 1735 | /* | 1735 | /* |
| 1736 | * This performs the stopping for SIGSTOP and other stop signals. | 1736 | * This performs the stopping for SIGSTOP and other stop signals. |
| 1737 | * We have to stop all threads in the thread group. | 1737 | * We have to stop all threads in the thread group. |
| 1738 | * Returns nonzero if we've actually stopped and released the siglock. | 1738 | * Returns non-zero if we've actually stopped and released the siglock. |
| 1739 | * Returns zero if we didn't stop and still hold the siglock. | 1739 | * Returns zero if we didn't stop and still hold the siglock. |
| 1740 | */ | 1740 | */ |
| 1741 | static int do_signal_stop(int signr) | 1741 | static int do_signal_stop(int signr) |
| @@ -1823,10 +1823,12 @@ static int ptrace_signal(int signr, siginfo_t *info, | |||
| 1823 | 1823 | ||
| 1824 | current->exit_code = 0; | 1824 | current->exit_code = 0; |
| 1825 | 1825 | ||
| 1826 | /* Update the siginfo structure if the signal has | 1826 | /* |
| 1827 | changed. If the debugger wanted something | 1827 | * Update the siginfo structure if the signal has |
| 1828 | specific in the siginfo structure then it should | 1828 | * changed. If the debugger wanted something |
| 1829 | have updated *info via PTRACE_SETSIGINFO. */ | 1829 | * specific in the siginfo structure then it should |
| 1830 | * have updated *info via PTRACE_SETSIGINFO. | ||
| 1831 | */ | ||
| 1830 | if (signr != info->si_signo) { | 1832 | if (signr != info->si_signo) { |
| 1831 | info->si_signo = signr; | 1833 | info->si_signo = signr; |
| 1832 | info->si_errno = 0; | 1834 | info->si_errno = 0; |
| @@ -1885,7 +1887,7 @@ relock: | |||
| 1885 | for (;;) { | 1887 | for (;;) { |
| 1886 | struct k_sigaction *ka; | 1888 | struct k_sigaction *ka; |
| 1887 | /* | 1889 | /* |
| 1888 | * Tracing can induce an artifical signal and choose sigaction. | 1890 | * Tracing can induce an artificial signal and choose sigaction. |
| 1889 | * The return value in @signr determines the default action, | 1891 | * The return value in @signr determines the default action, |
| 1890 | * but @info->si_signo is the signal number we will report. | 1892 | * but @info->si_signo is the signal number we will report. |
| 1891 | */ | 1893 | */ |
| @@ -2034,7 +2036,8 @@ void exit_signals(struct task_struct *tsk) | |||
| 2034 | if (!signal_pending(tsk)) | 2036 | if (!signal_pending(tsk)) |
| 2035 | goto out; | 2037 | goto out; |
| 2036 | 2038 | ||
| 2037 | /* It could be that __group_complete_signal() choose us to | 2039 | /* |
| 2040 | * It could be that __group_complete_signal() choose us to | ||
| 2038 | * notify about group-wide signal. Another thread should be | 2041 | * notify about group-wide signal. Another thread should be |
| 2039 | * woken now to take the signal since we will not. | 2042 | * woken now to take the signal since we will not. |
| 2040 | */ | 2043 | */ |
| @@ -2072,6 +2075,9 @@ EXPORT_SYMBOL(unblock_all_signals); | |||
| 2072 | * System call entry points. | 2075 | * System call entry points. |
| 2073 | */ | 2076 | */ |
| 2074 | 2077 | ||
| 2078 | /** | ||
| 2079 | * sys_restart_syscall - restart a system call | ||
| 2080 | */ | ||
| 2075 | SYSCALL_DEFINE0(restart_syscall) | 2081 | SYSCALL_DEFINE0(restart_syscall) |
| 2076 | { | 2082 | { |
| 2077 | struct restart_block *restart = ¤t_thread_info()->restart_block; | 2083 | struct restart_block *restart = ¤t_thread_info()->restart_block; |
| @@ -2125,6 +2131,13 @@ int sigprocmask(int how, sigset_t *set, sigset_t *oldset) | |||
| 2125 | return error; | 2131 | return error; |
| 2126 | } | 2132 | } |
| 2127 | 2133 | ||
| 2134 | /** | ||
| 2135 | * sys_rt_sigprocmask - change the list of currently blocked signals | ||
| 2136 | * @how: whether to add, remove, or set signals | ||
| 2137 | * @set: stores pending signals | ||
| 2138 | * @oset: previous value of signal mask if non-null | ||
| 2139 | * @sigsetsize: size of sigset_t type | ||
| 2140 | */ | ||
| 2128 | SYSCALL_DEFINE4(rt_sigprocmask, int, how, sigset_t __user *, set, | 2141 | SYSCALL_DEFINE4(rt_sigprocmask, int, how, sigset_t __user *, set, |
| 2129 | sigset_t __user *, oset, size_t, sigsetsize) | 2142 | sigset_t __user *, oset, size_t, sigsetsize) |
| 2130 | { | 2143 | { |
| @@ -2183,8 +2196,14 @@ long do_sigpending(void __user *set, unsigned long sigsetsize) | |||
| 2183 | 2196 | ||
| 2184 | out: | 2197 | out: |
| 2185 | return error; | 2198 | return error; |
| 2186 | } | 2199 | } |
| 2187 | 2200 | ||
| 2201 | /** | ||
| 2202 | * sys_rt_sigpending - examine a pending signal that has been raised | ||
| 2203 | * while blocked | ||
| 2204 | * @set: stores pending signals | ||
| 2205 | * @sigsetsize: size of sigset_t type or larger | ||
| 2206 | */ | ||
| 2188 | SYSCALL_DEFINE2(rt_sigpending, sigset_t __user *, set, size_t, sigsetsize) | 2207 | SYSCALL_DEFINE2(rt_sigpending, sigset_t __user *, set, size_t, sigsetsize) |
| 2189 | { | 2208 | { |
| 2190 | return do_sigpending(set, sigsetsize); | 2209 | return do_sigpending(set, sigsetsize); |
| @@ -2233,9 +2252,9 @@ int copy_siginfo_to_user(siginfo_t __user *to, siginfo_t *from) | |||
| 2233 | err |= __put_user(from->si_trapno, &to->si_trapno); | 2252 | err |= __put_user(from->si_trapno, &to->si_trapno); |
| 2234 | #endif | 2253 | #endif |
| 2235 | #ifdef BUS_MCEERR_AO | 2254 | #ifdef BUS_MCEERR_AO |
| 2236 | /* | 2255 | /* |
| 2237 | * Other callers might not initialize the si_lsb field, | 2256 | * Other callers might not initialize the si_lsb field, |
| 2238 | * so check explicitely for the right codes here. | 2257 | * so check explicitly for the right codes here. |
| 2239 | */ | 2258 | */ |
| 2240 | if (from->si_code == BUS_MCEERR_AR || from->si_code == BUS_MCEERR_AO) | 2259 | if (from->si_code == BUS_MCEERR_AR || from->si_code == BUS_MCEERR_AO) |
| 2241 | err |= __put_user(from->si_addr_lsb, &to->si_addr_lsb); | 2260 | err |= __put_user(from->si_addr_lsb, &to->si_addr_lsb); |
| @@ -2264,6 +2283,14 @@ int copy_siginfo_to_user(siginfo_t __user *to, siginfo_t *from) | |||
| 2264 | 2283 | ||
| 2265 | #endif | 2284 | #endif |
| 2266 | 2285 | ||
| 2286 | /** | ||
| 2287 | * sys_rt_sigtimedwait - synchronously wait for queued signals specified | ||
| 2288 | * in @uthese | ||
| 2289 | * @uthese: queued signals to wait for | ||
| 2290 | * @uinfo: if non-null, the signal's siginfo is returned here | ||
| 2291 | * @uts: upper bound on process time suspension | ||
| 2292 | * @sigsetsize: size of sigset_t type | ||
| 2293 | */ | ||
| 2267 | SYSCALL_DEFINE4(rt_sigtimedwait, const sigset_t __user *, uthese, | 2294 | SYSCALL_DEFINE4(rt_sigtimedwait, const sigset_t __user *, uthese, |
| 2268 | siginfo_t __user *, uinfo, const struct timespec __user *, uts, | 2295 | siginfo_t __user *, uinfo, const struct timespec __user *, uts, |
| 2269 | size_t, sigsetsize) | 2296 | size_t, sigsetsize) |
| @@ -2280,7 +2307,7 @@ SYSCALL_DEFINE4(rt_sigtimedwait, const sigset_t __user *, uthese, | |||
| 2280 | 2307 | ||
| 2281 | if (copy_from_user(&these, uthese, sizeof(these))) | 2308 | if (copy_from_user(&these, uthese, sizeof(these))) |
| 2282 | return -EFAULT; | 2309 | return -EFAULT; |
| 2283 | 2310 | ||
| 2284 | /* | 2311 | /* |
| 2285 | * Invert the set of allowed signals to get those we | 2312 | * Invert the set of allowed signals to get those we |
| 2286 | * want to block. | 2313 | * want to block. |
| @@ -2305,9 +2332,11 @@ SYSCALL_DEFINE4(rt_sigtimedwait, const sigset_t __user *, uthese, | |||
| 2305 | + (ts.tv_sec || ts.tv_nsec)); | 2332 | + (ts.tv_sec || ts.tv_nsec)); |
| 2306 | 2333 | ||
| 2307 | if (timeout) { | 2334 | if (timeout) { |
| 2308 | /* None ready -- temporarily unblock those we're | 2335 | /* |
| 2336 | * None ready -- temporarily unblock those we're | ||
| 2309 | * interested while we are sleeping in so that we'll | 2337 | * interested while we are sleeping in so that we'll |
| 2310 | * be awakened when they arrive. */ | 2338 | * be awakened when they arrive. |
| 2339 | */ | ||
| 2311 | current->real_blocked = current->blocked; | 2340 | current->real_blocked = current->blocked; |
| 2312 | sigandsets(¤t->blocked, ¤t->blocked, &these); | 2341 | sigandsets(¤t->blocked, ¤t->blocked, &these); |
| 2313 | recalc_sigpending(); | 2342 | recalc_sigpending(); |
| @@ -2339,6 +2368,11 @@ SYSCALL_DEFINE4(rt_sigtimedwait, const sigset_t __user *, uthese, | |||
| 2339 | return ret; | 2368 | return ret; |
| 2340 | } | 2369 | } |
| 2341 | 2370 | ||
| 2371 | /** | ||
| 2372 | * sys_kill - send a signal to a process | ||
| 2373 | * @pid: the PID of the process | ||
| 2374 | * @sig: signal to be sent | ||
| 2375 | */ | ||
| 2342 | SYSCALL_DEFINE2(kill, pid_t, pid, int, sig) | 2376 | SYSCALL_DEFINE2(kill, pid_t, pid, int, sig) |
| 2343 | { | 2377 | { |
| 2344 | struct siginfo info; | 2378 | struct siginfo info; |
| @@ -2414,7 +2448,11 @@ SYSCALL_DEFINE3(tgkill, pid_t, tgid, pid_t, pid, int, sig) | |||
| 2414 | return do_tkill(tgid, pid, sig); | 2448 | return do_tkill(tgid, pid, sig); |
| 2415 | } | 2449 | } |
| 2416 | 2450 | ||
| 2417 | /* | 2451 | /** |
| 2452 | * sys_tkill - send signal to one specific task | ||
| 2453 | * @pid: the PID of the task | ||
| 2454 | * @sig: signal to be sent | ||
| 2455 | * | ||
| 2418 | * Send a signal to only one task, even if it's a CLONE_THREAD task. | 2456 | * Send a signal to only one task, even if it's a CLONE_THREAD task. |
| 2419 | */ | 2457 | */ |
| 2420 | SYSCALL_DEFINE2(tkill, pid_t, pid, int, sig) | 2458 | SYSCALL_DEFINE2(tkill, pid_t, pid, int, sig) |
| @@ -2426,6 +2464,12 @@ SYSCALL_DEFINE2(tkill, pid_t, pid, int, sig) | |||
| 2426 | return do_tkill(0, pid, sig); | 2464 | return do_tkill(0, pid, sig); |
| 2427 | } | 2465 | } |
| 2428 | 2466 | ||
| 2467 | /** | ||
| 2468 | * sys_rt_sigqueueinfo - send signal information to a signal | ||
| 2469 | * @pid: the PID of the thread | ||
| 2470 | * @sig: signal to be sent | ||
| 2471 | * @uinfo: signal info to be sent | ||
| 2472 | */ | ||
| 2429 | SYSCALL_DEFINE3(rt_sigqueueinfo, pid_t, pid, int, sig, | 2473 | SYSCALL_DEFINE3(rt_sigqueueinfo, pid_t, pid, int, sig, |
| 2430 | siginfo_t __user *, uinfo) | 2474 | siginfo_t __user *, uinfo) |
| 2431 | { | 2475 | { |
| @@ -2553,12 +2597,11 @@ do_sigaltstack (const stack_t __user *uss, stack_t __user *uoss, unsigned long s | |||
| 2553 | 2597 | ||
| 2554 | error = -EINVAL; | 2598 | error = -EINVAL; |
| 2555 | /* | 2599 | /* |
| 2556 | * | 2600 | * Note - this code used to test ss_flags incorrectly: |
| 2557 | * Note - this code used to test ss_flags incorrectly | ||
| 2558 | * old code may have been written using ss_flags==0 | 2601 | * old code may have been written using ss_flags==0 |
| 2559 | * to mean ss_flags==SS_ONSTACK (as this was the only | 2602 | * to mean ss_flags==SS_ONSTACK (as this was the only |
| 2560 | * way that worked) - this fix preserves that older | 2603 | * way that worked) - this fix preserves that older |
| 2561 | * mechanism | 2604 | * mechanism. |
| 2562 | */ | 2605 | */ |
| 2563 | if (ss_flags != SS_DISABLE && ss_flags != SS_ONSTACK && ss_flags != 0) | 2606 | if (ss_flags != SS_DISABLE && ss_flags != SS_ONSTACK && ss_flags != 0) |
| 2564 | goto out; | 2607 | goto out; |
| @@ -2592,6 +2635,10 @@ out: | |||
| 2592 | 2635 | ||
| 2593 | #ifdef __ARCH_WANT_SYS_SIGPENDING | 2636 | #ifdef __ARCH_WANT_SYS_SIGPENDING |
| 2594 | 2637 | ||
| 2638 | /** | ||
| 2639 | * sys_sigpending - examine pending signals | ||
| 2640 | * @set: where mask of pending signal is returned | ||
| 2641 | */ | ||
| 2595 | SYSCALL_DEFINE1(sigpending, old_sigset_t __user *, set) | 2642 | SYSCALL_DEFINE1(sigpending, old_sigset_t __user *, set) |
| 2596 | { | 2643 | { |
| 2597 | return do_sigpending(set, sizeof(*set)); | 2644 | return do_sigpending(set, sizeof(*set)); |
| @@ -2600,8 +2647,15 @@ SYSCALL_DEFINE1(sigpending, old_sigset_t __user *, set) | |||
| 2600 | #endif | 2647 | #endif |
| 2601 | 2648 | ||
| 2602 | #ifdef __ARCH_WANT_SYS_SIGPROCMASK | 2649 | #ifdef __ARCH_WANT_SYS_SIGPROCMASK |
| 2603 | /* Some platforms have their own version with special arguments others | 2650 | /** |
| 2604 | support only sys_rt_sigprocmask. */ | 2651 | * sys_sigprocmask - examine and change blocked signals |
| 2652 | * @how: whether to add, remove, or set signals | ||
| 2653 | * @set: signals to add or remove (if non-null) | ||
| 2654 | * @oset: previous value of signal mask if non-null | ||
| 2655 | * | ||
| 2656 | * Some platforms have their own version with special arguments; | ||
| 2657 | * others support only sys_rt_sigprocmask. | ||
| 2658 | */ | ||
| 2605 | 2659 | ||
| 2606 | SYSCALL_DEFINE3(sigprocmask, int, how, old_sigset_t __user *, set, | 2660 | SYSCALL_DEFINE3(sigprocmask, int, how, old_sigset_t __user *, set, |
| 2607 | old_sigset_t __user *, oset) | 2661 | old_sigset_t __user *, oset) |
| @@ -2654,6 +2708,13 @@ out: | |||
| 2654 | #endif /* __ARCH_WANT_SYS_SIGPROCMASK */ | 2708 | #endif /* __ARCH_WANT_SYS_SIGPROCMASK */ |
| 2655 | 2709 | ||
| 2656 | #ifdef __ARCH_WANT_SYS_RT_SIGACTION | 2710 | #ifdef __ARCH_WANT_SYS_RT_SIGACTION |
| 2711 | /** | ||
| 2712 | * sys_rt_sigaction - alter an action taken by a process | ||
| 2713 | * @sig: signal to be sent | ||
| 2714 | * @act: new sigaction | ||
| 2715 | * @oact: used to save the previous sigaction | ||
| 2716 | * @sigsetsize: size of sigset_t type | ||
| 2717 | */ | ||
| 2657 | SYSCALL_DEFINE4(rt_sigaction, int, sig, | 2718 | SYSCALL_DEFINE4(rt_sigaction, int, sig, |
| 2658 | const struct sigaction __user *, act, | 2719 | const struct sigaction __user *, act, |
| 2659 | struct sigaction __user *, oact, | 2720 | struct sigaction __user *, oact, |
| @@ -2740,6 +2801,12 @@ SYSCALL_DEFINE0(pause) | |||
| 2740 | #endif | 2801 | #endif |
| 2741 | 2802 | ||
| 2742 | #ifdef __ARCH_WANT_SYS_RT_SIGSUSPEND | 2803 | #ifdef __ARCH_WANT_SYS_RT_SIGSUSPEND |
| 2804 | /** | ||
| 2805 | * sys_rt_sigsuspend - replace the signal mask for a value with the | ||
| 2806 | * @unewset value until a signal is received | ||
| 2807 | * @unewset: new signal mask value | ||
| 2808 | * @sigsetsize: size of sigset_t type | ||
| 2809 | */ | ||
| 2743 | SYSCALL_DEFINE2(rt_sigsuspend, sigset_t __user *, unewset, size_t, sigsetsize) | 2810 | SYSCALL_DEFINE2(rt_sigsuspend, sigset_t __user *, unewset, size_t, sigsetsize) |
| 2744 | { | 2811 | { |
| 2745 | sigset_t newset; | 2812 | sigset_t newset; |
diff --git a/kernel/softirq.c b/kernel/softirq.c index 735d87095172..174f976c2874 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
| @@ -567,7 +567,7 @@ static void __tasklet_hrtimer_trampoline(unsigned long data) | |||
| 567 | /** | 567 | /** |
| 568 | * tasklet_hrtimer_init - Init a tasklet/hrtimer combo for softirq callbacks | 568 | * tasklet_hrtimer_init - Init a tasklet/hrtimer combo for softirq callbacks |
| 569 | * @ttimer: tasklet_hrtimer which is initialized | 569 | * @ttimer: tasklet_hrtimer which is initialized |
| 570 | * @function: hrtimer callback funtion which gets called from softirq context | 570 | * @function: hrtimer callback function which gets called from softirq context |
| 571 | * @which_clock: clock id (CLOCK_MONOTONIC/CLOCK_REALTIME) | 571 | * @which_clock: clock id (CLOCK_MONOTONIC/CLOCK_REALTIME) |
| 572 | * @mode: hrtimer mode (HRTIMER_MODE_ABS/HRTIMER_MODE_REL) | 572 | * @mode: hrtimer mode (HRTIMER_MODE_ABS/HRTIMER_MODE_REL) |
| 573 | */ | 573 | */ |
diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c index b2fa506667c0..a470154e0408 100644 --- a/kernel/time/jiffies.c +++ b/kernel/time/jiffies.c | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | * inaccuracies caused by missed or lost timer | 34 | * inaccuracies caused by missed or lost timer |
| 35 | * interrupts and the inability for the timer | 35 | * interrupts and the inability for the timer |
| 36 | * interrupt hardware to accuratly tick at the | 36 | * interrupt hardware to accuratly tick at the |
| 37 | * requested HZ value. It is also not reccomended | 37 | * requested HZ value. It is also not recommended |
| 38 | * for "tick-less" systems. | 38 | * for "tick-less" systems. |
| 39 | */ | 39 | */ |
| 40 | #define NSEC_PER_JIFFY ((u32)((((u64)NSEC_PER_SEC)<<8)/ACTHZ)) | 40 | #define NSEC_PER_JIFFY ((u32)((((u64)NSEC_PER_SEC)<<8)/ACTHZ)) |
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index 5f1bb8e2008f..f6117a4c7cb8 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c | |||
| @@ -652,6 +652,8 @@ int do_adjtimex(struct timex *txc) | |||
| 652 | struct timespec delta; | 652 | struct timespec delta; |
| 653 | delta.tv_sec = txc->time.tv_sec; | 653 | delta.tv_sec = txc->time.tv_sec; |
| 654 | delta.tv_nsec = txc->time.tv_usec; | 654 | delta.tv_nsec = txc->time.tv_usec; |
| 655 | if (!capable(CAP_SYS_TIME)) | ||
| 656 | return -EPERM; | ||
| 655 | if (!(txc->modes & ADJ_NANO)) | 657 | if (!(txc->modes & ADJ_NANO)) |
| 656 | delta.tv_nsec *= 1000; | 658 | delta.tv_nsec *= 1000; |
| 657 | result = timekeeping_inject_offset(&delta); | 659 | result = timekeeping_inject_offset(&delta); |
diff --git a/kernel/time/timer_stats.c b/kernel/time/timer_stats.c index 2f3b585b8d7d..a5d0a3a85dd8 100644 --- a/kernel/time/timer_stats.c +++ b/kernel/time/timer_stats.c | |||
| @@ -236,7 +236,7 @@ void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | |||
| 236 | unsigned int timer_flag) | 236 | unsigned int timer_flag) |
| 237 | { | 237 | { |
| 238 | /* | 238 | /* |
| 239 | * It doesnt matter which lock we take: | 239 | * It doesn't matter which lock we take: |
| 240 | */ | 240 | */ |
| 241 | raw_spinlock_t *lock; | 241 | raw_spinlock_t *lock; |
| 242 | struct entry *entry, input; | 242 | struct entry *entry, input; |
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index 7aa40f8e182d..6957aa298dfa 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c | |||
| @@ -850,29 +850,21 @@ static void blk_add_trace_plug(void *ignore, struct request_queue *q) | |||
| 850 | __blk_add_trace(bt, 0, 0, 0, BLK_TA_PLUG, 0, 0, NULL); | 850 | __blk_add_trace(bt, 0, 0, 0, BLK_TA_PLUG, 0, 0, NULL); |
| 851 | } | 851 | } |
| 852 | 852 | ||
| 853 | static void blk_add_trace_unplug_io(void *ignore, struct request_queue *q) | 853 | static void blk_add_trace_unplug(void *ignore, struct request_queue *q, |
| 854 | unsigned int depth, bool explicit) | ||
| 854 | { | 855 | { |
| 855 | struct blk_trace *bt = q->blk_trace; | 856 | struct blk_trace *bt = q->blk_trace; |
| 856 | 857 | ||
| 857 | if (bt) { | 858 | if (bt) { |
| 858 | unsigned int pdu = q->rq.count[READ] + q->rq.count[WRITE]; | 859 | __be64 rpdu = cpu_to_be64(depth); |
| 859 | __be64 rpdu = cpu_to_be64(pdu); | 860 | u32 what; |
| 860 | 861 | ||
| 861 | __blk_add_trace(bt, 0, 0, 0, BLK_TA_UNPLUG_IO, 0, | 862 | if (explicit) |
| 862 | sizeof(rpdu), &rpdu); | 863 | what = BLK_TA_UNPLUG_IO; |
| 863 | } | 864 | else |
| 864 | } | 865 | what = BLK_TA_UNPLUG_TIMER; |
| 865 | |||
| 866 | static void blk_add_trace_unplug_timer(void *ignore, struct request_queue *q) | ||
| 867 | { | ||
| 868 | struct blk_trace *bt = q->blk_trace; | ||
| 869 | |||
| 870 | if (bt) { | ||
| 871 | unsigned int pdu = q->rq.count[READ] + q->rq.count[WRITE]; | ||
| 872 | __be64 rpdu = cpu_to_be64(pdu); | ||
| 873 | 866 | ||
| 874 | __blk_add_trace(bt, 0, 0, 0, BLK_TA_UNPLUG_TIMER, 0, | 867 | __blk_add_trace(bt, 0, 0, 0, what, 0, sizeof(rpdu), &rpdu); |
| 875 | sizeof(rpdu), &rpdu); | ||
| 876 | } | 868 | } |
| 877 | } | 869 | } |
| 878 | 870 | ||
| @@ -1015,9 +1007,7 @@ static void blk_register_tracepoints(void) | |||
| 1015 | WARN_ON(ret); | 1007 | WARN_ON(ret); |
| 1016 | ret = register_trace_block_plug(blk_add_trace_plug, NULL); | 1008 | ret = register_trace_block_plug(blk_add_trace_plug, NULL); |
| 1017 | WARN_ON(ret); | 1009 | WARN_ON(ret); |
| 1018 | ret = register_trace_block_unplug_timer(blk_add_trace_unplug_timer, NULL); | 1010 | ret = register_trace_block_unplug(blk_add_trace_unplug, NULL); |
| 1019 | WARN_ON(ret); | ||
| 1020 | ret = register_trace_block_unplug_io(blk_add_trace_unplug_io, NULL); | ||
| 1021 | WARN_ON(ret); | 1011 | WARN_ON(ret); |
| 1022 | ret = register_trace_block_split(blk_add_trace_split, NULL); | 1012 | ret = register_trace_block_split(blk_add_trace_split, NULL); |
| 1023 | WARN_ON(ret); | 1013 | WARN_ON(ret); |
| @@ -1032,8 +1022,7 @@ static void blk_unregister_tracepoints(void) | |||
| 1032 | unregister_trace_block_rq_remap(blk_add_trace_rq_remap, NULL); | 1022 | unregister_trace_block_rq_remap(blk_add_trace_rq_remap, NULL); |
| 1033 | unregister_trace_block_bio_remap(blk_add_trace_bio_remap, NULL); | 1023 | unregister_trace_block_bio_remap(blk_add_trace_bio_remap, NULL); |
| 1034 | unregister_trace_block_split(blk_add_trace_split, NULL); | 1024 | unregister_trace_block_split(blk_add_trace_split, NULL); |
| 1035 | unregister_trace_block_unplug_io(blk_add_trace_unplug_io, NULL); | 1025 | unregister_trace_block_unplug(blk_add_trace_unplug, NULL); |
| 1036 | unregister_trace_block_unplug_timer(blk_add_trace_unplug_timer, NULL); | ||
| 1037 | unregister_trace_block_plug(blk_add_trace_plug, NULL); | 1026 | unregister_trace_block_plug(blk_add_trace_plug, NULL); |
| 1038 | unregister_trace_block_sleeprq(blk_add_trace_sleeprq, NULL); | 1027 | unregister_trace_block_sleeprq(blk_add_trace_sleeprq, NULL); |
| 1039 | unregister_trace_block_getrq(blk_add_trace_getrq, NULL); | 1028 | unregister_trace_block_getrq(blk_add_trace_getrq, NULL); |
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index c075f4ea6b94..ee24fa1935ac 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
| @@ -1268,7 +1268,7 @@ static int ftrace_update_code(struct module *mod) | |||
| 1268 | p->flags = 0L; | 1268 | p->flags = 0L; |
| 1269 | 1269 | ||
| 1270 | /* | 1270 | /* |
| 1271 | * Do the initial record convertion from mcount jump | 1271 | * Do the initial record conversion from mcount jump |
| 1272 | * to the NOP instructions. | 1272 | * to the NOP instructions. |
| 1273 | */ | 1273 | */ |
| 1274 | if (!ftrace_code_disable(mod, p)) { | 1274 | if (!ftrace_code_disable(mod, p)) { |
| @@ -3425,7 +3425,7 @@ graph_init_task(struct task_struct *t, struct ftrace_ret_stack *ret_stack) | |||
| 3425 | atomic_set(&t->tracing_graph_pause, 0); | 3425 | atomic_set(&t->tracing_graph_pause, 0); |
| 3426 | atomic_set(&t->trace_overrun, 0); | 3426 | atomic_set(&t->trace_overrun, 0); |
| 3427 | t->ftrace_timestamp = 0; | 3427 | t->ftrace_timestamp = 0; |
| 3428 | /* make curr_ret_stack visable before we add the ret_stack */ | 3428 | /* make curr_ret_stack visible before we add the ret_stack */ |
| 3429 | smp_wmb(); | 3429 | smp_wmb(); |
| 3430 | t->ret_stack = ret_stack; | 3430 | t->ret_stack = ret_stack; |
| 3431 | } | 3431 | } |
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index d9c8bcafb120..0ef7b4b2a1f7 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
| @@ -1478,7 +1478,7 @@ static inline unsigned long rb_page_entries(struct buffer_page *bpage) | |||
| 1478 | return local_read(&bpage->entries) & RB_WRITE_MASK; | 1478 | return local_read(&bpage->entries) & RB_WRITE_MASK; |
| 1479 | } | 1479 | } |
| 1480 | 1480 | ||
| 1481 | /* Size is determined by what has been commited */ | 1481 | /* Size is determined by what has been committed */ |
| 1482 | static inline unsigned rb_page_size(struct buffer_page *bpage) | 1482 | static inline unsigned rb_page_size(struct buffer_page *bpage) |
| 1483 | { | 1483 | { |
| 1484 | return rb_page_commit(bpage); | 1484 | return rb_page_commit(bpage); |
| @@ -2932,7 +2932,7 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer) | |||
| 2932 | /* | 2932 | /* |
| 2933 | * cpu_buffer->pages just needs to point to the buffer, it | 2933 | * cpu_buffer->pages just needs to point to the buffer, it |
| 2934 | * has no specific buffer page to point to. Lets move it out | 2934 | * has no specific buffer page to point to. Lets move it out |
| 2935 | * of our way so we don't accidently swap it. | 2935 | * of our way so we don't accidentally swap it. |
| 2936 | */ | 2936 | */ |
| 2937 | cpu_buffer->pages = reader->list.prev; | 2937 | cpu_buffer->pages = reader->list.prev; |
| 2938 | 2938 | ||
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 9541c27c1cf2..d38c16a06a6f 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
| @@ -3239,7 +3239,7 @@ waitagain: | |||
| 3239 | trace_seq_init(&iter->seq); | 3239 | trace_seq_init(&iter->seq); |
| 3240 | 3240 | ||
| 3241 | /* | 3241 | /* |
| 3242 | * If there was nothing to send to user, inspite of consuming trace | 3242 | * If there was nothing to send to user, in spite of consuming trace |
| 3243 | * entries, go back to wait for more entries. | 3243 | * entries, go back to wait for more entries. |
| 3244 | */ | 3244 | */ |
| 3245 | if (sret == -EBUSY) | 3245 | if (sret == -EBUSY) |
diff --git a/kernel/trace/trace_clock.c b/kernel/trace/trace_clock.c index 685a67d55db0..6302747a1398 100644 --- a/kernel/trace/trace_clock.c +++ b/kernel/trace/trace_clock.c | |||
| @@ -46,7 +46,7 @@ u64 notrace trace_clock_local(void) | |||
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | /* | 48 | /* |
| 49 | * trace_clock(): 'inbetween' trace clock. Not completely serialized, | 49 | * trace_clock(): 'between' trace clock. Not completely serialized, |
| 50 | * but not completely incorrect when crossing CPUs either. | 50 | * but not completely incorrect when crossing CPUs either. |
| 51 | * | 51 | * |
| 52 | * This is based on cpu_clock(), which will allow at most ~1 jiffy of | 52 | * This is based on cpu_clock(), which will allow at most ~1 jiffy of |
diff --git a/kernel/trace/trace_entries.h b/kernel/trace/trace_entries.h index 1516cb3ec549..e32744c84d94 100644 --- a/kernel/trace/trace_entries.h +++ b/kernel/trace/trace_entries.h | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | * in the structure. | 27 | * in the structure. |
| 28 | * | 28 | * |
| 29 | * * for structures within structures, the format of the internal | 29 | * * for structures within structures, the format of the internal |
| 30 | * structure is layed out. This allows the internal structure | 30 | * structure is laid out. This allows the internal structure |
| 31 | * to be deciphered for the format file. Although these macros | 31 | * to be deciphered for the format file. Although these macros |
| 32 | * may become out of sync with the internal structure, they | 32 | * may become out of sync with the internal structure, they |
| 33 | * will create a compile error if it happens. Since the | 33 | * will create a compile error if it happens. Since the |
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c index 76b05980225c..962cdb24ed81 100644 --- a/kernel/trace/trace_functions_graph.c +++ b/kernel/trace/trace_functions_graph.c | |||
| @@ -905,7 +905,7 @@ print_graph_prologue(struct trace_iterator *iter, struct trace_seq *s, | |||
| 905 | * | 905 | * |
| 906 | * returns 1 if | 906 | * returns 1 if |
| 907 | * - we are inside irq code | 907 | * - we are inside irq code |
| 908 | * - we just extered irq code | 908 | * - we just entered irq code |
| 909 | * | 909 | * |
| 910 | * retunns 0 if | 910 | * retunns 0 if |
| 911 | * - funcgraph-interrupts option is set | 911 | * - funcgraph-interrupts option is set |
diff --git a/kernel/trace/trace_irqsoff.c b/kernel/trace/trace_irqsoff.c index 92b6e1e12d98..a4969b47afc1 100644 --- a/kernel/trace/trace_irqsoff.c +++ b/kernel/trace/trace_irqsoff.c | |||
| @@ -80,7 +80,7 @@ static struct tracer_flags tracer_flags = { | |||
| 80 | * skip the latency if the sequence has changed - some other section | 80 | * skip the latency if the sequence has changed - some other section |
| 81 | * did a maximum and could disturb our measurement with serial console | 81 | * did a maximum and could disturb our measurement with serial console |
| 82 | * printouts, etc. Truly coinciding maximum latencies should be rare | 82 | * printouts, etc. Truly coinciding maximum latencies should be rare |
| 83 | * and what happens together happens separately as well, so this doesnt | 83 | * and what happens together happens separately as well, so this doesn't |
| 84 | * decrease the validity of the maximum found: | 84 | * decrease the validity of the maximum found: |
| 85 | */ | 85 | */ |
| 86 | static __cacheline_aligned_in_smp unsigned long max_sequence; | 86 | static __cacheline_aligned_in_smp unsigned long max_sequence; |
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index 8435b43b1782..35d55a386145 100644 --- a/kernel/trace/trace_kprobe.c +++ b/kernel/trace/trace_kprobe.c | |||
| @@ -1839,7 +1839,7 @@ static void unregister_probe_event(struct trace_probe *tp) | |||
| 1839 | kfree(tp->call.print_fmt); | 1839 | kfree(tp->call.print_fmt); |
| 1840 | } | 1840 | } |
| 1841 | 1841 | ||
| 1842 | /* Make a debugfs interface for controling probe points */ | 1842 | /* Make a debugfs interface for controlling probe points */ |
| 1843 | static __init int init_kprobe_trace(void) | 1843 | static __init int init_kprobe_trace(void) |
| 1844 | { | 1844 | { |
| 1845 | struct dentry *d_tracer; | 1845 | struct dentry *d_tracer; |
diff --git a/kernel/user-return-notifier.c b/kernel/user-return-notifier.c index eb27fd3430a2..92cb706c7fc8 100644 --- a/kernel/user-return-notifier.c +++ b/kernel/user-return-notifier.c | |||
| @@ -20,7 +20,7 @@ EXPORT_SYMBOL_GPL(user_return_notifier_register); | |||
| 20 | 20 | ||
| 21 | /* | 21 | /* |
| 22 | * Removes a registered user return notifier. Must be called from atomic | 22 | * Removes a registered user return notifier. Must be called from atomic |
| 23 | * context, and from the same cpu registration occured in. | 23 | * context, and from the same cpu registration occurred in. |
| 24 | */ | 24 | */ |
| 25 | void user_return_notifier_unregister(struct user_return_notifier *urn) | 25 | void user_return_notifier_unregister(struct user_return_notifier *urn) |
| 26 | { | 26 | { |
diff --git a/kernel/wait.c b/kernel/wait.c index b0310eb6cc1e..f45ea8d2a1ce 100644 --- a/kernel/wait.c +++ b/kernel/wait.c | |||
| @@ -142,7 +142,7 @@ EXPORT_SYMBOL(finish_wait); | |||
| 142 | * woken up through the queue. | 142 | * woken up through the queue. |
| 143 | * | 143 | * |
| 144 | * This prevents waiter starvation where an exclusive waiter | 144 | * This prevents waiter starvation where an exclusive waiter |
| 145 | * aborts and is woken up concurrently and noone wakes up | 145 | * aborts and is woken up concurrently and no one wakes up |
| 146 | * the next waiter. | 146 | * the next waiter. |
| 147 | */ | 147 | */ |
| 148 | void abort_exclusive_wait(wait_queue_head_t *q, wait_queue_t *wait, | 148 | void abort_exclusive_wait(wait_queue_head_t *q, wait_queue_t *wait, |
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 04ef830690ec..8859a41806dd 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
| @@ -1291,7 +1291,7 @@ __acquires(&gcwq->lock) | |||
| 1291 | return true; | 1291 | return true; |
| 1292 | spin_unlock_irq(&gcwq->lock); | 1292 | spin_unlock_irq(&gcwq->lock); |
| 1293 | 1293 | ||
| 1294 | /* CPU has come up inbetween, retry migration */ | 1294 | /* CPU has come up in between, retry migration */ |
| 1295 | cpu_relax(); | 1295 | cpu_relax(); |
| 1296 | } | 1296 | } |
| 1297 | } | 1297 | } |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index df9234c5f9d1..c768bcdda1b7 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -434,11 +434,9 @@ config DEBUG_KMEMLEAK_EARLY_LOG_SIZE | |||
| 434 | 434 | ||
| 435 | config DEBUG_KMEMLEAK_TEST | 435 | config DEBUG_KMEMLEAK_TEST |
| 436 | tristate "Simple test for the kernel memory leak detector" | 436 | tristate "Simple test for the kernel memory leak detector" |
| 437 | depends on DEBUG_KMEMLEAK | 437 | depends on DEBUG_KMEMLEAK && m |
| 438 | help | 438 | help |
| 439 | Say Y or M here to build a test for the kernel memory leak | 439 | This option enables a module that explicitly leaks memory. |
| 440 | detector. This option enables a module that explicitly leaks | ||
| 441 | memory. | ||
| 442 | 440 | ||
| 443 | If unsure, say N. | 441 | If unsure, say N. |
| 444 | 442 | ||
diff --git a/lib/bitmap.c b/lib/bitmap.c index 741fae905ae3..91e0ccfdb424 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c | |||
| @@ -830,7 +830,7 @@ EXPORT_SYMBOL(bitmap_bitremap); | |||
| 830 | * @orig (i.e. bits 3, 5, 7 and 9) were also set. | 830 | * @orig (i.e. bits 3, 5, 7 and 9) were also set. |
| 831 | * | 831 | * |
| 832 | * When bit 11 is set in @orig, it means turn on the bit in | 832 | * When bit 11 is set in @orig, it means turn on the bit in |
| 833 | * @dst corresponding to whatever is the twelth bit that is | 833 | * @dst corresponding to whatever is the twelfth bit that is |
| 834 | * turned on in @relmap. In the above example, there were | 834 | * turned on in @relmap. In the above example, there were |
| 835 | * only ten bits turned on in @relmap (30..39), so that bit | 835 | * only ten bits turned on in @relmap (30..39), so that bit |
| 836 | * 11 was set in @orig had no affect on @dst. | 836 | * 11 was set in @orig had no affect on @dst. |
diff --git a/lib/btree.c b/lib/btree.c index c9c6f0351526..2a34392bcecc 100644 --- a/lib/btree.c +++ b/lib/btree.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | * see http://programming.kicks-ass.net/kernel-patches/vma_lookup/btree.patch | 11 | * see http://programming.kicks-ass.net/kernel-patches/vma_lookup/btree.patch |
| 12 | * | 12 | * |
| 13 | * A relatively simple B+Tree implementation. I have written it as a learning | 13 | * A relatively simple B+Tree implementation. I have written it as a learning |
| 14 | * excercise to understand how B+Trees work. Turned out to be useful as well. | 14 | * exercise to understand how B+Trees work. Turned out to be useful as well. |
| 15 | * | 15 | * |
| 16 | * B+Trees can be used similar to Linux radix trees (which don't have anything | 16 | * B+Trees can be used similar to Linux radix trees (which don't have anything |
| 17 | * in common with textbook radix trees, beware). Prerequisite for them working | 17 | * in common with textbook radix trees, beware). Prerequisite for them working |
| @@ -541,7 +541,7 @@ static void rebalance(struct btree_head *head, struct btree_geo *geo, | |||
| 541 | int i, no_left, no_right; | 541 | int i, no_left, no_right; |
| 542 | 542 | ||
| 543 | if (fill == 0) { | 543 | if (fill == 0) { |
| 544 | /* Because we don't steal entries from a neigbour, this case | 544 | /* Because we don't steal entries from a neighbour, this case |
| 545 | * can happen. Parent node contains a single child, this | 545 | * can happen. Parent node contains a single child, this |
| 546 | * node, so merging with a sibling never happens. | 546 | * node, so merging with a sibling never happens. |
| 547 | */ | 547 | */ |
diff --git a/lib/decompress_unxz.c b/lib/decompress_unxz.c index cecd23df2b9a..9f34eb56854d 100644 --- a/lib/decompress_unxz.c +++ b/lib/decompress_unxz.c | |||
| @@ -83,7 +83,7 @@ | |||
| 83 | * safety_margin = 128 + uncompressed_size * 8 / 32768 + 65536 | 83 | * safety_margin = 128 + uncompressed_size * 8 / 32768 + 65536 |
| 84 | * = 128 + (uncompressed_size >> 12) + 65536 | 84 | * = 128 + (uncompressed_size >> 12) + 65536 |
| 85 | * | 85 | * |
| 86 | * For comparision, according to arch/x86/boot/compressed/misc.c, the | 86 | * For comparison, according to arch/x86/boot/compressed/misc.c, the |
| 87 | * equivalent formula for Deflate is this: | 87 | * equivalent formula for Deflate is this: |
| 88 | * | 88 | * |
| 89 | * safety_margin = 18 + (uncompressed_size >> 12) + 32768 | 89 | * safety_margin = 18 + (uncompressed_size >> 12) + 32768 |
diff --git a/lib/kstrtox.c b/lib/kstrtox.c index 05672e819f8c..a235f3cc471c 100644 --- a/lib/kstrtox.c +++ b/lib/kstrtox.c | |||
| @@ -49,12 +49,9 @@ static int _kstrtoull(const char *s, unsigned int base, unsigned long long *res) | |||
| 49 | val = *s - '0'; | 49 | val = *s - '0'; |
| 50 | else if ('a' <= _tolower(*s) && _tolower(*s) <= 'f') | 50 | else if ('a' <= _tolower(*s) && _tolower(*s) <= 'f') |
| 51 | val = _tolower(*s) - 'a' + 10; | 51 | val = _tolower(*s) - 'a' + 10; |
| 52 | else if (*s == '\n') { | 52 | else if (*s == '\n' && *(s + 1) == '\0') |
| 53 | if (*(s + 1) == '\0') | 53 | break; |
| 54 | break; | 54 | else |
| 55 | else | ||
| 56 | return -EINVAL; | ||
| 57 | } else | ||
| 58 | return -EINVAL; | 55 | return -EINVAL; |
| 59 | 56 | ||
| 60 | if (val >= base) | 57 | if (val >= base) |
diff --git a/lib/parser.c b/lib/parser.c index 6e89eca5cca0..dcbaaef6cf11 100644 --- a/lib/parser.c +++ b/lib/parser.c | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | 13 | ||
| 14 | /** | 14 | /** |
| 15 | * match_one: - Determines if a string matches a simple pattern | 15 | * match_one: - Determines if a string matches a simple pattern |
| 16 | * @s: the string to examine for presense of the pattern | 16 | * @s: the string to examine for presence of the pattern |
| 17 | * @p: the string containing the pattern | 17 | * @p: the string containing the pattern |
| 18 | * @args: array of %MAX_OPT_ARGS &substring_t elements. Used to return match | 18 | * @args: array of %MAX_OPT_ARGS &substring_t elements. Used to return match |
| 19 | * locations. | 19 | * locations. |
diff --git a/lib/test-kstrtox.c b/lib/test-kstrtox.c index 325c2f9ecebd..d55769d63cb8 100644 --- a/lib/test-kstrtox.c +++ b/lib/test-kstrtox.c | |||
| @@ -315,12 +315,12 @@ static void __init test_kstrtou64_ok(void) | |||
| 315 | {"65537", 10, 65537}, | 315 | {"65537", 10, 65537}, |
| 316 | {"2147483646", 10, 2147483646}, | 316 | {"2147483646", 10, 2147483646}, |
| 317 | {"2147483647", 10, 2147483647}, | 317 | {"2147483647", 10, 2147483647}, |
| 318 | {"2147483648", 10, 2147483648}, | 318 | {"2147483648", 10, 2147483648ULL}, |
| 319 | {"2147483649", 10, 2147483649}, | 319 | {"2147483649", 10, 2147483649ULL}, |
| 320 | {"4294967294", 10, 4294967294}, | 320 | {"4294967294", 10, 4294967294ULL}, |
| 321 | {"4294967295", 10, 4294967295}, | 321 | {"4294967295", 10, 4294967295ULL}, |
| 322 | {"4294967296", 10, 4294967296}, | 322 | {"4294967296", 10, 4294967296ULL}, |
| 323 | {"4294967297", 10, 4294967297}, | 323 | {"4294967297", 10, 4294967297ULL}, |
| 324 | {"9223372036854775806", 10, 9223372036854775806ULL}, | 324 | {"9223372036854775806", 10, 9223372036854775806ULL}, |
| 325 | {"9223372036854775807", 10, 9223372036854775807ULL}, | 325 | {"9223372036854775807", 10, 9223372036854775807ULL}, |
| 326 | {"9223372036854775808", 10, 9223372036854775808ULL}, | 326 | {"9223372036854775808", 10, 9223372036854775808ULL}, |
| @@ -369,12 +369,12 @@ static void __init test_kstrtos64_ok(void) | |||
| 369 | {"65537", 10, 65537}, | 369 | {"65537", 10, 65537}, |
| 370 | {"2147483646", 10, 2147483646}, | 370 | {"2147483646", 10, 2147483646}, |
| 371 | {"2147483647", 10, 2147483647}, | 371 | {"2147483647", 10, 2147483647}, |
| 372 | {"2147483648", 10, 2147483648}, | 372 | {"2147483648", 10, 2147483648LL}, |
| 373 | {"2147483649", 10, 2147483649}, | 373 | {"2147483649", 10, 2147483649LL}, |
| 374 | {"4294967294", 10, 4294967294}, | 374 | {"4294967294", 10, 4294967294LL}, |
| 375 | {"4294967295", 10, 4294967295}, | 375 | {"4294967295", 10, 4294967295LL}, |
| 376 | {"4294967296", 10, 4294967296}, | 376 | {"4294967296", 10, 4294967296LL}, |
| 377 | {"4294967297", 10, 4294967297}, | 377 | {"4294967297", 10, 4294967297LL}, |
| 378 | {"9223372036854775806", 10, 9223372036854775806LL}, | 378 | {"9223372036854775806", 10, 9223372036854775806LL}, |
| 379 | {"9223372036854775807", 10, 9223372036854775807LL}, | 379 | {"9223372036854775807", 10, 9223372036854775807LL}, |
| 380 | }; | 380 | }; |
| @@ -418,10 +418,10 @@ static void __init test_kstrtou32_ok(void) | |||
| 418 | {"65537", 10, 65537}, | 418 | {"65537", 10, 65537}, |
| 419 | {"2147483646", 10, 2147483646}, | 419 | {"2147483646", 10, 2147483646}, |
| 420 | {"2147483647", 10, 2147483647}, | 420 | {"2147483647", 10, 2147483647}, |
| 421 | {"2147483648", 10, 2147483648}, | 421 | {"2147483648", 10, 2147483648U}, |
| 422 | {"2147483649", 10, 2147483649}, | 422 | {"2147483649", 10, 2147483649U}, |
| 423 | {"4294967294", 10, 4294967294}, | 423 | {"4294967294", 10, 4294967294U}, |
| 424 | {"4294967295", 10, 4294967295}, | 424 | {"4294967295", 10, 4294967295U}, |
| 425 | }; | 425 | }; |
| 426 | TEST_OK(kstrtou32, u32, "%u", test_u32_ok); | 426 | TEST_OK(kstrtou32, u32, "%u", test_u32_ok); |
| 427 | } | 427 | } |
diff --git a/lib/timerqueue.c b/lib/timerqueue.c index e3a1050e6820..191176a43e9a 100644 --- a/lib/timerqueue.c +++ b/lib/timerqueue.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * Uses rbtrees for quick list adds and expiration. | 5 | * Uses rbtrees for quick list adds and expiration. |
| 6 | * | 6 | * |
| 7 | * NOTE: All of the following functions need to be serialized | 7 | * NOTE: All of the following functions need to be serialized |
| 8 | * to avoid races. No locking is done by this libary code. | 8 | * to avoid races. No locking is done by this library code. |
| 9 | * | 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License as published by | 11 | * it under the terms of the GNU General Public License as published by |
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 0d9a036ada66..befc87531e4f 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c | |||
| @@ -787,7 +787,7 @@ EXPORT_SYMBOL(congestion_wait); | |||
| 787 | * jiffies for either a BDI to exit congestion of the given @sync queue | 787 | * jiffies for either a BDI to exit congestion of the given @sync queue |
| 788 | * or a write to complete. | 788 | * or a write to complete. |
| 789 | * | 789 | * |
| 790 | * In the absense of zone congestion, cond_resched() is called to yield | 790 | * In the absence of zone congestion, cond_resched() is called to yield |
| 791 | * the processor if necessary but otherwise does not sleep. | 791 | * the processor if necessary but otherwise does not sleep. |
| 792 | * | 792 | * |
| 793 | * The return value is 0 if the sleep is for the full timeout. Otherwise, | 793 | * The return value is 0 if the sleep is for the full timeout. Otherwise, |
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 0a619e0e2e0b..470dcda10add 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c | |||
| @@ -244,24 +244,28 @@ static ssize_t single_flag_show(struct kobject *kobj, | |||
| 244 | struct kobj_attribute *attr, char *buf, | 244 | struct kobj_attribute *attr, char *buf, |
| 245 | enum transparent_hugepage_flag flag) | 245 | enum transparent_hugepage_flag flag) |
| 246 | { | 246 | { |
| 247 | if (test_bit(flag, &transparent_hugepage_flags)) | 247 | return sprintf(buf, "%d\n", |
| 248 | return sprintf(buf, "[yes] no\n"); | 248 | !!test_bit(flag, &transparent_hugepage_flags)); |
| 249 | else | ||
| 250 | return sprintf(buf, "yes [no]\n"); | ||
| 251 | } | 249 | } |
| 250 | |||
| 252 | static ssize_t single_flag_store(struct kobject *kobj, | 251 | static ssize_t single_flag_store(struct kobject *kobj, |
| 253 | struct kobj_attribute *attr, | 252 | struct kobj_attribute *attr, |
| 254 | const char *buf, size_t count, | 253 | const char *buf, size_t count, |
| 255 | enum transparent_hugepage_flag flag) | 254 | enum transparent_hugepage_flag flag) |
| 256 | { | 255 | { |
| 257 | if (!memcmp("yes", buf, | 256 | unsigned long value; |
| 258 | min(sizeof("yes")-1, count))) { | 257 | int ret; |
| 258 | |||
| 259 | ret = kstrtoul(buf, 10, &value); | ||
| 260 | if (ret < 0) | ||
| 261 | return ret; | ||
| 262 | if (value > 1) | ||
| 263 | return -EINVAL; | ||
| 264 | |||
| 265 | if (value) | ||
| 259 | set_bit(flag, &transparent_hugepage_flags); | 266 | set_bit(flag, &transparent_hugepage_flags); |
| 260 | } else if (!memcmp("no", buf, | 267 | else |
| 261 | min(sizeof("no")-1, count))) { | ||
| 262 | clear_bit(flag, &transparent_hugepage_flags); | 268 | clear_bit(flag, &transparent_hugepage_flags); |
| 263 | } else | ||
| 264 | return -EINVAL; | ||
| 265 | 269 | ||
| 266 | return count; | 270 | return count; |
| 267 | } | 271 | } |
| @@ -680,8 +684,11 @@ int do_huge_pmd_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
| 680 | return VM_FAULT_OOM; | 684 | return VM_FAULT_OOM; |
| 681 | page = alloc_hugepage_vma(transparent_hugepage_defrag(vma), | 685 | page = alloc_hugepage_vma(transparent_hugepage_defrag(vma), |
| 682 | vma, haddr, numa_node_id(), 0); | 686 | vma, haddr, numa_node_id(), 0); |
| 683 | if (unlikely(!page)) | 687 | if (unlikely(!page)) { |
| 688 | count_vm_event(THP_FAULT_FALLBACK); | ||
| 684 | goto out; | 689 | goto out; |
| 690 | } | ||
| 691 | count_vm_event(THP_FAULT_ALLOC); | ||
| 685 | if (unlikely(mem_cgroup_newpage_charge(page, mm, GFP_KERNEL))) { | 692 | if (unlikely(mem_cgroup_newpage_charge(page, mm, GFP_KERNEL))) { |
| 686 | put_page(page); | 693 | put_page(page); |
| 687 | goto out; | 694 | goto out; |
| @@ -909,11 +916,13 @@ int do_huge_pmd_wp_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
| 909 | new_page = NULL; | 916 | new_page = NULL; |
| 910 | 917 | ||
| 911 | if (unlikely(!new_page)) { | 918 | if (unlikely(!new_page)) { |
| 919 | count_vm_event(THP_FAULT_FALLBACK); | ||
| 912 | ret = do_huge_pmd_wp_page_fallback(mm, vma, address, | 920 | ret = do_huge_pmd_wp_page_fallback(mm, vma, address, |
| 913 | pmd, orig_pmd, page, haddr); | 921 | pmd, orig_pmd, page, haddr); |
| 914 | put_page(page); | 922 | put_page(page); |
| 915 | goto out; | 923 | goto out; |
| 916 | } | 924 | } |
| 925 | count_vm_event(THP_FAULT_ALLOC); | ||
| 917 | 926 | ||
| 918 | if (unlikely(mem_cgroup_newpage_charge(new_page, mm, GFP_KERNEL))) { | 927 | if (unlikely(mem_cgroup_newpage_charge(new_page, mm, GFP_KERNEL))) { |
| 919 | put_page(new_page); | 928 | put_page(new_page); |
| @@ -1390,6 +1399,7 @@ int split_huge_page(struct page *page) | |||
| 1390 | 1399 | ||
| 1391 | BUG_ON(!PageSwapBacked(page)); | 1400 | BUG_ON(!PageSwapBacked(page)); |
| 1392 | __split_huge_page(page, anon_vma); | 1401 | __split_huge_page(page, anon_vma); |
| 1402 | count_vm_event(THP_SPLIT); | ||
| 1393 | 1403 | ||
| 1394 | BUG_ON(PageCompound(page)); | 1404 | BUG_ON(PageCompound(page)); |
| 1395 | out_unlock: | 1405 | out_unlock: |
| @@ -1784,9 +1794,11 @@ static void collapse_huge_page(struct mm_struct *mm, | |||
| 1784 | node, __GFP_OTHER_NODE); | 1794 | node, __GFP_OTHER_NODE); |
| 1785 | if (unlikely(!new_page)) { | 1795 | if (unlikely(!new_page)) { |
| 1786 | up_read(&mm->mmap_sem); | 1796 | up_read(&mm->mmap_sem); |
| 1797 | count_vm_event(THP_COLLAPSE_ALLOC_FAILED); | ||
| 1787 | *hpage = ERR_PTR(-ENOMEM); | 1798 | *hpage = ERR_PTR(-ENOMEM); |
| 1788 | return; | 1799 | return; |
| 1789 | } | 1800 | } |
| 1801 | count_vm_event(THP_COLLAPSE_ALLOC); | ||
| 1790 | if (unlikely(mem_cgroup_newpage_charge(new_page, mm, GFP_KERNEL))) { | 1802 | if (unlikely(mem_cgroup_newpage_charge(new_page, mm, GFP_KERNEL))) { |
| 1791 | up_read(&mm->mmap_sem); | 1803 | up_read(&mm->mmap_sem); |
| 1792 | put_page(new_page); | 1804 | put_page(new_page); |
| @@ -2151,8 +2163,11 @@ static void khugepaged_do_scan(struct page **hpage) | |||
| 2151 | #ifndef CONFIG_NUMA | 2163 | #ifndef CONFIG_NUMA |
| 2152 | if (!*hpage) { | 2164 | if (!*hpage) { |
| 2153 | *hpage = alloc_hugepage(khugepaged_defrag()); | 2165 | *hpage = alloc_hugepage(khugepaged_defrag()); |
| 2154 | if (unlikely(!*hpage)) | 2166 | if (unlikely(!*hpage)) { |
| 2167 | count_vm_event(THP_COLLAPSE_ALLOC_FAILED); | ||
| 2155 | break; | 2168 | break; |
| 2169 | } | ||
| 2170 | count_vm_event(THP_COLLAPSE_ALLOC); | ||
| 2156 | } | 2171 | } |
| 2157 | #else | 2172 | #else |
| 2158 | if (IS_ERR(*hpage)) | 2173 | if (IS_ERR(*hpage)) |
| @@ -2192,8 +2207,11 @@ static struct page *khugepaged_alloc_hugepage(void) | |||
| 2192 | 2207 | ||
| 2193 | do { | 2208 | do { |
| 2194 | hpage = alloc_hugepage(khugepaged_defrag()); | 2209 | hpage = alloc_hugepage(khugepaged_defrag()); |
| 2195 | if (!hpage) | 2210 | if (!hpage) { |
| 2211 | count_vm_event(THP_COLLAPSE_ALLOC_FAILED); | ||
| 2196 | khugepaged_alloc_sleep(); | 2212 | khugepaged_alloc_sleep(); |
| 2213 | } else | ||
| 2214 | count_vm_event(THP_COLLAPSE_ALLOC); | ||
| 2197 | } while (unlikely(!hpage) && | 2215 | } while (unlikely(!hpage) && |
| 2198 | likely(khugepaged_enabled())); | 2216 | likely(khugepaged_enabled())); |
| 2199 | return hpage; | 2217 | return hpage; |
| @@ -2210,8 +2228,11 @@ static void khugepaged_loop(void) | |||
| 2210 | while (likely(khugepaged_enabled())) { | 2228 | while (likely(khugepaged_enabled())) { |
| 2211 | #ifndef CONFIG_NUMA | 2229 | #ifndef CONFIG_NUMA |
| 2212 | hpage = khugepaged_alloc_hugepage(); | 2230 | hpage = khugepaged_alloc_hugepage(); |
| 2213 | if (unlikely(!hpage)) | 2231 | if (unlikely(!hpage)) { |
| 2232 | count_vm_event(THP_COLLAPSE_ALLOC_FAILED); | ||
| 2214 | break; | 2233 | break; |
| 2234 | } | ||
| 2235 | count_vm_event(THP_COLLAPSE_ALLOC); | ||
| 2215 | #else | 2236 | #else |
| 2216 | if (IS_ERR(hpage)) { | 2237 | if (IS_ERR(hpage)) { |
| 2217 | khugepaged_alloc_sleep(); | 2238 | khugepaged_alloc_sleep(); |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 06de5aa4d644..8ee3bd8ec5b5 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
| @@ -146,7 +146,7 @@ static long region_chg(struct list_head *head, long f, long t) | |||
| 146 | if (rg->from > t) | 146 | if (rg->from > t) |
| 147 | return chg; | 147 | return chg; |
| 148 | 148 | ||
| 149 | /* We overlap with this area, if it extends futher than | 149 | /* We overlap with this area, if it extends further than |
| 150 | * us then we must extend ourselves. Account for its | 150 | * us then we must extend ourselves. Account for its |
| 151 | * existing reservation. */ | 151 | * existing reservation. */ |
| 152 | if (rg->to > t) { | 152 | if (rg->to > t) { |
| @@ -842,7 +842,7 @@ struct page *alloc_huge_page_node(struct hstate *h, int nid) | |||
| 842 | } | 842 | } |
| 843 | 843 | ||
| 844 | /* | 844 | /* |
| 845 | * Increase the hugetlb pool such that it can accomodate a reservation | 845 | * Increase the hugetlb pool such that it can accommodate a reservation |
| 846 | * of size 'delta'. | 846 | * of size 'delta'. |
| 847 | */ | 847 | */ |
| 848 | static int gather_surplus_pages(struct hstate *h, int delta) | 848 | static int gather_surplus_pages(struct hstate *h, int delta) |
| @@ -890,7 +890,7 @@ retry: | |||
| 890 | 890 | ||
| 891 | /* | 891 | /* |
| 892 | * The surplus_list now contains _at_least_ the number of extra pages | 892 | * The surplus_list now contains _at_least_ the number of extra pages |
| 893 | * needed to accomodate the reservation. Add the appropriate number | 893 | * needed to accommodate the reservation. Add the appropriate number |
| 894 | * of pages to the hugetlb pool and free the extras back to the buddy | 894 | * of pages to the hugetlb pool and free the extras back to the buddy |
| 895 | * allocator. Commit the entire reservation here to prevent another | 895 | * allocator. Commit the entire reservation here to prevent another |
| 896 | * process from stealing the pages as they are added to the pool but | 896 | * process from stealing the pages as they are added to the pool but |
| @@ -2043,7 +2043,7 @@ static void hugetlb_vm_op_open(struct vm_area_struct *vma) | |||
| 2043 | * This new VMA should share its siblings reservation map if present. | 2043 | * This new VMA should share its siblings reservation map if present. |
| 2044 | * The VMA will only ever have a valid reservation map pointer where | 2044 | * The VMA will only ever have a valid reservation map pointer where |
| 2045 | * it is being copied for another still existing VMA. As that VMA | 2045 | * it is being copied for another still existing VMA. As that VMA |
| 2046 | * has a reference to the reservation map it cannot dissappear until | 2046 | * has a reference to the reservation map it cannot disappear until |
| 2047 | * after this open call completes. It is therefore safe to take a | 2047 | * after this open call completes. It is therefore safe to take a |
| 2048 | * new reference here without additional locking. | 2048 | * new reference here without additional locking. |
| 2049 | */ | 2049 | */ |
| @@ -2490,7 +2490,7 @@ static int hugetlb_no_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
| 2490 | /* | 2490 | /* |
| 2491 | * Currently, we are forced to kill the process in the event the | 2491 | * Currently, we are forced to kill the process in the event the |
| 2492 | * original mapper has unmapped pages from the child due to a failed | 2492 | * original mapper has unmapped pages from the child due to a failed |
| 2493 | * COW. Warn that such a situation has occured as it may not be obvious | 2493 | * COW. Warn that such a situation has occurred as it may not be obvious |
| 2494 | */ | 2494 | */ |
| 2495 | if (is_vma_resv_set(vma, HPAGE_RESV_UNMAPPED)) { | 2495 | if (is_vma_resv_set(vma, HPAGE_RESV_UNMAPPED)) { |
| 2496 | printk(KERN_WARNING | 2496 | printk(KERN_WARNING |
diff --git a/mm/hwpoison-inject.c b/mm/hwpoison-inject.c index 0948f1072d6b..c7fc7fd00e32 100644 --- a/mm/hwpoison-inject.c +++ b/mm/hwpoison-inject.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Inject a hwpoison memory failure on a arbitary pfn */ | 1 | /* Inject a hwpoison memory failure on a arbitrary pfn */ |
| 2 | #include <linux/module.h> | 2 | #include <linux/module.h> |
| 3 | #include <linux/debugfs.h> | 3 | #include <linux/debugfs.h> |
| 4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
diff --git a/mm/internal.h b/mm/internal.h index 3438dd43a062..9d0ced8e505e 100644 --- a/mm/internal.h +++ b/mm/internal.h | |||
| @@ -162,7 +162,7 @@ static inline struct page *mem_map_offset(struct page *base, int offset) | |||
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | /* | 164 | /* |
| 165 | * Iterator over all subpages withing the maximally aligned gigantic | 165 | * Iterator over all subpages within the maximally aligned gigantic |
| 166 | * page 'base'. Handle any discontiguity in the mem_map. | 166 | * page 'base'. Handle any discontiguity in the mem_map. |
| 167 | */ | 167 | */ |
| 168 | static inline struct page *mem_map_next(struct page *iter, | 168 | static inline struct page *mem_map_next(struct page *iter, |
diff --git a/mm/kmemleak.c b/mm/kmemleak.c index 84225f3b7190..c1d5867543e4 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c | |||
| @@ -265,7 +265,7 @@ static void kmemleak_disable(void); | |||
| 265 | } while (0) | 265 | } while (0) |
| 266 | 266 | ||
| 267 | /* | 267 | /* |
| 268 | * Macro invoked when a serious kmemleak condition occured and cannot be | 268 | * Macro invoked when a serious kmemleak condition occurred and cannot be |
| 269 | * recovered from. Kmemleak will be disabled and further allocation/freeing | 269 | * recovered from. Kmemleak will be disabled and further allocation/freeing |
| 270 | * tracing no longer available. | 270 | * tracing no longer available. |
| 271 | */ | 271 | */ |
| @@ -1006,7 +1006,7 @@ static bool update_checksum(struct kmemleak_object *object) | |||
| 1006 | 1006 | ||
| 1007 | /* | 1007 | /* |
| 1008 | * Memory scanning is a long process and it needs to be interruptable. This | 1008 | * Memory scanning is a long process and it needs to be interruptable. This |
| 1009 | * function checks whether such interrupt condition occured. | 1009 | * function checks whether such interrupt condition occurred. |
| 1010 | */ | 1010 | */ |
| 1011 | static int scan_should_stop(void) | 1011 | static int scan_should_stop(void) |
| 1012 | { | 1012 | { |
| @@ -1733,7 +1733,7 @@ static int __init kmemleak_late_init(void) | |||
| 1733 | 1733 | ||
| 1734 | if (atomic_read(&kmemleak_error)) { | 1734 | if (atomic_read(&kmemleak_error)) { |
| 1735 | /* | 1735 | /* |
| 1736 | * Some error occured and kmemleak was disabled. There is a | 1736 | * Some error occurred and kmemleak was disabled. There is a |
| 1737 | * small chance that kmemleak_disable() was called immediately | 1737 | * small chance that kmemleak_disable() was called immediately |
| 1738 | * after setting kmemleak_initialized and we may end up with | 1738 | * after setting kmemleak_initialized and we may end up with |
| 1739 | * two clean-up threads but serialized by scan_mutex. | 1739 | * two clean-up threads but serialized by scan_mutex. |
| @@ -720,7 +720,7 @@ static int write_protect_page(struct vm_area_struct *vma, struct page *page, | |||
| 720 | swapped = PageSwapCache(page); | 720 | swapped = PageSwapCache(page); |
| 721 | flush_cache_page(vma, addr, page_to_pfn(page)); | 721 | flush_cache_page(vma, addr, page_to_pfn(page)); |
| 722 | /* | 722 | /* |
| 723 | * Ok this is tricky, when get_user_pages_fast() run it doesnt | 723 | * Ok this is tricky, when get_user_pages_fast() run it doesn't |
| 724 | * take any lock, therefore the check that we are going to make | 724 | * take any lock, therefore the check that we are going to make |
| 725 | * with the pagecount against the mapcount is racey and | 725 | * with the pagecount against the mapcount is racey and |
| 726 | * O_DIRECT can happen right after the check. | 726 | * O_DIRECT can happen right after the check. |
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 1f0b460fe58c..010f9166fa6e 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
| @@ -1466,7 +1466,7 @@ static int mem_cgroup_hierarchical_reclaim(struct mem_cgroup *root_mem, | |||
| 1466 | break; | 1466 | break; |
| 1467 | } | 1467 | } |
| 1468 | /* | 1468 | /* |
| 1469 | * We want to do more targetted reclaim. | 1469 | * We want to do more targeted reclaim. |
| 1470 | * excess >> 2 is not to excessive so as to | 1470 | * excess >> 2 is not to excessive so as to |
| 1471 | * reclaim too much, nor too less that we keep | 1471 | * reclaim too much, nor too less that we keep |
| 1472 | * coming back to reclaim from this cgroup | 1472 | * coming back to reclaim from this cgroup |
| @@ -2265,7 +2265,7 @@ void mem_cgroup_split_huge_fixup(struct page *head, struct page *tail) | |||
| 2265 | * - compound_lock is held when nr_pages > 1 | 2265 | * - compound_lock is held when nr_pages > 1 |
| 2266 | * | 2266 | * |
| 2267 | * This function doesn't do "charge" nor css_get to new cgroup. It should be | 2267 | * This function doesn't do "charge" nor css_get to new cgroup. It should be |
| 2268 | * done by a caller(__mem_cgroup_try_charge would be usefull). If @uncharge is | 2268 | * done by a caller(__mem_cgroup_try_charge would be useful). If @uncharge is |
| 2269 | * true, this function does "uncharge" from old cgroup, but it doesn't if | 2269 | * true, this function does "uncharge" from old cgroup, but it doesn't if |
| 2270 | * @uncharge is false, so a caller should do "uncharge". | 2270 | * @uncharge is false, so a caller should do "uncharge". |
| 2271 | */ | 2271 | */ |
| @@ -2318,7 +2318,7 @@ static int mem_cgroup_move_account(struct page *page, | |||
| 2318 | * We charges against "to" which may not have any tasks. Then, "to" | 2318 | * We charges against "to" which may not have any tasks. Then, "to" |
| 2319 | * can be under rmdir(). But in current implementation, caller of | 2319 | * can be under rmdir(). But in current implementation, caller of |
| 2320 | * this function is just force_empty() and move charge, so it's | 2320 | * this function is just force_empty() and move charge, so it's |
| 2321 | * garanteed that "to" is never removed. So, we don't check rmdir | 2321 | * guaranteed that "to" is never removed. So, we don't check rmdir |
| 2322 | * status here. | 2322 | * status here. |
| 2323 | */ | 2323 | */ |
| 2324 | move_unlock_page_cgroup(pc, &flags); | 2324 | move_unlock_page_cgroup(pc, &flags); |
| @@ -2648,7 +2648,7 @@ static void mem_cgroup_do_uncharge(struct mem_cgroup *mem, | |||
| 2648 | batch->memcg = mem; | 2648 | batch->memcg = mem; |
| 2649 | /* | 2649 | /* |
| 2650 | * do_batch > 0 when unmapping pages or inode invalidate/truncate. | 2650 | * do_batch > 0 when unmapping pages or inode invalidate/truncate. |
| 2651 | * In those cases, all pages freed continously can be expected to be in | 2651 | * In those cases, all pages freed continuously can be expected to be in |
| 2652 | * the same cgroup and we have chance to coalesce uncharges. | 2652 | * the same cgroup and we have chance to coalesce uncharges. |
| 2653 | * But we do uncharge one by one if this is killed by OOM(TIF_MEMDIE) | 2653 | * But we do uncharge one by one if this is killed by OOM(TIF_MEMDIE) |
| 2654 | * because we want to do uncharge as soon as possible. | 2654 | * because we want to do uncharge as soon as possible. |
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 37feb9fec228..2b9a5eef39e0 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
| @@ -208,7 +208,7 @@ static int kill_proc_ao(struct task_struct *t, unsigned long addr, int trapno, | |||
| 208 | * Don't use force here, it's convenient if the signal | 208 | * Don't use force here, it's convenient if the signal |
| 209 | * can be temporarily blocked. | 209 | * can be temporarily blocked. |
| 210 | * This could cause a loop when the user sets SIGBUS | 210 | * This could cause a loop when the user sets SIGBUS |
| 211 | * to SIG_IGN, but hopefully noone will do that? | 211 | * to SIG_IGN, but hopefully no one will do that? |
| 212 | */ | 212 | */ |
| 213 | ret = send_sig_info(SIGBUS, &si, t); /* synchronous? */ | 213 | ret = send_sig_info(SIGBUS, &si, t); /* synchronous? */ |
| 214 | if (ret < 0) | 214 | if (ret < 0) |
| @@ -634,7 +634,7 @@ static int me_pagecache_dirty(struct page *p, unsigned long pfn) | |||
| 634 | * when the page is reread or dropped. If an | 634 | * when the page is reread or dropped. If an |
| 635 | * application assumes it will always get error on | 635 | * application assumes it will always get error on |
| 636 | * fsync, but does other operations on the fd before | 636 | * fsync, but does other operations on the fd before |
| 637 | * and the page is dropped inbetween then the error | 637 | * and the page is dropped between then the error |
| 638 | * will not be properly reported. | 638 | * will not be properly reported. |
| 639 | * | 639 | * |
| 640 | * This can already happen even without hwpoisoned | 640 | * This can already happen even without hwpoisoned |
| @@ -728,7 +728,7 @@ static int me_huge_page(struct page *p, unsigned long pfn) | |||
| 728 | * The table matches them in order and calls the right handler. | 728 | * The table matches them in order and calls the right handler. |
| 729 | * | 729 | * |
| 730 | * This is quite tricky because we can access page at any time | 730 | * This is quite tricky because we can access page at any time |
| 731 | * in its live cycle, so all accesses have to be extremly careful. | 731 | * in its live cycle, so all accesses have to be extremely careful. |
| 732 | * | 732 | * |
| 733 | * This is not complete. More states could be added. | 733 | * This is not complete. More states could be added. |
| 734 | * For any missing state don't attempt recovery. | 734 | * For any missing state don't attempt recovery. |
diff --git a/mm/memory.c b/mm/memory.c index 9da8cab1b1b0..ce22a250926f 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
| @@ -1410,6 +1410,13 @@ no_page_table: | |||
| 1410 | return page; | 1410 | return page; |
| 1411 | } | 1411 | } |
| 1412 | 1412 | ||
| 1413 | static inline int stack_guard_page(struct vm_area_struct *vma, unsigned long addr) | ||
| 1414 | { | ||
| 1415 | return (vma->vm_flags & VM_GROWSDOWN) && | ||
| 1416 | (vma->vm_start == addr) && | ||
| 1417 | !vma_stack_continue(vma->vm_prev, addr); | ||
| 1418 | } | ||
| 1419 | |||
| 1413 | /** | 1420 | /** |
| 1414 | * __get_user_pages() - pin user pages in memory | 1421 | * __get_user_pages() - pin user pages in memory |
| 1415 | * @tsk: task_struct of target task | 1422 | * @tsk: task_struct of target task |
| @@ -1488,7 +1495,6 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | |||
| 1488 | vma = find_extend_vma(mm, start); | 1495 | vma = find_extend_vma(mm, start); |
| 1489 | if (!vma && in_gate_area(mm, start)) { | 1496 | if (!vma && in_gate_area(mm, start)) { |
| 1490 | unsigned long pg = start & PAGE_MASK; | 1497 | unsigned long pg = start & PAGE_MASK; |
| 1491 | struct vm_area_struct *gate_vma = get_gate_vma(mm); | ||
| 1492 | pgd_t *pgd; | 1498 | pgd_t *pgd; |
| 1493 | pud_t *pud; | 1499 | pud_t *pud; |
| 1494 | pmd_t *pmd; | 1500 | pmd_t *pmd; |
| @@ -1513,10 +1519,11 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | |||
| 1513 | pte_unmap(pte); | 1519 | pte_unmap(pte); |
| 1514 | return i ? : -EFAULT; | 1520 | return i ? : -EFAULT; |
| 1515 | } | 1521 | } |
| 1522 | vma = get_gate_vma(mm); | ||
| 1516 | if (pages) { | 1523 | if (pages) { |
| 1517 | struct page *page; | 1524 | struct page *page; |
| 1518 | 1525 | ||
| 1519 | page = vm_normal_page(gate_vma, start, *pte); | 1526 | page = vm_normal_page(vma, start, *pte); |
| 1520 | if (!page) { | 1527 | if (!page) { |
| 1521 | if (!(gup_flags & FOLL_DUMP) && | 1528 | if (!(gup_flags & FOLL_DUMP) && |
| 1522 | is_zero_pfn(pte_pfn(*pte))) | 1529 | is_zero_pfn(pte_pfn(*pte))) |
| @@ -1530,12 +1537,7 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | |||
| 1530 | get_page(page); | 1537 | get_page(page); |
| 1531 | } | 1538 | } |
| 1532 | pte_unmap(pte); | 1539 | pte_unmap(pte); |
| 1533 | if (vmas) | 1540 | goto next_page; |
| 1534 | vmas[i] = gate_vma; | ||
| 1535 | i++; | ||
| 1536 | start += PAGE_SIZE; | ||
| 1537 | nr_pages--; | ||
| 1538 | continue; | ||
| 1539 | } | 1541 | } |
| 1540 | 1542 | ||
| 1541 | if (!vma || | 1543 | if (!vma || |
| @@ -1549,6 +1551,13 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | |||
| 1549 | continue; | 1551 | continue; |
| 1550 | } | 1552 | } |
| 1551 | 1553 | ||
| 1554 | /* | ||
| 1555 | * If we don't actually want the page itself, | ||
| 1556 | * and it's the stack guard page, just skip it. | ||
| 1557 | */ | ||
| 1558 | if (!pages && stack_guard_page(vma, start)) | ||
| 1559 | goto next_page; | ||
| 1560 | |||
| 1552 | do { | 1561 | do { |
| 1553 | struct page *page; | 1562 | struct page *page; |
| 1554 | unsigned int foll_flags = gup_flags; | 1563 | unsigned int foll_flags = gup_flags; |
| @@ -1631,6 +1640,7 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | |||
| 1631 | flush_anon_page(vma, page, start); | 1640 | flush_anon_page(vma, page, start); |
| 1632 | flush_dcache_page(page); | 1641 | flush_dcache_page(page); |
| 1633 | } | 1642 | } |
| 1643 | next_page: | ||
| 1634 | if (vmas) | 1644 | if (vmas) |
| 1635 | vmas[i] = vma; | 1645 | vmas[i] = vma; |
| 1636 | i++; | 1646 | i++; |
| @@ -3678,7 +3688,7 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm, | |||
| 3678 | */ | 3688 | */ |
| 3679 | #ifdef CONFIG_HAVE_IOREMAP_PROT | 3689 | #ifdef CONFIG_HAVE_IOREMAP_PROT |
| 3680 | vma = find_vma(mm, addr); | 3690 | vma = find_vma(mm, addr); |
| 3681 | if (!vma) | 3691 | if (!vma || vma->vm_start > addr) |
| 3682 | break; | 3692 | break; |
| 3683 | if (vma->vm_ops && vma->vm_ops->access) | 3693 | if (vma->vm_ops && vma->vm_ops->access) |
| 3684 | ret = vma->vm_ops->access(vma, addr, buf, | 3694 | ret = vma->vm_ops->access(vma, addr, buf, |
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 321fc7455df7..9ca1d604f7cd 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c | |||
| @@ -375,7 +375,7 @@ void online_page(struct page *page) | |||
| 375 | #endif | 375 | #endif |
| 376 | 376 | ||
| 377 | #ifdef CONFIG_FLATMEM | 377 | #ifdef CONFIG_FLATMEM |
| 378 | max_mapnr = max(page_to_pfn(page), max_mapnr); | 378 | max_mapnr = max(pfn, max_mapnr); |
| 379 | #endif | 379 | #endif |
| 380 | 380 | ||
| 381 | ClearPageReserved(page); | 381 | ClearPageReserved(page); |
| @@ -724,7 +724,7 @@ do_migrate_range(unsigned long start_pfn, unsigned long end_pfn) | |||
| 724 | pfn); | 724 | pfn); |
| 725 | dump_page(page); | 725 | dump_page(page); |
| 726 | #endif | 726 | #endif |
| 727 | /* Becasue we don't have big zone->lock. we should | 727 | /* Because we don't have big zone->lock. we should |
| 728 | check this again here. */ | 728 | check this again here. */ |
| 729 | if (page_count(page)) { | 729 | if (page_count(page)) { |
| 730 | not_managed++; | 730 | not_managed++; |
diff --git a/mm/migrate.c b/mm/migrate.c index b0406d739ea7..34132f8e9109 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
| @@ -375,7 +375,7 @@ void migrate_page_copy(struct page *newpage, struct page *page) | |||
| 375 | * redo the accounting that clear_page_dirty_for_io undid, | 375 | * redo the accounting that clear_page_dirty_for_io undid, |
| 376 | * but we can't use set_page_dirty because that function | 376 | * but we can't use set_page_dirty because that function |
| 377 | * is actually a signal that all of the page has become dirty. | 377 | * is actually a signal that all of the page has become dirty. |
| 378 | * Wheras only part of our page may be dirty. | 378 | * Whereas only part of our page may be dirty. |
| 379 | */ | 379 | */ |
| 380 | __set_page_dirty_nobuffers(newpage); | 380 | __set_page_dirty_nobuffers(newpage); |
| 381 | } | 381 | } |
diff --git a/mm/mlock.c b/mm/mlock.c index 2689a08c79af..6b55e3efe0df 100644 --- a/mm/mlock.c +++ b/mm/mlock.c | |||
| @@ -135,13 +135,6 @@ void munlock_vma_page(struct page *page) | |||
| 135 | } | 135 | } |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | static inline int stack_guard_page(struct vm_area_struct *vma, unsigned long addr) | ||
| 139 | { | ||
| 140 | return (vma->vm_flags & VM_GROWSDOWN) && | ||
| 141 | (vma->vm_start == addr) && | ||
| 142 | !vma_stack_continue(vma->vm_prev, addr); | ||
| 143 | } | ||
| 144 | |||
| 145 | /** | 138 | /** |
| 146 | * __mlock_vma_pages_range() - mlock a range of pages in the vma. | 139 | * __mlock_vma_pages_range() - mlock a range of pages in the vma. |
| 147 | * @vma: target vma | 140 | * @vma: target vma |
| @@ -188,12 +181,6 @@ static long __mlock_vma_pages_range(struct vm_area_struct *vma, | |||
| 188 | if (vma->vm_flags & VM_LOCKED) | 181 | if (vma->vm_flags & VM_LOCKED) |
| 189 | gup_flags |= FOLL_MLOCK; | 182 | gup_flags |= FOLL_MLOCK; |
| 190 | 183 | ||
| 191 | /* We don't try to access the guard page of a stack vma */ | ||
| 192 | if (stack_guard_page(vma, start)) { | ||
| 193 | addr += PAGE_SIZE; | ||
| 194 | nr_pages--; | ||
| 195 | } | ||
| 196 | |||
| 197 | return __get_user_pages(current, mm, addr, nr_pages, gup_flags, | 184 | return __get_user_pages(current, mm, addr, nr_pages, gup_flags, |
| 198 | NULL, NULL, nonblocking); | 185 | NULL, NULL, nonblocking); |
| 199 | } | 186 | } |
| @@ -259,7 +259,7 @@ SYSCALL_DEFINE1(brk, unsigned long, brk) | |||
| 259 | * randomize_va_space to 2, which will still cause mm->start_brk | 259 | * randomize_va_space to 2, which will still cause mm->start_brk |
| 260 | * to be arbitrarily shifted | 260 | * to be arbitrarily shifted |
| 261 | */ | 261 | */ |
| 262 | if (mm->start_brk > PAGE_ALIGN(mm->end_data)) | 262 | if (current->brk_randomized) |
| 263 | min_brk = mm->start_brk; | 263 | min_brk = mm->start_brk; |
| 264 | else | 264 | else |
| 265 | min_brk = mm->end_data; | 265 | min_brk = mm->end_data; |
| @@ -1814,11 +1814,14 @@ static int expand_downwards(struct vm_area_struct *vma, | |||
| 1814 | size = vma->vm_end - address; | 1814 | size = vma->vm_end - address; |
| 1815 | grow = (vma->vm_start - address) >> PAGE_SHIFT; | 1815 | grow = (vma->vm_start - address) >> PAGE_SHIFT; |
| 1816 | 1816 | ||
| 1817 | error = acct_stack_growth(vma, size, grow); | 1817 | error = -ENOMEM; |
| 1818 | if (!error) { | 1818 | if (grow <= vma->vm_pgoff) { |
| 1819 | vma->vm_start = address; | 1819 | error = acct_stack_growth(vma, size, grow); |
| 1820 | vma->vm_pgoff -= grow; | 1820 | if (!error) { |
| 1821 | perf_event_mmap(vma); | 1821 | vma->vm_start = address; |
| 1822 | vma->vm_pgoff -= grow; | ||
| 1823 | perf_event_mmap(vma); | ||
| 1824 | } | ||
| 1822 | } | 1825 | } |
| 1823 | } | 1826 | } |
| 1824 | vma_unlock_anon_vma(vma); | 1827 | vma_unlock_anon_vma(vma); |
diff --git a/mm/mremap.c b/mm/mremap.c index 1de98d492ddc..a7c1f9f9b941 100644 --- a/mm/mremap.c +++ b/mm/mremap.c | |||
| @@ -277,9 +277,16 @@ static struct vm_area_struct *vma_to_resize(unsigned long addr, | |||
| 277 | if (old_len > vma->vm_end - addr) | 277 | if (old_len > vma->vm_end - addr) |
| 278 | goto Efault; | 278 | goto Efault; |
| 279 | 279 | ||
| 280 | if (vma->vm_flags & (VM_DONTEXPAND | VM_PFNMAP)) { | 280 | /* Need to be careful about a growing mapping */ |
| 281 | if (new_len > old_len) | 281 | if (new_len > old_len) { |
| 282 | unsigned long pgoff; | ||
| 283 | |||
| 284 | if (vma->vm_flags & (VM_DONTEXPAND | VM_PFNMAP)) | ||
| 282 | goto Efault; | 285 | goto Efault; |
| 286 | pgoff = (addr - vma->vm_start) >> PAGE_SHIFT; | ||
| 287 | pgoff += vma->vm_pgoff; | ||
| 288 | if (pgoff + (new_len >> PAGE_SHIFT) < pgoff) | ||
| 289 | goto Einval; | ||
| 283 | } | 290 | } |
| 284 | 291 | ||
| 285 | if (vma->vm_flags & VM_LOCKED) { | 292 | if (vma->vm_flags & VM_LOCKED) { |
diff --git a/mm/nobootmem.c b/mm/nobootmem.c index e99f6cd1da1f..9109049f0bbc 100644 --- a/mm/nobootmem.c +++ b/mm/nobootmem.c | |||
| @@ -150,7 +150,7 @@ unsigned long __init free_all_bootmem(void) | |||
| 150 | { | 150 | { |
| 151 | /* | 151 | /* |
| 152 | * We need to use MAX_NUMNODES instead of NODE_DATA(0)->node_id | 152 | * We need to use MAX_NUMNODES instead of NODE_DATA(0)->node_id |
| 153 | * because in some case like Node0 doesnt have RAM installed | 153 | * because in some case like Node0 doesn't have RAM installed |
| 154 | * low ram will be on Node1 | 154 | * low ram will be on Node1 |
| 155 | * Use MAX_NUMNODES will make sure all ranges in early_node_map[] | 155 | * Use MAX_NUMNODES will make sure all ranges in early_node_map[] |
| 156 | * will be used instead of only Node0 related | 156 | * will be used instead of only Node0 related |
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 6a819d1b2c7d..83fb72c108b7 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
| @@ -84,24 +84,6 @@ static bool has_intersects_mems_allowed(struct task_struct *tsk, | |||
| 84 | #endif /* CONFIG_NUMA */ | 84 | #endif /* CONFIG_NUMA */ |
| 85 | 85 | ||
| 86 | /* | 86 | /* |
| 87 | * If this is a system OOM (not a memcg OOM) and the task selected to be | ||
| 88 | * killed is not already running at high (RT) priorities, speed up the | ||
| 89 | * recovery by boosting the dying task to the lowest FIFO priority. | ||
| 90 | * That helps with the recovery and avoids interfering with RT tasks. | ||
| 91 | */ | ||
| 92 | static void boost_dying_task_prio(struct task_struct *p, | ||
| 93 | struct mem_cgroup *mem) | ||
| 94 | { | ||
| 95 | struct sched_param param = { .sched_priority = 1 }; | ||
| 96 | |||
| 97 | if (mem) | ||
| 98 | return; | ||
| 99 | |||
| 100 | if (!rt_task(p)) | ||
| 101 | sched_setscheduler_nocheck(p, SCHED_FIFO, ¶m); | ||
| 102 | } | ||
| 103 | |||
| 104 | /* | ||
| 105 | * The process p may have detached its own ->mm while exiting or through | 87 | * The process p may have detached its own ->mm while exiting or through |
| 106 | * use_mm(), but one or more of its subthreads may still have a valid | 88 | * use_mm(), but one or more of its subthreads may still have a valid |
| 107 | * pointer. Return p, or any of its subthreads with a valid ->mm, with | 89 | * pointer. Return p, or any of its subthreads with a valid ->mm, with |
| @@ -452,13 +434,6 @@ static int oom_kill_task(struct task_struct *p, struct mem_cgroup *mem) | |||
| 452 | set_tsk_thread_flag(p, TIF_MEMDIE); | 434 | set_tsk_thread_flag(p, TIF_MEMDIE); |
| 453 | force_sig(SIGKILL, p); | 435 | force_sig(SIGKILL, p); |
| 454 | 436 | ||
| 455 | /* | ||
| 456 | * We give our sacrificial lamb high priority and access to | ||
| 457 | * all the memory it needs. That way it should be able to | ||
| 458 | * exit() and clear out its resources quickly... | ||
| 459 | */ | ||
| 460 | boost_dying_task_prio(p, mem); | ||
| 461 | |||
| 462 | return 0; | 437 | return 0; |
| 463 | } | 438 | } |
| 464 | #undef K | 439 | #undef K |
| @@ -482,7 +457,6 @@ static int oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order, | |||
| 482 | */ | 457 | */ |
| 483 | if (p->flags & PF_EXITING) { | 458 | if (p->flags & PF_EXITING) { |
| 484 | set_tsk_thread_flag(p, TIF_MEMDIE); | 459 | set_tsk_thread_flag(p, TIF_MEMDIE); |
| 485 | boost_dying_task_prio(p, mem); | ||
| 486 | return 0; | 460 | return 0; |
| 487 | } | 461 | } |
| 488 | 462 | ||
| @@ -556,7 +530,6 @@ void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask) | |||
| 556 | */ | 530 | */ |
| 557 | if (fatal_signal_pending(current)) { | 531 | if (fatal_signal_pending(current)) { |
| 558 | set_thread_flag(TIF_MEMDIE); | 532 | set_thread_flag(TIF_MEMDIE); |
| 559 | boost_dying_task_prio(current, NULL); | ||
| 560 | return; | 533 | return; |
| 561 | } | 534 | } |
| 562 | 535 | ||
| @@ -712,7 +685,6 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, | |||
| 712 | */ | 685 | */ |
| 713 | if (fatal_signal_pending(current)) { | 686 | if (fatal_signal_pending(current)) { |
| 714 | set_thread_flag(TIF_MEMDIE); | 687 | set_thread_flag(TIF_MEMDIE); |
| 715 | boost_dying_task_prio(current, NULL); | ||
| 716 | return; | 688 | return; |
| 717 | } | 689 | } |
| 718 | 690 | ||
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index d6e7ba7373be..9f8a97b9a350 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
| @@ -942,7 +942,7 @@ __rmqueue_fallback(struct zone *zone, int order, int start_migratetype) | |||
| 942 | * If breaking a large block of pages, move all free | 942 | * If breaking a large block of pages, move all free |
| 943 | * pages to the preferred allocation list. If falling | 943 | * pages to the preferred allocation list. If falling |
| 944 | * back for a reclaimable kernel allocation, be more | 944 | * back for a reclaimable kernel allocation, be more |
| 945 | * agressive about taking ownership of free pages | 945 | * aggressive about taking ownership of free pages |
| 946 | */ | 946 | */ |
| 947 | if (unlikely(current_order >= (pageblock_order >> 1)) || | 947 | if (unlikely(current_order >= (pageblock_order >> 1)) || |
| 948 | start_migratetype == MIGRATE_RECLAIMABLE || | 948 | start_migratetype == MIGRATE_RECLAIMABLE || |
| @@ -3176,7 +3176,7 @@ static __init_refok int __build_all_zonelists(void *data) | |||
| 3176 | * Called with zonelists_mutex held always | 3176 | * Called with zonelists_mutex held always |
| 3177 | * unless system_state == SYSTEM_BOOTING. | 3177 | * unless system_state == SYSTEM_BOOTING. |
| 3178 | */ | 3178 | */ |
| 3179 | void build_all_zonelists(void *data) | 3179 | void __ref build_all_zonelists(void *data) |
| 3180 | { | 3180 | { |
| 3181 | set_zonelist_order(); | 3181 | set_zonelist_order(); |
| 3182 | 3182 | ||
| @@ -3926,7 +3926,7 @@ static void __init find_usable_zone_for_movable(void) | |||
| 3926 | 3926 | ||
| 3927 | /* | 3927 | /* |
| 3928 | * The zone ranges provided by the architecture do not include ZONE_MOVABLE | 3928 | * The zone ranges provided by the architecture do not include ZONE_MOVABLE |
| 3929 | * because it is sized independant of architecture. Unlike the other zones, | 3929 | * because it is sized independent of architecture. Unlike the other zones, |
| 3930 | * the starting point for ZONE_MOVABLE is not fixed. It may be different | 3930 | * the starting point for ZONE_MOVABLE is not fixed. It may be different |
| 3931 | * in each node depending on the size of each node and how evenly kernelcore | 3931 | * in each node depending on the size of each node and how evenly kernelcore |
| 3932 | * is distributed. This helper function adjusts the zone ranges | 3932 | * is distributed. This helper function adjusts the zone ranges |
diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c index a12cc3fa9859..99055010cece 100644 --- a/mm/page_cgroup.c +++ b/mm/page_cgroup.c | |||
| @@ -377,7 +377,7 @@ not_enough_page: | |||
| 377 | * @new: new id | 377 | * @new: new id |
| 378 | * | 378 | * |
| 379 | * Returns old id at success, 0 at failure. | 379 | * Returns old id at success, 0 at failure. |
| 380 | * (There is no mem_cgroup useing 0 as its id) | 380 | * (There is no mem_cgroup using 0 as its id) |
| 381 | */ | 381 | */ |
| 382 | unsigned short swap_cgroup_cmpxchg(swp_entry_t ent, | 382 | unsigned short swap_cgroup_cmpxchg(swp_entry_t ent, |
| 383 | unsigned short old, unsigned short new) | 383 | unsigned short old, unsigned short new) |
diff --git a/mm/percpu.c b/mm/percpu.c index 55d4d113fbd3..a160db39b810 100644 --- a/mm/percpu.c +++ b/mm/percpu.c | |||
| @@ -342,7 +342,7 @@ static void pcpu_chunk_relocate(struct pcpu_chunk *chunk, int oslot) | |||
| 342 | * @chunk: chunk of interest | 342 | * @chunk: chunk of interest |
| 343 | * | 343 | * |
| 344 | * Determine whether area map of @chunk needs to be extended to | 344 | * Determine whether area map of @chunk needs to be extended to |
| 345 | * accomodate a new allocation. | 345 | * accommodate a new allocation. |
| 346 | * | 346 | * |
| 347 | * CONTEXT: | 347 | * CONTEXT: |
| 348 | * pcpu_lock. | 348 | * pcpu_lock. |
| @@ -431,7 +431,7 @@ out_unlock: | |||
| 431 | * depending on @head, is reduced by @tail bytes and @tail byte block | 431 | * depending on @head, is reduced by @tail bytes and @tail byte block |
| 432 | * is inserted after the target block. | 432 | * is inserted after the target block. |
| 433 | * | 433 | * |
| 434 | * @chunk->map must have enough free slots to accomodate the split. | 434 | * @chunk->map must have enough free slots to accommodate the split. |
| 435 | * | 435 | * |
| 436 | * CONTEXT: | 436 | * CONTEXT: |
| 437 | * pcpu_lock. | 437 | * pcpu_lock. |
| @@ -1435,7 +1435,7 @@ static struct pcpu_alloc_info * __init pcpu_build_alloc_info( | |||
| 1435 | /* | 1435 | /* |
| 1436 | * Determine min_unit_size, alloc_size and max_upa such that | 1436 | * Determine min_unit_size, alloc_size and max_upa such that |
| 1437 | * alloc_size is multiple of atom_size and is the smallest | 1437 | * alloc_size is multiple of atom_size and is the smallest |
| 1438 | * which can accomodate 4k aligned segments which are equal to | 1438 | * which can accommodate 4k aligned segments which are equal to |
| 1439 | * or larger than min_unit_size. | 1439 | * or larger than min_unit_size. |
| 1440 | */ | 1440 | */ |
| 1441 | min_unit_size = max_t(size_t, size_sum, PCPU_MIN_UNIT_SIZE); | 1441 | min_unit_size = max_t(size_t, size_sum, PCPU_MIN_UNIT_SIZE); |
| @@ -1550,7 +1550,7 @@ static struct pcpu_alloc_info * __init pcpu_build_alloc_info( | |||
| 1550 | * @atom_size: allocation atom size | 1550 | * @atom_size: allocation atom size |
| 1551 | * @cpu_distance_fn: callback to determine distance between cpus, optional | 1551 | * @cpu_distance_fn: callback to determine distance between cpus, optional |
| 1552 | * @alloc_fn: function to allocate percpu page | 1552 | * @alloc_fn: function to allocate percpu page |
| 1553 | * @free_fn: funtion to free percpu page | 1553 | * @free_fn: function to free percpu page |
| 1554 | * | 1554 | * |
| 1555 | * This is a helper to ease setting up embedded first percpu chunk and | 1555 | * This is a helper to ease setting up embedded first percpu chunk and |
| 1556 | * can be called where pcpu_setup_first_chunk() is expected. | 1556 | * can be called where pcpu_setup_first_chunk() is expected. |
| @@ -1678,7 +1678,7 @@ out_free: | |||
| 1678 | * pcpu_page_first_chunk - map the first chunk using PAGE_SIZE pages | 1678 | * pcpu_page_first_chunk - map the first chunk using PAGE_SIZE pages |
| 1679 | * @reserved_size: the size of reserved percpu area in bytes | 1679 | * @reserved_size: the size of reserved percpu area in bytes |
| 1680 | * @alloc_fn: function to allocate percpu page, always called with PAGE_SIZE | 1680 | * @alloc_fn: function to allocate percpu page, always called with PAGE_SIZE |
| 1681 | * @free_fn: funtion to free percpu page, always called with PAGE_SIZE | 1681 | * @free_fn: function to free percpu page, always called with PAGE_SIZE |
| 1682 | * @populate_pte_fn: function to populate pte | 1682 | * @populate_pte_fn: function to populate pte |
| 1683 | * | 1683 | * |
| 1684 | * This is a helper to ease setting up page-remapped first percpu | 1684 | * This is a helper to ease setting up page-remapped first percpu |
diff --git a/mm/shmem.c b/mm/shmem.c index 58da7c150ba6..8fa27e4e582a 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
| @@ -421,7 +421,8 @@ static swp_entry_t *shmem_swp_alloc(struct shmem_inode_info *info, unsigned long | |||
| 421 | * a waste to allocate index if we cannot allocate data. | 421 | * a waste to allocate index if we cannot allocate data. |
| 422 | */ | 422 | */ |
| 423 | if (sbinfo->max_blocks) { | 423 | if (sbinfo->max_blocks) { |
| 424 | if (percpu_counter_compare(&sbinfo->used_blocks, (sbinfo->max_blocks - 1)) > 0) | 424 | if (percpu_counter_compare(&sbinfo->used_blocks, |
| 425 | sbinfo->max_blocks - 1) >= 0) | ||
| 425 | return ERR_PTR(-ENOSPC); | 426 | return ERR_PTR(-ENOSPC); |
| 426 | percpu_counter_inc(&sbinfo->used_blocks); | 427 | percpu_counter_inc(&sbinfo->used_blocks); |
| 427 | spin_lock(&inode->i_lock); | 428 | spin_lock(&inode->i_lock); |
| @@ -1397,7 +1398,8 @@ repeat: | |||
| 1397 | shmem_swp_unmap(entry); | 1398 | shmem_swp_unmap(entry); |
| 1398 | sbinfo = SHMEM_SB(inode->i_sb); | 1399 | sbinfo = SHMEM_SB(inode->i_sb); |
| 1399 | if (sbinfo->max_blocks) { | 1400 | if (sbinfo->max_blocks) { |
| 1400 | if ((percpu_counter_compare(&sbinfo->used_blocks, sbinfo->max_blocks) > 0) || | 1401 | if (percpu_counter_compare(&sbinfo->used_blocks, |
| 1402 | sbinfo->max_blocks) >= 0 || | ||
| 1401 | shmem_acct_block(info->flags)) { | 1403 | shmem_acct_block(info->flags)) { |
| 1402 | spin_unlock(&info->lock); | 1404 | spin_unlock(&info->lock); |
| 1403 | error = -ENOSPC; | 1405 | error = -ENOSPC; |
| @@ -878,7 +878,7 @@ static struct array_cache *alloc_arraycache(int node, int entries, | |||
| 878 | nc = kmalloc_node(memsize, gfp, node); | 878 | nc = kmalloc_node(memsize, gfp, node); |
| 879 | /* | 879 | /* |
| 880 | * The array_cache structures contain pointers to free object. | 880 | * The array_cache structures contain pointers to free object. |
| 881 | * However, when such objects are allocated or transfered to another | 881 | * However, when such objects are allocated or transferred to another |
| 882 | * cache the pointers are not cleared and they could be counted as | 882 | * cache the pointers are not cleared and they could be counted as |
| 883 | * valid references during a kmemleak scan. Therefore, kmemleak must | 883 | * valid references during a kmemleak scan. Therefore, kmemleak must |
| 884 | * not scan such objects. | 884 | * not scan such objects. |
| @@ -2606,7 +2606,7 @@ EXPORT_SYMBOL(kmem_cache_shrink); | |||
| 2606 | * | 2606 | * |
| 2607 | * The cache must be empty before calling this function. | 2607 | * The cache must be empty before calling this function. |
| 2608 | * | 2608 | * |
| 2609 | * The caller must guarantee that noone will allocate memory from the cache | 2609 | * The caller must guarantee that no one will allocate memory from the cache |
| 2610 | * during the kmem_cache_destroy(). | 2610 | * during the kmem_cache_destroy(). |
| 2611 | */ | 2611 | */ |
| 2612 | void kmem_cache_destroy(struct kmem_cache *cachep) | 2612 | void kmem_cache_destroy(struct kmem_cache *cachep) |
| @@ -64,7 +64,7 @@ | |||
| 64 | * we must stay away from it for a while since we may cause a bouncing | 64 | * we must stay away from it for a while since we may cause a bouncing |
| 65 | * cacheline if we try to acquire the lock. So go onto the next slab. | 65 | * cacheline if we try to acquire the lock. So go onto the next slab. |
| 66 | * If all pages are busy then we may allocate a new slab instead of reusing | 66 | * If all pages are busy then we may allocate a new slab instead of reusing |
| 67 | * a partial slab. A new slab has noone operating on it and thus there is | 67 | * a partial slab. A new slab has no one operating on it and thus there is |
| 68 | * no danger of cacheline contention. | 68 | * no danger of cacheline contention. |
| 69 | * | 69 | * |
| 70 | * Interrupts are disabled during allocation and deallocation in order to | 70 | * Interrupts are disabled during allocation and deallocation in order to |
| @@ -1929,7 +1929,7 @@ redo: | |||
| 1929 | else { | 1929 | else { |
| 1930 | #ifdef CONFIG_CMPXCHG_LOCAL | 1930 | #ifdef CONFIG_CMPXCHG_LOCAL |
| 1931 | /* | 1931 | /* |
| 1932 | * The cmpxchg will only match if there was no additonal | 1932 | * The cmpxchg will only match if there was no additional |
| 1933 | * operation and if we are on the right processor. | 1933 | * operation and if we are on the right processor. |
| 1934 | * | 1934 | * |
| 1935 | * The cmpxchg does the following atomically (without lock semantics!) | 1935 | * The cmpxchg does the following atomically (without lock semantics!) |
| @@ -3547,7 +3547,7 @@ void *__kmalloc_track_caller(size_t size, gfp_t gfpflags, unsigned long caller) | |||
| 3547 | 3547 | ||
| 3548 | ret = slab_alloc(s, gfpflags, NUMA_NO_NODE, caller); | 3548 | ret = slab_alloc(s, gfpflags, NUMA_NO_NODE, caller); |
| 3549 | 3549 | ||
| 3550 | /* Honor the call site pointer we recieved. */ | 3550 | /* Honor the call site pointer we received. */ |
| 3551 | trace_kmalloc(caller, ret, size, s->size, gfpflags); | 3551 | trace_kmalloc(caller, ret, size, s->size, gfpflags); |
| 3552 | 3552 | ||
| 3553 | return ret; | 3553 | return ret; |
| @@ -3577,7 +3577,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags, | |||
| 3577 | 3577 | ||
| 3578 | ret = slab_alloc(s, gfpflags, node, caller); | 3578 | ret = slab_alloc(s, gfpflags, node, caller); |
| 3579 | 3579 | ||
| 3580 | /* Honor the call site pointer we recieved. */ | 3580 | /* Honor the call site pointer we received. */ |
| 3581 | trace_kmalloc_node(caller, ret, size, s->size, gfpflags, node); | 3581 | trace_kmalloc_node(caller, ret, size, s->size, gfpflags, node); |
| 3582 | 3582 | ||
| 3583 | return ret; | 3583 | return ret; |
diff --git a/mm/sparse.c b/mm/sparse.c index 93250207c5cf..aa64b12831a2 100644 --- a/mm/sparse.c +++ b/mm/sparse.c | |||
| @@ -500,7 +500,7 @@ void __init sparse_init(void) | |||
| 500 | * so alloc 2M (with 2M align) and 24 bytes in turn will | 500 | * so alloc 2M (with 2M align) and 24 bytes in turn will |
| 501 | * make next 2M slip to one more 2M later. | 501 | * make next 2M slip to one more 2M later. |
| 502 | * then in big system, the memory will have a lot of holes... | 502 | * then in big system, the memory will have a lot of holes... |
| 503 | * here try to allocate 2M pages continously. | 503 | * here try to allocate 2M pages continuously. |
| 504 | * | 504 | * |
| 505 | * powerpc need to call sparse_init_one_section right after each | 505 | * powerpc need to call sparse_init_one_section right after each |
| 506 | * sparse_early_mem_map_alloc, so allocate usemap_map at first. | 506 | * sparse_early_mem_map_alloc, so allocate usemap_map at first. |
| @@ -227,7 +227,7 @@ void arch_pick_mmap_layout(struct mm_struct *mm) | |||
| 227 | /* | 227 | /* |
| 228 | * Like get_user_pages_fast() except its IRQ-safe in that it won't fall | 228 | * Like get_user_pages_fast() except its IRQ-safe in that it won't fall |
| 229 | * back to the regular GUP. | 229 | * back to the regular GUP. |
| 230 | * If the architecture not support this fucntion, simply return with no | 230 | * If the architecture not support this function, simply return with no |
| 231 | * page pinned | 231 | * page pinned |
| 232 | */ | 232 | */ |
| 233 | int __attribute__((weak)) __get_user_pages_fast(unsigned long start, | 233 | int __attribute__((weak)) __get_user_pages_fast(unsigned long start, |
diff --git a/mm/vmscan.c b/mm/vmscan.c index f73b8657c2d0..f6b435c80079 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
| @@ -41,6 +41,7 @@ | |||
| 41 | #include <linux/memcontrol.h> | 41 | #include <linux/memcontrol.h> |
| 42 | #include <linux/delayacct.h> | 42 | #include <linux/delayacct.h> |
| 43 | #include <linux/sysctl.h> | 43 | #include <linux/sysctl.h> |
| 44 | #include <linux/oom.h> | ||
| 44 | 45 | ||
| 45 | #include <asm/tlbflush.h> | 46 | #include <asm/tlbflush.h> |
| 46 | #include <asm/div64.h> | 47 | #include <asm/div64.h> |
| @@ -1065,7 +1066,7 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan, | |||
| 1065 | * surrounding the tag page. Only take those pages of | 1066 | * surrounding the tag page. Only take those pages of |
| 1066 | * the same active state as that tag page. We may safely | 1067 | * the same active state as that tag page. We may safely |
| 1067 | * round the target page pfn down to the requested order | 1068 | * round the target page pfn down to the requested order |
| 1068 | * as the mem_map is guarenteed valid out to MAX_ORDER, | 1069 | * as the mem_map is guaranteed valid out to MAX_ORDER, |
| 1069 | * where that page is in a different zone we will detect | 1070 | * where that page is in a different zone we will detect |
| 1070 | * it from its zone id and abort this block scan. | 1071 | * it from its zone id and abort this block scan. |
| 1071 | */ | 1072 | */ |
| @@ -1988,17 +1989,12 @@ static bool zone_reclaimable(struct zone *zone) | |||
| 1988 | return zone->pages_scanned < zone_reclaimable_pages(zone) * 6; | 1989 | return zone->pages_scanned < zone_reclaimable_pages(zone) * 6; |
| 1989 | } | 1990 | } |
| 1990 | 1991 | ||
| 1991 | /* | 1992 | /* All zones in zonelist are unreclaimable? */ |
| 1992 | * As hibernation is going on, kswapd is freezed so that it can't mark | ||
| 1993 | * the zone into all_unreclaimable. It can't handle OOM during hibernation. | ||
| 1994 | * So let's check zone's unreclaimable in direct reclaim as well as kswapd. | ||
| 1995 | */ | ||
| 1996 | static bool all_unreclaimable(struct zonelist *zonelist, | 1993 | static bool all_unreclaimable(struct zonelist *zonelist, |
| 1997 | struct scan_control *sc) | 1994 | struct scan_control *sc) |
| 1998 | { | 1995 | { |
| 1999 | struct zoneref *z; | 1996 | struct zoneref *z; |
| 2000 | struct zone *zone; | 1997 | struct zone *zone; |
| 2001 | bool all_unreclaimable = true; | ||
| 2002 | 1998 | ||
| 2003 | for_each_zone_zonelist_nodemask(zone, z, zonelist, | 1999 | for_each_zone_zonelist_nodemask(zone, z, zonelist, |
| 2004 | gfp_zone(sc->gfp_mask), sc->nodemask) { | 2000 | gfp_zone(sc->gfp_mask), sc->nodemask) { |
| @@ -2006,13 +2002,11 @@ static bool all_unreclaimable(struct zonelist *zonelist, | |||
| 2006 | continue; | 2002 | continue; |
| 2007 | if (!cpuset_zone_allowed_hardwall(zone, GFP_KERNEL)) | 2003 | if (!cpuset_zone_allowed_hardwall(zone, GFP_KERNEL)) |
| 2008 | continue; | 2004 | continue; |
| 2009 | if (zone_reclaimable(zone)) { | 2005 | if (!zone->all_unreclaimable) |
| 2010 | all_unreclaimable = false; | 2006 | return false; |
| 2011 | break; | ||
| 2012 | } | ||
| 2013 | } | 2007 | } |
| 2014 | 2008 | ||
| 2015 | return all_unreclaimable; | 2009 | return true; |
| 2016 | } | 2010 | } |
| 2017 | 2011 | ||
| 2018 | /* | 2012 | /* |
| @@ -2108,6 +2102,14 @@ out: | |||
| 2108 | if (sc->nr_reclaimed) | 2102 | if (sc->nr_reclaimed) |
| 2109 | return sc->nr_reclaimed; | 2103 | return sc->nr_reclaimed; |
| 2110 | 2104 | ||
| 2105 | /* | ||
| 2106 | * As hibernation is going on, kswapd is freezed so that it can't mark | ||
| 2107 | * the zone into all_unreclaimable. Thus bypassing all_unreclaimable | ||
| 2108 | * check. | ||
| 2109 | */ | ||
| 2110 | if (oom_killer_disabled) | ||
| 2111 | return 0; | ||
| 2112 | |||
| 2111 | /* top priority shrink_zones still had more to do? don't OOM, then */ | 2113 | /* top priority shrink_zones still had more to do? don't OOM, then */ |
| 2112 | if (scanning_global_lru(sc) && !all_unreclaimable(zonelist, sc)) | 2114 | if (scanning_global_lru(sc) && !all_unreclaimable(zonelist, sc)) |
| 2113 | return 1; | 2115 | return 1; |
| @@ -2224,7 +2226,7 @@ unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem_cont, | |||
| 2224 | * o a 16M DMA zone that is balanced will not balance a zone on any | 2226 | * o a 16M DMA zone that is balanced will not balance a zone on any |
| 2225 | * reasonable sized machine | 2227 | * reasonable sized machine |
| 2226 | * o On all other machines, the top zone must be at least a reasonable | 2228 | * o On all other machines, the top zone must be at least a reasonable |
| 2227 | * precentage of the middle zones. For example, on 32-bit x86, highmem | 2229 | * percentage of the middle zones. For example, on 32-bit x86, highmem |
| 2228 | * would need to be at least 256M for it to be balance a whole node. | 2230 | * would need to be at least 256M for it to be balance a whole node. |
| 2229 | * Similarly, on x86-64 the Normal zone would need to be at least 1G | 2231 | * Similarly, on x86-64 the Normal zone would need to be at least 1G |
| 2230 | * to balance a node on its own. These seemed like reasonable ratios. | 2232 | * to balance a node on its own. These seemed like reasonable ratios. |
diff --git a/mm/vmstat.c b/mm/vmstat.c index 772b39b87d95..897ea9e88238 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c | |||
| @@ -321,9 +321,12 @@ static inline void mod_state(struct zone *zone, | |||
| 321 | /* | 321 | /* |
| 322 | * The fetching of the stat_threshold is racy. We may apply | 322 | * The fetching of the stat_threshold is racy. We may apply |
| 323 | * a counter threshold to the wrong the cpu if we get | 323 | * a counter threshold to the wrong the cpu if we get |
| 324 | * rescheduled while executing here. However, the following | 324 | * rescheduled while executing here. However, the next |
| 325 | * will apply the threshold again and therefore bring the | 325 | * counter update will apply the threshold again and |
| 326 | * counter under the threshold. | 326 | * therefore bring the counter under the threshold again. |
| 327 | * | ||
| 328 | * Most of the time the thresholds are the same anyways | ||
| 329 | * for all cpus in a zone. | ||
| 327 | */ | 330 | */ |
| 328 | t = this_cpu_read(pcp->stat_threshold); | 331 | t = this_cpu_read(pcp->stat_threshold); |
| 329 | 332 | ||
| @@ -945,7 +948,16 @@ static const char * const vmstat_text[] = { | |||
| 945 | "unevictable_pgs_cleared", | 948 | "unevictable_pgs_cleared", |
| 946 | "unevictable_pgs_stranded", | 949 | "unevictable_pgs_stranded", |
| 947 | "unevictable_pgs_mlockfreed", | 950 | "unevictable_pgs_mlockfreed", |
| 951 | |||
| 952 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
| 953 | "thp_fault_alloc", | ||
| 954 | "thp_fault_fallback", | ||
| 955 | "thp_collapse_alloc", | ||
| 956 | "thp_collapse_alloc_failed", | ||
| 957 | "thp_split", | ||
| 948 | #endif | 958 | #endif |
| 959 | |||
| 960 | #endif /* CONFIG_VM_EVENTS_COUNTERS */ | ||
| 949 | }; | 961 | }; |
| 950 | 962 | ||
| 951 | static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat, | 963 | static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat, |
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c index d1314cf18adf..d940c49d168a 100644 --- a/net/8021q/vlanproc.c +++ b/net/8021q/vlanproc.c | |||
| @@ -54,7 +54,7 @@ static const char name_conf[] = "config"; | |||
| 54 | 54 | ||
| 55 | /* | 55 | /* |
| 56 | * Structures for interfacing with the /proc filesystem. | 56 | * Structures for interfacing with the /proc filesystem. |
| 57 | * VLAN creates its own directory /proc/net/vlan with the folowing | 57 | * VLAN creates its own directory /proc/net/vlan with the following |
| 58 | * entries: | 58 | * entries: |
| 59 | * config device status/configuration | 59 | * config device status/configuration |
| 60 | * <device> entry for each device | 60 | * <device> entry for each device |
diff --git a/net/9p/client.c b/net/9p/client.c index 2ccbf04d37df..77367745be9b 100644 --- a/net/9p/client.c +++ b/net/9p/client.c | |||
| @@ -178,7 +178,7 @@ free_and_return: | |||
| 178 | * @tag: numeric id for transaction | 178 | * @tag: numeric id for transaction |
| 179 | * | 179 | * |
| 180 | * this is a simple array lookup, but will grow the | 180 | * this is a simple array lookup, but will grow the |
| 181 | * request_slots as necessary to accomodate transaction | 181 | * request_slots as necessary to accommodate transaction |
| 182 | * ids which did not previously have a slot. | 182 | * ids which did not previously have a slot. |
| 183 | * | 183 | * |
| 184 | * this code relies on the client spinlock to manage locks, its | 184 | * this code relies on the client spinlock to manage locks, its |
| @@ -929,15 +929,15 @@ error: | |||
| 929 | } | 929 | } |
| 930 | EXPORT_SYMBOL(p9_client_attach); | 930 | EXPORT_SYMBOL(p9_client_attach); |
| 931 | 931 | ||
| 932 | struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames, | 932 | struct p9_fid *p9_client_walk(struct p9_fid *oldfid, uint16_t nwname, |
| 933 | int clone) | 933 | char **wnames, int clone) |
| 934 | { | 934 | { |
| 935 | int err; | 935 | int err; |
| 936 | struct p9_client *clnt; | 936 | struct p9_client *clnt; |
| 937 | struct p9_fid *fid; | 937 | struct p9_fid *fid; |
| 938 | struct p9_qid *wqids; | 938 | struct p9_qid *wqids; |
| 939 | struct p9_req_t *req; | 939 | struct p9_req_t *req; |
| 940 | int16_t nwqids, count; | 940 | uint16_t nwqids, count; |
| 941 | 941 | ||
| 942 | err = 0; | 942 | err = 0; |
| 943 | wqids = NULL; | 943 | wqids = NULL; |
| @@ -955,7 +955,7 @@ struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames, | |||
| 955 | fid = oldfid; | 955 | fid = oldfid; |
| 956 | 956 | ||
| 957 | 957 | ||
| 958 | P9_DPRINTK(P9_DEBUG_9P, ">>> TWALK fids %d,%d nwname %d wname[0] %s\n", | 958 | P9_DPRINTK(P9_DEBUG_9P, ">>> TWALK fids %d,%d nwname %ud wname[0] %s\n", |
| 959 | oldfid->fid, fid->fid, nwname, wnames ? wnames[0] : NULL); | 959 | oldfid->fid, fid->fid, nwname, wnames ? wnames[0] : NULL); |
| 960 | 960 | ||
| 961 | req = p9_client_rpc(clnt, P9_TWALK, "ddT", oldfid->fid, fid->fid, | 961 | req = p9_client_rpc(clnt, P9_TWALK, "ddT", oldfid->fid, fid->fid, |
| @@ -1220,27 +1220,6 @@ error: | |||
| 1220 | } | 1220 | } |
| 1221 | EXPORT_SYMBOL(p9_client_fsync); | 1221 | EXPORT_SYMBOL(p9_client_fsync); |
| 1222 | 1222 | ||
| 1223 | int p9_client_sync_fs(struct p9_fid *fid) | ||
| 1224 | { | ||
| 1225 | int err = 0; | ||
| 1226 | struct p9_req_t *req; | ||
| 1227 | struct p9_client *clnt; | ||
| 1228 | |||
| 1229 | P9_DPRINTK(P9_DEBUG_9P, ">>> TSYNC_FS fid %d\n", fid->fid); | ||
| 1230 | |||
| 1231 | clnt = fid->clnt; | ||
| 1232 | req = p9_client_rpc(clnt, P9_TSYNCFS, "d", fid->fid); | ||
| 1233 | if (IS_ERR(req)) { | ||
| 1234 | err = PTR_ERR(req); | ||
| 1235 | goto error; | ||
| 1236 | } | ||
| 1237 | P9_DPRINTK(P9_DEBUG_9P, "<<< RSYNCFS fid %d\n", fid->fid); | ||
| 1238 | p9_free_req(clnt, req); | ||
| 1239 | error: | ||
| 1240 | return err; | ||
| 1241 | } | ||
| 1242 | EXPORT_SYMBOL(p9_client_sync_fs); | ||
| 1243 | |||
| 1244 | int p9_client_clunk(struct p9_fid *fid) | 1223 | int p9_client_clunk(struct p9_fid *fid) |
| 1245 | { | 1224 | { |
| 1246 | int err; | 1225 | int err; |
diff --git a/net/9p/protocol.c b/net/9p/protocol.c index 8a4084fa8b5a..b58a501cf3d1 100644 --- a/net/9p/protocol.c +++ b/net/9p/protocol.c | |||
| @@ -265,7 +265,7 @@ p9pdu_vreadf(struct p9_fcall *pdu, int proto_version, const char *fmt, | |||
| 265 | } | 265 | } |
| 266 | break; | 266 | break; |
| 267 | case 'T':{ | 267 | case 'T':{ |
| 268 | int16_t *nwname = va_arg(ap, int16_t *); | 268 | uint16_t *nwname = va_arg(ap, uint16_t *); |
| 269 | char ***wnames = va_arg(ap, char ***); | 269 | char ***wnames = va_arg(ap, char ***); |
| 270 | 270 | ||
| 271 | errcode = p9pdu_readf(pdu, proto_version, | 271 | errcode = p9pdu_readf(pdu, proto_version, |
| @@ -468,7 +468,8 @@ p9pdu_vwritef(struct p9_fcall *pdu, int proto_version, const char *fmt, | |||
| 468 | case 'E':{ | 468 | case 'E':{ |
| 469 | int32_t cnt = va_arg(ap, int32_t); | 469 | int32_t cnt = va_arg(ap, int32_t); |
| 470 | const char *k = va_arg(ap, const void *); | 470 | const char *k = va_arg(ap, const void *); |
| 471 | const char *u = va_arg(ap, const void *); | 471 | const char __user *u = va_arg(ap, |
| 472 | const void __user *); | ||
| 472 | errcode = p9pdu_writef(pdu, proto_version, "d", | 473 | errcode = p9pdu_writef(pdu, proto_version, "d", |
| 473 | cnt); | 474 | cnt); |
| 474 | if (!errcode && pdu_write_urw(pdu, k, u, cnt)) | 475 | if (!errcode && pdu_write_urw(pdu, k, u, cnt)) |
| @@ -495,7 +496,7 @@ p9pdu_vwritef(struct p9_fcall *pdu, int proto_version, const char *fmt, | |||
| 495 | } | 496 | } |
| 496 | break; | 497 | break; |
| 497 | case 'T':{ | 498 | case 'T':{ |
| 498 | int16_t nwname = va_arg(ap, int); | 499 | uint16_t nwname = va_arg(ap, int); |
| 499 | const char **wnames = va_arg(ap, const char **); | 500 | const char **wnames = va_arg(ap, const char **); |
| 500 | 501 | ||
| 501 | errcode = p9pdu_writef(pdu, proto_version, "w", | 502 | errcode = p9pdu_writef(pdu, proto_version, "w", |
diff --git a/net/9p/trans_common.c b/net/9p/trans_common.c index 9172ab78fcb0..e883172f9aa2 100644 --- a/net/9p/trans_common.c +++ b/net/9p/trans_common.c | |||
| @@ -36,7 +36,7 @@ p9_release_req_pages(struct trans_rpage_info *rpinfo) | |||
| 36 | EXPORT_SYMBOL(p9_release_req_pages); | 36 | EXPORT_SYMBOL(p9_release_req_pages); |
| 37 | 37 | ||
| 38 | /** | 38 | /** |
| 39 | * p9_nr_pages - Return number of pages needed to accomodate the payload. | 39 | * p9_nr_pages - Return number of pages needed to accommodate the payload. |
| 40 | */ | 40 | */ |
| 41 | int | 41 | int |
| 42 | p9_nr_pages(struct p9_req_t *req) | 42 | p9_nr_pages(struct p9_req_t *req) |
| @@ -55,7 +55,7 @@ EXPORT_SYMBOL(p9_nr_pages); | |||
| 55 | * @req: Request to be sent to server. | 55 | * @req: Request to be sent to server. |
| 56 | * @pdata_off: data offset into the first page after translation (gup). | 56 | * @pdata_off: data offset into the first page after translation (gup). |
| 57 | * @pdata_len: Total length of the IO. gup may not return requested # of pages. | 57 | * @pdata_len: Total length of the IO. gup may not return requested # of pages. |
| 58 | * @nr_pages: number of pages to accomodate the payload | 58 | * @nr_pages: number of pages to accommodate the payload |
| 59 | * @rw: Indicates if the pages are for read or write. | 59 | * @rw: Indicates if the pages are for read or write. |
| 60 | */ | 60 | */ |
| 61 | int | 61 | int |
| @@ -66,7 +66,7 @@ p9_payload_gup(struct p9_req_t *req, size_t *pdata_off, int *pdata_len, | |||
| 66 | uint32_t pdata_mapped_pages; | 66 | uint32_t pdata_mapped_pages; |
| 67 | struct trans_rpage_info *rpinfo; | 67 | struct trans_rpage_info *rpinfo; |
| 68 | 68 | ||
| 69 | *pdata_off = (size_t)req->tc->pubuf & (PAGE_SIZE-1); | 69 | *pdata_off = (__force size_t)req->tc->pubuf & (PAGE_SIZE-1); |
| 70 | 70 | ||
| 71 | if (*pdata_off) | 71 | if (*pdata_off) |
| 72 | first_page_bytes = min(((size_t)PAGE_SIZE - *pdata_off), | 72 | first_page_bytes = min(((size_t)PAGE_SIZE - *pdata_off), |
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index e8f046b07182..244e70742183 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c | |||
| @@ -326,8 +326,11 @@ req_retry_pinned: | |||
| 326 | outp = pack_sg_list_p(chan->sg, out, VIRTQUEUE_NUM, | 326 | outp = pack_sg_list_p(chan->sg, out, VIRTQUEUE_NUM, |
| 327 | pdata_off, rpinfo->rp_data, pdata_len); | 327 | pdata_off, rpinfo->rp_data, pdata_len); |
| 328 | } else { | 328 | } else { |
| 329 | char *pbuf = req->tc->pubuf ? req->tc->pubuf : | 329 | char *pbuf; |
| 330 | req->tc->pkbuf; | 330 | if (req->tc->pubuf) |
| 331 | pbuf = (__force char *) req->tc->pubuf; | ||
| 332 | else | ||
| 333 | pbuf = req->tc->pkbuf; | ||
| 331 | outp = pack_sg_list(chan->sg, out, VIRTQUEUE_NUM, pbuf, | 334 | outp = pack_sg_list(chan->sg, out, VIRTQUEUE_NUM, pbuf, |
| 332 | req->tc->pbuf_size); | 335 | req->tc->pbuf_size); |
| 333 | } | 336 | } |
| @@ -352,8 +355,12 @@ req_retry_pinned: | |||
| 352 | in = pack_sg_list_p(chan->sg, out+inp, VIRTQUEUE_NUM, | 355 | in = pack_sg_list_p(chan->sg, out+inp, VIRTQUEUE_NUM, |
| 353 | pdata_off, rpinfo->rp_data, pdata_len); | 356 | pdata_off, rpinfo->rp_data, pdata_len); |
| 354 | } else { | 357 | } else { |
| 355 | char *pbuf = req->tc->pubuf ? req->tc->pubuf : | 358 | char *pbuf; |
| 356 | req->tc->pkbuf; | 359 | if (req->tc->pubuf) |
| 360 | pbuf = (__force char *) req->tc->pubuf; | ||
| 361 | else | ||
| 362 | pbuf = req->tc->pkbuf; | ||
| 363 | |||
| 357 | in = pack_sg_list(chan->sg, out+inp, VIRTQUEUE_NUM, | 364 | in = pack_sg_list(chan->sg, out+inp, VIRTQUEUE_NUM, |
| 358 | pbuf, req->tc->pbuf_size); | 365 | pbuf, req->tc->pbuf_size); |
| 359 | } | 366 | } |
diff --git a/net/9p/util.c b/net/9p/util.c index b84619b5ba22..da6af81e59d9 100644 --- a/net/9p/util.c +++ b/net/9p/util.c | |||
| @@ -67,7 +67,7 @@ EXPORT_SYMBOL(p9_idpool_create); | |||
| 67 | 67 | ||
| 68 | /** | 68 | /** |
| 69 | * p9_idpool_destroy - create a new per-connection id pool | 69 | * p9_idpool_destroy - create a new per-connection id pool |
| 70 | * @p: idpool to destory | 70 | * @p: idpool to destroy |
| 71 | */ | 71 | */ |
| 72 | 72 | ||
| 73 | void p9_idpool_destroy(struct p9_idpool *p) | 73 | void p9_idpool_destroy(struct p9_idpool *p) |
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 206e771e82d1..956a5302002a 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c | |||
| @@ -1051,16 +1051,17 @@ static int atalk_release(struct socket *sock) | |||
| 1051 | { | 1051 | { |
| 1052 | struct sock *sk = sock->sk; | 1052 | struct sock *sk = sock->sk; |
| 1053 | 1053 | ||
| 1054 | sock_hold(sk); | ||
| 1055 | lock_sock(sk); | ||
| 1056 | if (sk) { | 1054 | if (sk) { |
| 1055 | sock_hold(sk); | ||
| 1056 | lock_sock(sk); | ||
| 1057 | |||
| 1057 | sock_orphan(sk); | 1058 | sock_orphan(sk); |
| 1058 | sock->sk = NULL; | 1059 | sock->sk = NULL; |
| 1059 | atalk_destroy_socket(sk); | 1060 | atalk_destroy_socket(sk); |
| 1060 | } | ||
| 1061 | release_sock(sk); | ||
| 1062 | sock_put(sk); | ||
| 1063 | 1061 | ||
| 1062 | release_sock(sk); | ||
| 1063 | sock_put(sk); | ||
| 1064 | } | ||
| 1064 | return 0; | 1065 | return 0; |
| 1065 | } | 1066 | } |
| 1066 | 1067 | ||
diff --git a/net/atm/br2684.c b/net/atm/br2684.c index fce2eae8d476..2252c2085dac 100644 --- a/net/atm/br2684.c +++ b/net/atm/br2684.c | |||
| @@ -509,7 +509,7 @@ static int br2684_regvcc(struct atm_vcc *atmvcc, void __user * arg) | |||
| 509 | write_lock_irq(&devs_lock); | 509 | write_lock_irq(&devs_lock); |
| 510 | net_dev = br2684_find_dev(&be.ifspec); | 510 | net_dev = br2684_find_dev(&be.ifspec); |
| 511 | if (net_dev == NULL) { | 511 | if (net_dev == NULL) { |
| 512 | pr_err("tried to attach to non-existant device\n"); | 512 | pr_err("tried to attach to non-existent device\n"); |
| 513 | err = -ENXIO; | 513 | err = -ENXIO; |
| 514 | goto error; | 514 | goto error; |
| 515 | } | 515 | } |
diff --git a/net/atm/common.c b/net/atm/common.c index 1b9c52a02cd3..22b963d06a10 100644 --- a/net/atm/common.c +++ b/net/atm/common.c | |||
| @@ -252,6 +252,7 @@ void atm_dev_release_vccs(struct atm_dev *dev) | |||
| 252 | } | 252 | } |
| 253 | write_unlock_irq(&vcc_sklist_lock); | 253 | write_unlock_irq(&vcc_sklist_lock); |
| 254 | } | 254 | } |
| 255 | EXPORT_SYMBOL(atm_dev_release_vccs); | ||
| 255 | 256 | ||
| 256 | static int adjust_tp(struct atm_trafprm *tp, unsigned char aal) | 257 | static int adjust_tp(struct atm_trafprm *tp, unsigned char aal) |
| 257 | { | 258 | { |
diff --git a/net/atm/lec.h b/net/atm/lec.h index 9d14d196cc1d..dfc071966463 100644 --- a/net/atm/lec.h +++ b/net/atm/lec.h | |||
| @@ -35,7 +35,7 @@ struct lecdatahdr_8025 { | |||
| 35 | * Operations that LANE2 capable device can do. Two first functions | 35 | * Operations that LANE2 capable device can do. Two first functions |
| 36 | * are used to make the device do things. See spec 3.1.3 and 3.1.4. | 36 | * are used to make the device do things. See spec 3.1.3 and 3.1.4. |
| 37 | * | 37 | * |
| 38 | * The third function is intented for the MPOA component sitting on | 38 | * The third function is intended for the MPOA component sitting on |
| 39 | * top of the LANE device. The MPOA component assigns it's own function | 39 | * top of the LANE device. The MPOA component assigns it's own function |
| 40 | * to (*associate_indicator)() and the LANE device will use that | 40 | * to (*associate_indicator)() and the LANE device will use that |
| 41 | * function to tell about TLVs it sees floating through. | 41 | * function to tell about TLVs it sees floating through. |
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index 9ed26140a269..824e1f6e50f2 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
| @@ -474,7 +474,7 @@ void interface_rx(struct net_device *soft_iface, | |||
| 474 | goto dropped; | 474 | goto dropped; |
| 475 | skb->protocol = eth_type_trans(skb, soft_iface); | 475 | skb->protocol = eth_type_trans(skb, soft_iface); |
| 476 | 476 | ||
| 477 | /* should not be neccesary anymore as we use skb_pull_rcsum() | 477 | /* should not be necessary anymore as we use skb_pull_rcsum() |
| 478 | * TODO: please verify this and remove this TODO | 478 | * TODO: please verify this and remove this TODO |
| 479 | * -- Dec 21st 2009, Simon Wunderlich */ | 479 | * -- Dec 21st 2009, Simon Wunderlich */ |
| 480 | 480 | ||
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index b372fb8bcdcf..c83f618282f7 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
| @@ -186,6 +186,7 @@ static void hci_reset_req(struct hci_dev *hdev, unsigned long opt) | |||
| 186 | BT_DBG("%s %ld", hdev->name, opt); | 186 | BT_DBG("%s %ld", hdev->name, opt); |
| 187 | 187 | ||
| 188 | /* Reset device */ | 188 | /* Reset device */ |
| 189 | set_bit(HCI_RESET, &hdev->flags); | ||
| 189 | hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL); | 190 | hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL); |
| 190 | } | 191 | } |
| 191 | 192 | ||
| @@ -213,8 +214,10 @@ static void hci_init_req(struct hci_dev *hdev, unsigned long opt) | |||
| 213 | /* Mandatory initialization */ | 214 | /* Mandatory initialization */ |
| 214 | 215 | ||
| 215 | /* Reset */ | 216 | /* Reset */ |
| 216 | if (!test_bit(HCI_QUIRK_NO_RESET, &hdev->quirks)) | 217 | if (!test_bit(HCI_QUIRK_NO_RESET, &hdev->quirks)) { |
| 218 | set_bit(HCI_RESET, &hdev->flags); | ||
| 217 | hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL); | 219 | hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL); |
| 220 | } | ||
| 218 | 221 | ||
| 219 | /* Read Local Supported Features */ | 222 | /* Read Local Supported Features */ |
| 220 | hci_send_cmd(hdev, HCI_OP_READ_LOCAL_FEATURES, 0, NULL); | 223 | hci_send_cmd(hdev, HCI_OP_READ_LOCAL_FEATURES, 0, NULL); |
| @@ -584,6 +587,9 @@ static int hci_dev_do_close(struct hci_dev *hdev) | |||
| 584 | hci_req_cancel(hdev, ENODEV); | 587 | hci_req_cancel(hdev, ENODEV); |
| 585 | hci_req_lock(hdev); | 588 | hci_req_lock(hdev); |
| 586 | 589 | ||
| 590 | /* Stop timer, it might be running */ | ||
| 591 | del_timer_sync(&hdev->cmd_timer); | ||
| 592 | |||
| 587 | if (!test_and_clear_bit(HCI_UP, &hdev->flags)) { | 593 | if (!test_and_clear_bit(HCI_UP, &hdev->flags)) { |
| 588 | hci_req_unlock(hdev); | 594 | hci_req_unlock(hdev); |
| 589 | return 0; | 595 | return 0; |
| @@ -623,7 +629,6 @@ static int hci_dev_do_close(struct hci_dev *hdev) | |||
| 623 | 629 | ||
| 624 | /* Drop last sent command */ | 630 | /* Drop last sent command */ |
| 625 | if (hdev->sent_cmd) { | 631 | if (hdev->sent_cmd) { |
| 626 | del_timer_sync(&hdev->cmd_timer); | ||
| 627 | kfree_skb(hdev->sent_cmd); | 632 | kfree_skb(hdev->sent_cmd); |
| 628 | hdev->sent_cmd = NULL; | 633 | hdev->sent_cmd = NULL; |
| 629 | } | 634 | } |
| @@ -1074,6 +1079,7 @@ static void hci_cmd_timer(unsigned long arg) | |||
| 1074 | 1079 | ||
| 1075 | BT_ERR("%s command tx timeout", hdev->name); | 1080 | BT_ERR("%s command tx timeout", hdev->name); |
| 1076 | atomic_set(&hdev->cmd_cnt, 1); | 1081 | atomic_set(&hdev->cmd_cnt, 1); |
| 1082 | clear_bit(HCI_RESET, &hdev->flags); | ||
| 1077 | tasklet_schedule(&hdev->cmd_task); | 1083 | tasklet_schedule(&hdev->cmd_task); |
| 1078 | } | 1084 | } |
| 1079 | 1085 | ||
| @@ -1877,7 +1883,7 @@ static void hci_tx_task(unsigned long arg) | |||
| 1877 | read_unlock(&hci_task_lock); | 1883 | read_unlock(&hci_task_lock); |
| 1878 | } | 1884 | } |
| 1879 | 1885 | ||
| 1880 | /* ----- HCI RX task (incoming data proccessing) ----- */ | 1886 | /* ----- HCI RX task (incoming data processing) ----- */ |
| 1881 | 1887 | ||
| 1882 | /* ACL data packet */ | 1888 | /* ACL data packet */ |
| 1883 | static inline void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb) | 1889 | static inline void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb) |
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 3fbfa50c2bff..cebe7588469f 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
| @@ -183,6 +183,8 @@ static void hci_cc_reset(struct hci_dev *hdev, struct sk_buff *skb) | |||
| 183 | 183 | ||
| 184 | BT_DBG("%s status 0x%x", hdev->name, status); | 184 | BT_DBG("%s status 0x%x", hdev->name, status); |
| 185 | 185 | ||
| 186 | clear_bit(HCI_RESET, &hdev->flags); | ||
| 187 | |||
| 186 | hci_req_complete(hdev, HCI_OP_RESET, status); | 188 | hci_req_complete(hdev, HCI_OP_RESET, status); |
| 187 | } | 189 | } |
| 188 | 190 | ||
| @@ -1847,7 +1849,7 @@ static inline void hci_cmd_status_evt(struct hci_dev *hdev, struct sk_buff *skb) | |||
| 1847 | if (ev->opcode != HCI_OP_NOP) | 1849 | if (ev->opcode != HCI_OP_NOP) |
| 1848 | del_timer(&hdev->cmd_timer); | 1850 | del_timer(&hdev->cmd_timer); |
| 1849 | 1851 | ||
| 1850 | if (ev->ncmd) { | 1852 | if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) { |
| 1851 | atomic_set(&hdev->cmd_cnt, 1); | 1853 | atomic_set(&hdev->cmd_cnt, 1); |
| 1852 | if (!skb_queue_empty(&hdev->cmd_q)) | 1854 | if (!skb_queue_empty(&hdev->cmd_q)) |
| 1853 | tasklet_schedule(&hdev->cmd_task); | 1855 | tasklet_schedule(&hdev->cmd_task); |
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index c9f9cecca527..ca27f3a41536 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
| @@ -1116,7 +1116,9 @@ int l2cap_ertm_send(struct sock *sk) | |||
| 1116 | bt_cb(skb)->tx_seq = pi->next_tx_seq; | 1116 | bt_cb(skb)->tx_seq = pi->next_tx_seq; |
| 1117 | pi->next_tx_seq = (pi->next_tx_seq + 1) % 64; | 1117 | pi->next_tx_seq = (pi->next_tx_seq + 1) % 64; |
| 1118 | 1118 | ||
| 1119 | pi->unacked_frames++; | 1119 | if (bt_cb(skb)->retries == 1) |
| 1120 | pi->unacked_frames++; | ||
| 1121 | |||
| 1120 | pi->frames_sent++; | 1122 | pi->frames_sent++; |
| 1121 | 1123 | ||
| 1122 | if (skb_queue_is_last(TX_QUEUE(sk), skb)) | 1124 | if (skb_queue_is_last(TX_QUEUE(sk), skb)) |
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index fc85e7ae33c7..299fe56a9668 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c | |||
| @@ -679,7 +679,7 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname, ch | |||
| 679 | 679 | ||
| 680 | if (opt == BT_FLUSHABLE_OFF) { | 680 | if (opt == BT_FLUSHABLE_OFF) { |
| 681 | struct l2cap_conn *conn = l2cap_pi(sk)->conn; | 681 | struct l2cap_conn *conn = l2cap_pi(sk)->conn; |
| 682 | /* proceed futher only when we have l2cap_conn and | 682 | /* proceed further only when we have l2cap_conn and |
| 683 | No Flush support in the LM */ | 683 | No Flush support in the LM */ |
| 684 | if (!conn || !lmp_no_flush_capable(conn->hcon->hdev)) { | 684 | if (!conn || !lmp_no_flush_capable(conn->hcon->hdev)) { |
| 685 | err = -EINVAL; | 685 | err = -EINVAL; |
| @@ -923,8 +923,9 @@ void __l2cap_sock_close(struct sock *sk, int reason) | |||
| 923 | rsp.status = cpu_to_le16(L2CAP_CS_NO_INFO); | 923 | rsp.status = cpu_to_le16(L2CAP_CS_NO_INFO); |
| 924 | l2cap_send_cmd(conn, l2cap_pi(sk)->ident, | 924 | l2cap_send_cmd(conn, l2cap_pi(sk)->ident, |
| 925 | L2CAP_CONN_RSP, sizeof(rsp), &rsp); | 925 | L2CAP_CONN_RSP, sizeof(rsp), &rsp); |
| 926 | } else | 926 | } |
| 927 | l2cap_chan_del(sk, reason); | 927 | |
| 928 | l2cap_chan_del(sk, reason); | ||
| 928 | break; | 929 | break; |
| 929 | 930 | ||
| 930 | case BT_CONNECT: | 931 | case BT_CONNECT: |
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 0054c74e27b7..4476d8e3c0f2 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
| @@ -1230,6 +1230,8 @@ static int user_confirm_reply(struct sock *sk, u16 index, unsigned char *data, | |||
| 1230 | if (!hdev) | 1230 | if (!hdev) |
| 1231 | return cmd_status(sk, index, mgmt_op, ENODEV); | 1231 | return cmd_status(sk, index, mgmt_op, ENODEV); |
| 1232 | 1232 | ||
| 1233 | hci_dev_lock_bh(hdev); | ||
| 1234 | |||
| 1233 | if (!test_bit(HCI_UP, &hdev->flags)) { | 1235 | if (!test_bit(HCI_UP, &hdev->flags)) { |
| 1234 | err = cmd_status(sk, index, mgmt_op, ENETDOWN); | 1236 | err = cmd_status(sk, index, mgmt_op, ENETDOWN); |
| 1235 | goto failed; | 1237 | goto failed; |
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index 88485cc74dc3..cc4d3c5ab1c6 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c | |||
| @@ -169,7 +169,7 @@ void br_fdb_flush(struct net_bridge *br) | |||
| 169 | spin_unlock_bh(&br->hash_lock); | 169 | spin_unlock_bh(&br->hash_lock); |
| 170 | } | 170 | } |
| 171 | 171 | ||
| 172 | /* Flush all entries refering to a specific port. | 172 | /* Flush all entries referring to a specific port. |
| 173 | * if do_all is set also flush static entries | 173 | * if do_all is set also flush static entries |
| 174 | */ | 174 | */ |
| 175 | void br_fdb_delete_by_port(struct net_bridge *br, | 175 | void br_fdb_delete_by_port(struct net_bridge *br, |
diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c index cb43312b846e..3d9fca0e3370 100644 --- a/net/bridge/br_ioctl.c +++ b/net/bridge/br_ioctl.c | |||
| @@ -106,7 +106,7 @@ static int add_del_if(struct net_bridge *br, int ifindex, int isadd) | |||
| 106 | /* | 106 | /* |
| 107 | * Legacy ioctl's through SIOCDEVPRIVATE | 107 | * Legacy ioctl's through SIOCDEVPRIVATE |
| 108 | * This interface is deprecated because it was too difficult to | 108 | * This interface is deprecated because it was too difficult to |
| 109 | * to do the translation for 32/64bit ioctl compatability. | 109 | * to do the translation for 32/64bit ioctl compatibility. |
| 110 | */ | 110 | */ |
| 111 | static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | 111 | static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) |
| 112 | { | 112 | { |
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index f61eb2eff3fd..59660c909a7c 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c | |||
| @@ -1475,7 +1475,7 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br, | |||
| 1475 | ip6h->payload_len == 0) | 1475 | ip6h->payload_len == 0) |
| 1476 | return 0; | 1476 | return 0; |
| 1477 | 1477 | ||
| 1478 | len = ntohs(ip6h->payload_len); | 1478 | len = ntohs(ip6h->payload_len) + sizeof(*ip6h); |
| 1479 | if (skb->len < len) | 1479 | if (skb->len < len) |
| 1480 | return -EINVAL; | 1480 | return -EINVAL; |
| 1481 | 1481 | ||
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c index 5593f5aec942..9b61d09de9b9 100644 --- a/net/bridge/br_stp_if.c +++ b/net/bridge/br_stp_if.c | |||
| @@ -213,7 +213,7 @@ bool br_stp_recalculate_bridge_id(struct net_bridge *br) | |||
| 213 | 213 | ||
| 214 | /* user has chosen a value so keep it */ | 214 | /* user has chosen a value so keep it */ |
| 215 | if (br->flags & BR_SET_MAC_ADDR) | 215 | if (br->flags & BR_SET_MAC_ADDR) |
| 216 | return; | 216 | return false; |
| 217 | 217 | ||
| 218 | list_for_each_entry(p, &br->port_list, list) { | 218 | list_for_each_entry(p, &br->port_list, list) { |
| 219 | if (addr == br_mac_zero || | 219 | if (addr == br_mac_zero || |
diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c index 8184c031d028..37a4034dfc29 100644 --- a/net/caif/caif_socket.c +++ b/net/caif/caif_socket.c | |||
| @@ -852,7 +852,7 @@ static int caif_connect(struct socket *sock, struct sockaddr *uaddr, | |||
| 852 | sock->state = SS_CONNECTING; | 852 | sock->state = SS_CONNECTING; |
| 853 | sk->sk_state = CAIF_CONNECTING; | 853 | sk->sk_state = CAIF_CONNECTING; |
| 854 | 854 | ||
| 855 | /* Check priority value comming from socket */ | 855 | /* Check priority value coming from socket */ |
| 856 | /* if priority value is out of range it will be ajusted */ | 856 | /* if priority value is out of range it will be ajusted */ |
| 857 | if (cf_sk->sk.sk_priority > CAIF_PRIO_MAX) | 857 | if (cf_sk->sk.sk_priority > CAIF_PRIO_MAX) |
| 858 | cf_sk->conn_req.priority = CAIF_PRIO_MAX; | 858 | cf_sk->conn_req.priority = CAIF_PRIO_MAX; |
diff --git a/net/can/bcm.c b/net/can/bcm.c index 871a0ad51025..57b1aed79014 100644 --- a/net/can/bcm.c +++ b/net/can/bcm.c | |||
| @@ -387,7 +387,7 @@ static void bcm_tx_timeout_tsklet(unsigned long data) | |||
| 387 | } | 387 | } |
| 388 | 388 | ||
| 389 | /* | 389 | /* |
| 390 | * bcm_tx_timeout_handler - performes cyclic CAN frame transmissions | 390 | * bcm_tx_timeout_handler - performs cyclic CAN frame transmissions |
| 391 | */ | 391 | */ |
| 392 | static enum hrtimer_restart bcm_tx_timeout_handler(struct hrtimer *hrtimer) | 392 | static enum hrtimer_restart bcm_tx_timeout_handler(struct hrtimer *hrtimer) |
| 393 | { | 393 | { |
diff --git a/net/ceph/Kconfig b/net/ceph/Kconfig index ad424049b0cf..be683f2d401f 100644 --- a/net/ceph/Kconfig +++ b/net/ceph/Kconfig | |||
| @@ -4,6 +4,7 @@ config CEPH_LIB | |||
| 4 | select LIBCRC32C | 4 | select LIBCRC32C |
| 5 | select CRYPTO_AES | 5 | select CRYPTO_AES |
| 6 | select CRYPTO | 6 | select CRYPTO |
| 7 | select KEYS | ||
| 7 | default n | 8 | default n |
| 8 | help | 9 | help |
| 9 | Choose Y or M here to include cephlib, which provides the | 10 | Choose Y or M here to include cephlib, which provides the |
diff --git a/net/ceph/auth.c b/net/ceph/auth.c index 549c1f43e1d5..b4bf4ac090f1 100644 --- a/net/ceph/auth.c +++ b/net/ceph/auth.c | |||
| @@ -35,12 +35,12 @@ static int ceph_auth_init_protocol(struct ceph_auth_client *ac, int protocol) | |||
| 35 | /* | 35 | /* |
| 36 | * setup, teardown. | 36 | * setup, teardown. |
| 37 | */ | 37 | */ |
| 38 | struct ceph_auth_client *ceph_auth_init(const char *name, const char *secret) | 38 | struct ceph_auth_client *ceph_auth_init(const char *name, const struct ceph_crypto_key *key) |
| 39 | { | 39 | { |
| 40 | struct ceph_auth_client *ac; | 40 | struct ceph_auth_client *ac; |
| 41 | int ret; | 41 | int ret; |
| 42 | 42 | ||
| 43 | dout("auth_init name '%s' secret '%s'\n", name, secret); | 43 | dout("auth_init name '%s'\n", name); |
| 44 | 44 | ||
| 45 | ret = -ENOMEM; | 45 | ret = -ENOMEM; |
| 46 | ac = kzalloc(sizeof(*ac), GFP_NOFS); | 46 | ac = kzalloc(sizeof(*ac), GFP_NOFS); |
| @@ -52,8 +52,8 @@ struct ceph_auth_client *ceph_auth_init(const char *name, const char *secret) | |||
| 52 | ac->name = name; | 52 | ac->name = name; |
| 53 | else | 53 | else |
| 54 | ac->name = CEPH_AUTH_NAME_DEFAULT; | 54 | ac->name = CEPH_AUTH_NAME_DEFAULT; |
| 55 | dout("auth_init name %s secret %s\n", ac->name, secret); | 55 | dout("auth_init name %s\n", ac->name); |
| 56 | ac->secret = secret; | 56 | ac->key = key; |
| 57 | return ac; | 57 | return ac; |
| 58 | 58 | ||
| 59 | out: | 59 | out: |
diff --git a/net/ceph/auth_x.c b/net/ceph/auth_x.c index 7fd5dfcf6e18..1587dc6010c6 100644 --- a/net/ceph/auth_x.c +++ b/net/ceph/auth_x.c | |||
| @@ -662,14 +662,16 @@ int ceph_x_init(struct ceph_auth_client *ac) | |||
| 662 | goto out; | 662 | goto out; |
| 663 | 663 | ||
| 664 | ret = -EINVAL; | 664 | ret = -EINVAL; |
| 665 | if (!ac->secret) { | 665 | if (!ac->key) { |
| 666 | pr_err("no secret set (for auth_x protocol)\n"); | 666 | pr_err("no secret set (for auth_x protocol)\n"); |
| 667 | goto out_nomem; | 667 | goto out_nomem; |
| 668 | } | 668 | } |
| 669 | 669 | ||
| 670 | ret = ceph_crypto_key_unarmor(&xi->secret, ac->secret); | 670 | ret = ceph_crypto_key_clone(&xi->secret, ac->key); |
| 671 | if (ret) | 671 | if (ret < 0) { |
| 672 | pr_err("cannot clone key: %d\n", ret); | ||
| 672 | goto out_nomem; | 673 | goto out_nomem; |
| 674 | } | ||
| 673 | 675 | ||
| 674 | xi->starting = true; | 676 | xi->starting = true; |
| 675 | xi->ticket_handlers = RB_ROOT; | 677 | xi->ticket_handlers = RB_ROOT; |
diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c index 95f96ab94bba..132963abc266 100644 --- a/net/ceph/ceph_common.c +++ b/net/ceph/ceph_common.c | |||
| @@ -5,6 +5,8 @@ | |||
| 5 | #include <linux/fs.h> | 5 | #include <linux/fs.h> |
| 6 | #include <linux/inet.h> | 6 | #include <linux/inet.h> |
| 7 | #include <linux/in6.h> | 7 | #include <linux/in6.h> |
| 8 | #include <linux/key.h> | ||
| 9 | #include <keys/ceph-type.h> | ||
| 8 | #include <linux/module.h> | 10 | #include <linux/module.h> |
| 9 | #include <linux/mount.h> | 11 | #include <linux/mount.h> |
| 10 | #include <linux/parser.h> | 12 | #include <linux/parser.h> |
| @@ -20,6 +22,7 @@ | |||
| 20 | #include <linux/ceph/decode.h> | 22 | #include <linux/ceph/decode.h> |
| 21 | #include <linux/ceph/mon_client.h> | 23 | #include <linux/ceph/mon_client.h> |
| 22 | #include <linux/ceph/auth.h> | 24 | #include <linux/ceph/auth.h> |
| 25 | #include "crypto.h" | ||
| 23 | 26 | ||
| 24 | 27 | ||
| 25 | 28 | ||
| @@ -117,9 +120,29 @@ int ceph_compare_options(struct ceph_options *new_opt, | |||
| 117 | if (ret) | 120 | if (ret) |
| 118 | return ret; | 121 | return ret; |
| 119 | 122 | ||
| 120 | ret = strcmp_null(opt1->secret, opt2->secret); | 123 | if (opt1->key && !opt2->key) |
| 121 | if (ret) | 124 | return -1; |
| 122 | return ret; | 125 | if (!opt1->key && opt2->key) |
| 126 | return 1; | ||
| 127 | if (opt1->key && opt2->key) { | ||
| 128 | if (opt1->key->type != opt2->key->type) | ||
| 129 | return -1; | ||
| 130 | if (opt1->key->created.tv_sec != opt2->key->created.tv_sec) | ||
| 131 | return -1; | ||
| 132 | if (opt1->key->created.tv_nsec != opt2->key->created.tv_nsec) | ||
| 133 | return -1; | ||
| 134 | if (opt1->key->len != opt2->key->len) | ||
| 135 | return -1; | ||
| 136 | if (opt1->key->key && !opt2->key->key) | ||
| 137 | return -1; | ||
| 138 | if (!opt1->key->key && opt2->key->key) | ||
| 139 | return 1; | ||
| 140 | if (opt1->key->key && opt2->key->key) { | ||
| 141 | ret = memcmp(opt1->key->key, opt2->key->key, opt1->key->len); | ||
| 142 | if (ret) | ||
| 143 | return ret; | ||
| 144 | } | ||
| 145 | } | ||
| 123 | 146 | ||
| 124 | /* any matching mon ip implies a match */ | 147 | /* any matching mon ip implies a match */ |
| 125 | for (i = 0; i < opt1->num_mon; i++) { | 148 | for (i = 0; i < opt1->num_mon; i++) { |
| @@ -176,6 +199,7 @@ enum { | |||
| 176 | Opt_fsid, | 199 | Opt_fsid, |
| 177 | Opt_name, | 200 | Opt_name, |
| 178 | Opt_secret, | 201 | Opt_secret, |
| 202 | Opt_key, | ||
| 179 | Opt_ip, | 203 | Opt_ip, |
| 180 | Opt_last_string, | 204 | Opt_last_string, |
| 181 | /* string args above */ | 205 | /* string args above */ |
| @@ -192,6 +216,7 @@ static match_table_t opt_tokens = { | |||
| 192 | {Opt_fsid, "fsid=%s"}, | 216 | {Opt_fsid, "fsid=%s"}, |
| 193 | {Opt_name, "name=%s"}, | 217 | {Opt_name, "name=%s"}, |
| 194 | {Opt_secret, "secret=%s"}, | 218 | {Opt_secret, "secret=%s"}, |
| 219 | {Opt_key, "key=%s"}, | ||
| 195 | {Opt_ip, "ip=%s"}, | 220 | {Opt_ip, "ip=%s"}, |
| 196 | /* string args above */ | 221 | /* string args above */ |
| 197 | {Opt_noshare, "noshare"}, | 222 | {Opt_noshare, "noshare"}, |
| @@ -203,11 +228,56 @@ void ceph_destroy_options(struct ceph_options *opt) | |||
| 203 | { | 228 | { |
| 204 | dout("destroy_options %p\n", opt); | 229 | dout("destroy_options %p\n", opt); |
| 205 | kfree(opt->name); | 230 | kfree(opt->name); |
| 206 | kfree(opt->secret); | 231 | if (opt->key) { |
| 232 | ceph_crypto_key_destroy(opt->key); | ||
| 233 | kfree(opt->key); | ||
| 234 | } | ||
| 207 | kfree(opt); | 235 | kfree(opt); |
| 208 | } | 236 | } |
| 209 | EXPORT_SYMBOL(ceph_destroy_options); | 237 | EXPORT_SYMBOL(ceph_destroy_options); |
| 210 | 238 | ||
| 239 | /* get secret from key store */ | ||
| 240 | static int get_secret(struct ceph_crypto_key *dst, const char *name) { | ||
| 241 | struct key *ukey; | ||
| 242 | int key_err; | ||
| 243 | int err = 0; | ||
| 244 | struct ceph_crypto_key *ckey; | ||
| 245 | |||
| 246 | ukey = request_key(&key_type_ceph, name, NULL); | ||
| 247 | if (!ukey || IS_ERR(ukey)) { | ||
| 248 | /* request_key errors don't map nicely to mount(2) | ||
| 249 | errors; don't even try, but still printk */ | ||
| 250 | key_err = PTR_ERR(ukey); | ||
| 251 | switch (key_err) { | ||
| 252 | case -ENOKEY: | ||
| 253 | pr_warning("ceph: Mount failed due to key not found: %s\n", name); | ||
| 254 | break; | ||
| 255 | case -EKEYEXPIRED: | ||
| 256 | pr_warning("ceph: Mount failed due to expired key: %s\n", name); | ||
| 257 | break; | ||
| 258 | case -EKEYREVOKED: | ||
| 259 | pr_warning("ceph: Mount failed due to revoked key: %s\n", name); | ||
| 260 | break; | ||
| 261 | default: | ||
| 262 | pr_warning("ceph: Mount failed due to unknown key error" | ||
| 263 | " %d: %s\n", key_err, name); | ||
| 264 | } | ||
| 265 | err = -EPERM; | ||
| 266 | goto out; | ||
| 267 | } | ||
| 268 | |||
| 269 | ckey = ukey->payload.data; | ||
| 270 | err = ceph_crypto_key_clone(dst, ckey); | ||
| 271 | if (err) | ||
| 272 | goto out_key; | ||
| 273 | /* pass through, err is 0 */ | ||
| 274 | |||
| 275 | out_key: | ||
| 276 | key_put(ukey); | ||
| 277 | out: | ||
| 278 | return err; | ||
| 279 | } | ||
| 280 | |||
| 211 | int ceph_parse_options(struct ceph_options **popt, char *options, | 281 | int ceph_parse_options(struct ceph_options **popt, char *options, |
| 212 | const char *dev_name, const char *dev_name_end, | 282 | const char *dev_name, const char *dev_name_end, |
| 213 | int (*parse_extra_token)(char *c, void *private), | 283 | int (*parse_extra_token)(char *c, void *private), |
| @@ -295,9 +365,24 @@ int ceph_parse_options(struct ceph_options **popt, char *options, | |||
| 295 | GFP_KERNEL); | 365 | GFP_KERNEL); |
| 296 | break; | 366 | break; |
| 297 | case Opt_secret: | 367 | case Opt_secret: |
| 298 | opt->secret = kstrndup(argstr[0].from, | 368 | opt->key = kzalloc(sizeof(*opt->key), GFP_KERNEL); |
| 299 | argstr[0].to-argstr[0].from, | 369 | if (!opt->key) { |
| 300 | GFP_KERNEL); | 370 | err = -ENOMEM; |
| 371 | goto out; | ||
| 372 | } | ||
| 373 | err = ceph_crypto_key_unarmor(opt->key, argstr[0].from); | ||
| 374 | if (err < 0) | ||
| 375 | goto out; | ||
| 376 | break; | ||
| 377 | case Opt_key: | ||
| 378 | opt->key = kzalloc(sizeof(*opt->key), GFP_KERNEL); | ||
| 379 | if (!opt->key) { | ||
| 380 | err = -ENOMEM; | ||
| 381 | goto out; | ||
| 382 | } | ||
| 383 | err = get_secret(opt->key, argstr[0].from); | ||
| 384 | if (err < 0) | ||
| 385 | goto out; | ||
| 301 | break; | 386 | break; |
| 302 | 387 | ||
| 303 | /* misc */ | 388 | /* misc */ |
| @@ -394,8 +479,8 @@ void ceph_destroy_client(struct ceph_client *client) | |||
| 394 | ceph_osdc_stop(&client->osdc); | 479 | ceph_osdc_stop(&client->osdc); |
| 395 | 480 | ||
| 396 | /* | 481 | /* |
| 397 | * make sure mds and osd connections close out before destroying | 482 | * make sure osd connections close out before destroying the |
| 398 | * the auth module, which is needed to free those connections' | 483 | * auth module, which is needed to free those connections' |
| 399 | * ceph_authorizers. | 484 | * ceph_authorizers. |
| 400 | */ | 485 | */ |
| 401 | ceph_msgr_flush(); | 486 | ceph_msgr_flush(); |
| @@ -496,10 +581,14 @@ static int __init init_ceph_lib(void) | |||
| 496 | if (ret < 0) | 581 | if (ret < 0) |
| 497 | goto out; | 582 | goto out; |
| 498 | 583 | ||
| 499 | ret = ceph_msgr_init(); | 584 | ret = ceph_crypto_init(); |
| 500 | if (ret < 0) | 585 | if (ret < 0) |
| 501 | goto out_debugfs; | 586 | goto out_debugfs; |
| 502 | 587 | ||
| 588 | ret = ceph_msgr_init(); | ||
| 589 | if (ret < 0) | ||
| 590 | goto out_crypto; | ||
| 591 | |||
| 503 | pr_info("loaded (mon/osd proto %d/%d, osdmap %d/%d %d/%d)\n", | 592 | pr_info("loaded (mon/osd proto %d/%d, osdmap %d/%d %d/%d)\n", |
| 504 | CEPH_MONC_PROTOCOL, CEPH_OSDC_PROTOCOL, | 593 | CEPH_MONC_PROTOCOL, CEPH_OSDC_PROTOCOL, |
| 505 | CEPH_OSDMAP_VERSION, CEPH_OSDMAP_VERSION_EXT, | 594 | CEPH_OSDMAP_VERSION, CEPH_OSDMAP_VERSION_EXT, |
| @@ -507,6 +596,8 @@ static int __init init_ceph_lib(void) | |||
| 507 | 596 | ||
| 508 | return 0; | 597 | return 0; |
| 509 | 598 | ||
| 599 | out_crypto: | ||
| 600 | ceph_crypto_shutdown(); | ||
| 510 | out_debugfs: | 601 | out_debugfs: |
| 511 | ceph_debugfs_cleanup(); | 602 | ceph_debugfs_cleanup(); |
| 512 | out: | 603 | out: |
| @@ -517,6 +608,7 @@ static void __exit exit_ceph_lib(void) | |||
| 517 | { | 608 | { |
| 518 | dout("exit_ceph_lib\n"); | 609 | dout("exit_ceph_lib\n"); |
| 519 | ceph_msgr_exit(); | 610 | ceph_msgr_exit(); |
| 611 | ceph_crypto_shutdown(); | ||
| 520 | ceph_debugfs_cleanup(); | 612 | ceph_debugfs_cleanup(); |
| 521 | } | 613 | } |
| 522 | 614 | ||
diff --git a/net/ceph/crypto.c b/net/ceph/crypto.c index 7b505b0c983f..5a8009c9e0cd 100644 --- a/net/ceph/crypto.c +++ b/net/ceph/crypto.c | |||
| @@ -5,10 +5,23 @@ | |||
| 5 | #include <linux/scatterlist.h> | 5 | #include <linux/scatterlist.h> |
| 6 | #include <linux/slab.h> | 6 | #include <linux/slab.h> |
| 7 | #include <crypto/hash.h> | 7 | #include <crypto/hash.h> |
| 8 | #include <linux/key-type.h> | ||
| 8 | 9 | ||
| 10 | #include <keys/ceph-type.h> | ||
| 9 | #include <linux/ceph/decode.h> | 11 | #include <linux/ceph/decode.h> |
| 10 | #include "crypto.h" | 12 | #include "crypto.h" |
| 11 | 13 | ||
| 14 | int ceph_crypto_key_clone(struct ceph_crypto_key *dst, | ||
| 15 | const struct ceph_crypto_key *src) | ||
| 16 | { | ||
| 17 | memcpy(dst, src, sizeof(struct ceph_crypto_key)); | ||
| 18 | dst->key = kmalloc(src->len, GFP_NOFS); | ||
| 19 | if (!dst->key) | ||
| 20 | return -ENOMEM; | ||
| 21 | memcpy(dst->key, src->key, src->len); | ||
| 22 | return 0; | ||
| 23 | } | ||
| 24 | |||
| 12 | int ceph_crypto_key_encode(struct ceph_crypto_key *key, void **p, void *end) | 25 | int ceph_crypto_key_encode(struct ceph_crypto_key *key, void **p, void *end) |
| 13 | { | 26 | { |
| 14 | if (*p + sizeof(u16) + sizeof(key->created) + | 27 | if (*p + sizeof(u16) + sizeof(key->created) + |
| @@ -410,3 +423,63 @@ int ceph_encrypt2(struct ceph_crypto_key *secret, void *dst, size_t *dst_len, | |||
| 410 | return -EINVAL; | 423 | return -EINVAL; |
| 411 | } | 424 | } |
| 412 | } | 425 | } |
| 426 | |||
| 427 | int ceph_key_instantiate(struct key *key, const void *data, size_t datalen) | ||
| 428 | { | ||
| 429 | struct ceph_crypto_key *ckey; | ||
| 430 | int ret; | ||
| 431 | void *p; | ||
| 432 | |||
| 433 | ret = -EINVAL; | ||
| 434 | if (datalen <= 0 || datalen > 32767 || !data) | ||
| 435 | goto err; | ||
| 436 | |||
| 437 | ret = key_payload_reserve(key, datalen); | ||
| 438 | if (ret < 0) | ||
| 439 | goto err; | ||
| 440 | |||
| 441 | ret = -ENOMEM; | ||
| 442 | ckey = kmalloc(sizeof(*ckey), GFP_KERNEL); | ||
| 443 | if (!ckey) | ||
| 444 | goto err; | ||
| 445 | |||
| 446 | /* TODO ceph_crypto_key_decode should really take const input */ | ||
| 447 | p = (void*)data; | ||
| 448 | ret = ceph_crypto_key_decode(ckey, &p, (char*)data+datalen); | ||
| 449 | if (ret < 0) | ||
| 450 | goto err_ckey; | ||
| 451 | |||
| 452 | key->payload.data = ckey; | ||
| 453 | return 0; | ||
| 454 | |||
| 455 | err_ckey: | ||
| 456 | kfree(ckey); | ||
| 457 | err: | ||
| 458 | return ret; | ||
| 459 | } | ||
| 460 | |||
| 461 | int ceph_key_match(const struct key *key, const void *description) | ||
| 462 | { | ||
| 463 | return strcmp(key->description, description) == 0; | ||
| 464 | } | ||
| 465 | |||
| 466 | void ceph_key_destroy(struct key *key) { | ||
| 467 | struct ceph_crypto_key *ckey = key->payload.data; | ||
| 468 | |||
| 469 | ceph_crypto_key_destroy(ckey); | ||
| 470 | } | ||
| 471 | |||
| 472 | struct key_type key_type_ceph = { | ||
| 473 | .name = "ceph", | ||
| 474 | .instantiate = ceph_key_instantiate, | ||
| 475 | .match = ceph_key_match, | ||
| 476 | .destroy = ceph_key_destroy, | ||
| 477 | }; | ||
| 478 | |||
| 479 | int ceph_crypto_init(void) { | ||
| 480 | return register_key_type(&key_type_ceph); | ||
| 481 | } | ||
| 482 | |||
| 483 | void ceph_crypto_shutdown(void) { | ||
| 484 | unregister_key_type(&key_type_ceph); | ||
| 485 | } | ||
diff --git a/net/ceph/crypto.h b/net/ceph/crypto.h index f9eccace592b..1919d1550d75 100644 --- a/net/ceph/crypto.h +++ b/net/ceph/crypto.h | |||
| @@ -19,6 +19,8 @@ static inline void ceph_crypto_key_destroy(struct ceph_crypto_key *key) | |||
| 19 | kfree(key->key); | 19 | kfree(key->key); |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | extern int ceph_crypto_key_clone(struct ceph_crypto_key *dst, | ||
| 23 | const struct ceph_crypto_key *src); | ||
| 22 | extern int ceph_crypto_key_encode(struct ceph_crypto_key *key, | 24 | extern int ceph_crypto_key_encode(struct ceph_crypto_key *key, |
| 23 | void **p, void *end); | 25 | void **p, void *end); |
| 24 | extern int ceph_crypto_key_decode(struct ceph_crypto_key *key, | 26 | extern int ceph_crypto_key_decode(struct ceph_crypto_key *key, |
| @@ -40,6 +42,8 @@ extern int ceph_encrypt2(struct ceph_crypto_key *secret, | |||
| 40 | void *dst, size_t *dst_len, | 42 | void *dst, size_t *dst_len, |
| 41 | const void *src1, size_t src1_len, | 43 | const void *src1, size_t src1_len, |
| 42 | const void *src2, size_t src2_len); | 44 | const void *src2, size_t src2_len); |
| 45 | extern int ceph_crypto_init(void); | ||
| 46 | extern void ceph_crypto_shutdown(void); | ||
| 43 | 47 | ||
| 44 | /* armor.c */ | 48 | /* armor.c */ |
| 45 | extern int ceph_armor(char *dst, const char *src, const char *end); | 49 | extern int ceph_armor(char *dst, const char *src, const char *end); |
diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c index 8a079399174a..cbe31fa45508 100644 --- a/net/ceph/mon_client.c +++ b/net/ceph/mon_client.c | |||
| @@ -759,7 +759,7 @@ int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl) | |||
| 759 | 759 | ||
| 760 | /* authentication */ | 760 | /* authentication */ |
| 761 | monc->auth = ceph_auth_init(cl->options->name, | 761 | monc->auth = ceph_auth_init(cl->options->name, |
| 762 | cl->options->secret); | 762 | cl->options->key); |
| 763 | if (IS_ERR(monc->auth)) | 763 | if (IS_ERR(monc->auth)) |
| 764 | return PTR_ERR(monc->auth); | 764 | return PTR_ERR(monc->auth); |
| 765 | monc->auth->want_keys = | 765 | monc->auth->want_keys = |
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 02212ed50852..5a80f41c0cba 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c | |||
| @@ -579,9 +579,15 @@ static void __kick_osd_requests(struct ceph_osd_client *osdc, | |||
| 579 | 579 | ||
| 580 | list_for_each_entry_safe(req, nreq, &osd->o_linger_requests, | 580 | list_for_each_entry_safe(req, nreq, &osd->o_linger_requests, |
| 581 | r_linger_osd) { | 581 | r_linger_osd) { |
| 582 | __unregister_linger_request(osdc, req); | 582 | /* |
| 583 | * reregister request prior to unregistering linger so | ||
| 584 | * that r_osd is preserved. | ||
| 585 | */ | ||
| 586 | BUG_ON(!list_empty(&req->r_req_lru_item)); | ||
| 583 | __register_request(osdc, req); | 587 | __register_request(osdc, req); |
| 584 | list_move(&req->r_req_lru_item, &osdc->req_unsent); | 588 | list_add(&req->r_req_lru_item, &osdc->req_unsent); |
| 589 | list_add(&req->r_osd_item, &req->r_osd->o_requests); | ||
| 590 | __unregister_linger_request(osdc, req); | ||
| 585 | dout("requeued lingering %p tid %llu osd%d\n", req, req->r_tid, | 591 | dout("requeued lingering %p tid %llu osd%d\n", req, req->r_tid, |
| 586 | osd->o_osd); | 592 | osd->o_osd); |
| 587 | } | 593 | } |
| @@ -798,7 +804,7 @@ static void __register_request(struct ceph_osd_client *osdc, | |||
| 798 | req->r_request->hdr.tid = cpu_to_le64(req->r_tid); | 804 | req->r_request->hdr.tid = cpu_to_le64(req->r_tid); |
| 799 | INIT_LIST_HEAD(&req->r_req_lru_item); | 805 | INIT_LIST_HEAD(&req->r_req_lru_item); |
| 800 | 806 | ||
| 801 | dout("register_request %p tid %lld\n", req, req->r_tid); | 807 | dout("__register_request %p tid %lld\n", req, req->r_tid); |
| 802 | __insert_request(osdc, req); | 808 | __insert_request(osdc, req); |
| 803 | ceph_osdc_get_request(req); | 809 | ceph_osdc_get_request(req); |
| 804 | osdc->num_requests++; | 810 | osdc->num_requests++; |
| @@ -837,8 +843,7 @@ static void __unregister_request(struct ceph_osd_client *osdc, | |||
| 837 | dout("moving osd to %p lru\n", req->r_osd); | 843 | dout("moving osd to %p lru\n", req->r_osd); |
| 838 | __move_osd_to_lru(osdc, req->r_osd); | 844 | __move_osd_to_lru(osdc, req->r_osd); |
| 839 | } | 845 | } |
| 840 | if (list_empty(&req->r_osd_item) && | 846 | if (list_empty(&req->r_linger_item)) |
| 841 | list_empty(&req->r_linger_item)) | ||
| 842 | req->r_osd = NULL; | 847 | req->r_osd = NULL; |
| 843 | } | 848 | } |
| 844 | 849 | ||
| @@ -883,7 +888,8 @@ static void __unregister_linger_request(struct ceph_osd_client *osdc, | |||
| 883 | dout("moving osd to %p lru\n", req->r_osd); | 888 | dout("moving osd to %p lru\n", req->r_osd); |
| 884 | __move_osd_to_lru(osdc, req->r_osd); | 889 | __move_osd_to_lru(osdc, req->r_osd); |
| 885 | } | 890 | } |
| 886 | req->r_osd = NULL; | 891 | if (list_empty(&req->r_osd_item)) |
| 892 | req->r_osd = NULL; | ||
| 887 | } | 893 | } |
| 888 | } | 894 | } |
| 889 | 895 | ||
| @@ -917,7 +923,7 @@ EXPORT_SYMBOL(ceph_osdc_set_request_linger); | |||
| 917 | /* | 923 | /* |
| 918 | * Pick an osd (the first 'up' osd in the pg), allocate the osd struct | 924 | * Pick an osd (the first 'up' osd in the pg), allocate the osd struct |
| 919 | * (as needed), and set the request r_osd appropriately. If there is | 925 | * (as needed), and set the request r_osd appropriately. If there is |
| 920 | * no up osd, set r_osd to NULL. Move the request to the appropiate list | 926 | * no up osd, set r_osd to NULL. Move the request to the appropriate list |
| 921 | * (unsent, homeless) or leave on in-flight lru. | 927 | * (unsent, homeless) or leave on in-flight lru. |
| 922 | * | 928 | * |
| 923 | * Return 0 if unchanged, 1 if changed, or negative on error. | 929 | * Return 0 if unchanged, 1 if changed, or negative on error. |
| @@ -1602,11 +1608,11 @@ void handle_watch_notify(struct ceph_osd_client *osdc, struct ceph_msg *msg) | |||
| 1602 | cookie, ver, event); | 1608 | cookie, ver, event); |
| 1603 | if (event) { | 1609 | if (event) { |
| 1604 | event_work = kmalloc(sizeof(*event_work), GFP_NOIO); | 1610 | event_work = kmalloc(sizeof(*event_work), GFP_NOIO); |
| 1605 | INIT_WORK(&event_work->work, do_event_work); | ||
| 1606 | if (!event_work) { | 1611 | if (!event_work) { |
| 1607 | dout("ERROR: could not allocate event_work\n"); | 1612 | dout("ERROR: could not allocate event_work\n"); |
| 1608 | goto done_err; | 1613 | goto done_err; |
| 1609 | } | 1614 | } |
| 1615 | INIT_WORK(&event_work->work, do_event_work); | ||
| 1610 | event_work->event = event; | 1616 | event_work->event = event; |
| 1611 | event_work->ver = ver; | 1617 | event_work->ver = ver; |
| 1612 | event_work->notify_id = notify_id; | 1618 | event_work->notify_id = notify_id; |
| @@ -1672,7 +1678,7 @@ int ceph_osdc_start_request(struct ceph_osd_client *osdc, | |||
| 1672 | if (req->r_sent == 0) { | 1678 | if (req->r_sent == 0) { |
| 1673 | rc = __map_request(osdc, req); | 1679 | rc = __map_request(osdc, req); |
| 1674 | if (rc < 0) | 1680 | if (rc < 0) |
| 1675 | return rc; | 1681 | goto out_unlock; |
| 1676 | if (req->r_osd == NULL) { | 1682 | if (req->r_osd == NULL) { |
| 1677 | dout("send_request %p no up osds in pg\n", req); | 1683 | dout("send_request %p no up osds in pg\n", req); |
| 1678 | ceph_monc_request_next_osdmap(&osdc->client->monc); | 1684 | ceph_monc_request_next_osdmap(&osdc->client->monc); |
| @@ -1689,6 +1695,8 @@ int ceph_osdc_start_request(struct ceph_osd_client *osdc, | |||
| 1689 | } | 1695 | } |
| 1690 | } | 1696 | } |
| 1691 | } | 1697 | } |
| 1698 | |||
| 1699 | out_unlock: | ||
| 1692 | mutex_unlock(&osdc->request_mutex); | 1700 | mutex_unlock(&osdc->request_mutex); |
| 1693 | up_read(&osdc->map_sem); | 1701 | up_read(&osdc->map_sem); |
| 1694 | return rc; | 1702 | return rc; |
diff --git a/net/core/dev.c b/net/core/dev.c index 563ddc28139d..956d3b006e8b 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
| @@ -1454,6 +1454,27 @@ static inline void net_timestamp_check(struct sk_buff *skb) | |||
| 1454 | __net_timestamp(skb); | 1454 | __net_timestamp(skb); |
| 1455 | } | 1455 | } |
| 1456 | 1456 | ||
| 1457 | static inline bool is_skb_forwardable(struct net_device *dev, | ||
| 1458 | struct sk_buff *skb) | ||
| 1459 | { | ||
| 1460 | unsigned int len; | ||
| 1461 | |||
| 1462 | if (!(dev->flags & IFF_UP)) | ||
| 1463 | return false; | ||
| 1464 | |||
| 1465 | len = dev->mtu + dev->hard_header_len + VLAN_HLEN; | ||
| 1466 | if (skb->len <= len) | ||
| 1467 | return true; | ||
| 1468 | |||
| 1469 | /* if TSO is enabled, we don't care about the length as the packet | ||
| 1470 | * could be forwarded without being segmented before | ||
| 1471 | */ | ||
| 1472 | if (skb_is_gso(skb)) | ||
| 1473 | return true; | ||
| 1474 | |||
| 1475 | return false; | ||
| 1476 | } | ||
| 1477 | |||
| 1457 | /** | 1478 | /** |
| 1458 | * dev_forward_skb - loopback an skb to another netif | 1479 | * dev_forward_skb - loopback an skb to another netif |
| 1459 | * | 1480 | * |
| @@ -1477,8 +1498,7 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb) | |||
| 1477 | skb_orphan(skb); | 1498 | skb_orphan(skb); |
| 1478 | nf_reset(skb); | 1499 | nf_reset(skb); |
| 1479 | 1500 | ||
| 1480 | if (unlikely(!(dev->flags & IFF_UP) || | 1501 | if (unlikely(!is_skb_forwardable(dev, skb))) { |
| 1481 | (skb->len > (dev->mtu + dev->hard_header_len + VLAN_HLEN)))) { | ||
| 1482 | atomic_long_inc(&dev->rx_dropped); | 1502 | atomic_long_inc(&dev->rx_dropped); |
| 1483 | kfree_skb(skb); | 1503 | kfree_skb(skb); |
| 1484 | return NET_RX_DROP; | 1504 | return NET_RX_DROP; |
| @@ -2071,7 +2091,7 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, | |||
| 2071 | u32 features; | 2091 | u32 features; |
| 2072 | 2092 | ||
| 2073 | /* | 2093 | /* |
| 2074 | * If device doesnt need skb->dst, release it right now while | 2094 | * If device doesn't need skb->dst, release it right now while |
| 2075 | * its hot in this cpu cache | 2095 | * its hot in this cpu cache |
| 2076 | */ | 2096 | */ |
| 2077 | if (dev->priv_flags & IFF_XMIT_DST_RELEASE) | 2097 | if (dev->priv_flags & IFF_XMIT_DST_RELEASE) |
| @@ -2131,7 +2151,7 @@ gso: | |||
| 2131 | nskb->next = NULL; | 2151 | nskb->next = NULL; |
| 2132 | 2152 | ||
| 2133 | /* | 2153 | /* |
| 2134 | * If device doesnt need nskb->dst, release it right now while | 2154 | * If device doesn't need nskb->dst, release it right now while |
| 2135 | * its hot in this cpu cache | 2155 | * its hot in this cpu cache |
| 2136 | */ | 2156 | */ |
| 2137 | if (dev->priv_flags & IFF_XMIT_DST_RELEASE) | 2157 | if (dev->priv_flags & IFF_XMIT_DST_RELEASE) |
| @@ -2950,8 +2970,8 @@ EXPORT_SYMBOL_GPL(br_fdb_test_addr_hook); | |||
| 2950 | * when CONFIG_NET_CLS_ACT is? otherwise some useless instructions | 2970 | * when CONFIG_NET_CLS_ACT is? otherwise some useless instructions |
| 2951 | * a compare and 2 stores extra right now if we dont have it on | 2971 | * a compare and 2 stores extra right now if we dont have it on |
| 2952 | * but have CONFIG_NET_CLS_ACT | 2972 | * but have CONFIG_NET_CLS_ACT |
| 2953 | * NOTE: This doesnt stop any functionality; if you dont have | 2973 | * NOTE: This doesn't stop any functionality; if you dont have |
| 2954 | * the ingress scheduler, you just cant add policies on ingress. | 2974 | * the ingress scheduler, you just can't add policies on ingress. |
| 2955 | * | 2975 | * |
| 2956 | */ | 2976 | */ |
| 2957 | static int ing_filter(struct sk_buff *skb, struct netdev_queue *rxq) | 2977 | static int ing_filter(struct sk_buff *skb, struct netdev_queue *rxq) |
| @@ -3780,7 +3800,7 @@ static void net_rx_action(struct softirq_action *h) | |||
| 3780 | * with netpoll's poll_napi(). Only the entity which | 3800 | * with netpoll's poll_napi(). Only the entity which |
| 3781 | * obtains the lock and sees NAPI_STATE_SCHED set will | 3801 | * obtains the lock and sees NAPI_STATE_SCHED set will |
| 3782 | * actually make the ->poll() call. Therefore we avoid | 3802 | * actually make the ->poll() call. Therefore we avoid |
| 3783 | * accidently calling ->poll() when NAPI is not scheduled. | 3803 | * accidentally calling ->poll() when NAPI is not scheduled. |
| 3784 | */ | 3804 | */ |
| 3785 | work = 0; | 3805 | work = 0; |
| 3786 | if (test_bit(NAPI_STATE_SCHED, &n->state)) { | 3806 | if (test_bit(NAPI_STATE_SCHED, &n->state)) { |
| @@ -6316,7 +6336,7 @@ static void __net_exit default_device_exit(struct net *net) | |||
| 6316 | if (dev->rtnl_link_ops) | 6336 | if (dev->rtnl_link_ops) |
| 6317 | continue; | 6337 | continue; |
| 6318 | 6338 | ||
| 6319 | /* Push remaing network devices to init_net */ | 6339 | /* Push remaining network devices to init_net */ |
| 6320 | snprintf(fb_name, IFNAMSIZ, "dev%d", dev->ifindex); | 6340 | snprintf(fb_name, IFNAMSIZ, "dev%d", dev->ifindex); |
| 6321 | err = dev_change_net_namespace(dev, &init_net, fb_name); | 6341 | err = dev_change_net_namespace(dev, &init_net, fb_name); |
| 6322 | if (err) { | 6342 | if (err) { |
diff --git a/net/core/filter.c b/net/core/filter.c index 232b1873bb28..afb8afb066bb 100644 --- a/net/core/filter.c +++ b/net/core/filter.c | |||
| @@ -425,7 +425,7 @@ EXPORT_SYMBOL(sk_run_filter); | |||
| 425 | * As we dont want to clear mem[] array for each packet going through | 425 | * As we dont want to clear mem[] array for each packet going through |
| 426 | * sk_run_filter(), we check that filter loaded by user never try to read | 426 | * sk_run_filter(), we check that filter loaded by user never try to read |
| 427 | * a cell if not previously written, and we check all branches to be sure | 427 | * a cell if not previously written, and we check all branches to be sure |
| 428 | * a malicious user doesnt try to abuse us. | 428 | * a malicious user doesn't try to abuse us. |
| 429 | */ | 429 | */ |
| 430 | static int check_load_and_stores(struct sock_filter *filter, int flen) | 430 | static int check_load_and_stores(struct sock_filter *filter, int flen) |
| 431 | { | 431 | { |
diff --git a/net/core/link_watch.c b/net/core/link_watch.c index 01a1101b5936..a7b342131869 100644 --- a/net/core/link_watch.c +++ b/net/core/link_watch.c | |||
| @@ -129,7 +129,7 @@ static void linkwatch_schedule_work(int urgent) | |||
| 129 | if (!cancel_delayed_work(&linkwatch_work)) | 129 | if (!cancel_delayed_work(&linkwatch_work)) |
| 130 | return; | 130 | return; |
| 131 | 131 | ||
| 132 | /* Otherwise we reschedule it again for immediate exection. */ | 132 | /* Otherwise we reschedule it again for immediate execution. */ |
| 133 | schedule_delayed_work(&linkwatch_work, 0); | 133 | schedule_delayed_work(&linkwatch_work, 0); |
| 134 | } | 134 | } |
| 135 | 135 | ||
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 49f7ea5b4c75..d7c4bb4b1820 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
| @@ -196,7 +196,7 @@ EXPORT_SYMBOL_GPL(__rtnl_register); | |||
| 196 | * as failure of this function is very unlikely, it can only happen due | 196 | * as failure of this function is very unlikely, it can only happen due |
| 197 | * to lack of memory when allocating the chain to store all message | 197 | * to lack of memory when allocating the chain to store all message |
| 198 | * handlers for a protocol. Meant for use in init functions where lack | 198 | * handlers for a protocol. Meant for use in init functions where lack |
| 199 | * of memory implies no sense in continueing. | 199 | * of memory implies no sense in continuing. |
| 200 | */ | 200 | */ |
| 201 | void rtnl_register(int protocol, int msgtype, | 201 | void rtnl_register(int protocol, int msgtype, |
| 202 | rtnl_doit_func doit, rtnl_dumpit_func dumpit) | 202 | rtnl_doit_func doit, rtnl_dumpit_func dumpit) |
| @@ -1440,7 +1440,7 @@ static int do_setlink(struct net_device *dev, struct ifinfomsg *ifm, | |||
| 1440 | errout: | 1440 | errout: |
| 1441 | if (err < 0 && modified && net_ratelimit()) | 1441 | if (err < 0 && modified && net_ratelimit()) |
| 1442 | printk(KERN_WARNING "A link change request failed with " | 1442 | printk(KERN_WARNING "A link change request failed with " |
| 1443 | "some changes comitted already. Interface %s may " | 1443 | "some changes committed already. Interface %s may " |
| 1444 | "have been left with an inconsistent configuration, " | 1444 | "have been left with an inconsistent configuration, " |
| 1445 | "please check.\n", dev->name); | 1445 | "please check.\n", dev->name); |
| 1446 | 1446 | ||
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 801dd08908f9..7ebeed0a877c 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
| @@ -2267,7 +2267,7 @@ EXPORT_SYMBOL(skb_prepare_seq_read); | |||
| 2267 | * of bytes already consumed and the next call to | 2267 | * of bytes already consumed and the next call to |
| 2268 | * skb_seq_read() will return the remaining part of the block. | 2268 | * skb_seq_read() will return the remaining part of the block. |
| 2269 | * | 2269 | * |
| 2270 | * Note 1: The size of each block of data returned can be arbitary, | 2270 | * Note 1: The size of each block of data returned can be arbitrary, |
| 2271 | * this limitation is the cost for zerocopy seqeuental | 2271 | * this limitation is the cost for zerocopy seqeuental |
| 2272 | * reads of potentially non linear data. | 2272 | * reads of potentially non linear data. |
| 2273 | * | 2273 | * |
diff --git a/net/core/sock.c b/net/core/sock.c index 7dfed792434d..6e819780c232 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
| @@ -215,7 +215,7 @@ __u32 sysctl_rmem_max __read_mostly = SK_RMEM_MAX; | |||
| 215 | __u32 sysctl_wmem_default __read_mostly = SK_WMEM_MAX; | 215 | __u32 sysctl_wmem_default __read_mostly = SK_WMEM_MAX; |
| 216 | __u32 sysctl_rmem_default __read_mostly = SK_RMEM_MAX; | 216 | __u32 sysctl_rmem_default __read_mostly = SK_RMEM_MAX; |
| 217 | 217 | ||
| 218 | /* Maximal space eaten by iovec or ancilliary data plus some space */ | 218 | /* Maximal space eaten by iovec or ancillary data plus some space */ |
| 219 | int sysctl_optmem_max __read_mostly = sizeof(unsigned long)*(2*UIO_MAXIOV+512); | 219 | int sysctl_optmem_max __read_mostly = sizeof(unsigned long)*(2*UIO_MAXIOV+512); |
| 220 | EXPORT_SYMBOL(sysctl_optmem_max); | 220 | EXPORT_SYMBOL(sysctl_optmem_max); |
| 221 | 221 | ||
| @@ -1175,7 +1175,7 @@ static void __sk_free(struct sock *sk) | |||
| 1175 | void sk_free(struct sock *sk) | 1175 | void sk_free(struct sock *sk) |
| 1176 | { | 1176 | { |
| 1177 | /* | 1177 | /* |
| 1178 | * We substract one from sk_wmem_alloc and can know if | 1178 | * We subtract one from sk_wmem_alloc and can know if |
| 1179 | * some packets are still in some tx queue. | 1179 | * some packets are still in some tx queue. |
| 1180 | * If not null, sock_wfree() will call __sk_free(sk) later | 1180 | * If not null, sock_wfree() will call __sk_free(sk) later |
| 1181 | */ | 1181 | */ |
| @@ -1185,10 +1185,10 @@ void sk_free(struct sock *sk) | |||
| 1185 | EXPORT_SYMBOL(sk_free); | 1185 | EXPORT_SYMBOL(sk_free); |
| 1186 | 1186 | ||
| 1187 | /* | 1187 | /* |
| 1188 | * Last sock_put should drop referrence to sk->sk_net. It has already | 1188 | * Last sock_put should drop reference to sk->sk_net. It has already |
| 1189 | * been dropped in sk_change_net. Taking referrence to stopping namespace | 1189 | * been dropped in sk_change_net. Taking reference to stopping namespace |
| 1190 | * is not an option. | 1190 | * is not an option. |
| 1191 | * Take referrence to a socket to remove it from hash _alive_ and after that | 1191 | * Take reference to a socket to remove it from hash _alive_ and after that |
| 1192 | * destroy it in the context of init_net. | 1192 | * destroy it in the context of init_net. |
| 1193 | */ | 1193 | */ |
| 1194 | void sk_release_kernel(struct sock *sk) | 1194 | void sk_release_kernel(struct sock *sk) |
diff --git a/net/dccp/output.c b/net/dccp/output.c index 784d30210543..136d41cbcd02 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c | |||
| @@ -143,7 +143,7 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb) | |||
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | /** | 145 | /** |
| 146 | * dccp_determine_ccmps - Find out about CCID-specfic packet-size limits | 146 | * dccp_determine_ccmps - Find out about CCID-specific packet-size limits |
| 147 | * We only consider the HC-sender CCID for setting the CCMPS (RFC 4340, 14.), | 147 | * We only consider the HC-sender CCID for setting the CCMPS (RFC 4340, 14.), |
| 148 | * since the RX CCID is restricted to feedback packets (Acks), which are small | 148 | * since the RX CCID is restricted to feedback packets (Acks), which are small |
| 149 | * in comparison with the data traffic. A value of 0 means "no current CCMPS". | 149 | * in comparison with the data traffic. A value of 0 means "no current CCMPS". |
diff --git a/net/dsa/mv88e6131.c b/net/dsa/mv88e6131.c index bb2b41bc854e..3da418894efc 100644 --- a/net/dsa/mv88e6131.c +++ b/net/dsa/mv88e6131.c | |||
| @@ -14,6 +14,13 @@ | |||
| 14 | #include "dsa_priv.h" | 14 | #include "dsa_priv.h" |
| 15 | #include "mv88e6xxx.h" | 15 | #include "mv88e6xxx.h" |
| 16 | 16 | ||
| 17 | /* | ||
| 18 | * Switch product IDs | ||
| 19 | */ | ||
| 20 | #define ID_6085 0x04a0 | ||
| 21 | #define ID_6095 0x0950 | ||
| 22 | #define ID_6131 0x1060 | ||
| 23 | |||
| 17 | static char *mv88e6131_probe(struct mii_bus *bus, int sw_addr) | 24 | static char *mv88e6131_probe(struct mii_bus *bus, int sw_addr) |
| 18 | { | 25 | { |
| 19 | int ret; | 26 | int ret; |
| @@ -21,9 +28,11 @@ static char *mv88e6131_probe(struct mii_bus *bus, int sw_addr) | |||
| 21 | ret = __mv88e6xxx_reg_read(bus, sw_addr, REG_PORT(0), 0x03); | 28 | ret = __mv88e6xxx_reg_read(bus, sw_addr, REG_PORT(0), 0x03); |
| 22 | if (ret >= 0) { | 29 | if (ret >= 0) { |
| 23 | ret &= 0xfff0; | 30 | ret &= 0xfff0; |
| 24 | if (ret == 0x0950) | 31 | if (ret == ID_6085) |
| 32 | return "Marvell 88E6085"; | ||
| 33 | if (ret == ID_6095) | ||
| 25 | return "Marvell 88E6095/88E6095F"; | 34 | return "Marvell 88E6095/88E6095F"; |
| 26 | if (ret == 0x1060) | 35 | if (ret == ID_6131) |
| 27 | return "Marvell 88E6131"; | 36 | return "Marvell 88E6131"; |
| 28 | } | 37 | } |
| 29 | 38 | ||
| @@ -124,7 +133,7 @@ static int mv88e6131_setup_global(struct dsa_switch *ds) | |||
| 124 | * Ignore removed tag data on doubly tagged packets, disable | 133 | * Ignore removed tag data on doubly tagged packets, disable |
| 125 | * flow control messages, force flow control priority to the | 134 | * flow control messages, force flow control priority to the |
| 126 | * highest, and send all special multicast frames to the CPU | 135 | * highest, and send all special multicast frames to the CPU |
| 127 | * port at the higest priority. | 136 | * port at the highest priority. |
| 128 | */ | 137 | */ |
| 129 | REG_WRITE(REG_GLOBAL2, 0x05, 0x00ff); | 138 | REG_WRITE(REG_GLOBAL2, 0x05, 0x00ff); |
| 130 | 139 | ||
| @@ -164,6 +173,7 @@ static int mv88e6131_setup_global(struct dsa_switch *ds) | |||
| 164 | 173 | ||
| 165 | static int mv88e6131_setup_port(struct dsa_switch *ds, int p) | 174 | static int mv88e6131_setup_port(struct dsa_switch *ds, int p) |
| 166 | { | 175 | { |
| 176 | struct mv88e6xxx_priv_state *ps = (void *)(ds + 1); | ||
| 167 | int addr = REG_PORT(p); | 177 | int addr = REG_PORT(p); |
| 168 | u16 val; | 178 | u16 val; |
| 169 | 179 | ||
| @@ -171,10 +181,13 @@ static int mv88e6131_setup_port(struct dsa_switch *ds, int p) | |||
| 171 | * MAC Forcing register: don't force link, speed, duplex | 181 | * MAC Forcing register: don't force link, speed, duplex |
| 172 | * or flow control state to any particular values on physical | 182 | * or flow control state to any particular values on physical |
| 173 | * ports, but force the CPU port and all DSA ports to 1000 Mb/s | 183 | * ports, but force the CPU port and all DSA ports to 1000 Mb/s |
| 174 | * full duplex. | 184 | * (100 Mb/s on 6085) full duplex. |
| 175 | */ | 185 | */ |
| 176 | if (dsa_is_cpu_port(ds, p) || ds->dsa_port_mask & (1 << p)) | 186 | if (dsa_is_cpu_port(ds, p) || ds->dsa_port_mask & (1 << p)) |
| 177 | REG_WRITE(addr, 0x01, 0x003e); | 187 | if (ps->id == ID_6085) |
| 188 | REG_WRITE(addr, 0x01, 0x003d); /* 100 Mb/s */ | ||
| 189 | else | ||
| 190 | REG_WRITE(addr, 0x01, 0x003e); /* 1000 Mb/s */ | ||
| 178 | else | 191 | else |
| 179 | REG_WRITE(addr, 0x01, 0x0003); | 192 | REG_WRITE(addr, 0x01, 0x0003); |
| 180 | 193 | ||
| @@ -286,6 +299,8 @@ static int mv88e6131_setup(struct dsa_switch *ds) | |||
| 286 | mv88e6xxx_ppu_state_init(ds); | 299 | mv88e6xxx_ppu_state_init(ds); |
| 287 | mutex_init(&ps->stats_mutex); | 300 | mutex_init(&ps->stats_mutex); |
| 288 | 301 | ||
| 302 | ps->id = REG_READ(REG_PORT(0), 0x03) & 0xfff0; | ||
| 303 | |||
| 289 | ret = mv88e6131_switch_reset(ds); | 304 | ret = mv88e6131_switch_reset(ds); |
| 290 | if (ret < 0) | 305 | if (ret < 0) |
| 291 | return ret; | 306 | return ret; |
diff --git a/net/dsa/mv88e6xxx.h b/net/dsa/mv88e6xxx.h index eb0e0aaa9f1b..61156ca26a0d 100644 --- a/net/dsa/mv88e6xxx.h +++ b/net/dsa/mv88e6xxx.h | |||
| @@ -39,6 +39,8 @@ struct mv88e6xxx_priv_state { | |||
| 39 | * Hold this mutex over snapshot + dump sequences. | 39 | * Hold this mutex over snapshot + dump sequences. |
| 40 | */ | 40 | */ |
| 41 | struct mutex stats_mutex; | 41 | struct mutex stats_mutex; |
| 42 | |||
| 43 | int id; /* switch product id */ | ||
| 42 | }; | 44 | }; |
| 43 | 45 | ||
| 44 | struct mv88e6xxx_hw_stat { | 46 | struct mv88e6xxx_hw_stat { |
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 090d273d7865..1b74d3b64371 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
| @@ -215,6 +215,9 @@ int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir) | |||
| 215 | case ARPHRD_INFINIBAND: | 215 | case ARPHRD_INFINIBAND: |
| 216 | ip_ib_mc_map(addr, dev->broadcast, haddr); | 216 | ip_ib_mc_map(addr, dev->broadcast, haddr); |
| 217 | return 0; | 217 | return 0; |
| 218 | case ARPHRD_IPGRE: | ||
| 219 | ip_ipgre_mc_map(addr, dev->broadcast, haddr); | ||
| 220 | return 0; | ||
| 218 | default: | 221 | default: |
| 219 | if (dir) { | 222 | if (dir) { |
| 220 | memcpy(haddr, dev->broadcast, dev->addr_len); | 223 | memcpy(haddr, dev->broadcast, dev->addr_len); |
diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c index 094e150c6260..a0af7ea87870 100644 --- a/net/ipv4/cipso_ipv4.c +++ b/net/ipv4/cipso_ipv4.c | |||
| @@ -112,7 +112,7 @@ int cipso_v4_rbm_strictvalid = 1; | |||
| 112 | /* The maximum number of category ranges permitted in the ranged category tag | 112 | /* The maximum number of category ranges permitted in the ranged category tag |
| 113 | * (tag #5). You may note that the IETF draft states that the maximum number | 113 | * (tag #5). You may note that the IETF draft states that the maximum number |
| 114 | * of category ranges is 7, but if the low end of the last category range is | 114 | * of category ranges is 7, but if the low end of the last category range is |
| 115 | * zero then it is possibile to fit 8 category ranges because the zero should | 115 | * zero then it is possible to fit 8 category ranges because the zero should |
| 116 | * be omitted. */ | 116 | * be omitted. */ |
| 117 | #define CIPSO_V4_TAG_RNG_CAT_MAX 8 | 117 | #define CIPSO_V4_TAG_RNG_CAT_MAX 8 |
| 118 | 118 | ||
| @@ -438,7 +438,7 @@ cache_add_failure: | |||
| 438 | * | 438 | * |
| 439 | * Description: | 439 | * Description: |
| 440 | * Search the DOI definition list for a DOI definition with a DOI value that | 440 | * Search the DOI definition list for a DOI definition with a DOI value that |
| 441 | * matches @doi. The caller is responsibile for calling rcu_read_[un]lock(). | 441 | * matches @doi. The caller is responsible for calling rcu_read_[un]lock(). |
| 442 | * Returns a pointer to the DOI definition on success and NULL on failure. | 442 | * Returns a pointer to the DOI definition on success and NULL on failure. |
| 443 | */ | 443 | */ |
| 444 | static struct cipso_v4_doi *cipso_v4_doi_search(u32 doi) | 444 | static struct cipso_v4_doi *cipso_v4_doi_search(u32 doi) |
| @@ -1293,7 +1293,7 @@ static int cipso_v4_gentag_rbm(const struct cipso_v4_doi *doi_def, | |||
| 1293 | return ret_val; | 1293 | return ret_val; |
| 1294 | 1294 | ||
| 1295 | /* This will send packets using the "optimized" format when | 1295 | /* This will send packets using the "optimized" format when |
| 1296 | * possibile as specified in section 3.4.2.6 of the | 1296 | * possible as specified in section 3.4.2.6 of the |
| 1297 | * CIPSO draft. */ | 1297 | * CIPSO draft. */ |
| 1298 | if (cipso_v4_rbm_optfmt && ret_val > 0 && ret_val <= 10) | 1298 | if (cipso_v4_rbm_optfmt && ret_val > 0 && ret_val <= 10) |
| 1299 | tag_len = 14; | 1299 | tag_len = 14; |
| @@ -1752,7 +1752,7 @@ validate_return: | |||
| 1752 | } | 1752 | } |
| 1753 | 1753 | ||
| 1754 | /** | 1754 | /** |
| 1755 | * cipso_v4_error - Send the correct reponse for a bad packet | 1755 | * cipso_v4_error - Send the correct response for a bad packet |
| 1756 | * @skb: the packet | 1756 | * @skb: the packet |
| 1757 | * @error: the error code | 1757 | * @error: the error code |
| 1758 | * @gateway: CIPSO gateway flag | 1758 | * @gateway: CIPSO gateway flag |
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index f116ce8f1b46..451088330bbb 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
| @@ -1068,6 +1068,7 @@ static void ip_fib_net_exit(struct net *net) | |||
| 1068 | fib4_rules_exit(net); | 1068 | fib4_rules_exit(net); |
| 1069 | #endif | 1069 | #endif |
| 1070 | 1070 | ||
| 1071 | rtnl_lock(); | ||
| 1071 | for (i = 0; i < FIB_TABLE_HASHSZ; i++) { | 1072 | for (i = 0; i < FIB_TABLE_HASHSZ; i++) { |
| 1072 | struct fib_table *tb; | 1073 | struct fib_table *tb; |
| 1073 | struct hlist_head *head; | 1074 | struct hlist_head *head; |
| @@ -1080,6 +1081,7 @@ static void ip_fib_net_exit(struct net *net) | |||
| 1080 | fib_free_table(tb); | 1081 | fib_free_table(tb); |
| 1081 | } | 1082 | } |
| 1082 | } | 1083 | } |
| 1084 | rtnl_unlock(); | ||
| 1083 | kfree(net->ipv4.fib_table_hash); | 1085 | kfree(net->ipv4.fib_table_hash); |
| 1084 | } | 1086 | } |
| 1085 | 1087 | ||
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index b92c86f6e9b3..e9013d6c1f51 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | * | 12 | * |
| 13 | * Hans Liss <hans.liss@its.uu.se> Uppsala Universitet | 13 | * Hans Liss <hans.liss@its.uu.se> Uppsala Universitet |
| 14 | * | 14 | * |
| 15 | * This work is based on the LPC-trie which is originally descibed in: | 15 | * This work is based on the LPC-trie which is originally described in: |
| 16 | * | 16 | * |
| 17 | * An experimental study of compression methods for dynamic tries | 17 | * An experimental study of compression methods for dynamic tries |
| 18 | * Stefan Nilsson and Matti Tikkanen. Algorithmica, 33(1):19-33, 2002. | 18 | * Stefan Nilsson and Matti Tikkanen. Algorithmica, 33(1):19-33, 2002. |
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index a91dc1611081..e5f8a71d3a2a 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c | |||
| @@ -704,7 +704,7 @@ static void icmp_unreach(struct sk_buff *skb) | |||
| 704 | */ | 704 | */ |
| 705 | 705 | ||
| 706 | /* | 706 | /* |
| 707 | * Check the other end isnt violating RFC 1122. Some routers send | 707 | * Check the other end isn't violating RFC 1122. Some routers send |
| 708 | * bogus responses to broadcast frames. If you see this message | 708 | * bogus responses to broadcast frames. If you see this message |
| 709 | * first check your netmask matches at both ends, if it does then | 709 | * first check your netmask matches at both ends, if it does then |
| 710 | * get the other vendor to fix their kit. | 710 | * get the other vendor to fix their kit. |
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 67f241b97649..459c011b1d4a 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
| @@ -603,7 +603,7 @@ slow_path: | |||
| 603 | /* IF: it doesn't fit, use 'mtu' - the data space left */ | 603 | /* IF: it doesn't fit, use 'mtu' - the data space left */ |
| 604 | if (len > mtu) | 604 | if (len > mtu) |
| 605 | len = mtu; | 605 | len = mtu; |
| 606 | /* IF: we are not sending upto and including the packet end | 606 | /* IF: we are not sending up to and including the packet end |
| 607 | then align the next start on an eight byte boundary */ | 607 | then align the next start on an eight byte boundary */ |
| 608 | if (len < left) { | 608 | if (len < left) { |
| 609 | len &= ~7; | 609 | len &= ~7; |
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index 2b097752426b..cbff2ecccf3d 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c | |||
| @@ -1444,7 +1444,7 @@ static int __init ip_auto_config(void) | |||
| 1444 | root_server_addr = addr; | 1444 | root_server_addr = addr; |
| 1445 | 1445 | ||
| 1446 | /* | 1446 | /* |
| 1447 | * Use defaults whereever applicable. | 1447 | * Use defaults wherever applicable. |
| 1448 | */ | 1448 | */ |
| 1449 | if (ic_defaults() < 0) | 1449 | if (ic_defaults() < 0) |
| 1450 | return -1; | 1450 | return -1; |
diff --git a/net/ipv4/netfilter.c b/net/ipv4/netfilter.c index f3c0b549b8e1..4614babdc45f 100644 --- a/net/ipv4/netfilter.c +++ b/net/ipv4/netfilter.c | |||
| @@ -221,9 +221,10 @@ static __sum16 nf_ip_checksum_partial(struct sk_buff *skb, unsigned int hook, | |||
| 221 | return csum; | 221 | return csum; |
| 222 | } | 222 | } |
| 223 | 223 | ||
| 224 | static int nf_ip_route(struct dst_entry **dst, struct flowi *fl) | 224 | static int nf_ip_route(struct net *net, struct dst_entry **dst, |
| 225 | struct flowi *fl, bool strict __always_unused) | ||
| 225 | { | 226 | { |
| 226 | struct rtable *rt = ip_route_output_key(&init_net, &fl->u.ip4); | 227 | struct rtable *rt = ip_route_output_key(net, &fl->u.ip4); |
| 227 | if (IS_ERR(rt)) | 228 | if (IS_ERR(rt)) |
| 228 | return PTR_ERR(rt); | 229 | return PTR_ERR(rt); |
| 229 | *dst = &rt->dst; | 230 | *dst = &rt->dst; |
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index 4b5d457c2d76..89bc7e66d598 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c | |||
| @@ -76,7 +76,7 @@ static inline int arp_devaddr_compare(const struct arpt_devaddr_info *ap, | |||
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | /* | 78 | /* |
| 79 | * Unfortunatly, _b and _mask are not aligned to an int (or long int) | 79 | * Unfortunately, _b and _mask are not aligned to an int (or long int) |
| 80 | * Some arches dont care, unrolling the loop is a win on them. | 80 | * Some arches dont care, unrolling the loop is a win on them. |
| 81 | * For other arches, we only have a 16bit alignement. | 81 | * For other arches, we only have a 16bit alignement. |
| 82 | */ | 82 | */ |
| @@ -1874,7 +1874,7 @@ static int __init arp_tables_init(void) | |||
| 1874 | if (ret < 0) | 1874 | if (ret < 0) |
| 1875 | goto err1; | 1875 | goto err1; |
| 1876 | 1876 | ||
| 1877 | /* Noone else will be downing sem now, so we won't sleep */ | 1877 | /* No one else will be downing sem now, so we won't sleep */ |
| 1878 | ret = xt_register_targets(arpt_builtin_tg, ARRAY_SIZE(arpt_builtin_tg)); | 1878 | ret = xt_register_targets(arpt_builtin_tg, ARRAY_SIZE(arpt_builtin_tg)); |
| 1879 | if (ret < 0) | 1879 | if (ret < 0) |
| 1880 | goto err2; | 1880 | goto err2; |
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index ffcea0d1678e..704915028009 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c | |||
| @@ -2233,7 +2233,7 @@ static int __init ip_tables_init(void) | |||
| 2233 | if (ret < 0) | 2233 | if (ret < 0) |
| 2234 | goto err1; | 2234 | goto err1; |
| 2235 | 2235 | ||
| 2236 | /* Noone else will be downing sem now, so we won't sleep */ | 2236 | /* No one else will be downing sem now, so we won't sleep */ |
| 2237 | ret = xt_register_targets(ipt_builtin_tg, ARRAY_SIZE(ipt_builtin_tg)); | 2237 | ret = xt_register_targets(ipt_builtin_tg, ARRAY_SIZE(ipt_builtin_tg)); |
| 2238 | if (ret < 0) | 2238 | if (ret < 0) |
| 2239 | goto err2; | 2239 | goto err2; |
diff --git a/net/ipv4/netfilter/nf_nat_core.c b/net/ipv4/netfilter/nf_nat_core.c index 21bcf471b25a..9c71b2755ce3 100644 --- a/net/ipv4/netfilter/nf_nat_core.c +++ b/net/ipv4/netfilter/nf_nat_core.c | |||
| @@ -521,7 +521,7 @@ int nf_nat_protocol_register(const struct nf_nat_protocol *proto) | |||
| 521 | } | 521 | } |
| 522 | EXPORT_SYMBOL(nf_nat_protocol_register); | 522 | EXPORT_SYMBOL(nf_nat_protocol_register); |
| 523 | 523 | ||
| 524 | /* Noone stores the protocol anywhere; simply delete it. */ | 524 | /* No one stores the protocol anywhere; simply delete it. */ |
| 525 | void nf_nat_protocol_unregister(const struct nf_nat_protocol *proto) | 525 | void nf_nat_protocol_unregister(const struct nf_nat_protocol *proto) |
| 526 | { | 526 | { |
| 527 | spin_lock_bh(&nf_nat_lock); | 527 | spin_lock_bh(&nf_nat_lock); |
| @@ -532,7 +532,7 @@ void nf_nat_protocol_unregister(const struct nf_nat_protocol *proto) | |||
| 532 | } | 532 | } |
| 533 | EXPORT_SYMBOL(nf_nat_protocol_unregister); | 533 | EXPORT_SYMBOL(nf_nat_protocol_unregister); |
| 534 | 534 | ||
| 535 | /* Noone using conntrack by the time this called. */ | 535 | /* No one using conntrack by the time this called. */ |
| 536 | static void nf_nat_cleanup_conntrack(struct nf_conn *ct) | 536 | static void nf_nat_cleanup_conntrack(struct nf_conn *ct) |
| 537 | { | 537 | { |
| 538 | struct nf_conn_nat *nat = nf_ct_ext_find(ct, NF_CT_EXT_NAT); | 538 | struct nf_conn_nat *nat = nf_ct_ext_find(ct, NF_CT_EXT_NAT); |
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 2d3c72e5bbbf..bceaec42c37d 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
| @@ -622,7 +622,7 @@ do_confirm: | |||
| 622 | static void raw_close(struct sock *sk, long timeout) | 622 | static void raw_close(struct sock *sk, long timeout) |
| 623 | { | 623 | { |
| 624 | /* | 624 | /* |
| 625 | * Raw sockets may have direct kernel refereneces. Kill them. | 625 | * Raw sockets may have direct kernel references. Kill them. |
| 626 | */ | 626 | */ |
| 627 | ip_ra_control(sk, 0, NULL); | 627 | ip_ra_control(sk, 0, NULL); |
| 628 | 628 | ||
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 4b0c81180804..c1acf69858fd 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
| @@ -821,7 +821,7 @@ static int has_noalias(const struct rtable *head, const struct rtable *rth) | |||
| 821 | } | 821 | } |
| 822 | 822 | ||
| 823 | /* | 823 | /* |
| 824 | * Pertubation of rt_genid by a small quantity [1..256] | 824 | * Perturbation of rt_genid by a small quantity [1..256] |
| 825 | * Using 8 bits of shuffling ensure we can call rt_cache_invalidate() | 825 | * Using 8 bits of shuffling ensure we can call rt_cache_invalidate() |
| 826 | * many times (2^24) without giving recent rt_genid. | 826 | * many times (2^24) without giving recent rt_genid. |
| 827 | * Jenkins hash is strong enough that litle changes of rt_genid are OK. | 827 | * Jenkins hash is strong enough that litle changes of rt_genid are OK. |
| @@ -1191,7 +1191,7 @@ restart: | |||
| 1191 | #endif | 1191 | #endif |
| 1192 | /* | 1192 | /* |
| 1193 | * Since lookup is lockfree, we must make sure | 1193 | * Since lookup is lockfree, we must make sure |
| 1194 | * previous writes to rt are comitted to memory | 1194 | * previous writes to rt are committed to memory |
| 1195 | * before making rt visible to other CPUS. | 1195 | * before making rt visible to other CPUS. |
| 1196 | */ | 1196 | */ |
| 1197 | rcu_assign_pointer(rt_hash_table[hash].chain, rt); | 1197 | rcu_assign_pointer(rt_hash_table[hash].chain, rt); |
| @@ -1891,6 +1891,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr, | |||
| 1891 | #ifdef CONFIG_IP_ROUTE_CLASSID | 1891 | #ifdef CONFIG_IP_ROUTE_CLASSID |
| 1892 | rth->dst.tclassid = itag; | 1892 | rth->dst.tclassid = itag; |
| 1893 | #endif | 1893 | #endif |
| 1894 | rth->rt_route_iif = dev->ifindex; | ||
| 1894 | rth->rt_iif = dev->ifindex; | 1895 | rth->rt_iif = dev->ifindex; |
| 1895 | rth->dst.dev = init_net.loopback_dev; | 1896 | rth->dst.dev = init_net.loopback_dev; |
| 1896 | dev_hold(rth->dst.dev); | 1897 | dev_hold(rth->dst.dev); |
| @@ -2026,6 +2027,7 @@ static int __mkroute_input(struct sk_buff *skb, | |||
| 2026 | rth->rt_key_src = saddr; | 2027 | rth->rt_key_src = saddr; |
| 2027 | rth->rt_src = saddr; | 2028 | rth->rt_src = saddr; |
| 2028 | rth->rt_gateway = daddr; | 2029 | rth->rt_gateway = daddr; |
| 2030 | rth->rt_route_iif = in_dev->dev->ifindex; | ||
| 2029 | rth->rt_iif = in_dev->dev->ifindex; | 2031 | rth->rt_iif = in_dev->dev->ifindex; |
| 2030 | rth->dst.dev = (out_dev)->dev; | 2032 | rth->dst.dev = (out_dev)->dev; |
| 2031 | dev_hold(rth->dst.dev); | 2033 | dev_hold(rth->dst.dev); |
| @@ -2202,6 +2204,7 @@ local_input: | |||
| 2202 | #ifdef CONFIG_IP_ROUTE_CLASSID | 2204 | #ifdef CONFIG_IP_ROUTE_CLASSID |
| 2203 | rth->dst.tclassid = itag; | 2205 | rth->dst.tclassid = itag; |
| 2204 | #endif | 2206 | #endif |
| 2207 | rth->rt_route_iif = dev->ifindex; | ||
| 2205 | rth->rt_iif = dev->ifindex; | 2208 | rth->rt_iif = dev->ifindex; |
| 2206 | rth->dst.dev = net->loopback_dev; | 2209 | rth->dst.dev = net->loopback_dev; |
| 2207 | dev_hold(rth->dst.dev); | 2210 | dev_hold(rth->dst.dev); |
| @@ -2401,7 +2404,8 @@ static struct rtable *__mkroute_output(const struct fib_result *res, | |||
| 2401 | rth->rt_mark = oldflp4->flowi4_mark; | 2404 | rth->rt_mark = oldflp4->flowi4_mark; |
| 2402 | rth->rt_dst = fl4->daddr; | 2405 | rth->rt_dst = fl4->daddr; |
| 2403 | rth->rt_src = fl4->saddr; | 2406 | rth->rt_src = fl4->saddr; |
| 2404 | rth->rt_iif = 0; | 2407 | rth->rt_route_iif = 0; |
| 2408 | rth->rt_iif = oldflp4->flowi4_oif ? : dev_out->ifindex; | ||
| 2405 | /* get references to the devices that are to be hold by the routing | 2409 | /* get references to the devices that are to be hold by the routing |
| 2406 | cache entry */ | 2410 | cache entry */ |
| 2407 | rth->dst.dev = dev_out; | 2411 | rth->dst.dev = dev_out; |
| @@ -2716,6 +2720,7 @@ struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_or | |||
| 2716 | rt->rt_key_dst = ort->rt_key_dst; | 2720 | rt->rt_key_dst = ort->rt_key_dst; |
| 2717 | rt->rt_key_src = ort->rt_key_src; | 2721 | rt->rt_key_src = ort->rt_key_src; |
| 2718 | rt->rt_tos = ort->rt_tos; | 2722 | rt->rt_tos = ort->rt_tos; |
| 2723 | rt->rt_route_iif = ort->rt_route_iif; | ||
| 2719 | rt->rt_iif = ort->rt_iif; | 2724 | rt->rt_iif = ort->rt_iif; |
| 2720 | rt->rt_oif = ort->rt_oif; | 2725 | rt->rt_oif = ort->rt_oif; |
| 2721 | rt->rt_mark = ort->rt_mark; | 2726 | rt->rt_mark = ort->rt_mark; |
| @@ -2725,7 +2730,6 @@ struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_or | |||
| 2725 | rt->rt_type = ort->rt_type; | 2730 | rt->rt_type = ort->rt_type; |
| 2726 | rt->rt_dst = ort->rt_dst; | 2731 | rt->rt_dst = ort->rt_dst; |
| 2727 | rt->rt_src = ort->rt_src; | 2732 | rt->rt_src = ort->rt_src; |
| 2728 | rt->rt_iif = ort->rt_iif; | ||
| 2729 | rt->rt_gateway = ort->rt_gateway; | 2733 | rt->rt_gateway = ort->rt_gateway; |
| 2730 | rt->rt_spec_dst = ort->rt_spec_dst; | 2734 | rt->rt_spec_dst = ort->rt_spec_dst; |
| 2731 | rt->peer = ort->peer; | 2735 | rt->peer = ort->peer; |
diff --git a/net/ipv4/tcp_lp.c b/net/ipv4/tcp_lp.c index 656d431c99ad..72f7218b03f5 100644 --- a/net/ipv4/tcp_lp.c +++ b/net/ipv4/tcp_lp.c | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | * within cong_avoid. | 12 | * within cong_avoid. |
| 13 | * o Error correcting in remote HZ, therefore remote HZ will be keeped | 13 | * o Error correcting in remote HZ, therefore remote HZ will be keeped |
| 14 | * on checking and updating. | 14 | * on checking and updating. |
| 15 | * o Handling calculation of One-Way-Delay (OWD) within rtt_sample, sicne | 15 | * o Handling calculation of One-Way-Delay (OWD) within rtt_sample, since |
| 16 | * OWD have a similar meaning as RTT. Also correct the buggy formular. | 16 | * OWD have a similar meaning as RTT. Also correct the buggy formular. |
| 17 | * o Handle reaction for Early Congestion Indication (ECI) within | 17 | * o Handle reaction for Early Congestion Indication (ECI) within |
| 18 | * pkts_acked, as mentioned within pseudo code. | 18 | * pkts_acked, as mentioned within pseudo code. |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index dfa5beb0c1c8..17388c7f49c4 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
| @@ -73,7 +73,7 @@ static void tcp_event_new_data_sent(struct sock *sk, struct sk_buff *skb) | |||
| 73 | tcp_advance_send_head(sk, skb); | 73 | tcp_advance_send_head(sk, skb); |
| 74 | tp->snd_nxt = TCP_SKB_CB(skb)->end_seq; | 74 | tp->snd_nxt = TCP_SKB_CB(skb)->end_seq; |
| 75 | 75 | ||
| 76 | /* Don't override Nagle indefinately with F-RTO */ | 76 | /* Don't override Nagle indefinitely with F-RTO */ |
| 77 | if (tp->frto_counter == 2) | 77 | if (tp->frto_counter == 2) |
| 78 | tp->frto_counter = 3; | 78 | tp->frto_counter = 3; |
| 79 | 79 | ||
| @@ -1003,7 +1003,8 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, | |||
| 1003 | int nlen; | 1003 | int nlen; |
| 1004 | u8 flags; | 1004 | u8 flags; |
| 1005 | 1005 | ||
| 1006 | BUG_ON(len > skb->len); | 1006 | if (WARN_ON(len > skb->len)) |
| 1007 | return -EINVAL; | ||
| 1007 | 1008 | ||
| 1008 | nsize = skb_headlen(skb) - len; | 1009 | nsize = skb_headlen(skb) - len; |
| 1009 | if (nsize < 0) | 1010 | if (nsize < 0) |
diff --git a/net/ipv4/tcp_yeah.c b/net/ipv4/tcp_yeah.c index dc7f43179c9a..05c3b6f0e8e1 100644 --- a/net/ipv4/tcp_yeah.c +++ b/net/ipv4/tcp_yeah.c | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | #define TCP_YEAH_DELTA 3 //log minimum fraction of cwnd to be removed on loss | 20 | #define TCP_YEAH_DELTA 3 //log minimum fraction of cwnd to be removed on loss |
| 21 | #define TCP_YEAH_EPSILON 1 //log maximum fraction to be removed on early decongestion | 21 | #define TCP_YEAH_EPSILON 1 //log maximum fraction to be removed on early decongestion |
| 22 | #define TCP_YEAH_PHY 8 //lin maximum delta from base | 22 | #define TCP_YEAH_PHY 8 //lin maximum delta from base |
| 23 | #define TCP_YEAH_RHO 16 //lin minumum number of consecutive rtt to consider competition on loss | 23 | #define TCP_YEAH_RHO 16 //lin minimum number of consecutive rtt to consider competition on loss |
| 24 | #define TCP_YEAH_ZETA 50 //lin minimum number of state switchs to reset reno_count | 24 | #define TCP_YEAH_ZETA 50 //lin minimum number of state switchs to reset reno_count |
| 25 | 25 | ||
| 26 | #define TCP_SCALABLE_AI_CNT 100U | 26 | #define TCP_SCALABLE_AI_CNT 100U |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 588f47af5faf..f87a8eb76f3b 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
| @@ -189,7 +189,7 @@ static int udp_lib_lport_inuse2(struct net *net, __u16 num, | |||
| 189 | * @sk: socket struct in question | 189 | * @sk: socket struct in question |
| 190 | * @snum: port number to look up | 190 | * @snum: port number to look up |
| 191 | * @saddr_comp: AF-dependent comparison of bound local IP addresses | 191 | * @saddr_comp: AF-dependent comparison of bound local IP addresses |
| 192 | * @hash2_nulladdr: AF-dependant hash value in secondary hash chains, | 192 | * @hash2_nulladdr: AF-dependent hash value in secondary hash chains, |
| 193 | * with NULL address | 193 | * with NULL address |
| 194 | */ | 194 | */ |
| 195 | int udp_lib_get_port(struct sock *sk, unsigned short snum, | 195 | int udp_lib_get_port(struct sock *sk, unsigned short snum, |
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index 13e0e7f659ff..d20a05e970d8 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c | |||
| @@ -74,6 +74,7 @@ static int xfrm4_fill_dst(struct xfrm_dst *xdst, struct net_device *dev, | |||
| 74 | rt->rt_key_dst = fl4->daddr; | 74 | rt->rt_key_dst = fl4->daddr; |
| 75 | rt->rt_key_src = fl4->saddr; | 75 | rt->rt_key_src = fl4->saddr; |
| 76 | rt->rt_tos = fl4->flowi4_tos; | 76 | rt->rt_tos = fl4->flowi4_tos; |
| 77 | rt->rt_route_iif = fl4->flowi4_iif; | ||
| 77 | rt->rt_iif = fl4->flowi4_iif; | 78 | rt->rt_iif = fl4->flowi4_iif; |
| 78 | rt->rt_oif = fl4->flowi4_oif; | 79 | rt->rt_oif = fl4->flowi4_oif; |
| 79 | rt->rt_mark = fl4->flowi4_mark; | 80 | rt->rt_mark = fl4->flowi4_mark; |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 3daaf3c7703c..1493534116df 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
| @@ -1084,7 +1084,7 @@ static int ipv6_get_saddr_eval(struct net *net, | |||
| 1084 | case IPV6_SADDR_RULE_PRIVACY: | 1084 | case IPV6_SADDR_RULE_PRIVACY: |
| 1085 | { | 1085 | { |
| 1086 | /* Rule 7: Prefer public address | 1086 | /* Rule 7: Prefer public address |
| 1087 | * Note: prefer temprary address if use_tempaddr >= 2 | 1087 | * Note: prefer temporary address if use_tempaddr >= 2 |
| 1088 | */ | 1088 | */ |
| 1089 | int preftmp = dst->prefs & (IPV6_PREFER_SRC_PUBLIC|IPV6_PREFER_SRC_TMP) ? | 1089 | int preftmp = dst->prefs & (IPV6_PREFER_SRC_PUBLIC|IPV6_PREFER_SRC_TMP) ? |
| 1090 | !!(dst->prefs & IPV6_PREFER_SRC_TMP) : | 1090 | !!(dst->prefs & IPV6_PREFER_SRC_TMP) : |
| @@ -1968,7 +1968,7 @@ ok: | |||
| 1968 | * to the stored lifetime since we'll | 1968 | * to the stored lifetime since we'll |
| 1969 | * be updating the timestamp below, | 1969 | * be updating the timestamp below, |
| 1970 | * else we'll set it back to the | 1970 | * else we'll set it back to the |
| 1971 | * minumum. | 1971 | * minimum. |
| 1972 | */ | 1972 | */ |
| 1973 | if (prefered_lft != ifp->prefered_lft) { | 1973 | if (prefered_lft != ifp->prefered_lft) { |
| 1974 | valid_lft = stored_lft; | 1974 | valid_lft = stored_lft; |
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 4b13d5d8890e..afcc7099f96d 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
| @@ -1113,7 +1113,7 @@ static int __init inet6_init(void) | |||
| 1113 | /* | 1113 | /* |
| 1114 | * ipngwg API draft makes clear that the correct semantics | 1114 | * ipngwg API draft makes clear that the correct semantics |
| 1115 | * for TCP and UDP is to consider one TCP and UDP instance | 1115 | * for TCP and UDP is to consider one TCP and UDP instance |
| 1116 | * in a host availiable by both INET and INET6 APIs and | 1116 | * in a host available by both INET and INET6 APIs and |
| 1117 | * able to communicate via both network protocols. | 1117 | * able to communicate via both network protocols. |
| 1118 | */ | 1118 | */ |
| 1119 | 1119 | ||
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 18208876aa8a..46cf7bea6769 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
| @@ -779,7 +779,7 @@ slow_path: | |||
| 779 | /* IF: it doesn't fit, use 'mtu' - the data space left */ | 779 | /* IF: it doesn't fit, use 'mtu' - the data space left */ |
| 780 | if (len > mtu) | 780 | if (len > mtu) |
| 781 | len = mtu; | 781 | len = mtu; |
| 782 | /* IF: we are not sending upto and including the packet end | 782 | /* IF: we are not sending up to and including the packet end |
| 783 | then align the next start on an eight byte boundary */ | 783 | then align the next start on an eight byte boundary */ |
| 784 | if (len < left) { | 784 | if (len < left) { |
| 785 | len &= ~7; | 785 | len &= ~7; |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 0e49c9db3c98..92f952d093db 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
| @@ -341,6 +341,8 @@ int ndisc_mc_map(struct in6_addr *addr, char *buf, struct net_device *dev, int d | |||
| 341 | case ARPHRD_INFINIBAND: | 341 | case ARPHRD_INFINIBAND: |
| 342 | ipv6_ib_mc_map(addr, dev->broadcast, buf); | 342 | ipv6_ib_mc_map(addr, dev->broadcast, buf); |
| 343 | return 0; | 343 | return 0; |
| 344 | case ARPHRD_IPGRE: | ||
| 345 | return ipv6_ipgre_mc_map(addr, dev->broadcast, buf); | ||
| 344 | default: | 346 | default: |
| 345 | if (dir) { | 347 | if (dir) { |
| 346 | memcpy(buf, dev->broadcast, dev->addr_len); | 348 | memcpy(buf, dev->broadcast, dev->addr_len); |
diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c index 39aaca2b4fd2..28bc1f644b7b 100644 --- a/net/ipv6/netfilter.c +++ b/net/ipv6/netfilter.c | |||
| @@ -90,9 +90,18 @@ static int nf_ip6_reroute(struct sk_buff *skb, | |||
| 90 | return 0; | 90 | return 0; |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | static int nf_ip6_route(struct dst_entry **dst, struct flowi *fl) | 93 | static int nf_ip6_route(struct net *net, struct dst_entry **dst, |
| 94 | struct flowi *fl, bool strict) | ||
| 94 | { | 95 | { |
| 95 | *dst = ip6_route_output(&init_net, NULL, &fl->u.ip6); | 96 | static const struct ipv6_pinfo fake_pinfo; |
| 97 | static const struct inet_sock fake_sk = { | ||
| 98 | /* makes ip6_route_output set RT6_LOOKUP_F_IFACE: */ | ||
| 99 | .sk.sk_bound_dev_if = 1, | ||
| 100 | .pinet6 = (struct ipv6_pinfo *) &fake_pinfo, | ||
| 101 | }; | ||
| 102 | const void *sk = strict ? &fake_sk : NULL; | ||
| 103 | |||
| 104 | *dst = ip6_route_output(net, sk, &fl->u.ip6); | ||
| 96 | return (*dst)->error; | 105 | return (*dst)->error; |
| 97 | } | 106 | } |
| 98 | 107 | ||
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index 0b2af9b85cec..5a1c6f27ffaf 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c | |||
| @@ -2248,7 +2248,7 @@ static int __init ip6_tables_init(void) | |||
| 2248 | if (ret < 0) | 2248 | if (ret < 0) |
| 2249 | goto err1; | 2249 | goto err1; |
| 2250 | 2250 | ||
| 2251 | /* Noone else will be downing sem now, so we won't sleep */ | 2251 | /* No one else will be downing sem now, so we won't sleep */ |
| 2252 | ret = xt_register_targets(ip6t_builtin_tg, ARRAY_SIZE(ip6t_builtin_tg)); | 2252 | ret = xt_register_targets(ip6t_builtin_tg, ARRAY_SIZE(ip6t_builtin_tg)); |
| 2253 | if (ret < 0) | 2253 | if (ret < 0) |
| 2254 | goto err2; | 2254 | goto err2; |
diff --git a/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c b/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c index 97c5b21b9674..cdd6d045e42e 100644 --- a/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c +++ b/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c | |||
| @@ -71,7 +71,7 @@ static unsigned int ipv6_defrag(unsigned int hooknum, | |||
| 71 | if (reasm == NULL) | 71 | if (reasm == NULL) |
| 72 | return NF_STOLEN; | 72 | return NF_STOLEN; |
| 73 | 73 | ||
| 74 | /* error occured or not fragmented */ | 74 | /* error occurred or not fragmented */ |
| 75 | if (reasm == skb) | 75 | if (reasm == skb) |
| 76 | return NF_ACCEPT; | 76 | return NF_ACCEPT; |
| 77 | 77 | ||
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 2b0c186862c8..4f49e5dd41bb 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
| @@ -503,6 +503,7 @@ static int tcp_v6_send_synack(struct sock *sk, struct request_sock *req, | |||
| 503 | dst = ip6_dst_lookup_flow(sk, &fl6, final_p, false); | 503 | dst = ip6_dst_lookup_flow(sk, &fl6, final_p, false); |
| 504 | if (IS_ERR(dst)) { | 504 | if (IS_ERR(dst)) { |
| 505 | err = PTR_ERR(dst); | 505 | err = PTR_ERR(dst); |
| 506 | dst = NULL; | ||
| 506 | goto done; | 507 | goto done; |
| 507 | } | 508 | } |
| 508 | skb = tcp_make_synack(sk, dst, req, rvp); | 509 | skb = tcp_make_synack(sk, dst, req, rvp); |
| @@ -1621,6 +1622,7 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) | |||
| 1621 | opt_skb = skb_clone(skb, GFP_ATOMIC); | 1622 | opt_skb = skb_clone(skb, GFP_ATOMIC); |
| 1622 | 1623 | ||
| 1623 | if (sk->sk_state == TCP_ESTABLISHED) { /* Fast path */ | 1624 | if (sk->sk_state == TCP_ESTABLISHED) { /* Fast path */ |
| 1625 | sock_rps_save_rxhash(sk, skb->rxhash); | ||
| 1624 | if (tcp_rcv_established(sk, skb, tcp_hdr(skb), skb->len)) | 1626 | if (tcp_rcv_established(sk, skb, tcp_hdr(skb), skb->len)) |
| 1625 | goto reset; | 1627 | goto reset; |
| 1626 | if (opt_skb) | 1628 | if (opt_skb) |
| @@ -1648,7 +1650,8 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) | |||
| 1648 | __kfree_skb(opt_skb); | 1650 | __kfree_skb(opt_skb); |
| 1649 | return 0; | 1651 | return 0; |
| 1650 | } | 1652 | } |
| 1651 | } | 1653 | } else |
| 1654 | sock_rps_save_rxhash(sk, skb->rxhash); | ||
| 1652 | 1655 | ||
| 1653 | if (tcp_rcv_state_process(sk, skb, tcp_hdr(skb), skb->len)) | 1656 | if (tcp_rcv_state_process(sk, skb, tcp_hdr(skb), skb->len)) |
| 1654 | goto reset; | 1657 | goto reset; |
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index d7037c006e13..15c37746845e 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
| @@ -505,6 +505,9 @@ int udpv6_queue_rcv_skb(struct sock * sk, struct sk_buff *skb) | |||
| 505 | int rc; | 505 | int rc; |
| 506 | int is_udplite = IS_UDPLITE(sk); | 506 | int is_udplite = IS_UDPLITE(sk); |
| 507 | 507 | ||
| 508 | if (!ipv6_addr_any(&inet6_sk(sk)->daddr)) | ||
| 509 | sock_rps_save_rxhash(sk, skb->rxhash); | ||
| 510 | |||
| 508 | if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb)) | 511 | if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb)) |
| 509 | goto drop; | 512 | goto drop; |
| 510 | 513 | ||
diff --git a/net/irda/irlap.c b/net/irda/irlap.c index 783c5f367d29..005b424494a0 100644 --- a/net/irda/irlap.c +++ b/net/irda/irlap.c | |||
| @@ -165,7 +165,7 @@ struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos, | |||
| 165 | 165 | ||
| 166 | irlap_apply_default_connection_parameters(self); | 166 | irlap_apply_default_connection_parameters(self); |
| 167 | 167 | ||
| 168 | self->N3 = 3; /* # connections attemts to try before giving up */ | 168 | self->N3 = 3; /* # connections attempts to try before giving up */ |
| 169 | 169 | ||
| 170 | self->state = LAP_NDM; | 170 | self->state = LAP_NDM; |
| 171 | 171 | ||
diff --git a/net/irda/irlap_event.c b/net/irda/irlap_event.c index d434c8880745..bb47021c9a55 100644 --- a/net/irda/irlap_event.c +++ b/net/irda/irlap_event.c | |||
| @@ -708,7 +708,7 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event, | |||
| 708 | 708 | ||
| 709 | self->frame_sent = TRUE; | 709 | self->frame_sent = TRUE; |
| 710 | } | 710 | } |
| 711 | /* Readjust our timer to accomodate devices | 711 | /* Readjust our timer to accommodate devices |
| 712 | * doing faster or slower discovery than us... | 712 | * doing faster or slower discovery than us... |
| 713 | * Jean II */ | 713 | * Jean II */ |
| 714 | irlap_start_query_timer(self, info->S, info->s); | 714 | irlap_start_query_timer(self, info->S, info->s); |
| @@ -931,7 +931,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event, | |||
| 931 | irlap_send_rr_frame(self, CMD_FRAME); | 931 | irlap_send_rr_frame(self, CMD_FRAME); |
| 932 | 932 | ||
| 933 | /* The timer is set to half the normal timer to quickly | 933 | /* The timer is set to half the normal timer to quickly |
| 934 | * detect a failure to negociate the new connection | 934 | * detect a failure to negotiate the new connection |
| 935 | * parameters. IrLAP 6.11.3.2, note 3. | 935 | * parameters. IrLAP 6.11.3.2, note 3. |
| 936 | * Note that currently we don't process this failure | 936 | * Note that currently we don't process this failure |
| 937 | * properly, as we should do a quick disconnect. | 937 | * properly, as we should do a quick disconnect. |
| @@ -1052,7 +1052,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
| 1052 | return -EPROTO; | 1052 | return -EPROTO; |
| 1053 | } | 1053 | } |
| 1054 | 1054 | ||
| 1055 | /* Substract space used by this skb */ | 1055 | /* Subtract space used by this skb */ |
| 1056 | self->bytes_left -= skb->len; | 1056 | self->bytes_left -= skb->len; |
| 1057 | #else /* CONFIG_IRDA_DYNAMIC_WINDOW */ | 1057 | #else /* CONFIG_IRDA_DYNAMIC_WINDOW */ |
| 1058 | /* Window has been adjusted for the max packet | 1058 | /* Window has been adjusted for the max packet |
| @@ -1808,7 +1808,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
| 1808 | 1808 | ||
| 1809 | return -EPROTO; /* Try again later */ | 1809 | return -EPROTO; /* Try again later */ |
| 1810 | } | 1810 | } |
| 1811 | /* Substract space used by this skb */ | 1811 | /* Subtract space used by this skb */ |
| 1812 | self->bytes_left -= skb->len; | 1812 | self->bytes_left -= skb->len; |
| 1813 | #else /* CONFIG_IRDA_DYNAMIC_WINDOW */ | 1813 | #else /* CONFIG_IRDA_DYNAMIC_WINDOW */ |
| 1814 | /* Window has been adjusted for the max packet | 1814 | /* Window has been adjusted for the max packet |
diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c index 688222cbf55b..8c004161a843 100644 --- a/net/irda/irlap_frame.c +++ b/net/irda/irlap_frame.c | |||
| @@ -848,7 +848,7 @@ void irlap_send_data_primary_poll(struct irlap_cb *self, struct sk_buff *skb) | |||
| 848 | * though IrLAP is currently sending the *last* frame of the | 848 | * though IrLAP is currently sending the *last* frame of the |
| 849 | * tx-window, the driver most likely has only just started | 849 | * tx-window, the driver most likely has only just started |
| 850 | * sending the *first* frame of the same tx-window. | 850 | * sending the *first* frame of the same tx-window. |
| 851 | * I.e. we are always at the very begining of or Tx window. | 851 | * I.e. we are always at the very beginning of or Tx window. |
| 852 | * Now, we are supposed to set the final timer from the end | 852 | * Now, we are supposed to set the final timer from the end |
| 853 | * of our tx-window to let the other peer reply. So, we need | 853 | * of our tx-window to let the other peer reply. So, we need |
| 854 | * to add extra time to compensate for the fact that we | 854 | * to add extra time to compensate for the fact that we |
diff --git a/net/irda/irlmp_event.c b/net/irda/irlmp_event.c index c1fb5db81042..9505a7d06f1a 100644 --- a/net/irda/irlmp_event.c +++ b/net/irda/irlmp_event.c | |||
| @@ -498,7 +498,7 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event, | |||
| 498 | switch (event) { | 498 | switch (event) { |
| 499 | #ifdef CONFIG_IRDA_ULTRA | 499 | #ifdef CONFIG_IRDA_ULTRA |
| 500 | case LM_UDATA_INDICATION: | 500 | case LM_UDATA_INDICATION: |
| 501 | /* This is most bizzare. Those packets are aka unreliable | 501 | /* This is most bizarre. Those packets are aka unreliable |
| 502 | * connected, aka IrLPT or SOCK_DGRAM/IRDAPROTO_UNITDATA. | 502 | * connected, aka IrLPT or SOCK_DGRAM/IRDAPROTO_UNITDATA. |
| 503 | * Why do we pass them as Ultra ??? Jean II */ | 503 | * Why do we pass them as Ultra ??? Jean II */ |
| 504 | irlmp_connless_data_indication(self, skb); | 504 | irlmp_connless_data_indication(self, skb); |
diff --git a/net/irda/irnet/irnet.h b/net/irda/irnet/irnet.h index 0d82ff5aeff1..979ecb2435a7 100644 --- a/net/irda/irnet/irnet.h +++ b/net/irda/irnet/irnet.h | |||
| @@ -73,7 +73,7 @@ | |||
| 73 | * Infinite thanks to those brave souls for providing the infrastructure | 73 | * Infinite thanks to those brave souls for providing the infrastructure |
| 74 | * upon which IrNET is built. | 74 | * upon which IrNET is built. |
| 75 | * | 75 | * |
| 76 | * Thanks to all my collegues in HP for helping me. In particular, | 76 | * Thanks to all my colleagues in HP for helping me. In particular, |
| 77 | * thanks to Salil Pradhan and Bill Serra for W2k testing... | 77 | * thanks to Salil Pradhan and Bill Serra for W2k testing... |
| 78 | * Thanks to Luiz Magalhaes for irnetd and much testing... | 78 | * Thanks to Luiz Magalhaes for irnetd and much testing... |
| 79 | * | 79 | * |
diff --git a/net/irda/irqueue.c b/net/irda/irqueue.c index 849aaf0dabb5..9715e6e5900b 100644 --- a/net/irda/irqueue.c +++ b/net/irda/irqueue.c | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | * o the hash function for ints is pathetic (but could be changed) | 40 | * o the hash function for ints is pathetic (but could be changed) |
| 41 | * o locking is sometime suspicious (especially during enumeration) | 41 | * o locking is sometime suspicious (especially during enumeration) |
| 42 | * o most users have only a few elements (== overhead) | 42 | * o most users have only a few elements (== overhead) |
| 43 | * o most users never use seach, so don't benefit from hashing | 43 | * o most users never use search, so don't benefit from hashing |
| 44 | * Problem already fixed : | 44 | * Problem already fixed : |
| 45 | * o not 64 bit compliant (most users do hashv = (int) self) | 45 | * o not 64 bit compliant (most users do hashv = (int) self) |
| 46 | * o hashbin_remove() is broken => use hashbin_remove_this() | 46 | * o hashbin_remove() is broken => use hashbin_remove_this() |
diff --git a/net/irda/irttp.c b/net/irda/irttp.c index f6054f9ccbe3..9d9af4606970 100644 --- a/net/irda/irttp.c +++ b/net/irda/irttp.c | |||
| @@ -1193,7 +1193,7 @@ EXPORT_SYMBOL(irttp_connect_request); | |||
| 1193 | /* | 1193 | /* |
| 1194 | * Function irttp_connect_confirm (handle, qos, skb) | 1194 | * Function irttp_connect_confirm (handle, qos, skb) |
| 1195 | * | 1195 | * |
| 1196 | * Sevice user confirms TSAP connection with peer. | 1196 | * Service user confirms TSAP connection with peer. |
| 1197 | * | 1197 | * |
| 1198 | */ | 1198 | */ |
| 1199 | static void irttp_connect_confirm(void *instance, void *sap, | 1199 | static void irttp_connect_confirm(void *instance, void *sap, |
diff --git a/net/irda/qos.c b/net/irda/qos.c index 2b00974e5bae..1b51bcf42394 100644 --- a/net/irda/qos.c +++ b/net/irda/qos.c | |||
| @@ -39,16 +39,16 @@ | |||
| 39 | #include <net/irda/irlap_frame.h> | 39 | #include <net/irda/irlap_frame.h> |
| 40 | 40 | ||
| 41 | /* | 41 | /* |
| 42 | * Maximum values of the baud rate we negociate with the other end. | 42 | * Maximum values of the baud rate we negotiate with the other end. |
| 43 | * Most often, you don't have to change that, because Linux-IrDA will | 43 | * Most often, you don't have to change that, because Linux-IrDA will |
| 44 | * use the maximum offered by the link layer, which usually works fine. | 44 | * use the maximum offered by the link layer, which usually works fine. |
| 45 | * In some very rare cases, you may want to limit it to lower speeds... | 45 | * In some very rare cases, you may want to limit it to lower speeds... |
| 46 | */ | 46 | */ |
| 47 | int sysctl_max_baud_rate = 16000000; | 47 | int sysctl_max_baud_rate = 16000000; |
| 48 | /* | 48 | /* |
| 49 | * Maximum value of the lap disconnect timer we negociate with the other end. | 49 | * Maximum value of the lap disconnect timer we negotiate with the other end. |
| 50 | * Most often, the value below represent the best compromise, but some user | 50 | * Most often, the value below represent the best compromise, but some user |
| 51 | * may want to keep the LAP alive longuer or shorter in case of link failure. | 51 | * may want to keep the LAP alive longer or shorter in case of link failure. |
| 52 | * Remember that the threshold time (early warning) is fixed to 3s... | 52 | * Remember that the threshold time (early warning) is fixed to 3s... |
| 53 | */ | 53 | */ |
| 54 | int sysctl_max_noreply_time = 12; | 54 | int sysctl_max_noreply_time = 12; |
| @@ -411,7 +411,7 @@ static void irlap_adjust_qos_settings(struct qos_info *qos) | |||
| 411 | * Fix tx data size according to user limits - Jean II | 411 | * Fix tx data size according to user limits - Jean II |
| 412 | */ | 412 | */ |
| 413 | if (qos->data_size.value > sysctl_max_tx_data_size) | 413 | if (qos->data_size.value > sysctl_max_tx_data_size) |
| 414 | /* Allow non discrete adjustement to avoid loosing capacity */ | 414 | /* Allow non discrete adjustement to avoid losing capacity */ |
| 415 | qos->data_size.value = sysctl_max_tx_data_size; | 415 | qos->data_size.value = sysctl_max_tx_data_size; |
| 416 | /* | 416 | /* |
| 417 | * Override Tx window if user request it. - Jean II | 417 | * Override Tx window if user request it. - Jean II |
diff --git a/net/irda/timer.c b/net/irda/timer.c index 0335ba0cc593..f418cb2ad49c 100644 --- a/net/irda/timer.c +++ b/net/irda/timer.c | |||
| @@ -59,7 +59,7 @@ void irlap_start_query_timer(struct irlap_cb *self, int S, int s) | |||
| 59 | * slot time, plus add some extra time to properly receive the last | 59 | * slot time, plus add some extra time to properly receive the last |
| 60 | * discovery packet (which is longer due to extra discovery info), | 60 | * discovery packet (which is longer due to extra discovery info), |
| 61 | * to avoid messing with for incomming connections requests and | 61 | * to avoid messing with for incomming connections requests and |
| 62 | * to accomodate devices that perform discovery slower than us. | 62 | * to accommodate devices that perform discovery slower than us. |
| 63 | * Jean II */ | 63 | * Jean II */ |
| 64 | timeout = ((sysctl_slot_timeout * HZ / 1000) * (S - s) | 64 | timeout = ((sysctl_slot_timeout * HZ / 1000) * (S - s) |
| 65 | + XIDEXTRA_TIMEOUT + SMALLBUSY_TIMEOUT); | 65 | + XIDEXTRA_TIMEOUT + SMALLBUSY_TIMEOUT); |
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index 9637e45744fa..986b2a5e8769 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c | |||
| @@ -250,7 +250,7 @@ static struct device *af_iucv_dev; | |||
| 250 | * PRMDATA[0..6] socket data (max 7 bytes); | 250 | * PRMDATA[0..6] socket data (max 7 bytes); |
| 251 | * PRMDATA[7] socket data length value (len is 0xff - PRMDATA[7]) | 251 | * PRMDATA[7] socket data length value (len is 0xff - PRMDATA[7]) |
| 252 | * | 252 | * |
| 253 | * The socket data length is computed by substracting the socket data length | 253 | * The socket data length is computed by subtracting the socket data length |
| 254 | * value from 0xFF. | 254 | * value from 0xFF. |
| 255 | * If the socket data len is greater 7, then PRMDATA can be used for special | 255 | * If the socket data len is greater 7, then PRMDATA can be used for special |
| 256 | * notifications (see iucv_sock_shutdown); and further, | 256 | * notifications (see iucv_sock_shutdown); and further, |
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index 1ee5dab3cfae..8f156bd86be7 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c | |||
| @@ -735,7 +735,7 @@ static void iucv_cleanup_queue(void) | |||
| 735 | struct iucv_irq_list *p, *n; | 735 | struct iucv_irq_list *p, *n; |
| 736 | 736 | ||
| 737 | /* | 737 | /* |
| 738 | * When a path is severed, the pathid can be reused immediatly | 738 | * When a path is severed, the pathid can be reused immediately |
| 739 | * on a iucv connect or a connection pending interrupt. Remove | 739 | * on a iucv connect or a connection pending interrupt. Remove |
| 740 | * all entries from the task queue that refer to a stale pathid | 740 | * all entries from the task queue that refer to a stale pathid |
| 741 | * (iucv_path_table[ix] == NULL). Only then do the iucv connect | 741 | * (iucv_path_table[ix] == NULL). Only then do the iucv connect |
| @@ -807,7 +807,7 @@ void iucv_unregister(struct iucv_handler *handler, int smp) | |||
| 807 | spin_lock_bh(&iucv_table_lock); | 807 | spin_lock_bh(&iucv_table_lock); |
| 808 | /* Remove handler from the iucv_handler_list. */ | 808 | /* Remove handler from the iucv_handler_list. */ |
| 809 | list_del_init(&handler->list); | 809 | list_del_init(&handler->list); |
| 810 | /* Sever all pathids still refering to the handler. */ | 810 | /* Sever all pathids still referring to the handler. */ |
| 811 | list_for_each_entry_safe(p, n, &handler->paths, list) { | 811 | list_for_each_entry_safe(p, n, &handler->paths, list) { |
| 812 | iucv_sever_pathid(p->pathid, NULL); | 812 | iucv_sever_pathid(p->pathid, NULL); |
| 813 | iucv_path_table[p->pathid] = NULL; | 813 | iucv_path_table[p->pathid] = NULL; |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index a40401701424..c18396c248d7 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
| @@ -97,7 +97,7 @@ struct ieee80211_bss { | |||
| 97 | size_t supp_rates_len; | 97 | size_t supp_rates_len; |
| 98 | 98 | ||
| 99 | /* | 99 | /* |
| 100 | * During assocation, we save an ERP value from a probe response so | 100 | * During association, we save an ERP value from a probe response so |
| 101 | * that we can feed ERP info to the driver when handling the | 101 | * that we can feed ERP info to the driver when handling the |
| 102 | * association completes. these fields probably won't be up-to-date | 102 | * association completes. these fields probably won't be up-to-date |
| 103 | * otherwise, you probably don't want to use them. | 103 | * otherwise, you probably don't want to use them. |
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index 8c02469b7176..af3c56482c80 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c | |||
| @@ -342,7 +342,7 @@ struct ieee80211_key *ieee80211_key_alloc(u32 cipher, int idx, size_t key_len, | |||
| 342 | if (IS_ERR(key->u.ccmp.tfm)) { | 342 | if (IS_ERR(key->u.ccmp.tfm)) { |
| 343 | err = PTR_ERR(key->u.ccmp.tfm); | 343 | err = PTR_ERR(key->u.ccmp.tfm); |
| 344 | kfree(key); | 344 | kfree(key); |
| 345 | key = ERR_PTR(err); | 345 | return ERR_PTR(err); |
| 346 | } | 346 | } |
| 347 | break; | 347 | break; |
| 348 | case WLAN_CIPHER_SUITE_AES_CMAC: | 348 | case WLAN_CIPHER_SUITE_AES_CMAC: |
| @@ -360,7 +360,7 @@ struct ieee80211_key *ieee80211_key_alloc(u32 cipher, int idx, size_t key_len, | |||
| 360 | if (IS_ERR(key->u.aes_cmac.tfm)) { | 360 | if (IS_ERR(key->u.aes_cmac.tfm)) { |
| 361 | err = PTR_ERR(key->u.aes_cmac.tfm); | 361 | err = PTR_ERR(key->u.aes_cmac.tfm); |
| 362 | kfree(key); | 362 | kfree(key); |
| 363 | key = ERR_PTR(err); | 363 | return ERR_PTR(err); |
| 364 | } | 364 | } |
| 365 | break; | 365 | break; |
| 366 | } | 366 | } |
| @@ -400,11 +400,12 @@ int ieee80211_key_link(struct ieee80211_key *key, | |||
| 400 | { | 400 | { |
| 401 | struct ieee80211_key *old_key; | 401 | struct ieee80211_key *old_key; |
| 402 | int idx, ret; | 402 | int idx, ret; |
| 403 | bool pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE; | 403 | bool pairwise; |
| 404 | 404 | ||
| 405 | BUG_ON(!sdata); | 405 | BUG_ON(!sdata); |
| 406 | BUG_ON(!key); | 406 | BUG_ON(!key); |
| 407 | 407 | ||
| 408 | pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE; | ||
| 408 | idx = key->conf.keyidx; | 409 | idx = key->conf.keyidx; |
| 409 | key->local = sdata->local; | 410 | key->local = sdata->local; |
| 410 | key->sdata = sdata; | 411 | key->sdata = sdata; |
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index 8d65b47d9837..336ca9d0c5c4 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c | |||
| @@ -628,7 +628,7 @@ void mesh_path_discard_frame(struct sk_buff *skb, | |||
| 628 | * | 628 | * |
| 629 | * @mpath: mesh path whose queue has to be freed | 629 | * @mpath: mesh path whose queue has to be freed |
| 630 | * | 630 | * |
| 631 | * Locking: the function must me called withing a rcu_read_lock region | 631 | * Locking: the function must me called within a rcu_read_lock region |
| 632 | */ | 632 | */ |
| 633 | void mesh_path_flush_pending(struct mesh_path *mpath) | 633 | void mesh_path_flush_pending(struct mesh_path *mpath) |
| 634 | { | 634 | { |
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 8212a8bebf06..c06aa3ac6b9d 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c | |||
| @@ -259,7 +259,7 @@ minstrel_ht_update_stats(struct minstrel_priv *mp, struct minstrel_ht_sta *mi) | |||
| 259 | } | 259 | } |
| 260 | } | 260 | } |
| 261 | 261 | ||
| 262 | /* try to sample up to half of the availble rates during each interval */ | 262 | /* try to sample up to half of the available rates during each interval */ |
| 263 | mi->sample_count *= 4; | 263 | mi->sample_count *= 4; |
| 264 | 264 | ||
| 265 | cur_prob = 0; | 265 | cur_prob = 0; |
| @@ -659,18 +659,14 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband, | |||
| 659 | struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs; | 659 | struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs; |
| 660 | struct ieee80211_local *local = hw_to_local(mp->hw); | 660 | struct ieee80211_local *local = hw_to_local(mp->hw); |
| 661 | u16 sta_cap = sta->ht_cap.cap; | 661 | u16 sta_cap = sta->ht_cap.cap; |
| 662 | int n_supported = 0; | ||
| 662 | int ack_dur; | 663 | int ack_dur; |
| 663 | int stbc; | 664 | int stbc; |
| 664 | int i; | 665 | int i; |
| 665 | 666 | ||
| 666 | /* fall back to the old minstrel for legacy stations */ | 667 | /* fall back to the old minstrel for legacy stations */ |
| 667 | if (!sta->ht_cap.ht_supported) { | 668 | if (!sta->ht_cap.ht_supported) |
| 668 | msp->is_ht = false; | 669 | goto use_legacy; |
| 669 | memset(&msp->legacy, 0, sizeof(msp->legacy)); | ||
| 670 | msp->legacy.r = msp->ratelist; | ||
| 671 | msp->legacy.sample_table = msp->sample_table; | ||
| 672 | return mac80211_minstrel.rate_init(priv, sband, sta, &msp->legacy); | ||
| 673 | } | ||
| 674 | 670 | ||
| 675 | BUILD_BUG_ON(ARRAY_SIZE(minstrel_mcs_groups) != | 671 | BUILD_BUG_ON(ARRAY_SIZE(minstrel_mcs_groups) != |
| 676 | MINSTREL_MAX_STREAMS * MINSTREL_STREAM_GROUPS); | 672 | MINSTREL_MAX_STREAMS * MINSTREL_STREAM_GROUPS); |
| @@ -725,7 +721,22 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband, | |||
| 725 | 721 | ||
| 726 | mi->groups[i].supported = | 722 | mi->groups[i].supported = |
| 727 | mcs->rx_mask[minstrel_mcs_groups[i].streams - 1]; | 723 | mcs->rx_mask[minstrel_mcs_groups[i].streams - 1]; |
| 724 | |||
| 725 | if (mi->groups[i].supported) | ||
| 726 | n_supported++; | ||
| 728 | } | 727 | } |
| 728 | |||
| 729 | if (!n_supported) | ||
| 730 | goto use_legacy; | ||
| 731 | |||
| 732 | return; | ||
| 733 | |||
| 734 | use_legacy: | ||
| 735 | msp->is_ht = false; | ||
| 736 | memset(&msp->legacy, 0, sizeof(msp->legacy)); | ||
| 737 | msp->legacy.r = msp->ratelist; | ||
| 738 | msp->legacy.sample_table = msp->sample_table; | ||
| 739 | return mac80211_minstrel.rate_init(priv, sband, sta, &msp->legacy); | ||
| 729 | } | 740 | } |
| 730 | 741 | ||
| 731 | static void | 742 | static void |
diff --git a/net/mac80211/rc80211_pid.h b/net/mac80211/rc80211_pid.h index 6510f8ee738e..19111c7bf454 100644 --- a/net/mac80211/rc80211_pid.h +++ b/net/mac80211/rc80211_pid.h | |||
| @@ -77,7 +77,7 @@ union rc_pid_event_data { | |||
| 77 | }; | 77 | }; |
| 78 | 78 | ||
| 79 | struct rc_pid_event { | 79 | struct rc_pid_event { |
| 80 | /* The time when the event occured */ | 80 | /* The time when the event occurred */ |
| 81 | unsigned long timestamp; | 81 | unsigned long timestamp; |
| 82 | 82 | ||
| 83 | /* Event ID number */ | 83 | /* Event ID number */ |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 5c1930ba8ebe..c5d4530d8284 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
| @@ -381,7 +381,7 @@ static void ieee80211_parse_qos(struct ieee80211_rx_data *rx) | |||
| 381 | * specs were sane enough this time around to require padding each A-MSDU | 381 | * specs were sane enough this time around to require padding each A-MSDU |
| 382 | * subframe to a length that is a multiple of four. | 382 | * subframe to a length that is a multiple of four. |
| 383 | * | 383 | * |
| 384 | * Padding like Atheros hardware adds which is inbetween the 802.11 header and | 384 | * Padding like Atheros hardware adds which is between the 802.11 header and |
| 385 | * the payload is not supported, the driver is required to move the 802.11 | 385 | * the payload is not supported, the driver is required to move the 802.11 |
| 386 | * header to be directly in front of the payload in that case. | 386 | * header to be directly in front of the payload in that case. |
| 387 | */ | 387 | */ |
| @@ -612,7 +612,8 @@ static void ieee80211_sta_reorder_release(struct ieee80211_hw *hw, | |||
| 612 | skipped++; | 612 | skipped++; |
| 613 | continue; | 613 | continue; |
| 614 | } | 614 | } |
| 615 | if (!time_after(jiffies, tid_agg_rx->reorder_time[j] + | 615 | if (skipped && |
| 616 | !time_after(jiffies, tid_agg_rx->reorder_time[j] + | ||
| 616 | HT_RX_REORDER_BUF_TIMEOUT)) | 617 | HT_RX_REORDER_BUF_TIMEOUT)) |
| 617 | goto set_release_timer; | 618 | goto set_release_timer; |
| 618 | 619 | ||
| @@ -2540,7 +2541,6 @@ static void ieee80211_rx_handlers(struct ieee80211_rx_data *rx) | |||
| 2540 | * same TID from the same station | 2541 | * same TID from the same station |
| 2541 | */ | 2542 | */ |
| 2542 | rx->skb = skb; | 2543 | rx->skb = skb; |
| 2543 | rx->flags = 0; | ||
| 2544 | 2544 | ||
| 2545 | CALL_RXH(ieee80211_rx_h_decrypt) | 2545 | CALL_RXH(ieee80211_rx_h_decrypt) |
| 2546 | CALL_RXH(ieee80211_rx_h_check_more_data) | 2546 | CALL_RXH(ieee80211_rx_h_check_more_data) |
| @@ -2611,6 +2611,7 @@ void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid) | |||
| 2611 | .sdata = sta->sdata, | 2611 | .sdata = sta->sdata, |
| 2612 | .local = sta->local, | 2612 | .local = sta->local, |
| 2613 | .queue = tid, | 2613 | .queue = tid, |
| 2614 | .flags = 0, | ||
| 2614 | }; | 2615 | }; |
| 2615 | struct tid_ampdu_rx *tid_agg_rx; | 2616 | struct tid_ampdu_rx *tid_agg_rx; |
| 2616 | 2617 | ||
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index d0311a322ddd..13e8c30adf01 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
| @@ -47,9 +47,9 @@ | |||
| 47 | * Station entries are added by mac80211 when you establish a link with a | 47 | * Station entries are added by mac80211 when you establish a link with a |
| 48 | * peer. This means different things for the different type of interfaces | 48 | * peer. This means different things for the different type of interfaces |
| 49 | * we support. For a regular station this mean we add the AP sta when we | 49 | * we support. For a regular station this mean we add the AP sta when we |
| 50 | * receive an assocation response from the AP. For IBSS this occurs when | 50 | * receive an association response from the AP. For IBSS this occurs when |
| 51 | * get to know about a peer on the same IBSS. For WDS we add the sta for | 51 | * get to know about a peer on the same IBSS. For WDS we add the sta for |
| 52 | * the peer imediately upon device open. When using AP mode we add stations | 52 | * the peer immediately upon device open. When using AP mode we add stations |
| 53 | * for each respective station upon request from userspace through nl80211. | 53 | * for each respective station upon request from userspace through nl80211. |
| 54 | * | 54 | * |
| 55 | * In order to remove a STA info structure, various sta_info_destroy_*() | 55 | * In order to remove a STA info structure, various sta_info_destroy_*() |
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index 57681149e37f..b2f95966c7f4 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h | |||
| @@ -173,7 +173,7 @@ struct sta_ampdu_mlme { | |||
| 173 | /** | 173 | /** |
| 174 | * enum plink_state - state of a mesh peer link finite state machine | 174 | * enum plink_state - state of a mesh peer link finite state machine |
| 175 | * | 175 | * |
| 176 | * @PLINK_LISTEN: initial state, considered the implicit state of non existant | 176 | * @PLINK_LISTEN: initial state, considered the implicit state of non existent |
| 177 | * mesh peer links | 177 | * mesh peer links |
| 178 | * @PLINK_OPN_SNT: mesh plink open frame has been sent to this mesh peer | 178 | * @PLINK_OPN_SNT: mesh plink open frame has been sent to this mesh peer |
| 179 | * @PLINK_OPN_RCVD: mesh plink open frame has been received from this mesh peer | 179 | * @PLINK_OPN_RCVD: mesh plink open frame has been received from this mesh peer |
diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig index c3f988aa1152..32bff6d86cb2 100644 --- a/net/netfilter/Kconfig +++ b/net/netfilter/Kconfig | |||
| @@ -652,7 +652,6 @@ comment "Xtables matches" | |||
| 652 | config NETFILTER_XT_MATCH_ADDRTYPE | 652 | config NETFILTER_XT_MATCH_ADDRTYPE |
| 653 | tristate '"addrtype" address type match support' | 653 | tristate '"addrtype" address type match support' |
| 654 | depends on NETFILTER_ADVANCED | 654 | depends on NETFILTER_ADVANCED |
| 655 | depends on (IPV6 || IPV6=n) | ||
| 656 | ---help--- | 655 | ---help--- |
| 657 | This option allows you to match what routing thinks of an address, | 656 | This option allows you to match what routing thinks of an address, |
| 658 | eg. UNICAST, LOCAL, BROADCAST, ... | 657 | eg. UNICAST, LOCAL, BROADCAST, ... |
diff --git a/net/netfilter/ipset/ip_set_bitmap_ip.c b/net/netfilter/ipset/ip_set_bitmap_ip.c index bca96990218d..a113ff066928 100644 --- a/net/netfilter/ipset/ip_set_bitmap_ip.c +++ b/net/netfilter/ipset/ip_set_bitmap_ip.c | |||
| @@ -338,8 +338,7 @@ bitmap_ip_head(struct ip_set *set, struct sk_buff *skb) | |||
| 338 | NLA_PUT_IPADDR4(skb, IPSET_ATTR_IP_TO, htonl(map->last_ip)); | 338 | NLA_PUT_IPADDR4(skb, IPSET_ATTR_IP_TO, htonl(map->last_ip)); |
| 339 | if (map->netmask != 32) | 339 | if (map->netmask != 32) |
| 340 | NLA_PUT_U8(skb, IPSET_ATTR_NETMASK, map->netmask); | 340 | NLA_PUT_U8(skb, IPSET_ATTR_NETMASK, map->netmask); |
| 341 | NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, | 341 | NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, htonl(set->ref - 1)); |
| 342 | htonl(atomic_read(&set->ref) - 1)); | ||
| 343 | NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE, | 342 | NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE, |
| 344 | htonl(sizeof(*map) + map->memsize)); | 343 | htonl(sizeof(*map) + map->memsize)); |
| 345 | if (with_timeout(map->timeout)) | 344 | if (with_timeout(map->timeout)) |
diff --git a/net/netfilter/ipset/ip_set_bitmap_ipmac.c b/net/netfilter/ipset/ip_set_bitmap_ipmac.c index 5e790172deff..00a33242e90c 100644 --- a/net/netfilter/ipset/ip_set_bitmap_ipmac.c +++ b/net/netfilter/ipset/ip_set_bitmap_ipmac.c | |||
| @@ -434,8 +434,7 @@ bitmap_ipmac_head(struct ip_set *set, struct sk_buff *skb) | |||
| 434 | goto nla_put_failure; | 434 | goto nla_put_failure; |
| 435 | NLA_PUT_IPADDR4(skb, IPSET_ATTR_IP, htonl(map->first_ip)); | 435 | NLA_PUT_IPADDR4(skb, IPSET_ATTR_IP, htonl(map->first_ip)); |
| 436 | NLA_PUT_IPADDR4(skb, IPSET_ATTR_IP_TO, htonl(map->last_ip)); | 436 | NLA_PUT_IPADDR4(skb, IPSET_ATTR_IP_TO, htonl(map->last_ip)); |
| 437 | NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, | 437 | NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, htonl(set->ref - 1)); |
| 438 | htonl(atomic_read(&set->ref) - 1)); | ||
| 439 | NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE, | 438 | NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE, |
| 440 | htonl(sizeof(*map) | 439 | htonl(sizeof(*map) |
| 441 | + (map->last_ip - map->first_ip + 1) * map->dsize)); | 440 | + (map->last_ip - map->first_ip + 1) * map->dsize)); |
diff --git a/net/netfilter/ipset/ip_set_bitmap_port.c b/net/netfilter/ipset/ip_set_bitmap_port.c index 165f09b1a9cb..6b38eb8f6ed8 100644 --- a/net/netfilter/ipset/ip_set_bitmap_port.c +++ b/net/netfilter/ipset/ip_set_bitmap_port.c | |||
| @@ -320,8 +320,7 @@ bitmap_port_head(struct ip_set *set, struct sk_buff *skb) | |||
| 320 | goto nla_put_failure; | 320 | goto nla_put_failure; |
| 321 | NLA_PUT_NET16(skb, IPSET_ATTR_PORT, htons(map->first_port)); | 321 | NLA_PUT_NET16(skb, IPSET_ATTR_PORT, htons(map->first_port)); |
| 322 | NLA_PUT_NET16(skb, IPSET_ATTR_PORT_TO, htons(map->last_port)); | 322 | NLA_PUT_NET16(skb, IPSET_ATTR_PORT_TO, htons(map->last_port)); |
| 323 | NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, | 323 | NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, htonl(set->ref - 1)); |
| 324 | htonl(atomic_read(&set->ref) - 1)); | ||
| 325 | NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE, | 324 | NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE, |
| 326 | htonl(sizeof(*map) + map->memsize)); | 325 | htonl(sizeof(*map) + map->memsize)); |
| 327 | if (with_timeout(map->timeout)) | 326 | if (with_timeout(map->timeout)) |
diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c index d6b48230a540..9152e69a162d 100644 --- a/net/netfilter/ipset/ip_set_core.c +++ b/net/netfilter/ipset/ip_set_core.c | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | 26 | ||
| 27 | static LIST_HEAD(ip_set_type_list); /* all registered set types */ | 27 | static LIST_HEAD(ip_set_type_list); /* all registered set types */ |
| 28 | static DEFINE_MUTEX(ip_set_type_mutex); /* protects ip_set_type_list */ | 28 | static DEFINE_MUTEX(ip_set_type_mutex); /* protects ip_set_type_list */ |
| 29 | static DEFINE_RWLOCK(ip_set_ref_lock); /* protects the set refs */ | ||
| 29 | 30 | ||
| 30 | static struct ip_set **ip_set_list; /* all individual sets */ | 31 | static struct ip_set **ip_set_list; /* all individual sets */ |
| 31 | static ip_set_id_t ip_set_max = CONFIG_IP_SET_MAX; /* max number of sets */ | 32 | static ip_set_id_t ip_set_max = CONFIG_IP_SET_MAX; /* max number of sets */ |
| @@ -301,13 +302,18 @@ EXPORT_SYMBOL_GPL(ip_set_get_ipaddr6); | |||
| 301 | static inline void | 302 | static inline void |
| 302 | __ip_set_get(ip_set_id_t index) | 303 | __ip_set_get(ip_set_id_t index) |
| 303 | { | 304 | { |
| 304 | atomic_inc(&ip_set_list[index]->ref); | 305 | write_lock_bh(&ip_set_ref_lock); |
| 306 | ip_set_list[index]->ref++; | ||
| 307 | write_unlock_bh(&ip_set_ref_lock); | ||
| 305 | } | 308 | } |
| 306 | 309 | ||
| 307 | static inline void | 310 | static inline void |
| 308 | __ip_set_put(ip_set_id_t index) | 311 | __ip_set_put(ip_set_id_t index) |
| 309 | { | 312 | { |
| 310 | atomic_dec(&ip_set_list[index]->ref); | 313 | write_lock_bh(&ip_set_ref_lock); |
| 314 | BUG_ON(ip_set_list[index]->ref == 0); | ||
| 315 | ip_set_list[index]->ref--; | ||
| 316 | write_unlock_bh(&ip_set_ref_lock); | ||
| 311 | } | 317 | } |
| 312 | 318 | ||
| 313 | /* | 319 | /* |
| @@ -324,7 +330,7 @@ ip_set_test(ip_set_id_t index, const struct sk_buff *skb, | |||
| 324 | struct ip_set *set = ip_set_list[index]; | 330 | struct ip_set *set = ip_set_list[index]; |
| 325 | int ret = 0; | 331 | int ret = 0; |
| 326 | 332 | ||
| 327 | BUG_ON(set == NULL || atomic_read(&set->ref) == 0); | 333 | BUG_ON(set == NULL); |
| 328 | pr_debug("set %s, index %u\n", set->name, index); | 334 | pr_debug("set %s, index %u\n", set->name, index); |
| 329 | 335 | ||
| 330 | if (dim < set->type->dimension || | 336 | if (dim < set->type->dimension || |
| @@ -356,7 +362,7 @@ ip_set_add(ip_set_id_t index, const struct sk_buff *skb, | |||
| 356 | struct ip_set *set = ip_set_list[index]; | 362 | struct ip_set *set = ip_set_list[index]; |
| 357 | int ret; | 363 | int ret; |
| 358 | 364 | ||
| 359 | BUG_ON(set == NULL || atomic_read(&set->ref) == 0); | 365 | BUG_ON(set == NULL); |
| 360 | pr_debug("set %s, index %u\n", set->name, index); | 366 | pr_debug("set %s, index %u\n", set->name, index); |
| 361 | 367 | ||
| 362 | if (dim < set->type->dimension || | 368 | if (dim < set->type->dimension || |
| @@ -378,7 +384,7 @@ ip_set_del(ip_set_id_t index, const struct sk_buff *skb, | |||
| 378 | struct ip_set *set = ip_set_list[index]; | 384 | struct ip_set *set = ip_set_list[index]; |
| 379 | int ret = 0; | 385 | int ret = 0; |
| 380 | 386 | ||
| 381 | BUG_ON(set == NULL || atomic_read(&set->ref) == 0); | 387 | BUG_ON(set == NULL); |
| 382 | pr_debug("set %s, index %u\n", set->name, index); | 388 | pr_debug("set %s, index %u\n", set->name, index); |
| 383 | 389 | ||
| 384 | if (dim < set->type->dimension || | 390 | if (dim < set->type->dimension || |
| @@ -397,7 +403,6 @@ EXPORT_SYMBOL_GPL(ip_set_del); | |||
| 397 | * Find set by name, reference it once. The reference makes sure the | 403 | * Find set by name, reference it once. The reference makes sure the |
| 398 | * thing pointed to, does not go away under our feet. | 404 | * thing pointed to, does not go away under our feet. |
| 399 | * | 405 | * |
| 400 | * The nfnl mutex must already be activated. | ||
| 401 | */ | 406 | */ |
| 402 | ip_set_id_t | 407 | ip_set_id_t |
| 403 | ip_set_get_byname(const char *name, struct ip_set **set) | 408 | ip_set_get_byname(const char *name, struct ip_set **set) |
| @@ -423,15 +428,12 @@ EXPORT_SYMBOL_GPL(ip_set_get_byname); | |||
| 423 | * reference count by 1. The caller shall not assume the index | 428 | * reference count by 1. The caller shall not assume the index |
| 424 | * to be valid, after calling this function. | 429 | * to be valid, after calling this function. |
| 425 | * | 430 | * |
| 426 | * The nfnl mutex must already be activated. | ||
| 427 | */ | 431 | */ |
| 428 | void | 432 | void |
| 429 | ip_set_put_byindex(ip_set_id_t index) | 433 | ip_set_put_byindex(ip_set_id_t index) |
| 430 | { | 434 | { |
| 431 | if (ip_set_list[index] != NULL) { | 435 | if (ip_set_list[index] != NULL) |
| 432 | BUG_ON(atomic_read(&ip_set_list[index]->ref) == 0); | ||
| 433 | __ip_set_put(index); | 436 | __ip_set_put(index); |
| 434 | } | ||
| 435 | } | 437 | } |
| 436 | EXPORT_SYMBOL_GPL(ip_set_put_byindex); | 438 | EXPORT_SYMBOL_GPL(ip_set_put_byindex); |
| 437 | 439 | ||
| @@ -441,7 +443,6 @@ EXPORT_SYMBOL_GPL(ip_set_put_byindex); | |||
| 441 | * can't be destroyed. The set cannot be renamed due to | 443 | * can't be destroyed. The set cannot be renamed due to |
| 442 | * the referencing either. | 444 | * the referencing either. |
| 443 | * | 445 | * |
| 444 | * The nfnl mutex must already be activated. | ||
| 445 | */ | 446 | */ |
| 446 | const char * | 447 | const char * |
| 447 | ip_set_name_byindex(ip_set_id_t index) | 448 | ip_set_name_byindex(ip_set_id_t index) |
| @@ -449,7 +450,7 @@ ip_set_name_byindex(ip_set_id_t index) | |||
| 449 | const struct ip_set *set = ip_set_list[index]; | 450 | const struct ip_set *set = ip_set_list[index]; |
| 450 | 451 | ||
| 451 | BUG_ON(set == NULL); | 452 | BUG_ON(set == NULL); |
| 452 | BUG_ON(atomic_read(&set->ref) == 0); | 453 | BUG_ON(set->ref == 0); |
| 453 | 454 | ||
| 454 | /* Referenced, so it's safe */ | 455 | /* Referenced, so it's safe */ |
| 455 | return set->name; | 456 | return set->name; |
| @@ -515,10 +516,7 @@ void | |||
| 515 | ip_set_nfnl_put(ip_set_id_t index) | 516 | ip_set_nfnl_put(ip_set_id_t index) |
| 516 | { | 517 | { |
| 517 | nfnl_lock(); | 518 | nfnl_lock(); |
| 518 | if (ip_set_list[index] != NULL) { | 519 | ip_set_put_byindex(index); |
| 519 | BUG_ON(atomic_read(&ip_set_list[index]->ref) == 0); | ||
| 520 | __ip_set_put(index); | ||
| 521 | } | ||
| 522 | nfnl_unlock(); | 520 | nfnl_unlock(); |
| 523 | } | 521 | } |
| 524 | EXPORT_SYMBOL_GPL(ip_set_nfnl_put); | 522 | EXPORT_SYMBOL_GPL(ip_set_nfnl_put); |
| @@ -526,7 +524,7 @@ EXPORT_SYMBOL_GPL(ip_set_nfnl_put); | |||
| 526 | /* | 524 | /* |
| 527 | * Communication protocol with userspace over netlink. | 525 | * Communication protocol with userspace over netlink. |
| 528 | * | 526 | * |
| 529 | * We already locked by nfnl_lock. | 527 | * The commands are serialized by the nfnl mutex. |
| 530 | */ | 528 | */ |
| 531 | 529 | ||
| 532 | static inline bool | 530 | static inline bool |
| @@ -657,7 +655,6 @@ ip_set_create(struct sock *ctnl, struct sk_buff *skb, | |||
| 657 | return -ENOMEM; | 655 | return -ENOMEM; |
| 658 | rwlock_init(&set->lock); | 656 | rwlock_init(&set->lock); |
| 659 | strlcpy(set->name, name, IPSET_MAXNAMELEN); | 657 | strlcpy(set->name, name, IPSET_MAXNAMELEN); |
| 660 | atomic_set(&set->ref, 0); | ||
| 661 | set->family = family; | 658 | set->family = family; |
| 662 | 659 | ||
| 663 | /* | 660 | /* |
| @@ -690,8 +687,8 @@ ip_set_create(struct sock *ctnl, struct sk_buff *skb, | |||
| 690 | 687 | ||
| 691 | /* | 688 | /* |
| 692 | * Here, we have a valid, constructed set and we are protected | 689 | * Here, we have a valid, constructed set and we are protected |
| 693 | * by nfnl_lock. Find the first free index in ip_set_list and | 690 | * by the nfnl mutex. Find the first free index in ip_set_list |
| 694 | * check clashing. | 691 | * and check clashing. |
| 695 | */ | 692 | */ |
| 696 | if ((ret = find_free_id(set->name, &index, &clash)) != 0) { | 693 | if ((ret = find_free_id(set->name, &index, &clash)) != 0) { |
| 697 | /* If this is the same set and requested, ignore error */ | 694 | /* If this is the same set and requested, ignore error */ |
| @@ -751,31 +748,51 @@ ip_set_destroy(struct sock *ctnl, struct sk_buff *skb, | |||
| 751 | const struct nlattr * const attr[]) | 748 | const struct nlattr * const attr[]) |
| 752 | { | 749 | { |
| 753 | ip_set_id_t i; | 750 | ip_set_id_t i; |
| 751 | int ret = 0; | ||
| 754 | 752 | ||
| 755 | if (unlikely(protocol_failed(attr))) | 753 | if (unlikely(protocol_failed(attr))) |
| 756 | return -IPSET_ERR_PROTOCOL; | 754 | return -IPSET_ERR_PROTOCOL; |
| 757 | 755 | ||
| 758 | /* References are protected by the nfnl mutex */ | 756 | /* Commands are serialized and references are |
| 757 | * protected by the ip_set_ref_lock. | ||
| 758 | * External systems (i.e. xt_set) must call | ||
| 759 | * ip_set_put|get_nfnl_* functions, that way we | ||
| 760 | * can safely check references here. | ||
| 761 | * | ||
| 762 | * list:set timer can only decrement the reference | ||
| 763 | * counter, so if it's already zero, we can proceed | ||
| 764 | * without holding the lock. | ||
| 765 | */ | ||
| 766 | read_lock_bh(&ip_set_ref_lock); | ||
| 759 | if (!attr[IPSET_ATTR_SETNAME]) { | 767 | if (!attr[IPSET_ATTR_SETNAME]) { |
| 760 | for (i = 0; i < ip_set_max; i++) { | 768 | for (i = 0; i < ip_set_max; i++) { |
| 761 | if (ip_set_list[i] != NULL && | 769 | if (ip_set_list[i] != NULL && ip_set_list[i]->ref) { |
| 762 | (atomic_read(&ip_set_list[i]->ref))) | 770 | ret = IPSET_ERR_BUSY; |
| 763 | return -IPSET_ERR_BUSY; | 771 | goto out; |
| 772 | } | ||
| 764 | } | 773 | } |
| 774 | read_unlock_bh(&ip_set_ref_lock); | ||
| 765 | for (i = 0; i < ip_set_max; i++) { | 775 | for (i = 0; i < ip_set_max; i++) { |
| 766 | if (ip_set_list[i] != NULL) | 776 | if (ip_set_list[i] != NULL) |
| 767 | ip_set_destroy_set(i); | 777 | ip_set_destroy_set(i); |
| 768 | } | 778 | } |
| 769 | } else { | 779 | } else { |
| 770 | i = find_set_id(nla_data(attr[IPSET_ATTR_SETNAME])); | 780 | i = find_set_id(nla_data(attr[IPSET_ATTR_SETNAME])); |
| 771 | if (i == IPSET_INVALID_ID) | 781 | if (i == IPSET_INVALID_ID) { |
| 772 | return -ENOENT; | 782 | ret = -ENOENT; |
| 773 | else if (atomic_read(&ip_set_list[i]->ref)) | 783 | goto out; |
| 774 | return -IPSET_ERR_BUSY; | 784 | } else if (ip_set_list[i]->ref) { |
| 785 | ret = -IPSET_ERR_BUSY; | ||
| 786 | goto out; | ||
| 787 | } | ||
| 788 | read_unlock_bh(&ip_set_ref_lock); | ||
| 775 | 789 | ||
| 776 | ip_set_destroy_set(i); | 790 | ip_set_destroy_set(i); |
| 777 | } | 791 | } |
| 778 | return 0; | 792 | return 0; |
| 793 | out: | ||
| 794 | read_unlock_bh(&ip_set_ref_lock); | ||
| 795 | return ret; | ||
| 779 | } | 796 | } |
| 780 | 797 | ||
| 781 | /* Flush sets */ | 798 | /* Flush sets */ |
| @@ -834,6 +851,7 @@ ip_set_rename(struct sock *ctnl, struct sk_buff *skb, | |||
| 834 | struct ip_set *set; | 851 | struct ip_set *set; |
| 835 | const char *name2; | 852 | const char *name2; |
| 836 | ip_set_id_t i; | 853 | ip_set_id_t i; |
| 854 | int ret = 0; | ||
| 837 | 855 | ||
| 838 | if (unlikely(protocol_failed(attr) || | 856 | if (unlikely(protocol_failed(attr) || |
| 839 | attr[IPSET_ATTR_SETNAME] == NULL || | 857 | attr[IPSET_ATTR_SETNAME] == NULL || |
| @@ -843,25 +861,33 @@ ip_set_rename(struct sock *ctnl, struct sk_buff *skb, | |||
| 843 | set = find_set(nla_data(attr[IPSET_ATTR_SETNAME])); | 861 | set = find_set(nla_data(attr[IPSET_ATTR_SETNAME])); |
| 844 | if (set == NULL) | 862 | if (set == NULL) |
| 845 | return -ENOENT; | 863 | return -ENOENT; |
| 846 | if (atomic_read(&set->ref) != 0) | 864 | |
| 847 | return -IPSET_ERR_REFERENCED; | 865 | read_lock_bh(&ip_set_ref_lock); |
| 866 | if (set->ref != 0) { | ||
| 867 | ret = -IPSET_ERR_REFERENCED; | ||
| 868 | goto out; | ||
| 869 | } | ||
| 848 | 870 | ||
| 849 | name2 = nla_data(attr[IPSET_ATTR_SETNAME2]); | 871 | name2 = nla_data(attr[IPSET_ATTR_SETNAME2]); |
| 850 | for (i = 0; i < ip_set_max; i++) { | 872 | for (i = 0; i < ip_set_max; i++) { |
| 851 | if (ip_set_list[i] != NULL && | 873 | if (ip_set_list[i] != NULL && |
| 852 | STREQ(ip_set_list[i]->name, name2)) | 874 | STREQ(ip_set_list[i]->name, name2)) { |
| 853 | return -IPSET_ERR_EXIST_SETNAME2; | 875 | ret = -IPSET_ERR_EXIST_SETNAME2; |
| 876 | goto out; | ||
| 877 | } | ||
| 854 | } | 878 | } |
| 855 | strncpy(set->name, name2, IPSET_MAXNAMELEN); | 879 | strncpy(set->name, name2, IPSET_MAXNAMELEN); |
| 856 | 880 | ||
| 857 | return 0; | 881 | out: |
| 882 | read_unlock_bh(&ip_set_ref_lock); | ||
| 883 | return ret; | ||
| 858 | } | 884 | } |
| 859 | 885 | ||
| 860 | /* Swap two sets so that name/index points to the other. | 886 | /* Swap two sets so that name/index points to the other. |
| 861 | * References and set names are also swapped. | 887 | * References and set names are also swapped. |
| 862 | * | 888 | * |
| 863 | * We are protected by the nfnl mutex and references are | 889 | * The commands are serialized by the nfnl mutex and references are |
| 864 | * manipulated only by holding the mutex. The kernel interfaces | 890 | * protected by the ip_set_ref_lock. The kernel interfaces |
| 865 | * do not hold the mutex but the pointer settings are atomic | 891 | * do not hold the mutex but the pointer settings are atomic |
| 866 | * so the ip_set_list always contains valid pointers to the sets. | 892 | * so the ip_set_list always contains valid pointers to the sets. |
| 867 | */ | 893 | */ |
| @@ -874,7 +900,6 @@ ip_set_swap(struct sock *ctnl, struct sk_buff *skb, | |||
| 874 | struct ip_set *from, *to; | 900 | struct ip_set *from, *to; |
| 875 | ip_set_id_t from_id, to_id; | 901 | ip_set_id_t from_id, to_id; |
| 876 | char from_name[IPSET_MAXNAMELEN]; | 902 | char from_name[IPSET_MAXNAMELEN]; |
| 877 | u32 from_ref; | ||
| 878 | 903 | ||
| 879 | if (unlikely(protocol_failed(attr) || | 904 | if (unlikely(protocol_failed(attr) || |
| 880 | attr[IPSET_ATTR_SETNAME] == NULL || | 905 | attr[IPSET_ATTR_SETNAME] == NULL || |
| @@ -893,23 +918,21 @@ ip_set_swap(struct sock *ctnl, struct sk_buff *skb, | |||
| 893 | to = ip_set_list[to_id]; | 918 | to = ip_set_list[to_id]; |
| 894 | 919 | ||
| 895 | /* Features must not change. | 920 | /* Features must not change. |
| 896 | * Not an artifical restriction anymore, as we must prevent | 921 | * Not an artificial restriction anymore, as we must prevent |
| 897 | * possible loops created by swapping in setlist type of sets. */ | 922 | * possible loops created by swapping in setlist type of sets. */ |
| 898 | if (!(from->type->features == to->type->features && | 923 | if (!(from->type->features == to->type->features && |
| 899 | from->type->family == to->type->family)) | 924 | from->type->family == to->type->family)) |
| 900 | return -IPSET_ERR_TYPE_MISMATCH; | 925 | return -IPSET_ERR_TYPE_MISMATCH; |
| 901 | 926 | ||
| 902 | /* No magic here: ref munging protected by the nfnl_lock */ | ||
| 903 | strncpy(from_name, from->name, IPSET_MAXNAMELEN); | 927 | strncpy(from_name, from->name, IPSET_MAXNAMELEN); |
| 904 | from_ref = atomic_read(&from->ref); | ||
| 905 | |||
| 906 | strncpy(from->name, to->name, IPSET_MAXNAMELEN); | 928 | strncpy(from->name, to->name, IPSET_MAXNAMELEN); |
| 907 | atomic_set(&from->ref, atomic_read(&to->ref)); | ||
| 908 | strncpy(to->name, from_name, IPSET_MAXNAMELEN); | 929 | strncpy(to->name, from_name, IPSET_MAXNAMELEN); |
| 909 | atomic_set(&to->ref, from_ref); | ||
| 910 | 930 | ||
| 931 | write_lock_bh(&ip_set_ref_lock); | ||
| 932 | swap(from->ref, to->ref); | ||
| 911 | ip_set_list[from_id] = to; | 933 | ip_set_list[from_id] = to; |
| 912 | ip_set_list[to_id] = from; | 934 | ip_set_list[to_id] = from; |
| 935 | write_unlock_bh(&ip_set_ref_lock); | ||
| 913 | 936 | ||
| 914 | return 0; | 937 | return 0; |
| 915 | } | 938 | } |
| @@ -926,7 +949,7 @@ ip_set_dump_done(struct netlink_callback *cb) | |||
| 926 | { | 949 | { |
| 927 | if (cb->args[2]) { | 950 | if (cb->args[2]) { |
| 928 | pr_debug("release set %s\n", ip_set_list[cb->args[1]]->name); | 951 | pr_debug("release set %s\n", ip_set_list[cb->args[1]]->name); |
| 929 | __ip_set_put((ip_set_id_t) cb->args[1]); | 952 | ip_set_put_byindex((ip_set_id_t) cb->args[1]); |
| 930 | } | 953 | } |
| 931 | return 0; | 954 | return 0; |
| 932 | } | 955 | } |
| @@ -1068,7 +1091,7 @@ release_refcount: | |||
| 1068 | /* If there was an error or set is done, release set */ | 1091 | /* If there was an error or set is done, release set */ |
| 1069 | if (ret || !cb->args[2]) { | 1092 | if (ret || !cb->args[2]) { |
| 1070 | pr_debug("release set %s\n", ip_set_list[index]->name); | 1093 | pr_debug("release set %s\n", ip_set_list[index]->name); |
| 1071 | __ip_set_put(index); | 1094 | ip_set_put_byindex(index); |
| 1072 | } | 1095 | } |
| 1073 | 1096 | ||
| 1074 | /* If we dump all sets, continue with dumping last ones */ | 1097 | /* If we dump all sets, continue with dumping last ones */ |
diff --git a/net/netfilter/ipset/ip_set_list_set.c b/net/netfilter/ipset/ip_set_list_set.c index a47c32982f06..e9159e99fc4b 100644 --- a/net/netfilter/ipset/ip_set_list_set.c +++ b/net/netfilter/ipset/ip_set_list_set.c | |||
| @@ -43,14 +43,19 @@ struct list_set { | |||
| 43 | static inline struct set_elem * | 43 | static inline struct set_elem * |
| 44 | list_set_elem(const struct list_set *map, u32 id) | 44 | list_set_elem(const struct list_set *map, u32 id) |
| 45 | { | 45 | { |
| 46 | return (struct set_elem *)((char *)map->members + id * map->dsize); | 46 | return (struct set_elem *)((void *)map->members + id * map->dsize); |
| 47 | } | ||
| 48 | |||
| 49 | static inline struct set_telem * | ||
| 50 | list_set_telem(const struct list_set *map, u32 id) | ||
| 51 | { | ||
| 52 | return (struct set_telem *)((void *)map->members + id * map->dsize); | ||
| 47 | } | 53 | } |
| 48 | 54 | ||
| 49 | static inline bool | 55 | static inline bool |
| 50 | list_set_timeout(const struct list_set *map, u32 id) | 56 | list_set_timeout(const struct list_set *map, u32 id) |
| 51 | { | 57 | { |
| 52 | const struct set_telem *elem = | 58 | const struct set_telem *elem = list_set_telem(map, id); |
| 53 | (const struct set_telem *) list_set_elem(map, id); | ||
| 54 | 59 | ||
| 55 | return ip_set_timeout_test(elem->timeout); | 60 | return ip_set_timeout_test(elem->timeout); |
| 56 | } | 61 | } |
| @@ -58,19 +63,11 @@ list_set_timeout(const struct list_set *map, u32 id) | |||
| 58 | static inline bool | 63 | static inline bool |
| 59 | list_set_expired(const struct list_set *map, u32 id) | 64 | list_set_expired(const struct list_set *map, u32 id) |
| 60 | { | 65 | { |
| 61 | const struct set_telem *elem = | 66 | const struct set_telem *elem = list_set_telem(map, id); |
| 62 | (const struct set_telem *) list_set_elem(map, id); | ||
| 63 | 67 | ||
| 64 | return ip_set_timeout_expired(elem->timeout); | 68 | return ip_set_timeout_expired(elem->timeout); |
| 65 | } | 69 | } |
| 66 | 70 | ||
| 67 | static inline int | ||
| 68 | list_set_exist(const struct set_telem *elem) | ||
| 69 | { | ||
| 70 | return elem->id != IPSET_INVALID_ID && | ||
| 71 | !ip_set_timeout_expired(elem->timeout); | ||
| 72 | } | ||
| 73 | |||
| 74 | /* Set list without and with timeout */ | 71 | /* Set list without and with timeout */ |
| 75 | 72 | ||
| 76 | static int | 73 | static int |
| @@ -146,11 +143,11 @@ list_elem_tadd(struct list_set *map, u32 i, ip_set_id_t id, | |||
| 146 | struct set_telem *e; | 143 | struct set_telem *e; |
| 147 | 144 | ||
| 148 | for (; i < map->size; i++) { | 145 | for (; i < map->size; i++) { |
| 149 | e = (struct set_telem *)list_set_elem(map, i); | 146 | e = list_set_telem(map, i); |
| 150 | swap(e->id, id); | 147 | swap(e->id, id); |
| 148 | swap(e->timeout, timeout); | ||
| 151 | if (e->id == IPSET_INVALID_ID) | 149 | if (e->id == IPSET_INVALID_ID) |
| 152 | break; | 150 | break; |
| 153 | swap(e->timeout, timeout); | ||
| 154 | } | 151 | } |
| 155 | } | 152 | } |
| 156 | 153 | ||
| @@ -164,7 +161,7 @@ list_set_add(struct list_set *map, u32 i, ip_set_id_t id, | |||
| 164 | /* Last element replaced: e.g. add new,before,last */ | 161 | /* Last element replaced: e.g. add new,before,last */ |
| 165 | ip_set_put_byindex(e->id); | 162 | ip_set_put_byindex(e->id); |
| 166 | if (with_timeout(map->timeout)) | 163 | if (with_timeout(map->timeout)) |
| 167 | list_elem_tadd(map, i, id, timeout); | 164 | list_elem_tadd(map, i, id, ip_set_timeout_set(timeout)); |
| 168 | else | 165 | else |
| 169 | list_elem_add(map, i, id); | 166 | list_elem_add(map, i, id); |
| 170 | 167 | ||
| @@ -172,11 +169,11 @@ list_set_add(struct list_set *map, u32 i, ip_set_id_t id, | |||
| 172 | } | 169 | } |
| 173 | 170 | ||
| 174 | static int | 171 | static int |
| 175 | list_set_del(struct list_set *map, ip_set_id_t id, u32 i) | 172 | list_set_del(struct list_set *map, u32 i) |
| 176 | { | 173 | { |
| 177 | struct set_elem *a = list_set_elem(map, i), *b; | 174 | struct set_elem *a = list_set_elem(map, i), *b; |
| 178 | 175 | ||
| 179 | ip_set_put_byindex(id); | 176 | ip_set_put_byindex(a->id); |
| 180 | 177 | ||
| 181 | for (; i < map->size - 1; i++) { | 178 | for (; i < map->size - 1; i++) { |
| 182 | b = list_set_elem(map, i + 1); | 179 | b = list_set_elem(map, i + 1); |
| @@ -308,11 +305,11 @@ list_set_uadt(struct ip_set *set, struct nlattr *tb[], | |||
| 308 | (before == 0 || | 305 | (before == 0 || |
| 309 | (before > 0 && | 306 | (before > 0 && |
| 310 | next_id_eq(map, i, refid)))) | 307 | next_id_eq(map, i, refid)))) |
| 311 | ret = list_set_del(map, id, i); | 308 | ret = list_set_del(map, i); |
| 312 | else if (before < 0 && | 309 | else if (before < 0 && |
| 313 | elem->id == refid && | 310 | elem->id == refid && |
| 314 | next_id_eq(map, i, id)) | 311 | next_id_eq(map, i, id)) |
| 315 | ret = list_set_del(map, id, i + 1); | 312 | ret = list_set_del(map, i + 1); |
| 316 | } | 313 | } |
| 317 | break; | 314 | break; |
| 318 | default: | 315 | default: |
| @@ -369,8 +366,7 @@ list_set_head(struct ip_set *set, struct sk_buff *skb) | |||
| 369 | NLA_PUT_NET32(skb, IPSET_ATTR_SIZE, htonl(map->size)); | 366 | NLA_PUT_NET32(skb, IPSET_ATTR_SIZE, htonl(map->size)); |
| 370 | if (with_timeout(map->timeout)) | 367 | if (with_timeout(map->timeout)) |
| 371 | NLA_PUT_NET32(skb, IPSET_ATTR_TIMEOUT, htonl(map->timeout)); | 368 | NLA_PUT_NET32(skb, IPSET_ATTR_TIMEOUT, htonl(map->timeout)); |
| 372 | NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, | 369 | NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, htonl(set->ref - 1)); |
| 373 | htonl(atomic_read(&set->ref) - 1)); | ||
| 374 | NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE, | 370 | NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE, |
| 375 | htonl(sizeof(*map) + map->size * map->dsize)); | 371 | htonl(sizeof(*map) + map->size * map->dsize)); |
| 376 | ipset_nest_end(skb, nested); | 372 | ipset_nest_end(skb, nested); |
| @@ -461,16 +457,13 @@ list_set_gc(unsigned long ul_set) | |||
| 461 | struct set_telem *e; | 457 | struct set_telem *e; |
| 462 | u32 i; | 458 | u32 i; |
| 463 | 459 | ||
| 464 | /* We run parallel with other readers (test element) | 460 | write_lock_bh(&set->lock); |
| 465 | * but adding/deleting new entries is locked out */ | 461 | for (i = 0; i < map->size; i++) { |
| 466 | read_lock_bh(&set->lock); | 462 | e = list_set_telem(map, i); |
| 467 | for (i = map->size - 1; i >= 0; i--) { | 463 | if (e->id != IPSET_INVALID_ID && list_set_expired(map, i)) |
| 468 | e = (struct set_telem *) list_set_elem(map, i); | 464 | list_set_del(map, i); |
| 469 | if (e->id != IPSET_INVALID_ID && | ||
| 470 | list_set_expired(map, i)) | ||
| 471 | list_set_del(map, e->id, i); | ||
| 472 | } | 465 | } |
| 473 | read_unlock_bh(&set->lock); | 466 | write_unlock_bh(&set->lock); |
| 474 | 467 | ||
| 475 | map->gc.expires = jiffies + IPSET_GC_PERIOD(map->timeout) * HZ; | 468 | map->gc.expires = jiffies + IPSET_GC_PERIOD(map->timeout) * HZ; |
| 476 | add_timer(&map->gc); | 469 | add_timer(&map->gc); |
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c index f289306cbf12..c97bd45975be 100644 --- a/net/netfilter/ipvs/ip_vs_conn.c +++ b/net/netfilter/ipvs/ip_vs_conn.c | |||
| @@ -595,7 +595,7 @@ ip_vs_bind_dest(struct ip_vs_conn *cp, struct ip_vs_dest *dest) | |||
| 595 | atomic_inc(&dest->inactconns); | 595 | atomic_inc(&dest->inactconns); |
| 596 | } else { | 596 | } else { |
| 597 | /* It is a persistent connection/template, so increase | 597 | /* It is a persistent connection/template, so increase |
| 598 | the peristent connection counter */ | 598 | the persistent connection counter */ |
| 599 | atomic_inc(&dest->persistconns); | 599 | atomic_inc(&dest->persistconns); |
| 600 | } | 600 | } |
| 601 | 601 | ||
| @@ -657,7 +657,7 @@ static inline void ip_vs_unbind_dest(struct ip_vs_conn *cp) | |||
| 657 | } | 657 | } |
| 658 | } else { | 658 | } else { |
| 659 | /* It is a persistent connection/template, so decrease | 659 | /* It is a persistent connection/template, so decrease |
| 660 | the peristent connection counter */ | 660 | the persistent connection counter */ |
| 661 | atomic_dec(&dest->persistconns); | 661 | atomic_dec(&dest->persistconns); |
| 662 | } | 662 | } |
| 663 | 663 | ||
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index 33733c8872e7..ae47090bf45f 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c | |||
| @@ -3120,7 +3120,7 @@ nla_put_failure: | |||
| 3120 | static int ip_vs_genl_dump_daemons(struct sk_buff *skb, | 3120 | static int ip_vs_genl_dump_daemons(struct sk_buff *skb, |
| 3121 | struct netlink_callback *cb) | 3121 | struct netlink_callback *cb) |
| 3122 | { | 3122 | { |
| 3123 | struct net *net = skb_net(skb); | 3123 | struct net *net = skb_sknet(skb); |
| 3124 | struct netns_ipvs *ipvs = net_ipvs(net); | 3124 | struct netns_ipvs *ipvs = net_ipvs(net); |
| 3125 | 3125 | ||
| 3126 | mutex_lock(&__ip_vs_mutex); | 3126 | mutex_lock(&__ip_vs_mutex); |
diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c index f276df9896b3..87e40ea77a95 100644 --- a/net/netfilter/ipvs/ip_vs_lblc.c +++ b/net/netfilter/ipvs/ip_vs_lblc.c | |||
| @@ -131,7 +131,7 @@ static inline void ip_vs_lblc_free(struct ip_vs_lblc_entry *en) | |||
| 131 | { | 131 | { |
| 132 | list_del(&en->list); | 132 | list_del(&en->list); |
| 133 | /* | 133 | /* |
| 134 | * We don't kfree dest because it is refered either by its service | 134 | * We don't kfree dest because it is referred either by its service |
| 135 | * or the trash dest list. | 135 | * or the trash dest list. |
| 136 | */ | 136 | */ |
| 137 | atomic_dec(&en->dest->refcnt); | 137 | atomic_dec(&en->dest->refcnt); |
diff --git a/net/netfilter/ipvs/ip_vs_lblcr.c b/net/netfilter/ipvs/ip_vs_lblcr.c index cb1c9913d38b..90f618ab6dda 100644 --- a/net/netfilter/ipvs/ip_vs_lblcr.c +++ b/net/netfilter/ipvs/ip_vs_lblcr.c | |||
| @@ -152,7 +152,7 @@ static void ip_vs_dest_set_eraseall(struct ip_vs_dest_set *set) | |||
| 152 | write_lock(&set->lock); | 152 | write_lock(&set->lock); |
| 153 | list_for_each_entry_safe(e, ep, &set->list, list) { | 153 | list_for_each_entry_safe(e, ep, &set->list, list) { |
| 154 | /* | 154 | /* |
| 155 | * We don't kfree dest because it is refered either | 155 | * We don't kfree dest because it is referred either |
| 156 | * by its service or by the trash dest list. | 156 | * by its service or by the trash dest list. |
| 157 | */ | 157 | */ |
| 158 | atomic_dec(&e->dest->refcnt); | 158 | atomic_dec(&e->dest->refcnt); |
diff --git a/net/netfilter/ipvs/ip_vs_proto_sctp.c b/net/netfilter/ipvs/ip_vs_proto_sctp.c index b027ccc49f43..d12ed53ec95f 100644 --- a/net/netfilter/ipvs/ip_vs_proto_sctp.c +++ b/net/netfilter/ipvs/ip_vs_proto_sctp.c | |||
| @@ -566,7 +566,7 @@ static struct ipvs_sctp_nextstate | |||
| 566 | * SHUTDOWN sent from the client, waitinf for SHUT ACK from the server | 566 | * SHUTDOWN sent from the client, waitinf for SHUT ACK from the server |
| 567 | */ | 567 | */ |
| 568 | /* | 568 | /* |
| 569 | * We recieved the data chuck, keep the state unchanged. I assume | 569 | * We received the data chuck, keep the state unchanged. I assume |
| 570 | * that still data chuncks can be received by both the peers in | 570 | * that still data chuncks can be received by both the peers in |
| 571 | * SHUDOWN state | 571 | * SHUDOWN state |
| 572 | */ | 572 | */ |
| @@ -633,7 +633,7 @@ static struct ipvs_sctp_nextstate | |||
| 633 | * SHUTDOWN sent from the server, waitinf for SHUTDOWN ACK from client | 633 | * SHUTDOWN sent from the server, waitinf for SHUTDOWN ACK from client |
| 634 | */ | 634 | */ |
| 635 | /* | 635 | /* |
| 636 | * We recieved the data chuck, keep the state unchanged. I assume | 636 | * We received the data chuck, keep the state unchanged. I assume |
| 637 | * that still data chuncks can be received by both the peers in | 637 | * that still data chuncks can be received by both the peers in |
| 638 | * SHUDOWN state | 638 | * SHUDOWN state |
| 639 | */ | 639 | */ |
| @@ -701,7 +701,7 @@ static struct ipvs_sctp_nextstate | |||
| 701 | * SHUTDOWN ACK from the client, awaiting for SHUTDOWN COM from server | 701 | * SHUTDOWN ACK from the client, awaiting for SHUTDOWN COM from server |
| 702 | */ | 702 | */ |
| 703 | /* | 703 | /* |
| 704 | * We recieved the data chuck, keep the state unchanged. I assume | 704 | * We received the data chuck, keep the state unchanged. I assume |
| 705 | * that still data chuncks can be received by both the peers in | 705 | * that still data chuncks can be received by both the peers in |
| 706 | * SHUDOWN state | 706 | * SHUDOWN state |
| 707 | */ | 707 | */ |
| @@ -771,7 +771,7 @@ static struct ipvs_sctp_nextstate | |||
| 771 | * SHUTDOWN ACK from the server, awaiting for SHUTDOWN COM from client | 771 | * SHUTDOWN ACK from the server, awaiting for SHUTDOWN COM from client |
| 772 | */ | 772 | */ |
| 773 | /* | 773 | /* |
| 774 | * We recieved the data chuck, keep the state unchanged. I assume | 774 | * We received the data chuck, keep the state unchanged. I assume |
| 775 | * that still data chuncks can be received by both the peers in | 775 | * that still data chuncks can be received by both the peers in |
| 776 | * SHUDOWN state | 776 | * SHUDOWN state |
| 777 | */ | 777 | */ |
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 941286ca911d..2e1c11f78419 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
| @@ -453,7 +453,7 @@ __nf_conntrack_confirm(struct sk_buff *skb) | |||
| 453 | REJECT will give spurious warnings here. */ | 453 | REJECT will give spurious warnings here. */ |
| 454 | /* NF_CT_ASSERT(atomic_read(&ct->ct_general.use) == 1); */ | 454 | /* NF_CT_ASSERT(atomic_read(&ct->ct_general.use) == 1); */ |
| 455 | 455 | ||
| 456 | /* No external references means noone else could have | 456 | /* No external references means no one else could have |
| 457 | confirmed us. */ | 457 | confirmed us. */ |
| 458 | NF_CT_ASSERT(!nf_ct_is_confirmed(ct)); | 458 | NF_CT_ASSERT(!nf_ct_is_confirmed(ct)); |
| 459 | pr_debug("Confirming conntrack %p\n", ct); | 459 | pr_debug("Confirming conntrack %p\n", ct); |
| @@ -901,7 +901,7 @@ nf_conntrack_in(struct net *net, u_int8_t pf, unsigned int hooknum, | |||
| 901 | ret = l3proto->get_l4proto(skb, skb_network_offset(skb), | 901 | ret = l3proto->get_l4proto(skb, skb_network_offset(skb), |
| 902 | &dataoff, &protonum); | 902 | &dataoff, &protonum); |
| 903 | if (ret <= 0) { | 903 | if (ret <= 0) { |
| 904 | pr_debug("not prepared to track yet or error occured\n"); | 904 | pr_debug("not prepared to track yet or error occurred\n"); |
| 905 | NF_CT_STAT_INC_ATOMIC(net, error); | 905 | NF_CT_STAT_INC_ATOMIC(net, error); |
| 906 | NF_CT_STAT_INC_ATOMIC(net, invalid); | 906 | NF_CT_STAT_INC_ATOMIC(net, invalid); |
| 907 | ret = -ret; | 907 | ret = -ret; |
diff --git a/net/netfilter/nf_conntrack_h323_asn1.c b/net/netfilter/nf_conntrack_h323_asn1.c index 867882313e49..bcd5ed6b7130 100644 --- a/net/netfilter/nf_conntrack_h323_asn1.c +++ b/net/netfilter/nf_conntrack_h323_asn1.c | |||
| @@ -631,7 +631,7 @@ static int decode_seqof(bitstr_t *bs, const struct field_t *f, | |||
| 631 | CHECK_BOUND(bs, 2); | 631 | CHECK_BOUND(bs, 2); |
| 632 | count = *bs->cur++; | 632 | count = *bs->cur++; |
| 633 | count <<= 8; | 633 | count <<= 8; |
| 634 | count = *bs->cur++; | 634 | count += *bs->cur++; |
| 635 | break; | 635 | break; |
| 636 | case SEMI: | 636 | case SEMI: |
| 637 | BYTE_ALIGN(bs); | 637 | BYTE_ALIGN(bs); |
diff --git a/net/netfilter/nf_conntrack_h323_main.c b/net/netfilter/nf_conntrack_h323_main.c index 533a183e6661..18b2ce5c8ced 100644 --- a/net/netfilter/nf_conntrack_h323_main.c +++ b/net/netfilter/nf_conntrack_h323_main.c | |||
| @@ -731,10 +731,10 @@ static int callforward_do_filter(const union nf_inet_addr *src, | |||
| 731 | 731 | ||
| 732 | memset(&fl2, 0, sizeof(fl2)); | 732 | memset(&fl2, 0, sizeof(fl2)); |
| 733 | fl2.daddr = dst->ip; | 733 | fl2.daddr = dst->ip; |
| 734 | if (!afinfo->route((struct dst_entry **)&rt1, | 734 | if (!afinfo->route(&init_net, (struct dst_entry **)&rt1, |
| 735 | flowi4_to_flowi(&fl1))) { | 735 | flowi4_to_flowi(&fl1), false)) { |
| 736 | if (!afinfo->route((struct dst_entry **)&rt2, | 736 | if (!afinfo->route(&init_net, (struct dst_entry **)&rt2, |
| 737 | flowi4_to_flowi(&fl2))) { | 737 | flowi4_to_flowi(&fl2), false)) { |
| 738 | if (rt1->rt_gateway == rt2->rt_gateway && | 738 | if (rt1->rt_gateway == rt2->rt_gateway && |
| 739 | rt1->dst.dev == rt2->dst.dev) | 739 | rt1->dst.dev == rt2->dst.dev) |
| 740 | ret = 1; | 740 | ret = 1; |
| @@ -755,10 +755,10 @@ static int callforward_do_filter(const union nf_inet_addr *src, | |||
| 755 | 755 | ||
| 756 | memset(&fl2, 0, sizeof(fl2)); | 756 | memset(&fl2, 0, sizeof(fl2)); |
| 757 | ipv6_addr_copy(&fl2.daddr, &dst->in6); | 757 | ipv6_addr_copy(&fl2.daddr, &dst->in6); |
| 758 | if (!afinfo->route((struct dst_entry **)&rt1, | 758 | if (!afinfo->route(&init_net, (struct dst_entry **)&rt1, |
| 759 | flowi6_to_flowi(&fl1))) { | 759 | flowi6_to_flowi(&fl1), false)) { |
| 760 | if (!afinfo->route((struct dst_entry **)&rt2, | 760 | if (!afinfo->route(&init_net, (struct dst_entry **)&rt2, |
| 761 | flowi6_to_flowi(&fl2))) { | 761 | flowi6_to_flowi(&fl2), false)) { |
| 762 | if (!memcmp(&rt1->rt6i_gateway, &rt2->rt6i_gateway, | 762 | if (!memcmp(&rt1->rt6i_gateway, &rt2->rt6i_gateway, |
| 763 | sizeof(rt1->rt6i_gateway)) && | 763 | sizeof(rt1->rt6i_gateway)) && |
| 764 | rt1->dst.dev == rt2->dst.dev) | 764 | rt1->dst.dev == rt2->dst.dev) |
diff --git a/net/netfilter/nf_conntrack_proto_dccp.c b/net/netfilter/nf_conntrack_proto_dccp.c index 9ae57c57c50e..2e664a69d7db 100644 --- a/net/netfilter/nf_conntrack_proto_dccp.c +++ b/net/netfilter/nf_conntrack_proto_dccp.c | |||
| @@ -98,7 +98,7 @@ static const char * const dccp_state_names[] = { | |||
| 98 | #define sIV CT_DCCP_INVALID | 98 | #define sIV CT_DCCP_INVALID |
| 99 | 99 | ||
| 100 | /* | 100 | /* |
| 101 | * DCCP state transistion table | 101 | * DCCP state transition table |
| 102 | * | 102 | * |
| 103 | * The assumption is the same as for TCP tracking: | 103 | * The assumption is the same as for TCP tracking: |
| 104 | * | 104 | * |
diff --git a/net/netfilter/nf_conntrack_proto_sctp.c b/net/netfilter/nf_conntrack_proto_sctp.c index 6f4ee70f460b..6772b1154654 100644 --- a/net/netfilter/nf_conntrack_proto_sctp.c +++ b/net/netfilter/nf_conntrack_proto_sctp.c | |||
| @@ -107,9 +107,9 @@ static const u8 sctp_conntracks[2][9][SCTP_CONNTRACK_MAX] = { | |||
| 107 | /* abort */ {sCL, sCL, sCL, sCL, sCL, sCL, sCL, sCL}, | 107 | /* abort */ {sCL, sCL, sCL, sCL, sCL, sCL, sCL, sCL}, |
| 108 | /* shutdown */ {sCL, sCL, sCW, sCE, sSS, sSS, sSR, sSA}, | 108 | /* shutdown */ {sCL, sCL, sCW, sCE, sSS, sSS, sSR, sSA}, |
| 109 | /* shutdown_ack */ {sSA, sCL, sCW, sCE, sES, sSA, sSA, sSA}, | 109 | /* shutdown_ack */ {sSA, sCL, sCW, sCE, sES, sSA, sSA, sSA}, |
| 110 | /* error */ {sCL, sCL, sCW, sCE, sES, sSS, sSR, sSA},/* Cant have Stale cookie*/ | 110 | /* error */ {sCL, sCL, sCW, sCE, sES, sSS, sSR, sSA},/* Can't have Stale cookie*/ |
| 111 | /* cookie_echo */ {sCL, sCL, sCE, sCE, sES, sSS, sSR, sSA},/* 5.2.4 - Big TODO */ | 111 | /* cookie_echo */ {sCL, sCL, sCE, sCE, sES, sSS, sSR, sSA},/* 5.2.4 - Big TODO */ |
| 112 | /* cookie_ack */ {sCL, sCL, sCW, sCE, sES, sSS, sSR, sSA},/* Cant come in orig dir */ | 112 | /* cookie_ack */ {sCL, sCL, sCW, sCE, sES, sSS, sSR, sSA},/* Can't come in orig dir */ |
| 113 | /* shutdown_comp*/ {sCL, sCL, sCW, sCE, sES, sSS, sSR, sCL} | 113 | /* shutdown_comp*/ {sCL, sCL, sCW, sCE, sES, sSS, sSR, sCL} |
| 114 | }, | 114 | }, |
| 115 | { | 115 | { |
| @@ -121,7 +121,7 @@ static const u8 sctp_conntracks[2][9][SCTP_CONNTRACK_MAX] = { | |||
| 121 | /* shutdown */ {sIV, sCL, sCW, sCE, sSR, sSS, sSR, sSA}, | 121 | /* shutdown */ {sIV, sCL, sCW, sCE, sSR, sSS, sSR, sSA}, |
| 122 | /* shutdown_ack */ {sIV, sCL, sCW, sCE, sES, sSA, sSA, sSA}, | 122 | /* shutdown_ack */ {sIV, sCL, sCW, sCE, sES, sSA, sSA, sSA}, |
| 123 | /* error */ {sIV, sCL, sCW, sCL, sES, sSS, sSR, sSA}, | 123 | /* error */ {sIV, sCL, sCW, sCL, sES, sSS, sSR, sSA}, |
| 124 | /* cookie_echo */ {sIV, sCL, sCW, sCE, sES, sSS, sSR, sSA},/* Cant come in reply dir */ | 124 | /* cookie_echo */ {sIV, sCL, sCW, sCE, sES, sSS, sSR, sSA},/* Can't come in reply dir */ |
| 125 | /* cookie_ack */ {sIV, sCL, sCW, sES, sES, sSS, sSR, sSA}, | 125 | /* cookie_ack */ {sIV, sCL, sCW, sES, sES, sSS, sSR, sSA}, |
| 126 | /* shutdown_comp*/ {sIV, sCL, sCW, sCE, sES, sSS, sSR, sCL} | 126 | /* shutdown_comp*/ {sIV, sCL, sCW, sCE, sES, sSS, sSR, sCL} |
| 127 | } | 127 | } |
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c index bcf47eb518ef..237cc1981b89 100644 --- a/net/netfilter/nf_conntrack_sip.c +++ b/net/netfilter/nf_conntrack_sip.c | |||
| @@ -707,7 +707,7 @@ static const char *ct_sdp_header_search(const char *dptr, const char *limit, | |||
| 707 | } | 707 | } |
| 708 | 708 | ||
| 709 | /* Locate a SDP header (optionally a substring within the header value), | 709 | /* Locate a SDP header (optionally a substring within the header value), |
| 710 | * optionally stopping at the first occurence of the term header, parse | 710 | * optionally stopping at the first occurrence of the term header, parse |
| 711 | * it and return the offset and length of the data we're interested in. | 711 | * it and return the offset and length of the data we're interested in. |
| 712 | */ | 712 | */ |
| 713 | int ct_sip_get_sdp_header(const struct nf_conn *ct, const char *dptr, | 713 | int ct_sip_get_sdp_header(const struct nf_conn *ct, const char *dptr, |
diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c index 5ab22e2bbd7d..5b466cd1272f 100644 --- a/net/netfilter/nf_queue.c +++ b/net/netfilter/nf_queue.c | |||
| @@ -134,7 +134,7 @@ static int __nf_queue(struct sk_buff *skb, | |||
| 134 | const struct nf_afinfo *afinfo; | 134 | const struct nf_afinfo *afinfo; |
| 135 | const struct nf_queue_handler *qh; | 135 | const struct nf_queue_handler *qh; |
| 136 | 136 | ||
| 137 | /* QUEUE == DROP if noone is waiting, to be safe. */ | 137 | /* QUEUE == DROP if no one is waiting, to be safe. */ |
| 138 | rcu_read_lock(); | 138 | rcu_read_lock(); |
| 139 | 139 | ||
| 140 | qh = rcu_dereference(queue_handler[pf]); | 140 | qh = rcu_dereference(queue_handler[pf]); |
diff --git a/net/netfilter/xt_TCPMSS.c b/net/netfilter/xt_TCPMSS.c index 6e6b46cb1db9..9e63b43faeed 100644 --- a/net/netfilter/xt_TCPMSS.c +++ b/net/netfilter/xt_TCPMSS.c | |||
| @@ -166,7 +166,7 @@ static u_int32_t tcpmss_reverse_mtu(const struct sk_buff *skb, | |||
| 166 | rcu_read_lock(); | 166 | rcu_read_lock(); |
| 167 | ai = nf_get_afinfo(family); | 167 | ai = nf_get_afinfo(family); |
| 168 | if (ai != NULL) | 168 | if (ai != NULL) |
| 169 | ai->route((struct dst_entry **)&rt, &fl); | 169 | ai->route(&init_net, (struct dst_entry **)&rt, &fl, false); |
| 170 | rcu_read_unlock(); | 170 | rcu_read_unlock(); |
| 171 | 171 | ||
| 172 | if (rt != NULL) { | 172 | if (rt != NULL) { |
diff --git a/net/netfilter/xt_addrtype.c b/net/netfilter/xt_addrtype.c index 2220b85e9519..b77d383cec78 100644 --- a/net/netfilter/xt_addrtype.c +++ b/net/netfilter/xt_addrtype.c | |||
| @@ -32,11 +32,32 @@ MODULE_ALIAS("ipt_addrtype"); | |||
| 32 | MODULE_ALIAS("ip6t_addrtype"); | 32 | MODULE_ALIAS("ip6t_addrtype"); |
| 33 | 33 | ||
| 34 | #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) | 34 | #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) |
| 35 | static u32 xt_addrtype_rt6_to_type(const struct rt6_info *rt) | 35 | static u32 match_lookup_rt6(struct net *net, const struct net_device *dev, |
| 36 | const struct in6_addr *addr) | ||
| 36 | { | 37 | { |
| 38 | const struct nf_afinfo *afinfo; | ||
| 39 | struct flowi6 flow; | ||
| 40 | struct rt6_info *rt; | ||
| 37 | u32 ret; | 41 | u32 ret; |
| 42 | int route_err; | ||
| 38 | 43 | ||
| 39 | if (!rt) | 44 | memset(&flow, 0, sizeof(flow)); |
| 45 | ipv6_addr_copy(&flow.daddr, addr); | ||
| 46 | if (dev) | ||
| 47 | flow.flowi6_oif = dev->ifindex; | ||
| 48 | |||
| 49 | rcu_read_lock(); | ||
| 50 | |||
| 51 | afinfo = nf_get_afinfo(NFPROTO_IPV6); | ||
| 52 | if (afinfo != NULL) | ||
| 53 | route_err = afinfo->route(net, (struct dst_entry **)&rt, | ||
| 54 | flowi6_to_flowi(&flow), !!dev); | ||
| 55 | else | ||
| 56 | route_err = 1; | ||
| 57 | |||
| 58 | rcu_read_unlock(); | ||
| 59 | |||
| 60 | if (route_err) | ||
| 40 | return XT_ADDRTYPE_UNREACHABLE; | 61 | return XT_ADDRTYPE_UNREACHABLE; |
| 41 | 62 | ||
| 42 | if (rt->rt6i_flags & RTF_REJECT) | 63 | if (rt->rt6i_flags & RTF_REJECT) |
| @@ -48,6 +69,9 @@ static u32 xt_addrtype_rt6_to_type(const struct rt6_info *rt) | |||
| 48 | ret |= XT_ADDRTYPE_LOCAL; | 69 | ret |= XT_ADDRTYPE_LOCAL; |
| 49 | if (rt->rt6i_flags & RTF_ANYCAST) | 70 | if (rt->rt6i_flags & RTF_ANYCAST) |
| 50 | ret |= XT_ADDRTYPE_ANYCAST; | 71 | ret |= XT_ADDRTYPE_ANYCAST; |
| 72 | |||
| 73 | |||
| 74 | dst_release(&rt->dst); | ||
| 51 | return ret; | 75 | return ret; |
| 52 | } | 76 | } |
| 53 | 77 | ||
| @@ -65,18 +89,8 @@ static bool match_type6(struct net *net, const struct net_device *dev, | |||
| 65 | return false; | 89 | return false; |
| 66 | 90 | ||
| 67 | if ((XT_ADDRTYPE_LOCAL | XT_ADDRTYPE_ANYCAST | | 91 | if ((XT_ADDRTYPE_LOCAL | XT_ADDRTYPE_ANYCAST | |
| 68 | XT_ADDRTYPE_UNREACHABLE) & mask) { | 92 | XT_ADDRTYPE_UNREACHABLE) & mask) |
| 69 | struct rt6_info *rt; | 93 | return !!(mask & match_lookup_rt6(net, dev, addr)); |
| 70 | u32 type; | ||
| 71 | int ifindex = dev ? dev->ifindex : 0; | ||
| 72 | |||
| 73 | rt = rt6_lookup(net, addr, NULL, ifindex, !!dev); | ||
| 74 | |||
| 75 | type = xt_addrtype_rt6_to_type(rt); | ||
| 76 | |||
| 77 | dst_release(&rt->dst); | ||
| 78 | return !!(mask & type); | ||
| 79 | } | ||
| 80 | return true; | 94 | return true; |
| 81 | } | 95 | } |
| 82 | 96 | ||
diff --git a/net/netfilter/xt_conntrack.c b/net/netfilter/xt_conntrack.c index 2c0086a4751e..481a86fdc409 100644 --- a/net/netfilter/xt_conntrack.c +++ b/net/netfilter/xt_conntrack.c | |||
| @@ -195,7 +195,7 @@ conntrack_mt(const struct sk_buff *skb, struct xt_action_param *par, | |||
| 195 | return info->match_flags & XT_CONNTRACK_STATE; | 195 | return info->match_flags & XT_CONNTRACK_STATE; |
| 196 | if ((info->match_flags & XT_CONNTRACK_DIRECTION) && | 196 | if ((info->match_flags & XT_CONNTRACK_DIRECTION) && |
| 197 | (CTINFO2DIR(ctinfo) == IP_CT_DIR_ORIGINAL) ^ | 197 | (CTINFO2DIR(ctinfo) == IP_CT_DIR_ORIGINAL) ^ |
| 198 | !!(info->invert_flags & XT_CONNTRACK_DIRECTION)) | 198 | !(info->invert_flags & XT_CONNTRACK_DIRECTION)) |
| 199 | return false; | 199 | return false; |
| 200 | 200 | ||
| 201 | if (info->match_flags & XT_CONNTRACK_ORIGSRC) | 201 | if (info->match_flags & XT_CONNTRACK_ORIGSRC) |
diff --git a/net/netlabel/netlabel_domainhash.c b/net/netlabel/netlabel_domainhash.c index d37b7f80fa37..de0d8e4cbfb6 100644 --- a/net/netlabel/netlabel_domainhash.c +++ b/net/netlabel/netlabel_domainhash.c | |||
| @@ -109,7 +109,7 @@ static void netlbl_domhsh_free_entry(struct rcu_head *entry) | |||
| 109 | * | 109 | * |
| 110 | * Description: | 110 | * Description: |
| 111 | * This is the hashing function for the domain hash table, it returns the | 111 | * This is the hashing function for the domain hash table, it returns the |
| 112 | * correct bucket number for the domain. The caller is responsibile for | 112 | * correct bucket number for the domain. The caller is responsible for |
| 113 | * ensuring that the hash table is protected with either a RCU read lock or the | 113 | * ensuring that the hash table is protected with either a RCU read lock or the |
| 114 | * hash table lock. | 114 | * hash table lock. |
| 115 | * | 115 | * |
| @@ -134,7 +134,7 @@ static u32 netlbl_domhsh_hash(const char *key) | |||
| 134 | * | 134 | * |
| 135 | * Description: | 135 | * Description: |
| 136 | * Searches the domain hash table and returns a pointer to the hash table | 136 | * Searches the domain hash table and returns a pointer to the hash table |
| 137 | * entry if found, otherwise NULL is returned. The caller is responsibile for | 137 | * entry if found, otherwise NULL is returned. The caller is responsible for |
| 138 | * ensuring that the hash table is protected with either a RCU read lock or the | 138 | * ensuring that the hash table is protected with either a RCU read lock or the |
| 139 | * hash table lock. | 139 | * hash table lock. |
| 140 | * | 140 | * |
| @@ -165,7 +165,7 @@ static struct netlbl_dom_map *netlbl_domhsh_search(const char *domain) | |||
| 165 | * Searches the domain hash table and returns a pointer to the hash table | 165 | * Searches the domain hash table and returns a pointer to the hash table |
| 166 | * entry if an exact match is found, if an exact match is not present in the | 166 | * entry if an exact match is found, if an exact match is not present in the |
| 167 | * hash table then the default entry is returned if valid otherwise NULL is | 167 | * hash table then the default entry is returned if valid otherwise NULL is |
| 168 | * returned. The caller is responsibile ensuring that the hash table is | 168 | * returned. The caller is responsible ensuring that the hash table is |
| 169 | * protected with either a RCU read lock or the hash table lock. | 169 | * protected with either a RCU read lock or the hash table lock. |
| 170 | * | 170 | * |
| 171 | */ | 171 | */ |
| @@ -193,7 +193,7 @@ static struct netlbl_dom_map *netlbl_domhsh_search_def(const char *domain) | |||
| 193 | * | 193 | * |
| 194 | * Description: | 194 | * Description: |
| 195 | * Generate an audit record for adding a new NetLabel/LSM mapping entry with | 195 | * Generate an audit record for adding a new NetLabel/LSM mapping entry with |
| 196 | * the given information. Caller is responsibile for holding the necessary | 196 | * the given information. Caller is responsible for holding the necessary |
| 197 | * locks. | 197 | * locks. |
| 198 | * | 198 | * |
| 199 | */ | 199 | */ |
| @@ -605,7 +605,7 @@ int netlbl_domhsh_remove_default(struct netlbl_audit *audit_info) | |||
| 605 | * | 605 | * |
| 606 | * Description: | 606 | * Description: |
| 607 | * Look through the domain hash table searching for an entry to match @domain, | 607 | * Look through the domain hash table searching for an entry to match @domain, |
| 608 | * return a pointer to a copy of the entry or NULL. The caller is responsibile | 608 | * return a pointer to a copy of the entry or NULL. The caller is responsible |
| 609 | * for ensuring that rcu_read_[un]lock() is called. | 609 | * for ensuring that rcu_read_[un]lock() is called. |
| 610 | * | 610 | * |
| 611 | */ | 611 | */ |
diff --git a/net/netlabel/netlabel_mgmt.c b/net/netlabel/netlabel_mgmt.c index 998e85e895d0..4f251b19fbcc 100644 --- a/net/netlabel/netlabel_mgmt.c +++ b/net/netlabel/netlabel_mgmt.c | |||
| @@ -259,7 +259,7 @@ add_failure: | |||
| 259 | * | 259 | * |
| 260 | * Description: | 260 | * Description: |
| 261 | * This function is a helper function used by the LISTALL and LISTDEF command | 261 | * This function is a helper function used by the LISTALL and LISTDEF command |
| 262 | * handlers. The caller is responsibile for ensuring that the RCU read lock | 262 | * handlers. The caller is responsible for ensuring that the RCU read lock |
| 263 | * is held. Returns zero on success, negative values on failure. | 263 | * is held. Returns zero on success, negative values on failure. |
| 264 | * | 264 | * |
| 265 | */ | 265 | */ |
diff --git a/net/rds/ib_send.c b/net/rds/ib_send.c index c47a511f203d..7c4dce8fa5e6 100644 --- a/net/rds/ib_send.c +++ b/net/rds/ib_send.c | |||
| @@ -355,7 +355,7 @@ void rds_ib_send_cq_comp_handler(struct ib_cq *cq, void *context) | |||
| 355 | * | 355 | * |
| 356 | * Conceptually, we have two counters: | 356 | * Conceptually, we have two counters: |
| 357 | * - send credits: this tells us how many WRs we're allowed | 357 | * - send credits: this tells us how many WRs we're allowed |
| 358 | * to submit without overruning the reciever's queue. For | 358 | * to submit without overruning the receiver's queue. For |
| 359 | * each SEND WR we post, we decrement this by one. | 359 | * each SEND WR we post, we decrement this by one. |
| 360 | * | 360 | * |
| 361 | * - posted credits: this tells us how many WRs we recently | 361 | * - posted credits: this tells us how many WRs we recently |
diff --git a/net/rds/iw_cm.c b/net/rds/iw_cm.c index 712cf2d1f28e..3a60a15d1b4a 100644 --- a/net/rds/iw_cm.c +++ b/net/rds/iw_cm.c | |||
| @@ -181,7 +181,7 @@ static int rds_iw_init_qp_attrs(struct ib_qp_init_attr *attr, | |||
| 181 | unsigned int send_size, recv_size; | 181 | unsigned int send_size, recv_size; |
| 182 | int ret; | 182 | int ret; |
| 183 | 183 | ||
| 184 | /* The offset of 1 is to accomodate the additional ACK WR. */ | 184 | /* The offset of 1 is to accommodate the additional ACK WR. */ |
| 185 | send_size = min_t(unsigned int, rds_iwdev->max_wrs, rds_iw_sysctl_max_send_wr + 1); | 185 | send_size = min_t(unsigned int, rds_iwdev->max_wrs, rds_iw_sysctl_max_send_wr + 1); |
| 186 | recv_size = min_t(unsigned int, rds_iwdev->max_wrs, rds_iw_sysctl_max_recv_wr + 1); | 186 | recv_size = min_t(unsigned int, rds_iwdev->max_wrs, rds_iw_sysctl_max_recv_wr + 1); |
| 187 | rds_iw_ring_resize(send_ring, send_size - 1); | 187 | rds_iw_ring_resize(send_ring, send_size - 1); |
diff --git a/net/rds/iw_rdma.c b/net/rds/iw_rdma.c index 59509e9a9e72..6deaa77495e3 100644 --- a/net/rds/iw_rdma.c +++ b/net/rds/iw_rdma.c | |||
| @@ -122,7 +122,7 @@ static int rds_iw_get_device(struct rds_sock *rs, struct rds_iw_device **rds_iwd | |||
| 122 | #else | 122 | #else |
| 123 | /* FIXME - needs to compare the local and remote | 123 | /* FIXME - needs to compare the local and remote |
| 124 | * ipaddr/port tuple, but the ipaddr is the only | 124 | * ipaddr/port tuple, but the ipaddr is the only |
| 125 | * available infomation in the rds_sock (as the rest are | 125 | * available information in the rds_sock (as the rest are |
| 126 | * zero'ed. It doesn't appear to be properly populated | 126 | * zero'ed. It doesn't appear to be properly populated |
| 127 | * during connection setup... | 127 | * during connection setup... |
| 128 | */ | 128 | */ |
diff --git a/net/rds/iw_send.c b/net/rds/iw_send.c index 6280ea020d4e..545d8ee3efb1 100644 --- a/net/rds/iw_send.c +++ b/net/rds/iw_send.c | |||
| @@ -307,7 +307,7 @@ void rds_iw_send_cq_comp_handler(struct ib_cq *cq, void *context) | |||
| 307 | * | 307 | * |
| 308 | * Conceptually, we have two counters: | 308 | * Conceptually, we have two counters: |
| 309 | * - send credits: this tells us how many WRs we're allowed | 309 | * - send credits: this tells us how many WRs we're allowed |
| 310 | * to submit without overruning the reciever's queue. For | 310 | * to submit without overruning the receiver's queue. For |
| 311 | * each SEND WR we post, we decrement this by one. | 311 | * each SEND WR we post, we decrement this by one. |
| 312 | * | 312 | * |
| 313 | * - posted credits: this tells us how many WRs we recently | 313 | * - posted credits: this tells us how many WRs we recently |
diff --git a/net/rds/send.c b/net/rds/send.c index 35b9c2e9caf1..d58ae5f9339e 100644 --- a/net/rds/send.c +++ b/net/rds/send.c | |||
| @@ -116,7 +116,7 @@ static void release_in_xmit(struct rds_connection *conn) | |||
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | /* | 118 | /* |
| 119 | * We're making the concious trade-off here to only send one message | 119 | * We're making the conscious trade-off here to only send one message |
| 120 | * down the connection at a time. | 120 | * down the connection at a time. |
| 121 | * Pro: | 121 | * Pro: |
| 122 | * - tx queueing is a simple fifo list | 122 | * - tx queueing is a simple fifo list |
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c index 08dcd2f29cdc..479cae57d187 100644 --- a/net/rose/rose_route.c +++ b/net/rose/rose_route.c | |||
| @@ -587,7 +587,7 @@ static int rose_clear_routes(void) | |||
| 587 | 587 | ||
| 588 | /* | 588 | /* |
| 589 | * Check that the device given is a valid AX.25 interface that is "up". | 589 | * Check that the device given is a valid AX.25 interface that is "up". |
| 590 | * called whith RTNL | 590 | * called with RTNL |
| 591 | */ | 591 | */ |
| 592 | static struct net_device *rose_ax25_dev_find(char *devname) | 592 | static struct net_device *rose_ax25_dev_find(char *devname) |
| 593 | { | 593 | { |
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 15873e14cb54..14b42f4ad791 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c | |||
| @@ -999,7 +999,7 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, void *arg) | |||
| 999 | switch (n->nlmsg_type) { | 999 | switch (n->nlmsg_type) { |
| 1000 | case RTM_NEWACTION: | 1000 | case RTM_NEWACTION: |
| 1001 | /* we are going to assume all other flags | 1001 | /* we are going to assume all other flags |
| 1002 | * imply create only if it doesnt exist | 1002 | * imply create only if it doesn't exist |
| 1003 | * Note that CREATE | EXCL implies that | 1003 | * Note that CREATE | EXCL implies that |
| 1004 | * but since we want avoid ambiguity (eg when flags | 1004 | * but since we want avoid ambiguity (eg when flags |
| 1005 | * is zero) then just set this | 1005 | * is zero) then just set this |
diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c index 50c7c06c019d..7affe9a92757 100644 --- a/net/sched/act_pedit.c +++ b/net/sched/act_pedit.c | |||
| @@ -161,7 +161,7 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a, | |||
| 161 | } | 161 | } |
| 162 | if (offset > 0 && offset > skb->len) { | 162 | if (offset > 0 && offset > skb->len) { |
| 163 | pr_info("tc filter pedit" | 163 | pr_info("tc filter pedit" |
| 164 | " offset %d cant exceed pkt length %d\n", | 164 | " offset %d can't exceed pkt length %d\n", |
| 165 | offset, skb->len); | 165 | offset, skb->len); |
| 166 | goto bad; | 166 | goto bad; |
| 167 | } | 167 | } |
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index a4de67eca824..49130e8abff0 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c | |||
| @@ -47,7 +47,7 @@ | |||
| 47 | * on the meta type. Obviously, the length of the data must also | 47 | * on the meta type. Obviously, the length of the data must also |
| 48 | * be provided for non-numeric types. | 48 | * be provided for non-numeric types. |
| 49 | * | 49 | * |
| 50 | * Additionaly, type dependant modifiers such as shift operators | 50 | * Additionally, type dependent modifiers such as shift operators |
| 51 | * or mask may be applied to extend the functionaliy. As of now, | 51 | * or mask may be applied to extend the functionaliy. As of now, |
| 52 | * the variable length type supports shifting the byte string to | 52 | * the variable length type supports shifting the byte string to |
| 53 | * the right, eating up any number of octets and thus supporting | 53 | * the right, eating up any number of octets and thus supporting |
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index e1429a85091f..29b942ce9e82 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c | |||
| @@ -183,7 +183,7 @@ static inline struct htb_class *htb_find(u32 handle, struct Qdisc *sch) | |||
| 183 | * filters in qdisc and in inner nodes (if higher filter points to the inner | 183 | * filters in qdisc and in inner nodes (if higher filter points to the inner |
| 184 | * node). If we end up with classid MAJOR:0 we enqueue the skb into special | 184 | * node). If we end up with classid MAJOR:0 we enqueue the skb into special |
| 185 | * internal fifo (direct). These packets then go directly thru. If we still | 185 | * internal fifo (direct). These packets then go directly thru. If we still |
| 186 | * have no valid leaf we try to use MAJOR:default leaf. It still unsuccessfull | 186 | * have no valid leaf we try to use MAJOR:default leaf. It still unsuccessful |
| 187 | * then finish and return direct queue. | 187 | * then finish and return direct queue. |
| 188 | */ | 188 | */ |
| 189 | #define HTB_DIRECT ((struct htb_class *)-1L) | 189 | #define HTB_DIRECT ((struct htb_class *)-1L) |
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index edbbf7ad6623..69c35f6cd13f 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
| @@ -160,7 +160,7 @@ static bool loss_4state(struct netem_sched_data *q) | |||
| 160 | u32 rnd = net_random(); | 160 | u32 rnd = net_random(); |
| 161 | 161 | ||
| 162 | /* | 162 | /* |
| 163 | * Makes a comparision between rnd and the transition | 163 | * Makes a comparison between rnd and the transition |
| 164 | * probabilities outgoing from the current state, then decides the | 164 | * probabilities outgoing from the current state, then decides the |
| 165 | * next state and if the next packet has to be transmitted or lost. | 165 | * next state and if the next packet has to be transmitted or lost. |
| 166 | * The four states correspond to: | 166 | * The four states correspond to: |
| @@ -212,9 +212,9 @@ static bool loss_4state(struct netem_sched_data *q) | |||
| 212 | * Generates losses according to the Gilbert-Elliot loss model or | 212 | * Generates losses according to the Gilbert-Elliot loss model or |
| 213 | * its special cases (Gilbert or Simple Gilbert) | 213 | * its special cases (Gilbert or Simple Gilbert) |
| 214 | * | 214 | * |
| 215 | * Makes a comparision between random number and the transition | 215 | * Makes a comparison between random number and the transition |
| 216 | * probabilities outgoing from the current state, then decides the | 216 | * probabilities outgoing from the current state, then decides the |
| 217 | * next state. A second random number is extracted and the comparision | 217 | * next state. A second random number is extracted and the comparison |
| 218 | * with the loss probability of the current state decides if the next | 218 | * with the loss probability of the current state decides if the next |
| 219 | * packet will be transmitted or lost. | 219 | * packet will be transmitted or lost. |
| 220 | */ | 220 | */ |
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 6b04287913cd..0698cad61763 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
| @@ -1593,7 +1593,7 @@ void sctp_assoc_clean_asconf_ack_cache(const struct sctp_association *asoc) | |||
| 1593 | struct sctp_chunk *ack; | 1593 | struct sctp_chunk *ack; |
| 1594 | struct sctp_chunk *tmp; | 1594 | struct sctp_chunk *tmp; |
| 1595 | 1595 | ||
| 1596 | /* We can remove all the entries from the queue upto | 1596 | /* We can remove all the entries from the queue up to |
| 1597 | * the "Peer-Sequence-Number". | 1597 | * the "Peer-Sequence-Number". |
| 1598 | */ | 1598 | */ |
| 1599 | list_for_each_entry_safe(ack, tmp, &asoc->asconf_ack_list, | 1599 | list_for_each_entry_safe(ack, tmp, &asoc->asconf_ack_list, |
diff --git a/net/sctp/auth.c b/net/sctp/auth.c index ddbbf7c81fa1..865e68fef21c 100644 --- a/net/sctp/auth.c +++ b/net/sctp/auth.c | |||
| @@ -113,7 +113,7 @@ struct sctp_shared_key *sctp_auth_shkey_create(__u16 key_id, gfp_t gfp) | |||
| 113 | return new; | 113 | return new; |
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | /* Free the shared key stucture */ | 116 | /* Free the shared key structure */ |
| 117 | static void sctp_auth_shkey_free(struct sctp_shared_key *sh_key) | 117 | static void sctp_auth_shkey_free(struct sctp_shared_key *sh_key) |
| 118 | { | 118 | { |
| 119 | BUG_ON(!list_empty(&sh_key->key_list)); | 119 | BUG_ON(!list_empty(&sh_key->key_list)); |
| @@ -122,7 +122,7 @@ static void sctp_auth_shkey_free(struct sctp_shared_key *sh_key) | |||
| 122 | kfree(sh_key); | 122 | kfree(sh_key); |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | /* Destory the entire key list. This is done during the | 125 | /* Destroy the entire key list. This is done during the |
| 126 | * associon and endpoint free process. | 126 | * associon and endpoint free process. |
| 127 | */ | 127 | */ |
| 128 | void sctp_auth_destroy_keys(struct list_head *keys) | 128 | void sctp_auth_destroy_keys(struct list_head *keys) |
| @@ -324,7 +324,7 @@ static struct sctp_auth_bytes *sctp_auth_asoc_create_secret( | |||
| 324 | if (!peer_key_vector || !local_key_vector) | 324 | if (!peer_key_vector || !local_key_vector) |
| 325 | goto out; | 325 | goto out; |
| 326 | 326 | ||
| 327 | /* Figure out the order in wich the key_vectors will be | 327 | /* Figure out the order in which the key_vectors will be |
| 328 | * added to the endpoint shared key. | 328 | * added to the endpoint shared key. |
| 329 | * SCTP-AUTH, Section 6.1: | 329 | * SCTP-AUTH, Section 6.1: |
| 330 | * This is performed by selecting the numerically smaller key | 330 | * This is performed by selecting the numerically smaller key |
diff --git a/net/sctp/input.c b/net/sctp/input.c index 826661be73e7..5436c6921167 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c | |||
| @@ -1034,7 +1034,7 @@ static struct sctp_association *__sctp_rcv_asconf_lookup( | |||
| 1034 | * association. | 1034 | * association. |
| 1035 | * | 1035 | * |
| 1036 | * This means that any chunks that can help us identify the association need | 1036 | * This means that any chunks that can help us identify the association need |
| 1037 | * to be looked at to find this assocation. | 1037 | * to be looked at to find this association. |
| 1038 | */ | 1038 | */ |
| 1039 | static struct sctp_association *__sctp_rcv_walk_lookup(struct sk_buff *skb, | 1039 | static struct sctp_association *__sctp_rcv_walk_lookup(struct sk_buff *skb, |
| 1040 | const union sctp_addr *laddr, | 1040 | const union sctp_addr *laddr, |
diff --git a/net/sctp/output.c b/net/sctp/output.c index 60600d337a3a..b4f3cf06d8da 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c | |||
| @@ -510,7 +510,7 @@ int sctp_packet_transmit(struct sctp_packet *packet) | |||
| 510 | sh->checksum = sctp_end_cksum(crc32); | 510 | sh->checksum = sctp_end_cksum(crc32); |
| 511 | } else { | 511 | } else { |
| 512 | if (dst->dev->features & NETIF_F_SCTP_CSUM) { | 512 | if (dst->dev->features & NETIF_F_SCTP_CSUM) { |
| 513 | /* no need to seed psuedo checksum for SCTP */ | 513 | /* no need to seed pseudo checksum for SCTP */ |
| 514 | nskb->ip_summed = CHECKSUM_PARTIAL; | 514 | nskb->ip_summed = CHECKSUM_PARTIAL; |
| 515 | nskb->csum_start = (skb_transport_header(nskb) - | 515 | nskb->csum_start = (skb_transport_header(nskb) - |
| 516 | nskb->head); | 516 | nskb->head); |
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 26dc005113a0..bf92a5b68f8b 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c | |||
| @@ -177,13 +177,13 @@ static inline int sctp_cacc_skip_3_2(struct sctp_transport *primary, __u32 tsn) | |||
| 177 | * 3) If the missing report count for TSN t is to be | 177 | * 3) If the missing report count for TSN t is to be |
| 178 | * incremented according to [RFC2960] and | 178 | * incremented according to [RFC2960] and |
| 179 | * [SCTP_STEWART-2002], and CHANGEOVER_ACTIVE is set, | 179 | * [SCTP_STEWART-2002], and CHANGEOVER_ACTIVE is set, |
| 180 | * then the sender MUST futher execute steps 3.1 and | 180 | * then the sender MUST further execute steps 3.1 and |
| 181 | * 3.2 to determine if the missing report count for | 181 | * 3.2 to determine if the missing report count for |
| 182 | * TSN t SHOULD NOT be incremented. | 182 | * TSN t SHOULD NOT be incremented. |
| 183 | * | 183 | * |
| 184 | * 3.3) If 3.1 and 3.2 do not dictate that the missing | 184 | * 3.3) If 3.1 and 3.2 do not dictate that the missing |
| 185 | * report count for t should not be incremented, then | 185 | * report count for t should not be incremented, then |
| 186 | * the sender SOULD increment missing report count for | 186 | * the sender SHOULD increment missing report count for |
| 187 | * t (according to [RFC2960] and [SCTP_STEWART_2002]). | 187 | * t (according to [RFC2960] and [SCTP_STEWART_2002]). |
| 188 | */ | 188 | */ |
| 189 | static inline int sctp_cacc_skip(struct sctp_transport *primary, | 189 | static inline int sctp_cacc_skip(struct sctp_transport *primary, |
| @@ -843,7 +843,7 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout) | |||
| 843 | case SCTP_CID_ECN_CWR: | 843 | case SCTP_CID_ECN_CWR: |
| 844 | case SCTP_CID_ASCONF_ACK: | 844 | case SCTP_CID_ASCONF_ACK: |
| 845 | one_packet = 1; | 845 | one_packet = 1; |
| 846 | /* Fall throught */ | 846 | /* Fall through */ |
| 847 | 847 | ||
| 848 | case SCTP_CID_SACK: | 848 | case SCTP_CID_SACK: |
| 849 | case SCTP_CID_HEARTBEAT: | 849 | case SCTP_CID_HEARTBEAT: |
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 152976ec0b74..d5bf91d04f63 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
| @@ -1205,7 +1205,7 @@ SCTP_STATIC __init int sctp_init(void) | |||
| 1205 | if ((sctp_assoc_hashsize > (64 * 1024)) && order > 0) | 1205 | if ((sctp_assoc_hashsize > (64 * 1024)) && order > 0) |
| 1206 | continue; | 1206 | continue; |
| 1207 | sctp_assoc_hashtable = (struct sctp_hashbucket *) | 1207 | sctp_assoc_hashtable = (struct sctp_hashbucket *) |
| 1208 | __get_free_pages(GFP_ATOMIC, order); | 1208 | __get_free_pages(GFP_ATOMIC|__GFP_NOWARN, order); |
| 1209 | } while (!sctp_assoc_hashtable && --order > 0); | 1209 | } while (!sctp_assoc_hashtable && --order > 0); |
| 1210 | if (!sctp_assoc_hashtable) { | 1210 | if (!sctp_assoc_hashtable) { |
| 1211 | pr_err("Failed association hash alloc\n"); | 1211 | pr_err("Failed association hash alloc\n"); |
| @@ -1238,7 +1238,7 @@ SCTP_STATIC __init int sctp_init(void) | |||
| 1238 | if ((sctp_port_hashsize > (64 * 1024)) && order > 0) | 1238 | if ((sctp_port_hashsize > (64 * 1024)) && order > 0) |
| 1239 | continue; | 1239 | continue; |
| 1240 | sctp_port_hashtable = (struct sctp_bind_hashbucket *) | 1240 | sctp_port_hashtable = (struct sctp_bind_hashbucket *) |
| 1241 | __get_free_pages(GFP_ATOMIC, order); | 1241 | __get_free_pages(GFP_ATOMIC|__GFP_NOWARN, order); |
| 1242 | } while (!sctp_port_hashtable && --order > 0); | 1242 | } while (!sctp_port_hashtable && --order > 0); |
| 1243 | if (!sctp_port_hashtable) { | 1243 | if (!sctp_port_hashtable) { |
| 1244 | pr_err("Failed bind hash alloc\n"); | 1244 | pr_err("Failed bind hash alloc\n"); |
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index de98665db524..b3434cc7d0cf 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
| @@ -3106,10 +3106,10 @@ struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc, | |||
| 3106 | 3106 | ||
| 3107 | /* create an ASCONF_ACK chunk. | 3107 | /* create an ASCONF_ACK chunk. |
| 3108 | * Based on the definitions of parameters, we know that the size of | 3108 | * Based on the definitions of parameters, we know that the size of |
| 3109 | * ASCONF_ACK parameters are less than or equal to the twice of ASCONF | 3109 | * ASCONF_ACK parameters are less than or equal to the fourfold of ASCONF |
| 3110 | * parameters. | 3110 | * parameters. |
| 3111 | */ | 3111 | */ |
| 3112 | asconf_ack = sctp_make_asconf_ack(asoc, serial, chunk_len * 2); | 3112 | asconf_ack = sctp_make_asconf_ack(asoc, serial, chunk_len * 4); |
| 3113 | if (!asconf_ack) | 3113 | if (!asconf_ack) |
| 3114 | goto done; | 3114 | goto done; |
| 3115 | 3115 | ||
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index b21b218d564f..5f86ee4b54c1 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c | |||
| @@ -482,7 +482,7 @@ static void sctp_do_8_2_transport_strike(struct sctp_association *asoc, | |||
| 482 | * If the timer was a heartbeat, we only increment error counts | 482 | * If the timer was a heartbeat, we only increment error counts |
| 483 | * when we already have an outstanding HEARTBEAT that has not | 483 | * when we already have an outstanding HEARTBEAT that has not |
| 484 | * been acknowledged. | 484 | * been acknowledged. |
| 485 | * Additionaly, some tranport states inhibit error increments. | 485 | * Additionally, some tranport states inhibit error increments. |
| 486 | */ | 486 | */ |
| 487 | if (!is_hb) { | 487 | if (!is_hb) { |
| 488 | asoc->overall_error_count++; | 488 | asoc->overall_error_count++; |
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 4b4eb7c96bbd..76792083c379 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
| @@ -551,7 +551,7 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(const struct sctp_endpoint *ep, | |||
| 551 | * | 551 | * |
| 552 | * This means that if we only want to abort associations | 552 | * This means that if we only want to abort associations |
| 553 | * in an authenticated way (i.e AUTH+ABORT), then we | 553 | * in an authenticated way (i.e AUTH+ABORT), then we |
| 554 | * can't destroy this association just becuase the packet | 554 | * can't destroy this association just because the packet |
| 555 | * was malformed. | 555 | * was malformed. |
| 556 | */ | 556 | */ |
| 557 | if (sctp_auth_recv_cid(SCTP_CID_ABORT, asoc)) | 557 | if (sctp_auth_recv_cid(SCTP_CID_ABORT, asoc)) |
| @@ -1546,7 +1546,7 @@ cleanup: | |||
| 1546 | } | 1546 | } |
| 1547 | 1547 | ||
| 1548 | /* | 1548 | /* |
| 1549 | * Handle simultanous INIT. | 1549 | * Handle simultaneous INIT. |
| 1550 | * This means we started an INIT and then we got an INIT request from | 1550 | * This means we started an INIT and then we got an INIT request from |
| 1551 | * our peer. | 1551 | * our peer. |
| 1552 | * | 1552 | * |
| @@ -2079,7 +2079,7 @@ sctp_disposition_t sctp_sf_shutdown_pending_abort( | |||
| 2079 | * RFC 2960, Section 3.3.7 | 2079 | * RFC 2960, Section 3.3.7 |
| 2080 | * If an endpoint receives an ABORT with a format error or for an | 2080 | * If an endpoint receives an ABORT with a format error or for an |
| 2081 | * association that doesn't exist, it MUST silently discard it. | 2081 | * association that doesn't exist, it MUST silently discard it. |
| 2082 | * Becasue the length is "invalid", we can't really discard just | 2082 | * Because the length is "invalid", we can't really discard just |
| 2083 | * as we do not know its true length. So, to be safe, discard the | 2083 | * as we do not know its true length. So, to be safe, discard the |
| 2084 | * packet. | 2084 | * packet. |
| 2085 | */ | 2085 | */ |
| @@ -2120,7 +2120,7 @@ sctp_disposition_t sctp_sf_shutdown_sent_abort(const struct sctp_endpoint *ep, | |||
| 2120 | * RFC 2960, Section 3.3.7 | 2120 | * RFC 2960, Section 3.3.7 |
| 2121 | * If an endpoint receives an ABORT with a format error or for an | 2121 | * If an endpoint receives an ABORT with a format error or for an |
| 2122 | * association that doesn't exist, it MUST silently discard it. | 2122 | * association that doesn't exist, it MUST silently discard it. |
| 2123 | * Becasue the length is "invalid", we can't really discard just | 2123 | * Because the length is "invalid", we can't really discard just |
| 2124 | * as we do not know its true length. So, to be safe, discard the | 2124 | * as we do not know its true length. So, to be safe, discard the |
| 2125 | * packet. | 2125 | * packet. |
| 2126 | */ | 2126 | */ |
| @@ -2381,7 +2381,7 @@ sctp_disposition_t sctp_sf_do_9_1_abort(const struct sctp_endpoint *ep, | |||
| 2381 | * RFC 2960, Section 3.3.7 | 2381 | * RFC 2960, Section 3.3.7 |
| 2382 | * If an endpoint receives an ABORT with a format error or for an | 2382 | * If an endpoint receives an ABORT with a format error or for an |
| 2383 | * association that doesn't exist, it MUST silently discard it. | 2383 | * association that doesn't exist, it MUST silently discard it. |
| 2384 | * Becasue the length is "invalid", we can't really discard just | 2384 | * Because the length is "invalid", we can't really discard just |
| 2385 | * as we do not know its true length. So, to be safe, discard the | 2385 | * as we do not know its true length. So, to be safe, discard the |
| 2386 | * packet. | 2386 | * packet. |
| 2387 | */ | 2387 | */ |
| @@ -2448,7 +2448,7 @@ sctp_disposition_t sctp_sf_cookie_wait_abort(const struct sctp_endpoint *ep, | |||
| 2448 | * RFC 2960, Section 3.3.7 | 2448 | * RFC 2960, Section 3.3.7 |
| 2449 | * If an endpoint receives an ABORT with a format error or for an | 2449 | * If an endpoint receives an ABORT with a format error or for an |
| 2450 | * association that doesn't exist, it MUST silently discard it. | 2450 | * association that doesn't exist, it MUST silently discard it. |
| 2451 | * Becasue the length is "invalid", we can't really discard just | 2451 | * Because the length is "invalid", we can't really discard just |
| 2452 | * as we do not know its true length. So, to be safe, discard the | 2452 | * as we do not know its true length. So, to be safe, discard the |
| 2453 | * packet. | 2453 | * packet. |
| 2454 | */ | 2454 | */ |
| @@ -3855,7 +3855,7 @@ gen_shutdown: | |||
| 3855 | } | 3855 | } |
| 3856 | 3856 | ||
| 3857 | /* | 3857 | /* |
| 3858 | * SCTP-AUTH Section 6.3 Receving authenticated chukns | 3858 | * SCTP-AUTH Section 6.3 Receiving authenticated chukns |
| 3859 | * | 3859 | * |
| 3860 | * The receiver MUST use the HMAC algorithm indicated in the HMAC | 3860 | * The receiver MUST use the HMAC algorithm indicated in the HMAC |
| 3861 | * Identifier field. If this algorithm was not specified by the | 3861 | * Identifier field. If this algorithm was not specified by the |
| @@ -4231,7 +4231,7 @@ static sctp_disposition_t sctp_sf_abort_violation( | |||
| 4231 | * | 4231 | * |
| 4232 | * This means that if we only want to abort associations | 4232 | * This means that if we only want to abort associations |
| 4233 | * in an authenticated way (i.e AUTH+ABORT), then we | 4233 | * in an authenticated way (i.e AUTH+ABORT), then we |
| 4234 | * can't destroy this association just becuase the packet | 4234 | * can't destroy this association just because the packet |
| 4235 | * was malformed. | 4235 | * was malformed. |
| 4236 | */ | 4236 | */ |
| 4237 | if (sctp_auth_recv_cid(SCTP_CID_ABORT, asoc)) | 4237 | if (sctp_auth_recv_cid(SCTP_CID_ABORT, asoc)) |
| @@ -4402,9 +4402,9 @@ static sctp_disposition_t sctp_sf_violation_ctsn( | |||
| 4402 | } | 4402 | } |
| 4403 | 4403 | ||
| 4404 | /* Handle protocol violation of an invalid chunk bundling. For example, | 4404 | /* Handle protocol violation of an invalid chunk bundling. For example, |
| 4405 | * when we have an association and we recieve bundled INIT-ACK, or | 4405 | * when we have an association and we receive bundled INIT-ACK, or |
| 4406 | * SHUDOWN-COMPLETE, our peer is clearly violationg the "MUST NOT bundle" | 4406 | * SHUDOWN-COMPLETE, our peer is clearly violationg the "MUST NOT bundle" |
| 4407 | * statement from the specs. Additinally, there might be an attacker | 4407 | * statement from the specs. Additionally, there might be an attacker |
| 4408 | * on the path and we may not want to continue this communication. | 4408 | * on the path and we may not want to continue this communication. |
| 4409 | */ | 4409 | */ |
| 4410 | static sctp_disposition_t sctp_sf_violation_chunk( | 4410 | static sctp_disposition_t sctp_sf_violation_chunk( |
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 3951a10605bc..deb82e35a107 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
| @@ -1193,7 +1193,7 @@ out_free: | |||
| 1193 | * an endpoint that is multi-homed. Much like sctp_bindx() this call | 1193 | * an endpoint that is multi-homed. Much like sctp_bindx() this call |
| 1194 | * allows a caller to specify multiple addresses at which a peer can be | 1194 | * allows a caller to specify multiple addresses at which a peer can be |
| 1195 | * reached. The way the SCTP stack uses the list of addresses to set up | 1195 | * reached. The way the SCTP stack uses the list of addresses to set up |
| 1196 | * the association is implementation dependant. This function only | 1196 | * the association is implementation dependent. This function only |
| 1197 | * specifies that the stack will try to make use of all the addresses in | 1197 | * specifies that the stack will try to make use of all the addresses in |
| 1198 | * the list when needed. | 1198 | * the list when needed. |
| 1199 | * | 1199 | * |
diff --git a/net/sctp/ulpevent.c b/net/sctp/ulpevent.c index aa72e89c3ee1..dff27d5e22fd 100644 --- a/net/sctp/ulpevent.c +++ b/net/sctp/ulpevent.c | |||
| @@ -554,7 +554,7 @@ struct sctp_ulpevent *sctp_ulpevent_make_send_failed( | |||
| 554 | memcpy(&ssf->ssf_info, &chunk->sinfo, sizeof(struct sctp_sndrcvinfo)); | 554 | memcpy(&ssf->ssf_info, &chunk->sinfo, sizeof(struct sctp_sndrcvinfo)); |
| 555 | 555 | ||
| 556 | /* Per TSVWG discussion with Randy. Allow the application to | 556 | /* Per TSVWG discussion with Randy. Allow the application to |
| 557 | * ressemble a fragmented message. | 557 | * resemble a fragmented message. |
| 558 | */ | 558 | */ |
| 559 | ssf->ssf_info.sinfo_flags = chunk->chunk_hdr->flags; | 559 | ssf->ssf_info.sinfo_flags = chunk->chunk_hdr->flags; |
| 560 | 560 | ||
diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c index 17678189d054..f2d1de7f2ffb 100644 --- a/net/sctp/ulpqueue.c +++ b/net/sctp/ulpqueue.c | |||
| @@ -240,7 +240,7 @@ int sctp_ulpq_tail_event(struct sctp_ulpq *ulpq, struct sctp_ulpevent *event) | |||
| 240 | } else { | 240 | } else { |
| 241 | /* | 241 | /* |
| 242 | * If fragment interleave is enabled, we | 242 | * If fragment interleave is enabled, we |
| 243 | * can queue this to the recieve queue instead | 243 | * can queue this to the receive queue instead |
| 244 | * of the lobby. | 244 | * of the lobby. |
| 245 | */ | 245 | */ |
| 246 | if (sctp_sk(sk)->frag_interleave) | 246 | if (sctp_sk(sk)->frag_interleave) |
diff --git a/net/socket.c b/net/socket.c index 5212447c86e7..310d16b1b3c9 100644 --- a/net/socket.c +++ b/net/socket.c | |||
| @@ -2986,7 +2986,7 @@ out: | |||
| 2986 | 2986 | ||
| 2987 | /* Since old style bridge ioctl's endup using SIOCDEVPRIVATE | 2987 | /* Since old style bridge ioctl's endup using SIOCDEVPRIVATE |
| 2988 | * for some operations; this forces use of the newer bridge-utils that | 2988 | * for some operations; this forces use of the newer bridge-utils that |
| 2989 | * use compatiable ioctls | 2989 | * use compatible ioctls |
| 2990 | */ | 2990 | */ |
| 2991 | static int old_bridge_ioctl(compat_ulong_t __user *argp) | 2991 | static int old_bridge_ioctl(compat_ulong_t __user *argp) |
| 2992 | { | 2992 | { |
diff --git a/net/sunrpc/auth_gss/gss_krb5_mech.c b/net/sunrpc/auth_gss/gss_krb5_mech.c index 9022f0a6503e..0a9a2ec2e469 100644 --- a/net/sunrpc/auth_gss/gss_krb5_mech.c +++ b/net/sunrpc/auth_gss/gss_krb5_mech.c | |||
| @@ -427,7 +427,7 @@ static int | |||
| 427 | context_derive_keys_rc4(struct krb5_ctx *ctx) | 427 | context_derive_keys_rc4(struct krb5_ctx *ctx) |
| 428 | { | 428 | { |
| 429 | struct crypto_hash *hmac; | 429 | struct crypto_hash *hmac; |
| 430 | static const char sigkeyconstant[] = "signaturekey"; | 430 | char sigkeyconstant[] = "signaturekey"; |
| 431 | int slen = strlen(sigkeyconstant) + 1; /* include null terminator */ | 431 | int slen = strlen(sigkeyconstant) + 1; /* include null terminator */ |
| 432 | struct hash_desc desc; | 432 | struct hash_desc desc; |
| 433 | struct scatterlist sg[1]; | 433 | struct scatterlist sg[1]; |
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index bcdae78fdfc6..8d0f7d3c71c8 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c | |||
| @@ -1101,7 +1101,7 @@ svcauth_gss_accept(struct svc_rqst *rqstp, __be32 *authp) | |||
| 1101 | 1101 | ||
| 1102 | /* credential is: | 1102 | /* credential is: |
| 1103 | * version(==1), proc(0,1,2,3), seq, service (1,2,3), handle | 1103 | * version(==1), proc(0,1,2,3), seq, service (1,2,3), handle |
| 1104 | * at least 5 u32s, and is preceeded by length, so that makes 6. | 1104 | * at least 5 u32s, and is preceded by length, so that makes 6. |
| 1105 | */ | 1105 | */ |
| 1106 | 1106 | ||
| 1107 | if (argv->iov_len < 5 * 4) | 1107 | if (argv->iov_len < 5 * 4) |
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 1e336a06d3e6..bf005d3c65ef 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
| @@ -504,7 +504,7 @@ static int xs_nospace(struct rpc_task *task) | |||
| 504 | * EAGAIN: The socket was blocked, please call again later to | 504 | * EAGAIN: The socket was blocked, please call again later to |
| 505 | * complete the request | 505 | * complete the request |
| 506 | * ENOTCONN: Caller needs to invoke connect logic then call again | 506 | * ENOTCONN: Caller needs to invoke connect logic then call again |
| 507 | * other: Some other error occured, the request was not sent | 507 | * other: Some other error occurred, the request was not sent |
| 508 | */ | 508 | */ |
| 509 | static int xs_udp_send_request(struct rpc_task *task) | 509 | static int xs_udp_send_request(struct rpc_task *task) |
| 510 | { | 510 | { |
| @@ -590,7 +590,7 @@ static inline void xs_encode_tcp_record_marker(struct xdr_buf *buf) | |||
| 590 | * EAGAIN: The socket was blocked, please call again later to | 590 | * EAGAIN: The socket was blocked, please call again later to |
| 591 | * complete the request | 591 | * complete the request |
| 592 | * ENOTCONN: Caller needs to invoke connect logic then call again | 592 | * ENOTCONN: Caller needs to invoke connect logic then call again |
| 593 | * other: Some other error occured, the request was not sent | 593 | * other: Some other error occurred, the request was not sent |
| 594 | * | 594 | * |
| 595 | * XXX: In the case of soft timeouts, should we eventually give up | 595 | * XXX: In the case of soft timeouts, should we eventually give up |
| 596 | * if sendmsg is not able to make progress? | 596 | * if sendmsg is not able to make progress? |
diff --git a/net/tipc/link.c b/net/tipc/link.c index 43639ff1cbec..ebf338f7b14e 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
| @@ -2471,7 +2471,7 @@ exit: | |||
| 2471 | * A pending message being re-assembled must store certain values | 2471 | * A pending message being re-assembled must store certain values |
| 2472 | * to handle subsequent fragments correctly. The following functions | 2472 | * to handle subsequent fragments correctly. The following functions |
| 2473 | * help storing these values in unused, available fields in the | 2473 | * help storing these values in unused, available fields in the |
| 2474 | * pending message. This makes dynamic memory allocation unecessary. | 2474 | * pending message. This makes dynamic memory allocation unnecessary. |
| 2475 | */ | 2475 | */ |
| 2476 | 2476 | ||
| 2477 | static void set_long_msg_seqno(struct sk_buff *buf, u32 seqno) | 2477 | static void set_long_msg_seqno(struct sk_buff *buf, u32 seqno) |
diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c index c9fa6dfcf287..80025a1b3bfd 100644 --- a/net/tipc/name_distr.c +++ b/net/tipc/name_distr.c | |||
| @@ -160,7 +160,7 @@ void tipc_named_withdraw(struct publication *publ) | |||
| 160 | 160 | ||
| 161 | buf = named_prepare_buf(WITHDRAWAL, ITEM_SIZE, 0); | 161 | buf = named_prepare_buf(WITHDRAWAL, ITEM_SIZE, 0); |
| 162 | if (!buf) { | 162 | if (!buf) { |
| 163 | warn("Withdrawl distribution failure\n"); | 163 | warn("Withdrawal distribution failure\n"); |
| 164 | return; | 164 | return; |
| 165 | } | 165 | } |
| 166 | 166 | ||
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 1663e1a2efdd..3a43a8304768 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
| @@ -207,7 +207,7 @@ static int unix_mkname(struct sockaddr_un *sunaddr, int len, unsigned *hashp) | |||
| 207 | /* | 207 | /* |
| 208 | * This may look like an off by one error but it is a bit more | 208 | * This may look like an off by one error but it is a bit more |
| 209 | * subtle. 108 is the longest valid AF_UNIX path for a binding. | 209 | * subtle. 108 is the longest valid AF_UNIX path for a binding. |
| 210 | * sun_path[108] doesnt as such exist. However in kernel space | 210 | * sun_path[108] doesn't as such exist. However in kernel space |
| 211 | * we are guaranteed that it is a valid memory location in our | 211 | * we are guaranteed that it is a valid memory location in our |
| 212 | * kernel address buffer. | 212 | * kernel address buffer. |
| 213 | */ | 213 | */ |
diff --git a/net/wanrouter/wanproc.c b/net/wanrouter/wanproc.c index 11f25c7a7a05..f346395314ba 100644 --- a/net/wanrouter/wanproc.c +++ b/net/wanrouter/wanproc.c | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | 51 | ||
| 52 | /* | 52 | /* |
| 53 | * Structures for interfacing with the /proc filesystem. | 53 | * Structures for interfacing with the /proc filesystem. |
| 54 | * Router creates its own directory /proc/net/router with the folowing | 54 | * Router creates its own directory /proc/net/router with the following |
| 55 | * entries: | 55 | * entries: |
| 56 | * config device configuration | 56 | * config device configuration |
| 57 | * status global device statistics | 57 | * status global device statistics |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 3332d5bce317..ab801a1097b2 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
| @@ -809,7 +809,7 @@ static void handle_channel(struct wiphy *wiphy, | |||
| 809 | if (r) { | 809 | if (r) { |
| 810 | /* | 810 | /* |
| 811 | * We will disable all channels that do not match our | 811 | * We will disable all channels that do not match our |
| 812 | * recieved regulatory rule unless the hint is coming | 812 | * received regulatory rule unless the hint is coming |
| 813 | * from a Country IE and the Country IE had no information | 813 | * from a Country IE and the Country IE had no information |
| 814 | * about a band. The IEEE 802.11 spec allows for an AP | 814 | * about a band. The IEEE 802.11 spec allows for an AP |
| 815 | * to send only a subset of the regulatory rules allowed, | 815 | * to send only a subset of the regulatory rules allowed, |
| @@ -838,7 +838,7 @@ static void handle_channel(struct wiphy *wiphy, | |||
| 838 | request_wiphy && request_wiphy == wiphy && | 838 | request_wiphy && request_wiphy == wiphy && |
| 839 | request_wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY) { | 839 | request_wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY) { |
| 840 | /* | 840 | /* |
| 841 | * This gaurantees the driver's requested regulatory domain | 841 | * This guarantees the driver's requested regulatory domain |
| 842 | * will always be used as a base for further regulatory | 842 | * will always be used as a base for further regulatory |
| 843 | * settings | 843 | * settings |
| 844 | */ | 844 | */ |
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index ea427f418f64..fbf6f33ae4d0 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c | |||
| @@ -124,6 +124,15 @@ void cfg80211_bss_age(struct cfg80211_registered_device *dev, | |||
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | /* must hold dev->bss_lock! */ | 126 | /* must hold dev->bss_lock! */ |
| 127 | static void __cfg80211_unlink_bss(struct cfg80211_registered_device *dev, | ||
| 128 | struct cfg80211_internal_bss *bss) | ||
| 129 | { | ||
| 130 | list_del_init(&bss->list); | ||
| 131 | rb_erase(&bss->rbn, &dev->bss_tree); | ||
| 132 | kref_put(&bss->ref, bss_release); | ||
| 133 | } | ||
| 134 | |||
| 135 | /* must hold dev->bss_lock! */ | ||
| 127 | void cfg80211_bss_expire(struct cfg80211_registered_device *dev) | 136 | void cfg80211_bss_expire(struct cfg80211_registered_device *dev) |
| 128 | { | 137 | { |
| 129 | struct cfg80211_internal_bss *bss, *tmp; | 138 | struct cfg80211_internal_bss *bss, *tmp; |
| @@ -134,9 +143,7 @@ void cfg80211_bss_expire(struct cfg80211_registered_device *dev) | |||
| 134 | continue; | 143 | continue; |
| 135 | if (!time_after(jiffies, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE)) | 144 | if (!time_after(jiffies, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE)) |
| 136 | continue; | 145 | continue; |
| 137 | list_del(&bss->list); | 146 | __cfg80211_unlink_bss(dev, bss); |
| 138 | rb_erase(&bss->rbn, &dev->bss_tree); | ||
| 139 | kref_put(&bss->ref, bss_release); | ||
| 140 | expired = true; | 147 | expired = true; |
| 141 | } | 148 | } |
| 142 | 149 | ||
| @@ -585,16 +592,23 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy, | |||
| 585 | struct cfg80211_internal_bss *res; | 592 | struct cfg80211_internal_bss *res; |
| 586 | size_t ielen = len - offsetof(struct ieee80211_mgmt, | 593 | size_t ielen = len - offsetof(struct ieee80211_mgmt, |
| 587 | u.probe_resp.variable); | 594 | u.probe_resp.variable); |
| 588 | size_t privsz = wiphy->bss_priv_size; | 595 | size_t privsz; |
| 596 | |||
| 597 | if (WARN_ON(!mgmt)) | ||
| 598 | return NULL; | ||
| 599 | |||
| 600 | if (WARN_ON(!wiphy)) | ||
| 601 | return NULL; | ||
| 589 | 602 | ||
| 590 | if (WARN_ON(wiphy->signal_type == CFG80211_SIGNAL_TYPE_UNSPEC && | 603 | if (WARN_ON(wiphy->signal_type == CFG80211_SIGNAL_TYPE_UNSPEC && |
| 591 | (signal < 0 || signal > 100))) | 604 | (signal < 0 || signal > 100))) |
| 592 | return NULL; | 605 | return NULL; |
| 593 | 606 | ||
| 594 | if (WARN_ON(!mgmt || !wiphy || | 607 | if (WARN_ON(len < offsetof(struct ieee80211_mgmt, u.probe_resp.variable))) |
| 595 | len < offsetof(struct ieee80211_mgmt, u.probe_resp.variable))) | ||
| 596 | return NULL; | 608 | return NULL; |
| 597 | 609 | ||
| 610 | privsz = wiphy->bss_priv_size; | ||
| 611 | |||
| 598 | res = kzalloc(sizeof(*res) + privsz + ielen, gfp); | 612 | res = kzalloc(sizeof(*res) + privsz + ielen, gfp); |
| 599 | if (!res) | 613 | if (!res) |
| 600 | return NULL; | 614 | return NULL; |
| @@ -662,11 +676,8 @@ void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *pub) | |||
| 662 | 676 | ||
| 663 | spin_lock_bh(&dev->bss_lock); | 677 | spin_lock_bh(&dev->bss_lock); |
| 664 | if (!list_empty(&bss->list)) { | 678 | if (!list_empty(&bss->list)) { |
| 665 | list_del_init(&bss->list); | 679 | __cfg80211_unlink_bss(dev, bss); |
| 666 | dev->bss_generation++; | 680 | dev->bss_generation++; |
| 667 | rb_erase(&bss->rbn, &dev->bss_tree); | ||
| 668 | |||
| 669 | kref_put(&bss->ref, bss_release); | ||
| 670 | } | 681 | } |
| 671 | spin_unlock_bh(&dev->bss_lock); | 682 | spin_unlock_bh(&dev->bss_lock); |
| 672 | } | 683 | } |
diff --git a/net/x25/x25_facilities.c b/net/x25/x25_facilities.c index 406207515b5e..f77e4e75f914 100644 --- a/net/x25/x25_facilities.c +++ b/net/x25/x25_facilities.c | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | * x25_parse_facilities - Parse facilities from skb into the facilities structs | 31 | * x25_parse_facilities - Parse facilities from skb into the facilities structs |
| 32 | * | 32 | * |
| 33 | * @skb: sk_buff to parse | 33 | * @skb: sk_buff to parse |
| 34 | * @facilities: Regular facilites, updated as facilities are found | 34 | * @facilities: Regular facilities, updated as facilities are found |
| 35 | * @dte_facs: ITU DTE facilities, updated as DTE facilities are found | 35 | * @dte_facs: ITU DTE facilities, updated as DTE facilities are found |
| 36 | * @vc_fac_mask: mask is updated with all facilities found | 36 | * @vc_fac_mask: mask is updated with all facilities found |
| 37 | * | 37 | * |
diff --git a/net/x25/x25_forward.c b/net/x25/x25_forward.c index 25a810793968..c541b622ae16 100644 --- a/net/x25/x25_forward.c +++ b/net/x25/x25_forward.c | |||
| @@ -31,7 +31,7 @@ int x25_forward_call(struct x25_address *dest_addr, struct x25_neigh *from, | |||
| 31 | goto out_no_route; | 31 | goto out_no_route; |
| 32 | 32 | ||
| 33 | if ((neigh_new = x25_get_neigh(rt->dev)) == NULL) { | 33 | if ((neigh_new = x25_get_neigh(rt->dev)) == NULL) { |
| 34 | /* This shouldnt happen, if it occurs somehow | 34 | /* This shouldn't happen, if it occurs somehow |
| 35 | * do something sensible | 35 | * do something sensible |
| 36 | */ | 36 | */ |
| 37 | goto out_put_route; | 37 | goto out_put_route; |
| @@ -45,7 +45,7 @@ int x25_forward_call(struct x25_address *dest_addr, struct x25_neigh *from, | |||
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | /* Remote end sending a call request on an already | 47 | /* Remote end sending a call request on an already |
| 48 | * established LCI? It shouldnt happen, just in case.. | 48 | * established LCI? It shouldn't happen, just in case.. |
| 49 | */ | 49 | */ |
| 50 | read_lock_bh(&x25_forward_list_lock); | 50 | read_lock_bh(&x25_forward_list_lock); |
| 51 | list_for_each(entry, &x25_forward_list) { | 51 | list_for_each(entry, &x25_forward_list) { |
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 3d15d3e1b2c4..5d1d60d3ca83 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
| @@ -894,7 +894,7 @@ static int build_spdinfo(struct sk_buff *skb, struct net *net, | |||
| 894 | u32 *f; | 894 | u32 *f; |
| 895 | 895 | ||
| 896 | nlh = nlmsg_put(skb, pid, seq, XFRM_MSG_NEWSPDINFO, sizeof(u32), 0); | 896 | nlh = nlmsg_put(skb, pid, seq, XFRM_MSG_NEWSPDINFO, sizeof(u32), 0); |
| 897 | if (nlh == NULL) /* shouldnt really happen ... */ | 897 | if (nlh == NULL) /* shouldn't really happen ... */ |
| 898 | return -EMSGSIZE; | 898 | return -EMSGSIZE; |
| 899 | 899 | ||
| 900 | f = nlmsg_data(nlh); | 900 | f = nlmsg_data(nlh); |
| @@ -954,7 +954,7 @@ static int build_sadinfo(struct sk_buff *skb, struct net *net, | |||
| 954 | u32 *f; | 954 | u32 *f; |
| 955 | 955 | ||
| 956 | nlh = nlmsg_put(skb, pid, seq, XFRM_MSG_NEWSADINFO, sizeof(u32), 0); | 956 | nlh = nlmsg_put(skb, pid, seq, XFRM_MSG_NEWSADINFO, sizeof(u32), 0); |
| 957 | if (nlh == NULL) /* shouldnt really happen ... */ | 957 | if (nlh == NULL) /* shouldn't really happen ... */ |
| 958 | return -EMSGSIZE; | 958 | return -EMSGSIZE; |
| 959 | 959 | ||
| 960 | f = nlmsg_data(nlh); | 960 | f = nlmsg_data(nlh); |
| @@ -1361,7 +1361,7 @@ static int xfrm_add_policy(struct sk_buff *skb, struct nlmsghdr *nlh, | |||
| 1361 | if (!xp) | 1361 | if (!xp) |
| 1362 | return err; | 1362 | return err; |
| 1363 | 1363 | ||
| 1364 | /* shouldnt excl be based on nlh flags?? | 1364 | /* shouldn't excl be based on nlh flags?? |
| 1365 | * Aha! this is anti-netlink really i.e more pfkey derived | 1365 | * Aha! this is anti-netlink really i.e more pfkey derived |
| 1366 | * in netlink excl is a flag and you wouldnt need | 1366 | * in netlink excl is a flag and you wouldnt need |
| 1367 | * a type XFRM_MSG_UPDPOLICY - JHS */ | 1367 | * a type XFRM_MSG_UPDPOLICY - JHS */ |
diff --git a/samples/Kconfig b/samples/Kconfig index e03cf0e374d7..41063e7592d2 100644 --- a/samples/Kconfig +++ b/samples/Kconfig | |||
| @@ -55,7 +55,7 @@ config SAMPLE_KFIFO | |||
| 55 | If in doubt, say "N" here. | 55 | If in doubt, say "N" here. |
| 56 | 56 | ||
| 57 | config SAMPLE_KDB | 57 | config SAMPLE_KDB |
| 58 | tristate "Build kdb command exmaple -- loadable modules only" | 58 | tristate "Build kdb command example -- loadable modules only" |
| 59 | depends on KGDB_KDB && m | 59 | depends on KGDB_KDB && m |
| 60 | help | 60 | help |
| 61 | Build an example of how to dynamically add the hello | 61 | Build an example of how to dynamically add the hello |
diff --git a/samples/hw_breakpoint/data_breakpoint.c b/samples/hw_breakpoint/data_breakpoint.c index bd0f337afcab..063653955f9f 100644 --- a/samples/hw_breakpoint/data_breakpoint.c +++ b/samples/hw_breakpoint/data_breakpoint.c | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | * | 19 | * |
| 20 | * This file is a kernel module that places a breakpoint over ksym_name kernel | 20 | * This file is a kernel module that places a breakpoint over ksym_name kernel |
| 21 | * variable using Hardware Breakpoint register. The corresponding handler which | 21 | * variable using Hardware Breakpoint register. The corresponding handler which |
| 22 | * prints a backtrace is invoked everytime a write operation is performed on | 22 | * prints a backtrace is invoked every time a write operation is performed on |
| 23 | * that variable. | 23 | * that variable. |
| 24 | * | 24 | * |
| 25 | * Copyright (C) IBM Corporation, 2009 | 25 | * Copyright (C) IBM Corporation, 2009 |
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 7d22056582c1..56dfafc73c1a 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost | |||
| @@ -35,14 +35,14 @@ | |||
| 35 | # KBUILD_MODPOST_WARN can be set to avoid error out in case of undefined | 35 | # KBUILD_MODPOST_WARN can be set to avoid error out in case of undefined |
| 36 | # symbols in the final module linking stage | 36 | # symbols in the final module linking stage |
| 37 | # KBUILD_MODPOST_NOFINAL can be set to skip the final link of modules. | 37 | # KBUILD_MODPOST_NOFINAL can be set to skip the final link of modules. |
| 38 | # This is solely usefull to speed up test compiles | 38 | # This is solely useful to speed up test compiles |
| 39 | PHONY := _modpost | 39 | PHONY := _modpost |
| 40 | _modpost: __modpost | 40 | _modpost: __modpost |
| 41 | 41 | ||
| 42 | include include/config/auto.conf | 42 | include include/config/auto.conf |
| 43 | include scripts/Kbuild.include | 43 | include scripts/Kbuild.include |
| 44 | 44 | ||
| 45 | # When building external modules load the Kbuild file to retreive EXTRA_SYMBOLS info | 45 | # When building external modules load the Kbuild file to retrieve EXTRA_SYMBOLS info |
| 46 | ifneq ($(KBUILD_EXTMOD),) | 46 | ifneq ($(KBUILD_EXTMOD),) |
| 47 | 47 | ||
| 48 | # set src + obj - they may be used when building the .mod.c file | 48 | # set src + obj - they may be used when building the .mod.c file |
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 8f9e394298cd..d8670810db65 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
| @@ -1946,13 +1946,13 @@ sub process { | |||
| 1946 | # printk should use KERN_* levels. Note that follow on printk's on the | 1946 | # printk should use KERN_* levels. Note that follow on printk's on the |
| 1947 | # same line do not need a level, so we use the current block context | 1947 | # same line do not need a level, so we use the current block context |
| 1948 | # to try and find and validate the current printk. In summary the current | 1948 | # to try and find and validate the current printk. In summary the current |
| 1949 | # printk includes all preceeding printk's which have no newline on the end. | 1949 | # printk includes all preceding printk's which have no newline on the end. |
| 1950 | # we assume the first bad printk is the one to report. | 1950 | # we assume the first bad printk is the one to report. |
| 1951 | if ($line =~ /\bprintk\((?!KERN_)\s*"/) { | 1951 | if ($line =~ /\bprintk\((?!KERN_)\s*"/) { |
| 1952 | my $ok = 0; | 1952 | my $ok = 0; |
| 1953 | for (my $ln = $linenr - 1; $ln >= $first_line; $ln--) { | 1953 | for (my $ln = $linenr - 1; $ln >= $first_line; $ln--) { |
| 1954 | #print "CHECK<$lines[$ln - 1]\n"; | 1954 | #print "CHECK<$lines[$ln - 1]\n"; |
| 1955 | # we have a preceeding printk if it ends | 1955 | # we have a preceding printk if it ends |
| 1956 | # with "\n" ignore it, else it is to blame | 1956 | # with "\n" ignore it, else it is to blame |
| 1957 | if ($lines[$ln - 1] =~ m{\bprintk\(}) { | 1957 | if ($lines[$ln - 1] =~ m{\bprintk\(}) { |
| 1958 | if ($rawlines[$ln - 1] !~ m{\\n"}) { | 1958 | if ($rawlines[$ln - 1] !~ m{\\n"}) { |
| @@ -2044,7 +2044,7 @@ sub process { | |||
| 2044 | for (my $n = 0; $n < $#elements; $n += 2) { | 2044 | for (my $n = 0; $n < $#elements; $n += 2) { |
| 2045 | $off += length($elements[$n]); | 2045 | $off += length($elements[$n]); |
| 2046 | 2046 | ||
| 2047 | # Pick up the preceeding and succeeding characters. | 2047 | # Pick up the preceding and succeeding characters. |
| 2048 | my $ca = substr($opline, 0, $off); | 2048 | my $ca = substr($opline, 0, $off); |
| 2049 | my $cc = ''; | 2049 | my $cc = ''; |
| 2050 | if (length($opline) >= ($off + length($elements[$n + 1]))) { | 2050 | if (length($opline) >= ($off + length($elements[$n + 1]))) { |
diff --git a/scripts/dtc/libfdt/libfdt.h b/scripts/dtc/libfdt/libfdt.h index ce80e4fb41b2..ff6246f000ce 100644 --- a/scripts/dtc/libfdt/libfdt.h +++ b/scripts/dtc/libfdt/libfdt.h | |||
| @@ -61,7 +61,7 @@ | |||
| 61 | #define FDT_ERR_NOTFOUND 1 | 61 | #define FDT_ERR_NOTFOUND 1 |
| 62 | /* FDT_ERR_NOTFOUND: The requested node or property does not exist */ | 62 | /* FDT_ERR_NOTFOUND: The requested node or property does not exist */ |
| 63 | #define FDT_ERR_EXISTS 2 | 63 | #define FDT_ERR_EXISTS 2 |
| 64 | /* FDT_ERR_EXISTS: Attemped to create a node or property which | 64 | /* FDT_ERR_EXISTS: Attempted to create a node or property which |
| 65 | * already exists */ | 65 | * already exists */ |
| 66 | #define FDT_ERR_NOSPACE 3 | 66 | #define FDT_ERR_NOSPACE 3 |
| 67 | /* FDT_ERR_NOSPACE: Operation needed to expand the device | 67 | /* FDT_ERR_NOSPACE: Operation needed to expand the device |
diff --git a/scripts/dtc/livetree.c b/scripts/dtc/livetree.c index c9209d5c999e..26d0e1e60c0c 100644 --- a/scripts/dtc/livetree.c +++ b/scripts/dtc/livetree.c | |||
| @@ -155,7 +155,7 @@ struct node *merge_nodes(struct node *old_node, struct node *new_node) | |||
| 155 | } | 155 | } |
| 156 | } | 156 | } |
| 157 | 157 | ||
| 158 | /* if no collision occured, add child to the old node. */ | 158 | /* if no collision occurred, add child to the old node. */ |
| 159 | if (new_child) | 159 | if (new_child) |
| 160 | add_child(old_node, new_child); | 160 | add_child(old_node, new_child); |
| 161 | } | 161 | } |
diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh index 55caecdad995..e12b1a7525cf 100644 --- a/scripts/gen_initramfs_list.sh +++ b/scripts/gen_initramfs_list.sh | |||
| @@ -284,7 +284,7 @@ while [ $# -gt 0 ]; do | |||
| 284 | done | 284 | done |
| 285 | 285 | ||
| 286 | # If output_file is set we will generate cpio archive and compress it | 286 | # If output_file is set we will generate cpio archive and compress it |
| 287 | # we are carefull to delete tmp files | 287 | # we are careful to delete tmp files |
| 288 | if [ ! -z ${output_file} ]; then | 288 | if [ ! -z ${output_file} ]; then |
| 289 | if [ -z ${cpio_file} ]; then | 289 | if [ -z ${cpio_file} ]; then |
| 290 | cpio_tfile="$(mktemp ${TMPDIR:-/tmp}/cpiofile.XXXXXX)" | 290 | cpio_tfile="$(mktemp ${TMPDIR:-/tmp}/cpiofile.XXXXXX)" |
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 9f85012acf0d..d793001929cf 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
| @@ -1705,7 +1705,7 @@ sub push_parameter($$$) { | |||
| 1705 | 1705 | ||
| 1706 | $param = xml_escape($param); | 1706 | $param = xml_escape($param); |
| 1707 | 1707 | ||
| 1708 | # strip spaces from $param so that it is one continous string | 1708 | # strip spaces from $param so that it is one continuous string |
| 1709 | # on @parameterlist; | 1709 | # on @parameterlist; |
| 1710 | # this fixes a problem where check_sections() cannot find | 1710 | # this fixes a problem where check_sections() cannot find |
| 1711 | # a parameter like "addr[6 + 2]" because it actually appears | 1711 | # a parameter like "addr[6 + 2]" because it actually appears |
diff --git a/scripts/package/buildtar b/scripts/package/buildtar index 83c9c04102f2..8a7b15598ea9 100644 --- a/scripts/package/buildtar +++ b/scripts/package/buildtar | |||
| @@ -92,7 +92,7 @@ case "${ARCH}" in | |||
| 92 | echo "" >&2 | 92 | echo "" >&2 |
| 93 | echo '** ** ** WARNING ** ** **' >&2 | 93 | echo '** ** ** WARNING ** ** **' >&2 |
| 94 | echo "" >&2 | 94 | echo "" >&2 |
| 95 | echo "Your architecture did not define any architecture-dependant files" >&2 | 95 | echo "Your architecture did not define any architecture-dependent files" >&2 |
| 96 | echo "to be placed into the tarball. Please add those to ${0} ..." >&2 | 96 | echo "to be placed into the tarball. Please add those to ${0} ..." >&2 |
| 97 | echo "" >&2 | 97 | echo "" >&2 |
| 98 | sleep 5 | 98 | sleep 5 |
diff --git a/scripts/rt-tester/rt-tester.py b/scripts/rt-tester/rt-tester.py index 8c81d76959ee..34186cac1d2f 100644 --- a/scripts/rt-tester/rt-tester.py +++ b/scripts/rt-tester/rt-tester.py | |||
| @@ -180,7 +180,7 @@ while 1: | |||
| 180 | for s in stat: | 180 | for s in stat: |
| 181 | s = s.strip() | 181 | s = s.strip() |
| 182 | if s.startswith(testop[0]): | 182 | if s.startswith(testop[0]): |
| 183 | # Seperate status value | 183 | # Separate status value |
| 184 | val = s[2:].strip() | 184 | val = s[2:].strip() |
| 185 | query = analyse(val, testop, dat) | 185 | query = analyse(val, testop, dat) |
| 186 | break | 186 | break |
diff --git a/security/apparmor/match.c b/security/apparmor/match.c index 5cb4dc1f6992..06d764ccbbe5 100644 --- a/security/apparmor/match.c +++ b/security/apparmor/match.c | |||
| @@ -195,7 +195,7 @@ void aa_dfa_free_kref(struct kref *kref) | |||
| 195 | * | 195 | * |
| 196 | * Unpack a dfa that has been serialized. To find information on the dfa | 196 | * Unpack a dfa that has been serialized. To find information on the dfa |
| 197 | * format look in Documentation/apparmor.txt | 197 | * format look in Documentation/apparmor.txt |
| 198 | * Assumes the dfa @blob stream has been aligned on a 8 byte boundry | 198 | * Assumes the dfa @blob stream has been aligned on a 8 byte boundary |
| 199 | * | 199 | * |
| 200 | * Returns: an unpacked dfa ready for matching or ERR_PTR on failure | 200 | * Returns: an unpacked dfa ready for matching or ERR_PTR on failure |
| 201 | */ | 201 | */ |
diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c index eb3700e9fd37..e33aaf7e5744 100644 --- a/security/apparmor/policy_unpack.c +++ b/security/apparmor/policy_unpack.c | |||
| @@ -359,7 +359,7 @@ fail: | |||
| 359 | * @e: serialized data extent information (NOT NULL) | 359 | * @e: serialized data extent information (NOT NULL) |
| 360 | * @profile: profile to add the accept table to (NOT NULL) | 360 | * @profile: profile to add the accept table to (NOT NULL) |
| 361 | * | 361 | * |
| 362 | * Returns: 1 if table succesfully unpacked | 362 | * Returns: 1 if table successfully unpacked |
| 363 | */ | 363 | */ |
| 364 | static bool unpack_trans_table(struct aa_ext *e, struct aa_profile *profile) | 364 | static bool unpack_trans_table(struct aa_ext *e, struct aa_profile *profile) |
| 365 | { | 365 | { |
diff --git a/security/selinux/netlabel.c b/security/selinux/netlabel.c index 1c2fc46544bf..c3bf3ed07b06 100644 --- a/security/selinux/netlabel.c +++ b/security/selinux/netlabel.c | |||
| @@ -151,7 +151,7 @@ void selinux_netlbl_sk_security_free(struct sk_security_struct *sksec) | |||
| 151 | * | 151 | * |
| 152 | * Description: | 152 | * Description: |
| 153 | * Called when the NetLabel state of a sk_security_struct needs to be reset. | 153 | * Called when the NetLabel state of a sk_security_struct needs to be reset. |
| 154 | * The caller is responsibile for all the NetLabel sk_security_struct locking. | 154 | * The caller is responsible for all the NetLabel sk_security_struct locking. |
| 155 | * | 155 | * |
| 156 | */ | 156 | */ |
| 157 | void selinux_netlbl_sk_security_reset(struct sk_security_struct *sksec) | 157 | void selinux_netlbl_sk_security_reset(struct sk_security_struct *sksec) |
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index ea7c01f4a2bf..6ef4af47dac4 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c | |||
| @@ -2806,7 +2806,7 @@ int selinux_audit_rule_init(u32 field, u32 op, char *rulestr, void **vrule) | |||
| 2806 | case AUDIT_SUBJ_CLR: | 2806 | case AUDIT_SUBJ_CLR: |
| 2807 | case AUDIT_OBJ_LEV_LOW: | 2807 | case AUDIT_OBJ_LEV_LOW: |
| 2808 | case AUDIT_OBJ_LEV_HIGH: | 2808 | case AUDIT_OBJ_LEV_HIGH: |
| 2809 | /* we do not allow a range, indicated by the presense of '-' */ | 2809 | /* we do not allow a range, indicated by the presence of '-' */ |
| 2810 | if (strchr(rulestr, '-')) | 2810 | if (strchr(rulestr, '-')) |
| 2811 | return -EINVAL; | 2811 | return -EINVAL; |
| 2812 | break; | 2812 | break; |
| @@ -3075,7 +3075,7 @@ static void security_netlbl_cache_add(struct netlbl_lsm_secattr *secattr, | |||
| 3075 | * Description: | 3075 | * Description: |
| 3076 | * Convert the given NetLabel security attributes in @secattr into a | 3076 | * Convert the given NetLabel security attributes in @secattr into a |
| 3077 | * SELinux SID. If the @secattr field does not contain a full SELinux | 3077 | * SELinux SID. If the @secattr field does not contain a full SELinux |
| 3078 | * SID/context then use SECINITSID_NETMSG as the foundation. If possibile the | 3078 | * SID/context then use SECINITSID_NETMSG as the foundation. If possible the |
| 3079 | * 'cache' field of @secattr is set and the CACHE flag is set; this is to | 3079 | * 'cache' field of @secattr is set and the CACHE flag is set; this is to |
| 3080 | * allow the @secattr to be used by NetLabel to cache the secattr to SID | 3080 | * allow the @secattr to be used by NetLabel to cache the secattr to SID |
| 3081 | * conversion for future lookups. Returns zero on success, negative values on | 3081 | * conversion for future lookups. Returns zero on success, negative values on |
diff --git a/security/smack/smack_access.c b/security/smack/smack_access.c index 86453db4333d..9637e107f7ea 100644 --- a/security/smack/smack_access.c +++ b/security/smack/smack_access.c | |||
| @@ -431,7 +431,7 @@ char *smk_import(const char *string, int len) | |||
| 431 | * smack_from_secid - find the Smack label associated with a secid | 431 | * smack_from_secid - find the Smack label associated with a secid |
| 432 | * @secid: an integer that might be associated with a Smack label | 432 | * @secid: an integer that might be associated with a Smack label |
| 433 | * | 433 | * |
| 434 | * Returns a pointer to the appropraite Smack label if there is one, | 434 | * Returns a pointer to the appropriate Smack label if there is one, |
| 435 | * otherwise a pointer to the invalid Smack label. | 435 | * otherwise a pointer to the invalid Smack label. |
| 436 | */ | 436 | */ |
| 437 | char *smack_from_secid(const u32 secid) | 437 | char *smack_from_secid(const u32 secid) |
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 23c7a6d0c80c..c6f8fcadae07 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c | |||
| @@ -1794,7 +1794,7 @@ static void smack_set_catset(char *catset, struct netlbl_lsm_secattr *sap) | |||
| 1794 | * Casey says that CIPSO is good enough for now. | 1794 | * Casey says that CIPSO is good enough for now. |
| 1795 | * It can be used to effect. | 1795 | * It can be used to effect. |
| 1796 | * It can also be abused to effect when necessary. | 1796 | * It can also be abused to effect when necessary. |
| 1797 | * Appologies to the TSIG group in general and GW in particular. | 1797 | * Apologies to the TSIG group in general and GW in particular. |
| 1798 | */ | 1798 | */ |
| 1799 | static void smack_to_secattr(char *smack, struct netlbl_lsm_secattr *nlsp) | 1799 | static void smack_to_secattr(char *smack, struct netlbl_lsm_secattr *nlsp) |
| 1800 | { | 1800 | { |
| @@ -2530,7 +2530,7 @@ static void smack_d_instantiate(struct dentry *opt_dentry, struct inode *inode) | |||
| 2530 | switch (sbp->s_magic) { | 2530 | switch (sbp->s_magic) { |
| 2531 | case SMACK_MAGIC: | 2531 | case SMACK_MAGIC: |
| 2532 | /* | 2532 | /* |
| 2533 | * Casey says that it's a little embarassing | 2533 | * Casey says that it's a little embarrassing |
| 2534 | * that the smack file system doesn't do | 2534 | * that the smack file system doesn't do |
| 2535 | * extended attributes. | 2535 | * extended attributes. |
| 2536 | */ | 2536 | */ |
| @@ -3084,7 +3084,7 @@ static int smack_inet_conn_request(struct sock *sk, struct sk_buff *skb, | |||
| 3084 | /* | 3084 | /* |
| 3085 | * We need to decide if we want to label the incoming connection here | 3085 | * We need to decide if we want to label the incoming connection here |
| 3086 | * if we do we only need to label the request_sock and the stack will | 3086 | * if we do we only need to label the request_sock and the stack will |
| 3087 | * propogate the wire-label to the sock when it is created. | 3087 | * propagate the wire-label to the sock when it is created. |
| 3088 | */ | 3088 | */ |
| 3089 | hdr = ip_hdr(skb); | 3089 | hdr = ip_hdr(skb); |
| 3090 | addr.sin_addr.s_addr = hdr->saddr; | 3090 | addr.sin_addr.s_addr = hdr->saddr; |
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index 90d1bbaaa6f3..f93460156dce 100644 --- a/security/smack/smackfs.c +++ b/security/smack/smackfs.c | |||
| @@ -208,7 +208,7 @@ static ssize_t smk_write_load_list(struct file *file, const char __user *buf, | |||
| 208 | if (*ppos != 0) | 208 | if (*ppos != 0) |
| 209 | return -EINVAL; | 209 | return -EINVAL; |
| 210 | /* | 210 | /* |
| 211 | * Minor hack for backward compatability | 211 | * Minor hack for backward compatibility |
| 212 | */ | 212 | */ |
| 213 | if (count < (SMK_OLOADLEN) || count > SMK_LOADLEN) | 213 | if (count < (SMK_OLOADLEN) || count > SMK_LOADLEN) |
| 214 | return -EINVAL; | 214 | return -EINVAL; |
| @@ -223,7 +223,7 @@ static ssize_t smk_write_load_list(struct file *file, const char __user *buf, | |||
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | /* | 225 | /* |
| 226 | * More on the minor hack for backward compatability | 226 | * More on the minor hack for backward compatibility |
| 227 | */ | 227 | */ |
| 228 | if (count == (SMK_OLOADLEN)) | 228 | if (count == (SMK_OLOADLEN)) |
| 229 | data[SMK_OLOADLEN] = '-'; | 229 | data[SMK_OLOADLEN] = '-'; |
| @@ -927,7 +927,7 @@ static ssize_t smk_write_netlbladdr(struct file *file, const char __user *buf, | |||
| 927 | } | 927 | } |
| 928 | } else { | 928 | } else { |
| 929 | /* we delete the unlabeled entry, only if the previous label | 929 | /* we delete the unlabeled entry, only if the previous label |
| 930 | * wasnt the special CIPSO option */ | 930 | * wasn't the special CIPSO option */ |
| 931 | if (skp->smk_label != smack_cipso_option) | 931 | if (skp->smk_label != smack_cipso_option) |
| 932 | rc = netlbl_cfg_unlbl_static_del(&init_net, NULL, | 932 | rc = netlbl_cfg_unlbl_static_del(&init_net, NULL, |
| 933 | &skp->smk_host.sin_addr, &skp->smk_mask, | 933 | &skp->smk_host.sin_addr, &skp->smk_mask, |
diff --git a/security/tomoyo/load_policy.c b/security/tomoyo/load_policy.c index bbada7ca1b91..3312e5624f24 100644 --- a/security/tomoyo/load_policy.c +++ b/security/tomoyo/load_policy.c | |||
| @@ -23,7 +23,7 @@ static bool tomoyo_policy_loader_exists(void) | |||
| 23 | * If the initrd includes /sbin/init but real-root-dev has not | 23 | * If the initrd includes /sbin/init but real-root-dev has not |
| 24 | * mounted on / yet, activating MAC will block the system since | 24 | * mounted on / yet, activating MAC will block the system since |
| 25 | * policies are not loaded yet. | 25 | * policies are not loaded yet. |
| 26 | * Thus, let do_execve() call this function everytime. | 26 | * Thus, let do_execve() call this function every time. |
| 27 | */ | 27 | */ |
| 28 | struct path path; | 28 | struct path path; |
| 29 | 29 | ||
diff --git a/sound/aoa/codecs/tas.c b/sound/aoa/codecs/tas.c index fd2188c3df2b..58804c7acfcf 100644 --- a/sound/aoa/codecs/tas.c +++ b/sound/aoa/codecs/tas.c | |||
| @@ -170,7 +170,7 @@ static void tas_set_volume(struct tas *tas) | |||
| 170 | /* analysing the volume and mixer tables shows | 170 | /* analysing the volume and mixer tables shows |
| 171 | * that they are similar enough when we shift | 171 | * that they are similar enough when we shift |
| 172 | * the mixer table down by 4 bits. The error | 172 | * the mixer table down by 4 bits. The error |
| 173 | * is miniscule, in just one item the error | 173 | * is minuscule, in just one item the error |
| 174 | * is 1, at a value of 0x07f17b (mixer table | 174 | * is 1, at a value of 0x07f17b (mixer table |
| 175 | * value is 0x07f17a) */ | 175 | * value is 0x07f17a) */ |
| 176 | tmp = tas_gaintable[left]; | 176 | tmp = tas_gaintable[left]; |
diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c index 8808b82311b1..76e0d5695075 100644 --- a/sound/arm/pxa2xx-pcm-lib.c +++ b/sound/arm/pxa2xx-pcm-lib.c | |||
| @@ -140,6 +140,9 @@ int __pxa2xx_pcm_prepare(struct snd_pcm_substream *substream) | |||
| 140 | if (!prtd || !prtd->params) | 140 | if (!prtd || !prtd->params) |
| 141 | return 0; | 141 | return 0; |
| 142 | 142 | ||
| 143 | if (prtd->dma_ch == -1) | ||
| 144 | return -EINVAL; | ||
| 145 | |||
| 143 | DCSR(prtd->dma_ch) &= ~DCSR_RUN; | 146 | DCSR(prtd->dma_ch) &= ~DCSR_RUN; |
| 144 | DCSR(prtd->dma_ch) = 0; | 147 | DCSR(prtd->dma_ch) = 0; |
| 145 | DCMD(prtd->dma_ch) = 0; | 148 | DCMD(prtd->dma_ch) = 0; |
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index a82e3756a72d..64449cb8f873 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c | |||
| @@ -375,6 +375,7 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream, | |||
| 375 | } | 375 | } |
| 376 | 376 | ||
| 377 | if (runtime->no_period_wakeup) { | 377 | if (runtime->no_period_wakeup) { |
| 378 | snd_pcm_sframes_t xrun_threshold; | ||
| 378 | /* | 379 | /* |
| 379 | * Without regular period interrupts, we have to check | 380 | * Without regular period interrupts, we have to check |
| 380 | * the elapsed time to detect xruns. | 381 | * the elapsed time to detect xruns. |
| @@ -383,7 +384,8 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream, | |||
| 383 | if (jdelta < runtime->hw_ptr_buffer_jiffies / 2) | 384 | if (jdelta < runtime->hw_ptr_buffer_jiffies / 2) |
| 384 | goto no_delta_check; | 385 | goto no_delta_check; |
| 385 | hdelta = jdelta - delta * HZ / runtime->rate; | 386 | hdelta = jdelta - delta * HZ / runtime->rate; |
| 386 | while (hdelta > runtime->hw_ptr_buffer_jiffies / 2 + 1) { | 387 | xrun_threshold = runtime->hw_ptr_buffer_jiffies / 2 + 1; |
| 388 | while (hdelta > xrun_threshold) { | ||
| 387 | delta += runtime->buffer_size; | 389 | delta += runtime->buffer_size; |
| 388 | hw_base += runtime->buffer_size; | 390 | hw_base += runtime->buffer_size; |
| 389 | if (hw_base >= runtime->boundary) | 391 | if (hw_base >= runtime->boundary) |
diff --git a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c index 917e4055ee30..150cb7edffee 100644 --- a/sound/core/pcm_memory.c +++ b/sound/core/pcm_memory.c | |||
| @@ -253,7 +253,7 @@ static int snd_pcm_lib_preallocate_pages1(struct snd_pcm_substream *substream, | |||
| 253 | * snd_pcm_lib_preallocate_pages - pre-allocation for the given DMA type | 253 | * snd_pcm_lib_preallocate_pages - pre-allocation for the given DMA type |
| 254 | * @substream: the pcm substream instance | 254 | * @substream: the pcm substream instance |
| 255 | * @type: DMA type (SNDRV_DMA_TYPE_*) | 255 | * @type: DMA type (SNDRV_DMA_TYPE_*) |
| 256 | * @data: DMA type dependant data | 256 | * @data: DMA type dependent data |
| 257 | * @size: the requested pre-allocation size in bytes | 257 | * @size: the requested pre-allocation size in bytes |
| 258 | * @max: the max. allowed pre-allocation size | 258 | * @max: the max. allowed pre-allocation size |
| 259 | * | 259 | * |
| @@ -278,10 +278,10 @@ int snd_pcm_lib_preallocate_pages(struct snd_pcm_substream *substream, | |||
| 278 | EXPORT_SYMBOL(snd_pcm_lib_preallocate_pages); | 278 | EXPORT_SYMBOL(snd_pcm_lib_preallocate_pages); |
| 279 | 279 | ||
| 280 | /** | 280 | /** |
| 281 | * snd_pcm_lib_preallocate_pages_for_all - pre-allocation for continous memory type (all substreams) | 281 | * snd_pcm_lib_preallocate_pages_for_all - pre-allocation for continuous memory type (all substreams) |
| 282 | * @pcm: the pcm instance | 282 | * @pcm: the pcm instance |
| 283 | * @type: DMA type (SNDRV_DMA_TYPE_*) | 283 | * @type: DMA type (SNDRV_DMA_TYPE_*) |
| 284 | * @data: DMA type dependant data | 284 | * @data: DMA type dependent data |
| 285 | * @size: the requested pre-allocation size in bytes | 285 | * @size: the requested pre-allocation size in bytes |
| 286 | * @max: the max. allowed pre-allocation size | 286 | * @max: the max. allowed pre-allocation size |
| 287 | * | 287 | * |
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index fe5c8036beba..1a07750f3836 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
| @@ -460,7 +460,7 @@ static int snd_pcm_hw_params(struct snd_pcm_substream *substream, | |||
| 460 | PM_QOS_CPU_DMA_LATENCY, usecs); | 460 | PM_QOS_CPU_DMA_LATENCY, usecs); |
| 461 | return 0; | 461 | return 0; |
| 462 | _error: | 462 | _error: |
| 463 | /* hardware might be unuseable from this time, | 463 | /* hardware might be unusable from this time, |
| 464 | so we force application to retry to set | 464 | so we force application to retry to set |
| 465 | the correct hardware parameter settings */ | 465 | the correct hardware parameter settings */ |
| 466 | runtime->status->state = SNDRV_PCM_STATE_OPEN; | 466 | runtime->status->state = SNDRV_PCM_STATE_OPEN; |
diff --git a/sound/core/seq/seq_dummy.c b/sound/core/seq/seq_dummy.c index f3bdc54b429a..1d7d90ca455e 100644 --- a/sound/core/seq/seq_dummy.c +++ b/sound/core/seq/seq_dummy.c | |||
| @@ -50,7 +50,7 @@ | |||
| 50 | 50 | ||
| 51 | option snd-seq-dummy ports=4 | 51 | option snd-seq-dummy ports=4 |
| 52 | 52 | ||
| 53 | The modle option "duplex=1" enables duplex operation to the port. | 53 | The model option "duplex=1" enables duplex operation to the port. |
| 54 | In duplex mode, a pair of ports are created instead of single port, | 54 | In duplex mode, a pair of ports are created instead of single port, |
| 55 | and events are tunneled between pair-ports. For example, input to | 55 | and events are tunneled between pair-ports. For example, input to |
| 56 | port A is sent to output port of another port B and vice versa. | 56 | port A is sent to output port of another port B and vice versa. |
diff --git a/sound/core/vmaster.c b/sound/core/vmaster.c index a89948ae9e8d..a39d3d8c2f9c 100644 --- a/sound/core/vmaster.c +++ b/sound/core/vmaster.c | |||
| @@ -233,7 +233,7 @@ static void slave_free(struct snd_kcontrol *kcontrol) | |||
| 233 | * Add a slave control to the group with the given master control | 233 | * Add a slave control to the group with the given master control |
| 234 | * | 234 | * |
| 235 | * All slaves must be the same type (returning the same information | 235 | * All slaves must be the same type (returning the same information |
| 236 | * via info callback). The fucntion doesn't check it, so it's your | 236 | * via info callback). The function doesn't check it, so it's your |
| 237 | * responsibility. | 237 | * responsibility. |
| 238 | * | 238 | * |
| 239 | * Also, some additional limitations: | 239 | * Also, some additional limitations: |
diff --git a/sound/drivers/pcm-indirect2.c b/sound/drivers/pcm-indirect2.c index 3c93c23e4883..e73fafd761b3 100644 --- a/sound/drivers/pcm-indirect2.c +++ b/sound/drivers/pcm-indirect2.c | |||
| @@ -264,7 +264,7 @@ snd_pcm_indirect2_playback_transfer(struct snd_pcm_substream *substream, | |||
| 264 | if (diff < -(snd_pcm_sframes_t) (runtime->boundary / 2)) | 264 | if (diff < -(snd_pcm_sframes_t) (runtime->boundary / 2)) |
| 265 | diff += runtime->boundary; | 265 | diff += runtime->boundary; |
| 266 | /* number of bytes "added" by ALSA increases the number of | 266 | /* number of bytes "added" by ALSA increases the number of |
| 267 | * bytes which are ready to "be transfered to HW"/"played" | 267 | * bytes which are ready to "be transferred to HW"/"played" |
| 268 | * Then, set rec->appl_ptr to not count bytes twice next time. | 268 | * Then, set rec->appl_ptr to not count bytes twice next time. |
| 269 | */ | 269 | */ |
| 270 | rec->sw_ready += (int)frames_to_bytes(runtime, diff); | 270 | rec->sw_ready += (int)frames_to_bytes(runtime, diff); |
| @@ -330,7 +330,7 @@ snd_pcm_indirect2_playback_transfer(struct snd_pcm_substream *substream, | |||
| 330 | /* copy bytes from intermediate buffer position sw_data to the | 330 | /* copy bytes from intermediate buffer position sw_data to the |
| 331 | * HW and return number of bytes actually written | 331 | * HW and return number of bytes actually written |
| 332 | * Furthermore, set hw_ready to 0, if the fifo isn't empty | 332 | * Furthermore, set hw_ready to 0, if the fifo isn't empty |
| 333 | * now => more could be transfered to fifo | 333 | * now => more could be transferred to fifo |
| 334 | */ | 334 | */ |
| 335 | bytes = copy(substream, rec, bytes); | 335 | bytes = copy(substream, rec, bytes); |
| 336 | rec->bytes2hw += bytes; | 336 | rec->bytes2hw += bytes; |
diff --git a/sound/drivers/vx/vx_pcm.c b/sound/drivers/vx/vx_pcm.c index 35a2f71a6af5..5e897b236cec 100644 --- a/sound/drivers/vx/vx_pcm.c +++ b/sound/drivers/vx/vx_pcm.c | |||
| @@ -1189,7 +1189,7 @@ void vx_pcm_update_intr(struct vx_core *chip, unsigned int events) | |||
| 1189 | 1189 | ||
| 1190 | 1190 | ||
| 1191 | /* | 1191 | /* |
| 1192 | * vx_init_audio_io - check the availabe audio i/o and allocate pipe arrays | 1192 | * vx_init_audio_io - check the available audio i/o and allocate pipe arrays |
| 1193 | */ | 1193 | */ |
| 1194 | static int vx_init_audio_io(struct vx_core *chip) | 1194 | static int vx_init_audio_io(struct vx_core *chip) |
| 1195 | { | 1195 | { |
diff --git a/sound/firewire/speakers.c b/sound/firewire/speakers.c index 0fce9218abb1..5466de8527bd 100644 --- a/sound/firewire/speakers.c +++ b/sound/firewire/speakers.c | |||
| @@ -778,10 +778,9 @@ static int __devexit fwspk_remove(struct device *dev) | |||
| 778 | { | 778 | { |
| 779 | struct fwspk *fwspk = dev_get_drvdata(dev); | 779 | struct fwspk *fwspk = dev_get_drvdata(dev); |
| 780 | 780 | ||
| 781 | snd_card_disconnect(fwspk->card); | ||
| 782 | |||
| 783 | mutex_lock(&fwspk->mutex); | 781 | mutex_lock(&fwspk->mutex); |
| 784 | amdtp_out_stream_pcm_abort(&fwspk->stream); | 782 | amdtp_out_stream_pcm_abort(&fwspk->stream); |
| 783 | snd_card_disconnect(fwspk->card); | ||
| 785 | fwspk_stop_stream(fwspk); | 784 | fwspk_stop_stream(fwspk); |
| 786 | mutex_unlock(&fwspk->mutex); | 785 | mutex_unlock(&fwspk->mutex); |
| 787 | 786 | ||
diff --git a/sound/isa/sb/emu8000.c b/sound/isa/sb/emu8000.c index 0c40951b6523..5d61f5a29130 100644 --- a/sound/isa/sb/emu8000.c +++ b/sound/isa/sb/emu8000.c | |||
| @@ -370,7 +370,7 @@ init_arrays(struct snd_emu8000 *emu) | |||
| 370 | 370 | ||
| 371 | /* | 371 | /* |
| 372 | * Size the onboard memory. | 372 | * Size the onboard memory. |
| 373 | * This is written so as not to need arbitary delays after the write. It | 373 | * This is written so as not to need arbitrary delays after the write. It |
| 374 | * seems that the only way to do this is to use the one channel and keep | 374 | * seems that the only way to do this is to use the one channel and keep |
| 375 | * reallocating between read and write. | 375 | * reallocating between read and write. |
| 376 | */ | 376 | */ |
diff --git a/sound/isa/wavefront/wavefront_midi.c b/sound/isa/wavefront/wavefront_midi.c index f14a7c0b6998..65329f3abc30 100644 --- a/sound/isa/wavefront/wavefront_midi.c +++ b/sound/isa/wavefront/wavefront_midi.c | |||
| @@ -537,7 +537,7 @@ snd_wavefront_midi_start (snd_wavefront_card_t *card) | |||
| 537 | } | 537 | } |
| 538 | 538 | ||
| 539 | /* Turn on Virtual MIDI, but first *always* turn it off, | 539 | /* Turn on Virtual MIDI, but first *always* turn it off, |
| 540 | since otherwise consectutive reloads of the driver will | 540 | since otherwise consecutive reloads of the driver will |
| 541 | never cause the hardware to generate the initial "internal" or | 541 | never cause the hardware to generate the initial "internal" or |
| 542 | "external" source bytes in the MIDI data stream. This | 542 | "external" source bytes in the MIDI data stream. This |
| 543 | is pretty important, since the internal hardware generally will | 543 | is pretty important, since the internal hardware generally will |
diff --git a/sound/isa/wss/wss_lib.c b/sound/isa/wss/wss_lib.c index 9191b32d9130..2a42cc377957 100644 --- a/sound/isa/wss/wss_lib.c +++ b/sound/isa/wss/wss_lib.c | |||
| @@ -424,7 +424,7 @@ void snd_wss_mce_down(struct snd_wss *chip) | |||
| 424 | 424 | ||
| 425 | /* | 425 | /* |
| 426 | * Wait for (possible -- during init auto-calibration may not be set) | 426 | * Wait for (possible -- during init auto-calibration may not be set) |
| 427 | * calibration process to start. Needs upto 5 sample periods on AD1848 | 427 | * calibration process to start. Needs up to 5 sample periods on AD1848 |
| 428 | * which at the slowest possible rate of 5.5125 kHz means 907 us. | 428 | * which at the slowest possible rate of 5.5125 kHz means 907 us. |
| 429 | */ | 429 | */ |
| 430 | msleep(1); | 430 | msleep(1); |
diff --git a/sound/oss/ac97_codec.c b/sound/oss/ac97_codec.c index 854c303264dc..0cd23d94888f 100644 --- a/sound/oss/ac97_codec.c +++ b/sound/oss/ac97_codec.c | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | * | 28 | * |
| 29 | * History | 29 | * History |
| 30 | * May 02, 2003 Liam Girdwood <lrg@slimlogic.co.uk> | 30 | * May 02, 2003 Liam Girdwood <lrg@slimlogic.co.uk> |
| 31 | * Removed non existant WM9700 | 31 | * Removed non existent WM9700 |
| 32 | * Added support for WM9705, WM9708, WM9709, WM9710, WM9711 | 32 | * Added support for WM9705, WM9708, WM9709, WM9710, WM9711 |
| 33 | * WM9712 and WM9717 | 33 | * WM9712 and WM9717 |
| 34 | * Mar 28, 2002 Randolph Bentson <bentson@holmsjoen.com> | 34 | * Mar 28, 2002 Randolph Bentson <bentson@holmsjoen.com> |
| @@ -441,7 +441,7 @@ static void ac97_set_mixer(struct ac97_codec *codec, unsigned int oss_mixer, uns | |||
| 441 | } | 441 | } |
| 442 | 442 | ||
| 443 | /* read or write the recmask, the ac97 can really have left and right recording | 443 | /* read or write the recmask, the ac97 can really have left and right recording |
| 444 | inputs independantly set, but OSS doesn't seem to want us to express that to | 444 | inputs independently set, but OSS doesn't seem to want us to express that to |
| 445 | the user. the caller guarantees that we have a supported bit set, and they | 445 | the user. the caller guarantees that we have a supported bit set, and they |
| 446 | must be holding the card's spinlock */ | 446 | must be holding the card's spinlock */ |
| 447 | static int ac97_recmask_io(struct ac97_codec *codec, int rw, int mask) | 447 | static int ac97_recmask_io(struct ac97_codec *codec, int rw, int mask) |
| @@ -754,7 +754,7 @@ int ac97_probe_codec(struct ac97_codec *codec) | |||
| 754 | if((codec->codec_ops == &null_ops) && (f & 4)) | 754 | if((codec->codec_ops == &null_ops) && (f & 4)) |
| 755 | codec->codec_ops = &default_digital_ops; | 755 | codec->codec_ops = &default_digital_ops; |
| 756 | 756 | ||
| 757 | /* A device which thinks its a modem but isnt */ | 757 | /* A device which thinks its a modem but isn't */ |
| 758 | if(codec->flags & AC97_DELUDED_MODEM) | 758 | if(codec->flags & AC97_DELUDED_MODEM) |
| 759 | codec->modem = 0; | 759 | codec->modem = 0; |
| 760 | 760 | ||
diff --git a/sound/oss/audio.c b/sound/oss/audio.c index 7df48a25c4ee..4b958b1c497c 100644 --- a/sound/oss/audio.c +++ b/sound/oss/audio.c | |||
| @@ -514,7 +514,7 @@ int audio_ioctl(int dev, struct file *file, unsigned int cmd, void __user *arg) | |||
| 514 | count += dmap->bytes_in_use; /* Pointer wrap not handled yet */ | 514 | count += dmap->bytes_in_use; /* Pointer wrap not handled yet */ |
| 515 | count += dmap->byte_counter; | 515 | count += dmap->byte_counter; |
| 516 | 516 | ||
| 517 | /* Substract current count from the number of bytes written by app */ | 517 | /* Subtract current count from the number of bytes written by app */ |
| 518 | count = dmap->user_counter - count; | 518 | count = dmap->user_counter - count; |
| 519 | if (count < 0) | 519 | if (count < 0) |
| 520 | count = 0; | 520 | count = 0; |
| @@ -931,7 +931,7 @@ static int dma_ioctl(int dev, unsigned int cmd, void __user *arg) | |||
| 931 | if (count < dmap_out->fragment_size && dmap_out->qhead != 0) | 931 | if (count < dmap_out->fragment_size && dmap_out->qhead != 0) |
| 932 | count += dmap_out->bytes_in_use; /* Pointer wrap not handled yet */ | 932 | count += dmap_out->bytes_in_use; /* Pointer wrap not handled yet */ |
| 933 | count += dmap_out->byte_counter; | 933 | count += dmap_out->byte_counter; |
| 934 | /* Substract current count from the number of bytes written by app */ | 934 | /* Subtract current count from the number of bytes written by app */ |
| 935 | count = dmap_out->user_counter - count; | 935 | count = dmap_out->user_counter - count; |
| 936 | if (count < 0) | 936 | if (count < 0) |
| 937 | count = 0; | 937 | count = 0; |
diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c index 87e2c72651f5..c918313c2206 100644 --- a/sound/oss/dmasound/dmasound_core.c +++ b/sound/oss/dmasound/dmasound_core.c | |||
| @@ -1021,7 +1021,7 @@ static int sq_ioctl(struct file *file, u_int cmd, u_long arg) | |||
| 1021 | case SNDCTL_DSP_SYNC: | 1021 | case SNDCTL_DSP_SYNC: |
| 1022 | /* This call, effectively, has the same behaviour as SNDCTL_DSP_RESET | 1022 | /* This call, effectively, has the same behaviour as SNDCTL_DSP_RESET |
| 1023 | except that it waits for output to finish before resetting | 1023 | except that it waits for output to finish before resetting |
| 1024 | everything - read, however, is killed imediately. | 1024 | everything - read, however, is killed immediately. |
| 1025 | */ | 1025 | */ |
| 1026 | result = 0 ; | 1026 | result = 0 ; |
| 1027 | if (file->f_mode & FMODE_WRITE) { | 1027 | if (file->f_mode & FMODE_WRITE) { |
diff --git a/sound/oss/midibuf.c b/sound/oss/midibuf.c index ceedb1eff203..8cdb2cfe65c8 100644 --- a/sound/oss/midibuf.c +++ b/sound/oss/midibuf.c | |||
| @@ -295,7 +295,7 @@ int MIDIbuf_write(int dev, struct file *file, const char __user *buf, int count) | |||
| 295 | 295 | ||
| 296 | for (i = 0; i < n; i++) | 296 | for (i = 0; i < n; i++) |
| 297 | { | 297 | { |
| 298 | /* BROKE BROKE BROKE - CANT DO THIS WITH CLI !! */ | 298 | /* BROKE BROKE BROKE - CAN'T DO THIS WITH CLI !! */ |
| 299 | /* yes, think the same, so I removed the cli() brackets | 299 | /* yes, think the same, so I removed the cli() brackets |
| 300 | QUEUE_BYTE is protected against interrupts */ | 300 | QUEUE_BYTE is protected against interrupts */ |
| 301 | if (copy_from_user((char *) &tmp_data, &(buf)[c], 1)) { | 301 | if (copy_from_user((char *) &tmp_data, &(buf)[c], 1)) { |
diff --git a/sound/oss/sb_card.c b/sound/oss/sb_card.c index 84ef4d06c1c2..fb5d7250de38 100644 --- a/sound/oss/sb_card.c +++ b/sound/oss/sb_card.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * sound/oss/sb_card.c | 2 | * sound/oss/sb_card.c |
| 3 | * | 3 | * |
| 4 | * Detection routine for the ISA Sound Blaster and compatable sound | 4 | * Detection routine for the ISA Sound Blaster and compatible sound |
| 5 | * cards. | 5 | * cards. |
| 6 | * | 6 | * |
| 7 | * This file is distributed under the GNU GENERAL PUBLIC LICENSE (GPL) | 7 | * This file is distributed under the GNU GENERAL PUBLIC LICENSE (GPL) |
diff --git a/sound/oss/sb_ess.c b/sound/oss/sb_ess.c index 9890cf2066ff..5c773dff5ac5 100644 --- a/sound/oss/sb_ess.c +++ b/sound/oss/sb_ess.c | |||
| @@ -168,7 +168,7 @@ | |||
| 168 | * corresponding playback levels, unless recmask says they aren't recorded. In | 168 | * corresponding playback levels, unless recmask says they aren't recorded. In |
| 169 | * the latter case the recording volumes are 0. | 169 | * the latter case the recording volumes are 0. |
| 170 | * Now recording levels of inputs can be controlled, by changing the playback | 170 | * Now recording levels of inputs can be controlled, by changing the playback |
| 171 | * levels. Futhermore several devices can be recorded together (which is not | 171 | * levels. Furthermore several devices can be recorded together (which is not |
| 172 | * possible with the ES1688). | 172 | * possible with the ES1688). |
| 173 | * Besides the separate recording level control for each input, the common | 173 | * Besides the separate recording level control for each input, the common |
| 174 | * recording level can also be controlled by RECLEV as described above. | 174 | * recording level can also be controlled by RECLEV as described above. |
diff --git a/sound/oss/swarm_cs4297a.c b/sound/oss/swarm_cs4297a.c index 44357d877a27..09d46484bc1a 100644 --- a/sound/oss/swarm_cs4297a.c +++ b/sound/oss/swarm_cs4297a.c | |||
| @@ -875,7 +875,7 @@ static void start_adc(struct cs4297a_state *s) | |||
| 875 | if (s->prop_adc.fmt & AFMT_S8 || s->prop_adc.fmt & AFMT_U8) { | 875 | if (s->prop_adc.fmt & AFMT_S8 || s->prop_adc.fmt & AFMT_U8) { |
| 876 | // | 876 | // |
| 877 | // now only use 16 bit capture, due to truncation issue | 877 | // now only use 16 bit capture, due to truncation issue |
| 878 | // in the chip, noticable distortion occurs. | 878 | // in the chip, noticeable distortion occurs. |
| 879 | // allocate buffer and then convert from 16 bit to | 879 | // allocate buffer and then convert from 16 bit to |
| 880 | // 8 bit for the user buffer. | 880 | // 8 bit for the user buffer. |
| 881 | // | 881 | // |
diff --git a/sound/oss/vidc.c b/sound/oss/vidc.c index f0e0caa53200..12ba28e7b933 100644 --- a/sound/oss/vidc.c +++ b/sound/oss/vidc.c | |||
| @@ -227,7 +227,7 @@ static int vidc_audio_set_speed(int dev, int rate) | |||
| 227 | } else { | 227 | } else { |
| 228 | /*printk("VIDC: internal %d %d %d\n", rate, rate_int, hwrate);*/ | 228 | /*printk("VIDC: internal %d %d %d\n", rate, rate_int, hwrate);*/ |
| 229 | hwctrl=0x00000003; | 229 | hwctrl=0x00000003; |
| 230 | /* Allow rougly 0.4% tolerance */ | 230 | /* Allow roughly 0.4% tolerance */ |
| 231 | if (diff_int > (rate/256)) | 231 | if (diff_int > (rate/256)) |
| 232 | rate=rate_int; | 232 | rate=rate_int; |
| 233 | } | 233 | } |
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c index 4382d0fa6b9a..d8f6fd65ebbb 100644 --- a/sound/pci/ad1889.c +++ b/sound/pci/ad1889.c | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | * PM support | 29 | * PM support |
| 30 | * MIDI support | 30 | * MIDI support |
| 31 | * Game Port support | 31 | * Game Port support |
| 32 | * SG DMA support (this will need *alot* of work) | 32 | * SG DMA support (this will need *a lot* of work) |
| 33 | */ | 33 | */ |
| 34 | 34 | ||
| 35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c index f53a31e939c1..f8ccc9677c6f 100644 --- a/sound/pci/asihpi/asihpi.c +++ b/sound/pci/asihpi/asihpi.c | |||
| @@ -963,7 +963,7 @@ static int snd_card_asihpi_playback_open(struct snd_pcm_substream *substream) | |||
| 963 | 963 | ||
| 964 | /*? also check ASI5000 samplerate source | 964 | /*? also check ASI5000 samplerate source |
| 965 | If external, only support external rate. | 965 | If external, only support external rate. |
| 966 | If internal and other stream playing, cant switch | 966 | If internal and other stream playing, can't switch |
| 967 | */ | 967 | */ |
| 968 | 968 | ||
| 969 | init_timer(&dpcm->timer); | 969 | init_timer(&dpcm->timer); |
diff --git a/sound/pci/asihpi/hpi.h b/sound/pci/asihpi/hpi.h index 6fc025c448de..255429c32c1c 100644 --- a/sound/pci/asihpi/hpi.h +++ b/sound/pci/asihpi/hpi.h | |||
| @@ -725,7 +725,7 @@ enum HPI_AESEBU_ERRORS { | |||
| 725 | #define HPI_PAD_TITLE_LEN 64 | 725 | #define HPI_PAD_TITLE_LEN 64 |
| 726 | /** The text string containing the comment. */ | 726 | /** The text string containing the comment. */ |
| 727 | #define HPI_PAD_COMMENT_LEN 256 | 727 | #define HPI_PAD_COMMENT_LEN 256 |
| 728 | /** The PTY when the tuner has not recieved any PTY. */ | 728 | /** The PTY when the tuner has not received any PTY. */ |
| 729 | #define HPI_PAD_PROGRAM_TYPE_INVALID 0xffff | 729 | #define HPI_PAD_PROGRAM_TYPE_INVALID 0xffff |
| 730 | /** \} */ | 730 | /** \} */ |
| 731 | 731 | ||
diff --git a/sound/pci/asihpi/hpi6000.c b/sound/pci/asihpi/hpi6000.c index 3e3c2ef6efd8..8c8aac4c567e 100644 --- a/sound/pci/asihpi/hpi6000.c +++ b/sound/pci/asihpi/hpi6000.c | |||
| @@ -423,7 +423,7 @@ static void subsys_create_adapter(struct hpi_message *phm, | |||
| 423 | 423 | ||
| 424 | ao.priv = kzalloc(sizeof(struct hpi_hw_obj), GFP_KERNEL); | 424 | ao.priv = kzalloc(sizeof(struct hpi_hw_obj), GFP_KERNEL); |
| 425 | if (!ao.priv) { | 425 | if (!ao.priv) { |
| 426 | HPI_DEBUG_LOG(ERROR, "cant get mem for adapter object\n"); | 426 | HPI_DEBUG_LOG(ERROR, "can't get mem for adapter object\n"); |
| 427 | phr->error = HPI_ERROR_MEMORY_ALLOC; | 427 | phr->error = HPI_ERROR_MEMORY_ALLOC; |
| 428 | return; | 428 | return; |
| 429 | } | 429 | } |
diff --git a/sound/pci/asihpi/hpi6205.c b/sound/pci/asihpi/hpi6205.c index 620525bdac59..22e9f08dea6d 100644 --- a/sound/pci/asihpi/hpi6205.c +++ b/sound/pci/asihpi/hpi6205.c | |||
| @@ -466,7 +466,7 @@ static void subsys_create_adapter(struct hpi_message *phm, | |||
| 466 | 466 | ||
| 467 | ao.priv = kzalloc(sizeof(struct hpi_hw_obj), GFP_KERNEL); | 467 | ao.priv = kzalloc(sizeof(struct hpi_hw_obj), GFP_KERNEL); |
| 468 | if (!ao.priv) { | 468 | if (!ao.priv) { |
| 469 | HPI_DEBUG_LOG(ERROR, "cant get mem for adapter object\n"); | 469 | HPI_DEBUG_LOG(ERROR, "can't get mem for adapter object\n"); |
| 470 | phr->error = HPI_ERROR_MEMORY_ALLOC; | 470 | phr->error = HPI_ERROR_MEMORY_ALLOC; |
| 471 | return; | 471 | return; |
| 472 | } | 472 | } |
diff --git a/sound/pci/asihpi/hpi_internal.h b/sound/pci/asihpi/hpi_internal.h index af678be0aa15..3b9fd115da36 100644 --- a/sound/pci/asihpi/hpi_internal.h +++ b/sound/pci/asihpi/hpi_internal.h | |||
| @@ -607,7 +607,7 @@ struct hpi_data_compat32 { | |||
| 607 | #endif | 607 | #endif |
| 608 | 608 | ||
| 609 | struct hpi_buffer { | 609 | struct hpi_buffer { |
| 610 | /** placehoder for backward compatability (see dwBufferSize) */ | 610 | /** placehoder for backward compatibility (see dwBufferSize) */ |
| 611 | struct hpi_msg_format reserved; | 611 | struct hpi_msg_format reserved; |
| 612 | u32 command; /**< HPI_BUFFER_CMD_xxx*/ | 612 | u32 command; /**< HPI_BUFFER_CMD_xxx*/ |
| 613 | u32 pci_address; /**< PCI physical address of buffer for DSP DMA */ | 613 | u32 pci_address; /**< PCI physical address of buffer for DSP DMA */ |
diff --git a/sound/pci/asihpi/hpimsgx.c b/sound/pci/asihpi/hpimsgx.c index bcbdf30a6aa0..360028b9abf5 100644 --- a/sound/pci/asihpi/hpimsgx.c +++ b/sound/pci/asihpi/hpimsgx.c | |||
| @@ -722,7 +722,7 @@ static u16 HPIMSGX__init(struct hpi_message *phm, | |||
| 722 | return phr->error; | 722 | return phr->error; |
| 723 | } | 723 | } |
| 724 | if (hr.error == 0) { | 724 | if (hr.error == 0) { |
| 725 | /* the adapter was created succesfully | 725 | /* the adapter was created successfully |
| 726 | save the mapping for future use */ | 726 | save the mapping for future use */ |
| 727 | hpi_entry_points[hr.u.s.adapter_index] = entry_point_func; | 727 | hpi_entry_points[hr.u.s.adapter_index] = entry_point_func; |
| 728 | /* prepare adapter (pre-open streams etc.) */ | 728 | /* prepare adapter (pre-open streams etc.) */ |
diff --git a/sound/pci/au88x0/au88x0.h b/sound/pci/au88x0/au88x0.h index ecb8f4daf408..02f6e08f7592 100644 --- a/sound/pci/au88x0/au88x0.h +++ b/sound/pci/au88x0/au88x0.h | |||
| @@ -104,7 +104,7 @@ | |||
| 104 | #define MIX_PLAYB(x) (vortex->mixplayb[x]) | 104 | #define MIX_PLAYB(x) (vortex->mixplayb[x]) |
| 105 | #define MIX_SPDIF(x) (vortex->mixspdif[x]) | 105 | #define MIX_SPDIF(x) (vortex->mixspdif[x]) |
| 106 | 106 | ||
| 107 | #define NR_WTPB 0x20 /* WT channels per eahc bank. */ | 107 | #define NR_WTPB 0x20 /* WT channels per each bank. */ |
| 108 | 108 | ||
| 109 | /* Structs */ | 109 | /* Structs */ |
| 110 | typedef struct { | 110 | typedef struct { |
diff --git a/sound/pci/au88x0/au88x0_a3d.c b/sound/pci/au88x0/au88x0_a3d.c index f4aa8ff6f5f9..9ae8b3b17651 100644 --- a/sound/pci/au88x0/au88x0_a3d.c +++ b/sound/pci/au88x0/au88x0_a3d.c | |||
| @@ -53,7 +53,7 @@ a3dsrc_GetTimeConsts(a3dsrc_t * a, short *HrtfTrack, short *ItdTrack, | |||
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | #endif | 55 | #endif |
| 56 | /* Atmospheric absorbtion. */ | 56 | /* Atmospheric absorption. */ |
| 57 | 57 | ||
| 58 | static void | 58 | static void |
| 59 | a3dsrc_SetAtmosTarget(a3dsrc_t * a, short aa, short b, short c, short d, | 59 | a3dsrc_SetAtmosTarget(a3dsrc_t * a, short aa, short b, short c, short d, |
| @@ -835,7 +835,7 @@ snd_vortex_a3d_filter_put(struct snd_kcontrol *kcontrol, | |||
| 835 | params[i] = ucontrol->value.integer.value[i]; | 835 | params[i] = ucontrol->value.integer.value[i]; |
| 836 | /* Translate generic filter params to a3d filter params. */ | 836 | /* Translate generic filter params to a3d filter params. */ |
| 837 | vortex_a3d_translate_filter(a->filter, params); | 837 | vortex_a3d_translate_filter(a->filter, params); |
| 838 | /* Atmospheric absorbtion and filtering. */ | 838 | /* Atmospheric absorption and filtering. */ |
| 839 | a3dsrc_SetAtmosTarget(a, a->filter[0], | 839 | a3dsrc_SetAtmosTarget(a, a->filter[0], |
| 840 | a->filter[1], a->filter[2], | 840 | a->filter[1], a->filter[2], |
| 841 | a->filter[3], a->filter[4]); | 841 | a->filter[3], a->filter[4]); |
diff --git a/sound/pci/au88x0/au88x0_pcm.c b/sound/pci/au88x0/au88x0_pcm.c index 5439d662d104..33f0ba5559a7 100644 --- a/sound/pci/au88x0/au88x0_pcm.c +++ b/sound/pci/au88x0/au88x0_pcm.c | |||
| @@ -515,7 +515,7 @@ static int __devinit snd_vortex_new_pcm(vortex_t *chip, int idx, int nr) | |||
| 515 | return -ENODEV; | 515 | return -ENODEV; |
| 516 | 516 | ||
| 517 | /* idx indicates which kind of PCM device. ADB, SPDIF, I2S and A3D share the | 517 | /* idx indicates which kind of PCM device. ADB, SPDIF, I2S and A3D share the |
| 518 | * same dma engine. WT uses it own separate dma engine whcih cant capture. */ | 518 | * same dma engine. WT uses it own separate dma engine which can't capture. */ |
| 519 | if (idx == VORTEX_PCM_ADB) | 519 | if (idx == VORTEX_PCM_ADB) |
| 520 | nr_capt = nr; | 520 | nr_capt = nr; |
| 521 | else | 521 | else |
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c index 5715c4d05573..9b7a6346037a 100644 --- a/sound/pci/azt3328.c +++ b/sound/pci/azt3328.c | |||
| @@ -140,7 +140,7 @@ | |||
| 140 | * Possible remedies: | 140 | * Possible remedies: |
| 141 | * - use speaker (amplifier) output instead of headphone output | 141 | * - use speaker (amplifier) output instead of headphone output |
| 142 | * (in case crackling is due to overloaded output clipping) | 142 | * (in case crackling is due to overloaded output clipping) |
| 143 | * - plug card into a different PCI slot, preferrably one that isn't shared | 143 | * - plug card into a different PCI slot, preferably one that isn't shared |
| 144 | * too much (this helps a lot, but not completely!) | 144 | * too much (this helps a lot, but not completely!) |
| 145 | * - get rid of PCI VGA card, use AGP instead | 145 | * - get rid of PCI VGA card, use AGP instead |
| 146 | * - upgrade or downgrade BIOS | 146 | * - upgrade or downgrade BIOS |
diff --git a/sound/pci/ca0106/ca0106.h b/sound/pci/ca0106/ca0106.h index fc53b9bca26d..e8e8ccc96403 100644 --- a/sound/pci/ca0106/ca0106.h +++ b/sound/pci/ca0106/ca0106.h | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | * Add support for mute control on SB Live 24bit (cards w/ SPI DAC) | 51 | * Add support for mute control on SB Live 24bit (cards w/ SPI DAC) |
| 52 | * | 52 | * |
| 53 | * | 53 | * |
| 54 | * This code was initally based on code from ALSA's emu10k1x.c which is: | 54 | * This code was initially based on code from ALSA's emu10k1x.c which is: |
| 55 | * Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com> | 55 | * Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com> |
| 56 | * | 56 | * |
| 57 | * This program is free software; you can redistribute it and/or modify | 57 | * This program is free software; you can redistribute it and/or modify |
| @@ -175,7 +175,7 @@ | |||
| 175 | /* CA0106 pointer-offset register set, accessed through the PTR and DATA registers */ | 175 | /* CA0106 pointer-offset register set, accessed through the PTR and DATA registers */ |
| 176 | /********************************************************************************************************/ | 176 | /********************************************************************************************************/ |
| 177 | 177 | ||
| 178 | /* Initally all registers from 0x00 to 0x3f have zero contents. */ | 178 | /* Initially all registers from 0x00 to 0x3f have zero contents. */ |
| 179 | #define PLAYBACK_LIST_ADDR 0x00 /* Base DMA address of a list of pointers to each period/size */ | 179 | #define PLAYBACK_LIST_ADDR 0x00 /* Base DMA address of a list of pointers to each period/size */ |
| 180 | /* One list entry: 4 bytes for DMA address, | 180 | /* One list entry: 4 bytes for DMA address, |
| 181 | * 4 bytes for period_size << 16. | 181 | * 4 bytes for period_size << 16. |
| @@ -223,7 +223,7 @@ | |||
| 223 | * The jack has 4 poles. I will call 1 - Tip, 2 - Next to 1, 3 - Next to 2, 4 - Next to 3 | 223 | * The jack has 4 poles. I will call 1 - Tip, 2 - Next to 1, 3 - Next to 2, 4 - Next to 3 |
| 224 | * For Analogue: 1 -> Center Speaker, 2 -> Sub Woofer, 3 -> Ground, 4 -> Ground | 224 | * For Analogue: 1 -> Center Speaker, 2 -> Sub Woofer, 3 -> Ground, 4 -> Ground |
| 225 | * For Digital: 1 -> Front SPDIF, 2 -> Rear SPDIF, 3 -> Center/Subwoofer SPDIF, 4 -> Ground. | 225 | * For Digital: 1 -> Front SPDIF, 2 -> Rear SPDIF, 3 -> Center/Subwoofer SPDIF, 4 -> Ground. |
| 226 | * Standard 4 pole Video A/V cable with RCA outputs: 1 -> White, 2 -> Yellow, 3 -> Sheild on all three, 4 -> Red. | 226 | * Standard 4 pole Video A/V cable with RCA outputs: 1 -> White, 2 -> Yellow, 3 -> Shield on all three, 4 -> Red. |
| 227 | * So, from this you can see that you cannot use a Standard 4 pole Video A/V cable with the SB Audigy LS card. | 227 | * So, from this you can see that you cannot use a Standard 4 pole Video A/V cable with the SB Audigy LS card. |
| 228 | */ | 228 | */ |
| 229 | /* The Front SPDIF PCM gets mixed with samples from the AC97 codec, so can only work for Stereo PCM and not AC3/DTS | 229 | /* The Front SPDIF PCM gets mixed with samples from the AC97 codec, so can only work for Stereo PCM and not AC3/DTS |
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index 01b49388fafd..437759239694 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c | |||
| @@ -117,7 +117,7 @@ | |||
| 117 | * DAC: Unknown | 117 | * DAC: Unknown |
| 118 | * Trying to handle it like the SB0410. | 118 | * Trying to handle it like the SB0410. |
| 119 | * | 119 | * |
| 120 | * This code was initally based on code from ALSA's emu10k1x.c which is: | 120 | * This code was initially based on code from ALSA's emu10k1x.c which is: |
| 121 | * Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com> | 121 | * Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com> |
| 122 | * | 122 | * |
| 123 | * This program is free software; you can redistribute it and/or modify | 123 | * This program is free software; you can redistribute it and/or modify |
diff --git a/sound/pci/ca0106/ca0106_mixer.c b/sound/pci/ca0106/ca0106_mixer.c index 630aa4998189..84f3f92436b5 100644 --- a/sound/pci/ca0106/ca0106_mixer.c +++ b/sound/pci/ca0106/ca0106_mixer.c | |||
| @@ -42,7 +42,7 @@ | |||
| 42 | * 0.0.18 | 42 | * 0.0.18 |
| 43 | * Add support for mute control on SB Live 24bit (cards w/ SPI DAC) | 43 | * Add support for mute control on SB Live 24bit (cards w/ SPI DAC) |
| 44 | * | 44 | * |
| 45 | * This code was initally based on code from ALSA's emu10k1x.c which is: | 45 | * This code was initially based on code from ALSA's emu10k1x.c which is: |
| 46 | * Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com> | 46 | * Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com> |
| 47 | * | 47 | * |
| 48 | * This program is free software; you can redistribute it and/or modify | 48 | * This program is free software; you can redistribute it and/or modify |
diff --git a/sound/pci/ca0106/ca0106_proc.c b/sound/pci/ca0106/ca0106_proc.c index ba96428c9f4c..c694464b1168 100644 --- a/sound/pci/ca0106/ca0106_proc.c +++ b/sound/pci/ca0106/ca0106_proc.c | |||
| @@ -42,7 +42,7 @@ | |||
| 42 | * 0.0.18 | 42 | * 0.0.18 |
| 43 | * Implement support for Line-in capture on SB Live 24bit. | 43 | * Implement support for Line-in capture on SB Live 24bit. |
| 44 | * | 44 | * |
| 45 | * This code was initally based on code from ALSA's emu10k1x.c which is: | 45 | * This code was initially based on code from ALSA's emu10k1x.c which is: |
| 46 | * Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com> | 46 | * Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com> |
| 47 | * | 47 | * |
| 48 | * This program is free software; you can redistribute it and/or modify | 48 | * This program is free software; you can redistribute it and/or modify |
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index b5bb036ef73c..f4e573555da3 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c | |||
| @@ -73,7 +73,7 @@ MODULE_PARM_DESC(mpu_port, "MPU-401 port."); | |||
| 73 | module_param_array(fm_port, long, NULL, 0444); | 73 | module_param_array(fm_port, long, NULL, 0444); |
| 74 | MODULE_PARM_DESC(fm_port, "FM port."); | 74 | MODULE_PARM_DESC(fm_port, "FM port."); |
| 75 | module_param_array(soft_ac3, bool, NULL, 0444); | 75 | module_param_array(soft_ac3, bool, NULL, 0444); |
| 76 | MODULE_PARM_DESC(soft_ac3, "Sofware-conversion of raw SPDIF packets (model 033 only)."); | 76 | MODULE_PARM_DESC(soft_ac3, "Software-conversion of raw SPDIF packets (model 033 only)."); |
| 77 | #ifdef SUPPORT_JOYSTICK | 77 | #ifdef SUPPORT_JOYSTICK |
| 78 | module_param_array(joystick_port, int, NULL, 0444); | 78 | module_param_array(joystick_port, int, NULL, 0444); |
| 79 | MODULE_PARM_DESC(joystick_port, "Joystick port address."); | 79 | MODULE_PARM_DESC(joystick_port, "Joystick port address."); |
| @@ -656,8 +656,8 @@ out: | |||
| 656 | } | 656 | } |
| 657 | 657 | ||
| 658 | /* | 658 | /* |
| 659 | * Program pll register bits, I assume that the 8 registers 0xf8 upto 0xff | 659 | * Program pll register bits, I assume that the 8 registers 0xf8 up to 0xff |
| 660 | * are mapped onto the 8 ADC/DAC sampling frequency which can be choosen | 660 | * are mapped onto the 8 ADC/DAC sampling frequency which can be chosen |
| 661 | * at the register CM_REG_FUNCTRL1 (0x04). | 661 | * at the register CM_REG_FUNCTRL1 (0x04). |
| 662 | * Problem: other ways are also possible (any information about that?) | 662 | * Problem: other ways are also possible (any information about that?) |
| 663 | */ | 663 | */ |
| @@ -666,7 +666,7 @@ static void snd_cmipci_set_pll(struct cmipci *cm, unsigned int rate, unsigned in | |||
| 666 | unsigned int reg = CM_REG_PLL + slot; | 666 | unsigned int reg = CM_REG_PLL + slot; |
| 667 | /* | 667 | /* |
| 668 | * Guess that this programs at reg. 0x04 the pos 15:13/12:10 | 668 | * Guess that this programs at reg. 0x04 the pos 15:13/12:10 |
| 669 | * for DSFC/ASFC (000 upto 111). | 669 | * for DSFC/ASFC (000 up to 111). |
| 670 | */ | 670 | */ |
| 671 | 671 | ||
| 672 | /* FIXME: Init (Do we've to set an other register first before programming?) */ | 672 | /* FIXME: Init (Do we've to set an other register first before programming?) */ |
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c index b9321544c31c..13f33c0719d3 100644 --- a/sound/pci/ctxfi/ctatc.c +++ b/sound/pci/ctxfi/ctatc.c | |||
| @@ -1627,7 +1627,7 @@ static struct ct_atc atc_preset __devinitdata = { | |||
| 1627 | * Creates and initializes a hardware manager. | 1627 | * Creates and initializes a hardware manager. |
| 1628 | * | 1628 | * |
| 1629 | * Creates kmallocated ct_atc structure. Initializes hardware. | 1629 | * Creates kmallocated ct_atc structure. Initializes hardware. |
| 1630 | * Returns 0 if suceeds, or negative error code if fails. | 1630 | * Returns 0 if succeeds, or negative error code if fails. |
| 1631 | */ | 1631 | */ |
| 1632 | 1632 | ||
| 1633 | int __devinit ct_atc_create(struct snd_card *card, struct pci_dev *pci, | 1633 | int __devinit ct_atc_create(struct snd_card *card, struct pci_dev *pci, |
diff --git a/sound/pci/ctxfi/cthw20k1.c b/sound/pci/ctxfi/cthw20k1.c index 0cf400f879f9..a5c957db5cea 100644 --- a/sound/pci/ctxfi/cthw20k1.c +++ b/sound/pci/ctxfi/cthw20k1.c | |||
| @@ -1285,7 +1285,7 @@ static int hw_trn_init(struct hw *hw, const struct trn_conf *info) | |||
| 1285 | hw_write_20kx(hw, PTPALX, ptp_phys_low); | 1285 | hw_write_20kx(hw, PTPALX, ptp_phys_low); |
| 1286 | hw_write_20kx(hw, PTPAHX, ptp_phys_high); | 1286 | hw_write_20kx(hw, PTPAHX, ptp_phys_high); |
| 1287 | hw_write_20kx(hw, TRNCTL, trnctl); | 1287 | hw_write_20kx(hw, TRNCTL, trnctl); |
| 1288 | hw_write_20kx(hw, TRNIS, 0x200c01); /* realy needed? */ | 1288 | hw_write_20kx(hw, TRNIS, 0x200c01); /* really needed? */ |
| 1289 | 1289 | ||
| 1290 | return 0; | 1290 | return 0; |
| 1291 | } | 1291 | } |
diff --git a/sound/pci/emu10k1/memory.c b/sound/pci/emu10k1/memory.c index 957a311514c8..c250614dadd0 100644 --- a/sound/pci/emu10k1/memory.c +++ b/sound/pci/emu10k1/memory.c | |||
| @@ -248,7 +248,7 @@ static int is_valid_page(struct snd_emu10k1 *emu, dma_addr_t addr) | |||
| 248 | /* | 248 | /* |
| 249 | * map the given memory block on PTB. | 249 | * map the given memory block on PTB. |
| 250 | * if the block is already mapped, update the link order. | 250 | * if the block is already mapped, update the link order. |
| 251 | * if no empty pages are found, tries to release unsed memory blocks | 251 | * if no empty pages are found, tries to release unused memory blocks |
| 252 | * and retry the mapping. | 252 | * and retry the mapping. |
| 253 | */ | 253 | */ |
| 254 | int snd_emu10k1_memblk_map(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk) | 254 | int snd_emu10k1_memblk_map(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk) |
diff --git a/sound/pci/emu10k1/p16v.c b/sound/pci/emu10k1/p16v.c index 61b8ab39800f..a81dc44228ea 100644 --- a/sound/pci/emu10k1/p16v.c +++ b/sound/pci/emu10k1/p16v.c | |||
| @@ -69,7 +69,7 @@ | |||
| 69 | * ADC: Philips 1361T (Stereo 24bit) | 69 | * ADC: Philips 1361T (Stereo 24bit) |
| 70 | * DAC: CS4382-K (8-channel, 24bit, 192Khz) | 70 | * DAC: CS4382-K (8-channel, 24bit, 192Khz) |
| 71 | * | 71 | * |
| 72 | * This code was initally based on code from ALSA's emu10k1x.c which is: | 72 | * This code was initially based on code from ALSA's emu10k1x.c which is: |
| 73 | * Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com> | 73 | * Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com> |
| 74 | * | 74 | * |
| 75 | * This program is free software; you can redistribute it and/or modify | 75 | * This program is free software; you can redistribute it and/or modify |
diff --git a/sound/pci/emu10k1/p16v.h b/sound/pci/emu10k1/p16v.h index 00f4817533b1..4e0ee1a9747a 100644 --- a/sound/pci/emu10k1/p16v.h +++ b/sound/pci/emu10k1/p16v.h | |||
| @@ -59,7 +59,7 @@ | |||
| 59 | * ADC: Philips 1361T (Stereo 24bit) | 59 | * ADC: Philips 1361T (Stereo 24bit) |
| 60 | * DAC: CS4382-K (8-channel, 24bit, 192Khz) | 60 | * DAC: CS4382-K (8-channel, 24bit, 192Khz) |
| 61 | * | 61 | * |
| 62 | * This code was initally based on code from ALSA's emu10k1x.c which is: | 62 | * This code was initially based on code from ALSA's emu10k1x.c which is: |
| 63 | * Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com> | 63 | * Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com> |
| 64 | * | 64 | * |
| 65 | * This program is free software; you can redistribute it and/or modify | 65 | * This program is free software; you can redistribute it and/or modify |
| @@ -86,7 +86,7 @@ | |||
| 86 | * The sample rate is also controlled by the same registers that control the rate of the EMU10K2 sample rate converters. | 86 | * The sample rate is also controlled by the same registers that control the rate of the EMU10K2 sample rate converters. |
| 87 | */ | 87 | */ |
| 88 | 88 | ||
| 89 | /* Initally all registers from 0x00 to 0x3f have zero contents. */ | 89 | /* Initially all registers from 0x00 to 0x3f have zero contents. */ |
| 90 | #define PLAYBACK_LIST_ADDR 0x00 /* Base DMA address of a list of pointers to each period/size */ | 90 | #define PLAYBACK_LIST_ADDR 0x00 /* Base DMA address of a list of pointers to each period/size */ |
| 91 | /* One list entry: 4 bytes for DMA address, | 91 | /* One list entry: 4 bytes for DMA address, |
| 92 | * 4 bytes for period_size << 16. | 92 | * 4 bytes for period_size << 16. |
diff --git a/sound/pci/ens1370.c b/sound/pci/ens1370.c index 537cfba829a5..863eafea691f 100644 --- a/sound/pci/ens1370.c +++ b/sound/pci/ens1370.c | |||
| @@ -229,6 +229,7 @@ MODULE_PARM_DESC(lineio, "Line In to Rear Out (0 = auto, 1 = force)."); | |||
| 229 | #define ES_REG_1371_CODEC 0x14 /* W/R: Codec Read/Write register address */ | 229 | #define ES_REG_1371_CODEC 0x14 /* W/R: Codec Read/Write register address */ |
| 230 | #define ES_1371_CODEC_RDY (1<<31) /* codec ready */ | 230 | #define ES_1371_CODEC_RDY (1<<31) /* codec ready */ |
| 231 | #define ES_1371_CODEC_WIP (1<<30) /* codec register access in progress */ | 231 | #define ES_1371_CODEC_WIP (1<<30) /* codec register access in progress */ |
| 232 | #define EV_1938_CODEC_MAGIC (1<<26) | ||
| 232 | #define ES_1371_CODEC_PIRD (1<<23) /* codec read/write select register */ | 233 | #define ES_1371_CODEC_PIRD (1<<23) /* codec read/write select register */ |
| 233 | #define ES_1371_CODEC_WRITE(a,d) ((((a)&0x7f)<<16)|(((d)&0xffff)<<0)) | 234 | #define ES_1371_CODEC_WRITE(a,d) ((((a)&0x7f)<<16)|(((d)&0xffff)<<0)) |
| 234 | #define ES_1371_CODEC_READS(a) ((((a)&0x7f)<<16)|ES_1371_CODEC_PIRD) | 235 | #define ES_1371_CODEC_READS(a) ((((a)&0x7f)<<16)|ES_1371_CODEC_PIRD) |
| @@ -603,12 +604,18 @@ static void snd_es1370_codec_write(struct snd_ak4531 *ak4531, | |||
| 603 | 604 | ||
| 604 | #ifdef CHIP1371 | 605 | #ifdef CHIP1371 |
| 605 | 606 | ||
| 607 | static inline bool is_ev1938(struct ensoniq *ensoniq) | ||
| 608 | { | ||
| 609 | return ensoniq->pci->device == 0x8938; | ||
| 610 | } | ||
| 611 | |||
| 606 | static void snd_es1371_codec_write(struct snd_ac97 *ac97, | 612 | static void snd_es1371_codec_write(struct snd_ac97 *ac97, |
| 607 | unsigned short reg, unsigned short val) | 613 | unsigned short reg, unsigned short val) |
| 608 | { | 614 | { |
| 609 | struct ensoniq *ensoniq = ac97->private_data; | 615 | struct ensoniq *ensoniq = ac97->private_data; |
| 610 | unsigned int t, x; | 616 | unsigned int t, x, flag; |
| 611 | 617 | ||
| 618 | flag = is_ev1938(ensoniq) ? EV_1938_CODEC_MAGIC : 0; | ||
| 612 | mutex_lock(&ensoniq->src_mutex); | 619 | mutex_lock(&ensoniq->src_mutex); |
| 613 | for (t = 0; t < POLL_COUNT; t++) { | 620 | for (t = 0; t < POLL_COUNT; t++) { |
| 614 | if (!(inl(ES_REG(ensoniq, 1371_CODEC)) & ES_1371_CODEC_WIP)) { | 621 | if (!(inl(ES_REG(ensoniq, 1371_CODEC)) & ES_1371_CODEC_WIP)) { |
| @@ -630,7 +637,8 @@ static void snd_es1371_codec_write(struct snd_ac97 *ac97, | |||
| 630 | 0x00010000) | 637 | 0x00010000) |
| 631 | break; | 638 | break; |
| 632 | } | 639 | } |
| 633 | outl(ES_1371_CODEC_WRITE(reg, val), ES_REG(ensoniq, 1371_CODEC)); | 640 | outl(ES_1371_CODEC_WRITE(reg, val) | flag, |
| 641 | ES_REG(ensoniq, 1371_CODEC)); | ||
| 634 | /* restore SRC reg */ | 642 | /* restore SRC reg */ |
| 635 | snd_es1371_wait_src_ready(ensoniq); | 643 | snd_es1371_wait_src_ready(ensoniq); |
| 636 | outl(x, ES_REG(ensoniq, 1371_SMPRATE)); | 644 | outl(x, ES_REG(ensoniq, 1371_SMPRATE)); |
| @@ -647,8 +655,9 @@ static unsigned short snd_es1371_codec_read(struct snd_ac97 *ac97, | |||
| 647 | unsigned short reg) | 655 | unsigned short reg) |
| 648 | { | 656 | { |
| 649 | struct ensoniq *ensoniq = ac97->private_data; | 657 | struct ensoniq *ensoniq = ac97->private_data; |
| 650 | unsigned int t, x, fail = 0; | 658 | unsigned int t, x, flag, fail = 0; |
| 651 | 659 | ||
| 660 | flag = is_ev1938(ensoniq) ? EV_1938_CODEC_MAGIC : 0; | ||
| 652 | __again: | 661 | __again: |
| 653 | mutex_lock(&ensoniq->src_mutex); | 662 | mutex_lock(&ensoniq->src_mutex); |
| 654 | for (t = 0; t < POLL_COUNT; t++) { | 663 | for (t = 0; t < POLL_COUNT; t++) { |
| @@ -671,7 +680,8 @@ static unsigned short snd_es1371_codec_read(struct snd_ac97 *ac97, | |||
| 671 | 0x00010000) | 680 | 0x00010000) |
| 672 | break; | 681 | break; |
| 673 | } | 682 | } |
| 674 | outl(ES_1371_CODEC_READS(reg), ES_REG(ensoniq, 1371_CODEC)); | 683 | outl(ES_1371_CODEC_READS(reg) | flag, |
| 684 | ES_REG(ensoniq, 1371_CODEC)); | ||
| 675 | /* restore SRC reg */ | 685 | /* restore SRC reg */ |
| 676 | snd_es1371_wait_src_ready(ensoniq); | 686 | snd_es1371_wait_src_ready(ensoniq); |
| 677 | outl(x, ES_REG(ensoniq, 1371_SMPRATE)); | 687 | outl(x, ES_REG(ensoniq, 1371_SMPRATE)); |
| @@ -683,6 +693,11 @@ static unsigned short snd_es1371_codec_read(struct snd_ac97 *ac97, | |||
| 683 | /* now wait for the stinkin' data (RDY) */ | 693 | /* now wait for the stinkin' data (RDY) */ |
| 684 | for (t = 0; t < POLL_COUNT; t++) { | 694 | for (t = 0; t < POLL_COUNT; t++) { |
| 685 | if ((x = inl(ES_REG(ensoniq, 1371_CODEC))) & ES_1371_CODEC_RDY) { | 695 | if ((x = inl(ES_REG(ensoniq, 1371_CODEC))) & ES_1371_CODEC_RDY) { |
| 696 | if (is_ev1938(ensoniq)) { | ||
| 697 | for (t = 0; t < 100; t++) | ||
| 698 | inl(ES_REG(ensoniq, CONTROL)); | ||
| 699 | x = inl(ES_REG(ensoniq, 1371_CODEC)); | ||
| 700 | } | ||
| 686 | mutex_unlock(&ensoniq->src_mutex); | 701 | mutex_unlock(&ensoniq->src_mutex); |
| 687 | return ES_1371_CODEC_READ(x); | 702 | return ES_1371_CODEC_READ(x); |
| 688 | } | 703 | } |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 2c79e96d0324..430f41db6044 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
| @@ -3661,7 +3661,7 @@ int snd_hda_codec_build_pcms(struct hda_codec *codec) | |||
| 3661 | * with the proper parameters for set up. | 3661 | * with the proper parameters for set up. |
| 3662 | * ops.cleanup should be called in hw_free for clean up of streams. | 3662 | * ops.cleanup should be called in hw_free for clean up of streams. |
| 3663 | * | 3663 | * |
| 3664 | * This function returns 0 if successfull, or a negative error code. | 3664 | * This function returns 0 if successful, or a negative error code. |
| 3665 | */ | 3665 | */ |
| 3666 | int __devinit snd_hda_build_pcms(struct hda_bus *bus) | 3666 | int __devinit snd_hda_build_pcms(struct hda_bus *bus) |
| 3667 | { | 3667 | { |
| @@ -4851,7 +4851,7 @@ EXPORT_SYMBOL_HDA(snd_hda_suspend); | |||
| 4851 | * | 4851 | * |
| 4852 | * Returns 0 if successful. | 4852 | * Returns 0 if successful. |
| 4853 | * | 4853 | * |
| 4854 | * This fucntion is defined only when POWER_SAVE isn't set. | 4854 | * This function is defined only when POWER_SAVE isn't set. |
| 4855 | * In the power-save mode, the codec is resumed dynamically. | 4855 | * In the power-save mode, the codec is resumed dynamically. |
| 4856 | */ | 4856 | */ |
| 4857 | int snd_hda_resume(struct hda_bus *bus) | 4857 | int snd_hda_resume(struct hda_bus *bus) |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index d08cf31596f3..ad97d937d3a8 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
| @@ -3034,6 +3034,8 @@ static struct snd_pci_quirk cxt5066_cfg_tbl[] = { | |||
| 3034 | SND_PCI_QUIRK(0x17aa, 0x21c5, "Thinkpad Edge 13", CXT5066_THINKPAD), | 3034 | SND_PCI_QUIRK(0x17aa, 0x21c5, "Thinkpad Edge 13", CXT5066_THINKPAD), |
| 3035 | SND_PCI_QUIRK(0x17aa, 0x21c6, "Thinkpad Edge 13", CXT5066_ASUS), | 3035 | SND_PCI_QUIRK(0x17aa, 0x21c6, "Thinkpad Edge 13", CXT5066_ASUS), |
| 3036 | SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo Thinkpad", CXT5066_THINKPAD), | 3036 | SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo Thinkpad", CXT5066_THINKPAD), |
| 3037 | SND_PCI_QUIRK(0x17aa, 0x21da, "Lenovo X220", CXT5066_THINKPAD), | ||
| 3038 | SND_PCI_QUIRK(0x17aa, 0x21db, "Lenovo X220-tablet", CXT5066_THINKPAD), | ||
| 3037 | SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo G560", CXT5066_ASUS), | 3039 | SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo G560", CXT5066_ASUS), |
| 3038 | SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo", CXT5066_IDEAPAD), /* Fallback for Lenovos without dock mic */ | 3040 | SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo", CXT5066_IDEAPAD), /* Fallback for Lenovos without dock mic */ |
| 3039 | {} | 3041 | {} |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 251773e45f61..715615a88a8d 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
| @@ -1280,6 +1280,39 @@ static int simple_playback_pcm_prepare(struct hda_pcm_stream *hinfo, | |||
| 1280 | stream_tag, format, substream); | 1280 | stream_tag, format, substream); |
| 1281 | } | 1281 | } |
| 1282 | 1282 | ||
| 1283 | static void nvhdmi_8ch_7x_set_info_frame_parameters(struct hda_codec *codec, | ||
| 1284 | int channels) | ||
| 1285 | { | ||
| 1286 | unsigned int chanmask; | ||
| 1287 | int chan = channels ? (channels - 1) : 1; | ||
| 1288 | |||
| 1289 | switch (channels) { | ||
| 1290 | default: | ||
| 1291 | case 0: | ||
| 1292 | case 2: | ||
| 1293 | chanmask = 0x00; | ||
| 1294 | break; | ||
| 1295 | case 4: | ||
| 1296 | chanmask = 0x08; | ||
| 1297 | break; | ||
| 1298 | case 6: | ||
| 1299 | chanmask = 0x0b; | ||
| 1300 | break; | ||
| 1301 | case 8: | ||
| 1302 | chanmask = 0x13; | ||
| 1303 | break; | ||
| 1304 | } | ||
| 1305 | |||
| 1306 | /* Set the audio infoframe channel allocation and checksum fields. The | ||
| 1307 | * channel count is computed implicitly by the hardware. */ | ||
| 1308 | snd_hda_codec_write(codec, 0x1, 0, | ||
| 1309 | Nv_VERB_SET_Channel_Allocation, chanmask); | ||
| 1310 | |||
| 1311 | snd_hda_codec_write(codec, 0x1, 0, | ||
| 1312 | Nv_VERB_SET_Info_Frame_Checksum, | ||
| 1313 | (0x71 - chan - chanmask)); | ||
| 1314 | } | ||
| 1315 | |||
| 1283 | static int nvhdmi_8ch_7x_pcm_close(struct hda_pcm_stream *hinfo, | 1316 | static int nvhdmi_8ch_7x_pcm_close(struct hda_pcm_stream *hinfo, |
| 1284 | struct hda_codec *codec, | 1317 | struct hda_codec *codec, |
| 1285 | struct snd_pcm_substream *substream) | 1318 | struct snd_pcm_substream *substream) |
| @@ -1298,6 +1331,10 @@ static int nvhdmi_8ch_7x_pcm_close(struct hda_pcm_stream *hinfo, | |||
| 1298 | AC_VERB_SET_STREAM_FORMAT, 0); | 1331 | AC_VERB_SET_STREAM_FORMAT, 0); |
| 1299 | } | 1332 | } |
| 1300 | 1333 | ||
| 1334 | /* The audio hardware sends a channel count of 0x7 (8ch) when all the | ||
| 1335 | * streams are disabled. */ | ||
| 1336 | nvhdmi_8ch_7x_set_info_frame_parameters(codec, 8); | ||
| 1337 | |||
| 1301 | return snd_hda_multi_out_dig_close(codec, &spec->multiout); | 1338 | return snd_hda_multi_out_dig_close(codec, &spec->multiout); |
| 1302 | } | 1339 | } |
| 1303 | 1340 | ||
| @@ -1308,37 +1345,16 @@ static int nvhdmi_8ch_7x_pcm_prepare(struct hda_pcm_stream *hinfo, | |||
| 1308 | struct snd_pcm_substream *substream) | 1345 | struct snd_pcm_substream *substream) |
| 1309 | { | 1346 | { |
| 1310 | int chs; | 1347 | int chs; |
| 1311 | unsigned int dataDCC1, dataDCC2, chan, chanmask, channel_id; | 1348 | unsigned int dataDCC1, dataDCC2, channel_id; |
| 1312 | int i; | 1349 | int i; |
| 1313 | 1350 | ||
| 1314 | mutex_lock(&codec->spdif_mutex); | 1351 | mutex_lock(&codec->spdif_mutex); |
| 1315 | 1352 | ||
| 1316 | chs = substream->runtime->channels; | 1353 | chs = substream->runtime->channels; |
| 1317 | chan = chs ? (chs - 1) : 1; | ||
| 1318 | 1354 | ||
| 1319 | switch (chs) { | ||
| 1320 | default: | ||
| 1321 | case 0: | ||
| 1322 | case 2: | ||
| 1323 | chanmask = 0x00; | ||
| 1324 | break; | ||
| 1325 | case 4: | ||
| 1326 | chanmask = 0x08; | ||
| 1327 | break; | ||
| 1328 | case 6: | ||
| 1329 | chanmask = 0x0b; | ||
| 1330 | break; | ||
| 1331 | case 8: | ||
| 1332 | chanmask = 0x13; | ||
| 1333 | break; | ||
| 1334 | } | ||
| 1335 | dataDCC1 = AC_DIG1_ENABLE | AC_DIG1_COPYRIGHT; | 1355 | dataDCC1 = AC_DIG1_ENABLE | AC_DIG1_COPYRIGHT; |
| 1336 | dataDCC2 = 0x2; | 1356 | dataDCC2 = 0x2; |
| 1337 | 1357 | ||
| 1338 | /* set the Audio InforFrame Channel Allocation */ | ||
| 1339 | snd_hda_codec_write(codec, 0x1, 0, | ||
| 1340 | Nv_VERB_SET_Channel_Allocation, chanmask); | ||
| 1341 | |||
| 1342 | /* turn off SPDIF once; otherwise the IEC958 bits won't be updated */ | 1358 | /* turn off SPDIF once; otherwise the IEC958 bits won't be updated */ |
| 1343 | if (codec->spdif_status_reset && (codec->spdif_ctls & AC_DIG1_ENABLE)) | 1359 | if (codec->spdif_status_reset && (codec->spdif_ctls & AC_DIG1_ENABLE)) |
| 1344 | snd_hda_codec_write(codec, | 1360 | snd_hda_codec_write(codec, |
| @@ -1413,10 +1429,7 @@ static int nvhdmi_8ch_7x_pcm_prepare(struct hda_pcm_stream *hinfo, | |||
| 1413 | } | 1429 | } |
| 1414 | } | 1430 | } |
| 1415 | 1431 | ||
| 1416 | /* set the Audio Info Frame Checksum */ | 1432 | nvhdmi_8ch_7x_set_info_frame_parameters(codec, chs); |
| 1417 | snd_hda_codec_write(codec, 0x1, 0, | ||
| 1418 | Nv_VERB_SET_Info_Frame_Checksum, | ||
| 1419 | (0x71 - chan - chanmask)); | ||
| 1420 | 1433 | ||
| 1421 | mutex_unlock(&codec->spdif_mutex); | 1434 | mutex_unlock(&codec->spdif_mutex); |
| 1422 | return 0; | 1435 | return 0; |
| @@ -1512,6 +1525,11 @@ static int patch_nvhdmi_8ch_7x(struct hda_codec *codec) | |||
| 1512 | spec->multiout.max_channels = 8; | 1525 | spec->multiout.max_channels = 8; |
| 1513 | spec->pcm_playback = &nvhdmi_pcm_playback_8ch_7x; | 1526 | spec->pcm_playback = &nvhdmi_pcm_playback_8ch_7x; |
| 1514 | codec->patch_ops = nvhdmi_patch_ops_8ch_7x; | 1527 | codec->patch_ops = nvhdmi_patch_ops_8ch_7x; |
| 1528 | |||
| 1529 | /* Initialize the audio infoframe channel mask and checksum to something | ||
| 1530 | * valid */ | ||
| 1531 | nvhdmi_8ch_7x_set_info_frame_parameters(codec, 8); | ||
| 1532 | |||
| 1515 | return 0; | 1533 | return 0; |
| 1516 | } | 1534 | } |
| 1517 | 1535 | ||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 0ef0035fe99f..52928d9a72da 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
| @@ -549,7 +549,7 @@ static int alc_ch_mode_put(struct snd_kcontrol *kcontrol, | |||
| 549 | 549 | ||
| 550 | /* | 550 | /* |
| 551 | * Control the mode of pin widget settings via the mixer. "pc" is used | 551 | * Control the mode of pin widget settings via the mixer. "pc" is used |
| 552 | * instead of "%" to avoid consequences of accidently treating the % as | 552 | * instead of "%" to avoid consequences of accidentally treating the % as |
| 553 | * being part of a format specifier. Maximum allowed length of a value is | 553 | * being part of a format specifier. Maximum allowed length of a value is |
| 554 | * 63 characters plus NULL terminator. | 554 | * 63 characters plus NULL terminator. |
| 555 | * | 555 | * |
| @@ -9836,7 +9836,7 @@ static struct snd_pci_quirk alc882_cfg_tbl[] = { | |||
| 9836 | 9836 | ||
| 9837 | SND_PCI_QUIRK(0x1028, 0x020d, "Dell Inspiron 530", ALC888_6ST_DELL), | 9837 | SND_PCI_QUIRK(0x1028, 0x020d, "Dell Inspiron 530", ALC888_6ST_DELL), |
| 9838 | 9838 | ||
| 9839 | SND_PCI_QUIRK(0x103c, 0x2a3d, "HP Pavillion", ALC883_6ST_DIG), | 9839 | SND_PCI_QUIRK(0x103c, 0x2a3d, "HP Pavilion", ALC883_6ST_DIG), |
| 9840 | SND_PCI_QUIRK(0x103c, 0x2a4f, "HP Samba", ALC888_3ST_HP), | 9840 | SND_PCI_QUIRK(0x103c, 0x2a4f, "HP Samba", ALC888_3ST_HP), |
| 9841 | SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP), | 9841 | SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP), |
| 9842 | SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG), | 9842 | SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG), |
| @@ -9863,7 +9863,6 @@ static struct snd_pci_quirk alc882_cfg_tbl[] = { | |||
| 9863 | SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), | 9863 | SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), |
| 9864 | SND_PCI_QUIRK(0x10f1, 0x2350, "TYAN-S2350", ALC888_6ST_DELL), | 9864 | SND_PCI_QUIRK(0x10f1, 0x2350, "TYAN-S2350", ALC888_6ST_DELL), |
| 9865 | SND_PCI_QUIRK(0x108e, 0x534d, NULL, ALC883_3ST_6ch), | 9865 | SND_PCI_QUIRK(0x108e, 0x534d, NULL, ALC883_3ST_6ch), |
| 9866 | SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte P35 DS3R", ALC882_6ST_DIG), | ||
| 9867 | 9866 | ||
| 9868 | SND_PCI_QUIRK(0x1462, 0x0349, "MSI", ALC883_TARGA_2ch_DIG), | 9867 | SND_PCI_QUIRK(0x1462, 0x0349, "MSI", ALC883_TARGA_2ch_DIG), |
| 9869 | SND_PCI_QUIRK(0x1462, 0x040d, "MSI", ALC883_TARGA_2ch_DIG), | 9868 | SND_PCI_QUIRK(0x1462, 0x040d, "MSI", ALC883_TARGA_2ch_DIG), |
| @@ -10700,6 +10699,7 @@ enum { | |||
| 10700 | PINFIX_LENOVO_Y530, | 10699 | PINFIX_LENOVO_Y530, |
| 10701 | PINFIX_PB_M5210, | 10700 | PINFIX_PB_M5210, |
| 10702 | PINFIX_ACER_ASPIRE_7736, | 10701 | PINFIX_ACER_ASPIRE_7736, |
| 10702 | PINFIX_GIGABYTE_880GM, | ||
| 10703 | }; | 10703 | }; |
| 10704 | 10704 | ||
| 10705 | static const struct alc_fixup alc882_fixups[] = { | 10705 | static const struct alc_fixup alc882_fixups[] = { |
| @@ -10731,6 +10731,13 @@ static const struct alc_fixup alc882_fixups[] = { | |||
| 10731 | .type = ALC_FIXUP_SKU, | 10731 | .type = ALC_FIXUP_SKU, |
| 10732 | .v.sku = ALC_FIXUP_SKU_IGNORE, | 10732 | .v.sku = ALC_FIXUP_SKU_IGNORE, |
| 10733 | }, | 10733 | }, |
| 10734 | [PINFIX_GIGABYTE_880GM] = { | ||
| 10735 | .type = ALC_FIXUP_PINS, | ||
| 10736 | .v.pins = (const struct alc_pincfg[]) { | ||
| 10737 | { 0x14, 0x1114410 }, /* set as speaker */ | ||
| 10738 | { } | ||
| 10739 | } | ||
| 10740 | }, | ||
| 10734 | }; | 10741 | }; |
| 10735 | 10742 | ||
| 10736 | static struct snd_pci_quirk alc882_fixup_tbl[] = { | 10743 | static struct snd_pci_quirk alc882_fixup_tbl[] = { |
| @@ -10738,6 +10745,7 @@ static struct snd_pci_quirk alc882_fixup_tbl[] = { | |||
| 10738 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", PINFIX_LENOVO_Y530), | 10745 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", PINFIX_LENOVO_Y530), |
| 10739 | SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", PINFIX_ABIT_AW9D_MAX), | 10746 | SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", PINFIX_ABIT_AW9D_MAX), |
| 10740 | SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", PINFIX_ACER_ASPIRE_7736), | 10747 | SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", PINFIX_ACER_ASPIRE_7736), |
| 10748 | SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte", PINFIX_GIGABYTE_880GM), | ||
| 10741 | {} | 10749 | {} |
| 10742 | }; | 10750 | }; |
| 10743 | 10751 | ||
| @@ -14116,7 +14124,7 @@ static hda_nid_t alc269vb_capsrc_nids[1] = { | |||
| 14116 | }; | 14124 | }; |
| 14117 | 14125 | ||
| 14118 | static hda_nid_t alc269_adc_candidates[] = { | 14126 | static hda_nid_t alc269_adc_candidates[] = { |
| 14119 | 0x08, 0x09, 0x07, | 14127 | 0x08, 0x09, 0x07, 0x11, |
| 14120 | }; | 14128 | }; |
| 14121 | 14129 | ||
| 14122 | #define alc269_modes alc260_modes | 14130 | #define alc269_modes alc260_modes |
| @@ -18774,8 +18782,6 @@ static struct snd_pci_quirk alc662_cfg_tbl[] = { | |||
| 18774 | ALC662_3ST_6ch_DIG), | 18782 | ALC662_3ST_6ch_DIG), |
| 18775 | SND_PCI_QUIRK(0x1179, 0xff6e, "Toshiba NB20x", ALC662_AUTO), | 18783 | SND_PCI_QUIRK(0x1179, 0xff6e, "Toshiba NB20x", ALC662_AUTO), |
| 18776 | SND_PCI_QUIRK(0x144d, 0xca00, "Samsung NC10", ALC272_SAMSUNG_NC10), | 18784 | SND_PCI_QUIRK(0x144d, 0xca00, "Samsung NC10", ALC272_SAMSUNG_NC10), |
| 18777 | SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte 945GCM-S2L", | ||
| 18778 | ALC662_3ST_6ch_DIG), | ||
| 18779 | SND_PCI_QUIRK(0x152d, 0x2304, "Quanta WH1", ALC663_ASUS_H13), | 18785 | SND_PCI_QUIRK(0x152d, 0x2304, "Quanta WH1", ALC663_ASUS_H13), |
| 18780 | SND_PCI_QUIRK(0x1565, 0x820f, "Biostar TA780G M2+", ALC662_3ST_6ch_DIG), | 18786 | SND_PCI_QUIRK(0x1565, 0x820f, "Biostar TA780G M2+", ALC662_3ST_6ch_DIG), |
| 18781 | SND_PCI_QUIRK(0x1631, 0xc10c, "PB RS65", ALC663_ASUS_M51VA), | 18787 | SND_PCI_QUIRK(0x1631, 0xc10c, "PB RS65", ALC663_ASUS_M51VA), |
| @@ -19449,6 +19455,7 @@ enum { | |||
| 19449 | ALC662_FIXUP_IDEAPAD, | 19455 | ALC662_FIXUP_IDEAPAD, |
| 19450 | ALC272_FIXUP_MARIO, | 19456 | ALC272_FIXUP_MARIO, |
| 19451 | ALC662_FIXUP_CZC_P10T, | 19457 | ALC662_FIXUP_CZC_P10T, |
| 19458 | ALC662_FIXUP_GIGABYTE, | ||
| 19452 | }; | 19459 | }; |
| 19453 | 19460 | ||
| 19454 | static const struct alc_fixup alc662_fixups[] = { | 19461 | static const struct alc_fixup alc662_fixups[] = { |
| @@ -19477,12 +19484,20 @@ static const struct alc_fixup alc662_fixups[] = { | |||
| 19477 | {} | 19484 | {} |
| 19478 | } | 19485 | } |
| 19479 | }, | 19486 | }, |
| 19487 | [ALC662_FIXUP_GIGABYTE] = { | ||
| 19488 | .type = ALC_FIXUP_PINS, | ||
| 19489 | .v.pins = (const struct alc_pincfg[]) { | ||
| 19490 | { 0x14, 0x1114410 }, /* set as speaker */ | ||
| 19491 | { } | ||
| 19492 | } | ||
| 19493 | }, | ||
| 19480 | }; | 19494 | }; |
| 19481 | 19495 | ||
| 19482 | static struct snd_pci_quirk alc662_fixup_tbl[] = { | 19496 | static struct snd_pci_quirk alc662_fixup_tbl[] = { |
| 19483 | SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE), | 19497 | SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE), |
| 19484 | SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), | 19498 | SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), |
| 19485 | SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD), | 19499 | SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD), |
| 19500 | SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte", ALC662_FIXUP_GIGABYTE), | ||
| 19486 | SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD), | 19501 | SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD), |
| 19487 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD), | 19502 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD), |
| 19488 | SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T), | 19503 | SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T), |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 05fcd60cc46f..94d19c03a7f4 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
| @@ -2475,7 +2475,7 @@ static int stac92xx_hp_switch_put(struct snd_kcontrol *kcontrol, | |||
| 2475 | 2475 | ||
| 2476 | spec->hp_switch = ucontrol->value.integer.value[0] ? nid : 0; | 2476 | spec->hp_switch = ucontrol->value.integer.value[0] ? nid : 0; |
| 2477 | 2477 | ||
| 2478 | /* check to be sure that the ports are upto date with | 2478 | /* check to be sure that the ports are up to date with |
| 2479 | * switch changes | 2479 | * switch changes |
| 2480 | */ | 2480 | */ |
| 2481 | stac_issue_unsol_event(codec, nid); | 2481 | stac_issue_unsol_event(codec, nid); |
| @@ -3408,6 +3408,9 @@ static int get_connection_index(struct hda_codec *codec, hda_nid_t mux, | |||
| 3408 | hda_nid_t conn[HDA_MAX_NUM_INPUTS]; | 3408 | hda_nid_t conn[HDA_MAX_NUM_INPUTS]; |
| 3409 | int i, nums; | 3409 | int i, nums; |
| 3410 | 3410 | ||
| 3411 | if (!(get_wcaps(codec, mux) & AC_WCAP_CONN_LIST)) | ||
| 3412 | return -1; | ||
| 3413 | |||
| 3411 | nums = snd_hda_get_connections(codec, mux, conn, ARRAY_SIZE(conn)); | 3414 | nums = snd_hda_get_connections(codec, mux, conn, ARRAY_SIZE(conn)); |
| 3412 | for (i = 0; i < nums; i++) | 3415 | for (i = 0; i < nums; i++) |
| 3413 | if (conn[i] == nid) | 3416 | if (conn[i] == nid) |
diff --git a/sound/pci/ice1712/aureon.c b/sound/pci/ice1712/aureon.c index 2f6252266a02..3e4f8c12ffce 100644 --- a/sound/pci/ice1712/aureon.c +++ b/sound/pci/ice1712/aureon.c | |||
| @@ -148,7 +148,7 @@ static void aureon_pca9554_write(struct snd_ice1712 *ice, unsigned char reg, | |||
| 148 | udelay(100); | 148 | udelay(100); |
| 149 | /* | 149 | /* |
| 150 | * send device address, command and value, | 150 | * send device address, command and value, |
| 151 | * skipping ack cycles inbetween | 151 | * skipping ack cycles in between |
| 152 | */ | 152 | */ |
| 153 | for (j = 0; j < 3; j++) { | 153 | for (j = 0; j < 3; j++) { |
| 154 | switch (j) { | 154 | switch (j) { |
| @@ -2143,7 +2143,7 @@ static int __devinit aureon_init(struct snd_ice1712 *ice) | |||
| 2143 | ice->num_total_adcs = 2; | 2143 | ice->num_total_adcs = 2; |
| 2144 | } | 2144 | } |
| 2145 | 2145 | ||
| 2146 | /* to remeber the register values of CS8415 */ | 2146 | /* to remember the register values of CS8415 */ |
| 2147 | ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL); | 2147 | ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL); |
| 2148 | if (!ice->akm) | 2148 | if (!ice->akm) |
| 2149 | return -ENOMEM; | 2149 | return -ENOMEM; |
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index 4fc6d8bc637e..f4594d76b6ea 100644 --- a/sound/pci/ice1712/ice1712.c +++ b/sound/pci/ice1712/ice1712.c | |||
| @@ -2755,7 +2755,7 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci, | |||
| 2755 | return err; | 2755 | return err; |
| 2756 | } | 2756 | } |
| 2757 | if (c->mpu401_1_name) | 2757 | if (c->mpu401_1_name) |
| 2758 | /* Prefered name available in card_info */ | 2758 | /* Preferred name available in card_info */ |
| 2759 | snprintf(ice->rmidi[0]->name, | 2759 | snprintf(ice->rmidi[0]->name, |
| 2760 | sizeof(ice->rmidi[0]->name), | 2760 | sizeof(ice->rmidi[0]->name), |
| 2761 | "%s %d", c->mpu401_1_name, card->number); | 2761 | "%s %d", c->mpu401_1_name, card->number); |
| @@ -2772,7 +2772,7 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci, | |||
| 2772 | return err; | 2772 | return err; |
| 2773 | } | 2773 | } |
| 2774 | if (c->mpu401_2_name) | 2774 | if (c->mpu401_2_name) |
| 2775 | /* Prefered name available in card_info */ | 2775 | /* Preferred name available in card_info */ |
| 2776 | snprintf(ice->rmidi[1]->name, | 2776 | snprintf(ice->rmidi[1]->name, |
| 2777 | sizeof(ice->rmidi[1]->name), | 2777 | sizeof(ice->rmidi[1]->name), |
| 2778 | "%s %d", c->mpu401_2_name, | 2778 | "%s %d", c->mpu401_2_name, |
diff --git a/sound/pci/ice1712/pontis.c b/sound/pci/ice1712/pontis.c index cdb873f5da50..92c1160d7ab5 100644 --- a/sound/pci/ice1712/pontis.c +++ b/sound/pci/ice1712/pontis.c | |||
| @@ -768,7 +768,7 @@ static int __devinit pontis_init(struct snd_ice1712 *ice) | |||
| 768 | ice->num_total_dacs = 2; | 768 | ice->num_total_dacs = 2; |
| 769 | ice->num_total_adcs = 2; | 769 | ice->num_total_adcs = 2; |
| 770 | 770 | ||
| 771 | /* to remeber the register values */ | 771 | /* to remember the register values */ |
| 772 | ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL); | 772 | ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL); |
| 773 | if (! ice->akm) | 773 | if (! ice->akm) |
| 774 | return -ENOMEM; | 774 | return -ENOMEM; |
diff --git a/sound/pci/ice1712/prodigy_hifi.c b/sound/pci/ice1712/prodigy_hifi.c index 6a9fee3ee78f..764cc93dbca4 100644 --- a/sound/pci/ice1712/prodigy_hifi.c +++ b/sound/pci/ice1712/prodigy_hifi.c | |||
| @@ -1046,7 +1046,7 @@ static int __devinit prodigy_hifi_init(struct snd_ice1712 *ice) | |||
| 1046 | * don't call snd_ice1712_gpio_get/put(), otherwise it's overwritten | 1046 | * don't call snd_ice1712_gpio_get/put(), otherwise it's overwritten |
| 1047 | */ | 1047 | */ |
| 1048 | ice->gpio.saved[0] = 0; | 1048 | ice->gpio.saved[0] = 0; |
| 1049 | /* to remeber the register values */ | 1049 | /* to remember the register values */ |
| 1050 | 1050 | ||
| 1051 | ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL); | 1051 | ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL); |
| 1052 | if (! ice->akm) | 1052 | if (! ice->akm) |
| @@ -1128,7 +1128,7 @@ static int __devinit prodigy_hd2_init(struct snd_ice1712 *ice) | |||
| 1128 | * don't call snd_ice1712_gpio_get/put(), otherwise it's overwritten | 1128 | * don't call snd_ice1712_gpio_get/put(), otherwise it's overwritten |
| 1129 | */ | 1129 | */ |
| 1130 | ice->gpio.saved[0] = 0; | 1130 | ice->gpio.saved[0] = 0; |
| 1131 | /* to remeber the register values */ | 1131 | /* to remember the register values */ |
| 1132 | 1132 | ||
| 1133 | ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL); | 1133 | ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL); |
| 1134 | if (! ice->akm) | 1134 | if (! ice->akm) |
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 629a5494347a..6c896dbfd796 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
| @@ -534,7 +534,7 @@ static int snd_intel8x0_codec_semaphore(struct intel8x0 *chip, unsigned int code | |||
| 534 | udelay(10); | 534 | udelay(10); |
| 535 | } while (time--); | 535 | } while (time--); |
| 536 | 536 | ||
| 537 | /* access to some forbidden (non existant) ac97 registers will not | 537 | /* access to some forbidden (non existent) ac97 registers will not |
| 538 | * reset the semaphore. So even if you don't get the semaphore, still | 538 | * reset the semaphore. So even if you don't get the semaphore, still |
| 539 | * continue the access. We don't need the semaphore anyway. */ | 539 | * continue the access. We don't need the semaphore anyway. */ |
| 540 | snd_printk(KERN_ERR "codec_semaphore: semaphore is not ready [0x%x][0x%x]\n", | 540 | snd_printk(KERN_ERR "codec_semaphore: semaphore is not ready [0x%x][0x%x]\n", |
diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c index 2ae8d29500a8..27709f0cd2a6 100644 --- a/sound/pci/intel8x0m.c +++ b/sound/pci/intel8x0m.c | |||
| @@ -331,7 +331,7 @@ static int snd_intel8x0m_codec_semaphore(struct intel8x0m *chip, unsigned int co | |||
| 331 | udelay(10); | 331 | udelay(10); |
| 332 | } while (time--); | 332 | } while (time--); |
| 333 | 333 | ||
| 334 | /* access to some forbidden (non existant) ac97 registers will not | 334 | /* access to some forbidden (non existent) ac97 registers will not |
| 335 | * reset the semaphore. So even if you don't get the semaphore, still | 335 | * reset the semaphore. So even if you don't get the semaphore, still |
| 336 | * continue the access. We don't need the semaphore anyway. */ | 336 | * continue the access. We don't need the semaphore anyway. */ |
| 337 | snd_printk(KERN_ERR "codec_semaphore: semaphore is not ready [0x%x][0x%x]\n", | 337 | snd_printk(KERN_ERR "codec_semaphore: semaphore is not ready [0x%x][0x%x]\n", |
diff --git a/sound/pci/mixart/mixart_core.c b/sound/pci/mixart/mixart_core.c index d3350f383966..3df0f530f67c 100644 --- a/sound/pci/mixart/mixart_core.c +++ b/sound/pci/mixart/mixart_core.c | |||
| @@ -265,7 +265,7 @@ int snd_mixart_send_msg(struct mixart_mgr *mgr, struct mixart_msg *request, int | |||
| 265 | if (! timeout) { | 265 | if (! timeout) { |
| 266 | /* error - no ack */ | 266 | /* error - no ack */ |
| 267 | mutex_unlock(&mgr->msg_mutex); | 267 | mutex_unlock(&mgr->msg_mutex); |
| 268 | snd_printk(KERN_ERR "error: no reponse on msg %x\n", msg_frame); | 268 | snd_printk(KERN_ERR "error: no response on msg %x\n", msg_frame); |
| 269 | return -EIO; | 269 | return -EIO; |
| 270 | } | 270 | } |
| 271 | 271 | ||
| @@ -278,7 +278,7 @@ int snd_mixart_send_msg(struct mixart_mgr *mgr, struct mixart_msg *request, int | |||
| 278 | err = get_msg(mgr, &resp, msg_frame); | 278 | err = get_msg(mgr, &resp, msg_frame); |
| 279 | 279 | ||
| 280 | if( request->message_id != resp.message_id ) | 280 | if( request->message_id != resp.message_id ) |
| 281 | snd_printk(KERN_ERR "REPONSE ERROR!\n"); | 281 | snd_printk(KERN_ERR "RESPONSE ERROR!\n"); |
| 282 | 282 | ||
| 283 | mutex_unlock(&mgr->msg_mutex); | 283 | mutex_unlock(&mgr->msg_mutex); |
| 284 | return err; | 284 | return err; |
diff --git a/sound/pci/pcxhr/pcxhr_core.c b/sound/pci/pcxhr/pcxhr_core.c index 833e7180ad2d..304411c1fe4b 100644 --- a/sound/pci/pcxhr/pcxhr_core.c +++ b/sound/pci/pcxhr/pcxhr_core.c | |||
| @@ -1042,11 +1042,11 @@ void pcxhr_msg_tasklet(unsigned long arg) | |||
| 1042 | int i, j; | 1042 | int i, j; |
| 1043 | 1043 | ||
| 1044 | if (mgr->src_it_dsp & PCXHR_IRQ_FREQ_CHANGE) | 1044 | if (mgr->src_it_dsp & PCXHR_IRQ_FREQ_CHANGE) |
| 1045 | snd_printdd("TASKLET : PCXHR_IRQ_FREQ_CHANGE event occured\n"); | 1045 | snd_printdd("TASKLET : PCXHR_IRQ_FREQ_CHANGE event occurred\n"); |
| 1046 | if (mgr->src_it_dsp & PCXHR_IRQ_TIME_CODE) | 1046 | if (mgr->src_it_dsp & PCXHR_IRQ_TIME_CODE) |
| 1047 | snd_printdd("TASKLET : PCXHR_IRQ_TIME_CODE event occured\n"); | 1047 | snd_printdd("TASKLET : PCXHR_IRQ_TIME_CODE event occurred\n"); |
| 1048 | if (mgr->src_it_dsp & PCXHR_IRQ_NOTIFY) | 1048 | if (mgr->src_it_dsp & PCXHR_IRQ_NOTIFY) |
| 1049 | snd_printdd("TASKLET : PCXHR_IRQ_NOTIFY event occured\n"); | 1049 | snd_printdd("TASKLET : PCXHR_IRQ_NOTIFY event occurred\n"); |
| 1050 | if (mgr->src_it_dsp & (PCXHR_IRQ_FREQ_CHANGE | PCXHR_IRQ_TIME_CODE)) { | 1050 | if (mgr->src_it_dsp & (PCXHR_IRQ_FREQ_CHANGE | PCXHR_IRQ_TIME_CODE)) { |
| 1051 | /* clear events FREQ_CHANGE and TIME_CODE */ | 1051 | /* clear events FREQ_CHANGE and TIME_CODE */ |
| 1052 | pcxhr_init_rmh(prmh, CMD_TEST_IT); | 1052 | pcxhr_init_rmh(prmh, CMD_TEST_IT); |
| @@ -1055,7 +1055,7 @@ void pcxhr_msg_tasklet(unsigned long arg) | |||
| 1055 | err, prmh->stat[0]); | 1055 | err, prmh->stat[0]); |
| 1056 | } | 1056 | } |
| 1057 | if (mgr->src_it_dsp & PCXHR_IRQ_ASYNC) { | 1057 | if (mgr->src_it_dsp & PCXHR_IRQ_ASYNC) { |
| 1058 | snd_printdd("TASKLET : PCXHR_IRQ_ASYNC event occured\n"); | 1058 | snd_printdd("TASKLET : PCXHR_IRQ_ASYNC event occurred\n"); |
| 1059 | 1059 | ||
| 1060 | pcxhr_init_rmh(prmh, CMD_ASYNC); | 1060 | pcxhr_init_rmh(prmh, CMD_ASYNC); |
| 1061 | prmh->cmd[0] |= 1; /* add SEL_ASYNC_EVENTS */ | 1061 | prmh->cmd[0] |= 1; /* add SEL_ASYNC_EVENTS */ |
| @@ -1233,7 +1233,7 @@ irqreturn_t pcxhr_interrupt(int irq, void *dev_id) | |||
| 1233 | reg = PCXHR_INPL(mgr, PCXHR_PLX_L2PCIDB); | 1233 | reg = PCXHR_INPL(mgr, PCXHR_PLX_L2PCIDB); |
| 1234 | PCXHR_OUTPL(mgr, PCXHR_PLX_L2PCIDB, reg); | 1234 | PCXHR_OUTPL(mgr, PCXHR_PLX_L2PCIDB, reg); |
| 1235 | 1235 | ||
| 1236 | /* timer irq occured */ | 1236 | /* timer irq occurred */ |
| 1237 | if (reg & PCXHR_IRQ_TIMER) { | 1237 | if (reg & PCXHR_IRQ_TIMER) { |
| 1238 | int timer_toggle = reg & PCXHR_IRQ_TIMER; | 1238 | int timer_toggle = reg & PCXHR_IRQ_TIMER; |
| 1239 | /* is a 24 bit counter */ | 1239 | /* is a 24 bit counter */ |
| @@ -1288,7 +1288,7 @@ irqreturn_t pcxhr_interrupt(int irq, void *dev_id) | |||
| 1288 | if (reg & PCXHR_IRQ_MASK) { | 1288 | if (reg & PCXHR_IRQ_MASK) { |
| 1289 | if (reg & PCXHR_IRQ_ASYNC) { | 1289 | if (reg & PCXHR_IRQ_ASYNC) { |
| 1290 | /* as we didn't request any async notifications, | 1290 | /* as we didn't request any async notifications, |
| 1291 | * some kind of xrun error will probably occured | 1291 | * some kind of xrun error will probably occurred |
| 1292 | */ | 1292 | */ |
| 1293 | /* better resynchronize all streams next interrupt : */ | 1293 | /* better resynchronize all streams next interrupt : */ |
| 1294 | mgr->dsp_time_last = PCXHR_DSP_TIME_INVALID; | 1294 | mgr->dsp_time_last = PCXHR_DSP_TIME_INVALID; |
diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c index d5f5b440fc40..9ff247fc8871 100644 --- a/sound/pci/rme96.c +++ b/sound/pci/rme96.c | |||
| @@ -150,7 +150,7 @@ MODULE_PARM_DESC(enable, "Enable RME Digi96 soundcard."); | |||
| 150 | #define RME96_RCR_BITPOS_F1 28 | 150 | #define RME96_RCR_BITPOS_F1 28 |
| 151 | #define RME96_RCR_BITPOS_F2 29 | 151 | #define RME96_RCR_BITPOS_F2 29 |
| 152 | 152 | ||
| 153 | /* Additonal register bits */ | 153 | /* Additional register bits */ |
| 154 | #define RME96_AR_WSEL (1 << 0) | 154 | #define RME96_AR_WSEL (1 << 0) |
| 155 | #define RME96_AR_ANALOG (1 << 1) | 155 | #define RME96_AR_ANALOG (1 << 1) |
| 156 | #define RME96_AR_FREQPAD_0 (1 << 2) | 156 | #define RME96_AR_FREQPAD_0 (1 << 2) |
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index a323eafb9e03..949691a876d3 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c | |||
| @@ -391,7 +391,7 @@ MODULE_SUPPORTED_DEVICE("{{RME HDSPM-MADI}}"); | |||
| 391 | 391 | ||
| 392 | /* Status2 Register bits */ /* MADI ONLY */ | 392 | /* Status2 Register bits */ /* MADI ONLY */ |
| 393 | 393 | ||
| 394 | #define HDSPM_version0 (1<<0) /* not realy defined but I guess */ | 394 | #define HDSPM_version0 (1<<0) /* not really defined but I guess */ |
| 395 | #define HDSPM_version1 (1<<1) /* in former cards it was ??? */ | 395 | #define HDSPM_version1 (1<<1) /* in former cards it was ??? */ |
| 396 | #define HDSPM_version2 (1<<2) | 396 | #define HDSPM_version2 (1<<2) |
| 397 | 397 | ||
| @@ -936,7 +936,7 @@ struct hdspm { | |||
| 936 | struct snd_kcontrol *playback_mixer_ctls[HDSPM_MAX_CHANNELS]; | 936 | struct snd_kcontrol *playback_mixer_ctls[HDSPM_MAX_CHANNELS]; |
| 937 | /* but input to much, so not used */ | 937 | /* but input to much, so not used */ |
| 938 | struct snd_kcontrol *input_mixer_ctls[HDSPM_MAX_CHANNELS]; | 938 | struct snd_kcontrol *input_mixer_ctls[HDSPM_MAX_CHANNELS]; |
| 939 | /* full mixer accessable over mixer ioctl or hwdep-device */ | 939 | /* full mixer accessible over mixer ioctl or hwdep-device */ |
| 940 | struct hdspm_mixer *mixer; | 940 | struct hdspm_mixer *mixer; |
| 941 | 941 | ||
| 942 | struct hdspm_tco *tco; /* NULL if no TCO detected */ | 942 | struct hdspm_tco *tco; /* NULL if no TCO detected */ |
diff --git a/sound/pci/sis7019.c b/sound/pci/sis7019.c index 1b8f6742b5fa..2b5c7a95ae1f 100644 --- a/sound/pci/sis7019.c +++ b/sound/pci/sis7019.c | |||
| @@ -308,7 +308,7 @@ static irqreturn_t sis_interrupt(int irq, void *dev) | |||
| 308 | u32 intr, status; | 308 | u32 intr, status; |
| 309 | 309 | ||
| 310 | /* We only use the DMA interrupts, and we don't enable any other | 310 | /* We only use the DMA interrupts, and we don't enable any other |
| 311 | * source of interrupts. But, it is possible to see an interupt | 311 | * source of interrupts. But, it is possible to see an interrupt |
| 312 | * status that didn't actually interrupt us, so eliminate anything | 312 | * status that didn't actually interrupt us, so eliminate anything |
| 313 | * we're not expecting to avoid falsely claiming an IRQ, and an | 313 | * we're not expecting to avoid falsely claiming an IRQ, and an |
| 314 | * ensuing endless loop. | 314 | * ensuing endless loop. |
| @@ -773,7 +773,7 @@ static void sis_prepare_timing_voice(struct voice *voice, | |||
| 773 | vperiod = 0; | 773 | vperiod = 0; |
| 774 | } | 774 | } |
| 775 | 775 | ||
| 776 | /* The interrupt handler implements the timing syncronization, so | 776 | /* The interrupt handler implements the timing synchronization, so |
| 777 | * setup its state. | 777 | * setup its state. |
| 778 | */ | 778 | */ |
| 779 | timing->flags |= VOICE_SYNC_TIMING; | 779 | timing->flags |= VOICE_SYNC_TIMING; |
| @@ -1139,7 +1139,7 @@ static int sis_chip_init(struct sis7019 *sis) | |||
| 1139 | */ | 1139 | */ |
| 1140 | outl(SIS_DMA_CSR_PCI_SETTINGS, io + SIS_DMA_CSR); | 1140 | outl(SIS_DMA_CSR_PCI_SETTINGS, io + SIS_DMA_CSR); |
| 1141 | 1141 | ||
| 1142 | /* Reset the syncronization groups for all of the channels | 1142 | /* Reset the synchronization groups for all of the channels |
| 1143 | * to be asyncronous. If we start doing SPDIF or 5.1 sound, etc. | 1143 | * to be asyncronous. If we start doing SPDIF or 5.1 sound, etc. |
| 1144 | * we'll need to change how we handle these. Until then, we just | 1144 | * we'll need to change how we handle these. Until then, we just |
| 1145 | * assign sub-mixer 0 to all playback channels, and avoid any | 1145 | * assign sub-mixer 0 to all playback channels, and avoid any |
diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c index edce8a27e3ee..bc823a547550 100644 --- a/sound/ppc/snd_ps3.c +++ b/sound/ppc/snd_ps3.c | |||
| @@ -358,7 +358,7 @@ static irqreturn_t snd_ps3_interrupt(int irq, void *dev_id) | |||
| 358 | * filling dummy data, serial automatically start to | 358 | * filling dummy data, serial automatically start to |
| 359 | * consume them and then will generate normal buffer | 359 | * consume them and then will generate normal buffer |
| 360 | * empty interrupts. | 360 | * empty interrupts. |
| 361 | * If both buffer underflow and buffer empty are occured, | 361 | * If both buffer underflow and buffer empty are occurred, |
| 362 | * it is better to do nomal data transfer than empty one | 362 | * it is better to do nomal data transfer than empty one |
| 363 | */ | 363 | */ |
| 364 | snd_ps3_program_dma(card, | 364 | snd_ps3_program_dma(card, |
diff --git a/sound/ppc/snd_ps3_reg.h b/sound/ppc/snd_ps3_reg.h index 03fdee4aaaf2..2e6302079566 100644 --- a/sound/ppc/snd_ps3_reg.h +++ b/sound/ppc/snd_ps3_reg.h | |||
| @@ -125,7 +125,7 @@ | |||
| 125 | transfers. Any interrupts associated with the canceled transfers | 125 | transfers. Any interrupts associated with the canceled transfers |
| 126 | will occur as if the transfer had finished. | 126 | will occur as if the transfer had finished. |
| 127 | Since this bit is designed to recover from DMA related issues | 127 | Since this bit is designed to recover from DMA related issues |
| 128 | which are caused by unpredictable situations, it is prefered to wait | 128 | which are caused by unpredictable situations, it is preferred to wait |
| 129 | for normal DMA transfer end without using this bit. | 129 | for normal DMA transfer end without using this bit. |
| 130 | */ | 130 | */ |
| 131 | #define PS3_AUDIO_CONFIG_CLEAR (1 << 8) /* RWIVF */ | 131 | #define PS3_AUDIO_CONFIG_CLEAR (1 << 8) /* RWIVF */ |
| @@ -316,13 +316,13 @@ DISABLED=Interrupt generation disabled. | |||
| 316 | 316 | ||
| 317 | /* | 317 | /* |
| 318 | Audio Port Interrupt Status Register | 318 | Audio Port Interrupt Status Register |
| 319 | Indicates Interrupt status, which interrupt has occured, and can clear | 319 | Indicates Interrupt status, which interrupt has occurred, and can clear |
| 320 | each interrupt in this register. | 320 | each interrupt in this register. |
| 321 | Writing 1b to a field containing 1b clears field and de-asserts interrupt. | 321 | Writing 1b to a field containing 1b clears field and de-asserts interrupt. |
| 322 | Writing 0b to a field has no effect. | 322 | Writing 0b to a field has no effect. |
| 323 | Field vaules are the following: | 323 | Field vaules are the following: |
| 324 | 0 - Interrupt hasn't occured. | 324 | 0 - Interrupt hasn't occurred. |
| 325 | 1 - Interrupt has occured. | 325 | 1 - Interrupt has occurred. |
| 326 | 326 | ||
| 327 | 327 | ||
| 328 | 31 24 23 16 15 8 7 0 | 328 | 31 24 23 16 15 8 7 0 |
| @@ -473,7 +473,7 @@ Channel N is out of action by setting 0 to asoen. | |||
| 473 | /* | 473 | /* |
| 474 | Sampling Rate | 474 | Sampling Rate |
| 475 | Specifies the divide ratio of the bit clock (clock output | 475 | Specifies the divide ratio of the bit clock (clock output |
| 476 | from bclko) used by the 3-wire Audio Output Clock, whcih | 476 | from bclko) used by the 3-wire Audio Output Clock, which |
| 477 | is applied to the master clock selected by mcksel. | 477 | is applied to the master clock selected by mcksel. |
| 478 | Data output is synchronized with this clock. | 478 | Data output is synchronized with this clock. |
| 479 | */ | 479 | */ |
| @@ -756,7 +756,7 @@ The STATUS field can be used to monitor the progress of a DMA request. | |||
| 756 | DONE indicates the previous request has completed. | 756 | DONE indicates the previous request has completed. |
| 757 | EVENT indicates that the DMA engine is waiting for the EVENT to occur. | 757 | EVENT indicates that the DMA engine is waiting for the EVENT to occur. |
| 758 | PENDING indicates that the DMA engine has not started processing this | 758 | PENDING indicates that the DMA engine has not started processing this |
| 759 | request, but the EVENT has occured. | 759 | request, but the EVENT has occurred. |
| 760 | DMA indicates that the data transfer is in progress. | 760 | DMA indicates that the data transfer is in progress. |
| 761 | NOTIFY indicates that the notifier signalling end of transfer is being written. | 761 | NOTIFY indicates that the notifier signalling end of transfer is being written. |
| 762 | CLEAR indicated that the previous transfer was cleared. | 762 | CLEAR indicated that the previous transfer was cleared. |
| @@ -824,7 +824,7 @@ AUDIOFIFO = Audio WriteData FIFO, | |||
| 824 | 824 | ||
| 825 | /* | 825 | /* |
| 826 | PS3_AUDIO_DMASIZE specifies the number of 128-byte blocks + 1 to transfer. | 826 | PS3_AUDIO_DMASIZE specifies the number of 128-byte blocks + 1 to transfer. |
| 827 | So a value of 0 means 128-bytes will get transfered. | 827 | So a value of 0 means 128-bytes will get transferred. |
| 828 | 828 | ||
| 829 | 829 | ||
| 830 | 31 24 23 16 15 8 7 0 | 830 | 31 24 23 16 15 8 7 0 |
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c index 5d230cee3fa7..7fbfa051f6e1 100644 --- a/sound/soc/atmel/atmel_ssc_dai.c +++ b/sound/soc/atmel/atmel_ssc_dai.c | |||
| @@ -672,7 +672,7 @@ static int atmel_ssc_resume(struct snd_soc_dai *cpu_dai) | |||
| 672 | /* re-enable interrupts */ | 672 | /* re-enable interrupts */ |
| 673 | ssc_writel(ssc_p->ssc->regs, IER, ssc_p->ssc_state.ssc_imr); | 673 | ssc_writel(ssc_p->ssc->regs, IER, ssc_p->ssc_state.ssc_imr); |
| 674 | 674 | ||
| 675 | /* Re-enable recieve and transmit as appropriate */ | 675 | /* Re-enable receive and transmit as appropriate */ |
| 676 | cr = 0; | 676 | cr = 0; |
| 677 | cr |= | 677 | cr |= |
| 678 | (ssc_p->ssc_state.ssc_sr & SSC_BIT(SR_RXEN)) ? SSC_BIT(CR_RXEN) : 0; | 678 | (ssc_p->ssc_state.ssc_sr & SSC_BIT(SR_RXEN)) ? SSC_BIT(CR_RXEN) : 0; |
diff --git a/sound/soc/codecs/alc5623.c b/sound/soc/codecs/alc5623.c index 4f377c9e868d..eecffb548947 100644 --- a/sound/soc/codecs/alc5623.c +++ b/sound/soc/codecs/alc5623.c | |||
| @@ -481,7 +481,7 @@ struct _pll_div { | |||
| 481 | }; | 481 | }; |
| 482 | 482 | ||
| 483 | /* Note : pll code from original alc5623 driver. Not sure of how good it is */ | 483 | /* Note : pll code from original alc5623 driver. Not sure of how good it is */ |
| 484 | /* usefull only for master mode */ | 484 | /* useful only for master mode */ |
| 485 | static const struct _pll_div codec_master_pll_div[] = { | 485 | static const struct _pll_div codec_master_pll_div[] = { |
| 486 | 486 | ||
| 487 | { 2048000, 8192000, 0x0ea0}, | 487 | { 2048000, 8192000, 0x0ea0}, |
diff --git a/sound/soc/codecs/lm4857.c b/sound/soc/codecs/lm4857.c index 72de47e5d040..2c2a681da0d7 100644 --- a/sound/soc/codecs/lm4857.c +++ b/sound/soc/codecs/lm4857.c | |||
| @@ -161,7 +161,7 @@ static const struct snd_kcontrol_new lm4857_controls[] = { | |||
| 161 | lm4857_get_mode, lm4857_set_mode), | 161 | lm4857_get_mode, lm4857_set_mode), |
| 162 | }; | 162 | }; |
| 163 | 163 | ||
| 164 | /* There is a demux inbetween the the input signal and the output signals. | 164 | /* There is a demux between the input signal and the output signals. |
| 165 | * Currently there is no easy way to model it in ASoC and since it does not make | 165 | * Currently there is no easy way to model it in ASoC and since it does not make |
| 166 | * much of a difference in practice simply connect the input direclty to the | 166 | * much of a difference in practice simply connect the input direclty to the |
| 167 | * outputs. */ | 167 | * outputs. */ |
diff --git a/sound/soc/codecs/sn95031.c b/sound/soc/codecs/sn95031.c index 2a30eae1881c..a54d2a5b28f6 100644 --- a/sound/soc/codecs/sn95031.c +++ b/sound/soc/codecs/sn95031.c | |||
| @@ -26,7 +26,9 @@ | |||
| 26 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 26 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
| 27 | 27 | ||
| 28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
| 29 | #include <linux/delay.h> | ||
| 29 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
| 31 | |||
| 30 | #include <asm/intel_scu_ipc.h> | 32 | #include <asm/intel_scu_ipc.h> |
| 31 | #include <sound/pcm.h> | 33 | #include <sound/pcm.h> |
| 32 | #include <sound/pcm_params.h> | 34 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/tlv320aic26.h b/sound/soc/codecs/tlv320aic26.h index 62b1f2261429..67f19c3bebe6 100644 --- a/sound/soc/codecs/tlv320aic26.h +++ b/sound/soc/codecs/tlv320aic26.h | |||
| @@ -14,14 +14,14 @@ | |||
| 14 | #define AIC26_PAGE_ADDR(page, offset) ((page << 6) | offset) | 14 | #define AIC26_PAGE_ADDR(page, offset) ((page << 6) | offset) |
| 15 | #define AIC26_NUM_REGS AIC26_PAGE_ADDR(3, 0) | 15 | #define AIC26_NUM_REGS AIC26_PAGE_ADDR(3, 0) |
| 16 | 16 | ||
| 17 | /* Page 0: Auxillary data registers */ | 17 | /* Page 0: Auxiliary data registers */ |
| 18 | #define AIC26_REG_BAT1 AIC26_PAGE_ADDR(0, 0x05) | 18 | #define AIC26_REG_BAT1 AIC26_PAGE_ADDR(0, 0x05) |
| 19 | #define AIC26_REG_BAT2 AIC26_PAGE_ADDR(0, 0x06) | 19 | #define AIC26_REG_BAT2 AIC26_PAGE_ADDR(0, 0x06) |
| 20 | #define AIC26_REG_AUX AIC26_PAGE_ADDR(0, 0x07) | 20 | #define AIC26_REG_AUX AIC26_PAGE_ADDR(0, 0x07) |
| 21 | #define AIC26_REG_TEMP1 AIC26_PAGE_ADDR(0, 0x09) | 21 | #define AIC26_REG_TEMP1 AIC26_PAGE_ADDR(0, 0x09) |
| 22 | #define AIC26_REG_TEMP2 AIC26_PAGE_ADDR(0, 0x0A) | 22 | #define AIC26_REG_TEMP2 AIC26_PAGE_ADDR(0, 0x0A) |
| 23 | 23 | ||
| 24 | /* Page 1: Auxillary control registers */ | 24 | /* Page 1: Auxiliary control registers */ |
| 25 | #define AIC26_REG_AUX_ADC AIC26_PAGE_ADDR(1, 0x00) | 25 | #define AIC26_REG_AUX_ADC AIC26_PAGE_ADDR(1, 0x00) |
| 26 | #define AIC26_REG_STATUS AIC26_PAGE_ADDR(1, 0x01) | 26 | #define AIC26_REG_STATUS AIC26_PAGE_ADDR(1, 0x01) |
| 27 | #define AIC26_REG_REFERENCE AIC26_PAGE_ADDR(1, 0x03) | 27 | #define AIC26_REG_REFERENCE AIC26_PAGE_ADDR(1, 0x03) |
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 3bedab26892f..6c43c13f0430 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
| @@ -884,7 +884,7 @@ static int aic3x_hw_params(struct snd_pcm_substream *substream, | |||
| 884 | if (bypass_pll) | 884 | if (bypass_pll) |
| 885 | return 0; | 885 | return 0; |
| 886 | 886 | ||
| 887 | /* Use PLL, compute apropriate setup for j, d, r and p, the closest | 887 | /* Use PLL, compute appropriate setup for j, d, r and p, the closest |
| 888 | * one wins the game. Try with d==0 first, next with d!=0. | 888 | * one wins the game. Try with d==0 first, next with d!=0. |
| 889 | * Constraints for j are according to the datasheet. | 889 | * Constraints for j are according to the datasheet. |
| 890 | * The sysclk is divided by 1000 to prevent integer overflows. | 890 | * The sysclk is divided by 1000 to prevent integer overflows. |
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index 00b6d87e7bdb..082e9d51963f 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c | |||
| @@ -324,6 +324,10 @@ static void dac33_init_chip(struct snd_soc_codec *codec) | |||
| 324 | dac33_write(codec, DAC33_OUT_AMP_CTRL, | 324 | dac33_write(codec, DAC33_OUT_AMP_CTRL, |
| 325 | dac33_read_reg_cache(codec, DAC33_OUT_AMP_CTRL)); | 325 | dac33_read_reg_cache(codec, DAC33_OUT_AMP_CTRL)); |
| 326 | 326 | ||
| 327 | dac33_write(codec, DAC33_LDAC_PWR_CTRL, | ||
| 328 | dac33_read_reg_cache(codec, DAC33_LDAC_PWR_CTRL)); | ||
| 329 | dac33_write(codec, DAC33_RDAC_PWR_CTRL, | ||
| 330 | dac33_read_reg_cache(codec, DAC33_RDAC_PWR_CTRL)); | ||
| 327 | } | 331 | } |
| 328 | 332 | ||
| 329 | static inline int dac33_read_id(struct snd_soc_codec *codec) | 333 | static inline int dac33_read_id(struct snd_soc_codec *codec) |
| @@ -670,6 +674,7 @@ static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33) | |||
| 670 | { | 674 | { |
| 671 | struct snd_soc_codec *codec = dac33->codec; | 675 | struct snd_soc_codec *codec = dac33->codec; |
| 672 | unsigned int delay; | 676 | unsigned int delay; |
| 677 | unsigned long flags; | ||
| 673 | 678 | ||
| 674 | switch (dac33->fifo_mode) { | 679 | switch (dac33->fifo_mode) { |
| 675 | case DAC33_FIFO_MODE1: | 680 | case DAC33_FIFO_MODE1: |
| @@ -677,10 +682,10 @@ static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33) | |||
| 677 | DAC33_THRREG(dac33->nsample)); | 682 | DAC33_THRREG(dac33->nsample)); |
| 678 | 683 | ||
| 679 | /* Take the timestamps */ | 684 | /* Take the timestamps */ |
| 680 | spin_lock_irq(&dac33->lock); | 685 | spin_lock_irqsave(&dac33->lock, flags); |
| 681 | dac33->t_stamp2 = ktime_to_us(ktime_get()); | 686 | dac33->t_stamp2 = ktime_to_us(ktime_get()); |
| 682 | dac33->t_stamp1 = dac33->t_stamp2; | 687 | dac33->t_stamp1 = dac33->t_stamp2; |
| 683 | spin_unlock_irq(&dac33->lock); | 688 | spin_unlock_irqrestore(&dac33->lock, flags); |
| 684 | 689 | ||
| 685 | dac33_write16(codec, DAC33_PREFILL_MSB, | 690 | dac33_write16(codec, DAC33_PREFILL_MSB, |
| 686 | DAC33_THRREG(dac33->alarm_threshold)); | 691 | DAC33_THRREG(dac33->alarm_threshold)); |
| @@ -692,11 +697,11 @@ static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33) | |||
| 692 | break; | 697 | break; |
| 693 | case DAC33_FIFO_MODE7: | 698 | case DAC33_FIFO_MODE7: |
| 694 | /* Take the timestamp */ | 699 | /* Take the timestamp */ |
| 695 | spin_lock_irq(&dac33->lock); | 700 | spin_lock_irqsave(&dac33->lock, flags); |
| 696 | dac33->t_stamp1 = ktime_to_us(ktime_get()); | 701 | dac33->t_stamp1 = ktime_to_us(ktime_get()); |
| 697 | /* Move back the timestamp with drain time */ | 702 | /* Move back the timestamp with drain time */ |
| 698 | dac33->t_stamp1 -= dac33->mode7_us_to_lthr; | 703 | dac33->t_stamp1 -= dac33->mode7_us_to_lthr; |
| 699 | spin_unlock_irq(&dac33->lock); | 704 | spin_unlock_irqrestore(&dac33->lock, flags); |
| 700 | 705 | ||
| 701 | dac33_write16(codec, DAC33_PREFILL_MSB, | 706 | dac33_write16(codec, DAC33_PREFILL_MSB, |
| 702 | DAC33_THRREG(DAC33_MODE7_MARGIN)); | 707 | DAC33_THRREG(DAC33_MODE7_MARGIN)); |
| @@ -714,13 +719,14 @@ static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33) | |||
| 714 | static inline void dac33_playback_handler(struct tlv320dac33_priv *dac33) | 719 | static inline void dac33_playback_handler(struct tlv320dac33_priv *dac33) |
| 715 | { | 720 | { |
| 716 | struct snd_soc_codec *codec = dac33->codec; | 721 | struct snd_soc_codec *codec = dac33->codec; |
| 722 | unsigned long flags; | ||
| 717 | 723 | ||
| 718 | switch (dac33->fifo_mode) { | 724 | switch (dac33->fifo_mode) { |
| 719 | case DAC33_FIFO_MODE1: | 725 | case DAC33_FIFO_MODE1: |
| 720 | /* Take the timestamp */ | 726 | /* Take the timestamp */ |
| 721 | spin_lock_irq(&dac33->lock); | 727 | spin_lock_irqsave(&dac33->lock, flags); |
| 722 | dac33->t_stamp2 = ktime_to_us(ktime_get()); | 728 | dac33->t_stamp2 = ktime_to_us(ktime_get()); |
| 723 | spin_unlock_irq(&dac33->lock); | 729 | spin_unlock_irqrestore(&dac33->lock, flags); |
| 724 | 730 | ||
| 725 | dac33_write16(codec, DAC33_NSAMPLE_MSB, | 731 | dac33_write16(codec, DAC33_NSAMPLE_MSB, |
| 726 | DAC33_THRREG(dac33->nsample)); | 732 | DAC33_THRREG(dac33->nsample)); |
| @@ -773,10 +779,11 @@ static irqreturn_t dac33_interrupt_handler(int irq, void *dev) | |||
| 773 | { | 779 | { |
| 774 | struct snd_soc_codec *codec = dev; | 780 | struct snd_soc_codec *codec = dev; |
| 775 | struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); | 781 | struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); |
| 782 | unsigned long flags; | ||
| 776 | 783 | ||
| 777 | spin_lock(&dac33->lock); | 784 | spin_lock_irqsave(&dac33->lock, flags); |
| 778 | dac33->t_stamp1 = ktime_to_us(ktime_get()); | 785 | dac33->t_stamp1 = ktime_to_us(ktime_get()); |
| 779 | spin_unlock(&dac33->lock); | 786 | spin_unlock_irqrestore(&dac33->lock, flags); |
| 780 | 787 | ||
| 781 | /* Do not schedule the workqueue in Mode7 */ | 788 | /* Do not schedule the workqueue in Mode7 */ |
| 782 | if (dac33->fifo_mode != DAC33_FIFO_MODE7) | 789 | if (dac33->fifo_mode != DAC33_FIFO_MODE7) |
| @@ -1020,7 +1027,7 @@ static int dac33_prepare_chip(struct snd_pcm_substream *substream) | |||
| 1020 | /* | 1027 | /* |
| 1021 | * For FIFO bypass mode: | 1028 | * For FIFO bypass mode: |
| 1022 | * Enable the FIFO bypass (Disable the FIFO use) | 1029 | * Enable the FIFO bypass (Disable the FIFO use) |
| 1023 | * Set the BCLK as continous | 1030 | * Set the BCLK as continuous |
| 1024 | */ | 1031 | */ |
| 1025 | fifoctrl_a |= DAC33_FBYPAS; | 1032 | fifoctrl_a |= DAC33_FBYPAS; |
| 1026 | aictrl_b |= DAC33_BCLKON; | 1033 | aictrl_b |= DAC33_BCLKON; |
| @@ -1173,15 +1180,16 @@ static snd_pcm_sframes_t dac33_dai_delay( | |||
| 1173 | unsigned int time_delta, uthr; | 1180 | unsigned int time_delta, uthr; |
| 1174 | int samples_out, samples_in, samples; | 1181 | int samples_out, samples_in, samples; |
| 1175 | snd_pcm_sframes_t delay = 0; | 1182 | snd_pcm_sframes_t delay = 0; |
| 1183 | unsigned long flags; | ||
| 1176 | 1184 | ||
| 1177 | switch (dac33->fifo_mode) { | 1185 | switch (dac33->fifo_mode) { |
| 1178 | case DAC33_FIFO_BYPASS: | 1186 | case DAC33_FIFO_BYPASS: |
| 1179 | break; | 1187 | break; |
| 1180 | case DAC33_FIFO_MODE1: | 1188 | case DAC33_FIFO_MODE1: |
| 1181 | spin_lock(&dac33->lock); | 1189 | spin_lock_irqsave(&dac33->lock, flags); |
| 1182 | t0 = dac33->t_stamp1; | 1190 | t0 = dac33->t_stamp1; |
| 1183 | t1 = dac33->t_stamp2; | 1191 | t1 = dac33->t_stamp2; |
| 1184 | spin_unlock(&dac33->lock); | 1192 | spin_unlock_irqrestore(&dac33->lock, flags); |
| 1185 | t_now = ktime_to_us(ktime_get()); | 1193 | t_now = ktime_to_us(ktime_get()); |
| 1186 | 1194 | ||
| 1187 | /* We have not started to fill the FIFO yet, delay is 0 */ | 1195 | /* We have not started to fill the FIFO yet, delay is 0 */ |
| @@ -1246,10 +1254,10 @@ static snd_pcm_sframes_t dac33_dai_delay( | |||
| 1246 | } | 1254 | } |
| 1247 | break; | 1255 | break; |
| 1248 | case DAC33_FIFO_MODE7: | 1256 | case DAC33_FIFO_MODE7: |
| 1249 | spin_lock(&dac33->lock); | 1257 | spin_lock_irqsave(&dac33->lock, flags); |
| 1250 | t0 = dac33->t_stamp1; | 1258 | t0 = dac33->t_stamp1; |
| 1251 | uthr = dac33->uthr; | 1259 | uthr = dac33->uthr; |
| 1252 | spin_unlock(&dac33->lock); | 1260 | spin_unlock_irqrestore(&dac33->lock, flags); |
| 1253 | t_now = ktime_to_us(ktime_get()); | 1261 | t_now = ktime_to_us(ktime_get()); |
| 1254 | 1262 | ||
| 1255 | /* We have not started to fill the FIFO yet, delay is 0 */ | 1263 | /* We have not started to fill the FIFO yet, delay is 0 */ |
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index 8512800f6326..575238d68e5e 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c | |||
| @@ -281,7 +281,7 @@ static inline void twl4030_check_defaults(struct snd_soc_codec *codec) | |||
| 281 | i, val, twl4030_reg[i]); | 281 | i, val, twl4030_reg[i]); |
| 282 | } | 282 | } |
| 283 | } | 283 | } |
| 284 | dev_dbg(codec->dev, "Found %d non maching registers. %s\n", | 284 | dev_dbg(codec->dev, "Found %d non-matching registers. %s\n", |
| 285 | difference, difference ? "Not OK" : "OK"); | 285 | difference, difference ? "Not OK" : "OK"); |
| 286 | } | 286 | } |
| 287 | 287 | ||
| @@ -2018,7 +2018,7 @@ static int twl4030_voice_startup(struct snd_pcm_substream *substream, | |||
| 2018 | u8 mode; | 2018 | u8 mode; |
| 2019 | 2019 | ||
| 2020 | /* If the system master clock is not 26MHz, the voice PCM interface is | 2020 | /* If the system master clock is not 26MHz, the voice PCM interface is |
| 2021 | * not avilable. | 2021 | * not available. |
| 2022 | */ | 2022 | */ |
| 2023 | if (twl4030->sysclk != 26000) { | 2023 | if (twl4030->sysclk != 26000) { |
| 2024 | dev_err(codec->dev, "The board is configured for %u Hz, while" | 2024 | dev_err(codec->dev, "The board is configured for %u Hz, while" |
| @@ -2028,7 +2028,7 @@ static int twl4030_voice_startup(struct snd_pcm_substream *substream, | |||
| 2028 | } | 2028 | } |
| 2029 | 2029 | ||
| 2030 | /* If the codec mode is not option2, the voice PCM interface is not | 2030 | /* If the codec mode is not option2, the voice PCM interface is not |
| 2031 | * avilable. | 2031 | * available. |
| 2032 | */ | 2032 | */ |
| 2033 | mode = twl4030_read_reg_cache(codec, TWL4030_REG_CODEC_MODE) | 2033 | mode = twl4030_read_reg_cache(codec, TWL4030_REG_CODEC_MODE) |
| 2034 | & TWL4030_OPT_MODE; | 2034 | & TWL4030_OPT_MODE; |
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index 482fcdb59bfa..255901c4460d 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c | |||
| @@ -1629,8 +1629,10 @@ static int twl6040_probe(struct snd_soc_codec *codec) | |||
| 1629 | priv->naudint = naudint; | 1629 | priv->naudint = naudint; |
| 1630 | priv->workqueue = create_singlethread_workqueue("twl6040-codec"); | 1630 | priv->workqueue = create_singlethread_workqueue("twl6040-codec"); |
| 1631 | 1631 | ||
| 1632 | if (!priv->workqueue) | 1632 | if (!priv->workqueue) { |
| 1633 | ret = -ENOMEM; | ||
| 1633 | goto work_err; | 1634 | goto work_err; |
| 1635 | } | ||
| 1634 | 1636 | ||
| 1635 | INIT_DELAYED_WORK(&priv->delayed_work, twl6040_accessory_work); | 1637 | INIT_DELAYED_WORK(&priv->delayed_work, twl6040_accessory_work); |
| 1636 | 1638 | ||
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c index 8f6b5ee6645b..4bbc0a79f01e 100644 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c | |||
| @@ -772,7 +772,7 @@ static int wm8580_set_bias_level(struct snd_soc_codec *codec, | |||
| 772 | reg &= ~(WM8580_PWRDN1_PWDN | WM8580_PWRDN1_ALLDACPD); | 772 | reg &= ~(WM8580_PWRDN1_PWDN | WM8580_PWRDN1_ALLDACPD); |
| 773 | snd_soc_write(codec, WM8580_PWRDN1, reg); | 773 | snd_soc_write(codec, WM8580_PWRDN1, reg); |
| 774 | 774 | ||
| 775 | /* Make VMID high impedence */ | 775 | /* Make VMID high impedance */ |
| 776 | reg = snd_soc_read(codec, WM8580_ADC_CONTROL1); | 776 | reg = snd_soc_read(codec, WM8580_ADC_CONTROL1); |
| 777 | reg &= ~0x100; | 777 | reg &= ~0x100; |
| 778 | snd_soc_write(codec, WM8580_ADC_CONTROL1, reg); | 778 | snd_soc_write(codec, WM8580_ADC_CONTROL1, reg); |
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index 3f09deea8d9d..ffa2ffe5ec11 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c | |||
| @@ -1312,7 +1312,7 @@ static int wm8753_set_bias_level(struct snd_soc_codec *codec, | |||
| 1312 | SNDRV_PCM_FMTBIT_S24_LE) | 1312 | SNDRV_PCM_FMTBIT_S24_LE) |
| 1313 | 1313 | ||
| 1314 | /* | 1314 | /* |
| 1315 | * The WM8753 supports upto 4 different and mutually exclusive DAI | 1315 | * The WM8753 supports up to 4 different and mutually exclusive DAI |
| 1316 | * configurations. This gives 2 PCM's available for use, hifi and voice. | 1316 | * configurations. This gives 2 PCM's available for use, hifi and voice. |
| 1317 | * NOTE: The Voice PCM cannot play or capture audio to the CPU as it's DAI | 1317 | * NOTE: The Voice PCM cannot play or capture audio to the CPU as it's DAI |
| 1318 | * is connected between the wm8753 and a BT codec or GSM modem. | 1318 | * is connected between the wm8753 and a BT codec or GSM modem. |
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index 443ae580445c..9b3bba4df5b3 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c | |||
| @@ -1895,7 +1895,7 @@ static int fll_factors(struct _fll_div *fll_div, unsigned int Fref, | |||
| 1895 | 1895 | ||
| 1896 | pr_debug("Fvco=%dHz\n", target); | 1896 | pr_debug("Fvco=%dHz\n", target); |
| 1897 | 1897 | ||
| 1898 | /* Find an appropraite FLL_FRATIO and factor it out of the target */ | 1898 | /* Find an appropriate FLL_FRATIO and factor it out of the target */ |
| 1899 | for (i = 0; i < ARRAY_SIZE(fll_fratios); i++) { | 1899 | for (i = 0; i < ARRAY_SIZE(fll_fratios); i++) { |
| 1900 | if (fll_fratios[i].min <= Fref && Fref <= fll_fratios[i].max) { | 1900 | if (fll_fratios[i].min <= Fref && Fref <= fll_fratios[i].max) { |
| 1901 | fll_div->fll_fratio = fll_fratios[i].fll_fratio; | 1901 | fll_div->fll_fratio = fll_fratios[i].fll_fratio; |
diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c index 5e0214d6293e..3c7198779c31 100644 --- a/sound/soc/codecs/wm8955.c +++ b/sound/soc/codecs/wm8955.c | |||
| @@ -176,7 +176,7 @@ static int wm8995_pll_factors(struct device *dev, | |||
| 176 | return 0; | 176 | return 0; |
| 177 | } | 177 | } |
| 178 | 178 | ||
| 179 | /* Lookup table specifiying SRATE (table 25 in datasheet); some of the | 179 | /* Lookup table specifying SRATE (table 25 in datasheet); some of the |
| 180 | * output frequencies have been rounded to the standard frequencies | 180 | * output frequencies have been rounded to the standard frequencies |
| 181 | * they are intended to match where the error is slight. */ | 181 | * they are intended to match where the error is slight. */ |
| 182 | static struct { | 182 | static struct { |
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 3b71dd65c966..500011eb8b2b 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c | |||
| @@ -3137,7 +3137,7 @@ static int fll_factors(struct _fll_div *fll_div, unsigned int Fref, | |||
| 3137 | 3137 | ||
| 3138 | pr_debug("FLL Fvco=%dHz\n", target); | 3138 | pr_debug("FLL Fvco=%dHz\n", target); |
| 3139 | 3139 | ||
| 3140 | /* Find an appropraite FLL_FRATIO and factor it out of the target */ | 3140 | /* Find an appropriate FLL_FRATIO and factor it out of the target */ |
| 3141 | for (i = 0; i < ARRAY_SIZE(fll_fratios); i++) { | 3141 | for (i = 0; i < ARRAY_SIZE(fll_fratios); i++) { |
| 3142 | if (fll_fratios[i].min <= Fref && Fref <= fll_fratios[i].max) { | 3142 | if (fll_fratios[i].min <= Fref && Fref <= fll_fratios[i].max) { |
| 3143 | fll_div->fll_fratio = fll_fratios[i].fll_fratio; | 3143 | fll_div->fll_fratio = fll_fratios[i].fll_fratio; |
diff --git a/sound/soc/codecs/wm8991.c b/sound/soc/codecs/wm8991.c index 28fdfd66661d..3c2ee1bb73cd 100644 --- a/sound/soc/codecs/wm8991.c +++ b/sound/soc/codecs/wm8991.c | |||
| @@ -981,7 +981,7 @@ static int wm8991_set_dai_pll(struct snd_soc_dai *codec_dai, | |||
| 981 | reg = snd_soc_read(codec, WM8991_CLOCKING_2); | 981 | reg = snd_soc_read(codec, WM8991_CLOCKING_2); |
| 982 | snd_soc_write(codec, WM8991_CLOCKING_2, reg | WM8991_SYSCLK_SRC); | 982 | snd_soc_write(codec, WM8991_CLOCKING_2, reg | WM8991_SYSCLK_SRC); |
| 983 | 983 | ||
| 984 | /* set up N , fractional mode and pre-divisor if neccessary */ | 984 | /* set up N , fractional mode and pre-divisor if necessary */ |
| 985 | snd_soc_write(codec, WM8991_PLL1, pll_div.n | WM8991_SDM | | 985 | snd_soc_write(codec, WM8991_PLL1, pll_div.n | WM8991_SDM | |
| 986 | (pll_div.div2 ? WM8991_PRESCALE : 0)); | 986 | (pll_div.div2 ? WM8991_PRESCALE : 0)); |
| 987 | snd_soc_write(codec, WM8991_PLL2, (u8)(pll_div.k>>8)); | 987 | snd_soc_write(codec, WM8991_PLL2, (u8)(pll_div.k>>8)); |
diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c index 379fa22c5b6c..056aef904347 100644 --- a/sound/soc/codecs/wm8993.c +++ b/sound/soc/codecs/wm8993.c | |||
| @@ -324,7 +324,7 @@ static int fll_factors(struct _fll_div *fll_div, unsigned int Fref, | |||
| 324 | 324 | ||
| 325 | pr_debug("Fvco=%dHz\n", target); | 325 | pr_debug("Fvco=%dHz\n", target); |
| 326 | 326 | ||
| 327 | /* Find an appropraite FLL_FRATIO and factor it out of the target */ | 327 | /* Find an appropriate FLL_FRATIO and factor it out of the target */ |
| 328 | for (i = 0; i < ARRAY_SIZE(fll_fratios); i++) { | 328 | for (i = 0; i < ARRAY_SIZE(fll_fratios); i++) { |
| 329 | if (fll_fratios[i].min <= Fref && Fref <= fll_fratios[i].max) { | 329 | if (fll_fratios[i].min <= Fref && Fref <= fll_fratios[i].max) { |
| 330 | fll_div->fll_fratio = fll_fratios[i].fll_fratio; | 330 | fll_div->fll_fratio = fll_fratios[i].fll_fratio; |
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 3dc64c8b6a5c..3290333b2bb9 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
| @@ -82,18 +82,18 @@ struct wm8994_priv { | |||
| 82 | 82 | ||
| 83 | int mbc_ena[3]; | 83 | int mbc_ena[3]; |
| 84 | 84 | ||
| 85 | /* Platform dependant DRC configuration */ | 85 | /* Platform dependent DRC configuration */ |
| 86 | const char **drc_texts; | 86 | const char **drc_texts; |
| 87 | int drc_cfg[WM8994_NUM_DRC]; | 87 | int drc_cfg[WM8994_NUM_DRC]; |
| 88 | struct soc_enum drc_enum; | 88 | struct soc_enum drc_enum; |
| 89 | 89 | ||
| 90 | /* Platform dependant ReTune mobile configuration */ | 90 | /* Platform dependent ReTune mobile configuration */ |
| 91 | int num_retune_mobile_texts; | 91 | int num_retune_mobile_texts; |
| 92 | const char **retune_mobile_texts; | 92 | const char **retune_mobile_texts; |
| 93 | int retune_mobile_cfg[WM8994_NUM_EQ]; | 93 | int retune_mobile_cfg[WM8994_NUM_EQ]; |
| 94 | struct soc_enum retune_mobile_enum; | 94 | struct soc_enum retune_mobile_enum; |
| 95 | 95 | ||
| 96 | /* Platform dependant MBC configuration */ | 96 | /* Platform dependent MBC configuration */ |
| 97 | int mbc_cfg; | 97 | int mbc_cfg; |
| 98 | const char **mbc_texts; | 98 | const char **mbc_texts; |
| 99 | struct soc_enum mbc_enum; | 99 | struct soc_enum mbc_enum; |
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c index 55cdf2982020..91c6b39de50c 100644 --- a/sound/soc/codecs/wm9081.c +++ b/sound/soc/codecs/wm9081.c | |||
| @@ -305,7 +305,7 @@ static int speaker_mode_get(struct snd_kcontrol *kcontrol, | |||
| 305 | /* | 305 | /* |
| 306 | * Stop any attempts to change speaker mode while the speaker is enabled. | 306 | * Stop any attempts to change speaker mode while the speaker is enabled. |
| 307 | * | 307 | * |
| 308 | * We also have some special anti-pop controls dependant on speaker | 308 | * We also have some special anti-pop controls dependent on speaker |
| 309 | * mode which must be changed along with the mode. | 309 | * mode which must be changed along with the mode. |
| 310 | */ | 310 | */ |
| 311 | static int speaker_mode_put(struct snd_kcontrol *kcontrol, | 311 | static int speaker_mode_put(struct snd_kcontrol *kcontrol, |
| @@ -456,7 +456,7 @@ static int fll_factors(struct _fll_div *fll_div, unsigned int Fref, | |||
| 456 | 456 | ||
| 457 | pr_debug("Fvco=%dHz\n", target); | 457 | pr_debug("Fvco=%dHz\n", target); |
| 458 | 458 | ||
| 459 | /* Find an appropraite FLL_FRATIO and factor it out of the target */ | 459 | /* Find an appropriate FLL_FRATIO and factor it out of the target */ |
| 460 | for (i = 0; i < ARRAY_SIZE(fll_fratios); i++) { | 460 | for (i = 0; i < ARRAY_SIZE(fll_fratios); i++) { |
| 461 | if (fll_fratios[i].min <= Fref && Fref <= fll_fratios[i].max) { | 461 | if (fll_fratios[i].min <= Fref && Fref <= fll_fratios[i].max) { |
| 462 | fll_div->fll_fratio = fll_fratios[i].fll_fratio; | 462 | fll_div->fll_fratio = fll_fratios[i].fll_fratio; |
diff --git a/sound/soc/imx/imx-pcm-dma-mx2.c b/sound/soc/imx/imx-pcm-dma-mx2.c index 671ef8dd524c..aab7765f401a 100644 --- a/sound/soc/imx/imx-pcm-dma-mx2.c +++ b/sound/soc/imx/imx-pcm-dma-mx2.c | |||
| @@ -110,12 +110,12 @@ static int imx_ssi_dma_alloc(struct snd_pcm_substream *substream, | |||
| 110 | slave_config.direction = DMA_TO_DEVICE; | 110 | slave_config.direction = DMA_TO_DEVICE; |
| 111 | slave_config.dst_addr = dma_params->dma_addr; | 111 | slave_config.dst_addr = dma_params->dma_addr; |
| 112 | slave_config.dst_addr_width = buswidth; | 112 | slave_config.dst_addr_width = buswidth; |
| 113 | slave_config.dst_maxburst = dma_params->burstsize; | 113 | slave_config.dst_maxburst = dma_params->burstsize * buswidth; |
| 114 | } else { | 114 | } else { |
| 115 | slave_config.direction = DMA_FROM_DEVICE; | 115 | slave_config.direction = DMA_FROM_DEVICE; |
| 116 | slave_config.src_addr = dma_params->dma_addr; | 116 | slave_config.src_addr = dma_params->dma_addr; |
| 117 | slave_config.src_addr_width = buswidth; | 117 | slave_config.src_addr_width = buswidth; |
| 118 | slave_config.src_maxburst = dma_params->burstsize; | 118 | slave_config.src_maxburst = dma_params->burstsize * buswidth; |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | ret = dmaengine_slave_config(iprtd->dma_chan, &slave_config); | 121 | ret = dmaengine_slave_config(iprtd->dma_chan, &slave_config); |
| @@ -303,6 +303,11 @@ static struct snd_soc_platform_driver imx_soc_platform_mx2 = { | |||
| 303 | 303 | ||
| 304 | static int __devinit imx_soc_platform_probe(struct platform_device *pdev) | 304 | static int __devinit imx_soc_platform_probe(struct platform_device *pdev) |
| 305 | { | 305 | { |
| 306 | struct imx_ssi *ssi = platform_get_drvdata(pdev); | ||
| 307 | |||
| 308 | ssi->dma_params_tx.burstsize = 6; | ||
| 309 | ssi->dma_params_rx.burstsize = 4; | ||
| 310 | |||
| 306 | return snd_soc_register_platform(&pdev->dev, &imx_soc_platform_mx2); | 311 | return snd_soc_register_platform(&pdev->dev, &imx_soc_platform_mx2); |
| 307 | } | 312 | } |
| 308 | 313 | ||
diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c index bc92ec620004..ac2ded969253 100644 --- a/sound/soc/imx/imx-ssi.c +++ b/sound/soc/imx/imx-ssi.c | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | * sane processor vendors have a FIFO per AC97 slot, the i.MX has only | 16 | * sane processor vendors have a FIFO per AC97 slot, the i.MX has only |
| 17 | * one FIFO which combines all valid receive slots. We cannot even select | 17 | * one FIFO which combines all valid receive slots. We cannot even select |
| 18 | * which slots we want to receive. The WM9712 with which this driver | 18 | * which slots we want to receive. The WM9712 with which this driver |
| 19 | * was developped with always sends GPIO status data in slot 12 which | 19 | * was developed with always sends GPIO status data in slot 12 which |
| 20 | * we receive in our (PCM-) data stream. The only chance we have is to | 20 | * we receive in our (PCM-) data stream. The only chance we have is to |
| 21 | * manually skip this data in the FIQ handler. With sampling rates different | 21 | * manually skip this data in the FIQ handler. With sampling rates different |
| 22 | * from 48000Hz not every frame has valid receive data, so the ratio | 22 | * from 48000Hz not every frame has valid receive data, so the ratio |
diff --git a/sound/soc/imx/imx-ssi.h b/sound/soc/imx/imx-ssi.h index a4406a134892..dc8a87530e3e 100644 --- a/sound/soc/imx/imx-ssi.h +++ b/sound/soc/imx/imx-ssi.h | |||
| @@ -234,7 +234,4 @@ void imx_pcm_free(struct snd_pcm *pcm); | |||
| 234 | */ | 234 | */ |
| 235 | #define IMX_SSI_DMABUF_SIZE (64 * 1024) | 235 | #define IMX_SSI_DMABUF_SIZE (64 * 1024) |
| 236 | 236 | ||
| 237 | #define DMA_RXFIFO_BURST 0x4 | ||
| 238 | #define DMA_TXFIFO_BURST 0x6 | ||
| 239 | |||
| 240 | #endif /* _IMX_SSI_H */ | 237 | #endif /* _IMX_SSI_H */ |
diff --git a/sound/soc/kirkwood/kirkwood-dma.c b/sound/soc/kirkwood/kirkwood-dma.c index 0fd6a630db01..e13c6ce46328 100644 --- a/sound/soc/kirkwood/kirkwood-dma.c +++ b/sound/soc/kirkwood/kirkwood-dma.c | |||
| @@ -132,7 +132,7 @@ static int kirkwood_dma_open(struct snd_pcm_substream *substream) | |||
| 132 | priv = snd_soc_dai_get_dma_data(cpu_dai, substream); | 132 | priv = snd_soc_dai_get_dma_data(cpu_dai, substream); |
| 133 | snd_soc_set_runtime_hwparams(substream, &kirkwood_dma_snd_hw); | 133 | snd_soc_set_runtime_hwparams(substream, &kirkwood_dma_snd_hw); |
| 134 | 134 | ||
| 135 | /* Ensure that all constraints linked to dma burst are fullfilled */ | 135 | /* Ensure that all constraints linked to dma burst are fulfilled */ |
| 136 | err = snd_pcm_hw_constraint_minmax(runtime, | 136 | err = snd_pcm_hw_constraint_minmax(runtime, |
| 137 | SNDRV_PCM_HW_PARAM_BUFFER_BYTES, | 137 | SNDRV_PCM_HW_PARAM_BUFFER_BYTES, |
| 138 | priv->burst * 2, | 138 | priv->burst * 2, |
| @@ -170,7 +170,7 @@ static int kirkwood_dma_open(struct snd_pcm_substream *substream) | |||
| 170 | 170 | ||
| 171 | /* | 171 | /* |
| 172 | * Enable Error interrupts. We're only ack'ing them but | 172 | * Enable Error interrupts. We're only ack'ing them but |
| 173 | * it's usefull for diagnostics | 173 | * it's useful for diagnostics |
| 174 | */ | 174 | */ |
| 175 | writel((unsigned long)-1, priv->io + KIRKWOOD_ERR_MASK); | 175 | writel((unsigned long)-1, priv->io + KIRKWOOD_ERR_MASK); |
| 176 | } | 176 | } |
diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c index ee2c22475a76..b2e9198a983a 100644 --- a/sound/soc/mid-x86/sst_platform.c +++ b/sound/soc/mid-x86/sst_platform.c | |||
| @@ -440,7 +440,7 @@ static int sst_platform_remove(struct platform_device *pdev) | |||
| 440 | 440 | ||
| 441 | snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(sst_platform_dai)); | 441 | snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(sst_platform_dai)); |
| 442 | snd_soc_unregister_platform(&pdev->dev); | 442 | snd_soc_unregister_platform(&pdev->dev); |
| 443 | pr_debug("sst_platform_remove sucess\n"); | 443 | pr_debug("sst_platform_remove success\n"); |
| 444 | return 0; | 444 | return 0; |
| 445 | } | 445 | } |
| 446 | 446 | ||
| @@ -463,7 +463,7 @@ module_init(sst_soc_platform_init); | |||
| 463 | static void __exit sst_soc_platform_exit(void) | 463 | static void __exit sst_soc_platform_exit(void) |
| 464 | { | 464 | { |
| 465 | platform_driver_unregister(&sst_platform_driver); | 465 | platform_driver_unregister(&sst_platform_driver); |
| 466 | pr_debug("sst_soc_platform_exit sucess\n"); | 466 | pr_debug("sst_soc_platform_exit success\n"); |
| 467 | } | 467 | } |
| 468 | module_exit(sst_soc_platform_exit); | 468 | module_exit(sst_soc_platform_exit); |
| 469 | 469 | ||
diff --git a/sound/soc/omap/ams-delta.c b/sound/soc/omap/ams-delta.c index 3167be689621..462cbcbea74a 100644 --- a/sound/soc/omap/ams-delta.c +++ b/sound/soc/omap/ams-delta.c | |||
| @@ -248,7 +248,7 @@ static struct snd_soc_jack_pin ams_delta_hook_switch_pins[] = { | |||
| 248 | */ | 248 | */ |
| 249 | 249 | ||
| 250 | /* To actually apply any modem controlled configuration changes to the codec, | 250 | /* To actually apply any modem controlled configuration changes to the codec, |
| 251 | * we must connect codec DAI pins to the modem for a moment. Be carefull not | 251 | * we must connect codec DAI pins to the modem for a moment. Be careful not |
| 252 | * to interfere with our digital mute function that shares the same hardware. */ | 252 | * to interfere with our digital mute function that shares the same hardware. */ |
| 253 | static struct timer_list cx81801_timer; | 253 | static struct timer_list cx81801_timer; |
| 254 | static bool cx81801_cmd_pending; | 254 | static bool cx81801_cmd_pending; |
| @@ -402,9 +402,9 @@ static struct tty_ldisc_ops cx81801_ops = { | |||
| 402 | 402 | ||
| 403 | 403 | ||
| 404 | /* | 404 | /* |
| 405 | * Even if not very usefull, the sound card can still work without any of the | 405 | * Even if not very useful, the sound card can still work without any of the |
| 406 | * above functonality activated. You can still control its audio input/output | 406 | * above functonality activated. You can still control its audio input/output |
| 407 | * constellation and speakerphone gain from userspace by issueing AT commands | 407 | * constellation and speakerphone gain from userspace by issuing AT commands |
| 408 | * over the modem port. | 408 | * over the modem port. |
| 409 | */ | 409 | */ |
| 410 | 410 | ||
diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c index 784cff5f67e8..9027da466cae 100644 --- a/sound/soc/pxa/corgi.c +++ b/sound/soc/pxa/corgi.c | |||
| @@ -310,7 +310,7 @@ static struct snd_soc_dai_link corgi_dai = { | |||
| 310 | .cpu_dai_name = "pxa2xx-i2s", | 310 | .cpu_dai_name = "pxa2xx-i2s", |
| 311 | .codec_dai_name = "wm8731-hifi", | 311 | .codec_dai_name = "wm8731-hifi", |
| 312 | .platform_name = "pxa-pcm-audio", | 312 | .platform_name = "pxa-pcm-audio", |
| 313 | .codec_name = "wm8731-codec-0.001b", | 313 | .codec_name = "wm8731-codec.0-001b", |
| 314 | .init = corgi_wm8731_init, | 314 | .init = corgi_wm8731_init, |
| 315 | .ops = &corgi_ops, | 315 | .ops = &corgi_ops, |
| 316 | }; | 316 | }; |
diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c index 02fb66416ddc..2ce0b2d891d5 100644 --- a/sound/soc/pxa/pxa2xx-pcm.c +++ b/sound/soc/pxa/pxa2xx-pcm.c | |||
| @@ -65,6 +65,7 @@ static int pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream) | |||
| 65 | if (prtd->dma_ch >= 0) { | 65 | if (prtd->dma_ch >= 0) { |
| 66 | pxa_free_dma(prtd->dma_ch); | 66 | pxa_free_dma(prtd->dma_ch); |
| 67 | prtd->dma_ch = -1; | 67 | prtd->dma_ch = -1; |
| 68 | prtd->params = NULL; | ||
| 68 | } | 69 | } |
| 69 | 70 | ||
| 70 | return 0; | 71 | return 0; |
diff --git a/sound/soc/pxa/zylonite.c b/sound/soc/pxa/zylonite.c index ac577263b3e3..b6445757fc54 100644 --- a/sound/soc/pxa/zylonite.c +++ b/sound/soc/pxa/zylonite.c | |||
| @@ -167,7 +167,7 @@ static struct snd_soc_dai_link zylonite_dai[] = { | |||
| 167 | .codec_name = "wm9713-codec", | 167 | .codec_name = "wm9713-codec", |
| 168 | .platform_name = "pxa-pcm-audio", | 168 | .platform_name = "pxa-pcm-audio", |
| 169 | .cpu_dai_name = "pxa2xx-ac97", | 169 | .cpu_dai_name = "pxa2xx-ac97", |
| 170 | .codec_name = "wm9713-hifi", | 170 | .codec_dai_name = "wm9713-hifi", |
| 171 | .init = zylonite_wm9713_init, | 171 | .init = zylonite_wm9713_init, |
| 172 | }, | 172 | }, |
| 173 | { | 173 | { |
| @@ -176,7 +176,7 @@ static struct snd_soc_dai_link zylonite_dai[] = { | |||
| 176 | .codec_name = "wm9713-codec", | 176 | .codec_name = "wm9713-codec", |
| 177 | .platform_name = "pxa-pcm-audio", | 177 | .platform_name = "pxa-pcm-audio", |
| 178 | .cpu_dai_name = "pxa2xx-ac97-aux", | 178 | .cpu_dai_name = "pxa2xx-ac97-aux", |
| 179 | .codec_name = "wm9713-aux", | 179 | .codec_dai_name = "wm9713-aux", |
| 180 | }, | 180 | }, |
| 181 | { | 181 | { |
| 182 | .name = "WM9713 Voice", | 182 | .name = "WM9713 Voice", |
| @@ -184,7 +184,7 @@ static struct snd_soc_dai_link zylonite_dai[] = { | |||
| 184 | .codec_name = "wm9713-codec", | 184 | .codec_name = "wm9713-codec", |
| 185 | .platform_name = "pxa-pcm-audio", | 185 | .platform_name = "pxa-pcm-audio", |
| 186 | .cpu_dai_name = "pxa-ssp-dai.2", | 186 | .cpu_dai_name = "pxa-ssp-dai.2", |
| 187 | .codec_name = "wm9713-voice", | 187 | .codec_dai_name = "wm9713-voice", |
| 188 | .ops = &zylonite_voice_ops, | 188 | .ops = &zylonite_voice_ops, |
| 189 | }, | 189 | }, |
| 190 | }; | 190 | }; |
diff --git a/sound/soc/samsung/neo1973_wm8753.c b/sound/soc/samsung/neo1973_wm8753.c index 78bfdb3f5d7e..452230975632 100644 --- a/sound/soc/samsung/neo1973_wm8753.c +++ b/sound/soc/samsung/neo1973_wm8753.c | |||
| @@ -228,7 +228,7 @@ static const struct snd_kcontrol_new neo1973_wm8753_controls[] = { | |||
| 228 | SOC_DAPM_PIN_SWITCH("Handset Mic"), | 228 | SOC_DAPM_PIN_SWITCH("Handset Mic"), |
| 229 | }; | 229 | }; |
| 230 | 230 | ||
| 231 | /* GTA02 specific routes and controlls */ | 231 | /* GTA02 specific routes and controls */ |
| 232 | 232 | ||
| 233 | #ifdef CONFIG_MACH_NEO1973_GTA02 | 233 | #ifdef CONFIG_MACH_NEO1973_GTA02 |
| 234 | 234 | ||
| @@ -372,7 +372,7 @@ static int neo1973_wm8753_init(struct snd_soc_pcm_runtime *rtd) | |||
| 372 | return 0; | 372 | return 0; |
| 373 | } | 373 | } |
| 374 | 374 | ||
| 375 | /* GTA01 specific controlls */ | 375 | /* GTA01 specific controls */ |
| 376 | 376 | ||
| 377 | #ifdef CONFIG_MACH_NEO1973_GTA01 | 377 | #ifdef CONFIG_MACH_NEO1973_GTA01 |
| 378 | 378 | ||
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 4dda58926bc5..b76b74db0968 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
| @@ -92,8 +92,8 @@ static int min_bytes_needed(unsigned long val) | |||
| 92 | static int format_register_str(struct snd_soc_codec *codec, | 92 | static int format_register_str(struct snd_soc_codec *codec, |
| 93 | unsigned int reg, char *buf, size_t len) | 93 | unsigned int reg, char *buf, size_t len) |
| 94 | { | 94 | { |
| 95 | int wordsize = codec->driver->reg_word_size * 2; | 95 | int wordsize = min_bytes_needed(codec->driver->reg_cache_size) * 2; |
| 96 | int regsize = min_bytes_needed(codec->driver->reg_cache_size) * 2; | 96 | int regsize = codec->driver->reg_word_size * 2; |
| 97 | int ret; | 97 | int ret; |
| 98 | char tmpbuf[len + 1]; | 98 | char tmpbuf[len + 1]; |
| 99 | char regbuf[regsize + 1]; | 99 | char regbuf[regsize + 1]; |
| @@ -132,8 +132,8 @@ static ssize_t soc_codec_reg_show(struct snd_soc_codec *codec, char *buf, | |||
| 132 | size_t total = 0; | 132 | size_t total = 0; |
| 133 | loff_t p = 0; | 133 | loff_t p = 0; |
| 134 | 134 | ||
| 135 | wordsize = codec->driver->reg_word_size * 2; | 135 | wordsize = min_bytes_needed(codec->driver->reg_cache_size) * 2; |
| 136 | regsize = min_bytes_needed(codec->driver->reg_cache_size) * 2; | 136 | regsize = codec->driver->reg_word_size * 2; |
| 137 | 137 | ||
| 138 | len = wordsize + regsize + 2 + 1; | 138 | len = wordsize + regsize + 2 + 1; |
| 139 | 139 | ||
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index fcab80b36a37..fc017c0a7b5d 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c | |||
| @@ -331,7 +331,7 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, | |||
| 331 | goto err; | 331 | goto err; |
| 332 | 332 | ||
| 333 | if (gpios[i].wake) { | 333 | if (gpios[i].wake) { |
| 334 | ret = set_irq_wake(gpio_to_irq(gpios[i].gpio), 1); | 334 | ret = irq_set_irq_wake(gpio_to_irq(gpios[i].gpio), 1); |
| 335 | if (ret != 0) | 335 | if (ret != 0) |
| 336 | printk(KERN_ERR | 336 | printk(KERN_ERR |
| 337 | "Failed to mark GPIO %d as wake source: %d\n", | 337 | "Failed to mark GPIO %d as wake source: %d\n", |
diff --git a/sound/usb/6fire/firmware.c b/sound/usb/6fire/firmware.c index 9081a54a9c6c..86c1a3103760 100644 --- a/sound/usb/6fire/firmware.c +++ b/sound/usb/6fire/firmware.c | |||
| @@ -76,7 +76,7 @@ struct ihex_record { | |||
| 76 | u16 address; | 76 | u16 address; |
| 77 | u8 len; | 77 | u8 len; |
| 78 | u8 data[256]; | 78 | u8 data[256]; |
| 79 | char error; /* true if an error occured parsing this record */ | 79 | char error; /* true if an error occurred parsing this record */ |
| 80 | 80 | ||
| 81 | u8 max_len; /* maximum record length in whole ihex */ | 81 | u8 max_len; /* maximum record length in whole ihex */ |
| 82 | 82 | ||
| @@ -107,7 +107,7 @@ static u8 usb6fire_fw_ihex_hex(const u8 *data, u8 *crc) | |||
| 107 | 107 | ||
| 108 | /* | 108 | /* |
| 109 | * returns true if record is available, false otherwise. | 109 | * returns true if record is available, false otherwise. |
| 110 | * iff an error occured, false will be returned and record->error will be true. | 110 | * iff an error occurred, false will be returned and record->error will be true. |
| 111 | */ | 111 | */ |
| 112 | static bool usb6fire_fw_ihex_next_record(struct ihex_record *record) | 112 | static bool usb6fire_fw_ihex_next_record(struct ihex_record *record) |
| 113 | { | 113 | { |
diff --git a/sound/usb/midi.c b/sound/usb/midi.c index b4b39c0b6c9e..f9289102886a 100644 --- a/sound/usb/midi.c +++ b/sound/usb/midi.c | |||
| @@ -1301,6 +1301,7 @@ static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi* umidi, | |||
| 1301 | case USB_ID(0x15ca, 0x0101): /* Textech USB Midi Cable */ | 1301 | case USB_ID(0x15ca, 0x0101): /* Textech USB Midi Cable */ |
| 1302 | case USB_ID(0x15ca, 0x1806): /* Textech USB Midi Cable */ | 1302 | case USB_ID(0x15ca, 0x1806): /* Textech USB Midi Cable */ |
| 1303 | case USB_ID(0x1a86, 0x752d): /* QinHeng CH345 "USB2.0-MIDI" */ | 1303 | case USB_ID(0x1a86, 0x752d): /* QinHeng CH345 "USB2.0-MIDI" */ |
| 1304 | case USB_ID(0xfc08, 0x0101): /* Unknown vendor Cable */ | ||
| 1304 | ep->max_transfer = 4; | 1305 | ep->max_transfer = 4; |
| 1305 | break; | 1306 | break; |
| 1306 | /* | 1307 | /* |
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 5e4775716607..6ec33b62e6cf 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c | |||
| @@ -1182,7 +1182,7 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc, | |||
| 1182 | /* | 1182 | /* |
| 1183 | * parse a feature unit | 1183 | * parse a feature unit |
| 1184 | * | 1184 | * |
| 1185 | * most of controlls are defined here. | 1185 | * most of controls are defined here. |
| 1186 | */ | 1186 | */ |
| 1187 | static int parse_audio_feature_unit(struct mixer_build *state, int unitid, void *_ftr) | 1187 | static int parse_audio_feature_unit(struct mixer_build *state, int unitid, void *_ftr) |
| 1188 | { | 1188 | { |
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 355759bad581..ec07e62e53f3 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c | |||
| @@ -266,7 +266,7 @@ static int create_uaxx_quirk(struct snd_usb_audio *chip, | |||
| 266 | * audio-interface quirks | 266 | * audio-interface quirks |
| 267 | * | 267 | * |
| 268 | * returns zero if no standard audio/MIDI parsing is needed. | 268 | * returns zero if no standard audio/MIDI parsing is needed. |
| 269 | * returns a postive value if standard audio/midi interfaces are parsed | 269 | * returns a positive value if standard audio/midi interfaces are parsed |
| 270 | * after this. | 270 | * after this. |
| 271 | * returns a negative value at error. | 271 | * returns a negative value at error. |
| 272 | */ | 272 | */ |
diff --git a/sound/usb/usx2y/usx2yhwdeppcm.c b/sound/usb/usx2y/usx2yhwdeppcm.c index 287ef73b1237..a51340f6f2db 100644 --- a/sound/usb/usx2y/usx2yhwdeppcm.c +++ b/sound/usb/usx2y/usx2yhwdeppcm.c | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | at standard samplerates, | 20 | at standard samplerates, |
| 21 | what led to this part of the usx2y module: | 21 | what led to this part of the usx2y module: |
| 22 | It provides the alsa kernel half of the usx2y-alsa-jack driver pair. | 22 | It provides the alsa kernel half of the usx2y-alsa-jack driver pair. |
| 23 | The pair uses a hardware dependant alsa-device for mmaped pcm transport. | 23 | The pair uses a hardware dependent alsa-device for mmaped pcm transport. |
| 24 | Advantage achieved: | 24 | Advantage achieved: |
| 25 | The usb_hc moves pcm data from/into memory via DMA. | 25 | The usb_hc moves pcm data from/into memory via DMA. |
| 26 | That memory is mmaped by jack's usx2y driver. | 26 | That memory is mmaped by jack's usx2y driver. |
| @@ -38,7 +38,7 @@ | |||
| 38 | 2periods works but is useless cause of crackling). | 38 | 2periods works but is useless cause of crackling). |
| 39 | 39 | ||
| 40 | This is a first "proof of concept" implementation. | 40 | This is a first "proof of concept" implementation. |
| 41 | Later, functionalities should migrate to more apropriate places: | 41 | Later, functionalities should migrate to more appropriate places: |
| 42 | Userland: | 42 | Userland: |
| 43 | - The jackd could mmap its float-pcm buffers directly from alsa-lib. | 43 | - The jackd could mmap its float-pcm buffers directly from alsa-lib. |
| 44 | - alsa-lib could provide power of 2 period sized shaping combined with int/float | 44 | - alsa-lib could provide power of 2 period sized shaping combined with int/float |
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 158c30e8210c..207dee5c5b16 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
| @@ -165,8 +165,12 @@ grep-libs = $(filter -l%,$(1)) | |||
| 165 | strip-libs = $(filter-out -l%,$(1)) | 165 | strip-libs = $(filter-out -l%,$(1)) |
| 166 | 166 | ||
| 167 | $(OUTPUT)python/perf.so: $(PYRF_OBJS) | 167 | $(OUTPUT)python/perf.so: $(PYRF_OBJS) |
| 168 | $(QUIET_GEN)python util/setup.py --quiet build_ext --build-lib='$(OUTPUT)python' \ | 168 | $(QUIET_GEN)( \ |
| 169 | --build-temp='$(OUTPUT)python/temp' | 169 | export CFLAGS="$(BASIC_CFLAGS)"; \ |
| 170 | python util/setup.py --quiet build_ext --build-lib='$(OUTPUT)python' \ | ||
| 171 | --build-temp='$(OUTPUT)python/temp' \ | ||
| 172 | ) | ||
| 173 | |||
| 170 | # | 174 | # |
| 171 | # No Perl scripts right now: | 175 | # No Perl scripts right now: |
| 172 | # | 176 | # |
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 6febcc168a8c..17d1dcb3c667 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
| @@ -41,7 +41,7 @@ static u64 user_interval = ULLONG_MAX; | |||
| 41 | static u64 default_interval = 0; | 41 | static u64 default_interval = 0; |
| 42 | 42 | ||
| 43 | static unsigned int page_size; | 43 | static unsigned int page_size; |
| 44 | static unsigned int mmap_pages = 128; | 44 | static unsigned int mmap_pages = UINT_MAX; |
| 45 | static unsigned int user_freq = UINT_MAX; | 45 | static unsigned int user_freq = UINT_MAX; |
| 46 | static int freq = 1000; | 46 | static int freq = 1000; |
| 47 | static int output; | 47 | static int output; |
| @@ -275,11 +275,10 @@ try_again: | |||
| 275 | !no_inherit) < 0) { | 275 | !no_inherit) < 0) { |
| 276 | int err = errno; | 276 | int err = errno; |
| 277 | 277 | ||
| 278 | if (err == EPERM || err == EACCES) | 278 | if (err == EPERM || err == EACCES) { |
| 279 | die("Permission error - are you root?\n" | 279 | ui__warning_paranoid(); |
| 280 | "\t Consider tweaking" | 280 | exit(EXIT_FAILURE); |
| 281 | " /proc/sys/kernel/perf_event_paranoid.\n"); | 281 | } else if (err == ENODEV && cpu_list) { |
| 282 | else if (err == ENODEV && cpu_list) { | ||
| 283 | die("No such device - did you specify" | 282 | die("No such device - did you specify" |
| 284 | " an out-of-range profile CPU?\n"); | 283 | " an out-of-range profile CPU?\n"); |
| 285 | } else if (err == EINVAL && sample_id_all_avail) { | 284 | } else if (err == EINVAL && sample_id_all_avail) { |
| @@ -302,11 +301,19 @@ try_again: | |||
| 302 | && attr->config == PERF_COUNT_HW_CPU_CYCLES) { | 301 | && attr->config == PERF_COUNT_HW_CPU_CYCLES) { |
| 303 | 302 | ||
| 304 | if (verbose) | 303 | if (verbose) |
| 305 | warning(" ... trying to fall back to cpu-clock-ticks\n"); | 304 | ui__warning("The cycles event is not supported, " |
| 305 | "trying to fall back to cpu-clock-ticks\n"); | ||
| 306 | attr->type = PERF_TYPE_SOFTWARE; | 306 | attr->type = PERF_TYPE_SOFTWARE; |
| 307 | attr->config = PERF_COUNT_SW_CPU_CLOCK; | 307 | attr->config = PERF_COUNT_SW_CPU_CLOCK; |
| 308 | goto try_again; | 308 | goto try_again; |
| 309 | } | 309 | } |
| 310 | |||
| 311 | if (err == ENOENT) { | ||
| 312 | ui__warning("The %s event is not supported.\n", | ||
| 313 | event_name(pos)); | ||
| 314 | exit(EXIT_FAILURE); | ||
| 315 | } | ||
| 316 | |||
| 310 | printf("\n"); | 317 | printf("\n"); |
| 311 | error("sys_perf_event_open() syscall returned with %d (%s). /bin/dmesg may provide additional information.\n", | 318 | error("sys_perf_event_open() syscall returned with %d (%s). /bin/dmesg may provide additional information.\n", |
| 312 | err, strerror(err)); | 319 | err, strerror(err)); |
| @@ -506,6 +513,10 @@ static int __cmd_record(int argc, const char **argv) | |||
| 506 | if (have_tracepoints(&evsel_list->entries)) | 513 | if (have_tracepoints(&evsel_list->entries)) |
| 507 | perf_header__set_feat(&session->header, HEADER_TRACE_INFO); | 514 | perf_header__set_feat(&session->header, HEADER_TRACE_INFO); |
| 508 | 515 | ||
| 516 | /* 512 kiB: default amount of unprivileged mlocked memory */ | ||
| 517 | if (mmap_pages == UINT_MAX) | ||
| 518 | mmap_pages = (512 * 1024) / page_size; | ||
| 519 | |||
| 509 | if (forks) { | 520 | if (forks) { |
| 510 | child_pid = fork(); | 521 | child_pid = fork(); |
| 511 | if (child_pid < 0) { | 522 | if (child_pid < 0) { |
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 676b4fb0070f..fc1273e976c5 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
| @@ -850,10 +850,10 @@ try_again: | |||
| 850 | top.evlist->threads, group, inherit) < 0) { | 850 | top.evlist->threads, group, inherit) < 0) { |
| 851 | int err = errno; | 851 | int err = errno; |
| 852 | 852 | ||
| 853 | if (err == EPERM || err == EACCES) | 853 | if (err == EPERM || err == EACCES) { |
| 854 | die("Permission error - are you root?\n" | 854 | ui__warning_paranoid(); |
| 855 | "\t Consider tweaking" | 855 | goto out_err; |
| 856 | " /proc/sys/kernel/perf_event_paranoid.\n"); | 856 | } |
| 857 | /* | 857 | /* |
| 858 | * If it's cycles then fall back to hrtimer | 858 | * If it's cycles then fall back to hrtimer |
| 859 | * based cpu-clock-tick sw counter, which | 859 | * based cpu-clock-tick sw counter, which |
| @@ -861,25 +861,41 @@ try_again: | |||
| 861 | */ | 861 | */ |
| 862 | if (attr->type == PERF_TYPE_HARDWARE && | 862 | if (attr->type == PERF_TYPE_HARDWARE && |
| 863 | attr->config == PERF_COUNT_HW_CPU_CYCLES) { | 863 | attr->config == PERF_COUNT_HW_CPU_CYCLES) { |
| 864 | |||
| 865 | if (verbose) | 864 | if (verbose) |
| 866 | warning(" ... trying to fall back to cpu-clock-ticks\n"); | 865 | ui__warning("Cycles event not supported,\n" |
| 866 | "trying to fall back to cpu-clock-ticks\n"); | ||
| 867 | 867 | ||
| 868 | attr->type = PERF_TYPE_SOFTWARE; | 868 | attr->type = PERF_TYPE_SOFTWARE; |
| 869 | attr->config = PERF_COUNT_SW_CPU_CLOCK; | 869 | attr->config = PERF_COUNT_SW_CPU_CLOCK; |
| 870 | goto try_again; | 870 | goto try_again; |
| 871 | } | 871 | } |
| 872 | printf("\n"); | 872 | |
| 873 | error("sys_perf_event_open() syscall returned with %d " | 873 | if (err == ENOENT) { |
| 874 | "(%s). /bin/dmesg may provide additional information.\n", | 874 | ui__warning("The %s event is not supported.\n", |
| 875 | err, strerror(err)); | 875 | event_name(counter)); |
| 876 | die("No CONFIG_PERF_EVENTS=y kernel support configured?\n"); | 876 | goto out_err; |
| 877 | exit(-1); | 877 | } |
| 878 | |||
| 879 | ui__warning("The sys_perf_event_open() syscall " | ||
| 880 | "returned with %d (%s). /bin/dmesg " | ||
| 881 | "may provide additional information.\n" | ||
| 882 | "No CONFIG_PERF_EVENTS=y kernel support " | ||
| 883 | "configured?\n", err, strerror(err)); | ||
| 884 | goto out_err; | ||
| 878 | } | 885 | } |
| 879 | } | 886 | } |
| 880 | 887 | ||
| 881 | if (perf_evlist__mmap(evlist, mmap_pages, false) < 0) | 888 | if (perf_evlist__mmap(evlist, mmap_pages, false) < 0) { |
| 882 | die("failed to mmap with %d (%s)\n", errno, strerror(errno)); | 889 | ui__warning("Failed to mmap with %d (%s)\n", |
| 890 | errno, strerror(errno)); | ||
| 891 | goto out_err; | ||
| 892 | } | ||
| 893 | |||
| 894 | return; | ||
| 895 | |||
| 896 | out_err: | ||
| 897 | exit_browser(0); | ||
| 898 | exit(0); | ||
| 883 | } | 899 | } |
| 884 | 900 | ||
| 885 | static int __cmd_top(void) | 901 | static int __cmd_top(void) |
diff --git a/tools/perf/util/cgroup.c b/tools/perf/util/cgroup.c index 9fea75535221..96bee5c46008 100644 --- a/tools/perf/util/cgroup.c +++ b/tools/perf/util/cgroup.c | |||
| @@ -13,7 +13,7 @@ cgroupfs_find_mountpoint(char *buf, size_t maxlen) | |||
| 13 | { | 13 | { |
| 14 | FILE *fp; | 14 | FILE *fp; |
| 15 | char mountpoint[MAX_PATH+1], tokens[MAX_PATH+1], type[MAX_PATH+1]; | 15 | char mountpoint[MAX_PATH+1], tokens[MAX_PATH+1], type[MAX_PATH+1]; |
| 16 | char *token, *saved_ptr; | 16 | char *token, *saved_ptr = NULL; |
| 17 | int found = 0; | 17 | int found = 0; |
| 18 | 18 | ||
| 19 | fp = fopen("/proc/mounts", "r"); | 19 | fp = fopen("/proc/mounts", "r"); |
diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c index d4536a9e0d8c..155749d74350 100644 --- a/tools/perf/util/debug.c +++ b/tools/perf/util/debug.c | |||
| @@ -57,6 +57,16 @@ void ui__warning(const char *format, ...) | |||
| 57 | } | 57 | } |
| 58 | #endif | 58 | #endif |
| 59 | 59 | ||
| 60 | void ui__warning_paranoid(void) | ||
| 61 | { | ||
| 62 | ui__warning("Permission error - are you root?\n" | ||
| 63 | "Consider tweaking /proc/sys/kernel/perf_event_paranoid:\n" | ||
| 64 | " -1 - Not paranoid at all\n" | ||
| 65 | " 0 - Disallow raw tracepoint access for unpriv\n" | ||
| 66 | " 1 - Disallow cpu events for unpriv\n" | ||
| 67 | " 2 - Disallow kernel profiling for unpriv\n"); | ||
| 68 | } | ||
| 69 | |||
| 60 | void trace_event(union perf_event *event) | 70 | void trace_event(union perf_event *event) |
| 61 | { | 71 | { |
| 62 | unsigned char *raw_event = (void *)event; | 72 | unsigned char *raw_event = (void *)event; |
diff --git a/tools/perf/util/debug.h b/tools/perf/util/debug.h index 93516cf4682c..fd53db47e3de 100644 --- a/tools/perf/util/debug.h +++ b/tools/perf/util/debug.h | |||
| @@ -36,5 +36,6 @@ int ui_helpline__show_help(const char *format, va_list ap); | |||
| 36 | #endif | 36 | #endif |
| 37 | 37 | ||
| 38 | void ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2))); | 38 | void ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2))); |
| 39 | void ui__warning_paranoid(void); | ||
| 39 | 40 | ||
| 40 | #endif /* __PERF_DEBUG_H */ | 41 | #endif /* __PERF_DEBUG_H */ |
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 2b15c362ef56..1023f67633a4 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c | |||
| @@ -710,7 +710,7 @@ try_again: | |||
| 710 | * in the whole kernel symbol list. | 710 | * in the whole kernel symbol list. |
| 711 | */ | 711 | */ |
| 712 | if ((long long)al->addr < 0 && | 712 | if ((long long)al->addr < 0 && |
| 713 | cpumode == PERF_RECORD_MISC_KERNEL && | 713 | cpumode == PERF_RECORD_MISC_USER && |
| 714 | machine && mg != &machine->kmaps) { | 714 | machine && mg != &machine->kmaps) { |
| 715 | mg = &machine->kmaps; | 715 | mg = &machine->kmaps; |
| 716 | goto try_again; | 716 | goto try_again; |
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 5ddee66020a7..f0223166e761 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c | |||
| @@ -234,7 +234,6 @@ static int try_to_find_probe_trace_events(struct perf_probe_event *pev, | |||
| 234 | 234 | ||
| 235 | /* Searching trace events corresponding to probe event */ | 235 | /* Searching trace events corresponding to probe event */ |
| 236 | ntevs = find_probe_trace_events(fd, pev, tevs, max_tevs); | 236 | ntevs = find_probe_trace_events(fd, pev, tevs, max_tevs); |
| 237 | close(fd); | ||
| 238 | 237 | ||
| 239 | if (ntevs > 0) { /* Succeeded to find trace events */ | 238 | if (ntevs > 0) { /* Succeeded to find trace events */ |
| 240 | pr_debug("find %d probe_trace_events.\n", ntevs); | 239 | pr_debug("find %d probe_trace_events.\n", ntevs); |
| @@ -388,7 +387,6 @@ int show_line_range(struct line_range *lr, const char *module) | |||
| 388 | } | 387 | } |
| 389 | 388 | ||
| 390 | ret = find_line_range(fd, lr); | 389 | ret = find_line_range(fd, lr); |
| 391 | close(fd); | ||
| 392 | if (ret == 0) { | 390 | if (ret == 0) { |
| 393 | pr_warning("Specified source line is not found.\n"); | 391 | pr_warning("Specified source line is not found.\n"); |
| 394 | return -ENOENT; | 392 | return -ENOENT; |
| @@ -512,19 +510,18 @@ int show_available_vars(struct perf_probe_event *pevs, int npevs, | |||
| 512 | if (ret < 0) | 510 | if (ret < 0) |
| 513 | return ret; | 511 | return ret; |
| 514 | 512 | ||
| 515 | fd = open_vmlinux(module); | ||
| 516 | if (fd < 0) { | ||
| 517 | pr_warning("Failed to open debug information file.\n"); | ||
| 518 | return fd; | ||
| 519 | } | ||
| 520 | |||
| 521 | setup_pager(); | 513 | setup_pager(); |
| 522 | 514 | ||
| 523 | for (i = 0; i < npevs && ret >= 0; i++) | 515 | for (i = 0; i < npevs && ret >= 0; i++) { |
| 516 | fd = open_vmlinux(module); | ||
| 517 | if (fd < 0) { | ||
| 518 | pr_warning("Failed to open debug information file.\n"); | ||
| 519 | ret = fd; | ||
| 520 | break; | ||
| 521 | } | ||
| 524 | ret = show_available_vars_at(fd, &pevs[i], max_vls, _filter, | 522 | ret = show_available_vars_at(fd, &pevs[i], max_vls, _filter, |
| 525 | externs); | 523 | externs); |
| 526 | 524 | } | |
| 527 | close(fd); | ||
| 528 | return ret; | 525 | return ret; |
| 529 | } | 526 | } |
| 530 | 527 | ||
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index 194f9e2a3285..b7c85ce466a1 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c | |||
| @@ -273,6 +273,25 @@ static const char *cu_get_comp_dir(Dwarf_Die *cu_die) | |||
| 273 | return dwarf_formstring(&attr); | 273 | return dwarf_formstring(&attr); |
| 274 | } | 274 | } |
| 275 | 275 | ||
| 276 | /* Get a line number and file name for given address */ | ||
| 277 | static int cu_find_lineinfo(Dwarf_Die *cudie, unsigned long addr, | ||
| 278 | const char **fname, int *lineno) | ||
| 279 | { | ||
| 280 | Dwarf_Line *line; | ||
| 281 | Dwarf_Addr laddr; | ||
| 282 | |||
| 283 | line = dwarf_getsrc_die(cudie, (Dwarf_Addr)addr); | ||
| 284 | if (line && dwarf_lineaddr(line, &laddr) == 0 && | ||
| 285 | addr == (unsigned long)laddr && dwarf_lineno(line, lineno) == 0) { | ||
| 286 | *fname = dwarf_linesrc(line, NULL, NULL); | ||
| 287 | if (!*fname) | ||
| 288 | /* line number is useless without filename */ | ||
| 289 | *lineno = 0; | ||
| 290 | } | ||
| 291 | |||
| 292 | return *lineno ?: -ENOENT; | ||
| 293 | } | ||
| 294 | |||
| 276 | /* Compare diename and tname */ | 295 | /* Compare diename and tname */ |
| 277 | static bool die_compare_name(Dwarf_Die *dw_die, const char *tname) | 296 | static bool die_compare_name(Dwarf_Die *dw_die, const char *tname) |
| 278 | { | 297 | { |
| @@ -497,7 +516,20 @@ static int __die_find_inline_cb(Dwarf_Die *die_mem, void *data) | |||
| 497 | static Dwarf_Die *die_find_inlinefunc(Dwarf_Die *sp_die, Dwarf_Addr addr, | 516 | static Dwarf_Die *die_find_inlinefunc(Dwarf_Die *sp_die, Dwarf_Addr addr, |
| 498 | Dwarf_Die *die_mem) | 517 | Dwarf_Die *die_mem) |
| 499 | { | 518 | { |
| 500 | return die_find_child(sp_die, __die_find_inline_cb, &addr, die_mem); | 519 | Dwarf_Die tmp_die; |
| 520 | |||
| 521 | sp_die = die_find_child(sp_die, __die_find_inline_cb, &addr, &tmp_die); | ||
| 522 | if (!sp_die) | ||
| 523 | return NULL; | ||
| 524 | |||
| 525 | /* Inlined function could be recursive. Trace it until fail */ | ||
| 526 | while (sp_die) { | ||
| 527 | memcpy(die_mem, sp_die, sizeof(Dwarf_Die)); | ||
| 528 | sp_die = die_find_child(sp_die, __die_find_inline_cb, &addr, | ||
| 529 | &tmp_die); | ||
| 530 | } | ||
| 531 | |||
| 532 | return die_mem; | ||
| 501 | } | 533 | } |
| 502 | 534 | ||
| 503 | /* Walker on lines (Note: line number will not be sorted) */ | 535 | /* Walker on lines (Note: line number will not be sorted) */ |
| @@ -1395,6 +1427,10 @@ static int probe_point_search_cb(Dwarf_Die *sp_die, void *data) | |||
| 1395 | !die_compare_name(sp_die, pp->function)) | 1427 | !die_compare_name(sp_die, pp->function)) |
| 1396 | return DWARF_CB_OK; | 1428 | return DWARF_CB_OK; |
| 1397 | 1429 | ||
| 1430 | /* Check declared file */ | ||
| 1431 | if (pp->file && strtailcmp(pp->file, dwarf_decl_file(sp_die))) | ||
| 1432 | return DWARF_CB_OK; | ||
| 1433 | |||
| 1398 | pf->fname = dwarf_decl_file(sp_die); | 1434 | pf->fname = dwarf_decl_file(sp_die); |
| 1399 | if (pp->line) { /* Function relative line */ | 1435 | if (pp->line) { /* Function relative line */ |
| 1400 | dwarf_decl_line(sp_die, &pf->lno); | 1436 | dwarf_decl_line(sp_die, &pf->lno); |
| @@ -1451,6 +1487,7 @@ static int find_probes(int fd, struct probe_finder *pf) | |||
| 1451 | if (!dbg) { | 1487 | if (!dbg) { |
| 1452 | pr_warning("No debug information found in the vmlinux - " | 1488 | pr_warning("No debug information found in the vmlinux - " |
| 1453 | "please rebuild with CONFIG_DEBUG_INFO=y.\n"); | 1489 | "please rebuild with CONFIG_DEBUG_INFO=y.\n"); |
| 1490 | close(fd); /* Without dwfl_end(), fd isn't closed. */ | ||
| 1454 | return -EBADF; | 1491 | return -EBADF; |
| 1455 | } | 1492 | } |
| 1456 | 1493 | ||
| @@ -1686,11 +1723,9 @@ int find_perf_probe_point(unsigned long addr, struct perf_probe_point *ppt) | |||
| 1686 | Dwarf_Die cudie, spdie, indie; | 1723 | Dwarf_Die cudie, spdie, indie; |
| 1687 | Dwarf *dbg = NULL; | 1724 | Dwarf *dbg = NULL; |
| 1688 | Dwfl *dwfl = NULL; | 1725 | Dwfl *dwfl = NULL; |
| 1689 | Dwarf_Line *line; | 1726 | Dwarf_Addr _addr, baseaddr, bias = 0; |
| 1690 | Dwarf_Addr laddr, eaddr, bias = 0; | 1727 | const char *fname = NULL, *func = NULL, *tmp; |
| 1691 | const char *tmp; | 1728 | int baseline = 0, lineno = 0, ret = 0; |
| 1692 | int lineno, ret = 0; | ||
| 1693 | bool found = false; | ||
| 1694 | 1729 | ||
| 1695 | /* Open the live linux kernel */ | 1730 | /* Open the live linux kernel */ |
| 1696 | dbg = dwfl_init_live_kernel_dwarf(addr, &dwfl, &bias); | 1731 | dbg = dwfl_init_live_kernel_dwarf(addr, &dwfl, &bias); |
| @@ -1711,68 +1746,79 @@ int find_perf_probe_point(unsigned long addr, struct perf_probe_point *ppt) | |||
| 1711 | goto end; | 1746 | goto end; |
| 1712 | } | 1747 | } |
| 1713 | 1748 | ||
| 1714 | /* Find a corresponding line */ | 1749 | /* Find a corresponding line (filename and lineno) */ |
| 1715 | line = dwarf_getsrc_die(&cudie, (Dwarf_Addr)addr); | 1750 | cu_find_lineinfo(&cudie, addr, &fname, &lineno); |
| 1716 | if (line) { | 1751 | /* Don't care whether it failed or not */ |
| 1717 | if (dwarf_lineaddr(line, &laddr) == 0 && | ||
| 1718 | (Dwarf_Addr)addr == laddr && | ||
| 1719 | dwarf_lineno(line, &lineno) == 0) { | ||
| 1720 | tmp = dwarf_linesrc(line, NULL, NULL); | ||
| 1721 | if (tmp) { | ||
| 1722 | ppt->line = lineno; | ||
| 1723 | ppt->file = strdup(tmp); | ||
| 1724 | if (ppt->file == NULL) { | ||
| 1725 | ret = -ENOMEM; | ||
| 1726 | goto end; | ||
| 1727 | } | ||
| 1728 | found = true; | ||
| 1729 | } | ||
| 1730 | } | ||
| 1731 | } | ||
| 1732 | 1752 | ||
| 1733 | /* Find a corresponding function */ | 1753 | /* Find a corresponding function (name, baseline and baseaddr) */ |
| 1734 | if (die_find_real_subprogram(&cudie, (Dwarf_Addr)addr, &spdie)) { | 1754 | if (die_find_real_subprogram(&cudie, (Dwarf_Addr)addr, &spdie)) { |
| 1755 | /* Get function entry information */ | ||
| 1735 | tmp = dwarf_diename(&spdie); | 1756 | tmp = dwarf_diename(&spdie); |
| 1736 | if (!tmp || dwarf_entrypc(&spdie, &eaddr) != 0) | 1757 | if (!tmp || |
| 1737 | goto end; | 1758 | dwarf_entrypc(&spdie, &baseaddr) != 0 || |
| 1738 | 1759 | dwarf_decl_line(&spdie, &baseline) != 0) | |
| 1739 | if (ppt->line) { | 1760 | goto post; |
| 1740 | if (die_find_inlinefunc(&spdie, (Dwarf_Addr)addr, | 1761 | func = tmp; |
| 1741 | &indie)) { | 1762 | |
| 1742 | /* addr in an inline function */ | 1763 | if (addr == (unsigned long)baseaddr) |
| 1764 | /* Function entry - Relative line number is 0 */ | ||
| 1765 | lineno = baseline; | ||
| 1766 | else if (die_find_inlinefunc(&spdie, (Dwarf_Addr)addr, | ||
| 1767 | &indie)) { | ||
| 1768 | if (dwarf_entrypc(&indie, &_addr) == 0 && | ||
| 1769 | _addr == addr) | ||
| 1770 | /* | ||
| 1771 | * addr is at an inline function entry. | ||
| 1772 | * In this case, lineno should be the call-site | ||
| 1773 | * line number. | ||
| 1774 | */ | ||
| 1775 | lineno = die_get_call_lineno(&indie); | ||
| 1776 | else { | ||
| 1777 | /* | ||
| 1778 | * addr is in an inline function body. | ||
| 1779 | * Since lineno points one of the lines | ||
| 1780 | * of the inline function, baseline should | ||
| 1781 | * be the entry line of the inline function. | ||
| 1782 | */ | ||
| 1743 | tmp = dwarf_diename(&indie); | 1783 | tmp = dwarf_diename(&indie); |
| 1744 | if (!tmp) | 1784 | if (tmp && |
| 1745 | goto end; | 1785 | dwarf_decl_line(&spdie, &baseline) == 0) |
| 1746 | ret = dwarf_decl_line(&indie, &lineno); | 1786 | func = tmp; |
| 1747 | } else { | ||
| 1748 | if (eaddr == addr) { /* Function entry */ | ||
| 1749 | lineno = ppt->line; | ||
| 1750 | ret = 0; | ||
| 1751 | } else | ||
| 1752 | ret = dwarf_decl_line(&spdie, &lineno); | ||
| 1753 | } | ||
| 1754 | if (ret == 0) { | ||
| 1755 | /* Make a relative line number */ | ||
| 1756 | ppt->line -= lineno; | ||
| 1757 | goto found; | ||
| 1758 | } | 1787 | } |
| 1759 | } | 1788 | } |
| 1760 | /* We don't have a line number, let's use offset */ | 1789 | } |
| 1761 | ppt->offset = addr - (unsigned long)eaddr; | 1790 | |
| 1762 | found: | 1791 | post: |
| 1763 | ppt->function = strdup(tmp); | 1792 | /* Make a relative line number or an offset */ |
| 1793 | if (lineno) | ||
| 1794 | ppt->line = lineno - baseline; | ||
| 1795 | else if (func) | ||
| 1796 | ppt->offset = addr - (unsigned long)baseaddr; | ||
| 1797 | |||
| 1798 | /* Duplicate strings */ | ||
| 1799 | if (func) { | ||
| 1800 | ppt->function = strdup(func); | ||
| 1764 | if (ppt->function == NULL) { | 1801 | if (ppt->function == NULL) { |
| 1765 | ret = -ENOMEM; | 1802 | ret = -ENOMEM; |
| 1766 | goto end; | 1803 | goto end; |
| 1767 | } | 1804 | } |
| 1768 | found = true; | ||
| 1769 | } | 1805 | } |
| 1770 | 1806 | if (fname) { | |
| 1807 | ppt->file = strdup(fname); | ||
| 1808 | if (ppt->file == NULL) { | ||
| 1809 | if (ppt->function) { | ||
| 1810 | free(ppt->function); | ||
| 1811 | ppt->function = NULL; | ||
| 1812 | } | ||
| 1813 | ret = -ENOMEM; | ||
| 1814 | goto end; | ||
| 1815 | } | ||
| 1816 | } | ||
| 1771 | end: | 1817 | end: |
| 1772 | if (dwfl) | 1818 | if (dwfl) |
| 1773 | dwfl_end(dwfl); | 1819 | dwfl_end(dwfl); |
| 1774 | if (ret >= 0) | 1820 | if (ret == 0 && (fname || func)) |
| 1775 | ret = found ? 1 : 0; | 1821 | ret = 1; /* Found a point */ |
| 1776 | return ret; | 1822 | return ret; |
| 1777 | } | 1823 | } |
| 1778 | 1824 | ||
| @@ -1840,6 +1886,10 @@ static int line_range_search_cb(Dwarf_Die *sp_die, void *data) | |||
| 1840 | struct line_finder *lf = param->data; | 1886 | struct line_finder *lf = param->data; |
| 1841 | struct line_range *lr = lf->lr; | 1887 | struct line_range *lr = lf->lr; |
| 1842 | 1888 | ||
| 1889 | /* Check declared file */ | ||
| 1890 | if (lr->file && strtailcmp(lr->file, dwarf_decl_file(sp_die))) | ||
| 1891 | return DWARF_CB_OK; | ||
| 1892 | |||
| 1843 | if (dwarf_tag(sp_die) == DW_TAG_subprogram && | 1893 | if (dwarf_tag(sp_die) == DW_TAG_subprogram && |
| 1844 | die_compare_name(sp_die, lr->function)) { | 1894 | die_compare_name(sp_die, lr->function)) { |
| 1845 | lf->fname = dwarf_decl_file(sp_die); | 1895 | lf->fname = dwarf_decl_file(sp_die); |
| @@ -1892,6 +1942,7 @@ int find_line_range(int fd, struct line_range *lr) | |||
| 1892 | if (!dbg) { | 1942 | if (!dbg) { |
| 1893 | pr_warning("No debug information found in the vmlinux - " | 1943 | pr_warning("No debug information found in the vmlinux - " |
| 1894 | "please rebuild with CONFIG_DEBUG_INFO=y.\n"); | 1944 | "please rebuild with CONFIG_DEBUG_INFO=y.\n"); |
| 1945 | close(fd); /* Without dwfl_end(), fd isn't closed. */ | ||
| 1895 | return -EBADF; | 1946 | return -EBADF; |
| 1896 | } | 1947 | } |
| 1897 | 1948 | ||
diff --git a/tools/perf/util/setup.py b/tools/perf/util/setup.py index e24ffadb20b2..bbc982f5dd8b 100644 --- a/tools/perf/util/setup.py +++ b/tools/perf/util/setup.py | |||
| @@ -1,13 +1,18 @@ | |||
| 1 | #!/usr/bin/python2 | 1 | #!/usr/bin/python2 |
| 2 | 2 | ||
| 3 | from distutils.core import setup, Extension | 3 | from distutils.core import setup, Extension |
| 4 | from os import getenv | ||
| 5 | |||
| 6 | cflags = ['-fno-strict-aliasing', '-Wno-write-strings'] | ||
| 7 | cflags += getenv('CFLAGS', '').split() | ||
| 4 | 8 | ||
| 5 | perf = Extension('perf', | 9 | perf = Extension('perf', |
| 6 | sources = ['util/python.c', 'util/ctype.c', 'util/evlist.c', | 10 | sources = ['util/python.c', 'util/ctype.c', 'util/evlist.c', |
| 7 | 'util/evsel.c', 'util/cpumap.c', 'util/thread_map.c', | 11 | 'util/evsel.c', 'util/cpumap.c', 'util/thread_map.c', |
| 8 | 'util/util.c', 'util/xyarray.c', 'util/cgroup.c'], | 12 | 'util/util.c', 'util/xyarray.c', 'util/cgroup.c'], |
| 9 | include_dirs = ['util/include'], | 13 | include_dirs = ['util/include'], |
| 10 | extra_compile_args = ['-fno-strict-aliasing', '-Wno-write-strings']) | 14 | extra_compile_args = cflags, |
| 15 | ) | ||
| 11 | 16 | ||
| 12 | setup(name='perf', | 17 | setup(name='perf', |
| 13 | version='0.1', | 18 | version='0.1', |
diff --git a/tools/perf/util/string.c b/tools/perf/util/string.c index 8fc0bd3a3a4a..b9a985dadd08 100644 --- a/tools/perf/util/string.c +++ b/tools/perf/util/string.c | |||
| @@ -85,7 +85,7 @@ out: | |||
| 85 | 85 | ||
| 86 | /* | 86 | /* |
| 87 | * Helper function for splitting a string into an argv-like array. | 87 | * Helper function for splitting a string into an argv-like array. |
| 88 | * originaly copied from lib/argv_split.c | 88 | * originally copied from lib/argv_split.c |
| 89 | */ | 89 | */ |
| 90 | static const char *skip_sep(const char *cp) | 90 | static const char *skip_sep(const char *cp) |
| 91 | { | 91 | { |
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 17df793c8924..f06c10f092ba 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
| @@ -1196,6 +1196,8 @@ static int dso__load_sym(struct dso *self, struct map *map, const char *name, | |||
| 1196 | if (curr_dso == NULL) | 1196 | if (curr_dso == NULL) |
| 1197 | goto out_elf_end; | 1197 | goto out_elf_end; |
| 1198 | curr_dso->kernel = self->kernel; | 1198 | curr_dso->kernel = self->kernel; |
| 1199 | curr_dso->long_name = self->long_name; | ||
| 1200 | curr_dso->long_name_len = self->long_name_len; | ||
| 1199 | curr_map = map__new2(start, curr_dso, | 1201 | curr_map = map__new2(start, curr_dso, |
| 1200 | map->type); | 1202 | map->type); |
| 1201 | if (curr_map == NULL) { | 1203 | if (curr_map == NULL) { |
| @@ -1842,6 +1844,7 @@ int dso__load_vmlinux(struct dso *self, struct map *map, | |||
| 1842 | if (fd < 0) | 1844 | if (fd < 0) |
| 1843 | return -1; | 1845 | return -1; |
| 1844 | 1846 | ||
| 1847 | dso__set_long_name(self, (char *)vmlinux); | ||
| 1845 | dso__set_loaded(self, map->type); | 1848 | dso__set_loaded(self, map->type); |
| 1846 | err = dso__load_sym(self, map, symfs_vmlinux, fd, filter, 0, 0); | 1849 | err = dso__load_sym(self, map, symfs_vmlinux, fd, filter, 0, 0); |
| 1847 | close(fd); | 1850 | close(fd); |
| @@ -2403,6 +2406,8 @@ int symbol__init(void) | |||
| 2403 | if (symbol_conf.initialized) | 2406 | if (symbol_conf.initialized) |
| 2404 | return 0; | 2407 | return 0; |
| 2405 | 2408 | ||
| 2409 | symbol_conf.priv_size = ALIGN(symbol_conf.priv_size, sizeof(u64)); | ||
| 2410 | |||
| 2406 | elf_version(EV_CURRENT); | 2411 | elf_version(EV_CURRENT); |
| 2407 | if (symbol_conf.sort_by_name) | 2412 | if (symbol_conf.sort_by_name) |
| 2408 | symbol_conf.priv_size += (sizeof(struct symbol_name_rb_node) - | 2413 | symbol_conf.priv_size += (sizeof(struct symbol_name_rb_node) - |
diff --git a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c b/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c index d9678a34dd70..2618ef2ba31f 100644 --- a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c +++ b/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c | |||
| @@ -46,7 +46,7 @@ int cpu = -1; | |||
| 46 | * | 46 | * |
| 47 | * performance | 47 | * performance |
| 48 | * Performance is paramount. | 48 | * Performance is paramount. |
| 49 | * Unwilling to sacrafice any performance | 49 | * Unwilling to sacrifice any performance |
| 50 | * for the sake of energy saving. (hardware default) | 50 | * for the sake of energy saving. (hardware default) |
| 51 | * | 51 | * |
| 52 | * normal | 52 | * normal |
diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c index 3656849f78a0..73358d256fa2 100644 --- a/virt/kvm/eventfd.c +++ b/virt/kvm/eventfd.c | |||
| @@ -90,7 +90,7 @@ irqfd_shutdown(struct work_struct *work) | |||
| 90 | * We know no new events will be scheduled at this point, so block | 90 | * We know no new events will be scheduled at this point, so block |
| 91 | * until all previously outstanding events have completed | 91 | * until all previously outstanding events have completed |
| 92 | */ | 92 | */ |
| 93 | flush_work(&irqfd->inject); | 93 | flush_work_sync(&irqfd->inject); |
| 94 | 94 | ||
| 95 | /* | 95 | /* |
| 96 | * It is now safe to release the object's resources | 96 | * It is now safe to release the object's resources |
| @@ -578,7 +578,7 @@ kvm_assign_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args) | |||
| 578 | 578 | ||
| 579 | mutex_lock(&kvm->slots_lock); | 579 | mutex_lock(&kvm->slots_lock); |
| 580 | 580 | ||
| 581 | /* Verify that there isnt a match already */ | 581 | /* Verify that there isn't a match already */ |
| 582 | if (ioeventfd_check_collision(kvm, p)) { | 582 | if (ioeventfd_check_collision(kvm, p)) { |
| 583 | ret = -EEXIST; | 583 | ret = -EEXIST; |
| 584 | goto unlock_fail; | 584 | goto unlock_fail; |
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 556e3efe5325..6330653480e4 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
| @@ -1037,6 +1037,17 @@ static pfn_t get_fault_pfn(void) | |||
| 1037 | return fault_pfn; | 1037 | return fault_pfn; |
| 1038 | } | 1038 | } |
| 1039 | 1039 | ||
| 1040 | int get_user_page_nowait(struct task_struct *tsk, struct mm_struct *mm, | ||
| 1041 | unsigned long start, int write, struct page **page) | ||
| 1042 | { | ||
| 1043 | int flags = FOLL_TOUCH | FOLL_NOWAIT | FOLL_HWPOISON | FOLL_GET; | ||
| 1044 | |||
| 1045 | if (write) | ||
| 1046 | flags |= FOLL_WRITE; | ||
| 1047 | |||
| 1048 | return __get_user_pages(tsk, mm, start, 1, flags, page, NULL, NULL); | ||
| 1049 | } | ||
| 1050 | |||
| 1040 | static inline int check_user_page_hwpoison(unsigned long addr) | 1051 | static inline int check_user_page_hwpoison(unsigned long addr) |
| 1041 | { | 1052 | { |
| 1042 | int rc, flags = FOLL_TOUCH | FOLL_HWPOISON | FOLL_WRITE; | 1053 | int rc, flags = FOLL_TOUCH | FOLL_HWPOISON | FOLL_WRITE; |
| @@ -1070,7 +1081,14 @@ static pfn_t hva_to_pfn(struct kvm *kvm, unsigned long addr, bool atomic, | |||
| 1070 | if (writable) | 1081 | if (writable) |
| 1071 | *writable = write_fault; | 1082 | *writable = write_fault; |
| 1072 | 1083 | ||
| 1073 | npages = get_user_pages_fast(addr, 1, write_fault, page); | 1084 | if (async) { |
| 1085 | down_read(¤t->mm->mmap_sem); | ||
| 1086 | npages = get_user_page_nowait(current, current->mm, | ||
| 1087 | addr, write_fault, page); | ||
| 1088 | up_read(¤t->mm->mmap_sem); | ||
| 1089 | } else | ||
| 1090 | npages = get_user_pages_fast(addr, 1, write_fault, | ||
| 1091 | page); | ||
| 1074 | 1092 | ||
| 1075 | /* map read fault as writable if possible */ | 1093 | /* map read fault as writable if possible */ |
| 1076 | if (unlikely(!write_fault) && npages == 1) { | 1094 | if (unlikely(!write_fault) && npages == 1) { |
| @@ -1093,7 +1111,8 @@ static pfn_t hva_to_pfn(struct kvm *kvm, unsigned long addr, bool atomic, | |||
| 1093 | return get_fault_pfn(); | 1111 | return get_fault_pfn(); |
| 1094 | 1112 | ||
| 1095 | down_read(¤t->mm->mmap_sem); | 1113 | down_read(¤t->mm->mmap_sem); |
| 1096 | if (check_user_page_hwpoison(addr)) { | 1114 | if (npages == -EHWPOISON || |
| 1115 | (!async && check_user_page_hwpoison(addr))) { | ||
| 1097 | up_read(¤t->mm->mmap_sem); | 1116 | up_read(¤t->mm->mmap_sem); |
| 1098 | get_page(hwpoison_page); | 1117 | get_page(hwpoison_page); |
| 1099 | return page_to_pfn(hwpoison_page); | 1118 | return page_to_pfn(hwpoison_page); |
