On Mon, 2016-05-23 at 11:48 +0300, Amir Levy wrote: > This first patch adds more Thunderbolt(TM) register definitions > and some helper macros. > It also adds Win Ridge device ID. > > Signed-off-by: Amir Levy <amir.jer.levy@xxxxxxxxx> > Signed-off-by: Michael Jamet <michael.jamet@xxxxxxxxx> >From Amir, SoB-by Amir, who is Michael wrt this patch? > --- a/drivers/thunderbolt/nhi_regs.h > +++ b/drivers/thunderbolt/nhi_regs.h > @@ -1,14 +1,26 @@ > /* > - * Thunderbolt Cactus Ridge driver - NHI registers > + * Thunderbolt driver - NHI registers > * > * Copyright (c) 2014 Andreas Noever <andreas.noever@xxxxxxxxx> > */ > > -#ifndef DSL3510_REGS_H_ > -#define DSL3510_REGS_H_ > +#ifndef NHI_REGS_H_ > +#define NHI_REGS_H_ > > #include <linux/types.h> > > +#define DRV_VERSION "16.1.47.1" I suppose the version is the same as git hash. Perhaps needs to be commented why do you need a special version string. > +#define DRV_NAME "thunderbolt" > + > +#define NHI_MMIO_BAR 0 > + > +#define TBT_RING_MIN_NUM_BUFFERS 2 > +#define TBT_ICM_RING_MAX_FRAME_SIZE 256 > +#define TBT_ICM_RING_NUM 0 > +#define TBT_RING_MAX_FRAME_SIZE (4 * 1024) > +#define TBT_RING_MAX_FRM_DATA_SZ (TBT_RING_MAX_FRAME_SIZE - \ > + sizeof(struct > tbt_frame_header)) > + > enum ring_flags { > RING_FLAG_ISOCH_ENABLE = 1 << 27, /* TX only? */ > RING_FLAG_E2E_FLOW_CONTROL = 1 << 28, > @@ -24,6 +36,13 @@ enum ring_desc_flags { > RING_DESC_INTERRUPT = 0x8, /* request an interrupt on > completion */ > }; > > +enum icm_operation_mode { > + SAFE_MODE, > + AUTHENTICATION_MODE_FUNCTIONALITY, > + ENDPOINT_OPERATION_MODE, > + FULL_FUNCTIONALITY, Looks much better if you do like ICM_MODE_SAFE ICM_MODE_AUTH_FUNC ICM_MODE_ENDPOINT ICM_MODE_FULL_FUNC See the advantages? > +}; > + > --- a/include/linux/pci_ids.h > +++ b/include/linux/pci_ids.h > @@ -2618,6 +2618,8 @@ > #define PCI_DEVICE_ID_INTEL_FALCON_RIDGE_2C_BRIDGE 0x156b > #define PCI_DEVICE_ID_INTEL_FALCON_RIDGE_4C_NHI 0x156c > #define PCI_DEVICE_ID_INTEL_FALCON_RIDGE_4C_BRIDGE 0x156d > +#define PCI_DEVICE_ID_INTEL_WIN_RIDGE_2C_NHI 0x157d > +#define PCI_DEVICE_ID_INTEL_WIN_RIDGE_2C_BRIDGE 0x157e Are those IDs going to be used somewhere else than one driver? > #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_2C_NHI 0x1575 /* > Thunderbolt 3 */ > #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_2C_BRIDGE 0x1576 > #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_4C_NHI 0x1577 -- Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> Intel Finland Oy --------------------------------------------------------------------- Intel Finland Oy Registered Address: PL 281, 00181 Helsinki Business Identity Code: 0357606 - 4 Domiciled in Helsinki This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ��.n��������+%������w��{.n�����{���"�)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