diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/battery.c | 2 | ||||
-rw-r--r-- | drivers/acpi/numa.c | 4 | ||||
-rw-r--r-- | drivers/acpi/pci_bind.c | 3 | ||||
-rw-r--r-- | drivers/acpi/sbs.c | 27 | ||||
-rw-r--r-- | drivers/acpi/sbshc.c | 17 | ||||
-rw-r--r-- | drivers/acpi/sbshc.h | 6 | ||||
-rw-r--r-- | drivers/acpi/video.c | 4 | ||||
-rw-r--r-- | drivers/atm/fore200e.c | 3 | ||||
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_classes.h | 1 | ||||
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_main.c | 15 | ||||
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_qp.c | 4 | ||||
-rw-r--r-- | drivers/infiniband/hw/ehca/hcp_if.c | 27 | ||||
-rw-r--r-- | drivers/infiniband/hw/ehca/hipz_hw.h | 1 | ||||
-rw-r--r-- | drivers/misc/thinkpad_acpi.c | 4 | ||||
-rw-r--r-- | drivers/net/fs_enet/mac-scc.c | 2 | ||||
-rw-r--r-- | drivers/net/irda/irda-usb.c | 5 | ||||
-rw-r--r-- | drivers/net/irda/mcs7780.c | 2 | ||||
-rw-r--r-- | drivers/net/irda/stir4200.c | 10 | ||||
-rw-r--r-- | drivers/net/wan/syncppp.c | 35 |
19 files changed, 98 insertions, 74 deletions
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 7d6be23eff89..8f7505d304b5 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c | |||
@@ -125,7 +125,7 @@ static int acpi_battery_technology(struct acpi_battery *battery) | |||
125 | return POWER_SUPPLY_TECHNOLOGY_NiMH; | 125 | return POWER_SUPPLY_TECHNOLOGY_NiMH; |
126 | if (!strcasecmp("LION", battery->type)) | 126 | if (!strcasecmp("LION", battery->type)) |
127 | return POWER_SUPPLY_TECHNOLOGY_LION; | 127 | return POWER_SUPPLY_TECHNOLOGY_LION; |
128 | if (!strcasecmp("LI-ION", battery->type)) | 128 | if (!strncasecmp("LI-ION", battery->type, 6)) |
129 | return POWER_SUPPLY_TECHNOLOGY_LION; | 129 | return POWER_SUPPLY_TECHNOLOGY_LION; |
130 | if (!strcasecmp("LiP", battery->type)) | 130 | if (!strcasecmp("LiP", battery->type)) |
131 | return POWER_SUPPLY_TECHNOLOGY_LIPO; | 131 | return POWER_SUPPLY_TECHNOLOGY_LIPO; |
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index ab04d848b19d..0822d9fc1cb4 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c | |||
@@ -38,9 +38,9 @@ ACPI_MODULE_NAME("numa"); | |||
38 | static nodemask_t nodes_found_map = NODE_MASK_NONE; | 38 | static nodemask_t nodes_found_map = NODE_MASK_NONE; |
39 | 39 | ||
40 | /* maps to convert between proximity domain and logical node ID */ | 40 | /* maps to convert between proximity domain and logical node ID */ |
41 | static int __cpuinitdata pxm_to_node_map[MAX_PXM_DOMAINS] | 41 | static int pxm_to_node_map[MAX_PXM_DOMAINS] |
42 | = { [0 ... MAX_PXM_DOMAINS - 1] = NID_INVAL }; | 42 | = { [0 ... MAX_PXM_DOMAINS - 1] = NID_INVAL }; |
43 | static int __cpuinitdata node_to_pxm_map[MAX_NUMNODES] | 43 | static int node_to_pxm_map[MAX_NUMNODES] |
44 | = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL }; | 44 | = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL }; |
45 | 45 | ||
46 | int pxm_to_node(int pxm) | 46 | int pxm_to_node(int pxm) |
diff --git a/drivers/acpi/pci_bind.c b/drivers/acpi/pci_bind.c index 028969370bbf..388300de005d 100644 --- a/drivers/acpi/pci_bind.c +++ b/drivers/acpi/pci_bind.c | |||
@@ -294,9 +294,6 @@ int acpi_pci_unbind(struct acpi_device *device) | |||
294 | acpi_get_data(device->handle, acpi_pci_data_handler, | 294 | acpi_get_data(device->handle, acpi_pci_data_handler, |
295 | (void **)&data); | 295 | (void **)&data); |
296 | if (ACPI_FAILURE(status)) { | 296 | if (ACPI_FAILURE(status)) { |
297 | ACPI_EXCEPTION((AE_INFO, status, | ||
298 | "Unable to get data from device %s", | ||
299 | acpi_device_bid(device))); | ||
300 | result = -ENODEV; | 297 | result = -ENODEV; |
301 | goto end; | 298 | goto end; |
302 | } | 299 | } |
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index 6045cdbe176b..22cb95b349e4 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c | |||
@@ -54,12 +54,6 @@ | |||
54 | #define ACPI_BATTERY_DIR_NAME "BAT%i" | 54 | #define ACPI_BATTERY_DIR_NAME "BAT%i" |
55 | #define ACPI_AC_DIR_NAME "AC0" | 55 | #define ACPI_AC_DIR_NAME "AC0" |
56 | 56 | ||
57 | enum acpi_sbs_device_addr { | ||
58 | ACPI_SBS_CHARGER = 0x9, | ||
59 | ACPI_SBS_MANAGER = 0xa, | ||
60 | ACPI_SBS_BATTERY = 0xb, | ||
61 | }; | ||
62 | |||
63 | #define ACPI_SBS_NOTIFY_STATUS 0x80 | 57 | #define ACPI_SBS_NOTIFY_STATUS 0x80 |
64 | #define ACPI_SBS_NOTIFY_INFO 0x81 | 58 | #define ACPI_SBS_NOTIFY_INFO 0x81 |
65 | 59 | ||
@@ -539,7 +533,7 @@ static struct proc_dir_entry *acpi_battery_dir = NULL; | |||
539 | 533 | ||
540 | static inline char *acpi_battery_units(struct acpi_battery *battery) | 534 | static inline char *acpi_battery_units(struct acpi_battery *battery) |
541 | { | 535 | { |
542 | return acpi_battery_mode(battery) ? " mWh" : " mAh"; | 536 | return acpi_battery_mode(battery) ? " mW" : " mA"; |
543 | } | 537 | } |
544 | 538 | ||
545 | 539 | ||
@@ -556,10 +550,10 @@ static int acpi_battery_read_info(struct seq_file *seq, void *offset) | |||
556 | if (!battery->present) | 550 | if (!battery->present) |
557 | goto end; | 551 | goto end; |
558 | 552 | ||
559 | seq_printf(seq, "design capacity: %i%s\n", | 553 | seq_printf(seq, "design capacity: %i%sh\n", |
560 | battery->design_capacity * acpi_battery_scale(battery), | 554 | battery->design_capacity * acpi_battery_scale(battery), |
561 | acpi_battery_units(battery)); | 555 | acpi_battery_units(battery)); |
562 | seq_printf(seq, "last full capacity: %i%s\n", | 556 | seq_printf(seq, "last full capacity: %i%sh\n", |
563 | battery->full_charge_capacity * acpi_battery_scale(battery), | 557 | battery->full_charge_capacity * acpi_battery_scale(battery), |
564 | acpi_battery_units(battery)); | 558 | acpi_battery_units(battery)); |
565 | seq_printf(seq, "battery technology: rechargeable\n"); | 559 | seq_printf(seq, "battery technology: rechargeable\n"); |
@@ -590,7 +584,7 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset) | |||
590 | { | 584 | { |
591 | struct acpi_battery *battery = seq->private; | 585 | struct acpi_battery *battery = seq->private; |
592 | struct acpi_sbs *sbs = battery->sbs; | 586 | struct acpi_sbs *sbs = battery->sbs; |
593 | int result = 0; | 587 | int rate; |
594 | 588 | ||
595 | mutex_lock(&sbs->lock); | 589 | mutex_lock(&sbs->lock); |
596 | seq_printf(seq, "present: %s\n", | 590 | seq_printf(seq, "present: %s\n", |
@@ -604,9 +598,12 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset) | |||
604 | seq_printf(seq, "charging state: %s\n", | 598 | seq_printf(seq, "charging state: %s\n", |
605 | (battery->current_now < 0) ? "discharging" : | 599 | (battery->current_now < 0) ? "discharging" : |
606 | ((battery->current_now > 0) ? "charging" : "charged")); | 600 | ((battery->current_now > 0) ? "charging" : "charged")); |
607 | seq_printf(seq, "present rate: %d mA\n", | 601 | rate = abs(battery->current_now) * acpi_battery_ipscale(battery); |
608 | abs(battery->current_now) * acpi_battery_ipscale(battery)); | 602 | rate *= (acpi_battery_mode(battery))?(battery->voltage_now * |
609 | seq_printf(seq, "remaining capacity: %i%s\n", | 603 | acpi_battery_vscale(battery)/1000):1; |
604 | seq_printf(seq, "present rate: %d%s\n", rate, | ||
605 | acpi_battery_units(battery)); | ||
606 | seq_printf(seq, "remaining capacity: %i%sh\n", | ||
610 | battery->capacity_now * acpi_battery_scale(battery), | 607 | battery->capacity_now * acpi_battery_scale(battery), |
611 | acpi_battery_units(battery)); | 608 | acpi_battery_units(battery)); |
612 | seq_printf(seq, "present voltage: %i mV\n", | 609 | seq_printf(seq, "present voltage: %i mV\n", |
@@ -614,7 +611,7 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset) | |||
614 | 611 | ||
615 | end: | 612 | end: |
616 | mutex_unlock(&sbs->lock); | 613 | mutex_unlock(&sbs->lock); |
617 | return result; | 614 | return 0; |
618 | } | 615 | } |
619 | 616 | ||
620 | static int acpi_battery_state_open_fs(struct inode *inode, struct file *file) | 617 | static int acpi_battery_state_open_fs(struct inode *inode, struct file *file) |
@@ -638,7 +635,7 @@ static int acpi_battery_read_alarm(struct seq_file *seq, void *offset) | |||
638 | acpi_battery_get_alarm(battery); | 635 | acpi_battery_get_alarm(battery); |
639 | seq_printf(seq, "alarm: "); | 636 | seq_printf(seq, "alarm: "); |
640 | if (battery->alarm_capacity) | 637 | if (battery->alarm_capacity) |
641 | seq_printf(seq, "%i%s\n", | 638 | seq_printf(seq, "%i%sh\n", |
642 | battery->alarm_capacity * | 639 | battery->alarm_capacity * |
643 | acpi_battery_scale(battery), | 640 | acpi_battery_scale(battery), |
644 | acpi_battery_units(battery)); | 641 | acpi_battery_units(battery)); |
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c index 046d7c3ed356..fd40b6a1d639 100644 --- a/drivers/acpi/sbshc.c +++ b/drivers/acpi/sbshc.c | |||
@@ -202,10 +202,9 @@ int acpi_smbus_unregister_callback(struct acpi_smb_hc *hc) | |||
202 | 202 | ||
203 | EXPORT_SYMBOL_GPL(acpi_smbus_unregister_callback); | 203 | EXPORT_SYMBOL_GPL(acpi_smbus_unregister_callback); |
204 | 204 | ||
205 | static void acpi_smbus_callback(void *context) | 205 | static inline void acpi_smbus_callback(void *context) |
206 | { | 206 | { |
207 | struct acpi_smb_hc *hc = context; | 207 | struct acpi_smb_hc *hc = context; |
208 | |||
209 | if (hc->callback) | 208 | if (hc->callback) |
210 | hc->callback(hc->context); | 209 | hc->callback(hc->context); |
211 | } | 210 | } |
@@ -214,6 +213,7 @@ static int smbus_alarm(void *context) | |||
214 | { | 213 | { |
215 | struct acpi_smb_hc *hc = context; | 214 | struct acpi_smb_hc *hc = context; |
216 | union acpi_smb_status status; | 215 | union acpi_smb_status status; |
216 | u8 address; | ||
217 | if (smb_hc_read(hc, ACPI_SMB_STATUS, &status.raw)) | 217 | if (smb_hc_read(hc, ACPI_SMB_STATUS, &status.raw)) |
218 | return 0; | 218 | return 0; |
219 | /* Check if it is only a completion notify */ | 219 | /* Check if it is only a completion notify */ |
@@ -222,9 +222,18 @@ static int smbus_alarm(void *context) | |||
222 | if (!status.fields.alarm) | 222 | if (!status.fields.alarm) |
223 | return 0; | 223 | return 0; |
224 | mutex_lock(&hc->lock); | 224 | mutex_lock(&hc->lock); |
225 | smb_hc_read(hc, ACPI_SMB_ALARM_ADDRESS, &address); | ||
226 | status.fields.alarm = 0; | ||
225 | smb_hc_write(hc, ACPI_SMB_STATUS, status.raw); | 227 | smb_hc_write(hc, ACPI_SMB_STATUS, status.raw); |
226 | if (hc->callback) | 228 | /* We are only interested in events coming from known devices */ |
227 | acpi_os_execute(OSL_GPE_HANDLER, acpi_smbus_callback, hc); | 229 | switch (address >> 1) { |
230 | case ACPI_SBS_CHARGER: | ||
231 | case ACPI_SBS_MANAGER: | ||
232 | case ACPI_SBS_BATTERY: | ||
233 | acpi_os_execute(OSL_GPE_HANDLER, | ||
234 | acpi_smbus_callback, hc); | ||
235 | default:; | ||
236 | } | ||
228 | mutex_unlock(&hc->lock); | 237 | mutex_unlock(&hc->lock); |
229 | return 0; | 238 | return 0; |
230 | } | 239 | } |
diff --git a/drivers/acpi/sbshc.h b/drivers/acpi/sbshc.h index 3bda3491a97b..a57b0762dd7f 100644 --- a/drivers/acpi/sbshc.h +++ b/drivers/acpi/sbshc.h | |||
@@ -16,6 +16,12 @@ enum acpi_smb_protocol { | |||
16 | 16 | ||
17 | static const u8 SMBUS_PEC = 0x80; | 17 | static const u8 SMBUS_PEC = 0x80; |
18 | 18 | ||
19 | enum acpi_sbs_device_addr { | ||
20 | ACPI_SBS_CHARGER = 0x9, | ||
21 | ACPI_SBS_MANAGER = 0xa, | ||
22 | ACPI_SBS_BATTERY = 0xb, | ||
23 | }; | ||
24 | |||
19 | typedef void (*smbus_alarm_callback)(void *context); | 25 | typedef void (*smbus_alarm_callback)(void *context); |
20 | 26 | ||
21 | extern int acpi_smbus_read(struct acpi_smb_hc *hc, u8 protocol, u8 address, | 27 | extern int acpi_smbus_read(struct acpi_smb_hc *hc, u8 protocol, u8 address, |
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 44a0d9ba9bd6..bd77e81e81c1 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -577,7 +577,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) | |||
577 | struct acpi_video_device_brightness *br = NULL; | 577 | struct acpi_video_device_brightness *br = NULL; |
578 | 578 | ||
579 | 579 | ||
580 | memset(&device->cap, 0, 4); | 580 | memset(&device->cap, 0, sizeof(device->cap)); |
581 | 581 | ||
582 | if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_ADR", &h_dummy1))) { | 582 | if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_ADR", &h_dummy1))) { |
583 | device->cap._ADR = 1; | 583 | device->cap._ADR = 1; |
@@ -697,7 +697,7 @@ static void acpi_video_bus_find_cap(struct acpi_video_bus *video) | |||
697 | { | 697 | { |
698 | acpi_handle h_dummy1; | 698 | acpi_handle h_dummy1; |
699 | 699 | ||
700 | memset(&video->cap, 0, 4); | 700 | memset(&video->cap, 0, sizeof(video->cap)); |
701 | if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_DOS", &h_dummy1))) { | 701 | if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_DOS", &h_dummy1))) { |
702 | video->cap._DOS = 1; | 702 | video->cap._DOS = 1; |
703 | } | 703 | } |
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index 8b12925fe7a4..f97e050338f0 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c | |||
@@ -2689,7 +2689,7 @@ fore200e_init(struct fore200e* fore200e) | |||
2689 | return 0; | 2689 | return 0; |
2690 | } | 2690 | } |
2691 | 2691 | ||
2692 | 2692 | #ifdef CONFIG_ATM_FORE200E_PCA | |
2693 | static int __devinit | 2693 | static int __devinit |
2694 | fore200e_pca_detect(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) | 2694 | fore200e_pca_detect(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) |
2695 | { | 2695 | { |
@@ -2756,7 +2756,6 @@ static void __devexit fore200e_pca_remove_one(struct pci_dev *pci_dev) | |||
2756 | } | 2756 | } |
2757 | 2757 | ||
2758 | 2758 | ||
2759 | #ifdef CONFIG_ATM_FORE200E_PCA | ||
2760 | static struct pci_device_id fore200e_pca_tbl[] = { | 2759 | static struct pci_device_id fore200e_pca_tbl[] = { |
2761 | { PCI_VENDOR_ID_FORE, PCI_DEVICE_ID_FORE_PCA200E, PCI_ANY_ID, PCI_ANY_ID, | 2760 | { PCI_VENDOR_ID_FORE, PCI_DEVICE_ID_FORE_PCA200E, PCI_ANY_ID, PCI_ANY_ID, |
2762 | 0, 0, (unsigned long) &fore200e_bus[0] }, | 2761 | 0, 0, (unsigned long) &fore200e_bus[0] }, |
diff --git a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/ehca/ehca_classes.h index 87f12d4312a7..74d2b72a11d8 100644 --- a/drivers/infiniband/hw/ehca/ehca_classes.h +++ b/drivers/infiniband/hw/ehca/ehca_classes.h | |||
@@ -322,6 +322,7 @@ extern int ehca_static_rate; | |||
322 | extern int ehca_port_act_time; | 322 | extern int ehca_port_act_time; |
323 | extern int ehca_use_hp_mr; | 323 | extern int ehca_use_hp_mr; |
324 | extern int ehca_scaling_code; | 324 | extern int ehca_scaling_code; |
325 | extern int ehca_lock_hcalls; | ||
325 | 326 | ||
326 | struct ipzu_queue_resp { | 327 | struct ipzu_queue_resp { |
327 | u32 qe_size; /* queue entry size */ | 328 | u32 qe_size; /* queue entry size */ |
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c index 90d4334179bf..6a56d86a2951 100644 --- a/drivers/infiniband/hw/ehca/ehca_main.c +++ b/drivers/infiniband/hw/ehca/ehca_main.c | |||
@@ -43,13 +43,14 @@ | |||
43 | #ifdef CONFIG_PPC_64K_PAGES | 43 | #ifdef CONFIG_PPC_64K_PAGES |
44 | #include <linux/slab.h> | 44 | #include <linux/slab.h> |
45 | #endif | 45 | #endif |
46 | |||
46 | #include "ehca_classes.h" | 47 | #include "ehca_classes.h" |
47 | #include "ehca_iverbs.h" | 48 | #include "ehca_iverbs.h" |
48 | #include "ehca_mrmw.h" | 49 | #include "ehca_mrmw.h" |
49 | #include "ehca_tools.h" | 50 | #include "ehca_tools.h" |
50 | #include "hcp_if.h" | 51 | #include "hcp_if.h" |
51 | 52 | ||
52 | #define HCAD_VERSION "0024" | 53 | #define HCAD_VERSION "0025" |
53 | 54 | ||
54 | MODULE_LICENSE("Dual BSD/GPL"); | 55 | MODULE_LICENSE("Dual BSD/GPL"); |
55 | MODULE_AUTHOR("Christoph Raisch <raisch@de.ibm.com>"); | 56 | MODULE_AUTHOR("Christoph Raisch <raisch@de.ibm.com>"); |
@@ -66,6 +67,7 @@ int ehca_poll_all_eqs = 1; | |||
66 | int ehca_static_rate = -1; | 67 | int ehca_static_rate = -1; |
67 | int ehca_scaling_code = 0; | 68 | int ehca_scaling_code = 0; |
68 | int ehca_mr_largepage = 1; | 69 | int ehca_mr_largepage = 1; |
70 | int ehca_lock_hcalls = -1; | ||
69 | 71 | ||
70 | module_param_named(open_aqp1, ehca_open_aqp1, int, S_IRUGO); | 72 | module_param_named(open_aqp1, ehca_open_aqp1, int, S_IRUGO); |
71 | module_param_named(debug_level, ehca_debug_level, int, S_IRUGO); | 73 | module_param_named(debug_level, ehca_debug_level, int, S_IRUGO); |
@@ -77,6 +79,7 @@ module_param_named(poll_all_eqs, ehca_poll_all_eqs, int, S_IRUGO); | |||
77 | module_param_named(static_rate, ehca_static_rate, int, S_IRUGO); | 79 | module_param_named(static_rate, ehca_static_rate, int, S_IRUGO); |
78 | module_param_named(scaling_code, ehca_scaling_code, int, S_IRUGO); | 80 | module_param_named(scaling_code, ehca_scaling_code, int, S_IRUGO); |
79 | module_param_named(mr_largepage, ehca_mr_largepage, int, S_IRUGO); | 81 | module_param_named(mr_largepage, ehca_mr_largepage, int, S_IRUGO); |
82 | module_param_named(lock_hcalls, ehca_lock_hcalls, bool, S_IRUGO); | ||
80 | 83 | ||
81 | MODULE_PARM_DESC(open_aqp1, | 84 | MODULE_PARM_DESC(open_aqp1, |
82 | "AQP1 on startup (0: no (default), 1: yes)"); | 85 | "AQP1 on startup (0: no (default), 1: yes)"); |
@@ -102,6 +105,9 @@ MODULE_PARM_DESC(scaling_code, | |||
102 | MODULE_PARM_DESC(mr_largepage, | 105 | MODULE_PARM_DESC(mr_largepage, |
103 | "use large page for MR (0: use PAGE_SIZE (default), " | 106 | "use large page for MR (0: use PAGE_SIZE (default), " |
104 | "1: use large page depending on MR size"); | 107 | "1: use large page depending on MR size"); |
108 | MODULE_PARM_DESC(lock_hcalls, | ||
109 | "serialize all hCalls made by the driver " | ||
110 | "(default: autodetect)"); | ||
105 | 111 | ||
106 | DEFINE_RWLOCK(ehca_qp_idr_lock); | 112 | DEFINE_RWLOCK(ehca_qp_idr_lock); |
107 | DEFINE_RWLOCK(ehca_cq_idr_lock); | 113 | DEFINE_RWLOCK(ehca_cq_idr_lock); |
@@ -258,6 +264,7 @@ static struct cap_descr { | |||
258 | { HCA_CAP_UD_LL_QP, "HCA_CAP_UD_LL_QP" }, | 264 | { HCA_CAP_UD_LL_QP, "HCA_CAP_UD_LL_QP" }, |
259 | { HCA_CAP_RESIZE_MR, "HCA_CAP_RESIZE_MR" }, | 265 | { HCA_CAP_RESIZE_MR, "HCA_CAP_RESIZE_MR" }, |
260 | { HCA_CAP_MINI_QP, "HCA_CAP_MINI_QP" }, | 266 | { HCA_CAP_MINI_QP, "HCA_CAP_MINI_QP" }, |
267 | { HCA_CAP_H_ALLOC_RES_SYNC, "HCA_CAP_H_ALLOC_RES_SYNC" }, | ||
261 | }; | 268 | }; |
262 | 269 | ||
263 | static int ehca_sense_attributes(struct ehca_shca *shca) | 270 | static int ehca_sense_attributes(struct ehca_shca *shca) |
@@ -333,6 +340,12 @@ static int ehca_sense_attributes(struct ehca_shca *shca) | |||
333 | if (EHCA_BMASK_GET(hca_cap_descr[i].mask, shca->hca_cap)) | 340 | if (EHCA_BMASK_GET(hca_cap_descr[i].mask, shca->hca_cap)) |
334 | ehca_gen_dbg(" %s", hca_cap_descr[i].descr); | 341 | ehca_gen_dbg(" %s", hca_cap_descr[i].descr); |
335 | 342 | ||
343 | /* Autodetect hCall locking -- the "H_ALLOC_RESOURCE synced" flag is | ||
344 | * a firmware property, so it's valid across all adapters | ||
345 | */ | ||
346 | if (ehca_lock_hcalls == -1) | ||
347 | ehca_lock_hcalls = !(shca->hca_cap & HCA_CAP_H_ALLOC_RES_SYNC); | ||
348 | |||
336 | /* translate supported MR page sizes; always support 4K */ | 349 | /* translate supported MR page sizes; always support 4K */ |
337 | shca->hca_cap_mr_pgsize = EHCA_PAGESIZE; | 350 | shca->hca_cap_mr_pgsize = EHCA_PAGESIZE; |
338 | if (ehca_mr_largepage) { /* support extra sizes only if enabled */ | 351 | if (ehca_mr_largepage) { /* support extra sizes only if enabled */ |
diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c index dd126681fed0..eff5fb55604b 100644 --- a/drivers/infiniband/hw/ehca/ehca_qp.c +++ b/drivers/infiniband/hw/ehca/ehca_qp.c | |||
@@ -838,7 +838,7 @@ struct ib_srq *ehca_create_srq(struct ib_pd *pd, | |||
838 | 838 | ||
839 | /* copy back return values */ | 839 | /* copy back return values */ |
840 | srq_init_attr->attr.max_wr = qp_init_attr.cap.max_recv_wr; | 840 | srq_init_attr->attr.max_wr = qp_init_attr.cap.max_recv_wr; |
841 | srq_init_attr->attr.max_sge = qp_init_attr.cap.max_recv_sge; | 841 | srq_init_attr->attr.max_sge = 3; |
842 | 842 | ||
843 | /* drive SRQ into RTR state */ | 843 | /* drive SRQ into RTR state */ |
844 | mqpcb = ehca_alloc_fw_ctrlblock(GFP_KERNEL); | 844 | mqpcb = ehca_alloc_fw_ctrlblock(GFP_KERNEL); |
@@ -1750,7 +1750,7 @@ int ehca_query_srq(struct ib_srq *srq, struct ib_srq_attr *srq_attr) | |||
1750 | } | 1750 | } |
1751 | 1751 | ||
1752 | srq_attr->max_wr = qpcb->max_nr_outst_recv_wr - 1; | 1752 | srq_attr->max_wr = qpcb->max_nr_outst_recv_wr - 1; |
1753 | srq_attr->max_sge = qpcb->actual_nr_sges_in_rq_wqe; | 1753 | srq_attr->max_sge = 3; |
1754 | srq_attr->srq_limit = EHCA_BMASK_GET( | 1754 | srq_attr->srq_limit = EHCA_BMASK_GET( |
1755 | MQPCB_CURR_SRQ_LIMIT, qpcb->curr_srq_limit); | 1755 | MQPCB_CURR_SRQ_LIMIT, qpcb->curr_srq_limit); |
1756 | 1756 | ||
diff --git a/drivers/infiniband/hw/ehca/hcp_if.c b/drivers/infiniband/hw/ehca/hcp_if.c index c16a21374bb5..7029aa653751 100644 --- a/drivers/infiniband/hw/ehca/hcp_if.c +++ b/drivers/infiniband/hw/ehca/hcp_if.c | |||
@@ -120,26 +120,21 @@ static long ehca_plpar_hcall_norets(unsigned long opcode, | |||
120 | unsigned long arg7) | 120 | unsigned long arg7) |
121 | { | 121 | { |
122 | long ret; | 122 | long ret; |
123 | int i, sleep_msecs, do_lock; | 123 | int i, sleep_msecs; |
124 | unsigned long flags; | 124 | unsigned long flags = 0; |
125 | 125 | ||
126 | ehca_gen_dbg("opcode=%lx " HCALL7_REGS_FORMAT, | 126 | ehca_gen_dbg("opcode=%lx " HCALL7_REGS_FORMAT, |
127 | opcode, arg1, arg2, arg3, arg4, arg5, arg6, arg7); | 127 | opcode, arg1, arg2, arg3, arg4, arg5, arg6, arg7); |
128 | 128 | ||
129 | /* lock H_FREE_RESOURCE(MR) against itself and H_ALLOC_RESOURCE(MR) */ | ||
130 | if ((opcode == H_FREE_RESOURCE) && (arg7 == 5)) { | ||
131 | arg7 = 0; /* better not upset firmware */ | ||
132 | do_lock = 1; | ||
133 | } | ||
134 | |||
135 | for (i = 0; i < 5; i++) { | 129 | for (i = 0; i < 5; i++) { |
136 | if (do_lock) | 130 | /* serialize hCalls to work around firmware issue */ |
131 | if (ehca_lock_hcalls) | ||
137 | spin_lock_irqsave(&hcall_lock, flags); | 132 | spin_lock_irqsave(&hcall_lock, flags); |
138 | 133 | ||
139 | ret = plpar_hcall_norets(opcode, arg1, arg2, arg3, arg4, | 134 | ret = plpar_hcall_norets(opcode, arg1, arg2, arg3, arg4, |
140 | arg5, arg6, arg7); | 135 | arg5, arg6, arg7); |
141 | 136 | ||
142 | if (do_lock) | 137 | if (ehca_lock_hcalls) |
143 | spin_unlock_irqrestore(&hcall_lock, flags); | 138 | spin_unlock_irqrestore(&hcall_lock, flags); |
144 | 139 | ||
145 | if (H_IS_LONG_BUSY(ret)) { | 140 | if (H_IS_LONG_BUSY(ret)) { |
@@ -174,24 +169,22 @@ static long ehca_plpar_hcall9(unsigned long opcode, | |||
174 | unsigned long arg9) | 169 | unsigned long arg9) |
175 | { | 170 | { |
176 | long ret; | 171 | long ret; |
177 | int i, sleep_msecs, do_lock; | 172 | int i, sleep_msecs; |
178 | unsigned long flags = 0; | 173 | unsigned long flags = 0; |
179 | 174 | ||
180 | ehca_gen_dbg("INPUT -- opcode=%lx " HCALL9_REGS_FORMAT, opcode, | 175 | ehca_gen_dbg("INPUT -- opcode=%lx " HCALL9_REGS_FORMAT, opcode, |
181 | arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); | 176 | arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); |
182 | 177 | ||
183 | /* lock H_ALLOC_RESOURCE(MR) against itself and H_FREE_RESOURCE(MR) */ | ||
184 | do_lock = ((opcode == H_ALLOC_RESOURCE) && (arg2 == 5)); | ||
185 | |||
186 | for (i = 0; i < 5; i++) { | 178 | for (i = 0; i < 5; i++) { |
187 | if (do_lock) | 179 | /* serialize hCalls to work around firmware issue */ |
180 | if (ehca_lock_hcalls) | ||
188 | spin_lock_irqsave(&hcall_lock, flags); | 181 | spin_lock_irqsave(&hcall_lock, flags); |
189 | 182 | ||
190 | ret = plpar_hcall9(opcode, outs, | 183 | ret = plpar_hcall9(opcode, outs, |
191 | arg1, arg2, arg3, arg4, arg5, | 184 | arg1, arg2, arg3, arg4, arg5, |
192 | arg6, arg7, arg8, arg9); | 185 | arg6, arg7, arg8, arg9); |
193 | 186 | ||
194 | if (do_lock) | 187 | if (ehca_lock_hcalls) |
195 | spin_unlock_irqrestore(&hcall_lock, flags); | 188 | spin_unlock_irqrestore(&hcall_lock, flags); |
196 | 189 | ||
197 | if (H_IS_LONG_BUSY(ret)) { | 190 | if (H_IS_LONG_BUSY(ret)) { |
@@ -821,7 +814,7 @@ u64 hipz_h_free_resource_mr(const struct ipz_adapter_handle adapter_handle, | |||
821 | return ehca_plpar_hcall_norets(H_FREE_RESOURCE, | 814 | return ehca_plpar_hcall_norets(H_FREE_RESOURCE, |
822 | adapter_handle.handle, /* r4 */ | 815 | adapter_handle.handle, /* r4 */ |
823 | mr->ipz_mr_handle.handle, /* r5 */ | 816 | mr->ipz_mr_handle.handle, /* r5 */ |
824 | 0, 0, 0, 0, 5); | 817 | 0, 0, 0, 0, 0); |
825 | } | 818 | } |
826 | 819 | ||
827 | u64 hipz_h_reregister_pmr(const struct ipz_adapter_handle adapter_handle, | 820 | u64 hipz_h_reregister_pmr(const struct ipz_adapter_handle adapter_handle, |
diff --git a/drivers/infiniband/hw/ehca/hipz_hw.h b/drivers/infiniband/hw/ehca/hipz_hw.h index 485b8400359e..bf996c7acc42 100644 --- a/drivers/infiniband/hw/ehca/hipz_hw.h +++ b/drivers/infiniband/hw/ehca/hipz_hw.h | |||
@@ -378,6 +378,7 @@ struct hipz_query_hca { | |||
378 | #define HCA_CAP_UD_LL_QP EHCA_BMASK_IBM(16, 16) | 378 | #define HCA_CAP_UD_LL_QP EHCA_BMASK_IBM(16, 16) |
379 | #define HCA_CAP_RESIZE_MR EHCA_BMASK_IBM(17, 17) | 379 | #define HCA_CAP_RESIZE_MR EHCA_BMASK_IBM(17, 17) |
380 | #define HCA_CAP_MINI_QP EHCA_BMASK_IBM(18, 18) | 380 | #define HCA_CAP_MINI_QP EHCA_BMASK_IBM(18, 18) |
381 | #define HCA_CAP_H_ALLOC_RES_SYNC EHCA_BMASK_IBM(19, 19) | ||
381 | 382 | ||
382 | /* query port response block */ | 383 | /* query port response block */ |
383 | struct hipz_query_port { | 384 | struct hipz_query_port { |
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index ab23a3221585..cf56647a6ca4 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
@@ -987,9 +987,9 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) | |||
987 | KEY_UNKNOWN, /* 0x0C: FN+BACKSPACE */ | 987 | KEY_UNKNOWN, /* 0x0C: FN+BACKSPACE */ |
988 | KEY_UNKNOWN, /* 0x0D: FN+INSERT */ | 988 | KEY_UNKNOWN, /* 0x0D: FN+INSERT */ |
989 | KEY_UNKNOWN, /* 0x0E: FN+DELETE */ | 989 | KEY_UNKNOWN, /* 0x0E: FN+DELETE */ |
990 | KEY_BRIGHTNESSUP, /* 0x0F: FN+HOME (brightness up) */ | 990 | KEY_RESERVED, /* 0x0F: FN+HOME (brightness up) */ |
991 | /* Scan codes 0x10 to 0x1F: Extended ACPI HKEY hot keys */ | 991 | /* Scan codes 0x10 to 0x1F: Extended ACPI HKEY hot keys */ |
992 | KEY_BRIGHTNESSDOWN, /* 0x10: FN+END (brightness down) */ | 992 | KEY_RESERVED, /* 0x10: FN+END (brightness down) */ |
993 | KEY_RESERVED, /* 0x11: FN+PGUP (thinklight toggle) */ | 993 | KEY_RESERVED, /* 0x11: FN+PGUP (thinklight toggle) */ |
994 | KEY_UNKNOWN, /* 0x12: FN+PGDOWN */ | 994 | KEY_UNKNOWN, /* 0x12: FN+PGDOWN */ |
995 | KEY_ZOOM, /* 0x13: FN+SPACE (zoom) */ | 995 | KEY_ZOOM, /* 0x13: FN+SPACE (zoom) */ |
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c index 03134f47a4eb..48f2f3005935 100644 --- a/drivers/net/fs_enet/mac-scc.c +++ b/drivers/net/fs_enet/mac-scc.c | |||
@@ -158,7 +158,7 @@ static int setup_data(struct net_device *dev) | |||
158 | { | 158 | { |
159 | struct fs_enet_private *fep = netdev_priv(dev); | 159 | struct fs_enet_private *fep = netdev_priv(dev); |
160 | 160 | ||
161 | #ifdef CONFIG_PPC_CPM_NEW_BINDING | 161 | #ifndef CONFIG_PPC_CPM_NEW_BINDING |
162 | struct fs_platform_info *fpi = fep->fpi; | 162 | struct fs_platform_info *fpi = fep->fpi; |
163 | 163 | ||
164 | fep->scc.idx = fs_get_scc_index(fpi->fs_no); | 164 | fep->scc.idx = fs_get_scc_index(fpi->fs_no); |
diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c index c6355c00fd7a..9081234ab458 100644 --- a/drivers/net/irda/irda-usb.c +++ b/drivers/net/irda/irda-usb.c | |||
@@ -1168,6 +1168,7 @@ static int stir421x_patch_device(struct irda_usb_cb *self) | |||
1168 | static int irda_usb_net_open(struct net_device *netdev) | 1168 | static int irda_usb_net_open(struct net_device *netdev) |
1169 | { | 1169 | { |
1170 | struct irda_usb_cb *self; | 1170 | struct irda_usb_cb *self; |
1171 | unsigned long flags; | ||
1171 | char hwname[16]; | 1172 | char hwname[16]; |
1172 | int i; | 1173 | int i; |
1173 | 1174 | ||
@@ -1177,13 +1178,16 @@ static int irda_usb_net_open(struct net_device *netdev) | |||
1177 | self = (struct irda_usb_cb *) netdev->priv; | 1178 | self = (struct irda_usb_cb *) netdev->priv; |
1178 | IRDA_ASSERT(self != NULL, return -1;); | 1179 | IRDA_ASSERT(self != NULL, return -1;); |
1179 | 1180 | ||
1181 | spin_lock_irqsave(&self->lock, flags); | ||
1180 | /* Can only open the device if it's there */ | 1182 | /* Can only open the device if it's there */ |
1181 | if(!self->present) { | 1183 | if(!self->present) { |
1184 | spin_unlock_irqrestore(&self->lock, flags); | ||
1182 | IRDA_WARNING("%s(), device not present!\n", __FUNCTION__); | 1185 | IRDA_WARNING("%s(), device not present!\n", __FUNCTION__); |
1183 | return -1; | 1186 | return -1; |
1184 | } | 1187 | } |
1185 | 1188 | ||
1186 | if(self->needspatch) { | 1189 | if(self->needspatch) { |
1190 | spin_unlock_irqrestore(&self->lock, flags); | ||
1187 | IRDA_WARNING("%s(), device needs patch\n", __FUNCTION__) ; | 1191 | IRDA_WARNING("%s(), device needs patch\n", __FUNCTION__) ; |
1188 | return -EIO ; | 1192 | return -EIO ; |
1189 | } | 1193 | } |
@@ -1198,6 +1202,7 @@ static int irda_usb_net_open(struct net_device *netdev) | |||
1198 | /* To do *before* submitting Rx urbs and starting net Tx queue | 1202 | /* To do *before* submitting Rx urbs and starting net Tx queue |
1199 | * Jean II */ | 1203 | * Jean II */ |
1200 | self->netopen = 1; | 1204 | self->netopen = 1; |
1205 | spin_unlock_irqrestore(&self->lock, flags); | ||
1201 | 1206 | ||
1202 | /* | 1207 | /* |
1203 | * Now that everything should be initialized properly, | 1208 | * Now that everything should be initialized properly, |
diff --git a/drivers/net/irda/mcs7780.c b/drivers/net/irda/mcs7780.c index 0b769192d4ce..93916cf33f29 100644 --- a/drivers/net/irda/mcs7780.c +++ b/drivers/net/irda/mcs7780.c | |||
@@ -677,6 +677,8 @@ static int mcs_net_close(struct net_device *netdev) | |||
677 | /* Stop transmit processing */ | 677 | /* Stop transmit processing */ |
678 | netif_stop_queue(netdev); | 678 | netif_stop_queue(netdev); |
679 | 679 | ||
680 | kfree_skb(mcs->rx_buff.skb); | ||
681 | |||
680 | /* kill and free the receive and transmit URBs */ | 682 | /* kill and free the receive and transmit URBs */ |
681 | usb_kill_urb(mcs->rx_urb); | 683 | usb_kill_urb(mcs->rx_urb); |
682 | usb_free_urb(mcs->rx_urb); | 684 | usb_free_urb(mcs->rx_urb); |
diff --git a/drivers/net/irda/stir4200.c b/drivers/net/irda/stir4200.c index 042bc2f0417d..e59c485bc497 100644 --- a/drivers/net/irda/stir4200.c +++ b/drivers/net/irda/stir4200.c | |||
@@ -142,9 +142,6 @@ enum StirCtrl2Mask { | |||
142 | }; | 142 | }; |
143 | 143 | ||
144 | enum StirFifoCtlMask { | 144 | enum StirFifoCtlMask { |
145 | FIFOCTL_EOF = 0x80, | ||
146 | FIFOCTL_UNDER = 0x40, | ||
147 | FIFOCTL_OVER = 0x20, | ||
148 | FIFOCTL_DIR = 0x10, | 145 | FIFOCTL_DIR = 0x10, |
149 | FIFOCTL_CLR = 0x08, | 146 | FIFOCTL_CLR = 0x08, |
150 | FIFOCTL_EMPTY = 0x04, | 147 | FIFOCTL_EMPTY = 0x04, |
@@ -594,9 +591,10 @@ static int fifo_txwait(struct stir_cb *stir, int space) | |||
594 | { | 591 | { |
595 | int err; | 592 | int err; |
596 | unsigned long count, status; | 593 | unsigned long count, status; |
594 | unsigned long prev_count = 0x1fff; | ||
597 | 595 | ||
598 | /* Read FIFO status and count */ | 596 | /* Read FIFO status and count */ |
599 | for(;;) { | 597 | for (;; prev_count = count) { |
600 | err = read_reg(stir, REG_FIFOCTL, stir->fifo_status, | 598 | err = read_reg(stir, REG_FIFOCTL, stir->fifo_status, |
601 | FIFO_REGS_SIZE); | 599 | FIFO_REGS_SIZE); |
602 | if (unlikely(err != FIFO_REGS_SIZE)) { | 600 | if (unlikely(err != FIFO_REGS_SIZE)) { |
@@ -629,6 +627,10 @@ static int fifo_txwait(struct stir_cb *stir, int space) | |||
629 | if (space >= 0 && STIR_FIFO_SIZE - 4 > space + count) | 627 | if (space >= 0 && STIR_FIFO_SIZE - 4 > space + count) |
630 | return 0; | 628 | return 0; |
631 | 629 | ||
630 | /* queue confused */ | ||
631 | if (prev_count < count) | ||
632 | break; | ||
633 | |||
632 | /* estimate transfer time for remaining chars */ | 634 | /* estimate transfer time for remaining chars */ |
633 | msleep((count * 8000) / stir->speed); | 635 | msleep((count * 8000) / stir->speed); |
634 | } | 636 | } |
diff --git a/drivers/net/wan/syncppp.c b/drivers/net/wan/syncppp.c index 232ecba5340f..61e24b7a45a3 100644 --- a/drivers/net/wan/syncppp.c +++ b/drivers/net/wan/syncppp.c | |||
@@ -107,24 +107,24 @@ | |||
107 | struct ppp_header { | 107 | struct ppp_header { |
108 | u8 address; | 108 | u8 address; |
109 | u8 control; | 109 | u8 control; |
110 | u16 protocol; | 110 | __be16 protocol; |
111 | }; | 111 | }; |
112 | #define PPP_HEADER_LEN sizeof (struct ppp_header) | 112 | #define PPP_HEADER_LEN sizeof (struct ppp_header) |
113 | 113 | ||
114 | struct lcp_header { | 114 | struct lcp_header { |
115 | u8 type; | 115 | u8 type; |
116 | u8 ident; | 116 | u8 ident; |
117 | u16 len; | 117 | __be16 len; |
118 | }; | 118 | }; |
119 | #define LCP_HEADER_LEN sizeof (struct lcp_header) | 119 | #define LCP_HEADER_LEN sizeof (struct lcp_header) |
120 | 120 | ||
121 | struct cisco_packet { | 121 | struct cisco_packet { |
122 | u32 type; | 122 | __be32 type; |
123 | u32 par1; | 123 | __be32 par1; |
124 | u32 par2; | 124 | __be32 par2; |
125 | u16 rel; | 125 | __be16 rel; |
126 | u16 time0; | 126 | __be16 time0; |
127 | u16 time1; | 127 | __be16 time1; |
128 | }; | 128 | }; |
129 | #define CISCO_PACKET_LEN 18 | 129 | #define CISCO_PACKET_LEN 18 |
130 | #define CISCO_BIG_PACKET_LEN 20 | 130 | #define CISCO_BIG_PACKET_LEN 20 |
@@ -139,7 +139,7 @@ static struct sk_buff_head tx_queue; | |||
139 | static void sppp_keepalive (unsigned long dummy); | 139 | static void sppp_keepalive (unsigned long dummy); |
140 | static void sppp_cp_send (struct sppp *sp, u16 proto, u8 type, | 140 | static void sppp_cp_send (struct sppp *sp, u16 proto, u8 type, |
141 | u8 ident, u16 len, void *data); | 141 | u8 ident, u16 len, void *data); |
142 | static void sppp_cisco_send (struct sppp *sp, int type, long par1, long par2); | 142 | static void sppp_cisco_send (struct sppp *sp, int type, u32 par1, u32 par2); |
143 | static void sppp_lcp_input (struct sppp *sp, struct sk_buff *m); | 143 | static void sppp_lcp_input (struct sppp *sp, struct sk_buff *m); |
144 | static void sppp_cisco_input (struct sppp *sp, struct sk_buff *m); | 144 | static void sppp_cisco_input (struct sppp *sp, struct sk_buff *m); |
145 | static void sppp_ipcp_input (struct sppp *sp, struct sk_buff *m); | 145 | static void sppp_ipcp_input (struct sppp *sp, struct sk_buff *m); |
@@ -447,7 +447,7 @@ static void sppp_keepalive (unsigned long dummy) | |||
447 | sppp_cisco_send (sp, CISCO_KEEPALIVE_REQ, ++sp->pp_seq, | 447 | sppp_cisco_send (sp, CISCO_KEEPALIVE_REQ, ++sp->pp_seq, |
448 | sp->pp_rseq); | 448 | sp->pp_rseq); |
449 | else if (sp->lcp.state == LCP_STATE_OPENED) { | 449 | else if (sp->lcp.state == LCP_STATE_OPENED) { |
450 | long nmagic = htonl (sp->lcp.magic); | 450 | __be32 nmagic = htonl (sp->lcp.magic); |
451 | sp->lcp.echoid = ++sp->pp_seq; | 451 | sp->lcp.echoid = ++sp->pp_seq; |
452 | sppp_cp_send (sp, PPP_LCP, LCP_ECHO_REQ, | 452 | sppp_cp_send (sp, PPP_LCP, LCP_ECHO_REQ, |
453 | sp->lcp.echoid, 4, &nmagic); | 453 | sp->lcp.echoid, 4, &nmagic); |
@@ -667,7 +667,7 @@ badreq: | |||
667 | dev->name, len); | 667 | dev->name, len); |
668 | break; | 668 | break; |
669 | } | 669 | } |
670 | if (ntohl (*(long*)(h+1)) == sp->lcp.magic) { | 670 | if (ntohl (*(__be32*)(h+1)) == sp->lcp.magic) { |
671 | /* Line loopback mode detected. */ | 671 | /* Line loopback mode detected. */ |
672 | printk (KERN_WARNING "%s: loopback\n", dev->name); | 672 | printk (KERN_WARNING "%s: loopback\n", dev->name); |
673 | if_down (dev); | 673 | if_down (dev); |
@@ -680,7 +680,7 @@ badreq: | |||
680 | sppp_lcp_open (sp); | 680 | sppp_lcp_open (sp); |
681 | break; | 681 | break; |
682 | } | 682 | } |
683 | *(long*)(h+1) = htonl (sp->lcp.magic); | 683 | *(__be32 *)(h+1) = htonl (sp->lcp.magic); |
684 | sppp_cp_send (sp, PPP_LCP, LCP_ECHO_REPLY, h->ident, len-4, h+1); | 684 | sppp_cp_send (sp, PPP_LCP, LCP_ECHO_REPLY, h->ident, len-4, h+1); |
685 | break; | 685 | break; |
686 | case LCP_ECHO_REPLY: | 686 | case LCP_ECHO_REPLY: |
@@ -692,7 +692,7 @@ badreq: | |||
692 | dev->name, len); | 692 | dev->name, len); |
693 | break; | 693 | break; |
694 | } | 694 | } |
695 | if (ntohl (*(long*)(h+1)) != sp->lcp.magic) | 695 | if (ntohl(*(__be32 *)(h+1)) != sp->lcp.magic) |
696 | sp->pp_alivecnt = 0; | 696 | sp->pp_alivecnt = 0; |
697 | break; | 697 | break; |
698 | } | 698 | } |
@@ -765,7 +765,7 @@ static void sppp_cisco_input (struct sppp *sp, struct sk_buff *skb) | |||
765 | { | 765 | { |
766 | struct in_device *in_dev; | 766 | struct in_device *in_dev; |
767 | struct in_ifaddr *ifa; | 767 | struct in_ifaddr *ifa; |
768 | __be32 addr = 0, mask = ~0; /* FIXME: is the mask correct? */ | 768 | __be32 addr = 0, mask = htonl(~0U); /* FIXME: is the mask correct? */ |
769 | #ifdef CONFIG_INET | 769 | #ifdef CONFIG_INET |
770 | rcu_read_lock(); | 770 | rcu_read_lock(); |
771 | if ((in_dev = __in_dev_get_rcu(dev)) != NULL) | 771 | if ((in_dev = __in_dev_get_rcu(dev)) != NULL) |
@@ -782,8 +782,7 @@ static void sppp_cisco_input (struct sppp *sp, struct sk_buff *skb) | |||
782 | } | 782 | } |
783 | rcu_read_unlock(); | 783 | rcu_read_unlock(); |
784 | #endif | 784 | #endif |
785 | /* I hope both addr and mask are in the net order */ | 785 | sppp_cisco_send (sp, CISCO_ADDR_REPLY, ntohl(addr), ntohl(mask)); |
786 | sppp_cisco_send (sp, CISCO_ADDR_REPLY, addr, mask); | ||
787 | break; | 786 | break; |
788 | } | 787 | } |
789 | } | 788 | } |
@@ -844,7 +843,7 @@ static void sppp_cp_send (struct sppp *sp, u16 proto, u8 type, | |||
844 | * Send Cisco keepalive packet. | 843 | * Send Cisco keepalive packet. |
845 | */ | 844 | */ |
846 | 845 | ||
847 | static void sppp_cisco_send (struct sppp *sp, int type, long par1, long par2) | 846 | static void sppp_cisco_send (struct sppp *sp, int type, u32 par1, u32 par2) |
848 | { | 847 | { |
849 | struct ppp_header *h; | 848 | struct ppp_header *h; |
850 | struct cisco_packet *ch; | 849 | struct cisco_packet *ch; |
@@ -868,7 +867,7 @@ static void sppp_cisco_send (struct sppp *sp, int type, long par1, long par2) | |||
868 | ch->type = htonl (type); | 867 | ch->type = htonl (type); |
869 | ch->par1 = htonl (par1); | 868 | ch->par1 = htonl (par1); |
870 | ch->par2 = htonl (par2); | 869 | ch->par2 = htonl (par2); |
871 | ch->rel = -1; | 870 | ch->rel = htons(0xffff); |
872 | ch->time0 = htons ((u16) (t >> 16)); | 871 | ch->time0 = htons ((u16) (t >> 16)); |
873 | ch->time1 = htons ((u16) t); | 872 | ch->time1 = htons ((u16) t); |
874 | 873 | ||