summaryrefslogtreecommitdiffstats
path: root/drivers/firewire
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* firewire: Add read/write and size annotations to IOC numbers.Kristian Høgsberg2007-04-302-167/+135
| | | | | | | | Also, with this change, refactor ioctl dispatch code to do the copying from and to user space as indicated by the IOC annotations. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: don't use extern on public symbolsRandy Dunlap2007-04-271-2/+2
| | | | | | | | | | Make firewire entry points not 'extern': drivers/firewire/fw-device.c:160:25: warning: function 'fw_device_get' with external linkage has definition drivers/firewire/fw-device.c:167:13: warning: function 'fw_device_put' with external linkage has definition Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-device printk fixAndrew Morton2007-04-271-1/+2
| | | | | | | You don't know what type is used to implement u64. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Don't use subsystem rwsem, it's going away.Kristian Høgsberg2007-04-172-16/+19
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Do an agent reset on error recovery.Kristian Høgsberg2007-04-121-1/+1
| | | | | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> (Reverted part which moved it from eh_abort_handler to eh_host_reset_handler) Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Only free ORBs that completed the initial transaction.Kristian Høgsberg2007-04-121-1/+4
| | | | | | | | | | | | | In some situations we can receive the ORB status write before we have received the ORB pointer write response. When this happens, we assume that the fw_transaction is finished and free the ORB struct containing the fw_transaction. This fix make the status write logic only accept status writes for ORBs where the initial ORB pointer write transaction finished. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Forward SAM status codes to the scsi stack.Kristian Høgsberg2007-04-121-21/+18
| | | | | | | | Or the SAM status codes from the device sense data into the command error code. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Check for CONTEXT_RUN not CONTEXT_ACTIVE when starting AT DMA context.Kristian Høgsberg2007-04-121-1/+1
| | | | | | | Doh, bad typo... Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Byteswap iso header so all headers are presented as be32.Kristian Høgsberg2007-04-121-1/+7
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Fix start on cycle 0 for IT, implement start on cycle for IR.Kristian Høgsberg2007-03-281-9/+13
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Fix the range check for the queue_iso payload pointer.Kristian Høgsberg2007-03-281-5/+5
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (renamed a variable)
* firewire: Increase the number of config rom retries and the retry delay.Kristian Høgsberg2007-03-281-2/+2
| | | | | | | | | | | | Some devices have a really long power-on cycle, and we fail to successfully probe these if they're plugged in and then turned on. There's really no down-side to bumping the number of retries and the retry delay, and most devices will get picked up within the first couple of retries anyway. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Don't set card->irm_node before we have a new valid topology.Kristian Høgsberg2007-03-281-3/+4
| | | | | | | | | | In case the topology build fails, we want to retain the old topology info until another reset finishes and results in a valid new tree. If we clear card->irm_node to NULL and the topology build fails, we end up dereferencing a NULL pointer in a few places. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Generalize resource tracking for cdev implementation.Kristian Høgsberg2007-03-282-119/+119
| | | | | | | | Generalize the way we keep track of the various resources and assign a unique handle to each resource. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Add ioctls to add and remove config rom descriptors.Kristian Høgsberg2007-03-283-5/+114
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (fixed whitespace)
* firewire: Streamline userspace interface structs.Kristian Høgsberg2007-03-282-11/+31
| | | | | | | | | | | Make event struct layout common part include the closure and add a union for all event types; provide a mechanism for setting the bus reset event closure. Shuffle struct fw_cdev_queue_iso fields around to be 64-bit safe. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Remember to set the driver_data pointer when queueing a packet.Kristian Høgsberg2007-03-281-0/+1
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Use device->groups for adding device attributes.Kristian Høgsberg2007-03-282-35/+28
| | | | | | | | | We dynamically create an attribute group for the key present on the device in hand and point device->group to it. This way the device core adds the sysfs attributes for us as the device is added. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Add phy register defines.Marc Butler2007-03-242-4/+16
| | | | | | Signed-off-by: Marc Butler <marc@adaptivecode.com> Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (added whitespace)
* firewire: Export GUID as sysfs attribute.Kristian Høgsberg2007-03-221-2/+13
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Add sysfs attributes for config rom directory values.Kristian Høgsberg2007-03-221-4/+147
| | | | | | | | We export the entire config rom, so this is technically redundant, but should make udev rules and HAL integration easier. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Make use of struct device_type.Kristian Høgsberg2007-03-221-57/+36
| | | | | | | | | The device_type struct is useful for setting attributes for a device and overriding .release and .uevent for a group of devices. This patch uses it this way to clean up the sysfs code a bit. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: ROM cache is CPU-endianStefan Richter2007-03-201-1/+1
| | | | | | Puts a stray endian annotation down. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fix compiler warnings on 64bitStefan Richter2007-03-202-4/+5
| | | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
* firewire: add includes for sem and rw_semStefan Richter2007-03-201-0/+2
| | | | | | as a precaution. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Grab dev->sem when doing the update callback.Kristian Høgsberg2007-03-201-1/+4
| | | | | | | | | This serializes the update callback with the probe and remove callback from the driver core and prevents remove from being called while update is running for the same device. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
OpenPOWER on IntegriCloud