RE: [PATCH 5/5] scsi: ufs: add dme operations

2013-05-02 Thread Seungwon Jeon
On Thursday, May 02, 2013, Subhash Jadavani wrote:
> On 4/24/2013 9:36 PM, Seungwon Jeon wrote:
> > Add uic command operations including DME_XXX series.
> >
> > Signed-off-by: Seungwon Jeon 
> > ---
> >   drivers/scsi/ufs/ufs-attrs.h |  129 
> >   drivers/scsi/ufs/ufshcd.c|  220 
> > +-
> >   drivers/scsi/ufs/ufshcd.h|   55 +++
> >   drivers/scsi/ufs/ufshci.h|   19 
> >   4 files changed, 422 insertions(+), 1 deletions(-)
> >   create mode 100644 drivers/scsi/ufs/ufs-attrs.h
> >
> > diff --git a/drivers/scsi/ufs/ufs-attrs.h b/drivers/scsi/ufs/ufs-attrs.h
> > new file mode 100644
> > index 000..562bb49
> > --- /dev/null
> > +++ b/drivers/scsi/ufs/ufs-attrs.h
> > @@ -0,0 +1,129 @@
> > +/*
> > + * drivers/scsi/ufs/ufs-attrs.h
> > + *
> > + * Copyright (C) 2013 Samsung Electronics Co., Ltd.
> > + *
> > + * This program is free software; you can redistribute it and/or modify
> > + * it under the terms of the GNU General Public License as published by
> > + * the Free Software Foundation; either version 2 of the License, or
> > + * (at your option) any later version.
> > + */
> > +
> > +#ifndef _UFS_ATTRS_H_
> > +#define _UFS_ATTRS_H_
> 
> I don't see a need to add this file as part of this patch as there are
> no users of the same in this patch. So its better to remove from here
> and add it as separate patch when their real use arises.
Even though actual usage is not introduced here, dme_get{set} functions are 
introduced.
These attribute's ids will be used as argument of dme_get{set}.
So, I think definitions would be better to be in this patch.

> 
> > +
> > +/*
> > + * PHY Adpater attributes
> > + */
> > +#define PA_ACTIVETXDATALANES   0x1560
> > +#define PA_ACTIVERXDATALANES   0x1580
> > +#define PA_TXTRAILINGCLOCKS0x1564
> > +#define PA_PHY_TYPE0x1500
> > +#define PA_AVAILTXDATALANES0x1520
> > +#define PA_AVAILRXDATALANES0x1540
> > +#define PA_MINRXTRAILINGCLOCKS 0x1543
> > +#define PA_TXPWRSTATUS 0x1567
> > +#define PA_RXPWRSTATUS 0x1582
> > +#define PA_TXFORCECLOCK0x1562
> > +#define PA_TXPWRMODE   0x1563
> > +#define PA_LEGACYDPHYESCDL 0x1570
> > +#define PA_MAXTXSPEEDFAST  0x1521
> > +#define PA_MAXTXSPEEDSLOW  0x1522
> > +#define PA_MAXRXSPEEDFAST  0x1541
> > +#define PA_MAXRXSPEEDSLOW  0x1542
> > +#define PA_TXLINKSTARTUPHS 0x1544
> > +#define PA_TXSPEEDFAST 0x1565
> > +#define PA_TXSPEEDSLOW 0x1566
> > +#define PA_REMOTEVERINFO   0x15A0
> > +#define PA_TXGEAR  0x1568
> > +#define PA_TXTERMINATION   0x1569
> > +#define PA_HSSERIES0x156A
> > +#define PA_PWRMODE 0x1571
> > +#define PA_RXGEAR  0x1583
> > +#define PA_RXTERMINATION   0x1584
> > +#define PA_MAXRXPWMGEAR0x1586
> > +#define PA_MAXRXHSGEAR 0x1587
> > +#define PA_RXHSUNTERMCAP   0x15A5
> > +#define PA_RXLSTERMCAP 0x15A6
> > +#define PA_PACPREQTIMEOUT  0x1590
> > +#define PA_PACPREQEOBTIMEOUT   0x1591
> > +#define PA_LOCALVERINFO0x15A9
> > +#define PA_TACTIVATE   0x15A8
> > +#define PA_PACPFRAMECOUNT  0x15C0
> > +#define PA_PACPERRORCOUNT  0x15C1
> > +#define PA_PHYTESTCONTROL  0x15C2
> > +#define PA_PWRMODEUSERDATA00x15B0
> > +#define PA_PWRMODEUSERDATA10x15B1
> > +#define PA_PWRMODEUSERDATA20x15B2
> > +#define PA_PWRMODEUSERDATA30x15B3
> > +#define PA_PWRMODEUSERDATA40x15B4
> > +#define PA_PWRMODEUSERDATA50x15B5
> > +#define PA_PWRMODEUSERDATA60x15B6
> > +#define PA_PWRMODEUSERDATA70x15B7
> > +#define PA_PWRMODEUSERDATA80x15B8
> > +#define PA_PWRMODEUSERDATA90x15B9
> > +#define PA_PWRMODEUSERDATA10   0x15BA
> > +#define PA_PWRMODEUSERDATA11   0x15BB
> > +#define PA_CONNECTEDTXDATALANE 0x1561
> > +#define PA_CONNECTEDRXDATALANE 0x1581
> > +#define PA_LOGICALLANEMAP  0x15A1
> > +#define PA_SLEEPNOCONFIGTIME   0x15A2
> > +#define PA_STALLNOCONFIGTIME   0x15A3
> > +#define PA_SAVECONFIGTIME  0x15A4
> > +
> > +/*
> > + * Data Link Layer Attributes
> > + */
> > +#define DL_TC0TXFCTHRESHOLD0x2040
> > +#define DL_FC0PROTTIMEOUTVAL   0x2041
> > +#define DL_TC0REPLAYTIMEOUTVAL 0x2042
> > +#define DL_AFC0REQTIMEOUTVAL   0x2043
> > +#define DL_AFC0CREDITTHRESHOLD 0x2044
> > +#define DL_TC0OUTACKTHRESHOLD  0x2045
> > +#define DL_TC1TXFCTHRESHOLD0x2060
> > +#define DL_FC1PROTTIMEOUTVAL   0x2061
> > +#define DL_TC1REPLAYTIMEOUTVAL 0x2062
> > +#define DL_AFC1REQTIMEOUTVAL   0x2063
> > +#define DL_AFC1CREDITTHRESHOLD 0x2064
> > +#define DL_TC1OUTACKTHRESHOLD  0x2065
> > +#define DL_TXPREEMPTIONCAP 0x2000
> > +#define DL_TC0TXMAXSDUSIZE 0x2001
> > +#define DL_TC0RXINITCREDITVAL  0x2002
> > +#define DL_TC0TXBUFFERSIZE 0x2005
> > +#define DL_PEERTC0PRESENT  0x2046
> > +#define DL_PEERTC0

