mei: consume flow control on the first chunk of writing
Subsystems (5)
PATCH 1/11 mei: consume flow control on the first chunk of writing
From: Alexander Usyskin <[email protected]>
Consume the write flow control on the first chunk of the write instead of on the buffer completion.
We can safely assume that the consequent chunks have the flow control granted.
This addresses two issues:
1. Blocks other callbacks from the same client riding on the client's flow control and prevents interleaving of messages as FW cannot distinguish between two messages from the same client.
2. Fixes single buffer flow control arbitration in a clean way, without connection/disconnection book keeping
--- drivers/misc/mei/client.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
drivers/misc/mei/client.c +14 -14
@@ -755,9 +755,6 @@ void mei_cl_set_disconnected(struct mei_cl *cl)if (!WARN_ON (cl->me_cl->connect_count ==0 )) cl->me_cl->connect_count--; -if (cl->me_cl->connect_count ==0 ) - cl->me_cl->mei_flow_ctrl_creds =0 ; -mei_me_cl_put (cl->me_cl); cl->me_cl =NULL ; }
@@ -1272,6 +1269,7 @@ int mei_cl_irq_write(struct mei_cl *cl, struct mei_cl_cb *cb,u32 msg_slots;int slots;int rets; +bool first_chunk;if (WARN_ON (!cl || !cl->dev))return -ENODEV ;
@@ -1280,7 +1278,9 @@ int mei_cl_irq_write(struct mei_cl *cl, struct mei_cl_cb *cb, buf = &cb->buf; - rets =mei_cl_flow_ctrl_creds (cl); + first_chunk = cb->buf_idx ==0 ; + + rets = first_chunk ?mei_cl_flow_ctrl_creds (cl) :1 ;if (rets <0 )return rets;
@@ -1327,12 +1327,14 @@ int mei_cl_irq_write(struct mei_cl *cl, struct mei_cl_cb *cb, cb->buf_idx += mei_hdr.length; cb->completed = mei_hdr.msg_complete ==1 ; -if (mei_hdr.msg_complete) { +if (first_chunk) {if (mei_cl_flow_ctrl_reduce (cl))return -EIO ; -list_move_tail (&cb->list, &dev->write_waiting_list.list); } +if (mei_hdr.msg_complete) +list_move_tail (&cb->list, &dev->write_waiting_list.list); +return 0 ; }
@@ -1411,21 +1413,19 @@ int mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, bool blocking)if (rets) goto err; + rets =mei_cl_flow_ctrl_reduce (cl); +if (rets) + goto err; + cl->writing_state =MEI_WRITING ; cb->buf_idx = mei_hdr.length; cb->completed = mei_hdr.msg_complete ==1 ; out: -if (mei_hdr.msg_complete) { - rets =mei_cl_flow_ctrl_reduce (cl); -if (rets <0 ) - goto err; - +if (mei_hdr.msg_complete)list_add_tail (&cb->list, &dev->write_waiting_list.list); - }else { +else list_add_tail (&cb->list, &dev->write_list.list); - } -if (blocking && cl->writing_state !=MEI_WRITE_COMPLETE ) {
Signature · 1 line
2.1.0
PATCH 2/11 mei: request autosuspend at the end of write
From: Alexander Usyskin <[email protected]>
On longer non-blocking write might not complete at the end of autosuspend expiration, therefore we request autosuspend again on the write completion.
--- drivers/misc/mei/client.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/misc/mei/client.c +7 -1
@@ -1459,12 +1459,18 @@ err:*/ void mei_cl_complete (struct mei_cl *cl,struct mei_cl_cb *cb) { +struct mei_device *dev = cl->dev; +switch (cb->fop_type) {case MEI_FOP_WRITE :mei_io_cb_free (cb); cl->writing_state =MEI_WRITE_COMPLETE ; -if (waitqueue_active (&cl->tx_wait)) +if (waitqueue_active (&cl->tx_wait)) {wake_up_interruptible (&cl->tx_wait); + }else { +pm_runtime_mark_last_busy (dev->dev); +pm_request_autosuspend (dev->dev); + }break ;case MEI_FOP_READ :
Signature · 1 line
2.1.0
PATCH 3/11 mei: add also write waiting list to runtime pm blockers
In reply to Tomas WinklerThe io callback is clear from write_waitling_list after we receive interrupt from the hw to ack the write completion. We need to wait for this interrupt deliver before we try to enter low power state
--- drivers/misc/mei/init.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/misc/mei/init.c +5 -3
@@ -361,13 +361,15 @@ bool mei_write_is_idle(struct mei_device *dev) {bool idle = (dev->dev_state ==MEI_DEV_ENABLED &&list_empty (&dev->ctrl_wr_list.list) && -list_empty (&dev->write_list.list)); +list_empty (&dev->write_list.list) && +list_empty (&dev->write_waiting_list.list)); -dev_dbg (dev->dev,"write pg: is idle[%d] state=%s ctrl=%d write=%d\n" , +dev_dbg (dev->dev,"write pg: is idle[%d] state=%s ctrl=%01d write=%01d wwait=%01d\n" , idle,mei_dev_state_str (dev->dev_state),list_empty (&dev->ctrl_wr_list.list), -list_empty (&dev->write_list.list)); +list_empty (&dev->write_list.list), +list_empty (&dev->write_waiting_list.list));return idle; }
Signature · 1 line
2.1.0
PATCH 4/11 uuid: extract macros for assigning raw arrays
In reply to Tomas Winklerwe need 16 byte arrays for handling uuids in
device ids
--- include/uapi/linux/uuid.h | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-)
include/uapi/linux/uuid.h +24 -17
@@ -32,27 +32,34 @@ typedef struct { __u8 b[16]; } uuid_be; -#define UUID_LE (a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ -((uuid_le) \ -{{ (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \ - (b) & 0xff, ((b) >> 8) & 0xff, \ - (c) & 0xff, ((c) >> 8) & 0xff, \ - (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }}) +#define __UUID_LE (a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ + {(a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff,\ + (b) & 0xff, ((b) >> 8) & 0xff, \ + (c) & 0xff, ((c) >> 8) & 0xff, \ + (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7)} + +#define UUID_LE (a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ + ((uuid_le) {__UUID_LE(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7)}) + +#define __UUID_BE (a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ + {((a) >> 24) & 0xff, ((a) >> 16) & 0xff, ((a) >> 8) & 0xff, (a) & 0xff,\ + ((b) >> 8) & 0xff, (b) & 0xff, \ + ((c) >> 8) & 0xff, (c) & 0xff, \ + (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7)}#define UUID_BE (a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ -((uuid_be) \ -{{ ((a) >> 24) & 0xff, ((a) >> 16) & 0xff, ((a) >> 8) & 0xff, (a) & 0xff, \ - ((b) >> 8) & 0xff, (b) & 0xff, \ - ((c) >> 8) & 0xff, (c) & 0xff, \ - (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }}) + ((uuid_be) {__UUID_BE(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7)}) + +#define __NULL_UUID_LE \ + __UUID_LE(0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00) -#define NULL_UUID_LE \ - UUID_LE(0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00) +#define NULL_UUID_LE ((uuid_le) {__NULL_UUID_LE}) -#define NULL_UUID_BE \ - UUID_BE(0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00) +#define __NULL_UUID_BE \ + __UUID_BE(0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00) +#define NULL_UUID_BE ((uuid_be) {__NULL_UUID_BE})#endif /* _UAPI_LINUX_UUID_H_ */
Signature · 1 line
2.1.0
PATCH 5/11 mei: bus: report also uuid in module alias
In reply to Tomas WinklerIn order to automate modules matching add device uuid which is reported in client enumeration, keep also the name that is needed in for nfc distinguishing radio vendor
Report mei:name:uuid
--- Documentation/ABI/testing/sysfs-bus-mei | 2 +- drivers/misc/mei/bus.c | 42 ++++++++++++++++++++++++++------- drivers/misc/mei/mei_dev.h | 2 ++ drivers/nfc/mei_phy.h | 3 +++ drivers/nfc/microread/mei.c | 2 +- drivers/nfc/pn544/mei.c | 2 +- include/linux/mod_devicetable.h | 13 ++++++++++ scripts/mod/devicetable-offsets.c | 1 + scripts/mod/file2alias.c | 18 ++++++++++++-- 9 files changed, 72 insertions(+), 13 deletions(-)
Documentation/ABI/testing/sysfs-bus-mei +1 -1
@@ -4,4 +4,4 @@ KernelVersion: 3.10 Contact: Samuel Ortiz <[email protected]> [email protected] Description: Stores the same MODALIAS value emitted by uevent - Format: mei:<mei device name> + Format: mei:<mei device name>:<device uuid>:
drivers/misc/mei/bus.c +34 -8
87 lines not on this page · raw message
drivers/misc/mei/mei_dev.h +2 -0
@@ -376,6 +376,7 @@ struct mei_cl *mei_cl_bus_find_cl_by_uuid(struct mei_device *dev, uuid_le uuid);* @dev: linux driver model device pointer * @me_cl: me client * @cl: mei client +* @name: device name * @ops: ME transport ops * @event_work: async work to execute event callback * @event_cb: Drivers register this callback to get asynchronous ME
@@ -389,6 +390,7 @@ struct mei_cl_device {struct mei_me_client *me_cl;struct mei_cl *cl; +char name[MEI_CL_NAME_SIZE ];const struct mei_cl_ops *ops;
drivers/nfc/mei_phy.h +3 -0
@@ -3,7 +3,10 @@#include <linux/mei_cl_bus.h> #include <net/nfc/hci.h> +#include <linux/uuid.h> +#define MEI_NFC_UUID __UUID_LE(0x0bb17a78, 0x2a8e, 0x4c50, \ + 0x94, 0xd4, 0x50, 0x26, 0x67, 0x23, 0x77, 0x5c)#define MEI_NFC_HEADER_SIZE 10#define MEI_NFC_MAX_HCI_PAYLOAD 300
drivers/nfc/microread/mei.c +1 -1
@@ -67,7 +67,7 @@ static int microread_mei_remove(struct mei_cl_device *device) }static struct mei_cl_device_id microread_mei_tbl[] = { - {MICROREAD_DRIVER_NAME }, + {MICROREAD_DRIVER_NAME ,MEI_NFC_UUID },/* required last entry */ { }
drivers/nfc/pn544/mei.c +1 -1
@@ -67,7 +67,7 @@ static int pn544_mei_remove(struct mei_cl_device *device) }static struct mei_cl_device_id pn544_mei_tbl[] = { - {PN544_DRIVER_NAME }, + {PN544_DRIVER_NAME ,MEI_NFC_UUID },/* required last entry */ { }
include/linux/mod_devicetable.h +13 -0
@@ -599,9 +599,22 @@ struct ipack_device_id {#define MEI_CL_MODULE_PREFIX "mei:"#define MEI_CL_NAME_SIZE 32 +#define MEI_CL_UUID_FMT "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x" +#define MEI_CL_UUID_ARGS (_u) \ + _u[0], _u[1], _u[2], _u[3], _u[4], _u[5], _u[6], _u[7], \ + _u[8], _u[9], _u[10], _u[11], _u[12], _u[13], _u[14], _u[15] +/** +* struct mei_cl_device_id - MEI client device identifier +* @name: helper name +* @uuid: client uuid +* @driver_info: information used by the driver. +* +* identifies mei client device by uuid and name +*/ struct mei_cl_device_id {char name[MEI_CL_NAME_SIZE ]; +__u8 uuid[16 ];kernel_ulong_t driver_info; };
scripts/mod/devicetable-offsets.c +1 -0
@@ -182,6 +182,7 @@ int main(void)DEVID (mei_cl_device_id);DEVID_FIELD (mei_cl_device_id, name); +DEVID_FIELD (mei_cl_device_id, uuid);DEVID (rio_device_id);DEVID_FIELD (rio_device_id, did);
scripts/mod/file2alias.c +16 -2
@@ -131,6 +131,15 @@ static inline void add_wildcard(char *str)strcat (str + len,"*" ); } +static inline void add_uuid (char *str,__u8 uuid[16 ]) +{ +int len =strlen (str); +int i; + +for (i =0 ; i <16 ; i++) +sprintf (str + len + (i <<1 ),"%02x" , uuid[i]); +} +/** * Check that sizeof(device_id type) are consistent with size of section * in .o file. If in-consistent then userspace and kernel does not agree
@@ -1160,13 +1169,18 @@ static int do_cpu_entry(const char *filename, void *symval, char *alias) }ADD_TO_DEVTABLE ("cpu" , cpu_feature, do_cpu_entry); -/* Looks like: mei:S */ +/* Looks like: mei:S:uuid */ static int do_mei_entry (const char *filename,void *symval,char *alias) {DEF_FIELD_ADDR (symval, mei_cl_device_id, name); +DEF_FIELD_ADDR (symval, mei_cl_device_id, uuid); + +sprintf (alias,MEI_CL_MODULE_PREFIX ); +sprintf (alias +strlen (alias),"%s:" , (*name)[0 ] ? *name :"*" ); +add_uuid (alias, *uuid); -sprintf (alias,MEI_CL_MODULE_PREFIX "%s" , *name); +strcat (alias,":*" );return 1 ; }
Signature · 1 line
2.1.0
PATCH 6/11 mei: bus: add name and uuid into device attributes
In reply to Tomas WinklerExport name and uuid via sysfs and uevent
--- Documentation/ABI/testing/sysfs-bus-mei | 14 ++++++++++++++ drivers/misc/mei/bus.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+)
Documentation/ABI/testing/sysfs-bus-mei +14 -0
@@ -5,3 +5,17 @@ Contact: Samuel Ortiz <[email protected]> [email protected] Description: Stores the same MODALIAS value emitted by uevent Format: mei:<mei device name>:<device uuid>: + +What: /sys/bus/mei/devices/.../name +Date: May 2015 +KernelVersion: 4.2 +Contact: Tomas Winkler <[email protected]> +Description: Stores mei client device name + Format: string + +What: /sys/bus/mei/devices/.../uuid +Date: May 2015 +KernelVersion: 4.2 +Contact: Tomas Winkler <[email protected]> +Description: Stores mei client device uuid + Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
drivers/misc/mei/bus.c +33 -0
@@ -114,6 +114,31 @@ static int mei_cl_device_remove(struct device *dev)return driver->remove (device); } +static ssize_t name_show (struct device *dev,struct device_attribute *a, +char *buf) +{ +struct mei_cl_device *device =to_mei_cl_device (dev); +size_t len; + + len =snprintf (buf,PAGE_SIZE ,"%s" , device->name); + +return (len >=PAGE_SIZE ) ? (PAGE_SIZE -1 ) : len; +} +static DEVICE_ATTR_RO (name); + +static ssize_t uuid_show (struct device *dev,struct device_attribute *a, +char *buf) +{ +struct mei_cl_device *device =to_mei_cl_device (dev); +const uuid_le *uuid =mei_me_cl_uuid (device->me_cl); +size_t len; + + len =snprintf (buf,PAGE_SIZE ,"%pUl" , uuid); + +return (len >=PAGE_SIZE ) ? (PAGE_SIZE -1 ) : len; +} +static DEVICE_ATTR_RO (uuid); +static ssize_t modalias_show (struct device *dev,struct device_attribute *a,char *buf) {
@@ -129,6 +154,8 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *a,static DEVICE_ATTR_RO (modalias);static struct attribute *mei_cl_dev_attrs[] = { + &dev_attr_name.attr, + &dev_attr_uuid.attr, &dev_attr_modalias.attr,NULL , };
@@ -139,6 +166,12 @@ static int mei_cl_uevent(struct device *dev, struct kobj_uevent_env *env)struct mei_cl_device *device =to_mei_cl_device (dev);const uuid_le *uuid =mei_me_cl_uuid (device->me_cl); +if (add_uevent_var (env,"MEI_CL_UUID=%pUl" , uuid)) +return -ENOMEM ; + +if (add_uevent_var (env,"MEI_CL_NAME=%s" , device->name)) +return -ENOMEM ; +if (add_uevent_var (env,"MODALIAS=mei:%s:" MEI_CL_UUID_FMT ":" , device->name,MEI_CL_UUID_ARGS (uuid->b)))return -ENOMEM ;
Signature · 1 line
2.1.0
PATCH 7/11 NFC: mei_phy: move all nfc logic from mei driver to nfc
In reply to Tomas Winklermove nfc logic to mei_phy module, we prefer as much as possible not to deal with a particualr client protocol in the mei generic infrasutcutre
--- drivers/misc/mei/bus.c | 36 +----- drivers/misc/mei/mei_dev.h | 7 +- drivers/misc/mei/nfc.c | 175 +-------------------------- drivers/nfc/mei_phy.c | 293 ++++++++++++++++++++++++++++++++++++++++----- drivers/nfc/mei_phy.h | 35 ++++-- 5 files changed, 304 insertions(+), 242 deletions(-)
drivers/misc/mei/bus.c +6 -30
@@ -220,8 +220,7 @@ struct mei_cl *mei_cl_bus_find_cl_by_uuid(struct mei_device *dev,struct mei_cl_device *mei_cl_add_device (struct mei_device *dev,struct mei_me_client *me_cl,struct mei_cl *cl, -char *name, -struct mei_cl_ops *ops) +char *name) {struct mei_cl_device *device;int status;
@@ -235,9 +234,8 @@ struct mei_cl_device *mei_cl_add_device(struct mei_device *dev,kfree (device);return NULL ; } - device->cl = cl; - device->ops = ops; + device->cl = cl; device->dev.parent = dev->dev; device->dev.bus = &mei_cl_bus_type; device->dev.type = &mei_cl_device_type;
@@ -294,7 +292,7 @@ void mei_cl_driver_unregister(struct mei_cl_driver *driver) }EXPORT_SYMBOL_GPL (mei_cl_driver_unregister); -static ssize_t ___mei_cl_send (struct mei_cl *cl,u8 *buf,size_t length, +ssize_t __mei_cl_send (struct mei_cl *cl,u8 *buf,size_t length,bool blocking) {struct mei_device *dev;
@@ -408,16 +406,6 @@ out:return rets; } -inline ssize_t __mei_cl_async_send (struct mei_cl *cl,u8 *buf,size_t length) -{ -return ___mei_cl_send (cl, buf, length,0 ); -} - -inline ssize_t __mei_cl_send (struct mei_cl *cl,u8 *buf,size_t length) -{ -return ___mei_cl_send (cl, buf, length,1 ); -} -ssize_t mei_cl_send (struct mei_cl_device *device,u8 *buf,size_t length) {struct mei_cl *cl = device->cl;
@@ -425,23 +413,17 @@ ssize_t mei_cl_send(struct mei_cl_device *device, u8 *buf, size_t length)if (cl ==NULL )return -ENODEV ; -if (device->ops && device->ops->send) -return device->ops->send (device, buf, length); - -return __mei_cl_send (cl, buf, length); +return __mei_cl_send (cl, buf, length,1 ); }EXPORT_SYMBOL_GPL (mei_cl_send);ssize_t mei_cl_recv (struct mei_cl_device *device,u8 *buf,size_t length) { -struct mei_cl *cl = device->cl; +struct mei_cl *cl = device->cl;if (cl ==NULL )return -ENODEV ; -if (device->ops && device->ops->recv) -return device->ops->recv (device, buf, length); -return __mei_cl_recv (cl, buf, length); }EXPORT_SYMBOL_GPL (mei_cl_recv);
@@ -522,10 +504,7 @@ int mei_cl_enable_device(struct mei_cl_device *device)if (device->event_cb)mei_cl_read_start (device->cl,0 ,NULL ); -if (!device->ops || !device->ops->enable) -return 0 ; - -return device->ops->enable (device); +return 0 ; }EXPORT_SYMBOL_GPL (mei_cl_enable_device);
@@ -540,9 +519,6 @@ int mei_cl_disable_device(struct mei_cl_device *device) dev = cl->dev; -if (device->ops && device->ops->disable) - device->ops->disable (device); - device->event_cb =NULL ;mutex_lock (&dev->device_lock);
drivers/misc/mei/mei_dev.h +3 -4
@@ -352,12 +352,11 @@ struct mei_cl_ops {struct mei_cl_device *mei_cl_add_device (struct mei_device *dev,struct mei_me_client *me_cl,struct mei_cl *cl, -char *name, -struct mei_cl_ops *ops); +char *name);void mei_cl_remove_device (struct mei_cl_device *device); -ssize_t __mei_cl_async_send (struct mei_cl *cl,u8 *buf,size_t length); -ssize_t __mei_cl_send (struct mei_cl *cl,u8 *buf,size_t length); +ssize_t __mei_cl_send (struct mei_cl *cl,u8 *buf,size_t length, +bool blocking);ssize_t __mei_cl_recv (struct mei_cl *cl,u8 *buf,size_t length);void mei_cl_bus_rx_event (struct mei_cl *cl);void mei_cl_bus_remove_devices (struct mei_device *dev);
drivers/misc/mei/nfc.c +2 -173
227 lines not on this page · raw message
drivers/nfc/mei_phy.c +266 -27
370 lines not on this page · raw message
drivers/nfc/mei_phy.h +27 -8
@@ -10,23 +10,42 @@#define MEI_NFC_HEADER_SIZE 10#define MEI_NFC_MAX_HCI_PAYLOAD 300 +/** +* struct nfc_mei_phy +* +* @device: mei device +* @hdev: nfc hci device + +* @send_wq: send completion wait queue +* @fw_ivn: NFC Interface Version Number +* @vendor_id: NFC manufacturer ID +* @radio_type: NFC radio type +* @reserved: reserved for alignment +* @req_id: message counter +* @recv_req_id: reception message counter +* @powered: the device is in powered state +* @hard_fault: < 0 if hardware error occurred +* and prevents normal operation. +*/ struct nfc_mei_phy {struct mei_cl_device *device;struct nfc_hci_dev *hdev; -int powered; +wait_queue_head_t send_wq; +u8 fw_ivn; +u8 vendor_id; +u8 radio_type; +u8 reserved; + +u16 req_id; +u16 recv_req_id; -int hard_fault;/* -* < 0 if hardware error occured -* and prevents normal operation. -*/ +int powered; +int hard_fault; };extern struct nfc_phy_ops mei_phy_ops; -int nfc_mei_phy_enable (void *phy_id); -void nfc_mei_phy_disable (void *phy_id); -void nfc_mei_event_cb (struct mei_cl_device *device,u32 events,void *context);struct nfc_mei_phy *nfc_mei_phy_alloc (struct mei_cl_device *device);void nfc_mei_phy_free (struct nfc_mei_phy *phy);
Signature · 1 line
2.1.0
PATCH 8/11 mei: bus: kill mei_cl_ops
In reply to Tomas Winklersince we move all nfc hanling to the mei_phy module we can kill mei_cl_ops
--- drivers/misc/mei/mei_dev.h | 24 ------------------------ 1 file changed, 24 deletions(-)
drivers/misc/mei/mei_dev.h +0 -24
@@ -328,27 +328,6 @@ struct mei_hw_ops {/* MEI bus API*/ -/** -* struct mei_cl_ops - MEI CL device ops -* This structure allows ME host clients to implement technology -* specific operations. -* -* @enable: Enable an MEI CL device. Some devices require specific -* HECI commands to initialize completely. -* @disable: Disable an MEI CL device. -* @send: Tx hook for the device. This allows ME host clients to trap -* the device driver buffers before actually physically -* pushing it to the ME. -* @recv: Rx hook for the device. This allows ME host clients to trap the -* ME buffers before forwarding them to the device driver. -*/ -struct mei_cl_ops { -int (*enable)(struct mei_cl_device *device); -int (*disable)(struct mei_cl_device *device); -int (*send)(struct mei_cl_device *device,u8 *buf,size_t length); -int (*recv)(struct mei_cl_device *device,u8 *buf,size_t length); -}; - struct mei_cl_device *mei_cl_add_device(struct mei_device *dev, struct mei_me_client *me_cl, struct mei_cl *cl,
@@ -376,7 +355,6 @@ struct mei_cl *mei_cl_bus_find_cl_by_uuid(struct mei_device *dev, uuid_le uuid);* @me_cl: me client * @cl: mei client * @name: device name -* @ops: ME transport ops * @event_work: async work to execute event callback * @event_cb: Drivers register this callback to get asynchronous ME * events (e.g. Rx buffer pending) notifications.
@@ -391,8 +369,6 @@ struct mei_cl_device {struct mei_cl *cl;char name[MEI_CL_NAME_SIZE ]; -const struct mei_cl_ops *ops; -struct work_struct event_work;mei_cl_event_cb_t event_cb;void *event_context;
Signature · 1 line
2.1.0
PATCH 9/11 NFC: mei_phy: adjust mei nfc header according the spec
In reply to Tomas Winkler1. mei_nfc_hci_hdr and mei_nfc_hdr are just the same thing so drop one
2. use mei_nfc_hdr structure as the member of the command and the reply instead of replicating all header fields.
3. dump the header for easier debugging
--- drivers/nfc/mei_phy.c | 58 +++++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 27 deletions(-)
drivers/nfc/mei_phy.c +31 -27
@@ -24,22 +24,22 @@#include "mei_phy.h" -struct mei_nfc_cmd { -u8 command; +struct mei_nfc_hdr { +u8 cmd;u8 status;u16 req_id;u32 reserved;u16 data_size; +} __packed; + +struct mei_nfc_cmd { +struct mei_nfc_hdr hdr;u8 sub_command;u8 data[]; } __packed;struct mei_nfc_reply { -u8 command; -u8 status; -u16 req_id; -u32 reserved; -u16 data_size; +struct mei_nfc_hdr hdr;u8 sub_command;u8 reply_status;u8 data[];
@@ -69,13 +69,6 @@ struct mei_nfc_connect_resp {u16 me_build; } __packed; -struct mei_nfc_hci_hdr { -u8 cmd; -u8 status; -u16 req_id; -u32 reserved; -u16 data_size; -} __packed;#define MEI_NFC_CMD_MAINTENANCE 0x00#define MEI_NFC_CMD_HCI_SEND 0x01
@@ -84,9 +77,6 @@ struct mei_nfc_hci_hdr {#define MEI_NFC_SUBCMD_CONNECT 0x00#define MEI_NFC_SUBCMD_IF_VERSION 0x01 -#define MEI_NFC_HEADER_SIZE 10 - -#define MEI_NFC_MAX_READ (MEI_NFC_HEADER_SIZE + MEI_NFC_MAX_HCI_PAYLOAD)#define MEI_DUMP_SKB_IN (info, skb) \
@@ -103,6 +93,13 @@ do { \ 16, 1, (skb)->data, (skb)->len, false); \ } while (0) +#define MEI_DUMP_NFC_HDR (info, _hdr) \ +do { \ + pr_debug("%s:\n", info); \ + pr_debug("cmd=%02d status=%d req_id=%d rsvd=%d size=%d\n", \ + (_hdr)->cmd, (_hdr)->status, (_hdr)->req_id, \ + (_hdr)->reserved, (_hdr)->data_size); \ +} while (0)static int mei_nfc_if_version (struct nfc_mei_phy *phy) {
@@ -116,10 +113,11 @@ static int mei_nfc_if_version(struct nfc_mei_phy *phy)pr_info ("%s\n" , __func__);memset (&cmd,0 ,sizeof (struct mei_nfc_cmd )); - cmd.command =MEI_NFC_CMD_MAINTENANCE ; - cmd.data_size =1 ; + cmd.hdr.cmd =MEI_NFC_CMD_MAINTENANCE ; + cmd.hdr.data_size =1 ; cmd.sub_command =MEI_NFC_SUBCMD_IF_VERSION ; +MEI_DUMP_NFC_HDR ("version" , &cmd.hdr); r =mei_cl_send (phy->device, (u8 *)&cmd,sizeof (struct mei_nfc_cmd ));if (r <0 ) {pr_err ("Could not send IF version cmd\n" );
@@ -181,12 +179,13 @@ static int mei_nfc_connect(struct nfc_mei_phy *phy) connect_resp = (struct mei_nfc_connect_resp *)reply->data; - cmd->command =MEI_NFC_CMD_MAINTENANCE ; - cmd->data_size =3 ; + cmd->hdr.cmd =MEI_NFC_CMD_MAINTENANCE ; + cmd->hdr.data_size =3 ; cmd->sub_command =MEI_NFC_SUBCMD_CONNECT ; connect->fw_ivn = phy->fw_ivn; connect->vendor_id = phy->vendor_id; +MEI_DUMP_NFC_HDR ("connect request" , &cmd->hdr); r =mei_cl_send (phy->device, (u8 *)cmd, connect_length);if (r <0 ) {pr_err ("Could not send connect cmd %d\n" , r);
@@ -200,6 +199,8 @@ static int mei_nfc_connect(struct nfc_mei_phy *phy) goto err; } +MEI_DUMP_NFC_HDR ("connect reply" , &reply->hdr); +pr_info ("IVN 0x%x Vendor ID 0x%x\n" , connect_resp->fw_ivn, connect_resp->vendor_id);
@@ -218,7 +219,7 @@ err:static int mei_nfc_send (struct nfc_mei_phy *phy,u8 *buf,size_t length) { -struct mei_nfc_hci_hdr *hdr; +struct mei_nfc_hdr *hdr;u8 *mei_buf;int err;
@@ -227,13 +228,15 @@ static int mei_nfc_send(struct nfc_mei_phy *phy, u8 *buf, size_t length)if (!mei_buf) goto out; - hdr = (struct mei_nfc_hci_hdr *) mei_buf; + hdr = (struct mei_nfc_hdr *)mei_buf; hdr->cmd =MEI_NFC_CMD_HCI_SEND ; hdr->status =0 ; hdr->req_id = phy->req_id; hdr->reserved =0 ; hdr->data_size = length; +MEI_DUMP_NFC_HDR ("send" , hdr); +memcpy (mei_buf +MEI_NFC_HEADER_SIZE , buf, length); err =mei_cl_send (phy->device, mei_buf, length +MEI_NFC_HEADER_SIZE );if (err <0 )
@@ -272,17 +275,18 @@ static int nfc_mei_phy_write(void *phy_id, struct sk_buff *skb)static int mei_nfc_recv (struct nfc_mei_phy *phy,u8 *buf,size_t length) { -struct mei_nfc_hci_hdr *hci_hdr; +struct mei_nfc_hdr *hdr;int received_length; received_length =mei_cl_recv (phy->device, buf, length);if (received_length <0 )return received_length; - hci_hdr = (struct mei_nfc_hci_hdr *) buf; + hdr = (struct mei_nfc_hdr *) buf; -if (hci_hdr->cmd ==MEI_NFC_CMD_HCI_SEND ) { - phy->recv_req_id = hci_hdr->req_id; +MEI_DUMP_NFC_HDR ("receive" , hdr); +if (hdr->cmd ==MEI_NFC_CMD_HCI_SEND ) { + phy->recv_req_id = hdr->req_id;wake_up (&phy->send_wq);return 0 ;
Signature · 1 line
2.1.0
PATCH 10/11 mei: export mei client device struct to external use
In reply to Tomas Winkler--- drivers/misc/mei/mei_dev.h | 35 ----------------------------------- include/linux/mei_cl_bus.h | 38 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 36 insertions(+), 37 deletions(-)
drivers/misc/mei/mei_dev.h +0 -35
@@ -343,41 +343,6 @@ int mei_cl_bus_init(void);void mei_cl_bus_exit (void );struct mei_cl *mei_cl_bus_find_cl_by_uuid (struct mei_device *dev,uuid_le uuid); - -/** -* struct mei_cl_device - MEI device handle -* An mei_cl_device pointer is returned from mei_add_device() -* and links MEI bus clients to their actual ME host client pointer. -* Drivers for MEI devices will get an mei_cl_device pointer -* when being probed and shall use it for doing ME bus I/O. -* -* @dev: linux driver model device pointer -* @me_cl: me client -* @cl: mei client -* @name: device name -* @event_work: async work to execute event callback -* @event_cb: Drivers register this callback to get asynchronous ME -* events (e.g. Rx buffer pending) notifications. -* @event_context: event callback run context -* @events: Events bitmask sent to the driver. -* @priv_data: client private data -*/ -struct mei_cl_device { -struct device dev; - -struct mei_me_client *me_cl; -struct mei_cl *cl; -char name[MEI_CL_NAME_SIZE ]; - -struct work_struct event_work; -mei_cl_event_cb_t event_cb; -void *event_context; -unsigned long events; - -void *priv_data; -}; - -/** * enum mei_pg_event - power gating transition events *
include/linux/mei_cl_bus.h +36 -2
@@ -7,6 +7,42 @@struct mei_cl_device ; +typedef void (*mei_cl_event_cb_t )(struct mei_cl_device *device, +u32 events,void *context); + +/** +* struct mei_cl_device - MEI device handle +* An mei_cl_device pointer is returned from mei_add_device() +* and links MEI bus clients to their actual ME host client pointer. +* Drivers for MEI devices will get an mei_cl_device pointer +* when being probed and shall use it for doing ME bus I/O. +* +* @dev: linux driver model device pointer +* @me_cl: me client +* @cl: mei client +* @name: device name +* @event_work: async work to execute event callback +* @event_cb: Drivers register this callback to get asynchronous ME +* events (e.g. Rx buffer pending) notifications. +* @event_context: event callback run context +* @events: Events bitmask sent to the driver. +* @priv_data: client private data +*/ +struct mei_cl_device { +struct device dev; + +struct mei_me_client *me_cl; +struct mei_cl *cl; +char name[MEI_CL_NAME_SIZE ]; + +struct work_struct event_work; +mei_cl_event_cb_t event_cb; +void *event_context; +unsigned long events; + +void *priv_data; +}; +struct mei_cl_driver {struct device_driver driver;const char *name;
@@ -28,8 +64,6 @@ void mei_cl_driver_unregister(struct mei_cl_driver *driver);ssize_t mei_cl_send (struct mei_cl_device *device,u8 *buf,size_t length);ssize_t mei_cl_recv (struct mei_cl_device *device,u8 *buf,size_t length); -typedef void (*mei_cl_event_cb_t )(struct mei_cl_device *device, -u32 events,void *context);int mei_cl_register_event_cb (struct mei_cl_device *device,mei_cl_event_cb_t read_cb,void *context);
Signature · 1 line
2.1.0
PATCH 11/11 mei: revamp mei bus code
In reply to Tomas WinklerMEI bus was designed around nfc and was hard to extend. Instead of hard coded way of adding the devices on the mei bus we scan whole me client list and create a device for each eligible me client; currently we support only clients with single connection and fixed address clients.
NFC radio name detection is run as a fixup routine
--- drivers/misc/mei/Makefile | 2 +- drivers/misc/mei/bus-fixup.c | 306 ++++++++++++++ drivers/misc/mei/bus.c | 975 ++++++++++++++++++++++++++++--------------- drivers/misc/mei/client.c | 9 +- drivers/misc/mei/init.c | 5 +- drivers/misc/mei/mei_dev.h | 24 +- drivers/misc/mei/nfc.c | 414 ------------------ include/linux/mei_cl_bus.h | 12 + 8 files changed, 968 insertions(+), 779 deletions(-) create mode 100644 drivers/misc/mei/bus-fixup.c delete mode 100644 drivers/misc/mei/nfc.c
drivers/misc/mei/Makefile +1 -1
@@ -11,7 +11,7 @@ mei-objs += main.o mei-objs += amthif.o mei-objs += wd.o mei-objs += bus.o -mei-objs += nfc.o +mei-objs += bus-fixup.o mei-$(CONFIG_DEBUG_FS) += debugfs.o obj-$(CONFIG_INTEL_MEI_ME) += mei-me.o
drivers/misc/mei/bus-fixup.c new file +306 -0
306 lines not on this page · raw message
drivers/misc/mei/bus.c +636 -339
1,081 lines not on this page · raw message
drivers/misc/mei/client.c +2 -7
@@ -558,7 +558,6 @@ void mei_cl_init(struct mei_cl *cl, struct mei_device *dev)INIT_LIST_HEAD (&cl->rd_completed);INIT_LIST_HEAD (&cl->rd_pending);INIT_LIST_HEAD (&cl->link); -INIT_LIST_HEAD (&cl->device_link); cl->writing_state =MEI_IDLE ; cl->state =MEI_FILE_INITIALIZING ; cl->dev = dev;
@@ -690,16 +689,12 @@ void mei_host_client_init(struct work_struct *work)mei_wd_host_init (dev, me_cl);mei_me_cl_put (me_cl); - me_cl =mei_me_cl_by_uuid (dev, &mei_nfc_guid); -if (me_cl) -mei_nfc_host_init (dev, me_cl); -mei_me_cl_put (me_cl); - - dev->dev_state =MEI_DEV_ENABLED ; dev->reset_count =0 ;mutex_unlock (&dev->device_lock); +mei_cl_bus_rescan (dev); +pm_runtime_mark_last_busy (dev->dev);dev_dbg (dev->dev,"rpm: autosuspend\n" );pm_runtime_autosuspend (dev->dev);
drivers/misc/mei/init.c +2 -3
@@ -331,8 +331,6 @@ void mei_stop(struct mei_device *dev)mei_cancel_work (dev); -mei_nfc_host_exit (dev); -mei_cl_bus_remove_devices (dev);mutex_lock (&dev->device_lock);
@@ -388,10 +386,11 @@ void mei_device_init(struct mei_device *dev, {/* setup our list array */ INIT_LIST_HEAD (&dev->file_list); -INIT_LIST_HEAD (&dev->device_list); +INIT_LIST_HEAD (&dev->devices);INIT_LIST_HEAD (&dev->me_clients);mutex_init (&dev->device_lock);init_rwsem (&dev->me_clients_rwsem); +mutex_init (&dev->cl_bus_lock);init_waitqueue_head (&dev->wait_hw_ready);init_waitqueue_head (&dev->wait_pg);init_waitqueue_head (&dev->wait_hbm_start);
drivers/misc/mei/mei_dev.h +9 -15
@@ -178,7 +178,7 @@ struct mei_fw_status {* @client_id: me client id * @mei_flow_ctrl_creds: flow control credits * @connect_count: number connections to this client -* @reserved: reserved +* @bus_added: added to bus */ struct mei_me_client {struct list_head list;
@@ -187,7 +187,7 @@ struct mei_me_client {u8 client_id;u8 mei_flow_ctrl_creds;u8 connect_count; -u8 reserved; +u8 bus_added; };
@@ -241,7 +241,6 @@ struct mei_cl_cb {* @rd_completed: completed read * * @device: device on the mei client bus -* @device_link: link to bus clients */ struct mei_cl {struct list_head link;
@@ -260,9 +259,7 @@ struct mei_cl {struct list_head rd_pending;struct list_head rd_completed; -/* MEI CL bus data */ struct mei_cl_device *device; -struct list_head device_link; };/** struct mei_hw_ops
@@ -328,12 +325,9 @@ struct mei_hw_ops {/* MEI bus API*/ -struct mei_cl_device *mei_cl_add_device (struct mei_device *dev, -struct mei_me_client *me_cl, -struct mei_cl *cl, -char *name); -void mei_cl_remove_device (struct mei_cl_device *device); - +void mei_cl_bus_rescan (struct mei_device *bus); +void mei_cl_scan (struct mei_device *dev,struct mei_me_client *me_cl); +void mei_cl_dev_fixup (struct mei_cl_device *dev);ssize_t __mei_cl_send (struct mei_cl *cl,u8 *buf,size_t length,bool blocking);ssize_t __mei_cl_recv (struct mei_cl *cl,u8 *buf,size_t length);
@@ -341,7 +335,6 @@ void mei_cl_bus_rx_event(struct mei_cl *cl);void mei_cl_bus_remove_devices (struct mei_device *dev);int mei_cl_bus_init (void );void mei_cl_bus_exit (void ); -struct mei_cl *mei_cl_bus_find_cl_by_uuid (struct mei_device *dev,uuid_le uuid);/** * enum mei_pg_event - power gating transition events
@@ -440,7 +433,8 @@ const char *mei_pg_state_str(enum mei_pg_state state);* @init_work : work item for the device init * @reset_work : work item for the device reset * -* @device_list : mei client bus list +* @cl_bus_lock : client bus list lock +* @devices : mei client bus list * * @dbgfs_dir : debugfs mei root directory *
@@ -535,8 +529,8 @@ struct mei_device {struct work_struct init_work;struct work_struct reset_work; -/* List of bus devices */ -struct list_head device_list; +struct mutex cl_bus_lock; +struct list_head devices;#if IS_ENABLED (CONFIG_DEBUG_FS )struct dentry *dbgfs_dir;
drivers/misc/mei/nfc.c deleted +0 -414
414 lines not on this page · raw message
include/linux/mei_cl_bus.h +12 -0
@@ -6,6 +6,7 @@#include <linux/mod_devicetable.h> struct mei_cl_device ; +struct mei_device ;typedef void (*mei_cl_event_cb_t )(struct mei_cl_device *device,u32 events,void *context);
@@ -17,6 +18,8 @@ typedef void (*mei_cl_event_cb_t)(struct mei_cl_device *device,* Drivers for MEI devices will get an mei_cl_device pointer * when being probed and shall use it for doing ME bus I/O. * +* @bus_list: device on the bus list +* @bus: parent mei device * @dev: linux driver model device pointer * @me_cl: me client * @cl: mei client
@@ -26,9 +29,15 @@ typedef void (*mei_cl_event_cb_t)(struct mei_cl_device *device,* events (e.g. Rx buffer pending) notifications. * @event_context: event callback run context * @events: Events bitmask sent to the driver. +* +* @do_match: wheather device can be matched with a driver +* @is_added: device is already scanned * @priv_data: client private data */ struct mei_cl_device { +struct list_head bus_list; +struct mei_device *bus; +struct device dev;struct mei_me_client *me_cl;
@@ -40,6 +49,9 @@ struct mei_cl_device {void *event_context;unsigned long events; + unsigned int do_match:1; + unsigned int is_added:1; +void *priv_data; };
Signature · 1 line
2.1.0
Greg KH
maintainerRe: [char-misc-next 11/11] mei: revamp mei bus code
Quoted 9 lines · Tomas Winkler
MEI bus was designed around nfc and was hard to extend. Instead of hard coded way of adding the devices on the mei bus we scan whole me client list and create a device for each eligible me client; currently we support only clients with single connection and fixed address clients.
NFC radio name detection is run as a fixup routineCc Samuel Ortiz <[email protected]>Signed-off-by Tomas Winkler <[email protected]>
Quoted 12 lines
--- drivers/misc/mei/Makefile | 2 +- drivers/misc/mei/bus-fixup.c | 306 ++++++++++++++ drivers/misc/mei/bus.c | 975 ++++++++++++++++++++++++++++--------------- drivers/misc/mei/client.c | 9 +- drivers/misc/mei/init.c | 5 +- drivers/misc/mei/mei_dev.h | 24 +- drivers/misc/mei/nfc.c | 414 ------------------ include/linux/mei_cl_bus.h | 12 + 8 files changed, 968 insertions(+), 779 deletions(-) create mode 100644 drivers/misc/mei/bus-fixup.c delete mode 100644 drivers/misc/mei/nfc.c
This is a lot to do in just one patch. Any chance you can split it up into reviewable pieces?
thanks,
greg k-h
RE: [char-misc-next 11/11] mei: revamp mei bus code
Quoted 25 lines · Tomas Winkler
Quoted 7 lines
MEI bus was designed around nfc and was hard to extend. Instead of hard coded way of adding the devices on the mei bus we scan whole me client list and create a device for each eligible me client; currently we support only clients with single connection and fixed address clients.
NFC radio name detection is run as a fixup routineQuoted 6 lines
Cc Samuel Ortiz <[email protected]>Signed-off-by Tomas Winkler <[email protected]>--- drivers/misc/mei/Makefile | 2 +- drivers/misc/mei/bus-fixup.c | 306 ++++++++++++++ drivers/misc/mei/bus.c | 975 ++++++++++++++++++++++++++++---------------
Quoted 8 lines
drivers/misc/mei/client.c | 9 +- drivers/misc/mei/init.c | 5 +- drivers/misc/mei/mei_dev.h | 24 +- drivers/misc/mei/nfc.c | 414 ------------------ include/linux/mei_cl_bus.h | 12 + 8 files changed, 968 insertions(+), 779 deletions(-) create mode 100644 drivers/misc/mei/bus-fixup.c delete mode 100644 drivers/misc/mei/nfc.c
Quoted 2 lines
This is a lot to do in just one patch. Any chance you can split it up into reviewable pieces?
I thought it would be harder to swallow but I'm not sure how to really
split this into working pieces w/o do some artificial steps which
I will have to validate again to keep the code bisectable.
What could be naturally factored out is already in separate patches in this series. The patch is maybe bigger because of code moves between files but what has really changes is just bus.c Please reconsider.
Thanks
Tomas
Greg KH
maintainerRe: [char-misc-next 11/11] mei: revamp mei bus code
Quoted 25 lines · Tomas
Quoted 25 lines · Tomas Winkler
Quoted 7 lines
MEI bus was designed around nfc and was hard to extend. Instead of hard coded way of adding the devices on the mei bus we scan whole me client list and create a device for each eligible me client; currently we support only clients with single connection and fixed address clients.
NFC radio name detection is run as a fixup routineQuoted 6 lines
Cc Samuel Ortiz <[email protected]>Signed-off-by Tomas Winkler <[email protected]>--- drivers/misc/mei/Makefile | 2 +- drivers/misc/mei/bus-fixup.c | 306 ++++++++++++++ drivers/misc/mei/bus.c | 975 ++++++++++++++++++++++++++++---------------
Quoted 8 lines
drivers/misc/mei/client.c | 9 +- drivers/misc/mei/init.c | 5 +- drivers/misc/mei/mei_dev.h | 24 +- drivers/misc/mei/nfc.c | 414 ------------------ include/linux/mei_cl_bus.h | 12 + 8 files changed, 968 insertions(+), 779 deletions(-) create mode 100644 drivers/misc/mei/bus-fixup.c delete mode 100644 drivers/misc/mei/nfc.c
Quoted 6 lines
Quoted 2 lines
This is a lot to do in just one patch. Any chance you can split it up into reviewable pieces?
I thought it would be harder to swallow but I'm not sure how to really split this into working pieces w/o do some artificial steps which
I will have to validate again to keep the code bisectable.
That's fine, that's your job to do :)
Quoted 2 lines
What could be naturally factored out is already in separate patches in this series. The patch is maybe bigger because of code moves between files but what has really changes is just
bus.c
Then do the movement of functions around in one patch, and then the logical changes in others. Come on, you know how this whole thing works, don't be lazy here...
thanks,
greg k-h
RE: [char-misc-next 11/11] mei: revamp mei bus code
Quoted 9 lines
Quoted 7 lines
Quoted 3 lines
This is a lot to do in just one patch. Any chance you can split it up into reviewable pieces?
I thought it would be harder to swallow but I'm not sure how to really split this into working pieces w/o do some artificial steps which
I will have to validate again to keep the code bisectable.That's fine, that's your job to do :)
I'd would prefer to do something that wasn't' already done.
Quoted 10 lines
Quoted 2 lines
What could be naturally factored out is already in separate patches in this
series.
Quoted 1 line
The patch is maybe bigger because of code moves between files but what has
really changes is just
bus.cThen do the movement of functions around in one patch, and then the logical changes in others. Come on, you know how this whole thing works, don't be lazy here...
Yep, I know how it works, but here it just didn't fit as the logical changes moved also the code.
Okay, I will split the code but allow me one comment, I think that you were lazy too go into details and you didn't send us to hell when we first submitted that bus code. Tomas
Greg KH
maintainerRe: [char-misc-next 11/11] mei: revamp mei bus code
Quoted 11 lines · Tomas
Quoted 9 lines
Quoted 7 lines
Quoted 3 lines
This is a lot to do in just one patch. Any chance you can split it up into reviewable pieces?
I thought it would be harder to swallow but I'm not sure how to really split this into working pieces w/o do some artificial steps which
I will have to validate again to keep the code bisectable.That's fine, that's your job to do :)
I'd would prefer to do something that wasn't' already done.
Huh? Your job is to split changes up into tiny logical pieces that are easy to review. That isn't "done" here.
Quoted 11 lines
Quoted 9 lines
Quoted 1 line
What could be naturally factored out is already in separate patches in this
series.
Quoted 1 line
The patch is maybe bigger because of code moves between files but what has
really changes is just
bus.cThen do the movement of functions around in one patch, and then the logical changes in others. Come on, you know how this whole thing works, don't be lazy here...
Yep, I know how it works, but here it just didn't fit as the logical changes moved also the code.
Okay, I will split the code but allow me one comment, I think that you were lazy too go into details and you didn't send us to hell when we first submitted that bus code.
So because I wasn't hard enough on your initial reviews of this code, you are now blaming me for this needed rework?
I seem to recall that I gave a lot of feedback on those original patches, but if you want me to be harder and take a much closer look at all of your patches, I'll be glad to do so. Be aware, that this is going to slow down the acceptance rates of your patches, and I am going to now be _very_ pedantic and grumpy.
Remember, you asked for it, this is going to be fun, for me, not you...
greg k-h