- 28 Oct, 2014 10 commits
-
-
Matt Porter authored
gb_module_interface_init() looks for the interface corresponding to the supplied interface_id, but fails to configure the device_id that goes with it. This results in a set route command being set with an uninitialized and bogus value. Fix it. Signed-off-by: Matt Porter <mporter@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Greg Kroah-Hartman authored
We don't need a callback for bulk out urbs to do anything except put the urb back in the pool. Document why we do this and what is involved. Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Greg Kroah-Hartman authored
We aren't using an id_table for "drivers" at this moment, as the whole driver model interaction is under heavy rework. So remove these for now to keep things easier to understand for future patches. Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Greg Kroah-Hartman authored
Remove some #if 0 chunks for the old-style greybus driver macros Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Greg Kroah-Hartman authored
-
Greg Kroah-Hartman authored
No one is using sdio yet, but convert to the connection interface to remove the last user of the "old" module interface. Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Greg Kroah-Hartman authored
We aren't going to have individual modules for the gb protocols, so just remove this useless code, it was throwing up warnings in sparse. Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Greg Kroah-Hartman authored
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Alex Elder authored
This is part 1 of abstracting the connection operations into a set of methods. This will avoid some big switch statements, but more importantly this will be needed for supporting multiple versions of each protocol. For now only two methods are defined. The init method is used to set up the device (or whatever the CPort represents) and the exit method tears it down. There may need to be additional operations added in the future, and once versioning is used we might stash the version number in this structure as well. The next patch adds dynamic registratration of these protocol handlers, and will do away with the switch statement now found in gb_connection_init(). Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Greg Kroah-Hartman authored
This was added in 3.11, and we need it for 3.10 Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
- 27 Oct, 2014 12 commits
-
-
Greg Kroah-Hartman authored
We do properly check for duplicate module ids, as fixed in 008d85d90ae1ab31f1f7b80f245f6ee2eb5aed49 "module: don't create duplicate module ids", so remove the XXX marker. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Greg Kroah-Hartman authored
Now that we have proper reference counting for modules, interfaces, and connections, no need to worry about grabbing a pointer to your "parent" structure, all is good. Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Greg Kroah-Hartman authored
The uart-gb code needs to init the tty core before it can add devices. Previously we hard-coded this in the greybus core, move this to be "dynamic" and self-contained within the uart-gb.c file. Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Greg Kroah-Hartman authored
Move the uart code over to use the "new" connection interface, instead of the "old" module interface. Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Alex Elder authored
We don't need to dynamically allocate the i2c adapter structure, we can just embed it right in struct gb_i2c_device. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Alex Elder authored
This field is never used (and not needed) so get rid of it. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Greg Kroah-Hartman authored
An operation is what can timeout, not a connection itself. So notify the operation timedout, and the connection can then do with it as it sees fit, if necessary. Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Greg Kroah-Hartman authored
We can't do anything if killing a gbuf fails, so just make this function "always" be successful. At the same time, make the host controller function also be called "kill_gbuf" to keep the terminology in sync. Signed-off-by: Greg Kroah-Hartman <greg@kroah.com> Reviewed-by: Alex Elder <elder@linaro.org>
-
Greg Kroah-Hartman authored
When registering a host controller, verify that all of the needed callbacks are present, so we don't have to do the testing on any "hot" paths when we want to send real data. Signed-off-by: Greg Kroah-Hartman <greg@kroah.com> Reviewed-by: Alex Elder <elder@linaro.org.
-
Greg Kroah-Hartman authored
Hook up gbuf_kill_gbuf() by implementing yet-another-host-controller callback and a gbuf-specific pointer to hold the tracking data the hcd needs in order to be able to abort a transfer. Signed-off-by: Greg Kroah-Hartman <greg@kroah.com> Reviewed-by: Alex Elder <elder@linaro.org>
-
Greg Kroah-Hartman authored
Not like we are ever going to use a BE cpu, but it's good to be "correct"... Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Greg Kroah-Hartman authored
One of which was "real". Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
- 24 Oct, 2014 5 commits
-
-
Greg Kroah-Hartman authored
If we somehow get a hotplug event for a module id that we already have created[1], don't try to create it again, or sysfs will complain loudly. Instead, abort the creation properly. [1] If, for example, you happened to run a script on a greybus emulator twice in a row... Signed-off-by: Greg Kroah-Hartman <greg@kroah.com> Reviewed-by: Alex Elder <elder@linaro.org>
-
Greg Kroah-Hartman authored
Use the connection, not the host controller, as the parent device of the i2c device. Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Greg Kroah-Hartman authored
We were thinking that module attributes were known at the time the device was created in the system, so we could query them to know if the sysfs file was present or not. Unfortunatly that's not the case, we create the device before we parse the values, so just always show the sysfs attributes. If there is no such attribute, the sysfs file will be empty (i.e. for the string attributes.) Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Alex Elder authored
I screwed up the error handling in a patch the other day. If we get an error on an input URB we should not re-submit it. Signed-off-by: Alex Elder <elder@linaro.org>
-
Greg Kroah-Hartman authored
This patch hooks up modules, interfaces, and connections to the driver model. Now we have a correct hierarchy, and drivers can be correctly bound to the proper portions in the future. Devices are correctly reference counted and torn down in the proper order on removal of a module. Some basic sysfs attributes have been created for interfaces and connections. Module attributes are not working properly, but that will be fixed in future changes. This has been tested on Alex's machine, with multiple hotplug and unplug operations of a module working correctly. Signed-off-by: Greg Kroah-Hartman <greg@kroah.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 22 Oct, 2014 13 commits
-
-
Alex Elder authored
Rename and renumber the values for the AP ID service message and related symbols to match the recently-updated spec. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Alex Elder authored
The route for a connection needs to be set *before* we initialize the connection. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Matt Porter authored
We removed the DDB function messages from the spec as they are not needed. Now remove it from the code. Signed-off-by: Matt Porter <mporter@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Alex Elder authored
Rather than bringing up all interfaces described in the manifest, wait until we get a link up message, and at that time go initialize the link. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Alex Elder authored
Give svc_set_route_send() non-private scope so it can be used by a function outside "ap.c" in the next patch. Change its type so it can tell its caller if an error occurs. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Alex Elder authored
Define the state of a connection. A connection will not be enabled until it has been successfully set up. Once it starts getting torn down its state will move to "being destroyed". Don't send any operation request messages unless the connection is enabled. And drop any incoming messages if if the connection is not enabled. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Alex Elder authored
Define a new function operation_cancel() that cancels an outstanding operation. Use it to clear out any operations that might be pending at the time a connection is torn down. Note: This code isn't really functional yet, partially because greybus_kill_gbuf() is not implemented. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Alex Elder authored
Arrange for operation requests that takke too long to time out. At the moment, nothing happens when that occurs (other than a silly message getting printed). When the connection and operation and interface and module code are cleaned up properly, this event should most likely cause the affected module to get torn down. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Greg Kroah-Hartman authored
Also properly clean up all modules when you remove a host driver Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Matt Porter authored
When the AP receives a link up event, request that the SVC set a route to the interface's device id (this device id has been previously reported to the AP). In the future, we may not always immediately set a route upon receiving a link up event but this is sufficient for the known use cases at this time. Signed-off-by: Matt Porter <mporter@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Matt Porter authored
CPort connections are being handled in the application layer connection protocol and the layer 3 switch doesn't care about them. Also, the switch doesn't care about a source device id when setting up the route table. Reduce the message to just the necessary destination device ID. As the SVC is aware of which switch port it found the module/interface and assigned the device ID, we can simply tell the SVC to set a route to the device ID it has reported to the AP as being active. Signed-off-by: Matt Porter <mporter@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Matt Porter authored
The link up message is the event that tells the AP what device ID has been assigned to a particular interface on a module during enumeration. The link up is sent *only* after the hotplug event for a particular module has been sent to the AP. The link up payload must carry the Module ID and Interface ID to uniquely identify the struct gb_interface to which the Device ID has been assigned. After processing of the link up message, the interface's device_id field will contain the assigned Device ID so that the AP has the information necessary to issue network route commands. Signed-off-by: Matt Porter <mporter@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Matt Porter authored
Add support for getting a struct gb_interface from an Interface ID. Signed-off-by: Matt Porter <mporter@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-