RE: [PATCH 5/5] scsi: ufs: add dme operations

2013-05-02 Thread Seungwon Jeon
On Thursday, May 02, 2013 Santosh Y wrote:
> On Thu, May 2, 2013 at 1:36 PM, Santosh Y  wrote:
> >> +/*
> >> + * drivers/scsi/ufs/ufs-attrs.h
> >> + *
> >> + * Copyright (C) 2013 Samsung Electronics Co., Ltd.
> >> + *
> >> + * This program is free software; you can redistribute it and/or modify
> >> + * it under the terms of the GNU General Public License as published by
> >> + * the Free Software Foundation; either version 2 of the License, or
> >> + * (at your option) any later version.
> >> + */
> >> +
> >> +#ifndef _UFS_ATTRS_H_
> >> +#define _UFS_ATTRS_H_
> >> +
> >> +/*
> >> + * PHY Adpater attributes
> >> + */
> >> +#define PA_ACTIVETXDATALANES   0x1560
> >> +#define PA_ACTIVERXDATALANES   0x1580
> >> +#define PA_TXTRAILINGCLOCKS0x1564
> >> +#define PA_PHY_TYPE0x1500
> >> +#define PA_AVAILTXDATALANES0x1520
> >> +#define PA_AVAILRXDATALANES0x1540
> >> +#define PA_MINRXTRAILINGCLOCKS 0x1543
> >> +#define PA_TXPWRSTATUS 0x1567
> >> +#define PA_RXPWRSTATUS 0x1582
> >> +#define PA_TXFORCECLOCK0x1562
> >> +#define PA_TXPWRMODE   0x1563
> >> +#define PA_LEGACYDPHYESCDL 0x1570
> >> +#define PA_MAXTXSPEEDFAST  0x1521
> >> +#define PA_MAXTXSPEEDSLOW  0x1522
> >> +#define PA_MAXRXSPEEDFAST  0x1541
> >> +#define PA_MAXRXSPEEDSLOW  0x1542
> >> +#define PA_TXLINKSTARTUPHS 0x1544
> >> +#define PA_TXSPEEDFAST 0x1565
> >> +#define PA_TXSPEEDSLOW 0x1566
> >> +#define PA_REMOTEVERINFO   0x15A0
> >> +#define PA_TXGEAR  0x1568
> >> +#define PA_TXTERMINATION   0x1569
> >> +#define PA_HSSERIES0x156A
> >> +#define PA_PWRMODE 0x1571
> >> +#define PA_RXGEAR  0x1583
> >> +#define PA_RXTERMINATION   0x1584
> >> +#define PA_MAXRXPWMGEAR0x1586
> >> +#define PA_MAXRXHSGEAR 0x1587
> >> +#define PA_RXHSUNTERMCAP   0x15A5
> >> +#define PA_RXLSTERMCAP 0x15A6
> >> +#define PA_PACPREQTIMEOUT  0x1590
> >> +#define PA_PACPREQEOBTIMEOUT   0x1591
> >> +#define PA_LOCALVERINFO0x15A9
> >> +#define PA_TACTIVATE   0x15A8
> >> +#define PA_PACPFRAMECOUNT  0x15C0
> >> +#define PA_PACPERRORCOUNT  0x15C1
> >> +#define PA_PHYTESTCONTROL  0x15C2
> >> +#define PA_PWRMODEUSERDATA00x15B0
> >> +#define PA_PWRMODEUSERDATA10x15B1
> >> +#define PA_PWRMODEUSERDATA20x15B2
> >> +#define PA_PWRMODEUSERDATA30x15B3
> >> +#define PA_PWRMODEUSERDATA40x15B4
> >> +#define PA_PWRMODEUSERDATA50x15B5
> >> +#define PA_PWRMODEUSERDATA60x15B6
> >> +#define PA_PWRMODEUSERDATA70x15B7
> >> +#define PA_PWRMODEUSERDATA80x15B8
> >> +#define PA_PWRMODEUSERDATA90x15B9
> >> +#define PA_PWRMODEUSERDATA10   0x15BA
> >> +#define PA_PWRMODEUSERDATA11   0x15BB
> >> +#define PA_CONNECTEDTXDATALANE 0x1561
> >> +#define PA_CONNECTEDRXDATALANE 0x1581
> >> +#define PA_LOGICALLANEMAP  0x15A1
> >> +#define PA_SLEEPNOCONFIGTIME   0x15A2
> >> +#define PA_STALLNOCONFIGTIME   0x15A3
> >> +#define PA_SAVECONFIGTIME  0x15A4
> >> +
> >> +/*
> >> + * Data Link Layer Attributes
> >> + */
> >> +#define DL_TC0TXFCTHRESHOLD0x2040
> >> +#define DL_FC0PROTTIMEOUTVAL   0x2041
> >> +#define DL_TC0REPLAYTIMEOUTVAL 0x2042
> >> +#define DL_AFC0REQTIMEOUTVAL   0x2043
> >> +#define DL_AFC0CREDITTHRESHOLD 0x2044
> >> +#define DL_TC0OUTACKTHRESHOLD  0x2045
> >> +#define DL_TC1TXFCTHRESHOLD0x2060
> >> +#define DL_FC1PROTTIMEOUTVAL   0x2061
> >> +#define DL_TC1REPLAYTIMEOUTVAL 0x2062
> >> +#define DL_AFC1REQTIMEOUTVAL   0x2063
> >> +#define DL_AFC1CREDITTHRESHOLD 0x2064
> >> +#define DL_TC1OUTACKTHRESHOLD  0x2065
> >> +#define DL_TXPREEMPTIONCAP 0x2000
> >> +#define DL_TC0TXMAXSDUSIZE 0x2001
> >> +#define DL_TC0RXINITCREDITVAL  0x2002
> >> +#define DL_TC0TXBUFFERSIZE 0x2005
> >> +#define DL_PEERTC0PRESENT  0x2046
> >> +#define DL_PEERTC0RXINITCREVAL 0x2047
> >> +#define DL_TC1TXMAXSDUSIZE 0x2003
> >> +#define DL_TC1RXINITCREDITVAL  0x2004
> >> +#define DL_TC1TXBUFFERSIZE 0x2006
> >> +#define DL_PEERTC1PRESENT  0x2066
> >> +#define DL_PEERTC1RXINITCREVAL 0x2067
> >> +
> >> +/*
> >> + * Network Layer Attributes
> >> + */
> >> +#define N_DEVICEID 0x3000
> >> +#define N_DEVICEID_VALID   0x3001
> >> +#define N_TC0TXMAXSDUSIZE  0x3020
> >> +#define N_TC1TXMAXSDUSIZE  0x3021
> >> +
> >> +/*
> >> + * Transport Layer Attributes
> >> + */
> >> +#define T_NUMCPORTS0x4000
> >> +#define T_NUMTESTFEATURES  0x4001
> >> +#define T_CONNECTIONSTATE  0x4020
> >> +#define T_PEERDEVICEID 0x4021
> >> +#define T_PEERCPORTID  0x4022
> >> +#define T_TRAFFICCLASS 0x4023
> >> +#define T_PROTOCOLID   0x4024
> >> +#define T_CPORTFLAGS   0x4025
> >> +#define T_TXTOKENVALUE 0x4026
> >> +#define T_RXTOKENVALUE 0x4027
> >> +#define T_LOCALBUFFERSPACE 0x4028
> >> +#define T_PEERBUFFERSPACE  0x4029
> >> +#define T_CREDITSTOSEND 

