diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/quirks.c | 14 | ||||
-rw-r--r-- | drivers/s390/char/vmcp.c | 2 | ||||
-rw-r--r-- | drivers/s390/cio/cio.c | 12 |
3 files changed, 13 insertions, 15 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 8f0322d6f3b..0535efc4f18 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -1117,10 +1117,11 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, asus_h static void quirk_sis_96x_smbus(struct pci_dev *dev) { u8 val = 0; - printk(KERN_INFO "Enabling SiS 96x SMBus.\n"); - pci_read_config_byte(dev, 0x77, &val); - pci_write_config_byte(dev, 0x77, val & ~0x10); pci_read_config_byte(dev, 0x77, &val); + if (val & 0x10) { + printk(KERN_INFO "Enabling SiS 96x SMBus.\n"); + pci_write_config_byte(dev, 0x77, val & ~0x10); + } } /* @@ -1152,11 +1153,12 @@ static void quirk_sis_503(struct pci_dev *dev) printk(KERN_WARNING "Uncovering SIS%x that hid as a SIS503 (compatible=%d)\n", devid, sis_96x_compatible); /* - * Ok, it now shows up as a 96x.. The 96x quirks are after - * the 503 quirk in the quirk table, so they'll automatically - * run and enable things like the SMBus device + * Ok, it now shows up as a 96x.. run the 96x quirk by + * hand in case it has already been processed. + * (depends on link order, which is apparently not guaranteed) */ dev->device = devid; + quirk_sis_96x_smbus(dev); } static void __init quirk_sis_96x_compatible(struct pci_dev *dev) diff --git a/drivers/s390/char/vmcp.c b/drivers/s390/char/vmcp.c index 1678b6c757e..a420cd09904 100644 --- a/drivers/s390/char/vmcp.c +++ b/drivers/s390/char/vmcp.c @@ -117,7 +117,7 @@ vmcp_write(struct file *file, const char __user * buff, size_t count, return -ENOMEM; } debug_text_event(vmcp_debug, 1, cmd); - session->resp_size = __cpcmd(cmd, session->response, + session->resp_size = cpcmd(cmd, session->response, session->bufsize, &session->resp_code); up(&session->mutex); diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index b471ac4a1bf..ae1bf231d08 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c @@ -880,19 +880,15 @@ static void cio_reset_pgm_check_handler(void) static int stsch_reset(struct subchannel_id schid, volatile struct schib *addr) { int rc; - register struct subchannel_id reg1 asm ("1") = schid; pgm_check_occured = 0; s390_reset_pgm_handler = cio_reset_pgm_check_handler; + rc = stsch(schid, addr); + s390_reset_pgm_handler = NULL; - asm volatile( - " stsch 0(%2)\n" - " ipm %0\n" - " srl %0,28" - : "=d" (rc) - : "d" (reg1), "a" (addr), "m" (*addr) : "memory", "cc"); + /* The program check handler could have changed pgm_check_occured */ + barrier(); - s390_reset_pgm_handler = NULL; if (pgm_check_occured) return -EIO; else |