diff options
Diffstat (limited to 'drivers')
58 files changed, 531 insertions, 245 deletions
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 4875f0149eb4..9685b75898ed 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig | |||
@@ -117,6 +117,7 @@ config ACPI_BUTTON | |||
117 | config ACPI_VIDEO | 117 | config ACPI_VIDEO |
118 | tristate "Video" | 118 | tristate "Video" |
119 | depends on X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL | 119 | depends on X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL |
120 | depends on INPUT | ||
120 | help | 121 | help |
121 | This driver implement the ACPI Extensions For Display Adapters | 122 | This driver implement the ACPI Extensions For Display Adapters |
122 | for integrated graphics devices on motherboard, as specified in | 123 | for integrated graphics devices on motherboard, as specified in |
diff --git a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c index cf69c0040a39..8181afbd1d4d 100644 --- a/drivers/acpi/hardware/hwsleep.c +++ b/drivers/acpi/hardware/hwsleep.c | |||
@@ -234,15 +234,11 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state) | |||
234 | "While executing method _SST")); | 234 | "While executing method _SST")); |
235 | } | 235 | } |
236 | 236 | ||
237 | /* | 237 | /* Disable/Clear all GPEs */ |
238 | * 1) Disable/Clear all GPEs | 238 | |
239 | */ | ||
240 | status = acpi_hw_disable_all_gpes(); | 239 | status = acpi_hw_disable_all_gpes(); |
241 | if (ACPI_FAILURE(status)) { | ||
242 | return_ACPI_STATUS(status); | ||
243 | } | ||
244 | 240 | ||
245 | return_ACPI_STATUS(AE_OK); | 241 | return_ACPI_STATUS(status); |
246 | } | 242 | } |
247 | 243 | ||
248 | ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep) | 244 | ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep) |
diff --git a/drivers/acpi/sleep/Makefile b/drivers/acpi/sleep/Makefile index ba9bd403d443..f1fb888c2d29 100644 --- a/drivers/acpi/sleep/Makefile +++ b/drivers/acpi/sleep/Makefile | |||
@@ -1,5 +1,5 @@ | |||
1 | obj-y := wakeup.o | 1 | obj-y := wakeup.o |
2 | obj-$(CONFIG_ACPI_SLEEP) += main.o | 2 | obj-y += main.o |
3 | obj-$(CONFIG_ACPI_SLEEP) += proc.o | 3 | obj-$(CONFIG_ACPI_SLEEP) += proc.o |
4 | 4 | ||
5 | EXTRA_CFLAGS += $(ACPI_CFLAGS) | 5 | EXTRA_CFLAGS += $(ACPI_CFLAGS) |
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c index 85633c585aab..caf8721ae6fb 100644 --- a/drivers/acpi/sleep/main.c +++ b/drivers/acpi/sleep/main.c | |||
@@ -24,7 +24,30 @@ | |||
24 | 24 | ||
25 | u8 sleep_states[ACPI_S_STATE_COUNT]; | 25 | u8 sleep_states[ACPI_S_STATE_COUNT]; |
26 | 26 | ||
27 | #ifdef CONFIG_PM_SLEEP | ||
27 | static u32 acpi_target_sleep_state = ACPI_STATE_S0; | 28 | static u32 acpi_target_sleep_state = ACPI_STATE_S0; |
29 | #endif | ||
30 | |||
31 | int acpi_sleep_prepare(u32 acpi_state) | ||
32 | { | ||
33 | #ifdef CONFIG_ACPI_SLEEP | ||
34 | /* do we have a wakeup address for S2 and S3? */ | ||
35 | if (acpi_state == ACPI_STATE_S3) { | ||
36 | if (!acpi_wakeup_address) { | ||
37 | return -EFAULT; | ||
38 | } | ||
39 | acpi_set_firmware_waking_vector((acpi_physical_address) | ||
40 | virt_to_phys((void *) | ||
41 | acpi_wakeup_address)); | ||
42 | |||
43 | } | ||
44 | ACPI_FLUSH_CPU_CACHE(); | ||
45 | acpi_enable_wakeup_device_prep(acpi_state); | ||
46 | #endif | ||
47 | acpi_gpe_sleep_prepare(acpi_state); | ||
48 | acpi_enter_sleep_state_prep(acpi_state); | ||
49 | return 0; | ||
50 | } | ||
28 | 51 | ||
29 | #ifdef CONFIG_SUSPEND | 52 | #ifdef CONFIG_SUSPEND |
30 | static struct pm_ops acpi_pm_ops; | 53 | static struct pm_ops acpi_pm_ops; |
@@ -60,27 +83,6 @@ static int acpi_pm_set_target(suspend_state_t pm_state) | |||
60 | return error; | 83 | return error; |
61 | } | 84 | } |
62 | 85 | ||
63 | int acpi_sleep_prepare(u32 acpi_state) | ||
64 | { | ||
65 | #ifdef CONFIG_ACPI_SLEEP | ||
66 | /* do we have a wakeup address for S2 and S3? */ | ||
67 | if (acpi_state == ACPI_STATE_S3) { | ||
68 | if (!acpi_wakeup_address) { | ||
69 | return -EFAULT; | ||
70 | } | ||
71 | acpi_set_firmware_waking_vector((acpi_physical_address) | ||
72 | virt_to_phys((void *) | ||
73 | acpi_wakeup_address)); | ||
74 | |||
75 | } | ||
76 | ACPI_FLUSH_CPU_CACHE(); | ||
77 | acpi_enable_wakeup_device_prep(acpi_state); | ||
78 | #endif | ||
79 | acpi_gpe_sleep_prepare(acpi_state); | ||
80 | acpi_enter_sleep_state_prep(acpi_state); | ||
81 | return 0; | ||
82 | } | ||
83 | |||
84 | /** | 86 | /** |
85 | * acpi_pm_prepare - Do preliminary suspend work. | 87 | * acpi_pm_prepare - Do preliminary suspend work. |
86 | * @pm_state: ignored | 88 | * @pm_state: ignored |
@@ -254,6 +256,11 @@ static int acpi_hibernation_enter(void) | |||
254 | 256 | ||
255 | static void acpi_hibernation_finish(void) | 257 | static void acpi_hibernation_finish(void) |
256 | { | 258 | { |
259 | /* | ||
260 | * If ACPI is not enabled by the BIOS and the boot kernel, we need to | ||
261 | * enable it here. | ||
262 | */ | ||
263 | acpi_enable(); | ||
257 | acpi_leave_sleep_state(ACPI_STATE_S4); | 264 | acpi_leave_sleep_state(ACPI_STATE_S4); |
258 | acpi_disable_wakeup_device(ACPI_STATE_S4); | 265 | acpi_disable_wakeup_device(ACPI_STATE_S4); |
259 | 266 | ||
@@ -299,6 +306,7 @@ int acpi_suspend(u32 acpi_state) | |||
299 | return -EINVAL; | 306 | return -EINVAL; |
300 | } | 307 | } |
301 | 308 | ||
309 | #ifdef CONFIG_PM_SLEEP | ||
302 | /** | 310 | /** |
303 | * acpi_pm_device_sleep_state - return preferred power state of ACPI device | 311 | * acpi_pm_device_sleep_state - return preferred power state of ACPI device |
304 | * in the system sleep state given by %acpi_target_sleep_state | 312 | * in the system sleep state given by %acpi_target_sleep_state |
@@ -373,6 +381,7 @@ int acpi_pm_device_sleep_state(struct device *dev, int wake, int *d_min_p) | |||
373 | *d_min_p = d_min; | 381 | *d_min_p = d_min; |
374 | return d_max; | 382 | return d_max; |
375 | } | 383 | } |
384 | #endif | ||
376 | 385 | ||
377 | static void acpi_power_off_prepare(void) | 386 | static void acpi_power_off_prepare(void) |
378 | { | 387 | { |
diff --git a/drivers/acpi/tables/tbutils.c b/drivers/acpi/tables/tbutils.c index 8cc9492ffbf2..5f1d85f2ffe4 100644 --- a/drivers/acpi/tables/tbutils.c +++ b/drivers/acpi/tables/tbutils.c | |||
@@ -400,7 +400,7 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags) | |||
400 | u32 table_count; | 400 | u32 table_count; |
401 | struct acpi_table_header *table; | 401 | struct acpi_table_header *table; |
402 | acpi_physical_address address; | 402 | acpi_physical_address address; |
403 | acpi_physical_address rsdt_address; | 403 | acpi_physical_address uninitialized_var(rsdt_address); |
404 | u32 length; | 404 | u32 length; |
405 | u8 *table_entry; | 405 | u8 *table_entry; |
406 | acpi_status status; | 406 | acpi_status status; |
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 3b8bf1812dc8..6996eb5b7506 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
@@ -921,6 +921,13 @@ static int piix_broken_suspend(void) | |||
921 | { | 921 | { |
922 | static struct dmi_system_id sysids[] = { | 922 | static struct dmi_system_id sysids[] = { |
923 | { | 923 | { |
924 | .ident = "TECRA M3", | ||
925 | .matches = { | ||
926 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | ||
927 | DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M3"), | ||
928 | }, | ||
929 | }, | ||
930 | { | ||
924 | .ident = "TECRA M5", | 931 | .ident = "TECRA M5", |
925 | .matches = { | 932 | .matches = { |
926 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | 933 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), |
diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c index 4ca7fd6118d5..5dea3584c6c2 100644 --- a/drivers/ata/pata_ixp4xx_cf.c +++ b/drivers/ata/pata_ixp4xx_cf.c | |||
@@ -189,6 +189,9 @@ static __devinit int ixp4xx_pata_probe(struct platform_device *pdev) | |||
189 | data->cs0 = devm_ioremap(&pdev->dev, cs0->start, 0x1000); | 189 | data->cs0 = devm_ioremap(&pdev->dev, cs0->start, 0x1000); |
190 | data->cs1 = devm_ioremap(&pdev->dev, cs1->start, 0x1000); | 190 | data->cs1 = devm_ioremap(&pdev->dev, cs1->start, 0x1000); |
191 | 191 | ||
192 | if (!data->cs0 || !data->cs1) | ||
193 | return -ENOMEM; | ||
194 | |||
192 | irq = platform_get_irq(pdev, 0); | 195 | irq = platform_get_irq(pdev, 0); |
193 | if (irq) | 196 | if (irq) |
194 | set_irq_type(irq, IRQT_RISING); | 197 | set_irq_type(irq, IRQT_RISING); |
diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c index ae206f35f747..b45506f1ef73 100644 --- a/drivers/ata/pata_marvell.c +++ b/drivers/ata/pata_marvell.c | |||
@@ -44,10 +44,10 @@ static int marvell_pre_reset(struct ata_port *ap, unsigned long deadline) | |||
44 | return -ENOMEM; | 44 | return -ENOMEM; |
45 | printk("BAR5:"); | 45 | printk("BAR5:"); |
46 | for(i = 0; i <= 0x0F; i++) | 46 | for(i = 0; i <= 0x0F; i++) |
47 | printk("%02X:%02X ", i, readb(barp + i)); | 47 | printk("%02X:%02X ", i, ioread8(barp + i)); |
48 | printk("\n"); | 48 | printk("\n"); |
49 | 49 | ||
50 | devices = readl(barp + 0x0C); | 50 | devices = ioread32(barp + 0x0C); |
51 | pci_iounmap(pdev, barp); | 51 | pci_iounmap(pdev, barp); |
52 | 52 | ||
53 | if ((pdev->device == 0x6145) && (ap->port_no == 0) && | 53 | if ((pdev->device == 0x6145) && (ap->port_no == 0) && |
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c index 2bd7645f1a88..cce2834b2b60 100644 --- a/drivers/ata/pata_sis.c +++ b/drivers/ata/pata_sis.c | |||
@@ -375,8 +375,9 @@ static void sis_66_set_dmamode (struct ata_port *ap, struct ata_device *adev) | |||
375 | int drive_pci = sis_old_port_base(adev); | 375 | int drive_pci = sis_old_port_base(adev); |
376 | u16 timing; | 376 | u16 timing; |
377 | 377 | ||
378 | /* MWDMA 0-2 and UDMA 0-5 */ | ||
378 | const u16 mwdma_bits[] = { 0x008, 0x302, 0x301 }; | 379 | const u16 mwdma_bits[] = { 0x008, 0x302, 0x301 }; |
379 | const u16 udma_bits[] = { 0xF000, 0xD000, 0xB000, 0xA000, 0x9000}; | 380 | const u16 udma_bits[] = { 0xF000, 0xD000, 0xB000, 0xA000, 0x9000, 0x8000 }; |
380 | 381 | ||
381 | pci_read_config_word(pdev, drive_pci, &timing); | 382 | pci_read_config_word(pdev, drive_pci, &timing); |
382 | 383 | ||
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 11bf6c7ac122..cb7dec97fee6 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -313,7 +313,10 @@ enum { | |||
313 | #define IS_GEN_IIE(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_IIE) | 313 | #define IS_GEN_IIE(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_IIE) |
314 | 314 | ||
315 | enum { | 315 | enum { |
316 | MV_DMA_BOUNDARY = 0xffffffffU, | 316 | /* DMA boundary 0xffff is required by the s/g splitting |
317 | * we need on /length/ in mv_fill-sg(). | ||
318 | */ | ||
319 | MV_DMA_BOUNDARY = 0xffffU, | ||
317 | 320 | ||
318 | /* mask of register bits containing lower 32 bits | 321 | /* mask of register bits containing lower 32 bits |
319 | * of EDMA request queue DMA address | 322 | * of EDMA request queue DMA address |
@@ -448,7 +451,7 @@ static struct scsi_host_template mv5_sht = { | |||
448 | .queuecommand = ata_scsi_queuecmd, | 451 | .queuecommand = ata_scsi_queuecmd, |
449 | .can_queue = ATA_DEF_QUEUE, | 452 | .can_queue = ATA_DEF_QUEUE, |
450 | .this_id = ATA_SHT_THIS_ID, | 453 | .this_id = ATA_SHT_THIS_ID, |
451 | .sg_tablesize = MV_MAX_SG_CT, | 454 | .sg_tablesize = MV_MAX_SG_CT / 2, |
452 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | 455 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, |
453 | .emulated = ATA_SHT_EMULATED, | 456 | .emulated = ATA_SHT_EMULATED, |
454 | .use_clustering = 1, | 457 | .use_clustering = 1, |
@@ -466,7 +469,7 @@ static struct scsi_host_template mv6_sht = { | |||
466 | .queuecommand = ata_scsi_queuecmd, | 469 | .queuecommand = ata_scsi_queuecmd, |
467 | .can_queue = ATA_DEF_QUEUE, | 470 | .can_queue = ATA_DEF_QUEUE, |
468 | .this_id = ATA_SHT_THIS_ID, | 471 | .this_id = ATA_SHT_THIS_ID, |
469 | .sg_tablesize = MV_MAX_SG_CT, | 472 | .sg_tablesize = MV_MAX_SG_CT / 2, |
470 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | 473 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, |
471 | .emulated = ATA_SHT_EMULATED, | 474 | .emulated = ATA_SHT_EMULATED, |
472 | .use_clustering = 1, | 475 | .use_clustering = 1, |
@@ -1139,15 +1142,27 @@ static unsigned int mv_fill_sg(struct ata_queued_cmd *qc) | |||
1139 | dma_addr_t addr = sg_dma_address(sg); | 1142 | dma_addr_t addr = sg_dma_address(sg); |
1140 | u32 sg_len = sg_dma_len(sg); | 1143 | u32 sg_len = sg_dma_len(sg); |
1141 | 1144 | ||
1142 | mv_sg->addr = cpu_to_le32(addr & 0xffffffff); | 1145 | while (sg_len) { |
1143 | mv_sg->addr_hi = cpu_to_le32((addr >> 16) >> 16); | 1146 | u32 offset = addr & 0xffff; |
1144 | mv_sg->flags_size = cpu_to_le32(sg_len & 0xffff); | 1147 | u32 len = sg_len; |
1148 | |||
1149 | if ((offset + sg_len > 0x10000)) | ||
1150 | len = 0x10000 - offset; | ||
1151 | |||
1152 | mv_sg->addr = cpu_to_le32(addr & 0xffffffff); | ||
1153 | mv_sg->addr_hi = cpu_to_le32((addr >> 16) >> 16); | ||
1154 | mv_sg->flags_size = cpu_to_le32(len); | ||
1145 | 1155 | ||
1146 | if (ata_sg_is_last(sg, qc)) | 1156 | sg_len -= len; |
1147 | mv_sg->flags_size |= cpu_to_le32(EPRD_FLAG_END_OF_TBL); | 1157 | addr += len; |
1158 | |||
1159 | if (!sg_len && ata_sg_is_last(sg, qc)) | ||
1160 | mv_sg->flags_size |= cpu_to_le32(EPRD_FLAG_END_OF_TBL); | ||
1161 | |||
1162 | mv_sg++; | ||
1163 | n_sg++; | ||
1164 | } | ||
1148 | 1165 | ||
1149 | mv_sg++; | ||
1150 | n_sg++; | ||
1151 | } | 1166 | } |
1152 | 1167 | ||
1153 | return n_sg; | 1168 | return n_sg; |
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c index ef83e6b1e314..233e88693395 100644 --- a/drivers/ata/sata_sil24.c +++ b/drivers/ata/sata_sil24.c | |||
@@ -888,6 +888,16 @@ static inline void sil24_host_intr(struct ata_port *ap) | |||
888 | u32 slot_stat, qc_active; | 888 | u32 slot_stat, qc_active; |
889 | int rc; | 889 | int rc; |
890 | 890 | ||
891 | /* If PCIX_IRQ_WOC, there's an inherent race window between | ||
892 | * clearing IRQ pending status and reading PORT_SLOT_STAT | ||
893 | * which may cause spurious interrupts afterwards. This is | ||
894 | * unavoidable and much better than losing interrupts which | ||
895 | * happens if IRQ pending is cleared after reading | ||
896 | * PORT_SLOT_STAT. | ||
897 | */ | ||
898 | if (ap->flags & SIL24_FLAG_PCIX_IRQ_WOC) | ||
899 | writel(PORT_IRQ_COMPLETE, port + PORT_IRQ_STAT); | ||
900 | |||
891 | slot_stat = readl(port + PORT_SLOT_STAT); | 901 | slot_stat = readl(port + PORT_SLOT_STAT); |
892 | 902 | ||
893 | if (unlikely(slot_stat & HOST_SSTAT_ATTN)) { | 903 | if (unlikely(slot_stat & HOST_SSTAT_ATTN)) { |
@@ -895,9 +905,6 @@ static inline void sil24_host_intr(struct ata_port *ap) | |||
895 | return; | 905 | return; |
896 | } | 906 | } |
897 | 907 | ||
898 | if (ap->flags & SIL24_FLAG_PCIX_IRQ_WOC) | ||
899 | writel(PORT_IRQ_COMPLETE, port + PORT_IRQ_STAT); | ||
900 | |||
901 | qc_active = slot_stat & ~HOST_SSTAT_ATTN; | 908 | qc_active = slot_stat & ~HOST_SSTAT_ATTN; |
902 | rc = ata_qc_complete_multiple(ap, qc_active, sil24_finish_qc); | 909 | rc = ata_qc_complete_multiple(ap, qc_active, sil24_finish_qc); |
903 | if (rc > 0) | 910 | if (rc > 0) |
@@ -910,7 +917,8 @@ static inline void sil24_host_intr(struct ata_port *ap) | |||
910 | return; | 917 | return; |
911 | } | 918 | } |
912 | 919 | ||
913 | if (ata_ratelimit()) | 920 | /* spurious interrupts are expected if PCIX_IRQ_WOC */ |
921 | if (!(ap->flags & SIL24_FLAG_PCIX_IRQ_WOC) && ata_ratelimit()) | ||
914 | ata_port_printk(ap, KERN_INFO, "spurious interrupt " | 922 | ata_port_printk(ap, KERN_INFO, "spurious interrupt " |
915 | "(slot_stat 0x%x active_tag %d sactive 0x%x)\n", | 923 | "(slot_stat 0x%x active_tag %d sactive 0x%x)\n", |
916 | slot_stat, ap->active_tag, ap->sactive); | 924 | slot_stat, ap->active_tag, ap->sactive); |
diff --git a/drivers/base/core.c b/drivers/base/core.c index 6de33d7a29ba..ec86d6fc2360 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -284,6 +284,7 @@ static ssize_t show_uevent(struct device *dev, struct device_attribute *attr, | |||
284 | 284 | ||
285 | /* let the kset specific function add its keys */ | 285 | /* let the kset specific function add its keys */ |
286 | pos = data; | 286 | pos = data; |
287 | memset(envp, 0, sizeof(envp)); | ||
287 | retval = kset->uevent_ops->uevent(kset, &dev->kobj, | 288 | retval = kset->uevent_ops->uevent(kset, &dev->kobj, |
288 | envp, ARRAY_SIZE(envp), | 289 | envp, ARRAY_SIZE(envp), |
289 | pos, PAGE_SIZE); | 290 | pos, PAGE_SIZE); |
@@ -585,9 +586,13 @@ void device_initialize(struct device *dev) | |||
585 | static struct kobject * get_device_parent(struct device *dev, | 586 | static struct kobject * get_device_parent(struct device *dev, |
586 | struct device *parent) | 587 | struct device *parent) |
587 | { | 588 | { |
588 | /* Set the parent to the class, not the parent device */ | 589 | /* |
589 | /* this keeps sysfs from having a symlink to make old udevs happy */ | 590 | * Set the parent to the class, not the parent device |
590 | if (dev->class) | 591 | * for topmost devices in class hierarchy. |
592 | * This keeps sysfs from having a symlink to make old | ||
593 | * udevs happy | ||
594 | */ | ||
595 | if (dev->class && (!parent || parent->class != dev->class)) | ||
591 | return &dev->class->subsys.kobj; | 596 | return &dev->class->subsys.kobj; |
592 | else if (parent) | 597 | else if (parent) |
593 | return &parent->kobj; | 598 | return &parent->kobj; |
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 67ee3d4b2878..79245714f0a7 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c | |||
@@ -1032,6 +1032,10 @@ int cdrom_open(struct cdrom_device_info *cdi, struct inode *ip, struct file *fp) | |||
1032 | check_disk_change(ip->i_bdev); | 1032 | check_disk_change(ip->i_bdev); |
1033 | return 0; | 1033 | return 0; |
1034 | err_release: | 1034 | err_release: |
1035 | if (CDROM_CAN(CDC_LOCK) && cdi->options & CDO_LOCK) { | ||
1036 | cdi->ops->lock_door(cdi, 0); | ||
1037 | cdinfo(CD_OPEN, "door unlocked.\n"); | ||
1038 | } | ||
1035 | cdi->ops->release(cdi); | 1039 | cdi->ops->release(cdi); |
1036 | err: | 1040 | err: |
1037 | cdi->use_count--; | 1041 | cdi->use_count--; |
diff --git a/drivers/char/Makefile b/drivers/char/Makefile index d68ddbe70f73..c78ff26647ee 100644 --- a/drivers/char/Makefile +++ b/drivers/char/Makefile | |||
@@ -129,7 +129,7 @@ $(obj)/defkeymap.o: $(obj)/defkeymap.c | |||
129 | 129 | ||
130 | ifdef GENERATE_KEYMAP | 130 | ifdef GENERATE_KEYMAP |
131 | 131 | ||
132 | $(obj)/defkeymap.c $(obj)/%.c: $(src)/%.map | 132 | $(obj)/defkeymap.c: $(obj)/%.c: $(src)/%.map |
133 | loadkeys --mktable $< > $@.tmp | 133 | loadkeys --mktable $< > $@.tmp |
134 | sed -e 's/^static *//' $@.tmp > $@ | 134 | sed -e 's/^static *//' $@.tmp > $@ |
135 | rm $@.tmp | 135 | rm $@.tmp |
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index a5d0e95a227a..141ca176c397 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
@@ -506,11 +506,6 @@ static void intel_i830_init_gtt_entries(void) | |||
506 | break; | 506 | break; |
507 | } | 507 | } |
508 | } else { | 508 | } else { |
509 | /* G33's GTT stolen memory is separate from gfx data | ||
510 | * stolen memory. | ||
511 | */ | ||
512 | if (IS_G33) | ||
513 | size = 0; | ||
514 | switch (gmch_ctrl & I855_GMCH_GMS_MASK) { | 509 | switch (gmch_ctrl & I855_GMCH_GMS_MASK) { |
515 | case I855_GMCH_GMS_STOLEN_1M: | 510 | case I855_GMCH_GMS_STOLEN_1M: |
516 | gtt_entries = MB(1) - KB(size); | 511 | gtt_entries = MB(1) - KB(size); |
diff --git a/drivers/char/drm/i915_drv.h b/drivers/char/drm/i915_drv.h index 737088bd0780..28b98733beb8 100644 --- a/drivers/char/drm/i915_drv.h +++ b/drivers/char/drm/i915_drv.h | |||
@@ -210,6 +210,12 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); | |||
210 | #define I915REG_INT_MASK_R 0x020a8 | 210 | #define I915REG_INT_MASK_R 0x020a8 |
211 | #define I915REG_INT_ENABLE_R 0x020a0 | 211 | #define I915REG_INT_ENABLE_R 0x020a0 |
212 | 212 | ||
213 | #define I915REG_PIPEASTAT 0x70024 | ||
214 | #define I915REG_PIPEBSTAT 0x71024 | ||
215 | |||
216 | #define I915_VBLANK_INTERRUPT_ENABLE (1UL<<17) | ||
217 | #define I915_VBLANK_CLEAR (1UL<<1) | ||
218 | |||
213 | #define SRX_INDEX 0x3c4 | 219 | #define SRX_INDEX 0x3c4 |
214 | #define SRX_DATA 0x3c5 | 220 | #define SRX_DATA 0x3c5 |
215 | #define SR01 1 | 221 | #define SR01 1 |
diff --git a/drivers/char/drm/i915_irq.c b/drivers/char/drm/i915_irq.c index 4b4b2ce89863..bb8e9e9c8201 100644 --- a/drivers/char/drm/i915_irq.c +++ b/drivers/char/drm/i915_irq.c | |||
@@ -214,6 +214,10 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS) | |||
214 | struct drm_device *dev = (struct drm_device *) arg; | 214 | struct drm_device *dev = (struct drm_device *) arg; |
215 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | 215 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; |
216 | u16 temp; | 216 | u16 temp; |
217 | u32 pipea_stats, pipeb_stats; | ||
218 | |||
219 | pipea_stats = I915_READ(I915REG_PIPEASTAT); | ||
220 | pipeb_stats = I915_READ(I915REG_PIPEBSTAT); | ||
217 | 221 | ||
218 | temp = I915_READ16(I915REG_INT_IDENTITY_R); | 222 | temp = I915_READ16(I915REG_INT_IDENTITY_R); |
219 | 223 | ||
@@ -225,6 +229,8 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS) | |||
225 | return IRQ_NONE; | 229 | return IRQ_NONE; |
226 | 230 | ||
227 | I915_WRITE16(I915REG_INT_IDENTITY_R, temp); | 231 | I915_WRITE16(I915REG_INT_IDENTITY_R, temp); |
232 | (void) I915_READ16(I915REG_INT_IDENTITY_R); | ||
233 | DRM_READMEMORYBARRIER(); | ||
228 | 234 | ||
229 | dev_priv->sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv); | 235 | dev_priv->sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv); |
230 | 236 | ||
@@ -252,6 +258,12 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS) | |||
252 | 258 | ||
253 | if (dev_priv->swaps_pending > 0) | 259 | if (dev_priv->swaps_pending > 0) |
254 | drm_locked_tasklet(dev, i915_vblank_tasklet); | 260 | drm_locked_tasklet(dev, i915_vblank_tasklet); |
261 | I915_WRITE(I915REG_PIPEASTAT, | ||
262 | pipea_stats|I915_VBLANK_INTERRUPT_ENABLE| | ||
263 | I915_VBLANK_CLEAR); | ||
264 | I915_WRITE(I915REG_PIPEBSTAT, | ||
265 | pipeb_stats|I915_VBLANK_INTERRUPT_ENABLE| | ||
266 | I915_VBLANK_CLEAR); | ||
255 | } | 267 | } |
256 | 268 | ||
257 | return IRQ_HANDLED; | 269 | return IRQ_HANDLED; |
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 7ecffc9c738f..4c16778e3f84 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c | |||
@@ -62,6 +62,8 @@ | |||
62 | 62 | ||
63 | static u32 hpet_nhpet, hpet_max_freq = HPET_USER_FREQ; | 63 | static u32 hpet_nhpet, hpet_max_freq = HPET_USER_FREQ; |
64 | 64 | ||
65 | /* This clocksource driver currently only works on ia64 */ | ||
66 | #ifdef CONFIG_IA64 | ||
65 | static void __iomem *hpet_mctr; | 67 | static void __iomem *hpet_mctr; |
66 | 68 | ||
67 | static cycle_t read_hpet(void) | 69 | static cycle_t read_hpet(void) |
@@ -79,6 +81,7 @@ static struct clocksource clocksource_hpet = { | |||
79 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 81 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
80 | }; | 82 | }; |
81 | static struct clocksource *hpet_clocksource; | 83 | static struct clocksource *hpet_clocksource; |
84 | #endif | ||
82 | 85 | ||
83 | /* A lock for concurrent access by app and isr hpet activity. */ | 86 | /* A lock for concurrent access by app and isr hpet activity. */ |
84 | static DEFINE_SPINLOCK(hpet_lock); | 87 | static DEFINE_SPINLOCK(hpet_lock); |
@@ -943,14 +946,14 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data) | |||
943 | printk(KERN_DEBUG "%s: 0x%lx is busy\n", | 946 | printk(KERN_DEBUG "%s: 0x%lx is busy\n", |
944 | __FUNCTION__, hdp->hd_phys_address); | 947 | __FUNCTION__, hdp->hd_phys_address); |
945 | iounmap(hdp->hd_address); | 948 | iounmap(hdp->hd_address); |
946 | return -EBUSY; | 949 | return AE_ALREADY_EXISTS; |
947 | } | 950 | } |
948 | } else if (res->type == ACPI_RESOURCE_TYPE_FIXED_MEMORY32) { | 951 | } else if (res->type == ACPI_RESOURCE_TYPE_FIXED_MEMORY32) { |
949 | struct acpi_resource_fixed_memory32 *fixmem32; | 952 | struct acpi_resource_fixed_memory32 *fixmem32; |
950 | 953 | ||
951 | fixmem32 = &res->data.fixed_memory32; | 954 | fixmem32 = &res->data.fixed_memory32; |
952 | if (!fixmem32) | 955 | if (!fixmem32) |
953 | return -EINVAL; | 956 | return AE_NO_MEMORY; |
954 | 957 | ||
955 | hdp->hd_phys_address = fixmem32->address; | 958 | hdp->hd_phys_address = fixmem32->address; |
956 | hdp->hd_address = ioremap(fixmem32->address, | 959 | hdp->hd_address = ioremap(fixmem32->address, |
@@ -960,7 +963,7 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data) | |||
960 | printk(KERN_DEBUG "%s: 0x%lx is busy\n", | 963 | printk(KERN_DEBUG "%s: 0x%lx is busy\n", |
961 | __FUNCTION__, hdp->hd_phys_address); | 964 | __FUNCTION__, hdp->hd_phys_address); |
962 | iounmap(hdp->hd_address); | 965 | iounmap(hdp->hd_address); |
963 | return -EBUSY; | 966 | return AE_ALREADY_EXISTS; |
964 | } | 967 | } |
965 | } else if (res->type == ACPI_RESOURCE_TYPE_EXTENDED_IRQ) { | 968 | } else if (res->type == ACPI_RESOURCE_TYPE_EXTENDED_IRQ) { |
966 | struct acpi_resource_extended_irq *irqp; | 969 | struct acpi_resource_extended_irq *irqp; |
diff --git a/drivers/char/mspec.c b/drivers/char/mspec.c index 049a46cc9f87..04ac155d3a07 100644 --- a/drivers/char/mspec.c +++ b/drivers/char/mspec.c | |||
@@ -155,23 +155,22 @@ mspec_open(struct vm_area_struct *vma) | |||
155 | * mspec_close | 155 | * mspec_close |
156 | * | 156 | * |
157 | * Called when unmapping a device mapping. Frees all mspec pages | 157 | * Called when unmapping a device mapping. Frees all mspec pages |
158 | * belonging to the vma. | 158 | * belonging to all the vma's sharing this vma_data structure. |
159 | */ | 159 | */ |
160 | static void | 160 | static void |
161 | mspec_close(struct vm_area_struct *vma) | 161 | mspec_close(struct vm_area_struct *vma) |
162 | { | 162 | { |
163 | struct vma_data *vdata; | 163 | struct vma_data *vdata; |
164 | int index, last_index, result; | 164 | int index, last_index; |
165 | unsigned long my_page; | 165 | unsigned long my_page; |
166 | 166 | ||
167 | vdata = vma->vm_private_data; | 167 | vdata = vma->vm_private_data; |
168 | 168 | ||
169 | BUG_ON(vma->vm_start < vdata->vm_start || vma->vm_end > vdata->vm_end); | 169 | if (!atomic_dec_and_test(&vdata->refcnt)) |
170 | return; | ||
170 | 171 | ||
171 | spin_lock(&vdata->lock); | 172 | last_index = (vdata->vm_end - vdata->vm_start) >> PAGE_SHIFT; |
172 | index = (vma->vm_start - vdata->vm_start) >> PAGE_SHIFT; | 173 | for (index = 0; index < last_index; index++) { |
173 | last_index = (vma->vm_end - vdata->vm_start) >> PAGE_SHIFT; | ||
174 | for (; index < last_index; index++) { | ||
175 | if (vdata->maddr[index] == 0) | 174 | if (vdata->maddr[index] == 0) |
176 | continue; | 175 | continue; |
177 | /* | 176 | /* |
@@ -180,20 +179,12 @@ mspec_close(struct vm_area_struct *vma) | |||
180 | */ | 179 | */ |
181 | my_page = vdata->maddr[index]; | 180 | my_page = vdata->maddr[index]; |
182 | vdata->maddr[index] = 0; | 181 | vdata->maddr[index] = 0; |
183 | spin_unlock(&vdata->lock); | 182 | if (!mspec_zero_block(my_page, PAGE_SIZE)) |
184 | result = mspec_zero_block(my_page, PAGE_SIZE); | ||
185 | if (!result) | ||
186 | uncached_free_page(my_page); | 183 | uncached_free_page(my_page); |
187 | else | 184 | else |
188 | printk(KERN_WARNING "mspec_close(): " | 185 | printk(KERN_WARNING "mspec_close(): " |
189 | "failed to zero page %i\n", | 186 | "failed to zero page %ld\n", my_page); |
190 | result); | ||
191 | spin_lock(&vdata->lock); | ||
192 | } | 187 | } |
193 | spin_unlock(&vdata->lock); | ||
194 | |||
195 | if (!atomic_dec_and_test(&vdata->refcnt)) | ||
196 | return; | ||
197 | 188 | ||
198 | if (vdata->flags & VMD_VMALLOCED) | 189 | if (vdata->flags & VMD_VMALLOCED) |
199 | vfree(vdata); | 190 | vfree(vdata); |
@@ -201,7 +192,6 @@ mspec_close(struct vm_area_struct *vma) | |||
201 | kfree(vdata); | 192 | kfree(vdata); |
202 | } | 193 | } |
203 | 194 | ||
204 | |||
205 | /* | 195 | /* |
206 | * mspec_nopfn | 196 | * mspec_nopfn |
207 | * | 197 | * |
diff --git a/drivers/char/random.c b/drivers/char/random.c index 397c714cf2ba..af274e5a25ee 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c | |||
@@ -1550,11 +1550,13 @@ __u32 secure_tcp_sequence_number(__be32 saddr, __be32 daddr, | |||
1550 | * As close as possible to RFC 793, which | 1550 | * As close as possible to RFC 793, which |
1551 | * suggests using a 250 kHz clock. | 1551 | * suggests using a 250 kHz clock. |
1552 | * Further reading shows this assumes 2 Mb/s networks. | 1552 | * Further reading shows this assumes 2 Mb/s networks. |
1553 | * For 10 Gb/s Ethernet, a 1 GHz clock is appropriate. | 1553 | * For 10 Mb/s Ethernet, a 1 MHz clock is appropriate. |
1554 | * That's funny, Linux has one built in! Use it! | 1554 | * For 10 Gb/s Ethernet, a 1 GHz clock should be ok, but |
1555 | * (Networks are faster now - should this be increased?) | 1555 | * we also need to limit the resolution so that the u32 seq |
1556 | * overlaps less than one time per MSL (2 minutes). | ||
1557 | * Choosing a clock of 64 ns period is OK. (period of 274 s) | ||
1556 | */ | 1558 | */ |
1557 | seq += ktime_get_real().tv64; | 1559 | seq += ktime_get_real().tv64 >> 6; |
1558 | #if 0 | 1560 | #if 0 |
1559 | printk("init_seq(%lx, %lx, %d, %d) = %d\n", | 1561 | printk("init_seq(%lx, %lx, %d, %d) = %d\n", |
1560 | saddr, daddr, sport, dport, seq); | 1562 | saddr, daddr, sport, dport, seq); |
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c index c6f6f4209739..7a61a2a9aafe 100644 --- a/drivers/char/vt_ioctl.c +++ b/drivers/char/vt_ioctl.c | |||
@@ -770,6 +770,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file, | |||
770 | /* | 770 | /* |
771 | * Switching-from response | 771 | * Switching-from response |
772 | */ | 772 | */ |
773 | acquire_console_sem(); | ||
773 | if (vc->vt_newvt >= 0) { | 774 | if (vc->vt_newvt >= 0) { |
774 | if (arg == 0) | 775 | if (arg == 0) |
775 | /* | 776 | /* |
@@ -784,7 +785,6 @@ int vt_ioctl(struct tty_struct *tty, struct file * file, | |||
784 | * complete the switch. | 785 | * complete the switch. |
785 | */ | 786 | */ |
786 | int newvt; | 787 | int newvt; |
787 | acquire_console_sem(); | ||
788 | newvt = vc->vt_newvt; | 788 | newvt = vc->vt_newvt; |
789 | vc->vt_newvt = -1; | 789 | vc->vt_newvt = -1; |
790 | i = vc_allocate(newvt); | 790 | i = vc_allocate(newvt); |
@@ -798,7 +798,6 @@ int vt_ioctl(struct tty_struct *tty, struct file * file, | |||
798 | * other console switches.. | 798 | * other console switches.. |
799 | */ | 799 | */ |
800 | complete_change_console(vc_cons[newvt].d); | 800 | complete_change_console(vc_cons[newvt].d); |
801 | release_console_sem(); | ||
802 | } | 801 | } |
803 | } | 802 | } |
804 | 803 | ||
@@ -810,9 +809,12 @@ int vt_ioctl(struct tty_struct *tty, struct file * file, | |||
810 | /* | 809 | /* |
811 | * If it's just an ACK, ignore it | 810 | * If it's just an ACK, ignore it |
812 | */ | 811 | */ |
813 | if (arg != VT_ACKACQ) | 812 | if (arg != VT_ACKACQ) { |
813 | release_console_sem(); | ||
814 | return -EINVAL; | 814 | return -EINVAL; |
815 | } | ||
815 | } | 816 | } |
817 | release_console_sem(); | ||
816 | 818 | ||
817 | return 0; | 819 | return 0; |
818 | 820 | ||
@@ -1030,7 +1032,7 @@ static DECLARE_WAIT_QUEUE_HEAD(vt_activate_queue); | |||
1030 | 1032 | ||
1031 | /* | 1033 | /* |
1032 | * Sleeps until a vt is activated, or the task is interrupted. Returns | 1034 | * Sleeps until a vt is activated, or the task is interrupted. Returns |
1033 | * 0 if activation, -EINTR if interrupted. | 1035 | * 0 if activation, -EINTR if interrupted by a signal handler. |
1034 | */ | 1036 | */ |
1035 | int vt_waitactive(int vt) | 1037 | int vt_waitactive(int vt) |
1036 | { | 1038 | { |
@@ -1055,7 +1057,7 @@ int vt_waitactive(int vt) | |||
1055 | break; | 1057 | break; |
1056 | } | 1058 | } |
1057 | release_console_sem(); | 1059 | release_console_sem(); |
1058 | retval = -EINTR; | 1060 | retval = -ERESTARTNOHAND; |
1059 | if (signal_pending(current)) | 1061 | if (signal_pending(current)) |
1060 | break; | 1062 | break; |
1061 | schedule(); | 1063 | schedule(); |
@@ -1208,15 +1210,18 @@ void change_console(struct vc_data *new_vc) | |||
1208 | /* | 1210 | /* |
1209 | * Send the signal as privileged - kill_pid() will | 1211 | * Send the signal as privileged - kill_pid() will |
1210 | * tell us if the process has gone or something else | 1212 | * tell us if the process has gone or something else |
1211 | * is awry | 1213 | * is awry. |
1214 | * | ||
1215 | * We need to set vt_newvt *before* sending the signal or we | ||
1216 | * have a race. | ||
1212 | */ | 1217 | */ |
1218 | vc->vt_newvt = new_vc->vc_num; | ||
1213 | if (kill_pid(vc->vt_pid, vc->vt_mode.relsig, 1) == 0) { | 1219 | if (kill_pid(vc->vt_pid, vc->vt_mode.relsig, 1) == 0) { |
1214 | /* | 1220 | /* |
1215 | * It worked. Mark the vt to switch to and | 1221 | * It worked. Mark the vt to switch to and |
1216 | * return. The process needs to send us a | 1222 | * return. The process needs to send us a |
1217 | * VT_RELDISP ioctl to complete the switch. | 1223 | * VT_RELDISP ioctl to complete the switch. |
1218 | */ | 1224 | */ |
1219 | vc->vt_newvt = new_vc->vc_num; | ||
1220 | return; | 1225 | return; |
1221 | } | 1226 | } |
1222 | 1227 | ||
diff --git a/drivers/firewire/Kconfig b/drivers/firewire/Kconfig index d011a76f8e7a..fe9e768cfbc4 100644 --- a/drivers/firewire/Kconfig +++ b/drivers/firewire/Kconfig | |||
@@ -11,7 +11,8 @@ config FIREWIRE | |||
11 | This is the "Juju" FireWire stack, a new alternative implementation | 11 | This is the "Juju" FireWire stack, a new alternative implementation |
12 | designed for robustness and simplicity. You can build either this | 12 | designed for robustness and simplicity. You can build either this |
13 | stack, or the classic stack (the ieee1394 driver, ohci1394 etc.) | 13 | stack, or the classic stack (the ieee1394 driver, ohci1394 etc.) |
14 | or both. | 14 | or both. Please read http://wiki.linux1394.org/JujuMigration before |
15 | you enable the new stack. | ||
15 | 16 | ||
16 | To compile this driver as a module, say M here: the module will be | 17 | To compile this driver as a module, say M here: the module will be |
17 | called firewire-core. It functionally replaces ieee1394, raw1394, | 18 | called firewire-core. It functionally replaces ieee1394, raw1394, |
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index f19eb6daeefd..2fb047b898aa 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -1546,6 +1546,7 @@ static struct pci_device_id pmac_ide_pci_match[] = { | |||
1546 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 1546 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
1547 | { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_IPID2_ATA, | 1547 | { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_IPID2_ATA, |
1548 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 1548 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
1549 | {}, | ||
1549 | }; | 1550 | }; |
1550 | 1551 | ||
1551 | static struct pci_driver pmac_ide_pci_driver = { | 1552 | static struct pci_driver pmac_ide_pci_driver = { |
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index ba0428d872aa..85c51bdc36f1 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c | |||
@@ -1211,12 +1211,42 @@ static void set_datagram_seg(struct mlx4_wqe_datagram_seg *dseg, | |||
1211 | dseg->qkey = cpu_to_be32(wr->wr.ud.remote_qkey); | 1211 | dseg->qkey = cpu_to_be32(wr->wr.ud.remote_qkey); |
1212 | } | 1212 | } |
1213 | 1213 | ||
1214 | static void set_data_seg(struct mlx4_wqe_data_seg *dseg, | 1214 | static void set_mlx_icrc_seg(void *dseg) |
1215 | struct ib_sge *sg) | 1215 | { |
1216 | u32 *t = dseg; | ||
1217 | struct mlx4_wqe_inline_seg *iseg = dseg; | ||
1218 | |||
1219 | t[1] = 0; | ||
1220 | |||
1221 | /* | ||
1222 | * Need a barrier here before writing the byte_count field to | ||
1223 | * make sure that all the data is visible before the | ||
1224 | * byte_count field is set. Otherwise, if the segment begins | ||
1225 | * a new cacheline, the HCA prefetcher could grab the 64-byte | ||
1226 | * chunk and get a valid (!= * 0xffffffff) byte count but | ||
1227 | * stale data, and end up sending the wrong data. | ||
1228 | */ | ||
1229 | wmb(); | ||
1230 | |||
1231 | iseg->byte_count = cpu_to_be32((1 << 31) | 4); | ||
1232 | } | ||
1233 | |||
1234 | static void set_data_seg(struct mlx4_wqe_data_seg *dseg, struct ib_sge *sg) | ||
1216 | { | 1235 | { |
1217 | dseg->byte_count = cpu_to_be32(sg->length); | ||
1218 | dseg->lkey = cpu_to_be32(sg->lkey); | 1236 | dseg->lkey = cpu_to_be32(sg->lkey); |
1219 | dseg->addr = cpu_to_be64(sg->addr); | 1237 | dseg->addr = cpu_to_be64(sg->addr); |
1238 | |||
1239 | /* | ||
1240 | * Need a barrier here before writing the byte_count field to | ||
1241 | * make sure that all the data is visible before the | ||
1242 | * byte_count field is set. Otherwise, if the segment begins | ||
1243 | * a new cacheline, the HCA prefetcher could grab the 64-byte | ||
1244 | * chunk and get a valid (!= * 0xffffffff) byte count but | ||
1245 | * stale data, and end up sending the wrong data. | ||
1246 | */ | ||
1247 | wmb(); | ||
1248 | |||
1249 | dseg->byte_count = cpu_to_be32(sg->length); | ||
1220 | } | 1250 | } |
1221 | 1251 | ||
1222 | int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, | 1252 | int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, |
@@ -1225,6 +1255,7 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, | |||
1225 | struct mlx4_ib_qp *qp = to_mqp(ibqp); | 1255 | struct mlx4_ib_qp *qp = to_mqp(ibqp); |
1226 | void *wqe; | 1256 | void *wqe; |
1227 | struct mlx4_wqe_ctrl_seg *ctrl; | 1257 | struct mlx4_wqe_ctrl_seg *ctrl; |
1258 | struct mlx4_wqe_data_seg *dseg; | ||
1228 | unsigned long flags; | 1259 | unsigned long flags; |
1229 | int nreq; | 1260 | int nreq; |
1230 | int err = 0; | 1261 | int err = 0; |
@@ -1324,22 +1355,27 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, | |||
1324 | break; | 1355 | break; |
1325 | } | 1356 | } |
1326 | 1357 | ||
1327 | for (i = 0; i < wr->num_sge; ++i) { | 1358 | /* |
1328 | set_data_seg(wqe, wr->sg_list + i); | 1359 | * Write data segments in reverse order, so as to |
1360 | * overwrite cacheline stamp last within each | ||
1361 | * cacheline. This avoids issues with WQE | ||
1362 | * prefetching. | ||
1363 | */ | ||
1329 | 1364 | ||
1330 | wqe += sizeof (struct mlx4_wqe_data_seg); | 1365 | dseg = wqe; |
1331 | size += sizeof (struct mlx4_wqe_data_seg) / 16; | 1366 | dseg += wr->num_sge - 1; |
1332 | } | 1367 | size += wr->num_sge * (sizeof (struct mlx4_wqe_data_seg) / 16); |
1333 | 1368 | ||
1334 | /* Add one more inline data segment for ICRC for MLX sends */ | 1369 | /* Add one more inline data segment for ICRC for MLX sends */ |
1335 | if (qp->ibqp.qp_type == IB_QPT_SMI || qp->ibqp.qp_type == IB_QPT_GSI) { | 1370 | if (unlikely(qp->ibqp.qp_type == IB_QPT_SMI || |
1336 | ((struct mlx4_wqe_inline_seg *) wqe)->byte_count = | 1371 | qp->ibqp.qp_type == IB_QPT_GSI)) { |
1337 | cpu_to_be32((1 << 31) | 4); | 1372 | set_mlx_icrc_seg(dseg + 1); |
1338 | ((u32 *) wqe)[1] = 0; | ||
1339 | wqe += sizeof (struct mlx4_wqe_data_seg); | ||
1340 | size += sizeof (struct mlx4_wqe_data_seg) / 16; | 1373 | size += sizeof (struct mlx4_wqe_data_seg) / 16; |
1341 | } | 1374 | } |
1342 | 1375 | ||
1376 | for (i = wr->num_sge - 1; i >= 0; --i, --dseg) | ||
1377 | set_data_seg(dseg, wr->sg_list + i); | ||
1378 | |||
1343 | ctrl->fence_size = (wr->send_flags & IB_SEND_FENCE ? | 1379 | ctrl->fence_size = (wr->send_flags & IB_SEND_FENCE ? |
1344 | MLX4_WQE_CTRL_FENCE : 0) | size; | 1380 | MLX4_WQE_CTRL_FENCE : 0) | size; |
1345 | 1381 | ||
diff --git a/drivers/input/joystick/Kconfig b/drivers/input/joystick/Kconfig index e2abe18e575d..7c662ee594a3 100644 --- a/drivers/input/joystick/Kconfig +++ b/drivers/input/joystick/Kconfig | |||
@@ -277,7 +277,7 @@ config JOYSTICK_XPAD_FF | |||
277 | 277 | ||
278 | config JOYSTICK_XPAD_LEDS | 278 | config JOYSTICK_XPAD_LEDS |
279 | bool "LED Support for Xbox360 controller 'BigX' LED" | 279 | bool "LED Support for Xbox360 controller 'BigX' LED" |
280 | depends on LEDS_CLASS && JOYSTICK_XPAD | 280 | depends on JOYSTICK_XPAD && (LEDS_CLASS=y || LEDS_CLASS=JOYSTICK_XPAD) |
281 | ---help--- | 281 | ---help--- |
282 | This option enables support for the LED which surrounds the Big X on | 282 | This option enables support for the LED which surrounds the Big X on |
283 | XBox 360 controller. | 283 | XBox 360 controller. |
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c index 2bea1b2c631c..a1804bfdbb8c 100644 --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c | |||
@@ -328,6 +328,7 @@ static void atp_complete(struct urb* urb) | |||
328 | { | 328 | { |
329 | int x, y, x_z, y_z, x_f, y_f; | 329 | int x, y, x_z, y_z, x_f, y_f; |
330 | int retval, i, j; | 330 | int retval, i, j; |
331 | int key; | ||
331 | struct atp *dev = urb->context; | 332 | struct atp *dev = urb->context; |
332 | 333 | ||
333 | switch (urb->status) { | 334 | switch (urb->status) { |
@@ -468,6 +469,7 @@ static void atp_complete(struct urb* urb) | |||
468 | ATP_XFACT, &x_z, &x_f); | 469 | ATP_XFACT, &x_z, &x_f); |
469 | y = atp_calculate_abs(dev->xy_acc + ATP_XSENSORS, ATP_YSENSORS, | 470 | y = atp_calculate_abs(dev->xy_acc + ATP_XSENSORS, ATP_YSENSORS, |
470 | ATP_YFACT, &y_z, &y_f); | 471 | ATP_YFACT, &y_z, &y_f); |
472 | key = dev->data[dev->datalen - 1] & 1; | ||
471 | 473 | ||
472 | if (x && y) { | 474 | if (x && y) { |
473 | if (dev->x_old != -1) { | 475 | if (dev->x_old != -1) { |
@@ -505,7 +507,7 @@ static void atp_complete(struct urb* urb) | |||
505 | the first touch unless reinitialised. Do so if it's been | 507 | the first touch unless reinitialised. Do so if it's been |
506 | idle for a while in order to avoid waking the kernel up | 508 | idle for a while in order to avoid waking the kernel up |
507 | several hundred times a second */ | 509 | several hundred times a second */ |
508 | if (atp_is_geyser_3(dev)) { | 510 | if (!key && atp_is_geyser_3(dev)) { |
509 | dev->idlecount++; | 511 | dev->idlecount++; |
510 | if (dev->idlecount == 10) { | 512 | if (dev->idlecount == 10) { |
511 | dev->valid = 0; | 513 | dev->valid = 0; |
@@ -514,7 +516,7 @@ static void atp_complete(struct urb* urb) | |||
514 | } | 516 | } |
515 | } | 517 | } |
516 | 518 | ||
517 | input_report_key(dev->input, BTN_LEFT, dev->data[dev->datalen - 1] & 1); | 519 | input_report_key(dev->input, BTN_LEFT, key); |
518 | input_sync(dev->input); | 520 | input_sync(dev->input); |
519 | 521 | ||
520 | exit: | 522 | exit: |
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c index ec5f4046412f..4910bca52640 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c | |||
@@ -1135,7 +1135,7 @@ isdn_read(struct file *file, char __user *buf, size_t count, loff_t * off) | |||
1135 | if (count > dev->drv[drvidx]->stavail) | 1135 | if (count > dev->drv[drvidx]->stavail) |
1136 | count = dev->drv[drvidx]->stavail; | 1136 | count = dev->drv[drvidx]->stavail; |
1137 | len = dev->drv[drvidx]->interface->readstat(buf, count, | 1137 | len = dev->drv[drvidx]->interface->readstat(buf, count, |
1138 | drvidx, isdn_minor2chan(minor)); | 1138 | drvidx, isdn_minor2chan(minor - ISDN_MINOR_CTRL)); |
1139 | if (len < 0) { | 1139 | if (len < 0) { |
1140 | retval = len; | 1140 | retval = len; |
1141 | goto out; | 1141 | goto out; |
@@ -1207,7 +1207,8 @@ isdn_write(struct file *file, const char __user *buf, size_t count, loff_t * off | |||
1207 | */ | 1207 | */ |
1208 | if (dev->drv[drvidx]->interface->writecmd) | 1208 | if (dev->drv[drvidx]->interface->writecmd) |
1209 | retval = dev->drv[drvidx]->interface-> | 1209 | retval = dev->drv[drvidx]->interface-> |
1210 | writecmd(buf, count, drvidx, isdn_minor2chan(minor)); | 1210 | writecmd(buf, count, drvidx, |
1211 | isdn_minor2chan(minor - ISDN_MINOR_CTRL)); | ||
1211 | else | 1212 | else |
1212 | retval = count; | 1213 | retval = count; |
1213 | goto out; | 1214 | goto out; |
diff --git a/drivers/lguest/lguest_asm.S b/drivers/lguest/lguest_asm.S index f182c6a36209..1ddcd5cd20f6 100644 --- a/drivers/lguest/lguest_asm.S +++ b/drivers/lguest/lguest_asm.S | |||
@@ -22,8 +22,9 @@ | |||
22 | jmp lguest_init | 22 | jmp lguest_init |
23 | 23 | ||
24 | /*G:055 We create a macro which puts the assembler code between lgstart_ and | 24 | /*G:055 We create a macro which puts the assembler code between lgstart_ and |
25 | * lgend_ markers. These templates end up in the .init.text section, so they | 25 | * lgend_ markers. These templates are put in the .text section: they can't be |
26 | * are discarded after boot. */ | 26 | * discarded after boot as we may need to patch modules, too. */ |
27 | .text | ||
27 | #define LGUEST_PATCH(name, insns...) \ | 28 | #define LGUEST_PATCH(name, insns...) \ |
28 | lgstart_##name: insns; lgend_##name:; \ | 29 | lgstart_##name: insns; lgend_##name:; \ |
29 | .globl lgstart_##name; .globl lgend_##name | 30 | .globl lgstart_##name; .globl lgend_##name |
@@ -34,7 +35,6 @@ LGUEST_PATCH(popf, movl %eax, lguest_data+LGUEST_DATA_irq_enabled) | |||
34 | LGUEST_PATCH(pushf, movl lguest_data+LGUEST_DATA_irq_enabled, %eax) | 35 | LGUEST_PATCH(pushf, movl lguest_data+LGUEST_DATA_irq_enabled, %eax) |
35 | /*:*/ | 36 | /*:*/ |
36 | 37 | ||
37 | .text | ||
38 | /* These demark the EIP range where host should never deliver interrupts. */ | 38 | /* These demark the EIP range where host should never deliver interrupts. */ |
39 | .global lguest_noirq_start | 39 | .global lguest_noirq_start |
40 | .global lguest_noirq_end | 40 | .global lguest_noirq_end |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 4d63773ee73a..f96dea975fa5 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -514,7 +514,7 @@ static void ops_complete_biofill(void *stripe_head_ref) | |||
514 | struct stripe_head *sh = stripe_head_ref; | 514 | struct stripe_head *sh = stripe_head_ref; |
515 | struct bio *return_bi = NULL; | 515 | struct bio *return_bi = NULL; |
516 | raid5_conf_t *conf = sh->raid_conf; | 516 | raid5_conf_t *conf = sh->raid_conf; |
517 | int i, more_to_read = 0; | 517 | int i; |
518 | 518 | ||
519 | pr_debug("%s: stripe %llu\n", __FUNCTION__, | 519 | pr_debug("%s: stripe %llu\n", __FUNCTION__, |
520 | (unsigned long long)sh->sector); | 520 | (unsigned long long)sh->sector); |
@@ -522,16 +522,14 @@ static void ops_complete_biofill(void *stripe_head_ref) | |||
522 | /* clear completed biofills */ | 522 | /* clear completed biofills */ |
523 | for (i = sh->disks; i--; ) { | 523 | for (i = sh->disks; i--; ) { |
524 | struct r5dev *dev = &sh->dev[i]; | 524 | struct r5dev *dev = &sh->dev[i]; |
525 | /* check if this stripe has new incoming reads */ | ||
526 | if (dev->toread) | ||
527 | more_to_read++; | ||
528 | 525 | ||
529 | /* acknowledge completion of a biofill operation */ | 526 | /* acknowledge completion of a biofill operation */ |
530 | /* and check if we need to reply to a read request | 527 | /* and check if we need to reply to a read request, |
531 | */ | 528 | * new R5_Wantfill requests are held off until |
532 | if (test_bit(R5_Wantfill, &dev->flags) && !dev->toread) { | 529 | * !test_bit(STRIPE_OP_BIOFILL, &sh->ops.pending) |
530 | */ | ||
531 | if (test_and_clear_bit(R5_Wantfill, &dev->flags)) { | ||
533 | struct bio *rbi, *rbi2; | 532 | struct bio *rbi, *rbi2; |
534 | clear_bit(R5_Wantfill, &dev->flags); | ||
535 | 533 | ||
536 | /* The access to dev->read is outside of the | 534 | /* The access to dev->read is outside of the |
537 | * spin_lock_irq(&conf->device_lock), but is protected | 535 | * spin_lock_irq(&conf->device_lock), but is protected |
@@ -558,8 +556,7 @@ static void ops_complete_biofill(void *stripe_head_ref) | |||
558 | 556 | ||
559 | return_io(return_bi); | 557 | return_io(return_bi); |
560 | 558 | ||
561 | if (more_to_read) | 559 | set_bit(STRIPE_HANDLE, &sh->state); |
562 | set_bit(STRIPE_HANDLE, &sh->state); | ||
563 | release_stripe(sh); | 560 | release_stripe(sh); |
564 | } | 561 | } |
565 | 562 | ||
diff --git a/drivers/media/video/ivtv/ivtv-fileops.c b/drivers/media/video/ivtv/ivtv-fileops.c index 0285c4a830eb..66ea3cbc369c 100644 --- a/drivers/media/video/ivtv/ivtv-fileops.c +++ b/drivers/media/video/ivtv/ivtv-fileops.c | |||
@@ -754,9 +754,11 @@ static void ivtv_stop_decoding(struct ivtv_open_id *id, int flags, u64 pts) | |||
754 | ivtv_yuv_close(itv); | 754 | ivtv_yuv_close(itv); |
755 | } | 755 | } |
756 | if (s->type == IVTV_DEC_STREAM_TYPE_YUV && itv->output_mode == OUT_YUV) | 756 | if (s->type == IVTV_DEC_STREAM_TYPE_YUV && itv->output_mode == OUT_YUV) |
757 | itv->output_mode = OUT_NONE; | 757 | itv->output_mode = OUT_NONE; |
758 | else if (s->type == IVTV_DEC_STREAM_TYPE_YUV && itv->output_mode == OUT_UDMA_YUV) | ||
759 | itv->output_mode = OUT_NONE; | ||
758 | else if (s->type == IVTV_DEC_STREAM_TYPE_MPG && itv->output_mode == OUT_MPG) | 760 | else if (s->type == IVTV_DEC_STREAM_TYPE_MPG && itv->output_mode == OUT_MPG) |
759 | itv->output_mode = OUT_NONE; | 761 | itv->output_mode = OUT_NONE; |
760 | 762 | ||
761 | itv->speed = 0; | 763 | itv->speed = 0; |
762 | clear_bit(IVTV_F_I_DEC_PAUSED, &itv->i_flags); | 764 | clear_bit(IVTV_F_I_DEC_PAUSED, &itv->i_flags); |
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c index e3371f972240..0cb006f2943d 100644 --- a/drivers/media/video/usbvision/usbvision-video.c +++ b/drivers/media/video/usbvision/usbvision-video.c | |||
@@ -1387,7 +1387,6 @@ static const struct file_operations usbvision_fops = { | |||
1387 | .ioctl = video_ioctl2, | 1387 | .ioctl = video_ioctl2, |
1388 | .llseek = no_llseek, | 1388 | .llseek = no_llseek, |
1389 | /* .poll = video_poll, */ | 1389 | /* .poll = video_poll, */ |
1390 | .mmap = usbvision_v4l2_mmap, | ||
1391 | .compat_ioctl = v4l_compat_ioctl32, | 1390 | .compat_ioctl = v4l_compat_ioctl32, |
1392 | }; | 1391 | }; |
1393 | static struct video_device usbvision_video_template = { | 1392 | static struct video_device usbvision_video_template = { |
@@ -1413,7 +1412,7 @@ static struct video_device usbvision_video_template = { | |||
1413 | .vidioc_s_input = vidioc_s_input, | 1412 | .vidioc_s_input = vidioc_s_input, |
1414 | .vidioc_queryctrl = vidioc_queryctrl, | 1413 | .vidioc_queryctrl = vidioc_queryctrl, |
1415 | .vidioc_g_audio = vidioc_g_audio, | 1414 | .vidioc_g_audio = vidioc_g_audio, |
1416 | .vidioc_g_audio = vidioc_s_audio, | 1415 | .vidioc_s_audio = vidioc_s_audio, |
1417 | .vidioc_g_ctrl = vidioc_g_ctrl, | 1416 | .vidioc_g_ctrl = vidioc_g_ctrl, |
1418 | .vidioc_s_ctrl = vidioc_s_ctrl, | 1417 | .vidioc_s_ctrl = vidioc_s_ctrl, |
1419 | .vidioc_streamon = vidioc_streamon, | 1418 | .vidioc_streamon = vidioc_streamon, |
@@ -1459,7 +1458,7 @@ static struct video_device usbvision_radio_template= | |||
1459 | .vidioc_s_input = vidioc_s_input, | 1458 | .vidioc_s_input = vidioc_s_input, |
1460 | .vidioc_queryctrl = vidioc_queryctrl, | 1459 | .vidioc_queryctrl = vidioc_queryctrl, |
1461 | .vidioc_g_audio = vidioc_g_audio, | 1460 | .vidioc_g_audio = vidioc_g_audio, |
1462 | .vidioc_g_audio = vidioc_s_audio, | 1461 | .vidioc_s_audio = vidioc_s_audio, |
1463 | .vidioc_g_ctrl = vidioc_g_ctrl, | 1462 | .vidioc_g_ctrl = vidioc_g_ctrl, |
1464 | .vidioc_s_ctrl = vidioc_s_ctrl, | 1463 | .vidioc_s_ctrl = vidioc_s_ctrl, |
1465 | .vidioc_g_tuner = vidioc_g_tuner, | 1464 | .vidioc_g_tuner = vidioc_g_tuner, |
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 73e248fb2ff1..7b580c3152de 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig | |||
@@ -134,6 +134,7 @@ config SONY_LAPTOP | |||
134 | tristate "Sony Laptop Extras" | 134 | tristate "Sony Laptop Extras" |
135 | depends on X86 && ACPI | 135 | depends on X86 && ACPI |
136 | select BACKLIGHT_CLASS_DEVICE | 136 | select BACKLIGHT_CLASS_DEVICE |
137 | depends on INPUT | ||
137 | ---help--- | 138 | ---help--- |
138 | This mini-driver drives the SNC and SPIC devices present in the ACPI | 139 | This mini-driver drives the SNC and SPIC devices present in the ACPI |
139 | BIOS of the Sony Vaio laptops. | 140 | BIOS of the Sony Vaio laptops. |
@@ -156,6 +157,7 @@ config THINKPAD_ACPI | |||
156 | select BACKLIGHT_CLASS_DEVICE | 157 | select BACKLIGHT_CLASS_DEVICE |
157 | select HWMON | 158 | select HWMON |
158 | select NVRAM | 159 | select NVRAM |
160 | depends on INPUT | ||
159 | ---help--- | 161 | ---help--- |
160 | This is a driver for the IBM and Lenovo ThinkPad laptops. It adds | 162 | This is a driver for the IBM and Lenovo ThinkPad laptops. It adds |
161 | support for Fn-Fx key combinations, Bluetooth control, video | 163 | support for Fn-Fx key combinations, Bluetooth control, video |
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index d38ddce592c0..f248080828f2 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c | |||
@@ -1173,7 +1173,8 @@ static struct acpi_driver sony_nc_driver = { | |||
1173 | #define SONYPI_TYPE3_OFFSET 0x12 | 1173 | #define SONYPI_TYPE3_OFFSET 0x12 |
1174 | 1174 | ||
1175 | struct sony_pic_ioport { | 1175 | struct sony_pic_ioport { |
1176 | struct acpi_resource_io io; | 1176 | struct acpi_resource_io io1; |
1177 | struct acpi_resource_io io2; | ||
1177 | struct list_head list; | 1178 | struct list_head list; |
1178 | }; | 1179 | }; |
1179 | 1180 | ||
@@ -1443,11 +1444,11 @@ static u8 sony_pic_call1(u8 dev) | |||
1443 | { | 1444 | { |
1444 | u8 v1, v2; | 1445 | u8 v1, v2; |
1445 | 1446 | ||
1446 | wait_on_command(inb_p(spic_dev.cur_ioport->io.minimum + 4) & 2, | 1447 | wait_on_command(inb_p(spic_dev.cur_ioport->io1.minimum + 4) & 2, |
1447 | ITERATIONS_LONG); | 1448 | ITERATIONS_LONG); |
1448 | outb(dev, spic_dev.cur_ioport->io.minimum + 4); | 1449 | outb(dev, spic_dev.cur_ioport->io1.minimum + 4); |
1449 | v1 = inb_p(spic_dev.cur_ioport->io.minimum + 4); | 1450 | v1 = inb_p(spic_dev.cur_ioport->io1.minimum + 4); |
1450 | v2 = inb_p(spic_dev.cur_ioport->io.minimum); | 1451 | v2 = inb_p(spic_dev.cur_ioport->io1.minimum); |
1451 | dprintk("sony_pic_call1: 0x%.4x\n", (v2 << 8) | v1); | 1452 | dprintk("sony_pic_call1: 0x%.4x\n", (v2 << 8) | v1); |
1452 | return v2; | 1453 | return v2; |
1453 | } | 1454 | } |
@@ -1456,13 +1457,13 @@ static u8 sony_pic_call2(u8 dev, u8 fn) | |||
1456 | { | 1457 | { |
1457 | u8 v1; | 1458 | u8 v1; |
1458 | 1459 | ||
1459 | wait_on_command(inb_p(spic_dev.cur_ioport->io.minimum + 4) & 2, | 1460 | wait_on_command(inb_p(spic_dev.cur_ioport->io1.minimum + 4) & 2, |
1460 | ITERATIONS_LONG); | 1461 | ITERATIONS_LONG); |
1461 | outb(dev, spic_dev.cur_ioport->io.minimum + 4); | 1462 | outb(dev, spic_dev.cur_ioport->io1.minimum + 4); |
1462 | wait_on_command(inb_p(spic_dev.cur_ioport->io.minimum + 4) & 2, | 1463 | wait_on_command(inb_p(spic_dev.cur_ioport->io1.minimum + 4) & 2, |
1463 | ITERATIONS_LONG); | 1464 | ITERATIONS_LONG); |
1464 | outb(fn, spic_dev.cur_ioport->io.minimum); | 1465 | outb(fn, spic_dev.cur_ioport->io1.minimum); |
1465 | v1 = inb_p(spic_dev.cur_ioport->io.minimum); | 1466 | v1 = inb_p(spic_dev.cur_ioport->io1.minimum); |
1466 | dprintk("sony_pic_call2: 0x%.4x\n", v1); | 1467 | dprintk("sony_pic_call2: 0x%.4x\n", v1); |
1467 | return v1; | 1468 | return v1; |
1468 | } | 1469 | } |
@@ -1471,13 +1472,13 @@ static u8 sony_pic_call3(u8 dev, u8 fn, u8 v) | |||
1471 | { | 1472 | { |
1472 | u8 v1; | 1473 | u8 v1; |
1473 | 1474 | ||
1474 | wait_on_command(inb_p(spic_dev.cur_ioport->io.minimum + 4) & 2, ITERATIONS_LONG); | 1475 | wait_on_command(inb_p(spic_dev.cur_ioport->io1.minimum + 4) & 2, ITERATIONS_LONG); |
1475 | outb(dev, spic_dev.cur_ioport->io.minimum + 4); | 1476 | outb(dev, spic_dev.cur_ioport->io1.minimum + 4); |
1476 | wait_on_command(inb_p(spic_dev.cur_ioport->io.minimum + 4) & 2, ITERATIONS_LONG); | 1477 | wait_on_command(inb_p(spic_dev.cur_ioport->io1.minimum + 4) & 2, ITERATIONS_LONG); |
1477 | outb(fn, spic_dev.cur_ioport->io.minimum); | 1478 | outb(fn, spic_dev.cur_ioport->io1.minimum); |
1478 | wait_on_command(inb_p(spic_dev.cur_ioport->io.minimum + 4) & 2, ITERATIONS_LONG); | 1479 | wait_on_command(inb_p(spic_dev.cur_ioport->io1.minimum + 4) & 2, ITERATIONS_LONG); |
1479 | outb(v, spic_dev.cur_ioport->io.minimum); | 1480 | outb(v, spic_dev.cur_ioport->io1.minimum); |
1480 | v1 = inb_p(spic_dev.cur_ioport->io.minimum); | 1481 | v1 = inb_p(spic_dev.cur_ioport->io1.minimum); |
1481 | dprintk("sony_pic_call3: 0x%.4x\n", v1); | 1482 | dprintk("sony_pic_call3: 0x%.4x\n", v1); |
1482 | return v1; | 1483 | return v1; |
1483 | } | 1484 | } |
@@ -2074,7 +2075,18 @@ sony_pic_read_possible_resource(struct acpi_resource *resource, void *context) | |||
2074 | 2075 | ||
2075 | switch (resource->type) { | 2076 | switch (resource->type) { |
2076 | case ACPI_RESOURCE_TYPE_START_DEPENDENT: | 2077 | case ACPI_RESOURCE_TYPE_START_DEPENDENT: |
2078 | { | ||
2079 | /* start IO enumeration */ | ||
2080 | struct sony_pic_ioport *ioport = kzalloc(sizeof(*ioport), GFP_KERNEL); | ||
2081 | if (!ioport) | ||
2082 | return AE_ERROR; | ||
2083 | |||
2084 | list_add(&ioport->list, &dev->ioports); | ||
2085 | return AE_OK; | ||
2086 | } | ||
2087 | |||
2077 | case ACPI_RESOURCE_TYPE_END_DEPENDENT: | 2088 | case ACPI_RESOURCE_TYPE_END_DEPENDENT: |
2089 | /* end IO enumeration */ | ||
2078 | return AE_OK; | 2090 | return AE_OK; |
2079 | 2091 | ||
2080 | case ACPI_RESOURCE_TYPE_IRQ: | 2092 | case ACPI_RESOURCE_TYPE_IRQ: |
@@ -2101,7 +2113,7 @@ sony_pic_read_possible_resource(struct acpi_resource *resource, void *context) | |||
2101 | if (!interrupt) | 2113 | if (!interrupt) |
2102 | return AE_ERROR; | 2114 | return AE_ERROR; |
2103 | 2115 | ||
2104 | list_add_tail(&interrupt->list, &dev->interrupts); | 2116 | list_add(&interrupt->list, &dev->interrupts); |
2105 | interrupt->irq.triggering = p->triggering; | 2117 | interrupt->irq.triggering = p->triggering; |
2106 | interrupt->irq.polarity = p->polarity; | 2118 | interrupt->irq.polarity = p->polarity; |
2107 | interrupt->irq.sharable = p->sharable; | 2119 | interrupt->irq.sharable = p->sharable; |
@@ -2113,18 +2125,27 @@ sony_pic_read_possible_resource(struct acpi_resource *resource, void *context) | |||
2113 | case ACPI_RESOURCE_TYPE_IO: | 2125 | case ACPI_RESOURCE_TYPE_IO: |
2114 | { | 2126 | { |
2115 | struct acpi_resource_io *io = &resource->data.io; | 2127 | struct acpi_resource_io *io = &resource->data.io; |
2116 | struct sony_pic_ioport *ioport = NULL; | 2128 | struct sony_pic_ioport *ioport = |
2129 | list_first_entry(&dev->ioports, struct sony_pic_ioport, list); | ||
2117 | if (!io) { | 2130 | if (!io) { |
2118 | dprintk("Blank IO resource\n"); | 2131 | dprintk("Blank IO resource\n"); |
2119 | return AE_OK; | 2132 | return AE_OK; |
2120 | } | 2133 | } |
2121 | 2134 | ||
2122 | ioport = kzalloc(sizeof(*ioport), GFP_KERNEL); | 2135 | if (!ioport->io1.minimum) { |
2123 | if (!ioport) | 2136 | memcpy(&ioport->io1, io, sizeof(*io)); |
2137 | dprintk("IO1 at 0x%.4x (0x%.2x)\n", ioport->io1.minimum, | ||
2138 | ioport->io1.address_length); | ||
2139 | } | ||
2140 | else if (!ioport->io2.minimum) { | ||
2141 | memcpy(&ioport->io2, io, sizeof(*io)); | ||
2142 | dprintk("IO2 at 0x%.4x (0x%.2x)\n", ioport->io2.minimum, | ||
2143 | ioport->io2.address_length); | ||
2144 | } | ||
2145 | else { | ||
2146 | printk(KERN_ERR DRV_PFX "Unknown SPIC Type, more than 2 IO Ports\n"); | ||
2124 | return AE_ERROR; | 2147 | return AE_ERROR; |
2125 | 2148 | } | |
2126 | list_add_tail(&ioport->list, &dev->ioports); | ||
2127 | memcpy(&ioport->io, io, sizeof(*io)); | ||
2128 | return AE_OK; | 2149 | return AE_OK; |
2129 | } | 2150 | } |
2130 | default: | 2151 | default: |
@@ -2199,10 +2220,22 @@ static int sony_pic_enable(struct acpi_device *device, | |||
2199 | { | 2220 | { |
2200 | acpi_status status; | 2221 | acpi_status status; |
2201 | int result = 0; | 2222 | int result = 0; |
2223 | /* Type 1 resource layout is: | ||
2224 | * IO | ||
2225 | * IO | ||
2226 | * IRQNoFlags | ||
2227 | * End | ||
2228 | * | ||
2229 | * Type 2 and 3 resource layout is: | ||
2230 | * IO | ||
2231 | * IRQNoFlags | ||
2232 | * End | ||
2233 | */ | ||
2202 | struct { | 2234 | struct { |
2203 | struct acpi_resource io_res; | 2235 | struct acpi_resource res1; |
2204 | struct acpi_resource irq_res; | 2236 | struct acpi_resource res2; |
2205 | struct acpi_resource end; | 2237 | struct acpi_resource res3; |
2238 | struct acpi_resource res4; | ||
2206 | } *resource; | 2239 | } *resource; |
2207 | struct acpi_buffer buffer = { 0, NULL }; | 2240 | struct acpi_buffer buffer = { 0, NULL }; |
2208 | 2241 | ||
@@ -2217,21 +2250,49 @@ static int sony_pic_enable(struct acpi_device *device, | |||
2217 | buffer.length = sizeof(*resource) + 1; | 2250 | buffer.length = sizeof(*resource) + 1; |
2218 | buffer.pointer = resource; | 2251 | buffer.pointer = resource; |
2219 | 2252 | ||
2220 | /* setup io resource */ | 2253 | /* setup Type 1 resources */ |
2221 | resource->io_res.type = ACPI_RESOURCE_TYPE_IO; | 2254 | if (spic_dev.model == SONYPI_DEVICE_TYPE1) { |
2222 | resource->io_res.length = sizeof(struct acpi_resource); | ||
2223 | memcpy(&resource->io_res.data.io, &ioport->io, | ||
2224 | sizeof(struct acpi_resource_io)); | ||
2225 | 2255 | ||
2226 | /* setup irq resource */ | 2256 | /* setup io resources */ |
2227 | resource->irq_res.type = ACPI_RESOURCE_TYPE_IRQ; | 2257 | resource->res1.type = ACPI_RESOURCE_TYPE_IO; |
2228 | resource->irq_res.length = sizeof(struct acpi_resource); | 2258 | resource->res1.length = sizeof(struct acpi_resource); |
2229 | memcpy(&resource->irq_res.data.irq, &irq->irq, | 2259 | memcpy(&resource->res1.data.io, &ioport->io1, |
2230 | sizeof(struct acpi_resource_irq)); | 2260 | sizeof(struct acpi_resource_io)); |
2231 | /* we requested a shared irq */ | ||
2232 | resource->irq_res.data.irq.sharable = ACPI_SHARED; | ||
2233 | 2261 | ||
2234 | resource->end.type = ACPI_RESOURCE_TYPE_END_TAG; | 2262 | resource->res2.type = ACPI_RESOURCE_TYPE_IO; |
2263 | resource->res2.length = sizeof(struct acpi_resource); | ||
2264 | memcpy(&resource->res2.data.io, &ioport->io2, | ||
2265 | sizeof(struct acpi_resource_io)); | ||
2266 | |||
2267 | /* setup irq resource */ | ||
2268 | resource->res3.type = ACPI_RESOURCE_TYPE_IRQ; | ||
2269 | resource->res3.length = sizeof(struct acpi_resource); | ||
2270 | memcpy(&resource->res3.data.irq, &irq->irq, | ||
2271 | sizeof(struct acpi_resource_irq)); | ||
2272 | /* we requested a shared irq */ | ||
2273 | resource->res3.data.irq.sharable = ACPI_SHARED; | ||
2274 | |||
2275 | resource->res4.type = ACPI_RESOURCE_TYPE_END_TAG; | ||
2276 | |||
2277 | } | ||
2278 | /* setup Type 2/3 resources */ | ||
2279 | else { | ||
2280 | /* setup io resource */ | ||
2281 | resource->res1.type = ACPI_RESOURCE_TYPE_IO; | ||
2282 | resource->res1.length = sizeof(struct acpi_resource); | ||
2283 | memcpy(&resource->res1.data.io, &ioport->io1, | ||
2284 | sizeof(struct acpi_resource_io)); | ||
2285 | |||
2286 | /* setup irq resource */ | ||
2287 | resource->res2.type = ACPI_RESOURCE_TYPE_IRQ; | ||
2288 | resource->res2.length = sizeof(struct acpi_resource); | ||
2289 | memcpy(&resource->res2.data.irq, &irq->irq, | ||
2290 | sizeof(struct acpi_resource_irq)); | ||
2291 | /* we requested a shared irq */ | ||
2292 | resource->res2.data.irq.sharable = ACPI_SHARED; | ||
2293 | |||
2294 | resource->res3.type = ACPI_RESOURCE_TYPE_END_TAG; | ||
2295 | } | ||
2235 | 2296 | ||
2236 | /* Attempt to set the resource */ | 2297 | /* Attempt to set the resource */ |
2237 | dprintk("Evaluating _SRS\n"); | 2298 | dprintk("Evaluating _SRS\n"); |
@@ -2239,7 +2300,7 @@ static int sony_pic_enable(struct acpi_device *device, | |||
2239 | 2300 | ||
2240 | /* check for total failure */ | 2301 | /* check for total failure */ |
2241 | if (ACPI_FAILURE(status)) { | 2302 | if (ACPI_FAILURE(status)) { |
2242 | printk(KERN_ERR DRV_PFX "Error evaluating _SRS"); | 2303 | printk(KERN_ERR DRV_PFX "Error evaluating _SRS\n"); |
2243 | result = -ENODEV; | 2304 | result = -ENODEV; |
2244 | goto end; | 2305 | goto end; |
2245 | } | 2306 | } |
@@ -2268,11 +2329,14 @@ static irqreturn_t sony_pic_irq(int irq, void *dev_id) | |||
2268 | 2329 | ||
2269 | struct sony_pic_dev *dev = (struct sony_pic_dev *) dev_id; | 2330 | struct sony_pic_dev *dev = (struct sony_pic_dev *) dev_id; |
2270 | 2331 | ||
2271 | ev = inb_p(dev->cur_ioport->io.minimum); | 2332 | ev = inb_p(dev->cur_ioport->io1.minimum); |
2272 | data_mask = inb_p(dev->cur_ioport->io.minimum + dev->evport_offset); | 2333 | if (dev->cur_ioport->io2.minimum) |
2334 | data_mask = inb_p(dev->cur_ioport->io2.minimum); | ||
2335 | else | ||
2336 | data_mask = inb_p(dev->cur_ioport->io1.minimum + dev->evport_offset); | ||
2273 | 2337 | ||
2274 | dprintk("event ([%.2x] [%.2x]) at port 0x%.4x(+0x%.2x)\n", | 2338 | dprintk("event ([%.2x] [%.2x]) at port 0x%.4x(+0x%.2x)\n", |
2275 | ev, data_mask, dev->cur_ioport->io.minimum, dev->evport_offset); | 2339 | ev, data_mask, dev->cur_ioport->io1.minimum, dev->evport_offset); |
2276 | 2340 | ||
2277 | if (ev == 0x00 || ev == 0xff) | 2341 | if (ev == 0x00 || ev == 0xff) |
2278 | return IRQ_HANDLED; | 2342 | return IRQ_HANDLED; |
@@ -2323,8 +2387,11 @@ static int sony_pic_remove(struct acpi_device *device, int type) | |||
2323 | } | 2387 | } |
2324 | 2388 | ||
2325 | free_irq(spic_dev.cur_irq->irq.interrupts[0], &spic_dev); | 2389 | free_irq(spic_dev.cur_irq->irq.interrupts[0], &spic_dev); |
2326 | release_region(spic_dev.cur_ioport->io.minimum, | 2390 | release_region(spic_dev.cur_ioport->io1.minimum, |
2327 | spic_dev.cur_ioport->io.address_length); | 2391 | spic_dev.cur_ioport->io1.address_length); |
2392 | if (spic_dev.cur_ioport->io2.minimum) | ||
2393 | release_region(spic_dev.cur_ioport->io2.minimum, | ||
2394 | spic_dev.cur_ioport->io2.address_length); | ||
2328 | 2395 | ||
2329 | sonypi_compat_exit(); | 2396 | sonypi_compat_exit(); |
2330 | 2397 | ||
@@ -2397,14 +2464,36 @@ static int sony_pic_add(struct acpi_device *device) | |||
2397 | goto err_remove_input; | 2464 | goto err_remove_input; |
2398 | 2465 | ||
2399 | /* request io port */ | 2466 | /* request io port */ |
2400 | list_for_each_entry(io, &spic_dev.ioports, list) { | 2467 | list_for_each_entry_reverse(io, &spic_dev.ioports, list) { |
2401 | if (request_region(io->io.minimum, io->io.address_length, | 2468 | if (request_region(io->io1.minimum, io->io1.address_length, |
2402 | "Sony Programable I/O Device")) { | 2469 | "Sony Programable I/O Device")) { |
2403 | dprintk("I/O port: 0x%.4x (0x%.4x) + 0x%.2x\n", | 2470 | dprintk("I/O port1: 0x%.4x (0x%.4x) + 0x%.2x\n", |
2404 | io->io.minimum, io->io.maximum, | 2471 | io->io1.minimum, io->io1.maximum, |
2405 | io->io.address_length); | 2472 | io->io1.address_length); |
2406 | spic_dev.cur_ioport = io; | 2473 | /* Type 1 have 2 ioports */ |
2407 | break; | 2474 | if (io->io2.minimum) { |
2475 | if (request_region(io->io2.minimum, | ||
2476 | io->io2.address_length, | ||
2477 | "Sony Programable I/O Device")) { | ||
2478 | dprintk("I/O port2: 0x%.4x (0x%.4x) + 0x%.2x\n", | ||
2479 | io->io2.minimum, io->io2.maximum, | ||
2480 | io->io2.address_length); | ||
2481 | spic_dev.cur_ioport = io; | ||
2482 | break; | ||
2483 | } | ||
2484 | else { | ||
2485 | dprintk("Unable to get I/O port2: " | ||
2486 | "0x%.4x (0x%.4x) + 0x%.2x\n", | ||
2487 | io->io2.minimum, io->io2.maximum, | ||
2488 | io->io2.address_length); | ||
2489 | release_region(io->io1.minimum, | ||
2490 | io->io1.address_length); | ||
2491 | } | ||
2492 | } | ||
2493 | else { | ||
2494 | spic_dev.cur_ioport = io; | ||
2495 | break; | ||
2496 | } | ||
2408 | } | 2497 | } |
2409 | } | 2498 | } |
2410 | if (!spic_dev.cur_ioport) { | 2499 | if (!spic_dev.cur_ioport) { |
@@ -2414,7 +2503,7 @@ static int sony_pic_add(struct acpi_device *device) | |||
2414 | } | 2503 | } |
2415 | 2504 | ||
2416 | /* request IRQ */ | 2505 | /* request IRQ */ |
2417 | list_for_each_entry(irq, &spic_dev.interrupts, list) { | 2506 | list_for_each_entry_reverse(irq, &spic_dev.interrupts, list) { |
2418 | if (!request_irq(irq->irq.interrupts[0], sony_pic_irq, | 2507 | if (!request_irq(irq->irq.interrupts[0], sony_pic_irq, |
2419 | IRQF_SHARED, "sony-laptop", &spic_dev)) { | 2508 | IRQF_SHARED, "sony-laptop", &spic_dev)) { |
2420 | dprintk("IRQ: %d - triggering: %d - " | 2509 | dprintk("IRQ: %d - triggering: %d - " |
@@ -2462,8 +2551,11 @@ err_free_irq: | |||
2462 | free_irq(spic_dev.cur_irq->irq.interrupts[0], &spic_dev); | 2551 | free_irq(spic_dev.cur_irq->irq.interrupts[0], &spic_dev); |
2463 | 2552 | ||
2464 | err_release_region: | 2553 | err_release_region: |
2465 | release_region(spic_dev.cur_ioport->io.minimum, | 2554 | release_region(spic_dev.cur_ioport->io1.minimum, |
2466 | spic_dev.cur_ioport->io.address_length); | 2555 | spic_dev.cur_ioport->io1.address_length); |
2556 | if (spic_dev.cur_ioport->io2.minimum) | ||
2557 | release_region(spic_dev.cur_ioport->io2.minimum, | ||
2558 | spic_dev.cur_ioport->io2.address_length); | ||
2467 | 2559 | ||
2468 | err_remove_compat: | 2560 | err_remove_compat: |
2469 | sonypi_compat_exit(); | 2561 | sonypi_compat_exit(); |
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index 4c3785c9d4b8..9ecc3adcf6c1 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c | |||
@@ -1726,6 +1726,7 @@ static int e1000_wol_exclusion(struct e1000_adapter *adapter, struct ethtool_wol | |||
1726 | case E1000_DEV_ID_82571EB_QUAD_COPPER: | 1726 | case E1000_DEV_ID_82571EB_QUAD_COPPER: |
1727 | case E1000_DEV_ID_82571EB_QUAD_FIBER: | 1727 | case E1000_DEV_ID_82571EB_QUAD_FIBER: |
1728 | case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE: | 1728 | case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE: |
1729 | case E1000_DEV_ID_82571PT_QUAD_COPPER: | ||
1729 | case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3: | 1730 | case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3: |
1730 | /* quad port adapters only support WoL on port A */ | 1731 | /* quad port adapters only support WoL on port A */ |
1731 | if (!adapter->quad_port_a) { | 1732 | if (!adapter->quad_port_a) { |
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c index ba120f7fb0be..8604adbe351c 100644 --- a/drivers/net/e1000/e1000_hw.c +++ b/drivers/net/e1000/e1000_hw.c | |||
@@ -387,6 +387,7 @@ e1000_set_mac_type(struct e1000_hw *hw) | |||
387 | case E1000_DEV_ID_82571EB_SERDES_DUAL: | 387 | case E1000_DEV_ID_82571EB_SERDES_DUAL: |
388 | case E1000_DEV_ID_82571EB_SERDES_QUAD: | 388 | case E1000_DEV_ID_82571EB_SERDES_QUAD: |
389 | case E1000_DEV_ID_82571EB_QUAD_COPPER: | 389 | case E1000_DEV_ID_82571EB_QUAD_COPPER: |
390 | case E1000_DEV_ID_82571PT_QUAD_COPPER: | ||
390 | case E1000_DEV_ID_82571EB_QUAD_FIBER: | 391 | case E1000_DEV_ID_82571EB_QUAD_FIBER: |
391 | case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE: | 392 | case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE: |
392 | hw->mac_type = e1000_82571; | 393 | hw->mac_type = e1000_82571; |
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h index fe8714655c90..07f0ea73676e 100644 --- a/drivers/net/e1000/e1000_hw.h +++ b/drivers/net/e1000/e1000_hw.h | |||
@@ -475,6 +475,7 @@ int32_t e1000_check_phy_reset_block(struct e1000_hw *hw); | |||
475 | #define E1000_DEV_ID_82571EB_FIBER 0x105F | 475 | #define E1000_DEV_ID_82571EB_FIBER 0x105F |
476 | #define E1000_DEV_ID_82571EB_SERDES 0x1060 | 476 | #define E1000_DEV_ID_82571EB_SERDES 0x1060 |
477 | #define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4 | 477 | #define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4 |
478 | #define E1000_DEV_ID_82571PT_QUAD_COPPER 0x10D5 | ||
478 | #define E1000_DEV_ID_82571EB_QUAD_FIBER 0x10A5 | 479 | #define E1000_DEV_ID_82571EB_QUAD_FIBER 0x10A5 |
479 | #define E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE 0x10BC | 480 | #define E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE 0x10BC |
480 | #define E1000_DEV_ID_82571EB_SERDES_DUAL 0x10D9 | 481 | #define E1000_DEV_ID_82571EB_SERDES_DUAL 0x10D9 |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 4a225950fb43..e7c8951f47fa 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -108,6 +108,7 @@ static struct pci_device_id e1000_pci_tbl[] = { | |||
108 | INTEL_E1000_ETHERNET_DEVICE(0x10BC), | 108 | INTEL_E1000_ETHERNET_DEVICE(0x10BC), |
109 | INTEL_E1000_ETHERNET_DEVICE(0x10C4), | 109 | INTEL_E1000_ETHERNET_DEVICE(0x10C4), |
110 | INTEL_E1000_ETHERNET_DEVICE(0x10C5), | 110 | INTEL_E1000_ETHERNET_DEVICE(0x10C5), |
111 | INTEL_E1000_ETHERNET_DEVICE(0x10D5), | ||
111 | INTEL_E1000_ETHERNET_DEVICE(0x10D9), | 112 | INTEL_E1000_ETHERNET_DEVICE(0x10D9), |
112 | INTEL_E1000_ETHERNET_DEVICE(0x10DA), | 113 | INTEL_E1000_ETHERNET_DEVICE(0x10DA), |
113 | /* required last entry */ | 114 | /* required last entry */ |
@@ -1101,6 +1102,7 @@ e1000_probe(struct pci_dev *pdev, | |||
1101 | case E1000_DEV_ID_82571EB_QUAD_COPPER: | 1102 | case E1000_DEV_ID_82571EB_QUAD_COPPER: |
1102 | case E1000_DEV_ID_82571EB_QUAD_FIBER: | 1103 | case E1000_DEV_ID_82571EB_QUAD_FIBER: |
1103 | case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE: | 1104 | case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE: |
1105 | case E1000_DEV_ID_82571PT_QUAD_COPPER: | ||
1104 | /* if quad port adapter, disable WoL on all but port A */ | 1106 | /* if quad port adapter, disable WoL on all but port A */ |
1105 | if (global_quad_port_a != 0) | 1107 | if (global_quad_port_a != 0) |
1106 | adapter->eeprom_wol = 0; | 1108 | adapter->eeprom_wol = 0; |
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index 6a117e9968cb..315335671f0f 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -534,7 +534,7 @@ static irqreturn_t mv643xx_eth_int_handler(int irq, void *dev_id) | |||
534 | } | 534 | } |
535 | 535 | ||
536 | /* PHY status changed */ | 536 | /* PHY status changed */ |
537 | if (eth_int_cause_ext & ETH_INT_CAUSE_PHY) { | 537 | if (eth_int_cause_ext & (ETH_INT_CAUSE_PHY | ETH_INT_CAUSE_STATE)) { |
538 | struct ethtool_cmd cmd; | 538 | struct ethtool_cmd cmd; |
539 | 539 | ||
540 | if (mii_link_ok(&mp->mii)) { | 540 | if (mii_link_ok(&mp->mii)) { |
@@ -1357,7 +1357,6 @@ static int mv643xx_eth_probe(struct platform_device *pdev) | |||
1357 | #endif | 1357 | #endif |
1358 | 1358 | ||
1359 | dev->watchdog_timeo = 2 * HZ; | 1359 | dev->watchdog_timeo = 2 * HZ; |
1360 | dev->tx_queue_len = mp->tx_ring_size; | ||
1361 | dev->base_addr = 0; | 1360 | dev->base_addr = 0; |
1362 | dev->change_mtu = mv643xx_eth_change_mtu; | 1361 | dev->change_mtu = mv643xx_eth_change_mtu; |
1363 | dev->do_ioctl = mv643xx_eth_do_ioctl; | 1362 | dev->do_ioctl = mv643xx_eth_do_ioctl; |
@@ -2768,8 +2767,6 @@ static const struct ethtool_ops mv643xx_ethtool_ops = { | |||
2768 | .get_stats_count = mv643xx_get_stats_count, | 2767 | .get_stats_count = mv643xx_get_stats_count, |
2769 | .get_ethtool_stats = mv643xx_get_ethtool_stats, | 2768 | .get_ethtool_stats = mv643xx_get_ethtool_stats, |
2770 | .get_strings = mv643xx_get_strings, | 2769 | .get_strings = mv643xx_get_strings, |
2771 | .get_stats_count = mv643xx_get_stats_count, | ||
2772 | .get_ethtool_stats = mv643xx_get_ethtool_stats, | ||
2773 | .nway_reset = mv643xx_eth_nway_restart, | 2770 | .nway_reset = mv643xx_eth_nway_restart, |
2774 | }; | 2771 | }; |
2775 | 2772 | ||
diff --git a/drivers/net/mv643xx_eth.h b/drivers/net/mv643xx_eth.h index 82f8c0cbfb64..565b96696aca 100644 --- a/drivers/net/mv643xx_eth.h +++ b/drivers/net/mv643xx_eth.h | |||
@@ -64,7 +64,9 @@ | |||
64 | #define ETH_INT_CAUSE_TX_ERROR (ETH_TX_QUEUES_ENABLED << 8) | 64 | #define ETH_INT_CAUSE_TX_ERROR (ETH_TX_QUEUES_ENABLED << 8) |
65 | #define ETH_INT_CAUSE_TX (ETH_INT_CAUSE_TX_DONE | ETH_INT_CAUSE_TX_ERROR) | 65 | #define ETH_INT_CAUSE_TX (ETH_INT_CAUSE_TX_DONE | ETH_INT_CAUSE_TX_ERROR) |
66 | #define ETH_INT_CAUSE_PHY 0x00010000 | 66 | #define ETH_INT_CAUSE_PHY 0x00010000 |
67 | #define ETH_INT_UNMASK_ALL_EXT (ETH_INT_CAUSE_TX | ETH_INT_CAUSE_PHY) | 67 | #define ETH_INT_CAUSE_STATE 0x00100000 |
68 | #define ETH_INT_UNMASK_ALL_EXT (ETH_INT_CAUSE_TX | ETH_INT_CAUSE_PHY | \ | ||
69 | ETH_INT_CAUSE_STATE) | ||
68 | 70 | ||
69 | #define ETH_INT_MASK_ALL 0x00000000 | 71 | #define ETH_INT_MASK_ALL 0x00000000 |
70 | #define ETH_INT_MASK_ALL_EXT 0x00000000 | 72 | #define ETH_INT_MASK_ALL_EXT 0x00000000 |
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c index c06cae3f0b56..503f2685fb73 100644 --- a/drivers/net/pcmcia/3c589_cs.c +++ b/drivers/net/pcmcia/3c589_cs.c | |||
@@ -116,7 +116,7 @@ struct el3_private { | |||
116 | spinlock_t lock; | 116 | spinlock_t lock; |
117 | }; | 117 | }; |
118 | 118 | ||
119 | static const char *if_names[] = { "auto", "10base2", "10baseT", "AUI" }; | 119 | static const char *if_names[] = { "auto", "10baseT", "10base2", "AUI" }; |
120 | 120 | ||
121 | /*====================================================================*/ | 121 | /*====================================================================*/ |
122 | 122 | ||
diff --git a/drivers/net/ppp_mppe.c b/drivers/net/ppp_mppe.c index f79cf87a2bff..c0b6d19d1457 100644 --- a/drivers/net/ppp_mppe.c +++ b/drivers/net/ppp_mppe.c | |||
@@ -136,7 +136,7 @@ struct ppp_mppe_state { | |||
136 | * Key Derivation, from RFC 3078, RFC 3079. | 136 | * Key Derivation, from RFC 3078, RFC 3079. |
137 | * Equivalent to Get_Key() for MS-CHAP as described in RFC 3079. | 137 | * Equivalent to Get_Key() for MS-CHAP as described in RFC 3079. |
138 | */ | 138 | */ |
139 | static void get_new_key_from_sha(struct ppp_mppe_state * state, unsigned char *InterimKey) | 139 | static void get_new_key_from_sha(struct ppp_mppe_state * state) |
140 | { | 140 | { |
141 | struct hash_desc desc; | 141 | struct hash_desc desc; |
142 | struct scatterlist sg[4]; | 142 | struct scatterlist sg[4]; |
@@ -153,8 +153,6 @@ static void get_new_key_from_sha(struct ppp_mppe_state * state, unsigned char *I | |||
153 | desc.flags = 0; | 153 | desc.flags = 0; |
154 | 154 | ||
155 | crypto_hash_digest(&desc, sg, nbytes, state->sha1_digest); | 155 | crypto_hash_digest(&desc, sg, nbytes, state->sha1_digest); |
156 | |||
157 | memcpy(InterimKey, state->sha1_digest, state->keylen); | ||
158 | } | 156 | } |
159 | 157 | ||
160 | /* | 158 | /* |
@@ -163,21 +161,21 @@ static void get_new_key_from_sha(struct ppp_mppe_state * state, unsigned char *I | |||
163 | */ | 161 | */ |
164 | static void mppe_rekey(struct ppp_mppe_state * state, int initial_key) | 162 | static void mppe_rekey(struct ppp_mppe_state * state, int initial_key) |
165 | { | 163 | { |
166 | unsigned char InterimKey[MPPE_MAX_KEY_LEN]; | ||
167 | struct scatterlist sg_in[1], sg_out[1]; | 164 | struct scatterlist sg_in[1], sg_out[1]; |
168 | struct blkcipher_desc desc = { .tfm = state->arc4 }; | 165 | struct blkcipher_desc desc = { .tfm = state->arc4 }; |
169 | 166 | ||
170 | get_new_key_from_sha(state, InterimKey); | 167 | get_new_key_from_sha(state); |
171 | if (!initial_key) { | 168 | if (!initial_key) { |
172 | crypto_blkcipher_setkey(state->arc4, InterimKey, state->keylen); | 169 | crypto_blkcipher_setkey(state->arc4, state->sha1_digest, |
173 | setup_sg(sg_in, InterimKey, state->keylen); | 170 | state->keylen); |
171 | setup_sg(sg_in, state->sha1_digest, state->keylen); | ||
174 | setup_sg(sg_out, state->session_key, state->keylen); | 172 | setup_sg(sg_out, state->session_key, state->keylen); |
175 | if (crypto_blkcipher_encrypt(&desc, sg_out, sg_in, | 173 | if (crypto_blkcipher_encrypt(&desc, sg_out, sg_in, |
176 | state->keylen) != 0) { | 174 | state->keylen) != 0) { |
177 | printk(KERN_WARNING "mppe_rekey: cipher_encrypt failed\n"); | 175 | printk(KERN_WARNING "mppe_rekey: cipher_encrypt failed\n"); |
178 | } | 176 | } |
179 | } else { | 177 | } else { |
180 | memcpy(state->session_key, InterimKey, state->keylen); | 178 | memcpy(state->session_key, state->sha1_digest, state->keylen); |
181 | } | 179 | } |
182 | if (state->keylen == 8) { | 180 | if (state->keylen == 8) { |
183 | /* See RFC 3078 */ | 181 | /* See RFC 3078 */ |
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index 69da95b5ad0c..ea151315050c 100755 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c | |||
@@ -2248,6 +2248,13 @@ static int ql_tx_rx_clean(struct ql3_adapter *qdev, | |||
2248 | qdev->rsp_consumer_index) && (work_done < work_to_do)) { | 2248 | qdev->rsp_consumer_index) && (work_done < work_to_do)) { |
2249 | 2249 | ||
2250 | net_rsp = qdev->rsp_current; | 2250 | net_rsp = qdev->rsp_current; |
2251 | rmb(); | ||
2252 | /* | ||
2253 | * Fix 4032 chipe undocumented "feature" where bit-8 is set if the | ||
2254 | * inbound completion is for a VLAN. | ||
2255 | */ | ||
2256 | if (qdev->device_id == QL3032_DEVICE_ID) | ||
2257 | net_rsp->opcode &= 0x7f; | ||
2251 | switch (net_rsp->opcode) { | 2258 | switch (net_rsp->opcode) { |
2252 | 2259 | ||
2253 | case OPCODE_OB_MAC_IOCB_FN0: | 2260 | case OPCODE_OB_MAC_IOCB_FN0: |
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index b85ab4a8f2a3..c76dd29c8e9a 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -1228,7 +1228,10 @@ static void rtl8169_hw_phy_config(struct net_device *dev) | |||
1228 | return; | 1228 | return; |
1229 | } | 1229 | } |
1230 | 1230 | ||
1231 | /* phy config for RTL8169s mac_version C chip */ | 1231 | if ((tp->mac_version != RTL_GIGA_MAC_VER_02) && |
1232 | (tp->mac_version != RTL_GIGA_MAC_VER_03)) | ||
1233 | return; | ||
1234 | |||
1232 | mdio_write(ioaddr, 31, 0x0001); //w 31 2 0 1 | 1235 | mdio_write(ioaddr, 31, 0x0001); //w 31 2 0 1 |
1233 | mdio_write(ioaddr, 21, 0x1000); //w 21 15 0 1000 | 1236 | mdio_write(ioaddr, 21, 0x1000); //w 21 15 0 1000 |
1234 | mdio_write(ioaddr, 24, 0x65c7); //w 24 15 0 65c7 | 1237 | mdio_write(ioaddr, 24, 0x65c7); //w 24 15 0 65c7 |
@@ -1915,7 +1918,11 @@ static void rtl_hw_start_8169(struct net_device *dev) | |||
1915 | 1918 | ||
1916 | rtl_set_rx_max_size(ioaddr); | 1919 | rtl_set_rx_max_size(ioaddr); |
1917 | 1920 | ||
1918 | rtl_set_rx_tx_config_registers(tp); | 1921 | if ((tp->mac_version == RTL_GIGA_MAC_VER_01) || |
1922 | (tp->mac_version == RTL_GIGA_MAC_VER_02) || | ||
1923 | (tp->mac_version == RTL_GIGA_MAC_VER_03) || | ||
1924 | (tp->mac_version == RTL_GIGA_MAC_VER_04)) | ||
1925 | rtl_set_rx_tx_config_registers(tp); | ||
1919 | 1926 | ||
1920 | tp->cp_cmd |= rtl_rw_cpluscmd(ioaddr) | PCIMulRW; | 1927 | tp->cp_cmd |= rtl_rw_cpluscmd(ioaddr) | PCIMulRW; |
1921 | 1928 | ||
@@ -1938,6 +1945,14 @@ static void rtl_hw_start_8169(struct net_device *dev) | |||
1938 | 1945 | ||
1939 | rtl_set_rx_tx_desc_registers(tp, ioaddr); | 1946 | rtl_set_rx_tx_desc_registers(tp, ioaddr); |
1940 | 1947 | ||
1948 | if ((tp->mac_version != RTL_GIGA_MAC_VER_01) && | ||
1949 | (tp->mac_version != RTL_GIGA_MAC_VER_02) && | ||
1950 | (tp->mac_version != RTL_GIGA_MAC_VER_03) && | ||
1951 | (tp->mac_version != RTL_GIGA_MAC_VER_04)) { | ||
1952 | RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb); | ||
1953 | rtl_set_rx_tx_config_registers(tp); | ||
1954 | } | ||
1955 | |||
1941 | RTL_W8(Cfg9346, Cfg9346_Lock); | 1956 | RTL_W8(Cfg9346, Cfg9346_Lock); |
1942 | 1957 | ||
1943 | /* Initially a 10 us delay. Turned it into a PCI commit. - FR */ | 1958 | /* Initially a 10 us delay. Turned it into a PCI commit. - FR */ |
@@ -1952,8 +1967,6 @@ static void rtl_hw_start_8169(struct net_device *dev) | |||
1952 | 1967 | ||
1953 | /* Enable all known interrupts by setting the interrupt mask. */ | 1968 | /* Enable all known interrupts by setting the interrupt mask. */ |
1954 | RTL_W16(IntrMask, tp->intr_event); | 1969 | RTL_W16(IntrMask, tp->intr_event); |
1955 | |||
1956 | RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb); | ||
1957 | } | 1970 | } |
1958 | 1971 | ||
1959 | static void rtl_hw_start_8168(struct net_device *dev) | 1972 | static void rtl_hw_start_8168(struct net_device *dev) |
@@ -2567,6 +2580,15 @@ static void rtl8169_tx_interrupt(struct net_device *dev, | |||
2567 | (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)) { | 2580 | (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)) { |
2568 | netif_wake_queue(dev); | 2581 | netif_wake_queue(dev); |
2569 | } | 2582 | } |
2583 | /* | ||
2584 | * 8168 hack: TxPoll requests are lost when the Tx packets are | ||
2585 | * too close. Let's kick an extra TxPoll request when a burst | ||
2586 | * of start_xmit activity is detected (if it is not detected, | ||
2587 | * it is slow enough). -- FR | ||
2588 | */ | ||
2589 | smp_rmb(); | ||
2590 | if (tp->cur_tx != dirty_tx) | ||
2591 | RTL_W8(TxPoll, NPQ); | ||
2570 | } | 2592 | } |
2571 | } | 2593 | } |
2572 | 2594 | ||
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index eaffe551d1d8..ea117fc3d5e3 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -338,6 +338,16 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port) | |||
338 | if (!(hw->flags & SKY2_HW_GIGABIT)) { | 338 | if (!(hw->flags & SKY2_HW_GIGABIT)) { |
339 | /* enable automatic crossover */ | 339 | /* enable automatic crossover */ |
340 | ctrl |= PHY_M_PC_MDI_XMODE(PHY_M_PC_ENA_AUTO) >> 1; | 340 | ctrl |= PHY_M_PC_MDI_XMODE(PHY_M_PC_ENA_AUTO) >> 1; |
341 | |||
342 | if (hw->chip_id == CHIP_ID_YUKON_FE_P && | ||
343 | hw->chip_rev == CHIP_REV_YU_FE2_A0) { | ||
344 | u16 spec; | ||
345 | |||
346 | /* Enable Class A driver for FE+ A0 */ | ||
347 | spec = gm_phy_read(hw, port, PHY_MARV_FE_SPEC_2); | ||
348 | spec |= PHY_M_FESC_SEL_CL_A; | ||
349 | gm_phy_write(hw, port, PHY_MARV_FE_SPEC_2, spec); | ||
350 | } | ||
341 | } else { | 351 | } else { |
342 | /* disable energy detect */ | 352 | /* disable energy detect */ |
343 | ctrl &= ~PHY_M_PC_EN_DET_MSK; | 353 | ctrl &= ~PHY_M_PC_EN_DET_MSK; |
@@ -816,7 +826,8 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port) | |||
816 | sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_CLR); | 826 | sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_CLR); |
817 | sky2_write16(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_OPER_ON); | 827 | sky2_write16(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_OPER_ON); |
818 | 828 | ||
819 | if (!(hw->flags & SKY2_HW_RAMBUFFER)) { | 829 | /* On chips without ram buffer, pause is controled by MAC level */ |
830 | if (sky2_read8(hw, B2_E_0) == 0) { | ||
820 | sky2_write8(hw, SK_REG(port, RX_GMF_LP_THR), 768/8); | 831 | sky2_write8(hw, SK_REG(port, RX_GMF_LP_THR), 768/8); |
821 | sky2_write8(hw, SK_REG(port, RX_GMF_UP_THR), 1024/8); | 832 | sky2_write8(hw, SK_REG(port, RX_GMF_UP_THR), 1024/8); |
822 | 833 | ||
@@ -899,6 +910,20 @@ static inline struct sky2_tx_le *get_tx_le(struct sky2_port *sky2) | |||
899 | return le; | 910 | return le; |
900 | } | 911 | } |
901 | 912 | ||
913 | static void tx_init(struct sky2_port *sky2) | ||
914 | { | ||
915 | struct sky2_tx_le *le; | ||
916 | |||
917 | sky2->tx_prod = sky2->tx_cons = 0; | ||
918 | sky2->tx_tcpsum = 0; | ||
919 | sky2->tx_last_mss = 0; | ||
920 | |||
921 | le = get_tx_le(sky2); | ||
922 | le->addr = 0; | ||
923 | le->opcode = OP_ADDR64 | HW_OWNER; | ||
924 | sky2->tx_addr64 = 0; | ||
925 | } | ||
926 | |||
902 | static inline struct tx_ring_info *tx_le_re(struct sky2_port *sky2, | 927 | static inline struct tx_ring_info *tx_le_re(struct sky2_port *sky2, |
903 | struct sky2_tx_le *le) | 928 | struct sky2_tx_le *le) |
904 | { | 929 | { |
@@ -1271,7 +1296,7 @@ static int sky2_up(struct net_device *dev) | |||
1271 | struct sky2_port *sky2 = netdev_priv(dev); | 1296 | struct sky2_port *sky2 = netdev_priv(dev); |
1272 | struct sky2_hw *hw = sky2->hw; | 1297 | struct sky2_hw *hw = sky2->hw; |
1273 | unsigned port = sky2->port; | 1298 | unsigned port = sky2->port; |
1274 | u32 imask; | 1299 | u32 imask, ramsize; |
1275 | int cap, err = -ENOMEM; | 1300 | int cap, err = -ENOMEM; |
1276 | struct net_device *otherdev = hw->dev[sky2->port^1]; | 1301 | struct net_device *otherdev = hw->dev[sky2->port^1]; |
1277 | 1302 | ||
@@ -1309,7 +1334,8 @@ static int sky2_up(struct net_device *dev) | |||
1309 | GFP_KERNEL); | 1334 | GFP_KERNEL); |
1310 | if (!sky2->tx_ring) | 1335 | if (!sky2->tx_ring) |
1311 | goto err_out; | 1336 | goto err_out; |
1312 | sky2->tx_prod = sky2->tx_cons = 0; | 1337 | |
1338 | tx_init(sky2); | ||
1313 | 1339 | ||
1314 | sky2->rx_le = pci_alloc_consistent(hw->pdev, RX_LE_BYTES, | 1340 | sky2->rx_le = pci_alloc_consistent(hw->pdev, RX_LE_BYTES, |
1315 | &sky2->rx_le_map); | 1341 | &sky2->rx_le_map); |
@@ -1326,13 +1352,12 @@ static int sky2_up(struct net_device *dev) | |||
1326 | 1352 | ||
1327 | sky2_mac_init(hw, port); | 1353 | sky2_mac_init(hw, port); |
1328 | 1354 | ||
1329 | if (hw->flags & SKY2_HW_RAMBUFFER) { | 1355 | /* Register is number of 4K blocks on internal RAM buffer. */ |
1330 | /* Register is number of 4K blocks on internal RAM buffer. */ | 1356 | ramsize = sky2_read8(hw, B2_E_0) * 4; |
1331 | u32 ramsize = sky2_read8(hw, B2_E_0) * 4; | 1357 | if (ramsize > 0) { |
1332 | u32 rxspace; | 1358 | u32 rxspace; |
1333 | 1359 | ||
1334 | printk(KERN_DEBUG PFX "%s: ram buffer %dK\n", dev->name, ramsize); | 1360 | pr_debug(PFX "%s: ram buffer %dK\n", dev->name, ramsize); |
1335 | |||
1336 | if (ramsize < 16) | 1361 | if (ramsize < 16) |
1337 | rxspace = ramsize / 2; | 1362 | rxspace = ramsize / 2; |
1338 | else | 1363 | else |
@@ -1995,7 +2020,7 @@ static int sky2_change_mtu(struct net_device *dev, int new_mtu) | |||
1995 | 2020 | ||
1996 | synchronize_irq(hw->pdev->irq); | 2021 | synchronize_irq(hw->pdev->irq); |
1997 | 2022 | ||
1998 | if (!(hw->flags & SKY2_HW_RAMBUFFER)) | 2023 | if (sky2_read8(hw, B2_E_0) == 0) |
1999 | sky2_set_tx_stfwd(hw, port); | 2024 | sky2_set_tx_stfwd(hw, port); |
2000 | 2025 | ||
2001 | ctl = gma_read16(hw, port, GM_GP_CTRL); | 2026 | ctl = gma_read16(hw, port, GM_GP_CTRL); |
@@ -2138,6 +2163,15 @@ static struct sk_buff *sky2_receive(struct net_device *dev, | |||
2138 | sky2->rx_next = (sky2->rx_next + 1) % sky2->rx_pending; | 2163 | sky2->rx_next = (sky2->rx_next + 1) % sky2->rx_pending; |
2139 | prefetch(sky2->rx_ring + sky2->rx_next); | 2164 | prefetch(sky2->rx_ring + sky2->rx_next); |
2140 | 2165 | ||
2166 | /* This chip has hardware problems that generates bogus status. | ||
2167 | * So do only marginal checking and expect higher level protocols | ||
2168 | * to handle crap frames. | ||
2169 | */ | ||
2170 | if (sky2->hw->chip_id == CHIP_ID_YUKON_FE_P && | ||
2171 | sky2->hw->chip_rev == CHIP_REV_YU_FE2_A0 && | ||
2172 | length != count) | ||
2173 | goto okay; | ||
2174 | |||
2141 | if (status & GMR_FS_ANY_ERR) | 2175 | if (status & GMR_FS_ANY_ERR) |
2142 | goto error; | 2176 | goto error; |
2143 | 2177 | ||
@@ -2146,8 +2180,9 @@ static struct sk_buff *sky2_receive(struct net_device *dev, | |||
2146 | 2180 | ||
2147 | /* if length reported by DMA does not match PHY, packet was truncated */ | 2181 | /* if length reported by DMA does not match PHY, packet was truncated */ |
2148 | if (length != count) | 2182 | if (length != count) |
2149 | goto len_mismatch; | 2183 | goto len_error; |
2150 | 2184 | ||
2185 | okay: | ||
2151 | if (length < copybreak) | 2186 | if (length < copybreak) |
2152 | skb = receive_copy(sky2, re, length); | 2187 | skb = receive_copy(sky2, re, length); |
2153 | else | 2188 | else |
@@ -2157,13 +2192,13 @@ resubmit: | |||
2157 | 2192 | ||
2158 | return skb; | 2193 | return skb; |
2159 | 2194 | ||
2160 | len_mismatch: | 2195 | len_error: |
2161 | /* Truncation of overlength packets | 2196 | /* Truncation of overlength packets |
2162 | causes PHY length to not match MAC length */ | 2197 | causes PHY length to not match MAC length */ |
2163 | ++sky2->net_stats.rx_length_errors; | 2198 | ++sky2->net_stats.rx_length_errors; |
2164 | if (netif_msg_rx_err(sky2) && net_ratelimit()) | 2199 | if (netif_msg_rx_err(sky2) && net_ratelimit()) |
2165 | pr_info(PFX "%s: rx length mismatch: length %d status %#x\n", | 2200 | pr_info(PFX "%s: rx length error: status %#x length %d\n", |
2166 | dev->name, length, status); | 2201 | dev->name, status, length); |
2167 | goto resubmit; | 2202 | goto resubmit; |
2168 | 2203 | ||
2169 | error: | 2204 | error: |
@@ -2526,7 +2561,7 @@ static void sky2_watchdog(unsigned long arg) | |||
2526 | ++active; | 2561 | ++active; |
2527 | 2562 | ||
2528 | /* For chips with Rx FIFO, check if stuck */ | 2563 | /* For chips with Rx FIFO, check if stuck */ |
2529 | if ((hw->flags & SKY2_HW_RAMBUFFER) && | 2564 | if ((hw->flags & SKY2_HW_FIFO_HANG_CHECK) && |
2530 | sky2_rx_hung(dev)) { | 2565 | sky2_rx_hung(dev)) { |
2531 | pr_info(PFX "%s: receiver hang detected\n", | 2566 | pr_info(PFX "%s: receiver hang detected\n", |
2532 | dev->name); | 2567 | dev->name); |
@@ -2684,8 +2719,10 @@ static int __devinit sky2_init(struct sky2_hw *hw) | |||
2684 | switch(hw->chip_id) { | 2719 | switch(hw->chip_id) { |
2685 | case CHIP_ID_YUKON_XL: | 2720 | case CHIP_ID_YUKON_XL: |
2686 | hw->flags = SKY2_HW_GIGABIT | 2721 | hw->flags = SKY2_HW_GIGABIT |
2687 | | SKY2_HW_NEWER_PHY | 2722 | | SKY2_HW_NEWER_PHY; |
2688 | | SKY2_HW_RAMBUFFER; | 2723 | if (hw->chip_rev < 3) |
2724 | hw->flags |= SKY2_HW_FIFO_HANG_CHECK; | ||
2725 | |||
2689 | break; | 2726 | break; |
2690 | 2727 | ||
2691 | case CHIP_ID_YUKON_EC_U: | 2728 | case CHIP_ID_YUKON_EC_U: |
@@ -2711,11 +2748,10 @@ static int __devinit sky2_init(struct sky2_hw *hw) | |||
2711 | dev_err(&hw->pdev->dev, "unsupported revision Yukon-EC rev A1\n"); | 2748 | dev_err(&hw->pdev->dev, "unsupported revision Yukon-EC rev A1\n"); |
2712 | return -EOPNOTSUPP; | 2749 | return -EOPNOTSUPP; |
2713 | } | 2750 | } |
2714 | hw->flags = SKY2_HW_GIGABIT | SKY2_HW_RAMBUFFER; | 2751 | hw->flags = SKY2_HW_GIGABIT | SKY2_HW_FIFO_HANG_CHECK; |
2715 | break; | 2752 | break; |
2716 | 2753 | ||
2717 | case CHIP_ID_YUKON_FE: | 2754 | case CHIP_ID_YUKON_FE: |
2718 | hw->flags = SKY2_HW_RAMBUFFER; | ||
2719 | break; | 2755 | break; |
2720 | 2756 | ||
2721 | case CHIP_ID_YUKON_FE_P: | 2757 | case CHIP_ID_YUKON_FE_P: |
@@ -3923,13 +3959,6 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw, | |||
3923 | sky2->hw = hw; | 3959 | sky2->hw = hw; |
3924 | sky2->msg_enable = netif_msg_init(debug, default_msg); | 3960 | sky2->msg_enable = netif_msg_init(debug, default_msg); |
3925 | 3961 | ||
3926 | /* This chip has hardware problems that generates | ||
3927 | * bogus PHY receive status so by default shut up the message. | ||
3928 | */ | ||
3929 | if (hw->chip_id == CHIP_ID_YUKON_FE_P && | ||
3930 | hw->chip_rev == CHIP_REV_YU_FE2_A0) | ||
3931 | sky2->msg_enable &= ~NETIF_MSG_RX_ERR; | ||
3932 | |||
3933 | /* Auto speed and flow control */ | 3962 | /* Auto speed and flow control */ |
3934 | sky2->autoneg = AUTONEG_ENABLE; | 3963 | sky2->autoneg = AUTONEG_ENABLE; |
3935 | sky2->flow_mode = FC_BOTH; | 3964 | sky2->flow_mode = FC_BOTH; |
@@ -3953,8 +3982,12 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw, | |||
3953 | dev->features |= NETIF_F_HIGHDMA; | 3982 | dev->features |= NETIF_F_HIGHDMA; |
3954 | 3983 | ||
3955 | #ifdef SKY2_VLAN_TAG_USED | 3984 | #ifdef SKY2_VLAN_TAG_USED |
3956 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | 3985 | /* The workaround for FE+ status conflicts with VLAN tag detection. */ |
3957 | dev->vlan_rx_register = sky2_vlan_rx_register; | 3986 | if (!(sky2->hw->chip_id == CHIP_ID_YUKON_FE_P && |
3987 | sky2->hw->chip_rev == CHIP_REV_YU_FE2_A0)) { | ||
3988 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | ||
3989 | dev->vlan_rx_register = sky2_vlan_rx_register; | ||
3990 | } | ||
3958 | #endif | 3991 | #endif |
3959 | 3992 | ||
3960 | /* read the mac address */ | 3993 | /* read the mac address */ |
diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h index 69cd98400fe6..8bc5c54e3efa 100644 --- a/drivers/net/sky2.h +++ b/drivers/net/sky2.h | |||
@@ -2063,7 +2063,7 @@ struct sky2_hw { | |||
2063 | #define SKY2_HW_FIBRE_PHY 0x00000002 | 2063 | #define SKY2_HW_FIBRE_PHY 0x00000002 |
2064 | #define SKY2_HW_GIGABIT 0x00000004 | 2064 | #define SKY2_HW_GIGABIT 0x00000004 |
2065 | #define SKY2_HW_NEWER_PHY 0x00000008 | 2065 | #define SKY2_HW_NEWER_PHY 0x00000008 |
2066 | #define SKY2_HW_RAMBUFFER 0x00000010 /* chip has RAM FIFO */ | 2066 | #define SKY2_HW_FIFO_HANG_CHECK 0x00000010 |
2067 | #define SKY2_HW_NEW_LE 0x00000020 /* new LSOv2 format */ | 2067 | #define SKY2_HW_NEW_LE 0x00000020 /* new LSOv2 format */ |
2068 | #define SKY2_HW_AUTO_TX_SUM 0x00000040 /* new IP decode for Tx */ | 2068 | #define SKY2_HW_AUTO_TX_SUM 0x00000040 /* new IP decode for Tx */ |
2069 | #define SKY2_HW_ADV_POWER_CTL 0x00000080 /* additional PHY power regs */ | 2069 | #define SKY2_HW_ADV_POWER_CTL 0x00000080 /* additional PHY power regs */ |
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c index 16c7a0e87850..a2de32fabc17 100644 --- a/drivers/net/usb/dm9601.c +++ b/drivers/net/usb/dm9601.c | |||
@@ -405,7 +405,7 @@ static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf) | |||
405 | dev->net->ethtool_ops = &dm9601_ethtool_ops; | 405 | dev->net->ethtool_ops = &dm9601_ethtool_ops; |
406 | dev->net->hard_header_len += DM_TX_OVERHEAD; | 406 | dev->net->hard_header_len += DM_TX_OVERHEAD; |
407 | dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len; | 407 | dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len; |
408 | dev->rx_urb_size = dev->net->mtu + DM_RX_OVERHEAD; | 408 | dev->rx_urb_size = dev->net->mtu + ETH_HLEN + DM_RX_OVERHEAD; |
409 | 409 | ||
410 | dev->mii.dev = dev->net; | 410 | dev->mii.dev = dev->net; |
411 | dev->mii.mdio_read = dm9601_mdio_read; | 411 | dev->mii.mdio_read = dm9601_mdio_read; |
diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile index ef35bc6c4a22..4eb6d9752881 100644 --- a/drivers/net/wireless/Makefile +++ b/drivers/net/wireless/Makefile | |||
@@ -43,7 +43,7 @@ obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o | |||
43 | obj-$(CONFIG_PCMCIA_WL3501) += wl3501_cs.o | 43 | obj-$(CONFIG_PCMCIA_WL3501) += wl3501_cs.o |
44 | 44 | ||
45 | obj-$(CONFIG_USB_ZD1201) += zd1201.o | 45 | obj-$(CONFIG_USB_ZD1201) += zd1201.o |
46 | obj-$(CONFIG_LIBERTAS_USB) += libertas/ | 46 | obj-$(CONFIG_LIBERTAS) += libertas/ |
47 | 47 | ||
48 | rtl8187-objs := rtl8187_dev.o rtl8187_rtl8225.o | 48 | rtl8187-objs := rtl8187_dev.o rtl8187_rtl8225.o |
49 | obj-$(CONFIG_RTL8187) += rtl8187.o | 49 | obj-$(CONFIG_RTL8187) += rtl8187.o |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_wx.c b/drivers/net/wireless/bcm43xx/bcm43xx_wx.c index d6d9413d7f23..6acfdc49dccd 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_wx.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_wx.c | |||
@@ -444,7 +444,7 @@ static int bcm43xx_wx_set_xmitpower(struct net_device *net_dev, | |||
444 | u16 maxpower; | 444 | u16 maxpower; |
445 | 445 | ||
446 | if ((data->txpower.flags & IW_TXPOW_TYPE) != IW_TXPOW_DBM) { | 446 | if ((data->txpower.flags & IW_TXPOW_TYPE) != IW_TXPOW_DBM) { |
447 | printk(PFX KERN_ERR "TX power not in dBm.\n"); | 447 | printk(KERN_ERR PFX "TX power not in dBm.\n"); |
448 | return -EOPNOTSUPP; | 448 | return -EOPNOTSUPP; |
449 | } | 449 | } |
450 | 450 | ||
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 7dcaa09b3c20..50f2dd9e1bb2 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -1444,7 +1444,6 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETMOS, PCI_ANY_ID, quirk_netmos); | |||
1444 | static void __devinit quirk_e100_interrupt(struct pci_dev *dev) | 1444 | static void __devinit quirk_e100_interrupt(struct pci_dev *dev) |
1445 | { | 1445 | { |
1446 | u16 command; | 1446 | u16 command; |
1447 | u32 bar; | ||
1448 | u8 __iomem *csr; | 1447 | u8 __iomem *csr; |
1449 | u8 cmd_hi; | 1448 | u8 cmd_hi; |
1450 | 1449 | ||
@@ -1476,12 +1475,12 @@ static void __devinit quirk_e100_interrupt(struct pci_dev *dev) | |||
1476 | * re-enable them when it's ready. | 1475 | * re-enable them when it's ready. |
1477 | */ | 1476 | */ |
1478 | pci_read_config_word(dev, PCI_COMMAND, &command); | 1477 | pci_read_config_word(dev, PCI_COMMAND, &command); |
1479 | pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &bar); | ||
1480 | 1478 | ||
1481 | if (!(command & PCI_COMMAND_MEMORY) || !bar) | 1479 | if (!(command & PCI_COMMAND_MEMORY) || !pci_resource_start(dev, 0)) |
1482 | return; | 1480 | return; |
1483 | 1481 | ||
1484 | csr = ioremap(bar, 8); | 1482 | /* Convert from PCI bus to resource space. */ |
1483 | csr = ioremap(pci_resource_start(dev, 0), 8); | ||
1485 | if (!csr) { | 1484 | if (!csr) { |
1486 | printk(KERN_WARNING "PCI: Can't map %s e100 registers\n", | 1485 | printk(KERN_WARNING "PCI: Can't map %s e100 registers\n", |
1487 | pci_name(dev)); | 1486 | pci_name(dev)); |
diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c index c7c4574729b1..de3155b21285 100644 --- a/drivers/power/power_supply_sysfs.c +++ b/drivers/power/power_supply_sysfs.c | |||
@@ -289,6 +289,7 @@ int power_supply_uevent(struct device *dev, char **envp, int num_envp, | |||
289 | if (ret) | 289 | if (ret) |
290 | goto out; | 290 | goto out; |
291 | } | 291 | } |
292 | envp[i] = NULL; | ||
292 | 293 | ||
293 | out: | 294 | out: |
294 | free_page((unsigned long)prop_buf); | 295 | free_page((unsigned long)prop_buf); |
diff --git a/drivers/scsi/aic94xx/aic94xx_task.c b/drivers/scsi/aic94xx/aic94xx_task.c index d5d8caba3560..ab13824df856 100644 --- a/drivers/scsi/aic94xx/aic94xx_task.c +++ b/drivers/scsi/aic94xx/aic94xx_task.c | |||
@@ -451,7 +451,7 @@ static int asd_build_smp_ascb(struct asd_ascb *ascb, struct sas_task *task, | |||
451 | struct scb *scb; | 451 | struct scb *scb; |
452 | 452 | ||
453 | pci_map_sg(asd_ha->pcidev, &task->smp_task.smp_req, 1, | 453 | pci_map_sg(asd_ha->pcidev, &task->smp_task.smp_req, 1, |
454 | PCI_DMA_FROMDEVICE); | 454 | PCI_DMA_TODEVICE); |
455 | pci_map_sg(asd_ha->pcidev, &task->smp_task.smp_resp, 1, | 455 | pci_map_sg(asd_ha->pcidev, &task->smp_task.smp_resp, 1, |
456 | PCI_DMA_FROMDEVICE); | 456 | PCI_DMA_FROMDEVICE); |
457 | 457 | ||
@@ -486,7 +486,7 @@ static void asd_unbuild_smp_ascb(struct asd_ascb *a) | |||
486 | 486 | ||
487 | BUG_ON(!task); | 487 | BUG_ON(!task); |
488 | pci_unmap_sg(a->ha->pcidev, &task->smp_task.smp_req, 1, | 488 | pci_unmap_sg(a->ha->pcidev, &task->smp_task.smp_req, 1, |
489 | PCI_DMA_FROMDEVICE); | 489 | PCI_DMA_TODEVICE); |
490 | pci_unmap_sg(a->ha->pcidev, &task->smp_task.smp_resp, 1, | 490 | pci_unmap_sg(a->ha->pcidev, &task->smp_task.smp_resp, 1, |
491 | PCI_DMA_FROMDEVICE); | 491 | PCI_DMA_FROMDEVICE); |
492 | } | 492 | } |
diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c index 77b06a983fa7..95cf7b6cd622 100644 --- a/drivers/scsi/esp_scsi.c +++ b/drivers/scsi/esp_scsi.c | |||
@@ -2314,6 +2314,7 @@ int __devinit scsi_esp_register(struct esp *esp, struct device *dev) | |||
2314 | esp->host->transportt = esp_transport_template; | 2314 | esp->host->transportt = esp_transport_template; |
2315 | esp->host->max_lun = ESP_MAX_LUN; | 2315 | esp->host->max_lun = ESP_MAX_LUN; |
2316 | esp->host->cmd_per_lun = 2; | 2316 | esp->host->cmd_per_lun = 2; |
2317 | esp->host->unique_id = instance; | ||
2317 | 2318 | ||
2318 | esp_set_clock_params(esp); | 2319 | esp_set_clock_params(esp); |
2319 | 2320 | ||
@@ -2337,7 +2338,7 @@ int __devinit scsi_esp_register(struct esp *esp, struct device *dev) | |||
2337 | if (err) | 2338 | if (err) |
2338 | return err; | 2339 | return err; |
2339 | 2340 | ||
2340 | esp->host->unique_id = instance++; | 2341 | instance++; |
2341 | 2342 | ||
2342 | scsi_scan_host(esp->host); | 2343 | scsi_scan_host(esp->host); |
2343 | 2344 | ||
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 3907f6718ede..da56163c30a8 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c | |||
@@ -1753,6 +1753,14 @@ mega_build_sglist(adapter_t *adapter, scb_t *scb, u32 *buf, u32 *len) | |||
1753 | 1753 | ||
1754 | *len = 0; | 1754 | *len = 0; |
1755 | 1755 | ||
1756 | if (scsi_sg_count(cmd) == 1 && !adapter->has_64bit_addr) { | ||
1757 | sg = scsi_sglist(cmd); | ||
1758 | scb->dma_h_bulkdata = sg_dma_address(sg); | ||
1759 | *buf = (u32)scb->dma_h_bulkdata; | ||
1760 | *len = sg_dma_len(sg); | ||
1761 | return 0; | ||
1762 | } | ||
1763 | |||
1756 | scsi_for_each_sg(cmd, sg, sgcnt, idx) { | 1764 | scsi_for_each_sg(cmd, sg, sgcnt, idx) { |
1757 | if (adapter->has_64bit_addr) { | 1765 | if (adapter->has_64bit_addr) { |
1758 | scb->sgl64[idx].address = sg_dma_address(sg); | 1766 | scb->sgl64[idx].address = sg_dma_address(sg); |
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c index 6f56f8750635..4df21c92ff1e 100644 --- a/drivers/scsi/scsi_transport_spi.c +++ b/drivers/scsi/scsi_transport_spi.c | |||
@@ -787,10 +787,12 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer) | |||
787 | struct scsi_target *starget = sdev->sdev_target; | 787 | struct scsi_target *starget = sdev->sdev_target; |
788 | struct Scsi_Host *shost = sdev->host; | 788 | struct Scsi_Host *shost = sdev->host; |
789 | int len = sdev->inquiry_len; | 789 | int len = sdev->inquiry_len; |
790 | int min_period = spi_min_period(starget); | ||
791 | int max_width = spi_max_width(starget); | ||
790 | /* first set us up for narrow async */ | 792 | /* first set us up for narrow async */ |
791 | DV_SET(offset, 0); | 793 | DV_SET(offset, 0); |
792 | DV_SET(width, 0); | 794 | DV_SET(width, 0); |
793 | 795 | ||
794 | if (spi_dv_device_compare_inquiry(sdev, buffer, buffer, DV_LOOPS) | 796 | if (spi_dv_device_compare_inquiry(sdev, buffer, buffer, DV_LOOPS) |
795 | != SPI_COMPARE_SUCCESS) { | 797 | != SPI_COMPARE_SUCCESS) { |
796 | starget_printk(KERN_ERR, starget, "Domain Validation Initial Inquiry Failed\n"); | 798 | starget_printk(KERN_ERR, starget, "Domain Validation Initial Inquiry Failed\n"); |
@@ -798,9 +800,13 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer) | |||
798 | return; | 800 | return; |
799 | } | 801 | } |
800 | 802 | ||
803 | if (!scsi_device_wide(sdev)) { | ||
804 | spi_max_width(starget) = 0; | ||
805 | max_width = 0; | ||
806 | } | ||
807 | |||
801 | /* test width */ | 808 | /* test width */ |
802 | if (i->f->set_width && spi_max_width(starget) && | 809 | if (i->f->set_width && max_width) { |
803 | scsi_device_wide(sdev)) { | ||
804 | i->f->set_width(starget, 1); | 810 | i->f->set_width(starget, 1); |
805 | 811 | ||
806 | if (spi_dv_device_compare_inquiry(sdev, buffer, | 812 | if (spi_dv_device_compare_inquiry(sdev, buffer, |
@@ -809,6 +815,11 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer) | |||
809 | != SPI_COMPARE_SUCCESS) { | 815 | != SPI_COMPARE_SUCCESS) { |
810 | starget_printk(KERN_ERR, starget, "Wide Transfers Fail\n"); | 816 | starget_printk(KERN_ERR, starget, "Wide Transfers Fail\n"); |
811 | i->f->set_width(starget, 0); | 817 | i->f->set_width(starget, 0); |
818 | /* Make sure we don't force wide back on by asking | ||
819 | * for a transfer period that requires it */ | ||
820 | max_width = 0; | ||
821 | if (min_period < 10) | ||
822 | min_period = 10; | ||
812 | } | 823 | } |
813 | } | 824 | } |
814 | 825 | ||
@@ -828,7 +839,8 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer) | |||
828 | 839 | ||
829 | /* now set up to the maximum */ | 840 | /* now set up to the maximum */ |
830 | DV_SET(offset, spi_max_offset(starget)); | 841 | DV_SET(offset, spi_max_offset(starget)); |
831 | DV_SET(period, spi_min_period(starget)); | 842 | DV_SET(period, min_period); |
843 | |||
832 | /* try QAS requests; this should be harmless to set if the | 844 | /* try QAS requests; this should be harmless to set if the |
833 | * target supports it */ | 845 | * target supports it */ |
834 | if (scsi_device_qas(sdev)) { | 846 | if (scsi_device_qas(sdev)) { |
@@ -837,14 +849,14 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer) | |||
837 | DV_SET(qas, 0); | 849 | DV_SET(qas, 0); |
838 | } | 850 | } |
839 | 851 | ||
840 | if (scsi_device_ius(sdev) && spi_min_period(starget) < 9) { | 852 | if (scsi_device_ius(sdev) && min_period < 9) { |
841 | /* This u320 (or u640). Set IU transfers */ | 853 | /* This u320 (or u640). Set IU transfers */ |
842 | DV_SET(iu, 1); | 854 | DV_SET(iu, 1); |
843 | /* Then set the optional parameters */ | 855 | /* Then set the optional parameters */ |
844 | DV_SET(rd_strm, 1); | 856 | DV_SET(rd_strm, 1); |
845 | DV_SET(wr_flow, 1); | 857 | DV_SET(wr_flow, 1); |
846 | DV_SET(rti, 1); | 858 | DV_SET(rti, 1); |
847 | if (spi_min_period(starget) == 8) | 859 | if (min_period == 8) |
848 | DV_SET(pcomp_en, 1); | 860 | DV_SET(pcomp_en, 1); |
849 | } else { | 861 | } else { |
850 | DV_SET(iu, 0); | 862 | DV_SET(iu, 0); |
@@ -862,6 +874,10 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer) | |||
862 | } else { | 874 | } else { |
863 | DV_SET(dt, 1); | 875 | DV_SET(dt, 1); |
864 | } | 876 | } |
877 | /* set width last because it will pull all the other | ||
878 | * parameters down to required values */ | ||
879 | DV_SET(width, max_width); | ||
880 | |||
865 | /* Do the read only INQUIRY tests */ | 881 | /* Do the read only INQUIRY tests */ |
866 | spi_dv_retrain(sdev, buffer, buffer + sdev->inquiry_len, | 882 | spi_dv_retrain(sdev, buffer, buffer + sdev->inquiry_len, |
867 | spi_dv_device_compare_inquiry); | 883 | spi_dv_device_compare_inquiry); |
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm1.h b/drivers/serial/cpm_uart/cpm_uart_cpm1.h index a99e45e2b6d8..2a6477834c3e 100644 --- a/drivers/serial/cpm_uart/cpm_uart_cpm1.h +++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.h | |||
@@ -37,6 +37,6 @@ static inline void cpm_set_smc_fcr(volatile smc_uart_t * up) | |||
37 | up->smc_tfcr = SMC_EB; | 37 | up->smc_tfcr = SMC_EB; |
38 | } | 38 | } |
39 | 39 | ||
40 | #define DPRAM_BASE ((unsigned char *)&cpmp->cp_dpmem[0]) | 40 | #define DPRAM_BASE ((unsigned char *)cpm_dpram_addr(0)) |
41 | 41 | ||
42 | #endif | 42 | #endif |
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c index a0ea43598515..7c8d78fbbbfb 100644 --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c | |||
@@ -943,6 +943,7 @@ static struct pcmcia_device_id serial_ids[] = { | |||
943 | PCMCIA_MFC_DEVICE_PROD_ID12(1,"Elan","Serial Port: SL432",0x3beb8cf2,0x1cce7ac4), | 943 | PCMCIA_MFC_DEVICE_PROD_ID12(1,"Elan","Serial Port: SL432",0x3beb8cf2,0x1cce7ac4), |
944 | PCMCIA_MFC_DEVICE_PROD_ID12(2,"Elan","Serial Port: SL432",0x3beb8cf2,0x1cce7ac4), | 944 | PCMCIA_MFC_DEVICE_PROD_ID12(2,"Elan","Serial Port: SL432",0x3beb8cf2,0x1cce7ac4), |
945 | PCMCIA_MFC_DEVICE_PROD_ID12(3,"Elan","Serial Port: SL432",0x3beb8cf2,0x1cce7ac4), | 945 | PCMCIA_MFC_DEVICE_PROD_ID12(3,"Elan","Serial Port: SL432",0x3beb8cf2,0x1cce7ac4), |
946 | PCMCIA_DEVICE_MANF_CARD(0x0279, 0x950b), | ||
946 | /* too generic */ | 947 | /* too generic */ |
947 | /* PCMCIA_MFC_DEVICE_MANF_CARD(0, 0x0160, 0x0002), */ | 948 | /* PCMCIA_MFC_DEVICE_MANF_CARD(0, 0x0160, 0x0002), */ |
948 | /* PCMCIA_MFC_DEVICE_MANF_CARD(1, 0x0160, 0x0002), */ | 949 | /* PCMCIA_MFC_DEVICE_MANF_CARD(1, 0x0160, 0x0002), */ |
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index e348ba684050..ff610c23314b 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include <asm/prom.h> | 38 | #include <asm/prom.h> |
39 | #include <asm/of_device.h> | 39 | #include <asm/of_device.h> |
40 | 40 | ||
41 | #if defined(CONFIG_SERIAL_SUNZILOG_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 41 | #if defined(CONFIG_SERIAL_SUNSAB_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
42 | #define SUPPORT_SYSRQ | 42 | #define SUPPORT_SYSRQ |
43 | #endif | 43 | #endif |
44 | 44 | ||
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index 8d7ab74170d5..a593f900eff4 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c | |||
@@ -431,6 +431,7 @@ static int w1_uevent(struct device *dev, char **envp, int num_envp, | |||
431 | err = add_uevent_var(envp, num_envp, &cur_index, buffer, buffer_size, | 431 | err = add_uevent_var(envp, num_envp, &cur_index, buffer, buffer_size, |
432 | &cur_len, "W1_SLAVE_ID=%024LX", | 432 | &cur_len, "W1_SLAVE_ID=%024LX", |
433 | (unsigned long long)sl->reg_num.id); | 433 | (unsigned long long)sl->reg_num.id); |
434 | envp[cur_index] = NULL; | ||
434 | if (err) | 435 | if (err) |
435 | return err; | 436 | return err; |
436 | 437 | ||