Re: [PATCH 5/5] scsi: ufs: add dme operations

2013-05-02 Thread Subhash Jadavani

On 4/24/2013 9:36 PM, Seungwon Jeon wrote:

Add uic command operations including DME_XXX series.

Signed-off-by: Seungwon Jeon 
---
  drivers/scsi/ufs/ufs-attrs.h |  129 
  drivers/scsi/ufs/ufshcd.c|  220 +-
  drivers/scsi/ufs/ufshcd.h|   55 +++
  drivers/scsi/ufs/ufshci.h|   19 
  4 files changed, 422 insertions(+), 1 deletions(-)
  create mode 100644 drivers/scsi/ufs/ufs-attrs.h

diff --git a/drivers/scsi/ufs/ufs-attrs.h b/drivers/scsi/ufs/ufs-attrs.h
new file mode 100644
index 000..562bb49
--- /dev/null
+++ b/drivers/scsi/ufs/ufs-attrs.h
@@ -0,0 +1,129 @@
+/*
+ * drivers/scsi/ufs/ufs-attrs.h
+ *
+ * Copyright (C) 2013 Samsung Electronics Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#ifndef _UFS_ATTRS_H_
+#define _UFS_ATTRS_H_


I don't see a need to add this file as part of this patch as there are 
no users of the same in this patch. So its better to remove from here 
and add it as separate patch when their real use arises.



+
+/*
+ * PHY Adpater attributes
+ */
+#define PA_ACTIVETXDATALANES   0x1560
+#define PA_ACTIVERXDATALANES   0x1580
+#define PA_TXTRAILINGCLOCKS0x1564
+#define PA_PHY_TYPE0x1500
+#define PA_AVAILTXDATALANES0x1520
+#define PA_AVAILRXDATALANES0x1540
+#define PA_MINRXTRAILINGCLOCKS 0x1543
+#define PA_TXPWRSTATUS 0x1567
+#define PA_RXPWRSTATUS 0x1582
+#define PA_TXFORCECLOCK0x1562
+#define PA_TXPWRMODE   0x1563
+#define PA_LEGACYDPHYESCDL 0x1570
+#define PA_MAXTXSPEEDFAST  0x1521
+#define PA_MAXTXSPEEDSLOW  0x1522
+#define PA_MAXRXSPEEDFAST  0x1541
+#define PA_MAXRXSPEEDSLOW  0x1542
+#define PA_TXLINKSTARTUPHS 0x1544
+#define PA_TXSPEEDFAST 0x1565
+#define PA_TXSPEEDSLOW 0x1566
+#define PA_REMOTEVERINFO   0x15A0
+#define PA_TXGEAR  0x1568
+#define PA_TXTERMINATION   0x1569
+#define PA_HSSERIES0x156A
+#define PA_PWRMODE 0x1571
+#define PA_RXGEAR  0x1583
+#define PA_RXTERMINATION   0x1584
+#define PA_MAXRXPWMGEAR0x1586
+#define PA_MAXRXHSGEAR 0x1587
+#define PA_RXHSUNTERMCAP   0x15A5
+#define PA_RXLSTERMCAP 0x15A6
+#define PA_PACPREQTIMEOUT  0x1590
+#define PA_PACPREQEOBTIMEOUT   0x1591
+#define PA_LOCALVERINFO0x15A9
+#define PA_TACTIVATE   0x15A8
+#define PA_PACPFRAMECOUNT  0x15C0
+#define PA_PACPERRORCOUNT  0x15C1
+#define PA_PHYTESTCONTROL  0x15C2
+#define PA_PWRMODEUSERDATA00x15B0
+#define PA_PWRMODEUSERDATA10x15B1
+#define PA_PWRMODEUSERDATA20x15B2
+#define PA_PWRMODEUSERDATA30x15B3
+#define PA_PWRMODEUSERDATA40x15B4
+#define PA_PWRMODEUSERDATA50x15B5
+#define PA_PWRMODEUSERDATA60x15B6
+#define PA_PWRMODEUSERDATA70x15B7
+#define PA_PWRMODEUSERDATA80x15B8
+#define PA_PWRMODEUSERDATA90x15B9
+#define PA_PWRMODEUSERDATA10   0x15BA
+#define PA_PWRMODEUSERDATA11   0x15BB
+#define PA_CONNECTEDTXDATALANE 0x1561
+#define PA_CONNECTEDRXDATALANE 0x1581
+#define PA_LOGICALLANEMAP  0x15A1
+#define PA_SLEEPNOCONFIGTIME   0x15A2
+#define PA_STALLNOCONFIGTIME   0x15A3
+#define PA_SAVECONFIGTIME  0x15A4
+
+/*
+ * Data Link Layer Attributes
+ */
+#define DL_TC0TXFCTHRESHOLD0x2040
+#define DL_FC0PROTTIMEOUTVAL   0x2041
+#define DL_TC0REPLAYTIMEOUTVAL 0x2042
+#define DL_AFC0REQTIMEOUTVAL   0x2043
+#define DL_AFC0CREDITTHRESHOLD 0x2044
+#define DL_TC0OUTACKTHRESHOLD  0x2045
+#define DL_TC1TXFCTHRESHOLD0x2060
+#define DL_FC1PROTTIMEOUTVAL   0x2061
+#define DL_TC1REPLAYTIMEOUTVAL 0x2062
+#define DL_AFC1REQTIMEOUTVAL   0x2063
+#define DL_AFC1CREDITTHRESHOLD 0x2064
+#define DL_TC1OUTACKTHRESHOLD  0x2065
+#define DL_TXPREEMPTIONCAP 0x2000
+#define DL_TC0TXMAXSDUSIZE 0x2001
+#define DL_TC0RXINITCREDITVAL  0x2002
+#define DL_TC0TXBUFFERSIZE 0x2005
+#define DL_PEERTC0PRESENT  0x2046
+#define DL_PEERTC0RXINITCREVAL 0x2047
+#define DL_TC1TXMAXSDUSIZE 0x2003
+#define DL_TC1RXINITCREDITVAL  0x2004
+#define DL_TC1TXBUFFERSIZE 0x2006
+#define DL_PEERTC1PRESENT  0x2066
+#define DL_PEERTC1RXINITCREVAL 0x2067
+
+/*
+ * Network Layer Attributes
+ */
+#define N_DEVICEID 0x3000
+#define N_DEVICEID_VALID   0x3001
+#define N_TC0TXMAXSDUSIZE  0x3020
+#define N_TC1TXMAXSDUSIZE  0x3021
+
+/*
+ * Transport Layer Attributes
+ */
+#define T_NUMCPORTS0x4000
+#define T_NUMTESTFEATURES  0x4001
+#define T_CONNECTIONSTATE  0x4020
+#define T_PEERDEVICEID 0x4021
+#define T_PEERCPORTID  0x4022
+#define T_TRAFFICCLASS 0x4023
+#define T_PROTOCOLID   0x4024
+#define T_CPORTFLAGS   0x4025
+#define T_TXTOKENVALUE 0

