xpp: stability fixes - xusb mutex

 * Replace old semaphore with mutex
 * Use this mutex for BOTH usb probe/disconnect

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
xpp: stability -- cleaner xpp_open/close

 * No need to use spinlock.
 * Just correctly use the atomic open_counter.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
xpp: stability -- better debug information

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
xpp: stability -- deadlock in waitfor_xpds()

waitfor_xpds xbus sysfs file should not take an xbus refcount:

* It is called from sysfs which maintain its own device refcount.
* If put_xbus() calls xbus_destroy() than down the call chain it will
  try to release an object that is held by sysfs.
* This will create a deadlock.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
xpp: stability -- better xbus shut down

* Maintain a "shutting_down" flag per-xbus
* Use it to prevent xbus dereferencing (via xbus_get()/xbus_put())
  during an xbus shutdown.
* Also, remove xbus from global array earlier.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
xpp: demote some NOTICE() to DBG()

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
xpp: re-organize calls so worker_reset()

re-organize calls so worker_reset() isn't called twice
(was called from xbus_disconnect() and worker_destroy())

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>