This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Typo fix for nec_upd985xx USB device


Jonathan,

As Andrew said he just found it via inspection.  The patch doesn't fix
any known bug.

If you grep for USBS_GSR2_URST in usbs_upd985xx.c you'll get the
following (assuming you've already applied the patch I sent):

========================
usbs_upd985xx.c:207:#define USBS_GSR2_URST                  (0x01 << 17)
usbs_upd985xx.c:1246:    if (0 == (*USBS_IMR2 &
IBUS_SWAP32(USBS_GSR2_URST))) {
usbs_upd985xx.c:1247:        *USBS_IMR2              |=
IBUS_SWAP32(USBS_GSR2_URST); FLUSH_IBUS();
usbs_upd985xx.c:1248:        usbs_upd985xx_gsr2_mask |= USBS_GSR2_URST;
usbs_upd985xx.c:1628:        *USBS_IMR2              =
IBUS_SWAP32(USBS_GSR2_URSM | USBS_GSR2_URST | USBS_GSR2_USPD);
FLUSH_IBUS();
usbs_upd985xx.c:1629:        usbs_upd985xx_gsr2_mask = (USBS_GSR2_URSM |
USBS_GSR2_URST | USBS_GSR2_USPD);
usbs_upd985xx.c:2441:            if (0 != (USBS_GSR2_URST & gsr2)) {
========================

I look at all the other uses of USBS_GSR2_URST and they were all treated
as a normal bit flag.  It seemed like such an obvious typo I didn't
bother getting out the data sheet.  As I said in my patch, if it isn't a
typo, it needs some heavy explaining...

If you want to wait on Bart getting back (or me finding time to dig into
the data sheet) that's fine.


On Mon, 2002-10-21 at 02:21, Andrew Lunn wrote:
> > If it's known to fix a problem it almost doesn't matter whether it was a 
> > typo or not ;-). Bart's on vacation, so if you (or Andrew) can just 
> > confirm that, I'll check it in.
> 
> I cannot confirm it. I was just reading the code and thought this was
> strange. I've not spent the time to understand the code so it could be
> correct. I asked RedHat to check it....
> 
>          Andrew
-- 
David Smith
dsmith@redhat.com
Red Hat, Inc.
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]