Re: [PATCH 5/5] scsi: ufs: add dme operations

2013-05-02 Thread Santosh Y
On Thu, May 2, 2013 at 1:36 PM, Santosh Y  wrote:
>> +/*
>> + * drivers/scsi/ufs/ufs-attrs.h
>> + *
>> + * Copyright (C) 2013 Samsung Electronics Co., Ltd.
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License as published by
>> + * the Free Software Foundation; either version 2 of the License, or
>> + * (at your option) any later version.
>> + */
>> +
>> +#ifndef _UFS_ATTRS_H_
>> +#define _UFS_ATTRS_H_
>> +
>> +/*
>> + * PHY Adpater attributes
>> + */
>> +#define PA_ACTIVETXDATALANES   0x1560
>> +#define PA_ACTIVERXDATALANES   0x1580
>> +#define PA_TXTRAILINGCLOCKS0x1564
>> +#define PA_PHY_TYPE0x1500
>> +#define PA_AVAILTXDATALANES0x1520
>> +#define PA_AVAILRXDATALANES0x1540
>> +#define PA_MINRXTRAILINGCLOCKS 0x1543
>> +#define PA_TXPWRSTATUS 0x1567
>> +#define PA_RXPWRSTATUS 0x1582
>> +#define PA_TXFORCECLOCK0x1562
>> +#define PA_TXPWRMODE   0x1563
>> +#define PA_LEGACYDPHYESCDL 0x1570
>> +#define PA_MAXTXSPEEDFAST  0x1521
>> +#define PA_MAXTXSPEEDSLOW  0x1522
>> +#define PA_MAXRXSPEEDFAST  0x1541
>> +#define PA_MAXRXSPEEDSLOW  0x1542
>> +#define PA_TXLINKSTARTUPHS 0x1544
>> +#define PA_TXSPEEDFAST 0x1565
>> +#define PA_TXSPEEDSLOW 0x1566
>> +#define PA_REMOTEVERINFO   0x15A0
>> +#define PA_TXGEAR  0x1568
>> +#define PA_TXTERMINATION   0x1569
>> +#define PA_HSSERIES0x156A
>> +#define PA_PWRMODE 0x1571
>> +#define PA_RXGEAR  0x1583
>> +#define PA_RXTERMINATION   0x1584
>> +#define PA_MAXRXPWMGEAR0x1586
>> +#define PA_MAXRXHSGEAR 0x1587
>> +#define PA_RXHSUNTERMCAP   0x15A5
>> +#define PA_RXLSTERMCAP 0x15A6
>> +#define PA_PACPREQTIMEOUT  0x1590
>> +#define PA_PACPREQEOBTIMEOUT   0x1591
>> +#define PA_LOCALVERINFO0x15A9
>> +#define PA_TACTIVATE   0x15A8
>> +#define PA_PACPFRAMECOUNT  0x15C0
>> +#define PA_PACPERRORCOUNT  0x15C1
>> +#define PA_PHYTESTCONTROL  0x15C2
>> +#define PA_PWRMODEUSERDATA00x15B0
>> +#define PA_PWRMODEUSERDATA10x15B1
>> +#define PA_PWRMODEUSERDATA20x15B2
>> +#define PA_PWRMODEUSERDATA30x15B3
>> +#define PA_PWRMODEUSERDATA40x15B4
>> +#define PA_PWRMODEUSERDATA50x15B5
>> +#define PA_PWRMODEUSERDATA60x15B6
>> +#define PA_PWRMODEUSERDATA70x15B7
>> +#define PA_PWRMODEUSERDATA80x15B8
>> +#define PA_PWRMODEUSERDATA90x15B9
>> +#define PA_PWRMODEUSERDATA10   0x15BA
>> +#define PA_PWRMODEUSERDATA11   0x15BB
>> +#define PA_CONNECTEDTXDATALANE 0x1561
>> +#define PA_CONNECTEDRXDATALANE 0x1581
>> +#define PA_LOGICALLANEMAP  0x15A1
>> +#define PA_SLEEPNOCONFIGTIME   0x15A2
>> +#define PA_STALLNOCONFIGTIME   0x15A3
>> +#define PA_SAVECONFIGTIME  0x15A4
>> +
>> +/*
>> + * Data Link Layer Attributes
>> + */
>> +#define DL_TC0TXFCTHRESHOLD0x2040
>> +#define DL_FC0PROTTIMEOUTVAL   0x2041
>> +#define DL_TC0REPLAYTIMEOUTVAL 0x2042
>> +#define DL_AFC0REQTIMEOUTVAL   0x2043
>> +#define DL_AFC0CREDITTHRESHOLD 0x2044
>> +#define DL_TC0OUTACKTHRESHOLD  0x2045
>> +#define DL_TC1TXFCTHRESHOLD0x2060
>> +#define DL_FC1PROTTIMEOUTVAL   0x2061
>> +#define DL_TC1REPLAYTIMEOUTVAL 0x2062
>> +#define DL_AFC1REQTIMEOUTVAL   0x2063
>> +#define DL_AFC1CREDITTHRESHOLD 0x2064
>> +#define DL_TC1OUTACKTHRESHOLD  0x2065
>> +#define DL_TXPREEMPTIONCAP 0x2000
>> +#define DL_TC0TXMAXSDUSIZE 0x2001
>> +#define DL_TC0RXINITCREDITVAL  0x2002
>> +#define DL_TC0TXBUFFERSIZE 0x2005
>> +#define DL_PEERTC0PRESENT  0x2046
>> +#define DL_PEERTC0RXINITCREVAL 0x2047
>> +#define DL_TC1TXMAXSDUSIZE 0x2003
>> +#define DL_TC1RXINITCREDITVAL  0x2004
>> +#define DL_TC1TXBUFFERSIZE 0x2006
>> +#define DL_PEERTC1PRESENT  0x2066
>> +#define DL_PEERTC1RXINITCREVAL 0x2067
>> +
>> +/*
>> + * Network Layer Attributes
>> + */
>> +#define N_DEVICEID 0x3000
>> +#define N_DEVICEID_VALID   0x3001
>> +#define N_TC0TXMAXSDUSIZE  0x3020
>> +#define N_TC1TXMAXSDUSIZE  0x3021
>> +
>> +/*
>> + * Transport Layer Attributes
>> + */
>> +#define T_NUMCPORTS0x4000
>> +#define T_NUMTESTFEATURES  0x4001
>> +#define T_CONNECTIONSTATE  0x4020
>> +#define T_PEERDEVICEID 0x4021
>> +#define T_PEERCPORTID  0x4022
>> +#define T_TRAFFICCLASS 0x4023
>> +#define T_PROTOCOLID   0x4024
>> +#define T_CPORTFLAGS   0x4025
>> +#define T_TXTOKENVALUE 0x4026
>> +#define T_RXTOKENVALUE 0x4027
>> +#define T_LOCALBUFFERSPACE 0x4028
>> +#define T_PEERBUFFERSPACE  0x4029
>> +#define T_CREDITSTOSEND0x402A
>> +#define T_CPORTMODE0x402B
>> +#define T_TC0TXMAXSDUSIZE  0x4060
>> +#define T_TC1TXMAXSDUSIZE  0x4061
>> +
>> +#endif /* _UFS_ATTRS_H_ */
>
>
> These are Unipro. So change the name of the file to unipro.h
>
 I meant Unipro attributes, So change th

