summaryrefslogtreecommitdiffstats
path: root/drivers/firewire
Commit message (Collapse)AuthorAgeFilesLines
* firewire: fw-sbp2: convert to new SCSI data buffer accessorsStefan Richter2007-07-181-9/+7
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fix memory leak of fw_request instancesStefan Richter2007-07-182-1/+7
| | | | | | | | Found and debugged by Jay Fenlason <fenlason@redhat.com>. The bug was especially noticeable with direct I/O over fw-sbp2. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
* firewire: remove bogus check in fw_core_handle_requestStefan Richter2007-07-181-5/+0
| | | | | | | | | | | 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 <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
* firewire: fw-ohci: fix "scheduling while atomic"Stefan Richter2007-07-181-1/+1
| | | | | | context_stop is called by bus_reset_tasklet, among else. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-ohci: flush MMIO write before msleepStefan Richter2007-07-181-0/+1
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-sbp2: fix DMA mapping of management ORBsStefan Richter2007-07-101-12/+9
| | | | | | | The CPU must not touch the buffer after it was DMA-mapped. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
* firewire: fw-sbp2: fix DMA mapping of command ORBsStefan Richter2007-07-101-9/+6
| | | | | | | The CPU must not touch the buffer after it was DMA-mapped. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
* firewire: fw-sbp2: fix DMA mapping of S/G tablesStefan Richter2007-07-101-11/+8
| | | | | | | | | - 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 <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
* firewire: fw-sbp2: add a boundary checkStefan Richter2007-07-101-0/+5
| | | | | | | | | | | | | | 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 <stefanr@s5r6.in-berlin.de> Acked-by: Kristian Høgsberg <krh@redhat.com>
* firewire: fw-sbp2: correctly align page tablesStefan Richter2007-07-101-1/+1
| | | | | | | This is required per SBP-2 clause 5.2. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Acked-by: Kristian Høgsberg <krh@redhat.com>
* firewire: fw-sbp2: memset wants string.hStefan Richter2007-07-101-0/+1
| | | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Acked-by: Kristian Høgsberg <krh@redhat.com>
* firewire: fw-sbp2: use correct speed in sbp2_agent_resetStefan Richter2007-07-101-1/+1
| | | | | | | noticed by Jay Fenlason Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Acked-by: Kristian Høgsberg <krh@redhat.com>
* firewire: fw-sbp2: correctly dereference by container_ofJay Fenlason2007-07-101-2/+3
| | | | | | | | | 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 <stefanr@s5r6.in-berlin.de> (added complete_command_orb) Acked-by: Kristian Høgsberg <krh@redhat.com>
* firewire: fw-sbp2: implement nonexclusive loginStefan Richter2007-07-101-7/+15
| | | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
* firewire: fw-sbp2: let SCSI shutdown commands through before logoutStefan Richter2007-07-101-4/+2
| | | | | | | | 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 <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
* firewire: fw-sbp2: implement max sectors limit for some old bridgesStefan Richter2007-07-101-1/+3
| | | | | | | 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 <stefanr@s5r6.in-berlin.de>
* firewire: simplify a struct typeStefan Richter2007-07-102-30/+24
| | | | | | | cleanup after "firewire: support S100B...S400B and link slower than PHY" Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
* firewire: support S100B...S400B and link slower than PHYStefan Richter2007-07-105-16/+45
| | | | | | | | | | | | | | | | | 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 <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
* firewire: optimize gap count with 1394b leaf nodesStefan Richter2007-07-104-17/+14
| | | | | | | | 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 <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
* firewire: remove unused macroStefan Richter2007-07-101-1/+0
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: missing newline in printkStefan Richter2007-07-103-5/+5
| | | | | | | Also remove some errno printouts which will be shown by infrastructure code anyway. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-sbp2: remove unused struct memberStefan Richter2007-07-101-6/+0
| | | | | | | cleanup after support of single-buffer requests was dropped Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Hoegsberg <krh@redhat.com>
* firewire: add Kconfig help on building both stacksStefan Richter2007-06-291-22/+43
| | | | | | | | | | 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 <stefanr@s5r6.in-berlin.de>
* firewire: fix async reception on big endian machinesStefan Richter2007-06-291-3/+3
| | | | | | | | descriptor.data_address is little endian Tested-by: Olaf Hering <olh@suse.de> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
* firewire: Only set client->iso_context if allocation was successful.Kristian Høgsberg2007-06-211-8/+11
| | | | | | | | This patch fixes an OOPS on cdev release for an fd where iso context creation failed. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fix hang after card ejectionStefan Richter2007-06-161-1/+1
| | | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
* firewire: Change struct fw_cdev_iso_packet to not use bitfields.Kristian Høgsberg2007-05-311-1/+16
| | | | | | | | | 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 <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Implement suspend/resume PCI driver hooks.Kristian Høgsberg2007-05-312-69/+123
| | | | | | | | 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 <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-sbp2: implement sysfs ieee1394_idStefan Richter2007-05-312-0/+54
| | | | | | | | | 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 <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
* firewire: fix return codeJeff Garzik2007-05-271-1/+1
| | | | | | | | | | | | 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 <jeff@garzik.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: prefix modules with firewire- instead of fw-Stefan Richter2007-05-272-12/+14
| | | | | | | | | 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 <stefanr@s5r6.in-berlin.de> Acked-by: Kristian Hoegsberg <krh@bitplanet.net>
* firewire: Add missing byteswapping for receive DMA programs.Kristian Høgsberg2007-05-271-2/+3
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* missing mm.h in fw-ohciAl Viro2007-05-151-0/+1
| | | | | | | need it for page_private(), not all targets have it pulled indirectly Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* firewire: Convert OHCI driver to use standard goto unwinding for error handling.Kristian Høgsberg2007-05-101-44/+42
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Always use parens with sizeof.Kristian Høgsberg2007-05-107-65/+65
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Drop single buffer request support.Kristian Høgsberg2007-05-101-42/+1
| | | | | | | | The SCSI layer only passes sg requests down, so drop the use_sg == 0, request_bufflen != 0 case. Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Add a comment to describe why we split the sg list.Kristian Høgsberg, Stefan Richter2007-05-101-1/+4
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Return SCSI_MLQUEUE_HOST_BUSY for out of memory cases in queuecommand.Kristian Høgsberg2007-05-101-4/+4
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Handle the last few DMA mapping error cases.Kristian Høgsberg2007-05-101-7/+26
| | | | | | | This should be the last missing checks. Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Allocate scsi_host up front and allocate the sbp2_device as hostdata.Kristian Høgsberg2007-05-101-84/+50
| | | | | | | Avoids an extra allocation and simplifies lifetime rules for the scsi_host. Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Provide module aliase for backwards compatibility.Olaf Hering2007-05-102-0/+10
| | | | | | | | | | | | | This patch loads fw-sbp2 if sbp2 is still in the config file. So one can go back and forth between releases without worry about the root filesystem drivers. Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Existing mkinitrd scripts still have to be adapted, unless they grok module aliases. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Add to fw-core-y instead of assigning fw-core-objs in Makefile.Kristian Høgsberg2007-05-101-1/+1
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Break out shared IEEE1394 constant to separate header file.Kristian Høgsberg2007-05-101-60/+1
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Uppercase most macro names.Kristian Høgsberg2007-05-105-232/+231
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Coding style cleanup: no spaces after function names.Kristian Høgsberg2007-05-105-33/+33
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Convert card_rwsem to a regular mutex.Kristian Høgsberg2007-05-101-10/+10
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Clean up comment style.Kristian Høgsberg2007-05-1011-253/+439
| | | | | | | | Drop filenames from file preamble, drop editor annotations and use standard indent style for block comments. Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (fixed typo)
* firewire: Use lib/ implementation of CRC ITU-T.Kristian Høgsberg2007-05-104-28/+18
| | | | | | | | | With the CRC ITU-T implementation available in lib/ we can use that instead. This also fixes a bug in the topology map crc computation. Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (fixed Kconfig)
* firewire: Rename fw-device-cdev.c to fw-cdev.c and move header to include/linux.Kristian Høgsberg2007-04-303-270/+2
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Future proof the iso ioctls by adding a handle for the iso context.Kristian Høgsberg2007-04-302-4/+24
| | | | | | | | Currently create context always returns 0 and the other iso ioctls will expect user space to pass that in for subsequent ioctls. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
OpenPOWER on IntegriCloud