summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* firewire: rename CONFIG_FW to CONFIG_FIREWIREStefan Richter2007-03-203-9/+9
| | | | | | | to avoid confusion with CONFIG_FW_LOADER. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Acked-by: Kristian Høgsberg <krh@redhat.com>
* firewire: Add ref-counting for sbp2_device and hold a ref while we have work ↵Kristian Høgsberg2007-03-151-12/+30
| | | | | | | scheduled. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Free pending transactions on cdev release.Kristian Høgsberg2007-03-151-1/+3
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Zero out sd->scsi_host if we fail to register with the SCSI stack.Kristian Høgsberg2007-03-151-0/+2
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Implement deallocation of address ranges.Kristian Høgsberg2007-03-152-6/+39
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Move sync and tag parameters to start_iso ioctl.Kristian Høgsberg2007-03-155-32/+26
| | | | | | | | | Setting these at create_context time or start_iso time doesn't matter much, but raw1394 sets them at start_iso time so that will be easier to emulate this way. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Fix dualbuffer iso receive mode and drop buffer fill mode.Kristian Høgsberg2007-03-152-122/+66
| | | | | | | | | The dualbuffer DMA setup did not account for the iso trailer word and thus didn't work correctly. With this fixed we can drop the dual buffer fallback mode. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Implement CSR cycle time and bus time registers.Kristian Høgsberg2007-03-093-3/+86
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Implement topology map and fix a couple of loopback bugs.Kristian Høgsberg2007-03-096-16/+85
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Export juju specific rcodes to user space.Kristian Høgsberg2007-03-091-0/+6
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Add generation field to send_request ioctl struct.Kristian Høgsberg2007-03-092-1/+2
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Add card index field to get_info cdev ioctl struct.Kristian Høgsberg2007-03-092-0/+5
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Fix order of arguments for iso context creation.Kristian Høgsberg2007-03-091-1/+1
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Track pending transactions and cancel them on cdev release.Kristian Høgsberg2007-03-091-3/+20
| | | | | | | | Without this, pending transactions will dereference freed memory if they complete after the device file has been closed. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Move async transmit to use the general context code.Kristian Høgsberg2007-03-092-214/+149
| | | | | | | | | | | | | The old async transmit context handling was starting and stopping DMA for every packet transmission. This could cause silently failing packet transmission, if the DMA was reprogrammed too close to being stopped. The general context code keeps DMA running at all times and fixes this problem. It's also a nice cleanup. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Use only a wait queue and terminate poll and read on device removal.Kristian Høgsberg2007-03-093-29/+59
| | | | | | | | | Drop the event list semaphore and only use the wait queue and the list to synchronize queue access. Break out of a poll or read whenever the device is disconnected. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Don't time out command orbs, leave that to the scsi stack.Kristian Høgsberg2007-03-091-20/+11
| | | | | | | | | | The mod_timer based timing out of orb was a little to agressive and would time out legit, but long-lived scsi cmds. Besides, the scsi stack keeps track of this already. Since we're only timing out management orbs, go back to wait_for_completion_timeout. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Add rom_index attribute for unit sysfs directories.Kristian Høgsberg2007-03-091-0/+21
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Quiet down fw-sbp2 logging a bit, remove stale FIXME.Kristian Høgsberg2007-03-091-18/+8
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Switch cdev code over to use register_chrdev and keep a list of ↵Kristian Høgsberg2007-03-094-22/+51
| | | | | | | | | | devices. The old mechanism kept a struct cdev for each fw device, but fops->release would reference this struct after the device got freed in some cases. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Generalize get_config_rom to get_info.Kristian Høgsberg2007-03-092-21/+75
| | | | | | | | | Repurpose the get_config_rom ioctl to a general get_info ioctl. This ioctl is now used for version negotiation, and optionally returns the config rom, and the current bus info. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Implement ioctl to initiate bus reset.Kristian Høgsberg2007-03-092-4/+27
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Add a bus reset event type for fw-device-cdev.Kristian Høgsberg2007-03-094-3/+75
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Only use INIT_DELAYED_WORK for first initialization.Kristian Høgsberg2007-03-091-4/+4
| | | | | | | Use PREPARE_DELAYED_WORK to just change the function pointer. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Iterate through units in a keventd callback for update callbacks.Kristian Høgsberg2007-03-091-3/+14
| | | | | | | | We can't take the klist lock for the child device list in interrupt context. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Clear all interrupt bits before shutting down.Kristian Høgsberg2007-03-091-1/+2
| | | | | | | | Some flaky controllers doesn't honor the masterIntEnable bits and can generate bus reset events even if that bit is cleared. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Drop the unused fw_card device.Kristian Høgsberg2007-03-092-30/+13
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Let an fw_descriptor specify a leading immediate key/value pair.Kristian Høgsberg2007-03-093-10/+32
| | | | | | | This lets us break out "Juju" as the model name in the config rom. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
OpenPOWER on IntegriCloud