Re: [PATCH 5/5] scsi: ufs: add dme operations

2013-05-02 Thread Santosh Y
> +/*
> + * drivers/scsi/ufs/ufs-attrs.h
> + *
> + * Copyright (C) 2013 Samsung Electronics Co., Ltd.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + */
> +
> +#ifndef _UFS_ATTRS_H_
> +#define _UFS_ATTRS_H_
> +
> +/*
> + * PHY Adpater attributes
> + */
> +#define PA_ACTIVETXDATALANES   0x1560
> +#define PA_ACTIVERXDATALANES   0x1580
> +#define PA_TXTRAILINGCLOCKS0x1564
> +#define PA_PHY_TYPE0x1500
> +#define PA_AVAILTXDATALANES0x1520
> +#define PA_AVAILRXDATALANES0x1540
> +#define PA_MINRXTRAILINGCLOCKS 0x1543
> +#define PA_TXPWRSTATUS 0x1567
> +#define PA_RXPWRSTATUS 0x1582
> +#define PA_TXFORCECLOCK0x1562
> +#define PA_TXPWRMODE   0x1563
> +#define PA_LEGACYDPHYESCDL 0x1570
> +#define PA_MAXTXSPEEDFAST  0x1521
> +#define PA_MAXTXSPEEDSLOW  0x1522
> +#define PA_MAXRXSPEEDFAST  0x1541
> +#define PA_MAXRXSPEEDSLOW  0x1542
> +#define PA_TXLINKSTARTUPHS 0x1544
> +#define PA_TXSPEEDFAST 0x1565
> +#define PA_TXSPEEDSLOW 0x1566
> +#define PA_REMOTEVERINFO   0x15A0
> +#define PA_TXGEAR  0x1568
> +#define PA_TXTERMINATION   0x1569
> +#define PA_HSSERIES0x156A
> +#define PA_PWRMODE 0x1571
> +#define PA_RXGEAR  0x1583
> +#define PA_RXTERMINATION   0x1584
> +#define PA_MAXRXPWMGEAR0x1586
> +#define PA_MAXRXHSGEAR 0x1587
> +#define PA_RXHSUNTERMCAP   0x15A5
> +#define PA_RXLSTERMCAP 0x15A6
> +#define PA_PACPREQTIMEOUT  0x1590
> +#define PA_PACPREQEOBTIMEOUT   0x1591
> +#define PA_LOCALVERINFO0x15A9
> +#define PA_TACTIVATE   0x15A8
> +#define PA_PACPFRAMECOUNT  0x15C0
> +#define PA_PACPERRORCOUNT  0x15C1
> +#define PA_PHYTESTCONTROL  0x15C2
> +#define PA_PWRMODEUSERDATA00x15B0
> +#define PA_PWRMODEUSERDATA10x15B1
> +#define PA_PWRMODEUSERDATA20x15B2
> +#define PA_PWRMODEUSERDATA30x15B3
> +#define PA_PWRMODEUSERDATA40x15B4
> +#define PA_PWRMODEUSERDATA50x15B5
> +#define PA_PWRMODEUSERDATA60x15B6
> +#define PA_PWRMODEUSERDATA70x15B7
> +#define PA_PWRMODEUSERDATA80x15B8
> +#define PA_PWRMODEUSERDATA90x15B9
> +#define PA_PWRMODEUSERDATA10   0x15BA
> +#define PA_PWRMODEUSERDATA11   0x15BB
> +#define PA_CONNECTEDTXDATALANE 0x1561
> +#define PA_CONNECTEDRXDATALANE 0x1581
> +#define PA_LOGICALLANEMAP  0x15A1
> +#define PA_SLEEPNOCONFIGTIME   0x15A2
> +#define PA_STALLNOCONFIGTIME   0x15A3
> +#define PA_SAVECONFIGTIME  0x15A4
> +
> +/*
> + * Data Link Layer Attributes
> + */
> +#define DL_TC0TXFCTHRESHOLD0x2040
> +#define DL_FC0PROTTIMEOUTVAL   0x2041
> +#define DL_TC0REPLAYTIMEOUTVAL 0x2042
> +#define DL_AFC0REQTIMEOUTVAL   0x2043
> +#define DL_AFC0CREDITTHRESHOLD 0x2044
> +#define DL_TC0OUTACKTHRESHOLD  0x2045
> +#define DL_TC1TXFCTHRESHOLD0x2060
> +#define DL_FC1PROTTIMEOUTVAL   0x2061
> +#define DL_TC1REPLAYTIMEOUTVAL 0x2062
> +#define DL_AFC1REQTIMEOUTVAL   0x2063
> +#define DL_AFC1CREDITTHRESHOLD 0x2064
> +#define DL_TC1OUTACKTHRESHOLD  0x2065
> +#define DL_TXPREEMPTIONCAP 0x2000
> +#define DL_TC0TXMAXSDUSIZE 0x2001
> +#define DL_TC0RXINITCREDITVAL  0x2002
> +#define DL_TC0TXBUFFERSIZE 0x2005
> +#define DL_PEERTC0PRESENT  0x2046
> +#define DL_PEERTC0RXINITCREVAL 0x2047
> +#define DL_TC1TXMAXSDUSIZE 0x2003
> +#define DL_TC1RXINITCREDITVAL  0x2004
> +#define DL_TC1TXBUFFERSIZE 0x2006
> +#define DL_PEERTC1PRESENT  0x2066
> +#define DL_PEERTC1RXINITCREVAL 0x2067
> +
> +/*
> + * Network Layer Attributes
> + */
> +#define N_DEVICEID 0x3000
> +#define N_DEVICEID_VALID   0x3001
> +#define N_TC0TXMAXSDUSIZE  0x3020
> +#define N_TC1TXMAXSDUSIZE  0x3021
> +
> +/*
> + * Transport Layer Attributes
> + */
> +#define T_NUMCPORTS0x4000
> +#define T_NUMTESTFEATURES  0x4001
> +#define T_CONNECTIONSTATE  0x4020
> +#define T_PEERDEVICEID 0x4021
> +#define T_PEERCPORTID  0x4022
> +#define T_TRAFFICCLASS 0x4023
> +#define T_PROTOCOLID   0x4024
> +#define T_CPORTFLAGS   0x4025
> +#define T_TXTOKENVALUE 0x4026
> +#define T_RXTOKENVALUE 0x4027
> +#define T_LOCALBUFFERSPACE 0x4028
> +#define T_PEERBUFFERSPACE  0x4029
> +#define T_CREDITSTOSEND0x402A
> +#define T_CPORTMODE0x402B
> +#define T_TC0TXMAXSDUSIZE  0x4060
> +#define T_TC1TXMAXSDUSIZE  0x4061
> +
> +#endif /* _UFS_ATTRS_H_ */


