aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/agp/intel-agp.c14
-rw-r--r--drivers/hid/hid-core.c2
-rw-r--r--drivers/ide/ide-cd.c9
-rw-r--r--drivers/ide/ide-io.c6
-rw-r--r--drivers/ide/ide-iops.c2
-rw-r--r--drivers/ide/ide.c2
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_cm.c2
-rw-r--r--drivers/infiniband/ulp/iser/iscsi_iser.h1
-rw-r--r--drivers/infiniband/ulp/iser/iser_verbs.c40
-rw-r--r--drivers/net/sc92031.c20
10 files changed, 58 insertions, 40 deletions
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index e542a628f1c7..a9fdbf9126ca 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -18,11 +18,14 @@
18#define PCI_DEVICE_ID_INTEL_82965Q_IG 0x2992 18#define PCI_DEVICE_ID_INTEL_82965Q_IG 0x2992
19#define PCI_DEVICE_ID_INTEL_82965G_HB 0x29A0 19#define PCI_DEVICE_ID_INTEL_82965G_HB 0x29A0
20#define PCI_DEVICE_ID_INTEL_82965G_IG 0x29A2 20#define PCI_DEVICE_ID_INTEL_82965G_IG 0x29A2
21#define PCI_DEVICE_ID_INTEL_82965GM_HB 0x2A00
22#define PCI_DEVICE_ID_INTEL_82965GM_IG 0x2A02
21 23
22#define IS_I965 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82946GZ_HB || \ 24#define IS_I965 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82946GZ_HB || \
23 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_1_HB || \ 25 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_1_HB || \
24 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965Q_HB || \ 26 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965Q_HB || \
25 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB) 27 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB || \
28 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GM_HB)
26 29
27 30
28extern int agp_memory_reserved; 31extern int agp_memory_reserved;
@@ -1921,7 +1924,13 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev,
1921 bridge->driver = &intel_845_driver; 1924 bridge->driver = &intel_845_driver;
1922 name = "965G"; 1925 name = "965G";
1923 break; 1926 break;
1924 1927 case PCI_DEVICE_ID_INTEL_82965GM_HB:
1928 if (find_i830(PCI_DEVICE_ID_INTEL_82965GM_IG))
1929 bridge->driver = &intel_i965_driver;
1930 else
1931 bridge->driver = &intel_845_driver;
1932 name = "965GM";
1933 break;
1925 case PCI_DEVICE_ID_INTEL_7505_0: 1934 case PCI_DEVICE_ID_INTEL_7505_0:
1926 bridge->driver = &intel_7505_driver; 1935 bridge->driver = &intel_7505_driver;
1927 name = "E7505"; 1936 name = "E7505";
@@ -2080,6 +2089,7 @@ static struct pci_device_id agp_intel_pci_table[] = {
2080 ID(PCI_DEVICE_ID_INTEL_82965G_1_HB), 2089 ID(PCI_DEVICE_ID_INTEL_82965G_1_HB),
2081 ID(PCI_DEVICE_ID_INTEL_82965Q_HB), 2090 ID(PCI_DEVICE_ID_INTEL_82965Q_HB),
2082 ID(PCI_DEVICE_ID_INTEL_82965G_HB), 2091 ID(PCI_DEVICE_ID_INTEL_82965G_HB),
2092 ID(PCI_DEVICE_ID_INTEL_82965GM_HB),
2083 { } 2093 { }
2084}; 2094};
2085 2095
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 67f3347afcf3..1cca32f46947 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -969,7 +969,7 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i
969 969
970 if (size < rsize) { 970 if (size < rsize) {
971 dbg("report %d is too short, (%d < %d)", report->id, size, rsize); 971 dbg("report %d is too short, (%d < %d)", report->id, size, rsize);
972 return -1; 972 memset(data + size, 0, rsize - size);
973 } 973 }
974 974
975 if ((hid->claimed & HID_CLAIMED_HIDDEV) && hid->hiddev_report_event) 975 if ((hid->claimed & HID_CLAIMED_HIDDEV) && hid->hiddev_report_event)
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 45a928c058cf..638becda81c6 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -735,6 +735,15 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret)
735 cdrom_saw_media_change (drive); 735 cdrom_saw_media_change (drive);
736 /*printk("%s: media changed\n",drive->name);*/ 736 /*printk("%s: media changed\n",drive->name);*/
737 return 0; 737 return 0;
738 } else if ((sense_key == ILLEGAL_REQUEST) &&
739 (rq->cmd[0] == GPCMD_START_STOP_UNIT)) {
740 /*
741 * Don't print error message for this condition--
742 * SFF8090i indicates that 5/24/00 is the correct
743 * response to a request to close the tray if the
744 * drive doesn't have that capability.
745 * cdrom_log_sense() knows this!
746 */
738 } else if (!(rq->cmd_flags & REQ_QUIET)) { 747 } else if (!(rq->cmd_flags & REQ_QUIET)) {
739 /* Otherwise, print an error. */ 748 /* Otherwise, print an error. */
740 ide_dump_status(drive, "packet command error", stat); 749 ide_dump_status(drive, "packet command error", stat);
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 0e0280076fcd..8670112f1d39 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -1226,6 +1226,7 @@ static void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq)
1226#endif 1226#endif
1227 /* so that ide_timer_expiry knows what to do */ 1227 /* so that ide_timer_expiry knows what to do */
1228 hwgroup->sleeping = 1; 1228 hwgroup->sleeping = 1;
1229 hwgroup->req_gen_timer = hwgroup->req_gen;
1229 mod_timer(&hwgroup->timer, sleep); 1230 mod_timer(&hwgroup->timer, sleep);
1230 /* we purposely leave hwgroup->busy==1 1231 /* we purposely leave hwgroup->busy==1
1231 * while sleeping */ 1232 * while sleeping */
@@ -1411,7 +1412,8 @@ void ide_timer_expiry (unsigned long data)
1411 1412
1412 spin_lock_irqsave(&ide_lock, flags); 1413 spin_lock_irqsave(&ide_lock, flags);
1413 1414
1414 if ((handler = hwgroup->handler) == NULL) { 1415 if (((handler = hwgroup->handler) == NULL) ||
1416 (hwgroup->req_gen != hwgroup->req_gen_timer)) {
1415 /* 1417 /*
1416 * Either a marginal timeout occurred 1418 * Either a marginal timeout occurred
1417 * (got the interrupt just as timer expired), 1419 * (got the interrupt just as timer expired),
@@ -1439,6 +1441,7 @@ void ide_timer_expiry (unsigned long data)
1439 if ((wait = expiry(drive)) > 0) { 1441 if ((wait = expiry(drive)) > 0) {
1440 /* reset timer */ 1442 /* reset timer */
1441 hwgroup->timer.expires = jiffies + wait; 1443 hwgroup->timer.expires = jiffies + wait;
1444 hwgroup->req_gen_timer = hwgroup->req_gen;
1442 add_timer(&hwgroup->timer); 1445 add_timer(&hwgroup->timer);
1443 spin_unlock_irqrestore(&ide_lock, flags); 1446 spin_unlock_irqrestore(&ide_lock, flags);
1444 return; 1447 return;
@@ -1653,6 +1656,7 @@ irqreturn_t ide_intr (int irq, void *dev_id)
1653 printk(KERN_ERR "%s: ide_intr: hwgroup->busy was 0 ??\n", drive->name); 1656 printk(KERN_ERR "%s: ide_intr: hwgroup->busy was 0 ??\n", drive->name);
1654 } 1657 }
1655 hwgroup->handler = NULL; 1658 hwgroup->handler = NULL;
1659 hwgroup->req_gen++;
1656 del_timer(&hwgroup->timer); 1660 del_timer(&hwgroup->timer);
1657 spin_unlock(&ide_lock); 1661 spin_unlock(&ide_lock);
1658 1662
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 1ee53a551c3a..3caa176b3155 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -889,6 +889,7 @@ static void __ide_set_handler (ide_drive_t *drive, ide_handler_t *handler,
889 hwgroup->handler = handler; 889 hwgroup->handler = handler;
890 hwgroup->expiry = expiry; 890 hwgroup->expiry = expiry;
891 hwgroup->timer.expires = jiffies + timeout; 891 hwgroup->timer.expires = jiffies + timeout;
892 hwgroup->req_gen_timer = hwgroup->req_gen;
892 add_timer(&hwgroup->timer); 893 add_timer(&hwgroup->timer);
893} 894}
894 895
@@ -929,6 +930,7 @@ void ide_execute_command(ide_drive_t *drive, task_ioreg_t cmd, ide_handler_t *ha
929 hwgroup->handler = handler; 930 hwgroup->handler = handler;
930 hwgroup->expiry = expiry; 931 hwgroup->expiry = expiry;
931 hwgroup->timer.expires = jiffies + timeout; 932 hwgroup->timer.expires = jiffies + timeout;
933 hwgroup->req_gen_timer = hwgroup->req_gen;
932 add_timer(&hwgroup->timer); 934 add_timer(&hwgroup->timer);
933 hwif->OUTBSYNC(drive, cmd, IDE_COMMAND_REG); 935 hwif->OUTBSYNC(drive, cmd, IDE_COMMAND_REG);
934 /* Drive takes 400nS to respond, we must avoid the IRQ being 936 /* Drive takes 400nS to respond, we must avoid the IRQ being
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index a6f098fda884..ae5bf2be6f52 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -1962,6 +1962,8 @@ static char *media_string(ide_drive_t *drive)
1962 return "tape"; 1962 return "tape";
1963 case ide_floppy: 1963 case ide_floppy:
1964 return "floppy"; 1964 return "floppy";
1965 case ide_optical:
1966 return "optical";
1965 default: 1967 default:
1966 return "UNKNOWN"; 1968 return "UNKNOWN";
1967 } 1969 }
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
index e70492db74f6..2b242a4823f8 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
@@ -131,7 +131,7 @@ static struct sk_buff *ipoib_cm_alloc_rx_skb(struct net_device *dev, int id, int
131 skb_fill_page_desc(skb, i, page, 0, PAGE_SIZE); 131 skb_fill_page_desc(skb, i, page, 0, PAGE_SIZE);
132 132
133 mapping[i + 1] = ib_dma_map_page(priv->ca, skb_shinfo(skb)->frags[i].page, 133 mapping[i + 1] = ib_dma_map_page(priv->ca, skb_shinfo(skb)->frags[i].page,
134 0, PAGE_SIZE, DMA_TO_DEVICE); 134 0, PAGE_SIZE, DMA_FROM_DEVICE);
135 if (unlikely(ib_dma_mapping_error(priv->ca, mapping[i + 1]))) 135 if (unlikely(ib_dma_mapping_error(priv->ca, mapping[i + 1])))
136 goto partial_error; 136 goto partial_error;
137 } 137 }
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h
index cae8c96a55f8..8960196ffb0f 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.h
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.h
@@ -245,7 +245,6 @@ struct iser_conn {
245 wait_queue_head_t wait; /* waitq for conn/disconn */ 245 wait_queue_head_t wait; /* waitq for conn/disconn */
246 atomic_t post_recv_buf_count; /* posted rx count */ 246 atomic_t post_recv_buf_count; /* posted rx count */
247 atomic_t post_send_buf_count; /* posted tx count */ 247 atomic_t post_send_buf_count; /* posted tx count */
248 struct work_struct comperror_work; /* conn term sleepable ctx*/
249 char name[ISER_OBJECT_NAME_SIZE]; 248 char name[ISER_OBJECT_NAME_SIZE];
250 struct iser_page_vec *page_vec; /* represents SG to fmr maps* 249 struct iser_page_vec *page_vec; /* represents SG to fmr maps*
251 * maps serialized as tx is*/ 250 * maps serialized as tx is*/
diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c
index 693b77002897..1fc967464a28 100644
--- a/drivers/infiniband/ulp/iser/iser_verbs.c
+++ b/drivers/infiniband/ulp/iser/iser_verbs.c
@@ -48,7 +48,6 @@
48 48
49static void iser_cq_tasklet_fn(unsigned long data); 49static void iser_cq_tasklet_fn(unsigned long data);
50static void iser_cq_callback(struct ib_cq *cq, void *cq_context); 50static void iser_cq_callback(struct ib_cq *cq, void *cq_context);
51static void iser_comp_error_worker(struct work_struct *work);
52 51
53static void iser_cq_event_callback(struct ib_event *cause, void *context) 52static void iser_cq_event_callback(struct ib_event *cause, void *context)
54{ 53{
@@ -480,7 +479,6 @@ int iser_conn_init(struct iser_conn **ibconn)
480 init_waitqueue_head(&ib_conn->wait); 479 init_waitqueue_head(&ib_conn->wait);
481 atomic_set(&ib_conn->post_recv_buf_count, 0); 480 atomic_set(&ib_conn->post_recv_buf_count, 0);
482 atomic_set(&ib_conn->post_send_buf_count, 0); 481 atomic_set(&ib_conn->post_send_buf_count, 0);
483 INIT_WORK(&ib_conn->comperror_work, iser_comp_error_worker);
484 INIT_LIST_HEAD(&ib_conn->conn_list); 482 INIT_LIST_HEAD(&ib_conn->conn_list);
485 spin_lock_init(&ib_conn->lock); 483 spin_lock_init(&ib_conn->lock);
486 484
@@ -753,26 +751,6 @@ int iser_post_send(struct iser_desc *tx_desc)
753 return ret_val; 751 return ret_val;
754} 752}
755 753
756static void iser_comp_error_worker(struct work_struct *work)
757{
758 struct iser_conn *ib_conn =
759 container_of(work, struct iser_conn, comperror_work);
760
761 /* getting here when the state is UP means that the conn is being *
762 * terminated asynchronously from the iSCSI layer's perspective. */
763 if (iser_conn_state_comp_exch(ib_conn, ISER_CONN_UP,
764 ISER_CONN_TERMINATING))
765 iscsi_conn_failure(ib_conn->iser_conn->iscsi_conn,
766 ISCSI_ERR_CONN_FAILED);
767
768 /* complete the termination process if disconnect event was delivered *
769 * note there are no more non completed posts to the QP */
770 if (ib_conn->disc_evt_flag) {
771 ib_conn->state = ISER_CONN_DOWN;
772 wake_up_interruptible(&ib_conn->wait);
773 }
774}
775
776static void iser_handle_comp_error(struct iser_desc *desc) 754static void iser_handle_comp_error(struct iser_desc *desc)
777{ 755{
778 struct iser_dto *dto = &desc->dto; 756 struct iser_dto *dto = &desc->dto;
@@ -791,8 +769,22 @@ static void iser_handle_comp_error(struct iser_desc *desc)
791 } 769 }
792 770
793 if (atomic_read(&ib_conn->post_recv_buf_count) == 0 && 771 if (atomic_read(&ib_conn->post_recv_buf_count) == 0 &&
794 atomic_read(&ib_conn->post_send_buf_count) == 0) 772 atomic_read(&ib_conn->post_send_buf_count) == 0) {
795 schedule_work(&ib_conn->comperror_work); 773 /* getting here when the state is UP means that the conn is *
774 * being terminated asynchronously from the iSCSI layer's *
775 * perspective. */
776 if (iser_conn_state_comp_exch(ib_conn, ISER_CONN_UP,
777 ISER_CONN_TERMINATING))
778 iscsi_conn_failure(ib_conn->iser_conn->iscsi_conn,
779 ISCSI_ERR_CONN_FAILED);
780
781 /* complete the termination process if disconnect event was delivered *
782 * note there are no more non completed posts to the QP */
783 if (ib_conn->disc_evt_flag) {
784 ib_conn->state = ISER_CONN_DOWN;
785 wake_up_interruptible(&ib_conn->wait);
786 }
787 }
796} 788}
797 789
798static void iser_cq_tasklet_fn(unsigned long data) 790static void iser_cq_tasklet_fn(unsigned long data)
diff --git a/drivers/net/sc92031.c b/drivers/net/sc92031.c
index 4a926f20b6ea..c32c21af3fdd 100644
--- a/drivers/net/sc92031.c
+++ b/drivers/net/sc92031.c
@@ -964,7 +964,7 @@ static int sc92031_start_xmit(struct sk_buff *skb, struct net_device *dev)
964 goto out; 964 goto out;
965 } 965 }
966 966
967 spin_lock_bh(&priv->lock); 967 spin_lock(&priv->lock);
968 968
969 if (unlikely(!netif_carrier_ok(dev))) { 969 if (unlikely(!netif_carrier_ok(dev))) {
970 err = -ENOLINK; 970 err = -ENOLINK;
@@ -1005,7 +1005,7 @@ static int sc92031_start_xmit(struct sk_buff *skb, struct net_device *dev)
1005 netif_stop_queue(dev); 1005 netif_stop_queue(dev);
1006 1006
1007out_unlock: 1007out_unlock:
1008 spin_unlock_bh(&priv->lock); 1008 spin_unlock(&priv->lock);
1009 1009
1010out: 1010out:
1011 dev_kfree_skb(skb); 1011 dev_kfree_skb(skb);
@@ -1042,12 +1042,12 @@ static int sc92031_open(struct net_device *dev)
1042 priv->pm_config = 0; 1042 priv->pm_config = 0;
1043 1043
1044 /* Interrupts already disabled by sc92031_stop or sc92031_probe */ 1044 /* Interrupts already disabled by sc92031_stop or sc92031_probe */
1045 spin_lock(&priv->lock); 1045 spin_lock_bh(&priv->lock);
1046 1046
1047 _sc92031_reset(dev); 1047 _sc92031_reset(dev);
1048 mmiowb(); 1048 mmiowb();
1049 1049
1050 spin_unlock(&priv->lock); 1050 spin_unlock_bh(&priv->lock);
1051 sc92031_enable_interrupts(dev); 1051 sc92031_enable_interrupts(dev);
1052 1052
1053 if (netif_carrier_ok(dev)) 1053 if (netif_carrier_ok(dev))
@@ -1077,13 +1077,13 @@ static int sc92031_stop(struct net_device *dev)
1077 /* Disable interrupts, stop Tx and Rx. */ 1077 /* Disable interrupts, stop Tx and Rx. */
1078 sc92031_disable_interrupts(dev); 1078 sc92031_disable_interrupts(dev);
1079 1079
1080 spin_lock(&priv->lock); 1080 spin_lock_bh(&priv->lock);
1081 1081
1082 _sc92031_disable_tx_rx(dev); 1082 _sc92031_disable_tx_rx(dev);
1083 _sc92031_tx_clear(dev); 1083 _sc92031_tx_clear(dev);
1084 mmiowb(); 1084 mmiowb();
1085 1085
1086 spin_unlock(&priv->lock); 1086 spin_unlock_bh(&priv->lock);
1087 1087
1088 free_irq(pdev->irq, dev); 1088 free_irq(pdev->irq, dev);
1089 pci_free_consistent(pdev, TX_BUF_TOT_LEN, priv->tx_bufs, 1089 pci_free_consistent(pdev, TX_BUF_TOT_LEN, priv->tx_bufs,
@@ -1539,13 +1539,13 @@ static int sc92031_suspend(struct pci_dev *pdev, pm_message_t state)
1539 /* Disable interrupts, stop Tx and Rx. */ 1539 /* Disable interrupts, stop Tx and Rx. */
1540 sc92031_disable_interrupts(dev); 1540 sc92031_disable_interrupts(dev);
1541 1541
1542 spin_lock(&priv->lock); 1542 spin_lock_bh(&priv->lock);
1543 1543
1544 _sc92031_disable_tx_rx(dev); 1544 _sc92031_disable_tx_rx(dev);
1545 _sc92031_tx_clear(dev); 1545 _sc92031_tx_clear(dev);
1546 mmiowb(); 1546 mmiowb();
1547 1547
1548 spin_unlock(&priv->lock); 1548 spin_unlock_bh(&priv->lock);
1549 1549
1550out: 1550out:
1551 pci_set_power_state(pdev, pci_choose_state(pdev, state)); 1551 pci_set_power_state(pdev, pci_choose_state(pdev, state));
@@ -1565,12 +1565,12 @@ static int sc92031_resume(struct pci_dev *pdev)
1565 goto out; 1565 goto out;
1566 1566
1567 /* Interrupts already disabled by sc92031_suspend */ 1567 /* Interrupts already disabled by sc92031_suspend */
1568 spin_lock(&priv->lock); 1568 spin_lock_bh(&priv->lock);
1569 1569
1570 _sc92031_reset(dev); 1570 _sc92031_reset(dev);
1571 mmiowb(); 1571 mmiowb();
1572 1572
1573 spin_unlock(&priv->lock); 1573 spin_unlock_bh(&priv->lock);
1574 sc92031_enable_interrupts(dev); 1574 sc92031_enable_interrupts(dev);
1575 1575
1576 netif_device_attach(dev); 1576 netif_device_attach(dev);