aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/ahci.c8
-rw-r--r--drivers/ata/ahci.h4
-rw-r--r--drivers/ata/ata_piix.c8
-rw-r--r--drivers/ata/libahci.c60
-rw-r--r--drivers/ata/libata-core.c3
-rw-r--r--drivers/ata/libata-eh.c6
-rw-r--r--drivers/ata/pata_at91.c22
-rw-r--r--drivers/base/syscore.c2
-rw-r--r--drivers/parport/parport_pc.c8
-rw-r--r--drivers/rtc/rtc-coh901331.c4
-rw-r--r--drivers/tty/n_gsm.c8
-rw-r--r--drivers/tty/serial/imx.c3
-rw-r--r--drivers/xen/manage.c9
13 files changed, 125 insertions, 20 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 39d829cd82dd..71afe0371311 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -150,7 +150,7 @@ static const struct ata_port_info ahci_port_info[] = {
150 { 150 {
151 AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA | AHCI_HFLAG_NO_PMP | 151 AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA | AHCI_HFLAG_NO_PMP |
152 AHCI_HFLAG_YES_NCQ), 152 AHCI_HFLAG_YES_NCQ),
153 .flags = AHCI_FLAG_COMMON, 153 .flags = AHCI_FLAG_COMMON | ATA_FLAG_NO_DIPM,
154 .pio_mask = ATA_PIO4, 154 .pio_mask = ATA_PIO4,
155 .udma_mask = ATA_UDMA6, 155 .udma_mask = ATA_UDMA6,
156 .port_ops = &ahci_ops, 156 .port_ops = &ahci_ops,
@@ -261,6 +261,12 @@ static const struct pci_device_id ahci_pci_tbl[] = {
261 { PCI_VDEVICE(INTEL, 0x1d06), board_ahci }, /* PBG RAID */ 261 { PCI_VDEVICE(INTEL, 0x1d06), board_ahci }, /* PBG RAID */
262 { PCI_VDEVICE(INTEL, 0x2826), board_ahci }, /* PBG RAID */ 262 { PCI_VDEVICE(INTEL, 0x2826), board_ahci }, /* PBG RAID */
263 { PCI_VDEVICE(INTEL, 0x2323), board_ahci }, /* DH89xxCC AHCI */ 263 { PCI_VDEVICE(INTEL, 0x2323), board_ahci }, /* DH89xxCC AHCI */
264 { PCI_VDEVICE(INTEL, 0x1e02), board_ahci }, /* Panther Point AHCI */
265 { PCI_VDEVICE(INTEL, 0x1e03), board_ahci }, /* Panther Point AHCI */
266 { PCI_VDEVICE(INTEL, 0x1e04), board_ahci }, /* Panther Point RAID */
267 { PCI_VDEVICE(INTEL, 0x1e05), board_ahci }, /* Panther Point RAID */
268 { PCI_VDEVICE(INTEL, 0x1e06), board_ahci }, /* Panther Point RAID */
269 { PCI_VDEVICE(INTEL, 0x1e07), board_ahci }, /* Panther Point RAID */
264 270
265 /* JMicron 360/1/3/5/6, match class to avoid IDE function */ 271 /* JMicron 360/1/3/5/6, match class to avoid IDE function */
266 { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 272 { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
index 39865009c251..12c5282e7fca 100644
--- a/drivers/ata/ahci.h
+++ b/drivers/ata/ahci.h
@@ -229,6 +229,10 @@ enum {
229 EM_CTL_ALHD = (1 << 26), /* Activity LED */ 229 EM_CTL_ALHD = (1 << 26), /* Activity LED */
230 EM_CTL_XMT = (1 << 25), /* Transmit Only */ 230 EM_CTL_XMT = (1 << 25), /* Transmit Only */
231 EM_CTL_SMB = (1 << 24), /* Single Message Buffer */ 231 EM_CTL_SMB = (1 << 24), /* Single Message Buffer */
232 EM_CTL_SGPIO = (1 << 19), /* SGPIO messages supported */
233 EM_CTL_SES = (1 << 18), /* SES-2 messages supported */
234 EM_CTL_SAFTE = (1 << 17), /* SAF-TE messages supported */
235 EM_CTL_LED = (1 << 16), /* LED messages supported */
232 236
233 /* em message type */ 237 /* em message type */
234 EM_MSG_TYPE_LED = (1 << 0), /* LED */ 238 EM_MSG_TYPE_LED = (1 << 0), /* LED */
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 0bc3fd6c3fdb..6f6e7718b05c 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -309,6 +309,14 @@ static const struct pci_device_id piix_pci_tbl[] = {
309 { 0x8086, 0x1d00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, 309 { 0x8086, 0x1d00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
310 /* SATA Controller IDE (PBG) */ 310 /* SATA Controller IDE (PBG) */
311 { 0x8086, 0x1d08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, 311 { 0x8086, 0x1d08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
312 /* SATA Controller IDE (Panther Point) */
313 { 0x8086, 0x1e00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
314 /* SATA Controller IDE (Panther Point) */
315 { 0x8086, 0x1e01, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
316 /* SATA Controller IDE (Panther Point) */
317 { 0x8086, 0x1e08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
318 /* SATA Controller IDE (Panther Point) */
319 { 0x8086, 0x1e09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
312 { } /* terminate list */ 320 { } /* terminate list */
313}; 321};
314 322
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 26d452339e98..ff9d832a163d 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -109,6 +109,8 @@ static ssize_t ahci_read_em_buffer(struct device *dev,
109static ssize_t ahci_store_em_buffer(struct device *dev, 109static ssize_t ahci_store_em_buffer(struct device *dev,
110 struct device_attribute *attr, 110 struct device_attribute *attr,
111 const char *buf, size_t size); 111 const char *buf, size_t size);
112static ssize_t ahci_show_em_supported(struct device *dev,
113 struct device_attribute *attr, char *buf);
112 114
113static DEVICE_ATTR(ahci_host_caps, S_IRUGO, ahci_show_host_caps, NULL); 115static DEVICE_ATTR(ahci_host_caps, S_IRUGO, ahci_show_host_caps, NULL);
114static DEVICE_ATTR(ahci_host_cap2, S_IRUGO, ahci_show_host_cap2, NULL); 116static DEVICE_ATTR(ahci_host_cap2, S_IRUGO, ahci_show_host_cap2, NULL);
@@ -116,6 +118,7 @@ static DEVICE_ATTR(ahci_host_version, S_IRUGO, ahci_show_host_version, NULL);
116static DEVICE_ATTR(ahci_port_cmd, S_IRUGO, ahci_show_port_cmd, NULL); 118static DEVICE_ATTR(ahci_port_cmd, S_IRUGO, ahci_show_port_cmd, NULL);
117static DEVICE_ATTR(em_buffer, S_IWUSR | S_IRUGO, 119static DEVICE_ATTR(em_buffer, S_IWUSR | S_IRUGO,
118 ahci_read_em_buffer, ahci_store_em_buffer); 120 ahci_read_em_buffer, ahci_store_em_buffer);
121static DEVICE_ATTR(em_message_supported, S_IRUGO, ahci_show_em_supported, NULL);
119 122
120struct device_attribute *ahci_shost_attrs[] = { 123struct device_attribute *ahci_shost_attrs[] = {
121 &dev_attr_link_power_management_policy, 124 &dev_attr_link_power_management_policy,
@@ -126,6 +129,7 @@ struct device_attribute *ahci_shost_attrs[] = {
126 &dev_attr_ahci_host_version, 129 &dev_attr_ahci_host_version,
127 &dev_attr_ahci_port_cmd, 130 &dev_attr_ahci_port_cmd,
128 &dev_attr_em_buffer, 131 &dev_attr_em_buffer,
132 &dev_attr_em_message_supported,
129 NULL 133 NULL
130}; 134};
131EXPORT_SYMBOL_GPL(ahci_shost_attrs); 135EXPORT_SYMBOL_GPL(ahci_shost_attrs);
@@ -343,6 +347,24 @@ static ssize_t ahci_store_em_buffer(struct device *dev,
343 return size; 347 return size;
344} 348}
345 349
350static ssize_t ahci_show_em_supported(struct device *dev,
351 struct device_attribute *attr, char *buf)
352{
353 struct Scsi_Host *shost = class_to_shost(dev);
354 struct ata_port *ap = ata_shost_to_port(shost);
355 struct ahci_host_priv *hpriv = ap->host->private_data;
356 void __iomem *mmio = hpriv->mmio;
357 u32 em_ctl;
358
359 em_ctl = readl(mmio + HOST_EM_CTL);
360
361 return sprintf(buf, "%s%s%s%s\n",
362 em_ctl & EM_CTL_LED ? "led " : "",
363 em_ctl & EM_CTL_SAFTE ? "saf-te " : "",
364 em_ctl & EM_CTL_SES ? "ses-2 " : "",
365 em_ctl & EM_CTL_SGPIO ? "sgpio " : "");
366}
367
346/** 368/**
347 * ahci_save_initial_config - Save and fixup initial config values 369 * ahci_save_initial_config - Save and fixup initial config values
348 * @dev: target AHCI device 370 * @dev: target AHCI device
@@ -539,6 +561,27 @@ void ahci_start_engine(struct ata_port *ap)
539{ 561{
540 void __iomem *port_mmio = ahci_port_base(ap); 562 void __iomem *port_mmio = ahci_port_base(ap);
541 u32 tmp; 563 u32 tmp;
564 u8 status;
565
566 status = readl(port_mmio + PORT_TFDATA) & 0xFF;
567
568 /*
569 * At end of section 10.1 of AHCI spec (rev 1.3), it states
570 * Software shall not set PxCMD.ST to 1 until it is determined
571 * that a functoinal device is present on the port as determined by
572 * PxTFD.STS.BSY=0, PxTFD.STS.DRQ=0 and PxSSTS.DET=3h
573 *
574 * Even though most AHCI host controllers work without this check,
575 * specific controller will fail under this condition
576 */
577 if (status & (ATA_BUSY | ATA_DRQ))
578 return;
579 else {
580 ahci_scr_read(&ap->link, SCR_STATUS, &tmp);
581
582 if ((tmp & 0xf) != 0x3)
583 return;
584 }
542 585
543 /* start DMA */ 586 /* start DMA */
544 tmp = readl(port_mmio + PORT_CMD); 587 tmp = readl(port_mmio + PORT_CMD);
@@ -1897,7 +1940,17 @@ static void ahci_pmp_attach(struct ata_port *ap)
1897 ahci_enable_fbs(ap); 1940 ahci_enable_fbs(ap);
1898 1941
1899 pp->intr_mask |= PORT_IRQ_BAD_PMP; 1942 pp->intr_mask |= PORT_IRQ_BAD_PMP;
1900 writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK); 1943
1944 /*
1945 * We must not change the port interrupt mask register if the
1946 * port is marked frozen, the value in pp->intr_mask will be
1947 * restored later when the port is thawed.
1948 *
1949 * Note that during initialization, the port is marked as
1950 * frozen since the irq handler is not yet registered.
1951 */
1952 if (!(ap->pflags & ATA_PFLAG_FROZEN))
1953 writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK);
1901} 1954}
1902 1955
1903static void ahci_pmp_detach(struct ata_port *ap) 1956static void ahci_pmp_detach(struct ata_port *ap)
@@ -1913,7 +1966,10 @@ static void ahci_pmp_detach(struct ata_port *ap)
1913 writel(cmd, port_mmio + PORT_CMD); 1966 writel(cmd, port_mmio + PORT_CMD);
1914 1967
1915 pp->intr_mask &= ~PORT_IRQ_BAD_PMP; 1968 pp->intr_mask &= ~PORT_IRQ_BAD_PMP;
1916 writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK); 1969
1970 /* see comment above in ahci_pmp_attach() */
1971 if (!(ap->pflags & ATA_PFLAG_FROZEN))
1972 writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK);
1917} 1973}
1918 1974
1919int ahci_port_resume(struct ata_port *ap) 1975int ahci_port_resume(struct ata_port *ap)
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 423c0a6952b2..76c3c15cb1e6 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4139,6 +4139,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
4139 */ 4139 */
4140 { "PIONEER DVD-RW DVRTD08", "1.00", ATA_HORKAGE_NOSETXFER }, 4140 { "PIONEER DVD-RW DVRTD08", "1.00", ATA_HORKAGE_NOSETXFER },
4141 { "PIONEER DVD-RW DVR-212D", "1.28", ATA_HORKAGE_NOSETXFER }, 4141 { "PIONEER DVD-RW DVR-212D", "1.28", ATA_HORKAGE_NOSETXFER },
4142 { "PIONEER DVD-RW DVR-216D", "1.08", ATA_HORKAGE_NOSETXFER },
4142 4143
4143 /* End Marker */ 4144 /* End Marker */
4144 { } 4145 { }
@@ -5480,7 +5481,7 @@ struct ata_port *ata_port_alloc(struct ata_host *host)
5480 if (!ap) 5481 if (!ap)
5481 return NULL; 5482 return NULL;
5482 5483
5483 ap->pflags |= ATA_PFLAG_INITIALIZING; 5484 ap->pflags |= ATA_PFLAG_INITIALIZING | ATA_PFLAG_FROZEN;
5484 ap->lock = &host->lock; 5485 ap->lock = &host->lock;
5485 ap->print_id = -1; 5486 ap->print_id = -1;
5486 ap->host = host; 5487 ap->host = host;
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 88cd22fa65cd..f26f2fe3480a 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -3316,6 +3316,7 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
3316 struct ata_eh_context *ehc = &link->eh_context; 3316 struct ata_eh_context *ehc = &link->eh_context;
3317 struct ata_device *dev, *link_dev = NULL, *lpm_dev = NULL; 3317 struct ata_device *dev, *link_dev = NULL, *lpm_dev = NULL;
3318 enum ata_lpm_policy old_policy = link->lpm_policy; 3318 enum ata_lpm_policy old_policy = link->lpm_policy;
3319 bool no_dipm = ap->flags & ATA_FLAG_NO_DIPM;
3319 unsigned int hints = ATA_LPM_EMPTY | ATA_LPM_HIPM; 3320 unsigned int hints = ATA_LPM_EMPTY | ATA_LPM_HIPM;
3320 unsigned int err_mask; 3321 unsigned int err_mask;
3321 int rc; 3322 int rc;
@@ -3332,7 +3333,7 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
3332 */ 3333 */
3333 ata_for_each_dev(dev, link, ENABLED) { 3334 ata_for_each_dev(dev, link, ENABLED) {
3334 bool hipm = ata_id_has_hipm(dev->id); 3335 bool hipm = ata_id_has_hipm(dev->id);
3335 bool dipm = ata_id_has_dipm(dev->id); 3336 bool dipm = ata_id_has_dipm(dev->id) && !no_dipm;
3336 3337
3337 /* find the first enabled and LPM enabled devices */ 3338 /* find the first enabled and LPM enabled devices */
3338 if (!link_dev) 3339 if (!link_dev)
@@ -3389,7 +3390,8 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
3389 3390
3390 /* host config updated, enable DIPM if transitioning to MIN_POWER */ 3391 /* host config updated, enable DIPM if transitioning to MIN_POWER */
3391 ata_for_each_dev(dev, link, ENABLED) { 3392 ata_for_each_dev(dev, link, ENABLED) {
3392 if (policy == ATA_LPM_MIN_POWER && ata_id_has_dipm(dev->id)) { 3393 if (policy == ATA_LPM_MIN_POWER && !no_dipm &&
3394 ata_id_has_dipm(dev->id)) {
3393 err_mask = ata_dev_set_feature(dev, 3395 err_mask = ata_dev_set_feature(dev,
3394 SETFEATURES_SATA_ENABLE, SATA_DIPM); 3396 SETFEATURES_SATA_ENABLE, SATA_DIPM);
3395 if (err_mask && err_mask != AC_ERR_DEV) { 3397 if (err_mask && err_mask != AC_ERR_DEV) {
diff --git a/drivers/ata/pata_at91.c b/drivers/ata/pata_at91.c
index 0da0dcc7dd08..a5fdbdcb0faf 100644
--- a/drivers/ata/pata_at91.c
+++ b/drivers/ata/pata_at91.c
@@ -33,11 +33,12 @@
33 33
34 34
35#define DRV_NAME "pata_at91" 35#define DRV_NAME "pata_at91"
36#define DRV_VERSION "0.1" 36#define DRV_VERSION "0.2"
37 37
38#define CF_IDE_OFFSET 0x00c00000 38#define CF_IDE_OFFSET 0x00c00000
39#define CF_ALT_IDE_OFFSET 0x00e00000 39#define CF_ALT_IDE_OFFSET 0x00e00000
40#define CF_IDE_RES_SIZE 0x08 40#define CF_IDE_RES_SIZE 0x08
41#define NCS_RD_PULSE_LIMIT 0x3f /* maximal value for pulse bitfields */
41 42
42struct at91_ide_info { 43struct at91_ide_info {
43 unsigned long mode; 44 unsigned long mode;
@@ -49,8 +50,18 @@ struct at91_ide_info {
49 void __iomem *alt_addr; 50 void __iomem *alt_addr;
50}; 51};
51 52
52static const struct ata_timing initial_timing = 53static const struct ata_timing initial_timing = {
53 {XFER_PIO_0, 70, 290, 240, 600, 165, 150, 600, 0}; 54 .mode = XFER_PIO_0,
55 .setup = 70,
56 .act8b = 290,
57 .rec8b = 240,
58 .cyc8b = 600,
59 .active = 165,
60 .recover = 150,
61 .dmack_hold = 0,
62 .cycle = 600,
63 .udma = 0
64};
54 65
55static unsigned long calc_mck_cycles(unsigned long ns, unsigned long mck_hz) 66static unsigned long calc_mck_cycles(unsigned long ns, unsigned long mck_hz)
56{ 67{
@@ -109,6 +120,11 @@ static void set_smc_timing(struct device *dev,
109 /* (CS0, CS1, DIR, OE) <= (CFCE1, CFCE2, CFRNW, NCSX) timings */ 120 /* (CS0, CS1, DIR, OE) <= (CFCE1, CFCE2, CFRNW, NCSX) timings */
110 ncs_read_setup = 1; 121 ncs_read_setup = 1;
111 ncs_read_pulse = read_cycle - 2; 122 ncs_read_pulse = read_cycle - 2;
123 if (ncs_read_pulse > NCS_RD_PULSE_LIMIT) {
124 ncs_read_pulse = NCS_RD_PULSE_LIMIT;
125 dev_warn(dev, "ncs_read_pulse limited to maximal value %lu\n",
126 ncs_read_pulse);
127 }
112 128
113 /* Write timings same as read timings */ 129 /* Write timings same as read timings */
114 write_cycle = read_cycle; 130 write_cycle = read_cycle;
diff --git a/drivers/base/syscore.c b/drivers/base/syscore.c
index 90af2943f9e4..c126db3cb7d1 100644
--- a/drivers/base/syscore.c
+++ b/drivers/base/syscore.c
@@ -73,6 +73,7 @@ int syscore_suspend(void)
73 73
74 return ret; 74 return ret;
75} 75}
76EXPORT_SYMBOL_GPL(syscore_suspend);
76 77
77/** 78/**
78 * syscore_resume - Execute all the registered system core resume callbacks. 79 * syscore_resume - Execute all the registered system core resume callbacks.
@@ -95,6 +96,7 @@ void syscore_resume(void)
95 "Interrupts enabled after %pF\n", ops->resume); 96 "Interrupts enabled after %pF\n", ops->resume);
96 } 97 }
97} 98}
99EXPORT_SYMBOL_GPL(syscore_resume);
98#endif /* CONFIG_PM_SLEEP */ 100#endif /* CONFIG_PM_SLEEP */
99 101
100/** 102/**
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
index a3755ffc03d4..bc8ce48f0778 100644
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
@@ -2550,7 +2550,6 @@ static int __devinit sio_ite_8872_probe(struct pci_dev *pdev, int autoirq,
2550 const struct parport_pc_via_data *via) 2550 const struct parport_pc_via_data *via)
2551{ 2551{
2552 short inta_addr[6] = { 0x2A0, 0x2C0, 0x220, 0x240, 0x1E0 }; 2552 short inta_addr[6] = { 0x2A0, 0x2C0, 0x220, 0x240, 0x1E0 };
2553 struct resource *base_res;
2554 u32 ite8872set; 2553 u32 ite8872set;
2555 u32 ite8872_lpt, ite8872_lpthi; 2554 u32 ite8872_lpt, ite8872_lpthi;
2556 u8 ite8872_irq, type; 2555 u8 ite8872_irq, type;
@@ -2561,8 +2560,7 @@ static int __devinit sio_ite_8872_probe(struct pci_dev *pdev, int autoirq,
2561 2560
2562 /* make sure which one chip */ 2561 /* make sure which one chip */
2563 for (i = 0; i < 5; i++) { 2562 for (i = 0; i < 5; i++) {
2564 base_res = request_region(inta_addr[i], 32, "it887x"); 2563 if (request_region(inta_addr[i], 32, "it887x")) {
2565 if (base_res) {
2566 int test; 2564 int test;
2567 pci_write_config_dword(pdev, 0x60, 2565 pci_write_config_dword(pdev, 0x60,
2568 0xe5000000 | inta_addr[i]); 2566 0xe5000000 | inta_addr[i]);
@@ -2571,7 +2569,7 @@ static int __devinit sio_ite_8872_probe(struct pci_dev *pdev, int autoirq,
2571 test = inb(inta_addr[i]); 2569 test = inb(inta_addr[i]);
2572 if (test != 0xff) 2570 if (test != 0xff)
2573 break; 2571 break;
2574 release_region(inta_addr[i], 0x8); 2572 release_region(inta_addr[i], 32);
2575 } 2573 }
2576 } 2574 }
2577 if (i >= 5) { 2575 if (i >= 5) {
@@ -2635,7 +2633,7 @@ static int __devinit sio_ite_8872_probe(struct pci_dev *pdev, int autoirq,
2635 /* 2633 /*
2636 * Release the resource so that parport_pc_probe_port can get it. 2634 * Release the resource so that parport_pc_probe_port can get it.
2637 */ 2635 */
2638 release_resource(base_res); 2636 release_region(inta_addr[i], 32);
2639 if (parport_pc_probe_port(ite8872_lpt, ite8872_lpthi, 2637 if (parport_pc_probe_port(ite8872_lpt, ite8872_lpthi,
2640 irq, PARPORT_DMA_NONE, &pdev->dev, 0)) { 2638 irq, PARPORT_DMA_NONE, &pdev->dev, 0)) {
2641 printk(KERN_INFO 2639 printk(KERN_INFO
diff --git a/drivers/rtc/rtc-coh901331.c b/drivers/rtc/rtc-coh901331.c
index 316f484999b5..80f9c88214c5 100644
--- a/drivers/rtc/rtc-coh901331.c
+++ b/drivers/rtc/rtc-coh901331.c
@@ -220,6 +220,7 @@ static int __init coh901331_probe(struct platform_device *pdev)
220 } 220 }
221 clk_disable(rtap->clk); 221 clk_disable(rtap->clk);
222 222
223 platform_set_drvdata(pdev, rtap);
223 rtap->rtc = rtc_device_register("coh901331", &pdev->dev, &coh901331_ops, 224 rtap->rtc = rtc_device_register("coh901331", &pdev->dev, &coh901331_ops,
224 THIS_MODULE); 225 THIS_MODULE);
225 if (IS_ERR(rtap->rtc)) { 226 if (IS_ERR(rtap->rtc)) {
@@ -227,11 +228,10 @@ static int __init coh901331_probe(struct platform_device *pdev)
227 goto out_no_rtc; 228 goto out_no_rtc;
228 } 229 }
229 230
230 platform_set_drvdata(pdev, rtap);
231
232 return 0; 231 return 0;
233 232
234 out_no_rtc: 233 out_no_rtc:
234 platform_set_drvdata(pdev, NULL);
235 out_no_clk_enable: 235 out_no_clk_enable:
236 clk_put(rtap->clk); 236 clk_put(rtap->clk);
237 out_no_clk: 237 out_no_clk:
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 47f8cdb207f1..74273e638c0d 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -1658,8 +1658,12 @@ static void gsm_queue(struct gsm_mux *gsm)
1658 1658
1659 if ((gsm->control & ~PF) == UI) 1659 if ((gsm->control & ~PF) == UI)
1660 gsm->fcs = gsm_fcs_add_block(gsm->fcs, gsm->buf, gsm->len); 1660 gsm->fcs = gsm_fcs_add_block(gsm->fcs, gsm->buf, gsm->len);
1661 /* generate final CRC with received FCS */ 1661 if (gsm->encoding == 0){
1662 gsm->fcs = gsm_fcs_add(gsm->fcs, gsm->received_fcs); 1662 /* WARNING: gsm->received_fcs is used for gsm->encoding = 0 only.
1663 In this case it contain the last piece of data
1664 required to generate final CRC */
1665 gsm->fcs = gsm_fcs_add(gsm->fcs, gsm->received_fcs);
1666 }
1663 if (gsm->fcs != GOOD_FCS) { 1667 if (gsm->fcs != GOOD_FCS) {
1664 gsm->bad_fcs++; 1668 gsm->bad_fcs++;
1665 if (debug & 4) 1669 if (debug & 4)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index cb36b0d4ef3c..62df72d9f0aa 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -382,12 +382,13 @@ static void imx_start_tx(struct uart_port *port)
382static irqreturn_t imx_rtsint(int irq, void *dev_id) 382static irqreturn_t imx_rtsint(int irq, void *dev_id)
383{ 383{
384 struct imx_port *sport = dev_id; 384 struct imx_port *sport = dev_id;
385 unsigned int val = readl(sport->port.membase + USR1) & USR1_RTSS; 385 unsigned int val;
386 unsigned long flags; 386 unsigned long flags;
387 387
388 spin_lock_irqsave(&sport->port.lock, flags); 388 spin_lock_irqsave(&sport->port.lock, flags);
389 389
390 writel(USR1_RTSD, sport->port.membase + USR1); 390 writel(USR1_RTSD, sport->port.membase + USR1);
391 val = readl(sport->port.membase + USR1) & USR1_RTSS;
391 uart_handle_cts_change(&sport->port, !!val); 392 uart_handle_cts_change(&sport->port, !!val);
392 wake_up_interruptible(&sport->port.state->port.delta_msr_wait); 393 wake_up_interruptible(&sport->port.state->port.delta_msr_wait);
393 394
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index 1ac94125bf93..a2eee574784e 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -8,6 +8,7 @@
8#include <linux/sysrq.h> 8#include <linux/sysrq.h>
9#include <linux/stop_machine.h> 9#include <linux/stop_machine.h>
10#include <linux/freezer.h> 10#include <linux/freezer.h>
11#include <linux/syscore_ops.h>
11 12
12#include <xen/xen.h> 13#include <xen/xen.h>
13#include <xen/xenbus.h> 14#include <xen/xenbus.h>
@@ -70,8 +71,13 @@ static int xen_suspend(void *data)
70 BUG_ON(!irqs_disabled()); 71 BUG_ON(!irqs_disabled());
71 72
72 err = sysdev_suspend(PMSG_FREEZE); 73 err = sysdev_suspend(PMSG_FREEZE);
74 if (!err) {
75 err = syscore_suspend();
76 if (err)
77 sysdev_resume();
78 }
73 if (err) { 79 if (err) {
74 printk(KERN_ERR "xen_suspend: sysdev_suspend failed: %d\n", 80 printk(KERN_ERR "xen_suspend: system core suspend failed: %d\n",
75 err); 81 err);
76 return err; 82 return err;
77 } 83 }
@@ -95,6 +101,7 @@ static int xen_suspend(void *data)
95 xen_timer_resume(); 101 xen_timer_resume();
96 } 102 }
97 103
104 syscore_resume();
98 sysdev_resume(); 105 sysdev_resume();
99 106
100 return 0; 107 return 0;