mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
IEEE 1394 (FireWire) subsystem updates post v3.4:
- 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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
iQIcBAABAgAGBQJPvoOWAAoJEHnzb7JUXXnQpG4P/j4u9kU+MDegDrRsAzZBdP+6
in2FW8opUzSXZyLSzU/JYcO7P0luEEdLIE65fkaVRbP1x6m7aAjgaAO/0zbqZQPD
QVyIAOPa8zcbEIi1cEnI75KU/AMyQpMk/eU9Et4FrbQszgyFvJNe+hS+MocMooPt
vukqmWJuIPfH/G3FsX0eQWEXS7GktkYxmLJM/k6z4JpngAVmelM/Ce45VFg7tbN+
IeV5N7+FF4zKmwgiKIpkw5tSO6If7mjoQQVH/Q8DiHJDhFlDUrKR9/TvaJesVtEg
5n97BbfvXc8mu6EE8lbl1ats2R1I00JDpMylHPt4J6G1XDjb1/GvqSjXYXwPT77J
O4xZwqT4C5JKnG9h2a4npf6PgDHBbMnUK9cDBxfA5ZPkTeZmGXWuP05zYJqeNJm9
UrEusEjzEEspVWFqxOD+2/YLF/0rxqA/P1C7Luuw7Y9nIcCt3VskuW6iebYuf5Dk
yNoykYVph8zDJE+Am7jtsgNCPfd4TomFttjMcc/0EVqNa1iVO/AuLlvYv+Ab75oU
BpOUEg8Pq9nQeya3XjM585R0rF4PG5wsVrBe2ZzJ+cqNe6JH264/YuBgFv1bkUg3
UtHNIG633KAk71P1jl7PeuvAQksLnCYak2JOviZ/oB79Yamoxifhcm4mNkwTeCv7
paRqDNAzoaThqvqx723E
=fulr
-----END PGP SIGNATURE-----
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
This commit is contained in:
commit
2f78d8e249
13 changed files with 218 additions and 189 deletions
|
|
@ -84,7 +84,7 @@ static int pcr_modify(struct cmp_connection *c,
|
|||
return 0;
|
||||
|
||||
io_error:
|
||||
cmp_error(c, "transaction failed: %s\n", rcode_string(rcode));
|
||||
cmp_error(c, "transaction failed: %s\n", fw_rcode_string(rcode));
|
||||
return -EIO;
|
||||
|
||||
bus_reset:
|
||||
|
|
|
|||
|
|
@ -13,32 +13,6 @@
|
|||
|
||||
#define ERROR_RETRY_DELAY_MS 5
|
||||
|
||||
/**
|
||||
* rcode_string - convert a firewire result code to a string
|
||||
* @rcode: the result
|
||||
*/
|
||||
const char *rcode_string(unsigned int rcode)
|
||||
{
|
||||
static const char *const names[] = {
|
||||
[RCODE_COMPLETE] = "complete",
|
||||
[RCODE_CONFLICT_ERROR] = "conflict error",
|
||||
[RCODE_DATA_ERROR] = "data error",
|
||||
[RCODE_TYPE_ERROR] = "type error",
|
||||
[RCODE_ADDRESS_ERROR] = "address error",
|
||||
[RCODE_SEND_ERROR] = "send error",
|
||||
[RCODE_CANCELLED] = "cancelled",
|
||||
[RCODE_BUSY] = "busy",
|
||||
[RCODE_GENERATION] = "generation",
|
||||
[RCODE_NO_ACK] = "no ack",
|
||||
};
|
||||
|
||||
if (rcode < ARRAY_SIZE(names) && names[rcode])
|
||||
return names[rcode];
|
||||
else
|
||||
return "unknown";
|
||||
}
|
||||
EXPORT_SYMBOL(rcode_string);
|
||||
|
||||
/**
|
||||
* snd_fw_transaction - send a request and wait for its completion
|
||||
* @unit: the driver's unit on the target device
|
||||
|
|
@ -71,7 +45,7 @@ int snd_fw_transaction(struct fw_unit *unit, int tcode,
|
|||
|
||||
if (rcode_is_permanent_error(rcode) || ++tries >= 3) {
|
||||
dev_err(&unit->device, "transaction failed: %s\n",
|
||||
rcode_string(rcode));
|
||||
fw_rcode_string(rcode));
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ struct fw_unit;
|
|||
|
||||
int snd_fw_transaction(struct fw_unit *unit, int tcode,
|
||||
u64 offset, void *buffer, size_t length);
|
||||
const char *rcode_string(unsigned int rcode);
|
||||
|
||||
/* returns true if retrying the transaction would not make sense */
|
||||
static inline bool rcode_is_permanent_error(int rcode)
|
||||
|
|
|
|||
Loading…
Reference in a new issue