diff options
author | Len Brown <len.brown@intel.com> | 2006-12-20 02:53:13 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-12-20 02:53:13 -0500 |
commit | 9774f3384125912eb491ca77f77907324db3ed05 (patch) | |
tree | 0bdc7486e911dd9e955b41283ee19ac74521f7bd /drivers | |
parent | 3be11c8f4f2fa194834c2e83540f34da442b8977 (diff) | |
parent | f238085415c56618e042252894f2fcc971add645 (diff) |
merge linus into test branch
Diffstat (limited to 'drivers')
30 files changed, 330 insertions, 103 deletions
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index 984ab284382a..b34e0a958d0f 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig | |||
@@ -40,9 +40,9 @@ config ATA_PIIX | |||
40 | tristate "Intel PIIX/ICH SATA support" | 40 | tristate "Intel PIIX/ICH SATA support" |
41 | depends on PCI | 41 | depends on PCI |
42 | help | 42 | help |
43 | This option enables support for ICH5/6/7/8 Serial ATA. | 43 | This option enables support for ICH5/6/7/8 Serial ATA |
44 | If PATA support was enabled previously, this enables | 44 | and support for PATA on the Intel PIIX3/PIIX4/ICH series |
45 | support for select Intel PIIX/ICH PATA host controllers. | 45 | PATA host controllers. |
46 | 46 | ||
47 | If unsure, say N. | 47 | If unsure, say N. |
48 | 48 | ||
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index f36da488a2c1..dbae6d971041 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -645,8 +645,6 @@ static int ahci_reset_controller(void __iomem *mmio, struct pci_dev *pdev) | |||
645 | u32 cap_save, impl_save, tmp; | 645 | u32 cap_save, impl_save, tmp; |
646 | 646 | ||
647 | cap_save = readl(mmio + HOST_CAP); | 647 | cap_save = readl(mmio + HOST_CAP); |
648 | cap_save &= ( (1<<28) | (1<<17) ); | ||
649 | cap_save |= (1 << 27); | ||
650 | impl_save = readl(mmio + HOST_PORTS_IMPL); | 648 | impl_save = readl(mmio + HOST_PORTS_IMPL); |
651 | 649 | ||
652 | /* global controller reset */ | 650 | /* global controller reset */ |
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index c7de0bb1591f..47701b286f8b 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
@@ -226,14 +226,26 @@ static const struct pci_device_id piix_pci_tbl[] = { | |||
226 | { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, | 226 | { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, |
227 | /* 2801GBM/GHM (ICH7M, identical to ICH6M) */ | 227 | /* 2801GBM/GHM (ICH7M, identical to ICH6M) */ |
228 | { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6m_sata_ahci }, | 228 | { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6m_sata_ahci }, |
229 | /* Enterprise Southbridge 2 (where's the datasheet?) */ | 229 | /* Enterprise Southbridge 2 (631xESB/632xESB) */ |
230 | { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, | 230 | { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, |
231 | /* SATA Controller 1 IDE (ICH8, no datasheet yet) */ | 231 | /* SATA Controller 1 IDE (ICH8) */ |
232 | { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | 232 | { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, |
233 | /* SATA Controller 2 IDE (ICH8, ditto) */ | 233 | /* SATA Controller 2 IDE (ICH8) */ |
234 | { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | 234 | { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, |
235 | /* Mobile SATA Controller IDE (ICH8M, ditto) */ | 235 | /* Mobile SATA Controller IDE (ICH8M) */ |
236 | { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | 236 | { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, |
237 | /* SATA Controller IDE (ICH9) */ | ||
238 | { 0x8086, 0x2920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | ||
239 | /* SATA Controller IDE (ICH9) */ | ||
240 | { 0x8086, 0x2921, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | ||
241 | /* SATA Controller IDE (ICH9) */ | ||
242 | { 0x8086, 0x2926, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | ||
243 | /* SATA Controller IDE (ICH9M) */ | ||
244 | { 0x8086, 0x2928, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | ||
245 | /* SATA Controller IDE (ICH9M) */ | ||
246 | { 0x8086, 0x292d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | ||
247 | /* SATA Controller IDE (ICH9M) */ | ||
248 | { 0x8086, 0x292e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | ||
237 | 249 | ||
238 | { } /* terminate list */ | 250 | { } /* terminate list */ |
239 | }; | 251 | }; |
@@ -330,7 +342,7 @@ static const struct ata_port_operations ich_pata_ops = { | |||
330 | 342 | ||
331 | .port_start = ata_port_start, | 343 | .port_start = ata_port_start, |
332 | .port_stop = ata_port_stop, | 344 | .port_stop = ata_port_stop, |
333 | .host_stop = ata_host_stop, | 345 | .host_stop = piix_host_stop, |
334 | }; | 346 | }; |
335 | 347 | ||
336 | static const struct ata_port_operations piix_sata_ops = { | 348 | static const struct ata_port_operations piix_sata_ops = { |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 011c0a8a2dcc..0d51d13b16bf 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -1332,7 +1332,7 @@ unsigned ata_exec_internal_sg(struct ata_device *dev, | |||
1332 | } | 1332 | } |
1333 | 1333 | ||
1334 | /** | 1334 | /** |
1335 | * ata_exec_internal_sg - execute libata internal command | 1335 | * ata_exec_internal - execute libata internal command |
1336 | * @dev: Device to which the command is sent | 1336 | * @dev: Device to which the command is sent |
1337 | * @tf: Taskfile registers for the command and the result | 1337 | * @tf: Taskfile registers for the command and the result |
1338 | * @cdb: CDB for packet command | 1338 | * @cdb: CDB for packet command |
@@ -1353,11 +1353,17 @@ unsigned ata_exec_internal(struct ata_device *dev, | |||
1353 | struct ata_taskfile *tf, const u8 *cdb, | 1353 | struct ata_taskfile *tf, const u8 *cdb, |
1354 | int dma_dir, void *buf, unsigned int buflen) | 1354 | int dma_dir, void *buf, unsigned int buflen) |
1355 | { | 1355 | { |
1356 | struct scatterlist sg; | 1356 | struct scatterlist *psg = NULL, sg; |
1357 | unsigned int n_elem = 0; | ||
1357 | 1358 | ||
1358 | sg_init_one(&sg, buf, buflen); | 1359 | if (dma_dir != DMA_NONE) { |
1360 | WARN_ON(!buf); | ||
1361 | sg_init_one(&sg, buf, buflen); | ||
1362 | psg = &sg; | ||
1363 | n_elem++; | ||
1364 | } | ||
1359 | 1365 | ||
1360 | return ata_exec_internal_sg(dev, tf, cdb, dma_dir, &sg, 1); | 1366 | return ata_exec_internal_sg(dev, tf, cdb, dma_dir, psg, n_elem); |
1361 | } | 1367 | } |
1362 | 1368 | ||
1363 | /** | 1369 | /** |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 664e1377b54c..a4790be41d1c 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -1539,7 +1539,7 @@ static unsigned int ata_scsi_rbuf_get(struct scsi_cmnd *cmd, u8 **buf_out) | |||
1539 | struct scatterlist *sg; | 1539 | struct scatterlist *sg; |
1540 | 1540 | ||
1541 | sg = (struct scatterlist *) cmd->request_buffer; | 1541 | sg = (struct scatterlist *) cmd->request_buffer; |
1542 | buf = kmap_atomic(sg->page, KM_USER0) + sg->offset; | 1542 | buf = kmap_atomic(sg->page, KM_IRQ0) + sg->offset; |
1543 | buflen = sg->length; | 1543 | buflen = sg->length; |
1544 | } else { | 1544 | } else { |
1545 | buf = cmd->request_buffer; | 1545 | buf = cmd->request_buffer; |
@@ -1567,7 +1567,7 @@ static inline void ata_scsi_rbuf_put(struct scsi_cmnd *cmd, u8 *buf) | |||
1567 | struct scatterlist *sg; | 1567 | struct scatterlist *sg; |
1568 | 1568 | ||
1569 | sg = (struct scatterlist *) cmd->request_buffer; | 1569 | sg = (struct scatterlist *) cmd->request_buffer; |
1570 | kunmap_atomic(buf - sg->offset, KM_USER0); | 1570 | kunmap_atomic(buf - sg->offset, KM_IRQ0); |
1571 | } | 1571 | } |
1572 | } | 1572 | } |
1573 | 1573 | ||
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c index c7d1738e4e69..e7bf9d89c8ee 100644 --- a/drivers/ata/pata_legacy.c +++ b/drivers/ata/pata_legacy.c | |||
@@ -698,8 +698,10 @@ static __init int legacy_init_one(int port, unsigned long io, unsigned long ctrl | |||
698 | goto fail_io; | 698 | goto fail_io; |
699 | 699 | ||
700 | pdev = platform_device_register_simple(DRV_NAME, nr_legacy_host, NULL, 0); | 700 | pdev = platform_device_register_simple(DRV_NAME, nr_legacy_host, NULL, 0); |
701 | if (pdev == NULL) | 701 | if (IS_ERR(pdev)) { |
702 | ret = PTR_ERR(pdev); | ||
702 | goto fail_dev; | 703 | goto fail_dev; |
704 | } | ||
703 | 705 | ||
704 | if (ht6560a & mask) { | 706 | if (ht6560a & mask) { |
705 | ops = &ht6560a_port_ops; | 707 | ops = &ht6560a_port_ops; |
diff --git a/drivers/ata/pata_qdi.c b/drivers/ata/pata_qdi.c index 36f621abc390..afc0d990e7d6 100644 --- a/drivers/ata/pata_qdi.c +++ b/drivers/ata/pata_qdi.c | |||
@@ -247,8 +247,8 @@ static __init int qdi_init_one(unsigned long port, int type, unsigned long io, i | |||
247 | */ | 247 | */ |
248 | 248 | ||
249 | pdev = platform_device_register_simple(DRV_NAME, nr_qdi_host, NULL, 0); | 249 | pdev = platform_device_register_simple(DRV_NAME, nr_qdi_host, NULL, 0); |
250 | if (pdev == NULL) | 250 | if (IS_ERR(pdev)) |
251 | return -ENOMEM; | 251 | return PTR_ERR(pdev); |
252 | 252 | ||
253 | memset(&ae, 0, sizeof(struct ata_probe_ent)); | 253 | memset(&ae, 0, sizeof(struct ata_probe_ent)); |
254 | INIT_LIST_HEAD(&ae.node); | 254 | INIT_LIST_HEAD(&ae.node); |
diff --git a/drivers/ata/pata_rz1000.c b/drivers/ata/pata_rz1000.c index 3677c642c9f9..adf4cc134f25 100644 --- a/drivers/ata/pata_rz1000.c +++ b/drivers/ata/pata_rz1000.c | |||
@@ -105,8 +105,6 @@ static struct ata_port_operations rz1000_port_ops = { | |||
105 | .exec_command = ata_exec_command, | 105 | .exec_command = ata_exec_command, |
106 | .dev_select = ata_std_dev_select, | 106 | .dev_select = ata_std_dev_select, |
107 | 107 | ||
108 | .error_handler = rz1000_error_handler, | ||
109 | |||
110 | .bmdma_setup = ata_bmdma_setup, | 108 | .bmdma_setup = ata_bmdma_setup, |
111 | .bmdma_start = ata_bmdma_start, | 109 | .bmdma_start = ata_bmdma_start, |
112 | .bmdma_stop = ata_bmdma_stop, | 110 | .bmdma_stop = ata_bmdma_stop, |
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index cc09d47fb927..ff93e8f71cf8 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c | |||
@@ -161,10 +161,15 @@ static int via_pre_reset(struct ata_port *ap) | |||
161 | return -ENOENT; | 161 | return -ENOENT; |
162 | } | 162 | } |
163 | 163 | ||
164 | if ((config->flags & VIA_UDMA) >= VIA_UDMA_66) | 164 | if ((config->flags & VIA_UDMA) >= VIA_UDMA_100) |
165 | ap->cbl = via_cable_detect(ap); | 165 | ap->cbl = via_cable_detect(ap); |
166 | else | 166 | /* The UDMA66 series has no cable detect so do drive side detect */ |
167 | else if ((config->flags & VIA_UDMA) < VIA_UDMA_66) | ||
167 | ap->cbl = ATA_CBL_PATA40; | 168 | ap->cbl = ATA_CBL_PATA40; |
169 | else | ||
170 | ap->cbl = ATA_CBL_PATA_UNK; | ||
171 | |||
172 | |||
168 | return ata_std_prereset(ap); | 173 | return ata_std_prereset(ap); |
169 | } | 174 | } |
170 | 175 | ||
diff --git a/drivers/ata/pata_winbond.c b/drivers/ata/pata_winbond.c index 3ea345cde52e..5d1f518e1cc7 100644 --- a/drivers/ata/pata_winbond.c +++ b/drivers/ata/pata_winbond.c | |||
@@ -206,8 +206,8 @@ static __init int winbond_init_one(unsigned long port) | |||
206 | */ | 206 | */ |
207 | 207 | ||
208 | pdev = platform_device_register_simple(DRV_NAME, nr_winbond_host, NULL, 0); | 208 | pdev = platform_device_register_simple(DRV_NAME, nr_winbond_host, NULL, 0); |
209 | if (pdev == NULL) | 209 | if (IS_ERR(pdev)) |
210 | return -ENOMEM; | 210 | return PTR_ERR(pdev); |
211 | 211 | ||
212 | memset(&ae, 0, sizeof(struct ata_probe_ent)); | 212 | memset(&ae, 0, sizeof(struct ata_probe_ent)); |
213 | INIT_LIST_HEAD(&ae.node); | 213 | INIT_LIST_HEAD(&ae.node); |
diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c index db32d15b7fa1..d89c9590b845 100644 --- a/drivers/ata/sata_svw.c +++ b/drivers/ata/sata_svw.c | |||
@@ -56,6 +56,8 @@ | |||
56 | #define DRV_VERSION "2.0" | 56 | #define DRV_VERSION "2.0" |
57 | 57 | ||
58 | enum { | 58 | enum { |
59 | K2_FLAG_NO_ATAPI_DMA = (1 << 29), | ||
60 | |||
59 | /* Taskfile registers offsets */ | 61 | /* Taskfile registers offsets */ |
60 | K2_SATA_TF_CMD_OFFSET = 0x00, | 62 | K2_SATA_TF_CMD_OFFSET = 0x00, |
61 | K2_SATA_TF_DATA_OFFSET = 0x00, | 63 | K2_SATA_TF_DATA_OFFSET = 0x00, |
@@ -83,11 +85,33 @@ enum { | |||
83 | 85 | ||
84 | /* Port stride */ | 86 | /* Port stride */ |
85 | K2_SATA_PORT_OFFSET = 0x100, | 87 | K2_SATA_PORT_OFFSET = 0x100, |
88 | |||
89 | board_svw4 = 0, | ||
90 | board_svw8 = 1, | ||
91 | }; | ||
92 | |||
93 | static const struct k2_board_info { | ||
94 | unsigned int n_ports; | ||
95 | unsigned long port_flags; | ||
96 | } k2_board_info[] = { | ||
97 | /* board_svw4 */ | ||
98 | { 4, K2_FLAG_NO_ATAPI_DMA }, | ||
99 | |||
100 | /* board_svw8 */ | ||
101 | { 8, K2_FLAG_NO_ATAPI_DMA }, | ||
86 | }; | 102 | }; |
87 | 103 | ||
88 | static u8 k2_stat_check_status(struct ata_port *ap); | 104 | static u8 k2_stat_check_status(struct ata_port *ap); |
89 | 105 | ||
90 | 106 | ||
107 | static int k2_sata_check_atapi_dma(struct ata_queued_cmd *qc) | ||
108 | { | ||
109 | if (qc->ap->flags & K2_FLAG_NO_ATAPI_DMA) | ||
110 | return -1; /* ATAPI DMA not supported */ | ||
111 | |||
112 | return 0; | ||
113 | } | ||
114 | |||
91 | static u32 k2_sata_scr_read (struct ata_port *ap, unsigned int sc_reg) | 115 | static u32 k2_sata_scr_read (struct ata_port *ap, unsigned int sc_reg) |
92 | { | 116 | { |
93 | if (sc_reg > SCR_CONTROL) | 117 | if (sc_reg > SCR_CONTROL) |
@@ -313,6 +337,7 @@ static const struct ata_port_operations k2_sata_ops = { | |||
313 | .check_status = k2_stat_check_status, | 337 | .check_status = k2_stat_check_status, |
314 | .exec_command = ata_exec_command, | 338 | .exec_command = ata_exec_command, |
315 | .dev_select = ata_std_dev_select, | 339 | .dev_select = ata_std_dev_select, |
340 | .check_atapi_dma = k2_sata_check_atapi_dma, | ||
316 | .bmdma_setup = k2_bmdma_setup_mmio, | 341 | .bmdma_setup = k2_bmdma_setup_mmio, |
317 | .bmdma_start = k2_bmdma_start_mmio, | 342 | .bmdma_start = k2_bmdma_start_mmio, |
318 | .bmdma_stop = ata_bmdma_stop, | 343 | .bmdma_stop = ata_bmdma_stop, |
@@ -359,6 +384,8 @@ static int k2_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
359 | struct ata_probe_ent *probe_ent = NULL; | 384 | struct ata_probe_ent *probe_ent = NULL; |
360 | unsigned long base; | 385 | unsigned long base; |
361 | void __iomem *mmio_base; | 386 | void __iomem *mmio_base; |
387 | const struct k2_board_info *board_info = | ||
388 | &k2_board_info[ent->driver_data]; | ||
362 | int pci_dev_busy = 0; | 389 | int pci_dev_busy = 0; |
363 | int rc; | 390 | int rc; |
364 | int i; | 391 | int i; |
@@ -424,7 +451,7 @@ static int k2_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
424 | 451 | ||
425 | probe_ent->sht = &k2_sata_sht; | 452 | probe_ent->sht = &k2_sata_sht; |
426 | probe_ent->port_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | | 453 | probe_ent->port_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | |
427 | ATA_FLAG_MMIO; | 454 | ATA_FLAG_MMIO | board_info->port_flags; |
428 | probe_ent->port_ops = &k2_sata_ops; | 455 | probe_ent->port_ops = &k2_sata_ops; |
429 | probe_ent->n_ports = 4; | 456 | probe_ent->n_ports = 4; |
430 | probe_ent->irq = pdev->irq; | 457 | probe_ent->irq = pdev->irq; |
@@ -441,7 +468,7 @@ static int k2_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
441 | /* different controllers have different number of ports - currently 4 or 8 */ | 468 | /* different controllers have different number of ports - currently 4 or 8 */ |
442 | /* All ports are on the same function. Multi-function device is no | 469 | /* All ports are on the same function. Multi-function device is no |
443 | * longer available. This should not be seen in any system. */ | 470 | * longer available. This should not be seen in any system. */ |
444 | for (i = 0; i < ent->driver_data; i++) | 471 | for (i = 0; i < board_info->n_ports; i++) |
445 | k2_sata_setup_port(&probe_ent->port[i], base + i * K2_SATA_PORT_OFFSET); | 472 | k2_sata_setup_port(&probe_ent->port[i], base + i * K2_SATA_PORT_OFFSET); |
446 | 473 | ||
447 | pci_set_master(pdev); | 474 | pci_set_master(pdev); |
@@ -469,11 +496,11 @@ err_out: | |||
469 | * controller | 496 | * controller |
470 | * */ | 497 | * */ |
471 | static const struct pci_device_id k2_sata_pci_tbl[] = { | 498 | static const struct pci_device_id k2_sata_pci_tbl[] = { |
472 | { PCI_VDEVICE(SERVERWORKS, 0x0240), 4 }, | 499 | { PCI_VDEVICE(SERVERWORKS, 0x0240), board_svw4 }, |
473 | { PCI_VDEVICE(SERVERWORKS, 0x0241), 4 }, | 500 | { PCI_VDEVICE(SERVERWORKS, 0x0241), board_svw4 }, |
474 | { PCI_VDEVICE(SERVERWORKS, 0x0242), 8 }, | 501 | { PCI_VDEVICE(SERVERWORKS, 0x0242), board_svw8 }, |
475 | { PCI_VDEVICE(SERVERWORKS, 0x024a), 4 }, | 502 | { PCI_VDEVICE(SERVERWORKS, 0x024a), board_svw4 }, |
476 | { PCI_VDEVICE(SERVERWORKS, 0x024b), 4 }, | 503 | { PCI_VDEVICE(SERVERWORKS, 0x024b), board_svw4 }, |
477 | 504 | ||
478 | { } | 505 | { } |
479 | }; | 506 | }; |
diff --git a/drivers/connector/cn_queue.c b/drivers/connector/cn_queue.c index b418b16e910e..296f51002b55 100644 --- a/drivers/connector/cn_queue.c +++ b/drivers/connector/cn_queue.c | |||
@@ -34,7 +34,7 @@ | |||
34 | void cn_queue_wrapper(struct work_struct *work) | 34 | void cn_queue_wrapper(struct work_struct *work) |
35 | { | 35 | { |
36 | struct cn_callback_entry *cbq = | 36 | struct cn_callback_entry *cbq = |
37 | container_of(work, struct cn_callback_entry, work.work); | 37 | container_of(work, struct cn_callback_entry, work); |
38 | struct cn_callback_data *d = &cbq->data; | 38 | struct cn_callback_data *d = &cbq->data; |
39 | 39 | ||
40 | d->callback(d->callback_priv); | 40 | d->callback(d->callback_priv); |
@@ -59,13 +59,12 @@ static struct cn_callback_entry *cn_queue_alloc_callback_entry(char *name, struc | |||
59 | memcpy(&cbq->id.id, id, sizeof(struct cb_id)); | 59 | memcpy(&cbq->id.id, id, sizeof(struct cb_id)); |
60 | cbq->data.callback = callback; | 60 | cbq->data.callback = callback; |
61 | 61 | ||
62 | INIT_DELAYED_WORK(&cbq->work, &cn_queue_wrapper); | 62 | INIT_WORK(&cbq->work, &cn_queue_wrapper); |
63 | return cbq; | 63 | return cbq; |
64 | } | 64 | } |
65 | 65 | ||
66 | static void cn_queue_free_callback(struct cn_callback_entry *cbq) | 66 | static void cn_queue_free_callback(struct cn_callback_entry *cbq) |
67 | { | 67 | { |
68 | cancel_delayed_work(&cbq->work); | ||
69 | flush_workqueue(cbq->pdev->cn_queue); | 68 | flush_workqueue(cbq->pdev->cn_queue); |
70 | 69 | ||
71 | kfree(cbq); | 70 | kfree(cbq); |
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c index 5e7cd45d10ee..a44db75bc25b 100644 --- a/drivers/connector/connector.c +++ b/drivers/connector/connector.c | |||
@@ -135,17 +135,15 @@ static int cn_call_callback(struct cn_msg *msg, void (*destruct_data)(void *), v | |||
135 | spin_lock_bh(&dev->cbdev->queue_lock); | 135 | spin_lock_bh(&dev->cbdev->queue_lock); |
136 | list_for_each_entry(__cbq, &dev->cbdev->queue_list, callback_entry) { | 136 | list_for_each_entry(__cbq, &dev->cbdev->queue_list, callback_entry) { |
137 | if (cn_cb_equal(&__cbq->id.id, &msg->id)) { | 137 | if (cn_cb_equal(&__cbq->id.id, &msg->id)) { |
138 | if (likely(!test_bit(WORK_STRUCT_PENDING, | 138 | if (likely(!work_pending(&__cbq->work) && |
139 | &__cbq->work.work.management) && | ||
140 | __cbq->data.ddata == NULL)) { | 139 | __cbq->data.ddata == NULL)) { |
141 | __cbq->data.callback_priv = msg; | 140 | __cbq->data.callback_priv = msg; |
142 | 141 | ||
143 | __cbq->data.ddata = data; | 142 | __cbq->data.ddata = data; |
144 | __cbq->data.destruct_data = destruct_data; | 143 | __cbq->data.destruct_data = destruct_data; |
145 | 144 | ||
146 | if (queue_delayed_work( | 145 | if (queue_work(dev->cbdev->cn_queue, |
147 | dev->cbdev->cn_queue, | 146 | &__cbq->work)) |
148 | &__cbq->work, 0)) | ||
149 | err = 0; | 147 | err = 0; |
150 | } else { | 148 | } else { |
151 | struct cn_callback_data *d; | 149 | struct cn_callback_data *d; |
@@ -159,12 +157,11 @@ static int cn_call_callback(struct cn_msg *msg, void (*destruct_data)(void *), v | |||
159 | d->destruct_data = destruct_data; | 157 | d->destruct_data = destruct_data; |
160 | d->free = __cbq; | 158 | d->free = __cbq; |
161 | 159 | ||
162 | INIT_DELAYED_WORK(&__cbq->work, | 160 | INIT_WORK(&__cbq->work, |
163 | &cn_queue_wrapper); | 161 | &cn_queue_wrapper); |
164 | 162 | ||
165 | if (queue_delayed_work( | 163 | if (queue_work(dev->cbdev->cn_queue, |
166 | dev->cbdev->cn_queue, | 164 | &__cbq->work)) |
167 | &__cbq->work, 0)) | ||
168 | err = 0; | 165 | err = 0; |
169 | else { | 166 | else { |
170 | kfree(__cbq); | 167 | kfree(__cbq); |
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 9fb2edf36611..d91330432ba2 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -959,7 +959,7 @@ static void cpufreq_out_of_sync(unsigned int cpu, unsigned int old_freq, | |||
959 | 959 | ||
960 | 960 | ||
961 | /** | 961 | /** |
962 | * cpufreq_quick_get - get the CPU frequency (in kHz) frpm policy->cur | 962 | * cpufreq_quick_get - get the CPU frequency (in kHz) from policy->cur |
963 | * @cpu: CPU number | 963 | * @cpu: CPU number |
964 | * | 964 | * |
965 | * This is the last known freq, without actually getting it from the driver. | 965 | * This is the last known freq, without actually getting it from the driver. |
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 14cdf09316ce..998638020ea0 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -415,12 +415,31 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
415 | case 0x000: goto ignore; | 415 | case 0x000: goto ignore; |
416 | case 0x034: map_key_clear(KEY_SLEEP); break; | 416 | case 0x034: map_key_clear(KEY_SLEEP); break; |
417 | case 0x036: map_key_clear(BTN_MISC); break; | 417 | case 0x036: map_key_clear(BTN_MISC); break; |
418 | case 0x040: map_key_clear(KEY_MENU); break; | ||
418 | case 0x045: map_key_clear(KEY_RADIO); break; | 419 | case 0x045: map_key_clear(KEY_RADIO); break; |
420 | |||
421 | case 0x088: map_key_clear(KEY_PC); break; | ||
422 | case 0x089: map_key_clear(KEY_TV); break; | ||
419 | case 0x08a: map_key_clear(KEY_WWW); break; | 423 | case 0x08a: map_key_clear(KEY_WWW); break; |
424 | case 0x08b: map_key_clear(KEY_DVD); break; | ||
425 | case 0x08c: map_key_clear(KEY_PHONE); break; | ||
420 | case 0x08d: map_key_clear(KEY_PROGRAM); break; | 426 | case 0x08d: map_key_clear(KEY_PROGRAM); break; |
427 | case 0x08e: map_key_clear(KEY_VIDEOPHONE); break; | ||
428 | case 0x08f: map_key_clear(KEY_GAMES); break; | ||
429 | case 0x090: map_key_clear(KEY_MEMO); break; | ||
430 | case 0x091: map_key_clear(KEY_CD); break; | ||
431 | case 0x092: map_key_clear(KEY_VCR); break; | ||
432 | case 0x093: map_key_clear(KEY_TUNER); break; | ||
433 | case 0x094: map_key_clear(KEY_EXIT); break; | ||
421 | case 0x095: map_key_clear(KEY_HELP); break; | 434 | case 0x095: map_key_clear(KEY_HELP); break; |
435 | case 0x096: map_key_clear(KEY_TAPE); break; | ||
436 | case 0x097: map_key_clear(KEY_TV2); break; | ||
437 | case 0x098: map_key_clear(KEY_SAT); break; | ||
438 | |||
422 | case 0x09c: map_key_clear(KEY_CHANNELUP); break; | 439 | case 0x09c: map_key_clear(KEY_CHANNELUP); break; |
423 | case 0x09d: map_key_clear(KEY_CHANNELDOWN); break; | 440 | case 0x09d: map_key_clear(KEY_CHANNELDOWN); break; |
441 | case 0x0a0: map_key_clear(KEY_VCR2); break; | ||
442 | |||
424 | case 0x0b0: map_key_clear(KEY_PLAY); break; | 443 | case 0x0b0: map_key_clear(KEY_PLAY); break; |
425 | case 0x0b1: map_key_clear(KEY_PAUSE); break; | 444 | case 0x0b1: map_key_clear(KEY_PAUSE); break; |
426 | case 0x0b2: map_key_clear(KEY_RECORD); break; | 445 | case 0x0b2: map_key_clear(KEY_RECORD); break; |
@@ -430,6 +449,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
430 | case 0x0b6: map_key_clear(KEY_PREVIOUSSONG); break; | 449 | case 0x0b6: map_key_clear(KEY_PREVIOUSSONG); break; |
431 | case 0x0b7: map_key_clear(KEY_STOPCD); break; | 450 | case 0x0b7: map_key_clear(KEY_STOPCD); break; |
432 | case 0x0b8: map_key_clear(KEY_EJECTCD); break; | 451 | case 0x0b8: map_key_clear(KEY_EJECTCD); break; |
452 | |||
433 | case 0x0cd: map_key_clear(KEY_PLAYPAUSE); break; | 453 | case 0x0cd: map_key_clear(KEY_PLAYPAUSE); break; |
434 | case 0x0e0: map_abs_clear(ABS_VOLUME); break; | 454 | case 0x0e0: map_abs_clear(ABS_VOLUME); break; |
435 | case 0x0e2: map_key_clear(KEY_MUTE); break; | 455 | case 0x0e2: map_key_clear(KEY_MUTE); break; |
@@ -437,11 +457,30 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
437 | case 0x0e9: map_key_clear(KEY_VOLUMEUP); break; | 457 | case 0x0e9: map_key_clear(KEY_VOLUMEUP); break; |
438 | case 0x0ea: map_key_clear(KEY_VOLUMEDOWN); break; | 458 | case 0x0ea: map_key_clear(KEY_VOLUMEDOWN); break; |
439 | case 0x183: map_key_clear(KEY_CONFIG); break; | 459 | case 0x183: map_key_clear(KEY_CONFIG); break; |
460 | case 0x184: map_key_clear(KEY_WORDPROCESSOR); break; | ||
461 | case 0x185: map_key_clear(KEY_EDITOR); break; | ||
462 | case 0x186: map_key_clear(KEY_SPREADSHEET); break; | ||
463 | case 0x187: map_key_clear(KEY_GRAPHICSEDITOR); break; | ||
464 | case 0x188: map_key_clear(KEY_PRESENTATION); break; | ||
465 | case 0x189: map_key_clear(KEY_DATABASE); break; | ||
440 | case 0x18a: map_key_clear(KEY_MAIL); break; | 466 | case 0x18a: map_key_clear(KEY_MAIL); break; |
467 | case 0x18b: map_key_clear(KEY_NEWS); break; | ||
468 | case 0x18c: map_key_clear(KEY_VOICEMAIL); break; | ||
469 | case 0x18d: map_key_clear(KEY_ADDRESSBOOK); break; | ||
470 | case 0x18e: map_key_clear(KEY_CALENDAR); break; | ||
471 | case 0x191: map_key_clear(KEY_FINANCE); break; | ||
441 | case 0x192: map_key_clear(KEY_CALC); break; | 472 | case 0x192: map_key_clear(KEY_CALC); break; |
442 | case 0x194: map_key_clear(KEY_FILE); break; | 473 | case 0x194: map_key_clear(KEY_FILE); break; |
474 | case 0x196: map_key_clear(KEY_WWW); break; | ||
475 | case 0x19e: map_key_clear(KEY_COFFEE); break; | ||
476 | case 0x1a6: map_key_clear(KEY_HELP); break; | ||
443 | case 0x1a7: map_key_clear(KEY_DOCUMENTS); break; | 477 | case 0x1a7: map_key_clear(KEY_DOCUMENTS); break; |
478 | case 0x1bc: map_key_clear(KEY_MESSENGER); break; | ||
479 | case 0x1bd: map_key_clear(KEY_INFO); break; | ||
444 | case 0x201: map_key_clear(KEY_NEW); break; | 480 | case 0x201: map_key_clear(KEY_NEW); break; |
481 | case 0x202: map_key_clear(KEY_OPEN); break; | ||
482 | case 0x203: map_key_clear(KEY_CLOSE); break; | ||
483 | case 0x204: map_key_clear(KEY_EXIT); break; | ||
445 | case 0x207: map_key_clear(KEY_SAVE); break; | 484 | case 0x207: map_key_clear(KEY_SAVE); break; |
446 | case 0x208: map_key_clear(KEY_PRINT); break; | 485 | case 0x208: map_key_clear(KEY_PRINT); break; |
447 | case 0x209: map_key_clear(KEY_PROPS); break; | 486 | case 0x209: map_key_clear(KEY_PROPS); break; |
@@ -456,10 +495,15 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
456 | case 0x226: map_key_clear(KEY_STOP); break; | 495 | case 0x226: map_key_clear(KEY_STOP); break; |
457 | case 0x227: map_key_clear(KEY_REFRESH); break; | 496 | case 0x227: map_key_clear(KEY_REFRESH); break; |
458 | case 0x22a: map_key_clear(KEY_BOOKMARKS); break; | 497 | case 0x22a: map_key_clear(KEY_BOOKMARKS); break; |
498 | case 0x22d: map_key_clear(KEY_ZOOMIN); break; | ||
499 | case 0x22e: map_key_clear(KEY_ZOOMOUT); break; | ||
500 | case 0x22f: map_key_clear(KEY_ZOOMRESET); break; | ||
459 | case 0x233: map_key_clear(KEY_SCROLLUP); break; | 501 | case 0x233: map_key_clear(KEY_SCROLLUP); break; |
460 | case 0x234: map_key_clear(KEY_SCROLLDOWN); break; | 502 | case 0x234: map_key_clear(KEY_SCROLLDOWN); break; |
461 | case 0x238: map_rel(REL_HWHEEL); break; | 503 | case 0x238: map_rel(REL_HWHEEL); break; |
504 | case 0x25f: map_key_clear(KEY_CANCEL); break; | ||
462 | case 0x279: map_key_clear(KEY_REDO); break; | 505 | case 0x279: map_key_clear(KEY_REDO); break; |
506 | |||
463 | case 0x289: map_key_clear(KEY_REPLY); break; | 507 | case 0x289: map_key_clear(KEY_REPLY); break; |
464 | case 0x28b: map_key_clear(KEY_FORWARDMAIL); break; | 508 | case 0x28b: map_key_clear(KEY_FORWARDMAIL); break; |
465 | case 0x28c: map_key_clear(KEY_SEND); break; | 509 | case 0x28c: map_key_clear(KEY_SEND); break; |
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c index 0491ec7a7c0a..44bc6cc734ab 100644 --- a/drivers/infiniband/hw/mthca/mthca_main.c +++ b/drivers/infiniband/hw/mthca/mthca_main.c | |||
@@ -80,24 +80,61 @@ static int tune_pci = 0; | |||
80 | module_param(tune_pci, int, 0444); | 80 | module_param(tune_pci, int, 0444); |
81 | MODULE_PARM_DESC(tune_pci, "increase PCI burst from the default set by BIOS if nonzero"); | 81 | MODULE_PARM_DESC(tune_pci, "increase PCI burst from the default set by BIOS if nonzero"); |
82 | 82 | ||
83 | struct mutex mthca_device_mutex; | 83 | DEFINE_MUTEX(mthca_device_mutex); |
84 | |||
85 | #define MTHCA_DEFAULT_NUM_QP (1 << 16) | ||
86 | #define MTHCA_DEFAULT_RDB_PER_QP (1 << 2) | ||
87 | #define MTHCA_DEFAULT_NUM_CQ (1 << 16) | ||
88 | #define MTHCA_DEFAULT_NUM_MCG (1 << 13) | ||
89 | #define MTHCA_DEFAULT_NUM_MPT (1 << 17) | ||
90 | #define MTHCA_DEFAULT_NUM_MTT (1 << 20) | ||
91 | #define MTHCA_DEFAULT_NUM_UDAV (1 << 15) | ||
92 | #define MTHCA_DEFAULT_NUM_RESERVED_MTTS (1 << 18) | ||
93 | #define MTHCA_DEFAULT_NUM_UARC_SIZE (1 << 18) | ||
94 | |||
95 | static struct mthca_profile hca_profile = { | ||
96 | .num_qp = MTHCA_DEFAULT_NUM_QP, | ||
97 | .rdb_per_qp = MTHCA_DEFAULT_RDB_PER_QP, | ||
98 | .num_cq = MTHCA_DEFAULT_NUM_CQ, | ||
99 | .num_mcg = MTHCA_DEFAULT_NUM_MCG, | ||
100 | .num_mpt = MTHCA_DEFAULT_NUM_MPT, | ||
101 | .num_mtt = MTHCA_DEFAULT_NUM_MTT, | ||
102 | .num_udav = MTHCA_DEFAULT_NUM_UDAV, /* Tavor only */ | ||
103 | .fmr_reserved_mtts = MTHCA_DEFAULT_NUM_RESERVED_MTTS, /* Tavor only */ | ||
104 | .uarc_size = MTHCA_DEFAULT_NUM_UARC_SIZE, /* Arbel only */ | ||
105 | }; | ||
106 | |||
107 | module_param_named(num_qp, hca_profile.num_qp, int, 0444); | ||
108 | MODULE_PARM_DESC(num_qp, "maximum number of QPs per HCA"); | ||
109 | |||
110 | module_param_named(rdb_per_qp, hca_profile.rdb_per_qp, int, 0444); | ||
111 | MODULE_PARM_DESC(rdb_per_qp, "number of RDB buffers per QP"); | ||
112 | |||
113 | module_param_named(num_cq, hca_profile.num_cq, int, 0444); | ||
114 | MODULE_PARM_DESC(num_cq, "maximum number of CQs per HCA"); | ||
115 | |||
116 | module_param_named(num_mcg, hca_profile.num_mcg, int, 0444); | ||
117 | MODULE_PARM_DESC(num_mcg, "maximum number of multicast groups per HCA"); | ||
118 | |||
119 | module_param_named(num_mpt, hca_profile.num_mpt, int, 0444); | ||
120 | MODULE_PARM_DESC(num_mpt, | ||
121 | "maximum number of memory protection table entries per HCA"); | ||
122 | |||
123 | module_param_named(num_mtt, hca_profile.num_mtt, int, 0444); | ||
124 | MODULE_PARM_DESC(num_mtt, | ||
125 | "maximum number of memory translation table segments per HCA"); | ||
126 | |||
127 | module_param_named(num_udav, hca_profile.num_udav, int, 0444); | ||
128 | MODULE_PARM_DESC(num_udav, "maximum number of UD address vectors per HCA"); | ||
129 | |||
130 | module_param_named(fmr_reserved_mtts, hca_profile.fmr_reserved_mtts, int, 0444); | ||
131 | MODULE_PARM_DESC(fmr_reserved_mtts, | ||
132 | "number of memory translation table segments reserved for FMR"); | ||
84 | 133 | ||
85 | static const char mthca_version[] __devinitdata = | 134 | static const char mthca_version[] __devinitdata = |
86 | DRV_NAME ": Mellanox InfiniBand HCA driver v" | 135 | DRV_NAME ": Mellanox InfiniBand HCA driver v" |
87 | DRV_VERSION " (" DRV_RELDATE ")\n"; | 136 | DRV_VERSION " (" DRV_RELDATE ")\n"; |
88 | 137 | ||
89 | static struct mthca_profile default_profile = { | ||
90 | .num_qp = 1 << 16, | ||
91 | .rdb_per_qp = 4, | ||
92 | .num_cq = 1 << 16, | ||
93 | .num_mcg = 1 << 13, | ||
94 | .num_mpt = 1 << 17, | ||
95 | .num_mtt = 1 << 20, | ||
96 | .num_udav = 1 << 15, /* Tavor only */ | ||
97 | .fmr_reserved_mtts = 1 << 18, /* Tavor only */ | ||
98 | .uarc_size = 1 << 18, /* Arbel only */ | ||
99 | }; | ||
100 | |||
101 | static int mthca_tune_pci(struct mthca_dev *mdev) | 138 | static int mthca_tune_pci(struct mthca_dev *mdev) |
102 | { | 139 | { |
103 | int cap; | 140 | int cap; |
@@ -303,7 +340,7 @@ static int mthca_init_tavor(struct mthca_dev *mdev) | |||
303 | goto err_disable; | 340 | goto err_disable; |
304 | } | 341 | } |
305 | 342 | ||
306 | profile = default_profile; | 343 | profile = hca_profile; |
307 | profile.num_uar = dev_lim.uar_size / PAGE_SIZE; | 344 | profile.num_uar = dev_lim.uar_size / PAGE_SIZE; |
308 | profile.uarc_size = 0; | 345 | profile.uarc_size = 0; |
309 | if (mdev->mthca_flags & MTHCA_FLAG_SRQ) | 346 | if (mdev->mthca_flags & MTHCA_FLAG_SRQ) |
@@ -621,7 +658,7 @@ static int mthca_init_arbel(struct mthca_dev *mdev) | |||
621 | goto err_stop_fw; | 658 | goto err_stop_fw; |
622 | } | 659 | } |
623 | 660 | ||
624 | profile = default_profile; | 661 | profile = hca_profile; |
625 | profile.num_uar = dev_lim.uar_size / PAGE_SIZE; | 662 | profile.num_uar = dev_lim.uar_size / PAGE_SIZE; |
626 | profile.num_udav = 0; | 663 | profile.num_udav = 0; |
627 | if (mdev->mthca_flags & MTHCA_FLAG_SRQ) | 664 | if (mdev->mthca_flags & MTHCA_FLAG_SRQ) |
@@ -1278,11 +1315,55 @@ static struct pci_driver mthca_driver = { | |||
1278 | .remove = __devexit_p(mthca_remove_one) | 1315 | .remove = __devexit_p(mthca_remove_one) |
1279 | }; | 1316 | }; |
1280 | 1317 | ||
1318 | static void __init __mthca_check_profile_val(const char *name, int *pval, | ||
1319 | int pval_default) | ||
1320 | { | ||
1321 | /* value must be positive and power of 2 */ | ||
1322 | int old_pval = *pval; | ||
1323 | |||
1324 | if (old_pval <= 0) | ||
1325 | *pval = pval_default; | ||
1326 | else | ||
1327 | *pval = roundup_pow_of_two(old_pval); | ||
1328 | |||
1329 | if (old_pval != *pval) { | ||
1330 | printk(KERN_WARNING PFX "Invalid value %d for %s in module parameter.\n", | ||
1331 | old_pval, name); | ||
1332 | printk(KERN_WARNING PFX "Corrected %s to %d.\n", name, *pval); | ||
1333 | } | ||
1334 | } | ||
1335 | |||
1336 | #define mthca_check_profile_val(name, default) \ | ||
1337 | __mthca_check_profile_val(#name, &hca_profile.name, default) | ||
1338 | |||
1339 | static void __init mthca_validate_profile(void) | ||
1340 | { | ||
1341 | mthca_check_profile_val(num_qp, MTHCA_DEFAULT_NUM_QP); | ||
1342 | mthca_check_profile_val(rdb_per_qp, MTHCA_DEFAULT_RDB_PER_QP); | ||
1343 | mthca_check_profile_val(num_cq, MTHCA_DEFAULT_NUM_CQ); | ||
1344 | mthca_check_profile_val(num_mcg, MTHCA_DEFAULT_NUM_MCG); | ||
1345 | mthca_check_profile_val(num_mpt, MTHCA_DEFAULT_NUM_MPT); | ||
1346 | mthca_check_profile_val(num_mtt, MTHCA_DEFAULT_NUM_MTT); | ||
1347 | mthca_check_profile_val(num_udav, MTHCA_DEFAULT_NUM_UDAV); | ||
1348 | mthca_check_profile_val(fmr_reserved_mtts, MTHCA_DEFAULT_NUM_RESERVED_MTTS); | ||
1349 | |||
1350 | if (hca_profile.fmr_reserved_mtts >= hca_profile.num_mtt) { | ||
1351 | printk(KERN_WARNING PFX "Invalid fmr_reserved_mtts module parameter %d.\n", | ||
1352 | hca_profile.fmr_reserved_mtts); | ||
1353 | printk(KERN_WARNING PFX "(Must be smaller than num_mtt %d)\n", | ||
1354 | hca_profile.num_mtt); | ||
1355 | hca_profile.fmr_reserved_mtts = hca_profile.num_mtt / 2; | ||
1356 | printk(KERN_WARNING PFX "Corrected fmr_reserved_mtts to %d.\n", | ||
1357 | hca_profile.fmr_reserved_mtts); | ||
1358 | } | ||
1359 | } | ||
1360 | |||
1281 | static int __init mthca_init(void) | 1361 | static int __init mthca_init(void) |
1282 | { | 1362 | { |
1283 | int ret; | 1363 | int ret; |
1284 | 1364 | ||
1285 | mutex_init(&mthca_device_mutex); | 1365 | mthca_validate_profile(); |
1366 | |||
1286 | ret = mthca_catas_init(); | 1367 | ret = mthca_catas_init(); |
1287 | if (ret) | 1368 | if (ret) |
1288 | return ret; | 1369 | return ret; |
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index e9b6a6f07dd7..cdecbf5911c8 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c | |||
@@ -1898,7 +1898,7 @@ static void srp_add_one(struct ib_device *device) | |||
1898 | */ | 1898 | */ |
1899 | srp_dev->fmr_page_shift = max(9, ffs(dev_attr->page_size_cap) - 1); | 1899 | srp_dev->fmr_page_shift = max(9, ffs(dev_attr->page_size_cap) - 1); |
1900 | srp_dev->fmr_page_size = 1 << srp_dev->fmr_page_shift; | 1900 | srp_dev->fmr_page_size = 1 << srp_dev->fmr_page_shift; |
1901 | srp_dev->fmr_page_mask = ~((unsigned long) srp_dev->fmr_page_size - 1); | 1901 | srp_dev->fmr_page_mask = ~((u64) srp_dev->fmr_page_size - 1); |
1902 | 1902 | ||
1903 | INIT_LIST_HEAD(&srp_dev->dev_list); | 1903 | INIT_LIST_HEAD(&srp_dev->dev_list); |
1904 | 1904 | ||
diff --git a/drivers/infiniband/ulp/srp/ib_srp.h b/drivers/infiniband/ulp/srp/ib_srp.h index 868a540ef7cd..c21772317b86 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.h +++ b/drivers/infiniband/ulp/srp/ib_srp.h | |||
@@ -87,7 +87,7 @@ struct srp_device { | |||
87 | struct ib_fmr_pool *fmr_pool; | 87 | struct ib_fmr_pool *fmr_pool; |
88 | int fmr_page_shift; | 88 | int fmr_page_shift; |
89 | int fmr_page_size; | 89 | int fmr_page_size; |
90 | unsigned long fmr_page_mask; | 90 | u64 fmr_page_mask; |
91 | }; | 91 | }; |
92 | 92 | ||
93 | struct srp_host { | 93 | struct srp_host { |
diff --git a/drivers/input/keyboard/amikbd.c b/drivers/input/keyboard/amikbd.c index 16583d71753b..c67e84ec2d6a 100644 --- a/drivers/input/keyboard/amikbd.c +++ b/drivers/input/keyboard/amikbd.c | |||
@@ -187,7 +187,7 @@ static irqreturn_t amikbd_interrupt(int irq, void *dummy) | |||
187 | 187 | ||
188 | static int __init amikbd_init(void) | 188 | static int __init amikbd_init(void) |
189 | { | 189 | { |
190 | int i, j; | 190 | int i, j, err; |
191 | 191 | ||
192 | if (!AMIGAHW_PRESENT(AMI_KEYBOARD)) | 192 | if (!AMIGAHW_PRESENT(AMI_KEYBOARD)) |
193 | return -ENODEV; | 193 | return -ENODEV; |
diff --git a/drivers/input/keyboard/sunkbd.c b/drivers/input/keyboard/sunkbd.c index 3826db9403e6..cc0238366414 100644 --- a/drivers/input/keyboard/sunkbd.c +++ b/drivers/input/keyboard/sunkbd.c | |||
@@ -225,7 +225,7 @@ static void sunkbd_reinit(struct work_struct *work) | |||
225 | static void sunkbd_enable(struct sunkbd *sunkbd, int enable) | 225 | static void sunkbd_enable(struct sunkbd *sunkbd, int enable) |
226 | { | 226 | { |
227 | serio_pause_rx(sunkbd->serio); | 227 | serio_pause_rx(sunkbd->serio); |
228 | sunkbd->enabled = 1; | 228 | sunkbd->enabled = enable; |
229 | serio_continue_rx(sunkbd->serio); | 229 | serio_continue_rx(sunkbd->serio); |
230 | } | 230 | } |
231 | 231 | ||
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 7d824cf8ee2d..ada5e9b9988c 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -57,8 +57,8 @@ | |||
57 | 57 | ||
58 | #define DRV_MODULE_NAME "bnx2" | 58 | #define DRV_MODULE_NAME "bnx2" |
59 | #define PFX DRV_MODULE_NAME ": " | 59 | #define PFX DRV_MODULE_NAME ": " |
60 | #define DRV_MODULE_VERSION "1.5.1" | 60 | #define DRV_MODULE_VERSION "1.5.2" |
61 | #define DRV_MODULE_RELDATE "November 15, 2006" | 61 | #define DRV_MODULE_RELDATE "December 13, 2006" |
62 | 62 | ||
63 | #define RUN_AT(x) (jiffies + (x)) | 63 | #define RUN_AT(x) (jiffies + (x)) |
64 | 64 | ||
@@ -217,9 +217,16 @@ static inline u32 bnx2_tx_avail(struct bnx2 *bp) | |||
217 | u32 diff; | 217 | u32 diff; |
218 | 218 | ||
219 | smp_mb(); | 219 | smp_mb(); |
220 | diff = TX_RING_IDX(bp->tx_prod) - TX_RING_IDX(bp->tx_cons); | 220 | |
221 | if (diff > MAX_TX_DESC_CNT) | 221 | /* The ring uses 256 indices for 255 entries, one of them |
222 | diff = (diff & MAX_TX_DESC_CNT) - 1; | 222 | * needs to be skipped. |
223 | */ | ||
224 | diff = bp->tx_prod - bp->tx_cons; | ||
225 | if (unlikely(diff >= TX_DESC_CNT)) { | ||
226 | diff &= 0xffff; | ||
227 | if (diff == TX_DESC_CNT) | ||
228 | diff = MAX_TX_DESC_CNT; | ||
229 | } | ||
223 | return (bp->tx_ring_size - diff); | 230 | return (bp->tx_ring_size - diff); |
224 | } | 231 | } |
225 | 232 | ||
@@ -3089,7 +3096,7 @@ bnx2_nvram_write(struct bnx2 *bp, u32 offset, u8 *data_buf, | |||
3089 | 3096 | ||
3090 | if ((align_start = (offset32 & 3))) { | 3097 | if ((align_start = (offset32 & 3))) { |
3091 | offset32 &= ~3; | 3098 | offset32 &= ~3; |
3092 | len32 += align_start; | 3099 | len32 += (4 - align_start); |
3093 | if ((rc = bnx2_nvram_read(bp, offset32, start, 4))) | 3100 | if ((rc = bnx2_nvram_read(bp, offset32, start, 4))) |
3094 | return rc; | 3101 | return rc; |
3095 | } | 3102 | } |
@@ -3107,7 +3114,7 @@ bnx2_nvram_write(struct bnx2 *bp, u32 offset, u8 *data_buf, | |||
3107 | 3114 | ||
3108 | if (align_start || align_end) { | 3115 | if (align_start || align_end) { |
3109 | buf = kmalloc(len32, GFP_KERNEL); | 3116 | buf = kmalloc(len32, GFP_KERNEL); |
3110 | if (buf == 0) | 3117 | if (buf == NULL) |
3111 | return -ENOMEM; | 3118 | return -ENOMEM; |
3112 | if (align_start) { | 3119 | if (align_start) { |
3113 | memcpy(buf, start, 4); | 3120 | memcpy(buf, start, 4); |
@@ -3998,7 +4005,7 @@ bnx2_run_loopback(struct bnx2 *bp, int loopback_mode) | |||
3998 | if (!skb) | 4005 | if (!skb) |
3999 | return -ENOMEM; | 4006 | return -ENOMEM; |
4000 | packet = skb_put(skb, pkt_size); | 4007 | packet = skb_put(skb, pkt_size); |
4001 | memcpy(packet, bp->mac_addr, 6); | 4008 | memcpy(packet, bp->dev->dev_addr, 6); |
4002 | memset(packet + 6, 0x0, 8); | 4009 | memset(packet + 6, 0x0, 8); |
4003 | for (i = 14; i < pkt_size; i++) | 4010 | for (i = 14; i < pkt_size; i++) |
4004 | packet[i] = (unsigned char) (i & 0xff); | 4011 | packet[i] = (unsigned char) (i & 0xff); |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 571320ae87ab..4056ba1ff3c7 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -68,8 +68,8 @@ | |||
68 | 68 | ||
69 | #define DRV_MODULE_NAME "tg3" | 69 | #define DRV_MODULE_NAME "tg3" |
70 | #define PFX DRV_MODULE_NAME ": " | 70 | #define PFX DRV_MODULE_NAME ": " |
71 | #define DRV_MODULE_VERSION "3.70" | 71 | #define DRV_MODULE_VERSION "3.71" |
72 | #define DRV_MODULE_RELDATE "December 1, 2006" | 72 | #define DRV_MODULE_RELDATE "December 15, 2006" |
73 | 73 | ||
74 | #define TG3_DEF_MAC_MODE 0 | 74 | #define TG3_DEF_MAC_MODE 0 |
75 | #define TG3_DEF_RX_MODE 0 | 75 | #define TG3_DEF_RX_MODE 0 |
@@ -959,6 +959,13 @@ static int tg3_phy_reset(struct tg3 *tp) | |||
959 | u32 phy_status; | 959 | u32 phy_status; |
960 | int err; | 960 | int err; |
961 | 961 | ||
962 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) { | ||
963 | u32 val; | ||
964 | |||
965 | val = tr32(GRC_MISC_CFG); | ||
966 | tw32_f(GRC_MISC_CFG, val & ~GRC_MISC_CFG_EPHY_IDDQ); | ||
967 | udelay(40); | ||
968 | } | ||
962 | err = tg3_readphy(tp, MII_BMSR, &phy_status); | 969 | err = tg3_readphy(tp, MII_BMSR, &phy_status); |
963 | err |= tg3_readphy(tp, MII_BMSR, &phy_status); | 970 | err |= tg3_readphy(tp, MII_BMSR, &phy_status); |
964 | if (err != 0) | 971 | if (err != 0) |
@@ -1170,7 +1177,15 @@ static void tg3_power_down_phy(struct tg3 *tp) | |||
1170 | if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) | 1177 | if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) |
1171 | return; | 1178 | return; |
1172 | 1179 | ||
1173 | if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5906) { | 1180 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) { |
1181 | u32 val; | ||
1182 | |||
1183 | tg3_bmcr_reset(tp); | ||
1184 | val = tr32(GRC_MISC_CFG); | ||
1185 | tw32_f(GRC_MISC_CFG, val | GRC_MISC_CFG_EPHY_IDDQ); | ||
1186 | udelay(40); | ||
1187 | return; | ||
1188 | } else { | ||
1174 | tg3_writephy(tp, MII_TG3_EXT_CTRL, | 1189 | tg3_writephy(tp, MII_TG3_EXT_CTRL, |
1175 | MII_TG3_EXT_CTRL_FORCE_LED_OFF); | 1190 | MII_TG3_EXT_CTRL_FORCE_LED_OFF); |
1176 | tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x01b2); | 1191 | tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x01b2); |
@@ -4426,7 +4441,7 @@ static void tg3_free_consistent(struct tg3 *tp) | |||
4426 | */ | 4441 | */ |
4427 | static int tg3_alloc_consistent(struct tg3 *tp) | 4442 | static int tg3_alloc_consistent(struct tg3 *tp) |
4428 | { | 4443 | { |
4429 | tp->rx_std_buffers = kmalloc((sizeof(struct ring_info) * | 4444 | tp->rx_std_buffers = kzalloc((sizeof(struct ring_info) * |
4430 | (TG3_RX_RING_SIZE + | 4445 | (TG3_RX_RING_SIZE + |
4431 | TG3_RX_JUMBO_RING_SIZE)) + | 4446 | TG3_RX_JUMBO_RING_SIZE)) + |
4432 | (sizeof(struct tx_ring_info) * | 4447 | (sizeof(struct tx_ring_info) * |
@@ -4435,13 +4450,6 @@ static int tg3_alloc_consistent(struct tg3 *tp) | |||
4435 | if (!tp->rx_std_buffers) | 4450 | if (!tp->rx_std_buffers) |
4436 | return -ENOMEM; | 4451 | return -ENOMEM; |
4437 | 4452 | ||
4438 | memset(tp->rx_std_buffers, 0, | ||
4439 | (sizeof(struct ring_info) * | ||
4440 | (TG3_RX_RING_SIZE + | ||
4441 | TG3_RX_JUMBO_RING_SIZE)) + | ||
4442 | (sizeof(struct tx_ring_info) * | ||
4443 | TG3_TX_RING_SIZE)); | ||
4444 | |||
4445 | tp->rx_jumbo_buffers = &tp->rx_std_buffers[TG3_RX_RING_SIZE]; | 4453 | tp->rx_jumbo_buffers = &tp->rx_std_buffers[TG3_RX_RING_SIZE]; |
4446 | tp->tx_buffers = (struct tx_ring_info *) | 4454 | tp->tx_buffers = (struct tx_ring_info *) |
4447 | &tp->rx_jumbo_buffers[TG3_RX_JUMBO_RING_SIZE]; | 4455 | &tp->rx_jumbo_buffers[TG3_RX_JUMBO_RING_SIZE]; |
@@ -6988,6 +6996,8 @@ static int tg3_open(struct net_device *dev) | |||
6988 | struct tg3 *tp = netdev_priv(dev); | 6996 | struct tg3 *tp = netdev_priv(dev); |
6989 | int err; | 6997 | int err; |
6990 | 6998 | ||
6999 | netif_carrier_off(tp->dev); | ||
7000 | |||
6991 | tg3_full_lock(tp, 0); | 7001 | tg3_full_lock(tp, 0); |
6992 | 7002 | ||
6993 | err = tg3_set_power_state(tp, PCI_D0); | 7003 | err = tg3_set_power_state(tp, PCI_D0); |
@@ -7981,6 +7991,10 @@ static int tg3_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
7981 | tp->link_config.duplex = cmd->duplex; | 7991 | tp->link_config.duplex = cmd->duplex; |
7982 | } | 7992 | } |
7983 | 7993 | ||
7994 | tp->link_config.orig_speed = tp->link_config.speed; | ||
7995 | tp->link_config.orig_duplex = tp->link_config.duplex; | ||
7996 | tp->link_config.orig_autoneg = tp->link_config.autoneg; | ||
7997 | |||
7984 | if (netif_running(dev)) | 7998 | if (netif_running(dev)) |
7985 | tg3_setup_phy(tp, 1); | 7999 | tg3_setup_phy(tp, 1); |
7986 | 8000 | ||
@@ -11923,6 +11937,8 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
11923 | */ | 11937 | */ |
11924 | pci_save_state(tp->pdev); | 11938 | pci_save_state(tp->pdev); |
11925 | 11939 | ||
11940 | pci_set_drvdata(pdev, dev); | ||
11941 | |||
11926 | err = register_netdev(dev); | 11942 | err = register_netdev(dev); |
11927 | if (err) { | 11943 | if (err) { |
11928 | printk(KERN_ERR PFX "Cannot register net device, " | 11944 | printk(KERN_ERR PFX "Cannot register net device, " |
@@ -11930,8 +11946,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
11930 | goto err_out_iounmap; | 11946 | goto err_out_iounmap; |
11931 | } | 11947 | } |
11932 | 11948 | ||
11933 | pci_set_drvdata(pdev, dev); | ||
11934 | |||
11935 | printk(KERN_INFO "%s: Tigon3 [partno(%s) rev %04x PHY(%s)] (%s) %s Ethernet ", | 11949 | printk(KERN_INFO "%s: Tigon3 [partno(%s) rev %04x PHY(%s)] (%s) %s Ethernet ", |
11936 | dev->name, | 11950 | dev->name, |
11937 | tp->board_part_number, | 11951 | tp->board_part_number, |
@@ -11962,8 +11976,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
11962 | (pdev->dma_mask == DMA_32BIT_MASK) ? 32 : | 11976 | (pdev->dma_mask == DMA_32BIT_MASK) ? 32 : |
11963 | (((u64) pdev->dma_mask == DMA_40BIT_MASK) ? 40 : 64)); | 11977 | (((u64) pdev->dma_mask == DMA_40BIT_MASK) ? 40 : 64)); |
11964 | 11978 | ||
11965 | netif_carrier_off(tp->dev); | ||
11966 | |||
11967 | return 0; | 11979 | return 0; |
11968 | 11980 | ||
11969 | err_out_iounmap: | 11981 | err_out_iounmap: |
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index dfaf4ed127bd..cf78a7e5997b 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -1350,6 +1350,7 @@ | |||
1350 | #define GRC_MISC_CFG_BOARD_ID_5788 0x00010000 | 1350 | #define GRC_MISC_CFG_BOARD_ID_5788 0x00010000 |
1351 | #define GRC_MISC_CFG_BOARD_ID_5788M 0x00018000 | 1351 | #define GRC_MISC_CFG_BOARD_ID_5788M 0x00018000 |
1352 | #define GRC_MISC_CFG_BOARD_ID_AC91002A1 0x00018000 | 1352 | #define GRC_MISC_CFG_BOARD_ID_AC91002A1 0x00018000 |
1353 | #define GRC_MISC_CFG_EPHY_IDDQ 0x00200000 | ||
1353 | #define GRC_MISC_CFG_KEEP_GPHY_POWER 0x04000000 | 1354 | #define GRC_MISC_CFG_KEEP_GPHY_POWER 0x04000000 |
1354 | #define GRC_LOCAL_CTRL 0x00006808 | 1355 | #define GRC_LOCAL_CTRL 0x00006808 |
1355 | #define GRC_LCLCTRL_INT_ACTIVE 0x00000001 | 1356 | #define GRC_LCLCTRL_INT_ACTIVE 0x00000001 |
diff --git a/drivers/s390/char/sclp_cpi.c b/drivers/s390/char/sclp_cpi.c index f7c10d954ec6..4f873ae148b7 100644 --- a/drivers/s390/char/sclp_cpi.c +++ b/drivers/s390/char/sclp_cpi.c | |||
@@ -49,6 +49,8 @@ static struct sclp_register sclp_cpi_event = | |||
49 | .send_mask = EvTyp_CtlProgIdent_Mask | 49 | .send_mask = EvTyp_CtlProgIdent_Mask |
50 | }; | 50 | }; |
51 | 51 | ||
52 | MODULE_LICENSE("GPL"); | ||
53 | |||
52 | MODULE_AUTHOR( | 54 | MODULE_AUTHOR( |
53 | "Martin Peschke, IBM Deutschland Entwicklung GmbH " | 55 | "Martin Peschke, IBM Deutschland Entwicklung GmbH " |
54 | "<mpeschke@de.ibm.com>"); | 56 | "<mpeschke@de.ibm.com>"); |
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index 7835a714a405..3a403f195cf8 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c | |||
@@ -871,11 +871,32 @@ __clear_subchannel_easy(struct subchannel_id schid) | |||
871 | return -EBUSY; | 871 | return -EBUSY; |
872 | } | 872 | } |
873 | 873 | ||
874 | static int pgm_check_occured; | ||
875 | |||
876 | static void cio_reset_pgm_check_handler(void) | ||
877 | { | ||
878 | pgm_check_occured = 1; | ||
879 | } | ||
880 | |||
881 | static int stsch_reset(struct subchannel_id schid, volatile struct schib *addr) | ||
882 | { | ||
883 | int rc; | ||
884 | |||
885 | pgm_check_occured = 0; | ||
886 | s390_reset_pgm_handler = cio_reset_pgm_check_handler; | ||
887 | rc = stsch(schid, addr); | ||
888 | s390_reset_pgm_handler = NULL; | ||
889 | if (pgm_check_occured) | ||
890 | return -EIO; | ||
891 | else | ||
892 | return rc; | ||
893 | } | ||
894 | |||
874 | static int __shutdown_subchannel_easy(struct subchannel_id schid, void *data) | 895 | static int __shutdown_subchannel_easy(struct subchannel_id schid, void *data) |
875 | { | 896 | { |
876 | struct schib schib; | 897 | struct schib schib; |
877 | 898 | ||
878 | if (stsch_err(schid, &schib)) | 899 | if (stsch_reset(schid, &schib)) |
879 | return -ENXIO; | 900 | return -ENXIO; |
880 | if (!schib.pmcw.ena) | 901 | if (!schib.pmcw.ena) |
881 | return 0; | 902 | return 0; |
@@ -972,7 +993,7 @@ static int __reipl_subchannel_match(struct subchannel_id schid, void *data) | |||
972 | struct schib schib; | 993 | struct schib schib; |
973 | struct sch_match_id *match_id = data; | 994 | struct sch_match_id *match_id = data; |
974 | 995 | ||
975 | if (stsch_err(schid, &schib)) | 996 | if (stsch_reset(schid, &schib)) |
976 | return -ENXIO; | 997 | return -ENXIO; |
977 | if (schib.pmcw.dnv && | 998 | if (schib.pmcw.dnv && |
978 | (schib.pmcw.dev == match_id->devid.devno) && | 999 | (schib.pmcw.dev == match_id->devid.devno) && |
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 4c81d890791e..9d6c02446863 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c | |||
@@ -139,6 +139,8 @@ css_register_subchannel(struct subchannel *sch) | |||
139 | sch->dev.release = &css_subchannel_release; | 139 | sch->dev.release = &css_subchannel_release; |
140 | sch->dev.groups = subch_attr_groups; | 140 | sch->dev.groups = subch_attr_groups; |
141 | 141 | ||
142 | css_get_ssd_info(sch); | ||
143 | |||
142 | /* make it known to the system */ | 144 | /* make it known to the system */ |
143 | ret = css_sch_device_register(sch); | 145 | ret = css_sch_device_register(sch); |
144 | if (ret) { | 146 | if (ret) { |
@@ -146,7 +148,6 @@ css_register_subchannel(struct subchannel *sch) | |||
146 | __func__, sch->dev.bus_id); | 148 | __func__, sch->dev.bus_id); |
147 | return ret; | 149 | return ret; |
148 | } | 150 | } |
149 | css_get_ssd_info(sch); | ||
150 | return ret; | 151 | return ret; |
151 | } | 152 | } |
152 | 153 | ||
diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c index 9d4ea449a608..6fd1940842eb 100644 --- a/drivers/s390/cio/qdio.c +++ b/drivers/s390/cio/qdio.c | |||
@@ -979,12 +979,11 @@ __qdio_outbound_processing(struct qdio_q *q) | |||
979 | 979 | ||
980 | if (q->is_iqdio_q) { | 980 | if (q->is_iqdio_q) { |
981 | /* | 981 | /* |
982 | * for asynchronous queues, we better check, if the fill | 982 | * for asynchronous queues, we better check, if the sent |
983 | * level is too high. for synchronous queues, the fill | 983 | * buffer is already switched from PRIMED to EMPTY. |
984 | * level will never be that high. | ||
985 | */ | 984 | */ |
986 | if (atomic_read(&q->number_of_buffers_used)> | 985 | if ((q->queue_type == QDIO_IQDIO_QFMT_ASYNCH) && |
987 | IQDIO_FILL_LEVEL_TO_POLL) | 986 | !qdio_is_outbound_q_done(q)) |
988 | qdio_mark_q(q); | 987 | qdio_mark_q(q); |
989 | 988 | ||
990 | } else if (!q->hydra_gives_outbound_pcis) | 989 | } else if (!q->hydra_gives_outbound_pcis) |
@@ -1825,6 +1824,10 @@ qdio_fill_qs(struct qdio_irq *irq_ptr, struct ccw_device *cdev, | |||
1825 | q->sbal[j]=*(outbound_sbals_array++); | 1824 | q->sbal[j]=*(outbound_sbals_array++); |
1826 | 1825 | ||
1827 | q->queue_type=q_format; | 1826 | q->queue_type=q_format; |
1827 | if ((q->queue_type == QDIO_IQDIO_QFMT) && | ||
1828 | (no_output_qs > 1) && | ||
1829 | (i == no_output_qs-1)) | ||
1830 | q->queue_type = QDIO_IQDIO_QFMT_ASYNCH; | ||
1828 | q->int_parm=int_parm; | 1831 | q->int_parm=int_parm; |
1829 | q->is_input_q=0; | 1832 | q->is_input_q=0; |
1830 | q->schid = irq_ptr->schid; | 1833 | q->schid = irq_ptr->schid; |
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index ad60afe5dd11..81b5899f4010 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c | |||
@@ -1129,7 +1129,15 @@ static void ap_poll_thread_stop(void) | |||
1129 | mutex_unlock(&ap_poll_thread_mutex); | 1129 | mutex_unlock(&ap_poll_thread_mutex); |
1130 | } | 1130 | } |
1131 | 1131 | ||
1132 | static void ap_reset(void) | 1132 | static void ap_reset_domain(void) |
1133 | { | ||
1134 | int i; | ||
1135 | |||
1136 | for (i = 0; i < AP_DEVICES; i++) | ||
1137 | ap_reset_queue(AP_MKQID(i, ap_domain_index)); | ||
1138 | } | ||
1139 | |||
1140 | static void ap_reset_all(void) | ||
1133 | { | 1141 | { |
1134 | int i, j; | 1142 | int i, j; |
1135 | 1143 | ||
@@ -1139,7 +1147,7 @@ static void ap_reset(void) | |||
1139 | } | 1147 | } |
1140 | 1148 | ||
1141 | static struct reset_call ap_reset_call = { | 1149 | static struct reset_call ap_reset_call = { |
1142 | .fn = ap_reset, | 1150 | .fn = ap_reset_all, |
1143 | }; | 1151 | }; |
1144 | 1152 | ||
1145 | /** | 1153 | /** |
@@ -1229,10 +1237,12 @@ void ap_module_exit(void) | |||
1229 | int i; | 1237 | int i; |
1230 | struct device *dev; | 1238 | struct device *dev; |
1231 | 1239 | ||
1240 | ap_reset_domain(); | ||
1232 | ap_poll_thread_stop(); | 1241 | ap_poll_thread_stop(); |
1233 | del_timer_sync(&ap_config_timer); | 1242 | del_timer_sync(&ap_config_timer); |
1234 | del_timer_sync(&ap_poll_timer); | 1243 | del_timer_sync(&ap_poll_timer); |
1235 | destroy_workqueue(ap_work_queue); | 1244 | destroy_workqueue(ap_work_queue); |
1245 | tasklet_kill(&ap_tasklet); | ||
1236 | s390_root_dev_unregister(ap_root_device); | 1246 | s390_root_dev_unregister(ap_root_device); |
1237 | while ((dev = bus_find_device(&ap_bus_type, NULL, NULL, | 1247 | while ((dev = bus_find_device(&ap_bus_type, NULL, NULL, |
1238 | __ap_match_all))) | 1248 | __ap_match_all))) |
diff --git a/drivers/scsi/sun3_NCR5380.c b/drivers/scsi/sun3_NCR5380.c index 43f5b6aa7dc4..98e3fe10c1dc 100644 --- a/drivers/scsi/sun3_NCR5380.c +++ b/drivers/scsi/sun3_NCR5380.c | |||
@@ -266,7 +266,7 @@ static struct scsi_host_template *the_template = NULL; | |||
266 | (struct NCR5380_hostdata *)(in)->hostdata | 266 | (struct NCR5380_hostdata *)(in)->hostdata |
267 | #define HOSTDATA(in) ((struct NCR5380_hostdata *)(in)->hostdata) | 267 | #define HOSTDATA(in) ((struct NCR5380_hostdata *)(in)->hostdata) |
268 | 268 | ||
269 | #define NEXT(cmd) ((struct scsi_cmnd *)((cmd)->host_scribble)) | 269 | #define NEXT(cmd) (*(struct scsi_cmnd **)&((cmd)->host_scribble)) |
270 | #define NEXTADDR(cmd) ((struct scsi_cmnd **)&((cmd)->host_scribble)) | 270 | #define NEXTADDR(cmd) ((struct scsi_cmnd **)&((cmd)->host_scribble)) |
271 | 271 | ||
272 | #define HOSTNO instance->host_no | 272 | #define HOSTNO instance->host_no |
@@ -650,7 +650,7 @@ __inline__ void NCR5380_print_phase(struct Scsi_Host *instance) { }; | |||
650 | #include <linux/interrupt.h> | 650 | #include <linux/interrupt.h> |
651 | 651 | ||
652 | static volatile int main_running = 0; | 652 | static volatile int main_running = 0; |
653 | static DECLARE_WORK(NCR5380_tqueue, (void (*)(void*))NCR5380_main, NULL); | 653 | static DECLARE_WORK(NCR5380_tqueue, NCR5380_main); |
654 | 654 | ||
655 | static __inline__ void queue_main(void) | 655 | static __inline__ void queue_main(void) |
656 | { | 656 | { |
@@ -1031,7 +1031,7 @@ static int NCR5380_queue_command(struct scsi_cmnd *cmd, | |||
1031 | * reenable them. This prevents reentrancy and kernel stack overflow. | 1031 | * reenable them. This prevents reentrancy and kernel stack overflow. |
1032 | */ | 1032 | */ |
1033 | 1033 | ||
1034 | static void NCR5380_main (void *bl) | 1034 | static void NCR5380_main (struct work_struct *bl) |
1035 | { | 1035 | { |
1036 | struct scsi_cmnd *tmp, *prev; | 1036 | struct scsi_cmnd *tmp, *prev; |
1037 | struct Scsi_Host *instance = first_instance; | 1037 | struct Scsi_Host *instance = first_instance; |
diff --git a/drivers/usb/input/Kconfig b/drivers/usb/input/Kconfig index 8a62d4785755..e308f6dc2b87 100644 --- a/drivers/usb/input/Kconfig +++ b/drivers/usb/input/Kconfig | |||
@@ -7,7 +7,8 @@ comment "USB Input Devices" | |||
7 | config USB_HID | 7 | config USB_HID |
8 | tristate "USB Human Interface Device (full HID) support" | 8 | tristate "USB Human Interface Device (full HID) support" |
9 | default y | 9 | default y |
10 | depends on USB && HID | 10 | depends on USB |
11 | select HID | ||
11 | ---help--- | 12 | ---help--- |
12 | Say Y here if you want full HID support to connect USB keyboards, | 13 | Say Y here if you want full HID support to connect USB keyboards, |
13 | mice, joysticks, graphic tablets, or any other HID based devices | 14 | mice, joysticks, graphic tablets, or any other HID based devices |