diff options
Diffstat (limited to 'drivers/firewire')
-rw-r--r-- | drivers/firewire/core-cdev.c | 1 | ||||
-rw-r--r-- | drivers/firewire/core-device.c | 2 | ||||
-rw-r--r-- | drivers/firewire/core-topology.c | 2 | ||||
-rw-r--r-- | drivers/firewire/net.c | 6 | ||||
-rw-r--r-- | drivers/firewire/ohci.c | 41 |
5 files changed, 40 insertions, 12 deletions
diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c index e7290928a900..231e6ee5ba43 100644 --- a/drivers/firewire/core-cdev.c +++ b/drivers/firewire/core-cdev.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/mutex.h> | 33 | #include <linux/mutex.h> |
34 | #include <linux/poll.h> | 34 | #include <linux/poll.h> |
35 | #include <linux/preempt.h> | 35 | #include <linux/preempt.h> |
36 | #include <linux/sched.h> | ||
36 | #include <linux/spinlock.h> | 37 | #include <linux/spinlock.h> |
37 | #include <linux/time.h> | 38 | #include <linux/time.h> |
38 | #include <linux/uaccess.h> | 39 | #include <linux/uaccess.h> |
diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c index 97e656af2d22..9d0dfcbe2c1c 100644 --- a/drivers/firewire/core-device.c +++ b/drivers/firewire/core-device.c | |||
@@ -312,7 +312,7 @@ static void init_fw_attribute_group(struct device *dev, | |||
312 | group->groups[0] = &group->group; | 312 | group->groups[0] = &group->group; |
313 | group->groups[1] = NULL; | 313 | group->groups[1] = NULL; |
314 | group->group.attrs = group->attrs; | 314 | group->group.attrs = group->attrs; |
315 | dev->groups = group->groups; | 315 | dev->groups = (const struct attribute_group **) group->groups; |
316 | } | 316 | } |
317 | 317 | ||
318 | static ssize_t modalias_show(struct device *dev, | 318 | static ssize_t modalias_show(struct device *dev, |
diff --git a/drivers/firewire/core-topology.c b/drivers/firewire/core-topology.c index 9a5f38c80b0e..93ec64cdeef7 100644 --- a/drivers/firewire/core-topology.c +++ b/drivers/firewire/core-topology.c | |||
@@ -183,7 +183,7 @@ static inline struct fw_node *fw_node(struct list_head *l) | |||
183 | * This function builds the tree representation of the topology given | 183 | * This function builds the tree representation of the topology given |
184 | * by the self IDs from the latest bus reset. During the construction | 184 | * by the self IDs from the latest bus reset. During the construction |
185 | * of the tree, the function checks that the self IDs are valid and | 185 | * of the tree, the function checks that the self IDs are valid and |
186 | * internally consistent. On succcess this function returns the | 186 | * internally consistent. On success this function returns the |
187 | * fw_node corresponding to the local card otherwise NULL. | 187 | * fw_node corresponding to the local card otherwise NULL. |
188 | */ | 188 | */ |
189 | static struct fw_node *build_tree(struct fw_card *card, | 189 | static struct fw_node *build_tree(struct fw_card *card, |
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c index a42209a73aed..cbaf420c36c5 100644 --- a/drivers/firewire/net.c +++ b/drivers/firewire/net.c | |||
@@ -663,8 +663,6 @@ static int fwnet_finish_incoming_packet(struct net_device *net, | |||
663 | if (netif_queue_stopped(net)) | 663 | if (netif_queue_stopped(net)) |
664 | netif_wake_queue(net); | 664 | netif_wake_queue(net); |
665 | 665 | ||
666 | net->last_rx = jiffies; | ||
667 | |||
668 | return 0; | 666 | return 0; |
669 | } | 667 | } |
670 | 668 | ||
@@ -1188,7 +1186,7 @@ static int fwnet_stop(struct net_device *net) | |||
1188 | return 0; | 1186 | return 0; |
1189 | } | 1187 | } |
1190 | 1188 | ||
1191 | static int fwnet_tx(struct sk_buff *skb, struct net_device *net) | 1189 | static netdev_tx_t fwnet_tx(struct sk_buff *skb, struct net_device *net) |
1192 | { | 1190 | { |
1193 | struct fwnet_header hdr_buf; | 1191 | struct fwnet_header hdr_buf; |
1194 | struct fwnet_device *dev = netdev_priv(net); | 1192 | struct fwnet_device *dev = netdev_priv(net); |
@@ -1342,7 +1340,7 @@ static void fwnet_get_drvinfo(struct net_device *net, | |||
1342 | strcpy(info->bus_info, "ieee1394"); | 1340 | strcpy(info->bus_info, "ieee1394"); |
1343 | } | 1341 | } |
1344 | 1342 | ||
1345 | static struct ethtool_ops fwnet_ethtool_ops = { | 1343 | static const struct ethtool_ops fwnet_ethtool_ops = { |
1346 | .get_drvinfo = fwnet_get_drvinfo, | 1344 | .get_drvinfo = fwnet_get_drvinfo, |
1347 | }; | 1345 | }; |
1348 | 1346 | ||
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 553c74e1e4e3..96768e160866 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c | |||
@@ -275,7 +275,7 @@ static void log_irqs(u32 evt) | |||
275 | !(evt & OHCI1394_busReset)) | 275 | !(evt & OHCI1394_busReset)) |
276 | return; | 276 | return; |
277 | 277 | ||
278 | fw_notify("IRQ %08x%s%s%s%s%s%s%s%s%s%s%s%s%s\n", evt, | 278 | fw_notify("IRQ %08x%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", evt, |
279 | evt & OHCI1394_selfIDComplete ? " selfID" : "", | 279 | evt & OHCI1394_selfIDComplete ? " selfID" : "", |
280 | evt & OHCI1394_RQPkt ? " AR_req" : "", | 280 | evt & OHCI1394_RQPkt ? " AR_req" : "", |
281 | evt & OHCI1394_RSPkt ? " AR_resp" : "", | 281 | evt & OHCI1394_RSPkt ? " AR_resp" : "", |
@@ -286,6 +286,7 @@ static void log_irqs(u32 evt) | |||
286 | evt & OHCI1394_postedWriteErr ? " postedWriteErr" : "", | 286 | evt & OHCI1394_postedWriteErr ? " postedWriteErr" : "", |
287 | evt & OHCI1394_cycleTooLong ? " cycleTooLong" : "", | 287 | evt & OHCI1394_cycleTooLong ? " cycleTooLong" : "", |
288 | evt & OHCI1394_cycle64Seconds ? " cycle64Seconds" : "", | 288 | evt & OHCI1394_cycle64Seconds ? " cycle64Seconds" : "", |
289 | evt & OHCI1394_cycleInconsistent ? " cycleInconsistent" : "", | ||
289 | evt & OHCI1394_regAccessFail ? " regAccessFail" : "", | 290 | evt & OHCI1394_regAccessFail ? " regAccessFail" : "", |
290 | evt & OHCI1394_busReset ? " busReset" : "", | 291 | evt & OHCI1394_busReset ? " busReset" : "", |
291 | evt & ~(OHCI1394_selfIDComplete | OHCI1394_RQPkt | | 292 | evt & ~(OHCI1394_selfIDComplete | OHCI1394_RQPkt | |
@@ -293,6 +294,7 @@ static void log_irqs(u32 evt) | |||
293 | OHCI1394_respTxComplete | OHCI1394_isochRx | | 294 | OHCI1394_respTxComplete | OHCI1394_isochRx | |
294 | OHCI1394_isochTx | OHCI1394_postedWriteErr | | 295 | OHCI1394_isochTx | OHCI1394_postedWriteErr | |
295 | OHCI1394_cycleTooLong | OHCI1394_cycle64Seconds | | 296 | OHCI1394_cycleTooLong | OHCI1394_cycle64Seconds | |
297 | OHCI1394_cycleInconsistent | | ||
296 | OHCI1394_regAccessFail | OHCI1394_busReset) | 298 | OHCI1394_regAccessFail | OHCI1394_busReset) |
297 | ? " ?" : ""); | 299 | ? " ?" : ""); |
298 | } | 300 | } |
@@ -1441,6 +1443,17 @@ static irqreturn_t irq_handler(int irq, void *data) | |||
1441 | OHCI1394_LinkControl_cycleMaster); | 1443 | OHCI1394_LinkControl_cycleMaster); |
1442 | } | 1444 | } |
1443 | 1445 | ||
1446 | if (unlikely(event & OHCI1394_cycleInconsistent)) { | ||
1447 | /* | ||
1448 | * We need to clear this event bit in order to make | ||
1449 | * cycleMatch isochronous I/O work. In theory we should | ||
1450 | * stop active cycleMatch iso contexts now and restart | ||
1451 | * them at least two cycles later. (FIXME?) | ||
1452 | */ | ||
1453 | if (printk_ratelimit()) | ||
1454 | fw_notify("isochronous cycle inconsistent\n"); | ||
1455 | } | ||
1456 | |||
1444 | if (event & OHCI1394_cycle64Seconds) { | 1457 | if (event & OHCI1394_cycle64Seconds) { |
1445 | cycle_time = reg_read(ohci, OHCI1394_IsochronousCycleTimer); | 1458 | cycle_time = reg_read(ohci, OHCI1394_IsochronousCycleTimer); |
1446 | if ((cycle_time & 0x80000000) == 0) | 1459 | if ((cycle_time & 0x80000000) == 0) |
@@ -1540,6 +1553,7 @@ static int ohci_enable(struct fw_card *card, | |||
1540 | OHCI1394_reqTxComplete | OHCI1394_respTxComplete | | 1553 | OHCI1394_reqTxComplete | OHCI1394_respTxComplete | |
1541 | OHCI1394_isochRx | OHCI1394_isochTx | | 1554 | OHCI1394_isochRx | OHCI1394_isochTx | |
1542 | OHCI1394_postedWriteErr | OHCI1394_cycleTooLong | | 1555 | OHCI1394_postedWriteErr | OHCI1394_cycleTooLong | |
1556 | OHCI1394_cycleInconsistent | | ||
1543 | OHCI1394_cycle64Seconds | OHCI1394_regAccessFail | | 1557 | OHCI1394_cycle64Seconds | OHCI1394_regAccessFail | |
1544 | OHCI1394_masterIntEnable); | 1558 | OHCI1394_masterIntEnable); |
1545 | if (param_debug & OHCI_PARAM_DEBUG_BUSRESETS) | 1559 | if (param_debug & OHCI_PARAM_DEBUG_BUSRESETS) |
@@ -1899,15 +1913,30 @@ static int handle_it_packet(struct context *context, | |||
1899 | { | 1913 | { |
1900 | struct iso_context *ctx = | 1914 | struct iso_context *ctx = |
1901 | container_of(context, struct iso_context, context); | 1915 | container_of(context, struct iso_context, context); |
1916 | int i; | ||
1917 | struct descriptor *pd; | ||
1902 | 1918 | ||
1903 | if (last->transfer_status == 0) | 1919 | for (pd = d; pd <= last; pd++) |
1904 | /* This descriptor isn't done yet, stop iteration. */ | 1920 | if (pd->transfer_status) |
1921 | break; | ||
1922 | if (pd > last) | ||
1923 | /* Descriptor(s) not done yet, stop iteration */ | ||
1905 | return 0; | 1924 | return 0; |
1906 | 1925 | ||
1907 | if (le16_to_cpu(last->control) & DESCRIPTOR_IRQ_ALWAYS) | 1926 | i = ctx->header_length; |
1927 | if (i + 4 < PAGE_SIZE) { | ||
1928 | /* Present this value as big-endian to match the receive code */ | ||
1929 | *(__be32 *)(ctx->header + i) = cpu_to_be32( | ||
1930 | ((u32)le16_to_cpu(pd->transfer_status) << 16) | | ||
1931 | le16_to_cpu(pd->res_count)); | ||
1932 | ctx->header_length += 4; | ||
1933 | } | ||
1934 | if (le16_to_cpu(last->control) & DESCRIPTOR_IRQ_ALWAYS) { | ||
1908 | ctx->base.callback(&ctx->base, le16_to_cpu(last->res_count), | 1935 | ctx->base.callback(&ctx->base, le16_to_cpu(last->res_count), |
1909 | 0, NULL, ctx->base.callback_data); | 1936 | ctx->header_length, ctx->header, |
1910 | 1937 | ctx->base.callback_data); | |
1938 | ctx->header_length = 0; | ||
1939 | } | ||
1911 | return 1; | 1940 | return 1; |
1912 | } | 1941 | } |
1913 | 1942 | ||