diff options
Diffstat (limited to 'drivers')
41 files changed, 303 insertions, 194 deletions
diff --git a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c index 662209d3f42d..2a769cc6f5f9 100644 --- a/drivers/base/power/suspend.c +++ b/drivers/base/power/suspend.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/vt_kern.h> | ||
12 | #include <linux/device.h> | 11 | #include <linux/device.h> |
13 | #include <linux/kallsyms.h> | 12 | #include <linux/kallsyms.h> |
14 | #include <linux/pm.h> | 13 | #include <linux/pm.h> |
@@ -66,6 +65,7 @@ int suspend_device(struct device * dev, pm_message_t state) | |||
66 | return error; | 65 | return error; |
67 | } | 66 | } |
68 | 67 | ||
68 | |||
69 | /** | 69 | /** |
70 | * device_suspend - Save state and stop all devices in system. | 70 | * device_suspend - Save state and stop all devices in system. |
71 | * @state: Power state to put each device in. | 71 | * @state: Power state to put each device in. |
@@ -85,9 +85,6 @@ int device_suspend(pm_message_t state) | |||
85 | { | 85 | { |
86 | int error = 0; | 86 | int error = 0; |
87 | 87 | ||
88 | if (!is_console_suspend_safe()) | ||
89 | return -EINVAL; | ||
90 | |||
91 | down(&dpm_sem); | 88 | down(&dpm_sem); |
92 | down(&dpm_list_sem); | 89 | down(&dpm_list_sem); |
93 | while (!list_empty(&dpm_active) && error == 0) { | 90 | while (!list_empty(&dpm_active) && error == 0) { |
diff --git a/drivers/char/agp/Kconfig b/drivers/char/agp/Kconfig index 0b9cf9c59a21..7c88c060a9e6 100644 --- a/drivers/char/agp/Kconfig +++ b/drivers/char/agp/Kconfig | |||
@@ -86,7 +86,7 @@ config AGP_NVIDIA | |||
86 | 86 | ||
87 | config AGP_SIS | 87 | config AGP_SIS |
88 | tristate "SiS chipset support" | 88 | tristate "SiS chipset support" |
89 | depends on AGP && X86_32 | 89 | depends on AGP |
90 | help | 90 | help |
91 | This option gives you AGP support for the GLX component of | 91 | This option gives you AGP support for the GLX component of |
92 | X on Silicon Integrated Systems [SiS] chipsets. | 92 | X on Silicon Integrated Systems [SiS] chipsets. |
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 36517d4d1ad9..ac3c33a2e37d 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c | |||
@@ -617,6 +617,9 @@ static int agp_amd64_resume(struct pci_dev *pdev) | |||
617 | pci_set_power_state(pdev, PCI_D0); | 617 | pci_set_power_state(pdev, PCI_D0); |
618 | pci_restore_state(pdev); | 618 | pci_restore_state(pdev); |
619 | 619 | ||
620 | if (pdev->vendor == PCI_VENDOR_ID_NVIDIA) | ||
621 | nforce3_agp_init(pdev); | ||
622 | |||
620 | return amd_8151_configure(); | 623 | return amd_8151_configure(); |
621 | } | 624 | } |
622 | 625 | ||
diff --git a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c index 97b0a890ba7f..b8ec25d17478 100644 --- a/drivers/char/agp/via-agp.c +++ b/drivers/char/agp/via-agp.c | |||
@@ -345,6 +345,12 @@ static struct agp_device_ids via_agp_device_ids[] __devinitdata = | |||
345 | .chipset_name = "PT880", | 345 | .chipset_name = "PT880", |
346 | }, | 346 | }, |
347 | 347 | ||
348 | /* PT880 Ultra */ | ||
349 | { | ||
350 | .device_id = PCI_DEVICE_ID_VIA_PT880ULTRA, | ||
351 | .chipset_name = "PT880 Ultra", | ||
352 | }, | ||
353 | |||
348 | /* PT890 */ | 354 | /* PT890 */ |
349 | { | 355 | { |
350 | .device_id = PCI_DEVICE_ID_VIA_8783_0, | 356 | .device_id = PCI_DEVICE_ID_VIA_8783_0, |
@@ -511,6 +517,7 @@ static struct pci_device_id agp_via_pci_table[] = { | |||
511 | ID(PCI_DEVICE_ID_VIA_8763_0), | 517 | ID(PCI_DEVICE_ID_VIA_8763_0), |
512 | ID(PCI_DEVICE_ID_VIA_8378_0), | 518 | ID(PCI_DEVICE_ID_VIA_8378_0), |
513 | ID(PCI_DEVICE_ID_VIA_PT880), | 519 | ID(PCI_DEVICE_ID_VIA_PT880), |
520 | ID(PCI_DEVICE_ID_VIA_PT880ULTRA), | ||
514 | ID(PCI_DEVICE_ID_VIA_8783_0), | 521 | ID(PCI_DEVICE_ID_VIA_8783_0), |
515 | ID(PCI_DEVICE_ID_VIA_PX8X0_0), | 522 | ID(PCI_DEVICE_ID_VIA_PX8X0_0), |
516 | ID(PCI_DEVICE_ID_VIA_3269_0), | 523 | ID(PCI_DEVICE_ID_VIA_3269_0), |
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index b36eef0e9d19..02a7dd7a8a55 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -1184,20 +1184,20 @@ static void port_outl(struct si_sm_io *io, unsigned int offset, | |||
1184 | static void port_cleanup(struct smi_info *info) | 1184 | static void port_cleanup(struct smi_info *info) |
1185 | { | 1185 | { |
1186 | unsigned int addr = info->io.addr_data; | 1186 | unsigned int addr = info->io.addr_data; |
1187 | int mapsize; | 1187 | int idx; |
1188 | 1188 | ||
1189 | if (addr) { | 1189 | if (addr) { |
1190 | mapsize = ((info->io_size * info->io.regspacing) | 1190 | for (idx = 0; idx < info->io_size; idx++) { |
1191 | - (info->io.regspacing - info->io.regsize)); | 1191 | release_region(addr + idx * info->io.regspacing, |
1192 | 1192 | info->io.regsize); | |
1193 | release_region (addr, mapsize); | 1193 | } |
1194 | } | 1194 | } |
1195 | } | 1195 | } |
1196 | 1196 | ||
1197 | static int port_setup(struct smi_info *info) | 1197 | static int port_setup(struct smi_info *info) |
1198 | { | 1198 | { |
1199 | unsigned int addr = info->io.addr_data; | 1199 | unsigned int addr = info->io.addr_data; |
1200 | int mapsize; | 1200 | int idx; |
1201 | 1201 | ||
1202 | if (!addr) | 1202 | if (!addr) |
1203 | return -ENODEV; | 1203 | return -ENODEV; |
@@ -1225,16 +1225,22 @@ static int port_setup(struct smi_info *info) | |||
1225 | return -EINVAL; | 1225 | return -EINVAL; |
1226 | } | 1226 | } |
1227 | 1227 | ||
1228 | /* Calculate the total amount of memory to claim. This is an | 1228 | /* Some BIOSes reserve disjoint I/O regions in their ACPI |
1229 | * unusual looking calculation, but it avoids claiming any | 1229 | * tables. This causes problems when trying to register the |
1230 | * more memory than it has to. It will claim everything | 1230 | * entire I/O region. Therefore we must register each I/O |
1231 | * between the first address to the end of the last full | 1231 | * port separately. |
1232 | * register. */ | 1232 | */ |
1233 | mapsize = ((info->io_size * info->io.regspacing) | 1233 | for (idx = 0; idx < info->io_size; idx++) { |
1234 | - (info->io.regspacing - info->io.regsize)); | 1234 | if (request_region(addr + idx * info->io.regspacing, |
1235 | 1235 | info->io.regsize, DEVICE_NAME) == NULL) { | |
1236 | if (request_region(addr, mapsize, DEVICE_NAME) == NULL) | 1236 | /* Undo allocations */ |
1237 | return -EIO; | 1237 | while (idx--) { |
1238 | release_region(addr + idx * info->io.regspacing, | ||
1239 | info->io.regsize); | ||
1240 | } | ||
1241 | return -EIO; | ||
1242 | } | ||
1243 | } | ||
1238 | return 0; | 1244 | return 0; |
1239 | } | 1245 | } |
1240 | 1246 | ||
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index 128b2632512d..eab5394da666 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c | |||
@@ -149,7 +149,7 @@ struct cm4000_dev { | |||
149 | #define ZERO_DEV(dev) \ | 149 | #define ZERO_DEV(dev) \ |
150 | memset(&dev->atr_csum,0, \ | 150 | memset(&dev->atr_csum,0, \ |
151 | sizeof(struct cm4000_dev) - \ | 151 | sizeof(struct cm4000_dev) - \ |
152 | /*link*/ sizeof(struct pcmcia_device) - \ | 152 | /*link*/ sizeof(struct pcmcia_device *) - \ |
153 | /*node*/ sizeof(dev_node_t) - \ | 153 | /*node*/ sizeof(dev_node_t) - \ |
154 | /*atr*/ MAX_ATR*sizeof(char) - \ | 154 | /*atr*/ MAX_ATR*sizeof(char) - \ |
155 | /*rbuf*/ 512*sizeof(char) - \ | 155 | /*rbuf*/ 512*sizeof(char) - \ |
diff --git a/drivers/char/tpm/tpm_bios.c b/drivers/char/tpm/tpm_bios.c index e45f0d3d12de..a611972024e6 100644 --- a/drivers/char/tpm/tpm_bios.c +++ b/drivers/char/tpm/tpm_bios.c | |||
@@ -105,6 +105,12 @@ static const char* tcpa_event_type_strings[] = { | |||
105 | "Non-Host Info" | 105 | "Non-Host Info" |
106 | }; | 106 | }; |
107 | 107 | ||
108 | struct tcpa_pc_event { | ||
109 | u32 event_id; | ||
110 | u32 event_size; | ||
111 | u8 event_data[0]; | ||
112 | }; | ||
113 | |||
108 | enum tcpa_pc_event_ids { | 114 | enum tcpa_pc_event_ids { |
109 | SMBIOS = 1, | 115 | SMBIOS = 1, |
110 | BIS_CERT, | 116 | BIS_CERT, |
@@ -114,14 +120,15 @@ enum tcpa_pc_event_ids { | |||
114 | NVRAM, | 120 | NVRAM, |
115 | OPTION_ROM_EXEC, | 121 | OPTION_ROM_EXEC, |
116 | OPTION_ROM_CONFIG, | 122 | OPTION_ROM_CONFIG, |
117 | OPTION_ROM_MICROCODE, | 123 | OPTION_ROM_MICROCODE = 10, |
118 | S_CRTM_VERSION, | 124 | S_CRTM_VERSION, |
119 | S_CRTM_CONTENTS, | 125 | S_CRTM_CONTENTS, |
120 | POST_CONTENTS, | 126 | POST_CONTENTS, |
127 | HOST_TABLE_OF_DEVICES, | ||
121 | }; | 128 | }; |
122 | 129 | ||
123 | static const char* tcpa_pc_event_id_strings[] = { | 130 | static const char* tcpa_pc_event_id_strings[] = { |
124 | "" | 131 | "", |
125 | "SMBIOS", | 132 | "SMBIOS", |
126 | "BIS Certificate", | 133 | "BIS Certificate", |
127 | "POST BIOS ", | 134 | "POST BIOS ", |
@@ -130,11 +137,12 @@ static const char* tcpa_pc_event_id_strings[] = { | |||
130 | "NVRAM", | 137 | "NVRAM", |
131 | "Option ROM", | 138 | "Option ROM", |
132 | "Option ROM config", | 139 | "Option ROM config", |
133 | "Option ROM microcode", | 140 | "", |
141 | "Option ROM microcode ", | ||
134 | "S-CRTM Version", | 142 | "S-CRTM Version", |
135 | "S-CRTM Contents", | 143 | "S-CRTM Contents ", |
136 | "S-CRTM POST Contents", | 144 | "POST Contents ", |
137 | "POST Contents", | 145 | "Table of Devices", |
138 | }; | 146 | }; |
139 | 147 | ||
140 | /* returns pointer to start of pos. entry of tcg log */ | 148 | /* returns pointer to start of pos. entry of tcg log */ |
@@ -206,7 +214,7 @@ static int get_event_name(char *dest, struct tcpa_event *event, | |||
206 | const char *name = ""; | 214 | const char *name = ""; |
207 | char data[40] = ""; | 215 | char data[40] = ""; |
208 | int i, n_len = 0, d_len = 0; | 216 | int i, n_len = 0, d_len = 0; |
209 | u32 event_id; | 217 | struct tcpa_pc_event *pc_event; |
210 | 218 | ||
211 | switch(event->event_type) { | 219 | switch(event->event_type) { |
212 | case PREBOOT: | 220 | case PREBOOT: |
@@ -235,31 +243,32 @@ static int get_event_name(char *dest, struct tcpa_event *event, | |||
235 | } | 243 | } |
236 | break; | 244 | break; |
237 | case EVENT_TAG: | 245 | case EVENT_TAG: |
238 | event_id = be32_to_cpu(*((u32 *)event_entry)); | 246 | pc_event = (struct tcpa_pc_event *)event_entry; |
239 | 247 | ||
240 | /* ToDo Row data -> Base64 */ | 248 | /* ToDo Row data -> Base64 */ |
241 | 249 | ||
242 | switch (event_id) { | 250 | switch (pc_event->event_id) { |
243 | case SMBIOS: | 251 | case SMBIOS: |
244 | case BIS_CERT: | 252 | case BIS_CERT: |
245 | case CMOS: | 253 | case CMOS: |
246 | case NVRAM: | 254 | case NVRAM: |
247 | case OPTION_ROM_EXEC: | 255 | case OPTION_ROM_EXEC: |
248 | case OPTION_ROM_CONFIG: | 256 | case OPTION_ROM_CONFIG: |
249 | case OPTION_ROM_MICROCODE: | ||
250 | case S_CRTM_VERSION: | 257 | case S_CRTM_VERSION: |
251 | case S_CRTM_CONTENTS: | 258 | name = tcpa_pc_event_id_strings[pc_event->event_id]; |
252 | case POST_CONTENTS: | ||
253 | name = tcpa_pc_event_id_strings[event_id]; | ||
254 | n_len = strlen(name); | 259 | n_len = strlen(name); |
255 | break; | 260 | break; |
261 | /* hash data */ | ||
256 | case POST_BIOS_ROM: | 262 | case POST_BIOS_ROM: |
257 | case ESCD: | 263 | case ESCD: |
258 | name = tcpa_pc_event_id_strings[event_id]; | 264 | case OPTION_ROM_MICROCODE: |
265 | case S_CRTM_CONTENTS: | ||
266 | case POST_CONTENTS: | ||
267 | name = tcpa_pc_event_id_strings[pc_event->event_id]; | ||
259 | n_len = strlen(name); | 268 | n_len = strlen(name); |
260 | for (i = 0; i < 20; i++) | 269 | for (i = 0; i < 20; i++) |
261 | d_len += sprintf(data, "%02x", | 270 | d_len += sprintf(&data[2*i], "%02x", |
262 | event_entry[8 + i]); | 271 | pc_event->event_data[i]); |
263 | break; | 272 | break; |
264 | default: | 273 | default: |
265 | break; | 274 | break; |
@@ -275,53 +284,13 @@ static int get_event_name(char *dest, struct tcpa_event *event, | |||
275 | 284 | ||
276 | static int tpm_binary_bios_measurements_show(struct seq_file *m, void *v) | 285 | static int tpm_binary_bios_measurements_show(struct seq_file *m, void *v) |
277 | { | 286 | { |
287 | struct tcpa_event *event = v; | ||
288 | char *data = v; | ||
289 | int i; | ||
278 | 290 | ||
279 | char *eventname; | 291 | for (i = 0; i < sizeof(struct tcpa_event) + event->event_size; i++) |
280 | char data[4]; | ||
281 | u32 help; | ||
282 | int i, len; | ||
283 | struct tcpa_event *event = (struct tcpa_event *) v; | ||
284 | unsigned char *event_entry = | ||
285 | (unsigned char *) (v + sizeof(struct tcpa_event)); | ||
286 | |||
287 | eventname = kmalloc(MAX_TEXT_EVENT, GFP_KERNEL); | ||
288 | if (!eventname) { | ||
289 | printk(KERN_ERR "%s: ERROR - No Memory for event name\n ", | ||
290 | __func__); | ||
291 | return -ENOMEM; | ||
292 | } | ||
293 | |||
294 | /* 1st: PCR used is in little-endian format (4 bytes) */ | ||
295 | help = le32_to_cpu(event->pcr_index); | ||
296 | memcpy(data, &help, 4); | ||
297 | for (i = 0; i < 4; i++) | ||
298 | seq_putc(m, data[i]); | ||
299 | |||
300 | /* 2nd: SHA1 (20 bytes) */ | ||
301 | for (i = 0; i < 20; i++) | ||
302 | seq_putc(m, event->pcr_value[i]); | ||
303 | |||
304 | /* 3rd: event type identifier (4 bytes) */ | ||
305 | help = le32_to_cpu(event->event_type); | ||
306 | memcpy(data, &help, 4); | ||
307 | for (i = 0; i < 4; i++) | ||
308 | seq_putc(m, data[i]); | 292 | seq_putc(m, data[i]); |
309 | 293 | ||
310 | len = 0; | ||
311 | |||
312 | len += get_event_name(eventname, event, event_entry); | ||
313 | |||
314 | /* 4th: filename <= 255 + \'0' delimiter */ | ||
315 | if (len > TCG_EVENT_NAME_LEN_MAX) | ||
316 | len = TCG_EVENT_NAME_LEN_MAX; | ||
317 | |||
318 | for (i = 0; i < len; i++) | ||
319 | seq_putc(m, eventname[i]); | ||
320 | |||
321 | /* 5th: delimiter */ | ||
322 | seq_putc(m, '\0'); | ||
323 | |||
324 | kfree(eventname); | ||
325 | return 0; | 294 | return 0; |
326 | } | 295 | } |
327 | 296 | ||
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index acc5d47844eb..6c94879e0b99 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c | |||
@@ -3238,14 +3238,6 @@ void vcs_scr_writew(struct vc_data *vc, u16 val, u16 *org) | |||
3238 | } | 3238 | } |
3239 | } | 3239 | } |
3240 | 3240 | ||
3241 | int is_console_suspend_safe(void) | ||
3242 | { | ||
3243 | /* It is unsafe to suspend devices while X has control of the | ||
3244 | * hardware. Make sure we are running on a kernel-controlled console. | ||
3245 | */ | ||
3246 | return vc_cons[fg_console].d->vc_mode == KD_TEXT; | ||
3247 | } | ||
3248 | |||
3249 | /* | 3241 | /* |
3250 | * Visible symbols for modules | 3242 | * Visible symbols for modules |
3251 | */ | 3243 | */ |
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index 43b96e298363..27c9eb989a9a 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c | |||
@@ -345,17 +345,17 @@ sgiioc4_resetproc(ide_drive_t * drive) | |||
345 | static u8 | 345 | static u8 |
346 | sgiioc4_INB(unsigned long port) | 346 | sgiioc4_INB(unsigned long port) |
347 | { | 347 | { |
348 | u8 reg = (u8) inb(port); | 348 | u8 reg = (u8) readb((void __iomem *) port); |
349 | 349 | ||
350 | if ((port & 0xFFF) == 0x11C) { /* Status register of IOC4 */ | 350 | if ((port & 0xFFF) == 0x11C) { /* Status register of IOC4 */ |
351 | if (reg & 0x51) { /* Not busy...check for interrupt */ | 351 | if (reg & 0x51) { /* Not busy...check for interrupt */ |
352 | unsigned long other_ir = port - 0x110; | 352 | unsigned long other_ir = port - 0x110; |
353 | unsigned int intr_reg = (u32) inl(other_ir); | 353 | unsigned int intr_reg = (u32) readl((void __iomem *) other_ir); |
354 | 354 | ||
355 | /* Clear the Interrupt, Error bits on the IOC4 */ | 355 | /* Clear the Interrupt, Error bits on the IOC4 */ |
356 | if (intr_reg & 0x03) { | 356 | if (intr_reg & 0x03) { |
357 | outl(0x03, other_ir); | 357 | writel(0x03, (void __iomem *) other_ir); |
358 | intr_reg = (u32) inl(other_ir); | 358 | intr_reg = (u32) readl((void __iomem *) other_ir); |
359 | } | 359 | } |
360 | } | 360 | } |
361 | } | 361 | } |
@@ -606,6 +606,12 @@ ide_init_sgiioc4(ide_hwif_t * hwif) | |||
606 | hwif->ide_dma_host_off = &sgiioc4_ide_dma_host_off; | 606 | hwif->ide_dma_host_off = &sgiioc4_ide_dma_host_off; |
607 | hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq; | 607 | hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq; |
608 | hwif->ide_dma_timeout = &__ide_dma_timeout; | 608 | hwif->ide_dma_timeout = &__ide_dma_timeout; |
609 | |||
610 | /* | ||
611 | * The IOC4 uses MMIO rather than Port IO. | ||
612 | * It also needs special workarounds for INB. | ||
613 | */ | ||
614 | default_hwif_mmiops(hwif); | ||
609 | hwif->INB = &sgiioc4_INB; | 615 | hwif->INB = &sgiioc4_INB; |
610 | } | 616 | } |
611 | 617 | ||
@@ -743,6 +749,6 @@ ioc4_ide_exit(void) | |||
743 | module_init(ioc4_ide_init); | 749 | module_init(ioc4_ide_init); |
744 | module_exit(ioc4_ide_exit); | 750 | module_exit(ioc4_ide_exit); |
745 | 751 | ||
746 | MODULE_AUTHOR("Aniket Malatpure - Silicon Graphics Inc. (SGI)"); | 752 | MODULE_AUTHOR("Aniket Malatpure/Jeremy Higdon"); |
747 | MODULE_DESCRIPTION("IDE PCI driver module for SGI IOC4 Base-IO Card"); | 753 | MODULE_DESCRIPTION("IDE PCI driver module for SGI IOC4 Base-IO Card"); |
748 | MODULE_LICENSE("GPL"); | 754 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index 8a23fb54c693..5413dc43b9f1 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c | |||
@@ -845,7 +845,7 @@ static struct scsi_id_instance_data *sbp2_alloc_device(struct unit_directory *ud | |||
845 | &sbp2_highlevel, ud->ne->host, &sbp2_ops, | 845 | &sbp2_highlevel, ud->ne->host, &sbp2_ops, |
846 | sizeof(struct sbp2_status_block), sizeof(quadlet_t), | 846 | sizeof(struct sbp2_status_block), sizeof(quadlet_t), |
847 | 0x010000000000ULL, CSR1212_ALL_SPACE_END); | 847 | 0x010000000000ULL, CSR1212_ALL_SPACE_END); |
848 | if (!scsi_id->status_fifo_addr) { | 848 | if (scsi_id->status_fifo_addr == ~0ULL) { |
849 | SBP2_ERR("failed to allocate status FIFO address range"); | 849 | SBP2_ERR("failed to allocate status FIFO address range"); |
850 | goto failed_alloc; | 850 | goto failed_alloc; |
851 | } | 851 | } |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index a54da42849ae..8406839b91cf 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c | |||
@@ -275,6 +275,7 @@ static void ipoib_ib_handle_wc(struct net_device *dev, | |||
275 | spin_lock_irqsave(&priv->tx_lock, flags); | 275 | spin_lock_irqsave(&priv->tx_lock, flags); |
276 | ++priv->tx_tail; | 276 | ++priv->tx_tail; |
277 | if (netif_queue_stopped(dev) && | 277 | if (netif_queue_stopped(dev) && |
278 | test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags) && | ||
278 | priv->tx_head - priv->tx_tail <= ipoib_sendq_size >> 1) | 279 | priv->tx_head - priv->tx_tail <= ipoib_sendq_size >> 1) |
279 | netif_wake_queue(dev); | 280 | netif_wake_queue(dev); |
280 | spin_unlock_irqrestore(&priv->tx_lock, flags); | 281 | spin_unlock_irqrestore(&priv->tx_lock, flags); |
diff --git a/drivers/input/joystick/sidewinder.c b/drivers/input/joystick/sidewinder.c index 2b2ec1057dee..95c0de7964a0 100644 --- a/drivers/input/joystick/sidewinder.c +++ b/drivers/input/joystick/sidewinder.c | |||
@@ -589,7 +589,7 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv) | |||
589 | struct sw *sw; | 589 | struct sw *sw; |
590 | struct input_dev *input_dev; | 590 | struct input_dev *input_dev; |
591 | int i, j, k, l; | 591 | int i, j, k, l; |
592 | int err; | 592 | int err = 0; |
593 | unsigned char *buf = NULL; /* [SW_LENGTH] */ | 593 | unsigned char *buf = NULL; /* [SW_LENGTH] */ |
594 | unsigned char *idbuf = NULL; /* [SW_LENGTH] */ | 594 | unsigned char *idbuf = NULL; /* [SW_LENGTH] */ |
595 | unsigned char m = 1; | 595 | unsigned char m = 1; |
@@ -776,7 +776,10 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv) | |||
776 | goto fail4; | 776 | goto fail4; |
777 | } | 777 | } |
778 | 778 | ||
779 | return 0; | 779 | out: kfree(buf); |
780 | kfree(idbuf); | ||
781 | |||
782 | return err; | ||
780 | 783 | ||
781 | fail4: input_free_device(sw->dev[i]); | 784 | fail4: input_free_device(sw->dev[i]); |
782 | fail3: while (--i >= 0) | 785 | fail3: while (--i >= 0) |
@@ -784,9 +787,7 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv) | |||
784 | fail2: gameport_close(gameport); | 787 | fail2: gameport_close(gameport); |
785 | fail1: gameport_set_drvdata(gameport, NULL); | 788 | fail1: gameport_set_drvdata(gameport, NULL); |
786 | kfree(sw); | 789 | kfree(sw); |
787 | kfree(buf); | 790 | goto out; |
788 | kfree(idbuf); | ||
789 | return err; | ||
790 | } | 791 | } |
791 | 792 | ||
792 | static void sw_disconnect(struct gameport *gameport) | 793 | static void sw_disconnect(struct gameport *gameport) |
diff --git a/drivers/input/keyboard/corgikbd.c b/drivers/input/keyboard/corgikbd.c index 96c6bf77248a..1f0e720267d7 100644 --- a/drivers/input/keyboard/corgikbd.c +++ b/drivers/input/keyboard/corgikbd.c | |||
@@ -245,9 +245,9 @@ static void corgikbd_hinge_timer(unsigned long data) | |||
245 | if (hinge_count >= HINGE_STABLE_COUNT) { | 245 | if (hinge_count >= HINGE_STABLE_COUNT) { |
246 | spin_lock_irqsave(&corgikbd_data->lock, flags); | 246 | spin_lock_irqsave(&corgikbd_data->lock, flags); |
247 | 247 | ||
248 | input_report_switch(corgikbd_data->input, SW_0, ((sharpsl_hinge_state & CORGI_SCP_SWA) != 0)); | 248 | input_report_switch(corgikbd_data->input, SW_LID, ((sharpsl_hinge_state & CORGI_SCP_SWA) != 0)); |
249 | input_report_switch(corgikbd_data->input, SW_1, ((sharpsl_hinge_state & CORGI_SCP_SWB) != 0)); | 249 | input_report_switch(corgikbd_data->input, SW_TABLET_MODE, ((sharpsl_hinge_state & CORGI_SCP_SWB) != 0)); |
250 | input_report_switch(corgikbd_data->input, SW_2, (READ_GPIO_BIT(CORGI_GPIO_AK_INT) != 0)); | 250 | input_report_switch(corgikbd_data->input, SW_HEADPHONE_INSERT, (READ_GPIO_BIT(CORGI_GPIO_AK_INT) != 0)); |
251 | input_sync(corgikbd_data->input); | 251 | input_sync(corgikbd_data->input); |
252 | 252 | ||
253 | spin_unlock_irqrestore(&corgikbd_data->lock, flags); | 253 | spin_unlock_irqrestore(&corgikbd_data->lock, flags); |
@@ -340,9 +340,9 @@ static int __init corgikbd_probe(struct platform_device *pdev) | |||
340 | for (i = 0; i < ARRAY_SIZE(corgikbd_keycode); i++) | 340 | for (i = 0; i < ARRAY_SIZE(corgikbd_keycode); i++) |
341 | set_bit(corgikbd->keycode[i], input_dev->keybit); | 341 | set_bit(corgikbd->keycode[i], input_dev->keybit); |
342 | clear_bit(0, input_dev->keybit); | 342 | clear_bit(0, input_dev->keybit); |
343 | set_bit(SW_0, input_dev->swbit); | 343 | set_bit(SW_LID, input_dev->swbit); |
344 | set_bit(SW_1, input_dev->swbit); | 344 | set_bit(SW_TABLET_MODE, input_dev->swbit); |
345 | set_bit(SW_2, input_dev->swbit); | 345 | set_bit(SW_HEADPHONE_INSERT, input_dev->swbit); |
346 | 346 | ||
347 | input_register_device(corgikbd->input); | 347 | input_register_device(corgikbd->input); |
348 | 348 | ||
diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c index 1d238a9d52d6..c5d03fb77bcb 100644 --- a/drivers/input/keyboard/spitzkbd.c +++ b/drivers/input/keyboard/spitzkbd.c | |||
@@ -299,9 +299,9 @@ static void spitzkbd_hinge_timer(unsigned long data) | |||
299 | if (hinge_count >= HINGE_STABLE_COUNT) { | 299 | if (hinge_count >= HINGE_STABLE_COUNT) { |
300 | spin_lock_irqsave(&spitzkbd_data->lock, flags); | 300 | spin_lock_irqsave(&spitzkbd_data->lock, flags); |
301 | 301 | ||
302 | input_report_switch(spitzkbd_data->input, SW_0, ((GPLR(SPITZ_GPIO_SWA) & GPIO_bit(SPITZ_GPIO_SWA)) != 0)); | 302 | input_report_switch(spitzkbd_data->input, SW_LID, ((GPLR(SPITZ_GPIO_SWA) & GPIO_bit(SPITZ_GPIO_SWA)) != 0)); |
303 | input_report_switch(spitzkbd_data->input, SW_1, ((GPLR(SPITZ_GPIO_SWB) & GPIO_bit(SPITZ_GPIO_SWB)) != 0)); | 303 | input_report_switch(spitzkbd_data->input, SW_TABLET_MODE, ((GPLR(SPITZ_GPIO_SWB) & GPIO_bit(SPITZ_GPIO_SWB)) != 0)); |
304 | input_report_switch(spitzkbd_data->input, SW_2, ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) != 0)); | 304 | input_report_switch(spitzkbd_data->input, SW_HEADPHONE_INSERT, ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) != 0)); |
305 | input_sync(spitzkbd_data->input); | 305 | input_sync(spitzkbd_data->input); |
306 | 306 | ||
307 | spin_unlock_irqrestore(&spitzkbd_data->lock, flags); | 307 | spin_unlock_irqrestore(&spitzkbd_data->lock, flags); |
@@ -398,9 +398,9 @@ static int __init spitzkbd_probe(struct platform_device *dev) | |||
398 | for (i = 0; i < ARRAY_SIZE(spitzkbd_keycode); i++) | 398 | for (i = 0; i < ARRAY_SIZE(spitzkbd_keycode); i++) |
399 | set_bit(spitzkbd->keycode[i], input_dev->keybit); | 399 | set_bit(spitzkbd->keycode[i], input_dev->keybit); |
400 | clear_bit(0, input_dev->keybit); | 400 | clear_bit(0, input_dev->keybit); |
401 | set_bit(SW_0, input_dev->swbit); | 401 | set_bit(SW_LID, input_dev->swbit); |
402 | set_bit(SW_1, input_dev->swbit); | 402 | set_bit(SW_TABLET_MODE, input_dev->swbit); |
403 | set_bit(SW_2, input_dev->swbit); | 403 | set_bit(SW_HEADPHONE_INSERT, input_dev->swbit); |
404 | 404 | ||
405 | input_register_device(input_dev); | 405 | input_register_device(input_dev); |
406 | 406 | ||
diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c index 36cd2e07fce8..e4e5be111c96 100644 --- a/drivers/input/misc/wistron_btns.c +++ b/drivers/input/misc/wistron_btns.c | |||
@@ -318,6 +318,16 @@ static struct key_entry keymap_acer_travelmate_240[] = { | |||
318 | { KE_END, 0 } | 318 | { KE_END, 0 } |
319 | }; | 319 | }; |
320 | 320 | ||
321 | static struct key_entry keymap_aopen_1559as[] = { | ||
322 | { KE_KEY, 0x01, KEY_HELP }, | ||
323 | { KE_KEY, 0x06, KEY_PROG3 }, | ||
324 | { KE_KEY, 0x11, KEY_PROG1 }, | ||
325 | { KE_KEY, 0x12, KEY_PROG2 }, | ||
326 | { KE_WIFI, 0x30, 0 }, | ||
327 | { KE_KEY, 0x31, KEY_MAIL }, | ||
328 | { KE_KEY, 0x36, KEY_WWW }, | ||
329 | }; | ||
330 | |||
321 | /* | 331 | /* |
322 | * If your machine is not here (which is currently rather likely), please send | 332 | * If your machine is not here (which is currently rather likely), please send |
323 | * a list of buttons and their key codes (reported when loading this module | 333 | * a list of buttons and their key codes (reported when loading this module |
@@ -369,6 +379,15 @@ static struct dmi_system_id dmi_ids[] = { | |||
369 | }, | 379 | }, |
370 | .driver_data = keymap_acer_travelmate_240 | 380 | .driver_data = keymap_acer_travelmate_240 |
371 | }, | 381 | }, |
382 | { | ||
383 | .callback = dmi_matched, | ||
384 | .ident = "AOpen 1559AS", | ||
385 | .matches = { | ||
386 | DMI_MATCH(DMI_PRODUCT_NAME, "E2U"), | ||
387 | DMI_MATCH(DMI_BOARD_NAME, "E2U"), | ||
388 | }, | ||
389 | .driver_data = keymap_aopen_1559as | ||
390 | }, | ||
372 | { NULL, } | 391 | { NULL, } |
373 | }; | 392 | }; |
374 | 393 | ||
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 2141501e9f2e..a0e2e797c6d5 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
@@ -100,8 +100,8 @@ static void alps_process_packet(struct psmouse *psmouse, struct pt_regs *regs) | |||
100 | } | 100 | } |
101 | 101 | ||
102 | if (priv->i->flags & ALPS_OLDPROTO) { | 102 | if (priv->i->flags & ALPS_OLDPROTO) { |
103 | left = packet[2] & 0x08; | 103 | left = packet[2] & 0x10; |
104 | right = packet[2] & 0x10; | 104 | right = packet[2] & 0x08; |
105 | middle = 0; | 105 | middle = 0; |
106 | x = packet[1] | ((packet[0] & 0x07) << 7); | 106 | x = packet[1] | ((packet[0] & 0x07) << 7); |
107 | y = packet[4] | ((packet[3] & 0x07) << 7); | 107 | y = packet[4] | ((packet[3] & 0x07) << 7); |
diff --git a/drivers/input/mouse/lifebook.c b/drivers/input/mouse/lifebook.c index 5ccc3ef3b89e..c14395ba7980 100644 --- a/drivers/input/mouse/lifebook.c +++ b/drivers/input/mouse/lifebook.c | |||
@@ -22,12 +22,36 @@ | |||
22 | 22 | ||
23 | static struct dmi_system_id lifebook_dmi_table[] = { | 23 | static struct dmi_system_id lifebook_dmi_table[] = { |
24 | { | 24 | { |
25 | .ident = "LifeBook B", | ||
26 | .matches = { | ||
27 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B Series"), | ||
28 | }, | ||
29 | }, | ||
30 | { | ||
25 | .ident = "Lifebook B", | 31 | .ident = "Lifebook B", |
26 | .matches = { | 32 | .matches = { |
27 | DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK B Series"), | 33 | DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK B Series"), |
28 | }, | 34 | }, |
29 | }, | 35 | }, |
30 | { | 36 | { |
37 | .ident = "Lifebook B213x/B2150", | ||
38 | .matches = { | ||
39 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B2131/B2133/B2150"), | ||
40 | }, | ||
41 | }, | ||
42 | { | ||
43 | .ident = "Zephyr", | ||
44 | .matches = { | ||
45 | DMI_MATCH(DMI_PRODUCT_NAME, "ZEPHYR"), | ||
46 | }, | ||
47 | }, | ||
48 | { | ||
49 | .ident = "CF-18", | ||
50 | .matches = { | ||
51 | DMI_MATCH(DMI_PRODUCT_NAME, "CF-18"), | ||
52 | }, | ||
53 | }, | ||
54 | { | ||
31 | .ident = "Lifebook B142", | 55 | .ident = "Lifebook B142", |
32 | .matches = { | 56 | .matches = { |
33 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B142"), | 57 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B142"), |
diff --git a/drivers/input/mouse/logips2pp.c b/drivers/input/mouse/logips2pp.c index 40333d61093c..2f0d28840810 100644 --- a/drivers/input/mouse/logips2pp.c +++ b/drivers/input/mouse/logips2pp.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #define PS2PP_KIND_WHEEL 1 | 19 | #define PS2PP_KIND_WHEEL 1 |
20 | #define PS2PP_KIND_MX 2 | 20 | #define PS2PP_KIND_MX 2 |
21 | #define PS2PP_KIND_TP3 3 | 21 | #define PS2PP_KIND_TP3 3 |
22 | #define PS2PP_KIND_TRACKMAN 4 | ||
22 | 23 | ||
23 | /* Logitech mouse features */ | 24 | /* Logitech mouse features */ |
24 | #define PS2PP_WHEEL 0x01 | 25 | #define PS2PP_WHEEL 0x01 |
@@ -223,6 +224,7 @@ static struct ps2pp_info *get_model_info(unsigned char model) | |||
223 | { 73, 0, PS2PP_SIDE_BTN }, | 224 | { 73, 0, PS2PP_SIDE_BTN }, |
224 | { 75, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, | 225 | { 75, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, |
225 | { 76, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, | 226 | { 76, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, |
227 | { 79, PS2PP_KIND_TRACKMAN, PS2PP_WHEEL }, /* TrackMan with wheel */ | ||
226 | { 80, PS2PP_KIND_WHEEL, PS2PP_SIDE_BTN | PS2PP_WHEEL }, | 228 | { 80, PS2PP_KIND_WHEEL, PS2PP_SIDE_BTN | PS2PP_WHEEL }, |
227 | { 81, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, | 229 | { 81, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, |
228 | { 83, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, | 230 | { 83, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, |
@@ -298,6 +300,10 @@ static void ps2pp_set_model_properties(struct psmouse *psmouse, struct ps2pp_inf | |||
298 | psmouse->name = "TouchPad 3"; | 300 | psmouse->name = "TouchPad 3"; |
299 | break; | 301 | break; |
300 | 302 | ||
303 | case PS2PP_KIND_TRACKMAN: | ||
304 | psmouse->name = "TrackMan"; | ||
305 | break; | ||
306 | |||
301 | default: | 307 | default: |
302 | /* | 308 | /* |
303 | * Set name to "Mouse" only when using PS2++, | 309 | * Set name to "Mouse" only when using PS2++, |
diff --git a/drivers/md/md.c b/drivers/md/md.c index ec802913f977..f19b874753a9 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -167,6 +167,15 @@ void md_new_event(mddev_t *mddev) | |||
167 | } | 167 | } |
168 | EXPORT_SYMBOL_GPL(md_new_event); | 168 | EXPORT_SYMBOL_GPL(md_new_event); |
169 | 169 | ||
170 | /* Alternate version that can be called from interrupts | ||
171 | * when calling sysfs_notify isn't needed. | ||
172 | */ | ||
173 | void md_new_event_inintr(mddev_t *mddev) | ||
174 | { | ||
175 | atomic_inc(&md_event_count); | ||
176 | wake_up(&md_event_waiters); | ||
177 | } | ||
178 | |||
170 | /* | 179 | /* |
171 | * Enables to iterate over all existing md arrays | 180 | * Enables to iterate over all existing md arrays |
172 | * all_mddevs_lock protects this list. | 181 | * all_mddevs_lock protects this list. |
@@ -4149,7 +4158,7 @@ void md_error(mddev_t *mddev, mdk_rdev_t *rdev) | |||
4149 | set_bit(MD_RECOVERY_INTR, &mddev->recovery); | 4158 | set_bit(MD_RECOVERY_INTR, &mddev->recovery); |
4150 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); | 4159 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); |
4151 | md_wakeup_thread(mddev->thread); | 4160 | md_wakeup_thread(mddev->thread); |
4152 | md_new_event(mddev); | 4161 | md_new_event_inintr(mddev); |
4153 | } | 4162 | } |
4154 | 4163 | ||
4155 | /* seq_file implementation /proc/mdstat */ | 4164 | /* seq_file implementation /proc/mdstat */ |
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 9080853fe283..a30084076ac8 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c | |||
@@ -1605,6 +1605,21 @@ mpt_resume(struct pci_dev *pdev) | |||
1605 | } | 1605 | } |
1606 | #endif | 1606 | #endif |
1607 | 1607 | ||
1608 | static int | ||
1609 | mpt_signal_reset(int index, MPT_ADAPTER *ioc, int reset_phase) | ||
1610 | { | ||
1611 | if ((MptDriverClass[index] == MPTSPI_DRIVER && | ||
1612 | ioc->bus_type != SPI) || | ||
1613 | (MptDriverClass[index] == MPTFC_DRIVER && | ||
1614 | ioc->bus_type != FC) || | ||
1615 | (MptDriverClass[index] == MPTSAS_DRIVER && | ||
1616 | ioc->bus_type != SAS)) | ||
1617 | /* make sure we only call the relevant reset handler | ||
1618 | * for the bus */ | ||
1619 | return 0; | ||
1620 | return (MptResetHandlers[index])(ioc, reset_phase); | ||
1621 | } | ||
1622 | |||
1608 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 1623 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
1609 | /* | 1624 | /* |
1610 | * mpt_do_ioc_recovery - Initialize or recover MPT adapter. | 1625 | * mpt_do_ioc_recovery - Initialize or recover MPT adapter. |
@@ -1885,14 +1900,14 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag) | |||
1885 | if ((ret == 0) && MptResetHandlers[ii]) { | 1900 | if ((ret == 0) && MptResetHandlers[ii]) { |
1886 | dprintk((MYIOC_s_INFO_FMT "Calling IOC post_reset handler #%d\n", | 1901 | dprintk((MYIOC_s_INFO_FMT "Calling IOC post_reset handler #%d\n", |
1887 | ioc->name, ii)); | 1902 | ioc->name, ii)); |
1888 | rc += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_POST_RESET); | 1903 | rc += mpt_signal_reset(ii, ioc, MPT_IOC_POST_RESET); |
1889 | handlers++; | 1904 | handlers++; |
1890 | } | 1905 | } |
1891 | 1906 | ||
1892 | if (alt_ioc_ready && MptResetHandlers[ii]) { | 1907 | if (alt_ioc_ready && MptResetHandlers[ii]) { |
1893 | drsprintk((MYIOC_s_INFO_FMT "Calling alt-%s post_reset handler #%d\n", | 1908 | drsprintk((MYIOC_s_INFO_FMT "Calling alt-%s post_reset handler #%d\n", |
1894 | ioc->name, ioc->alt_ioc->name, ii)); | 1909 | ioc->name, ioc->alt_ioc->name, ii)); |
1895 | rc += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_POST_RESET); | 1910 | rc += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_POST_RESET); |
1896 | handlers++; | 1911 | handlers++; |
1897 | } | 1912 | } |
1898 | } | 1913 | } |
@@ -3267,11 +3282,11 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag) | |||
3267 | if (MptResetHandlers[ii]) { | 3282 | if (MptResetHandlers[ii]) { |
3268 | dprintk((MYIOC_s_INFO_FMT "Calling IOC pre_reset handler #%d\n", | 3283 | dprintk((MYIOC_s_INFO_FMT "Calling IOC pre_reset handler #%d\n", |
3269 | ioc->name, ii)); | 3284 | ioc->name, ii)); |
3270 | r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_PRE_RESET); | 3285 | r += mpt_signal_reset(ii, ioc, MPT_IOC_PRE_RESET); |
3271 | if (ioc->alt_ioc) { | 3286 | if (ioc->alt_ioc) { |
3272 | dprintk((MYIOC_s_INFO_FMT "Calling alt-%s pre_reset handler #%d\n", | 3287 | dprintk((MYIOC_s_INFO_FMT "Calling alt-%s pre_reset handler #%d\n", |
3273 | ioc->name, ioc->alt_ioc->name, ii)); | 3288 | ioc->name, ioc->alt_ioc->name, ii)); |
3274 | r += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_PRE_RESET); | 3289 | r += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_PRE_RESET); |
3275 | } | 3290 | } |
3276 | } | 3291 | } |
3277 | } | 3292 | } |
@@ -5706,11 +5721,11 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag) | |||
5706 | if (MptResetHandlers[ii]) { | 5721 | if (MptResetHandlers[ii]) { |
5707 | dtmprintk((MYIOC_s_INFO_FMT "Calling IOC reset_setup handler #%d\n", | 5722 | dtmprintk((MYIOC_s_INFO_FMT "Calling IOC reset_setup handler #%d\n", |
5708 | ioc->name, ii)); | 5723 | ioc->name, ii)); |
5709 | r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_SETUP_RESET); | 5724 | r += mpt_signal_reset(ii, ioc, MPT_IOC_SETUP_RESET); |
5710 | if (ioc->alt_ioc) { | 5725 | if (ioc->alt_ioc) { |
5711 | dtmprintk((MYIOC_s_INFO_FMT "Calling alt-%s setup reset handler #%d\n", | 5726 | dtmprintk((MYIOC_s_INFO_FMT "Calling alt-%s setup reset handler #%d\n", |
5712 | ioc->name, ioc->alt_ioc->name, ii)); | 5727 | ioc->name, ioc->alt_ioc->name, ii)); |
5713 | r += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_SETUP_RESET); | 5728 | r += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_SETUP_RESET); |
5714 | } | 5729 | } |
5715 | } | 5730 | } |
5716 | } | 5731 | } |
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index 003b077c2324..45bcf098e762 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig | |||
@@ -84,7 +84,7 @@ config MMC_WBSD | |||
84 | 84 | ||
85 | config MMC_AU1X | 85 | config MMC_AU1X |
86 | tristate "Alchemy AU1XX0 MMC Card Interface support" | 86 | tristate "Alchemy AU1XX0 MMC Card Interface support" |
87 | depends on SOC_AU1X00 && MMC | 87 | depends on MMC && SOC_AU1200 |
88 | help | 88 | help |
89 | This selects the AMD Alchemy(R) Multimedia card interface. | 89 | This selects the AMD Alchemy(R) Multimedia card interface. |
90 | If you have a Alchemy platform with a MMC slot, say Y or M here. | 90 | If you have a Alchemy platform with a MMC slot, say Y or M here. |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 705e1229d89d..feb5b223cd60 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -2615,6 +2615,18 @@ static int nv_nway_reset(struct net_device *dev) | |||
2615 | return ret; | 2615 | return ret; |
2616 | } | 2616 | } |
2617 | 2617 | ||
2618 | #ifdef NETIF_F_TSO | ||
2619 | static int nv_set_tso(struct net_device *dev, u32 value) | ||
2620 | { | ||
2621 | struct fe_priv *np = netdev_priv(dev); | ||
2622 | |||
2623 | if ((np->driver_data & DEV_HAS_CHECKSUM)) | ||
2624 | return ethtool_op_set_tso(dev, value); | ||
2625 | else | ||
2626 | return value ? -EOPNOTSUPP : 0; | ||
2627 | } | ||
2628 | #endif | ||
2629 | |||
2618 | static struct ethtool_ops ops = { | 2630 | static struct ethtool_ops ops = { |
2619 | .get_drvinfo = nv_get_drvinfo, | 2631 | .get_drvinfo = nv_get_drvinfo, |
2620 | .get_link = ethtool_op_get_link, | 2632 | .get_link = ethtool_op_get_link, |
@@ -2626,6 +2638,10 @@ static struct ethtool_ops ops = { | |||
2626 | .get_regs = nv_get_regs, | 2638 | .get_regs = nv_get_regs, |
2627 | .nway_reset = nv_nway_reset, | 2639 | .nway_reset = nv_nway_reset, |
2628 | .get_perm_addr = ethtool_op_get_perm_addr, | 2640 | .get_perm_addr = ethtool_op_get_perm_addr, |
2641 | #ifdef NETIF_F_TSO | ||
2642 | .get_tso = ethtool_op_get_tso, | ||
2643 | .set_tso = nv_set_tso | ||
2644 | #endif | ||
2629 | }; | 2645 | }; |
2630 | 2646 | ||
2631 | static void nv_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) | 2647 | static void nv_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) |
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 66e74f740261..bf58db29e2ed 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c | |||
@@ -107,7 +107,7 @@ static int init_netconsole(void) | |||
107 | 107 | ||
108 | if(!configured) { | 108 | if(!configured) { |
109 | printk("netconsole: not configured, aborting\n"); | 109 | printk("netconsole: not configured, aborting\n"); |
110 | return -EINVAL; | 110 | return 0; |
111 | } | 111 | } |
112 | 112 | ||
113 | if(netpoll_setup(&np)) | 113 | if(netpoll_setup(&np)) |
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c index 4260c2128f47..a8f6bfc96fd2 100644 --- a/drivers/net/pcmcia/nmclan_cs.c +++ b/drivers/net/pcmcia/nmclan_cs.c | |||
@@ -1204,7 +1204,7 @@ static int mace_rx(struct net_device *dev, unsigned char RxCnt) | |||
1204 | 1204 | ||
1205 | dev->last_rx = jiffies; | 1205 | dev->last_rx = jiffies; |
1206 | lp->linux_stats.rx_packets++; | 1206 | lp->linux_stats.rx_packets++; |
1207 | lp->linux_stats.rx_bytes += skb->len; | 1207 | lp->linux_stats.rx_bytes += pkt_len; |
1208 | outb(0xFF, ioaddr + AM2150_RCV_NEXT); /* skip to next frame */ | 1208 | outb(0xFF, ioaddr + AM2150_RCV_NEXT); /* skip to next frame */ |
1209 | continue; | 1209 | continue; |
1210 | } else { | 1210 | } else { |
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index 475dc930380f..0d101a18026a 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c | |||
@@ -861,6 +861,9 @@ static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb) | |||
861 | * give dev_queue_xmit something it can free. | 861 | * give dev_queue_xmit something it can free. |
862 | */ | 862 | */ |
863 | skb2 = skb_clone(skb, GFP_ATOMIC); | 863 | skb2 = skb_clone(skb, GFP_ATOMIC); |
864 | |||
865 | if (skb2 == NULL) | ||
866 | goto abort; | ||
864 | } | 867 | } |
865 | 868 | ||
866 | ph = (struct pppoe_hdr *) skb_push(skb2, sizeof(struct pppoe_hdr)); | 869 | ph = (struct pppoe_hdr *) skb_push(skb2, sizeof(struct pppoe_hdr)); |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_dma.c b/drivers/net/wireless/bcm43xx/bcm43xx_dma.c index bbecba02e697..d0318e525ba7 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_dma.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_dma.c | |||
@@ -624,25 +624,28 @@ err_destroy_tx0: | |||
624 | static u16 generate_cookie(struct bcm43xx_dmaring *ring, | 624 | static u16 generate_cookie(struct bcm43xx_dmaring *ring, |
625 | int slot) | 625 | int slot) |
626 | { | 626 | { |
627 | u16 cookie = 0x0000; | 627 | u16 cookie = 0xF000; |
628 | 628 | ||
629 | /* Use the upper 4 bits of the cookie as | 629 | /* Use the upper 4 bits of the cookie as |
630 | * DMA controller ID and store the slot number | 630 | * DMA controller ID and store the slot number |
631 | * in the lower 12 bits | 631 | * in the lower 12 bits. |
632 | * Note that the cookie must never be 0, as this | ||
633 | * is a special value used in RX path. | ||
632 | */ | 634 | */ |
633 | switch (ring->mmio_base) { | 635 | switch (ring->mmio_base) { |
634 | default: | 636 | default: |
635 | assert(0); | 637 | assert(0); |
636 | case BCM43xx_MMIO_DMA1_BASE: | 638 | case BCM43xx_MMIO_DMA1_BASE: |
639 | cookie = 0xA000; | ||
637 | break; | 640 | break; |
638 | case BCM43xx_MMIO_DMA2_BASE: | 641 | case BCM43xx_MMIO_DMA2_BASE: |
639 | cookie = 0x1000; | 642 | cookie = 0xB000; |
640 | break; | 643 | break; |
641 | case BCM43xx_MMIO_DMA3_BASE: | 644 | case BCM43xx_MMIO_DMA3_BASE: |
642 | cookie = 0x2000; | 645 | cookie = 0xC000; |
643 | break; | 646 | break; |
644 | case BCM43xx_MMIO_DMA4_BASE: | 647 | case BCM43xx_MMIO_DMA4_BASE: |
645 | cookie = 0x3000; | 648 | cookie = 0xD000; |
646 | break; | 649 | break; |
647 | } | 650 | } |
648 | assert(((u16)slot & 0xF000) == 0x0000); | 651 | assert(((u16)slot & 0xF000) == 0x0000); |
@@ -660,16 +663,16 @@ struct bcm43xx_dmaring * parse_cookie(struct bcm43xx_private *bcm, | |||
660 | struct bcm43xx_dmaring *ring = NULL; | 663 | struct bcm43xx_dmaring *ring = NULL; |
661 | 664 | ||
662 | switch (cookie & 0xF000) { | 665 | switch (cookie & 0xF000) { |
663 | case 0x0000: | 666 | case 0xA000: |
664 | ring = dma->tx_ring0; | 667 | ring = dma->tx_ring0; |
665 | break; | 668 | break; |
666 | case 0x1000: | 669 | case 0xB000: |
667 | ring = dma->tx_ring1; | 670 | ring = dma->tx_ring1; |
668 | break; | 671 | break; |
669 | case 0x2000: | 672 | case 0xC000: |
670 | ring = dma->tx_ring2; | 673 | ring = dma->tx_ring2; |
671 | break; | 674 | break; |
672 | case 0x3000: | 675 | case 0xD000: |
673 | ring = dma->tx_ring3; | 676 | ring = dma->tx_ring3; |
674 | break; | 677 | break; |
675 | default: | 678 | default: |
@@ -839,8 +842,18 @@ static void dma_rx(struct bcm43xx_dmaring *ring, | |||
839 | /* We received an xmit status. */ | 842 | /* We received an xmit status. */ |
840 | struct bcm43xx_hwxmitstatus *hw = (struct bcm43xx_hwxmitstatus *)skb->data; | 843 | struct bcm43xx_hwxmitstatus *hw = (struct bcm43xx_hwxmitstatus *)skb->data; |
841 | struct bcm43xx_xmitstatus stat; | 844 | struct bcm43xx_xmitstatus stat; |
845 | int i = 0; | ||
842 | 846 | ||
843 | stat.cookie = le16_to_cpu(hw->cookie); | 847 | stat.cookie = le16_to_cpu(hw->cookie); |
848 | while (stat.cookie == 0) { | ||
849 | if (unlikely(++i >= 10000)) { | ||
850 | assert(0); | ||
851 | break; | ||
852 | } | ||
853 | udelay(2); | ||
854 | barrier(); | ||
855 | stat.cookie = le16_to_cpu(hw->cookie); | ||
856 | } | ||
844 | stat.flags = hw->flags; | 857 | stat.flags = hw->flags; |
845 | stat.cnt1 = hw->cnt1; | 858 | stat.cnt1 = hw->cnt1; |
846 | stat.cnt2 = hw->cnt2; | 859 | stat.cnt2 = hw->cnt2; |
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 48d3b3d30c21..74b3124e8247 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -1143,6 +1143,12 @@ static int ds_event(struct pcmcia_socket *skt, event_t event, int priority) | |||
1143 | { | 1143 | { |
1144 | struct pcmcia_socket *s = pcmcia_get_socket(skt); | 1144 | struct pcmcia_socket *s = pcmcia_get_socket(skt); |
1145 | 1145 | ||
1146 | if (!s) { | ||
1147 | printk(KERN_ERR "PCMCIA obtaining reference to socket %p " \ | ||
1148 | "failed, event 0x%x lost!\n", skt, event); | ||
1149 | return -ENODEV; | ||
1150 | } | ||
1151 | |||
1146 | ds_dbg(1, "ds_event(0x%06x, %d, 0x%p)\n", | 1152 | ds_dbg(1, "ds_event(0x%06x, %d, 0x%p)\n", |
1147 | event, priority, skt); | 1153 | event, priority, skt); |
1148 | 1154 | ||
diff --git a/drivers/rtc/rtc-m48t86.c b/drivers/rtc/rtc-m48t86.c index f6e7ee04f3dc..8c0d1a6739ad 100644 --- a/drivers/rtc/rtc-m48t86.c +++ b/drivers/rtc/rtc-m48t86.c | |||
@@ -48,33 +48,33 @@ static int m48t86_rtc_read_time(struct device *dev, struct rtc_time *tm) | |||
48 | struct platform_device *pdev = to_platform_device(dev); | 48 | struct platform_device *pdev = to_platform_device(dev); |
49 | struct m48t86_ops *ops = pdev->dev.platform_data; | 49 | struct m48t86_ops *ops = pdev->dev.platform_data; |
50 | 50 | ||
51 | reg = ops->readb(M48T86_REG_B); | 51 | reg = ops->readbyte(M48T86_REG_B); |
52 | 52 | ||
53 | if (reg & M48T86_REG_B_DM) { | 53 | if (reg & M48T86_REG_B_DM) { |
54 | /* data (binary) mode */ | 54 | /* data (binary) mode */ |
55 | tm->tm_sec = ops->readb(M48T86_REG_SEC); | 55 | tm->tm_sec = ops->readbyte(M48T86_REG_SEC); |
56 | tm->tm_min = ops->readb(M48T86_REG_MIN); | 56 | tm->tm_min = ops->readbyte(M48T86_REG_MIN); |
57 | tm->tm_hour = ops->readb(M48T86_REG_HOUR) & 0x3F; | 57 | tm->tm_hour = ops->readbyte(M48T86_REG_HOUR) & 0x3F; |
58 | tm->tm_mday = ops->readb(M48T86_REG_DOM); | 58 | tm->tm_mday = ops->readbyte(M48T86_REG_DOM); |
59 | /* tm_mon is 0-11 */ | 59 | /* tm_mon is 0-11 */ |
60 | tm->tm_mon = ops->readb(M48T86_REG_MONTH) - 1; | 60 | tm->tm_mon = ops->readbyte(M48T86_REG_MONTH) - 1; |
61 | tm->tm_year = ops->readb(M48T86_REG_YEAR) + 100; | 61 | tm->tm_year = ops->readbyte(M48T86_REG_YEAR) + 100; |
62 | tm->tm_wday = ops->readb(M48T86_REG_DOW); | 62 | tm->tm_wday = ops->readbyte(M48T86_REG_DOW); |
63 | } else { | 63 | } else { |
64 | /* bcd mode */ | 64 | /* bcd mode */ |
65 | tm->tm_sec = BCD2BIN(ops->readb(M48T86_REG_SEC)); | 65 | tm->tm_sec = BCD2BIN(ops->readbyte(M48T86_REG_SEC)); |
66 | tm->tm_min = BCD2BIN(ops->readb(M48T86_REG_MIN)); | 66 | tm->tm_min = BCD2BIN(ops->readbyte(M48T86_REG_MIN)); |
67 | tm->tm_hour = BCD2BIN(ops->readb(M48T86_REG_HOUR) & 0x3F); | 67 | tm->tm_hour = BCD2BIN(ops->readbyte(M48T86_REG_HOUR) & 0x3F); |
68 | tm->tm_mday = BCD2BIN(ops->readb(M48T86_REG_DOM)); | 68 | tm->tm_mday = BCD2BIN(ops->readbyte(M48T86_REG_DOM)); |
69 | /* tm_mon is 0-11 */ | 69 | /* tm_mon is 0-11 */ |
70 | tm->tm_mon = BCD2BIN(ops->readb(M48T86_REG_MONTH)) - 1; | 70 | tm->tm_mon = BCD2BIN(ops->readbyte(M48T86_REG_MONTH)) - 1; |
71 | tm->tm_year = BCD2BIN(ops->readb(M48T86_REG_YEAR)) + 100; | 71 | tm->tm_year = BCD2BIN(ops->readbyte(M48T86_REG_YEAR)) + 100; |
72 | tm->tm_wday = BCD2BIN(ops->readb(M48T86_REG_DOW)); | 72 | tm->tm_wday = BCD2BIN(ops->readbyte(M48T86_REG_DOW)); |
73 | } | 73 | } |
74 | 74 | ||
75 | /* correct the hour if the clock is in 12h mode */ | 75 | /* correct the hour if the clock is in 12h mode */ |
76 | if (!(reg & M48T86_REG_B_H24)) | 76 | if (!(reg & M48T86_REG_B_H24)) |
77 | if (ops->readb(M48T86_REG_HOUR) & 0x80) | 77 | if (ops->readbyte(M48T86_REG_HOUR) & 0x80) |
78 | tm->tm_hour += 12; | 78 | tm->tm_hour += 12; |
79 | 79 | ||
80 | return 0; | 80 | return 0; |
@@ -86,35 +86,35 @@ static int m48t86_rtc_set_time(struct device *dev, struct rtc_time *tm) | |||
86 | struct platform_device *pdev = to_platform_device(dev); | 86 | struct platform_device *pdev = to_platform_device(dev); |
87 | struct m48t86_ops *ops = pdev->dev.platform_data; | 87 | struct m48t86_ops *ops = pdev->dev.platform_data; |
88 | 88 | ||
89 | reg = ops->readb(M48T86_REG_B); | 89 | reg = ops->readbyte(M48T86_REG_B); |
90 | 90 | ||
91 | /* update flag and 24h mode */ | 91 | /* update flag and 24h mode */ |
92 | reg |= M48T86_REG_B_SET | M48T86_REG_B_H24; | 92 | reg |= M48T86_REG_B_SET | M48T86_REG_B_H24; |
93 | ops->writeb(reg, M48T86_REG_B); | 93 | ops->writebyte(reg, M48T86_REG_B); |
94 | 94 | ||
95 | if (reg & M48T86_REG_B_DM) { | 95 | if (reg & M48T86_REG_B_DM) { |
96 | /* data (binary) mode */ | 96 | /* data (binary) mode */ |
97 | ops->writeb(tm->tm_sec, M48T86_REG_SEC); | 97 | ops->writebyte(tm->tm_sec, M48T86_REG_SEC); |
98 | ops->writeb(tm->tm_min, M48T86_REG_MIN); | 98 | ops->writebyte(tm->tm_min, M48T86_REG_MIN); |
99 | ops->writeb(tm->tm_hour, M48T86_REG_HOUR); | 99 | ops->writebyte(tm->tm_hour, M48T86_REG_HOUR); |
100 | ops->writeb(tm->tm_mday, M48T86_REG_DOM); | 100 | ops->writebyte(tm->tm_mday, M48T86_REG_DOM); |
101 | ops->writeb(tm->tm_mon + 1, M48T86_REG_MONTH); | 101 | ops->writebyte(tm->tm_mon + 1, M48T86_REG_MONTH); |
102 | ops->writeb(tm->tm_year % 100, M48T86_REG_YEAR); | 102 | ops->writebyte(tm->tm_year % 100, M48T86_REG_YEAR); |
103 | ops->writeb(tm->tm_wday, M48T86_REG_DOW); | 103 | ops->writebyte(tm->tm_wday, M48T86_REG_DOW); |
104 | } else { | 104 | } else { |
105 | /* bcd mode */ | 105 | /* bcd mode */ |
106 | ops->writeb(BIN2BCD(tm->tm_sec), M48T86_REG_SEC); | 106 | ops->writebyte(BIN2BCD(tm->tm_sec), M48T86_REG_SEC); |
107 | ops->writeb(BIN2BCD(tm->tm_min), M48T86_REG_MIN); | 107 | ops->writebyte(BIN2BCD(tm->tm_min), M48T86_REG_MIN); |
108 | ops->writeb(BIN2BCD(tm->tm_hour), M48T86_REG_HOUR); | 108 | ops->writebyte(BIN2BCD(tm->tm_hour), M48T86_REG_HOUR); |
109 | ops->writeb(BIN2BCD(tm->tm_mday), M48T86_REG_DOM); | 109 | ops->writebyte(BIN2BCD(tm->tm_mday), M48T86_REG_DOM); |
110 | ops->writeb(BIN2BCD(tm->tm_mon + 1), M48T86_REG_MONTH); | 110 | ops->writebyte(BIN2BCD(tm->tm_mon + 1), M48T86_REG_MONTH); |
111 | ops->writeb(BIN2BCD(tm->tm_year % 100), M48T86_REG_YEAR); | 111 | ops->writebyte(BIN2BCD(tm->tm_year % 100), M48T86_REG_YEAR); |
112 | ops->writeb(BIN2BCD(tm->tm_wday), M48T86_REG_DOW); | 112 | ops->writebyte(BIN2BCD(tm->tm_wday), M48T86_REG_DOW); |
113 | } | 113 | } |
114 | 114 | ||
115 | /* update ended */ | 115 | /* update ended */ |
116 | reg &= ~M48T86_REG_B_SET; | 116 | reg &= ~M48T86_REG_B_SET; |
117 | ops->writeb(reg, M48T86_REG_B); | 117 | ops->writebyte(reg, M48T86_REG_B); |
118 | 118 | ||
119 | return 0; | 119 | return 0; |
120 | } | 120 | } |
@@ -125,12 +125,12 @@ static int m48t86_rtc_proc(struct device *dev, struct seq_file *seq) | |||
125 | struct platform_device *pdev = to_platform_device(dev); | 125 | struct platform_device *pdev = to_platform_device(dev); |
126 | struct m48t86_ops *ops = pdev->dev.platform_data; | 126 | struct m48t86_ops *ops = pdev->dev.platform_data; |
127 | 127 | ||
128 | reg = ops->readb(M48T86_REG_B); | 128 | reg = ops->readbyte(M48T86_REG_B); |
129 | 129 | ||
130 | seq_printf(seq, "mode\t\t: %s\n", | 130 | seq_printf(seq, "mode\t\t: %s\n", |
131 | (reg & M48T86_REG_B_DM) ? "binary" : "bcd"); | 131 | (reg & M48T86_REG_B_DM) ? "binary" : "bcd"); |
132 | 132 | ||
133 | reg = ops->readb(M48T86_REG_D); | 133 | reg = ops->readbyte(M48T86_REG_D); |
134 | 134 | ||
135 | seq_printf(seq, "battery\t\t: %s\n", | 135 | seq_printf(seq, "battery\t\t: %s\n", |
136 | (reg & M48T86_REG_D_VRT) ? "ok" : "exhausted"); | 136 | (reg & M48T86_REG_D_VRT) ? "ok" : "exhausted"); |
@@ -157,7 +157,7 @@ static int __devinit m48t86_rtc_probe(struct platform_device *dev) | |||
157 | platform_set_drvdata(dev, rtc); | 157 | platform_set_drvdata(dev, rtc); |
158 | 158 | ||
159 | /* read battery status */ | 159 | /* read battery status */ |
160 | reg = ops->readb(M48T86_REG_D); | 160 | reg = ops->readbyte(M48T86_REG_D); |
161 | dev_info(&dev->dev, "battery %s\n", | 161 | dev_info(&dev->dev, "battery %s\n", |
162 | (reg & M48T86_REG_D_VRT) ? "ok" : "exhausted"); | 162 | (reg & M48T86_REG_D_VRT) ? "ok" : "exhausted"); |
163 | 163 | ||
diff --git a/drivers/s390/cio/css.h b/drivers/s390/cio/css.h index 74a257b23383..e210f89a2449 100644 --- a/drivers/s390/cio/css.h +++ b/drivers/s390/cio/css.h | |||
@@ -45,11 +45,11 @@ struct pgid { | |||
45 | union { | 45 | union { |
46 | __u8 fc; /* SPID function code */ | 46 | __u8 fc; /* SPID function code */ |
47 | struct path_state ps; /* SNID path state */ | 47 | struct path_state ps; /* SNID path state */ |
48 | } inf; | 48 | } __attribute__ ((packed)) inf; |
49 | union { | 49 | union { |
50 | __u32 cpu_addr : 16; /* CPU address */ | 50 | __u32 cpu_addr : 16; /* CPU address */ |
51 | struct extended_cssid ext_cssid; | 51 | struct extended_cssid ext_cssid; |
52 | } pgid_high; | 52 | } __attribute__ ((packed)) pgid_high; |
53 | __u32 cpu_id : 24; /* CPU identification */ | 53 | __u32 cpu_id : 24; /* CPU identification */ |
54 | __u32 cpu_model : 16; /* CPU model */ | 54 | __u32 cpu_model : 16; /* CPU model */ |
55 | __u32 tod_high; /* high word TOD clock */ | 55 | __u32 tod_high; /* high word TOD clock */ |
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index 180b3bf8b90d..49ec562d7f60 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c | |||
@@ -749,7 +749,7 @@ ccw_device_irq(struct ccw_device *cdev, enum dev_event dev_event) | |||
749 | /* Unit check but no sense data. Need basic sense. */ | 749 | /* Unit check but no sense data. Need basic sense. */ |
750 | if (ccw_device_do_sense(cdev, irb) != 0) | 750 | if (ccw_device_do_sense(cdev, irb) != 0) |
751 | goto call_handler_unsol; | 751 | goto call_handler_unsol; |
752 | memcpy(irb, &cdev->private->irb, sizeof(struct irb)); | 752 | memcpy(&cdev->private->irb, irb, sizeof(struct irb)); |
753 | cdev->private->state = DEV_STATE_W4SENSE; | 753 | cdev->private->state = DEV_STATE_W4SENSE; |
754 | cdev->private->intparm = 0; | 754 | cdev->private->intparm = 0; |
755 | return; | 755 | return; |
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index fa476e7e0a48..b046ffa22101 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -4297,6 +4297,7 @@ static int ata_start_drive(struct ata_port *ap, struct ata_device *dev) | |||
4297 | int ata_device_resume(struct ata_port *ap, struct ata_device *dev) | 4297 | int ata_device_resume(struct ata_port *ap, struct ata_device *dev) |
4298 | { | 4298 | { |
4299 | if (ap->flags & ATA_FLAG_SUSPENDED) { | 4299 | if (ap->flags & ATA_FLAG_SUSPENDED) { |
4300 | ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 200000); | ||
4300 | ap->flags &= ~ATA_FLAG_SUSPENDED; | 4301 | ap->flags &= ~ATA_FLAG_SUSPENDED; |
4301 | ata_set_mode(ap); | 4302 | ata_set_mode(ap); |
4302 | } | 4303 | } |
diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c index fee843fab1c7..108910f512e4 100644 --- a/drivers/scsi/ppa.c +++ b/drivers/scsi/ppa.c | |||
@@ -982,6 +982,12 @@ static int device_check(ppa_struct *dev) | |||
982 | return -ENODEV; | 982 | return -ENODEV; |
983 | } | 983 | } |
984 | 984 | ||
985 | static int ppa_adjust_queue(struct scsi_device *device) | ||
986 | { | ||
987 | blk_queue_bounce_limit(device->request_queue, BLK_BOUNCE_HIGH); | ||
988 | return 0; | ||
989 | } | ||
990 | |||
985 | static struct scsi_host_template ppa_template = { | 991 | static struct scsi_host_template ppa_template = { |
986 | .module = THIS_MODULE, | 992 | .module = THIS_MODULE, |
987 | .proc_name = "ppa", | 993 | .proc_name = "ppa", |
@@ -997,6 +1003,7 @@ static struct scsi_host_template ppa_template = { | |||
997 | .cmd_per_lun = 1, | 1003 | .cmd_per_lun = 1, |
998 | .use_clustering = ENABLE_CLUSTERING, | 1004 | .use_clustering = ENABLE_CLUSTERING, |
999 | .can_queue = 1, | 1005 | .can_queue = 1, |
1006 | .slave_alloc = ppa_adjust_queue, | ||
1000 | }; | 1007 | }; |
1001 | 1008 | ||
1002 | /*************************************************************************** | 1009 | /*************************************************************************** |
diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c index f7264fd611c2..cb9082fd7e2f 100644 --- a/drivers/scsi/sata_sil24.c +++ b/drivers/scsi/sata_sil24.c | |||
@@ -454,7 +454,7 @@ static int sil24_softreset(struct ata_port *ap, int verbose, | |||
454 | */ | 454 | */ |
455 | msleep(10); | 455 | msleep(10); |
456 | 456 | ||
457 | prb->ctrl = PRB_CTRL_SRST; | 457 | prb->ctrl = cpu_to_le16(PRB_CTRL_SRST); |
458 | prb->fis[1] = 0; /* no PM yet */ | 458 | prb->fis[1] = 0; /* no PM yet */ |
459 | 459 | ||
460 | writel((u32)paddr, port + PORT_CMD_ACTIVATE); | 460 | writel((u32)paddr, port + PORT_CMD_ACTIVATE); |
@@ -551,9 +551,9 @@ static void sil24_qc_prep(struct ata_queued_cmd *qc) | |||
551 | 551 | ||
552 | if (qc->tf.protocol != ATA_PROT_ATAPI_NODATA) { | 552 | if (qc->tf.protocol != ATA_PROT_ATAPI_NODATA) { |
553 | if (qc->tf.flags & ATA_TFLAG_WRITE) | 553 | if (qc->tf.flags & ATA_TFLAG_WRITE) |
554 | prb->ctrl = PRB_CTRL_PACKET_WRITE; | 554 | prb->ctrl = cpu_to_le16(PRB_CTRL_PACKET_WRITE); |
555 | else | 555 | else |
556 | prb->ctrl = PRB_CTRL_PACKET_READ; | 556 | prb->ctrl = cpu_to_le16(PRB_CTRL_PACKET_READ); |
557 | } else | 557 | } else |
558 | prb->ctrl = 0; | 558 | prb->ctrl = 0; |
559 | 559 | ||
diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index 941c1e15c899..62f8cb7b3d2b 100644 --- a/drivers/scsi/scsi_devinfo.c +++ b/drivers/scsi/scsi_devinfo.c | |||
@@ -165,6 +165,7 @@ static struct { | |||
165 | {"HP", "HSV100", NULL, BLIST_REPORTLUN2 | BLIST_NOSTARTONADD}, | 165 | {"HP", "HSV100", NULL, BLIST_REPORTLUN2 | BLIST_NOSTARTONADD}, |
166 | {"HP", "C1557A", NULL, BLIST_FORCELUN}, | 166 | {"HP", "C1557A", NULL, BLIST_FORCELUN}, |
167 | {"HP", "C3323-300", "4269", BLIST_NOTQ}, | 167 | {"HP", "C3323-300", "4269", BLIST_NOTQ}, |
168 | {"HP", "C5713A", NULL, BLIST_NOREPORTLUN}, | ||
168 | {"IBM", "AuSaV1S2", NULL, BLIST_FORCELUN}, | 169 | {"IBM", "AuSaV1S2", NULL, BLIST_FORCELUN}, |
169 | {"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, | 170 | {"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, |
170 | {"IBM", "2105", NULL, BLIST_RETRY_HWERROR}, | 171 | {"IBM", "2105", NULL, BLIST_RETRY_HWERROR}, |
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 764a8b375ead..faee4757c03a 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -367,7 +367,7 @@ static int scsi_req_map_sg(struct request *rq, struct scatterlist *sgl, | |||
367 | int nsegs, unsigned bufflen, gfp_t gfp) | 367 | int nsegs, unsigned bufflen, gfp_t gfp) |
368 | { | 368 | { |
369 | struct request_queue *q = rq->q; | 369 | struct request_queue *q = rq->q; |
370 | int nr_pages = (bufflen + PAGE_SIZE - 1) >> PAGE_SHIFT; | 370 | int nr_pages = (bufflen + sgl[0].offset + PAGE_SIZE - 1) >> PAGE_SHIFT; |
371 | unsigned int data_len = 0, len, bytes, off; | 371 | unsigned int data_len = 0, len, bytes, off; |
372 | struct page *page; | 372 | struct page *page; |
373 | struct bio *bio = NULL; | 373 | struct bio *bio = NULL; |
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index 8b6d65e21bae..f3b16066387c 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c | |||
@@ -955,7 +955,8 @@ static int sas_user_scan(struct Scsi_Host *shost, uint channel, | |||
955 | list_for_each_entry(rphy, &sas_host->rphy_list, list) { | 955 | list_for_each_entry(rphy, &sas_host->rphy_list, list) { |
956 | struct sas_phy *parent = dev_to_phy(rphy->dev.parent); | 956 | struct sas_phy *parent = dev_to_phy(rphy->dev.parent); |
957 | 957 | ||
958 | if (rphy->scsi_target_id == -1) | 958 | if (rphy->identify.device_type != SAS_END_DEVICE || |
959 | rphy->scsi_target_id == -1) | ||
959 | continue; | 960 | continue; |
960 | 961 | ||
961 | if ((channel == SCAN_WILD_CARD || channel == parent->port_identifier) && | 962 | if ((channel == SCAN_WILD_CARD || channel == parent->port_identifier) && |
@@ -977,7 +978,6 @@ static int sas_user_scan(struct Scsi_Host *shost, uint channel, | |||
977 | #define SETUP_TEMPLATE(attrb, field, perm, test) \ | 978 | #define SETUP_TEMPLATE(attrb, field, perm, test) \ |
978 | i->private_##attrb[count] = class_device_attr_##field; \ | 979 | i->private_##attrb[count] = class_device_attr_##field; \ |
979 | i->private_##attrb[count].attr.mode = perm; \ | 980 | i->private_##attrb[count].attr.mode = perm; \ |
980 | i->private_##attrb[count].store = NULL; \ | ||
981 | i->attrb[count] = &i->private_##attrb[count]; \ | 981 | i->attrb[count] = &i->private_##attrb[count]; \ |
982 | if (test) \ | 982 | if (test) \ |
983 | count++ | 983 | count++ |
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c index 969f94900431..5cba59ad7dc5 100644 --- a/drivers/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/serial/cpm_uart/cpm_uart_core.c | |||
@@ -1164,14 +1164,16 @@ static int __init cpm_uart_console_setup(struct console *co, char *options) | |||
1164 | struct fs_uart_platform_info *pdata; | 1164 | struct fs_uart_platform_info *pdata; |
1165 | struct platform_device* pdev = early_uart_get_pdev(co->index); | 1165 | struct platform_device* pdev = early_uart_get_pdev(co->index); |
1166 | 1166 | ||
1167 | port = | ||
1168 | (struct uart_port *)&cpm_uart_ports[cpm_uart_port_map[co->index]]; | ||
1169 | pinfo = (struct uart_cpm_port *)port; | ||
1170 | if (!pdev) { | 1167 | if (!pdev) { |
1171 | pr_info("cpm_uart: console: compat mode\n"); | 1168 | pr_info("cpm_uart: console: compat mode\n"); |
1172 | /* compatibility - will be cleaned up */ | 1169 | /* compatibility - will be cleaned up */ |
1173 | cpm_uart_init_portdesc(); | 1170 | cpm_uart_init_portdesc(); |
1171 | } | ||
1174 | 1172 | ||
1173 | port = | ||
1174 | (struct uart_port *)&cpm_uart_ports[cpm_uart_port_map[co->index]]; | ||
1175 | pinfo = (struct uart_cpm_port *)port; | ||
1176 | if (!pdev) { | ||
1175 | if (pinfo->set_lineif) | 1177 | if (pinfo->set_lineif) |
1176 | pinfo->set_lineif(pinfo); | 1178 | pinfo->set_lineif(pinfo); |
1177 | } else { | 1179 | } else { |
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm2.c b/drivers/serial/cpm_uart/cpm_uart_cpm2.c index 4b2de08f46d0..cdba128250a9 100644 --- a/drivers/serial/cpm_uart/cpm_uart_cpm2.c +++ b/drivers/serial/cpm_uart/cpm_uart_cpm2.c | |||
@@ -213,7 +213,7 @@ int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con) | |||
213 | L1_CACHE_ALIGN(pinfo->tx_nrfifos * pinfo->tx_fifosize); | 213 | L1_CACHE_ALIGN(pinfo->tx_nrfifos * pinfo->tx_fifosize); |
214 | if (is_con) { | 214 | if (is_con) { |
215 | mem_addr = alloc_bootmem(memsz); | 215 | mem_addr = alloc_bootmem(memsz); |
216 | dma_addr = mem_addr; | 216 | dma_addr = virt_to_bus(mem_addr); |
217 | } | 217 | } |
218 | else | 218 | else |
219 | mem_addr = dma_alloc_coherent(NULL, memsz, &dma_addr, | 219 | mem_addr = dma_alloc_coherent(NULL, memsz, &dma_addr, |
diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c index 3d04b2def0f1..789450bb0bc9 100644 --- a/drivers/video/au1100fb.c +++ b/drivers/video/au1100fb.c | |||
@@ -214,10 +214,13 @@ int au1100fb_setmode(struct au1100fb_device *fbdev) | |||
214 | */ | 214 | */ |
215 | int au1100fb_fb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *fbi) | 215 | int au1100fb_fb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *fbi) |
216 | { | 216 | { |
217 | struct au1100fb_device *fbdev = to_au1100fb_device(fbi); | 217 | struct au1100fb_device *fbdev; |
218 | u32 *palette = fbdev->regs->lcd_pallettebase; | 218 | u32 *palette; |
219 | u32 value; | 219 | u32 value; |
220 | 220 | ||
221 | fbdev = to_au1100fb_device(fbi); | ||
222 | palette = fbdev->regs->lcd_pallettebase; | ||
223 | |||
221 | if (regno > (AU1100_LCD_NBR_PALETTE_ENTRIES - 1)) | 224 | if (regno > (AU1100_LCD_NBR_PALETTE_ENTRIES - 1)) |
222 | return -EINVAL; | 225 | return -EINVAL; |
223 | 226 | ||
@@ -316,9 +319,11 @@ int au1100fb_fb_blank(int blank_mode, struct fb_info *fbi) | |||
316 | */ | 319 | */ |
317 | int au1100fb_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *fbi) | 320 | int au1100fb_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *fbi) |
318 | { | 321 | { |
319 | struct au1100fb_device *fbdev = to_au1100fb_device(fbi); | 322 | struct au1100fb_device *fbdev; |
320 | int dy; | 323 | int dy; |
321 | 324 | ||
325 | fbdev = to_au1100fb_device(fbi); | ||
326 | |||
322 | print_dbg("fb_pan_display %p %p", var, fbi); | 327 | print_dbg("fb_pan_display %p %p", var, fbi); |
323 | 328 | ||
324 | if (!var || !fbdev) { | 329 | if (!var || !fbdev) { |
@@ -382,10 +387,12 @@ void au1100fb_fb_rotate(struct fb_info *fbi, int angle) | |||
382 | */ | 387 | */ |
383 | int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma) | 388 | int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma) |
384 | { | 389 | { |
385 | struct au1100fb_device *fbdev = to_au1100fb_device(fbi); | 390 | struct au1100fb_device *fbdev; |
386 | unsigned int len; | 391 | unsigned int len; |
387 | unsigned long start=0, off; | 392 | unsigned long start=0, off; |
388 | 393 | ||
394 | fbdev = to_au1100fb_device(fbi); | ||
395 | |||
389 | if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) { | 396 | if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) { |
390 | return -EINVAL; | 397 | return -EINVAL; |
391 | } | 398 | } |
@@ -467,7 +474,7 @@ int au1100fb_drv_probe(struct device *dev) | |||
467 | 474 | ||
468 | if (!request_mem_region(au1100fb_fix.mmio_start, au1100fb_fix.mmio_len, | 475 | if (!request_mem_region(au1100fb_fix.mmio_start, au1100fb_fix.mmio_len, |
469 | DRIVER_NAME)) { | 476 | DRIVER_NAME)) { |
470 | print_err("fail to lock memory region at 0x%08x", | 477 | print_err("fail to lock memory region at 0x%08lx", |
471 | au1100fb_fix.mmio_start); | 478 | au1100fb_fix.mmio_start); |
472 | return -EBUSY; | 479 | return -EBUSY; |
473 | } | 480 | } |
@@ -595,13 +602,13 @@ int au1100fb_drv_remove(struct device *dev) | |||
595 | return 0; | 602 | return 0; |
596 | } | 603 | } |
597 | 604 | ||
598 | int au1100fb_drv_suspend(struct device *dev, u32 state, u32 level) | 605 | int au1100fb_drv_suspend(struct device *dev, pm_message_t state) |
599 | { | 606 | { |
600 | /* TODO */ | 607 | /* TODO */ |
601 | return 0; | 608 | return 0; |
602 | } | 609 | } |
603 | 610 | ||
604 | int au1100fb_drv_resume(struct device *dev, u32 level) | 611 | int au1100fb_drv_resume(struct device *dev) |
605 | { | 612 | { |
606 | /* TODO */ | 613 | /* TODO */ |
607 | return 0; | 614 | return 0; |
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index ca020719d20b..953eb8c171d6 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -2631,7 +2631,7 @@ static int fbcon_scrolldelta(struct vc_data *vc, int lines) | |||
2631 | scr_memcpyw((u16 *) q, (u16 *) p, | 2631 | scr_memcpyw((u16 *) q, (u16 *) p, |
2632 | vc->vc_size_row); | 2632 | vc->vc_size_row); |
2633 | } | 2633 | } |
2634 | softback_in = p; | 2634 | softback_in = softback_curr = p; |
2635 | update_region(vc, vc->vc_origin, | 2635 | update_region(vc, vc->vc_origin, |
2636 | logo_lines * vc->vc_cols); | 2636 | logo_lines * vc->vc_cols); |
2637 | } | 2637 | } |
diff --git a/drivers/video/maxinefb.c b/drivers/video/maxinefb.c index 743e7ad26acc..f85421bf7cb5 100644 --- a/drivers/video/maxinefb.c +++ b/drivers/video/maxinefb.c | |||
@@ -55,7 +55,7 @@ static struct fb_var_screeninfo maxinefb_defined = { | |||
55 | }; | 55 | }; |
56 | 56 | ||
57 | static struct fb_fix_screeninfo maxinefb_fix = { | 57 | static struct fb_fix_screeninfo maxinefb_fix = { |
58 | .id = "Maxine onboard graphics 1024x768x8", | 58 | .id = "Maxine", |
59 | .smem_len = (1024*768), | 59 | .smem_len = (1024*768), |
60 | .type = FB_TYPE_PACKED_PIXELS, | 60 | .type = FB_TYPE_PACKED_PIXELS, |
61 | .visual = FB_VISUAL_PSEUDOCOLOR, | 61 | .visual = FB_VISUAL_PSEUDOCOLOR, |
@@ -107,8 +107,6 @@ static int maxinefb_setcolreg(unsigned regno, unsigned red, unsigned green, | |||
107 | 107 | ||
108 | static struct fb_ops maxinefb_ops = { | 108 | static struct fb_ops maxinefb_ops = { |
109 | .owner = THIS_MODULE, | 109 | .owner = THIS_MODULE, |
110 | .fb_get_fix = gen_get_fix, | ||
111 | .fb_get_var = gen_get_var, | ||
112 | .fb_setcolreg = maxinefb_setcolreg, | 110 | .fb_setcolreg = maxinefb_setcolreg, |
113 | .fb_fillrect = cfb_fillrect, | 111 | .fb_fillrect = cfb_fillrect, |
114 | .fb_copyarea = cfb_copyarea, | 112 | .fb_copyarea = cfb_copyarea, |