diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-24 15:57:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-24 15:57:47 -0400 |
commit | 2f78d8e249973f1eeb88315e6444e616c60177ae (patch) | |
tree | 2f6fae6c781622301c40378ea404096d8f231a33 /sound/firewire | |
parent | f2fde3a65e88330017b816faf2ef75f141d21375 (diff) | |
parent | 26c72e22c94fbc28604c94e3a96fdae9c6fd0a42 (diff) |
Merge tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394
Pull IEEE 1394 (FireWire) subsystem updates from Stefan Richter:
- Fix mismatch between DMA mapping direction (was wrong) and DMA
synchronization direction (was correct) of isochronous reception
buffers of userspace drivers if vma-mapped for R/W access. For
example, libdc1394 was affected.
- more consistent retry stategy in device discovery/ rediscovery, and
improved failure diagnostics
- various small cleanups, e.g. use SCSI layer's DMA mapping API in
firewire-sbp2
* tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
firewire: sbp2: document the absence of alignment requirements
firewire: sbp2: remove superfluous blk_queue_max_segment_size() call
firewire: sbp2: use scsi_dma_(un)map
firewire: sbp2: give correct DMA device to scsi framework
firewire: core: fw_device_refresh(): clean up error handling
firewire: core: log config rom reading errors
firewire: core: log error in case of failed bus manager lock
firewire: move rcode_string() to core
firewire: core: improve reread_config_rom() interface
firewire: core: wait for inaccessible devices after bus reset
firewire: ohci: omit spinlock IRQ flags where possible
firewire: ohci: correct signedness of a local variable
firewire: core: fix DMA mapping direction
firewire: use module_pci_driver
Diffstat (limited to 'sound/firewire')
-rw-r--r-- | sound/firewire/cmp.c | 2 | ||||
-rw-r--r-- | sound/firewire/lib.c | 28 | ||||
-rw-r--r-- | sound/firewire/lib.h | 1 |
3 files changed, 2 insertions, 29 deletions
diff --git a/sound/firewire/cmp.c b/sound/firewire/cmp.c index 76294f2ae47f..645cb0ba4293 100644 --- a/sound/firewire/cmp.c +++ b/sound/firewire/cmp.c | |||
@@ -84,7 +84,7 @@ static int pcr_modify(struct cmp_connection *c, | |||
84 | return 0; | 84 | return 0; |
85 | 85 | ||
86 | io_error: | 86 | io_error: |
87 | cmp_error(c, "transaction failed: %s\n", rcode_string(rcode)); | 87 | cmp_error(c, "transaction failed: %s\n", fw_rcode_string(rcode)); |
88 | return -EIO; | 88 | return -EIO; |
89 | 89 | ||
90 | bus_reset: | 90 | bus_reset: |
diff --git a/sound/firewire/lib.c b/sound/firewire/lib.c index 4750cea2210e..14eb41498372 100644 --- a/sound/firewire/lib.c +++ b/sound/firewire/lib.c | |||
@@ -14,32 +14,6 @@ | |||
14 | #define ERROR_RETRY_DELAY_MS 5 | 14 | #define ERROR_RETRY_DELAY_MS 5 |
15 | 15 | ||
16 | /** | 16 | /** |
17 | * rcode_string - convert a firewire result code to a string | ||
18 | * @rcode: the result | ||
19 | */ | ||
20 | const char *rcode_string(unsigned int rcode) | ||
21 | { | ||
22 | static const char *const names[] = { | ||
23 | [RCODE_COMPLETE] = "complete", | ||
24 | [RCODE_CONFLICT_ERROR] = "conflict error", | ||
25 | [RCODE_DATA_ERROR] = "data error", | ||
26 | [RCODE_TYPE_ERROR] = "type error", | ||
27 | [RCODE_ADDRESS_ERROR] = "address error", | ||
28 | [RCODE_SEND_ERROR] = "send error", | ||
29 | [RCODE_CANCELLED] = "cancelled", | ||
30 | [RCODE_BUSY] = "busy", | ||
31 | [RCODE_GENERATION] = "generation", | ||
32 | [RCODE_NO_ACK] = "no ack", | ||
33 | }; | ||
34 | |||
35 | if (rcode < ARRAY_SIZE(names) && names[rcode]) | ||
36 | return names[rcode]; | ||
37 | else | ||
38 | return "unknown"; | ||
39 | } | ||
40 | EXPORT_SYMBOL(rcode_string); | ||
41 | |||
42 | /** | ||
43 | * snd_fw_transaction - send a request and wait for its completion | 17 | * snd_fw_transaction - send a request and wait for its completion |
44 | * @unit: the driver's unit on the target device | 18 | * @unit: the driver's unit on the target device |
45 | * @tcode: the transaction code | 19 | * @tcode: the transaction code |
@@ -71,7 +45,7 @@ int snd_fw_transaction(struct fw_unit *unit, int tcode, | |||
71 | 45 | ||
72 | if (rcode_is_permanent_error(rcode) || ++tries >= 3) { | 46 | if (rcode_is_permanent_error(rcode) || ++tries >= 3) { |
73 | dev_err(&unit->device, "transaction failed: %s\n", | 47 | dev_err(&unit->device, "transaction failed: %s\n", |
74 | rcode_string(rcode)); | 48 | fw_rcode_string(rcode)); |
75 | return -EIO; | 49 | return -EIO; |
76 | } | 50 | } |
77 | 51 | ||
diff --git a/sound/firewire/lib.h b/sound/firewire/lib.h index 064f3fd9ab06..aef301476ea9 100644 --- a/sound/firewire/lib.h +++ b/sound/firewire/lib.h | |||
@@ -8,7 +8,6 @@ struct fw_unit; | |||
8 | 8 | ||
9 | int snd_fw_transaction(struct fw_unit *unit, int tcode, | 9 | int snd_fw_transaction(struct fw_unit *unit, int tcode, |
10 | u64 offset, void *buffer, size_t length); | 10 | u64 offset, void *buffer, size_t length); |
11 | const char *rcode_string(unsigned int rcode); | ||
12 | 11 | ||
13 | /* returns true if retrying the transaction would not make sense */ | 12 | /* returns true if retrying the transaction would not make sense */ |
14 | static inline bool rcode_is_permanent_error(int rcode) | 13 | static inline bool rcode_is_permanent_error(int rcode) |