Age | Commit message (Collapse) | Author | Files | Lines |
|
Add used includes, remove unused includes.
Signed-off-by: Stefan Richter <[email protected]>
|
|
It seems unlikely, but access to self_id_cpu[0] could at least in theory
be deferred until after the loop over self_id_cpu[1..n] or even after
the subsequent reg_read. Enforce the desired order by a read barrier.
Also prevent the reg_read from being reordered relative to the for loop.
This isn't necessary if the loop's conditional printk counts as an
implicit barrier, but better make it explicit.
(self_id_cpu[] is a coherent DMA buffer.)
Signed-off-by: Stefan Richter <[email protected]>
|
|
Firewire-sbp2 did very uncooperative things in the kernel's shared
workqueue: Sleeping until reception of management status from the
target for up to 2 seconds, and performing SCSI inquiry and all of the
setup of SCSI command set drivers via scsi_add_device. If there were
transient or permanent error conditions, this caused long blockage of
the kernel's events process, noticeable e.g. by blocked keyboard input.
We now allocate a workqueue process exclusive to fw-sbp2. As a side
effect, this also increases parallelism of fw-sbp2's login and reconnect
work versus fw-core's device discovery and device update work which is
performed in the shared workqueue.
Signed-off-by: Stefan Richter <[email protected]>
Signed-off-by: Kristian Høgsberg <[email protected]>
|
|
On rare occasions, the ability to set one of the workaround flags at
runtime may save the day.
People who experience I/O errors with firewire-sbp2 while the old sbp2
driver worked for them should try workarounds=1 and report to the devel
mailinglist whether that improves things. Firewire-sbp2 defaults to the
SCSI stack's maximum transfer size per command, while sbp2 limits them
to 128 kBytes. Flag 1 accomplishes just that.
Signed-off-by: Stefan Richter <[email protected]>
|
|
Fixes "New firewire stack only recognizing half of a chain of drives",
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=242254
Signed-off-by: Stefan Richter <[email protected]>
|
|
On IOMMU-less noncoherent architectures, orb->callback will memcpy the
whole SCSI command buffer for READ-like SCSI commands. It is therefore
friendlier to enable IRQs before the call, like before patch "Add
ref-counting for sbp2 orbs".
Signed-off-by: Stefan Richter <[email protected]>
Acked-by: Kristian Høgsberg <[email protected]>
|
|
Sparse warned about it although it was apparently harmless:
drivers/firewire/fw-cdev.c:624:23: warning: symbol 'interrupt' shadows an earlier one
include/asm/hw_irq.h:29:13: originally declared here
Signed-off-by: Stefan Richter <[email protected]>
|
|
Potentially avoids unnecessary loop runs.
Guarantee quadlet-aligned starts of address regions.
Document the return values.
Signed-off-by: Stefan Richter <[email protected]>
|
|
Signed-off-by: Al Viro <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
This changes the uevent buffer functions to use a struct instead of a
long list of parameters. It does no longer require the caller to do the
proper buffer termination and size accounting, which is currently wrong
in some places. It fixes a known bug where parts of the uevent
environment are overwritten because of wrong index calculations.
Many thanks to Mathieu Desnoyers for finding bugs and improving the
error handling.
Signed-off-by: Kay Sievers <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: Cornelia Huck <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Stefan Richter <[email protected]>
|
|
regression)
Fixes (papers over) "Sleep problems with kernels >= 2.6.21 on powerpc",
http://lkml.org/lkml/2007/8/25/155. The issue is that the FireWire
controller's pci_dev.current_state of iBook G3 and presumably older
PowerBooks is still in PCI_UNKNOWN instead of PCI_D0 when the firewire
driver's .suspend method is called.
Like it was suggested earlier in http://lkml.org/lkml/2006/10/24/13, we
do not fail .suspend anymore if pci_set_power_state failed.
Signed-off-by: Stefan Richter <[email protected]>
|
|
This handles the case where we get the status write before getting the
complete_transaction callback ("status write for unknown orb"). In
this case, we just assume that the initial orb pointer transaction
succeeded and finish the orb. To prevent the transaction callback
from touching freed memory, we ref-count the orb structures.
Signed-off-by: Kristian Høgsberg <[email protected]>
Signed-off-by: Stefan Richter <[email protected]>
|
|
Fix panic in run_timer_softirq right after "modprobe -r firewire-ohci"
if a FireWire disk was attached and firewire-sbp2 loaded.
Signed-off-by: Stefan Richter <[email protected]>
|
|
Signed-off-by: Stefan Richter <[email protected]>
|
|
Signed-off-by: Stefan Richter <[email protected]>
|
|
As far as I know, all CardBus FireWire 400 adapters have a maximum
payload of 1024 bytes which is less than the speed-dependent limit of
2048 bytes. Fw-sbp2 has to take the host adapter's limit into account.
This apparently fixes Juju's incompatibility with my CardBus cards, a
NEC based card and a VIA based card.
Signed-off-by: Stefan Richter <[email protected]>
Acked-by: Kristian Høgsberg <[email protected]>
|
|
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (60 commits)
[SCSI] libsas: make ATA functions selectable by a config option
[SCSI] bsg: unexport sg v3 helper functions
[SCSI] bsg: fix bsg_unregister_queue
[SCSI] bsg: make class backlinks
[SCSI] 3w-9xxx: add support for 9690SA
[SCSI] bsg: fix bsg_register_queue error path
[SCSI] ESP: Increase ESP_BUS_TIMEOUT to 275.
[SCSI] libsas: fix scr_read/write users and update the libata documentation
[SCSI] mpt fusion: update Kconfig help
[SCSI] scsi_transport_sas: add destructor for bsg
[SCSI] iscsi_tcp: buggered kmalloc()
[SCSI] qla2xxx: Update version number to 8.02.00-k2.
[SCSI] qla2xxx: Add ISP25XX support.
[SCSI] qla2xxx: Use pci_try_set_mwi().
[SCSI] qla2xxx: Use PCI-X/PCI-Express read control interfaces.
[SCSI] qla2xxx: Re-factor isp_operations to static structures.
[SCSI] qla2xxx: Validate mid-layer 'underflow' during check-condition handling.
[SCSI] qla2xxx: Correct setting of 'current' and 'supported' speeds during FDMI registration.
[SCSI] qla2xxx: Generalize iIDMA support.
[SCSI] qla2xxx: Generalize FW-Interface-2 support.
...
|
|
Signed-off-by: Kristian Høgsberg <[email protected]>
collapsed with fw-sbp2 patch "Drop cast to non-const char * in host
template initialization." from Kristian Høgsberg
Signed-off-by: Stefan Richter <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
Signed-off-by: Stefan Richter <[email protected]>
|
|
Found and debugged by Jay Fenlason <[email protected]>.
The bug was especially noticeable with direct I/O over fw-sbp2.
Signed-off-by: Stefan Richter <[email protected]>
Signed-off-by: Kristian Høgsberg <[email protected]>
|
|
This check is bogus:
- Maximum asynchronous payload size for S800...S3200 is 4096.
- The p->payload_length is totally uninteresting. Only the
request->length of the subsequently allocated and initialized
struct fw_request is of significance.
Signed-off-by: Stefan Richter <[email protected]>
Signed-off-by: Kristian Høgsberg <[email protected]>
|
|
context_stop is called by bus_reset_tasklet, among else.
Signed-off-by: Stefan Richter <[email protected]>
|
|
Signed-off-by: Stefan Richter <[email protected]>
|
|
The CPU must not touch the buffer after it was DMA-mapped.
Signed-off-by: Stefan Richter <[email protected]>
Signed-off-by: Kristian Høgsberg <[email protected]>
|
|
The CPU must not touch the buffer after it was DMA-mapped.
Signed-off-by: Stefan Richter <[email protected]>
Signed-off-by: Kristian Høgsberg <[email protected]>
|
|
- The CPU must not touch the buffer after it was DMA-mapped.
- The size argument of dma_unmap_single(...page_table...) was bogus.
- Move a comment closer to the code to which it refers to.
Signed-off-by: Stefan Richter <[email protected]>
Signed-off-by: Kristian Høgsberg <[email protected]>
|
|
Add rudimentary check for the case that the page table overflows due to
merging of s/g elements by the IOMMU. This would have lead to
overwriting of arbitrary memory.
After this change I expect that an offending command will be
unsuccessfully retried until the scsi_device is taken offline by SCSI
core. It's a border case and not worth to implement a recovery
strategy.
Signed-off-by: Stefan Richter <[email protected]>
Acked-by: Kristian Høgsberg <[email protected]>
|
|
This is required per SBP-2 clause 5.2.
Signed-off-by: Stefan Richter <[email protected]>
Acked-by: Kristian Høgsberg <[email protected]>
|
|
Signed-off-by: Stefan Richter <[email protected]>
Acked-by: Kristian Høgsberg <[email protected]>
|
|
noticed by Jay Fenlason
Signed-off-by: Stefan Richter <[email protected]>
Acked-by: Kristian Høgsberg <[email protected]>
|
|
Replace a cast with a container_of(). As long as nobody reorders the
structure elements, they do the same thing, but container_of() is more
readable.
Signed-off-by: Stefan Richter <[email protected]> (added complete_command_orb)
Acked-by: Kristian Høgsberg <[email protected]>
|
|
Signed-off-by: Stefan Richter <[email protected]>
Signed-off-by: Kristian Høgsberg <[email protected]>
|
|
This affects of course only the "soft shutdown" case, e.g. "modprobe -r
firewire-sbp2", while it doesn't matter for hot unplug.
Signed-off-by: Stefan Richter <[email protected]>
Signed-off-by: Kristian Høgsberg <[email protected]>
|
|
This currently only affects one bridge in the hardwired blacklist.
I don't own one of those, hence haven't tested it.
Signed-off-by: Stefan Richter <[email protected]>
|
|
cleanup after "firewire: support S100B...S400B and link slower than PHY"
Signed-off-by: Stefan Richter <[email protected]>
Signed-off-by: Kristian Høgsberg <[email protected]>
|
|
Use a speed probe to determine the speed over 1394b buses and of nodes
which report a link speed less than their PHY speed.
Log the effective maximum speed of newly created nodes in dmesg.
Also, read the config ROM (except bus info block) at the maximum speed
rather than S100. This isn't a real optimization though because we
still only use quadlet read requests for the entire ROM.
The patch also adds support for S1600 and S3200, although such hardware
does not exist yet.
Signed-off-by: Stefan Richter <[email protected]>
Signed-off-by: Kristian Høgsberg <[email protected]>
|
|
Table-based gap count optimization cannot be used if 1394b repeater PHYs
are present. But it does work with 1394b leaf nodes.
Signed-off-by: Stefan Richter <[email protected]>
Signed-off-by: Kristian Høgsberg <[email protected]>
|
|
Signed-off-by: Stefan Richter <[email protected]>
|
|
Also remove some errno printouts which will be shown by infrastructure
code anyway.
Signed-off-by: Stefan Richter <[email protected]>
|
|
cleanup after support of single-buffer requests was dropped
Signed-off-by: Stefan Richter <[email protected]>
Signed-off-by: Kristian Hoegsberg <[email protected]>
|
|
Alas that won't work so good, because nobody reads help texts.
I thought about adding some crude multiple choice selection (build the
old stack, build the new stack, build both stacks). It's possible, but
it would introduce awkward dummy config variables.
Signed-off-by: Stefan Richter <[email protected]>
|
|
descriptor.data_address is little endian
Tested-by: Olaf Hering <[email protected]>
Signed-off-by: Stefan Richter <[email protected]>
Signed-off-by: Kristian Høgsberg <[email protected]>
|
|
This patch fixes an OOPS on cdev release for an fd where iso context
creation failed.
Signed-off-by: Kristian Høgsberg <[email protected]>
Signed-off-by: Stefan Richter <[email protected]>
|
|
Signed-off-by: Stefan Richter <[email protected]>
Signed-off-by: Kristian Høgsberg <[email protected]>
|
|
The struct is part of the userspace interface and can not use
bitfields. This patch replaces the bitfields with a __u32 'control'
word and provides access macros to set the bits.
Signed-off-by: Kristian Høgsberg <[email protected]>
Signed-off-by: Stefan Richter <[email protected]>
|
|
It's a low-impact design, that just makes suspend/resume look like
a bus reset to the upper level drivers, but it should be sufficient.
Signed-off-by: Kristian Høgsberg <[email protected]>
Signed-off-by: Stefan Richter <[email protected]>
|
|
The attribute /sys/bus/scsi/devices/*:*:*:*/ieee1394_id, as generated by
the old sbp2 driver, is typically used to create persistently named
links in /dev/disk/by-id.
Signed-off-by: Stefan Richter <[email protected]>
Signed-off-by: Kristian Høgsberg <[email protected]>
|
|
Fix this warning on x86-64
drivers/firewire/fw-cdev.c:798: warning: initialization from incompatible pointer type
by making the return code of ioctl_send_request() the same as all the
other ioctl_xxx() return codes.
Signed-off-by: Jeff Garzik <[email protected]>
Signed-off-by: Stefan Richter <[email protected]>
|
|
Of course everybody immediately associates "fw-" with FireWire, not
firmware or firewall or whatever. But "firewire-" has a nice ring to
it too.
Signed-off-by: Stefan Richter <[email protected]>
Acked-by: Kristian Hoegsberg <[email protected]>
|