2017-11-03 09:18:41 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-10-28 17:16:36 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-01 22:13:55 +01:00
|
|
|
|
2007-03-20 14:59:39 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-08-06 13:00:50 +02:00
|
|
|
|
2009-03-18 14:28:53 -04:00
|
|
|
|
2016-10-06 12:06:11 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-18 15:25:46 +01:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-21 15:18:47 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-01-23 15:55:28 -05:00
|
|
|
|
2016-01-21 15:18:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2012-12-18 15:25:46 +01:00
|
|
|
|
2013-09-24 15:43:39 -04:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2012-12-18 15:25:46 +01:00
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2012-12-18 15:25:46 +01:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2012-12-18 15:25:46 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-21 15:18:47 +01:00
|
|
|
|
2012-12-18 15:25:46 +01:00
|
|
|
|
|
|
|
|
|
2016-01-21 15:18:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-18 15:25:46 +01:00
|
|
|
|
2013-09-24 15:43:39 -04:00
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2013-09-24 15:43:39 -04:00
|
|
|
|
|
|
|
|
|
2012-12-18 15:25:46 +01:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2005-10-24 15:36:00 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-21 15:18:47 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-01-23 15:55:28 -05:00
|
|
|
|
2016-01-21 15:18:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-09-24 15:43:39 -04:00
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2013-09-24 15:43:39 -04:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2012-12-18 15:25:46 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-01-23 15:55:28 -05:00
|
|
|
|
2016-01-21 15:18:47 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-02-08 16:40:43 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2016-01-21 15:18:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-23 15:55:28 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-14 13:30:03 -04:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2016-10-06 12:06:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2016-10-06 12:06:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2005-10-24 15:36:00 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2009-12-08 15:54:44 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-01-23 15:55:28 -05:00
|
|
|
|
2016-01-21 15:18:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2009-12-08 15:54:44 -05:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-23 15:55:28 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-14 10:33:19 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-12-10 09:59:27 +02:00
|
|
|
|
2021-03-10 19:43:07 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-12-10 09:59:27 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-04-19 19:05:54 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2018-04-19 19:05:54 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2018-04-19 19:05:54 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2007-04-25 15:15:43 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2007-04-25 15:15:43 -04:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2007-04-25 15:15:43 -04:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-23 15:55:28 -05:00
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2009-11-30 11:15:02 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2009-11-30 11:15:02 -08:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2009-11-30 11:15:02 -08:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-23 15:55:28 -05:00
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2007-01-26 14:26:21 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2007-01-26 14:26:21 +01:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2007-01-26 14:26:21 +01:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2010-01-16 01:33:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2010-01-16 01:33:03 +01:00
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-16 01:33:03 +01:00
|
|
|
|
|
|
|
|
|
2024-02-02 03:00:42 +00:00
|
|
|
|
|
|
|
|
|
2010-01-16 01:33:03 +01:00
|
|
|
|
2024-02-02 03:00:42 +00:00
|
|
|
|
2010-01-16 01:33:03 +01:00
|
|
|
|
2016-01-21 15:18:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-08-03 16:30:35 +08:00
|
|
|
|
2012-08-17 16:44:56 +08:00
|
|
|
|
2010-01-16 01:33:03 +01:00
|
|
|
|
2012-08-17 16:44:56 +08:00
|
|
|
|
2010-01-16 01:33:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2010-01-16 01:33:03 +01:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2007-10-03 14:56:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2007-10-03 14:56:03 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2007-10-03 14:56:03 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2012-07-05 17:17:24 -07:00
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
|
|
|
|
|
2012-07-05 17:17:24 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2012-07-05 17:17:24 -07:00
|
|
|
|
2008-03-03 15:15:59 -05:00
|
|
|
|
2007-05-30 15:39:33 -04:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2007-05-30 15:39:33 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2007-05-30 15:39:33 -04:00
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2007-05-30 15:39:33 -04:00
|
|
|
|
|
|
|
|
|
2024-02-02 03:00:42 +00:00
|
|
|
|
|
|
|
|
|
2007-05-30 15:39:33 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-02 03:00:42 +00:00
|
|
|
|
2007-05-30 15:39:33 -04:00
|
|
|
|
2010-01-08 12:56:42 -05:00
|
|
|
|
2016-01-21 15:18:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-30 15:39:33 -04:00
|
|
|
|
2010-01-08 12:56:42 -05:00
|
|
|
|
2007-05-30 15:39:33 -04:00
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2007-05-30 15:39:33 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-03 15:15:59 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-11-15 15:57:07 -05:00
|
|
|
|
2007-05-30 15:39:33 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-11-15 15:57:07 -05:00
|
|
|
|
2007-05-30 15:39:33 -04:00
|
|
|
|
2007-02-20 15:03:32 -05:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2007-12-21 16:54:15 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2007-12-21 16:54:15 -08:00
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2007-12-21 16:54:15 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2007-12-21 16:54:15 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2007-12-21 16:54:15 -08:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2007-12-21 16:54:15 -08:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2007-02-20 15:03:32 -05:00
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2007-02-20 15:03:32 -05:00
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-02-20 15:03:32 -05:00
|
|
|
|
2010-11-15 15:57:51 -05:00
|
|
|
|
2007-02-20 15:03:32 -05:00
|
|
|
|
2010-11-15 15:57:51 -05:00
|
|
|
|
|
|
|
|
|
2007-02-20 15:03:32 -05:00
|
|
|
|
|
|
|
|
|
2010-11-15 15:57:51 -05:00
|
|
|
|
2007-02-20 15:03:32 -05:00
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2007-02-20 15:03:32 -05:00
|
|
|
|
2007-03-20 14:59:39 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-10 23:41:27 +02:00
|
|
|
|
|
|
|
|
|
2010-04-02 13:22:16 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2007-03-20 14:59:39 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-02 13:22:16 -04:00
|
|
|
|
2010-04-02 13:22:09 -04:00
|
|
|
|
2009-12-07 13:01:37 -05:00
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2007-03-20 14:59:39 -04:00
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2007-03-20 14:59:39 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-02 13:22:09 -04:00
|
|
|
|
2016-01-21 15:18:47 +01:00
|
|
|
|
2007-03-20 14:59:39 -04:00
|
|
|
|
2010-04-02 13:22:16 -04:00
|
|
|
|
2007-03-20 14:59:39 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-21 15:18:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-03-20 14:59:39 -04:00
|
|
|
|
|
|
|
|
|
2010-01-08 12:56:54 -05:00
|
|
|
|
2010-04-02 13:22:09 -04:00
|
|
|
|
2007-03-20 14:59:39 -04:00
|
|
|
|
2010-01-08 12:56:54 -05:00
|
|
|
|
|
|
|
|
|
2010-04-02 13:22:09 -04:00
|
|
|
|
2007-03-20 14:59:39 -04:00
|
|
|
|
2010-01-08 12:56:54 -05:00
|
|
|
|
2007-03-20 14:59:39 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-02 13:22:09 -04:00
|
|
|
|
2007-03-20 14:59:39 -04:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2007-03-20 14:59:39 -04:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2011-09-23 14:19:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
usb: Don't enable USB 2.0 Link PM by default.
How it's supposed to work:
--------------------------
USB 2.0 Link PM is a lower power state that some newer USB 2.0 devices
support. USB 3.0 devices certified by the USB-IF are required to
support it if they are plugged into a USB 2.0 only port, or a USB 2.0
cable is used. USB 2.0 Link PM requires both a USB device and a host
controller that supports USB 2.0 hardware-enabled LPM.
USB 2.0 Link PM is designed to be enabled once by software, and the host
hardware handles transitions to the L1 state automatically. The premise
of USB 2.0 Link PM is to be able to put the device into a lower power
link state when the bus is idle or the device NAKs USB IN transfers for
a specified amount of time.
...but hardware is broken:
--------------------------
It turns out many USB 3.0 devices claim to support USB 2.0 Link PM (by
setting the LPM bit in their USB 2.0 BOS descriptor), but they don't
actually implement it correctly. This manifests as the USB device
refusing to respond to transfers when it is plugged into a USB 2.0 only
port under the Haswell-ULT/Lynx Point LP xHCI host.
These devices pass the xHCI driver's simple test to enable USB 2.0 Link
PM, wait for the port to enter L1, and then bring it back into L0. They
only start to break when L1 entry is interleaved with transfers.
Some devices then fail to respond to the next control transfer (usually
a Set Configuration). This results in devices never enumerating.
Other mass storage devices (such as a later model Western Digital My
Passport USB 3.0 hard drive) respond fine to going into L1 between
control transfers. They ACK the entry, come out of L1 when the host
needs to send a control transfer, and respond properly to those control
transfers. However, when the first READ10 SCSI command is sent, the
device NAKs the data phase while it's reading from the spinning disk.
Eventually, the host requests to put the link into L1, and the device
ACKs that request. Then it never responds to the data phase of the
READ10 command. This results in not being able to read from the drive.
Some mass storage devices (like the Corsair Survivor USB 3.0 flash
drive) are well behaved. They ACK the entry into L1 during control
transfers, and when SCSI commands start coming in, they NAK the requests
to go into L1, because they need to be at full power.
Not all USB 3.0 devices advertise USB 2.0 link PM support. My Point
Grey USB 3.0 webcam advertises itself as a USB 2.1 device, but doesn't
have a USB 2.0 BOS descriptor, so we don't enable USB 2.0 Link PM. I
suspect that means the device isn't certified.
What do we do about it?
-----------------------
There's really no good way for the kernel to test these devices.
Therefore, the kernel needs to disable USB 2.0 Link PM by default, and
distros will have to enable it by writing 1 to the sysfs file
/sys/bus/usb/devices/../power/usb2_hardware_lpm. Rip out the xHCI Link
PM test, since it's not sufficient to detect these buggy devices, and
don't automatically enable LPM after the device is addressed.
This patch should be backported to kernels as old as 3.11, that
contain the commit a558ccdcc71c7770c5e80c926a31cfe8a3892a09 "usb: xhci:
add USB2 Link power management BESL support". Without this fix, some
USB 3.0 devices will not enumerate or work properly under USB 2.0 ports
on Haswell-ULT systems.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
2013-09-30 17:26:28 +03:00
|
|
|
|
2011-09-23 14:19:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2011-09-23 14:19:53 -07:00
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-23 14:19:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-21 15:18:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-23 14:19:53 -07:00
|
|
|
|
2022-11-01 22:13:55 +01:00
|
|
|
|
2011-09-23 14:19:53 -07:00
|
|
|
|
usb: Don't enable USB 2.0 Link PM by default.
How it's supposed to work:
--------------------------
USB 2.0 Link PM is a lower power state that some newer USB 2.0 devices
support. USB 3.0 devices certified by the USB-IF are required to
support it if they are plugged into a USB 2.0 only port, or a USB 2.0
cable is used. USB 2.0 Link PM requires both a USB device and a host
controller that supports USB 2.0 hardware-enabled LPM.
USB 2.0 Link PM is designed to be enabled once by software, and the host
hardware handles transitions to the L1 state automatically. The premise
of USB 2.0 Link PM is to be able to put the device into a lower power
link state when the bus is idle or the device NAKs USB IN transfers for
a specified amount of time.
...but hardware is broken:
--------------------------
It turns out many USB 3.0 devices claim to support USB 2.0 Link PM (by
setting the LPM bit in their USB 2.0 BOS descriptor), but they don't
actually implement it correctly. This manifests as the USB device
refusing to respond to transfers when it is plugged into a USB 2.0 only
port under the Haswell-ULT/Lynx Point LP xHCI host.
These devices pass the xHCI driver's simple test to enable USB 2.0 Link
PM, wait for the port to enter L1, and then bring it back into L0. They
only start to break when L1 entry is interleaved with transfers.
Some devices then fail to respond to the next control transfer (usually
a Set Configuration). This results in devices never enumerating.
Other mass storage devices (such as a later model Western Digital My
Passport USB 3.0 hard drive) respond fine to going into L1 between
control transfers. They ACK the entry, come out of L1 when the host
needs to send a control transfer, and respond properly to those control
transfers. However, when the first READ10 SCSI command is sent, the
device NAKs the data phase while it's reading from the spinning disk.
Eventually, the host requests to put the link into L1, and the device
ACKs that request. Then it never responds to the data phase of the
READ10 command. This results in not being able to read from the drive.
Some mass storage devices (like the Corsair Survivor USB 3.0 flash
drive) are well behaved. They ACK the entry into L1 during control
transfers, and when SCSI commands start coming in, they NAK the requests
to go into L1, because they need to be at full power.
Not all USB 3.0 devices advertise USB 2.0 link PM support. My Point
Grey USB 3.0 webcam advertises itself as a USB 2.1 device, but doesn't
have a USB 2.0 BOS descriptor, so we don't enable USB 2.0 Link PM. I
suspect that means the device isn't certified.
What do we do about it?
-----------------------
There's really no good way for the kernel to test these devices.
Therefore, the kernel needs to disable USB 2.0 Link PM by default, and
distros will have to enable it by writing 1 to the sysfs file
/sys/bus/usb/devices/../power/usb2_hardware_lpm. Rip out the xHCI Link
PM test, since it's not sufficient to detect these buggy devices, and
don't automatically enable LPM after the device is addressed.
This patch should be backported to kernels as old as 3.11, that
contain the commit a558ccdcc71c7770c5e80c926a31cfe8a3892a09 "usb: xhci:
add USB2 Link power management BESL support". Without this fix, some
USB 3.0 devices will not enumerate or work properly under USB 2.0 ports
on Haswell-ULT systems.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
2013-09-30 17:26:28 +03:00
|
|
|
|
|
|
|
|
|
2019-01-12 03:54:24 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
usb: Don't enable USB 2.0 Link PM by default.
How it's supposed to work:
--------------------------
USB 2.0 Link PM is a lower power state that some newer USB 2.0 devices
support. USB 3.0 devices certified by the USB-IF are required to
support it if they are plugged into a USB 2.0 only port, or a USB 2.0
cable is used. USB 2.0 Link PM requires both a USB device and a host
controller that supports USB 2.0 hardware-enabled LPM.
USB 2.0 Link PM is designed to be enabled once by software, and the host
hardware handles transitions to the L1 state automatically. The premise
of USB 2.0 Link PM is to be able to put the device into a lower power
link state when the bus is idle or the device NAKs USB IN transfers for
a specified amount of time.
...but hardware is broken:
--------------------------
It turns out many USB 3.0 devices claim to support USB 2.0 Link PM (by
setting the LPM bit in their USB 2.0 BOS descriptor), but they don't
actually implement it correctly. This manifests as the USB device
refusing to respond to transfers when it is plugged into a USB 2.0 only
port under the Haswell-ULT/Lynx Point LP xHCI host.
These devices pass the xHCI driver's simple test to enable USB 2.0 Link
PM, wait for the port to enter L1, and then bring it back into L0. They
only start to break when L1 entry is interleaved with transfers.
Some devices then fail to respond to the next control transfer (usually
a Set Configuration). This results in devices never enumerating.
Other mass storage devices (such as a later model Western Digital My
Passport USB 3.0 hard drive) respond fine to going into L1 between
control transfers. They ACK the entry, come out of L1 when the host
needs to send a control transfer, and respond properly to those control
transfers. However, when the first READ10 SCSI command is sent, the
device NAKs the data phase while it's reading from the spinning disk.
Eventually, the host requests to put the link into L1, and the device
ACKs that request. Then it never responds to the data phase of the
READ10 command. This results in not being able to read from the drive.
Some mass storage devices (like the Corsair Survivor USB 3.0 flash
drive) are well behaved. They ACK the entry into L1 during control
transfers, and when SCSI commands start coming in, they NAK the requests
to go into L1, because they need to be at full power.
Not all USB 3.0 devices advertise USB 2.0 link PM support. My Point
Grey USB 3.0 webcam advertises itself as a USB 2.1 device, but doesn't
have a USB 2.0 BOS descriptor, so we don't enable USB 2.0 Link PM. I
suspect that means the device isn't certified.
What do we do about it?
-----------------------
There's really no good way for the kernel to test these devices.
Therefore, the kernel needs to disable USB 2.0 Link PM by default, and
distros will have to enable it by writing 1 to the sysfs file
/sys/bus/usb/devices/../power/usb2_hardware_lpm. Rip out the xHCI Link
PM test, since it's not sufficient to detect these buggy devices, and
don't automatically enable LPM after the device is addressed.
This patch should be backported to kernels as old as 3.11, that
contain the commit a558ccdcc71c7770c5e80c926a31cfe8a3892a09 "usb: xhci:
add USB2 Link power management BESL support". Without this fix, some
USB 3.0 devices will not enumerate or work properly under USB 2.0 ports
on Haswell-ULT systems.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
2013-09-30 17:26:28 +03:00
|
|
|
|
2011-09-23 14:19:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2011-09-23 14:19:53 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-23 17:14:31 +03:00
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2013-05-23 17:14:31 +03:00
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-23 17:14:31 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2013-05-23 17:14:31 +03:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2013-05-23 17:14:31 +03:00
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2013-05-23 17:14:31 +03:00
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-23 17:14:31 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2013-05-23 17:14:31 +03:00
|
|
|
|
2015-11-14 16:26:32 +08:00
|
|
|
|
2015-06-16 10:35:30 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-21 15:18:47 +01:00
|
|
|
|
2015-06-16 10:35:30 -07:00
|
|
|
|
2016-01-21 15:18:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-16 10:35:30 -07:00
|
|
|
|
2015-11-14 16:26:32 +08:00
|
|
|
|
2015-06-16 10:35:30 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2015-06-16 10:35:30 -07:00
|
|
|
|
2015-11-14 16:26:32 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-21 15:18:47 +01:00
|
|
|
|
2015-11-14 16:26:32 +08:00
|
|
|
|
2016-01-21 15:18:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-14 16:26:32 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2015-11-14 16:26:32 +08:00
|
|
|
|
|
|
|
|
|
2015-06-16 10:35:30 -07:00
|
|
|
|
2011-09-23 14:19:53 -07:00
|
|
|
|
|
|
|
|
|
2013-05-23 17:14:31 +03:00
|
|
|
|
|
|
|
|
|
2011-09-23 14:19:53 -07:00
|
|
|
|
|
|
|
|
|
2020-11-25 17:24:58 +01:00
|
|
|
|
2011-09-23 14:19:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-16 10:35:30 -07:00
|
|
|
|
2015-11-14 16:26:32 +08:00
|
|
|
|
|
|
|
|
|
2015-06-16 10:35:30 -07:00
|
|
|
|
|
|
|
|
|
2020-11-25 17:24:58 +01:00
|
|
|
|
2015-06-16 10:35:30 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-11-15 15:57:07 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-25 17:24:58 +01:00
|
|
|
|
2010-11-15 15:57:07 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-02-20 15:03:32 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-23 14:19:53 -07:00
|
|
|
|
|
|
|
|
|
2010-11-15 15:57:07 -05:00
|
|
|
|
2011-09-23 14:19:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-13 15:09:50 +08:00
|
|
|
|
|
|
|
|
|
2015-11-14 16:26:32 +08:00
|
|
|
|
2015-06-16 10:35:30 -07:00
|
|
|
|
|
|
|
|
|
2011-09-23 14:19:53 -07:00
|
|
|
|
|
|
|
|
|
2007-02-20 15:03:32 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-08-20 19:01:27 +08:00
|
|
|
|
2011-09-23 14:19:53 -07:00
|
|
|
|
2010-11-15 15:57:07 -05:00
|
|
|
|
2007-02-20 15:03:32 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-29 23:47:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-02-20 15:03:32 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-29 23:47:05 +01:00
|
|
|
|
2007-02-20 15:03:32 -05:00
|
|
|
|
2007-05-30 15:39:33 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2005-10-24 15:36:00 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-23 15:55:28 -05:00
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2005-10-24 15:36:00 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-23 15:55:28 -05:00
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-31 20:34:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2007-07-31 20:34:07 -07:00
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2007-07-31 20:34:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-31 20:34:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-02 03:00:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-31 20:34:07 -07:00
|
|
|
|
2024-02-02 03:00:42 +00:00
|
|
|
|
2007-07-31 20:34:07 -07:00
|
|
|
|
2024-02-02 03:00:42 +00:00
|
|
|
|
|
|
|
|
|
2013-10-10 23:41:27 +02:00
|
|
|
|
2007-07-31 20:34:07 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2007-07-31 20:34:07 -07:00
|
|
|
|
2009-10-27 15:20:13 -04:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2009-10-27 15:20:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2009-10-27 15:20:13 -04:00
|
|
|
|
2007-07-31 20:34:07 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-07-06 15:37:42 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-30 11:15:02 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-29 16:53:29 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-04-19 19:05:54 +03:00
|
|
|
|
|
|
|
|
|
2007-04-25 15:15:43 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-11-30 11:15:02 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-01-26 14:26:21 +01:00
|
|
|
|
2010-01-16 01:33:03 +01:00
|
|
|
|
2007-07-31 20:34:07 -07:00
|
|
|
|
2009-10-27 15:20:13 -04:00
|
|
|
|
2012-07-05 17:17:24 -07:00
|
|
|
|
2016-10-06 12:06:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2020-11-25 17:24:58 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-04-30 15:37:19 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-23 23:11:19 -04:00
|
|
|
|
2008-04-30 15:37:19 -04:00
|
|
|
|
|
|
|
|
|
2020-02-14 20:37:00 +08:00
|
|
|
|
2009-04-15 21:34:40 -04:00
|
|
|
|
2008-04-30 15:37:19 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-25 17:24:58 +01:00
|
|
|
|
2008-04-30 15:37:19 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-12 17:06:23 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-04 16:23:01 -08:00
|
|
|
|
2024-12-22 21:12:13 +01:00
|
|
|
|
2007-07-12 17:06:23 -04:00
|
|
|
|
|
|
|
|
|
2020-02-14 20:37:00 +08:00
|
|
|
|
2009-04-15 21:34:40 -04:00
|
|
|
|
2007-07-12 17:06:23 -04:00
|
|
|
|
|
|
|
|
|
2016-01-21 15:18:48 +01:00
|
|
|
|
2008-05-20 16:40:42 -04:00
|
|
|
|
2007-07-12 17:06:23 -04:00
|
|
|
|
2008-05-20 16:40:42 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-12 17:06:23 -04:00
|
|
|
|
2008-05-20 16:40:42 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-04 16:23:01 -08:00
|
|
|
|
2008-05-20 16:40:42 -04:00
|
|
|
|
|
|
|
|
|
2007-07-12 17:06:23 -04:00
|
|
|
|
2008-05-20 16:40:42 -04:00
|
|
|
|
|
|
|
|
|
2007-07-12 17:06:23 -04:00
|
|
|
|
2008-05-20 16:40:42 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-12 17:06:23 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-22 21:12:13 +01:00
|
|
|
|
2007-07-12 17:06:23 -04:00
|
|
|
|
2024-03-04 16:23:01 -08:00
|
|
|
|
|
|
|
|
|
2024-12-22 21:12:13 +01:00
|
|
|
|
2024-03-04 16:23:01 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-07-15 16:59:05 +02:00
|
|
|
|
2024-03-04 16:23:01 -08:00
|
|
|
|
|
|
|
|
|
2026-07-15 16:59:05 +02:00
|
|
|
|
2024-03-04 16:23:01 -08:00
|
|
|
|
2026-07-15 16:59:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-04 16:23:01 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-07-15 16:59:05 +02:00
|
|
|
|
2024-03-04 16:23:01 -08:00
|
|
|
|
|
|
|
|
|
2024-12-22 21:12:13 +01:00
|
|
|
|
2024-03-04 16:23:01 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-22 21:12:13 +01:00
|
|
|
|
2024-03-04 16:23:01 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-11-03 17:03:34 +00:00
|
|
|
|
2024-03-04 16:23:01 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-05 16:15:03 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-04 16:23:01 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-05-30 05:54:38 +02:00
|
|
|
|
2024-03-04 16:23:01 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-12 17:06:23 -04:00
|
|
|
|
|
|
|
|
|
2019-08-06 13:00:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2019-08-06 13:00:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2019-08-06 13:00:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-01 22:13:55 +01:00
|
|
|
|
2019-08-06 13:00:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-28 11:43:25 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-08-28 11:43:25 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-05-30 15:39:33 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-02-20 15:03:32 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-06 13:00:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-12-05 14:10:34 -05:00
|
|
|
|
2019-08-06 13:00:50 +02:00
|
|
|
|
2006-08-28 11:43:25 -07:00
|
|
|
|
2007-02-20 14:59:59 -05:00
|
|
|
|
2006-08-28 11:43:25 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-01-23 15:55:28 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-06 13:00:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-02-20 15:03:32 -05:00
|
|
|
|
2007-05-30 15:39:33 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2014-01-04 11:24:41 +05:30
|
|
|
|
2007-06-15 23:14:35 -04:00
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2007-06-15 23:14:35 -04:00
|
|
|
|
|
|
|
|
|
2008-01-30 15:21:33 -08:00
|
|
|
|
2007-06-15 23:14:35 -04:00
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2008-01-30 15:21:33 -08:00
|
|
|
|
2007-06-15 23:14:35 -04:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2007-06-15 23:14:35 -04:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-06-15 23:14:35 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2005-10-24 15:36:00 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-01-23 15:55:28 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2005-10-24 15:36:00 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-04-30 15:37:19 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-01-23 15:55:28 -05:00
|
|
|
|
locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE()
Please do not apply this to mainline directly, instead please re-run the
coccinelle script shown below and apply its output.
For several reasons, it is desirable to use {READ,WRITE}_ONCE() in
preference to ACCESS_ONCE(), and new code is expected to use one of the
former. So far, there's been no reason to change most existing uses of
ACCESS_ONCE(), as these aren't harmful, and changing them results in
churn.
However, for some features, the read/write distinction is critical to
correct operation. To distinguish these cases, separate read/write
accessors must be used. This patch migrates (most) remaining
ACCESS_ONCE() instances to {READ,WRITE}_ONCE(), using the following
coccinelle script:
----
// Convert trivial ACCESS_ONCE() uses to equivalent READ_ONCE() and
// WRITE_ONCE()
// $ make coccicheck COCCI=/home/mark/once.cocci SPFLAGS="--include-headers" MODE=patch
virtual patch
@ depends on patch @
expression E1, E2;
@@
- ACCESS_ONCE(E1) = E2
+ WRITE_ONCE(E1, E2)
@ depends on patch @
expression E;
@@
- ACCESS_ONCE(E)
+ READ_ONCE(E)
----
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: davem@davemloft.net
Cc: linux-arch@vger.kernel.org
Cc: mpe@ellerman.id.au
Cc: shuah@kernel.org
Cc: snitzer@redhat.com
Cc: thor.thayer@linux.intel.com
Cc: tj@kernel.org
Cc: viro@zeniv.linux.org.uk
Cc: will.deacon@arm.com
Link: http://lkml.kernel.org/r/1508792849-3115-19-git-send-email-paulmck@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-10-23 14:07:29 -07:00
|
|
|
|
2008-04-30 15:37:19 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
2005-05-10 06:45:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-20 21:15:16 -07:00
|
|
|
|
2005-05-10 06:45:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE()
Please do not apply this to mainline directly, instead please re-run the
coccinelle script shown below and apply its output.
For several reasons, it is desirable to use {READ,WRITE}_ONCE() in
preference to ACCESS_ONCE(), and new code is expected to use one of the
former. So far, there's been no reason to change most existing uses of
ACCESS_ONCE(), as these aren't harmful, and changing them results in
churn.
However, for some features, the read/write distinction is critical to
correct operation. To distinguish these cases, separate read/write
accessors must be used. This patch migrates (most) remaining
ACCESS_ONCE() instances to {READ,WRITE}_ONCE(), using the following
coccinelle script:
----
// Convert trivial ACCESS_ONCE() uses to equivalent READ_ONCE() and
// WRITE_ONCE()
// $ make coccicheck COCCI=/home/mark/once.cocci SPFLAGS="--include-headers" MODE=patch
virtual patch
@ depends on patch @
expression E1, E2;
@@
- ACCESS_ONCE(E1) = E2
+ WRITE_ONCE(E1, E2)
@ depends on patch @
expression E;
@@
- ACCESS_ONCE(E)
+ READ_ONCE(E)
----
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: davem@davemloft.net
Cc: linux-arch@vger.kernel.org
Cc: mpe@ellerman.id.au
Cc: shuah@kernel.org
Cc: snitzer@redhat.com
Cc: thor.thayer@linux.intel.com
Cc: tj@kernel.org
Cc: viro@zeniv.linux.org.uk
Cc: will.deacon@arm.com
Link: http://lkml.kernel.org/r/1508792849-3115-19-git-send-email-paulmck@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-10-23 14:07:29 -07:00
|
|
|
|
2005-05-10 06:45:10 -07:00
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
|
|
|
|
|
2012-05-18 21:27:43 +02:00
|
|
|
|
2005-06-20 21:15:16 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-18 21:27:43 +02:00
|
|
|
|
|
|
|
|
|
2005-05-10 06:45:10 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2005-05-10 06:45:10 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-06 14:45:46 -07:00
|
|
|
|
2013-09-24 15:43:39 -04:00
|
|
|
|
2008-10-06 14:45:46 -07:00
|
|
|
|
2016-01-21 15:18:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-06 14:45:46 -07:00
|
|
|
|
2013-09-24 15:43:39 -04:00
|
|
|
|
|
|
|
|
|
2008-10-06 14:45:46 -07:00
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2008-10-06 14:45:46 -07:00
|
|
|
|
2013-08-23 16:05:26 -07:00
|
|
|
|
2008-10-06 14:45:46 -07:00
|
|
|
|
2015-08-25 21:10:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-24 20:12:38 +08:00
|
|
|
|
2015-08-25 21:10:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-12 11:48:23 -04:00
|
|
|
|
2015-08-25 21:10:09 +02:00
|
|
|
|
2022-11-01 22:13:55 +01:00
|
|
|
|
2015-08-25 21:10:09 +02:00
|
|
|
|
|
|
|
|
|
2024-03-12 11:48:23 -04:00
|
|
|
|
2015-08-25 21:10:09 +02:00
|
|
|
|
2024-03-12 11:48:23 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-25 21:10:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-05-10 06:45:10 -07:00
|
|
|
|
2008-10-06 14:45:46 -07:00
|
|
|
|
2015-08-25 21:10:09 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2020-11-25 17:24:58 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-04-30 15:37:19 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-23 23:11:19 -04:00
|
|
|
|
2008-04-30 15:37:19 -04:00
|
|
|
|
|
|
|
|
|
2020-02-14 20:37:00 +08:00
|
|
|
|
2009-04-15 21:34:40 -04:00
|
|
|
|
2008-04-30 15:37:19 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-25 17:24:58 +01:00
|
|
|
|
2008-04-30 15:37:19 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
USB: core: Add wireless_status sysfs attribute
Add a wireless_status sysfs attribute to USB devices to keep track of
whether a USB device that's comprised of a receiver dongle and an emitter
device over a, most of the time proprietary, wireless link has its emitter
connected or disconnected.
This will be used by user-space OS components to determine whether the
battery-powered part of the device is wirelessly connected or not,
allowing, for example:
- upower to hide the battery for devices where the device is turned off
but the receiver plugged in, rather than showing 0%, or other values
that could be confusing to users
- Pipewire to hide a headset from the list of possible inputs or outputs
or route audio appropriately if the headset is suddenly turned off, or
turned on
- libinput to determine whether a keyboard or mouse is present when its
receiver is plugged in.
This is done at the USB interface level as:
- the interface on which the wireless status is detected is sometimes
not the same as where it could be consumed (eg. the audio interface
on a headset dongle will still appear even if the headset is turned
off), and we cannot have synchronisation of status across subsystems.
- this behaviour is not specific to HID devices, even if the protocols
used to determine whether or not the remote device is connected can
be HID.
This is not an attribute that is meant to replace protocol specific
APIs, such as the ones available for WWAN, WLAN/Wi-Fi, or Bluetooth
or any other sort of networking, but solely for wireless devices with
an ad-hoc “lose it and your device is e-waste” receiver dongle.
The USB interface will only be exporting the wireless_status sysfs
attribute if it gets set through the API exported in the next commit.
Signed-off-by: Bastien Nocera <hadess@hadess.net>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20230302105555.51417-4-hadess@hadess.net
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2023-03-02 11:55:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-06-24 10:06:31 -07:00
|
|
|
|
2008-04-30 15:37:19 -04:00
|
|
|
|
|
|
|
|
|
USB: core: Add wireless_status sysfs attribute
Add a wireless_status sysfs attribute to USB devices to keep track of
whether a USB device that's comprised of a receiver dongle and an emitter
device over a, most of the time proprietary, wireless link has its emitter
connected or disconnected.
This will be used by user-space OS components to determine whether the
battery-powered part of the device is wirelessly connected or not,
allowing, for example:
- upower to hide the battery for devices where the device is turned off
but the receiver plugged in, rather than showing 0%, or other values
that could be confusing to users
- Pipewire to hide a headset from the list of possible inputs or outputs
or route audio appropriately if the headset is suddenly turned off, or
turned on
- libinput to determine whether a keyboard or mouse is present when its
receiver is plugged in.
This is done at the USB interface level as:
- the interface on which the wireless status is detected is sometimes
not the same as where it could be consumed (eg. the audio interface
on a headset dongle will still appear even if the headset is turned
off), and we cannot have synchronisation of status across subsystems.
- this behaviour is not specific to HID devices, even if the protocols
used to determine whether or not the remote device is connected can
be HID.
This is not an attribute that is meant to replace protocol specific
APIs, such as the ones available for WWAN, WLAN/Wi-Fi, or Bluetooth
or any other sort of networking, but solely for wireless devices with
an ad-hoc “lose it and your device is e-waste” receiver dongle.
The USB interface will only be exporting the wireless_status sysfs
attribute if it gets set through the API exported in the next commit.
Signed-off-by: Bastien Nocera <hadess@hadess.net>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20230302105555.51417-4-hadess@hadess.net
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2023-03-02 11:55:53 +01:00
|
|
|
|
2008-04-30 15:37:19 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-04-14 17:47:09 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-10-24 16:24:14 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-29 15:16:58 -04:00
|
|
|
|
2011-04-14 17:47:09 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-04-14 17:47:09 +02:00
|
|
|
|
2005-10-24 16:24:14 -04:00
|
|
|
|
2020-04-22 16:20:19 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-11-06 11:43:42 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-01-23 15:55:28 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-11-06 11:43:42 -05:00
|
|
|
|
|
|
|
|
|
2008-10-29 15:18:50 -04:00
|
|
|
|
|
|
|
|
|
2007-11-06 11:43:42 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|