diff options
Diffstat (limited to 'drivers')
30 files changed, 213 insertions, 125 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index edda9ea7c626..bd112c8c7bcd 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c | |||
@@ -949,7 +949,7 @@ static int loop_clr_fd(struct loop_device *lo, struct block_device *bdev) | |||
949 | lo->lo_state = Lo_unbound; | 949 | lo->lo_state = Lo_unbound; |
950 | /* This is safe: open() is still holding a reference. */ | 950 | /* This is safe: open() is still holding a reference. */ |
951 | module_put(THIS_MODULE); | 951 | module_put(THIS_MODULE); |
952 | if (max_part > 0) | 952 | if (max_part > 0 && bdev) |
953 | ioctl_by_bdev(bdev, BLKRRPART, 0); | 953 | ioctl_by_bdev(bdev, BLKRRPART, 0); |
954 | mutex_unlock(&lo->lo_ctl_mutex); | 954 | mutex_unlock(&lo->lo_ctl_mutex); |
955 | /* | 955 | /* |
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index ad41f19b8e3f..12fdd3987a36 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c | |||
@@ -76,8 +76,11 @@ static void cpuidle_idle_call(void) | |||
76 | #endif | 76 | #endif |
77 | /* ask the governor for the next state */ | 77 | /* ask the governor for the next state */ |
78 | next_state = cpuidle_curr_governor->select(dev); | 78 | next_state = cpuidle_curr_governor->select(dev); |
79 | if (need_resched()) | 79 | if (need_resched()) { |
80 | local_irq_enable(); | ||
80 | return; | 81 | return; |
82 | } | ||
83 | |||
81 | target_state = &dev->states[next_state]; | 84 | target_state = &dev->states[next_state]; |
82 | 85 | ||
83 | /* enter the state and update stats */ | 86 | /* enter the state and update stats */ |
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c index d335086f4a26..77a9579d7167 100644 --- a/drivers/edac/i5000_edac.c +++ b/drivers/edac/i5000_edac.c | |||
@@ -1173,7 +1173,7 @@ static void i5000_get_mc_regs(struct mem_ctl_info *mci) | |||
1173 | pci_read_config_word(pvt->branch_1, where, | 1173 | pci_read_config_word(pvt->branch_1, where, |
1174 | &pvt->b1_mtr[slot_row]); | 1174 | &pvt->b1_mtr[slot_row]); |
1175 | debugf2("MTR%d where=0x%x B1 value=0x%x\n", slot_row, | 1175 | debugf2("MTR%d where=0x%x B1 value=0x%x\n", slot_row, |
1176 | where, pvt->b0_mtr[slot_row]); | 1176 | where, pvt->b1_mtr[slot_row]); |
1177 | } else { | 1177 | } else { |
1178 | pvt->b1_mtr[slot_row] = 0; | 1178 | pvt->b1_mtr[slot_row] = 0; |
1179 | } | 1179 | } |
@@ -1232,7 +1232,7 @@ static int i5000_init_csrows(struct mem_ctl_info *mci) | |||
1232 | struct csrow_info *p_csrow; | 1232 | struct csrow_info *p_csrow; |
1233 | int empty, channel_count; | 1233 | int empty, channel_count; |
1234 | int max_csrows; | 1234 | int max_csrows; |
1235 | int mtr; | 1235 | int mtr, mtr1; |
1236 | int csrow_megs; | 1236 | int csrow_megs; |
1237 | int channel; | 1237 | int channel; |
1238 | int csrow; | 1238 | int csrow; |
@@ -1251,9 +1251,10 @@ static int i5000_init_csrows(struct mem_ctl_info *mci) | |||
1251 | 1251 | ||
1252 | /* use branch 0 for the basis */ | 1252 | /* use branch 0 for the basis */ |
1253 | mtr = pvt->b0_mtr[csrow >> 1]; | 1253 | mtr = pvt->b0_mtr[csrow >> 1]; |
1254 | mtr1 = pvt->b1_mtr[csrow >> 1]; | ||
1254 | 1255 | ||
1255 | /* if no DIMMS on this row, continue */ | 1256 | /* if no DIMMS on this row, continue */ |
1256 | if (!MTR_DIMMS_PRESENT(mtr)) | 1257 | if (!MTR_DIMMS_PRESENT(mtr) && !MTR_DIMMS_PRESENT(mtr1)) |
1257 | continue; | 1258 | continue; |
1258 | 1259 | ||
1259 | /* FAKE OUT VALUES, FIXME */ | 1260 | /* FAKE OUT VALUES, FIXME */ |
diff --git a/drivers/edac/i5400_edac.c b/drivers/edac/i5400_edac.c index b08b6d8e2dc7..f99d10655ed4 100644 --- a/drivers/edac/i5400_edac.c +++ b/drivers/edac/i5400_edac.c | |||
@@ -46,9 +46,10 @@ | |||
46 | /* Limits for i5400 */ | 46 | /* Limits for i5400 */ |
47 | #define NUM_MTRS_PER_BRANCH 4 | 47 | #define NUM_MTRS_PER_BRANCH 4 |
48 | #define CHANNELS_PER_BRANCH 2 | 48 | #define CHANNELS_PER_BRANCH 2 |
49 | #define MAX_DIMMS_PER_CHANNEL NUM_MTRS_PER_BRANCH | ||
49 | #define MAX_CHANNELS 4 | 50 | #define MAX_CHANNELS 4 |
50 | #define MAX_DIMMS (MAX_CHANNELS * 4) /* Up to 4 DIMM's per channel */ | 51 | /* max possible csrows per channel */ |
51 | #define MAX_CSROWS (MAX_DIMMS * 2) /* max possible csrows per channel */ | 52 | #define MAX_CSROWS (MAX_DIMMS_PER_CHANNEL) |
52 | 53 | ||
53 | /* Device 16, | 54 | /* Device 16, |
54 | * Function 0: System Address | 55 | * Function 0: System Address |
@@ -331,7 +332,6 @@ static const struct i5400_dev_info i5400_devs[] = { | |||
331 | 332 | ||
332 | struct i5400_dimm_info { | 333 | struct i5400_dimm_info { |
333 | int megabytes; /* size, 0 means not present */ | 334 | int megabytes; /* size, 0 means not present */ |
334 | int dual_rank; | ||
335 | }; | 335 | }; |
336 | 336 | ||
337 | /* driver private data structure */ | 337 | /* driver private data structure */ |
@@ -849,11 +849,9 @@ static int determine_mtr(struct i5400_pvt *pvt, int csrow, int channel) | |||
849 | int n; | 849 | int n; |
850 | 850 | ||
851 | /* There is one MTR for each slot pair of FB-DIMMs, | 851 | /* There is one MTR for each slot pair of FB-DIMMs, |
852 | Each slot may have one or two ranks (2 csrows), | ||
853 | Each slot pair may be at branch 0 or branch 1. | 852 | Each slot pair may be at branch 0 or branch 1. |
854 | So, csrow should be divided by eight | ||
855 | */ | 853 | */ |
856 | n = csrow >> 3; | 854 | n = csrow; |
857 | 855 | ||
858 | if (n >= NUM_MTRS_PER_BRANCH) { | 856 | if (n >= NUM_MTRS_PER_BRANCH) { |
859 | debugf0("ERROR: trying to access an invalid csrow: %d\n", | 857 | debugf0("ERROR: trying to access an invalid csrow: %d\n", |
@@ -905,25 +903,22 @@ static void handle_channel(struct i5400_pvt *pvt, int csrow, int channel, | |||
905 | amb_present_reg = determine_amb_present_reg(pvt, channel); | 903 | amb_present_reg = determine_amb_present_reg(pvt, channel); |
906 | 904 | ||
907 | /* Determine if there is a DIMM present in this DIMM slot */ | 905 | /* Determine if there is a DIMM present in this DIMM slot */ |
908 | if (amb_present_reg & (1 << (csrow >> 1))) { | 906 | if (amb_present_reg & (1 << csrow)) { |
909 | dinfo->dual_rank = MTR_DIMM_RANK(mtr); | 907 | /* Start with the number of bits for a Bank |
910 | 908 | * on the DRAM */ | |
911 | if (!((dinfo->dual_rank == 0) && | 909 | addrBits = MTR_DRAM_BANKS_ADDR_BITS(mtr); |
912 | ((csrow & 0x1) == 0x1))) { | 910 | /* Add thenumber of ROW bits */ |
913 | /* Start with the number of bits for a Bank | 911 | addrBits += MTR_DIMM_ROWS_ADDR_BITS(mtr); |
914 | * on the DRAM */ | 912 | /* add the number of COLUMN bits */ |
915 | addrBits = MTR_DRAM_BANKS_ADDR_BITS(mtr); | 913 | addrBits += MTR_DIMM_COLS_ADDR_BITS(mtr); |
916 | /* Add thenumber of ROW bits */ | 914 | /* add the number of RANK bits */ |
917 | addrBits += MTR_DIMM_ROWS_ADDR_BITS(mtr); | 915 | addrBits += MTR_DIMM_RANK(mtr); |
918 | /* add the number of COLUMN bits */ | 916 | |
919 | addrBits += MTR_DIMM_COLS_ADDR_BITS(mtr); | 917 | addrBits += 6; /* add 64 bits per DIMM */ |
920 | 918 | addrBits -= 20; /* divide by 2^^20 */ | |
921 | addrBits += 6; /* add 64 bits per DIMM */ | 919 | addrBits -= 3; /* 8 bits per bytes */ |
922 | addrBits -= 20; /* divide by 2^^20 */ | 920 | |
923 | addrBits -= 3; /* 8 bits per bytes */ | 921 | dinfo->megabytes = 1 << addrBits; |
924 | |||
925 | dinfo->megabytes = 1 << addrBits; | ||
926 | } | ||
927 | } | 922 | } |
928 | } | 923 | } |
929 | } | 924 | } |
@@ -951,12 +946,12 @@ static void calculate_dimm_size(struct i5400_pvt *pvt) | |||
951 | return; | 946 | return; |
952 | } | 947 | } |
953 | 948 | ||
954 | /* Scan all the actual CSROWS (which is # of DIMMS * 2) | 949 | /* Scan all the actual CSROWS |
955 | * and calculate the information for each DIMM | 950 | * and calculate the information for each DIMM |
956 | * Start with the highest csrow first, to display it first | 951 | * Start with the highest csrow first, to display it first |
957 | * and work toward the 0th csrow | 952 | * and work toward the 0th csrow |
958 | */ | 953 | */ |
959 | max_csrows = pvt->maxdimmperch * 2; | 954 | max_csrows = pvt->maxdimmperch; |
960 | for (csrow = max_csrows - 1; csrow >= 0; csrow--) { | 955 | for (csrow = max_csrows - 1; csrow >= 0; csrow--) { |
961 | 956 | ||
962 | /* on an odd csrow, first output a 'boundary' marker, | 957 | /* on an odd csrow, first output a 'boundary' marker, |
@@ -1064,7 +1059,7 @@ static void i5400_get_mc_regs(struct mem_ctl_info *mci) | |||
1064 | 1059 | ||
1065 | /* Get the set of MTR[0-3] regs by each branch */ | 1060 | /* Get the set of MTR[0-3] regs by each branch */ |
1066 | for (slot_row = 0; slot_row < NUM_MTRS_PER_BRANCH; slot_row++) { | 1061 | for (slot_row = 0; slot_row < NUM_MTRS_PER_BRANCH; slot_row++) { |
1067 | int where = MTR0 + (slot_row * sizeof(u32)); | 1062 | int where = MTR0 + (slot_row * sizeof(u16)); |
1068 | 1063 | ||
1069 | /* Branch 0 set of MTR registers */ | 1064 | /* Branch 0 set of MTR registers */ |
1070 | pci_read_config_word(pvt->branch_0, where, | 1065 | pci_read_config_word(pvt->branch_0, where, |
@@ -1146,7 +1141,7 @@ static int i5400_init_csrows(struct mem_ctl_info *mci) | |||
1146 | pvt = mci->pvt_info; | 1141 | pvt = mci->pvt_info; |
1147 | 1142 | ||
1148 | channel_count = pvt->maxch; | 1143 | channel_count = pvt->maxch; |
1149 | max_csrows = pvt->maxdimmperch * 2; | 1144 | max_csrows = pvt->maxdimmperch; |
1150 | 1145 | ||
1151 | empty = 1; /* Assume NO memory */ | 1146 | empty = 1; /* Assume NO memory */ |
1152 | 1147 | ||
@@ -1215,28 +1210,6 @@ static void i5400_enable_error_reporting(struct mem_ctl_info *mci) | |||
1215 | } | 1210 | } |
1216 | 1211 | ||
1217 | /* | 1212 | /* |
1218 | * i5400_get_dimm_and_channel_counts(pdev, &num_csrows, &num_channels) | ||
1219 | * | ||
1220 | * ask the device how many channels are present and how many CSROWS | ||
1221 | * as well | ||
1222 | */ | ||
1223 | static void i5400_get_dimm_and_channel_counts(struct pci_dev *pdev, | ||
1224 | int *num_dimms_per_channel, | ||
1225 | int *num_channels) | ||
1226 | { | ||
1227 | u8 value; | ||
1228 | |||
1229 | /* Need to retrieve just how many channels and dimms per channel are | ||
1230 | * supported on this memory controller | ||
1231 | */ | ||
1232 | pci_read_config_byte(pdev, MAXDIMMPERCH, &value); | ||
1233 | *num_dimms_per_channel = (int)value * 2; | ||
1234 | |||
1235 | pci_read_config_byte(pdev, MAXCH, &value); | ||
1236 | *num_channels = (int)value; | ||
1237 | } | ||
1238 | |||
1239 | /* | ||
1240 | * i5400_probe1 Probe for ONE instance of device to see if it is | 1213 | * i5400_probe1 Probe for ONE instance of device to see if it is |
1241 | * present. | 1214 | * present. |
1242 | * return: | 1215 | * return: |
@@ -1263,22 +1236,16 @@ static int i5400_probe1(struct pci_dev *pdev, int dev_idx) | |||
1263 | if (PCI_FUNC(pdev->devfn) != 0) | 1236 | if (PCI_FUNC(pdev->devfn) != 0) |
1264 | return -ENODEV; | 1237 | return -ENODEV; |
1265 | 1238 | ||
1266 | /* Ask the devices for the number of CSROWS and CHANNELS so | 1239 | /* As we don't have a motherboard identification routine to determine |
1267 | * that we can calculate the memory resources, etc | ||
1268 | * | ||
1269 | * The Chipset will report what it can handle which will be greater | ||
1270 | * or equal to what the motherboard manufacturer will implement. | ||
1271 | * | ||
1272 | * As we don't have a motherboard identification routine to determine | ||
1273 | * actual number of slots/dimms per channel, we thus utilize the | 1240 | * actual number of slots/dimms per channel, we thus utilize the |
1274 | * resource as specified by the chipset. Thus, we might have | 1241 | * resource as specified by the chipset. Thus, we might have |
1275 | * 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 |
1276 | * allows the driver to support upto the chipset max, without | 1243 | * allows the driver to support upto the chipset max, without |
1277 | * some fancy mobo determination. | 1244 | * some fancy mobo determination. |
1278 | */ | 1245 | */ |
1279 | i5400_get_dimm_and_channel_counts(pdev, &num_dimms_per_channel, | 1246 | num_dimms_per_channel = MAX_DIMMS_PER_CHANNEL; |
1280 | &num_channels); | 1247 | num_channels = MAX_CHANNELS; |
1281 | num_csrows = num_dimms_per_channel * 2; | 1248 | num_csrows = num_dimms_per_channel; |
1282 | 1249 | ||
1283 | debugf0("MC: %s(): Number of - Channels= %d DIMMS= %d CSROWS= %d\n", | 1250 | debugf0("MC: %s(): Number of - Channels= %d DIMMS= %d CSROWS= %d\n", |
1284 | __func__, num_channels, num_dimms_per_channel, num_csrows); | 1251 | __func__, num_channels, num_dimms_per_channel, num_csrows); |
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c index 157f6504f25e..cf27402af97b 100644 --- a/drivers/edac/mpc85xx_edac.c +++ b/drivers/edac/mpc85xx_edac.c | |||
@@ -26,7 +26,9 @@ | |||
26 | #include "mpc85xx_edac.h" | 26 | #include "mpc85xx_edac.h" |
27 | 27 | ||
28 | static int edac_dev_idx; | 28 | static int edac_dev_idx; |
29 | #ifdef CONFIG_PCI | ||
29 | static int edac_pci_idx; | 30 | static int edac_pci_idx; |
31 | #endif | ||
30 | static int edac_mc_idx; | 32 | static int edac_mc_idx; |
31 | 33 | ||
32 | static u32 orig_ddr_err_disable; | 34 | static u32 orig_ddr_err_disable; |
diff --git a/drivers/gpio/twl4030-gpio.c b/drivers/gpio/twl4030-gpio.c index afad14792141..49384a7c5492 100644 --- a/drivers/gpio/twl4030-gpio.c +++ b/drivers/gpio/twl4030-gpio.c | |||
@@ -460,7 +460,8 @@ no_irqs: | |||
460 | return ret; | 460 | return ret; |
461 | } | 461 | } |
462 | 462 | ||
463 | static int __devexit gpio_twl4030_remove(struct platform_device *pdev) | 463 | /* Cannot use __devexit as gpio_twl4030_probe() calls us */ |
464 | static int gpio_twl4030_remove(struct platform_device *pdev) | ||
464 | { | 465 | { |
465 | struct twl4030_gpio_platform_data *pdata = pdev->dev.platform_data; | 466 | struct twl4030_gpio_platform_data *pdata = pdev->dev.platform_data; |
466 | int status; | 467 | int status; |
@@ -493,7 +494,7 @@ static struct platform_driver gpio_twl4030_driver = { | |||
493 | .driver.name = "twl4030_gpio", | 494 | .driver.name = "twl4030_gpio", |
494 | .driver.owner = THIS_MODULE, | 495 | .driver.owner = THIS_MODULE, |
495 | .probe = gpio_twl4030_probe, | 496 | .probe = gpio_twl4030_probe, |
496 | .remove = __devexit_p(gpio_twl4030_remove), | 497 | .remove = gpio_twl4030_remove, |
497 | }; | 498 | }; |
498 | 499 | ||
499 | static int __init gpio_twl4030_init(void) | 500 | static int __init gpio_twl4030_init(void) |
diff --git a/drivers/hwmon/dme1737.c b/drivers/hwmon/dme1737.c index 2c2cb1ec94c5..27d62574284f 100644 --- a/drivers/hwmon/dme1737.c +++ b/drivers/hwmon/dme1737.c | |||
@@ -572,7 +572,7 @@ static struct dme1737_data *dme1737_update_device(struct device *dev) | |||
572 | 572 | ||
573 | /* Sample register contents every 1 sec */ | 573 | /* Sample register contents every 1 sec */ |
574 | if (time_after(jiffies, data->last_update + HZ) || !data->valid) { | 574 | if (time_after(jiffies, data->last_update + HZ) || !data->valid) { |
575 | if (data->type != sch5027) { | 575 | if (data->type == dme1737) { |
576 | data->vid = dme1737_read(data, DME1737_REG_VID) & | 576 | data->vid = dme1737_read(data, DME1737_REG_VID) & |
577 | 0x3f; | 577 | 0x3f; |
578 | } | 578 | } |
@@ -1621,9 +1621,6 @@ static struct attribute *dme1737_misc_attr[] = { | |||
1621 | &sensor_dev_attr_zone1_auto_point1_temp_hyst.dev_attr.attr, | 1621 | &sensor_dev_attr_zone1_auto_point1_temp_hyst.dev_attr.attr, |
1622 | &sensor_dev_attr_zone2_auto_point1_temp_hyst.dev_attr.attr, | 1622 | &sensor_dev_attr_zone2_auto_point1_temp_hyst.dev_attr.attr, |
1623 | &sensor_dev_attr_zone3_auto_point1_temp_hyst.dev_attr.attr, | 1623 | &sensor_dev_attr_zone3_auto_point1_temp_hyst.dev_attr.attr, |
1624 | /* Misc */ | ||
1625 | &dev_attr_vrm.attr, | ||
1626 | &dev_attr_cpu0_vid.attr, | ||
1627 | NULL | 1624 | NULL |
1628 | }; | 1625 | }; |
1629 | 1626 | ||
@@ -1631,6 +1628,18 @@ static const struct attribute_group dme1737_misc_group = { | |||
1631 | .attrs = dme1737_misc_attr, | 1628 | .attrs = dme1737_misc_attr, |
1632 | }; | 1629 | }; |
1633 | 1630 | ||
1631 | /* The following struct holds VID-related attributes. Their creation | ||
1632 | depends on the chip type which is determined during module load. */ | ||
1633 | static struct attribute *dme1737_vid_attr[] = { | ||
1634 | &dev_attr_vrm.attr, | ||
1635 | &dev_attr_cpu0_vid.attr, | ||
1636 | NULL | ||
1637 | }; | ||
1638 | |||
1639 | static const struct attribute_group dme1737_vid_group = { | ||
1640 | .attrs = dme1737_vid_attr, | ||
1641 | }; | ||
1642 | |||
1634 | /* The following structs hold the PWM attributes, some of which are optional. | 1643 | /* The following structs hold the PWM attributes, some of which are optional. |
1635 | * Their creation depends on the chip configuration which is determined during | 1644 | * Their creation depends on the chip configuration which is determined during |
1636 | * module load. */ | 1645 | * module load. */ |
@@ -1902,6 +1911,9 @@ static void dme1737_remove_files(struct device *dev) | |||
1902 | if (data->type != sch5027) { | 1911 | if (data->type != sch5027) { |
1903 | sysfs_remove_group(&dev->kobj, &dme1737_misc_group); | 1912 | sysfs_remove_group(&dev->kobj, &dme1737_misc_group); |
1904 | } | 1913 | } |
1914 | if (data->type == dme1737) { | ||
1915 | sysfs_remove_group(&dev->kobj, &dme1737_vid_group); | ||
1916 | } | ||
1905 | 1917 | ||
1906 | sysfs_remove_group(&dev->kobj, &dme1737_group); | 1918 | sysfs_remove_group(&dev->kobj, &dme1737_group); |
1907 | 1919 | ||
@@ -1933,6 +1945,13 @@ static int dme1737_create_files(struct device *dev) | |||
1933 | goto exit_remove; | 1945 | goto exit_remove; |
1934 | } | 1946 | } |
1935 | 1947 | ||
1948 | /* Create VID-related sysfs attributes */ | ||
1949 | if ((data->type == dme1737) && | ||
1950 | (err = sysfs_create_group(&dev->kobj, | ||
1951 | &dme1737_vid_group))) { | ||
1952 | goto exit_remove; | ||
1953 | } | ||
1954 | |||
1936 | /* Create fan sysfs attributes */ | 1955 | /* Create fan sysfs attributes */ |
1937 | for (ix = 0; ix < ARRAY_SIZE(dme1737_fan_group); ix++) { | 1956 | for (ix = 0; ix < ARRAY_SIZE(dme1737_fan_group); ix++) { |
1938 | if (data->has_fan & (1 << ix)) { | 1957 | if (data->has_fan & (1 << ix)) { |
@@ -2127,7 +2146,7 @@ static int dme1737_init_device(struct device *dev) | |||
2127 | data->pwm_acz[2] = 4; /* pwm3 -> zone3 */ | 2146 | data->pwm_acz[2] = 4; /* pwm3 -> zone3 */ |
2128 | 2147 | ||
2129 | /* Set VRM */ | 2148 | /* Set VRM */ |
2130 | if (data->type != sch5027) { | 2149 | if (data->type == dme1737) { |
2131 | data->vrm = vid_which_vrm(); | 2150 | data->vrm = vid_which_vrm(); |
2132 | } | 2151 | } |
2133 | 2152 | ||
diff --git a/drivers/hwmon/fschmd.c b/drivers/hwmon/fschmd.c index 2a7a85a6dc36..da1b1f9488af 100644 --- a/drivers/hwmon/fschmd.c +++ b/drivers/hwmon/fschmd.c | |||
@@ -819,7 +819,7 @@ static int watchdog_release(struct inode *inode, struct file *filp) | |||
819 | static ssize_t watchdog_write(struct file *filp, const char __user *buf, | 819 | static ssize_t watchdog_write(struct file *filp, const char __user *buf, |
820 | size_t count, loff_t *offset) | 820 | size_t count, loff_t *offset) |
821 | { | 821 | { |
822 | size_t ret; | 822 | int ret; |
823 | struct fschmd_data *data = filp->private_data; | 823 | struct fschmd_data *data = filp->private_data; |
824 | 824 | ||
825 | if (count) { | 825 | if (count) { |
diff --git a/drivers/hwmon/hp_accel.c b/drivers/hwmon/hp_accel.c index 6679854c85b0..be475e844c2a 100644 --- a/drivers/hwmon/hp_accel.c +++ b/drivers/hwmon/hp_accel.c | |||
@@ -197,11 +197,13 @@ static struct dmi_system_id lis3lv02d_dmi_ids[] = { | |||
197 | AXIS_DMI_MATCH("HP2133", "HP 2133", xy_rotated_left), | 197 | AXIS_DMI_MATCH("HP2133", "HP 2133", xy_rotated_left), |
198 | AXIS_DMI_MATCH("HP2140", "HP 2140", xy_swap_inverted), | 198 | AXIS_DMI_MATCH("HP2140", "HP 2140", xy_swap_inverted), |
199 | AXIS_DMI_MATCH("NC653x", "HP Compaq 653", xy_rotated_left_usd), | 199 | AXIS_DMI_MATCH("NC653x", "HP Compaq 653", xy_rotated_left_usd), |
200 | AXIS_DMI_MATCH("NC673x", "HP Compaq 673", xy_rotated_left_usd), | 200 | AXIS_DMI_MATCH("NC6730b", "HP Compaq 6730b", xy_rotated_left_usd), |
201 | AXIS_DMI_MATCH("NC6730s", "HP Compaq 6730s", xy_swap), | ||
201 | AXIS_DMI_MATCH("NC651xx", "HP Compaq 651", xy_rotated_right), | 202 | AXIS_DMI_MATCH("NC651xx", "HP Compaq 651", xy_rotated_right), |
202 | AXIS_DMI_MATCH("NC6710x", "HP Compaq 6710", xy_swap_yz_inverted), | 203 | AXIS_DMI_MATCH("NC6710x", "HP Compaq 6710", xy_swap_yz_inverted), |
203 | AXIS_DMI_MATCH("NC6715x", "HP Compaq 6715", y_inverted), | 204 | AXIS_DMI_MATCH("NC6715x", "HP Compaq 6715", y_inverted), |
204 | AXIS_DMI_MATCH("NC693xx", "HP EliteBook 693", xy_rotated_right), | 205 | AXIS_DMI_MATCH("NC693xx", "HP EliteBook 693", xy_rotated_right), |
206 | AXIS_DMI_MATCH("NC693xx", "HP EliteBook 853", xy_swap), | ||
205 | /* Intel-based HP Pavilion dv5 */ | 207 | /* Intel-based HP Pavilion dv5 */ |
206 | AXIS_DMI_MATCH2("HPDV5_I", | 208 | AXIS_DMI_MATCH2("HPDV5_I", |
207 | PRODUCT_NAME, "HP Pavilion dv5", | 209 | PRODUCT_NAME, "HP Pavilion dv5", |
@@ -214,6 +216,7 @@ static struct dmi_system_id lis3lv02d_dmi_ids[] = { | |||
214 | y_inverted), | 216 | y_inverted), |
215 | AXIS_DMI_MATCH("DV7", "HP Pavilion dv7", x_inverted), | 217 | AXIS_DMI_MATCH("DV7", "HP Pavilion dv7", x_inverted), |
216 | AXIS_DMI_MATCH("HP8710", "HP Compaq 8710", y_inverted), | 218 | AXIS_DMI_MATCH("HP8710", "HP Compaq 8710", y_inverted), |
219 | AXIS_DMI_MATCH("HDX18", "HP HDX 18", x_inverted), | ||
217 | { NULL, } | 220 | { NULL, } |
218 | /* Laptop models without axis info (yet): | 221 | /* Laptop models without axis info (yet): |
219 | * "NC6910" "HP Compaq 6910" | 222 | * "NC6910" "HP Compaq 6910" |
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index ffeb2a10e1a7..a3749cb0f181 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c | |||
@@ -1028,12 +1028,11 @@ static int __init it87_find(unsigned short *address, | |||
1028 | chip_type, *address, sio_data->revision); | 1028 | chip_type, *address, sio_data->revision); |
1029 | 1029 | ||
1030 | /* Read GPIO config and VID value from LDN 7 (GPIO) */ | 1030 | /* Read GPIO config and VID value from LDN 7 (GPIO) */ |
1031 | if (chip_type != IT8705F_DEVID) { | 1031 | if (sio_data->type != it87) { |
1032 | int reg; | 1032 | int reg; |
1033 | 1033 | ||
1034 | superio_select(GPIO); | 1034 | superio_select(GPIO); |
1035 | if ((chip_type == it8718) || | 1035 | if (sio_data->type == it8718 || sio_data->type == it8720) |
1036 | (chip_type == it8720)) | ||
1037 | sio_data->vid_value = superio_inb(IT87_SIO_VID_REG); | 1036 | sio_data->vid_value = superio_inb(IT87_SIO_VID_REG); |
1038 | 1037 | ||
1039 | reg = superio_inb(IT87_SIO_PINX2_REG); | 1038 | reg = superio_inb(IT87_SIO_PINX2_REG); |
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 4487cc097911..0aecaaebef3d 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c | |||
@@ -2013,7 +2013,7 @@ static struct platform_driver omap_hsmmc_driver = { | |||
2013 | static int __init omap_hsmmc_init(void) | 2013 | static int __init omap_hsmmc_init(void) |
2014 | { | 2014 | { |
2015 | /* Register the MMC driver */ | 2015 | /* Register the MMC driver */ |
2016 | return platform_driver_register(&omap_hsmmc_driver); | 2016 | return platform_driver_probe(&omap_hsmmc_driver, omap_hsmmc_probe); |
2017 | } | 2017 | } |
2018 | 2018 | ||
2019 | static void __exit omap_hsmmc_cleanup(void) | 2019 | static void __exit omap_hsmmc_cleanup(void) |
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index e1f7d0a78b9d..14cec04c34f9 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/log2.h> | 42 | #include <linux/log2.h> |
43 | #include <linux/kthread.h> | 43 | #include <linux/kthread.h> |
44 | #include <linux/reboot.h> | 44 | #include <linux/reboot.h> |
45 | #include <linux/kernel.h> | ||
45 | #include "ubi.h" | 46 | #include "ubi.h" |
46 | 47 | ||
47 | /* Maximum length of the 'mtd=' parameter */ | 48 | /* Maximum length of the 'mtd=' parameter */ |
@@ -1257,7 +1258,7 @@ static int __init bytes_str_to_int(const char *str) | |||
1257 | unsigned long result; | 1258 | unsigned long result; |
1258 | 1259 | ||
1259 | result = simple_strtoul(str, &endp, 0); | 1260 | result = simple_strtoul(str, &endp, 0); |
1260 | if (str == endp || result < 0) { | 1261 | if (str == endp || result >= INT_MAX) { |
1261 | printk(KERN_ERR "UBI error: incorrect bytes count: \"%s\"\n", | 1262 | printk(KERN_ERR "UBI error: incorrect bytes count: \"%s\"\n", |
1262 | str); | 1263 | str); |
1263 | return -EINVAL; | 1264 | return -EINVAL; |
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c index e7161adc419d..90af61a2c3e4 100644 --- a/drivers/mtd/ubi/scan.c +++ b/drivers/mtd/ubi/scan.c | |||
@@ -794,16 +794,15 @@ static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si, | |||
794 | * number. | 794 | * number. |
795 | */ | 795 | */ |
796 | image_seq = be32_to_cpu(ech->image_seq); | 796 | image_seq = be32_to_cpu(ech->image_seq); |
797 | if (!si->image_seq_set) { | 797 | if (!ubi->image_seq && image_seq) |
798 | ubi->image_seq = image_seq; | 798 | ubi->image_seq = image_seq; |
799 | si->image_seq_set = 1; | 799 | if (ubi->image_seq && image_seq && |
800 | } else if (ubi->image_seq && ubi->image_seq != image_seq) { | 800 | ubi->image_seq != image_seq) { |
801 | ubi_err("bad image sequence number %d in PEB %d, " | 801 | ubi_err("bad image sequence number %d in PEB %d, " |
802 | "expected %d", image_seq, pnum, ubi->image_seq); | 802 | "expected %d", image_seq, pnum, ubi->image_seq); |
803 | ubi_dbg_dump_ec_hdr(ech); | 803 | ubi_dbg_dump_ec_hdr(ech); |
804 | return -EINVAL; | 804 | return -EINVAL; |
805 | } | 805 | } |
806 | |||
807 | } | 806 | } |
808 | 807 | ||
809 | /* OK, we've done with the EC header, let's look at the VID header */ | 808 | /* OK, we've done with the EC header, let's look at the VID header */ |
diff --git a/drivers/mtd/ubi/scan.h b/drivers/mtd/ubi/scan.h index bab31695dace..ff179ad7ca55 100644 --- a/drivers/mtd/ubi/scan.h +++ b/drivers/mtd/ubi/scan.h | |||
@@ -103,7 +103,6 @@ struct ubi_scan_volume { | |||
103 | * @ec_sum: a temporary variable used when calculating @mean_ec | 103 | * @ec_sum: a temporary variable used when calculating @mean_ec |
104 | * @ec_count: a temporary variable used when calculating @mean_ec | 104 | * @ec_count: a temporary variable used when calculating @mean_ec |
105 | * @corr_count: count of corrupted PEBs | 105 | * @corr_count: count of corrupted PEBs |
106 | * @image_seq_set: indicates @ubi->image_seq is known | ||
107 | * | 106 | * |
108 | * This data structure contains the result of scanning and may be used by other | 107 | * This data structure contains the result of scanning and may be used by other |
109 | * UBI sub-systems to build final UBI data structures, further error-recovery | 108 | * UBI sub-systems to build final UBI data structures, further error-recovery |
@@ -127,7 +126,6 @@ struct ubi_scan_info { | |||
127 | uint64_t ec_sum; | 126 | uint64_t ec_sum; |
128 | int ec_count; | 127 | int ec_count; |
129 | int corr_count; | 128 | int corr_count; |
130 | int image_seq_set; | ||
131 | }; | 129 | }; |
132 | 130 | ||
133 | struct ubi_device; | 131 | struct ubi_device; |
diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c index 4a110b7b2673..6c4a4fc83630 100644 --- a/drivers/pcmcia/cistpl.c +++ b/drivers/pcmcia/cistpl.c | |||
@@ -1463,7 +1463,9 @@ int pccard_read_tuple(struct pcmcia_socket *s, unsigned int function, cisdata_t | |||
1463 | return -ENOMEM; | 1463 | return -ENOMEM; |
1464 | } | 1464 | } |
1465 | tuple.DesiredTuple = code; | 1465 | tuple.DesiredTuple = code; |
1466 | tuple.Attributes = TUPLE_RETURN_COMMON; | 1466 | tuple.Attributes = 0; |
1467 | if (function == BIND_FN_ALL) | ||
1468 | tuple.Attributes = TUPLE_RETURN_COMMON; | ||
1467 | ret = pccard_get_first_tuple(s, function, &tuple); | 1469 | ret = pccard_get_first_tuple(s, function, &tuple); |
1468 | if (ret != 0) | 1470 | if (ret != 0) |
1469 | goto done; | 1471 | goto done; |
@@ -1490,7 +1492,7 @@ EXPORT_SYMBOL(pccard_read_tuple); | |||
1490 | 1492 | ||
1491 | ======================================================================*/ | 1493 | ======================================================================*/ |
1492 | 1494 | ||
1493 | int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, unsigned int *info) | 1495 | int pccard_validate_cis(struct pcmcia_socket *s, unsigned int *info) |
1494 | { | 1496 | { |
1495 | tuple_t *tuple; | 1497 | tuple_t *tuple; |
1496 | cisparse_t *p; | 1498 | cisparse_t *p; |
@@ -1515,30 +1517,30 @@ int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, unsigned | |||
1515 | count = reserved = 0; | 1517 | count = reserved = 0; |
1516 | tuple->DesiredTuple = RETURN_FIRST_TUPLE; | 1518 | tuple->DesiredTuple = RETURN_FIRST_TUPLE; |
1517 | tuple->Attributes = TUPLE_RETURN_COMMON; | 1519 | tuple->Attributes = TUPLE_RETURN_COMMON; |
1518 | ret = pccard_get_first_tuple(s, function, tuple); | 1520 | ret = pccard_get_first_tuple(s, BIND_FN_ALL, tuple); |
1519 | if (ret != 0) | 1521 | if (ret != 0) |
1520 | goto done; | 1522 | goto done; |
1521 | 1523 | ||
1522 | /* First tuple should be DEVICE; we should really have either that | 1524 | /* First tuple should be DEVICE; we should really have either that |
1523 | or a CFTABLE_ENTRY of some sort */ | 1525 | or a CFTABLE_ENTRY of some sort */ |
1524 | if ((tuple->TupleCode == CISTPL_DEVICE) || | 1526 | if ((tuple->TupleCode == CISTPL_DEVICE) || |
1525 | (pccard_read_tuple(s, function, CISTPL_CFTABLE_ENTRY, p) == 0) || | 1527 | (pccard_read_tuple(s, BIND_FN_ALL, CISTPL_CFTABLE_ENTRY, p) == 0) || |
1526 | (pccard_read_tuple(s, function, CISTPL_CFTABLE_ENTRY_CB, p) == 0)) | 1528 | (pccard_read_tuple(s, BIND_FN_ALL, CISTPL_CFTABLE_ENTRY_CB, p) == 0)) |
1527 | dev_ok++; | 1529 | dev_ok++; |
1528 | 1530 | ||
1529 | /* All cards should have a MANFID tuple, and/or a VERS_1 or VERS_2 | 1531 | /* All cards should have a MANFID tuple, and/or a VERS_1 or VERS_2 |
1530 | tuple, for card identification. Certain old D-Link and Linksys | 1532 | tuple, for card identification. Certain old D-Link and Linksys |
1531 | cards have only a broken VERS_2 tuple; hence the bogus test. */ | 1533 | cards have only a broken VERS_2 tuple; hence the bogus test. */ |
1532 | if ((pccard_read_tuple(s, function, CISTPL_MANFID, p) == 0) || | 1534 | if ((pccard_read_tuple(s, BIND_FN_ALL, CISTPL_MANFID, p) == 0) || |
1533 | (pccard_read_tuple(s, function, CISTPL_VERS_1, p) == 0) || | 1535 | (pccard_read_tuple(s, BIND_FN_ALL, CISTPL_VERS_1, p) == 0) || |
1534 | (pccard_read_tuple(s, function, CISTPL_VERS_2, p) != -ENOSPC)) | 1536 | (pccard_read_tuple(s, BIND_FN_ALL, CISTPL_VERS_2, p) != -ENOSPC)) |
1535 | ident_ok++; | 1537 | ident_ok++; |
1536 | 1538 | ||
1537 | if (!dev_ok && !ident_ok) | 1539 | if (!dev_ok && !ident_ok) |
1538 | goto done; | 1540 | goto done; |
1539 | 1541 | ||
1540 | for (count = 1; count < MAX_TUPLES; count++) { | 1542 | for (count = 1; count < MAX_TUPLES; count++) { |
1541 | ret = pccard_get_next_tuple(s, function, tuple); | 1543 | ret = pccard_get_next_tuple(s, BIND_FN_ALL, tuple); |
1542 | if (ret != 0) | 1544 | if (ret != 0) |
1543 | break; | 1545 | break; |
1544 | if (((tuple->TupleCode > 0x23) && (tuple->TupleCode < 0x40)) || | 1546 | if (((tuple->TupleCode > 0x23) && (tuple->TupleCode < 0x40)) || |
diff --git a/drivers/pcmcia/cs_internal.h b/drivers/pcmcia/cs_internal.h index 79615e6d540b..1f4098f1354d 100644 --- a/drivers/pcmcia/cs_internal.h +++ b/drivers/pcmcia/cs_internal.h | |||
@@ -197,8 +197,7 @@ int pccard_read_tuple(struct pcmcia_socket *s, unsigned int function, | |||
197 | cisdata_t code, void *parse); | 197 | cisdata_t code, void *parse); |
198 | int pcmcia_replace_cis(struct pcmcia_socket *s, | 198 | int pcmcia_replace_cis(struct pcmcia_socket *s, |
199 | const u8 *data, const size_t len); | 199 | const u8 *data, const size_t len); |
200 | int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, | 200 | int pccard_validate_cis(struct pcmcia_socket *s, unsigned int *count); |
201 | unsigned int *count); | ||
202 | 201 | ||
203 | /* rsrc_mgr.c */ | 202 | /* rsrc_mgr.c */ |
204 | int pcmcia_validate_mem(struct pcmcia_socket *s); | 203 | int pcmcia_validate_mem(struct pcmcia_socket *s); |
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 9f300d3cb125..f5b7079f13d3 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -547,7 +547,7 @@ static int pcmcia_device_query(struct pcmcia_device *p_dev) | |||
547 | if (!vers1) | 547 | if (!vers1) |
548 | return -ENOMEM; | 548 | return -ENOMEM; |
549 | 549 | ||
550 | if (!pccard_read_tuple(p_dev->socket, p_dev->func, | 550 | if (!pccard_read_tuple(p_dev->socket, BIND_FN_ALL, |
551 | CISTPL_MANFID, &manf_id)) { | 551 | CISTPL_MANFID, &manf_id)) { |
552 | p_dev->manf_id = manf_id.manf; | 552 | p_dev->manf_id = manf_id.manf; |
553 | p_dev->card_id = manf_id.card; | 553 | p_dev->card_id = manf_id.card; |
@@ -581,9 +581,9 @@ static int pcmcia_device_query(struct pcmcia_device *p_dev) | |||
581 | kfree(devgeo); | 581 | kfree(devgeo); |
582 | } | 582 | } |
583 | 583 | ||
584 | if (!pccard_read_tuple(p_dev->socket, p_dev->func, CISTPL_VERS_1, | 584 | if (!pccard_read_tuple(p_dev->socket, BIND_FN_ALL, CISTPL_VERS_1, |
585 | vers1)) { | 585 | vers1)) { |
586 | for (i=0; i < vers1->ns; i++) { | 586 | for (i = 0; i < min_t(unsigned int, 4, vers1->ns); i++) { |
587 | char *tmp; | 587 | char *tmp; |
588 | unsigned int length; | 588 | unsigned int length; |
589 | 589 | ||
@@ -733,7 +733,7 @@ static int pcmcia_card_add(struct pcmcia_socket *s) | |||
733 | return -EAGAIN; /* try again, but later... */ | 733 | return -EAGAIN; /* try again, but later... */ |
734 | } | 734 | } |
735 | 735 | ||
736 | ret = pccard_validate_cis(s, BIND_FN_ALL, &no_chains); | 736 | ret = pccard_validate_cis(s, &no_chains); |
737 | if (ret || !no_chains) { | 737 | if (ret || !no_chains) { |
738 | ds_dev_dbg(0, &s->dev, "invalid CIS or invalid resources\n"); | 738 | ds_dev_dbg(0, &s->dev, "invalid CIS or invalid resources\n"); |
739 | return -ENODEV; | 739 | return -ENODEV; |
diff --git a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c index b906abe26ad0..a4aacb830b80 100644 --- a/drivers/pcmcia/i82365.c +++ b/drivers/pcmcia/i82365.c | |||
@@ -1053,8 +1053,8 @@ static int i365_set_io_map(u_short sock, struct pccard_io_map *io) | |||
1053 | u_char map, ioctl; | 1053 | u_char map, ioctl; |
1054 | 1054 | ||
1055 | debug(1, "SetIOMap(%d, %d, %#2.2x, %d ns, " | 1055 | debug(1, "SetIOMap(%d, %d, %#2.2x, %d ns, " |
1056 | "%#x-%#x)\n", sock, io->map, io->flags, | 1056 | "%#llx-%#llx)\n", sock, io->map, io->flags, io->speed, |
1057 | io->speed, io->start, io->stop); | 1057 | (unsigned long long)io->start, (unsigned long long)io->stop); |
1058 | map = io->map; | 1058 | map = io->map; |
1059 | if ((map > 1) || (io->start > 0xffff) || (io->stop > 0xffff) || | 1059 | if ((map > 1) || (io->start > 0xffff) || (io->stop > 0xffff) || |
1060 | (io->stop < io->start)) return -EINVAL; | 1060 | (io->stop < io->start)) return -EINVAL; |
diff --git a/drivers/pcmcia/m32r_cfc.c b/drivers/pcmcia/m32r_cfc.c index d1d89c4491ad..7dfbee1dcd76 100644 --- a/drivers/pcmcia/m32r_cfc.c +++ b/drivers/pcmcia/m32r_cfc.c | |||
@@ -537,8 +537,9 @@ static int _pcc_set_io_map(u_short sock, struct pccard_io_map *io) | |||
537 | u_char map; | 537 | u_char map; |
538 | 538 | ||
539 | debug(3, "m32r_cfc: SetIOMap(%d, %d, %#2.2x, %d ns, " | 539 | debug(3, "m32r_cfc: SetIOMap(%d, %d, %#2.2x, %d ns, " |
540 | "%#lx-%#lx)\n", sock, io->map, io->flags, | 540 | "%#llx-%#llx)\n", sock, io->map, io->flags, |
541 | io->speed, io->start, io->stop); | 541 | io->speed, (unsigned long long)io->start, |
542 | (unsigned long long)io->stop); | ||
542 | map = io->map; | 543 | map = io->map; |
543 | 544 | ||
544 | return 0; | 545 | return 0; |
@@ -554,8 +555,9 @@ static int _pcc_set_mem_map(u_short sock, struct pccard_mem_map *mem) | |||
554 | pcc_socket_t *t = &socket[sock]; | 555 | pcc_socket_t *t = &socket[sock]; |
555 | 556 | ||
556 | debug(3, "m32r_cfc: SetMemMap(%d, %d, %#2.2x, %d ns, " | 557 | debug(3, "m32r_cfc: SetMemMap(%d, %d, %#2.2x, %d ns, " |
557 | "%#lx, %#x)\n", sock, map, mem->flags, | 558 | "%#llx, %#x)\n", sock, map, mem->flags, |
558 | mem->speed, mem->static_start, mem->card_start); | 559 | mem->speed, (unsigned long long)mem->static_start, |
560 | mem->card_start); | ||
559 | 561 | ||
560 | /* | 562 | /* |
561 | * sanity check | 563 | * sanity check |
diff --git a/drivers/pcmcia/m32r_pcc.c b/drivers/pcmcia/m32r_pcc.c index a0655839c8d3..c6524f99ccc3 100644 --- a/drivers/pcmcia/m32r_pcc.c +++ b/drivers/pcmcia/m32r_pcc.c | |||
@@ -492,8 +492,9 @@ static int _pcc_set_io_map(u_short sock, struct pccard_io_map *io) | |||
492 | u_char map; | 492 | u_char map; |
493 | 493 | ||
494 | debug(3, "m32r-pcc: SetIOMap(%d, %d, %#2.2x, %d ns, " | 494 | debug(3, "m32r-pcc: SetIOMap(%d, %d, %#2.2x, %d ns, " |
495 | "%#x-%#x)\n", sock, io->map, io->flags, | 495 | "%#llx-%#llx)\n", sock, io->map, io->flags, |
496 | io->speed, io->start, io->stop); | 496 | io->speed, (unsigned long long)io->start, |
497 | (unsigned long long)io->stop); | ||
497 | map = io->map; | 498 | map = io->map; |
498 | 499 | ||
499 | return 0; | 500 | return 0; |
@@ -515,8 +516,9 @@ static int _pcc_set_mem_map(u_short sock, struct pccard_mem_map *mem) | |||
515 | #endif | 516 | #endif |
516 | 517 | ||
517 | debug(3, "m32r-pcc: SetMemMap(%d, %d, %#2.2x, %d ns, " | 518 | debug(3, "m32r-pcc: SetMemMap(%d, %d, %#2.2x, %d ns, " |
518 | "%#lx, %#x)\n", sock, map, mem->flags, | 519 | "%#llx, %#x)\n", sock, map, mem->flags, |
519 | mem->speed, mem->static_start, mem->card_start); | 520 | mem->speed, (unsigned long long)mem->static_start, |
521 | mem->card_start); | ||
520 | 522 | ||
521 | /* | 523 | /* |
522 | * sanity check | 524 | * sanity check |
diff --git a/drivers/pcmcia/m8xx_pcmcia.c b/drivers/pcmcia/m8xx_pcmcia.c index c69f2c4fe520..403559ba49dd 100644 --- a/drivers/pcmcia/m8xx_pcmcia.c +++ b/drivers/pcmcia/m8xx_pcmcia.c | |||
@@ -975,8 +975,9 @@ static int m8xx_set_io_map(struct pcmcia_socket *sock, struct pccard_io_map *io) | |||
975 | #define M8XX_BASE (PCMCIA_IO_WIN_BASE + io->start) | 975 | #define M8XX_BASE (PCMCIA_IO_WIN_BASE + io->start) |
976 | 976 | ||
977 | dprintk("SetIOMap(%d, %d, %#2.2x, %d ns, " | 977 | dprintk("SetIOMap(%d, %d, %#2.2x, %d ns, " |
978 | "%#4.4x-%#4.4x)\n", lsock, io->map, io->flags, | 978 | "%#4.4llx-%#4.4llx)\n", lsock, io->map, io->flags, |
979 | io->speed, io->start, io->stop); | 979 | io->speed, (unsigned long long)io->start, |
980 | (unsigned long long)io->stop); | ||
980 | 981 | ||
981 | if ((io->map >= PCMCIA_IO_WIN_NO) || (io->start > 0xffff) | 982 | if ((io->map >= PCMCIA_IO_WIN_NO) || (io->start > 0xffff) |
982 | || (io->stop > 0xffff) || (io->stop < io->start)) | 983 | || (io->stop > 0xffff) || (io->stop < io->start)) |
@@ -1055,8 +1056,9 @@ static int m8xx_set_mem_map(struct pcmcia_socket *sock, | |||
1055 | pcmconf8xx_t *pcmcia = s->pcmcia; | 1056 | pcmconf8xx_t *pcmcia = s->pcmcia; |
1056 | 1057 | ||
1057 | dprintk("SetMemMap(%d, %d, %#2.2x, %d ns, " | 1058 | dprintk("SetMemMap(%d, %d, %#2.2x, %d ns, " |
1058 | "%#5.5lx, %#5.5x)\n", lsock, mem->map, mem->flags, | 1059 | "%#5.5llx, %#5.5x)\n", lsock, mem->map, mem->flags, |
1059 | mem->speed, mem->static_start, mem->card_start); | 1060 | mem->speed, (unsigned long long)mem->static_start, |
1061 | mem->card_start); | ||
1060 | 1062 | ||
1061 | if ((mem->map >= PCMCIA_MEM_WIN_NO) | 1063 | if ((mem->map >= PCMCIA_MEM_WIN_NO) |
1062 | // || ((mem->s) >= PCMCIA_MEM_WIN_SIZE) | 1064 | // || ((mem->s) >= PCMCIA_MEM_WIN_SIZE) |
@@ -1107,8 +1109,9 @@ static int m8xx_set_mem_map(struct pcmcia_socket *sock, | |||
1107 | } | 1109 | } |
1108 | 1110 | ||
1109 | dprintk("SetMemMap(%d, %d, %#2.2x, %d ns, " | 1111 | dprintk("SetMemMap(%d, %d, %#2.2x, %d ns, " |
1110 | "%#5.5lx, %#5.5x)\n", lsock, mem->map, mem->flags, | 1112 | "%#5.5llx, %#5.5x)\n", lsock, mem->map, mem->flags, |
1111 | mem->speed, mem->static_start, mem->card_start); | 1113 | mem->speed, (unsigned long long)mem->static_start, |
1114 | mem->card_start); | ||
1112 | 1115 | ||
1113 | /* copy the struct and modify the copy */ | 1116 | /* copy the struct and modify the copy */ |
1114 | 1117 | ||
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c index 32c44040c1e8..30cf71d2ee23 100644 --- a/drivers/pcmcia/pcmcia_ioctl.c +++ b/drivers/pcmcia/pcmcia_ioctl.c | |||
@@ -881,7 +881,7 @@ static int ds_ioctl(struct inode * inode, struct file * file, | |||
881 | mutex_lock(&s->skt_mutex); | 881 | mutex_lock(&s->skt_mutex); |
882 | pcmcia_validate_mem(s); | 882 | pcmcia_validate_mem(s); |
883 | mutex_unlock(&s->skt_mutex); | 883 | mutex_unlock(&s->skt_mutex); |
884 | ret = pccard_validate_cis(s, BIND_FN_ALL, &buf->cisinfo.Chains); | 884 | ret = pccard_validate_cis(s, &buf->cisinfo.Chains); |
885 | break; | 885 | break; |
886 | case DS_SUSPEND_CARD: | 886 | case DS_SUSPEND_CARD: |
887 | ret = pcmcia_suspend_card(s); | 887 | ret = pcmcia_suspend_card(s); |
diff --git a/drivers/pcmcia/pd6729.c b/drivers/pcmcia/pd6729.c index 1c39d3438f20..70a33468bcd0 100644 --- a/drivers/pcmcia/pd6729.c +++ b/drivers/pcmcia/pd6729.c | |||
@@ -641,6 +641,12 @@ static int __devinit pd6729_pci_probe(struct pci_dev *dev, | |||
641 | if ((ret = pci_enable_device(dev))) | 641 | if ((ret = pci_enable_device(dev))) |
642 | goto err_out_free_mem; | 642 | goto err_out_free_mem; |
643 | 643 | ||
644 | if (!pci_resource_start(dev, 0)) { | ||
645 | printk(KERN_INFO "pd6729: refusing to load the driver " | ||
646 | "as the io_base is 0.\n"); | ||
647 | goto err_out_free_mem; | ||
648 | } | ||
649 | |||
644 | printk(KERN_INFO "pd6729: Cirrus PD6729 PCI to PCMCIA Bridge " | 650 | printk(KERN_INFO "pd6729: Cirrus PD6729 PCI to PCMCIA Bridge " |
645 | "at 0x%llx on irq %d\n", | 651 | "at 0x%llx on irq %d\n", |
646 | (unsigned long long)pci_resource_start(dev, 0), dev->irq); | 652 | (unsigned long long)pci_resource_start(dev, 0), dev->irq); |
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c index 9ca22c7aafb2..7039f3cf5b77 100644 --- a/drivers/pcmcia/rsrc_nonstatic.c +++ b/drivers/pcmcia/rsrc_nonstatic.c | |||
@@ -206,6 +206,7 @@ static void do_io_probe(struct pcmcia_socket *s, unsigned int base, | |||
206 | /* First, what does a floating port look like? */ | 206 | /* First, what does a floating port look like? */ |
207 | b = kzalloc(256, GFP_KERNEL); | 207 | b = kzalloc(256, GFP_KERNEL); |
208 | if (!b) { | 208 | if (!b) { |
209 | printk("\n"); | ||
209 | dev_printk(KERN_ERR, &s->dev, | 210 | dev_printk(KERN_ERR, &s->dev, |
210 | "do_io_probe: unable to kmalloc 256 bytes"); | 211 | "do_io_probe: unable to kmalloc 256 bytes"); |
211 | return; | 212 | return; |
@@ -275,7 +276,7 @@ static int readable(struct pcmcia_socket *s, struct resource *res, | |||
275 | s->cis_mem.res = res; | 276 | s->cis_mem.res = res; |
276 | s->cis_virt = ioremap(res->start, s->map_size); | 277 | s->cis_virt = ioremap(res->start, s->map_size); |
277 | if (s->cis_virt) { | 278 | if (s->cis_virt) { |
278 | ret = pccard_validate_cis(s, BIND_FN_ALL, count); | 279 | ret = pccard_validate_cis(s, count); |
279 | /* invalidate mapping and CIS cache */ | 280 | /* invalidate mapping and CIS cache */ |
280 | iounmap(s->cis_virt); | 281 | iounmap(s->cis_virt); |
281 | s->cis_virt = NULL; | 282 | s->cis_virt = NULL; |
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c index 163cf98e2386..ef7e9e58782b 100644 --- a/drivers/pcmcia/soc_common.c +++ b/drivers/pcmcia/soc_common.c | |||
@@ -336,8 +336,9 @@ soc_common_pcmcia_set_io_map(struct pcmcia_socket *sock, struct pccard_io_map *m | |||
336 | struct soc_pcmcia_socket *skt = to_soc_pcmcia_socket(sock); | 336 | struct soc_pcmcia_socket *skt = to_soc_pcmcia_socket(sock); |
337 | unsigned short speed = map->speed; | 337 | unsigned short speed = map->speed; |
338 | 338 | ||
339 | debug(skt, 2, "map %u speed %u start 0x%08x stop 0x%08x\n", | 339 | debug(skt, 2, "map %u speed %u start 0x%08llx stop 0x%08llx\n", |
340 | map->map, map->speed, map->start, map->stop); | 340 | map->map, map->speed, (unsigned long long)map->start, |
341 | (unsigned long long)map->stop); | ||
341 | debug(skt, 2, "flags: %s%s%s%s%s%s%s%s\n", | 342 | debug(skt, 2, "flags: %s%s%s%s%s%s%s%s\n", |
342 | (map->flags==0)?"<NONE>":"", | 343 | (map->flags==0)?"<NONE>":"", |
343 | (map->flags&MAP_ACTIVE)?"ACTIVE ":"", | 344 | (map->flags&MAP_ACTIVE)?"ACTIVE ":"", |
diff --git a/drivers/pcmcia/socket_sysfs.c b/drivers/pcmcia/socket_sysfs.c index ff9a3bb3c88d..78d5aab542f7 100644 --- a/drivers/pcmcia/socket_sysfs.c +++ b/drivers/pcmcia/socket_sysfs.c | |||
@@ -300,7 +300,7 @@ static ssize_t pccard_show_cis(struct kobject *kobj, | |||
300 | 300 | ||
301 | if (!(s->state & SOCKET_PRESENT)) | 301 | if (!(s->state & SOCKET_PRESENT)) |
302 | return -ENODEV; | 302 | return -ENODEV; |
303 | if (pccard_validate_cis(s, BIND_FN_ALL, &chains)) | 303 | if (pccard_validate_cis(s, &chains)) |
304 | return -EIO; | 304 | return -EIO; |
305 | if (!chains) | 305 | if (!chains) |
306 | return -ENODATA; | 306 | return -ENODATA; |
diff --git a/drivers/pcmcia/tcic.c b/drivers/pcmcia/tcic.c index 582413fcb62f..6918849d511e 100644 --- a/drivers/pcmcia/tcic.c +++ b/drivers/pcmcia/tcic.c | |||
@@ -732,8 +732,8 @@ static int tcic_set_io_map(struct pcmcia_socket *sock, struct pccard_io_map *io) | |||
732 | u_short base, len, ioctl; | 732 | u_short base, len, ioctl; |
733 | 733 | ||
734 | debug(1, "SetIOMap(%d, %d, %#2.2x, %d ns, " | 734 | debug(1, "SetIOMap(%d, %d, %#2.2x, %d ns, " |
735 | "%#x-%#x)\n", psock, io->map, io->flags, | 735 | "%#llx-%#llx)\n", psock, io->map, io->flags, io->speed, |
736 | io->speed, io->start, io->stop); | 736 | (unsigned long long)io->start, (unsigned long long)io->stop); |
737 | if ((io->map > 1) || (io->start > 0xffff) || (io->stop > 0xffff) || | 737 | if ((io->map > 1) || (io->start > 0xffff) || (io->stop > 0xffff) || |
738 | (io->stop < io->start)) return -EINVAL; | 738 | (io->stop < io->start)) return -EINVAL; |
739 | tcic_setw(TCIC_ADDR+2, TCIC_ADR2_INDREG | (psock << TCIC_SS_SHFT)); | 739 | tcic_setw(TCIC_ADDR+2, TCIC_ADR2_INDREG | (psock << TCIC_SS_SHFT)); |
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c index e7108e75653d..42e8550cd2b6 100644 --- a/drivers/serial/8250_pci.c +++ b/drivers/serial/8250_pci.c | |||
@@ -1561,11 +1561,16 @@ enum pci_board_num_t { | |||
1561 | pbn_exar_XR17C152, | 1561 | pbn_exar_XR17C152, |
1562 | pbn_exar_XR17C154, | 1562 | pbn_exar_XR17C154, |
1563 | pbn_exar_XR17C158, | 1563 | pbn_exar_XR17C158, |
1564 | pbn_exar_ibm_saturn, | ||
1564 | pbn_pasemi_1682M, | 1565 | pbn_pasemi_1682M, |
1565 | pbn_ni8430_2, | 1566 | pbn_ni8430_2, |
1566 | pbn_ni8430_4, | 1567 | pbn_ni8430_4, |
1567 | pbn_ni8430_8, | 1568 | pbn_ni8430_8, |
1568 | pbn_ni8430_16, | 1569 | pbn_ni8430_16, |
1570 | pbn_ADDIDATA_PCIe_1_3906250, | ||
1571 | pbn_ADDIDATA_PCIe_2_3906250, | ||
1572 | pbn_ADDIDATA_PCIe_4_3906250, | ||
1573 | pbn_ADDIDATA_PCIe_8_3906250, | ||
1569 | }; | 1574 | }; |
1570 | 1575 | ||
1571 | /* | 1576 | /* |
@@ -2146,6 +2151,13 @@ static struct pciserial_board pci_boards[] __devinitdata = { | |||
2146 | .base_baud = 921600, | 2151 | .base_baud = 921600, |
2147 | .uart_offset = 0x200, | 2152 | .uart_offset = 0x200, |
2148 | }, | 2153 | }, |
2154 | [pbn_exar_ibm_saturn] = { | ||
2155 | .flags = FL_BASE0, | ||
2156 | .num_ports = 1, | ||
2157 | .base_baud = 921600, | ||
2158 | .uart_offset = 0x200, | ||
2159 | }, | ||
2160 | |||
2149 | /* | 2161 | /* |
2150 | * PA Semi PWRficient PA6T-1682M on-chip UART | 2162 | * PA Semi PWRficient PA6T-1682M on-chip UART |
2151 | */ | 2163 | */ |
@@ -2185,6 +2197,37 @@ static struct pciserial_board pci_boards[] __devinitdata = { | |||
2185 | .uart_offset = 0x10, | 2197 | .uart_offset = 0x10, |
2186 | .first_offset = 0x800, | 2198 | .first_offset = 0x800, |
2187 | }, | 2199 | }, |
2200 | /* | ||
2201 | * ADDI-DATA GmbH PCI-Express communication cards <info@addi-data.com> | ||
2202 | */ | ||
2203 | [pbn_ADDIDATA_PCIe_1_3906250] = { | ||
2204 | .flags = FL_BASE0, | ||
2205 | .num_ports = 1, | ||
2206 | .base_baud = 3906250, | ||
2207 | .uart_offset = 0x200, | ||
2208 | .first_offset = 0x1000, | ||
2209 | }, | ||
2210 | [pbn_ADDIDATA_PCIe_2_3906250] = { | ||
2211 | .flags = FL_BASE0, | ||
2212 | .num_ports = 2, | ||
2213 | .base_baud = 3906250, | ||
2214 | .uart_offset = 0x200, | ||
2215 | .first_offset = 0x1000, | ||
2216 | }, | ||
2217 | [pbn_ADDIDATA_PCIe_4_3906250] = { | ||
2218 | .flags = FL_BASE0, | ||
2219 | .num_ports = 4, | ||
2220 | .base_baud = 3906250, | ||
2221 | .uart_offset = 0x200, | ||
2222 | .first_offset = 0x1000, | ||
2223 | }, | ||
2224 | [pbn_ADDIDATA_PCIe_8_3906250] = { | ||
2225 | .flags = FL_BASE0, | ||
2226 | .num_ports = 8, | ||
2227 | .base_baud = 3906250, | ||
2228 | .uart_offset = 0x200, | ||
2229 | .first_offset = 0x1000, | ||
2230 | }, | ||
2188 | }; | 2231 | }; |
2189 | 2232 | ||
2190 | static const struct pci_device_id softmodem_blacklist[] = { | 2233 | static const struct pci_device_id softmodem_blacklist[] = { |
@@ -2649,6 +2692,9 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
2649 | PCI_SUBVENDOR_ID_CONNECT_TECH, | 2692 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
2650 | PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485, 0, 0, | 2693 | PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485, 0, 0, |
2651 | pbn_b0_8_1843200_200 }, | 2694 | pbn_b0_8_1843200_200 }, |
2695 | { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152, | ||
2696 | PCI_VENDOR_ID_IBM, PCI_SUBDEVICE_ID_IBM_SATURN_SERIAL_ONE_PORT, | ||
2697 | 0, 0, pbn_exar_ibm_saturn }, | ||
2652 | 2698 | ||
2653 | { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_U530, | 2699 | { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_U530, |
2654 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 2700 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
@@ -3556,6 +3602,38 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
3556 | 0, | 3602 | 0, |
3557 | pbn_b0_8_115200 }, | 3603 | pbn_b0_8_115200 }, |
3558 | 3604 | ||
3605 | { PCI_VENDOR_ID_ADDIDATA, | ||
3606 | PCI_DEVICE_ID_ADDIDATA_APCIe7500, | ||
3607 | PCI_ANY_ID, | ||
3608 | PCI_ANY_ID, | ||
3609 | 0, | ||
3610 | 0, | ||
3611 | pbn_ADDIDATA_PCIe_4_3906250 }, | ||
3612 | |||
3613 | { PCI_VENDOR_ID_ADDIDATA, | ||
3614 | PCI_DEVICE_ID_ADDIDATA_APCIe7420, | ||
3615 | PCI_ANY_ID, | ||
3616 | PCI_ANY_ID, | ||
3617 | 0, | ||
3618 | 0, | ||
3619 | pbn_ADDIDATA_PCIe_2_3906250 }, | ||
3620 | |||
3621 | { PCI_VENDOR_ID_ADDIDATA, | ||
3622 | PCI_DEVICE_ID_ADDIDATA_APCIe7300, | ||
3623 | PCI_ANY_ID, | ||
3624 | PCI_ANY_ID, | ||
3625 | 0, | ||
3626 | 0, | ||
3627 | pbn_ADDIDATA_PCIe_1_3906250 }, | ||
3628 | |||
3629 | { PCI_VENDOR_ID_ADDIDATA, | ||
3630 | PCI_DEVICE_ID_ADDIDATA_APCIe7800, | ||
3631 | PCI_ANY_ID, | ||
3632 | PCI_ANY_ID, | ||
3633 | 0, | ||
3634 | 0, | ||
3635 | pbn_ADDIDATA_PCIe_8_3906250 }, | ||
3636 | |||
3559 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835, | 3637 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835, |
3560 | PCI_VENDOR_ID_IBM, 0x0299, | 3638 | PCI_VENDOR_ID_IBM, 0x0299, |
3561 | 0, 0, pbn_b0_bt_2_115200 }, | 3639 | 0, 0, pbn_b0_bt_2_115200 }, |
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c index 3551c5cb7094..9d948bccafaf 100644 --- a/drivers/serial/atmel_serial.c +++ b/drivers/serial/atmel_serial.c | |||
@@ -1531,7 +1531,7 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev) | |||
1531 | void *data; | 1531 | void *data; |
1532 | int ret; | 1532 | int ret; |
1533 | 1533 | ||
1534 | BUILD_BUG_ON(!is_power_of_2(ATMEL_SERIAL_RINGSIZE)); | 1534 | BUILD_BUG_ON(ATMEL_SERIAL_RINGSIZE & (ATMEL_SERIAL_RINGSIZE - 1)); |
1535 | 1535 | ||
1536 | port = &atmel_ports[pdev->id]; | 1536 | port = &atmel_ports[pdev->id]; |
1537 | port->backup_imr = 0; | 1537 | port->backup_imr = 0; |
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 33351312327f..a18e3c5dd82e 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig | |||
@@ -223,6 +223,7 @@ config USB_OTG | |||
223 | config USB_GADGET_PXA25X | 223 | config USB_GADGET_PXA25X |
224 | boolean "PXA 25x or IXP 4xx" | 224 | boolean "PXA 25x or IXP 4xx" |
225 | depends on (ARCH_PXA && PXA25x) || ARCH_IXP4XX | 225 | depends on (ARCH_PXA && PXA25x) || ARCH_IXP4XX |
226 | select USB_OTG_UTILS | ||
226 | help | 227 | help |
227 | Intel's PXA 25x series XScale ARM-5TE processors include | 228 | Intel's PXA 25x series XScale ARM-5TE processors include |
228 | an integrated full speed USB 1.1 device controller. The | 229 | an integrated full speed USB 1.1 device controller. The |