- 20 3月, 2011 1 次提交
-
-
由 Clemens Ladisch 提交于
The SPLIT_TIMEOUT mechanism is intended to detect requests that somehow got lost. However, when the timeout value is too low, transactions that could have been completed successfully will be cancelled. Furthermore, there are chips whose firmwares ignore the configured split timeout and send late split response; known examples are the DM1x00 (BeBoB), TCD22x0 (DICE), and some OXUF936QSE firmwares. This patch changes the default timeout to two seconds, which happens to be the default on other OSes, too. Actual lost requests are extremely rare, so there should be no practical downside to increasing the split timeout even on devices that work correctly. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
- 15 3月, 2011 2 次提交
-
-
由 Oleg Drokin 提交于
It seems drivers/firewire/ohci.c is making some optimistic assumptions about struct fw_ohci and that member "card" will always remain the first member of the struct. Plus it's probably going to confuse a lot of static code analyzers too. So I wonder if there is a good reason not to free the ohci struct just like it was allocated instead of the tricky &ohci->card way? Signed-off-by: NOleg Drokin <green@linuxhacker.ru> It is perhaps just a rudiment from before mainline submission of the driver. Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
由 Stefan Richter 提交于
Since commit 82b662dc "flush AT contexts after bus reset for OHCI 1.2", the driver takes care of any AT packets that were enqueued during a bus reset phase. The check from commit 76f73ca1 is therefore no longer necessary and the MMIO read can be avoided. Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
- 26 2月, 2011 4 次提交
-
-
由 Clemens Ladisch 提交于
If a misguided program tried to start an isochronous context before it has queued any packets, the call would appear to succeed, but the context would not actually go into the running state, and the OHCI controller would then raise an unrecoverableError interrupt because the first Z value is zero and thus invalid. The driver logs such errors, but there is no mechanism to report this back to the program. Add an explicit check so that this error can be returned synchronously. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
由 Clemens Ladisch 提交于
To prevent the iso packet callback from being called after fw_iso_context_stop() has returned, make sure that the context's tasklet has finished executing before that. This fixes access-after-free bugs that have so far been observed only in the upcoming snd-firewire-speakers driver, but can theoretically also happen in the firedtv driver. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
由 Clemens Ladisch 提交于
In manage_channel(), rename the variables "c" and "i" to the more expressive "bit" and "channel". Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
由 Stefan Richter 提交于
The first board generation of Power Mac G4 ("Yikes!", those with PCI graphics) still had a PCILynx controller like their G3 predecessors, but not the later AGP models. (Jonathan Woithe recalls to have heard of it, and some web sources reinforce it.) Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
- 23 1月, 2011 5 次提交
-
-
由 Clemens Ladisch 提交于
On a 32-bit machine with, e.g., HZ=1000, jiffies will overflow after about 50 days, so if there are between 25 and 50 days between bus resets, the card->reset_jiffies comparisons can get wrong results. To fix this, ensure that this timestamp always uses 64 bits. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: N"Stefan Richter" <stefanr@s5r6.in-berlin.de>
-
由 Clemens Ladisch 提交于
For outbound transactions, the IDR's and the callback's references now have exactly the same lifetime, so we do not need both of them. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: N"Stefan Richter" <stefanr@s5r6.in-berlin.de>
-
由 Clemens Ladisch 提交于
We must not use fw_cancel_transaction() because it cannot correctly abort still-active transactions. The only place in core-cdev where this matters is when the file is released. Instead of trying to abort the transactions, we wait for them to complete normally, i.e., until all outbound transaction resources have been removed from the IDR tree. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: N"Stefan Richter" <stefanr@s5r6.in-berlin.de>
-
由 Clemens Ladisch 提交于
Outbound transactions are never aborted with release_client_resource(), so it is not necessary for complete_transaction() to check whether the resource is still registered. Only shutdown_resource() can abort such an transaction, and this is already handled with the in_shutdown check. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: N"Stefan Richter" <stefanr@s5r6.in-berlin.de>
-
由 Clemens Ladisch 提交于
When a DMA context goes into the dead state (and the controller thus stops working correctly), logging this error and the controller's error code might be helpful for debugging. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
- 21 1月, 2011 1 次提交
-
-
由 Stefan Richter 提交于
Regression since commit 10389536, "firewire: core: check for 1394a compliant IRM, fix inaccessibility of Sony camcorder": The camcorder Canon MV5i generates lots of bus resets when asynchronous requests are sent to it (e.g. Config ROM read requests or FCP Command write requests) if the camcorder is not root node. This causes drop- outs in videos or makes the camcorder entirely inaccessible. https://bugzilla.redhat.com/show_bug.cgi?id=633260 Fix this by allowing any Canon device, even if it is a pre-1394a IRM like MV5i are, to remain root node (if it is at least Cycle Master capable). With the FireWire controller cards that I tested, MV5i always becomes root node when plugged in and left to its own devices. Reported-by: Ralf Lange Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de> Cc: <stable@kernel.org> # 2.6.32.y and newer
-
- 13 1月, 2011 1 次提交
-
-
由 Clemens Ladisch 提交于
PAGE_KERNEL_RO is not available on all architectures, so its use in the new AR code broke compilation on sparc64. Because the read-only mapping was just a debugging aid, just use PAGE_KERNEL instead. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> James Bottomley wrote: > On Thu, 2011-01-13 at 08:27 +0100, Clemens Ladisch wrote: >> firewire: ohci: fix compilation on arches without PAGE_KERNEL_RO, e.g. sparc >> >> PAGE_KERNEL_RO is not available on all architectures, so its use in the >> new AR code broke compilation on sparc64. >> >> Because the R/O mapping is only used to catch drivers that try to write >> to the reception buffer and not actually required for correct operation, >> we can just use a normal PAGE_KERNEL mapping where _RO is not available. [...] >> +/* >> + * For archs where PAGE_KERNEL_RO is not supported; >> + * mapping the AR buffers readonly for the CPU is just a debugging aid. >> + */ >> +#ifndef PAGE_KERNEL_RO >> +#define PAGE_KERNEL_RO PAGE_KERNEL >> +#endif > > This might cause interesting issues on sparc64 if it ever acquired a > PAGE_KERNEL_RO. Sparc64 has extern pgprot_t for it's PAGE_KERNEL types > rather than #defines, so the #ifdef check wouldn't see this. > > I think either PAGE_PROT_RO becomes part of our arch API (so all > architectures are forced to add it), or, if it's not part of the API, > ohci isn't entitled to use it. The latter seems simplest since you have > no real use for write protection anyway. Reported-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
- 04 1月, 2011 5 次提交
-
-
由 Clemens Ladisch 提交于
Instead of starting the split transaction timeout timer when any request is submitted, start it only when the destination's ACK_PENDING has been received. This prevents us from using a timeout that is too short, and, if the controller's AT queue is emptying very slowly, from cancelling a packet that has not yet been sent. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
由 Stefan Richter 提交于
"firewire: ohci: restart iso DMA contexts on resume from low power mode" added the flag struct context.active and "firewire: ohci: cache the context run bit" added struct context.running. These flags contain the same information; combine them. Also, normalize whitespace in pci_resume(). Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
由 Clemens Ladisch 提交于
The DMA context run control bit is entirely controlled by software, so it is safe to cache it. This allows the driver to avoid doing an additional MMIO read when queueing an AT packet. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
由 Stefan Richter 提交于
Add comments - on why bus_reset_tasklet flushes AT queues, - that commit 76f73ca1 can possibly be reverted now. Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de> Acked-by: NJarod Wilson <jarod@redhat.com>
-
由 Clemens Ladisch 提交于
The OHCI 1.2 (draft) specification, clause 7.2.3.3, allows and recommends that, after a bus reset, the controller does not flush all the packets in the AT queues. Therefore, the driver has to do this itself. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
- 19 12月, 2010 2 次提交
-
-
由 Stefan Richter 提交于
At ifup, carrier status would be shown on even if it actually was off. Also add an include for ethtool_ops rather than to rely on the one from netdevice.h. Note, we can alas not use fwnet_device_mutex to serialize access to dev->peer_count (as I originally wanted). This would cause a lock inversion: - fwnet_probe | takes fwnet_device_mutex + register_netdev | takes rtnl_mutex - devinet_ioctl | takes rtnl_mutex + fwnet_open | ...must not take fwnet_device_mutex Hence use the dev->lock spinlock for serialization. Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
由 Maxim Levitsky 提交于
To make userland, e.g. NetworkManager work with firewire, we need to detect whether cable is plugged or not. Simple and correct way of doing that is just counting number of peers. No peers - no link and vice versa. Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
- 14 12月, 2010 10 次提交
-
-
由 Maxim Levitsky 提交于
Unfortunately its easy to trigger such error messages by removing the cable while sending streams of data over the link. Such errors are normal, and therefore this patch stops firewire-net from flooding the kernel log with these errors, by combining series of same errors together. Signed-off-by: NMaxim Levitsky <maximlevitsky@gmail.com> (Stefan R:) Eventually we should remove this logging when firewire-net and related firewire-ohci facilities have been stabilized. Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
由 Maxim Levitsky 提交于
Restore iso channels DMA so that iso channels could continue to work after resume from RAM/disk. Signed-off-by: NMaxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
由 Maxim Levitsky 提交于
Some lousy BIOSes, e.g. my Aspire 5720 BIOS forget to restore the GUID register on resume from RAM. Fix that by setting it to the last value that was read from it. Signed-off-by: NMaxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
由 Clemens Ladisch 提交于
The buffers used for the selfIDs packets and the AR request and response descriptors end up using three pages because dma_alloc_coherent() allocates at least one page per call. However, these data structures would all fit into 4 KB, so we can save space by using a common buffer for them. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
由 Clemens Ladisch 提交于
When the isochRx/isochTx bit is clear, we do not need to read the corresponding iso interrupt event register. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
由 Clemens Ladisch 提交于
Change the header of PHY packets to be sent to include a pseudo transaction code. This makes the header consistent with that of received PHY packets, and allows at_context_queue_packet() and log_ar_at_event() to see the packet type directly instead of having to deduce it from the header length or even from the header contents. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
由 Clemens Ladisch 提交于
To remove the error information from the controller's queue and to allow more posted writes, the driver has to read the failed posted write address before clearing the postedWriteErr interrupt bit. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> (Stefan R:) The spec is somewhat fuzzy about the actual requirements. To err on the safe side, let's do these two read accesses. Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
由 Clemens Ladisch 提交于
Make sure that interrupt event clear bit writes are executed before the interrupt handler returns. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
由 Clemens Ladisch 提交于
Add proper error handling for the context_init() calls. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
由 Clemens Ladisch 提交于
Move the AR DMA descriptors out of the buffer pages, and map the buffer pages linearly into the kernel's address space. This allows the driver to ignore any page boundaries in the DMA data and thus to avoid any copying around of packet payloads. This fixes the bug where S800 packets that are so big (> 4080 bytes) that they can be split over three pages were not handled correctly. Due to the changed algorithm, we can now use arbitrarily many buffer pages, which improves performance because the controller can more easily unload its DMA FIFO. Furthermore, using streaming DMA mappings should improve perfomance on architectures where coherent DMA mappings are not cacheable. Even on other architectures, the caching behaviour should be improved slightly because the CPU no longer writes to the buffer pages. v2: Detect the last filled buffer page by searching the descriptor's residual count value fields in order (like in the old code), instead of going backwards through the transfer status fields; it looks as if some controllers do not set the latter correctly. v3: Fix an old resume bug that would now make the handler run into a BUG_ON, and replace that check with more useful error handling. Increase the buffer size for better performance with non-TI chips. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Maxim Levitsky writes: Works almost perfectly. I can still see RCODE_BUSY errors sometimes, not very often though. 64K here eliminates these errors completely. This is most likely due to nouveau drivers and lowest perf level I use to lower card temperature. That increases latencies too much I think. Besides that the IO is just perfect. Tested-by: NMaxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
- 12 12月, 2010 4 次提交
-
-
由 Joe Perches 提交于
Add missing newlines. Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
由 Stefan Richter 提交于
Amend .open handler accordingly and remove the .llseek handler. .llseek = NULL means no_llseek (return error) since commit 776c163b. The only client that uses this interface is nosy-dump in linux/tools/firewire and it knows not to seek in this char dev. Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
-
由 Stefan Richter 提交于
Agere FW643 rev 06, listed as "11c1:5901 (rev 06) (prog-if 10 [OHCI])", produced SBP-2 I/O errors since kernel 2.6.36. Disabling MSI fixes it. Since MSI work on Agere FW643-E (same vendor and device ID, but rev 07), introduce a device revision field into firewire-ohci's quirks list so that different quirks can be defined for older and newer revisions. Reported-by: NJonathan Isom <jeisom@gmail.com> Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de> Cc: <stable@kernel.org> # 2.6.36.y
-
由 Stefan Richter 提交于
"VIA Technologies, Inc. VT6315 Series Firewire Controller [1106:3403]" does not generate any interrupts if Message Signaled Interrupts were enabled. This is a regression since kernel 2.6.36 in which MSI support was added to firewire-ohci. Hence blacklist MSI on all VIA controllers. Reported-by: NRobin Cook <rcook@wyrms.net> Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de> Cc: <stable@kernel.org> # 2.6.36.y
-
- 07 12月, 2010 5 次提交
-
-
由 Linus Torvalds 提交于
-
git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2由 Linus Torvalds 提交于
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2: ocfs2_connection_find() returns pointer to bad structure ocfs2: char is not always signed Ocfs2: Stop tracking a negative dentry after dentry_iput(). ocfs2: fix memory leak fs/ocfs2/dlm: Use GFP_ATOMIC under spin_lock
-
由 Olof Johansson 提交于
Commit 0ea12930 ("arm: return both physical and virtual addresses from addruart") took out the test for MMU on/off but didn't switch the ldr instructions to no longer be conditionals based on said test. Fix that. Signed-off-by: NOlof Johansson <olof@lixom.net> Acked-by: NColin Cross <ccross@android.com> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6由 Linus Torvalds 提交于
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6: PM / Hibernate: Fix memory corruption related to swap PM / Hibernate: Use async I/O when reading compressed hibernation image
-
由 Rafael J. Wysocki 提交于
There is a problem that swap pages allocated before the creation of a hibernation image can be released and used for storing the contents of different memory pages while the image is being saved. Since the kernel stored in the image doesn't know of that, it causes memory corruption to occur after resume from hibernation, especially on systems with relatively small RAM that need to swap often. This issue can be addressed by keeping the GFP_IOFS bits clear in gfp_allowed_mask during the entire hibernation, including the saving of the image, until the system is finally turned off or the hibernation is aborted. Unfortunately, for this purpose it's necessary to rework the way in which the hibernate and suspend code manipulates gfp_allowed_mask. This change is based on an earlier patch from Hugh Dickins. Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl> Reported-by: NOndrej Zary <linux@rainbow-software.org> Acked-by: NHugh Dickins <hughd@google.com> Reviewed-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: stable@kernel.org
-