diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/video.c | 2 | ||||
-rw-r--r-- | drivers/atm/horizon.c | 2 | ||||
-rw-r--r-- | drivers/char/tlclk.c | 43 | ||||
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_cq.c | 5 | ||||
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_irq.c | 3 | ||||
-rw-r--r-- | drivers/infiniband/ulp/srp/ib_srp.c | 20 | ||||
-rw-r--r-- | drivers/kvm/kvm_main.c | 2 | ||||
-rw-r--r-- | drivers/kvm/paging_tmpl.h | 2 | ||||
-rw-r--r-- | drivers/kvm/svm.c | 3 | ||||
-rw-r--r-- | drivers/kvm/vmx.c | 3 | ||||
-rw-r--r-- | drivers/kvm/x86_emulate.c | 98 | ||||
-rw-r--r-- | drivers/net/ehea/ehea.h | 2 | ||||
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 56 | ||||
-rw-r--r-- | drivers/net/ehea/ehea_phyp.c | 10 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic.h | 7 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_hw.c | 3 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 2 | ||||
-rw-r--r-- | drivers/net/pcmcia/3c589_cs.c | 7 | ||||
-rw-r--r-- | drivers/net/phy/phy.c | 3 | ||||
-rw-r--r-- | drivers/net/s2io.c | 3 | ||||
-rw-r--r-- | drivers/rtc/rtc-sh.c | 12 | ||||
-rw-r--r-- | drivers/usb/serial/funsoft.c | 2 |
22 files changed, 180 insertions, 110 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 36b37d755dbc..3d54680d0333 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -1677,8 +1677,6 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data) | |||
1677 | struct acpi_video_device *video_device = data; | 1677 | struct acpi_video_device *video_device = data; |
1678 | struct acpi_device *device = NULL; | 1678 | struct acpi_device *device = NULL; |
1679 | 1679 | ||
1680 | |||
1681 | printk("video device notify\n"); | ||
1682 | if (!video_device) | 1680 | if (!video_device) |
1683 | return; | 1681 | return; |
1684 | 1682 | ||
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c index 4dc10105d610..f96446c358ba 100644 --- a/drivers/atm/horizon.c +++ b/drivers/atm/horizon.c | |||
@@ -1845,7 +1845,7 @@ static u16 __devinit read_bia (const hrz_dev * dev, u16 addr) | |||
1845 | 1845 | ||
1846 | /********** initialise a card **********/ | 1846 | /********** initialise a card **********/ |
1847 | 1847 | ||
1848 | static int __init hrz_init (hrz_dev * dev) { | 1848 | static int __devinit hrz_init (hrz_dev * dev) { |
1849 | int onefivefive; | 1849 | int onefivefive; |
1850 | 1850 | ||
1851 | u16 chan; | 1851 | u16 chan; |
diff --git a/drivers/char/tlclk.c b/drivers/char/tlclk.c index 448d5083c381..4fac2bdf6215 100644 --- a/drivers/char/tlclk.c +++ b/drivers/char/tlclk.c | |||
@@ -186,6 +186,7 @@ static int got_event; /* if events processing have been done */ | |||
186 | static void switchover_timeout(unsigned long data); | 186 | static void switchover_timeout(unsigned long data); |
187 | static struct timer_list switchover_timer = | 187 | static struct timer_list switchover_timer = |
188 | TIMER_INITIALIZER(switchover_timeout , 0, 0); | 188 | TIMER_INITIALIZER(switchover_timeout , 0, 0); |
189 | static unsigned long tlclk_timer_data; | ||
189 | 190 | ||
190 | static struct tlclk_alarms *alarm_events; | 191 | static struct tlclk_alarms *alarm_events; |
191 | 192 | ||
@@ -197,10 +198,19 @@ static irqreturn_t tlclk_interrupt(int irq, void *dev_id); | |||
197 | 198 | ||
198 | static DECLARE_WAIT_QUEUE_HEAD(wq); | 199 | static DECLARE_WAIT_QUEUE_HEAD(wq); |
199 | 200 | ||
201 | static unsigned long useflags; | ||
202 | static DEFINE_MUTEX(tlclk_mutex); | ||
203 | |||
200 | static int tlclk_open(struct inode *inode, struct file *filp) | 204 | static int tlclk_open(struct inode *inode, struct file *filp) |
201 | { | 205 | { |
202 | int result; | 206 | int result; |
203 | 207 | ||
208 | if (test_and_set_bit(0, &useflags)) | ||
209 | return -EBUSY; | ||
210 | /* this legacy device is always one per system and it doesn't | ||
211 | * know how to handle multiple concurrent clients. | ||
212 | */ | ||
213 | |||
204 | /* Make sure there is no interrupt pending while | 214 | /* Make sure there is no interrupt pending while |
205 | * initialising interrupt handler */ | 215 | * initialising interrupt handler */ |
206 | inb(TLCLK_REG6); | 216 | inb(TLCLK_REG6); |
@@ -221,6 +231,7 @@ static int tlclk_open(struct inode *inode, struct file *filp) | |||
221 | static int tlclk_release(struct inode *inode, struct file *filp) | 231 | static int tlclk_release(struct inode *inode, struct file *filp) |
222 | { | 232 | { |
223 | free_irq(telclk_interrupt, tlclk_interrupt); | 233 | free_irq(telclk_interrupt, tlclk_interrupt); |
234 | clear_bit(0, &useflags); | ||
224 | 235 | ||
225 | return 0; | 236 | return 0; |
226 | } | 237 | } |
@@ -230,26 +241,25 @@ static ssize_t tlclk_read(struct file *filp, char __user *buf, size_t count, | |||
230 | { | 241 | { |
231 | if (count < sizeof(struct tlclk_alarms)) | 242 | if (count < sizeof(struct tlclk_alarms)) |
232 | return -EIO; | 243 | return -EIO; |
244 | if (mutex_lock_interruptible(&tlclk_mutex)) | ||
245 | return -EINTR; | ||
246 | |||
233 | 247 | ||
234 | wait_event_interruptible(wq, got_event); | 248 | wait_event_interruptible(wq, got_event); |
235 | if (copy_to_user(buf, alarm_events, sizeof(struct tlclk_alarms))) | 249 | if (copy_to_user(buf, alarm_events, sizeof(struct tlclk_alarms))) { |
250 | mutex_unlock(&tlclk_mutex); | ||
236 | return -EFAULT; | 251 | return -EFAULT; |
252 | } | ||
237 | 253 | ||
238 | memset(alarm_events, 0, sizeof(struct tlclk_alarms)); | 254 | memset(alarm_events, 0, sizeof(struct tlclk_alarms)); |
239 | got_event = 0; | 255 | got_event = 0; |
240 | 256 | ||
257 | mutex_unlock(&tlclk_mutex); | ||
241 | return sizeof(struct tlclk_alarms); | 258 | return sizeof(struct tlclk_alarms); |
242 | } | 259 | } |
243 | 260 | ||
244 | static ssize_t tlclk_write(struct file *filp, const char __user *buf, size_t count, | ||
245 | loff_t *f_pos) | ||
246 | { | ||
247 | return 0; | ||
248 | } | ||
249 | |||
250 | static const struct file_operations tlclk_fops = { | 261 | static const struct file_operations tlclk_fops = { |
251 | .read = tlclk_read, | 262 | .read = tlclk_read, |
252 | .write = tlclk_write, | ||
253 | .open = tlclk_open, | 263 | .open = tlclk_open, |
254 | .release = tlclk_release, | 264 | .release = tlclk_release, |
255 | 265 | ||
@@ -540,7 +550,7 @@ static ssize_t store_select_amcb1_transmit_clock(struct device *d, | |||
540 | SET_PORT_BITS(TLCLK_REG3, 0xf8, 0x7); | 550 | SET_PORT_BITS(TLCLK_REG3, 0xf8, 0x7); |
541 | switch (val) { | 551 | switch (val) { |
542 | case CLK_8_592MHz: | 552 | case CLK_8_592MHz: |
543 | SET_PORT_BITS(TLCLK_REG0, 0xfc, 1); | 553 | SET_PORT_BITS(TLCLK_REG0, 0xfc, 2); |
544 | break; | 554 | break; |
545 | case CLK_11_184MHz: | 555 | case CLK_11_184MHz: |
546 | SET_PORT_BITS(TLCLK_REG0, 0xfc, 0); | 556 | SET_PORT_BITS(TLCLK_REG0, 0xfc, 0); |
@@ -549,7 +559,7 @@ static ssize_t store_select_amcb1_transmit_clock(struct device *d, | |||
549 | SET_PORT_BITS(TLCLK_REG0, 0xfc, 3); | 559 | SET_PORT_BITS(TLCLK_REG0, 0xfc, 3); |
550 | break; | 560 | break; |
551 | case CLK_44_736MHz: | 561 | case CLK_44_736MHz: |
552 | SET_PORT_BITS(TLCLK_REG0, 0xfc, 2); | 562 | SET_PORT_BITS(TLCLK_REG0, 0xfc, 1); |
553 | break; | 563 | break; |
554 | } | 564 | } |
555 | } else | 565 | } else |
@@ -839,11 +849,13 @@ static void __exit tlclk_cleanup(void) | |||
839 | 849 | ||
840 | static void switchover_timeout(unsigned long data) | 850 | static void switchover_timeout(unsigned long data) |
841 | { | 851 | { |
842 | if ((data & 1)) { | 852 | unsigned long flags = *(unsigned long *) data; |
843 | if ((inb(TLCLK_REG1) & 0x08) != (data & 0x08)) | 853 | |
854 | if ((flags & 1)) { | ||
855 | if ((inb(TLCLK_REG1) & 0x08) != (flags & 0x08)) | ||
844 | alarm_events->switchover_primary++; | 856 | alarm_events->switchover_primary++; |
845 | } else { | 857 | } else { |
846 | if ((inb(TLCLK_REG1) & 0x08) != (data & 0x08)) | 858 | if ((inb(TLCLK_REG1) & 0x08) != (flags & 0x08)) |
847 | alarm_events->switchover_secondary++; | 859 | alarm_events->switchover_secondary++; |
848 | } | 860 | } |
849 | 861 | ||
@@ -901,8 +913,9 @@ static irqreturn_t tlclk_interrupt(int irq, void *dev_id) | |||
901 | 913 | ||
902 | /* TIMEOUT in ~10ms */ | 914 | /* TIMEOUT in ~10ms */ |
903 | switchover_timer.expires = jiffies + msecs_to_jiffies(10); | 915 | switchover_timer.expires = jiffies + msecs_to_jiffies(10); |
904 | switchover_timer.data = inb(TLCLK_REG1); | 916 | tlclk_timer_data = inb(TLCLK_REG1); |
905 | add_timer(&switchover_timer); | 917 | switchover_timer.data = (unsigned long) &tlclk_timer_data; |
918 | mod_timer(&switchover_timer, switchover_timer.expires); | ||
906 | } else { | 919 | } else { |
907 | got_event = 1; | 920 | got_event = 1; |
908 | wake_up(&wq); | 921 | wake_up(&wq); |
diff --git a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/ehca_cq.c index 93995b658d94..6074c897f51c 100644 --- a/drivers/infiniband/hw/ehca/ehca_cq.c +++ b/drivers/infiniband/hw/ehca/ehca_cq.c | |||
@@ -344,8 +344,11 @@ int ehca_destroy_cq(struct ib_cq *cq) | |||
344 | unsigned long flags; | 344 | unsigned long flags; |
345 | 345 | ||
346 | spin_lock_irqsave(&ehca_cq_idr_lock, flags); | 346 | spin_lock_irqsave(&ehca_cq_idr_lock, flags); |
347 | while (my_cq->nr_callbacks) | 347 | while (my_cq->nr_callbacks) { |
348 | spin_unlock_irqrestore(&ehca_cq_idr_lock, flags); | ||
348 | yield(); | 349 | yield(); |
350 | spin_lock_irqsave(&ehca_cq_idr_lock, flags); | ||
351 | } | ||
349 | 352 | ||
350 | idr_remove(&ehca_cq_idr, my_cq->token); | 353 | idr_remove(&ehca_cq_idr, my_cq->token); |
351 | spin_unlock_irqrestore(&ehca_cq_idr_lock, flags); | 354 | spin_unlock_irqrestore(&ehca_cq_idr_lock, flags); |
diff --git a/drivers/infiniband/hw/ehca/ehca_irq.c b/drivers/infiniband/hw/ehca/ehca_irq.c index e7209afb4250..c069be8cbcb2 100644 --- a/drivers/infiniband/hw/ehca/ehca_irq.c +++ b/drivers/infiniband/hw/ehca/ehca_irq.c | |||
@@ -440,7 +440,8 @@ void ehca_tasklet_eq(unsigned long data) | |||
440 | cq = idr_find(&ehca_cq_idr, token); | 440 | cq = idr_find(&ehca_cq_idr, token); |
441 | 441 | ||
442 | if (cq == NULL) { | 442 | if (cq == NULL) { |
443 | spin_unlock(&ehca_cq_idr_lock); | 443 | spin_unlock_irqrestore(&ehca_cq_idr_lock, |
444 | flags); | ||
444 | break; | 445 | break; |
445 | } | 446 | } |
446 | 447 | ||
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index cdecbf5911c8..72611fd15103 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c | |||
@@ -1621,18 +1621,30 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target) | |||
1621 | switch (token) { | 1621 | switch (token) { |
1622 | case SRP_OPT_ID_EXT: | 1622 | case SRP_OPT_ID_EXT: |
1623 | p = match_strdup(args); | 1623 | p = match_strdup(args); |
1624 | if (!p) { | ||
1625 | ret = -ENOMEM; | ||
1626 | goto out; | ||
1627 | } | ||
1624 | target->id_ext = cpu_to_be64(simple_strtoull(p, NULL, 16)); | 1628 | target->id_ext = cpu_to_be64(simple_strtoull(p, NULL, 16)); |
1625 | kfree(p); | 1629 | kfree(p); |
1626 | break; | 1630 | break; |
1627 | 1631 | ||
1628 | case SRP_OPT_IOC_GUID: | 1632 | case SRP_OPT_IOC_GUID: |
1629 | p = match_strdup(args); | 1633 | p = match_strdup(args); |
1634 | if (!p) { | ||
1635 | ret = -ENOMEM; | ||
1636 | goto out; | ||
1637 | } | ||
1630 | target->ioc_guid = cpu_to_be64(simple_strtoull(p, NULL, 16)); | 1638 | target->ioc_guid = cpu_to_be64(simple_strtoull(p, NULL, 16)); |
1631 | kfree(p); | 1639 | kfree(p); |
1632 | break; | 1640 | break; |
1633 | 1641 | ||
1634 | case SRP_OPT_DGID: | 1642 | case SRP_OPT_DGID: |
1635 | p = match_strdup(args); | 1643 | p = match_strdup(args); |
1644 | if (!p) { | ||
1645 | ret = -ENOMEM; | ||
1646 | goto out; | ||
1647 | } | ||
1636 | if (strlen(p) != 32) { | 1648 | if (strlen(p) != 32) { |
1637 | printk(KERN_WARNING PFX "bad dest GID parameter '%s'\n", p); | 1649 | printk(KERN_WARNING PFX "bad dest GID parameter '%s'\n", p); |
1638 | kfree(p); | 1650 | kfree(p); |
@@ -1656,6 +1668,10 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target) | |||
1656 | 1668 | ||
1657 | case SRP_OPT_SERVICE_ID: | 1669 | case SRP_OPT_SERVICE_ID: |
1658 | p = match_strdup(args); | 1670 | p = match_strdup(args); |
1671 | if (!p) { | ||
1672 | ret = -ENOMEM; | ||
1673 | goto out; | ||
1674 | } | ||
1659 | target->service_id = cpu_to_be64(simple_strtoull(p, NULL, 16)); | 1675 | target->service_id = cpu_to_be64(simple_strtoull(p, NULL, 16)); |
1660 | kfree(p); | 1676 | kfree(p); |
1661 | break; | 1677 | break; |
@@ -1693,6 +1709,10 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target) | |||
1693 | 1709 | ||
1694 | case SRP_OPT_INITIATOR_EXT: | 1710 | case SRP_OPT_INITIATOR_EXT: |
1695 | p = match_strdup(args); | 1711 | p = match_strdup(args); |
1712 | if (!p) { | ||
1713 | ret = -ENOMEM; | ||
1714 | goto out; | ||
1715 | } | ||
1696 | target->initiator_ext = cpu_to_be64(simple_strtoull(p, NULL, 16)); | 1716 | target->initiator_ext = cpu_to_be64(simple_strtoull(p, NULL, 16)); |
1697 | kfree(p); | 1717 | kfree(p); |
1698 | break; | 1718 | break; |
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 67c1154960f0..be4651abe72c 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c | |||
@@ -272,7 +272,9 @@ static void kvm_free_physmem(struct kvm *kvm) | |||
272 | 272 | ||
273 | static void kvm_free_vcpu(struct kvm_vcpu *vcpu) | 273 | static void kvm_free_vcpu(struct kvm_vcpu *vcpu) |
274 | { | 274 | { |
275 | vcpu_load(vcpu->kvm, vcpu_slot(vcpu)); | ||
275 | kvm_mmu_destroy(vcpu); | 276 | kvm_mmu_destroy(vcpu); |
277 | vcpu_put(vcpu); | ||
276 | kvm_arch_ops->vcpu_free(vcpu); | 278 | kvm_arch_ops->vcpu_free(vcpu); |
277 | } | 279 | } |
278 | 280 | ||
diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h index 2dbf4307ed9e..6bc41950fbb3 100644 --- a/drivers/kvm/paging_tmpl.h +++ b/drivers/kvm/paging_tmpl.h | |||
@@ -274,7 +274,7 @@ static int FNAME(fix_write_pf)(struct kvm_vcpu *vcpu, | |||
274 | struct kvm_mmu_page *page; | 274 | struct kvm_mmu_page *page; |
275 | 275 | ||
276 | if (is_writeble_pte(*shadow_ent)) | 276 | if (is_writeble_pte(*shadow_ent)) |
277 | return 0; | 277 | return !user || (*shadow_ent & PT_USER_MASK); |
278 | 278 | ||
279 | writable_shadow = *shadow_ent & PT_SHADOW_WRITABLE_MASK; | 279 | writable_shadow = *shadow_ent & PT_SHADOW_WRITABLE_MASK; |
280 | if (user) { | 280 | if (user) { |
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index 714f6a7841cd..7397bfbbcb1c 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c | |||
@@ -1407,7 +1407,8 @@ static int svm_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
1407 | int r; | 1407 | int r; |
1408 | 1408 | ||
1409 | again: | 1409 | again: |
1410 | do_interrupt_requests(vcpu, kvm_run); | 1410 | if (!vcpu->mmio_read_completed) |
1411 | do_interrupt_requests(vcpu, kvm_run); | ||
1411 | 1412 | ||
1412 | clgi(); | 1413 | clgi(); |
1413 | 1414 | ||
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 0aa2659f6ae5..27f2751c3baa 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c | |||
@@ -1717,7 +1717,8 @@ again: | |||
1717 | vmcs_writel(HOST_GS_BASE, segment_base(gs_sel)); | 1717 | vmcs_writel(HOST_GS_BASE, segment_base(gs_sel)); |
1718 | #endif | 1718 | #endif |
1719 | 1719 | ||
1720 | do_interrupt_requests(vcpu, kvm_run); | 1720 | if (!vcpu->mmio_read_completed) |
1721 | do_interrupt_requests(vcpu, kvm_run); | ||
1721 | 1722 | ||
1722 | if (vcpu->guest_debug.enabled) | 1723 | if (vcpu->guest_debug.enabled) |
1723 | kvm_guest_debug_pre(vcpu); | 1724 | kvm_guest_debug_pre(vcpu); |
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index be70795b4822..7513cddb929f 100644 --- a/drivers/kvm/x86_emulate.c +++ b/drivers/kvm/x86_emulate.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #define ModRM (1<<6) | 61 | #define ModRM (1<<6) |
62 | /* Destination is only written; never read. */ | 62 | /* Destination is only written; never read. */ |
63 | #define Mov (1<<7) | 63 | #define Mov (1<<7) |
64 | #define BitOp (1<<8) | ||
64 | 65 | ||
65 | static u8 opcode_table[256] = { | 66 | static u8 opcode_table[256] = { |
66 | /* 0x00 - 0x07 */ | 67 | /* 0x00 - 0x07 */ |
@@ -148,7 +149,7 @@ static u8 opcode_table[256] = { | |||
148 | 0, 0, ByteOp | DstMem | SrcNone | ModRM, DstMem | SrcNone | ModRM | 149 | 0, 0, ByteOp | DstMem | SrcNone | ModRM, DstMem | SrcNone | ModRM |
149 | }; | 150 | }; |
150 | 151 | ||
151 | static u8 twobyte_table[256] = { | 152 | static u16 twobyte_table[256] = { |
152 | /* 0x00 - 0x0F */ | 153 | /* 0x00 - 0x0F */ |
153 | 0, SrcMem | ModRM | DstReg, 0, 0, 0, 0, ImplicitOps, 0, | 154 | 0, SrcMem | ModRM | DstReg, 0, 0, 0, 0, ImplicitOps, 0, |
154 | 0, 0, 0, 0, 0, ImplicitOps | ModRM, 0, 0, | 155 | 0, 0, 0, 0, 0, ImplicitOps | ModRM, 0, 0, |
@@ -180,16 +181,16 @@ static u8 twobyte_table[256] = { | |||
180 | /* 0x90 - 0x9F */ | 181 | /* 0x90 - 0x9F */ |
181 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 182 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
182 | /* 0xA0 - 0xA7 */ | 183 | /* 0xA0 - 0xA7 */ |
183 | 0, 0, 0, DstMem | SrcReg | ModRM, 0, 0, 0, 0, | 184 | 0, 0, 0, DstMem | SrcReg | ModRM | BitOp, 0, 0, 0, 0, |
184 | /* 0xA8 - 0xAF */ | 185 | /* 0xA8 - 0xAF */ |
185 | 0, 0, 0, DstMem | SrcReg | ModRM, 0, 0, 0, 0, | 186 | 0, 0, 0, DstMem | SrcReg | ModRM | BitOp, 0, 0, 0, 0, |
186 | /* 0xB0 - 0xB7 */ | 187 | /* 0xB0 - 0xB7 */ |
187 | ByteOp | DstMem | SrcReg | ModRM, DstMem | SrcReg | ModRM, 0, | 188 | ByteOp | DstMem | SrcReg | ModRM, DstMem | SrcReg | ModRM, 0, |
188 | DstMem | SrcReg | ModRM, | 189 | DstMem | SrcReg | ModRM | BitOp, |
189 | 0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov, | 190 | 0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov, |
190 | DstReg | SrcMem16 | ModRM | Mov, | 191 | DstReg | SrcMem16 | ModRM | Mov, |
191 | /* 0xB8 - 0xBF */ | 192 | /* 0xB8 - 0xBF */ |
192 | 0, 0, DstMem | SrcImmByte | ModRM, DstMem | SrcReg | ModRM, | 193 | 0, 0, DstMem | SrcImmByte | ModRM, DstMem | SrcReg | ModRM | BitOp, |
193 | 0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov, | 194 | 0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov, |
194 | DstReg | SrcMem16 | ModRM | Mov, | 195 | DstReg | SrcMem16 | ModRM | Mov, |
195 | /* 0xC0 - 0xCF */ | 196 | /* 0xC0 - 0xCF */ |
@@ -469,7 +470,8 @@ static int read_descriptor(struct x86_emulate_ctxt *ctxt, | |||
469 | int | 470 | int |
470 | x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) | 471 | x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) |
471 | { | 472 | { |
472 | u8 b, d, sib, twobyte = 0, rex_prefix = 0; | 473 | unsigned d; |
474 | u8 b, sib, twobyte = 0, rex_prefix = 0; | ||
473 | u8 modrm, modrm_mod = 0, modrm_reg = 0, modrm_rm = 0; | 475 | u8 modrm, modrm_mod = 0, modrm_reg = 0, modrm_rm = 0; |
474 | unsigned long *override_base = NULL; | 476 | unsigned long *override_base = NULL; |
475 | unsigned int op_bytes, ad_bytes, lock_prefix = 0, rep_prefix = 0, i; | 477 | unsigned int op_bytes, ad_bytes, lock_prefix = 0, rep_prefix = 0, i; |
@@ -726,46 +728,6 @@ done_prefixes: | |||
726 | ; | 728 | ; |
727 | } | 729 | } |
728 | 730 | ||
729 | /* Decode and fetch the destination operand: register or memory. */ | ||
730 | switch (d & DstMask) { | ||
731 | case ImplicitOps: | ||
732 | /* Special instructions do their own operand decoding. */ | ||
733 | goto special_insn; | ||
734 | case DstReg: | ||
735 | dst.type = OP_REG; | ||
736 | if ((d & ByteOp) | ||
737 | && !(twobyte_table && (b == 0xb6 || b == 0xb7))) { | ||
738 | dst.ptr = decode_register(modrm_reg, _regs, | ||
739 | (rex_prefix == 0)); | ||
740 | dst.val = *(u8 *) dst.ptr; | ||
741 | dst.bytes = 1; | ||
742 | } else { | ||
743 | dst.ptr = decode_register(modrm_reg, _regs, 0); | ||
744 | switch ((dst.bytes = op_bytes)) { | ||
745 | case 2: | ||
746 | dst.val = *(u16 *)dst.ptr; | ||
747 | break; | ||
748 | case 4: | ||
749 | dst.val = *(u32 *)dst.ptr; | ||
750 | break; | ||
751 | case 8: | ||
752 | dst.val = *(u64 *)dst.ptr; | ||
753 | break; | ||
754 | } | ||
755 | } | ||
756 | break; | ||
757 | case DstMem: | ||
758 | dst.type = OP_MEM; | ||
759 | dst.ptr = (unsigned long *)cr2; | ||
760 | dst.bytes = (d & ByteOp) ? 1 : op_bytes; | ||
761 | if (!(d & Mov) && /* optimisation - avoid slow emulated read */ | ||
762 | ((rc = ops->read_emulated((unsigned long)dst.ptr, | ||
763 | &dst.val, dst.bytes, ctxt)) != 0)) | ||
764 | goto done; | ||
765 | break; | ||
766 | } | ||
767 | dst.orig_val = dst.val; | ||
768 | |||
769 | /* | 731 | /* |
770 | * Decode and fetch the source operand: register, memory | 732 | * Decode and fetch the source operand: register, memory |
771 | * or immediate. | 733 | * or immediate. |
@@ -838,6 +800,50 @@ done_prefixes: | |||
838 | break; | 800 | break; |
839 | } | 801 | } |
840 | 802 | ||
803 | /* Decode and fetch the destination operand: register or memory. */ | ||
804 | switch (d & DstMask) { | ||
805 | case ImplicitOps: | ||
806 | /* Special instructions do their own operand decoding. */ | ||
807 | goto special_insn; | ||
808 | case DstReg: | ||
809 | dst.type = OP_REG; | ||
810 | if ((d & ByteOp) | ||
811 | && !(twobyte_table && (b == 0xb6 || b == 0xb7))) { | ||
812 | dst.ptr = decode_register(modrm_reg, _regs, | ||
813 | (rex_prefix == 0)); | ||
814 | dst.val = *(u8 *) dst.ptr; | ||
815 | dst.bytes = 1; | ||
816 | } else { | ||
817 | dst.ptr = decode_register(modrm_reg, _regs, 0); | ||
818 | switch ((dst.bytes = op_bytes)) { | ||
819 | case 2: | ||
820 | dst.val = *(u16 *)dst.ptr; | ||
821 | break; | ||
822 | case 4: | ||
823 | dst.val = *(u32 *)dst.ptr; | ||
824 | break; | ||
825 | case 8: | ||
826 | dst.val = *(u64 *)dst.ptr; | ||
827 | break; | ||
828 | } | ||
829 | } | ||
830 | break; | ||
831 | case DstMem: | ||
832 | dst.type = OP_MEM; | ||
833 | dst.ptr = (unsigned long *)cr2; | ||
834 | dst.bytes = (d & ByteOp) ? 1 : op_bytes; | ||
835 | if (d & BitOp) { | ||
836 | dst.ptr += src.val / BITS_PER_LONG; | ||
837 | dst.bytes = sizeof(long); | ||
838 | } | ||
839 | if (!(d & Mov) && /* optimisation - avoid slow emulated read */ | ||
840 | ((rc = ops->read_emulated((unsigned long)dst.ptr, | ||
841 | &dst.val, dst.bytes, ctxt)) != 0)) | ||
842 | goto done; | ||
843 | break; | ||
844 | } | ||
845 | dst.orig_val = dst.val; | ||
846 | |||
841 | if (twobyte) | 847 | if (twobyte) |
842 | goto twobyte_insn; | 848 | goto twobyte_insn; |
843 | 849 | ||
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index 39ad9f73d1ec..be10a3a26b5b 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <asm/io.h> | 39 | #include <asm/io.h> |
40 | 40 | ||
41 | #define DRV_NAME "ehea" | 41 | #define DRV_NAME "ehea" |
42 | #define DRV_VERSION "EHEA_0043" | 42 | #define DRV_VERSION "EHEA_0044" |
43 | 43 | ||
44 | #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ | 44 | #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ |
45 | | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) | 45 | | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 83fa32f72398..1072e69ef85d 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -558,12 +558,12 @@ static irqreturn_t ehea_qp_aff_irq_handler(int irq, void *param) | |||
558 | u32 qp_token; | 558 | u32 qp_token; |
559 | 559 | ||
560 | eqe = ehea_poll_eq(port->qp_eq); | 560 | eqe = ehea_poll_eq(port->qp_eq); |
561 | ehea_debug("eqe=%p", eqe); | 561 | |
562 | while (eqe) { | 562 | while (eqe) { |
563 | ehea_debug("*eqe=%lx", *(u64*)eqe); | ||
564 | eqe = ehea_poll_eq(port->qp_eq); | ||
565 | qp_token = EHEA_BMASK_GET(EHEA_EQE_QP_TOKEN, eqe->entry); | 563 | qp_token = EHEA_BMASK_GET(EHEA_EQE_QP_TOKEN, eqe->entry); |
566 | ehea_debug("next eqe=%p", eqe); | 564 | ehea_error("QP aff_err: entry=0x%lx, token=0x%x", |
565 | eqe->entry, qp_token); | ||
566 | eqe = ehea_poll_eq(port->qp_eq); | ||
567 | } | 567 | } |
568 | 568 | ||
569 | return IRQ_HANDLED; | 569 | return IRQ_HANDLED; |
@@ -575,8 +575,9 @@ static struct ehea_port *ehea_get_port(struct ehea_adapter *adapter, | |||
575 | int i; | 575 | int i; |
576 | 576 | ||
577 | for (i = 0; i < adapter->num_ports; i++) | 577 | for (i = 0; i < adapter->num_ports; i++) |
578 | if (adapter->port[i]->logical_port_id == logical_port) | 578 | if (adapter->port[i]) |
579 | return adapter->port[i]; | 579 | if (adapter->port[i]->logical_port_id == logical_port) |
580 | return adapter->port[i]; | ||
580 | return NULL; | 581 | return NULL; |
581 | } | 582 | } |
582 | 583 | ||
@@ -642,6 +643,8 @@ int ehea_sense_port_attr(struct ehea_port *port) | |||
642 | break; | 643 | break; |
643 | } | 644 | } |
644 | 645 | ||
646 | port->autoneg = 1; | ||
647 | |||
645 | /* Number of default QPs */ | 648 | /* Number of default QPs */ |
646 | port->num_def_qps = cb0->num_default_qps; | 649 | port->num_def_qps = cb0->num_default_qps; |
647 | 650 | ||
@@ -728,10 +731,7 @@ int ehea_set_portspeed(struct ehea_port *port, u32 port_speed) | |||
728 | } | 731 | } |
729 | } else { | 732 | } else { |
730 | if (hret == H_AUTHORITY) { | 733 | if (hret == H_AUTHORITY) { |
731 | ehea_info("Hypervisor denied setting port speed. Either" | 734 | ehea_info("Hypervisor denied setting port speed"); |
732 | " this partition is not authorized to set " | ||
733 | "port speed or another partition has modified" | ||
734 | " port speed first."); | ||
735 | ret = -EPERM; | 735 | ret = -EPERM; |
736 | } else { | 736 | } else { |
737 | ret = -EIO; | 737 | ret = -EIO; |
@@ -998,7 +998,7 @@ static int ehea_configure_port(struct ehea_port *port) | |||
998 | | EHEA_BMASK_SET(PXLY_RC_JUMBO_FRAME, 1); | 998 | | EHEA_BMASK_SET(PXLY_RC_JUMBO_FRAME, 1); |
999 | 999 | ||
1000 | for (i = 0; i < port->num_def_qps; i++) | 1000 | for (i = 0; i < port->num_def_qps; i++) |
1001 | cb0->default_qpn_arr[i] = port->port_res[i].qp->init_attr.qp_nr; | 1001 | cb0->default_qpn_arr[i] = port->port_res[0].qp->init_attr.qp_nr; |
1002 | 1002 | ||
1003 | if (netif_msg_ifup(port)) | 1003 | if (netif_msg_ifup(port)) |
1004 | ehea_dump(cb0, sizeof(*cb0), "ehea_configure_port"); | 1004 | ehea_dump(cb0, sizeof(*cb0), "ehea_configure_port"); |
@@ -1485,11 +1485,12 @@ out: | |||
1485 | 1485 | ||
1486 | static void ehea_promiscuous_error(u64 hret, int enable) | 1486 | static void ehea_promiscuous_error(u64 hret, int enable) |
1487 | { | 1487 | { |
1488 | ehea_info("Hypervisor denied %sabling promiscuous mode.%s", | 1488 | if (hret == H_AUTHORITY) |
1489 | enable == 1 ? "en" : "dis", | 1489 | ehea_info("Hypervisor denied %sabling promiscuous mode", |
1490 | hret != H_AUTHORITY ? "" : " Another partition owning a " | 1490 | enable == 1 ? "en" : "dis"); |
1491 | "logical port on the same physical port might have altered " | 1491 | else |
1492 | "promiscuous mode first."); | 1492 | ehea_error("failed %sabling promiscuous mode", |
1493 | enable == 1 ? "en" : "dis"); | ||
1493 | } | 1494 | } |
1494 | 1495 | ||
1495 | static void ehea_promiscuous(struct net_device *dev, int enable) | 1496 | static void ehea_promiscuous(struct net_device *dev, int enable) |
@@ -2267,6 +2268,8 @@ static void ehea_tx_watchdog(struct net_device *dev) | |||
2267 | int ehea_sense_adapter_attr(struct ehea_adapter *adapter) | 2268 | int ehea_sense_adapter_attr(struct ehea_adapter *adapter) |
2268 | { | 2269 | { |
2269 | struct hcp_query_ehea *cb; | 2270 | struct hcp_query_ehea *cb; |
2271 | struct device_node *lhea_dn = NULL; | ||
2272 | struct device_node *eth_dn = NULL; | ||
2270 | u64 hret; | 2273 | u64 hret; |
2271 | int ret; | 2274 | int ret; |
2272 | 2275 | ||
@@ -2283,7 +2286,18 @@ int ehea_sense_adapter_attr(struct ehea_adapter *adapter) | |||
2283 | goto out_herr; | 2286 | goto out_herr; |
2284 | } | 2287 | } |
2285 | 2288 | ||
2286 | adapter->num_ports = cb->num_ports; | 2289 | /* Determine the number of available logical ports |
2290 | * by counting the child nodes of the lhea OFDT entry | ||
2291 | */ | ||
2292 | adapter->num_ports = 0; | ||
2293 | lhea_dn = of_find_node_by_name(lhea_dn, "lhea"); | ||
2294 | do { | ||
2295 | eth_dn = of_get_next_child(lhea_dn, eth_dn); | ||
2296 | if (eth_dn) | ||
2297 | adapter->num_ports++; | ||
2298 | } while ( eth_dn ); | ||
2299 | of_node_put(lhea_dn); | ||
2300 | |||
2287 | adapter->max_mc_mac = cb->max_mc_mac - 1; | 2301 | adapter->max_mc_mac = cb->max_mc_mac - 1; |
2288 | ret = 0; | 2302 | ret = 0; |
2289 | 2303 | ||
@@ -2334,8 +2348,6 @@ static int ehea_setup_single_port(struct ehea_port *port, | |||
2334 | 2348 | ||
2335 | INIT_LIST_HEAD(&port->mc_list->list); | 2349 | INIT_LIST_HEAD(&port->mc_list->list); |
2336 | 2350 | ||
2337 | ehea_set_portspeed(port, EHEA_SPEED_AUTONEG); | ||
2338 | |||
2339 | ret = ehea_sense_port_attr(port); | 2351 | ret = ehea_sense_port_attr(port); |
2340 | if (ret) | 2352 | if (ret) |
2341 | goto out; | 2353 | goto out; |
@@ -2471,14 +2483,16 @@ static int __devinit ehea_probe(struct ibmebus_dev *dev, | |||
2471 | 2483 | ||
2472 | adapter_handle = (u64*)get_property(dev->ofdev.node, "ibm,hea-handle", | 2484 | adapter_handle = (u64*)get_property(dev->ofdev.node, "ibm,hea-handle", |
2473 | NULL); | 2485 | NULL); |
2474 | if (!adapter_handle) { | 2486 | if (adapter_handle) |
2487 | adapter->handle = *adapter_handle; | ||
2488 | |||
2489 | if (!adapter->handle) { | ||
2475 | dev_err(&dev->ofdev.dev, "failed getting handle for adapter" | 2490 | dev_err(&dev->ofdev.dev, "failed getting handle for adapter" |
2476 | " '%s'\n", dev->ofdev.node->full_name); | 2491 | " '%s'\n", dev->ofdev.node->full_name); |
2477 | ret = -ENODEV; | 2492 | ret = -ENODEV; |
2478 | goto out_free_ad; | 2493 | goto out_free_ad; |
2479 | } | 2494 | } |
2480 | 2495 | ||
2481 | adapter->handle = *adapter_handle; | ||
2482 | adapter->pd = EHEA_PD_ID; | 2496 | adapter->pd = EHEA_PD_ID; |
2483 | 2497 | ||
2484 | dev->ofdev.dev.driver_data = adapter; | 2498 | dev->ofdev.dev.driver_data = adapter; |
diff --git a/drivers/net/ehea/ehea_phyp.c b/drivers/net/ehea/ehea_phyp.c index 0cfc2bc1a27b..37716e05e808 100644 --- a/drivers/net/ehea/ehea_phyp.c +++ b/drivers/net/ehea/ehea_phyp.c | |||
@@ -94,6 +94,7 @@ static long ehea_plpar_hcall9(unsigned long opcode, | |||
94 | { | 94 | { |
95 | long ret; | 95 | long ret; |
96 | int i, sleep_msecs; | 96 | int i, sleep_msecs; |
97 | u8 cb_cat; | ||
97 | 98 | ||
98 | for (i = 0; i < 5; i++) { | 99 | for (i = 0; i < 5; i++) { |
99 | ret = plpar_hcall9(opcode, outs, | 100 | ret = plpar_hcall9(opcode, outs, |
@@ -106,7 +107,13 @@ static long ehea_plpar_hcall9(unsigned long opcode, | |||
106 | continue; | 107 | continue; |
107 | } | 108 | } |
108 | 109 | ||
109 | if (ret < H_SUCCESS) | 110 | cb_cat = EHEA_BMASK_GET(H_MEHEAPORT_CAT, arg2); |
111 | |||
112 | if ((ret < H_SUCCESS) && !(((ret == H_AUTHORITY) | ||
113 | && (opcode == H_MODIFY_HEA_PORT)) | ||
114 | && (((cb_cat == H_PORT_CB4) && ((arg3 == H_PORT_CB4_JUMBO) | ||
115 | || (arg3 == H_PORT_CB4_SPEED))) || ((cb_cat == H_PORT_CB7) | ||
116 | && (arg3 == H_PORT_CB7_DUCQPN))))) | ||
110 | ehea_error("opcode=%lx ret=%lx" | 117 | ehea_error("opcode=%lx ret=%lx" |
111 | " arg1=%lx arg2=%lx arg3=%lx arg4=%lx" | 118 | " arg1=%lx arg2=%lx arg3=%lx arg4=%lx" |
112 | " arg5=%lx arg6=%lx arg7=%lx arg8=%lx" | 119 | " arg5=%lx arg6=%lx arg7=%lx arg8=%lx" |
@@ -120,7 +127,6 @@ static long ehea_plpar_hcall9(unsigned long opcode, | |||
120 | outs[0], outs[1], outs[2], outs[3], | 127 | outs[0], outs[1], outs[2], outs[3], |
121 | outs[4], outs[5], outs[6], outs[7], | 128 | outs[4], outs[5], outs[6], outs[7], |
122 | outs[8]); | 129 | outs[8]); |
123 | |||
124 | return ret; | 130 | return ret; |
125 | } | 131 | } |
126 | 132 | ||
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 6490acf05305..59324b1693d6 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
@@ -63,12 +63,11 @@ | |||
63 | 63 | ||
64 | #include "netxen_nic_hw.h" | 64 | #include "netxen_nic_hw.h" |
65 | 65 | ||
66 | #define NETXEN_NIC_BUILD_NO "4" | 66 | #define NETXEN_NIC_BUILD_NO "2" |
67 | #define _NETXEN_NIC_LINUX_MAJOR 3 | 67 | #define _NETXEN_NIC_LINUX_MAJOR 3 |
68 | #define _NETXEN_NIC_LINUX_MINOR 3 | 68 | #define _NETXEN_NIC_LINUX_MINOR 3 |
69 | #define _NETXEN_NIC_LINUX_SUBVERSION 2 | 69 | #define _NETXEN_NIC_LINUX_SUBVERSION 3 |
70 | #define NETXEN_NIC_LINUX_VERSIONID "3.3.2" "-" NETXEN_NIC_BUILD_NO | 70 | #define NETXEN_NIC_LINUX_VERSIONID "3.3.3" "-" NETXEN_NIC_BUILD_NO |
71 | #define NETXEN_NIC_FW_VERSIONID "3.3.2" | ||
72 | 71 | ||
73 | #define RCV_DESC_RINGSIZE \ | 72 | #define RCV_DESC_RINGSIZE \ |
74 | (sizeof(struct rcv_desc) * adapter->max_rx_desc_count) | 73 | (sizeof(struct rcv_desc) * adapter->max_rx_desc_count) |
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index c0c31d1914a7..191e2336e323 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -984,7 +984,8 @@ void netxen_nic_flash_print(struct netxen_adapter *adapter) | |||
984 | _NETXEN_NIC_LINUX_MAJOR, fw_major); | 984 | _NETXEN_NIC_LINUX_MAJOR, fw_major); |
985 | adapter->driver_mismatch = 1; | 985 | adapter->driver_mismatch = 1; |
986 | } | 986 | } |
987 | if (fw_minor != _NETXEN_NIC_LINUX_MINOR) { | 987 | if (fw_minor != _NETXEN_NIC_LINUX_MINOR && |
988 | fw_minor != (_NETXEN_NIC_LINUX_MINOR + 1)) { | ||
988 | printk(KERN_ERR "The mismatch in driver version and firmware " | 989 | printk(KERN_ERR "The mismatch in driver version and firmware " |
989 | "version minor number\n" | 990 | "version minor number\n" |
990 | "Driver version minor number = %d \t" | 991 | "Driver version minor number = %d \t" |
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 8a5792fea774..96e1bee19ba0 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -1144,7 +1144,7 @@ static int __init netxen_init_module(void) | |||
1144 | if ((netxen_workq = create_singlethread_workqueue("netxen")) == 0) | 1144 | if ((netxen_workq = create_singlethread_workqueue("netxen")) == 0) |
1145 | return -ENOMEM; | 1145 | return -ENOMEM; |
1146 | 1146 | ||
1147 | return pci_module_init(&netxen_driver); | 1147 | return pci_register_driver(&netxen_driver); |
1148 | } | 1148 | } |
1149 | 1149 | ||
1150 | module_init(netxen_init_module); | 1150 | module_init(netxen_init_module); |
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c index 342f4062de0b..461e8274ef69 100644 --- a/drivers/net/pcmcia/3c589_cs.c +++ b/drivers/net/pcmcia/3c589_cs.c | |||
@@ -606,11 +606,14 @@ static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
606 | { | 606 | { |
607 | kio_addr_t ioaddr = dev->base_addr; | 607 | kio_addr_t ioaddr = dev->base_addr; |
608 | struct el3_private *priv = netdev_priv(dev); | 608 | struct el3_private *priv = netdev_priv(dev); |
609 | unsigned long flags; | ||
609 | 610 | ||
610 | DEBUG(3, "%s: el3_start_xmit(length = %ld) called, " | 611 | DEBUG(3, "%s: el3_start_xmit(length = %ld) called, " |
611 | "status %4.4x.\n", dev->name, (long)skb->len, | 612 | "status %4.4x.\n", dev->name, (long)skb->len, |
612 | inw(ioaddr + EL3_STATUS)); | 613 | inw(ioaddr + EL3_STATUS)); |
613 | 614 | ||
615 | spin_lock_irqsave(&priv->lock, flags); | ||
616 | |||
614 | priv->stats.tx_bytes += skb->len; | 617 | priv->stats.tx_bytes += skb->len; |
615 | 618 | ||
616 | /* Put out the doubleword header... */ | 619 | /* Put out the doubleword header... */ |
@@ -628,6 +631,7 @@ static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
628 | 631 | ||
629 | dev_kfree_skb(skb); | 632 | dev_kfree_skb(skb); |
630 | pop_tx_status(dev); | 633 | pop_tx_status(dev); |
634 | spin_unlock_irqrestore(&priv->lock, flags); | ||
631 | 635 | ||
632 | return 0; | 636 | return 0; |
633 | } | 637 | } |
@@ -729,14 +733,13 @@ static void media_check(unsigned long arg) | |||
729 | 733 | ||
730 | if (!netif_device_present(dev)) goto reschedule; | 734 | if (!netif_device_present(dev)) goto reschedule; |
731 | 735 | ||
732 | EL3WINDOW(1); | ||
733 | /* Check for pending interrupt with expired latency timer: with | 736 | /* Check for pending interrupt with expired latency timer: with |
734 | this, we can limp along even if the interrupt is blocked */ | 737 | this, we can limp along even if the interrupt is blocked */ |
735 | if ((inw(ioaddr + EL3_STATUS) & IntLatch) && | 738 | if ((inw(ioaddr + EL3_STATUS) & IntLatch) && |
736 | (inb(ioaddr + EL3_TIMER) == 0xff)) { | 739 | (inb(ioaddr + EL3_TIMER) == 0xff)) { |
737 | if (!lp->fast_poll) | 740 | if (!lp->fast_poll) |
738 | printk(KERN_WARNING "%s: interrupt(s) dropped!\n", dev->name); | 741 | printk(KERN_WARNING "%s: interrupt(s) dropped!\n", dev->name); |
739 | el3_interrupt(dev->irq, lp); | 742 | el3_interrupt(dev->irq, dev); |
740 | lp->fast_poll = HZ; | 743 | lp->fast_poll = HZ; |
741 | } | 744 | } |
742 | if (lp->fast_poll) { | 745 | if (lp->fast_poll) { |
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index e175f3910b18..9765fa661467 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c | |||
@@ -286,6 +286,7 @@ int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd) | |||
286 | 286 | ||
287 | return 0; | 287 | return 0; |
288 | } | 288 | } |
289 | EXPORT_SYMBOL(phy_ethtool_sset); | ||
289 | 290 | ||
290 | int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd) | 291 | int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd) |
291 | { | 292 | { |
@@ -302,7 +303,7 @@ int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd) | |||
302 | 303 | ||
303 | return 0; | 304 | return 0; |
304 | } | 305 | } |
305 | 306 | EXPORT_SYMBOL(phy_ethtool_gset); | |
306 | 307 | ||
307 | /* Note that this function is currently incompatible with the | 308 | /* Note that this function is currently incompatible with the |
308 | * PHYCONTROL layer. It changes registers without regard to | 309 | * PHYCONTROL layer. It changes registers without regard to |
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 250cdbeefdfd..1dd66b8ea0fa 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -556,10 +556,9 @@ static int init_shared_mem(struct s2io_nic *nic) | |||
556 | } | 556 | } |
557 | } | 557 | } |
558 | 558 | ||
559 | nic->ufo_in_band_v = kmalloc((sizeof(u64) * size), GFP_KERNEL); | 559 | nic->ufo_in_band_v = kcalloc(size, sizeof(u64), GFP_KERNEL); |
560 | if (!nic->ufo_in_band_v) | 560 | if (!nic->ufo_in_band_v) |
561 | return -ENOMEM; | 561 | return -ENOMEM; |
562 | memset(nic->ufo_in_band_v, 0, size); | ||
563 | 562 | ||
564 | /* Allocation and initialization of RXDs in Rings */ | 563 | /* Allocation and initialization of RXDs in Rings */ |
565 | size = 0; | 564 | size = 0; |
diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c index e9e0934380b8..198b9f22fbff 100644 --- a/drivers/rtc/rtc-sh.c +++ b/drivers/rtc/rtc-sh.c | |||
@@ -492,10 +492,10 @@ static int sh_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) | |||
492 | 492 | ||
493 | spin_lock_irq(&rtc->lock); | 493 | spin_lock_irq(&rtc->lock); |
494 | 494 | ||
495 | /* disable alarm interrupt and clear flag */ | 495 | /* disable alarm interrupt and clear the alarm flag */ |
496 | rcr1 = readb(rtc->regbase + RCR1); | 496 | rcr1 = readb(rtc->regbase + RCR1); |
497 | rcr1 &= ~RCR1_AF; | 497 | rcr1 &= ~(RCR1_AF|RCR1_AIE); |
498 | writeb(rcr1 & ~RCR1_AIE, rtc->regbase + RCR1); | 498 | writeb(rcr1, rtc->regbase + RCR1); |
499 | 499 | ||
500 | rtc->rearm_aie = 0; | 500 | rtc->rearm_aie = 0; |
501 | 501 | ||
@@ -510,8 +510,10 @@ static int sh_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) | |||
510 | mon += 1; | 510 | mon += 1; |
511 | sh_rtc_write_alarm_value(rtc, mon, RMONAR); | 511 | sh_rtc_write_alarm_value(rtc, mon, RMONAR); |
512 | 512 | ||
513 | /* Restore interrupt activation status */ | 513 | if (wkalrm->enabled) { |
514 | writeb(rcr1, rtc->regbase + RCR1); | 514 | rcr1 |= RCR1_AIE; |
515 | writeb(rcr1, rtc->regbase + RCR1); | ||
516 | } | ||
515 | 517 | ||
516 | spin_unlock_irq(&rtc->lock); | 518 | spin_unlock_irq(&rtc->lock); |
517 | 519 | ||
diff --git a/drivers/usb/serial/funsoft.c b/drivers/usb/serial/funsoft.c index 31501c9361b9..2bebd63d5ed1 100644 --- a/drivers/usb/serial/funsoft.c +++ b/drivers/usb/serial/funsoft.c | |||
@@ -27,7 +27,7 @@ MODULE_DEVICE_TABLE(usb, id_table); | |||
27 | static int funsoft_ioctl(struct usb_serial_port *port, struct file *file, | 27 | static int funsoft_ioctl(struct usb_serial_port *port, struct file *file, |
28 | unsigned int cmd, unsigned long arg) | 28 | unsigned int cmd, unsigned long arg) |
29 | { | 29 | { |
30 | struct termios t; | 30 | struct ktermios t; |
31 | 31 | ||
32 | dbg("%s - port %d, cmd 0x%04x", __FUNCTION__, port->number, cmd); | 32 | dbg("%s - port %d, cmd 0x%04x", __FUNCTION__, port->number, cmd); |
33 | 33 | ||