These are Unipro. So change the name of the file to unipro.h

> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 76ff332..55575ea 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -37,6 +37,7 @@
>
>  #define UFSHCD_ENABLE_INTRS   

Re: [PATCH 5/5] scsi: ufs: add dme operations

2013-05-01 Thread merez
Tested-by: Maya Erez 

> Add uic command operations including DME_XXX series.
>
> Signed-off-by: Seungwon Jeon 
> ---
>  drivers/scsi/ufs/ufs-attrs.h |  129 
>  drivers/scsi/ufs/ufshcd.c|  220
> +-
>  drivers/scsi/ufs/ufshcd.h|   55 +++
>  drivers/scsi/ufs/ufshci.h|   19 
>  4 files changed, 422 insertions(+), 1 deletions(-)
>  create mode 100644 drivers/scsi/ufs/ufs-attrs.h
>
> diff --git a/drivers/scsi/ufs/ufs-attrs.h b/drivers/scsi/ufs/ufs-attrs.h
> new file mode 100644
> index 000..562bb49
> --- /dev/null
> +++ b/drivers/scsi/ufs/ufs-attrs.h
> @@ -0,0 +1,129 @@
> +/*
> + * drivers/scsi/ufs/ufs-attrs.h
> + *
> + * Copyright (C) 2013 Samsung Electronics Co., Ltd.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + */
> +
> +#ifndef _UFS_ATTRS_H_
> +#define _UFS_ATTRS_H_
> +
> +/*
> + * PHY Adpater attributes
> + */
> +#define PA_ACTIVETXDATALANES 0x1560
> +#define PA_ACTIVERXDATALANES 0x1580
> +#define PA_TXTRAILINGCLOCKS  0x1564
> +#define PA_PHY_TYPE  0x1500
> +#define PA_AVAILTXDATALANES  0x1520
> +#define PA_AVAILRXDATALANES  0x1540
> +#define PA_MINRXTRAILINGCLOCKS   0x1543
> +#define PA_TXPWRSTATUS   0x1567
> +#define PA_RXPWRSTATUS   0x1582
> +#define PA_TXFORCECLOCK  0x1562
> +#define PA_TXPWRMODE 0x1563
> +#define PA_LEGACYDPHYESCDL   0x1570
> +#define PA_MAXTXSPEEDFAST0x1521
> +#define PA_MAXTXSPEEDSLOW0x1522
> +#define PA_MAXRXSPEEDFAST0x1541
> +#define PA_MAXRXSPEEDSLOW0x1542
> +#define PA_TXLINKSTARTUPHS   0x1544
> +#define PA_TXSPEEDFAST   0x1565
> +#define PA_TXSPEEDSLOW   0x1566
> +#define PA_REMOTEVERINFO 0x15A0
> +#define PA_TXGEAR0x1568
> +#define PA_TXTERMINATION 0x1569
> +#define PA_HSSERIES  0x156A
> +#define PA_PWRMODE   0x1571
> +#define PA_RXGEAR0x1583
> +#define PA_RXTERMINATION 0x1584
> +#define PA_MAXRXPWMGEAR  0x1586
> +#define PA_MAXRXHSGEAR   0x1587
> +#define PA_RXHSUNTERMCAP 0x15A5
> +#define PA_RXLSTERMCAP   0x15A6
> +#define PA_PACPREQTIMEOUT0x1590
> +#define PA_PACPREQEOBTIMEOUT 0x1591
> +#define PA_LOCALVERINFO  0x15A9
> +#define PA_TACTIVATE 0x15A8
> +#define PA_PACPFRAMECOUNT0x15C0
> +#define PA_PACPERRORCOUNT0x15C1
> +#define PA_PHYTESTCONTROL0x15C2
> +#define PA_PWRMODEUSERDATA0  0x15B0
> +#define PA_PWRMODEUSERDATA1  0x15B1
> +#define PA_PWRMODEUSERDATA2  0x15B2
> +#define PA_PWRMODEUSERDATA3  0x15B3
> +#define PA_PWRMODEUSERDATA4  0x15B4
> +#define PA_PWRMODEUSERDATA5  0x15B5
> +#define PA_PWRMODEUSERDATA6  0x15B6
> +#define PA_PWRMODEUSERDATA7  0x15B7
> +#define PA_PWRMODEUSERDATA8  0x15B8
> +#define PA_PWRMODEUSERDATA9  0x15B9
> +#define PA_PWRMODEUSERDATA10 0x15BA
> +#define PA_PWRMODEUSERDATA11 0x15BB
> +#define PA_CONNECTEDTXDATALANE   0x1561
> +#define PA_CONNECTEDRXDATALANE   0x1581
> +#define PA_LOGICALLANEMAP0x15A1
> +#define PA_SLEEPNOCONFIGTIME 0x15A2
> +#define PA_STALLNOCONFIGTIME 0x15A3
> +#define PA_SAVECONFIGTIME0x15A4
> +
> +/*
> + * Data Link Layer Attributes
> + */
> +#define DL_TC0TXFCTHRESHOLD  0x2040
> +#define DL_FC0PROTTIMEOUTVAL 0x2041
> +#define DL_TC0REPLAYTIMEOUTVAL   0x2042
> +#define DL_AFC0REQTIMEOUTVAL 0x2043
> +#define DL_AFC0CREDITTHRESHOLD   0x2044
> +#define DL_TC0OUTACKTHRESHOLD0x2045
> +#define DL_TC1TXFCTHRESHOLD  0x2060
> +#define DL_FC1PROTTIMEOUTVAL 0x2061
> +#define DL_TC1REPLAYTIMEOUTVAL   0x2062
> +#define DL_AFC1REQTIMEOUTVAL 0x2063
> +#define DL_AFC1CREDITTHRESHOLD   0x2064
> +#define DL_TC1OUTACKTHRESHOLD0x2065
> +#define DL_TXPREEMPTIONCAP   0x2000
> +#define DL_TC0TXMAXSDUSIZE   0x2001
> +#define DL_TC0RXINITCREDITVAL0x2002
> +#define DL_TC0TXBUFFERSIZE   0x2005
> +#define DL_PEERTC0PRESENT0x2046
> +#define DL_PEERTC0RXINITCREVAL   0x2047
> +#define DL_TC1TXMAXSDUSIZE   0x2003
> +#define DL_TC1RXINITCREDITVAL0x2004
> +#define DL_TC1TXBUFFERSIZE   0x2006
> +#define DL_PEERTC1PRESENT0x2066
> +#define DL_PEERTC1RXINITCREVAL   0x2067
> +
> +/*
> + * Network Layer Attributes
> + */
> +#define N_DEVICEID   0x3000
> +#define N_DEVICEID_VALID 0x3001
> +#define N_TC0TXMAXSDUSIZE0x3020
> +#define N_TC1TXMAXSDUSIZE0x3021
> +
> +/*
> + * Transport Layer Attributes
> + */
> +#define T_NUMCPORTS  0x4000
> +#define T_NUMTESTFEATURES0x4001
> +#define T_CONNECTIONSTATE0x4020
> +#define T_PEERDEVICEID   0x4021
> +#define T_PEERCPORTID0x4022
> +#define T_TRAFFICCLASS   0x4023
> +#define T_PROTOCOLID 0x4024
> +#define T_CPORTFLAGS 0x402

