diff options
28 files changed, 223 insertions, 153 deletions
diff --git a/Documentation/filesystems/ntfs.txt b/Documentation/filesystems/ntfs.txt index 13ba649bda75..81779068b09b 100644 --- a/Documentation/filesystems/ntfs.txt +++ b/Documentation/filesystems/ntfs.txt | |||
@@ -457,6 +457,8 @@ ChangeLog | |||
457 | 457 | ||
458 | Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog. | 458 | Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog. |
459 | 459 | ||
460 | 2.1.28: | ||
461 | - Fix a deadlock. | ||
460 | 2.1.27: | 462 | 2.1.27: |
461 | - Implement page migration support so the kernel can move memory used | 463 | - Implement page migration support so the kernel can move memory used |
462 | by NTFS files and directories around for management purposes. | 464 | by NTFS files and directories around for management purposes. |
diff --git a/Documentation/hwmon/w83793 b/Documentation/hwmon/w83793 index 45e5408340e0..51171a83165b 100644 --- a/Documentation/hwmon/w83793 +++ b/Documentation/hwmon/w83793 | |||
@@ -45,18 +45,14 @@ This driver implements support for Winbond W83793G/W83793R chips. | |||
45 | temp5-6 have a 1 degree Celsiis resolution. | 45 | temp5-6 have a 1 degree Celsiis resolution. |
46 | 46 | ||
47 | * Temperature sensor types | 47 | * Temperature sensor types |
48 | Temp1-4 have 3 possible types. It can be read from (and written to) | 48 | Temp1-4 have 2 possible types. It can be read from (and written to) |
49 | temp[1-4]_type. | 49 | temp[1-4]_type. |
50 | - If the value of 0, the related temperature channel stops | ||
51 | monitoring. | ||
52 | - If the value is 3, it starts monitoring using a remote termal diode | 50 | - If the value is 3, it starts monitoring using a remote termal diode |
53 | (default). | 51 | (default). |
54 | - If the value is 5, it starts monitoring using the temperature sensor | ||
55 | in AMD CPU and get result by AMDSI. | ||
56 | - If the value is 6, it starts monitoring using the temperature sensor | 52 | - If the value is 6, it starts monitoring using the temperature sensor |
57 | in Intel CPU and get result by PECI. | 53 | in Intel CPU and get result by PECI. |
58 | Temp5-6 can be connected to external thermistors (value of | 54 | Temp5-6 can be connected to external thermistors (value of |
59 | temp[5-6]_type is 4). They can also be disabled (value is 0). | 55 | temp[5-6]_type is 4). |
60 | 56 | ||
61 | * Alarm mechanism | 57 | * Alarm mechanism |
62 | For voltage sensors, an alarm triggers if the measured value is below | 58 | For voltage sensors, an alarm triggers if the measured value is below |
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c index 802febed7df5..a8b387197d5b 100644 --- a/arch/mips/kernel/smtc.c +++ b/arch/mips/kernel/smtc.c | |||
@@ -261,6 +261,7 @@ void smtc_configure_tlb(void) | |||
261 | } | 261 | } |
262 | } | 262 | } |
263 | write_c0_mvpcontrol(read_c0_mvpcontrol() | MVPCONTROL_STLB); | 263 | write_c0_mvpcontrol(read_c0_mvpcontrol() | MVPCONTROL_STLB); |
264 | ehb(); | ||
264 | 265 | ||
265 | /* | 266 | /* |
266 | * Setup kernel data structures to use software total, | 267 | * Setup kernel data structures to use software total, |
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index 2e0e21ef433e..65160d4984d9 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c | |||
@@ -106,7 +106,6 @@ void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, | |||
106 | ENTER_CRITICAL(flags); | 106 | ENTER_CRITICAL(flags); |
107 | size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; | 107 | size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; |
108 | size = (size + 1) >> 1; | 108 | size = (size + 1) >> 1; |
109 | local_irq_save(flags); | ||
110 | if (size <= current_cpu_data.tlbsize/2) { | 109 | if (size <= current_cpu_data.tlbsize/2) { |
111 | int oldpid = read_c0_entryhi(); | 110 | int oldpid = read_c0_entryhi(); |
112 | int newpid = cpu_asid(cpu, mm); | 111 | int newpid = cpu_asid(cpu, mm); |
diff --git a/drivers/char/mem.c b/drivers/char/mem.c index 4f1813e04754..f5c160caf9f4 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c | |||
@@ -293,8 +293,8 @@ static int mmap_kmem(struct file * file, struct vm_area_struct * vma) | |||
293 | { | 293 | { |
294 | unsigned long pfn; | 294 | unsigned long pfn; |
295 | 295 | ||
296 | /* Turn a pfn offset into an absolute pfn */ | 296 | /* Turn a kernel-virtual address into a physical page frame */ |
297 | pfn = PFN_DOWN(virt_to_phys((void *)PAGE_OFFSET)) + vma->vm_pgoff; | 297 | pfn = __pa((u64)vma->vm_pgoff << PAGE_SHIFT) >> PAGE_SHIFT; |
298 | 298 | ||
299 | /* | 299 | /* |
300 | * RED-PEN: on some architectures there is more mapped memory | 300 | * RED-PEN: on some architectures there is more mapped memory |
diff --git a/drivers/hwmon/hwmon-vid.c b/drivers/hwmon/hwmon-vid.c index 31c42002708f..b80f6ed5acfc 100644 --- a/drivers/hwmon/hwmon-vid.c +++ b/drivers/hwmon/hwmon-vid.c | |||
@@ -93,7 +93,7 @@ int vid_from_reg(int val, u8 vrm) | |||
93 | case 110: /* Intel Conroe */ | 93 | case 110: /* Intel Conroe */ |
94 | /* compute in uV, round to mV */ | 94 | /* compute in uV, round to mV */ |
95 | val &= 0xff; | 95 | val &= 0xff; |
96 | if(((val & 0x7e) == 0xfe) || (!(val & 0x7e))) | 96 | if (val < 0x02 || val > 0xb2) |
97 | return 0; | 97 | return 0; |
98 | return((1600000 - (val - 2) * 6250 + 500) / 1000); | 98 | return((1600000 - (val - 2) * 6250 + 500) / 1000); |
99 | case 24: /* Opteron processor */ | 99 | case 24: /* Opteron processor */ |
diff --git a/drivers/hwmon/w83793.c b/drivers/hwmon/w83793.c index c12ac5abc2bb..253ffaf1568a 100644 --- a/drivers/hwmon/w83793.c +++ b/drivers/hwmon/w83793.c | |||
@@ -117,6 +117,7 @@ static const u16 W83793_REG_IN[][3] = { | |||
117 | /* Low Bits of Vcore A/B Vtt Read/High/Low */ | 117 | /* Low Bits of Vcore A/B Vtt Read/High/Low */ |
118 | static const u16 W83793_REG_IN_LOW_BITS[] = { 0x1b, 0x68, 0x69 }; | 118 | static const u16 W83793_REG_IN_LOW_BITS[] = { 0x1b, 0x68, 0x69 }; |
119 | static u8 scale_in[] = { 2, 2, 2, 16, 16, 16, 8, 24, 24, 16 }; | 119 | static u8 scale_in[] = { 2, 2, 2, 16, 16, 16, 8, 24, 24, 16 }; |
120 | static u8 scale_in_add[] = { 0, 0, 0, 0, 0, 0, 0, 150, 150, 0 }; | ||
120 | 121 | ||
121 | #define W83793_REG_FAN(index) (0x23 + 2 * (index)) /* High byte */ | 122 | #define W83793_REG_FAN(index) (0x23 + 2 * (index)) /* High byte */ |
122 | #define W83793_REG_FAN_MIN(index) (0x90 + 2 * (index)) /* High byte */ | 123 | #define W83793_REG_FAN_MIN(index) (0x90 + 2 * (index)) /* High byte */ |
@@ -203,6 +204,8 @@ struct w83793_data { | |||
203 | u8 temp_fan_map[6]; /* Temp controls which pwm fan, bit field */ | 204 | u8 temp_fan_map[6]; /* Temp controls which pwm fan, bit field */ |
204 | 205 | ||
205 | u8 has_pwm; | 206 | u8 has_pwm; |
207 | u8 has_temp; | ||
208 | u8 has_vid; | ||
206 | u8 pwm_enable; /* Register value, each Temp has 1 bit */ | 209 | u8 pwm_enable; /* Register value, each Temp has 1 bit */ |
207 | u8 pwm_uptime; /* Register value */ | 210 | u8 pwm_uptime; /* Register value */ |
208 | u8 pwm_downtime; /* Register value */ | 211 | u8 pwm_downtime; /* Register value */ |
@@ -500,7 +503,7 @@ store_temp(struct device *dev, struct device_attribute *attr, | |||
500 | each has 4 mode:(2 bits) | 503 | each has 4 mode:(2 bits) |
501 | 0: Stop monitor | 504 | 0: Stop monitor |
502 | 1: Use internal temp sensor(default) | 505 | 1: Use internal temp sensor(default) |
503 | 2: Use sensor in AMD CPU and get result by AMDSI | 506 | 2: Reserved |
504 | 3: Use sensor in Intel CPU and get result by PECI | 507 | 3: Use sensor in Intel CPU and get result by PECI |
505 | 508 | ||
506 | TR1-TR2 | 509 | TR1-TR2 |
@@ -509,8 +512,8 @@ store_temp(struct device *dev, struct device_attribute *attr, | |||
509 | 1: To enable temp sensors monitor | 512 | 1: To enable temp sensors monitor |
510 | */ | 513 | */ |
511 | 514 | ||
512 | /* 0 disable, 5 AMDSI, 6 PECI */ | 515 | /* 0 disable, 6 PECI */ |
513 | static u8 TO_TEMP_MODE[] = { 0, 0, 5, 6 }; | 516 | static u8 TO_TEMP_MODE[] = { 0, 0, 0, 6 }; |
514 | 517 | ||
515 | static ssize_t | 518 | static ssize_t |
516 | show_temp_mode(struct device *dev, struct device_attribute *attr, char *buf) | 519 | show_temp_mode(struct device *dev, struct device_attribute *attr, char *buf) |
@@ -550,11 +553,10 @@ store_temp_mode(struct device *dev, struct device_attribute *attr, | |||
550 | u8 val = simple_strtoul(buf, NULL, 10); | 553 | u8 val = simple_strtoul(buf, NULL, 10); |
551 | 554 | ||
552 | /* transform the sysfs interface values into table above */ | 555 | /* transform the sysfs interface values into table above */ |
553 | if ((val == 5 || val == 6) && (index < 4)) { | 556 | if ((val == 6) && (index < 4)) { |
554 | val -= 3; | 557 | val -= 3; |
555 | } else if ((val == 3 && index < 4) | 558 | } else if ((val == 3 && index < 4) |
556 | || (val == 4 && index >= 4) | 559 | || (val == 4 && index >= 4)) { |
557 | || val == 0) { | ||
558 | /* transform diode or thermistor into internal enable */ | 560 | /* transform diode or thermistor into internal enable */ |
559 | val = !!val; | 561 | val = !!val; |
560 | } else { | 562 | } else { |
@@ -839,7 +841,9 @@ show_in(struct device *dev, struct device_attribute *attr, char *buf) | |||
839 | val <<= 2; | 841 | val <<= 2; |
840 | val += (data->in_low_bits[nr] >> (index * 2)) & 0x3; | 842 | val += (data->in_low_bits[nr] >> (index * 2)) & 0x3; |
841 | } | 843 | } |
842 | return sprintf(buf, "%d\n", val * scale_in[index]); | 844 | /* voltage inputs 5VDD and 5VSB needs 150mV offset */ |
845 | val = val * scale_in[index] + scale_in_add[index]; | ||
846 | return sprintf(buf, "%d\n", val); | ||
843 | } | 847 | } |
844 | 848 | ||
845 | static ssize_t | 849 | static ssize_t |
@@ -859,6 +863,10 @@ store_in(struct device *dev, struct device_attribute *attr, | |||
859 | scale_in[index] / 2) / scale_in[index]; | 863 | scale_in[index] / 2) / scale_in[index]; |
860 | mutex_lock(&data->update_lock); | 864 | mutex_lock(&data->update_lock); |
861 | if (index > 2) { | 865 | if (index > 2) { |
866 | /* fix the limit values of 5VDD and 5VSB to ALARM mechanism */ | ||
867 | if (1 == nr || 2 == nr) { | ||
868 | val -= scale_in_add[index] / scale_in[index]; | ||
869 | } | ||
862 | val = SENSORS_LIMIT(val, 0, 255); | 870 | val = SENSORS_LIMIT(val, 0, 255); |
863 | } else { | 871 | } else { |
864 | val = SENSORS_LIMIT(val, 0, 0x3FF); | 872 | val = SENSORS_LIMIT(val, 0, 0x3FF); |
@@ -979,12 +987,6 @@ static struct sensor_device_attribute_2 w83793_sensor_attr_2[] = { | |||
979 | SENSOR_ATTR_IN(7), | 987 | SENSOR_ATTR_IN(7), |
980 | SENSOR_ATTR_IN(8), | 988 | SENSOR_ATTR_IN(8), |
981 | SENSOR_ATTR_IN(9), | 989 | SENSOR_ATTR_IN(9), |
982 | SENSOR_ATTR_TEMP(1), | ||
983 | SENSOR_ATTR_TEMP(2), | ||
984 | SENSOR_ATTR_TEMP(3), | ||
985 | SENSOR_ATTR_TEMP(4), | ||
986 | SENSOR_ATTR_TEMP(5), | ||
987 | SENSOR_ATTR_TEMP(6), | ||
988 | SENSOR_ATTR_FAN(1), | 990 | SENSOR_ATTR_FAN(1), |
989 | SENSOR_ATTR_FAN(2), | 991 | SENSOR_ATTR_FAN(2), |
990 | SENSOR_ATTR_FAN(3), | 992 | SENSOR_ATTR_FAN(3), |
@@ -995,6 +997,15 @@ static struct sensor_device_attribute_2 w83793_sensor_attr_2[] = { | |||
995 | SENSOR_ATTR_PWM(3), | 997 | SENSOR_ATTR_PWM(3), |
996 | }; | 998 | }; |
997 | 999 | ||
1000 | static struct sensor_device_attribute_2 w83793_temp[] = { | ||
1001 | SENSOR_ATTR_TEMP(1), | ||
1002 | SENSOR_ATTR_TEMP(2), | ||
1003 | SENSOR_ATTR_TEMP(3), | ||
1004 | SENSOR_ATTR_TEMP(4), | ||
1005 | SENSOR_ATTR_TEMP(5), | ||
1006 | SENSOR_ATTR_TEMP(6), | ||
1007 | }; | ||
1008 | |||
998 | /* Fan6-Fan12 */ | 1009 | /* Fan6-Fan12 */ |
999 | static struct sensor_device_attribute_2 w83793_left_fan[] = { | 1010 | static struct sensor_device_attribute_2 w83793_left_fan[] = { |
1000 | SENSOR_ATTR_FAN(6), | 1011 | SENSOR_ATTR_FAN(6), |
@@ -1015,9 +1026,12 @@ static struct sensor_device_attribute_2 w83793_left_pwm[] = { | |||
1015 | SENSOR_ATTR_PWM(8), | 1026 | SENSOR_ATTR_PWM(8), |
1016 | }; | 1027 | }; |
1017 | 1028 | ||
1018 | static struct sensor_device_attribute_2 sda_single_files[] = { | 1029 | static struct sensor_device_attribute_2 w83793_vid[] = { |
1019 | SENSOR_ATTR_2(cpu0_vid, S_IRUGO, show_vid, NULL, NOT_USED, 0), | 1030 | SENSOR_ATTR_2(cpu0_vid, S_IRUGO, show_vid, NULL, NOT_USED, 0), |
1020 | SENSOR_ATTR_2(cpu1_vid, S_IRUGO, show_vid, NULL, NOT_USED, 1), | 1031 | SENSOR_ATTR_2(cpu1_vid, S_IRUGO, show_vid, NULL, NOT_USED, 1), |
1032 | }; | ||
1033 | |||
1034 | static struct sensor_device_attribute_2 sda_single_files[] = { | ||
1021 | SENSOR_ATTR_2(vrm, S_IWUSR | S_IRUGO, show_vrm, store_vrm, | 1035 | SENSOR_ATTR_2(vrm, S_IWUSR | S_IRUGO, show_vrm, store_vrm, |
1022 | NOT_USED, NOT_USED), | 1036 | NOT_USED, NOT_USED), |
1023 | SENSOR_ATTR_2(chassis, S_IWUSR | S_IRUGO, show_alarm_beep, | 1037 | SENSOR_ATTR_2(chassis, S_IWUSR | S_IRUGO, show_alarm_beep, |
@@ -1070,11 +1084,17 @@ static int w83793_detach_client(struct i2c_client *client) | |||
1070 | for (i = 0; i < ARRAY_SIZE(sda_single_files); i++) | 1084 | for (i = 0; i < ARRAY_SIZE(sda_single_files); i++) |
1071 | device_remove_file(dev, &sda_single_files[i].dev_attr); | 1085 | device_remove_file(dev, &sda_single_files[i].dev_attr); |
1072 | 1086 | ||
1087 | for (i = 0; i < ARRAY_SIZE(w83793_vid); i++) | ||
1088 | device_remove_file(dev, &w83793_vid[i].dev_attr); | ||
1089 | |||
1073 | for (i = 0; i < ARRAY_SIZE(w83793_left_fan); i++) | 1090 | for (i = 0; i < ARRAY_SIZE(w83793_left_fan); i++) |
1074 | device_remove_file(dev, &w83793_left_fan[i].dev_attr); | 1091 | device_remove_file(dev, &w83793_left_fan[i].dev_attr); |
1075 | 1092 | ||
1076 | for (i = 0; i < ARRAY_SIZE(w83793_left_pwm); i++) | 1093 | for (i = 0; i < ARRAY_SIZE(w83793_left_pwm); i++) |
1077 | device_remove_file(dev, &w83793_left_pwm[i].dev_attr); | 1094 | device_remove_file(dev, &w83793_left_pwm[i].dev_attr); |
1095 | |||
1096 | for (i = 0; i < ARRAY_SIZE(w83793_temp); i++) | ||
1097 | device_remove_file(dev, &w83793_temp[i].dev_attr); | ||
1078 | } | 1098 | } |
1079 | 1099 | ||
1080 | if ((err = i2c_detach_client(client))) | 1100 | if ((err = i2c_detach_client(client))) |
@@ -1187,6 +1207,7 @@ static int w83793_detect(struct i2c_adapter *adapter, int address, int kind) | |||
1187 | struct w83793_data *data; | 1207 | struct w83793_data *data; |
1188 | int files_fan = ARRAY_SIZE(w83793_left_fan) / 7; | 1208 | int files_fan = ARRAY_SIZE(w83793_left_fan) / 7; |
1189 | int files_pwm = ARRAY_SIZE(w83793_left_pwm) / 5; | 1209 | int files_pwm = ARRAY_SIZE(w83793_left_pwm) / 5; |
1210 | int files_temp = ARRAY_SIZE(w83793_temp) / 6; | ||
1190 | int err = 0; | 1211 | int err = 0; |
1191 | 1212 | ||
1192 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { | 1213 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { |
@@ -1313,6 +1334,44 @@ static int w83793_detect(struct i2c_adapter *adapter, int address, int kind) | |||
1313 | data->has_pwm |= 0x80; | 1334 | data->has_pwm |= 0x80; |
1314 | } | 1335 | } |
1315 | 1336 | ||
1337 | tmp = w83793_read_value(client, W83793_REG_FANIN_SEL); | ||
1338 | if ((tmp & 0x01) && (val & 0x08)) { /* fan 9, second location */ | ||
1339 | data->has_fan |= 0x100; | ||
1340 | } | ||
1341 | if ((tmp & 0x02) && (val & 0x10)) { /* fan 10, second location */ | ||
1342 | data->has_fan |= 0x200; | ||
1343 | } | ||
1344 | if ((tmp & 0x04) && (val & 0x20)) { /* fan 11, second location */ | ||
1345 | data->has_fan |= 0x400; | ||
1346 | } | ||
1347 | if ((tmp & 0x08) && (val & 0x40)) { /* fan 12, second location */ | ||
1348 | data->has_fan |= 0x800; | ||
1349 | } | ||
1350 | |||
1351 | /* check the temp1-6 mode, ignore former AMDSI selected inputs */ | ||
1352 | tmp = w83793_read_value(client,W83793_REG_TEMP_MODE[0]); | ||
1353 | if (tmp & 0x01) | ||
1354 | data->has_temp |= 0x01; | ||
1355 | if (tmp & 0x04) | ||
1356 | data->has_temp |= 0x02; | ||
1357 | if (tmp & 0x10) | ||
1358 | data->has_temp |= 0x04; | ||
1359 | if (tmp & 0x40) | ||
1360 | data->has_temp |= 0x08; | ||
1361 | |||
1362 | tmp = w83793_read_value(client,W83793_REG_TEMP_MODE[1]); | ||
1363 | if (tmp & 0x01) | ||
1364 | data->has_temp |= 0x10; | ||
1365 | if (tmp & 0x02) | ||
1366 | data->has_temp |= 0x20; | ||
1367 | |||
1368 | /* Detect the VID usage and ignore unused input */ | ||
1369 | tmp = w83793_read_value(client, W83793_REG_MFC); | ||
1370 | if (!(tmp & 0x29)) | ||
1371 | data->has_vid |= 0x1; /* has VIDA */ | ||
1372 | if (tmp & 0x80) | ||
1373 | data->has_vid |= 0x2; /* has VIDB */ | ||
1374 | |||
1316 | /* Register sysfs hooks */ | 1375 | /* Register sysfs hooks */ |
1317 | for (i = 0; i < ARRAY_SIZE(w83793_sensor_attr_2); i++) { | 1376 | for (i = 0; i < ARRAY_SIZE(w83793_sensor_attr_2); i++) { |
1318 | err = device_create_file(dev, | 1377 | err = device_create_file(dev, |
@@ -1321,6 +1380,14 @@ static int w83793_detect(struct i2c_adapter *adapter, int address, int kind) | |||
1321 | goto exit_remove; | 1380 | goto exit_remove; |
1322 | } | 1381 | } |
1323 | 1382 | ||
1383 | for (i = 0; i < ARRAY_SIZE(w83793_vid); i++) { | ||
1384 | if (!(data->has_vid & (1 << i))) | ||
1385 | continue; | ||
1386 | err = device_create_file(dev, &w83793_vid[i].dev_attr); | ||
1387 | if (err) | ||
1388 | goto exit_remove; | ||
1389 | } | ||
1390 | |||
1324 | for (i = 0; i < ARRAY_SIZE(sda_single_files); i++) { | 1391 | for (i = 0; i < ARRAY_SIZE(sda_single_files); i++) { |
1325 | err = device_create_file(dev, &sda_single_files[i].dev_attr); | 1392 | err = device_create_file(dev, &sda_single_files[i].dev_attr); |
1326 | if (err) | 1393 | if (err) |
@@ -1328,6 +1395,19 @@ static int w83793_detect(struct i2c_adapter *adapter, int address, int kind) | |||
1328 | 1395 | ||
1329 | } | 1396 | } |
1330 | 1397 | ||
1398 | for (i = 0; i < 6; i++) { | ||
1399 | int j; | ||
1400 | if (!(data->has_temp & (1 << i))) | ||
1401 | continue; | ||
1402 | for (j = 0; j < files_temp; j++) { | ||
1403 | err = device_create_file(dev, | ||
1404 | &w83793_temp[(i) * files_temp | ||
1405 | + j].dev_attr); | ||
1406 | if (err) | ||
1407 | goto exit_remove; | ||
1408 | } | ||
1409 | } | ||
1410 | |||
1331 | for (i = 5; i < 12; i++) { | 1411 | for (i = 5; i < 12; i++) { |
1332 | int j; | 1412 | int j; |
1333 | if (!(data->has_fan & (1 << i))) | 1413 | if (!(data->has_fan & (1 << i))) |
@@ -1371,12 +1451,18 @@ exit_remove: | |||
1371 | for (i = 0; i < ARRAY_SIZE(sda_single_files); i++) | 1451 | for (i = 0; i < ARRAY_SIZE(sda_single_files); i++) |
1372 | device_remove_file(dev, &sda_single_files[i].dev_attr); | 1452 | device_remove_file(dev, &sda_single_files[i].dev_attr); |
1373 | 1453 | ||
1454 | for (i = 0; i < ARRAY_SIZE(w83793_vid); i++) | ||
1455 | device_remove_file(dev, &w83793_vid[i].dev_attr); | ||
1456 | |||
1374 | for (i = 0; i < ARRAY_SIZE(w83793_left_fan); i++) | 1457 | for (i = 0; i < ARRAY_SIZE(w83793_left_fan); i++) |
1375 | device_remove_file(dev, &w83793_left_fan[i].dev_attr); | 1458 | device_remove_file(dev, &w83793_left_fan[i].dev_attr); |
1376 | 1459 | ||
1377 | for (i = 0; i < ARRAY_SIZE(w83793_left_pwm); i++) | 1460 | for (i = 0; i < ARRAY_SIZE(w83793_left_pwm); i++) |
1378 | device_remove_file(dev, &w83793_left_pwm[i].dev_attr); | 1461 | device_remove_file(dev, &w83793_left_pwm[i].dev_attr); |
1379 | 1462 | ||
1463 | for (i = 0; i < ARRAY_SIZE(w83793_temp); i++) | ||
1464 | device_remove_file(dev, &w83793_temp[i].dev_attr); | ||
1465 | |||
1380 | if (data->lm75[0] != NULL) { | 1466 | if (data->lm75[0] != NULL) { |
1381 | i2c_detach_client(data->lm75[0]); | 1467 | i2c_detach_client(data->lm75[0]); |
1382 | kfree(data->lm75[0]); | 1468 | kfree(data->lm75[0]); |
@@ -1428,6 +1514,8 @@ static void w83793_update_nonvolatile(struct device *dev) | |||
1428 | } | 1514 | } |
1429 | 1515 | ||
1430 | for (i = 0; i < ARRAY_SIZE(data->temp_fan_map); i++) { | 1516 | for (i = 0; i < ARRAY_SIZE(data->temp_fan_map); i++) { |
1517 | if (!(data->has_temp & (1 << i))) | ||
1518 | continue; | ||
1431 | data->temp_fan_map[i] = | 1519 | data->temp_fan_map[i] = |
1432 | w83793_read_value(client, W83793_REG_TEMP_FAN_MAP(i)); | 1520 | w83793_read_value(client, W83793_REG_TEMP_FAN_MAP(i)); |
1433 | for (j = 1; j < 5; j++) { | 1521 | for (j = 1; j < 5; j++) { |
@@ -1510,9 +1598,12 @@ static struct w83793_data *w83793_update_device(struct device *dev) | |||
1510 | w83793_read_value(client, W83793_REG_FAN(i) + 1); | 1598 | w83793_read_value(client, W83793_REG_FAN(i) + 1); |
1511 | } | 1599 | } |
1512 | 1600 | ||
1513 | for (i = 0; i < ARRAY_SIZE(data->temp); i++) | 1601 | for (i = 0; i < ARRAY_SIZE(data->temp); i++) { |
1602 | if (!(data->has_temp & (1 << i))) | ||
1603 | continue; | ||
1514 | data->temp[i][TEMP_READ] = | 1604 | data->temp[i][TEMP_READ] = |
1515 | w83793_read_value(client, W83793_REG_TEMP[i][TEMP_READ]); | 1605 | w83793_read_value(client, W83793_REG_TEMP[i][TEMP_READ]); |
1606 | } | ||
1516 | 1607 | ||
1517 | data->temp_low_bits = | 1608 | data->temp_low_bits = |
1518 | w83793_read_value(client, W83793_REG_TEMP_LOW_BITS); | 1609 | w83793_read_value(client, W83793_REG_TEMP_LOW_BITS); |
@@ -1527,8 +1618,10 @@ static struct w83793_data *w83793_update_device(struct device *dev) | |||
1527 | for (i = 0; i < ARRAY_SIZE(data->alarms); i++) | 1618 | for (i = 0; i < ARRAY_SIZE(data->alarms); i++) |
1528 | data->alarms[i] = | 1619 | data->alarms[i] = |
1529 | w83793_read_value(client, W83793_REG_ALARM(i)); | 1620 | w83793_read_value(client, W83793_REG_ALARM(i)); |
1530 | data->vid[0] = w83793_read_value(client, W83793_REG_VID_INA); | 1621 | if (data->has_vid & 0x01) |
1531 | data->vid[1] = w83793_read_value(client, W83793_REG_VID_INB); | 1622 | data->vid[0] = w83793_read_value(client, W83793_REG_VID_INA); |
1623 | if (data->has_vid & 0x02) | ||
1624 | data->vid[1] = w83793_read_value(client, W83793_REG_VID_INB); | ||
1532 | w83793_update_nonvolatile(dev); | 1625 | w83793_update_nonvolatile(dev); |
1533 | data->last_updated = jiffies; | 1626 | data->last_updated = jiffies; |
1534 | data->valid = 1; | 1627 | data->valid = 1; |
diff --git a/drivers/media/video/cx88/cx88-tvaudio.c b/drivers/media/video/cx88/cx88-tvaudio.c index 3482e0114d43..2bd84d351a18 100644 --- a/drivers/media/video/cx88/cx88-tvaudio.c +++ b/drivers/media/video/cx88/cx88-tvaudio.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/module.h> | 38 | #include <linux/module.h> |
39 | #include <linux/moduleparam.h> | 39 | #include <linux/moduleparam.h> |
40 | #include <linux/errno.h> | 40 | #include <linux/errno.h> |
41 | #include <linux/freezer.h> | ||
41 | #include <linux/kernel.h> | 42 | #include <linux/kernel.h> |
42 | #include <linux/slab.h> | 43 | #include <linux/slab.h> |
43 | #include <linux/mm.h> | 44 | #include <linux/mm.h> |
@@ -961,6 +962,7 @@ int cx88_audio_thread(void *data) | |||
961 | msleep_interruptible(1000); | 962 | msleep_interruptible(1000); |
962 | if (kthread_should_stop()) | 963 | if (kthread_should_stop()) |
963 | break; | 964 | break; |
965 | try_to_freeze(); | ||
964 | 966 | ||
965 | /* just monitor the audio status for now ... */ | 967 | /* just monitor the audio status for now ... */ |
966 | memset(&t, 0, sizeof(t)); | 968 | memset(&t, 0, sizeof(t)); |
diff --git a/drivers/media/video/ks0127.c b/drivers/media/video/ks0127.c index c1a377f797d9..b6cd21e6dab9 100644 --- a/drivers/media/video/ks0127.c +++ b/drivers/media/video/ks0127.c | |||
@@ -712,13 +712,13 @@ static int ks0127_command(struct i2c_client *client, | |||
712 | *iarg = 0; | 712 | *iarg = 0; |
713 | status = ks0127_read(ks, KS_STAT); | 713 | status = ks0127_read(ks, KS_STAT); |
714 | if (!(status & 0x20)) /* NOVID not set */ | 714 | if (!(status & 0x20)) /* NOVID not set */ |
715 | *iarg = (*iarg & DECODER_STATUS_GOOD); | 715 | *iarg = (*iarg | DECODER_STATUS_GOOD); |
716 | if ((status & 0x01)) /* CLOCK set */ | 716 | if ((status & 0x01)) /* CLOCK set */ |
717 | *iarg = (*iarg & DECODER_STATUS_COLOR); | 717 | *iarg = (*iarg | DECODER_STATUS_COLOR); |
718 | if ((status & 0x08)) /* PALDET set */ | 718 | if ((status & 0x08)) /* PALDET set */ |
719 | *iarg = (*iarg & DECODER_STATUS_PAL); | 719 | *iarg = (*iarg | DECODER_STATUS_PAL); |
720 | else | 720 | else |
721 | *iarg = (*iarg & DECODER_STATUS_NTSC); | 721 | *iarg = (*iarg | DECODER_STATUS_NTSC); |
722 | break; | 722 | break; |
723 | 723 | ||
724 | //Catch any unknown command | 724 | //Catch any unknown command |
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 4dead84aff46..ae984bbe36b6 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -2570,6 +2570,7 @@ struct saa7134_board saa7134_boards[] = { | |||
2570 | .radio_type = UNSET, | 2570 | .radio_type = UNSET, |
2571 | .tuner_addr = ADDR_UNSET, | 2571 | .tuner_addr = ADDR_UNSET, |
2572 | .radio_addr = ADDR_UNSET, | 2572 | .radio_addr = ADDR_UNSET, |
2573 | .gpiomask = 1 << 21, | ||
2573 | .inputs = {{ | 2574 | .inputs = {{ |
2574 | .name = name_tv, | 2575 | .name = name_tv, |
2575 | .vmux = 1, | 2576 | .vmux = 1, |
@@ -2578,15 +2579,20 @@ struct saa7134_board saa7134_boards[] = { | |||
2578 | },{ | 2579 | },{ |
2579 | .name = name_comp1, | 2580 | .name = name_comp1, |
2580 | .vmux = 3, | 2581 | .vmux = 3, |
2581 | .amux = LINE1, | 2582 | .amux = LINE2, /* unconfirmed, taken from Philips driver */ |
2583 | },{ | ||
2584 | .name = name_comp2, | ||
2585 | .vmux = 0, /* untested, Composite over S-Video */ | ||
2586 | .amux = LINE2, | ||
2582 | },{ | 2587 | },{ |
2583 | .name = name_svideo, | 2588 | .name = name_svideo, |
2584 | .vmux = 0, | 2589 | .vmux = 8, |
2585 | .amux = LINE1, | 2590 | .amux = LINE2, |
2586 | }}, | 2591 | }}, |
2587 | .radio = { | 2592 | .radio = { |
2588 | .name = name_radio, | 2593 | .name = name_radio, |
2589 | .amux = LINE1, | 2594 | .amux = TV, |
2595 | .gpio = 0x0200000, | ||
2590 | }, | 2596 | }, |
2591 | }, | 2597 | }, |
2592 | [SAA7134_BOARD_CINERGY250PCI] = { | 2598 | [SAA7134_BOARD_CINERGY250PCI] = { |
diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c index 2624e3f7dd29..4e7c1fa668d3 100644 --- a/drivers/media/video/tveeprom.c +++ b/drivers/media/video/tveeprom.c | |||
@@ -184,7 +184,7 @@ hauppauge_tuner[] = | |||
184 | { TUNER_ABSENT, "Thompson DTT757"}, | 184 | { TUNER_ABSENT, "Thompson DTT757"}, |
185 | /* 80-89 */ | 185 | /* 80-89 */ |
186 | { TUNER_ABSENT, "Philips FQ1216LME MK3"}, | 186 | { TUNER_ABSENT, "Philips FQ1216LME MK3"}, |
187 | { TUNER_ABSENT, "LG TAPC G701D"}, | 187 | { TUNER_LG_PAL_NEW_TAPC, "LG TAPC G701D"}, |
188 | { TUNER_LG_NTSC_NEW_TAPC, "LG TAPC H791F"}, | 188 | { TUNER_LG_NTSC_NEW_TAPC, "LG TAPC H791F"}, |
189 | { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MB 3"}, | 189 | { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MB 3"}, |
190 | { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MI 3"}, | 190 | { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MI 3"}, |
diff --git a/drivers/media/video/usbvideo/quickcam_messenger.h b/drivers/media/video/usbvideo/quickcam_messenger.h index baab9c081b52..17ace394d981 100644 --- a/drivers/media/video/usbvideo/quickcam_messenger.h +++ b/drivers/media/video/usbvideo/quickcam_messenger.h | |||
@@ -35,27 +35,13 @@ struct rgb { | |||
35 | }; | 35 | }; |
36 | 36 | ||
37 | struct bayL0 { | 37 | struct bayL0 { |
38 | #ifdef __BIG_ENDIAN | ||
39 | u8 r; | ||
40 | u8 g; | ||
41 | #elif __LITTLE_ENDIAN | ||
42 | u8 g; | 38 | u8 g; |
43 | u8 r; | 39 | u8 r; |
44 | #else | ||
45 | #error not byte order defined | ||
46 | #endif | ||
47 | }; | 40 | }; |
48 | 41 | ||
49 | struct bayL1 { | 42 | struct bayL1 { |
50 | #ifdef __BIG_ENDIAN | ||
51 | u8 g; | ||
52 | u8 b; | ||
53 | #elif __LITTLE_ENDIAN | ||
54 | u8 b; | 43 | u8 b; |
55 | u8 g; | 44 | u8 g; |
56 | #else | ||
57 | #error not byte order defined | ||
58 | #endif | ||
59 | }; | 45 | }; |
60 | 46 | ||
61 | struct cam_size { | 47 | struct cam_size { |
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c index 8c7eba2a728e..7243337b771a 100644 --- a/drivers/media/video/usbvision/usbvision-video.c +++ b/drivers/media/video/usbvision/usbvision-video.c | |||
@@ -1080,7 +1080,6 @@ static ssize_t usbvision_v4l2_read(struct file *file, char *buf, | |||
1080 | int noblock = file->f_flags & O_NONBLOCK; | 1080 | int noblock = file->f_flags & O_NONBLOCK; |
1081 | unsigned long lock_flags; | 1081 | unsigned long lock_flags; |
1082 | 1082 | ||
1083 | int frmx = -1; | ||
1084 | int ret,i; | 1083 | int ret,i; |
1085 | struct usbvision_frame *frame; | 1084 | struct usbvision_frame *frame; |
1086 | 1085 | ||
@@ -1155,7 +1154,7 @@ static ssize_t usbvision_v4l2_read(struct file *file, char *buf, | |||
1155 | frame->bytes_read = 0; | 1154 | frame->bytes_read = 0; |
1156 | 1155 | ||
1157 | /* Mark it as available to be used again. */ | 1156 | /* Mark it as available to be used again. */ |
1158 | usbvision->frame[frmx].grabstate = FrameState_Unused; | 1157 | frame->grabstate = FrameState_Unused; |
1159 | /* } */ | 1158 | /* } */ |
1160 | 1159 | ||
1161 | return count; | 1160 | return count; |
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index 752c82c37f55..b87d571e0463 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c | |||
@@ -90,8 +90,15 @@ MODULE_LICENSE("GPL"); | |||
90 | char *v4l2_norm_to_name(v4l2_std_id id) | 90 | char *v4l2_norm_to_name(v4l2_std_id id) |
91 | { | 91 | { |
92 | char *name; | 92 | char *name; |
93 | u32 myid = id; | ||
93 | 94 | ||
94 | switch (id) { | 95 | /* HACK: ppc32 architecture doesn't have __ucmpdi2 function to handle |
96 | 64 bit comparations. So, on that architecture, with some gcc variants, | ||
97 | compilation fails. Currently, the max value is 30bit wide. | ||
98 | */ | ||
99 | BUG_ON(myid != id); | ||
100 | |||
101 | switch (myid) { | ||
95 | case V4L2_STD_PAL: | 102 | case V4L2_STD_PAL: |
96 | name="PAL"; break; | 103 | name="PAL"; break; |
97 | case V4L2_STD_PAL_BG: | 104 | case V4L2_STD_PAL_BG: |
diff --git a/drivers/media/video/video-buf.c b/drivers/media/video/video-buf.c index f429f49901b9..635d102c86f0 100644 --- a/drivers/media/video/video-buf.c +++ b/drivers/media/video/video-buf.c | |||
@@ -1229,7 +1229,7 @@ videobuf_vm_nopage(struct vm_area_struct *vma, unsigned long vaddr, | |||
1229 | vaddr,vma->vm_start,vma->vm_end); | 1229 | vaddr,vma->vm_start,vma->vm_end); |
1230 | if (vaddr > vma->vm_end) | 1230 | if (vaddr > vma->vm_end) |
1231 | return NOPAGE_SIGBUS; | 1231 | return NOPAGE_SIGBUS; |
1232 | page = alloc_page(GFP_USER); | 1232 | page = alloc_page(GFP_USER | __GFP_DMA32); |
1233 | if (!page) | 1233 | if (!page) |
1234 | return NOPAGE_OOM; | 1234 | return NOPAGE_OOM; |
1235 | clear_user_page(page_address(page), vaddr, page); | 1235 | clear_user_page(page_address(page), vaddr, page); |
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index bacb311b4f24..d4cf55666731 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c | |||
@@ -270,10 +270,15 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax, | |||
270 | char *p,*s,*basep; | 270 | char *p,*s,*basep; |
271 | struct page *pg; | 271 | struct page *pg; |
272 | u8 chr,r,g,b,color; | 272 | u8 chr,r,g,b,color; |
273 | unsigned long flags; | ||
274 | spinlock_t spinlock; | ||
275 | |||
276 | spin_lock_init(&spinlock); | ||
273 | 277 | ||
274 | /* Get first addr pointed to pixel position */ | 278 | /* Get first addr pointed to pixel position */ |
275 | oldpg=get_addr_pos(pos,pages,to_addr); | 279 | oldpg=get_addr_pos(pos,pages,to_addr); |
276 | pg=pfn_to_page(sg_dma_address(to_addr[oldpg].sg) >> PAGE_SHIFT); | 280 | pg=pfn_to_page(sg_dma_address(to_addr[oldpg].sg) >> PAGE_SHIFT); |
281 | spin_lock_irqsave(&spinlock,flags); | ||
277 | basep = kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[oldpg].sg->offset; | 282 | basep = kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[oldpg].sg->offset; |
278 | 283 | ||
279 | /* We will just duplicate the second pixel at the packet */ | 284 | /* We will just duplicate the second pixel at the packet */ |
@@ -376,6 +381,8 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax, | |||
376 | 381 | ||
377 | end: | 382 | end: |
378 | kunmap_atomic(basep, KM_BOUNCE_READ); | 383 | kunmap_atomic(basep, KM_BOUNCE_READ); |
384 | spin_unlock_irqrestore(&spinlock,flags); | ||
385 | |||
379 | } | 386 | } |
380 | static void vivi_fillbuff(struct vivi_dev *dev,struct vivi_buffer *buf) | 387 | static void vivi_fillbuff(struct vivi_dev *dev,struct vivi_buffer *buf) |
381 | { | 388 | { |
diff --git a/drivers/mmc/imxmmc.c b/drivers/mmc/imxmmc.c index 06e7fcd19221..bfb9ff693208 100644 --- a/drivers/mmc/imxmmc.c +++ b/drivers/mmc/imxmmc.c | |||
@@ -351,9 +351,6 @@ static void imxmci_start_cmd(struct imxmci_host *host, struct mmc_command *cmd, | |||
351 | case MMC_RSP_R3: /* short */ | 351 | case MMC_RSP_R3: /* short */ |
352 | cmdat |= CMD_DAT_CONT_RESPONSE_FORMAT_R3; | 352 | cmdat |= CMD_DAT_CONT_RESPONSE_FORMAT_R3; |
353 | break; | 353 | break; |
354 | case MMC_RSP_R6: /* short CRC */ | ||
355 | cmdat |= CMD_DAT_CONT_RESPONSE_FORMAT_R6; | ||
356 | break; | ||
357 | default: | 354 | default: |
358 | break; | 355 | break; |
359 | } | 356 | } |
diff --git a/drivers/mmc/omap.c b/drivers/mmc/omap.c index 9488408308fb..d30540b27614 100644 --- a/drivers/mmc/omap.c +++ b/drivers/mmc/omap.c | |||
@@ -91,7 +91,6 @@ | |||
91 | 91 | ||
92 | 92 | ||
93 | #define DRIVER_NAME "mmci-omap" | 93 | #define DRIVER_NAME "mmci-omap" |
94 | #define RSP_TYPE(x) ((x) & ~(MMC_RSP_BUSY|MMC_RSP_OPCODE)) | ||
95 | 94 | ||
96 | /* Specifies how often in millisecs to poll for card status changes | 95 | /* Specifies how often in millisecs to poll for card status changes |
97 | * when the cover switch is open */ | 96 | * when the cover switch is open */ |
@@ -204,18 +203,22 @@ mmc_omap_start_command(struct mmc_omap_host *host, struct mmc_command *cmd) | |||
204 | cmdtype = 0; | 203 | cmdtype = 0; |
205 | 204 | ||
206 | /* Our hardware needs to know exact type */ | 205 | /* Our hardware needs to know exact type */ |
207 | switch (RSP_TYPE(mmc_resp_type(cmd))) { | 206 | switch (mmc_resp_type(cmd)) { |
208 | case RSP_TYPE(MMC_RSP_R1): | 207 | case MMC_RSP_NONE: |
209 | /* resp 1, resp 1b */ | 208 | break; |
209 | case MMC_RSP_R1: | ||
210 | case MMC_RSP_R1B: | ||
211 | /* resp 1, 1b, 6, 7 */ | ||
210 | resptype = 1; | 212 | resptype = 1; |
211 | break; | 213 | break; |
212 | case RSP_TYPE(MMC_RSP_R2): | 214 | case MMC_RSP_R2: |
213 | resptype = 2; | 215 | resptype = 2; |
214 | break; | 216 | break; |
215 | case RSP_TYPE(MMC_RSP_R3): | 217 | case MMC_RSP_R3: |
216 | resptype = 3; | 218 | resptype = 3; |
217 | break; | 219 | break; |
218 | default: | 220 | default: |
221 | dev_err(mmc_dev(host->mmc), "Invalid response type: %04x\n", mmc_resp_type(cmd)); | ||
219 | break; | 222 | break; |
220 | } | 223 | } |
221 | 224 | ||
diff --git a/drivers/mmc/pxamci.c b/drivers/mmc/pxamci.c index 45a9283ce498..6073d998b11f 100644 --- a/drivers/mmc/pxamci.c +++ b/drivers/mmc/pxamci.c | |||
@@ -171,7 +171,7 @@ static void pxamci_start_cmd(struct pxamci_host *host, struct mmc_command *cmd, | |||
171 | 171 | ||
172 | #define RSP_TYPE(x) ((x) & ~(MMC_RSP_BUSY|MMC_RSP_OPCODE)) | 172 | #define RSP_TYPE(x) ((x) & ~(MMC_RSP_BUSY|MMC_RSP_OPCODE)) |
173 | switch (RSP_TYPE(mmc_resp_type(cmd))) { | 173 | switch (RSP_TYPE(mmc_resp_type(cmd))) { |
174 | case RSP_TYPE(MMC_RSP_R1): /* r1, r1b, r6 */ | 174 | case RSP_TYPE(MMC_RSP_R1): /* r1, r1b, r6, r7 */ |
175 | cmdat |= CMDAT_RESP_SHORT; | 175 | cmdat |= CMDAT_RESP_SHORT; |
176 | break; | 176 | break; |
177 | case RSP_TYPE(MMC_RSP_R3): | 177 | case RSP_TYPE(MMC_RSP_R3): |
diff --git a/drivers/mmc/tifm_sd.c b/drivers/mmc/tifm_sd.c index f18ad998b3cb..fa4a52886b97 100644 --- a/drivers/mmc/tifm_sd.c +++ b/drivers/mmc/tifm_sd.c | |||
@@ -173,9 +173,6 @@ static unsigned int tifm_sd_op_flags(struct mmc_command *cmd) | |||
173 | case MMC_RSP_R3: | 173 | case MMC_RSP_R3: |
174 | rc |= TIFM_MMCSD_RSP_R3; | 174 | rc |= TIFM_MMCSD_RSP_R3; |
175 | break; | 175 | break; |
176 | case MMC_RSP_R6: | ||
177 | rc |= TIFM_MMCSD_RSP_R6; | ||
178 | break; | ||
179 | default: | 176 | default: |
180 | BUG(); | 177 | BUG(); |
181 | } | 178 | } |
diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog index 35cc4b1d60f7..af4ef808fa94 100644 --- a/fs/ntfs/ChangeLog +++ b/fs/ntfs/ChangeLog | |||
@@ -17,6 +17,13 @@ ToDo/Notes: | |||
17 | happen is unclear however so it is worth waiting until someone hits | 17 | happen is unclear however so it is worth waiting until someone hits |
18 | the problem. | 18 | the problem. |
19 | 19 | ||
20 | 2.1.28 - Fix a deadlock. | ||
21 | |||
22 | - Fix deadlock in fs/ntfs/inode.c::ntfs_put_inode(). Thanks to Sergey | ||
23 | Vlasov for the report and detailed analysis of the deadlock. The fix | ||
24 | involved getting rid of ntfs_put_inode() altogether and hence NTFS no | ||
25 | longer has a ->put_inode super operation. | ||
26 | |||
20 | 2.1.27 - Various bug fixes and cleanups. | 27 | 2.1.27 - Various bug fixes and cleanups. |
21 | 28 | ||
22 | - Fix two compiler warnings on Alpha. Thanks to Andrew Morton for | 29 | - Fix two compiler warnings on Alpha. Thanks to Andrew Morton for |
diff --git a/fs/ntfs/Makefile b/fs/ntfs/Makefile index e27b4eacffbf..825508385565 100644 --- a/fs/ntfs/Makefile +++ b/fs/ntfs/Makefile | |||
@@ -6,7 +6,7 @@ ntfs-objs := aops.o attrib.o collate.o compress.o debug.o dir.o file.o \ | |||
6 | index.o inode.o mft.o mst.o namei.o runlist.o super.o sysctl.o \ | 6 | index.o inode.o mft.o mst.o namei.o runlist.o super.o sysctl.o \ |
7 | unistr.o upcase.o | 7 | unistr.o upcase.o |
8 | 8 | ||
9 | EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.27\" | 9 | EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.28\" |
10 | 10 | ||
11 | ifeq ($(CONFIG_NTFS_DEBUG),y) | 11 | ifeq ($(CONFIG_NTFS_DEBUG),y) |
12 | EXTRA_CFLAGS += -DDEBUG | 12 | EXTRA_CFLAGS += -DDEBUG |
diff --git a/fs/ntfs/dir.c b/fs/ntfs/dir.c index 8296c29ae3b8..74f99a6a369b 100644 --- a/fs/ntfs/dir.c +++ b/fs/ntfs/dir.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /** | 1 | /** |
2 | * dir.c - NTFS kernel directory operations. Part of the Linux-NTFS project. | 2 | * dir.c - NTFS kernel directory operations. Part of the Linux-NTFS project. |
3 | * | 3 | * |
4 | * Copyright (c) 2001-2005 Anton Altaparmakov | 4 | * Copyright (c) 2001-2007 Anton Altaparmakov |
5 | * Copyright (c) 2002 Richard Russon | 5 | * Copyright (c) 2002 Richard Russon |
6 | * | 6 | * |
7 | * This program/include file is free software; you can redistribute it and/or | 7 | * This program/include file is free software; you can redistribute it and/or |
@@ -1249,16 +1249,12 @@ skip_index_root: | |||
1249 | /* Get the offset into the index allocation attribute. */ | 1249 | /* Get the offset into the index allocation attribute. */ |
1250 | ia_pos = (s64)fpos - vol->mft_record_size; | 1250 | ia_pos = (s64)fpos - vol->mft_record_size; |
1251 | ia_mapping = vdir->i_mapping; | 1251 | ia_mapping = vdir->i_mapping; |
1252 | bmp_vi = ndir->itype.index.bmp_ino; | 1252 | ntfs_debug("Inode 0x%lx, getting index bitmap.", vdir->i_ino); |
1253 | if (unlikely(!bmp_vi)) { | 1253 | bmp_vi = ntfs_attr_iget(vdir, AT_BITMAP, I30, 4); |
1254 | ntfs_debug("Inode 0x%lx, regetting index bitmap.", vdir->i_ino); | 1254 | if (IS_ERR(bmp_vi)) { |
1255 | bmp_vi = ntfs_attr_iget(vdir, AT_BITMAP, I30, 4); | 1255 | ntfs_error(sb, "Failed to get bitmap attribute."); |
1256 | if (IS_ERR(bmp_vi)) { | 1256 | err = PTR_ERR(bmp_vi); |
1257 | ntfs_error(sb, "Failed to get bitmap attribute."); | 1257 | goto err_out; |
1258 | err = PTR_ERR(bmp_vi); | ||
1259 | goto err_out; | ||
1260 | } | ||
1261 | ndir->itype.index.bmp_ino = bmp_vi; | ||
1262 | } | 1258 | } |
1263 | bmp_mapping = bmp_vi->i_mapping; | 1259 | bmp_mapping = bmp_vi->i_mapping; |
1264 | /* Get the starting bitmap bit position and sanity check it. */ | 1260 | /* Get the starting bitmap bit position and sanity check it. */ |
@@ -1266,7 +1262,7 @@ skip_index_root: | |||
1266 | if (unlikely(bmp_pos >> 3 >= i_size_read(bmp_vi))) { | 1262 | if (unlikely(bmp_pos >> 3 >= i_size_read(bmp_vi))) { |
1267 | ntfs_error(sb, "Current index allocation position exceeds " | 1263 | ntfs_error(sb, "Current index allocation position exceeds " |
1268 | "index bitmap size."); | 1264 | "index bitmap size."); |
1269 | goto err_out; | 1265 | goto iput_err_out; |
1270 | } | 1266 | } |
1271 | /* Get the starting bit position in the current bitmap page. */ | 1267 | /* Get the starting bit position in the current bitmap page. */ |
1272 | cur_bmp_pos = bmp_pos & ((PAGE_CACHE_SIZE * 8) - 1); | 1268 | cur_bmp_pos = bmp_pos & ((PAGE_CACHE_SIZE * 8) - 1); |
@@ -1282,7 +1278,7 @@ get_next_bmp_page: | |||
1282 | ntfs_error(sb, "Reading index bitmap failed."); | 1278 | ntfs_error(sb, "Reading index bitmap failed."); |
1283 | err = PTR_ERR(bmp_page); | 1279 | err = PTR_ERR(bmp_page); |
1284 | bmp_page = NULL; | 1280 | bmp_page = NULL; |
1285 | goto err_out; | 1281 | goto iput_err_out; |
1286 | } | 1282 | } |
1287 | bmp = (u8*)page_address(bmp_page); | 1283 | bmp = (u8*)page_address(bmp_page); |
1288 | /* Find next index block in use. */ | 1284 | /* Find next index block in use. */ |
@@ -1429,6 +1425,7 @@ find_next_index_buffer: | |||
1429 | /* @ia_page is already unlocked in this case. */ | 1425 | /* @ia_page is already unlocked in this case. */ |
1430 | ntfs_unmap_page(ia_page); | 1426 | ntfs_unmap_page(ia_page); |
1431 | ntfs_unmap_page(bmp_page); | 1427 | ntfs_unmap_page(bmp_page); |
1428 | iput(bmp_vi); | ||
1432 | goto abort; | 1429 | goto abort; |
1433 | } | 1430 | } |
1434 | } | 1431 | } |
@@ -1439,6 +1436,7 @@ unm_EOD: | |||
1439 | ntfs_unmap_page(ia_page); | 1436 | ntfs_unmap_page(ia_page); |
1440 | } | 1437 | } |
1441 | ntfs_unmap_page(bmp_page); | 1438 | ntfs_unmap_page(bmp_page); |
1439 | iput(bmp_vi); | ||
1442 | EOD: | 1440 | EOD: |
1443 | /* We are finished, set fpos to EOD. */ | 1441 | /* We are finished, set fpos to EOD. */ |
1444 | fpos = i_size + vol->mft_record_size; | 1442 | fpos = i_size + vol->mft_record_size; |
@@ -1455,8 +1453,11 @@ done: | |||
1455 | filp->f_pos = fpos; | 1453 | filp->f_pos = fpos; |
1456 | return 0; | 1454 | return 0; |
1457 | err_out: | 1455 | err_out: |
1458 | if (bmp_page) | 1456 | if (bmp_page) { |
1459 | ntfs_unmap_page(bmp_page); | 1457 | ntfs_unmap_page(bmp_page); |
1458 | iput_err_out: | ||
1459 | iput(bmp_vi); | ||
1460 | } | ||
1460 | if (ia_page) { | 1461 | if (ia_page) { |
1461 | unlock_page(ia_page); | 1462 | unlock_page(ia_page); |
1462 | ntfs_unmap_page(ia_page); | 1463 | ntfs_unmap_page(ia_page); |
@@ -1529,14 +1530,22 @@ static int ntfs_dir_open(struct inode *vi, struct file *filp) | |||
1529 | static int ntfs_dir_fsync(struct file *filp, struct dentry *dentry, | 1530 | static int ntfs_dir_fsync(struct file *filp, struct dentry *dentry, |
1530 | int datasync) | 1531 | int datasync) |
1531 | { | 1532 | { |
1532 | struct inode *vi = dentry->d_inode; | 1533 | struct inode *bmp_vi, *vi = dentry->d_inode; |
1533 | ntfs_inode *ni = NTFS_I(vi); | ||
1534 | int err, ret; | 1534 | int err, ret; |
1535 | ntfs_attr na; | ||
1535 | 1536 | ||
1536 | ntfs_debug("Entering for inode 0x%lx.", vi->i_ino); | 1537 | ntfs_debug("Entering for inode 0x%lx.", vi->i_ino); |
1537 | BUG_ON(!S_ISDIR(vi->i_mode)); | 1538 | BUG_ON(!S_ISDIR(vi->i_mode)); |
1538 | if (NInoIndexAllocPresent(ni) && ni->itype.index.bmp_ino) | 1539 | /* If the bitmap attribute inode is in memory sync it, too. */ |
1539 | write_inode_now(ni->itype.index.bmp_ino, !datasync); | 1540 | na.mft_no = vi->i_ino; |
1541 | na.type = AT_BITMAP; | ||
1542 | na.name = I30; | ||
1543 | na.name_len = 4; | ||
1544 | bmp_vi = ilookup5(vi->i_sb, vi->i_ino, (test_t)ntfs_test_inode, &na); | ||
1545 | if (bmp_vi) { | ||
1546 | write_inode_now(bmp_vi, !datasync); | ||
1547 | iput(bmp_vi); | ||
1548 | } | ||
1540 | ret = ntfs_write_inode(vi, 1); | 1549 | ret = ntfs_write_inode(vi, 1); |
1541 | write_inode_now(vi, !datasync); | 1550 | write_inode_now(vi, !datasync); |
1542 | err = sync_blockdev(vi->i_sb->s_bdev); | 1551 | err = sync_blockdev(vi->i_sb->s_bdev); |
diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c index 247989891b4b..f8bf8da67ee8 100644 --- a/fs/ntfs/inode.c +++ b/fs/ntfs/inode.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /** | 1 | /** |
2 | * inode.c - NTFS kernel inode handling. Part of the Linux-NTFS project. | 2 | * inode.c - NTFS kernel inode handling. Part of the Linux-NTFS project. |
3 | * | 3 | * |
4 | * Copyright (c) 2001-2006 Anton Altaparmakov | 4 | * Copyright (c) 2001-2007 Anton Altaparmakov |
5 | * | 5 | * |
6 | * This program/include file is free software; you can redistribute it and/or | 6 | * This program/include file is free software; you can redistribute it and/or |
7 | * modify it under the terms of the GNU General Public License as published | 7 | * modify it under the terms of the GNU General Public License as published |
@@ -95,7 +95,7 @@ int ntfs_test_inode(struct inode *vi, ntfs_attr *na) | |||
95 | * If initializing the normal file/directory inode, set @na->type to AT_UNUSED. | 95 | * If initializing the normal file/directory inode, set @na->type to AT_UNUSED. |
96 | * In that case, @na->name and @na->name_len should be set to NULL and 0, | 96 | * In that case, @na->name and @na->name_len should be set to NULL and 0, |
97 | * respectively. Although that is not strictly necessary as | 97 | * respectively. Although that is not strictly necessary as |
98 | * ntfs_read_inode_locked() will fill them in later. | 98 | * ntfs_read_locked_inode() will fill them in later. |
99 | * | 99 | * |
100 | * Return 0 on success and -errno on error. | 100 | * Return 0 on success and -errno on error. |
101 | * | 101 | * |
@@ -171,8 +171,8 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, | |||
171 | struct inode *ntfs_iget(struct super_block *sb, unsigned long mft_no) | 171 | struct inode *ntfs_iget(struct super_block *sb, unsigned long mft_no) |
172 | { | 172 | { |
173 | struct inode *vi; | 173 | struct inode *vi; |
174 | ntfs_attr na; | ||
175 | int err; | 174 | int err; |
175 | ntfs_attr na; | ||
176 | 176 | ||
177 | na.mft_no = mft_no; | 177 | na.mft_no = mft_no; |
178 | na.type = AT_UNUSED; | 178 | na.type = AT_UNUSED; |
@@ -229,8 +229,8 @@ struct inode *ntfs_attr_iget(struct inode *base_vi, ATTR_TYPE type, | |||
229 | ntfschar *name, u32 name_len) | 229 | ntfschar *name, u32 name_len) |
230 | { | 230 | { |
231 | struct inode *vi; | 231 | struct inode *vi; |
232 | ntfs_attr na; | ||
233 | int err; | 232 | int err; |
233 | ntfs_attr na; | ||
234 | 234 | ||
235 | /* Make sure no one calls ntfs_attr_iget() for indices. */ | 235 | /* Make sure no one calls ntfs_attr_iget() for indices. */ |
236 | BUG_ON(type == AT_INDEX_ALLOCATION); | 236 | BUG_ON(type == AT_INDEX_ALLOCATION); |
@@ -287,8 +287,8 @@ struct inode *ntfs_index_iget(struct inode *base_vi, ntfschar *name, | |||
287 | u32 name_len) | 287 | u32 name_len) |
288 | { | 288 | { |
289 | struct inode *vi; | 289 | struct inode *vi; |
290 | ntfs_attr na; | ||
291 | int err; | 290 | int err; |
291 | ntfs_attr na; | ||
292 | 292 | ||
293 | na.mft_no = base_vi->i_ino; | 293 | na.mft_no = base_vi->i_ino; |
294 | na.type = AT_INDEX_ALLOCATION; | 294 | na.type = AT_INDEX_ALLOCATION; |
@@ -402,7 +402,6 @@ void __ntfs_init_inode(struct super_block *sb, ntfs_inode *ni) | |||
402 | ntfs_init_runlist(&ni->attr_list_rl); | 402 | ntfs_init_runlist(&ni->attr_list_rl); |
403 | lockdep_set_class(&ni->attr_list_rl.lock, | 403 | lockdep_set_class(&ni->attr_list_rl.lock, |
404 | &attr_list_rl_lock_class); | 404 | &attr_list_rl_lock_class); |
405 | ni->itype.index.bmp_ino = NULL; | ||
406 | ni->itype.index.block_size = 0; | 405 | ni->itype.index.block_size = 0; |
407 | ni->itype.index.vcn_size = 0; | 406 | ni->itype.index.vcn_size = 0; |
408 | ni->itype.index.collation_rule = 0; | 407 | ni->itype.index.collation_rule = 0; |
@@ -546,6 +545,7 @@ static int ntfs_read_locked_inode(struct inode *vi) | |||
546 | { | 545 | { |
547 | ntfs_volume *vol = NTFS_SB(vi->i_sb); | 546 | ntfs_volume *vol = NTFS_SB(vi->i_sb); |
548 | ntfs_inode *ni; | 547 | ntfs_inode *ni; |
548 | struct inode *bvi; | ||
549 | MFT_RECORD *m; | 549 | MFT_RECORD *m; |
550 | ATTR_RECORD *a; | 550 | ATTR_RECORD *a; |
551 | STANDARD_INFORMATION *si; | 551 | STANDARD_INFORMATION *si; |
@@ -780,7 +780,6 @@ skip_attr_list_load: | |||
780 | */ | 780 | */ |
781 | if (S_ISDIR(vi->i_mode)) { | 781 | if (S_ISDIR(vi->i_mode)) { |
782 | loff_t bvi_size; | 782 | loff_t bvi_size; |
783 | struct inode *bvi; | ||
784 | ntfs_inode *bni; | 783 | ntfs_inode *bni; |
785 | INDEX_ROOT *ir; | 784 | INDEX_ROOT *ir; |
786 | u8 *ir_end, *index_end; | 785 | u8 *ir_end, *index_end; |
@@ -985,13 +984,12 @@ skip_attr_list_load: | |||
985 | err = PTR_ERR(bvi); | 984 | err = PTR_ERR(bvi); |
986 | goto unm_err_out; | 985 | goto unm_err_out; |
987 | } | 986 | } |
988 | ni->itype.index.bmp_ino = bvi; | ||
989 | bni = NTFS_I(bvi); | 987 | bni = NTFS_I(bvi); |
990 | if (NInoCompressed(bni) || NInoEncrypted(bni) || | 988 | if (NInoCompressed(bni) || NInoEncrypted(bni) || |
991 | NInoSparse(bni)) { | 989 | NInoSparse(bni)) { |
992 | ntfs_error(vi->i_sb, "$BITMAP attribute is compressed " | 990 | ntfs_error(vi->i_sb, "$BITMAP attribute is compressed " |
993 | "and/or encrypted and/or sparse."); | 991 | "and/or encrypted and/or sparse."); |
994 | goto unm_err_out; | 992 | goto iput_unm_err_out; |
995 | } | 993 | } |
996 | /* Consistency check bitmap size vs. index allocation size. */ | 994 | /* Consistency check bitmap size vs. index allocation size. */ |
997 | bvi_size = i_size_read(bvi); | 995 | bvi_size = i_size_read(bvi); |
@@ -1000,8 +998,10 @@ skip_attr_list_load: | |||
1000 | ntfs_error(vi->i_sb, "Index bitmap too small (0x%llx) " | 998 | ntfs_error(vi->i_sb, "Index bitmap too small (0x%llx) " |
1001 | "for index allocation (0x%llx).", | 999 | "for index allocation (0x%llx).", |
1002 | bvi_size << 3, vi->i_size); | 1000 | bvi_size << 3, vi->i_size); |
1003 | goto unm_err_out; | 1001 | goto iput_unm_err_out; |
1004 | } | 1002 | } |
1003 | /* No longer need the bitmap attribute inode. */ | ||
1004 | iput(bvi); | ||
1005 | skip_large_dir_stuff: | 1005 | skip_large_dir_stuff: |
1006 | /* Setup the operations for this inode. */ | 1006 | /* Setup the operations for this inode. */ |
1007 | vi->i_op = &ntfs_dir_inode_ops; | 1007 | vi->i_op = &ntfs_dir_inode_ops; |
@@ -1176,7 +1176,8 @@ no_data_attr_special_case: | |||
1176 | vi->i_blocks = ni->allocated_size >> 9; | 1176 | vi->i_blocks = ni->allocated_size >> 9; |
1177 | ntfs_debug("Done."); | 1177 | ntfs_debug("Done."); |
1178 | return 0; | 1178 | return 0; |
1179 | 1179 | iput_unm_err_out: | |
1180 | iput(bvi); | ||
1180 | unm_err_out: | 1181 | unm_err_out: |
1181 | if (!err) | 1182 | if (!err) |
1182 | err = -EIO; | 1183 | err = -EIO; |
@@ -1697,7 +1698,7 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi) | |||
1697 | vi->i_size); | 1698 | vi->i_size); |
1698 | goto iput_unm_err_out; | 1699 | goto iput_unm_err_out; |
1699 | } | 1700 | } |
1700 | ni->itype.index.bmp_ino = bvi; | 1701 | iput(bvi); |
1701 | skip_large_index_stuff: | 1702 | skip_large_index_stuff: |
1702 | /* Setup the operations for this index inode. */ | 1703 | /* Setup the operations for this index inode. */ |
1703 | vi->i_op = NULL; | 1704 | vi->i_op = NULL; |
@@ -1714,7 +1715,6 @@ skip_large_index_stuff: | |||
1714 | 1715 | ||
1715 | ntfs_debug("Done."); | 1716 | ntfs_debug("Done."); |
1716 | return 0; | 1717 | return 0; |
1717 | |||
1718 | iput_unm_err_out: | 1718 | iput_unm_err_out: |
1719 | iput(bvi); | 1719 | iput(bvi); |
1720 | unm_err_out: | 1720 | unm_err_out: |
@@ -2191,37 +2191,6 @@ err_out: | |||
2191 | return -1; | 2191 | return -1; |
2192 | } | 2192 | } |
2193 | 2193 | ||
2194 | /** | ||
2195 | * ntfs_put_inode - handler for when the inode reference count is decremented | ||
2196 | * @vi: vfs inode | ||
2197 | * | ||
2198 | * The VFS calls ntfs_put_inode() every time the inode reference count (i_count) | ||
2199 | * is about to be decremented (but before the decrement itself. | ||
2200 | * | ||
2201 | * If the inode @vi is a directory with two references, one of which is being | ||
2202 | * dropped, we need to put the attribute inode for the directory index bitmap, | ||
2203 | * if it is present, otherwise the directory inode would remain pinned for | ||
2204 | * ever. | ||
2205 | */ | ||
2206 | void ntfs_put_inode(struct inode *vi) | ||
2207 | { | ||
2208 | if (S_ISDIR(vi->i_mode) && atomic_read(&vi->i_count) == 2) { | ||
2209 | ntfs_inode *ni = NTFS_I(vi); | ||
2210 | if (NInoIndexAllocPresent(ni)) { | ||
2211 | struct inode *bvi = NULL; | ||
2212 | mutex_lock(&vi->i_mutex); | ||
2213 | if (atomic_read(&vi->i_count) == 2) { | ||
2214 | bvi = ni->itype.index.bmp_ino; | ||
2215 | if (bvi) | ||
2216 | ni->itype.index.bmp_ino = NULL; | ||
2217 | } | ||
2218 | mutex_unlock(&vi->i_mutex); | ||
2219 | if (bvi) | ||
2220 | iput(bvi); | ||
2221 | } | ||
2222 | } | ||
2223 | } | ||
2224 | |||
2225 | static void __ntfs_clear_inode(ntfs_inode *ni) | 2194 | static void __ntfs_clear_inode(ntfs_inode *ni) |
2226 | { | 2195 | { |
2227 | /* Free all alocated memory. */ | 2196 | /* Free all alocated memory. */ |
@@ -2287,18 +2256,6 @@ void ntfs_clear_big_inode(struct inode *vi) | |||
2287 | { | 2256 | { |
2288 | ntfs_inode *ni = NTFS_I(vi); | 2257 | ntfs_inode *ni = NTFS_I(vi); |
2289 | 2258 | ||
2290 | /* | ||
2291 | * If the inode @vi is an index inode we need to put the attribute | ||
2292 | * inode for the index bitmap, if it is present, otherwise the index | ||
2293 | * inode would disappear and the attribute inode for the index bitmap | ||
2294 | * would no longer be referenced from anywhere and thus it would remain | ||
2295 | * pinned for ever. | ||
2296 | */ | ||
2297 | if (NInoAttr(ni) && (ni->type == AT_INDEX_ALLOCATION) && | ||
2298 | NInoIndexAllocPresent(ni) && ni->itype.index.bmp_ino) { | ||
2299 | iput(ni->itype.index.bmp_ino); | ||
2300 | ni->itype.index.bmp_ino = NULL; | ||
2301 | } | ||
2302 | #ifdef NTFS_RW | 2259 | #ifdef NTFS_RW |
2303 | if (NInoDirty(ni)) { | 2260 | if (NInoDirty(ni)) { |
2304 | bool was_bad = (is_bad_inode(vi)); | 2261 | bool was_bad = (is_bad_inode(vi)); |
diff --git a/fs/ntfs/inode.h b/fs/ntfs/inode.h index f088291e017c..117eaf8032a3 100644 --- a/fs/ntfs/inode.h +++ b/fs/ntfs/inode.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * inode.h - Defines for inode structures NTFS Linux kernel driver. Part of | 2 | * inode.h - Defines for inode structures NTFS Linux kernel driver. Part of |
3 | * the Linux-NTFS project. | 3 | * the Linux-NTFS project. |
4 | * | 4 | * |
5 | * Copyright (c) 2001-2005 Anton Altaparmakov | 5 | * Copyright (c) 2001-2007 Anton Altaparmakov |
6 | * Copyright (c) 2002 Richard Russon | 6 | * Copyright (c) 2002 Richard Russon |
7 | * | 7 | * |
8 | * This program/include file is free software; you can redistribute it and/or | 8 | * This program/include file is free software; you can redistribute it and/or |
@@ -101,8 +101,6 @@ struct _ntfs_inode { | |||
101 | runlist attr_list_rl; /* Run list for the attribute list value. */ | 101 | runlist attr_list_rl; /* Run list for the attribute list value. */ |
102 | union { | 102 | union { |
103 | struct { /* It is a directory, $MFT, or an index inode. */ | 103 | struct { /* It is a directory, $MFT, or an index inode. */ |
104 | struct inode *bmp_ino; /* Attribute inode for the | ||
105 | index $BITMAP. */ | ||
106 | u32 block_size; /* Size of an index block. */ | 104 | u32 block_size; /* Size of an index block. */ |
107 | u32 vcn_size; /* Size of a vcn in this | 105 | u32 vcn_size; /* Size of a vcn in this |
108 | index. */ | 106 | index. */ |
@@ -300,8 +298,6 @@ extern void ntfs_clear_extent_inode(ntfs_inode *ni); | |||
300 | 298 | ||
301 | extern int ntfs_read_inode_mount(struct inode *vi); | 299 | extern int ntfs_read_inode_mount(struct inode *vi); |
302 | 300 | ||
303 | extern void ntfs_put_inode(struct inode *vi); | ||
304 | |||
305 | extern int ntfs_show_options(struct seq_file *sf, struct vfsmount *mnt); | 301 | extern int ntfs_show_options(struct seq_file *sf, struct vfsmount *mnt); |
306 | 302 | ||
307 | #ifdef NTFS_RW | 303 | #ifdef NTFS_RW |
diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index 03a391ac7145..babf94d90def 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * super.c - NTFS kernel super block handling. Part of the Linux-NTFS project. | 2 | * super.c - NTFS kernel super block handling. Part of the Linux-NTFS project. |
3 | * | 3 | * |
4 | * Copyright (c) 2001-2006 Anton Altaparmakov | 4 | * Copyright (c) 2001-2007 Anton Altaparmakov |
5 | * Copyright (c) 2001,2002 Richard Russon | 5 | * Copyright (c) 2001,2002 Richard Russon |
6 | * | 6 | * |
7 | * This program/include file is free software; you can redistribute it and/or | 7 | * This program/include file is free software; you can redistribute it and/or |
@@ -2702,9 +2702,6 @@ static int ntfs_statfs(struct dentry *dentry, struct kstatfs *sfs) | |||
2702 | static struct super_operations ntfs_sops = { | 2702 | static struct super_operations ntfs_sops = { |
2703 | .alloc_inode = ntfs_alloc_big_inode, /* VFS: Allocate new inode. */ | 2703 | .alloc_inode = ntfs_alloc_big_inode, /* VFS: Allocate new inode. */ |
2704 | .destroy_inode = ntfs_destroy_big_inode, /* VFS: Deallocate inode. */ | 2704 | .destroy_inode = ntfs_destroy_big_inode, /* VFS: Deallocate inode. */ |
2705 | .put_inode = ntfs_put_inode, /* VFS: Called just before | ||
2706 | the inode reference count | ||
2707 | is decreased. */ | ||
2708 | #ifdef NTFS_RW | 2705 | #ifdef NTFS_RW |
2709 | //.dirty_inode = NULL, /* VFS: Called from | 2706 | //.dirty_inode = NULL, /* VFS: Called from |
2710 | // __mark_inode_dirty(). */ | 2707 | // __mark_inode_dirty(). */ |
@@ -3261,7 +3258,7 @@ static void __exit exit_ntfs_fs(void) | |||
3261 | } | 3258 | } |
3262 | 3259 | ||
3263 | MODULE_AUTHOR("Anton Altaparmakov <aia21@cantab.net>"); | 3260 | MODULE_AUTHOR("Anton Altaparmakov <aia21@cantab.net>"); |
3264 | MODULE_DESCRIPTION("NTFS 1.2/3.x driver - Copyright (c) 2001-2006 Anton Altaparmakov"); | 3261 | MODULE_DESCRIPTION("NTFS 1.2/3.x driver - Copyright (c) 2001-2007 Anton Altaparmakov"); |
3265 | MODULE_VERSION(NTFS_VERSION); | 3262 | MODULE_VERSION(NTFS_VERSION); |
3266 | MODULE_LICENSE("GPL"); | 3263 | MODULE_LICENSE("GPL"); |
3267 | #ifdef DEBUG | 3264 | #ifdef DEBUG |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index a3594dfd6963..bcf24909d677 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -42,7 +42,7 @@ struct mmc_command { | |||
42 | #define MMC_RSP_R1B (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY) | 42 | #define MMC_RSP_R1B (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY) |
43 | #define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC) | 43 | #define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC) |
44 | #define MMC_RSP_R3 (MMC_RSP_PRESENT) | 44 | #define MMC_RSP_R3 (MMC_RSP_PRESENT) |
45 | #define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC) | 45 | #define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) |
46 | 46 | ||
47 | #define mmc_resp_type(cmd) ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE)) | 47 | #define mmc_resp_type(cmd) ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE)) |
48 | 48 | ||
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 5cb380a559fd..d94e2683be52 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -662,6 +662,15 @@ typedef __u64 v4l2_std_id; | |||
662 | #define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000) | 662 | #define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000) |
663 | #define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000) | 663 | #define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000) |
664 | 664 | ||
665 | /* FIXME: | ||
666 | Although std_id is 64 bits, there is an issue on PPC32 architecture that | ||
667 | makes switch(__u64) to break. So, there's a hack on v4l2-common.c rounding | ||
668 | this value to 32 bits. | ||
669 | As, currently, the max value is for V4L2_STD_ATSC_16_VSB (30 bits wide), | ||
670 | it should work fine. However, if needed to add more than two standards, | ||
671 | v4l2-common.c should be fixed. | ||
672 | */ | ||
673 | |||
665 | /* some merged standards */ | 674 | /* some merged standards */ |
666 | #define V4L2_STD_MN (V4L2_STD_PAL_M|V4L2_STD_PAL_N|V4L2_STD_PAL_Nc|V4L2_STD_NTSC) | 675 | #define V4L2_STD_MN (V4L2_STD_PAL_M|V4L2_STD_PAL_N|V4L2_STD_PAL_Nc|V4L2_STD_NTSC) |
667 | #define V4L2_STD_B (V4L2_STD_PAL_B|V4L2_STD_PAL_B1|V4L2_STD_SECAM_B) | 676 | #define V4L2_STD_B (V4L2_STD_PAL_B|V4L2_STD_PAL_B1|V4L2_STD_SECAM_B) |