diff options
Diffstat (limited to 'drivers')
38 files changed, 246 insertions, 126 deletions
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..2cbb9aabd00e 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 |
@@ -299,6 +301,7 @@ int acpi_suspend(u32 acpi_state) | |||
299 | return -EINVAL; | 301 | return -EINVAL; |
300 | } | 302 | } |
301 | 303 | ||
304 | #ifdef CONFIG_PM_SLEEP | ||
302 | /** | 305 | /** |
303 | * acpi_pm_device_sleep_state - return preferred power state of ACPI device | 306 | * acpi_pm_device_sleep_state - return preferred power state of ACPI device |
304 | * in the system sleep state given by %acpi_target_sleep_state | 307 | * in the system sleep state given by %acpi_target_sleep_state |
@@ -373,6 +376,7 @@ int acpi_pm_device_sleep_state(struct device *dev, int wake, int *d_min_p) | |||
373 | *d_min_p = d_min; | 376 | *d_min_p = d_min; |
374 | return d_max; | 377 | return d_max; |
375 | } | 378 | } |
379 | #endif | ||
376 | 380 | ||
377 | static void acpi_power_off_prepare(void) | 381 | static void acpi_power_off_prepare(void) |
378 | { | 382 | { |
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_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_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..67c92582d6ef 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); |
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/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..c799b7f7bbb3 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 | ||
@@ -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/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/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/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/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..c921ec32c232 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 |
@@ -2567,6 +2570,15 @@ static void rtl8169_tx_interrupt(struct net_device *dev, | |||
2567 | (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)) { | 2570 | (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)) { |
2568 | netif_wake_queue(dev); | 2571 | netif_wake_queue(dev); |
2569 | } | 2572 | } |
2573 | /* | ||
2574 | * 8168 hack: TxPoll requests are lost when the Tx packets are | ||
2575 | * too close. Let's kick an extra TxPoll request when a burst | ||
2576 | * of start_xmit activity is detected (if it is not detected, | ||
2577 | * it is slow enough). -- FR | ||
2578 | */ | ||
2579 | smp_rmb(); | ||
2580 | if (tp->cur_tx != dirty_tx) | ||
2581 | RTL_W8(TxPoll, NPQ); | ||
2570 | } | 2582 | } |
2571 | } | 2583 | } |
2572 | 2584 | ||
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index eaffe551d1d8..162489b9f599 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,18 @@ 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 | if (length < ETH_ZLEN || length > sky2->rx_data_size) | ||
2167 | goto len_error; | ||
2168 | |||
2169 | /* This chip has hardware problems that generates bogus status. | ||
2170 | * So do only marginal checking and expect higher level protocols | ||
2171 | * to handle crap frames. | ||
2172 | */ | ||
2173 | if (sky2->hw->chip_id == CHIP_ID_YUKON_FE_P && | ||
2174 | sky2->hw->chip_rev == CHIP_REV_YU_FE2_A0 && | ||
2175 | length != count) | ||
2176 | goto okay; | ||
2177 | |||
2141 | if (status & GMR_FS_ANY_ERR) | 2178 | if (status & GMR_FS_ANY_ERR) |
2142 | goto error; | 2179 | goto error; |
2143 | 2180 | ||
@@ -2146,8 +2183,9 @@ static struct sk_buff *sky2_receive(struct net_device *dev, | |||
2146 | 2183 | ||
2147 | /* if length reported by DMA does not match PHY, packet was truncated */ | 2184 | /* if length reported by DMA does not match PHY, packet was truncated */ |
2148 | if (length != count) | 2185 | if (length != count) |
2149 | goto len_mismatch; | 2186 | goto len_error; |
2150 | 2187 | ||
2188 | okay: | ||
2151 | if (length < copybreak) | 2189 | if (length < copybreak) |
2152 | skb = receive_copy(sky2, re, length); | 2190 | skb = receive_copy(sky2, re, length); |
2153 | else | 2191 | else |
@@ -2157,13 +2195,13 @@ resubmit: | |||
2157 | 2195 | ||
2158 | return skb; | 2196 | return skb; |
2159 | 2197 | ||
2160 | len_mismatch: | 2198 | len_error: |
2161 | /* Truncation of overlength packets | 2199 | /* Truncation of overlength packets |
2162 | causes PHY length to not match MAC length */ | 2200 | causes PHY length to not match MAC length */ |
2163 | ++sky2->net_stats.rx_length_errors; | 2201 | ++sky2->net_stats.rx_length_errors; |
2164 | if (netif_msg_rx_err(sky2) && net_ratelimit()) | 2202 | if (netif_msg_rx_err(sky2) && net_ratelimit()) |
2165 | pr_info(PFX "%s: rx length mismatch: length %d status %#x\n", | 2203 | pr_info(PFX "%s: rx length error: status %#x length %d\n", |
2166 | dev->name, length, status); | 2204 | dev->name, status, length); |
2167 | goto resubmit; | 2205 | goto resubmit; |
2168 | 2206 | ||
2169 | error: | 2207 | error: |
@@ -2526,7 +2564,7 @@ static void sky2_watchdog(unsigned long arg) | |||
2526 | ++active; | 2564 | ++active; |
2527 | 2565 | ||
2528 | /* For chips with Rx FIFO, check if stuck */ | 2566 | /* For chips with Rx FIFO, check if stuck */ |
2529 | if ((hw->flags & SKY2_HW_RAMBUFFER) && | 2567 | if ((hw->flags & SKY2_HW_FIFO_HANG_CHECK) && |
2530 | sky2_rx_hung(dev)) { | 2568 | sky2_rx_hung(dev)) { |
2531 | pr_info(PFX "%s: receiver hang detected\n", | 2569 | pr_info(PFX "%s: receiver hang detected\n", |
2532 | dev->name); | 2570 | dev->name); |
@@ -2684,8 +2722,10 @@ static int __devinit sky2_init(struct sky2_hw *hw) | |||
2684 | switch(hw->chip_id) { | 2722 | switch(hw->chip_id) { |
2685 | case CHIP_ID_YUKON_XL: | 2723 | case CHIP_ID_YUKON_XL: |
2686 | hw->flags = SKY2_HW_GIGABIT | 2724 | hw->flags = SKY2_HW_GIGABIT |
2687 | | SKY2_HW_NEWER_PHY | 2725 | | SKY2_HW_NEWER_PHY; |
2688 | | SKY2_HW_RAMBUFFER; | 2726 | if (hw->chip_rev < 3) |
2727 | hw->flags |= SKY2_HW_FIFO_HANG_CHECK; | ||
2728 | |||
2689 | break; | 2729 | break; |
2690 | 2730 | ||
2691 | case CHIP_ID_YUKON_EC_U: | 2731 | case CHIP_ID_YUKON_EC_U: |
@@ -2711,11 +2751,10 @@ static int __devinit sky2_init(struct sky2_hw *hw) | |||
2711 | dev_err(&hw->pdev->dev, "unsupported revision Yukon-EC rev A1\n"); | 2751 | dev_err(&hw->pdev->dev, "unsupported revision Yukon-EC rev A1\n"); |
2712 | return -EOPNOTSUPP; | 2752 | return -EOPNOTSUPP; |
2713 | } | 2753 | } |
2714 | hw->flags = SKY2_HW_GIGABIT | SKY2_HW_RAMBUFFER; | 2754 | hw->flags = SKY2_HW_GIGABIT | SKY2_HW_FIFO_HANG_CHECK; |
2715 | break; | 2755 | break; |
2716 | 2756 | ||
2717 | case CHIP_ID_YUKON_FE: | 2757 | case CHIP_ID_YUKON_FE: |
2718 | hw->flags = SKY2_HW_RAMBUFFER; | ||
2719 | break; | 2758 | break; |
2720 | 2759 | ||
2721 | case CHIP_ID_YUKON_FE_P: | 2760 | case CHIP_ID_YUKON_FE_P: |
@@ -3923,13 +3962,6 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw, | |||
3923 | sky2->hw = hw; | 3962 | sky2->hw = hw; |
3924 | sky2->msg_enable = netif_msg_init(debug, default_msg); | 3963 | sky2->msg_enable = netif_msg_init(debug, default_msg); |
3925 | 3964 | ||
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 */ | 3965 | /* Auto speed and flow control */ |
3934 | sky2->autoneg = AUTONEG_ENABLE; | 3966 | sky2->autoneg = AUTONEG_ENABLE; |
3935 | sky2->flow_mode = FC_BOTH; | 3967 | sky2->flow_mode = FC_BOTH; |
@@ -3953,8 +3985,12 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw, | |||
3953 | dev->features |= NETIF_F_HIGHDMA; | 3985 | dev->features |= NETIF_F_HIGHDMA; |
3954 | 3986 | ||
3955 | #ifdef SKY2_VLAN_TAG_USED | 3987 | #ifdef SKY2_VLAN_TAG_USED |
3956 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | 3988 | /* The workaround for FE+ status conflicts with VLAN tag detection. */ |
3957 | dev->vlan_rx_register = sky2_vlan_rx_register; | 3989 | if (!(sky2->hw->chip_id == CHIP_ID_YUKON_FE_P && |
3990 | sky2->hw->chip_rev == CHIP_REV_YU_FE2_A0)) { | ||
3991 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | ||
3992 | dev->vlan_rx_register = sky2_vlan_rx_register; | ||
3993 | } | ||
3958 | #endif | 3994 | #endif |
3959 | 3995 | ||
3960 | /* read the mac address */ | 3996 | /* 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/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/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/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/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 | ||