diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/agp/Kconfig | 2 | ||||
-rw-r--r-- | drivers/char/agp/amd64-agp.c | 3 | ||||
-rw-r--r-- | drivers/char/agp/via-agp.c | 7 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 38 | ||||
-rw-r--r-- | drivers/char/pcmcia/cm4000_cs.c | 2 | ||||
-rw-r--r-- | drivers/char/tpm/tpm_bios.c | 89 | ||||
-rw-r--r-- | drivers/char/tpm/tpm_tis.c | 4 | ||||
-rw-r--r-- | drivers/char/vt.c | 8 |
8 files changed, 63 insertions, 90 deletions
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/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index f621168f38ae..8ea70625f7ea 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c | |||
@@ -457,10 +457,6 @@ static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev, | |||
457 | } | 457 | } |
458 | 458 | ||
459 | vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0)); | 459 | vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0)); |
460 | if ((vendor & 0xFFFF) == 0xFFFF) { | ||
461 | rc = -ENODEV; | ||
462 | goto out_err; | ||
463 | } | ||
464 | 460 | ||
465 | /* Default timeouts */ | 461 | /* Default timeouts */ |
466 | chip->vendor.timeout_a = msecs_to_jiffies(TIS_SHORT_TIMEOUT); | 462 | chip->vendor.timeout_a = msecs_to_jiffies(TIS_SHORT_TIMEOUT); |
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 | */ |