[PATCH 5/5] scsi: ufs: add dme operations

2013-04-24 Thread Seungwon Jeon
Add uic command operations including DME_XXX series.

Signed-off-by: Seungwon Jeon 
---
 drivers/scsi/ufs/ufs-attrs.h |  129 
 drivers/scsi/ufs/ufshcd.c|  220 +-
 drivers/scsi/ufs/ufshcd.h|   55 +++
 drivers/scsi/ufs/ufshci.h|   19 
 4 files changed, 422 insertions(+), 1 deletions(-)
 create mode 100644 drivers/scsi/ufs/ufs-attrs.h

diff --git a/drivers/scsi/ufs/ufs-attrs.h b/drivers/scsi/ufs/ufs-attrs.h
new file mode 100644
index 000..562bb49
--- /dev/null
+++ b/drivers/scsi/ufs/ufs-attrs.h
@@ -0,0 +1,129 @@
+/*
+ * drivers/scsi/ufs/ufs-attrs.h
+ *
+ * Copyright (C) 2013 Samsung Electronics Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#ifndef _UFS_ATTRS_H_
+#define _UFS_ATTRS_H_
+
+/*
+ * PHY Adpater attributes
+ */
+#define PA_ACTIVETXDATALANES   0x1560
+#define PA_ACTIVERXDATALANES   0x1580
+#define PA_TXTRAILINGCLOCKS0x1564
+#define PA_PHY_TYPE0x1500
+#define PA_AVAILTXDATALANES0x1520
+#define PA_AVAILRXDATALANES0x1540
+#define PA_MINRXTRAILINGCLOCKS 0x1543
+#define PA_TXPWRSTATUS 0x1567
+#define PA_RXPWRSTATUS 0x1582
+#define PA_TXFORCECLOCK0x1562
+#define PA_TXPWRMODE   0x1563
+#define PA_LEGACYDPHYESCDL 0x1570
+#define PA_MAXTXSPEEDFAST  0x1521
+#define PA_MAXTXSPEEDSLOW  0x1522
+#define PA_MAXRXSPEEDFAST  0x1541
+#define PA_MAXRXSPEEDSLOW  0x1542
+#define PA_TXLINKSTARTUPHS 0x1544
+#define PA_TXSPEEDFAST 0x1565
+#define PA_TXSPEEDSLOW 0x1566
+#define PA_REMOTEVERINFO   0x15A0
+#define PA_TXGEAR  0x1568
+#define PA_TXTERMINATION   0x1569
+#define PA_HSSERIES0x156A
+#define PA_PWRMODE 0x1571
+#define PA_RXGEAR  0x1583
+#define PA_RXTERMINATION   0x1584
+#define PA_MAXRXPWMGEAR0x1586
+#define PA_MAXRXHSGEAR 0x1587
+#define PA_RXHSUNTERMCAP   0x15A5
+#define PA_RXLSTERMCAP 0x15A6
+#define PA_PACPREQTIMEOUT  0x1590
+#define PA_PACPREQEOBTIMEOUT   0x1591
+#define PA_LOCALVERINFO0x15A9
+#define PA_TACTIVATE   0x15A8
+#define PA_PACPFRAMECOUNT  0x15C0
+#define PA_PACPERRORCOUNT  0x15C1
+#define PA_PHYTESTCONTROL  0x15C2
+#define PA_PWRMODEUSERDATA00x15B0
+#define PA_PWRMODEUSERDATA10x15B1
+#define PA_PWRMODEUSERDATA20x15B2
+#define PA_PWRMODEUSERDATA30x15B3
+#define PA_PWRMODEUSERDATA40x15B4
+#define PA_PWRMODEUSERDATA50x15B5
+#define PA_PWRMODEUSERDATA60x15B6
+#define PA_PWRMODEUSERDATA70x15B7
+#define PA_PWRMODEUSERDATA80x15B8
+#define PA_PWRMODEUSERDATA90x15B9
+#define PA_PWRMODEUSERDATA10   0x15BA
+#define PA_PWRMODEUSERDATA11   0x15BB
+#define PA_CONNECTEDTXDATALANE 0x1561
+#define PA_CONNECTEDRXDATALANE 0x1581
+#define PA_LOGICALLANEMAP  0x15A1
+#define PA_SLEEPNOCONFIGTIME   0x15A2
+#define PA_STALLNOCONFIGTIME   0x15A3
+#define PA_SAVECONFIGTIME  0x15A4
+
+/*
+ * Data Link Layer Attributes
+ */
+#define DL_TC0TXFCTHRESHOLD0x2040
+#define DL_FC0PROTTIMEOUTVAL   0x2041
+#define DL_TC0REPLAYTIMEOUTVAL 0x2042
+#define DL_AFC0REQTIMEOUTVAL   0x2043
+#define DL_AFC0CREDITTHRESHOLD 0x2044
+#define DL_TC0OUTACKTHRESHOLD  0x2045
+#define DL_TC1TXFCTHRESHOLD0x2060
+#define DL_FC1PROTTIMEOUTVAL   0x2061
+#define DL_TC1REPLAYTIMEOUTVAL 0x2062
+#define DL_AFC1REQTIMEOUTVAL   0x2063
+#define DL_AFC1CREDITTHRESHOLD 0x2064
+#define DL_TC1OUTACKTHRESHOLD  0x2065
+#define DL_TXPREEMPTIONCAP 0x2000
+#define DL_TC0TXMAXSDUSIZE 0x2001
+#define DL_TC0RXINITCREDITVAL  0x2002
+#define DL_TC0TXBUFFERSIZE 0x2005
+#define DL_PEERTC0PRESENT  0x2046
+#define DL_PEERTC0RXINITCREVAL 0x2047
+#define DL_TC1TXMAXSDUSIZE 0x2003
+#define DL_TC1RXINITCREDITVAL  0x2004
+#define DL_TC1TXBUFFERSIZE 0x2006
+#define DL_PEERTC1PRESENT  0x2066
+#define DL_PEERTC1RXINITCREVAL 0x2067
+
+/*
+ * Network Layer Attributes
+ */
+#define N_DEVICEID 0x3000
+#define N_DEVICEID_VALID   0x3001
+#define N_TC0TXMAXSDUSIZE  0x3020
+#define N_TC1TXMAXSDUSIZE  0x3021
+
+/*
+ * Transport Layer Attributes
+ */
+#define T_NUMCPORTS0x4000
+#define T_NUMTESTFEATURES  0x4001
+#define T_CONNECTIONSTATE  0x4020
+#define T_PEERDEVICEID 0x4021
+#define T_PEERCPORTID  0x4022
+#define T_TRAFFICCLASS 0x4023
+#define T_PROTOCOLID   0x4024
+#define T_CPORTFLAGS   0x4025
+#define T_TXTOKENVALUE 0x4026
+#define T_RXTOKENVALUE 0x4027
+#define T_LOCALBUFFERSPACE 0x4028
+#define T_PEERBUFFERSPACE  0x4029
+#define T_CREDITSTOSEND0x402A
+#define T_CPORTMODE0x402B
+#define T_TC0TXMAXSDUSIZE  0x4060
+#define