diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-21 21:33:27 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-21 21:33:27 -0400 |
commit | e78a57de94480226f7fc90d0b4837bfc6c99a9e0 (patch) | |
tree | bfe0a664f88b6cb9d284869d615ae2d7fdb7cf63 /drivers | |
parent | 77501f3cb648e18733509a951ed31eddd7ef2c0b (diff) | |
parent | 452503f993feffe96e8cc9fbff4888b96e2c5e40 (diff) |
Merge branch 'upstream'
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/glue.c | 8 | ||||
-rw-r--r-- | drivers/char/.gitignore | 3 | ||||
-rw-r--r-- | drivers/char/drm/mga_dma.c | 22 | ||||
-rw-r--r-- | drivers/ieee1394/ohci1394.c | 6 | ||||
-rw-r--r-- | drivers/ieee1394/raw1394.c | 100 | ||||
-rw-r--r-- | drivers/md/md.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco.c | 5 | ||||
-rw-r--r-- | drivers/pci/.gitignore | 4 | ||||
-rw-r--r-- | drivers/scsi/ahci.c | 8 | ||||
-rw-r--r-- | drivers/scsi/libata-core.c | 180 | ||||
-rw-r--r-- | drivers/scsi/sata_mv.c | 5 | ||||
-rw-r--r-- | drivers/scsi/sata_nv.c | 4 | ||||
-rw-r--r-- | drivers/scsi/sata_promise.c | 8 | ||||
-rw-r--r-- | drivers/scsi/sata_qstor.c | 6 | ||||
-rw-r--r-- | drivers/scsi/sata_sil.c | 4 | ||||
-rw-r--r-- | drivers/scsi/sata_sx4.c | 19 | ||||
-rw-r--r-- | drivers/scsi/sata_vsc.c | 10 | ||||
-rw-r--r-- | drivers/scsi/scsi_error.c | 2 | ||||
-rw-r--r-- | drivers/serial/8250_pnp.c | 2 | ||||
-rw-r--r-- | drivers/video/logo/.gitignore | 7 | ||||
-rw-r--r-- | drivers/video/vesafb.c | 6 |
21 files changed, 316 insertions, 97 deletions
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index e36c5da2b31a..3937adf4e5e5 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c | |||
@@ -96,7 +96,7 @@ struct acpi_find_pci_root { | |||
96 | static acpi_status | 96 | static acpi_status |
97 | do_root_bridge_busnr_callback(struct acpi_resource *resource, void *data) | 97 | do_root_bridge_busnr_callback(struct acpi_resource *resource, void *data) |
98 | { | 98 | { |
99 | int *busnr = (int *)data; | 99 | unsigned long *busnr = (unsigned long *)data; |
100 | struct acpi_resource_address64 address; | 100 | struct acpi_resource_address64 address; |
101 | 101 | ||
102 | if (resource->id != ACPI_RSTYPE_ADDRESS16 && | 102 | if (resource->id != ACPI_RSTYPE_ADDRESS16 && |
@@ -115,13 +115,13 @@ do_root_bridge_busnr_callback(struct acpi_resource *resource, void *data) | |||
115 | static int get_root_bridge_busnr(acpi_handle handle) | 115 | static int get_root_bridge_busnr(acpi_handle handle) |
116 | { | 116 | { |
117 | acpi_status status; | 117 | acpi_status status; |
118 | int bus, bbn; | 118 | unsigned long bus, bbn; |
119 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 119 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
120 | 120 | ||
121 | acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer); | 121 | acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer); |
122 | 122 | ||
123 | status = acpi_evaluate_integer(handle, METHOD_NAME__BBN, NULL, | 123 | status = acpi_evaluate_integer(handle, METHOD_NAME__BBN, NULL, |
124 | (unsigned long *)&bbn); | 124 | &bbn); |
125 | if (status == AE_NOT_FOUND) { | 125 | if (status == AE_NOT_FOUND) { |
126 | /* Assume bus = 0 */ | 126 | /* Assume bus = 0 */ |
127 | printk(KERN_INFO PREFIX | 127 | printk(KERN_INFO PREFIX |
@@ -153,7 +153,7 @@ static int get_root_bridge_busnr(acpi_handle handle) | |||
153 | } | 153 | } |
154 | exit: | 154 | exit: |
155 | acpi_os_free(buffer.pointer); | 155 | acpi_os_free(buffer.pointer); |
156 | return bbn; | 156 | return (int)bbn; |
157 | } | 157 | } |
158 | 158 | ||
159 | static acpi_status | 159 | static acpi_status |
diff --git a/drivers/char/.gitignore b/drivers/char/.gitignore new file mode 100644 index 000000000000..2b6b1d772ed7 --- /dev/null +++ b/drivers/char/.gitignore | |||
@@ -0,0 +1,3 @@ | |||
1 | consolemap_deftbl.c | ||
2 | defkeymap.c | ||
3 | |||
diff --git a/drivers/char/drm/mga_dma.c b/drivers/char/drm/mga_dma.c index fc7d4a594bca..c8e1b6c83636 100644 --- a/drivers/char/drm/mga_dma.c +++ b/drivers/char/drm/mga_dma.c | |||
@@ -437,7 +437,7 @@ static int mga_do_agp_dma_bootstrap(drm_device_t * dev, | |||
437 | drm_mga_dma_bootstrap_t * dma_bs) | 437 | drm_mga_dma_bootstrap_t * dma_bs) |
438 | { | 438 | { |
439 | drm_mga_private_t * const dev_priv = (drm_mga_private_t *) dev->dev_private; | 439 | drm_mga_private_t * const dev_priv = (drm_mga_private_t *) dev->dev_private; |
440 | const unsigned int warp_size = mga_warp_microcode_size(dev_priv); | 440 | unsigned int warp_size = mga_warp_microcode_size(dev_priv); |
441 | int err; | 441 | int err; |
442 | unsigned offset; | 442 | unsigned offset; |
443 | const unsigned secondary_size = dma_bs->secondary_bin_count | 443 | const unsigned secondary_size = dma_bs->secondary_bin_count |
@@ -499,6 +499,12 @@ static int mga_do_agp_dma_bootstrap(drm_device_t * dev, | |||
499 | return err; | 499 | return err; |
500 | } | 500 | } |
501 | 501 | ||
502 | /* Make drm_addbufs happy by not trying to create a mapping for less | ||
503 | * than a page. | ||
504 | */ | ||
505 | if (warp_size < PAGE_SIZE) | ||
506 | warp_size = PAGE_SIZE; | ||
507 | |||
502 | offset = 0; | 508 | offset = 0; |
503 | err = drm_addmap( dev, offset, warp_size, | 509 | err = drm_addmap( dev, offset, warp_size, |
504 | _DRM_AGP, _DRM_READ_ONLY, & dev_priv->warp ); | 510 | _DRM_AGP, _DRM_READ_ONLY, & dev_priv->warp ); |
@@ -587,7 +593,7 @@ static int mga_do_pci_dma_bootstrap(drm_device_t * dev, | |||
587 | drm_mga_dma_bootstrap_t * dma_bs) | 593 | drm_mga_dma_bootstrap_t * dma_bs) |
588 | { | 594 | { |
589 | drm_mga_private_t * const dev_priv = (drm_mga_private_t *) dev->dev_private; | 595 | drm_mga_private_t * const dev_priv = (drm_mga_private_t *) dev->dev_private; |
590 | const unsigned int warp_size = mga_warp_microcode_size(dev_priv); | 596 | unsigned int warp_size = mga_warp_microcode_size(dev_priv); |
591 | unsigned int primary_size; | 597 | unsigned int primary_size; |
592 | unsigned int bin_count; | 598 | unsigned int bin_count; |
593 | int err; | 599 | int err; |
@@ -599,6 +605,12 @@ static int mga_do_pci_dma_bootstrap(drm_device_t * dev, | |||
599 | return DRM_ERR(EFAULT); | 605 | return DRM_ERR(EFAULT); |
600 | } | 606 | } |
601 | 607 | ||
608 | /* Make drm_addbufs happy by not trying to create a mapping for less | ||
609 | * than a page. | ||
610 | */ | ||
611 | if (warp_size < PAGE_SIZE) | ||
612 | warp_size = PAGE_SIZE; | ||
613 | |||
602 | /* The proper alignment is 0x100 for this mapping */ | 614 | /* The proper alignment is 0x100 for this mapping */ |
603 | err = drm_addmap(dev, 0, warp_size, _DRM_CONSISTENT, | 615 | err = drm_addmap(dev, 0, warp_size, _DRM_CONSISTENT, |
604 | _DRM_READ_ONLY, &dev_priv->warp); | 616 | _DRM_READ_ONLY, &dev_priv->warp); |
@@ -812,6 +824,10 @@ static int mga_do_init_dma( drm_device_t *dev, drm_mga_init_t *init ) | |||
812 | } | 824 | } |
813 | 825 | ||
814 | if (! dev_priv->used_new_dma_init) { | 826 | if (! dev_priv->used_new_dma_init) { |
827 | |||
828 | dev_priv->dma_access = MGA_PAGPXFER; | ||
829 | dev_priv->wagp_enable = MGA_WAGP_ENABLE; | ||
830 | |||
815 | dev_priv->status = drm_core_findmap(dev, init->status_offset); | 831 | dev_priv->status = drm_core_findmap(dev, init->status_offset); |
816 | if (!dev_priv->status) { | 832 | if (!dev_priv->status) { |
817 | DRM_ERROR("failed to find status page!\n"); | 833 | DRM_ERROR("failed to find status page!\n"); |
@@ -928,7 +944,7 @@ static int mga_do_cleanup_dma( drm_device_t *dev ) | |||
928 | drm_mga_private_t *dev_priv = dev->dev_private; | 944 | drm_mga_private_t *dev_priv = dev->dev_private; |
929 | 945 | ||
930 | if ((dev_priv->warp != NULL) | 946 | if ((dev_priv->warp != NULL) |
931 | && (dev_priv->mmio->type != _DRM_CONSISTENT)) | 947 | && (dev_priv->warp->type != _DRM_CONSISTENT)) |
932 | drm_core_ioremapfree(dev_priv->warp, dev); | 948 | drm_core_ioremapfree(dev_priv->warp, dev); |
933 | 949 | ||
934 | if ((dev_priv->primary != NULL) | 950 | if ((dev_priv->primary != NULL) |
diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c index 6a6acbd80af4..4cf9b8f3e336 100644 --- a/drivers/ieee1394/ohci1394.c +++ b/drivers/ieee1394/ohci1394.c | |||
@@ -2283,8 +2283,9 @@ static void ohci_schedule_iso_tasklets(struct ti_ohci *ohci, | |||
2283 | { | 2283 | { |
2284 | struct ohci1394_iso_tasklet *t; | 2284 | struct ohci1394_iso_tasklet *t; |
2285 | unsigned long mask; | 2285 | unsigned long mask; |
2286 | unsigned long flags; | ||
2286 | 2287 | ||
2287 | spin_lock(&ohci->iso_tasklet_list_lock); | 2288 | spin_lock_irqsave(&ohci->iso_tasklet_list_lock, flags); |
2288 | 2289 | ||
2289 | list_for_each_entry(t, &ohci->iso_tasklet_list, link) { | 2290 | list_for_each_entry(t, &ohci->iso_tasklet_list, link) { |
2290 | mask = 1 << t->context; | 2291 | mask = 1 << t->context; |
@@ -2295,8 +2296,7 @@ static void ohci_schedule_iso_tasklets(struct ti_ohci *ohci, | |||
2295 | tasklet_schedule(&t->tasklet); | 2296 | tasklet_schedule(&t->tasklet); |
2296 | } | 2297 | } |
2297 | 2298 | ||
2298 | spin_unlock(&ohci->iso_tasklet_list_lock); | 2299 | spin_unlock_irqrestore(&ohci->iso_tasklet_list_lock, flags); |
2299 | |||
2300 | } | 2300 | } |
2301 | 2301 | ||
2302 | static irqreturn_t ohci_irq_handler(int irq, void *dev_id, | 2302 | static irqreturn_t ohci_irq_handler(int irq, void *dev_id, |
diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c index 315f5ca8bedb..0470f77a9cd1 100644 --- a/drivers/ieee1394/raw1394.c +++ b/drivers/ieee1394/raw1394.c | |||
@@ -412,6 +412,7 @@ static void fcp_request(struct hpsb_host *host, int nodeid, int direction, | |||
412 | static ssize_t raw1394_read(struct file *file, char __user * buffer, | 412 | static ssize_t raw1394_read(struct file *file, char __user * buffer, |
413 | size_t count, loff_t * offset_is_ignored) | 413 | size_t count, loff_t * offset_is_ignored) |
414 | { | 414 | { |
415 | unsigned long flags; | ||
415 | struct file_info *fi = (struct file_info *)file->private_data; | 416 | struct file_info *fi = (struct file_info *)file->private_data; |
416 | struct list_head *lh; | 417 | struct list_head *lh; |
417 | struct pending_request *req; | 418 | struct pending_request *req; |
@@ -435,10 +436,10 @@ static ssize_t raw1394_read(struct file *file, char __user * buffer, | |||
435 | } | 436 | } |
436 | } | 437 | } |
437 | 438 | ||
438 | spin_lock_irq(&fi->reqlists_lock); | 439 | spin_lock_irqsave(&fi->reqlists_lock, flags); |
439 | lh = fi->req_complete.next; | 440 | lh = fi->req_complete.next; |
440 | list_del(lh); | 441 | list_del(lh); |
441 | spin_unlock_irq(&fi->reqlists_lock); | 442 | spin_unlock_irqrestore(&fi->reqlists_lock, flags); |
442 | 443 | ||
443 | req = list_entry(lh, struct pending_request, list); | 444 | req = list_entry(lh, struct pending_request, list); |
444 | 445 | ||
@@ -486,6 +487,7 @@ static int state_opened(struct file_info *fi, struct pending_request *req) | |||
486 | 487 | ||
487 | static int state_initialized(struct file_info *fi, struct pending_request *req) | 488 | static int state_initialized(struct file_info *fi, struct pending_request *req) |
488 | { | 489 | { |
490 | unsigned long flags; | ||
489 | struct host_info *hi; | 491 | struct host_info *hi; |
490 | struct raw1394_khost_list *khl; | 492 | struct raw1394_khost_list *khl; |
491 | 493 | ||
@@ -499,7 +501,7 @@ static int state_initialized(struct file_info *fi, struct pending_request *req) | |||
499 | 501 | ||
500 | switch (req->req.type) { | 502 | switch (req->req.type) { |
501 | case RAW1394_REQ_LIST_CARDS: | 503 | case RAW1394_REQ_LIST_CARDS: |
502 | spin_lock_irq(&host_info_lock); | 504 | spin_lock_irqsave(&host_info_lock, flags); |
503 | khl = kmalloc(sizeof(struct raw1394_khost_list) * host_count, | 505 | khl = kmalloc(sizeof(struct raw1394_khost_list) * host_count, |
504 | SLAB_ATOMIC); | 506 | SLAB_ATOMIC); |
505 | 507 | ||
@@ -513,7 +515,7 @@ static int state_initialized(struct file_info *fi, struct pending_request *req) | |||
513 | khl++; | 515 | khl++; |
514 | } | 516 | } |
515 | } | 517 | } |
516 | spin_unlock_irq(&host_info_lock); | 518 | spin_unlock_irqrestore(&host_info_lock, flags); |
517 | 519 | ||
518 | if (khl != NULL) { | 520 | if (khl != NULL) { |
519 | req->req.error = RAW1394_ERROR_NONE; | 521 | req->req.error = RAW1394_ERROR_NONE; |
@@ -528,7 +530,7 @@ static int state_initialized(struct file_info *fi, struct pending_request *req) | |||
528 | break; | 530 | break; |
529 | 531 | ||
530 | case RAW1394_REQ_SET_CARD: | 532 | case RAW1394_REQ_SET_CARD: |
531 | spin_lock_irq(&host_info_lock); | 533 | spin_lock_irqsave(&host_info_lock, flags); |
532 | if (req->req.misc < host_count) { | 534 | if (req->req.misc < host_count) { |
533 | list_for_each_entry(hi, &host_info_list, list) { | 535 | list_for_each_entry(hi, &host_info_list, list) { |
534 | if (!req->req.misc--) | 536 | if (!req->req.misc--) |
@@ -550,7 +552,7 @@ static int state_initialized(struct file_info *fi, struct pending_request *req) | |||
550 | } else { | 552 | } else { |
551 | req->req.error = RAW1394_ERROR_INVALID_ARG; | 553 | req->req.error = RAW1394_ERROR_INVALID_ARG; |
552 | } | 554 | } |
553 | spin_unlock_irq(&host_info_lock); | 555 | spin_unlock_irqrestore(&host_info_lock, flags); |
554 | 556 | ||
555 | req->req.length = 0; | 557 | req->req.length = 0; |
556 | break; | 558 | break; |
@@ -569,7 +571,6 @@ static void handle_iso_listen(struct file_info *fi, struct pending_request *req) | |||
569 | { | 571 | { |
570 | int channel = req->req.misc; | 572 | int channel = req->req.misc; |
571 | 573 | ||
572 | spin_lock_irq(&host_info_lock); | ||
573 | if ((channel > 63) || (channel < -64)) { | 574 | if ((channel > 63) || (channel < -64)) { |
574 | req->req.error = RAW1394_ERROR_INVALID_ARG; | 575 | req->req.error = RAW1394_ERROR_INVALID_ARG; |
575 | } else if (channel >= 0) { | 576 | } else if (channel >= 0) { |
@@ -601,7 +602,6 @@ static void handle_iso_listen(struct file_info *fi, struct pending_request *req) | |||
601 | 602 | ||
602 | req->req.length = 0; | 603 | req->req.length = 0; |
603 | queue_complete_req(req); | 604 | queue_complete_req(req); |
604 | spin_unlock_irq(&host_info_lock); | ||
605 | } | 605 | } |
606 | 606 | ||
607 | static void handle_fcp_listen(struct file_info *fi, struct pending_request *req) | 607 | static void handle_fcp_listen(struct file_info *fi, struct pending_request *req) |
@@ -627,6 +627,7 @@ static void handle_fcp_listen(struct file_info *fi, struct pending_request *req) | |||
627 | static int handle_async_request(struct file_info *fi, | 627 | static int handle_async_request(struct file_info *fi, |
628 | struct pending_request *req, int node) | 628 | struct pending_request *req, int node) |
629 | { | 629 | { |
630 | unsigned long flags; | ||
630 | struct hpsb_packet *packet = NULL; | 631 | struct hpsb_packet *packet = NULL; |
631 | u64 addr = req->req.address & 0xffffffffffffULL; | 632 | u64 addr = req->req.address & 0xffffffffffffULL; |
632 | 633 | ||
@@ -761,9 +762,9 @@ static int handle_async_request(struct file_info *fi, | |||
761 | hpsb_set_packet_complete_task(packet, | 762 | hpsb_set_packet_complete_task(packet, |
762 | (void (*)(void *))queue_complete_cb, req); | 763 | (void (*)(void *))queue_complete_cb, req); |
763 | 764 | ||
764 | spin_lock_irq(&fi->reqlists_lock); | 765 | spin_lock_irqsave(&fi->reqlists_lock, flags); |
765 | list_add_tail(&req->list, &fi->req_pending); | 766 | list_add_tail(&req->list, &fi->req_pending); |
766 | spin_unlock_irq(&fi->reqlists_lock); | 767 | spin_unlock_irqrestore(&fi->reqlists_lock, flags); |
767 | 768 | ||
768 | packet->generation = req->req.generation; | 769 | packet->generation = req->req.generation; |
769 | 770 | ||
@@ -779,6 +780,7 @@ static int handle_async_request(struct file_info *fi, | |||
779 | static int handle_iso_send(struct file_info *fi, struct pending_request *req, | 780 | static int handle_iso_send(struct file_info *fi, struct pending_request *req, |
780 | int channel) | 781 | int channel) |
781 | { | 782 | { |
783 | unsigned long flags; | ||
782 | struct hpsb_packet *packet; | 784 | struct hpsb_packet *packet; |
783 | 785 | ||
784 | packet = hpsb_make_isopacket(fi->host, req->req.length, channel & 0x3f, | 786 | packet = hpsb_make_isopacket(fi->host, req->req.length, channel & 0x3f, |
@@ -804,9 +806,9 @@ static int handle_iso_send(struct file_info *fi, struct pending_request *req, | |||
804 | (void (*)(void *))queue_complete_req, | 806 | (void (*)(void *))queue_complete_req, |
805 | req); | 807 | req); |
806 | 808 | ||
807 | spin_lock_irq(&fi->reqlists_lock); | 809 | spin_lock_irqsave(&fi->reqlists_lock, flags); |
808 | list_add_tail(&req->list, &fi->req_pending); | 810 | list_add_tail(&req->list, &fi->req_pending); |
809 | spin_unlock_irq(&fi->reqlists_lock); | 811 | spin_unlock_irqrestore(&fi->reqlists_lock, flags); |
810 | 812 | ||
811 | /* Update the generation of the packet just before sending. */ | 813 | /* Update the generation of the packet just before sending. */ |
812 | packet->generation = req->req.generation; | 814 | packet->generation = req->req.generation; |
@@ -821,6 +823,7 @@ static int handle_iso_send(struct file_info *fi, struct pending_request *req, | |||
821 | 823 | ||
822 | static int handle_async_send(struct file_info *fi, struct pending_request *req) | 824 | static int handle_async_send(struct file_info *fi, struct pending_request *req) |
823 | { | 825 | { |
826 | unsigned long flags; | ||
824 | struct hpsb_packet *packet; | 827 | struct hpsb_packet *packet; |
825 | int header_length = req->req.misc & 0xffff; | 828 | int header_length = req->req.misc & 0xffff; |
826 | int expect_response = req->req.misc >> 16; | 829 | int expect_response = req->req.misc >> 16; |
@@ -867,9 +870,9 @@ static int handle_async_send(struct file_info *fi, struct pending_request *req) | |||
867 | hpsb_set_packet_complete_task(packet, | 870 | hpsb_set_packet_complete_task(packet, |
868 | (void (*)(void *))queue_complete_cb, req); | 871 | (void (*)(void *))queue_complete_cb, req); |
869 | 872 | ||
870 | spin_lock_irq(&fi->reqlists_lock); | 873 | spin_lock_irqsave(&fi->reqlists_lock, flags); |
871 | list_add_tail(&req->list, &fi->req_pending); | 874 | list_add_tail(&req->list, &fi->req_pending); |
872 | spin_unlock_irq(&fi->reqlists_lock); | 875 | spin_unlock_irqrestore(&fi->reqlists_lock, flags); |
873 | 876 | ||
874 | /* Update the generation of the packet just before sending. */ | 877 | /* Update the generation of the packet just before sending. */ |
875 | packet->generation = req->req.generation; | 878 | packet->generation = req->req.generation; |
@@ -885,6 +888,7 @@ static int handle_async_send(struct file_info *fi, struct pending_request *req) | |||
885 | static int arm_read(struct hpsb_host *host, int nodeid, quadlet_t * buffer, | 888 | static int arm_read(struct hpsb_host *host, int nodeid, quadlet_t * buffer, |
886 | u64 addr, size_t length, u16 flags) | 889 | u64 addr, size_t length, u16 flags) |
887 | { | 890 | { |
891 | unsigned long irqflags; | ||
888 | struct pending_request *req; | 892 | struct pending_request *req; |
889 | struct host_info *hi; | 893 | struct host_info *hi; |
890 | struct file_info *fi = NULL; | 894 | struct file_info *fi = NULL; |
@@ -899,7 +903,7 @@ static int arm_read(struct hpsb_host *host, int nodeid, quadlet_t * buffer, | |||
899 | "addr: %4.4x %8.8x length: %Zu", nodeid, | 903 | "addr: %4.4x %8.8x length: %Zu", nodeid, |
900 | (u16) ((addr >> 32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF), | 904 | (u16) ((addr >> 32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF), |
901 | length); | 905 | length); |
902 | spin_lock(&host_info_lock); | 906 | spin_lock_irqsave(&host_info_lock, irqflags); |
903 | hi = find_host_info(host); /* search address-entry */ | 907 | hi = find_host_info(host); /* search address-entry */ |
904 | if (hi != NULL) { | 908 | if (hi != NULL) { |
905 | list_for_each_entry(fi, &hi->file_info_list, list) { | 909 | list_for_each_entry(fi, &hi->file_info_list, list) { |
@@ -924,7 +928,7 @@ static int arm_read(struct hpsb_host *host, int nodeid, quadlet_t * buffer, | |||
924 | if (!found) { | 928 | if (!found) { |
925 | printk(KERN_ERR "raw1394: arm_read FAILED addr_entry not found" | 929 | printk(KERN_ERR "raw1394: arm_read FAILED addr_entry not found" |
926 | " -> rcode_address_error\n"); | 930 | " -> rcode_address_error\n"); |
927 | spin_unlock(&host_info_lock); | 931 | spin_unlock_irqrestore(&host_info_lock, irqflags); |
928 | return (RCODE_ADDRESS_ERROR); | 932 | return (RCODE_ADDRESS_ERROR); |
929 | } else { | 933 | } else { |
930 | DBGMSG("arm_read addr_entry FOUND"); | 934 | DBGMSG("arm_read addr_entry FOUND"); |
@@ -954,7 +958,7 @@ static int arm_read(struct hpsb_host *host, int nodeid, quadlet_t * buffer, | |||
954 | req = __alloc_pending_request(SLAB_ATOMIC); | 958 | req = __alloc_pending_request(SLAB_ATOMIC); |
955 | if (!req) { | 959 | if (!req) { |
956 | DBGMSG("arm_read -> rcode_conflict_error"); | 960 | DBGMSG("arm_read -> rcode_conflict_error"); |
957 | spin_unlock(&host_info_lock); | 961 | spin_unlock_irqrestore(&host_info_lock, irqflags); |
958 | return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. | 962 | return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. |
959 | The request may be retried */ | 963 | The request may be retried */ |
960 | } | 964 | } |
@@ -974,7 +978,7 @@ static int arm_read(struct hpsb_host *host, int nodeid, quadlet_t * buffer, | |||
974 | if (!(req->data)) { | 978 | if (!(req->data)) { |
975 | free_pending_request(req); | 979 | free_pending_request(req); |
976 | DBGMSG("arm_read -> rcode_conflict_error"); | 980 | DBGMSG("arm_read -> rcode_conflict_error"); |
977 | spin_unlock(&host_info_lock); | 981 | spin_unlock_irqrestore(&host_info_lock, irqflags); |
978 | return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. | 982 | return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. |
979 | The request may be retried */ | 983 | The request may be retried */ |
980 | } | 984 | } |
@@ -1031,13 +1035,14 @@ static int arm_read(struct hpsb_host *host, int nodeid, quadlet_t * buffer, | |||
1031 | sizeof(struct arm_request)); | 1035 | sizeof(struct arm_request)); |
1032 | queue_complete_req(req); | 1036 | queue_complete_req(req); |
1033 | } | 1037 | } |
1034 | spin_unlock(&host_info_lock); | 1038 | spin_unlock_irqrestore(&host_info_lock, irqflags); |
1035 | return (rcode); | 1039 | return (rcode); |
1036 | } | 1040 | } |
1037 | 1041 | ||
1038 | static int arm_write(struct hpsb_host *host, int nodeid, int destid, | 1042 | static int arm_write(struct hpsb_host *host, int nodeid, int destid, |
1039 | quadlet_t * data, u64 addr, size_t length, u16 flags) | 1043 | quadlet_t * data, u64 addr, size_t length, u16 flags) |
1040 | { | 1044 | { |
1045 | unsigned long irqflags; | ||
1041 | struct pending_request *req; | 1046 | struct pending_request *req; |
1042 | struct host_info *hi; | 1047 | struct host_info *hi; |
1043 | struct file_info *fi = NULL; | 1048 | struct file_info *fi = NULL; |
@@ -1052,7 +1057,7 @@ static int arm_write(struct hpsb_host *host, int nodeid, int destid, | |||
1052 | "addr: %4.4x %8.8x length: %Zu", nodeid, | 1057 | "addr: %4.4x %8.8x length: %Zu", nodeid, |
1053 | (u16) ((addr >> 32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF), | 1058 | (u16) ((addr >> 32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF), |
1054 | length); | 1059 | length); |
1055 | spin_lock(&host_info_lock); | 1060 | spin_lock_irqsave(&host_info_lock, irqflags); |
1056 | hi = find_host_info(host); /* search address-entry */ | 1061 | hi = find_host_info(host); /* search address-entry */ |
1057 | if (hi != NULL) { | 1062 | if (hi != NULL) { |
1058 | list_for_each_entry(fi, &hi->file_info_list, list) { | 1063 | list_for_each_entry(fi, &hi->file_info_list, list) { |
@@ -1077,7 +1082,7 @@ static int arm_write(struct hpsb_host *host, int nodeid, int destid, | |||
1077 | if (!found) { | 1082 | if (!found) { |
1078 | printk(KERN_ERR "raw1394: arm_write FAILED addr_entry not found" | 1083 | printk(KERN_ERR "raw1394: arm_write FAILED addr_entry not found" |
1079 | " -> rcode_address_error\n"); | 1084 | " -> rcode_address_error\n"); |
1080 | spin_unlock(&host_info_lock); | 1085 | spin_unlock_irqrestore(&host_info_lock, irqflags); |
1081 | return (RCODE_ADDRESS_ERROR); | 1086 | return (RCODE_ADDRESS_ERROR); |
1082 | } else { | 1087 | } else { |
1083 | DBGMSG("arm_write addr_entry FOUND"); | 1088 | DBGMSG("arm_write addr_entry FOUND"); |
@@ -1106,7 +1111,7 @@ static int arm_write(struct hpsb_host *host, int nodeid, int destid, | |||
1106 | req = __alloc_pending_request(SLAB_ATOMIC); | 1111 | req = __alloc_pending_request(SLAB_ATOMIC); |
1107 | if (!req) { | 1112 | if (!req) { |
1108 | DBGMSG("arm_write -> rcode_conflict_error"); | 1113 | DBGMSG("arm_write -> rcode_conflict_error"); |
1109 | spin_unlock(&host_info_lock); | 1114 | spin_unlock_irqrestore(&host_info_lock, irqflags); |
1110 | return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. | 1115 | return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. |
1111 | The request my be retried */ | 1116 | The request my be retried */ |
1112 | } | 1117 | } |
@@ -1118,7 +1123,7 @@ static int arm_write(struct hpsb_host *host, int nodeid, int destid, | |||
1118 | if (!(req->data)) { | 1123 | if (!(req->data)) { |
1119 | free_pending_request(req); | 1124 | free_pending_request(req); |
1120 | DBGMSG("arm_write -> rcode_conflict_error"); | 1125 | DBGMSG("arm_write -> rcode_conflict_error"); |
1121 | spin_unlock(&host_info_lock); | 1126 | spin_unlock_irqrestore(&host_info_lock, irqflags); |
1122 | return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. | 1127 | return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. |
1123 | The request may be retried */ | 1128 | The request may be retried */ |
1124 | } | 1129 | } |
@@ -1165,7 +1170,7 @@ static int arm_write(struct hpsb_host *host, int nodeid, int destid, | |||
1165 | sizeof(struct arm_request)); | 1170 | sizeof(struct arm_request)); |
1166 | queue_complete_req(req); | 1171 | queue_complete_req(req); |
1167 | } | 1172 | } |
1168 | spin_unlock(&host_info_lock); | 1173 | spin_unlock_irqrestore(&host_info_lock, irqflags); |
1169 | return (rcode); | 1174 | return (rcode); |
1170 | } | 1175 | } |
1171 | 1176 | ||
@@ -1173,6 +1178,7 @@ static int arm_lock(struct hpsb_host *host, int nodeid, quadlet_t * store, | |||
1173 | u64 addr, quadlet_t data, quadlet_t arg, int ext_tcode, | 1178 | u64 addr, quadlet_t data, quadlet_t arg, int ext_tcode, |
1174 | u16 flags) | 1179 | u16 flags) |
1175 | { | 1180 | { |
1181 | unsigned long irqflags; | ||
1176 | struct pending_request *req; | 1182 | struct pending_request *req; |
1177 | struct host_info *hi; | 1183 | struct host_info *hi; |
1178 | struct file_info *fi = NULL; | 1184 | struct file_info *fi = NULL; |
@@ -1198,7 +1204,7 @@ static int arm_lock(struct hpsb_host *host, int nodeid, quadlet_t * store, | |||
1198 | (u32) (addr & 0xFFFFFFFF), ext_tcode & 0xFF, | 1204 | (u32) (addr & 0xFFFFFFFF), ext_tcode & 0xFF, |
1199 | be32_to_cpu(data), be32_to_cpu(arg)); | 1205 | be32_to_cpu(data), be32_to_cpu(arg)); |
1200 | } | 1206 | } |
1201 | spin_lock(&host_info_lock); | 1207 | spin_lock_irqsave(&host_info_lock, irqflags); |
1202 | hi = find_host_info(host); /* search address-entry */ | 1208 | hi = find_host_info(host); /* search address-entry */ |
1203 | if (hi != NULL) { | 1209 | if (hi != NULL) { |
1204 | list_for_each_entry(fi, &hi->file_info_list, list) { | 1210 | list_for_each_entry(fi, &hi->file_info_list, list) { |
@@ -1224,7 +1230,7 @@ static int arm_lock(struct hpsb_host *host, int nodeid, quadlet_t * store, | |||
1224 | if (!found) { | 1230 | if (!found) { |
1225 | printk(KERN_ERR "raw1394: arm_lock FAILED addr_entry not found" | 1231 | printk(KERN_ERR "raw1394: arm_lock FAILED addr_entry not found" |
1226 | " -> rcode_address_error\n"); | 1232 | " -> rcode_address_error\n"); |
1227 | spin_unlock(&host_info_lock); | 1233 | spin_unlock_irqrestore(&host_info_lock, irqflags); |
1228 | return (RCODE_ADDRESS_ERROR); | 1234 | return (RCODE_ADDRESS_ERROR); |
1229 | } else { | 1235 | } else { |
1230 | DBGMSG("arm_lock addr_entry FOUND"); | 1236 | DBGMSG("arm_lock addr_entry FOUND"); |
@@ -1307,7 +1313,7 @@ static int arm_lock(struct hpsb_host *host, int nodeid, quadlet_t * store, | |||
1307 | req = __alloc_pending_request(SLAB_ATOMIC); | 1313 | req = __alloc_pending_request(SLAB_ATOMIC); |
1308 | if (!req) { | 1314 | if (!req) { |
1309 | DBGMSG("arm_lock -> rcode_conflict_error"); | 1315 | DBGMSG("arm_lock -> rcode_conflict_error"); |
1310 | spin_unlock(&host_info_lock); | 1316 | spin_unlock_irqrestore(&host_info_lock, irqflags); |
1311 | return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. | 1317 | return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. |
1312 | The request may be retried */ | 1318 | The request may be retried */ |
1313 | } | 1319 | } |
@@ -1316,7 +1322,7 @@ static int arm_lock(struct hpsb_host *host, int nodeid, quadlet_t * store, | |||
1316 | if (!(req->data)) { | 1322 | if (!(req->data)) { |
1317 | free_pending_request(req); | 1323 | free_pending_request(req); |
1318 | DBGMSG("arm_lock -> rcode_conflict_error"); | 1324 | DBGMSG("arm_lock -> rcode_conflict_error"); |
1319 | spin_unlock(&host_info_lock); | 1325 | spin_unlock_irqrestore(&host_info_lock, irqflags); |
1320 | return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. | 1326 | return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. |
1321 | The request may be retried */ | 1327 | The request may be retried */ |
1322 | } | 1328 | } |
@@ -1382,7 +1388,7 @@ static int arm_lock(struct hpsb_host *host, int nodeid, quadlet_t * store, | |||
1382 | sizeof(struct arm_response) + 2 * sizeof(*store)); | 1388 | sizeof(struct arm_response) + 2 * sizeof(*store)); |
1383 | queue_complete_req(req); | 1389 | queue_complete_req(req); |
1384 | } | 1390 | } |
1385 | spin_unlock(&host_info_lock); | 1391 | spin_unlock_irqrestore(&host_info_lock, irqflags); |
1386 | return (rcode); | 1392 | return (rcode); |
1387 | } | 1393 | } |
1388 | 1394 | ||
@@ -1390,6 +1396,7 @@ static int arm_lock64(struct hpsb_host *host, int nodeid, octlet_t * store, | |||
1390 | u64 addr, octlet_t data, octlet_t arg, int ext_tcode, | 1396 | u64 addr, octlet_t data, octlet_t arg, int ext_tcode, |
1391 | u16 flags) | 1397 | u16 flags) |
1392 | { | 1398 | { |
1399 | unsigned long irqflags; | ||
1393 | struct pending_request *req; | 1400 | struct pending_request *req; |
1394 | struct host_info *hi; | 1401 | struct host_info *hi; |
1395 | struct file_info *fi = NULL; | 1402 | struct file_info *fi = NULL; |
@@ -1422,7 +1429,7 @@ static int arm_lock64(struct hpsb_host *host, int nodeid, octlet_t * store, | |||
1422 | (u32) ((be64_to_cpu(arg) >> 32) & 0xFFFFFFFF), | 1429 | (u32) ((be64_to_cpu(arg) >> 32) & 0xFFFFFFFF), |
1423 | (u32) (be64_to_cpu(arg) & 0xFFFFFFFF)); | 1430 | (u32) (be64_to_cpu(arg) & 0xFFFFFFFF)); |
1424 | } | 1431 | } |
1425 | spin_lock(&host_info_lock); | 1432 | spin_lock_irqsave(&host_info_lock, irqflags); |
1426 | hi = find_host_info(host); /* search addressentry in file_info's for host */ | 1433 | hi = find_host_info(host); /* search addressentry in file_info's for host */ |
1427 | if (hi != NULL) { | 1434 | if (hi != NULL) { |
1428 | list_for_each_entry(fi, &hi->file_info_list, list) { | 1435 | list_for_each_entry(fi, &hi->file_info_list, list) { |
@@ -1449,7 +1456,7 @@ static int arm_lock64(struct hpsb_host *host, int nodeid, octlet_t * store, | |||
1449 | printk(KERN_ERR | 1456 | printk(KERN_ERR |
1450 | "raw1394: arm_lock64 FAILED addr_entry not found" | 1457 | "raw1394: arm_lock64 FAILED addr_entry not found" |
1451 | " -> rcode_address_error\n"); | 1458 | " -> rcode_address_error\n"); |
1452 | spin_unlock(&host_info_lock); | 1459 | spin_unlock_irqrestore(&host_info_lock, irqflags); |
1453 | return (RCODE_ADDRESS_ERROR); | 1460 | return (RCODE_ADDRESS_ERROR); |
1454 | } else { | 1461 | } else { |
1455 | DBGMSG("arm_lock64 addr_entry FOUND"); | 1462 | DBGMSG("arm_lock64 addr_entry FOUND"); |
@@ -1533,7 +1540,7 @@ static int arm_lock64(struct hpsb_host *host, int nodeid, octlet_t * store, | |||
1533 | DBGMSG("arm_lock64 -> entering notification-section"); | 1540 | DBGMSG("arm_lock64 -> entering notification-section"); |
1534 | req = __alloc_pending_request(SLAB_ATOMIC); | 1541 | req = __alloc_pending_request(SLAB_ATOMIC); |
1535 | if (!req) { | 1542 | if (!req) { |
1536 | spin_unlock(&host_info_lock); | 1543 | spin_unlock_irqrestore(&host_info_lock, irqflags); |
1537 | DBGMSG("arm_lock64 -> rcode_conflict_error"); | 1544 | DBGMSG("arm_lock64 -> rcode_conflict_error"); |
1538 | return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. | 1545 | return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. |
1539 | The request may be retried */ | 1546 | The request may be retried */ |
@@ -1542,7 +1549,7 @@ static int arm_lock64(struct hpsb_host *host, int nodeid, octlet_t * store, | |||
1542 | req->data = kmalloc(size, SLAB_ATOMIC); | 1549 | req->data = kmalloc(size, SLAB_ATOMIC); |
1543 | if (!(req->data)) { | 1550 | if (!(req->data)) { |
1544 | free_pending_request(req); | 1551 | free_pending_request(req); |
1545 | spin_unlock(&host_info_lock); | 1552 | spin_unlock_irqrestore(&host_info_lock, irqflags); |
1546 | DBGMSG("arm_lock64 -> rcode_conflict_error"); | 1553 | DBGMSG("arm_lock64 -> rcode_conflict_error"); |
1547 | return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. | 1554 | return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. |
1548 | The request may be retried */ | 1555 | The request may be retried */ |
@@ -1609,7 +1616,7 @@ static int arm_lock64(struct hpsb_host *host, int nodeid, octlet_t * store, | |||
1609 | sizeof(struct arm_response) + 2 * sizeof(*store)); | 1616 | sizeof(struct arm_response) + 2 * sizeof(*store)); |
1610 | queue_complete_req(req); | 1617 | queue_complete_req(req); |
1611 | } | 1618 | } |
1612 | spin_unlock(&host_info_lock); | 1619 | spin_unlock_irqrestore(&host_info_lock, irqflags); |
1613 | return (rcode); | 1620 | return (rcode); |
1614 | } | 1621 | } |
1615 | 1622 | ||
@@ -1980,6 +1987,7 @@ static int write_phypacket(struct file_info *fi, struct pending_request *req) | |||
1980 | struct hpsb_packet *packet = NULL; | 1987 | struct hpsb_packet *packet = NULL; |
1981 | int retval = 0; | 1988 | int retval = 0; |
1982 | quadlet_t data; | 1989 | quadlet_t data; |
1990 | unsigned long flags; | ||
1983 | 1991 | ||
1984 | data = be32_to_cpu((u32) req->req.sendb); | 1992 | data = be32_to_cpu((u32) req->req.sendb); |
1985 | DBGMSG("write_phypacket called - quadlet 0x%8.8x ", data); | 1993 | DBGMSG("write_phypacket called - quadlet 0x%8.8x ", data); |
@@ -1990,9 +1998,9 @@ static int write_phypacket(struct file_info *fi, struct pending_request *req) | |||
1990 | req->packet = packet; | 1998 | req->packet = packet; |
1991 | hpsb_set_packet_complete_task(packet, | 1999 | hpsb_set_packet_complete_task(packet, |
1992 | (void (*)(void *))queue_complete_cb, req); | 2000 | (void (*)(void *))queue_complete_cb, req); |
1993 | spin_lock_irq(&fi->reqlists_lock); | 2001 | spin_lock_irqsave(&fi->reqlists_lock, flags); |
1994 | list_add_tail(&req->list, &fi->req_pending); | 2002 | list_add_tail(&req->list, &fi->req_pending); |
1995 | spin_unlock_irq(&fi->reqlists_lock); | 2003 | spin_unlock_irqrestore(&fi->reqlists_lock, flags); |
1996 | packet->generation = req->req.generation; | 2004 | packet->generation = req->req.generation; |
1997 | retval = hpsb_send_packet(packet); | 2005 | retval = hpsb_send_packet(packet); |
1998 | DBGMSG("write_phypacket send_packet called => retval: %d ", retval); | 2006 | DBGMSG("write_phypacket send_packet called => retval: %d ", retval); |
@@ -2659,14 +2667,15 @@ static unsigned int raw1394_poll(struct file *file, poll_table * pt) | |||
2659 | { | 2667 | { |
2660 | struct file_info *fi = file->private_data; | 2668 | struct file_info *fi = file->private_data; |
2661 | unsigned int mask = POLLOUT | POLLWRNORM; | 2669 | unsigned int mask = POLLOUT | POLLWRNORM; |
2670 | unsigned long flags; | ||
2662 | 2671 | ||
2663 | poll_wait(file, &fi->poll_wait_complete, pt); | 2672 | poll_wait(file, &fi->poll_wait_complete, pt); |
2664 | 2673 | ||
2665 | spin_lock_irq(&fi->reqlists_lock); | 2674 | spin_lock_irqsave(&fi->reqlists_lock, flags); |
2666 | if (!list_empty(&fi->req_complete)) { | 2675 | if (!list_empty(&fi->req_complete)) { |
2667 | mask |= POLLIN | POLLRDNORM; | 2676 | mask |= POLLIN | POLLRDNORM; |
2668 | } | 2677 | } |
2669 | spin_unlock_irq(&fi->reqlists_lock); | 2678 | spin_unlock_irqrestore(&fi->reqlists_lock, flags); |
2670 | 2679 | ||
2671 | return mask; | 2680 | return mask; |
2672 | } | 2681 | } |
@@ -2710,6 +2719,7 @@ static int raw1394_release(struct inode *inode, struct file *file) | |||
2710 | struct arm_addr *arm_addr = NULL; | 2719 | struct arm_addr *arm_addr = NULL; |
2711 | int another_host; | 2720 | int another_host; |
2712 | int csr_mod = 0; | 2721 | int csr_mod = 0; |
2722 | unsigned long flags; | ||
2713 | 2723 | ||
2714 | if (fi->iso_state != RAW1394_ISO_INACTIVE) | 2724 | if (fi->iso_state != RAW1394_ISO_INACTIVE) |
2715 | raw1394_iso_shutdown(fi); | 2725 | raw1394_iso_shutdown(fi); |
@@ -2720,13 +2730,11 @@ static int raw1394_release(struct inode *inode, struct file *file) | |||
2720 | } | 2730 | } |
2721 | } | 2731 | } |
2722 | 2732 | ||
2723 | spin_lock_irq(&host_info_lock); | 2733 | spin_lock_irqsave(&host_info_lock, flags); |
2724 | fi->listen_channels = 0; | 2734 | fi->listen_channels = 0; |
2725 | spin_unlock_irq(&host_info_lock); | ||
2726 | 2735 | ||
2727 | fail = 0; | 2736 | fail = 0; |
2728 | /* set address-entries invalid */ | 2737 | /* set address-entries invalid */ |
2729 | spin_lock_irq(&host_info_lock); | ||
2730 | 2738 | ||
2731 | while (!list_empty(&fi->addr_list)) { | 2739 | while (!list_empty(&fi->addr_list)) { |
2732 | another_host = 0; | 2740 | another_host = 0; |
@@ -2777,14 +2785,14 @@ static int raw1394_release(struct inode *inode, struct file *file) | |||
2777 | vfree(addr->addr_space_buffer); | 2785 | vfree(addr->addr_space_buffer); |
2778 | kfree(addr); | 2786 | kfree(addr); |
2779 | } /* while */ | 2787 | } /* while */ |
2780 | spin_unlock_irq(&host_info_lock); | 2788 | spin_unlock_irqrestore(&host_info_lock, flags); |
2781 | if (fail > 0) { | 2789 | if (fail > 0) { |
2782 | printk(KERN_ERR "raw1394: during addr_list-release " | 2790 | printk(KERN_ERR "raw1394: during addr_list-release " |
2783 | "error(s) occurred \n"); | 2791 | "error(s) occurred \n"); |
2784 | } | 2792 | } |
2785 | 2793 | ||
2786 | while (!done) { | 2794 | while (!done) { |
2787 | spin_lock_irq(&fi->reqlists_lock); | 2795 | spin_lock_irqsave(&fi->reqlists_lock, flags); |
2788 | 2796 | ||
2789 | while (!list_empty(&fi->req_complete)) { | 2797 | while (!list_empty(&fi->req_complete)) { |
2790 | lh = fi->req_complete.next; | 2798 | lh = fi->req_complete.next; |
@@ -2798,7 +2806,7 @@ static int raw1394_release(struct inode *inode, struct file *file) | |||
2798 | if (list_empty(&fi->req_pending)) | 2806 | if (list_empty(&fi->req_pending)) |
2799 | done = 1; | 2807 | done = 1; |
2800 | 2808 | ||
2801 | spin_unlock_irq(&fi->reqlists_lock); | 2809 | spin_unlock_irqrestore(&fi->reqlists_lock, flags); |
2802 | 2810 | ||
2803 | if (!done) | 2811 | if (!done) |
2804 | down_interruptible(&fi->complete_sem); | 2812 | down_interruptible(&fi->complete_sem); |
@@ -2828,9 +2836,9 @@ static int raw1394_release(struct inode *inode, struct file *file) | |||
2828 | fi->host->id); | 2836 | fi->host->id); |
2829 | 2837 | ||
2830 | if (fi->state == connected) { | 2838 | if (fi->state == connected) { |
2831 | spin_lock_irq(&host_info_lock); | 2839 | spin_lock_irqsave(&host_info_lock, flags); |
2832 | list_del(&fi->list); | 2840 | list_del(&fi->list); |
2833 | spin_unlock_irq(&host_info_lock); | 2841 | spin_unlock_irqrestore(&host_info_lock, flags); |
2834 | 2842 | ||
2835 | put_device(&fi->host->device); | 2843 | put_device(&fi->host->device); |
2836 | } | 2844 | } |
diff --git a/drivers/md/md.c b/drivers/md/md.c index 2897df90df44..e9476075aa13 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -3063,6 +3063,7 @@ static int md_thread(void * arg) | |||
3063 | * many dirty RAID5 blocks. | 3063 | * many dirty RAID5 blocks. |
3064 | */ | 3064 | */ |
3065 | 3065 | ||
3066 | allow_signal(SIGKILL); | ||
3066 | complete(thread->event); | 3067 | complete(thread->event); |
3067 | while (!kthread_should_stop()) { | 3068 | while (!kthread_should_stop()) { |
3068 | void (*run)(mddev_t *); | 3069 | void (*run)(mddev_t *); |
@@ -3111,7 +3112,7 @@ mdk_thread_t *md_register_thread(void (*run) (mddev_t *), mddev_t *mddev, | |||
3111 | thread->mddev = mddev; | 3112 | thread->mddev = mddev; |
3112 | thread->name = name; | 3113 | thread->name = name; |
3113 | thread->timeout = MAX_SCHEDULE_TIMEOUT; | 3114 | thread->timeout = MAX_SCHEDULE_TIMEOUT; |
3114 | thread->tsk = kthread_run(md_thread, thread, mdname(thread->mddev)); | 3115 | thread->tsk = kthread_run(md_thread, thread, name, mdname(thread->mddev)); |
3115 | if (IS_ERR(thread->tsk)) { | 3116 | if (IS_ERR(thread->tsk)) { |
3116 | kfree(thread); | 3117 | kfree(thread); |
3117 | return NULL; | 3118 | return NULL; |
@@ -3569,6 +3570,7 @@ static void md_do_sync(mddev_t *mddev) | |||
3569 | try_again: | 3570 | try_again: |
3570 | if (signal_pending(current)) { | 3571 | if (signal_pending(current)) { |
3571 | flush_signals(current); | 3572 | flush_signals(current); |
3573 | set_bit(MD_RECOVERY_INTR, &mddev->recovery); | ||
3572 | goto skip; | 3574 | goto skip; |
3573 | } | 3575 | } |
3574 | ITERATE_MDDEV(mddev2,tmp) { | 3576 | ITERATE_MDDEV(mddev2,tmp) { |
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index cf3daaa1b369..15ceaf615756 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c | |||
@@ -578,8 +578,9 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) | |||
578 | txfid, NULL); | 578 | txfid, NULL); |
579 | if (err) { | 579 | if (err) { |
580 | netif_start_queue(dev); | 580 | netif_start_queue(dev); |
581 | printk(KERN_ERR "%s: Error %d transmitting packet\n", | 581 | if (net_ratelimit()) |
582 | dev->name, err); | 582 | printk(KERN_ERR "%s: Error %d transmitting packet\n", |
583 | dev->name, err); | ||
583 | stats->tx_errors++; | 584 | stats->tx_errors++; |
584 | goto fail; | 585 | goto fail; |
585 | } | 586 | } |
diff --git a/drivers/pci/.gitignore b/drivers/pci/.gitignore new file mode 100644 index 000000000000..f297ca8d313e --- /dev/null +++ b/drivers/pci/.gitignore | |||
@@ -0,0 +1,4 @@ | |||
1 | classlist.h | ||
2 | devlist.h | ||
3 | gen-devlist | ||
4 | |||
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index 5ec866b00479..cfa22e4ee547 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c | |||
@@ -407,7 +407,7 @@ static u32 ahci_scr_read (struct ata_port *ap, unsigned int sc_reg_in) | |||
407 | return 0xffffffffU; | 407 | return 0xffffffffU; |
408 | } | 408 | } |
409 | 409 | ||
410 | return readl((void *) ap->ioaddr.scr_addr + (sc_reg * 4)); | 410 | return readl((void __iomem *) ap->ioaddr.scr_addr + (sc_reg * 4)); |
411 | } | 411 | } |
412 | 412 | ||
413 | 413 | ||
@@ -425,7 +425,7 @@ static void ahci_scr_write (struct ata_port *ap, unsigned int sc_reg_in, | |||
425 | return; | 425 | return; |
426 | } | 426 | } |
427 | 427 | ||
428 | writel(val, (void *) ap->ioaddr.scr_addr + (sc_reg * 4)); | 428 | writel(val, (void __iomem *) ap->ioaddr.scr_addr + (sc_reg * 4)); |
429 | } | 429 | } |
430 | 430 | ||
431 | static void ahci_phy_reset(struct ata_port *ap) | 431 | static void ahci_phy_reset(struct ata_port *ap) |
@@ -453,14 +453,14 @@ static void ahci_phy_reset(struct ata_port *ap) | |||
453 | 453 | ||
454 | static u8 ahci_check_status(struct ata_port *ap) | 454 | static u8 ahci_check_status(struct ata_port *ap) |
455 | { | 455 | { |
456 | void *mmio = (void *) ap->ioaddr.cmd_addr; | 456 | void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr; |
457 | 457 | ||
458 | return readl(mmio + PORT_TFDATA) & 0xFF; | 458 | return readl(mmio + PORT_TFDATA) & 0xFF; |
459 | } | 459 | } |
460 | 460 | ||
461 | static u8 ahci_check_err(struct ata_port *ap) | 461 | static u8 ahci_check_err(struct ata_port *ap) |
462 | { | 462 | { |
463 | void *mmio = (void *) ap->ioaddr.cmd_addr; | 463 | void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr; |
464 | 464 | ||
465 | return (readl(mmio + PORT_TFDATA) >> 8) & 0xFF; | 465 | return (readl(mmio + PORT_TFDATA) >> 8) & 0xFF; |
466 | } | 466 | } |
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 175d4646333d..9269fd9b814f 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -1082,6 +1082,31 @@ static inline void ata_dump_id(struct ata_device *dev) | |||
1082 | dev->id[93]); | 1082 | dev->id[93]); |
1083 | } | 1083 | } |
1084 | 1084 | ||
1085 | /* | ||
1086 | * Compute the PIO modes available for this device. This is not as | ||
1087 | * trivial as it seems if we must consider early devices correctly. | ||
1088 | * | ||
1089 | * FIXME: pre IDE drive timing (do we care ?). | ||
1090 | */ | ||
1091 | |||
1092 | static unsigned int ata_pio_modes(struct ata_device *adev) | ||
1093 | { | ||
1094 | u16 modes; | ||
1095 | |||
1096 | /* Usual case. Word 53 indicates word 88 is valid */ | ||
1097 | if (adev->id[ATA_ID_FIELD_VALID] & (1 << 2)) { | ||
1098 | modes = adev->id[ATA_ID_PIO_MODES] & 0x03; | ||
1099 | modes <<= 3; | ||
1100 | modes |= 0x7; | ||
1101 | return modes; | ||
1102 | } | ||
1103 | |||
1104 | /* If word 88 isn't valid then Word 51 holds the PIO timing number | ||
1105 | for the maximum. Turn it into a mask and return it */ | ||
1106 | modes = (2 << (adev->id[ATA_ID_OLD_PIO_MODES] & 0xFF)) - 1 ; | ||
1107 | return modes; | ||
1108 | } | ||
1109 | |||
1085 | /** | 1110 | /** |
1086 | * ata_dev_identify - obtain IDENTIFY x DEVICE page | 1111 | * ata_dev_identify - obtain IDENTIFY x DEVICE page |
1087 | * @ap: port on which device we wish to probe resides | 1112 | * @ap: port on which device we wish to probe resides |
@@ -1215,10 +1240,8 @@ retry: | |||
1215 | xfer_modes = dev->id[ATA_ID_UDMA_MODES]; | 1240 | xfer_modes = dev->id[ATA_ID_UDMA_MODES]; |
1216 | if (!xfer_modes) | 1241 | if (!xfer_modes) |
1217 | xfer_modes = (dev->id[ATA_ID_MWDMA_MODES]) << ATA_SHIFT_MWDMA; | 1242 | xfer_modes = (dev->id[ATA_ID_MWDMA_MODES]) << ATA_SHIFT_MWDMA; |
1218 | if (!xfer_modes) { | 1243 | if (!xfer_modes) |
1219 | xfer_modes = (dev->id[ATA_ID_PIO_MODES]) << (ATA_SHIFT_PIO + 3); | 1244 | xfer_modes = ata_pio_modes(dev); |
1220 | xfer_modes |= (0x7 << ATA_SHIFT_PIO); | ||
1221 | } | ||
1222 | 1245 | ||
1223 | ata_dump_id(dev); | 1246 | ata_dump_id(dev); |
1224 | 1247 | ||
@@ -1515,6 +1538,152 @@ void ata_port_disable(struct ata_port *ap) | |||
1515 | ap->flags |= ATA_FLAG_PORT_DISABLED; | 1538 | ap->flags |= ATA_FLAG_PORT_DISABLED; |
1516 | } | 1539 | } |
1517 | 1540 | ||
1541 | /* | ||
1542 | * This mode timing computation functionality is ported over from | ||
1543 | * drivers/ide/ide-timing.h and was originally written by Vojtech Pavlik | ||
1544 | */ | ||
1545 | /* | ||
1546 | * PIO 0-5, MWDMA 0-2 and UDMA 0-6 timings (in nanoseconds). | ||
1547 | * These were taken from ATA/ATAPI-6 standard, rev 0a, except | ||
1548 | * for PIO 5, which is a nonstandard extension and UDMA6, which | ||
1549 | * is currently supported only by Maxtor drives. | ||
1550 | */ | ||
1551 | |||
1552 | static const struct ata_timing ata_timing[] = { | ||
1553 | |||
1554 | { XFER_UDMA_6, 0, 0, 0, 0, 0, 0, 0, 15 }, | ||
1555 | { XFER_UDMA_5, 0, 0, 0, 0, 0, 0, 0, 20 }, | ||
1556 | { XFER_UDMA_4, 0, 0, 0, 0, 0, 0, 0, 30 }, | ||
1557 | { XFER_UDMA_3, 0, 0, 0, 0, 0, 0, 0, 45 }, | ||
1558 | |||
1559 | { XFER_UDMA_2, 0, 0, 0, 0, 0, 0, 0, 60 }, | ||
1560 | { XFER_UDMA_1, 0, 0, 0, 0, 0, 0, 0, 80 }, | ||
1561 | { XFER_UDMA_0, 0, 0, 0, 0, 0, 0, 0, 120 }, | ||
1562 | |||
1563 | /* { XFER_UDMA_SLOW, 0, 0, 0, 0, 0, 0, 0, 150 }, */ | ||
1564 | |||
1565 | { XFER_MW_DMA_2, 25, 0, 0, 0, 70, 25, 120, 0 }, | ||
1566 | { XFER_MW_DMA_1, 45, 0, 0, 0, 80, 50, 150, 0 }, | ||
1567 | { XFER_MW_DMA_0, 60, 0, 0, 0, 215, 215, 480, 0 }, | ||
1568 | |||
1569 | { XFER_SW_DMA_2, 60, 0, 0, 0, 120, 120, 240, 0 }, | ||
1570 | { XFER_SW_DMA_1, 90, 0, 0, 0, 240, 240, 480, 0 }, | ||
1571 | { XFER_SW_DMA_0, 120, 0, 0, 0, 480, 480, 960, 0 }, | ||
1572 | |||
1573 | /* { XFER_PIO_5, 20, 50, 30, 100, 50, 30, 100, 0 }, */ | ||
1574 | { XFER_PIO_4, 25, 70, 25, 120, 70, 25, 120, 0 }, | ||
1575 | { XFER_PIO_3, 30, 80, 70, 180, 80, 70, 180, 0 }, | ||
1576 | |||
1577 | { XFER_PIO_2, 30, 290, 40, 330, 100, 90, 240, 0 }, | ||
1578 | { XFER_PIO_1, 50, 290, 93, 383, 125, 100, 383, 0 }, | ||
1579 | { XFER_PIO_0, 70, 290, 240, 600, 165, 150, 600, 0 }, | ||
1580 | |||
1581 | /* { XFER_PIO_SLOW, 120, 290, 240, 960, 290, 240, 960, 0 }, */ | ||
1582 | |||
1583 | { 0xFF } | ||
1584 | }; | ||
1585 | |||
1586 | #define ENOUGH(v,unit) (((v)-1)/(unit)+1) | ||
1587 | #define EZ(v,unit) ((v)?ENOUGH(v,unit):0) | ||
1588 | |||
1589 | static void ata_timing_quantize(const struct ata_timing *t, struct ata_timing *q, int T, int UT) | ||
1590 | { | ||
1591 | q->setup = EZ(t->setup * 1000, T); | ||
1592 | q->act8b = EZ(t->act8b * 1000, T); | ||
1593 | q->rec8b = EZ(t->rec8b * 1000, T); | ||
1594 | q->cyc8b = EZ(t->cyc8b * 1000, T); | ||
1595 | q->active = EZ(t->active * 1000, T); | ||
1596 | q->recover = EZ(t->recover * 1000, T); | ||
1597 | q->cycle = EZ(t->cycle * 1000, T); | ||
1598 | q->udma = EZ(t->udma * 1000, UT); | ||
1599 | } | ||
1600 | |||
1601 | void ata_timing_merge(const struct ata_timing *a, const struct ata_timing *b, | ||
1602 | struct ata_timing *m, unsigned int what) | ||
1603 | { | ||
1604 | if (what & ATA_TIMING_SETUP ) m->setup = max(a->setup, b->setup); | ||
1605 | if (what & ATA_TIMING_ACT8B ) m->act8b = max(a->act8b, b->act8b); | ||
1606 | if (what & ATA_TIMING_REC8B ) m->rec8b = max(a->rec8b, b->rec8b); | ||
1607 | if (what & ATA_TIMING_CYC8B ) m->cyc8b = max(a->cyc8b, b->cyc8b); | ||
1608 | if (what & ATA_TIMING_ACTIVE ) m->active = max(a->active, b->active); | ||
1609 | if (what & ATA_TIMING_RECOVER) m->recover = max(a->recover, b->recover); | ||
1610 | if (what & ATA_TIMING_CYCLE ) m->cycle = max(a->cycle, b->cycle); | ||
1611 | if (what & ATA_TIMING_UDMA ) m->udma = max(a->udma, b->udma); | ||
1612 | } | ||
1613 | |||
1614 | static const struct ata_timing* ata_timing_find_mode(unsigned short speed) | ||
1615 | { | ||
1616 | const struct ata_timing *t; | ||
1617 | |||
1618 | for (t = ata_timing; t->mode != speed; t++) | ||
1619 | if (t->mode != 0xFF) | ||
1620 | return NULL; | ||
1621 | return t; | ||
1622 | } | ||
1623 | |||
1624 | int ata_timing_compute(struct ata_device *adev, unsigned short speed, | ||
1625 | struct ata_timing *t, int T, int UT) | ||
1626 | { | ||
1627 | const struct ata_timing *s; | ||
1628 | struct ata_timing p; | ||
1629 | |||
1630 | /* | ||
1631 | * Find the mode. | ||
1632 | */ | ||
1633 | |||
1634 | if (!(s = ata_timing_find_mode(speed))) | ||
1635 | return -EINVAL; | ||
1636 | |||
1637 | /* | ||
1638 | * If the drive is an EIDE drive, it can tell us it needs extended | ||
1639 | * PIO/MW_DMA cycle timing. | ||
1640 | */ | ||
1641 | |||
1642 | if (adev->id[ATA_ID_FIELD_VALID] & 2) { /* EIDE drive */ | ||
1643 | memset(&p, 0, sizeof(p)); | ||
1644 | if(speed >= XFER_PIO_0 && speed <= XFER_SW_DMA_0) { | ||
1645 | if (speed <= XFER_PIO_2) p.cycle = p.cyc8b = adev->id[ATA_ID_EIDE_PIO]; | ||
1646 | else p.cycle = p.cyc8b = adev->id[ATA_ID_EIDE_PIO_IORDY]; | ||
1647 | } else if(speed >= XFER_MW_DMA_0 && speed <= XFER_MW_DMA_2) { | ||
1648 | p.cycle = adev->id[ATA_ID_EIDE_DMA_MIN]; | ||
1649 | } | ||
1650 | ata_timing_merge(&p, t, t, ATA_TIMING_CYCLE | ATA_TIMING_CYC8B); | ||
1651 | } | ||
1652 | |||
1653 | /* | ||
1654 | * Convert the timing to bus clock counts. | ||
1655 | */ | ||
1656 | |||
1657 | ata_timing_quantize(s, t, T, UT); | ||
1658 | |||
1659 | /* | ||
1660 | * Even in DMA/UDMA modes we still use PIO access for IDENTIFY, S.M.A.R.T | ||
1661 | * and some other commands. We have to ensure that the DMA cycle timing is | ||
1662 | * slower/equal than the fastest PIO timing. | ||
1663 | */ | ||
1664 | |||
1665 | if (speed > XFER_PIO_4) { | ||
1666 | ata_timing_compute(adev, adev->pio_mode, &p, T, UT); | ||
1667 | ata_timing_merge(&p, t, t, ATA_TIMING_ALL); | ||
1668 | } | ||
1669 | |||
1670 | /* | ||
1671 | * Lenghten active & recovery time so that cycle time is correct. | ||
1672 | */ | ||
1673 | |||
1674 | if (t->act8b + t->rec8b < t->cyc8b) { | ||
1675 | t->act8b += (t->cyc8b - (t->act8b + t->rec8b)) / 2; | ||
1676 | t->rec8b = t->cyc8b - t->act8b; | ||
1677 | } | ||
1678 | |||
1679 | if (t->active + t->recover < t->cycle) { | ||
1680 | t->active += (t->cycle - (t->active + t->recover)) / 2; | ||
1681 | t->recover = t->cycle - t->active; | ||
1682 | } | ||
1683 | |||
1684 | return 0; | ||
1685 | } | ||
1686 | |||
1518 | static struct { | 1687 | static struct { |
1519 | unsigned int shift; | 1688 | unsigned int shift; |
1520 | u8 base; | 1689 | u8 base; |
@@ -4741,6 +4910,9 @@ EXPORT_SYMBOL_GPL(ata_dev_id_string); | |||
4741 | EXPORT_SYMBOL_GPL(ata_dev_config); | 4910 | EXPORT_SYMBOL_GPL(ata_dev_config); |
4742 | EXPORT_SYMBOL_GPL(ata_scsi_simulate); | 4911 | EXPORT_SYMBOL_GPL(ata_scsi_simulate); |
4743 | 4912 | ||
4913 | EXPORT_SYMBOL_GPL(ata_timing_compute); | ||
4914 | EXPORT_SYMBOL_GPL(ata_timing_merge); | ||
4915 | |||
4744 | #ifdef CONFIG_PCI | 4916 | #ifdef CONFIG_PCI |
4745 | EXPORT_SYMBOL_GPL(pci_test_config_bits); | 4917 | EXPORT_SYMBOL_GPL(pci_test_config_bits); |
4746 | EXPORT_SYMBOL_GPL(ata_pci_host_stop); | 4918 | EXPORT_SYMBOL_GPL(ata_pci_host_stop); |
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c index d457f5673476..9b6213928f7a 100644 --- a/drivers/scsi/sata_mv.c +++ b/drivers/scsi/sata_mv.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #include <asm/io.h> | 35 | #include <asm/io.h> |
36 | 36 | ||
37 | #define DRV_NAME "sata_mv" | 37 | #define DRV_NAME "sata_mv" |
38 | #define DRV_VERSION "0.24" | 38 | #define DRV_VERSION "0.25" |
39 | 39 | ||
40 | enum { | 40 | enum { |
41 | /* BAR's are enumerated in terms of pci_resource_start() terms */ | 41 | /* BAR's are enumerated in terms of pci_resource_start() terms */ |
@@ -800,7 +800,8 @@ static void mv_fill_sg(struct ata_queued_cmd *qc) | |||
800 | pp->sg_tbl[i].flags_size = cpu_to_le32(sg_len); | 800 | pp->sg_tbl[i].flags_size = cpu_to_le32(sg_len); |
801 | } | 801 | } |
802 | if (0 < qc->n_elem) { | 802 | if (0 < qc->n_elem) { |
803 | pp->sg_tbl[qc->n_elem - 1].flags_size |= EPRD_FLAG_END_OF_TBL; | 803 | pp->sg_tbl[qc->n_elem - 1].flags_size |= |
804 | cpu_to_le32(EPRD_FLAG_END_OF_TBL); | ||
804 | } | 805 | } |
805 | } | 806 | } |
806 | 807 | ||
diff --git a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c index 9fa2535dd937..8866530bc491 100644 --- a/drivers/scsi/sata_nv.c +++ b/drivers/scsi/sata_nv.c | |||
@@ -331,7 +331,7 @@ static u32 nv_scr_read (struct ata_port *ap, unsigned int sc_reg) | |||
331 | return 0xffffffffU; | 331 | return 0xffffffffU; |
332 | 332 | ||
333 | if (host->host_flags & NV_HOST_FLAGS_SCR_MMIO) | 333 | if (host->host_flags & NV_HOST_FLAGS_SCR_MMIO) |
334 | return readl((void*)ap->ioaddr.scr_addr + (sc_reg * 4)); | 334 | return readl((void __iomem *)ap->ioaddr.scr_addr + (sc_reg * 4)); |
335 | else | 335 | else |
336 | return inl(ap->ioaddr.scr_addr + (sc_reg * 4)); | 336 | return inl(ap->ioaddr.scr_addr + (sc_reg * 4)); |
337 | } | 337 | } |
@@ -345,7 +345,7 @@ static void nv_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) | |||
345 | return; | 345 | return; |
346 | 346 | ||
347 | if (host->host_flags & NV_HOST_FLAGS_SCR_MMIO) | 347 | if (host->host_flags & NV_HOST_FLAGS_SCR_MMIO) |
348 | writel(val, (void*)ap->ioaddr.scr_addr + (sc_reg * 4)); | 348 | writel(val, (void __iomem *)ap->ioaddr.scr_addr + (sc_reg * 4)); |
349 | else | 349 | else |
350 | outl(val, ap->ioaddr.scr_addr + (sc_reg * 4)); | 350 | outl(val, ap->ioaddr.scr_addr + (sc_reg * 4)); |
351 | } | 351 | } |
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index def7e0d9dacb..9bf8cbd29901 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c | |||
@@ -324,7 +324,7 @@ static u32 pdc_sata_scr_read (struct ata_port *ap, unsigned int sc_reg) | |||
324 | { | 324 | { |
325 | if (sc_reg > SCR_CONTROL) | 325 | if (sc_reg > SCR_CONTROL) |
326 | return 0xffffffffU; | 326 | return 0xffffffffU; |
327 | return readl((void *) ap->ioaddr.scr_addr + (sc_reg * 4)); | 327 | return readl((void __iomem *) ap->ioaddr.scr_addr + (sc_reg * 4)); |
328 | } | 328 | } |
329 | 329 | ||
330 | 330 | ||
@@ -333,7 +333,7 @@ static void pdc_sata_scr_write (struct ata_port *ap, unsigned int sc_reg, | |||
333 | { | 333 | { |
334 | if (sc_reg > SCR_CONTROL) | 334 | if (sc_reg > SCR_CONTROL) |
335 | return; | 335 | return; |
336 | writel(val, (void *) ap->ioaddr.scr_addr + (sc_reg * 4)); | 336 | writel(val, (void __iomem *) ap->ioaddr.scr_addr + (sc_reg * 4)); |
337 | } | 337 | } |
338 | 338 | ||
339 | static void pdc_qc_prep(struct ata_queued_cmd *qc) | 339 | static void pdc_qc_prep(struct ata_queued_cmd *qc) |
@@ -523,8 +523,8 @@ static inline void pdc_packet_start(struct ata_queued_cmd *qc) | |||
523 | 523 | ||
524 | pp->pkt[2] = seq; | 524 | pp->pkt[2] = seq; |
525 | wmb(); /* flush PRD, pkt writes */ | 525 | wmb(); /* flush PRD, pkt writes */ |
526 | writel(pp->pkt_dma, (void *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); | 526 | writel(pp->pkt_dma, (void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); |
527 | readl((void *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); /* flush */ | 527 | readl((void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); /* flush */ |
528 | } | 528 | } |
529 | 529 | ||
530 | static int pdc_qc_issue_prot(struct ata_queued_cmd *qc) | 530 | static int pdc_qc_issue_prot(struct ata_queued_cmd *qc) |
diff --git a/drivers/scsi/sata_qstor.c b/drivers/scsi/sata_qstor.c index ffcdeb68641c..e1c1dae27c52 100644 --- a/drivers/scsi/sata_qstor.c +++ b/drivers/scsi/sata_qstor.c | |||
@@ -51,8 +51,6 @@ enum { | |||
51 | QS_PRD_BYTES = QS_MAX_PRD * 16, | 51 | QS_PRD_BYTES = QS_MAX_PRD * 16, |
52 | QS_PKT_BYTES = QS_CPB_BYTES + QS_PRD_BYTES, | 52 | QS_PKT_BYTES = QS_CPB_BYTES + QS_PRD_BYTES, |
53 | 53 | ||
54 | QS_DMA_BOUNDARY = ~0UL, | ||
55 | |||
56 | /* global register offsets */ | 54 | /* global register offsets */ |
57 | QS_HCF_CNFG3 = 0x0003, /* host configuration offset */ | 55 | QS_HCF_CNFG3 = 0x0003, /* host configuration offset */ |
58 | QS_HID_HPHY = 0x0004, /* host physical interface info */ | 56 | QS_HID_HPHY = 0x0004, /* host physical interface info */ |
@@ -101,6 +99,10 @@ enum { | |||
101 | board_2068_idx = 0, /* QStor 4-port SATA/RAID */ | 99 | board_2068_idx = 0, /* QStor 4-port SATA/RAID */ |
102 | }; | 100 | }; |
103 | 101 | ||
102 | enum { | ||
103 | QS_DMA_BOUNDARY = ~0UL | ||
104 | }; | ||
105 | |||
104 | typedef enum { qs_state_idle, qs_state_pkt, qs_state_mmio } qs_state_t; | 106 | typedef enum { qs_state_idle, qs_state_pkt, qs_state_mmio } qs_state_t; |
105 | 107 | ||
106 | struct qs_port_priv { | 108 | struct qs_port_priv { |
diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c index ba98a175ee3a..f6f0184e1ac8 100644 --- a/drivers/scsi/sata_sil.c +++ b/drivers/scsi/sata_sil.c | |||
@@ -289,7 +289,7 @@ static inline unsigned long sil_scr_addr(struct ata_port *ap, unsigned int sc_re | |||
289 | 289 | ||
290 | static u32 sil_scr_read (struct ata_port *ap, unsigned int sc_reg) | 290 | static u32 sil_scr_read (struct ata_port *ap, unsigned int sc_reg) |
291 | { | 291 | { |
292 | void *mmio = (void *) sil_scr_addr(ap, sc_reg); | 292 | void __iomem *mmio = (void __iomem *) sil_scr_addr(ap, sc_reg); |
293 | if (mmio) | 293 | if (mmio) |
294 | return readl(mmio); | 294 | return readl(mmio); |
295 | return 0xffffffffU; | 295 | return 0xffffffffU; |
@@ -297,7 +297,7 @@ static u32 sil_scr_read (struct ata_port *ap, unsigned int sc_reg) | |||
297 | 297 | ||
298 | static void sil_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) | 298 | static void sil_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) |
299 | { | 299 | { |
300 | void *mmio = (void *) sil_scr_addr(ap, sc_reg); | 300 | void *mmio = (void __iomem *) sil_scr_addr(ap, sc_reg); |
301 | if (mmio) | 301 | if (mmio) |
302 | writel(val, mmio); | 302 | writel(val, mmio); |
303 | } | 303 | } |
diff --git a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c index 540a85191172..d6d350a0b5e9 100644 --- a/drivers/scsi/sata_sx4.c +++ b/drivers/scsi/sata_sx4.c | |||
@@ -137,7 +137,7 @@ struct pdc_port_priv { | |||
137 | }; | 137 | }; |
138 | 138 | ||
139 | struct pdc_host_priv { | 139 | struct pdc_host_priv { |
140 | void *dimm_mmio; | 140 | void __iomem *dimm_mmio; |
141 | 141 | ||
142 | unsigned int doing_hdma; | 142 | unsigned int doing_hdma; |
143 | unsigned int hdma_prod; | 143 | unsigned int hdma_prod; |
@@ -247,7 +247,7 @@ static void pdc20621_host_stop(struct ata_host_set *host_set) | |||
247 | { | 247 | { |
248 | struct pci_dev *pdev = to_pci_dev(host_set->dev); | 248 | struct pci_dev *pdev = to_pci_dev(host_set->dev); |
249 | struct pdc_host_priv *hpriv = host_set->private_data; | 249 | struct pdc_host_priv *hpriv = host_set->private_data; |
250 | void *dimm_mmio = hpriv->dimm_mmio; | 250 | void __iomem *dimm_mmio = hpriv->dimm_mmio; |
251 | 251 | ||
252 | pci_iounmap(pdev, dimm_mmio); | 252 | pci_iounmap(pdev, dimm_mmio); |
253 | kfree(hpriv); | 253 | kfree(hpriv); |
@@ -669,8 +669,8 @@ static void pdc20621_packet_start(struct ata_queued_cmd *qc) | |||
669 | readl(mmio + PDC_20621_SEQCTL + (seq * 4)); /* flush */ | 669 | readl(mmio + PDC_20621_SEQCTL + (seq * 4)); /* flush */ |
670 | 670 | ||
671 | writel(port_ofs + PDC_DIMM_ATA_PKT, | 671 | writel(port_ofs + PDC_DIMM_ATA_PKT, |
672 | (void *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); | 672 | (void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); |
673 | readl((void *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); | 673 | readl((void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); |
674 | VPRINTK("submitted ofs 0x%x (%u), seq %u\n", | 674 | VPRINTK("submitted ofs 0x%x (%u), seq %u\n", |
675 | port_ofs + PDC_DIMM_ATA_PKT, | 675 | port_ofs + PDC_DIMM_ATA_PKT, |
676 | port_ofs + PDC_DIMM_ATA_PKT, | 676 | port_ofs + PDC_DIMM_ATA_PKT, |
@@ -747,8 +747,8 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap, | |||
747 | writel(0x00000001, mmio + PDC_20621_SEQCTL + (seq * 4)); | 747 | writel(0x00000001, mmio + PDC_20621_SEQCTL + (seq * 4)); |
748 | readl(mmio + PDC_20621_SEQCTL + (seq * 4)); | 748 | readl(mmio + PDC_20621_SEQCTL + (seq * 4)); |
749 | writel(port_ofs + PDC_DIMM_ATA_PKT, | 749 | writel(port_ofs + PDC_DIMM_ATA_PKT, |
750 | (void *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); | 750 | (void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); |
751 | readl((void *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); | 751 | readl((void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); |
752 | } | 752 | } |
753 | 753 | ||
754 | /* step two - execute ATA command */ | 754 | /* step two - execute ATA command */ |
@@ -1014,7 +1014,7 @@ static void pdc20621_put_to_dimm(struct ata_probe_ent *pe, void *psource, | |||
1014 | idx++; | 1014 | idx++; |
1015 | dist = ((long)(s32)(window_size - (offset + size))) >= 0 ? size : | 1015 | dist = ((long)(s32)(window_size - (offset + size))) >= 0 ? size : |
1016 | (long) (window_size - offset); | 1016 | (long) (window_size - offset); |
1017 | memcpy_toio((char *) (dimm_mmio + offset / 4), (char *) psource, dist); | 1017 | memcpy_toio(dimm_mmio + offset / 4, psource, dist); |
1018 | writel(0x01, mmio + PDC_GENERAL_CTLR); | 1018 | writel(0x01, mmio + PDC_GENERAL_CTLR); |
1019 | readl(mmio + PDC_GENERAL_CTLR); | 1019 | readl(mmio + PDC_GENERAL_CTLR); |
1020 | 1020 | ||
@@ -1023,8 +1023,7 @@ static void pdc20621_put_to_dimm(struct ata_probe_ent *pe, void *psource, | |||
1023 | for (; (long) size >= (long) window_size ;) { | 1023 | for (; (long) size >= (long) window_size ;) { |
1024 | writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR); | 1024 | writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR); |
1025 | readl(mmio + PDC_DIMM_WINDOW_CTLR); | 1025 | readl(mmio + PDC_DIMM_WINDOW_CTLR); |
1026 | memcpy_toio((char *) (dimm_mmio), (char *) psource, | 1026 | memcpy_toio(dimm_mmio, psource, window_size / 4); |
1027 | window_size / 4); | ||
1028 | writel(0x01, mmio + PDC_GENERAL_CTLR); | 1027 | writel(0x01, mmio + PDC_GENERAL_CTLR); |
1029 | readl(mmio + PDC_GENERAL_CTLR); | 1028 | readl(mmio + PDC_GENERAL_CTLR); |
1030 | psource += window_size; | 1029 | psource += window_size; |
@@ -1035,7 +1034,7 @@ static void pdc20621_put_to_dimm(struct ata_probe_ent *pe, void *psource, | |||
1035 | if (size) { | 1034 | if (size) { |
1036 | writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR); | 1035 | writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR); |
1037 | readl(mmio + PDC_DIMM_WINDOW_CTLR); | 1036 | readl(mmio + PDC_DIMM_WINDOW_CTLR); |
1038 | memcpy_toio((char *) (dimm_mmio), (char *) psource, size / 4); | 1037 | memcpy_toio(dimm_mmio, psource, size / 4); |
1039 | writel(0x01, mmio + PDC_GENERAL_CTLR); | 1038 | writel(0x01, mmio + PDC_GENERAL_CTLR); |
1040 | readl(mmio + PDC_GENERAL_CTLR); | 1039 | readl(mmio + PDC_GENERAL_CTLR); |
1041 | } | 1040 | } |
diff --git a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c index cf94e0158a8d..877b9fda3965 100644 --- a/drivers/scsi/sata_vsc.c +++ b/drivers/scsi/sata_vsc.c | |||
@@ -86,7 +86,7 @@ static u32 vsc_sata_scr_read (struct ata_port *ap, unsigned int sc_reg) | |||
86 | { | 86 | { |
87 | if (sc_reg > SCR_CONTROL) | 87 | if (sc_reg > SCR_CONTROL) |
88 | return 0xffffffffU; | 88 | return 0xffffffffU; |
89 | return readl((void *) ap->ioaddr.scr_addr + (sc_reg * 4)); | 89 | return readl((void __iomem *) ap->ioaddr.scr_addr + (sc_reg * 4)); |
90 | } | 90 | } |
91 | 91 | ||
92 | 92 | ||
@@ -95,16 +95,16 @@ static void vsc_sata_scr_write (struct ata_port *ap, unsigned int sc_reg, | |||
95 | { | 95 | { |
96 | if (sc_reg > SCR_CONTROL) | 96 | if (sc_reg > SCR_CONTROL) |
97 | return; | 97 | return; |
98 | writel(val, (void *) ap->ioaddr.scr_addr + (sc_reg * 4)); | 98 | writel(val, (void __iomem *) ap->ioaddr.scr_addr + (sc_reg * 4)); |
99 | } | 99 | } |
100 | 100 | ||
101 | 101 | ||
102 | static void vsc_intr_mask_update(struct ata_port *ap, u8 ctl) | 102 | static void vsc_intr_mask_update(struct ata_port *ap, u8 ctl) |
103 | { | 103 | { |
104 | unsigned long mask_addr; | 104 | void __iomem *mask_addr; |
105 | u8 mask; | 105 | u8 mask; |
106 | 106 | ||
107 | mask_addr = (unsigned long) ap->host_set->mmio_base + | 107 | mask_addr = ap->host_set->mmio_base + |
108 | VSC_SATA_INT_MASK_OFFSET + ap->port_no; | 108 | VSC_SATA_INT_MASK_OFFSET + ap->port_no; |
109 | mask = readb(mask_addr); | 109 | mask = readb(mask_addr); |
110 | if (ctl & ATA_NIEN) | 110 | if (ctl & ATA_NIEN) |
@@ -283,7 +283,7 @@ static int __devinit vsc_sata_init_one (struct pci_dev *pdev, const struct pci_d | |||
283 | struct ata_probe_ent *probe_ent = NULL; | 283 | struct ata_probe_ent *probe_ent = NULL; |
284 | unsigned long base; | 284 | unsigned long base; |
285 | int pci_dev_busy = 0; | 285 | int pci_dev_busy = 0; |
286 | void *mmio_base; | 286 | void __iomem *mmio_base; |
287 | int rc; | 287 | int rc; |
288 | 288 | ||
289 | if (!printed_version++) | 289 | if (!printed_version++) |
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index ad5342165079..52b348c36d56 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -1645,6 +1645,8 @@ int scsi_error_handler(void *data) | |||
1645 | set_current_state(TASK_INTERRUPTIBLE); | 1645 | set_current_state(TASK_INTERRUPTIBLE); |
1646 | } | 1646 | } |
1647 | 1647 | ||
1648 | __set_current_state(TASK_RUNNING); | ||
1649 | |||
1648 | SCSI_LOG_ERROR_RECOVERY(1, printk("Error handler scsi_eh_%d" | 1650 | SCSI_LOG_ERROR_RECOVERY(1, printk("Error handler scsi_eh_%d" |
1649 | " exiting\n",shost->host_no)); | 1651 | " exiting\n",shost->host_no)); |
1650 | 1652 | ||
diff --git a/drivers/serial/8250_pnp.c b/drivers/serial/8250_pnp.c index c2786fc41cc5..5d8660a42b77 100644 --- a/drivers/serial/8250_pnp.c +++ b/drivers/serial/8250_pnp.c | |||
@@ -276,6 +276,8 @@ static const struct pnp_device_id pnp_dev_table[] = { | |||
276 | { "SUP1620", 0 }, | 276 | { "SUP1620", 0 }, |
277 | /* SupraExpress 33.6 Data/Fax PnP modem */ | 277 | /* SupraExpress 33.6 Data/Fax PnP modem */ |
278 | { "SUP1760", 0 }, | 278 | { "SUP1760", 0 }, |
279 | /* SupraExpress 56i Sp Intl */ | ||
280 | { "SUP2171", 0 }, | ||
279 | /* Phoebe Micro */ | 281 | /* Phoebe Micro */ |
280 | /* Phoebe Micro 33.6 Data Fax 1433VQH Plug & Play */ | 282 | /* Phoebe Micro 33.6 Data Fax 1433VQH Plug & Play */ |
281 | { "TEX0011", 0 }, | 283 | { "TEX0011", 0 }, |
diff --git a/drivers/video/logo/.gitignore b/drivers/video/logo/.gitignore new file mode 100644 index 000000000000..e48355f538fa --- /dev/null +++ b/drivers/video/logo/.gitignore | |||
@@ -0,0 +1,7 @@ | |||
1 | # | ||
2 | # Generated files | ||
3 | # | ||
4 | *_mono.c | ||
5 | *_vga16.c | ||
6 | *_clut224.c | ||
7 | *_gray256.c | ||
diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c index 1ca80264c7b0..b1243da55fc5 100644 --- a/drivers/video/vesafb.c +++ b/drivers/video/vesafb.c | |||
@@ -96,14 +96,14 @@ static int vesafb_blank(int blank, struct fb_info *info) | |||
96 | int loop = 10000; | 96 | int loop = 10000; |
97 | u8 seq = 0, crtc17 = 0; | 97 | u8 seq = 0, crtc17 = 0; |
98 | 98 | ||
99 | err = 0; | 99 | if (blank == FB_BLANK_POWERDOWN) { |
100 | |||
101 | if (blank) { | ||
102 | seq = 0x20; | 100 | seq = 0x20; |
103 | crtc17 = 0x00; | 101 | crtc17 = 0x00; |
102 | err = 0; | ||
104 | } else { | 103 | } else { |
105 | seq = 0x00; | 104 | seq = 0x00; |
106 | crtc17 = 0x80; | 105 | crtc17 = 0x80; |
106 | err = (blank == FB_BLANK_UNBLANK) ? 0 : -EINVAL; | ||
107 | } | 107 | } |
108 | 108 | ||
109 | vga_wseq(NULL, 0x00, 0x01); | 109 | vga_wseq(NULL, 0x00, 0x01); |