Subject: [PATCH 000/008] [RESUBMIT2] USB: serial: sierra driver urb handling improvements From: Elina Pasheva <epasheva@xxxxxxxxxxxxxxxxxx> This is [RESUBMIT2] of the series of 8 patches based on Oliver Neukum's comments and suggestions for adding memory allocation flags as parameter to the new functions that deal with urb allocation. This series supperceeds the series of 8 patches sent on May 05 and May 12, 2009. This series is to be applied after [PATCH004/004][RESUBMIT2] for sierra driver. The following series of 8 patches deal with improvement of urb handling in sierra driver. Summary of the changes and code re-organization in this series of 8 patches: The memory for urbs is allocated and urbs are submitted only for the active interfaces (instead of pre-allocating these for all interfaces). This will save memory especially in the case of using composite devices. The code has been re-organized and functionality has been extracted from sierra_startup(), sierra_shutdown(), sierra_open(), sierra_close() and added in helper functions sierra_release_urb(), sierra_stop_rx_urbs(), sierra_submit_rx_urbs() and sierra_setup_urb() Please note that there is dependency between subsequent patches up to the final patch. All of the patches need to be applied to obtain a working product. [PATCH 001/008] adding sierra_release_urb() function: - Added function sierra_release_urb() to free an urb and its transfer buffer. This function is to be called by sierra_close() in subsequent patch. - Removed unecessary include file reference and comment. [PATCH 002/008]adding sierra_stop_rx_urbs() function: - Added function sierra_stop_rx_urbs() that takes care of the release of receive and interrupt urbs. This function is to be called by sierra_close() whenever an interface is de-activated. [PATCH 003/008] from the series dealing with improving urb handling: - Added new function sierra_submit_rx_urbs() that handles the submission of receive urbs and interrupt urbs (if any) during the interface activation. This function is to be called by sierra_open(). Added a second parameter to pass the memory allocation (as suggested by Oliver Neukum) so that this function can be used in post_reset() and resume(). [PATCH 004/008] from the series dealing with improving urb handling: - Added new function sierra_setup_urb() that contains the functionality to allocate an urb, fill bulk urb using the supplied memory allocation flag and release urb upon error. Added parameter so that the caller pass the memory allocation flag for flexibility. [PATCH 005/008] from the series dealing with improving urb handling: - Moved sierra_close() before sierra_open() to resolve dependencies introduced by the code reorganization. - Modified sierra_close() to call sierra_stop_rx_urbs() and sierra_release_urb() functions added in previous patch. [PATCH 006/008] from the series dealing with improving urb handling: - Modified sierra_open() to call sierra_setup_urb() and sierra_submit_rx_urbs() functions; note urbs are allocated and submitted for each activated interface. [PATCH 007/008] from the series dealing with improving urb handling: - Modified sierra_startup() so that allocation of urbs happens whenever an interface is activated (urb allocation is moved to sierra_open()). - Modified sierra_shutdown() so that urbs are freed whenever an interface is de-activated (urb freeing moved to sierra_close() as shown in previous patch from the series) - Removed unecessary data structure from sierra_port_private_data [PATCH 008/008] suppress log entry: - Suppress an entry in logs by not re-submitting an urb when usb_submit_urb() returns -EPERM, as this shows that usb_kill_urb() is running (as suggested by Oliver Neukum ) Signed-off-by: Elina Pasheva <epasheva@xxxxxxxxxxxxxxxxxx> --- -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html