Hi,
On Tue, 14 Sep 2004, Lothar Wassmann wrote:
> I would like to keep the code as general as possible, so everything
> what's platform or chip dependent should be clearly separated from the
> generic stuff. For this it will be very helpful to see what has to be
> done different on different hardware. So, go ahead and send your
> patches.
Great.
> > It would be also great to hear, what are your plans about
> > the rest of the 1362 code (on top of ohci-1362.h). This usb
> >
> I could post them here as soon as I've got anything sensible
> working. But it might be more sensible to set up a common CVS
> repository?
Setting up a cvs repository would be an option. But to
ensure the quality of the code, I would be happy if my
changes will be reviewed before checking them in. Can you
set up a repository?
> > What about changing the SET macros also to take struct:
> >
> > #define PTD_LEN(p) FInsrt(*(u16*)(&(p)->len, _PTD_LEN)
> >
> I didn't define any PTD_SET macros, because I prefer something like:
> ptd->ep_spd = PTD_EP(ed_en(ed_flags)) | PTD_LAST_ISO(last) | PTD_SPD(spd) |
> PTD_MPS_H(mps);
> over:
> PTD_SET_EP(ptd, ed_en(ed_flags));
> PTD_SET_LAST_ISO(ptd, last);
> PTD_SET_SPD(ptd, spd);
OK, I see.
Below is a little patch with fixes. In the last hunk I added
a missing closing parenthesis. Please check, whether it is
inserted to the correct place.
Could you please run Lindent over the ohci-isp1362.h after
applying the below patch. My editor's settings are rather
far from the official CodingStyle. Let's better exchange
Lindent'ed code in the future.
Olav
--- linux-2.6.8.1-isp1362-base/drivers/usb/host/ohci-isp1362.h 2004-09-15
10:03:38.000000000 +0300
+++ linux-2.6.8.1-isp1362-tmp0/drivers/usb/host/ohci-isp1362.h 2004-09-15
10:34:30.000000000 +0300
@@ -235,13 +235,13 @@ struct ptd {
#define _PTD_ACTIVE Fld(1, 3)
#define PTD_ACTIVE(v) FInsrt(v, _PTD_ACTIVE)
#define PTD_GET_ACTIVE(p) FExtr((p)->cc_toggle, _PTD_ACTIVE)
-#define _PTD_CC Fld(4, 12)
+#define _PTD_CC Fld(4, 4)
#define PTD_CC(v) FInsrt(v, _PTD_CC)
#define PTD_GET_CC(p) FExtr((p)->cc_toggle, _PTD_CC)
#define _PTD_MPS Fld(10, 0)
#define PTD_MPS(v) FInsrt(v, _PTD_MPS)
-#define PTD_GET_MPS(p) FExtr(*(u16*)(&(p)->dir), _PTD_MPS)
+#define PTD_GET_MPS(p) FExtr(*(u16*)(&(p)->mps), _PTD_MPS)
#define _PTD_MPS_H Fld(2, 0)
#define PTD_MPS_H(v) FInsrt(v, _PTD_MPS_H)
@@ -265,12 +265,16 @@ struct ptd {
#define PTD_DIR(v) FInsrt(v, _PTD_DIR)
#define PTD_GET_DIR(p) FExtr((p)->dir, _PTD_DIR)
+#define _PTD_FA Fld(7, 0)
+#define PTD_FA(v) FInsrt(v, _PTD_FA)
+#define PTD_GET_FA(p) FExtr((p)->func_addr,_PTD_FA)
+
#define _PTD_SF Fld(4, 0)
#define PTD_SF(v) FInsrt(v, _PTD_SF)
-#define PTD_GET_SF(p) FExtr(*(u16*)(&(p)->pr_sf), _PTD_SF)
+#define PTD_GET_SF(p) FExtr((p)->pr_sf, _PTD_SF)
#define _PTD_PR Fld(3, 5)
#define PTD_PR(v) FInsrt(v, _PTD_PR)
-#define PTD_GET_PR(p) FExtr(*(u16*)(&(p)->pr_sf), _PTD_PR)
+#define PTD_GET_PR(p) FExtr((p)->pr_sf, _PTD_PR)
#define PID_SETUP 0
#define PID_OUT 1
@@ -508,7 +512,7 @@ static inline int __isp1362_read_buffer(
__isp1362_write_reg32(dev, HCDIRADDR, HCDIRADDR_ADDR(offset) |
HCDIRADDR_COUNT(len));
#else
__isp1362_write_reg32(dev, HCDIRADDR, HCDIRADDR_ADDR(offset & ~1) |
- HCDIRADDR_COUNT((len + (len & 1) + (offset & 1) & ~1));
+ HCDIRADDR_COUNT((len + (len & 1) + (offset & 1)) & ~1));
#endif
if (offset & 1) {
// the address within the chip buffer is not 16bit aligned
-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel